From 1b9fea7d4af68d8f933b2dc42bf6084b9646f64c Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期二, 04 三月 2025 08:39:55 +0800
Subject: [PATCH] 修改作业等级名称

---
 src/views/newSpecialWorkSystem/workTicket/zysq/index.vue |   50 ++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/src/views/newSpecialWorkSystem/workTicket/zysq/index.vue b/src/views/newSpecialWorkSystem/workTicket/zysq/index.vue
index 19a277c..bdd495a 100644
--- a/src/views/newSpecialWorkSystem/workTicket/zysq/index.vue
+++ b/src/views/newSpecialWorkSystem/workTicket/zysq/index.vue
@@ -94,7 +94,6 @@
         lists: {
           workerList: [],
           departList: [],
-          departList2: [],
           deviceList: [],
           otherWorks: [],
           spList: [],
@@ -150,6 +149,7 @@
         getAllDevice()
         getOtherWork()
         spWorker()
+        getOpList()
         getAllRisks()
       });
 
@@ -168,18 +168,18 @@
 			};
 
       const spWorker = async ()=>{
-        for(let id of ['17','18','19']){
+        for(let id of ['18','19']){
           const res = await workApplyApi().getSpList({roleId: id})
-          if(id == '17'){
-            if (res.data.code === '200') {
-              state.lists.spList.opList = JSON.parse(JSON.stringify(res.data.data))
-            } else {
-              ElMessage({
-                type: 'warning',
-                message: res.data.msg
-              });
-            }
-          }
+          // if(id == '17'){
+          //   if (res.data.code === '200') {
+          //     state.lists.spList.opList = JSON.parse(JSON.stringify(res.data.data))
+          //   } else {
+          //     ElMessage({
+          //       type: 'warning',
+          //       message: res.data.msg
+          //     });
+          //   }
+          // }
           if(id == '18'){
             if (res.data.code === '200') {
               state.lists.spList.jhList = JSON.parse(JSON.stringify(res.data.data))
@@ -203,6 +203,29 @@
         }
       }
 
+      const getOpList = async()=>{
+        const res = await workApplyApi().getOpList()
+        if(res.data.code == '200'){
+          if(res.data.data && res.data.data.length>0){
+            state.lists.spList.opList = JSON.parse(JSON.stringify(res.data.data)).map(i=>{
+              if(i.certList && i.certList.length>0){
+                i.certList = i.certList.map(item=>{
+                  item['realName'] = i.realName + '(' + item.certTypeName +':'+ item.certExpiredAt + ')'
+                  item['uid'] = item.certNo + ',' + item.certExpiredAt
+                  return item
+                })
+              }
+              return i
+            })
+          }
+        }else{
+          ElMessage({
+            type: 'warning',
+            message: res.data.msg
+          })
+        }
+      }
+
 			// 获取部门列表
 			const getAllDepartment = async () => {
 				let res = await teamManageApi().getAllDepartment();
@@ -210,7 +233,6 @@
 					// state.departmentList = JSON.parse(JSON.stringify(res.data.data))
           // state.departmentList2 = state.departmentList[0].children[0].children.filter(i=>i.depId == 32 || i.depId == 48 || i.depId == 49 || i.depId == 50)
           state.lists.departList = JSON.parse(JSON.stringify(res.data.data))
-          state.lists.departList2 = JSON.parse(JSON.stringify(res.data.data))[0].children[0].children.filter(i=>i.depId == 32 || i.depId == 48 || i.depId == 49 || i.depId == 50 || i.depId == 10 || i.depId == 41 || i.depId == 46 || i.depId == 47)
 				} else {
 					ElMessage({
 						type: 'warning',
@@ -221,7 +243,7 @@
 
       // 获取相关作业列表
       const getOtherWork = async () => {
-        let res = await workApplyApi().getOtherWork({workPermitNo: '',workType: null});
+        let res = await workApplyApi().getOtherWork({pageSize: 999, pageIndex: 1, searchParams: {workPermitNo: '', workType: null}})
         if (res.data.code === '200') {
           state.otherWorks = JSON.parse(JSON.stringify(res.data.data))
           state.lists.otherWorks = JSON.parse(JSON.stringify(res.data.data))

--
Gitblit v1.9.2