From f5e5052489b3ebbbd53b2dcb9fff8d107d28a793 Mon Sep 17 00:00:00 2001
From: wjt <1797368093@qq.com>
Date: 星期四, 20 六月 2024 09:04:20 +0800
Subject: [PATCH] 修改部分按钮

---
 src/views/infomanger/banner/index.vue |    7 +++++++
 src/views/system/config/index.vue     |    2 +-
 src/views/system/menu/index.vue       |    4 ++--
 src/views/system/role/index.vue       |    6 +++---
 src/views/system/user/index.vue       |   12 ++++++------
 src/views/monitor/job/index.vue       |    6 +++---
 src/views/system/dept/index.vue       |    2 +-
 src/views/system/post/index.vue       |    2 +-
 src/views/system/dictManger/index.vue |    2 +-
 src/views/monitor/online/index.vue    |    2 +-
 src/views/system/notice/index.vue     |    2 +-
 src/views/system/dict/index.vue       |    2 +-
 12 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/src/views/infomanger/banner/index.vue b/src/views/infomanger/banner/index.vue
index a094cc4..fe055a4 100644
--- a/src/views/infomanger/banner/index.vue
+++ b/src/views/infomanger/banner/index.vue
@@ -163,6 +163,13 @@
 function answerListField(rule: { field: string | number }, value: any, callback: any) {
   if(form.value.questionList[rule.field].answerList.length < 2) {
     callback(new Error('璇疯嚦灏戞坊鍔犱袱椤�'))
+  } else if(form.value.questionList[rule.field].answerList) {
+    const value = form.value.questionList[rule.field].answerList.every(item => item.answerName)
+    if(!value) {
+      callback(new Error('璇峰畬鍠勯�夐」鍐呭'))
+    } else {
+      callback()
+    }
   } else {
     callback()
   }
diff --git a/src/views/monitor/job/index.vue b/src/views/monitor/job/index.vue
index 519760d..893864d 100644
--- a/src/views/monitor/job/index.vue
+++ b/src/views/monitor/job/index.vue
@@ -111,16 +111,16 @@
          <el-table-column label="鎿嶄綔" align="center" width="200" class-name="small-padding fixed-width">
             <template #default="scope">
                <el-tooltip content="淇敼" placement="top">
-                  <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['monitor:job:edit']"></el-button>
+                  <el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['monitor:job:edit']"></el-button>
                </el-tooltip>
                <el-tooltip content="鍒犻櫎" placement="top">
-                  <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['monitor:job:remove']"></el-button>
+                  <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['monitor:job:remove']"></el-button>
                </el-tooltip>
                <el-tooltip content="鎵ц涓�娆�" placement="top">
                   <el-button link type="primary" icon="CaretRight" @click="handleRun(scope.row)" v-hasPermi="['monitor:job:changeStatus']"></el-button>
                </el-tooltip>
                <el-tooltip content="浠诲姟璇︾粏" placement="top">
-                  <el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['monitor:job:query']"></el-button>
+                  <el-button link type="info" icon="View" @click="handleView(scope.row)" v-hasPermi="['monitor:job:query']"></el-button>
                </el-tooltip>
                <el-tooltip content="璋冨害鏃ュ織" placement="top">
                   <el-button link type="primary" icon="Operation" @click="handleJobLog(scope.row)" v-hasPermi="['monitor:job:query']"></el-button>
diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue
index 88d092c..bfb7082 100644
--- a/src/views/monitor/online/index.vue
+++ b/src/views/monitor/online/index.vue
@@ -32,7 +32,7 @@
       </el-table-column>
       <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
         <template #default="scope">
-          <el-button link type="primary" icon="Delete" @click="handleForceLogout(scope.row)" v-hasPermi="['monitor:online:forceLogout']">寮洪��</el-button>
+          <el-button link type="danger" icon="Delete" @click="handleForceLogout(scope.row)" v-hasPermi="['monitor:online:forceLogout']">寮洪��</el-button>
         </template>
       </el-table-column>
     </el-table>
diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue
index c3a0fbc..893f0b1 100644
--- a/src/views/system/config/index.vue
+++ b/src/views/system/config/index.vue
@@ -116,7 +116,7 @@
          <el-table-column label="鎿嶄綔" align="center" width="150" class-name="small-padding fixed-width">
             <template #default="scope">
                <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:config:edit']" >淇敼</el-button>
-               <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:config:remove']">鍒犻櫎</el-button>
+               <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:config:remove']">鍒犻櫎</el-button>
             </template>
          </el-table-column>
       </el-table>
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 03cb026..3b794ae 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -56,7 +56,7 @@
       </el-table-column>
       <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="240">
         <template #default="scope">
-          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dept:edit']">淇敼</el-button>
+          <el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dept:edit']">淇敼</el-button>
           <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['system:dept:add']">鏂板</el-button>
           <el-button v-if="scope.row.parentId != 0" link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dept:remove']"
             >鍒犻櫎</el-button
diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue
index 0009ab8..e3ac031 100644
--- a/src/views/system/dict/index.vue
+++ b/src/views/system/dict/index.vue
@@ -131,7 +131,7 @@
          <el-table-column label="鎿嶄綔" align="center" width="160" class-name="small-padding fixed-width">
             <template #default="scope">
                <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dict:edit']">淇敼</el-button>
-               <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dict:remove']">鍒犻櫎</el-button>
+               <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dict:remove']">鍒犻櫎</el-button>
             </template>
          </el-table-column>
       </el-table>
diff --git a/src/views/system/dictManger/index.vue b/src/views/system/dictManger/index.vue
index 19fc6b9..c966a47 100644
--- a/src/views/system/dictManger/index.vue
+++ b/src/views/system/dictManger/index.vue
@@ -126,7 +126,7 @@
          <el-table-column label="鎿嶄綔" align="center" width="160" class-name="small-padding fixed-width">
             <template #default="scope">
                <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dict:edit']">淇敼</el-button>
-               <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dict:remove']">鍒犻櫎</el-button>
+               <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dict:remove']">鍒犻櫎</el-button>
             </template>
          </el-table-column>
       </el-table>
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index c3f55a4..0d4d54d 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -76,9 +76,9 @@
          </el-table-column>
          <el-table-column label="鎿嶄綔" align="center" width="210" class-name="small-padding fixed-width">
             <template #default="scope">
-               <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:menu:edit']">淇敼</el-button>
+               <el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:menu:edit']">淇敼</el-button>
                <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['system:menu:add']">鏂板</el-button>
-               <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:menu:remove']">鍒犻櫎</el-button>
+               <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:menu:remove']">鍒犻櫎</el-button>
             </template>
          </el-table-column>
       </el-table>
diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index 35e15c1..663ec77 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -96,7 +96,7 @@
          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
             <template #default="scope">
                <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:notice:edit']">淇敼</el-button>
-               <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']" >鍒犻櫎</el-button>
+               <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']" >鍒犻櫎</el-button>
             </template>
          </el-table-column>
       </el-table>
diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue
index aee6034..cde053a 100644
--- a/src/views/system/post/index.vue
+++ b/src/views/system/post/index.vue
@@ -96,7 +96,7 @@
          <el-table-column label="鎿嶄綔" width="180" align="center" class-name="small-padding fixed-width">
             <template #default="scope">
                <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:post:edit']">淇敼</el-button>
-               <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:post:remove']">鍒犻櫎</el-button>
+               <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:post:remove']">鍒犻櫎</el-button>
             </template>
          </el-table-column>
       </el-table>
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index e446ded..59cf42e 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -116,13 +116,13 @@
          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
             <template #default="scope">
               <el-tooltip content="淇敼" placement="top" v-if="scope.row.roleId !== 1">
-                <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:role:edit']"></el-button>
+                <el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:role:edit']"></el-button>
               </el-tooltip>
               <el-tooltip content="鍒犻櫎" placement="top" v-if="scope.row.roleId !== 1">
-                <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']"></el-button>
+                <el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']"></el-button>
               </el-tooltip>
               <el-tooltip content="鏁版嵁鏉冮檺" placement="top" v-if="scope.row.roleId !== 1">
-                <el-button link type="primary" icon="CircleCheck" @click="handleDataScope(scope.row)" v-hasPermi="['system:role:edit']"></el-button>
+                <el-button link type="info" icon="CircleCheck" @click="handleDataScope(scope.row)" v-hasPermi="['system:role:edit']"></el-button>
               </el-tooltip>
               <el-tooltip content="鍒嗛厤鐢ㄦ埛" placement="top" v-if="scope.row.roleId !== 1">
                 <el-button link type="primary" icon="User" @click="handleAuthUser(scope.row)" v-hasPermi="['system:role:edit']"></el-button>
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 84661a4..e4668bb 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -92,16 +92,16 @@
                 <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']"></el-button>
               </el-tooltip>
               <el-tooltip content="鍒犻櫎" placement="top" v-if="scope.row.userId !== 1">
-                <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']"></el-button>
+                <el-button link type="error" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']"></el-button>
               </el-tooltip>
               <el-tooltip content="閲嶇疆瀵嗙爜" placement="top" v-if="scope.row.userId !== 1">
-                <el-button link type="primary" icon="Key" @click="handleResetPwd(scope.row)" v-hasPermi="['system:user:resetPwd']"></el-button>
+                <el-button link type="danger" icon="Key" @click="handleResetPwd(scope.row)" v-hasPermi="['system:user:resetPwd']"></el-button>
               </el-tooltip>
               <el-tooltip content="鍒嗛厤瑙掕壊" placement="top" v-if="scope.row.userId !== 1">
-                <el-button link type="primary" icon="CircleCheck" @click="handleAuthRole(scope.row)" v-hasPermi="['system:user:edit']"></el-button>
+                <el-button link type="success" icon="CircleCheck" @click="handleAuthRole(scope.row)" v-hasPermi="['system:user:edit']"></el-button>
               </el-tooltip>
               <el-tooltip content="閲嶇疆鏀粯瀵嗙爜" placement="top" v-if="scope.row.userId !== 1">
-                <el-button link type="primary" icon="Key" @click="handlePayPwd(scope.row)" v-hasPermi="['system:user:resetPwd']"></el-button>
+                <el-button link type="danger" icon="Key" @click="handlePayPwd(scope.row)" v-hasPermi="['system:user:resetPwd']"></el-button>
               </el-tooltip>
             </template>
           </el-table-column>
@@ -240,7 +240,7 @@
 
 <script setup name="User">
 import { getToken } from "@/utils/auth";
-import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser, addUser, deptTreeSelect, resetPayPwd } from "@/api/system/user";
+import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser, addUser, deptTreeSelect, resetPayPwd,updateUserProfile } from "@/api/system/user";
 
 const router = useRouter();
 const { proxy } = getCurrentInstance();
@@ -549,7 +549,7 @@
   proxy.$refs["userRef"].validate((valid) => {
     if (valid) {
       if (form.value.userId != undefined) {
-        updateUser(form.value).then((response) => {
+        updateUserProfile(form.value).then((response) => {
           proxy.$modal.msgSuccess("淇敼鎴愬姛");
           open.value = false;
           getList();

--
Gitblit v1.9.1