From 01b9e7244825cac11146e3961cafa6525dad56f1 Mon Sep 17 00:00:00 2001
From: web <candymxq888@outlook.com>
Date: 星期五, 25 四月 2025 17:24:33 +0800
Subject: [PATCH] fix:水温监控添加定时器

---
 src/views/system/dict/index.vue |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue
index 81625f0..08ac732 100644
--- a/src/views/system/dict/index.vue
+++ b/src/views/system/dict/index.vue
@@ -2,6 +2,7 @@
 import {sysDictType, sysDictData} from "@/api/system/dict";
 import {onMounted} from "vue";
 import setPostParams from "@/utils/searchParams.js";
+import {ElMessage} from "element-plus";
 
 const {proxy} = getCurrentInstance();
 
@@ -145,11 +146,12 @@
 
 /** 删除按钮操作 */
 function handleDelete(row) {
-    proxy.$modal.confirm('确认删除"' + row.dictName + '?')
-        .then(async () => {
-            console.log("无删除功能");
-        }).catch(() => {
-    });
+    proxy.$modal.confirm('确认删除"' + row.dictName + '?').then(() => {
+        sysDictType().remove(row.id).then(() => {
+            ElMessage.success('删除成功')
+            getList()
+        })
+    })
 }
 
 /** 关闭弹窗 */
@@ -342,7 +344,7 @@
                 :key="index"
                 align="center"
             ></el-table-column>
-            <el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                 <template #default="scope">
                     <el-button link type="primary" icon="Edit" @click="handleDetail(scope.row)">查看字典数据</el-button>
                     <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
@@ -405,7 +407,7 @@
 
                 >
                 </el-table-column>
-                <el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
+                <el-table-column label="操作" width="auto" align="center" class-name="small-padding fixed-width">
                     <template #default="scope">
                         <el-button link :type="dataForm.dictValue == scope.row.dictValue ? 'warning' : 'primary'"
                                    icon="Edit" @click="handleUpdateData(scope.row)">修改
@@ -416,7 +418,7 @@
                 </el-table-column>
             </el-table>
             <el-form title="添加数据" v-show="isHandle" class="dataForm-box" ref="postDataRef" :rules="dataRules"
-                     :model="dataForm" inline label-width="100px">
+                     :model="dataForm" inline label-width="6.25rem">
                 <el-form-item prop="dictType">
                     <span>{{ dataForm.dictType }}</span>
                 </el-form-item>

--
Gitblit v1.9.3