From ce115e4c67e98c143159039494f14c7bcda59415 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期三, 13 三月 2024 13:11:45 +0800
Subject: [PATCH] Default Changelist

---
 src/views/dataUpload/saftyBaseInfo/parkingInfo/index.vue      |    2 
 src/views/specialWorkSystem/specialIndex/index.vue            |   52 +++++++++++---------------
 src/views/newSpecialWorkSystem/workTicket/sqjl/index.vue      |    2 
 src/views/riskWarningSys/warningBigScreen/components/risk.vue |    4 +
 src/api/specialWorkSystem/specialIndex/index.ts               |    4 +-
 5 files changed, 29 insertions(+), 35 deletions(-)

diff --git a/src/api/specialWorkSystem/specialIndex/index.ts b/src/api/specialWorkSystem/specialIndex/index.ts
index 5affc2d..da21744 100644
--- a/src/api/specialWorkSystem/specialIndex/index.ts
+++ b/src/api/specialWorkSystem/specialIndex/index.ts
@@ -11,14 +11,14 @@
         },
         analyseAllWork: (data: object) => {
             return request({
-                url: import.meta.env.VITE_API_URL + `/specialWork/analyse/allWork/dep`,
+                url: import.meta.env.VITE_API_URL + `/specialwork9step/statistic/allWork/dep`,
                 method: 'post',
                 data: data
             });
         },
         analyseDepMonth: (data: number) => {
             return request({
-                url: import.meta.env.VITE_API_URL + `/specialWork/analyse/12month/dep?depId=${data}`,
+                url: import.meta.env.VITE_API_URL + `/specialwork9step/statistic/12month/dep?depId=${data}`,
                 method: 'get'
             });
         },
diff --git a/src/views/dataUpload/saftyBaseInfo/parkingInfo/index.vue b/src/views/dataUpload/saftyBaseInfo/parkingInfo/index.vue
index 055fa85..cc33892 100644
--- a/src/views/dataUpload/saftyBaseInfo/parkingInfo/index.vue
+++ b/src/views/dataUpload/saftyBaseInfo/parkingInfo/index.vue
@@ -10,7 +10,7 @@
             </el-row>
             <el-table :data="reportData" style="width: 100%" height="calc(100% - 48px)" :header-cell-style="{ background: '#fafafa' }">
               <el-table-column prop="id" label="id" show-overflow-tooltip></el-table-column>
-              <el-table-column prop="reportTime" label="上报时间" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="createTime" label="上报时间" show-overflow-tooltip></el-table-column>
               <el-table-column prop="programmeName" label="方案名称" show-overflow-tooltip></el-table-column>
               <el-table-column prop="startTime" label="开始时间" show-overflow-tooltip></el-table-column>
               <el-table-column prop="endTime" label="结束时间" show-overflow-tooltip></el-table-column>
diff --git a/src/views/newSpecialWorkSystem/workTicket/sqjl/index.vue b/src/views/newSpecialWorkSystem/workTicket/sqjl/index.vue
index 11544dc..20a5ac3 100644
--- a/src/views/newSpecialWorkSystem/workTicket/sqjl/index.vue
+++ b/src/views/newSpecialWorkSystem/workTicket/sqjl/index.vue
@@ -6,7 +6,7 @@
                     <el-row class="homeCard">
                      <div class="basic-line" style="display:flex;white-space:nowrap;line-height: 40px">
                         <span>时间筛选:</span>
-                        <el-date-picker v-model="timeRange" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" @change="giveTime()" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
+                        <el-date-picker v-model="timeRange" value-format="YYYY-MM-DD" type="daterange" @change="giveTime()" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
                       </div>
                       <div class="basic-line" style="display:flex;white-space:nowrap;line-height: 40px">
                         <span>负责人:</span>
diff --git a/src/views/riskWarningSys/warningBigScreen/components/risk.vue b/src/views/riskWarningSys/warningBigScreen/components/risk.vue
index c689cad..61b9ec3 100644
--- a/src/views/riskWarningSys/warningBigScreen/components/risk.vue
+++ b/src/views/riskWarningSys/warningBigScreen/components/risk.vue
@@ -41,6 +41,7 @@
 		riskProps: object,
     departmentList: Array<any>,
     departmentRecursionList: Array<DepartmentState>;
+    myVar: any
 	}
   interface DepartmentState {
     depId: number;
@@ -72,7 +73,7 @@
 				riskData: [],
         departmentList: [],
         departmentRecursionList: [],
-        myVar: 0
+        myVar: null
 			})
       const timeForm = {
         hour12: false,
@@ -540,6 +541,7 @@
 
 			onBeforeUnmount(() =>{
 				clearInterval(state.myVar)
+        state.myVar = null
 			})
 
 			return {
diff --git a/src/views/specialWorkSystem/specialIndex/index.vue b/src/views/specialWorkSystem/specialIndex/index.vue
index 9e3b2f9..dd9a486 100644
--- a/src/views/specialWorkSystem/specialIndex/index.vue
+++ b/src/views/specialWorkSystem/specialIndex/index.vue
@@ -416,7 +416,7 @@
       },
       chartSearch2: {
         depId: 1,
-        startTime: '',
+        // startTime: '',
         type: null
       },
       chartSearch3: {
@@ -523,9 +523,6 @@
       getTypePie()
       getWorkDep()
       getDepMonth()
-      initZyfb()
-      initSlfx()
-      initZyqs()
     });
     const initTime =()=>{
       state.chartSearch1.startTime = getPeriod(30)
@@ -575,10 +572,12 @@
       }else{
         state.themeColor = '#333'
       }
-      initZyfb()
-      initSlfx()
-      initZyqs()
+      initTime()
       getMydepList()
+      getAllDepartment();
+      getTypePie()
+      getWorkDep()
+      getDepMonth()
     }
     const getTypePie = async ()=>{
       const data = {
@@ -590,7 +589,7 @@
       if (res.data.code === '200') {
         // console.log('饼图数据>>>', res.data.data)
         state.pieData = JSON.parse(JSON.stringify(res.data.data))
-        // initZyfb()
+        initZyfb()
       } else {
         ElMessage({
           type: 'warning',
@@ -600,16 +599,17 @@
     }
     const getWorkDep = async ()=>{
       const data = {
-        startTime: state.chartSearch2.startTime,
-        endTime: state.endTime,
+        // 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') {
-        // console.log('条形图数据>>>', res.data.data)
         state.squareData = JSON.parse(JSON.stringify(res.data.data))
-        // initSlfx()
+        let names = state.squareData.map(i=>i.name)
+        let vals = state.squareData.map(i=>i.value)
+        initSlfx(names,vals)
       } else {
         ElMessage({
           type: 'warning',
@@ -620,9 +620,10 @@
     const getDepMonth = async ()=>{
       let res = await specialIndexApi().analyseDepMonth(state.chartSearch3.depId);
       if (res.data.code === '200') {
-        // console.log('折线图数据>>>', res.data.data)
         state.squareData = JSON.parse(JSON.stringify(res.data.data))
-        // initSlfx()
+        let names = state.squareData.map(i=>i.name)
+        let vals = state.squareData.map(i=>i.value)
+        initZyqs(names,vals)
       } else {
         ElMessage({
           type: 'warning',
@@ -706,16 +707,7 @@
                 shadowColor: 'rgba(0, 0, 0, 0.5)'
               },
             },
-            data: [
-              { value: 0, name: '动火作业' },
-              { value: 0, name: '受限空间作业' },
-              { value: 0, name: '吊装作业' },
-              { value: 0, name: '动土作业' },
-              { value: 0, name: '断路作业' },
-              { value: 0, name: '高处作业' },
-              { value: 0, name: '临时用电作业' },
-              { value: 0, name: '盲板抽堵作业' }
-            ]
+            data: state.pieData
           }
         ]
       }
@@ -725,7 +717,7 @@
         myChart.resize();
       });
     }
-    const initSlfx =()=>{
+    const initSlfx =(names:Array<string>,vals:Array<any>)=>{
       let dom = document.getElementById(slfx.value);
       let myChart = echarts.init(dom);
       let option: EChartsOption;
@@ -745,7 +737,7 @@
         xAxis: [
           {
             type: 'category',
-            data: ['部门一','部门二','部门三'],
+            data: names,
             axisTick: {
               alignWithLabel: true
             },
@@ -764,7 +756,7 @@
             name: 'Direct',
             type: 'bar',
             barWidth: '60%',
-            data: [0,0,0],
+            data: vals,
           }
         ]
       }
@@ -774,14 +766,14 @@
         myChart.resize();
       });
     }
-    const initZyqs =()=>{
+    const initZyqs =(names:Array<string>,vals:Array<any>)=>{
       let dom = document.getElementById(zyqs.value);
       let myChart = echarts.init(dom);
       let option: EChartsOption;
       option = {
         xAxis: {
           type: 'category',
-          data: ['四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月', '一月', '二月', '三月'],
+          data: names,
           axisLabel: {
             color: state.themeColor
           }
@@ -805,7 +797,7 @@
         },
         series: [
           {
-            data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            data: vals,
             type: 'line',
             label:{
               show: true

--
Gitblit v1.9.2