From 7d5d128b54bc5033af2ff82c6b571ba52fad9a51 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Thu, 5 Dec 2024 09:55:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/styles/element.scss | 2 +- .../resource/components/resourcePopup.vue | 6 +- .../machine/device/components/devicePopup.vue | 55 +++++++++---------- frontend/src/views/machine/device/index.vue | 8 +-- .../testSource/components/testSourcePopup.vue | 16 +++--- .../src/views/machine/testSource/index.vue | 4 +- 6 files changed, 45 insertions(+), 46 deletions(-) diff --git a/frontend/src/styles/element.scss b/frontend/src/styles/element.scss index ab4ce1e..1435e59 100644 --- a/frontend/src/styles/element.scss +++ b/frontend/src/styles/element.scss @@ -441,7 +441,7 @@ .dialog-small { .el-dialog__body { - max-height: 260px; + max-height: 320px; } } diff --git a/frontend/src/views/authority/resource/components/resourcePopup.vue b/frontend/src/views/authority/resource/components/resourcePopup.vue index 211082e..4f798ba 100644 --- a/frontend/src/views/authority/resource/components/resourcePopup.vue +++ b/frontend/src/views/authority/resource/components/resourcePopup.vue @@ -19,7 +19,7 @@ - + - + - + diff --git a/frontend/src/views/machine/device/components/devicePopup.vue b/frontend/src/views/machine/device/components/devicePopup.vue index e2f0cc0..00b8d48 100644 --- a/frontend/src/views/machine/device/components/devicePopup.vue +++ b/frontend/src/views/machine/device/components/devicePopup.vue @@ -148,18 +148,19 @@ - + + - + - + @@ -230,7 +231,7 @@ import MonitorTable from '@/views/machine/device/components/monitorTab.vue'; const MonIsShow = ref(false) const DevIsShow = ref(false) -const IsPasswordShow = ref(false) +// const IsPasswordShow = ref(false) const dictStore = useDictStore() const mode = ref() // 定义弹出组件元信息 @@ -258,7 +259,7 @@ const disabledDate = (time: Date) => { protocol: 'MMS', ip: '192.168.1.200', port: 102, - encryptionFlag: 1, + encryptionFlag: 0, reCheckNum:0, state: 1, }) @@ -284,7 +285,7 @@ const disabledDate = (time: Date) => { protocol: 'MMS', ip: '192.168.1.200', port: 102, - encryptionFlag: 1, + encryptionFlag: 0, reCheckNum:0, state: 1, } @@ -344,12 +345,10 @@ const disabledDate = (time: Date) => { try { dialogFormRef.value?.validate(async (valid: boolean) => { - if (formContent.value.encryptionFlag === 1) { - handleEncryptionChange(1) - } else { - handleEncryptionChange(0) + if (formContent.value.encryptionFlag === 0) { + formContent.value.series = '' + formContent.value.devKey = '' } - if (valid) { formContent.value.createDate = dayjs(formContent.value.createDate).format('YYYY-MM-DD'); if (formContent.value.arrivedDate) @@ -401,34 +400,34 @@ const open = (sign: string, data: Device.ResPqDev,currentMode: string) => { } if (data.encryptionFlag === 1) { - handleEncryptionChange(1) + //handleEncryptionChange(1) } else { - handleEncryptionChange(0) + //handleEncryptionChange(0) } if (data.id) { formContent.value = { ...data } } else { resetFormContent() - handleEncryptionChange(1) + //handleEncryptionChange(1) } // 重置表单 dialogFormRef.value?.resetFields() } - const handleEncryptionChange = (value: number) => { - // 根据是否加密来显示或隐藏识别码和密钥 - if(value === 1){ - IsPasswordShow.value = true - - }else - { - IsPasswordShow.value = false - // formContent.value.series = '' - // formContent.value.devKey = '' - // rules.value.series = []; - // rules.value.devKey = []; - } -} +// const handleEncryptionChange = (value: number) => { +// // 根据是否加密来显示或隐藏识别码和密钥 +// if(value === 1){ +// IsPasswordShow.value = true +// +// }else +// { +// IsPasswordShow.value = false +// // formContent.value.series = '' +// // formContent.value.devKey = '' +// // rules.value.series = []; +// // rules.value.devKey = []; +// } +// } // 对外映射 defineExpose({ open }) diff --git a/frontend/src/views/machine/device/index.vue b/frontend/src/views/machine/device/index.vue index b7d1db7..f18c3c1 100644 --- a/frontend/src/views/machine/device/index.vue +++ b/frontend/src/views/machine/device/index.vue @@ -69,19 +69,19 @@ const columns = reactive[]>([ prop: 'name', label: '设备名称', search: { el: 'input' }, - minWidth: 180, + minWidth: 200, }, { prop: 'devType', label: '设备类型', - minWidth: 180, + minWidth: 200, enum: dictStore.getDictData('Dev_Type'), fieldNames: { label: 'name', value: 'id' }, }, { prop: 'createDate', label: '生产日期', - minWidth: 180, + minWidth: 200, search: { span: 2, render: () => { @@ -120,7 +120,7 @@ const columns = reactive[]>([ enum: dictStore.getDictData('Dev_Manufacturers'), search: { el: 'select', props: { filterable: true }, order: 1 }, fieldNames: { label: 'name', value: 'id' }, - minWidth: 190, + minWidth: 200, }, { prop: 'operation', label: '操作', fixed: 'right', width: 200 }, ]) diff --git a/frontend/src/views/machine/testSource/components/testSourcePopup.vue b/frontend/src/views/machine/testSource/components/testSourcePopup.vue index 8cdc2b8..87b326a 100644 --- a/frontend/src/views/machine/testSource/components/testSourcePopup.vue +++ b/frontend/src/views/machine/testSource/components/testSourcePopup.vue @@ -3,13 +3,13 @@
+ + + + + - - - - - - + - - + + item.name=== modeStore.currentMode)?.code), fieldNames: { label: 'name', value: 'id' }, search: { el: 'select' }, @@ -75,7 +75,7 @@ }, { prop: 'type', - label: '源类型', + label: '检测源类型', enum: dictStore.getDictData('Pq_Source_Type'), fieldNames: { label: 'name', value: 'id' }, search: { el: 'select' },