Commit 50d99b4577f3fcb31bade7f9aecf593eaeb84f90
Merge branch 'ft-dev' into 'main'
fix:修复设备配置报警规则数据和详情数据回显问题,feat:新增日程表数据收集 See merge request huang/yun-teng-iot-front!65
Showing
13 changed files
with
625 additions
and
212 deletions
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | @cancel="handleCancel" |
| 9 | 9 | > |
| 10 | 10 | <div class="step-form-form"> |
| 11 | - <a-steps :current="current"> | |
| 11 | + <a-steps :current="current" @change="handleChange"> | |
| 12 | 12 | <a-step title="设备配置" /> |
| 13 | 13 | <a-step title="传输配置" /> |
| 14 | 14 | <a-step title="告警配置" /> |
| ... | ... | @@ -86,10 +86,15 @@ |
| 86 | 86 | const current = ref(0); |
| 87 | 87 | const isUpdate = ref(true); |
| 88 | 88 | const getTitle = computed(() => (!unref(isUpdate) ? '新增设备配置' : '编辑设备配置')); |
| 89 | + const handleChange = (v) => { | |
| 90 | + console.log(v); | |
| 91 | + }; | |
| 89 | 92 | const [register, { closeModal }] = useModalInner(async (data) => { |
| 90 | 93 | isUpdate.value = !!data?.isUpdate; |
| 91 | 94 | if (!unref(isUpdate)) { |
| 92 | 95 | current.value = 0; |
| 96 | + proxy.$refs.DeviceProfileStep3Ref.clearProfileDataFunc(); | |
| 97 | + proxy.$refs.DeviceProfileStep3Ref.addAlarmRule(); | |
| 93 | 98 | switch (current.value) { |
| 94 | 99 | case 0: |
| 95 | 100 | proxy.$refs.DeviceProfileStep1Ref.customResetFunc(); |
| ... | ... | @@ -109,33 +114,15 @@ |
| 109 | 114 | } |
| 110 | 115 | if (unref(isUpdate)) { |
| 111 | 116 | current.value = 0; |
| 117 | + proxy.$refs.DeviceProfileStep3Ref.clearProfileDataFunc(); | |
| 118 | + proxy.$refs.DeviceProfileStep3Ref.addAlarmRule(); | |
| 112 | 119 | postEditId.value = data.record.id; |
| 113 | 120 | const getBackendData = await deviceConfigGetDetail(postEditId.value); |
| 114 | 121 | editEchoData.value = { ...getBackendData }; |
| 115 | - console.log(editEchoData.value); | |
| 116 | 122 | switch (current.value) { |
| 117 | 123 | case 0: |
| 118 | 124 | proxy.$refs.DeviceProfileStep1Ref.resetFieldsFunc(editEchoData.value); |
| 119 | 125 | break; |
| 120 | - case 1: | |
| 121 | - proxy.$refs.DeviceProfileStep2Ref.resetFieldsFunc({ | |
| 122 | - transportType: editEchoData.value.profileData.transportConfiguration.type, | |
| 123 | - }); | |
| 124 | - break; | |
| 125 | - case 2: | |
| 126 | - proxy.$refs.DeviceProfileStep3Ref.retryRegisterFormFunc({ | |
| 127 | - alarmType: editEchoData.value.profileData?.alarms[0].alarmType, | |
| 128 | - }); | |
| 129 | - proxy.$refs.DeviceProfileStep3Ref.retryRegisterFormHighSettingmFunc( | |
| 130 | - editEchoData.value | |
| 131 | - ); | |
| 132 | - proxy.$refs.DeviceProfileStep3Ref.retryRegisterFormCreateAlarmFunc( | |
| 133 | - editEchoData.value | |
| 134 | - ); | |
| 135 | - break; | |
| 136 | - case 3: | |
| 137 | - proxy.$refs.DeviceProfileStep4Ref.resetFieldsFunc(editEchoData.value); | |
| 138 | - break; | |
| 139 | 126 | } |
| 140 | 127 | } |
| 141 | 128 | }); |
| ... | ... | @@ -145,15 +132,116 @@ |
| 145 | 132 | function handleStepNext1(v) { |
| 146 | 133 | current.value++; |
| 147 | 134 | getStepOneData.value = v; |
| 135 | + if (unref(isUpdate)) { | |
| 136 | + proxy.$refs.DeviceProfileStep2Ref.resetFieldsFunc({ | |
| 137 | + transportType: editEchoData.value.profileData.transportConfiguration.type, | |
| 138 | + }); | |
| 139 | + } else { | |
| 140 | + // proxy.$refs.DeviceProfileStep2Ref.customResetAndFunc(); | |
| 141 | + } | |
| 148 | 142 | } |
| 149 | 143 | function handleStep2Next(v) { |
| 150 | 144 | current.value++; |
| 151 | 145 | getStepTwoData.value = v; |
| 152 | - proxy.$refs.DeviceProfileStep3Ref.addAlarmRule(); | |
| 146 | + if (unref(isUpdate)) { | |
| 147 | + proxy.$refs.DeviceProfileStep3Ref.retryRegisterFormFunc({ | |
| 148 | + alarmType: editEchoData.value.profileData.alarms[0].alarmType, | |
| 149 | + }); | |
| 150 | + proxy.$refs.DeviceProfileStep3Ref.retryRegisterFormHighSettingmFunc({ | |
| 151 | + propagate: editEchoData.value.profileData.alarms[0].propagate, | |
| 152 | + propagateRelationTypes: | |
| 153 | + editEchoData.value.profileData?.alarms[0].propagateRelationTypes, | |
| 154 | + }); | |
| 155 | + const getKey = Object.keys(editEchoData.value.profileData?.alarms[0].createRules); | |
| 156 | + proxy.$refs.DeviceProfileStep3Ref.retryRegisterFormCreateAlarmFunc({ | |
| 157 | + default: getKey[0], | |
| 158 | + }); | |
| 159 | + const findDay = [ | |
| 160 | + { label: '等于', value: 'EQUAL' }, | |
| 161 | + { label: '不等于', value: 'NOT_EQUAL' }, | |
| 162 | + { label: '开始于', value: 'STARTS_WITH' }, | |
| 163 | + { label: '结束于', value: 'ENDS_WITH' }, | |
| 164 | + { label: '包含', value: 'CONTAINS' }, | |
| 165 | + { label: '不包含', value: 'NOT_CONTAINS' }, | |
| 166 | + { label: '等于', value: 'EQUAL' }, | |
| 167 | + { label: '不等于', value: 'NOT_EQUAL' }, | |
| 168 | + { label: '大于', value: 'GREATER' }, | |
| 169 | + { label: '小于', value: 'LESS' }, | |
| 170 | + { label: '大于或等于', value: 'GREATER_OR_EQUAL' }, | |
| 171 | + { label: '小于或等于', value: 'LESS_OR_EQUAL' }, | |
| 172 | + ]; | |
| 173 | + const findRuleByValue = findDay.find((f) => { | |
| 174 | + if ( | |
| 175 | + f.value == | |
| 176 | + editEchoData.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 177 | + .condition[0].predicate.operation | |
| 178 | + ) { | |
| 179 | + return f.label; | |
| 180 | + } | |
| 181 | + }); | |
| 182 | + const findClearRuleByValue = findDay.find((f) => { | |
| 183 | + if ( | |
| 184 | + f.value == | |
| 185 | + editEchoData.value.profileData?.alarms[0].clearRule.condition.condition[0].predicate | |
| 186 | + .operation | |
| 187 | + ) { | |
| 188 | + return f.label; | |
| 189 | + } | |
| 190 | + }); | |
| 191 | + proxy.$refs.DeviceProfileStep3Ref.retryRulesFormDataFunc( | |
| 192 | + ` | |
| 193 | + 键名:${ | |
| 194 | + editEchoData.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 195 | + .condition[0].key.key | |
| 196 | + }...操作:${findRuleByValue?.label}...值:${ | |
| 197 | + editEchoData.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 198 | + .condition[0].predicate.value.defaultValue | |
| 199 | + } | |
| 200 | + ` | |
| 201 | + ); | |
| 202 | + proxy.$refs.DeviceProfileStep3Ref.retryEnableFormDataFunc(`始终启用`); | |
| 203 | + proxy.$refs.DeviceProfileStep3Ref.retryTemplateFormDataFunc( | |
| 204 | + ` | |
| 205 | + 报警详细信息:${ | |
| 206 | + editEchoData.value.profileData?.alarms[0].createRules[getKey[0]].alarmDetails | |
| 207 | + } | |
| 208 | + ` | |
| 209 | + ); | |
| 210 | + //清除报警 | |
| 211 | + proxy.$refs.DeviceProfileStep3Ref.retryRulesClearFormDataFunc( | |
| 212 | + ` | |
| 213 | + 键名:${editEchoData.value.profileData?.alarms[0].clearRule.condition.condition[0].key.key}...操作:${findClearRuleByValue?.label}...值:${editEchoData.value.profileData?.alarms[0].clearRule.condition.condition[0].predicate.value.defaultValue} | |
| 214 | + ` | |
| 215 | + ); | |
| 216 | + proxy.$refs.DeviceProfileStep3Ref.retryEnableClearFormDataFunc(`始终启用`); | |
| 217 | + proxy.$refs.DeviceProfileStep3Ref.retryTemplateClearFormDataFunc( | |
| 218 | + ` | |
| 219 | + 报警详细信息:${editEchoData.value.profileData?.alarms[0].clearRule.alarmDetails} | |
| 220 | + ` | |
| 221 | + ); | |
| 222 | + } else { | |
| 223 | + proxy.$refs.DeviceProfileStep3Ref.resetRegisterFormFunc(); | |
| 224 | + proxy.$refs.DeviceProfileStep3Ref.resetRegisterFormHighSettingmFunc(); | |
| 225 | + proxy.$refs.DeviceProfileStep3Ref.resetRegisterFormCreateAlarmFunc(); | |
| 226 | + proxy.$refs.DeviceProfileStep3Ref.resetRulesFormDataFunc(); | |
| 227 | + proxy.$refs.DeviceProfileStep3Ref.resetEnableFormDataFunc(); | |
| 228 | + proxy.$refs.DeviceProfileStep3Ref.resetTemplateFormDataFunc(); | |
| 229 | + proxy.$refs.DeviceProfileStep3Ref.resetRulesClearFormDataFunc(); | |
| 230 | + proxy.$refs.DeviceProfileStep3Ref.resetEnableClearFormDataFunc(); | |
| 231 | + proxy.$refs.DeviceProfileStep3Ref.resetTemplateClearFormDataFunc(); | |
| 232 | + } | |
| 153 | 233 | } |
| 154 | 234 | function handleStep3Next(v) { |
| 155 | 235 | current.value++; |
| 156 | 236 | getStepThreeData.value = v; |
| 237 | + if (unref(isUpdate)) { | |
| 238 | + proxy.$refs.DeviceProfileStep4Ref.resetFieldsFunc({ | |
| 239 | + alarmContactId: editEchoData.value.alarmProfile.alarmContactId, | |
| 240 | + messageMode: editEchoData.value.alarmProfile.messageMode, | |
| 241 | + }); | |
| 242 | + } else { | |
| 243 | + // proxy.$refs.DeviceProfileStep4Ref.customResetAndFunc(); | |
| 244 | + } | |
| 157 | 245 | } |
| 158 | 246 | function handleRedo() { |
| 159 | 247 | current.value = 0; |
| ... | ... | @@ -197,6 +285,7 @@ |
| 197 | 285 | return; |
| 198 | 286 | }; |
| 199 | 287 | return { |
| 288 | + handleChange, | |
| 200 | 289 | DeviceProfileStep2Ref, |
| 201 | 290 | DeviceProfileStep3Ref, |
| 202 | 291 | DeviceProfileStep4Ref, | ... | ... |
| ... | ... | @@ -21,41 +21,70 @@ |
| 21 | 21 | /></TabPane> |
| 22 | 22 | <TabPane key="3" tab="报警规则"> |
| 23 | 23 | <div style="padding-top: 10px"> |
| 24 | - <BasicForm | |
| 25 | - :showSubmitButton="false" | |
| 26 | - :showResetButton="false" | |
| 27 | - @register="registerStep3Schemas" | |
| 28 | - /> | |
| 29 | - <BasicForm | |
| 30 | - :showSubmitButton="false" | |
| 31 | - :showResetButton="false" | |
| 32 | - @register="registerStep3HighSetting" | |
| 33 | - /> | |
| 34 | - <BasicForm | |
| 35 | - :showSubmitButton="false" | |
| 36 | - :showResetButton="false" | |
| 37 | - @register="registerStep3CreateAlarm" | |
| 38 | - /> | |
| 39 | - <BasicForm | |
| 40 | - :showSubmitButton="false" | |
| 41 | - :showResetButton="false" | |
| 42 | - @register="registerStep3RuleAlarm" | |
| 43 | - /> | |
| 44 | - <BasicForm | |
| 45 | - :showSubmitButton="false" | |
| 46 | - :showResetButton="false" | |
| 47 | - @register="registerStep3Condition" | |
| 48 | - /> | |
| 49 | - <BasicForm | |
| 50 | - :showSubmitButton="false" | |
| 51 | - :showResetButton="false" | |
| 52 | - @register="registerStep3Enable" | |
| 53 | - /> | |
| 54 | - <BasicForm | |
| 55 | - :showSubmitButton="false" | |
| 56 | - :showResetButton="false" | |
| 57 | - @register="registerStep3TemplateDetail" | |
| 58 | - /> | |
| 24 | + <div style="border-radius: 10px; border: 1px solid #f0f0f0"> | |
| 25 | + <div style="margin-left: 15px"> | |
| 26 | + <BasicForm | |
| 27 | + :showSubmitButton="false" | |
| 28 | + :showResetButton="false" | |
| 29 | + @register="registerStep3Schemas" | |
| 30 | + /> | |
| 31 | + <BasicForm | |
| 32 | + :showSubmitButton="false" | |
| 33 | + :showResetButton="false" | |
| 34 | + @register="registerStep3HighSetting" | |
| 35 | + /> | |
| 36 | + <BasicForm | |
| 37 | + :showSubmitButton="false" | |
| 38 | + :showResetButton="false" | |
| 39 | + @register="registerStep3CreateAlarm" | |
| 40 | + /> | |
| 41 | + <BasicForm | |
| 42 | + :showSubmitButton="false" | |
| 43 | + :showResetButton="false" | |
| 44 | + @register="registerStep3RuleAlarm" | |
| 45 | + /> | |
| 46 | + <BasicForm | |
| 47 | + :showSubmitButton="false" | |
| 48 | + :showResetButton="false" | |
| 49 | + @register="registerStep3Condition" | |
| 50 | + /> | |
| 51 | + <BasicForm | |
| 52 | + :showSubmitButton="false" | |
| 53 | + :showResetButton="false" | |
| 54 | + @register="registerStep3Enable" | |
| 55 | + /> | |
| 56 | + <BasicForm | |
| 57 | + :showSubmitButton="false" | |
| 58 | + :showResetButton="false" | |
| 59 | + @register="registerStep3TemplateDetail" | |
| 60 | + /> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + <div style="border-radius: 10px; border: 1px solid #f0f0f0; margin-top: 15px"> | |
| 64 | + <p>清除报警规则</p> | |
| 65 | + <div style="margin-left: 15px"> | |
| 66 | + <BasicForm | |
| 67 | + :showSubmitButton="false" | |
| 68 | + :showResetButton="false" | |
| 69 | + @register="registerStep3ClearRuleAlarm" | |
| 70 | + /> | |
| 71 | + <BasicForm | |
| 72 | + :showSubmitButton="false" | |
| 73 | + :showResetButton="false" | |
| 74 | + @register="registerStep3ClearCondition" | |
| 75 | + /> | |
| 76 | + <BasicForm | |
| 77 | + :showSubmitButton="false" | |
| 78 | + :showResetButton="false" | |
| 79 | + @register="registerStep3ClearEnable" | |
| 80 | + /> | |
| 81 | + <BasicForm | |
| 82 | + :showSubmitButton="false" | |
| 83 | + :showResetButton="false" | |
| 84 | + @register="registerStep3ClearTemplateDetail" | |
| 85 | + /> | |
| 86 | + </div> | |
| 87 | + </div> | |
| 59 | 88 | </div> |
| 60 | 89 | </TabPane> |
| 61 | 90 | <TabPane key="4" tab="告警管理"> |
| ... | ... | @@ -84,6 +113,10 @@ |
| 84 | 113 | import { formSchema as enableSchema } from './step/cpns/enablerule/config'; |
| 85 | 114 | import { formSchema as detailSchema } from './step/cpns/detailtemplate/config'; |
| 86 | 115 | import { formSchema as echoFormSchema } from './step/cpns/alarmruleconditions/cpns/config'; |
| 116 | + import { formSchema as conditionFormClearschema } from './step/cpns/alarmruleconditions/config'; | |
| 117 | + import { formSchema as enableClearSchema } from './step/cpns/enablerule/config'; | |
| 118 | + import { formSchema as detailClearSchema } from './step/cpns/detailtemplate/config'; | |
| 119 | + import { formSchema as echoFormClearSchema } from './step/cpns/alarmruleconditions/cpns/config'; | |
| 87 | 120 | |
| 88 | 121 | export default defineComponent({ |
| 89 | 122 | name: 'ConfigDrawer', |
| ... | ... | @@ -156,6 +189,37 @@ |
| 156 | 189 | }, |
| 157 | 190 | }); |
| 158 | 191 | |
| 192 | + //清除报警 | |
| 193 | + const [registerStep3ClearRuleAlarm, { setFieldsValue: setRegisterStep3ClearRuleAlarm }] = | |
| 194 | + useForm({ | |
| 195 | + schemas: echoFormClearSchema, | |
| 196 | + actionColOptions: { | |
| 197 | + span: 24, | |
| 198 | + }, | |
| 199 | + }); | |
| 200 | + const [registerStep3ClearCondition, { setFieldsValue: setRegisterStep3ClearCondition }] = | |
| 201 | + useForm({ | |
| 202 | + schemas: conditionFormClearschema, | |
| 203 | + actionColOptions: { | |
| 204 | + span: 24, | |
| 205 | + }, | |
| 206 | + }); | |
| 207 | + const [registerStep3ClearEnable, { setFieldsValue: setRegisterStep3ClearEnable }] = useForm({ | |
| 208 | + schemas: enableClearSchema, | |
| 209 | + actionColOptions: { | |
| 210 | + span: 24, | |
| 211 | + }, | |
| 212 | + }); | |
| 213 | + const [ | |
| 214 | + registerStep3ClearTemplateDetail, | |
| 215 | + { setFieldsValue: setRegisterStep3ClearTemplateDetail }, | |
| 216 | + ] = useForm({ | |
| 217 | + schemas: detailClearSchema, | |
| 218 | + actionColOptions: { | |
| 219 | + span: 24, | |
| 220 | + }, | |
| 221 | + }); | |
| 222 | + | |
| 159 | 223 | const [register] = useModalInner(async (data) => { |
| 160 | 224 | activeKey.value = '1'; |
| 161 | 225 | isUpdate.value = !!data?.isUpdate; |
| ... | ... | @@ -178,45 +242,74 @@ |
| 178 | 242 | }); |
| 179 | 243 | break; |
| 180 | 244 | case '3': |
| 181 | - setRegisterStep3Schemas({ | |
| 182 | - alarmType: descInfo.value.profileData?.alarms[0].alarmType, | |
| 183 | - }); | |
| 184 | - setRegisterStep3HighSetting({ | |
| 185 | - propagate: descInfo.value.profileData?.alarms[0].propagate, | |
| 186 | - propagateRelationTypes: | |
| 187 | - descInfo.value.profileData?.alarms[0].propagateRelationTypes, | |
| 188 | - }); | |
| 189 | - const getKey = Object.keys(descInfo.value.profileData?.alarms[0].createRules); | |
| 190 | - setRegisterStep3CreateAlarm({ | |
| 191 | - default: getKey[0], | |
| 192 | - }); | |
| 193 | - setRegisterStep3RuleAlarm({ | |
| 194 | - type: descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 195 | - .condition[0].key.type, | |
| 196 | - key: descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 197 | - .condition[0].key.key, | |
| 198 | - valueType: | |
| 199 | - descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 200 | - .condition[0].valueType, | |
| 201 | - value: | |
| 202 | - descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 203 | - .condition[0].value, | |
| 204 | - operation: | |
| 205 | - descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 206 | - .condition[0].predicate.operation, | |
| 207 | - }); | |
| 208 | - setRegisterStep3Condition({ | |
| 209 | - conditionType: | |
| 210 | - descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition.spec.type, | |
| 211 | - }); | |
| 212 | - setRegisterStep3Enable({ | |
| 213 | - schedule: descInfo.value.profileData?.alarms[0].createRules[getKey[0]].schedule, | |
| 214 | - }); | |
| 215 | - setRegisterStep3TemplateDetail({ | |
| 216 | - alarmDetails: | |
| 217 | - descInfo.value.profileData?.alarms[0].createRules[getKey[0]].alarmDetails, | |
| 218 | - }); | |
| 219 | - break; | |
| 245 | + setTimeout(() => { | |
| 246 | + setRegisterStep3Schemas({ | |
| 247 | + alarmType: descInfo.value.profileData?.alarms[0].alarmType, | |
| 248 | + }); | |
| 249 | + setRegisterStep3HighSetting({ | |
| 250 | + propagate: descInfo.value.profileData?.alarms[0].propagate, | |
| 251 | + propagateRelationTypes: | |
| 252 | + descInfo.value.profileData?.alarms[0].propagateRelationTypes, | |
| 253 | + }); | |
| 254 | + const getKey = Object.keys(descInfo.value.profileData?.alarms[0].createRules); | |
| 255 | + setRegisterStep3CreateAlarm({ | |
| 256 | + default: getKey[0], | |
| 257 | + }); | |
| 258 | + setRegisterStep3RuleAlarm({ | |
| 259 | + type: descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 260 | + .condition[0].key.type, | |
| 261 | + key1: descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 262 | + .condition[0].key.key, | |
| 263 | + type1: | |
| 264 | + descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 265 | + .condition[0].valueType, | |
| 266 | + value1: | |
| 267 | + descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 268 | + .condition[0].predicate.value.defaultValue, | |
| 269 | + operation: | |
| 270 | + descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition | |
| 271 | + .condition[0].predicate.operation, | |
| 272 | + }); | |
| 273 | + setRegisterStep3Condition({ | |
| 274 | + conditionType: | |
| 275 | + descInfo.value.profileData?.alarms[0].createRules[getKey[0]].condition.spec | |
| 276 | + .type, | |
| 277 | + }); | |
| 278 | + setRegisterStep3Enable({ | |
| 279 | + schedule: | |
| 280 | + descInfo.value.profileData?.alarms[0].createRules[getKey[0]].schedule.type, | |
| 281 | + }); | |
| 282 | + setRegisterStep3TemplateDetail({ | |
| 283 | + alarmDetails: | |
| 284 | + descInfo.value.profileData?.alarms[0].createRules[getKey[0]].alarmDetails, | |
| 285 | + }); | |
| 286 | + //清除报警 | |
| 287 | + setRegisterStep3ClearRuleAlarm({ | |
| 288 | + type: descInfo.value.profileData?.alarms[0].clearRule.condition.condition[0].key | |
| 289 | + .type, | |
| 290 | + key1: descInfo.value.profileData?.alarms[0].clearRule.condition.condition[0].key | |
| 291 | + .key, | |
| 292 | + type1: | |
| 293 | + descInfo.value.profileData?.alarms[0].clearRule.condition.condition[0] | |
| 294 | + .valueType, | |
| 295 | + value1: | |
| 296 | + descInfo.value.profileData?.alarms[0].clearRule.condition.condition[0].predicate | |
| 297 | + .value.defaultValue, | |
| 298 | + operation: | |
| 299 | + descInfo.value.profileData?.alarms[0].clearRule.condition.condition[0].predicate | |
| 300 | + .operation, | |
| 301 | + }); | |
| 302 | + setRegisterStep3ClearCondition({ | |
| 303 | + conditionType: | |
| 304 | + descInfo.value.profileData?.alarms[0].clearRule.condition.spec.type, | |
| 305 | + }); | |
| 306 | + setRegisterStep3ClearEnable({ | |
| 307 | + schedule: descInfo.value.profileData?.alarms[0].clearRule.schedule.type, | |
| 308 | + }); | |
| 309 | + setRegisterStep3ClearTemplateDetail({ | |
| 310 | + alarmDetails: descInfo.value.profileData?.alarms[0].clearRule.alarmDetails, | |
| 311 | + }); | |
| 312 | + }, 1000); | |
| 220 | 313 | case '4': |
| 221 | 314 | setRegisterContact({ |
| 222 | 315 | alarmContactId: descInfo.value.alarmProfile.alarmContactId, |
| ... | ... | @@ -240,6 +333,10 @@ |
| 240 | 333 | }); |
| 241 | 334 | |
| 242 | 335 | return { |
| 336 | + registerStep3ClearTemplateDetail, | |
| 337 | + registerStep3ClearEnable, | |
| 338 | + registerStep3ClearCondition, | |
| 339 | + registerStep3ClearRuleAlarm, | |
| 243 | 340 | handleChange, |
| 244 | 341 | registerStep3TemplateDetail, |
| 245 | 342 | registerStep3Enable, | ... | ... |
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | <template v-for="(childItem, createIndex) in item.alarms" :key="childItem.id"> |
| 32 | 32 | <div class="aic" style="border: 1px solid #bfbfbf"> |
| 33 | 33 | <div class="w-3/4"> |
| 34 | - <div style="margin-left: -30px; margin-top: 20px" | |
| 34 | + <div style="margin-left: -33px; margin-top: 20px" | |
| 35 | 35 | ><BasicForm @register="registerFormCreateAlarm" /> |
| 36 | 36 | </div> |
| 37 | 37 | <div style="margin-left: 5px; margin-top: -50px"> |
| ... | ... | @@ -78,7 +78,7 @@ |
| 78 | 78 | <div style="height: 20px"></div> |
| 79 | 79 | <p>清除报警规则</p> |
| 80 | 80 | <template |
| 81 | - v-for="(childClearItem, clearIndexItem) in item.alarms[clearIndex].clearRule" | |
| 81 | + v-for="(childClearItem, clearIndexItem) in item.clearRule" | |
| 82 | 82 | :key="childClearItem.id" |
| 83 | 83 | > |
| 84 | 84 | <div class="aic mb-1" style="border: 1px solid #bfbfbf"> |
| ... | ... | @@ -222,12 +222,18 @@ |
| 222 | 222 | const ruleClearTemplateData: any = ref(null); |
| 223 | 223 | const enableClearTemplateData: any = ref(null); |
| 224 | 224 | const detailClearTemplateData: any = ref(null); |
| 225 | + const scheduleCustomValue: any = ref({}); | |
| 225 | 226 | const clearIndex = ref(-1); |
| 227 | + const getSchduleCustomValue: any = ref([]); | |
| 226 | 228 | //告警列表 |
| 227 | 229 | let profileData = ref<IProfileData[]>([]); |
| 228 | 230 | const log = (e) => { |
| 229 | 231 | console.log(e); |
| 230 | 232 | }; |
| 233 | + //编辑清空操作 | |
| 234 | + const clearProfileDataFunc = () => { | |
| 235 | + unref(profileData).splice(0, 1); | |
| 236 | + }; | |
| 231 | 237 | //删除告警配置 |
| 232 | 238 | const deleteAlarmRule = (index: number) => { |
| 233 | 239 | unref(profileData).splice(index, 1); |
| ... | ... | @@ -254,26 +260,27 @@ |
| 254 | 260 | id: Date.now() + Math.random() + '', |
| 255 | 261 | alarmType: '', |
| 256 | 262 | createRules: {}, |
| 257 | - clearRule: [ | |
| 258 | - { | |
| 259 | - id: Date.now() + Math.random() + '', | |
| 260 | - alarmDetails: '', | |
| 261 | - dashboardId: { | |
| 262 | - id: '', | |
| 263 | - entityType: '', | |
| 264 | - }, | |
| 265 | - propagate: '', | |
| 266 | - propagateRelationTypes: [''], | |
| 267 | - schedule: { | |
| 268 | - type: 'string', | |
| 269 | - }, | |
| 270 | - condition: {}, | |
| 271 | - }, | |
| 272 | - ], | |
| 263 | + | |
| 273 | 264 | propagate: false, |
| 274 | 265 | propagateRelationTypes: [''], |
| 275 | 266 | }, |
| 276 | 267 | ], |
| 268 | + clearRule: [ | |
| 269 | + { | |
| 270 | + id: Date.now() + Math.random() + '', | |
| 271 | + alarmDetails: '', | |
| 272 | + dashboardId: { | |
| 273 | + id: '', | |
| 274 | + entityType: '', | |
| 275 | + }, | |
| 276 | + propagate: '', | |
| 277 | + propagateRelationTypes: [''], | |
| 278 | + schedule: { | |
| 279 | + type: 'string', | |
| 280 | + }, | |
| 281 | + condition: {}, | |
| 282 | + }, | |
| 283 | + ], | |
| 277 | 284 | }); |
| 278 | 285 | }; |
| 279 | 286 | //TODO Mobile dashboard: |
| ... | ... | @@ -342,6 +349,25 @@ |
| 342 | 349 | const resetRegisterFormCreateAlarmFunc = () => { |
| 343 | 350 | resetRegisterFormCreateAlarm(); |
| 344 | 351 | }; |
| 352 | + const resetRulesFormDataFunc = () => { | |
| 353 | + ruleTemplateData.value = ``; | |
| 354 | + }; | |
| 355 | + const resetEnableFormDataFunc = () => { | |
| 356 | + enableTemplateData.value = ``; | |
| 357 | + }; | |
| 358 | + const resetTemplateFormDataFunc = () => { | |
| 359 | + detailTemplateData.value = ``; | |
| 360 | + }; | |
| 361 | + const resetRulesClearFormDataFunc = () => { | |
| 362 | + ruleClearTemplateData.value = ``; | |
| 363 | + }; | |
| 364 | + const resetEnableClearFormDataFunc = () => { | |
| 365 | + enableClearTemplateData.value = ``; | |
| 366 | + }; | |
| 367 | + const resetTemplateClearFormDataFunc = () => { | |
| 368 | + detailClearTemplateData.value = ``; | |
| 369 | + }; | |
| 370 | + | |
| 345 | 371 | //回显表单数据 |
| 346 | 372 | const retryRegisterFormFunc = (v) => { |
| 347 | 373 | setRegisterForm(v); |
| ... | ... | @@ -352,6 +378,25 @@ |
| 352 | 378 | const retryRegisterFormCreateAlarmFunc = (v) => { |
| 353 | 379 | setRegisterFormCreateAlarm(v); |
| 354 | 380 | }; |
| 381 | + const retryRulesFormDataFunc = (v) => { | |
| 382 | + ruleTemplateData.value = v; | |
| 383 | + }; | |
| 384 | + const retryEnableFormDataFunc = (v) => { | |
| 385 | + enableTemplateData.value = v; | |
| 386 | + }; | |
| 387 | + const retryTemplateFormDataFunc = (v) => { | |
| 388 | + detailTemplateData.value = v; | |
| 389 | + }; | |
| 390 | + const retryRulesClearFormDataFunc = (v) => { | |
| 391 | + ruleClearTemplateData.value = v; | |
| 392 | + }; | |
| 393 | + const retryEnableClearFormDataFunc = (v) => { | |
| 394 | + enableClearTemplateData.value = v; | |
| 395 | + }; | |
| 396 | + const retryTemplateClearFormDataFunc = (v) => { | |
| 397 | + detailClearTemplateData.value = v; | |
| 398 | + }; | |
| 399 | + | |
| 355 | 400 | const tempValue1: string = ref<string>(''); |
| 356 | 401 | // 添加‘创建条件’ |
| 357 | 402 | const addCreateRole = (index: number) => { |
| ... | ... | @@ -400,27 +445,26 @@ |
| 400 | 445 | }; |
| 401 | 446 | }, |
| 402 | 447 | }); |
| 403 | - | |
| 404 | 448 | unref(profileData)[index].alarms.push({ |
| 405 | 449 | id: Date.now() + Math.random() + '', |
| 406 | 450 | alarmType: '', |
| 407 | 451 | createRules: {}, |
| 408 | - clearRule: [ | |
| 409 | - { | |
| 410 | - id: Date.now() + Math.random() + '', | |
| 411 | - alarmDetails: '', | |
| 412 | - dashboardId: { | |
| 413 | - id: '', | |
| 414 | - entityType: '', | |
| 415 | - }, | |
| 416 | - propagate: '', | |
| 417 | - propagateRelationTypes: [''], | |
| 418 | - schedule: { | |
| 419 | - type: 'string', | |
| 420 | - }, | |
| 421 | - condition: {}, | |
| 422 | - }, | |
| 423 | - ], | |
| 452 | + // clearRule: [ | |
| 453 | + // { | |
| 454 | + // id: Date.now() + Math.random() + '', | |
| 455 | + // alarmDetails: '', | |
| 456 | + // dashboardId: { | |
| 457 | + // id: '', | |
| 458 | + // entityType: '', | |
| 459 | + // }, | |
| 460 | + // propagate: '', | |
| 461 | + // propagateRelationTypes: [''], | |
| 462 | + // schedule: { | |
| 463 | + // type: 'string', | |
| 464 | + // }, | |
| 465 | + // condition: {}, | |
| 466 | + // }, | |
| 467 | + // ], | |
| 424 | 468 | propagate: false, |
| 425 | 469 | propagateRelationTypes: [''], |
| 426 | 470 | }); |
| ... | ... | @@ -516,7 +560,7 @@ |
| 516 | 560 | } |
| 517 | 561 | }); |
| 518 | 562 | ruleTemplateData.value = ` |
| 519 | - 键名:${v.key1}...操作:${findRuleByValue?.label}...值:${v.value1} | |
| 563 | + 键名:${v.key1} 操作:${findRuleByValue?.label} 值:${v.value1} | |
| 520 | 564 | `; |
| 521 | 565 | |
| 522 | 566 | ruleLastObj.value = v1; |
| ... | ... | @@ -636,7 +680,7 @@ |
| 636 | 680 | } |
| 637 | 681 | }); |
| 638 | 682 | ruleClearTemplateData.value = ` |
| 639 | - 键名:${v.key1}...操作:${findRuleByValue?.label}...值:${v.value1} | |
| 683 | + 键名:${v.key1} 操作:${findRuleByValue?.label} 值:${v.value1} | |
| 640 | 684 | `; |
| 641 | 685 | |
| 642 | 686 | ruleLastObj.value = v1; |
| ... | ... | @@ -677,7 +721,7 @@ |
| 677 | 721 | }; |
| 678 | 722 | Object.assign(addClearitionalObj.value, getValueConditon); |
| 679 | 723 | }; |
| 680 | - //用于生成uuid | |
| 724 | + //生成uuid | |
| 681 | 725 | function generateUUID() { |
| 682 | 726 | let d = new Date().getTime(); |
| 683 | 727 | if (window.performance && typeof window.performance.now === 'function') { |
| ... | ... | @@ -692,11 +736,45 @@ |
| 692 | 736 | } |
| 693 | 737 | const handleFormStep3toStep4Next = async () => { |
| 694 | 738 | try { |
| 739 | + if (enableObj.value.schedule == 'CUSTOM') { | |
| 740 | + console.log(enableObj.value); | |
| 741 | + switch (enableObj.value.daysOfWeek1[0]) { | |
| 742 | + case '1': | |
| 743 | + getSchduleCustomValue.value.push({ | |
| 744 | + enabled: true, | |
| 745 | + dayOfWeek: enableObj.value.daysOfWeek1[0], | |
| 746 | + startsOn: enableObj.value.startsOn1, | |
| 747 | + endsOn: enableObj.value.endsOn1, | |
| 748 | + }); | |
| 749 | + break; | |
| 750 | + case '2': | |
| 751 | + getSchduleCustomValue.value.push({ | |
| 752 | + enabled: true, | |
| 753 | + dayOfWeek: enableObj.value.daysOfWeek2[0], | |
| 754 | + startsOn: enableObj.value.startsOn2, | |
| 755 | + endsOn: enableObj.value.endsOn2, | |
| 756 | + }); | |
| 757 | + break; | |
| 758 | + case '3': | |
| 759 | + getSchduleCustomValue.value.push({ | |
| 760 | + enabled: true, | |
| 761 | + dayOfWeek: enableObj.value.daysOfWeek3[0], | |
| 762 | + startsOn: enableObj.value.startsOn3, | |
| 763 | + endsOn: enableObj.value.endsOn3, | |
| 764 | + }); | |
| 765 | + break; | |
| 766 | + } | |
| 767 | + scheduleCustomValue.value = { | |
| 768 | + type: enableObj.value.schedule, | |
| 769 | + timezone: enableObj.value.timezone, | |
| 770 | + items: getSchduleCustomValue.value, | |
| 771 | + }; | |
| 772 | + } | |
| 695 | 773 | const scheduleClearValue = { |
| 696 | 774 | type: enableClearObj.value.schedule, |
| 697 | 775 | daysOfWeek: enableClearObj.value.daysOfWeek, |
| 698 | - // endsOn: enableClearObj.value.endsOn, | |
| 699 | - // startsOn: enableClearObj.value.startOn, | |
| 776 | + endsOn: enableClearObj.value.endsOn, | |
| 777 | + startsOn: enableClearObj.value.startOn, | |
| 700 | 778 | timezone: enableClearObj.value.timezone, |
| 701 | 779 | }; |
| 702 | 780 | const getClearSchedule = { |
| ... | ... | @@ -706,13 +784,15 @@ |
| 706 | 784 | const scheduleValue = { |
| 707 | 785 | type: enableObj.value.schedule, |
| 708 | 786 | daysOfWeek: enableObj.value.daysOfWeek, |
| 709 | - // endsOn: enableObj.value.endsOn, | |
| 710 | - // startsOn: enableObj.value.startOn, | |
| 787 | + endsOn: enableObj.value.endsOn, | |
| 788 | + startsOn: enableObj.value.startOn, | |
| 711 | 789 | timezone: enableObj.value.timezone, |
| 712 | 790 | }; |
| 713 | 791 | const getSchedule = { |
| 714 | - schedule: scheduleValue, | |
| 792 | + schedule: | |
| 793 | + enableObj.value.schedule == 'CUSTOM' ? scheduleCustomValue.value : scheduleValue, | |
| 715 | 794 | }; |
| 795 | + | |
| 716 | 796 | const getAdditionalProp = Object.assign({}, detailObj.value, getSchedule); |
| 717 | 797 | const getScheduleAndAlarmDetails = Object.assign( |
| 718 | 798 | {}, |
| ... | ... | @@ -756,7 +836,9 @@ |
| 756 | 836 | getClearRulesAllObj, |
| 757 | 837 | objectId |
| 758 | 838 | ); |
| 759 | - alarmss.value.push(emptyObj.value); | |
| 839 | + if (alarmss.value.length == 0) { | |
| 840 | + alarmss.value.push(emptyObj.value); | |
| 841 | + } | |
| 760 | 842 | const getAlarms = { |
| 761 | 843 | alarms: alarmss.value, |
| 762 | 844 | }; |
| ... | ... | @@ -814,6 +896,19 @@ |
| 814 | 896 | }; |
| 815 | 897 | |
| 816 | 898 | return { |
| 899 | + resetEnableClearFormDataFunc, | |
| 900 | + resetTemplateClearFormDataFunc, | |
| 901 | + resetRulesClearFormDataFunc, | |
| 902 | + resetEnableFormDataFunc, | |
| 903 | + resetTemplateFormDataFunc, | |
| 904 | + resetRulesFormDataFunc, | |
| 905 | + retryEnableClearFormDataFunc, | |
| 906 | + retryTemplateClearFormDataFunc, | |
| 907 | + retryRulesClearFormDataFunc, | |
| 908 | + retryEnableFormDataFunc, | |
| 909 | + retryTemplateFormDataFunc, | |
| 910 | + retryRulesFormDataFunc, | |
| 911 | + clearProfileDataFunc, | |
| 817 | 912 | clearIndex, |
| 818 | 913 | retryRegisterFormFunc, |
| 819 | 914 | retryRegisterFormHighSettingmFunc, | ... | ... |
| ... | ... | @@ -99,7 +99,7 @@ export const formSchema: FormSchema[] = [ |
| 99 | 99 | { |
| 100 | 100 | field: 'conditionType', |
| 101 | 101 | label: '条件类型', |
| 102 | - colProps: { span: 24 }, | |
| 102 | + colProps: { span: 13 }, | |
| 103 | 103 | component: 'Select', |
| 104 | 104 | componentProps: { |
| 105 | 105 | placeholder: '请选择报警日程表', |
| ... | ... | @@ -177,7 +177,7 @@ export const formSchema: FormSchema[] = [ |
| 177 | 177 | { |
| 178 | 178 | field: 'defaultValue', |
| 179 | 179 | label: '持续时间值', |
| 180 | - colProps: { span: 24 }, | |
| 180 | + colProps: { span: 13 }, | |
| 181 | 181 | component: 'Input', |
| 182 | 182 | componentProps: { |
| 183 | 183 | placeholder: '请输入持续时间值(请输入数字)', |
| ... | ... | @@ -210,7 +210,7 @@ export const formSchema: FormSchema[] = [ |
| 210 | 210 | { |
| 211 | 211 | field: 'unit', |
| 212 | 212 | label: '时间单位', |
| 213 | - colProps: { span: 24 }, | |
| 213 | + colProps: { span: 13 }, | |
| 214 | 214 | component: 'Select', |
| 215 | 215 | componentProps: { |
| 216 | 216 | placeholder: '请选择时间单位', |
| ... | ... | @@ -226,7 +226,7 @@ export const formSchema: FormSchema[] = [ |
| 226 | 226 | { |
| 227 | 227 | field: 'defaultValue', |
| 228 | 228 | label: '事件计数值必填', |
| 229 | - colProps: { span: 24 }, | |
| 229 | + colProps: { span: 13 }, | |
| 230 | 230 | component: 'Input', |
| 231 | 231 | componentProps: { |
| 232 | 232 | placeholder: '请输入事件计数值(应在1到2147483637之间)', |
| ... | ... | @@ -240,6 +240,7 @@ export const formSchema: FormSchema[] = [ |
| 240 | 240 | { |
| 241 | 241 | field: 'inherit', |
| 242 | 242 | label: '', |
| 243 | + colProps: { span: 13 }, | |
| 243 | 244 | component: 'Checkbox', |
| 244 | 245 | renderComponentContent: 'Inherit from owner', |
| 245 | 246 | ifShow: ({ values }) => | ... | ... |
| ... | ... | @@ -48,7 +48,7 @@ export const formSchema: FormSchema[] = [ |
| 48 | 48 | { |
| 49 | 49 | field: 'type', |
| 50 | 50 | label: '键类型', |
| 51 | - colProps: { span: 24 }, | |
| 51 | + colProps: { span: 13 }, | |
| 52 | 52 | component: 'Select', |
| 53 | 53 | componentProps: { |
| 54 | 54 | placeholder: '请选择键类型', |
| ... | ... | @@ -62,7 +62,7 @@ export const formSchema: FormSchema[] = [ |
| 62 | 62 | { |
| 63 | 63 | field: 'key1', |
| 64 | 64 | label: '键名', |
| 65 | - colProps: { span: 24 }, | |
| 65 | + colProps: { span: 13 }, | |
| 66 | 66 | component: 'Input', |
| 67 | 67 | componentProps: { |
| 68 | 68 | placeholder: '请输入键名', |
| ... | ... | @@ -79,7 +79,7 @@ export const formSchema: FormSchema[] = [ |
| 79 | 79 | { |
| 80 | 80 | field: 'key1', |
| 81 | 81 | label: '键名', |
| 82 | - colProps: { span: 24 }, | |
| 82 | + colProps: { span: 13 }, | |
| 83 | 83 | component: 'Input', |
| 84 | 84 | componentProps: { |
| 85 | 85 | placeholder: '请输入键名', |
| ... | ... | @@ -94,7 +94,7 @@ export const formSchema: FormSchema[] = [ |
| 94 | 94 | { |
| 95 | 95 | field: 'key1', |
| 96 | 96 | label: '键名', |
| 97 | - colProps: { span: 24 }, | |
| 97 | + colProps: { span: 13 }, | |
| 98 | 98 | component: 'Input', |
| 99 | 99 | componentProps: { |
| 100 | 100 | placeholder: '请输入键名', |
| ... | ... | @@ -104,7 +104,7 @@ export const formSchema: FormSchema[] = [ |
| 104 | 104 | { |
| 105 | 105 | field: 'type1', |
| 106 | 106 | label: '值类型', |
| 107 | - colProps: { span: 24 }, | |
| 107 | + colProps: { span: 13 }, | |
| 108 | 108 | component: 'Select', |
| 109 | 109 | componentProps: { |
| 110 | 110 | placeholder: '请选择值类型', |
| ... | ... | @@ -122,7 +122,7 @@ export const formSchema: FormSchema[] = [ |
| 122 | 122 | { |
| 123 | 123 | field: 'operation', |
| 124 | 124 | label: '操作', |
| 125 | - colProps: { span: 24 }, | |
| 125 | + colProps: { span: 13 }, | |
| 126 | 126 | component: 'Select', |
| 127 | 127 | componentProps: { |
| 128 | 128 | placeholder: '请选择操作', |
| ... | ... | @@ -141,7 +141,7 @@ export const formSchema: FormSchema[] = [ |
| 141 | 141 | field: '', |
| 142 | 142 | label: '大小写', |
| 143 | 143 | component: 'Checkbox', |
| 144 | - colProps: { span: 24 }, | |
| 144 | + colProps: { span: 13 }, | |
| 145 | 145 | renderComponentContent: '忽略大小写', |
| 146 | 146 | ifShow: ({ values }) => isString(Reflect.get(values, 'type1')), |
| 147 | 147 | }, |
| ... | ... | @@ -180,7 +180,7 @@ export const formSchema: FormSchema[] = [ |
| 180 | 180 | { |
| 181 | 181 | field: 'value1', |
| 182 | 182 | label: '默认值', |
| 183 | - colProps: { span: 24 }, | |
| 183 | + colProps: { span: 13 }, | |
| 184 | 184 | component: 'Input', |
| 185 | 185 | componentProps: { |
| 186 | 186 | placeholder: '请输入默认值(数字)', |
| ... | ... | @@ -203,7 +203,7 @@ export const formSchema: FormSchema[] = [ |
| 203 | 203 | { |
| 204 | 204 | field: 'operation', |
| 205 | 205 | label: '操作', |
| 206 | - colProps: { span: 24 }, | |
| 206 | + colProps: { span: 13 }, | |
| 207 | 207 | component: 'Select', |
| 208 | 208 | componentProps: { |
| 209 | 209 | placeholder: '请选择操作', |
| ... | ... | @@ -254,7 +254,7 @@ export const formSchema: FormSchema[] = [ |
| 254 | 254 | { |
| 255 | 255 | field: 'value1', |
| 256 | 256 | label: '值', |
| 257 | - colProps: { span: 24 }, | |
| 257 | + colProps: { span: 13 }, | |
| 258 | 258 | component: 'Input', |
| 259 | 259 | componentProps: { |
| 260 | 260 | placeholder: '请输入值(数字)', |
| ... | ... | @@ -278,7 +278,7 @@ export const formSchema: FormSchema[] = [ |
| 278 | 278 | { |
| 279 | 279 | field: 'operation', |
| 280 | 280 | label: '操作', |
| 281 | - colProps: { span: 24 }, | |
| 281 | + colProps: { span: 13 }, | |
| 282 | 282 | component: 'Select', |
| 283 | 283 | componentProps: { |
| 284 | 284 | placeholder: '请选择操作', |
| ... | ... | @@ -292,6 +292,7 @@ export const formSchema: FormSchema[] = [ |
| 292 | 292 | { |
| 293 | 293 | field: '', |
| 294 | 294 | label: '默认值', |
| 295 | + colProps: { span: 13 }, | |
| 295 | 296 | component: 'Checkbox', |
| 296 | 297 | renderComponentContent: '真', |
| 297 | 298 | ifShow: ({ values }) => isBoolean(Reflect.get(values, 'type1')), |
| ... | ... | @@ -344,7 +345,7 @@ export const formSchema: FormSchema[] = [ |
| 344 | 345 | { |
| 345 | 346 | field: 'operation', |
| 346 | 347 | label: '操作', |
| 347 | - colProps: { span: 24 }, | |
| 348 | + colProps: { span: 13 }, | |
| 348 | 349 | component: 'Select', |
| 349 | 350 | componentProps: { |
| 350 | 351 | placeholder: '请选择操作', |
| ... | ... | @@ -364,7 +365,7 @@ export const formSchema: FormSchema[] = [ |
| 364 | 365 | component: 'DatePicker', |
| 365 | 366 | label: '请选择日期', |
| 366 | 367 | colProps: { |
| 367 | - span: 12, | |
| 368 | + span: 13, | |
| 368 | 369 | }, |
| 369 | 370 | ifShow: ({ values }) => isComplex(Reflect.get(values, 'type1')), |
| 370 | 371 | show: ({ values }) => { |
| ... | ... | @@ -376,7 +377,7 @@ export const formSchema: FormSchema[] = [ |
| 376 | 377 | component: 'TimePicker', |
| 377 | 378 | label: '请选择时间', |
| 378 | 379 | colProps: { |
| 379 | - span: 8, | |
| 380 | + span: 13, | |
| 380 | 381 | }, |
| 381 | 382 | ifShow: ({ values }) => isComplex(Reflect.get(values, 'type1')), |
| 382 | 383 | show: ({ values }) => { | ... | ... |
| ... | ... | @@ -60,12 +60,19 @@ export const formSchema: FormSchema[] = [ |
| 60 | 60 | |
| 61 | 61 | { |
| 62 | 62 | field: 'daysOfWeek1', |
| 63 | - component: 'Checkbox', | |
| 64 | - label: '星期一', | |
| 63 | + component: 'CheckboxGroup', | |
| 64 | + label: '天', | |
| 65 | 65 | colProps: { |
| 66 | 66 | span: 8, |
| 67 | 67 | }, |
| 68 | - renderComponentContent: '', | |
| 68 | + componentProps: { | |
| 69 | + options: [ | |
| 70 | + { | |
| 71 | + label: '星期一', | |
| 72 | + value: '1', | |
| 73 | + }, | |
| 74 | + ], | |
| 75 | + }, | |
| 69 | 76 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'schedule')), |
| 70 | 77 | }, |
| 71 | 78 | { |
| ... | ... | @@ -89,12 +96,19 @@ export const formSchema: FormSchema[] = [ |
| 89 | 96 | |
| 90 | 97 | { |
| 91 | 98 | field: 'daysOfWeek2', |
| 92 | - component: 'Checkbox', | |
| 93 | - label: '星期二', | |
| 99 | + component: 'CheckboxGroup', | |
| 100 | + label: '天', | |
| 94 | 101 | colProps: { |
| 95 | 102 | span: 8, |
| 96 | 103 | }, |
| 97 | - renderComponentContent: '', | |
| 104 | + componentProps: { | |
| 105 | + options: [ | |
| 106 | + { | |
| 107 | + label: '星期二', | |
| 108 | + value: '2', | |
| 109 | + }, | |
| 110 | + ], | |
| 111 | + }, | |
| 98 | 112 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'schedule')), |
| 99 | 113 | }, |
| 100 | 114 | { |
| ... | ... | @@ -117,12 +131,19 @@ export const formSchema: FormSchema[] = [ |
| 117 | 131 | }, |
| 118 | 132 | { |
| 119 | 133 | field: 'daysOfWeek3', |
| 120 | - component: 'Checkbox', | |
| 121 | - label: '星期三', | |
| 134 | + component: 'CheckboxGroup', | |
| 135 | + label: '天', | |
| 122 | 136 | colProps: { |
| 123 | 137 | span: 8, |
| 124 | 138 | }, |
| 125 | - renderComponentContent: '', | |
| 139 | + componentProps: { | |
| 140 | + options: [ | |
| 141 | + { | |
| 142 | + label: '星期三', | |
| 143 | + value: '3', | |
| 144 | + }, | |
| 145 | + ], | |
| 146 | + }, | |
| 126 | 147 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'schedule')), |
| 127 | 148 | }, |
| 128 | 149 | { |
| ... | ... | @@ -145,12 +166,19 @@ export const formSchema: FormSchema[] = [ |
| 145 | 166 | }, |
| 146 | 167 | { |
| 147 | 168 | field: 'daysOfWeek4', |
| 148 | - component: 'Checkbox', | |
| 149 | - label: '星期四', | |
| 169 | + component: 'CheckboxGroup', | |
| 170 | + label: '天', | |
| 150 | 171 | colProps: { |
| 151 | 172 | span: 8, |
| 152 | 173 | }, |
| 153 | - renderComponentContent: '', | |
| 174 | + componentProps: { | |
| 175 | + options: [ | |
| 176 | + { | |
| 177 | + label: '星期四', | |
| 178 | + value: '4', | |
| 179 | + }, | |
| 180 | + ], | |
| 181 | + }, | |
| 154 | 182 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'schedule')), |
| 155 | 183 | }, |
| 156 | 184 | { |
| ... | ... | @@ -173,12 +201,19 @@ export const formSchema: FormSchema[] = [ |
| 173 | 201 | }, |
| 174 | 202 | { |
| 175 | 203 | field: 'daysOfWeek5', |
| 176 | - component: 'Checkbox', | |
| 177 | - label: '星期五', | |
| 204 | + component: 'CheckboxGroup', | |
| 205 | + label: '天', | |
| 178 | 206 | colProps: { |
| 179 | 207 | span: 8, |
| 180 | 208 | }, |
| 181 | - renderComponentContent: '', | |
| 209 | + componentProps: { | |
| 210 | + options: [ | |
| 211 | + { | |
| 212 | + label: '星期五', | |
| 213 | + value: '5', | |
| 214 | + }, | |
| 215 | + ], | |
| 216 | + }, | |
| 182 | 217 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'schedule')), |
| 183 | 218 | }, |
| 184 | 219 | { |
| ... | ... | @@ -201,12 +236,19 @@ export const formSchema: FormSchema[] = [ |
| 201 | 236 | }, |
| 202 | 237 | { |
| 203 | 238 | field: 'daysOfWeek6', |
| 204 | - component: 'Checkbox', | |
| 205 | - label: '星期六', | |
| 239 | + component: 'CheckboxGroup', | |
| 240 | + label: '天', | |
| 206 | 241 | colProps: { |
| 207 | 242 | span: 8, |
| 208 | 243 | }, |
| 209 | - renderComponentContent: '', | |
| 244 | + componentProps: { | |
| 245 | + options: [ | |
| 246 | + { | |
| 247 | + label: '星期六', | |
| 248 | + value: '6', | |
| 249 | + }, | |
| 250 | + ], | |
| 251 | + }, | |
| 210 | 252 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'schedule')), |
| 211 | 253 | }, |
| 212 | 254 | { |
| ... | ... | @@ -229,12 +271,19 @@ export const formSchema: FormSchema[] = [ |
| 229 | 271 | }, |
| 230 | 272 | { |
| 231 | 273 | field: 'daysOfWeek7', |
| 232 | - component: 'Checkbox', | |
| 233 | - label: '星期七', | |
| 274 | + component: 'CheckboxGroup', | |
| 275 | + label: '天', | |
| 234 | 276 | colProps: { |
| 235 | 277 | span: 8, |
| 236 | 278 | }, |
| 237 | - renderComponentContent: '', | |
| 279 | + componentProps: { | |
| 280 | + options: [ | |
| 281 | + { | |
| 282 | + label: '星期七', | |
| 283 | + value: '7', | |
| 284 | + }, | |
| 285 | + ], | |
| 286 | + }, | |
| 238 | 287 | ifShow: ({ values }) => isTimeAll(Reflect.get(values, 'schedule')), |
| 239 | 288 | }, |
| 240 | 289 | { | ... | ... |
| ... | ... | @@ -26,7 +26,7 @@ interface IAlarms { |
| 26 | 26 | id: string; |
| 27 | 27 | alarmType: string; |
| 28 | 28 | createRules: ICreateRule; |
| 29 | - clearRule?: IClearRule[]; | |
| 29 | + // clearRule?: IClearRule[]; | |
| 30 | 30 | propagate: boolean; |
| 31 | 31 | propagateRelationTypes: string[]; |
| 32 | 32 | } |
| ... | ... | @@ -36,4 +36,5 @@ export interface IProfileData { |
| 36 | 36 | transportConfiguration?: ITansportConfiguration; |
| 37 | 37 | provisionConfiguration?: provisionConfigurationD; |
| 38 | 38 | alarms?: IAlarms[]; |
| 39 | + clearRule?: IClearRule[]; | |
| 39 | 40 | } | ... | ... |
| ... | ... | @@ -54,7 +54,14 @@ |
| 54 | 54 | const getValueData: any = ref({}); |
| 55 | 55 | const [ |
| 56 | 56 | registerCondition, |
| 57 | - { resetFields, updateSchema, appendSchemaByField, removeSchemaByFiled, getFieldsValue }, | |
| 57 | + { | |
| 58 | + setFieldsValue, | |
| 59 | + resetFields, | |
| 60 | + updateSchema, | |
| 61 | + appendSchemaByField, | |
| 62 | + removeSchemaByFiled, | |
| 63 | + getFieldsValue, | |
| 64 | + }, | |
| 58 | 65 | ] = useForm({ |
| 59 | 66 | labelWidth: 100, |
| 60 | 67 | schemas: useConditionDrawerSchema, |
| ... | ... | @@ -79,7 +86,10 @@ |
| 79 | 86 | }); |
| 80 | 87 | } |
| 81 | 88 | ); |
| 82 | - | |
| 89 | + //回显数据 | |
| 90 | + const setFieldsFormValue = (v) => { | |
| 91 | + setFieldsValue(v); | |
| 92 | + }; | |
| 83 | 93 | function getAllFields(getV) { |
| 84 | 94 | const values = getFieldsValue(); |
| 85 | 95 | getValueData.value = values; |
| ... | ... | @@ -301,7 +311,7 @@ |
| 301 | 311 | ]); |
| 302 | 312 | n.value--; |
| 303 | 313 | } |
| 304 | - return { registerCondition, add, del, getAllFields, funcResetFields }; | |
| 314 | + return { setFieldsFormValue, registerCondition, add, del, getAllFields, funcResetFields }; | |
| 305 | 315 | }, |
| 306 | 316 | }); |
| 307 | 317 | </script> | ... | ... |
| ... | ... | @@ -48,7 +48,14 @@ |
| 48 | 48 | const getValueData: any = ref({}); |
| 49 | 49 | const [ |
| 50 | 50 | registerAction, |
| 51 | - { resetFields, updateSchema, appendSchemaByField, getFieldsValue, removeSchemaByFiled }, | |
| 51 | + { | |
| 52 | + setFieldsValue, | |
| 53 | + resetFields, | |
| 54 | + updateSchema, | |
| 55 | + appendSchemaByField, | |
| 56 | + getFieldsValue, | |
| 57 | + removeSchemaByFiled, | |
| 58 | + }, | |
| 52 | 59 | ] = useForm({ |
| 53 | 60 | labelWidth: 100, |
| 54 | 61 | schemas: useActionDrawerSchema, |
| ... | ... | @@ -73,6 +80,10 @@ |
| 73 | 80 | }); |
| 74 | 81 | } |
| 75 | 82 | ); |
| 83 | + //回显数据 | |
| 84 | + const setFieldsFormValue = (v) => { | |
| 85 | + setFieldsValue(v); | |
| 86 | + }; | |
| 76 | 87 | function getAllFields(getV) { |
| 77 | 88 | const values = getFieldsValue(); |
| 78 | 89 | getValueData.value = values; |
| ... | ... | @@ -225,7 +236,7 @@ |
| 225 | 236 | n.value--; |
| 226 | 237 | } |
| 227 | 238 | |
| 228 | - return { registerAction, add, del, getAllFields, funcResetFields }; | |
| 239 | + return { setFieldsFormValue, registerAction, add, del, getAllFields, funcResetFields }; | |
| 229 | 240 | }, |
| 230 | 241 | }); |
| 231 | 242 | </script> | ... | ... |
| ... | ... | @@ -61,9 +61,18 @@ |
| 61 | 61 | props: ['deviceInfo'], |
| 62 | 62 | setup(props) { |
| 63 | 63 | const getValueData: any = ref({}); |
| 64 | + const getPushValueData: any = ref([]); | |
| 65 | + // const newMapGetPushValueData: any = ref([]); | |
| 64 | 66 | const [ |
| 65 | 67 | registerTrigger, |
| 66 | - { resetFields, appendSchemaByField, removeSchemaByFiled, getFieldsValue, updateSchema }, | |
| 68 | + { | |
| 69 | + setFieldsValue, | |
| 70 | + resetFields, | |
| 71 | + appendSchemaByField, | |
| 72 | + removeSchemaByFiled, | |
| 73 | + getFieldsValue, | |
| 74 | + updateSchema, | |
| 75 | + }, | |
| 67 | 76 | ] = useForm({ |
| 68 | 77 | labelWidth: 100, |
| 69 | 78 | schemas: useTriggerDrawerSchema, |
| ... | ... | @@ -88,19 +97,42 @@ |
| 88 | 97 | }); |
| 89 | 98 | } |
| 90 | 99 | ); |
| 100 | + //回显数据 | |
| 101 | + const setFieldsFormValue = (v) => { | |
| 102 | + setFieldsValue(v); | |
| 103 | + }; | |
| 104 | + // //去除字符串的数字 | |
| 105 | + // function trimNumber(str) { | |
| 106 | + // return str.replace(/\d+/g, ''); | |
| 107 | + // } | |
| 108 | + // function unique(arr) { | |
| 109 | + // return Array.from(new Set(arr)); | |
| 110 | + // } | |
| 91 | 111 | function getAllFields(getV) { |
| 92 | 112 | const values = getFieldsValue(); |
| 93 | 113 | getValueData.value = values; |
| 94 | - console.log(getValueData.value); | |
| 95 | 114 | getV = getValueData.value; |
| 115 | + getPushValueData.value.push(getV); | |
| 116 | + console.log(getPushValueData.value); | |
| 96 | 117 | return getV; |
| 97 | 118 | } |
| 98 | 119 | function funcResetFields() { |
| 99 | 120 | resetFields(); |
| 100 | 121 | } |
| 122 | + const addString: any = ref('tiggerEvent1') || ref('tiggerEvent2') || ref('tiggerEvent3'); | |
| 101 | 123 | |
| 102 | 124 | const n = ref(1); |
| 103 | 125 | function add() { |
| 126 | + const values = getFieldsValue(); | |
| 127 | + getPushValueData.value.push(values); | |
| 128 | + console.log(getPushValueData.value); | |
| 129 | + // newMapGetPushValueData.value = getPushValueData.value.map((m) => { | |
| 130 | + // const getKeys = Object.keys(m); | |
| 131 | + // getKeys.map((f) => { | |
| 132 | + // return unique(trimNumber(f)); | |
| 133 | + // }); | |
| 134 | + // }); | |
| 135 | + // console.log(newMapGetPushValueData.value); | |
| 104 | 136 | appendSchemaByField( |
| 105 | 137 | { |
| 106 | 138 | field: `kong${n.value}`, |
| ... | ... | @@ -137,9 +169,9 @@ |
| 137 | 169 | placeholder: '请选择设备', |
| 138 | 170 | }, |
| 139 | 171 | ifShow: ({ values }) => |
| 140 | - !isTime(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 141 | - !isScene(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 142 | - !isHand(Reflect.get(values, `tiggerEvent${n.value}`)), | |
| 172 | + !isTime(Reflect.get(values, addString.value)) && | |
| 173 | + !isScene(Reflect.get(values, addString.value)) && | |
| 174 | + !isHand(Reflect.get(values, addString.value)), | |
| 143 | 175 | colProps: { |
| 144 | 176 | span: 12, |
| 145 | 177 | }, |
| ... | ... | @@ -157,7 +189,7 @@ |
| 157 | 189 | colProps: { |
| 158 | 190 | span: 12, |
| 159 | 191 | }, |
| 160 | - ifShow: ({ values }) => isTime(Reflect.get(values, `tiggerEvent${n.value}`)), | |
| 192 | + ifShow: ({ values }) => isTime(Reflect.get(values, addString.value)), | |
| 161 | 193 | }, |
| 162 | 194 | '' |
| 163 | 195 | ); |
| ... | ... | @@ -174,9 +206,9 @@ |
| 174 | 206 | ], |
| 175 | 207 | }, |
| 176 | 208 | ifShow: ({ values }) => |
| 177 | - !isTime(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 178 | - !isScene(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 179 | - !isHand(Reflect.get(values, `tiggerEvent${n.value}`)), | |
| 209 | + !isTime(Reflect.get(values, addString.value)) && | |
| 210 | + !isScene(Reflect.get(values, addString.value)) && | |
| 211 | + !isHand(Reflect.get(values, addString.value)), | |
| 180 | 212 | colProps: { span: 12 }, |
| 181 | 213 | }, |
| 182 | 214 | '' |
| ... | ... | @@ -197,9 +229,9 @@ |
| 197 | 229 | colProps: { span: 12 }, |
| 198 | 230 | ifShow: ({ values }) => |
| 199 | 231 | isUpAndDown(Reflect.get(values, `touchWay${n.value}`)) && |
| 200 | - !isTime(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 201 | - !isScene(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 202 | - !isHand(Reflect.get(values, `tiggerEvent${n.value}`)), | |
| 232 | + !isTime(Reflect.get(values, addString.value)) && | |
| 233 | + !isScene(Reflect.get(values, addString.value)) && | |
| 234 | + !isHand(Reflect.get(values, addString.value)), | |
| 203 | 235 | }, |
| 204 | 236 | '' |
| 205 | 237 | ); |
| ... | ... | @@ -217,9 +249,9 @@ |
| 217 | 249 | }, |
| 218 | 250 | colProps: { span: 12 }, |
| 219 | 251 | ifShow: ({ values }) => |
| 220 | - !isTime(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 221 | - !isScene(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 222 | - !isHand(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 252 | + !isTime(Reflect.get(values, addString.value)) && | |
| 253 | + !isScene(Reflect.get(values, addString.value)) && | |
| 254 | + !isHand(Reflect.get(values, addString.value)) && | |
| 223 | 255 | !isUpAndDown(Reflect.get(values, `touchWay${n.value}`)), |
| 224 | 256 | }, |
| 225 | 257 | '' |
| ... | ... | @@ -242,9 +274,9 @@ |
| 242 | 274 | ifShow: ({ values }) => |
| 243 | 275 | isWenDu(Reflect.get(values, 'attributeChoose')) && |
| 244 | 276 | !isUpAndDown(Reflect.get(values, `touchWay${n.value}`)) && |
| 245 | - !isTime(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 246 | - !isScene(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 247 | - !isHand(Reflect.get(values, `tiggerEvent${n.value}`)), | |
| 277 | + !isTime(Reflect.get(values, addString.value)) && | |
| 278 | + !isScene(Reflect.get(values, addString.value)) && | |
| 279 | + !isHand(Reflect.get(values, addString.value)), | |
| 248 | 280 | colProps: { span: 12 }, |
| 249 | 281 | }, |
| 250 | 282 | '' |
| ... | ... | @@ -260,9 +292,9 @@ |
| 260 | 292 | ifShow: ({ values }) => |
| 261 | 293 | isWenDu(Reflect.get(values, 'attributeChoose')) && |
| 262 | 294 | !isUpAndDown(Reflect.get(values, `touchWay${n.value}`)) && |
| 263 | - !isTime(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 264 | - !isScene(Reflect.get(values, `tiggerEvent${n.value}`)) && | |
| 265 | - !isHand(Reflect.get(values, `tiggerEvent${n.value}`)), | |
| 295 | + !isTime(Reflect.get(values, addString.value)) && | |
| 296 | + !isScene(Reflect.get(values, addString.value)) && | |
| 297 | + !isHand(Reflect.get(values, addString.value)), | |
| 266 | 298 | colProps: { |
| 267 | 299 | span: 12, |
| 268 | 300 | }, |
| ... | ... | @@ -277,7 +309,7 @@ |
| 277 | 309 | colProps: { |
| 278 | 310 | span: 12, |
| 279 | 311 | }, |
| 280 | - ifShow: ({ values }) => isScene(Reflect.get(values, `tiggerEvent${n.value}`)), | |
| 312 | + ifShow: ({ values }) => isScene(Reflect.get(values, addString.value)), | |
| 281 | 313 | componentProps: { |
| 282 | 314 | placeholder: '请输入场景触发器', |
| 283 | 315 | options: [ |
| ... | ... | @@ -300,7 +332,7 @@ |
| 300 | 332 | componentProps: { |
| 301 | 333 | placeholder: '暂不实现', |
| 302 | 334 | }, |
| 303 | - ifShow: ({ values }) => isHand(Reflect.get(values, `tiggerEvent${n.value}`)), | |
| 335 | + ifShow: ({ values }) => isHand(Reflect.get(values, addString.value)), | |
| 304 | 336 | }, |
| 305 | 337 | '' |
| 306 | 338 | ); |
| ... | ... | @@ -336,7 +368,7 @@ |
| 336 | 368 | ]); |
| 337 | 369 | n.value--; |
| 338 | 370 | } |
| 339 | - return { registerTrigger, add, del, getAllFields, funcResetFields }; | |
| 371 | + return { setFieldsFormValue, registerTrigger, add, del, getAllFields, funcResetFields }; | |
| 340 | 372 | }, |
| 341 | 373 | }); |
| 342 | 374 | </script> | ... | ... |
| ... | ... | @@ -71,6 +71,34 @@ |
| 71 | 71 | await setFieldsValue({ |
| 72 | 72 | ...data.record, |
| 73 | 73 | }); |
| 74 | + try { | |
| 75 | + proxy.$refs.getTriggerChildData.setFieldsFormValue({ | |
| 76 | + triggerEvent: data.record.triggers[0].triggerEvent, | |
| 77 | + attributeChoose: data.record?.triggers[0].attributeChoose, | |
| 78 | + touchWay: data.record?.triggers[0].touchWay, | |
| 79 | + deviceId: data.record?.triggers[0].deviceId, | |
| 80 | + compare: data.record?.triggers[0].compare, | |
| 81 | + value: data.record?.triggers[0].value, | |
| 82 | + sceneLinkageId: data.record?.triggers[0].sceneLinkageId, | |
| 83 | + }); | |
| 84 | + proxy.$refs.getConditionChildData.setFieldsFormValue({ | |
| 85 | + status: data.record?.doConditions[0].status, | |
| 86 | + deviceId: data.record?.doConditions[0].deviceId, | |
| 87 | + createTime: data.record?.doConditions[0].createTime, | |
| 88 | + updateTime: data.record?.doConditions[0].updateTime, | |
| 89 | + property: data.record?.doConditions[0].property, | |
| 90 | + compare: data.record?.doConditions[0].compare, | |
| 91 | + value: data.record?.doConditions[0].value, | |
| 92 | + }); | |
| 93 | + proxy.$refs.getChildData.setFieldsFormValue({ | |
| 94 | + outTarget: data.record?.doActions[0].outTarget, | |
| 95 | + deviceId: data.record?.doActions[0].deviceId, | |
| 96 | + command: data.record?.doActions[0].command, | |
| 97 | + sceneLinkageId: data.record?.doActions[0].sceneLinkageId, | |
| 98 | + }); | |
| 99 | + } catch (e) { | |
| 100 | + return e; | |
| 101 | + } | |
| 74 | 102 | } else { |
| 75 | 103 | await resetFields(); |
| 76 | 104 | } |
| ... | ... | @@ -88,7 +116,6 @@ |
| 88 | 116 | triggersArray.push(getTriggerChildValues); |
| 89 | 117 | doConditionsArray.push(getconditionChildValues); |
| 90 | 118 | getValuesFormData = getFieldsValue(); |
| 91 | - console.log('触发器',triggersArray) | |
| 92 | 119 | Object.assign(getAllFormData, getValuesFormData); |
| 93 | 120 | getAllFormData.triggers = triggersArray; |
| 94 | 121 | getAllFormData.doConditions = doConditionsArray; | ... | ... |