Commit 2a262fca99ee25dbcdf5668406672d58709c5c54
1 parent
dad10b13
Revert "fix: 修改场景联动,数据流转,报表配置处于启用中不能操作"
This reverts commit 204d053a
Showing
17 changed files
with
36 additions
and
227 deletions
@@ -3,26 +3,24 @@ | @@ -3,26 +3,24 @@ | ||
3 | <a-input | 3 | <a-input |
4 | placeholder="请输入参数key" | 4 | placeholder="请输入参数key" |
5 | v-model:value="param.label" | 5 | v-model:value="param.label" |
6 | - :disabled="disabled" | ||
7 | style="width: 38%; margin-bottom: 5px" | 6 | style="width: 38%; margin-bottom: 5px" |
8 | @change="emitChange" | 7 | @change="emitChange" |
9 | /> | 8 | /> |
10 | <a-input | 9 | <a-input |
11 | placeholder="请输入参数value" | 10 | placeholder="请输入参数value" |
12 | - :disabled="disabled" | ||
13 | v-model:value="param.value" | 11 | v-model:value="param.value" |
14 | style="width: 38%; margin: 0 0 5px 60px" | 12 | style="width: 38%; margin: 0 0 5px 60px" |
15 | @change="emitChange" | 13 | @change="emitChange" |
16 | /> | 14 | /> |
17 | <MinusCircleOutlined | 15 | <MinusCircleOutlined |
18 | - v-if="dynamicInput.params.length > min && !disabled" | 16 | + v-if="dynamicInput.params.length > min" |
19 | class="dynamic-delete-button" | 17 | class="dynamic-delete-button" |
20 | @click="remove(param)" | 18 | @click="remove(param)" |
21 | style="width: 50px" | 19 | style="width: 50px" |
22 | /> | 20 | /> |
23 | </div> | 21 | </div> |
24 | <div> | 22 | <div> |
25 | - <a-button :disabled="disabled" type="dashed" style="width: 38%" @click="add"> | 23 | + <a-button type="dashed" style="width: 38%" @click="add"> |
26 | <PlusOutlined /> | 24 | <PlusOutlined /> |
27 | 新增 | 25 | 新增 |
28 | </a-button> | 26 | </a-button> |
@@ -51,17 +49,11 @@ | @@ -51,17 +49,11 @@ | ||
51 | value: propTypes.object.def({}), | 49 | value: propTypes.object.def({}), |
52 | //自定义删除按钮多少才会显示 | 50 | //自定义删除按钮多少才会显示 |
53 | min: propTypes.integer.def(0), | 51 | min: propTypes.integer.def(0), |
54 | - disabled: { | ||
55 | - type: Boolean, | ||
56 | - default: false, | ||
57 | - }, | ||
58 | }, | 52 | }, |
59 | emits: ['change', 'update:value'], | 53 | emits: ['change', 'update:value'], |
60 | setup(props, { emit }) { | 54 | setup(props, { emit }) { |
61 | //input动态数据 | 55 | //input动态数据 |
62 | const dynamicInput: UnwrapRef<{ params: Params[] }> = reactive({ params: [] }); | 56 | const dynamicInput: UnwrapRef<{ params: Params[] }> = reactive({ params: [] }); |
63 | - | ||
64 | - console.log(dynamicInput, 'dynamicInput'); | ||
65 | //删除Input | 57 | //删除Input |
66 | const remove = (item: Params) => { | 58 | const remove = (item: Params) => { |
67 | let index = dynamicInput.params.indexOf(item); | 59 | let index = dynamicInput.params.indexOf(item); |
@@ -71,11 +63,6 @@ | @@ -71,11 +63,6 @@ | ||
71 | emitChange(); | 63 | emitChange(); |
72 | }; | 64 | }; |
73 | 65 | ||
74 | - // const disabled = computed(() => { | ||
75 | - // const { disabled } = props || {}; | ||
76 | - // return disabled; | ||
77 | - // }); | ||
78 | - | ||
79 | //新增Input | 66 | //新增Input |
80 | const add = () => { | 67 | const add = () => { |
81 | dynamicInput.params.push({ | 68 | dynamicInput.params.push({ |
@@ -121,7 +108,6 @@ | @@ -121,7 +108,6 @@ | ||
121 | emitChange, | 108 | emitChange, |
122 | remove, | 109 | remove, |
123 | add, | 110 | add, |
124 | - // disabled, | ||
125 | }; | 111 | }; |
126 | }, | 112 | }, |
127 | }); | 113 | }); |
@@ -37,7 +37,6 @@ | @@ -37,7 +37,6 @@ | ||
37 | const getBindProps = computed<Recordable>(() => { | 37 | const getBindProps = computed<Recordable>(() => { |
38 | const { value, apiTreeSelectProps = {} } = props; | 38 | const { value, apiTreeSelectProps = {} } = props; |
39 | const { params = {} } = apiTreeSelectProps; | 39 | const { params = {} } = apiTreeSelectProps; |
40 | - console.log(props, 'props'); | ||
41 | return { | 40 | return { |
42 | replaceFields: { children: 'children', key: 'id', title: 'name', value: 'id' }, | 41 | replaceFields: { children: 'children', key: 'id', title: 'name', value: 'id' }, |
43 | getPopupContainer: () => document.body, | 42 | getPopupContainer: () => document.body, |
@@ -14,11 +14,7 @@ | @@ -14,11 +14,7 @@ | ||
14 | <!-- 设备选择 --> | 14 | <!-- 设备选择 --> |
15 | <template #devices="{ model }"> | 15 | <template #devices="{ model }"> |
16 | <span class="hidden">{{ handleChangeOrg(model['organizationId']) }}</span> | 16 | <span class="hidden">{{ handleChangeOrg(model['organizationId']) }}</span> |
17 | - <SelectDevice | ||
18 | - ref="selectDeviceRef" | ||
19 | - :selectOptions="selectOptions" | ||
20 | - v-model:disabled="deviceDisabled" | ||
21 | - /> | 17 | + <SelectDevice ref="selectDeviceRef" :selectOptions="selectOptions" /> |
22 | </template> | 18 | </template> |
23 | </BasicForm> | 19 | </BasicForm> |
24 | </BasicDrawer> | 20 | </BasicDrawer> |
@@ -86,14 +82,12 @@ | @@ -86,14 +82,12 @@ | ||
86 | } | 82 | } |
87 | ); | 83 | ); |
88 | 84 | ||
89 | - const [registerForm, { validate, resetFields, setFieldsValue, updateSchema, setProps }] = useForm( | ||
90 | - { | ||
91 | - labelWidth: 120, | ||
92 | - schemas: formSchema, | ||
93 | - showActionButtonGroup: false, | ||
94 | - fieldMapToTime: [[SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS]]], | ||
95 | - } | ||
96 | - ); | 85 | + const [registerForm, { validate, resetFields, setFieldsValue, updateSchema }] = useForm({ |
86 | + labelWidth: 120, | ||
87 | + schemas: formSchema, | ||
88 | + showActionButtonGroup: false, | ||
89 | + fieldMapToTime: [[SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS]]], | ||
90 | + }); | ||
97 | 91 | ||
98 | const businessText = ref(''); | 92 | const businessText = ref(''); |
99 | 93 | ||
@@ -101,27 +95,11 @@ | @@ -101,27 +95,11 @@ | ||
101 | data: {}, | 95 | data: {}, |
102 | }); | 96 | }); |
103 | 97 | ||
104 | - const deviceDisabled = ref<boolean>(false); | ||
105 | - | ||
106 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { | 98 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { |
107 | try { | 99 | try { |
108 | await nextTick(); | 100 | await nextTick(); |
109 | handleClose(); | 101 | handleClose(); |
110 | businessText.value = data.text; | 102 | businessText.value = data.text; |
111 | - if (businessText.value == BusinessReportConfigTextEnum.BUSINESS_VIEW_TEXT) { | ||
112 | - deviceDisabled.value = true; | ||
113 | - setProps({ disabled: true }); | ||
114 | - updateSchema({ | ||
115 | - field: 'organizationId', | ||
116 | - componentProps: { apiTreeSelectProps: { disabled: true } }, | ||
117 | - }); | ||
118 | - } else { | ||
119 | - deviceDisabled.value = false; | ||
120 | - updateSchema({ | ||
121 | - field: 'organizationId', | ||
122 | - componentProps: { apiTreeSelectProps: { disabled: false } }, | ||
123 | - }); | ||
124 | - } | ||
125 | setFieldsValue(setDefaultTime()); | 103 | setFieldsValue(setDefaultTime()); |
126 | updateSchema(disableCustomWeekly(BusinessExecutewayEnum.BUSINESS_EXECUTEWAY_IMMEDIATE)); | 104 | updateSchema(disableCustomWeekly(BusinessExecutewayEnum.BUSINESS_EXECUTEWAY_IMMEDIATE)); |
127 | setDrawerProps(setPropsForModal(businessText.value)); | 105 | setDrawerProps(setPropsForModal(businessText.value)); |
@@ -11,7 +11,6 @@ | @@ -11,7 +11,6 @@ | ||
11 | v-model:value="param.attributes" | 11 | v-model:value="param.attributes" |
12 | style="width: 38%; margin-left: 1.8vw" | 12 | style="width: 38%; margin-left: 1.8vw" |
13 | :options="selectOptions" | 13 | :options="selectOptions" |
14 | - :disabled="disabled" | ||
15 | @change="emitChange" | 14 | @change="emitChange" |
16 | mode="multiple" | 15 | mode="multiple" |
17 | allowClear | 16 | allowClear |
@@ -32,10 +31,6 @@ | @@ -32,10 +31,6 @@ | ||
32 | 31 | ||
33 | const props = defineProps({ | 32 | const props = defineProps({ |
34 | value: propTypes.object.def({}), | 33 | value: propTypes.object.def({}), |
35 | - disabled: { | ||
36 | - type: Boolean, | ||
37 | - required: false, | ||
38 | - }, | ||
39 | }); | 34 | }); |
40 | 35 | ||
41 | const selectOptions: any = ref([]); | 36 | const selectOptions: any = ref([]); |
@@ -5,17 +5,11 @@ | @@ -5,17 +5,11 @@ | ||
5 | style="width: 100%" | 5 | style="width: 100%" |
6 | :options="selectOptions" | 6 | :options="selectOptions" |
7 | @change="handleDeviceChange" | 7 | @change="handleDeviceChange" |
8 | - :disabled="disabled" | ||
9 | mode="multiple" | 8 | mode="multiple" |
10 | labelInValue | 9 | labelInValue |
11 | /> | 10 | /> |
12 | <template v-for="(item, index) in deviceList" :key="item.value"> | 11 | <template v-for="(item, index) in deviceList" :key="item.value"> |
13 | - <SelectAttributes | ||
14 | - :ref="bindDeviceRef.deviceAttrRef" | ||
15 | - :value="item" | ||
16 | - :index="index" | ||
17 | - :disabled="disabled" | ||
18 | - /> | 12 | + <SelectAttributes :ref="bindDeviceRef.deviceAttrRef" :value="item" :index="index" /> |
19 | </template> | 13 | </template> |
20 | </template> | 14 | </template> |
21 | <script lang="ts" setup name="SelectDevice"> | 15 | <script lang="ts" setup name="SelectDevice"> |
@@ -29,10 +23,6 @@ | @@ -29,10 +23,6 @@ | ||
29 | type: Array as PropType<TSelectOption[]>, | 23 | type: Array as PropType<TSelectOption[]>, |
30 | required: true, | 24 | required: true, |
31 | }, | 25 | }, |
32 | - disabled: { | ||
33 | - type: Boolean, | ||
34 | - required: false, | ||
35 | - }, | ||
36 | }); | 26 | }); |
37 | 27 | ||
38 | const selectValue = ref([]); | 28 | const selectValue = ref([]); |
@@ -4,21 +4,18 @@ | @@ -4,21 +4,18 @@ | ||
4 | <template #uploadFilesSlot="{ model }"> | 4 | <template #uploadFilesSlot="{ model }"> |
5 | <UploadFile | 5 | <UploadFile |
6 | :url="credentialsFile.caCertFileName" | 6 | :url="credentialsFile.caCertFileName" |
7 | - :disabled="disabled" | ||
8 | @fileUrlEmit="handleFileUrlEmitH" | 7 | @fileUrlEmit="handleFileUrlEmitH" |
9 | v-show="model['type'] === CredentialsEnum.IS_PEM" | 8 | v-show="model['type'] === CredentialsEnum.IS_PEM" |
10 | /> | 9 | /> |
11 | <div class="h-4"></div> | 10 | <div class="h-4"></div> |
12 | <UploadFile | 11 | <UploadFile |
13 | :url="credentialsFile.certFileName" | 12 | :url="credentialsFile.certFileName" |
14 | - :disabled="disabled" | ||
15 | @fileUrlEmit="handleFileUrlEmitC" | 13 | @fileUrlEmit="handleFileUrlEmitC" |
16 | v-show="model['type'] === CredentialsEnum.IS_PEM" | 14 | v-show="model['type'] === CredentialsEnum.IS_PEM" |
17 | /> | 15 | /> |
18 | <div class="h-4"></div> | 16 | <div class="h-4"></div> |
19 | <UploadFile | 17 | <UploadFile |
20 | :url="credentialsFile.privateKeyFileName" | 18 | :url="credentialsFile.privateKeyFileName" |
21 | - :disabled="disabled" | ||
22 | @fileUrlEmit="handleFileUrlEmitB" | 19 | @fileUrlEmit="handleFileUrlEmitB" |
23 | v-show="model['type'] === CredentialsEnum.IS_PEM" | 20 | v-show="model['type'] === CredentialsEnum.IS_PEM" |
24 | /> </template | 21 | /> </template |
@@ -26,7 +23,7 @@ | @@ -26,7 +23,7 @@ | ||
26 | </div> | 23 | </div> |
27 | </template> | 24 | </template> |
28 | <script lang="ts" setup name="DataFlowMethodIsApi"> | 25 | <script lang="ts" setup name="DataFlowMethodIsApi"> |
29 | - import { reactive, ref } from 'vue'; | 26 | + import { reactive } from 'vue'; |
30 | import { BasicForm, useForm } from '/@/components/Form'; | 27 | import { BasicForm, useForm } from '/@/components/Form'; |
31 | import { modeApiForm } from './config'; | 28 | import { modeApiForm } from './config'; |
32 | import { modelFormPublicConfig } from '../../../dataflowmodal/config'; | 29 | import { modelFormPublicConfig } from '../../../dataflowmodal/config'; |
@@ -39,11 +36,10 @@ | @@ -39,11 +36,10 @@ | ||
39 | privateKeyFileName: undefined, | 36 | privateKeyFileName: undefined, |
40 | }); | 37 | }); |
41 | 38 | ||
42 | - const [register, { validateFields, setFieldsValue, resetFields, setProps, updateSchema }] = | ||
43 | - useForm({ | ||
44 | - schemas: modeApiForm, | ||
45 | - ...modelFormPublicConfig, | ||
46 | - }); | 39 | + const [register, { validateFields, setFieldsValue, resetFields }] = useForm({ |
40 | + schemas: modeApiForm, | ||
41 | + ...modelFormPublicConfig, | ||
42 | + }); | ||
47 | 43 | ||
48 | const handleFileUrlEmitH = (fileUrl) => (credentialsFile.caCertFileName = fileUrl); | 44 | const handleFileUrlEmitH = (fileUrl) => (credentialsFile.caCertFileName = fileUrl); |
49 | 45 | ||
@@ -82,24 +78,10 @@ | @@ -82,24 +78,10 @@ | ||
82 | }; | 78 | }; |
83 | 79 | ||
84 | const resetValue = () => resetFields(); | 80 | const resetValue = () => resetFields(); |
85 | - | ||
86 | - const disabled = ref<boolean>(false); | ||
87 | - const setDisabledProps = (value) => { | ||
88 | - setProps(value); | ||
89 | - disabled.value = true; | ||
90 | - updateSchema({ field: 'headers', componentProps: { disabled: false } }); | ||
91 | - }; | ||
92 | - | ||
93 | - const setCancelDisabled = () => { | ||
94 | - updateSchema({ field: 'headers', componentProps: { disabled: false } }); | ||
95 | - }; | ||
96 | - | ||
97 | defineExpose({ | 81 | defineExpose({ |
98 | getValue, | 82 | getValue, |
99 | setValue, | 83 | setValue, |
100 | resetValue, | 84 | resetValue, |
101 | - setDisabledProps, | ||
102 | - setCancelDisabled, | ||
103 | }); | 85 | }); |
104 | </script> | 86 | </script> |
105 | 87 |
@@ -29,7 +29,7 @@ class ApiFormPartialConfig { | @@ -29,7 +29,7 @@ class ApiFormPartialConfig { | ||
29 | return [ | 29 | return [ |
30 | { label: 'Anonymous', value: 'anonymous' }, | 30 | { label: 'Anonymous', value: 'anonymous' }, |
31 | { label: 'Basic', value: 'basic' }, | 31 | { label: 'Basic', value: 'basic' }, |
32 | - { label: 'PEM', value: 'cert.PEM' }, | 32 | + { label: 'PEM', value: 'pem' }, |
33 | ]; | 33 | ]; |
34 | } | 34 | } |
35 | } | 35 | } |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | import { modelKafkaForm } from './config'; | 8 | import { modelKafkaForm } from './config'; |
9 | import { modelFormPublicConfig } from '../../../dataflowmodal/config'; | 9 | import { modelFormPublicConfig } from '../../../dataflowmodal/config'; |
10 | 10 | ||
11 | - const [register, { validate, setFieldsValue, resetFields, setProps, updateSchema }] = useForm({ | 11 | + const [register, { validate, setFieldsValue, resetFields }] = useForm({ |
12 | schemas: modelKafkaForm, | 12 | schemas: modelKafkaForm, |
13 | ...modelFormPublicConfig, | 13 | ...modelFormPublicConfig, |
14 | }); | 14 | }); |
@@ -19,29 +19,13 @@ | @@ -19,29 +19,13 @@ | ||
19 | return values; | 19 | return values; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | - const setValue = (value) => { | ||
23 | - console.log(value, 'value'); | ||
24 | - setFieldsValue(value); | ||
25 | - }; | ||
26 | - | ||
27 | - // 禁用表单 | ||
28 | - const setDisabledProps = (value) => { | ||
29 | - setProps(value); | ||
30 | - updateSchema({ field: 'otherProperties', componentProps: { disabled: true } }); | ||
31 | - }; | ||
32 | - | ||
33 | - // 取消禁用 | ||
34 | - const setCancelDisabled = () => { | ||
35 | - updateSchema({ field: 'otherProperties', componentProps: { disabled: false } }); | ||
36 | - }; | 22 | + const setValue = (value) => setFieldsValue(value); |
37 | 23 | ||
38 | const resetValue = () => resetFields(); | 24 | const resetValue = () => resetFields(); |
39 | defineExpose({ | 25 | defineExpose({ |
40 | getValue, | 26 | getValue, |
41 | setValue, | 27 | setValue, |
42 | resetValue, | 28 | resetValue, |
43 | - setDisabledProps, | ||
44 | - setCancelDisabled, | ||
45 | }); | 29 | }); |
46 | </script> | 30 | </script> |
47 | 31 |
@@ -4,21 +4,18 @@ | @@ -4,21 +4,18 @@ | ||
4 | <template #uploadFilesSlot="{ model }"> | 4 | <template #uploadFilesSlot="{ model }"> |
5 | <UploadFile | 5 | <UploadFile |
6 | :url="credentialsFile.caCertFileName" | 6 | :url="credentialsFile.caCertFileName" |
7 | - :disabled="disabled" | ||
8 | @fileUrlEmit="handleFileUrlEmitH" | 7 | @fileUrlEmit="handleFileUrlEmitH" |
9 | v-show="model['type'] === CredentialsEnum.IS_PEM" | 8 | v-show="model['type'] === CredentialsEnum.IS_PEM" |
10 | /> | 9 | /> |
11 | <div class="h-4"></div> | 10 | <div class="h-4"></div> |
12 | <UploadFile | 11 | <UploadFile |
13 | :url="credentialsFile.certFileName" | 12 | :url="credentialsFile.certFileName" |
14 | - :disabled="disabled" | ||
15 | @fileUrlEmit="handleFileUrlEmitC" | 13 | @fileUrlEmit="handleFileUrlEmitC" |
16 | v-show="model['type'] === CredentialsEnum.IS_PEM" | 14 | v-show="model['type'] === CredentialsEnum.IS_PEM" |
17 | /> | 15 | /> |
18 | <div class="h-4"></div> | 16 | <div class="h-4"></div> |
19 | <UploadFile | 17 | <UploadFile |
20 | :url="credentialsFile.privateKeyFileName" | 18 | :url="credentialsFile.privateKeyFileName" |
21 | - :disabled="disabled" | ||
22 | @fileUrlEmit="handleFileUrlEmitB" | 19 | @fileUrlEmit="handleFileUrlEmitB" |
23 | v-show="model['type'] === CredentialsEnum.IS_PEM" | 20 | v-show="model['type'] === CredentialsEnum.IS_PEM" |
24 | /> | 21 | /> |
@@ -27,7 +24,7 @@ | @@ -27,7 +24,7 @@ | ||
27 | </div> | 24 | </div> |
28 | </template> | 25 | </template> |
29 | <script lang="ts" setup name="DataFlowMethodIsMqtt"> | 26 | <script lang="ts" setup name="DataFlowMethodIsMqtt"> |
30 | - import { reactive, ref } from 'vue'; | 27 | + import { reactive } from 'vue'; |
31 | import { BasicForm, useForm } from '/@/components/Form'; | 28 | import { BasicForm, useForm } from '/@/components/Form'; |
32 | import { modeMqttForm } from './config'; | 29 | import { modeMqttForm } from './config'; |
33 | import { UploadFile } from '../../../uploadfile'; | 30 | import { UploadFile } from '../../../uploadfile'; |
@@ -40,7 +37,7 @@ | @@ -40,7 +37,7 @@ | ||
40 | privateKeyFileName: undefined, | 37 | privateKeyFileName: undefined, |
41 | }); | 38 | }); |
42 | 39 | ||
43 | - const [register, { validateFields, setFieldsValue, resetFields, setProps }] = useForm({ | 40 | + const [register, { validateFields, setFieldsValue, resetFields }] = useForm({ |
44 | schemas: modeMqttForm, | 41 | schemas: modeMqttForm, |
45 | ...modelFormPublicConfig, | 42 | ...modelFormPublicConfig, |
46 | }); | 43 | }); |
@@ -84,18 +81,11 @@ | @@ -84,18 +81,11 @@ | ||
84 | }); | 81 | }); |
85 | }; | 82 | }; |
86 | 83 | ||
87 | - const disabled = ref<boolean>(false); | ||
88 | - const setDisabledProps = (value) => { | ||
89 | - setProps(value); | ||
90 | - disabled.value = true; | ||
91 | - }; | ||
92 | - | ||
93 | const resetValue = () => resetFields(); | 84 | const resetValue = () => resetFields(); |
94 | defineExpose({ | 85 | defineExpose({ |
95 | getValue, | 86 | getValue, |
96 | setValue, | 87 | setValue, |
97 | resetValue, | 88 | resetValue, |
98 | - setDisabledProps, | ||
99 | }); | 89 | }); |
100 | </script> | 90 | </script> |
101 | 91 |
@@ -8,11 +8,10 @@ | @@ -8,11 +8,10 @@ | ||
8 | import { modeRabbitMqForm } from './config'; | 8 | import { modeRabbitMqForm } from './config'; |
9 | import { modelFormPublicConfig } from '../../../dataflowmodal/config'; | 9 | import { modelFormPublicConfig } from '../../../dataflowmodal/config'; |
10 | 10 | ||
11 | - const [register, { validateFields, setFieldsValue, resetFields, setProps, updateSchema }] = | ||
12 | - useForm({ | ||
13 | - schemas: modeRabbitMqForm, | ||
14 | - ...modelFormPublicConfig, | ||
15 | - }); | 11 | + const [register, { validateFields, setFieldsValue, resetFields }] = useForm({ |
12 | + schemas: modeRabbitMqForm, | ||
13 | + ...modelFormPublicConfig, | ||
14 | + }); | ||
16 | 15 | ||
17 | const getValue = async () => { | 16 | const getValue = async () => { |
18 | const values = await validateFields(); | 17 | const values = await validateFields(); |
@@ -23,22 +22,10 @@ | @@ -23,22 +22,10 @@ | ||
23 | const setValue = (value) => setFieldsValue(value); | 22 | const setValue = (value) => setFieldsValue(value); |
24 | 23 | ||
25 | const resetValue = () => resetFields(); | 24 | const resetValue = () => resetFields(); |
26 | - | ||
27 | - const setDisabledProps = (value) => { | ||
28 | - setProps(value); | ||
29 | - updateSchema({ field: 'clientProperties', componentProps: { disabled: true } }); | ||
30 | - }; | ||
31 | - | ||
32 | - const setCancelDisabled = () => { | ||
33 | - updateSchema({ field: 'clientProperties', componentProps: { disabled: false } }); | ||
34 | - }; | ||
35 | - | ||
36 | defineExpose({ | 25 | defineExpose({ |
37 | getValue, | 26 | getValue, |
38 | setValue, | 27 | setValue, |
39 | resetValue, | 28 | resetValue, |
40 | - setDisabledProps, | ||
41 | - setCancelDisabled, | ||
42 | }); | 29 | }); |
43 | </script> | 30 | </script> |
44 | <style lang="less" scoped></style> | 31 | <style lang="less" scoped></style> |
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | 25 | ||
26 | const emit = defineEmits(['currentDataFlowMethodEmitNext']); | 26 | const emit = defineEmits(['currentDataFlowMethodEmitNext']); |
27 | 27 | ||
28 | - const [register, { validateFields, setFieldsValue, resetFields, setProps }] = useForm({ | 28 | + const [register, { validateFields, setFieldsValue, resetFields }] = useForm({ |
29 | schemas: modeForm(props.saveContent), | 29 | schemas: modeForm(props.saveContent), |
30 | ...modelFormPublicConfig, | 30 | ...modelFormPublicConfig, |
31 | }); | 31 | }); |
@@ -66,7 +66,6 @@ | @@ -66,7 +66,6 @@ | ||
66 | getValue, | 66 | getValue, |
67 | setValue, | 67 | setValue, |
68 | resetValue, | 68 | resetValue, |
69 | - setProps, | ||
70 | }); | 69 | }); |
71 | </script> | 70 | </script> |
72 | <style lang="less" scoped> | 71 | <style lang="less" scoped> |
@@ -74,9 +74,6 @@ | @@ -74,9 +74,6 @@ | ||
74 | resetValue(); | 74 | resetValue(); |
75 | const { text, record } = data; | 75 | const { text, record } = data; |
76 | businessText.value = text; | 76 | businessText.value = text; |
77 | - if (businessText.value == BusinessDataFlowTextEnum.BUSINESS_MODAL_VIEW_TEXT) { | ||
78 | - dataFlowMethodRef.value?.setProps({ disabled: true }); | ||
79 | - } | ||
80 | restData.data = record; | 77 | restData.data = record; |
81 | setModalProps(modalProps(businessText.value)); | 78 | setModalProps(modalProps(businessText.value)); |
82 | if (!record) return; | 79 | if (!record) return; |
@@ -164,12 +161,6 @@ | @@ -164,12 +161,6 @@ | ||
164 | 161 | ||
165 | //下一步 | 162 | //下一步 |
166 | const handleNextDataFlowParams = async (value) => { | 163 | const handleNextDataFlowParams = async (value) => { |
167 | - //判断是否是查看 查看禁用表单 | ||
168 | - if (businessText.value == BusinessDataFlowTextEnum.BUSINESS_MODAL_VIEW_TEXT) { | ||
169 | - dataFlowParamsRef.value?.setProps(); | ||
170 | - } else { | ||
171 | - dataFlowParamsRef.value?.setCancelDisabled(); | ||
172 | - } | ||
173 | value | 164 | value |
174 | .then(async (res) => { | 165 | .then(async (res) => { |
175 | currentStep.value = 1; | 166 | currentStep.value = 1; |
@@ -104,35 +104,10 @@ | @@ -104,35 +104,10 @@ | ||
104 | if (!findDateFlow) return; | 104 | if (!findDateFlow) return; |
105 | findDateFlow[3](0); | 105 | findDateFlow[3](0); |
106 | }; | 106 | }; |
107 | - | ||
108 | - const setProps = async () => { | ||
109 | - await nextTick(); | ||
110 | - props.dataFlowType === BusinessDataFlowMethodEnum.DATAFLOW_METHOD_KAFKA && | ||
111 | - dataFlowMethodIsKafkaRef.value?.setDisabledProps({ disabled: true }); | ||
112 | - props.dataFlowType === BusinessDataFlowMethodEnum.DATAFLOW_METHOD_MQTT && | ||
113 | - dataFlowMethodIsMqttRef.value?.setDisabledProps({ disabled: true }); | ||
114 | - props.dataFlowType === BusinessDataFlowMethodEnum.DATAFLOW_METHOD_RABBITMQ && | ||
115 | - dataFlowMethodIsRabbitMqRef.value?.setDisabledProps({ disabled: true }); | ||
116 | - props.dataFlowType === BusinessDataFlowMethodEnum.DATAFLOW_METHOD_REST_API && | ||
117 | - dataFlowMethodIsApiRef.value?.setDisabledProps({ disabled: true }); | ||
118 | - }; | ||
119 | - | ||
120 | - const setCancelDisabled = async () => { | ||
121 | - await nextTick(); | ||
122 | - props.dataFlowType === BusinessDataFlowMethodEnum.DATAFLOW_METHOD_KAFKA && | ||
123 | - dataFlowMethodIsKafkaRef.value?.setCancelDisabled(); | ||
124 | - props.dataFlowType === BusinessDataFlowMethodEnum.DATAFLOW_METHOD_RABBITMQ && | ||
125 | - dataFlowMethodIsRabbitMqRef.value?.setCancelDisabled(); | ||
126 | - props.dataFlowType === BusinessDataFlowMethodEnum.DATAFLOW_METHOD_REST_API && | ||
127 | - dataFlowMethodIsApiRef.value?.setCancelDisabled(); | ||
128 | - }; | ||
129 | - | ||
130 | defineExpose({ | 107 | defineExpose({ |
131 | getValue, | 108 | getValue, |
132 | setValue, | 109 | setValue, |
133 | resetValue, | 110 | resetValue, |
134 | - setCancelDisabled, | ||
135 | - setProps, | ||
136 | }); | 111 | }); |
137 | </script> | 112 | </script> |
138 | <style lang="less" scoped> | 113 | <style lang="less" scoped> |
@@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
3 | <a-upload-dragger | 3 | <a-upload-dragger |
4 | v-model:fileList="fileList.list" | 4 | v-model:fileList="fileList.list" |
5 | name="file" | 5 | name="file" |
6 | - :disabled="disabled" | ||
7 | :multiple="false" | 6 | :multiple="false" |
8 | @change="handleChange($event)" | 7 | @change="handleChange($event)" |
9 | :before-upload="() => false" | 8 | :before-upload="() => false" |
@@ -38,10 +37,6 @@ | @@ -38,10 +37,6 @@ | ||
38 | type: String, | 37 | type: String, |
39 | default: '', | 38 | default: '', |
40 | }, | 39 | }, |
41 | - disabled: { | ||
42 | - type: Boolean, | ||
43 | - default: false, | ||
44 | - }, | ||
45 | }); | 40 | }); |
46 | 41 | ||
47 | const emit = defineEmits(['fileUrlEmit']); | 42 | const emit = defineEmits(['fileUrlEmit']); |
@@ -153,14 +153,11 @@ | @@ -153,14 +153,11 @@ | ||
153 | let getActionFormValue = ref([]); | 153 | let getActionFormValue = ref([]); |
154 | const editEntryIdData = ref([]); | 154 | const editEntryIdData = ref([]); |
155 | const editAlarmConfigData = ref([]); | 155 | const editAlarmConfigData = ref([]); |
156 | - const isUpdate = ref<boolean | number>(false); | 156 | + const isUpdate = ref(false); |
157 | const id = ref(undefined); | 157 | const id = ref(undefined); |
158 | const tenantId = ref(undefined); | 158 | const tenantId = ref(undefined); |
159 | const isView = ref(true); | 159 | const isView = ref(true); |
160 | - const [ | ||
161 | - registerForm, | ||
162 | - { resetFields, validate, setFieldsValue, getFieldsValue, setProps, updateSchema }, | ||
163 | - ] = useForm({ | 160 | + const [registerForm, { resetFields, validate, setFieldsValue, getFieldsValue }] = useForm({ |
164 | labelWidth: 120, | 161 | labelWidth: 120, |
165 | schemas: formSchema, | 162 | schemas: formSchema, |
166 | showActionButtonGroup: false, | 163 | showActionButtonGroup: false, |
@@ -534,27 +531,6 @@ | @@ -534,27 +531,6 @@ | ||
534 | showFooter: unref(isView), | 531 | showFooter: unref(isView), |
535 | loading: false, | 532 | loading: false, |
536 | }); | 533 | }); |
537 | - | ||
538 | - if (isUpdate.value == 3) { | ||
539 | - setProps({ disabled: true }); | ||
540 | - updateSchema({ | ||
541 | - field: 'organizationId', | ||
542 | - componentProps: { apiTreeSelectProps: { disabled: true } }, | ||
543 | - }); | ||
544 | - await nextTick(); | ||
545 | - unref(skipUnwrap.triggerItemRefs)?.forEach((item) => { | ||
546 | - item.setDisabledProps({ disabled: true }); | ||
547 | - }); | ||
548 | - console.log(unref(skipUnwrap.triggerItemRefs), 'skipUnwrap.triggerItemRefs'); | ||
549 | - } else { | ||
550 | - updateSchema({ | ||
551 | - field: 'organizationId', | ||
552 | - componentProps: { apiTreeSelectProps: { disabled: false } }, | ||
553 | - }); | ||
554 | - unref(skipUnwrap.triggerItemRefs)?.forEach((item) => { | ||
555 | - item.setCancelDisabled(); | ||
556 | - }); | ||
557 | - } | ||
558 | }); | 534 | }); |
559 | 535 | ||
560 | // 设置设备的options | 536 | // 设置设备的options |
@@ -6,13 +6,11 @@ | @@ -6,13 +6,11 @@ | ||
6 | <div class="flex"> | 6 | <div class="flex"> |
7 | <span class="mr-2">启用规则:</span> | 7 | <span class="mr-2">启用规则:</span> |
8 | <template v-for="(item, scheduleIndex) in scheduleOptions" :key="item.label"> | 8 | <template v-for="(item, scheduleIndex) in scheduleOptions" :key="item.label"> |
9 | - <a-button | ||
10 | - type="link" | 9 | + <div |
11 | :class="{ 'ml-4': scheduleIndex >= 1, active: scheduleIndex === currentIndex }" | 10 | :class="{ 'ml-4': scheduleIndex >= 1, active: scheduleIndex === currentIndex }" |
12 | - class="cursor-pointer !p-0" | ||
13 | - :disabled="disabled" | 11 | + class="cursor-pointer" |
14 | @click="handleScheduleChange(item.value)" | 12 | @click="handleScheduleChange(item.value)" |
15 | - >{{ item.label }}</a-button | 13 | + >{{ item.label }}</div |
16 | > | 14 | > |
17 | </template> | 15 | </template> |
18 | </div> | 16 | </div> |
@@ -30,7 +28,6 @@ | @@ -30,7 +28,6 @@ | ||
30 | <template #operationType="{ model, field }"> | 28 | <template #operationType="{ model, field }"> |
31 | <Select | 29 | <Select |
32 | :options="options" | 30 | :options="options" |
33 | - :disabled="disabled" | ||
34 | v-model:value="model[field]" | 31 | v-model:value="model[field]" |
35 | @change="operationType = model[field]" | 32 | @change="operationType = model[field]" |
36 | placeholder="请选择比较类型" | 33 | placeholder="请选择比较类型" |
@@ -41,7 +38,6 @@ | @@ -41,7 +38,6 @@ | ||
41 | <Input v-model:value="model[field]" placeholder="请输入持续时间"> | 38 | <Input v-model:value="model[field]" placeholder="请输入持续时间"> |
42 | <template #addonAfter> | 39 | <template #addonAfter> |
43 | <Select | 40 | <Select |
44 | - :disabled="disabled" | ||
45 | v-model:value="model[`timeUnit`]" | 41 | v-model:value="model[`timeUnit`]" |
46 | :options="timeUnitOptions" | 42 | :options="timeUnitOptions" |
47 | style="width: 60px" | 43 | style="width: 60px" |
@@ -96,13 +92,12 @@ | @@ -96,13 +92,12 @@ | ||
96 | 92 | ||
97 | const isUpdate = ref(false); | 93 | const isUpdate = ref(false); |
98 | const conditionScreeningRef = ref(); | 94 | const conditionScreeningRef = ref(); |
99 | - const [registerForm, { resetFields, getFieldsValue, updateSchema, setFieldsValue, setProps }] = | ||
100 | - useForm({ | ||
101 | - //TODO-wenwei-修复 | ||
102 | - schemas: cloneDeep(trigger_condition_schema), | ||
103 | - //TODO-wenwei-修复 | ||
104 | - showActionButtonGroup: false, | ||
105 | - }); | 95 | + const [registerForm, { resetFields, getFieldsValue, updateSchema, setFieldsValue }] = useForm({ |
96 | + //TODO-wenwei-修复 | ||
97 | + schemas: cloneDeep(trigger_condition_schema), | ||
98 | + //TODO-wenwei-修复 | ||
99 | + showActionButtonGroup: false, | ||
100 | + }); | ||
106 | 101 | ||
107 | const alarmScheduleRef = ref<InstanceType<typeof AlarmSchedule>>(); | 102 | const alarmScheduleRef = ref<InstanceType<typeof AlarmSchedule>>(); |
108 | 103 | ||
@@ -228,16 +223,6 @@ | @@ -228,16 +223,6 @@ | ||
228 | // console.log(alarmConfigList); | 223 | // console.log(alarmConfigList); |
229 | }; | 224 | }; |
230 | 225 | ||
231 | - const disabled = ref<boolean>(false); | ||
232 | - const setDisabledProps = (value) => { | ||
233 | - setProps(value); | ||
234 | - disabled.value = true; | ||
235 | - }; | ||
236 | - | ||
237 | - const setCancelDisabled = () => { | ||
238 | - disabled.value = false; | ||
239 | - }; | ||
240 | - | ||
241 | defineExpose({ | 226 | defineExpose({ |
242 | getFieldsValueFunc, | 227 | getFieldsValueFunc, |
243 | updateFieldDeviceId, | 228 | updateFieldDeviceId, |
@@ -255,8 +240,6 @@ | @@ -255,8 +240,6 @@ | ||
255 | updateFieldAttributeFunc, | 240 | updateFieldAttributeFunc, |
256 | updateFieldAlarmConfig, | 241 | updateFieldAlarmConfig, |
257 | updateEditFieldAlarmConfig, | 242 | updateEditFieldAlarmConfig, |
258 | - setDisabledProps, | ||
259 | - setCancelDisabled, | ||
260 | }); | 243 | }); |
261 | </script> | 244 | </script> |
262 | 245 |
@@ -286,7 +286,6 @@ export const useSocket = (dataSourceRef: Ref<WidgetDataType[]>) => { | @@ -286,7 +286,6 @@ export const useSocket = (dataSourceRef: Ref<WidgetDataType[]>) => { | ||
286 | throw Error(error as string); | 286 | throw Error(error as string); |
287 | } | 287 | } |
288 | }, | 288 | }, |
289 | - autoReconnect: true, | ||
290 | }); | 289 | }); |
291 | 290 | ||
292 | const initSubscribe = () => { | 291 | const initSubscribe = () => { |