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

---
 src/views/specialWorkSystem/specialIndex/index.vue |  499 +++++++++++++++++++++++++++++--------------------------
 1 files changed, 262 insertions(+), 237 deletions(-)

diff --git a/src/views/specialWorkSystem/specialIndex/index.vue b/src/views/specialWorkSystem/specialIndex/index.vue
index 08ce261..cb681d5 100644
--- a/src/views/specialWorkSystem/specialIndex/index.vue
+++ b/src/views/specialWorkSystem/specialIndex/index.vue
@@ -15,24 +15,6 @@
       </el-button>
     </div>
     <div class="topChart">
-<!--      <div class="chart-item">-->
-<!--        <dv-border-box10 v-if="isFull==true" class="item-bg"></dv-border-box10>-->
-<!--        <div class="chart-tit">-->
-<!--          <span class="tit">各事业部关联作业分析</span>-->
-<!--          <div class="filter-part">-->
-<!--            <el-cascader :teleported="false" v-model="chartSearch2.depId" @change="changeDep2()" :options="departmentList" :props="casProps" :show-all-levels="false" size="small"/>-->
-<!--            <el-select v-model="chartSearch2.type" size="small" :teleported="false" @change="changeType2()">-->
-<!--              <el-option-->
-<!--                  v-for="item in workType1"-->
-<!--                  :key="item.id"-->
-<!--                  :label="item.name"-->
-<!--                  :value="item.id"-->
-<!--              />-->
-<!--            </el-select>-->
-<!--          </div>-->
-<!--        </div>-->
-<!--        <div class="chart" :id="slfx"></div>-->
-<!--      </div>-->
       <div class="chart-item">
         <dv-border-box10 v-if="isFull==true" class="item-bg"></dv-border-box10>
         <div class="chart-tit">
@@ -60,48 +42,7 @@
         </el-radio-group>
       </div>
     </div>
-<!--    <div class="topChart">-->
-<!--      <div class="chart-item">-->
-<!--        <dv-border-box10 v-if="isFull==true" class="item-bg"></dv-border-box10>-->
-<!--        <div class="chart-tit">-->
-<!--          <span class="tit">关联作业趋势图</span>-->
-<!--          <div class="filter-part filter-part2">-->
-<!--            <el-cascader :teleported="false" v-model="chartSearch3.depId" @change="changeDep3()" :options="departmentList" :props="casProps" :show-all-levels="false" size="small"/>-->
-<!--          </div>-->
-<!--        </div>-->
-<!--        <div class="chart" :id="zyqs"></div>-->
-<!--      </div>-->
-<!--      <div class="chart-item">-->
-<!--        <dv-border-box10 v-if="isFull==true" class="item-bg"></dv-border-box10>-->
-<!--        <div class="chart-tit">-->
-<!--          <span class="tit">作业警报记录</span>-->
-<!--          <div class="filter-part">-->
-<!--            <el-select :teleported="false" v-model="chartSearch4.days" size="small" @change="(value)=>changeTime4(value)">-->
-<!--              <el-option label="近7天" :value="7"/>-->
-<!--              <el-option label="近30天" :value="30"/>-->
-<!--              <el-option label="近90天" :value="90"/>-->
-<!--              <el-option label="近1年" :value="365"/>-->
-<!--            </el-select>-->
-<!--            <el-select :teleported="false" v-model="chartSearch4.workType" size="small" @change="changeType4()">-->
-<!--              <el-option-->
-<!--                  v-for="item in workType1"-->
-<!--                  :key="item.id"-->
-<!--                  :label="item.name"-->
-<!--                  :value="item.id"-->
-<!--              />-->
-<!--            </el-select>-->
-<!--          </div>-->
-<!--        </div>-->
-<!--        <div class="chart">-->
-<!--          <el-table ref="multipleTableRef" :data="warningData" style="width: 100%" stripe border :header-cell-style="{ background: '#fafafa' }">-->
-<!--            <el-table-column property="operatorUname" label="姓名" align="center"/>-->
-<!--            <el-table-column property="deptName" label="所属部门" align="center"/>-->
-<!--            <el-table-column property="warningCount" label="异常报警次数" align="center"/>-->
-<!--          </el-table>-->
-<!--        </div>-->
-<!--      </div>-->
-<!--    </div>-->
-    <div>
+
       <div class="homeCard">
         <dv-border-box10 v-if="isFull==true" class="item-bg"></dv-border-box10>
         <el-row>
@@ -157,16 +98,16 @@
             <span style="white-space: nowrap">作业票编号:</span>
             <div class="grid-content topInfo">
               <el-input
-                  v-model="searchParams.workPermitNo"
+                  v-model.trim="searchParams.workPermitNo"
                   placeholder="请输入作业票编号"
                   size="small"
               />
             </div>
           </el-col>
           <el-col :span="4" style="display:flex;align-items: center">
-            <span style="white-space: nowrap">申请单位:</span>
+            <span style="white-space: nowrap">申请事业部:</span>
             <div class="grid-content topInfo">
-              <el-cascader :teleported="false" v-model="searchParams.applyDepId" @change="changeDep4()" :options="departmentList" :props="casProps" :show-all-levels="false" size="small"/>
+              <el-cascader :teleported="false" v-model="searchParams.seDepId" @change="changeDep4()" :options="depList" :props="casProps" :show-all-levels="false" size="small"/>
             </div>
           </el-col>
           <el-button type="primary" style="margin-left: 20px" @click="searchRecord" size="small">查询</el-button>
@@ -253,11 +194,11 @@
             </el-table-column>
             <el-table-column property="workTypeDesc" label="作业类型" align="center"/>
             <el-table-column property="workLevelDesc" label="作业等级" align="center"/>
-            <el-table-column property="abortReason" label="中止原因" align="center">
-              <template #default="scope">
-                <span>{{scope.row.abortReason?scope.row.abortReason:'--'}}</span>
-              </template>
-            </el-table-column>
+<!--            <el-table-column property="abortReason" label="中止原因" align="center">-->
+<!--              <template #default="scope">-->
+<!--                <span>{{scope.row.abortReason?scope.row.abortReason:'&#45;&#45;'}}</span>-->
+<!--              </template>-->
+<!--            </el-table-column>-->
             <el-table-column property="workAllStatusDesc" label="作业状态" align="center"/>
             <el-table-column fixed="right" label="操作" align="center" width="250">
               <template #default="scope">
@@ -265,6 +206,7 @@
                  v-if="scope.row.workAllStatus == -1|| scope.row.workAllStatus == 1 || scope.row.workAllStatus == 3 || scope.row.workAllStatus == 7"
                   type="primary" size="small" :icon="VideoPlay" @click="openVideo(scope.row)">查看监控视频</el-button>
                 <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row.workApplyId)">查看记录</el-button>
+                <el-button v-if="(scope.row.workAllStatus == 3 || scope.row.workAllStatus == 4 || scope.row.workAllStatus == 5)&&!scope.row.renewalWorkApplyId" link type="primary" size="small" :icon="Edit" @click="continueRecord(scope.row)">一键续票</el-button>
                 <el-button link type="primary" size="small" :icon="View" @click="viewTicket(scope.row)">查看作业票</el-button>
                 <el-button link type="primary" size="small" :icon="Download" @click="downLoadTicket(scope.row)">导出作业票</el-button>
 <!--                <el-button link type="primary" size="small" :icon="FolderChecked" @click="handleReview(scope.row)">验收</el-button>-->
@@ -276,7 +218,6 @@
           </div>
         </div>
       </div>
-    </div>
     <el-dialog v-model="dialogDetails" title="作业申请详情" center>
 <!--      <fire v-if="dialogType == 1" :details = details></fire>-->
 <!--      <space v-else-if="dialogType == 2" :details = details></space>-->
@@ -314,11 +255,20 @@
 <!--    </el-dialog>-->
     <video-detail ref="videoRef"></video-detail>
     <Work-record ref="recordRef"></Work-record>
+    <fire-dialog ref="fireRef" :lists="lists" @refresh="getMydepList"></fire-dialog>
+    <plate-dialog ref="plateRef" :lists="lists" @refresh="getMydepList"></plate-dialog>
+    <space-dialog ref="spaceRef" :lists="lists" @refresh="getMydepList"></space-dialog>
+    <hoist-dialog ref="hoistRef" :lists="lists" @refresh="getMydepList"></hoist-dialog>
+    <ground-dialog ref="groundRef" :lists="lists" @refresh="getMydepList"></ground-dialog>
+    <broken-dialog ref="brokenRef" :lists="lists" @refresh="getMydepList"></broken-dialog>
+    <height-dialog ref="heightRef" :lists="lists" @refresh="getMydepList"></height-dialog>
+    <power-dialog ref="powerRef" :lists="lists" @refresh="getMydepList"></power-dialog>
+    <open-dialog ref="openRef" :lists="lists" @refresh="getMydepList"></open-dialog>
   </div>
 </template>
 
 <script lang="ts">
-import {toRefs, reactive, defineComponent, ref, onMounted, defineAsyncComponent} from 'vue';
+import {toRefs, reactive, defineComponent, ref, onMounted, defineAsyncComponent, nextTick} from 'vue';
 import { storeToRefs } from 'pinia';
 import { initBackEndControlRoutes } from '/@/router/backEnd';
 import { useUserInfo } from '/@/stores/userInfo';
@@ -338,6 +288,8 @@
 import WorkRecord from "/@/views/specialWorkSystem/specialIndex/components/workRecord.vue";
 import { BorderBox10 as DvBorderBox10 } from '@kjgl77/datav-vue3'
 import {productionDeviceApi} from "/@/api/doublePreventSystem/productionDevice";
+import {ElMessageBox} from "element-plus/es";
+import {judgeReportApi} from "/@/api/dataUpload/saftyBaseInfo/judgeReport";
 
 // 定义接口来定义对象的类型
 interface stateType {
@@ -366,6 +318,7 @@
   workType1: Array<type>;
   dialogType: number | null;
   departmentList: Array<any>;
+  depList: Array<any>;
   departmentRecursionList: Array<DepartmentState>;
   reviewForm: object;
   reviewRules: object;
@@ -375,6 +328,7 @@
   endTime:string
   pieData: Array<status>
   squareData: Array<status>
+  lists: {}
 }
 interface type {
   id: number | null;
@@ -398,14 +352,15 @@
   components: {
     VideoDetail,
     WorkRecord,
-    // fire: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/fireLog.vue')),
-    // space: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/spaceLog.vue')),
-    // hoist: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/hoistLog.vue')),
-    // ground: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/groundLog.vue')),
-    // broken: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/brokenLog.vue')),
-    // height: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/heightLog.vue')),
-    // power: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/powerLog.vue')),
-    // plate: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/plateLog.vue'))
+    fireDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/fireDialog.vue')),
+    plateDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/plateDialog.vue')),
+    spaceDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/spaceDialog.vue')),
+    hoistDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/hoistDialog.vue')),
+    groundDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/groundDialog.vue')),
+    brokenDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/brokenDialog.vue')),
+    heightDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/heightDialog.vue')),
+    powerDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/powerDialog.vue')),
+    openDialog: defineAsyncComponent(() => import('/@/views/newSpecialWorkSystem/workTicket/wdsq/components/openDialog.vue'))
   },
   setup() {
     const userInfo = useUserInfo()
@@ -429,10 +384,11 @@
         startTime: '',
         endTime: '',
         workAllStatus: null,
-        applyDepId: null
+        seDepId: null
       },
       dialogReview: false,
       departmentList: [],
+      depList: [],
       departmentRecursionList: [],
       searchStatus: null,
       endTime: '',
@@ -503,12 +459,40 @@
           value: -1
         },
         {
-          name: '开始',
+          name: '作业中(监护中)',
           value: 1
         },
         {
-          name: '结束',
-          value: 2
+          name: '待验收',
+          value: 3
+        },
+        {
+          name: '验收不合格',
+          value: 4
+        },
+        {
+          name: '已验收',
+          value: 5
+        },
+        {
+          name: '作业前气体分析不合格',
+          value: 6
+        },
+        {
+          name: '审批未通过',
+          value: 7
+        },
+        {
+          name: '作业中止',
+          value: 8
+        },
+        {
+          name: '取消',
+          value: 15
+        },
+        {
+          name: '废止',
+          value: 16
         }
       ],
       pieData: [],
@@ -519,7 +503,16 @@
       },
       reviewRules:{
         advice: [{ required: true, message: '请填写验收意见', trigger: 'blur' }]
-      }
+      },
+      lists: {
+        workerList: [],
+        departList: [],
+        departList2: [],
+        deviceList: [],
+        otherWorks: [],
+        spList: [],
+        riskList: []
+      },
     });
     // 页面载入时执行方法
     onMounted(() => {
@@ -527,10 +520,24 @@
       getMydepList()
       getAllDepartment();
       getTypePie()
-      getWorkDep()
       getDepMonth()
       getWarningList()
+      spWorker()
+      getOpList()
+      getAll()
+      getAllDevice()
+      getAllRisks()
+      getOtherWork()
     });
+    const fireRef = ref()
+    const plateRef = ref()
+    const spaceRef = ref()
+    const hoistRef = ref()
+    const groundRef = ref()
+    const brokenRef = ref()
+    const heightRef = ref()
+    const powerRef = ref()
+    const openRef = ref()
     const initTime =()=>{
       state.chartSearch1.startTime = getPeriod(30)
       state.chartSearch2.startTime = getPeriod(30)
@@ -562,15 +569,6 @@
       getTypePie()
     }
 
-    const changeDep2=()=>{
-      getWorkDep()
-    }
-    const changeType2=()=>{
-      getWorkDep()
-    }
-    const changeType4=()=>{
-      getWarningList()
-    }
     const changeDep3=()=>{
       getDepMonth()
     }
@@ -594,14 +592,45 @@
       getMydepList()
       getAllDepartment();
       getTypePie()
-      getWorkDep()
       getDepMonth()
     }
+
+    const continueRecord = (row)=>{
+      if(row.workType == 1){
+        fireRef.value.openDialog(row,'continue')
+      }
+      if(row.workType == 2){
+        spaceRef.value.openDialog(row,'continue')
+      }
+      if(row.workType == 3){
+        hoistRef.value.openDialog(row,'continue')
+      }
+      if(row.workType == 4){
+        groundRef.value.openDialog(row,'continue')
+      }
+      if(row.workType == 5){
+        brokenRef.value.openDialog(row,'continue')
+      }
+      if(row.workType == 6){
+        heightRef.value.openDialog(row,'continue')
+      }
+      if(row.workType == 7){
+        powerRef.value.openDialog(row,'continue')
+      }
+      if(row.workType == 8){
+        plateRef.value.openDialog(row,'continue')
+      }
+      if(row.workType == 9){
+        openRef.value.openDialog(row,'continue')
+      }
+    }
+
     const getTypePie = async ()=>{
       const data = {
         startTime: state.chartSearch1.startTime,
         endTime:state.endTime,
-        depId:state.chartSearch1.depId
+        depId:state.chartSearch1.depId,
+        type: null
       }
       let res = await specialIndexApi().analyseType(data);
       if (res.data.code === '200') {
@@ -615,26 +644,7 @@
         });
       }
     }
-    const getWorkDep = async ()=>{
-      const data = {
-        // startTime: state.chartSearch2.startTime,
-        // endTime: state.endTime,
-        depId:state.chartSearch2.depId,
-        type: state.chartSearch2.type
-      }
-      let res = await specialIndexApi().analyseAllWork(data);
-      if (res.data.code === '200') {
-        state.squareData = JSON.parse(JSON.stringify(res.data.data))
-        let names = state.squareData.map(i=>i.name)
-        let vals = state.squareData.map(i=>i.value)
-        initSlfx(names,vals)
-      } else {
-        ElMessage({
-          type: 'warning',
-          message: res.data.msg
-        });
-      }
-    }
+
     const getDepMonth = async ()=>{
       let res = await specialIndexApi().analyseDepMonth(state.chartSearch3.depId);
       if (res.data.code === '200') {
@@ -672,6 +682,7 @@
     }
     const getWarningList = async()=>{
       const data = {
+
         startTime: state.chartSearch4.startTime,
         endTime: state.endTime,
         workType:state.chartSearch4.workType
@@ -687,6 +698,7 @@
       }
     }
     type EChartsOption = echarts.EChartsOption
+
     const initZyfb =()=>{
       let dom = document.getElementById(zyfb.value);
       let myChart = echarts.init(dom);
@@ -741,7 +753,12 @@
                 shadowColor: 'rgba(0, 0, 0, 0.5)'
               },
             },
-            data: state.pieData
+            data: state.pieData.map(i=>{
+              return {
+                name: i.workTypeDesc,
+                value: i.count
+              }
+            }).filter(i=>i.name !== '未知')
           }
         ]
       }
@@ -751,55 +768,7 @@
         myChart.resize();
       });
     }
-    const initSlfx =(names:Array<string>,vals:Array<any>)=>{
-      let dom = document.getElementById(slfx.value);
-      let myChart = echarts.init(dom);
-      let option: EChartsOption;
-      option = {
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            type: 'shadow'
-          }
-        },
-        grid: {
-          left: '3%',
-          right: '4%',
-          bottom: '3%',
-          containLabel: true
-        },
-        xAxis: [
-          {
-            type: 'category',
-            data: names,
-            axisTick: {
-              alignWithLabel: true
-            },
-            axisLabel: {
-              color: state.themeColor
-            }
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value'
-          }
-        ],
-        series: [
-          {
-            name: 'Direct',
-            type: 'bar',
-            barWidth: '60%',
-            data: vals,
-          }
-        ]
-      }
 
-      option && myChart.setOption(option);
-      window.addEventListener("resize",function (){
-        myChart.resize();
-      });
-    }
     const initZyqs =(names:Array<string>,vals:Array<any>)=>{
       let dom = document.getElementById(zyqs.value);
       let myChart = echarts.init(dom);
@@ -863,7 +832,10 @@
       let res = await teamManageApi().getAllDepartment();
       if (res.data.code === '200') {
         state.departmentList = JSON.parse(JSON.stringify(res.data.data))
-        // recursion(state.departmentList);
+        state.depList = 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)
+        recursion(state.departmentList);
+        state.lists.departList = state.departmentList
+        state.lists.departList2 = state.depList
       } else {
         ElMessage({
           type: 'warning',
@@ -872,30 +844,16 @@
       }
     };
 
-    // 分页获取列表
-    // const getListByPage = async () => {
-    //   const dateRange = JSON.parse(JSON.stringify(state.searchDate))
-    //   if(dateRange[1]){dateRange[1] = dateRange[1].replace('00:00:00','23:59:59')}
-    //   const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: { workType: state.searchWord, applyDepId: state.searchDep,applyStartTime: dateRange[0],applyEndTime: dateRange[1]} };
-    //   let res = await workApplyApi().getApplyList(data);
-    //   if (res.data.code === '200') {
-    //     state.workData = JSON.parse(JSON.stringify(res.data.data));
-    //     state.workData = state.workData.map((item) => {
-    //       if (item.operators == null || item.operators == []) {
-    //         item.operators = [];
-    //       } else {
-    //         item.operators = Array.from(item.operators, ({ operatorUname }) => operatorUname);
-    //       }
-    //       return item;
-    //     });
-    //     state.totalSize1 = res.data.total;
-    //   } else {
-    //     ElMessage({
-    //       type: 'warning',
-    //       message: res.data.msg
-    //     });
-    //   }
-    // };
+    const recursion = (value: any) => {
+      for (let i of value) {
+        if (i.children.length !== 0) {
+          state.departmentRecursionList.push(i);
+          recursion(i.children);
+        } else {
+          state.departmentRecursionList.push(i);
+        }
+      }
+    };
 
     // 关键词查询记录
     const searchRecord = async () => {
@@ -911,7 +869,7 @@
             startTime: '',
             endTime: '',
             workAllStatus: null,
-            applyDepId: null
+            seDepId: null
       }
       state.searchDate = []
       state.pageIndex = 1
@@ -927,49 +885,7 @@
       getMydepList()
     };
 
-    // 查看记录
-    // const viewDetail = (row: any) => {
-    //   state.dialogType = row.workType
-    //   state.details = JSON.parse(JSON.stringify(row));
-    //   if(state.details.workDetail.otherSpecialWork == '' || !state.details.workDetail.otherSpecialWork){
-    //     state.details.workDetail.otherSpecialWork=[]
-    //   }
-    //   else {
-    //     const a = state.details.workDetail.otherSpecialWork
-    //     state.details.workDetail.otherSpecialWork = a.split(',').map((item) => {
-    //       return state.workTypeList.find((i: { id: number }) => i.id === Number(item))?.name;
-    //     });
-    //   }
-    //   if(state.details.workDetail.involvedDepIds == '' || !state.details.workDetail.involvedDepIds){
-    //     state.details.workDetail.involvedDepIds=[]
-    //   }
-    //   else {
-    //     const a = state.details.workDetail.involvedDepIds
-    //     state.details.workDetail.involvedDepIds = a.split(',').map((item) => {
-    //       return state.departmentRecursionList.find((i: { depId: number }) => i.depId === Number(item))?.depName;
-    //     });
-    //   }
-    //   if(state.details.workDetail.csDepId){
-    //     state.details.workDetail.csDepId = state.departmentRecursionList.find((i: { depId: number }) => i.depId === Number(state.details.workDetail.csDepId))?.depName;
-    //   }
-    //   if(state.details.workDetail.operationDepId){
-    //     state.details.workDetail.operationDepId = state.departmentRecursionList.find((i: { depId: number }) => i.depId === Number(state.details.workDetail.operationDepId))?.depName;
-    //   }
-    //   if(state.details.workDetail.gbPath){
-    //     state.details.workDetail.gbPath = state.details.workDetail.gbPath.split(',')
-    //   }
-    //   if(state.details.workDetail.bcPath){
-    //     state.details.workDetail.bcPath = state.details.workDetail.bcPath.split(',')
-    //   }
-    //   if(state.details.workDetail.bpLocationMapPath){
-    //     state.details.workDetail.bpLocationMapPath = state.details.workDetail.bpLocationMapPath.split(',')
-    //   }
-    //   state.dialogDetails = true;
-    // };
 
-    // const handleReview = (row: object)=>{
-    //   state.dialogReview = true
-    // }
     const openVideo = (row:object)=>{
       videoRef.value.openDialog(row)
     }
@@ -985,6 +901,7 @@
       }
       axios.post(import.meta.env.VITE_API_URL + `/specialwork9step/work/down/load/pdf`,{id: row.workApplyId},{headers:{'Content-Type': 'application/json','Authorization': `${Cookies.get('token')}`,'uid':`${Cookies.get('uid')}`},responseType: 'blob'}).then(res=>{
         if (res) {
+          console.log(res.data,888)
           const link = document.createElement('a')
           let blob = new Blob([res.data],{type: 'application/pdf'})
           link.style.display = "none";
@@ -1021,6 +938,107 @@
         }
       })
     }
+
+    const spWorker = async ()=>{
+      for(let id of ['18','19']){
+        const res = await workApplyApi().getSpList({roleId: id})
+        if(id == '18'){
+          if (res.data.code === '200') {
+            state.lists.spList.jhList = JSON.parse(JSON.stringify(res.data.data))
+          } else {
+            ElMessage({
+              type: 'warning',
+              message: res.data.msg
+            });
+          }
+        }
+        if(id == '19'){
+          if (res.data.code === '200') {
+            state.lists.spList.sfList = JSON.parse(JSON.stringify(res.data.data))
+          } else {
+            ElMessage({
+              type: 'warning',
+              message: res.data.msg
+            });
+          }
+        }
+      }
+    }
+
+    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 getAll = async ()=>{
+      const res = await workApplyApi().getAllUsers()
+      if (res.data.code === '200') {
+        state.lists.workerList = JSON.parse(JSON.stringify(res.data.data))
+      } else {
+        ElMessage({
+          type: 'warning',
+          message: res.data.msg
+        });
+      }
+    };
+
+    // 获取设备列表
+    const getAllDevice = async ()=>{
+      const res = await workApplyApi().getAllDevices()
+      if (res.data.code === '200') {
+        state.lists.deviceList = JSON.parse(JSON.stringify(res.data.data))
+      } else {
+        ElMessage({
+          type: 'warning',
+          message: res.data.msg
+        });
+      }
+    }
+
+    // 获取设备列表
+    const getAllRisks = async ()=>{
+      const res = await workApplyApi().getAllRiskIdentity()
+      if (res.data.code === '200') {
+        // state.allDevices = JSON.parse(JSON.stringify(res.data.data))
+        state.lists.riskList = JSON.parse(JSON.stringify(res.data.data))
+      } else {
+        ElMessage({
+          type: 'warning',
+          message: res.data.msg
+        });
+      }
+    }
+
+    const getOtherWork = async () => {
+      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 {
+        ElMessage({
+          type: 'warning',
+          message: res.data.msg
+        });
+      }
+    };
 
     // const submitReview = async (formEl: FormInstance | undefined) => {
     //   if (!formEl) return
@@ -1070,12 +1088,20 @@
       zyfb,
       slfx,
       zyqs,
+      fireRef,
+      plateRef,
+      spaceRef,
+      hoistRef,
+      groundRef,
+      brokenRef,
+      heightRef,
+      powerRef,
+      openRef,
+      getMydepList,
+      continueRecord,
       changeTime1,
       changeTime4,
       changeDep1,
-      changeDep2,
-      changeType2,
-      changeType4,
       changeDep3,
       changeDep4,
       toFullscreen,
@@ -1102,7 +1128,7 @@
 <style scoped lang="scss">
 $homeNavLengh: 8;
 .home-container {
-  height: calc(100vh - 144px);
+  height: calc(100vh - 144px) !important;
   position: relative;
   box-sizing: border-box;
   overflow: hidden;
@@ -1284,7 +1310,6 @@
 
     .main-card {
       width: 100%;
-      height: 100%;
       .cardTop {
         display: flex;
         align-items: center;

--
Gitblit v1.9.2