From 77737f4e73f7267170b9b06fc73d1610c29c0661 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期二, 12 十一月 2024 13:18:35 +0800
Subject: [PATCH] 新增

---
 src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue |   58 ++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 36 insertions(+), 22 deletions(-)

diff --git a/src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue b/src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue
index 50bcae1..e036b00 100644
--- a/src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue
+++ b/src/views/newSpecialWorkSystem/workTicket/wdsq/index.vue
@@ -376,6 +376,7 @@
         getListByPage();
         getAllDepartment()
         spWorker()
+        getOpList()
         getAll()
         getAllDevice()
         getAllRisks()
@@ -384,47 +385,37 @@
 
         const openEdit = (row)=>{
           if(row.workType == 1){
-            fireRef.value.openDialog(row)
+            fireRef.value.openDialog(row,'edit')
           }
           if(row.workType == 2){
-            spaceRef.value.openDialog(row)
+            spaceRef.value.openDialog(row,'edit')
           }
           if(row.workType == 3){
-            hoistRef.value.openDialog(row)
+            hoistRef.value.openDialog(row,'edit')
           }
           if(row.workType == 4){
-            groundRef.value.openDialog(row)
+            groundRef.value.openDialog(row,'edit')
           }
           if(row.workType == 5){
-            brokenRef.value.openDialog(row)
+            brokenRef.value.openDialog(row,'edit')
           }
           if(row.workType == 6){
-            heightRef.value.openDialog(row)
+            heightRef.value.openDialog(row,'edit')
           }
           if(row.workType == 7){
-            powerRef.value.openDialog(row)
+            powerRef.value.openDialog(row,'edit')
           }
           if(row.workType == 8){
-            plateRef.value.openDialog(row)
+            plateRef.value.openDialog(row,'edit')
           }
           if(row.workType == 9){
-            openRef.value.openDialog(row)
+            openRef.value.openDialog(row,'edit')
           }
         }
 
       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 == '18'){
             if (res.data.code === '200') {
               state.lists.spList.jhList = JSON.parse(JSON.stringify(res.data.data))
@@ -445,6 +436,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
+          })
         }
       }
 
@@ -520,7 +534,7 @@
                 state.departmentList = JSON.parse(JSON.stringify(res.data.data))
                 recursion(state.departmentList);
                 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)
+                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',
@@ -529,7 +543,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.lists.otherWorks = JSON.parse(JSON.stringify(res.data.data))
           } else {

--
Gitblit v1.9.2