From d53b9df52fc4729ea17a6c75887dfd2c8c786f16 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Mon, 28 Jul 2025 16:35:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=AE=A1=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../terminal/FrontManagement/index.vue | 25 +++++++- .../pqs/business/terminal/deviceter/index.vue | 4 ++ .../dictionary/list/popupDetailEdit.vue | 5 +- .../setting/dictionary/list/popupEdit.vue | 6 +- .../setting/dictionary/tree/popupForm.vue | 30 ++++++---- src/views/system/auth/menu/popupMenu.vue | 59 ++++++++++++------- src/views/system/auth/role/popupForm.vue | 17 +++--- src/views/system/auth/userList/index.vue | 5 ++ src/views/system/auth/userList/popupEdit.vue | 45 +++++++++----- src/views/system/modelManage/form.vue | 2 +- 10 files changed, 134 insertions(+), 64 deletions(-) diff --git a/src/views/pqs/business/terminal/FrontManagement/index.vue b/src/views/pqs/business/terminal/FrontManagement/index.vue index 7ed8607a..70516727 100644 --- a/src/views/pqs/business/terminal/FrontManagement/index.vue +++ b/src/views/pqs/business/terminal/FrontManagement/index.vue @@ -94,7 +94,7 @@ > - + @@ -332,14 +332,31 @@ const tableStore = new TableStore({ }) // 点击行 const currentChangeEvent = () => { + // 确保 tableRef 和当前记录存在 + if (!tableRef.value || !tableRef.value.getRef().getCurrentRecord()) { + loading.value = false; + dataSource.value = []; + return; + } + loading.value = true dataSource.value = [] nodeDeviceTree({ nodeId: tableRef.value.getRef().getCurrentRecord().id }).then(res => { - dataSource.value = res.data.processDeviceList.filter(item => (item.name = item.processNo + '')) + // 检查返回的数据是否存在且不为空 + if (res.data && res.data.processDeviceList) { + dataSource.value = res.data.processDeviceList.filter(item => (item.name = item.processNo + '')) + } else { + dataSource.value = [] + } + loading.value = false + }).catch(() => { + // 添加错误处理,确保 loading 状态也能关闭 + dataSource.value = [] loading.value = false }) + // const row = tableRef.value.getRef().getCurrentRecord() } const treeRef = ref() @@ -444,6 +461,10 @@ const resetForm = () => { } } +const handleInput = (val: string) => { + formData.value.name = val.replace(/\s+/g, '') +} + onMounted(() => { setTimeout(() => { tableStore.index() diff --git a/src/views/pqs/business/terminal/deviceter/index.vue b/src/views/pqs/business/terminal/deviceter/index.vue index fa09f901..e98ff05d 100644 --- a/src/views/pqs/business/terminal/deviceter/index.vue +++ b/src/views/pqs/business/terminal/deviceter/index.vue @@ -54,6 +54,7 @@ +
当前操作节点: @@ -2353,6 +2354,9 @@ const next = async () => { // 撤销 const black = () => { pageStatus.value = 1 + busBarIndex.value = '0' + deviceIndex.value = '0'; + lineIndex.value = '0'; } // 确认提交 const onsubmit = () => { diff --git a/src/views/setting/dictionary/list/popupDetailEdit.vue b/src/views/setting/dictionary/list/popupDetailEdit.vue index 118ef28c..0a9a8aa6 100644 --- a/src/views/setting/dictionary/list/popupDetailEdit.vue +++ b/src/views/setting/dictionary/list/popupDetailEdit.vue @@ -2,8 +2,8 @@ - - + + @@ -118,5 +118,6 @@ const submit = async () => { dialogVisible.value = false } + defineExpose({ open }) diff --git a/src/views/setting/dictionary/list/popupEdit.vue b/src/views/setting/dictionary/list/popupEdit.vue index 607c7eca..40ff7c13 100644 --- a/src/views/setting/dictionary/list/popupEdit.vue +++ b/src/views/setting/dictionary/list/popupEdit.vue @@ -3,7 +3,7 @@ - + @@ -112,5 +112,9 @@ const submit = async () => { }) } +const handleInput = (value: string) => { + form.name = value.replace(/[^\d]/g, '') +} + defineExpose({ open }) diff --git a/src/views/setting/dictionary/tree/popupForm.vue b/src/views/setting/dictionary/tree/popupForm.vue index 55c1e3c4..7750263c 100644 --- a/src/views/setting/dictionary/tree/popupForm.vue +++ b/src/views/setting/dictionary/tree/popupForm.vue @@ -1,9 +1,9 @@