Commit 1bab7fe3279e55994eaa355278d6c94131ac0d9c
Merge branch 'ft-dev' into 'main'
fix:修改设备配置详情页样式,待修改场景联动样式 See merge request huang/yun-teng-iot-front!85
Showing
7 changed files
with
134 additions
and
125 deletions
| @@ -21,8 +21,9 @@ | @@ -21,8 +21,9 @@ | ||
| 21 | /></TabPane> | 21 | /></TabPane> | 
| 22 | <TabPane key="3" tab="报警规则"> | 22 | <TabPane key="3" tab="报警规则"> | 
| 23 | <div style="padding-top: 10px"> | 23 | <div style="padding-top: 10px"> | 
| 24 | - <div style="border-radius: 10px; border: 1px solid #f0f0f0"> | ||
| 25 | - <div style="margin-left: 15px"> | 24 | + <div style="border-radius: 10px"> | 
| 25 | + <p style="font-weight: 900">报警规则</p> | ||
| 26 | + <div class="input-style" style="margin-left: 15px"> | ||
| 26 | <BasicForm | 27 | <BasicForm | 
| 27 | :showSubmitButton="false" | 28 | :showSubmitButton="false" | 
| 28 | :showResetButton="false" | 29 | :showResetButton="false" | 
| @@ -60,9 +61,9 @@ | @@ -60,9 +61,9 @@ | ||
| 60 | /> | 61 | /> | 
| 61 | </div> | 62 | </div> | 
| 62 | </div> | 63 | </div> | 
| 63 | - <div style="border-radius: 10px; border: 1px solid #f0f0f0; margin-top: 15px"> | ||
| 64 | - <p>清除报警规则</p> | ||
| 65 | - <div style="margin-left: 15px"> | 64 | + <div style="border-radius: 10px; margin-top: 15px"> | 
| 65 | + <p style="font-weight: 900">清除报警规则</p> | ||
| 66 | + <div class="clear-input-style" style="margin-left: 15px"> | ||
| 66 | <BasicForm | 67 | <BasicForm | 
| 67 | :showSubmitButton="false" | 68 | :showSubmitButton="false" | 
| 68 | :showResetButton="false" | 69 | :showResetButton="false" | 
| @@ -359,3 +360,35 @@ | @@ -359,3 +360,35 @@ | ||
| 359 | }, | 360 | }, | 
| 360 | }); | 361 | }); | 
| 361 | </script> | 362 | </script> | 
| 363 | + | ||
| 364 | +<style scoped lang="less"> | ||
| 365 | + .input-style { | ||
| 366 | + /deep/ .ant-form-item-control-input { | ||
| 367 | + position: relative; | ||
| 368 | + display: flex; | ||
| 369 | + align-items: center; | ||
| 370 | + min-height: 02px; | ||
| 371 | + } | ||
| 372 | + /deep/.ant-col-24 { | ||
| 373 | + display: block; | ||
| 374 | + flex: 0 0 100%; | ||
| 375 | + max-width: 100%; | ||
| 376 | + margin-top: -20px; | ||
| 377 | + } | ||
| 378 | + } | ||
| 379 | + | ||
| 380 | + .clear-input-style { | ||
| 381 | + /deep/ .ant-form-item-control-input { | ||
| 382 | + position: relative; | ||
| 383 | + display: flex; | ||
| 384 | + align-items: center; | ||
| 385 | + min-height: 02px; | ||
| 386 | + } | ||
| 387 | + /deep/.ant-col-24 { | ||
| 388 | + display: block; | ||
| 389 | + flex: 0 0 100%; | ||
| 390 | + max-width: 100%; | ||
| 391 | + margin-top: -20px; | ||
| 392 | + } | ||
| 393 | + } | ||
| 394 | +</style> | 
| @@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
| 12 | " | 12 | " | 
| 13 | > | 13 | > | 
| 14 | <div style="width: 4vw; height: 24vh">请上传图片</div> | 14 | <div style="width: 4vw; height: 24vh">请上传图片</div> | 
| 15 | - <div style="width: 8vw; height: 24vh"> | 15 | + <div class="device-icon-style" style="width: 8vw; height: 24vh"> | 
| 16 | <Upload | 16 | <Upload | 
| 17 | style="width: 20vw" | 17 | style="width: 20vw" | 
| 18 | name="avatar" | 18 | name="avatar" | 
| @@ -23,20 +23,20 @@ | @@ -23,20 +23,20 @@ | ||
| 23 | :before-upload="beforeUploadqrcodePic" | 23 | :before-upload="beforeUploadqrcodePic" | 
| 24 | > | 24 | > | 
| 25 | <img | 25 | <img | 
| 26 | - style="text-align: center; border-radius: 50%; width: 10vw; height: 15vh" | 26 | + style="text-align: center; width: 13vw; height: 15vh" | 
| 27 | v-if="peresonalPic" | 27 | v-if="peresonalPic" | 
| 28 | :src="peresonalPic" | 28 | :src="peresonalPic" | 
| 29 | alt="avatar" | 29 | alt="avatar" | 
| 30 | /> | 30 | /> | 
| 31 | <div v-else> | 31 | <div v-else> | 
| 32 | <div style="margin-top: 30px"> | 32 | <div style="margin-top: 30px"> | 
| 33 | - <PlusOutlined style="font-size: 30px" /> | 33 | + <PlusOutlined style="font-size: 30px; margin-left: -166px" /> | 
| 34 | </div> | 34 | </div> | 
| 35 | <div | 35 | <div | 
| 36 | class="ant-upload-text flex" | 36 | class="ant-upload-text flex" | 
| 37 | - style="width: 280px; height: 130px; align-items: center" | 37 | + style="width: 280px; height: 130px; align-items: center; margin-left: 43px" | 
| 38 | > | 38 | > | 
| 39 | - 支持.PNG、.JPG、.JPEG格式,建议大小不超过2M。</div | 39 | + 请上传图片</div | 
| 40 | > | 40 | > | 
| 41 | </div> | 41 | </div> | 
| 42 | </Upload> | 42 | </Upload> | 
| @@ -166,6 +166,21 @@ | @@ -166,6 +166,21 @@ | ||
| 166 | p { | 166 | p { | 
| 167 | color: @text-color; | 167 | color: @text-color; | 
| 168 | } | 168 | } | 
| 169 | + .device-icon-style { | ||
| 170 | + /deep/ .ant-upload-select-picture-card { | ||
| 171 | + display: inherit; | ||
| 172 | + float: none; | ||
| 173 | + width: 8.6vw; | ||
| 174 | + height: 17vh; | ||
| 175 | + margin-right: 8px; | ||
| 176 | + text-align: center; | ||
| 177 | + vertical-align: top; | ||
| 178 | + background-color: #fafafa; | ||
| 179 | + border: 1px dashed #d9d9d9; | ||
| 180 | + cursor: pointer; | ||
| 181 | + transition: border-color 0.3s ease; | ||
| 182 | + } | ||
| 183 | + } | ||
| 169 | } | 184 | } | 
| 170 | 185 | ||
| 171 | .pay-select { | 186 | .pay-select { | 
| @@ -261,7 +261,7 @@ | @@ -261,7 +261,7 @@ | ||
| 261 | 261 | ||
| 262 | appendSchemaByField( | 262 | appendSchemaByField( | 
| 263 | { | 263 | { | 
| 264 | - field: `compare${n.value}`, | 264 | + field: `compareWendu${n.value}`, | 
| 265 | label: '', | 265 | label: '', | 
| 266 | component: 'Select', | 266 | component: 'Select', | 
| 267 | componentProps: { | 267 | componentProps: { | 
| @@ -282,7 +282,7 @@ | @@ -282,7 +282,7 @@ | ||
| 282 | ); | 282 | ); | 
| 283 | appendSchemaByField( | 283 | appendSchemaByField( | 
| 284 | { | 284 | { | 
| 285 | - field: `value${n.value}`, | 285 | + field: `valueWendu${n.value}`, | 
| 286 | component: 'Input', | 286 | component: 'Input', | 
| 287 | label: '', | 287 | label: '', | 
| 288 | componentProps: { | 288 | componentProps: { | 
| @@ -322,8 +322,8 @@ | @@ -322,8 +322,8 @@ | ||
| 322 | `wu${field}`, | 322 | `wu${field}`, | 
| 323 | `compare${field}`, | 323 | `compare${field}`, | 
| 324 | `value${field}`, | 324 | `value${field}`, | 
| 325 | - `compare${field}`, | ||
| 326 | - `value${field}`, | 325 | + `compareWendu${field}`, | 
| 326 | + `valueWendu${field}`, | ||
| 327 | `${field}`, | 327 | `${field}`, | 
| 328 | ]); | 328 | ]); | 
| 329 | n.value--; | 329 | n.value--; | 
| @@ -204,6 +204,22 @@ | @@ -204,6 +204,22 @@ | ||
| 204 | ); | 204 | ); | 
| 205 | appendSchemaByField( | 205 | appendSchemaByField( | 
| 206 | { | 206 | { | 
| 207 | + field: 'wu3', | ||
| 208 | + label: '', | ||
| 209 | + component: 'Input', | ||
| 210 | + componentProps: { | ||
| 211 | + placeholder: '无', | ||
| 212 | + style: { | ||
| 213 | + visibility: 'hidden', | ||
| 214 | + }, | ||
| 215 | + }, | ||
| 216 | + colProps: { span: 12 }, | ||
| 217 | + ifShow: ({ values }) => isMsg(Reflect.get(values, 'outTarget')), | ||
| 218 | + }, | ||
| 219 | + '' | ||
| 220 | + ); | ||
| 221 | + appendSchemaByField( | ||
| 222 | + { | ||
| 207 | field: `sceneLinkageId${n.value}`, | 223 | field: `sceneLinkageId${n.value}`, | 
| 208 | label: '', | 224 | label: '', | 
| 209 | component: 'ApiSelect', | 225 | component: 'ApiSelect', | 
| @@ -223,6 +239,22 @@ | @@ -223,6 +239,22 @@ | ||
| 223 | }, | 239 | }, | 
| 224 | '' | 240 | '' | 
| 225 | ); | 241 | ); | 
| 242 | + appendSchemaByField( | ||
| 243 | + { | ||
| 244 | + field: 'wu4', | ||
| 245 | + label: '', | ||
| 246 | + component: 'Input', | ||
| 247 | + componentProps: { | ||
| 248 | + placeholder: '无', | ||
| 249 | + style: { | ||
| 250 | + visibility: 'hidden', | ||
| 251 | + }, | ||
| 252 | + }, | ||
| 253 | + colProps: { span: 12 }, | ||
| 254 | + ifShow: ({ values }) => isScene(Reflect.get(values, 'outTarget')), | ||
| 255 | + }, | ||
| 256 | + '' | ||
| 257 | + ); | ||
| 226 | 258 | ||
| 227 | appendSchemaByField( | 259 | appendSchemaByField( | 
| 228 | { | 260 | { | 
| @@ -247,7 +279,9 @@ | @@ -247,7 +279,9 @@ | ||
| 247 | `command${field}`, | 279 | `command${field}`, | 
| 248 | `wu1${field}`, | 280 | `wu1${field}`, | 
| 249 | `wu2${field}`, | 281 | `wu2${field}`, | 
| 282 | + `wu3${field}`, | ||
| 250 | `sceneLinkageId${field}`, | 283 | `sceneLinkageId${field}`, | 
| 284 | + `wu4${field}`, | ||
| 251 | `${field}`, | 285 | `${field}`, | 
| 252 | ]); | 286 | ]); | 
| 253 | n.value--; | 287 | n.value--; | 
| @@ -12,26 +12,26 @@ | @@ -12,26 +12,26 @@ | ||
| 12 | <template #add="{ field }"> | 12 | <template #add="{ field }"> | 
| 13 | <Button | 13 | <Button | 
| 14 | style="margin-left: -99px; margin-top: 0px; display: inline-block" | 14 | style="margin-left: -99px; margin-top: 0px; display: inline-block" | 
| 15 | + :style="addHideButton > 1 ? 'display:none' : 'display:inline-block'" | ||
| 15 | v-if="Number(field) === 0" | 16 | v-if="Number(field) === 0" | 
| 16 | @click="add" | 17 | @click="add" | 
| 17 | type="primary" | 18 | type="primary" | 
| 18 | >+新增触发器</Button | 19 | >+新增触发器</Button | 
| 19 | > | 20 | > | 
| 20 | - <!-- <Button | ||
| 21 | - style="margin-left: 20px; margin-top: -60px" | ||
| 22 | - v-if="Number(field) === 0" | ||
| 23 | - type="primary" | ||
| 24 | - @click="del(field)" | ||
| 25 | - >删除</Button | ||
| 26 | - > --> | ||
| 27 | <Button | 21 | <Button | 
| 28 | style="margin-left: 5px; margin-top: 35px" | 22 | style="margin-left: 5px; margin-top: 35px" | 
| 29 | - v-if="field > 0" | 23 | + :style="addHideButton >= 2 ? 'display:inline-block' : 'display:none'" | 
| 24 | + v-if="Number(field) > 0" | ||
| 30 | @click="add" | 25 | @click="add" | 
| 31 | type="primary" | 26 | type="primary" | 
| 32 | >+新增触发器</Button | 27 | >+新增触发器</Button | 
| 33 | > | 28 | > | 
| 34 | - <Button style="margin-left: 10px" v-if="field > 0" @click="del(field)" type="primary" | 29 | + <Button | 
| 30 | + style="margin-left: 10px" | ||
| 31 | + :style="addHideButton >= 2 ? 'display:inline-block' : 'display:none'" | ||
| 32 | + v-if="Number(field) > 0" | ||
| 33 | + @click="del(field)" | ||
| 34 | + type="primary" | ||
| 35 | >删除</Button | 35 | >删除</Button | 
| 36 | > | 36 | > | 
| 37 | </template> | 37 | </template> | 
| @@ -62,7 +62,8 @@ | @@ -62,7 +62,8 @@ | ||
| 62 | setup(props) { | 62 | setup(props) { | 
| 63 | const getValueData: any = ref({}); | 63 | const getValueData: any = ref({}); | 
| 64 | const getPushValueData: any = ref([]); | 64 | const getPushValueData: any = ref([]); | 
| 65 | - // const newMapGetPushValueData: any = ref([]); | 65 | + const addHideButton = ref(1); | 
| 66 | + const addHideButtonTemp: any = ref(null); | ||
| 66 | const [ | 67 | const [ | 
| 67 | registerTrigger, | 68 | registerTrigger, | 
| 68 | { | 69 | { | 
| @@ -118,13 +119,6 @@ | @@ -118,13 +119,6 @@ | ||
| 118 | }, | 119 | }, | 
| 119 | }); | 120 | }); | 
| 120 | }; | 121 | }; | 
| 121 | - // //去除字符串的数字 | ||
| 122 | - // function trimNumber(str) { | ||
| 123 | - // return str.replace(/\d+/g, ''); | ||
| 124 | - // } | ||
| 125 | - // function unique(arr) { | ||
| 126 | - // return Array.from(new Set(arr)); | ||
| 127 | - // } | ||
| 128 | const clearGetPushValueDataEmpty = () => { | 122 | const clearGetPushValueDataEmpty = () => { | 
| 129 | getPushValueData.value.length = 0; | 123 | getPushValueData.value.length = 0; | 
| 130 | }; | 124 | }; | 
| @@ -143,15 +137,14 @@ | @@ -143,15 +137,14 @@ | ||
| 143 | 137 | ||
| 144 | const n = ref(1); | 138 | const n = ref(1); | 
| 145 | function add() { | 139 | function add() { | 
| 146 | - // const values = getFieldsValue(); | ||
| 147 | - // getPushValueData.value.push(values); | ||
| 148 | - // newMapGetPushValueData.value = getPushValueData.value.map((m) => { | ||
| 149 | - // const getKeys = Object.keys(m); | ||
| 150 | - // getKeys.map((f) => { | ||
| 151 | - // return unique(trimNumber(f)); | ||
| 152 | - // }); | ||
| 153 | - // }); | ||
| 154 | - // console.log(newMapGetPushValueData.value); | 140 | + addHideButton.value++; | 
| 141 | + addHideButtonTemp.value = addHideButton.value; | ||
| 142 | + addHideButtonTemp.value--; | ||
| 143 | + const getS = document.getElementById('1') as HTMLElement; | ||
| 144 | + // getS.setAttribute('style', 'display:none'); | ||
| 145 | + console.log(getS); | ||
| 146 | + getS.hidden = true; | ||
| 147 | + | ||
| 155 | appendSchemaByField( | 148 | appendSchemaByField( | 
| 156 | { | 149 | { | 
| 157 | field: `kong${n.value}`, | 150 | field: `kong${n.value}`, | 
| @@ -199,7 +192,7 @@ | @@ -199,7 +192,7 @@ | ||
| 199 | ); | 192 | ); | 
| 200 | appendSchemaByField( | 193 | appendSchemaByField( | 
| 201 | { | 194 | { | 
| 202 | - field: `${n.value}no1`, | 195 | + field: `no1${n.value}`, | 
| 203 | component: 'Input', | 196 | component: 'Input', | 
| 204 | label: '', | 197 | label: '', | 
| 205 | componentProps: { | 198 | componentProps: { | 
| @@ -234,7 +227,7 @@ | @@ -234,7 +227,7 @@ | ||
| 234 | ); | 227 | ); | 
| 235 | appendSchemaByField( | 228 | appendSchemaByField( | 
| 236 | { | 229 | { | 
| 237 | - field: `${n.value}no2`, | 230 | + field: `no2${n.value}`, | 
| 238 | label: '', | 231 | label: '', | 
| 239 | component: 'Select', | 232 | component: 'Select', | 
| 240 | componentProps: { | 233 | componentProps: { | 
| @@ -342,7 +335,7 @@ | @@ -342,7 +335,7 @@ | ||
| 342 | ); | 335 | ); | 
| 343 | appendSchemaByField( | 336 | appendSchemaByField( | 
| 344 | { | 337 | { | 
| 345 | - field: `${n.value}no3`, | 338 | + field: `no3${n.value}`, | 
| 346 | label: '', | 339 | label: '', | 
| 347 | component: 'ApiSelect', | 340 | component: 'ApiSelect', | 
| 348 | colProps: { | 341 | colProps: { | 
| @@ -371,23 +364,26 @@ | @@ -371,23 +364,26 @@ | ||
| 371 | } | 364 | } | 
| 372 | 365 | ||
| 373 | function del(field) { | 366 | function del(field) { | 
| 367 | + addHideButton.value--; | ||
| 374 | removeSchemaByFiled([ | 368 | removeSchemaByFiled([ | 
| 375 | `kong${field}`, | 369 | `kong${field}`, | 
| 376 | `tiggerEvent${field}`, | 370 | `tiggerEvent${field}`, | 
| 377 | `deviceId${field}`, | 371 | `deviceId${field}`, | 
| 378 | - `${field}no1`, | 372 | + `no1${field}`, | 
| 379 | `touchWay${field}`, | 373 | `touchWay${field}`, | 
| 380 | - `${field}no2`, | 374 | + `no2${field}`, | 
| 381 | `attributeChoose${field}`, | 375 | `attributeChoose${field}`, | 
| 382 | `compare${field}`, | 376 | `compare${field}`, | 
| 383 | `value${field}`, | 377 | `value${field}`, | 
| 384 | `sceneLinkageId${field}`, | 378 | `sceneLinkageId${field}`, | 
| 385 | - `${field}no3`, | 379 | + `no3${field}`, | 
| 386 | `${field}`, | 380 | `${field}`, | 
| 387 | ]); | 381 | ]); | 
| 388 | n.value--; | 382 | n.value--; | 
| 389 | } | 383 | } | 
| 390 | return { | 384 | return { | 
| 385 | + addHideButtonTemp, | ||
| 386 | + addHideButton, | ||
| 391 | editSelectDevice, | 387 | editSelectDevice, | 
| 392 | clearSelectDevice, | 388 | clearSelectDevice, | 
| 393 | clearGetPushValueDataEmpty, | 389 | clearGetPushValueDataEmpty, | 
| @@ -295,9 +295,6 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | @@ -295,9 +295,6 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | ||
| 295 | componentProps: { | 295 | componentProps: { | 
| 296 | placeholder: '请选择设备', | 296 | placeholder: '请选择设备', | 
| 297 | }, | 297 | }, | 
| 298 | - // componentProps: { | ||
| 299 | - // placeholder: '请选择设备', | ||
| 300 | - // }, | ||
| 301 | ifShow: ({ values }) => | 298 | ifShow: ({ values }) => | 
| 302 | !isTime(Reflect.get(values, 'triggerEvent')) && | 299 | !isTime(Reflect.get(values, 'triggerEvent')) && | 
| 303 | !isScene(Reflect.get(values, 'triggerEvent')) && | 300 | !isScene(Reflect.get(values, 'triggerEvent')) && | 
| @@ -307,27 +304,13 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | @@ -307,27 +304,13 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | ||
| 307 | }, | 304 | }, | 
| 308 | }, | 305 | }, | 
| 309 | { | 306 | { | 
| 310 | - field: '', | 307 | + field: 'no1', | 
| 311 | component: 'Input', | 308 | component: 'Input', | 
| 312 | label: '', | 309 | label: '', | 
| 313 | componentProps: { | 310 | componentProps: { | 
| 314 | maxLength: 255, | 311 | maxLength: 255, | 
| 315 | placeholder: '请输入Cron表达式', | 312 | placeholder: '请输入Cron表达式', | 
| 316 | }, | 313 | }, | 
| 317 | - dynamicRules: () => { | ||
| 318 | - return [ | ||
| 319 | - { | ||
| 320 | - required: false, | ||
| 321 | - validator: (_, value) => { | ||
| 322 | - if (String(value).length > 255) { | ||
| 323 | - return Promise.reject('字数不超过255个字'); | ||
| 324 | - } | ||
| 325 | - return Promise.resolve(); | ||
| 326 | - }, | ||
| 327 | - }, | ||
| 328 | - ]; | ||
| 329 | - }, | ||
| 330 | - | ||
| 331 | colProps: { | 314 | colProps: { | 
| 332 | span: 12, | 315 | span: 12, | 
| 333 | }, | 316 | }, | 
| @@ -351,7 +334,7 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | @@ -351,7 +334,7 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | ||
| 351 | colProps: { span: 12 }, | 334 | colProps: { span: 12 }, | 
| 352 | }, | 335 | }, | 
| 353 | { | 336 | { | 
| 354 | - field: '', | 337 | + field: 'no2', | 
| 355 | label: '', | 338 | label: '', | 
| 356 | component: 'Select', | 339 | component: 'Select', | 
| 357 | componentProps: { | 340 | componentProps: { | 
| @@ -417,19 +400,6 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | @@ -417,19 +400,6 @@ export const useTriggerDrawerSchema: FormSchema[] = [ | ||
| 417 | maxLength: 16, | 400 | maxLength: 16, | 
| 418 | placeholder: '请输入比较值', | 401 | placeholder: '请输入比较值', | 
| 419 | }, | 402 | }, | 
| 420 | - dynamicRules: () => { | ||
| 421 | - return [ | ||
| 422 | - { | ||
| 423 | - required: false, | ||
| 424 | - validator: (_, value) => { | ||
| 425 | - if (String(value).length > 16) { | ||
| 426 | - return Promise.reject('字数不超过16个字'); | ||
| 427 | - } | ||
| 428 | - return Promise.resolve(); | ||
| 429 | - }, | ||
| 430 | - }, | ||
| 431 | - ]; | ||
| 432 | - }, | ||
| 433 | 403 | ||
| 434 | ifShow: ({ values }) => | 404 | ifShow: ({ values }) => | 
| 435 | isWenDu(Reflect.get(values, 'attributeChoose')) && | 405 | isWenDu(Reflect.get(values, 'attributeChoose')) && | 
| @@ -546,7 +516,7 @@ export const useConditionDrawerSchema: FormSchema[] = [ | @@ -546,7 +516,7 @@ export const useConditionDrawerSchema: FormSchema[] = [ | ||
| 546 | colProps: { span: 12 }, | 516 | colProps: { span: 12 }, | 
| 547 | }, | 517 | }, | 
| 548 | { | 518 | { | 
| 549 | - field: '', | 519 | + field: 'wu', | 
| 550 | label: '', | 520 | label: '', | 
| 551 | component: 'Input', | 521 | component: 'Input', | 
| 552 | componentProps: { | 522 | componentProps: { | 
| @@ -583,19 +553,6 @@ export const useConditionDrawerSchema: FormSchema[] = [ | @@ -583,19 +553,6 @@ export const useConditionDrawerSchema: FormSchema[] = [ | ||
| 583 | maxLength: 16, | 553 | maxLength: 16, | 
| 584 | placeholder: '请输入比较值', | 554 | placeholder: '请输入比较值', | 
| 585 | }, | 555 | }, | 
| 586 | - dynamicRules: () => { | ||
| 587 | - return [ | ||
| 588 | - { | ||
| 589 | - required: false, | ||
| 590 | - validator: (_, value) => { | ||
| 591 | - if (String(value).length > 16) { | ||
| 592 | - return Promise.reject('字数不超过16个字'); | ||
| 593 | - } | ||
| 594 | - return Promise.resolve(); | ||
| 595 | - }, | ||
| 596 | - }, | ||
| 597 | - ]; | ||
| 598 | - }, | ||
| 599 | 556 | ||
| 600 | ifShow: ({ values }) => | 557 | ifShow: ({ values }) => | 
| 601 | isShiDu(Reflect.get(values, 'property')) && !isTimeAll(Reflect.get(values, 'status')), | 558 | isShiDu(Reflect.get(values, 'property')) && !isTimeAll(Reflect.get(values, 'status')), | 
| @@ -605,7 +562,7 @@ export const useConditionDrawerSchema: FormSchema[] = [ | @@ -605,7 +562,7 @@ export const useConditionDrawerSchema: FormSchema[] = [ | ||
| 605 | }, | 562 | }, | 
| 606 | 563 | ||
| 607 | { | 564 | { | 
| 608 | - field: 'compare', | 565 | + field: 'compareWendu', | 
| 609 | label: '', | 566 | label: '', | 
| 610 | component: 'Select', | 567 | component: 'Select', | 
| 611 | componentProps: { | 568 | componentProps: { | 
| @@ -623,26 +580,13 @@ export const useConditionDrawerSchema: FormSchema[] = [ | @@ -623,26 +580,13 @@ export const useConditionDrawerSchema: FormSchema[] = [ | ||
| 623 | colProps: { span: 12 }, | 580 | colProps: { span: 12 }, | 
| 624 | }, | 581 | }, | 
| 625 | { | 582 | { | 
| 626 | - field: 'value', | 583 | + field: 'valueWendu', | 
| 627 | component: 'Input', | 584 | component: 'Input', | 
| 628 | label: '', | 585 | label: '', | 
| 629 | componentProps: { | 586 | componentProps: { | 
| 630 | maxLength: 16, | 587 | maxLength: 16, | 
| 631 | placeholder: '请输入比较值', | 588 | placeholder: '请输入比较值', | 
| 632 | }, | 589 | }, | 
| 633 | - dynamicRules: () => { | ||
| 634 | - return [ | ||
| 635 | - { | ||
| 636 | - required: false, | ||
| 637 | - validator: (_, value) => { | ||
| 638 | - if (String(value).length > 16) { | ||
| 639 | - return Promise.reject('字数不超过16个字'); | ||
| 640 | - } | ||
| 641 | - return Promise.resolve(); | ||
| 642 | - }, | ||
| 643 | - }, | ||
| 644 | - ]; | ||
| 645 | - }, | ||
| 646 | ifShow: ({ values }) => | 590 | ifShow: ({ values }) => | 
| 647 | isWenDu(Reflect.get(values, 'property')) && !isTimeAll(Reflect.get(values, 'status')), | 591 | isWenDu(Reflect.get(values, 'property')) && !isTimeAll(Reflect.get(values, 'status')), | 
| 648 | colProps: { | 592 | colProps: { | 
| @@ -696,19 +640,6 @@ export const useActionDrawerSchema: FormSchema[] = [ | @@ -696,19 +640,6 @@ export const useActionDrawerSchema: FormSchema[] = [ | ||
| 696 | maxLength: 255, | 640 | maxLength: 255, | 
| 697 | placeholder: '请输入下发指定', | 641 | placeholder: '请输入下发指定', | 
| 698 | }, | 642 | }, | 
| 699 | - dynamicRules: () => { | ||
| 700 | - return [ | ||
| 701 | - { | ||
| 702 | - required: false, | ||
| 703 | - validator: (_, value) => { | ||
| 704 | - if (String(value).length > 255) { | ||
| 705 | - return Promise.reject('字数不超过255个字'); | ||
| 706 | - } | ||
| 707 | - return Promise.resolve(); | ||
| 708 | - }, | ||
| 709 | - }, | ||
| 710 | - ]; | ||
| 711 | - }, | ||
| 712 | ifShow: ({ values }) => | 643 | ifShow: ({ values }) => | 
| 713 | !isScene(Reflect.get(values, 'outTarget')) && !isMsg(Reflect.get(values, 'outTarget')), | 644 | !isScene(Reflect.get(values, 'outTarget')) && !isMsg(Reflect.get(values, 'outTarget')), | 
| 714 | colProps: { | 645 | colProps: { | 
| @@ -716,7 +647,7 @@ export const useActionDrawerSchema: FormSchema[] = [ | @@ -716,7 +647,7 @@ export const useActionDrawerSchema: FormSchema[] = [ | ||
| 716 | }, | 647 | }, | 
| 717 | }, | 648 | }, | 
| 718 | { | 649 | { | 
| 719 | - field: '', | 650 | + field: 'wu1', | 
| 720 | label: '', | 651 | label: '', | 
| 721 | component: 'Input', | 652 | component: 'Input', | 
| 722 | componentProps: { | 653 | componentProps: { | 
| @@ -728,7 +659,7 @@ export const useActionDrawerSchema: FormSchema[] = [ | @@ -728,7 +659,7 @@ export const useActionDrawerSchema: FormSchema[] = [ | ||
| 728 | colProps: { span: 12 }, | 659 | colProps: { span: 12 }, | 
| 729 | }, | 660 | }, | 
| 730 | { | 661 | { | 
| 731 | - field: '', | 662 | + field: 'wu2', | 
| 732 | component: 'Input', | 663 | component: 'Input', | 
| 733 | label: '', | 664 | label: '', | 
| 734 | componentProps: { | 665 | componentProps: { | 
| @@ -740,7 +671,7 @@ export const useActionDrawerSchema: FormSchema[] = [ | @@ -740,7 +671,7 @@ export const useActionDrawerSchema: FormSchema[] = [ | ||
| 740 | ifShow: ({ values }) => isMsg(Reflect.get(values, 'outTarget')), | 671 | ifShow: ({ values }) => isMsg(Reflect.get(values, 'outTarget')), | 
| 741 | }, | 672 | }, | 
| 742 | { | 673 | { | 
| 743 | - field: '', | 674 | + field: 'wu3', | 
| 744 | label: '', | 675 | label: '', | 
| 745 | component: 'Input', | 676 | component: 'Input', | 
| 746 | componentProps: { | 677 | componentProps: { | 
| @@ -771,7 +702,7 @@ export const useActionDrawerSchema: FormSchema[] = [ | @@ -771,7 +702,7 @@ export const useActionDrawerSchema: FormSchema[] = [ | ||
| 771 | ifShow: ({ values }) => isScene(Reflect.get(values, 'outTarget')), | 702 | ifShow: ({ values }) => isScene(Reflect.get(values, 'outTarget')), | 
| 772 | }, | 703 | }, | 
| 773 | { | 704 | { | 
| 774 | - field: '', | 705 | + field: 'wu4', | 
| 775 | label: '', | 706 | label: '', | 
| 776 | component: 'Input', | 707 | component: 'Input', | 
| 777 | componentProps: { | 708 | componentProps: { | 
| @@ -71,6 +71,7 @@ | @@ -71,6 +71,7 @@ | ||
| 71 | isUpdate.value = !!data?.isUpdate; | 71 | isUpdate.value = !!data?.isUpdate; | 
| 72 | 72 | ||
| 73 | if (!unref(isUpdate)) { | 73 | if (!unref(isUpdate)) { | 
| 74 | + proxy.$refs.getTriggerChildData.clearGetPushValueDataEmpty(); | ||
| 74 | proxy.$refs.getTriggerChildData.clearSelectDevice(); | 75 | proxy.$refs.getTriggerChildData.clearSelectDevice(); | 
| 75 | proxy.$refs.getChildData.clearSelectDevice(); | 76 | proxy.$refs.getChildData.clearSelectDevice(); | 
| 76 | proxy.$refs.getConditionChildData.clearSelectDevice(); | 77 | proxy.$refs.getConditionChildData.clearSelectDevice(); | 
| @@ -144,7 +145,6 @@ | @@ -144,7 +145,6 @@ | ||
| 144 | } | 145 | } | 
| 145 | } else { | 146 | } else { | 
| 146 | await resetFields(); | 147 | await resetFields(); | 
| 147 | - proxy.$refs.getTriggerChildData.clearGetPushValueDataEmpty(); | ||
| 148 | } | 148 | } | 
| 149 | }); | 149 | }); | 
| 150 | const getTitle = computed(() => (!unref(isUpdate) ? '新增场景联动' : '编辑场景联动')); | 150 | const getTitle = computed(() => (!unref(isUpdate) ? '新增场景联动' : '编辑场景联动')); |