From 2547159bbd781c8e1a41ecc939385396c85f9766 Mon Sep 17 00:00:00 2001
From: Riku <risaku@163.com>
Date: 星期一, 09 六月 2025 23:35:59 +0800
Subject: [PATCH] 2025.6.9(功能编写中)

---
 src/views/inspection/problem/component/ProblemSummary.vue     |    3 
 src/views/inspection/problem/ProChangeTrack.vue               |   21 +++++++
 src/views/inspection/problem/component/ProblemType.vue        |   24 ++++++-
 src/components.d.ts                                           |    2 
 src/components/search/OptionTime.vue                          |    4 
 src/views/inspection/problem/component/ProblemChangeChart.vue |   27 +++++++--
 src/utils/echart/chart-option.js                              |    4 
 src/stores/subtask.js                                         |    6 +-
 src/api/index.js                                              |    3 
 src/views/inspection/problem/component/ProblemTable.vue       |    8 +-
 src/views/inspection/problem/ProblemTrack.vue                 |   40 ++++++++-----
 src/views/main/MonitorView.vue                                |   12 +++-
 src/components/BaseCard.vue                                   |    2 
 13 files changed, 111 insertions(+), 45 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index 6d5f82e..2831695 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -6,7 +6,8 @@
 var IP = '47.100.191.150'
 var PORT = '9005'
 if (debug) {
-  IP = '192.168.0.103'
+  // IP = '192.168.0.103'
+  IP = 'localhost'
   PORT = '9001'
 }
 
diff --git a/src/components.d.ts b/src/components.d.ts
index a9ad859..5103eec 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -16,11 +16,9 @@
     ElCard: typeof import('element-plus/es')['ElCard']
     ElCascader: typeof import('element-plus/es')['ElCascader']
     ElCol: typeof import('element-plus/es')['ElCol']
-    ElCollapseTransition: typeof import('element-plus/es')['ElCollapseTransition']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
     ElDivider: typeof import('element-plus/es')['ElDivider']
-    ElEmpty: typeof import('element-plus/es')['ElEmpty']
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElImage: typeof import('element-plus/es')['ElImage']
     ElLink: typeof import('element-plus/es')['ElLink']
diff --git a/src/components/BaseCard.vue b/src/components/BaseCard.vue
index 5e87ca6..dbf4a2c 100644
--- a/src/components/BaseCard.vue
+++ b/src/components/BaseCard.vue
@@ -63,7 +63,7 @@
   border-radius: 8px;
   padding: 4px;
   /* background: linear-gradient(#14428be8, #14428b8f); */
-  background: #0034888f;
+  background: #14428be8;
 }
 
 .close-icon {
diff --git a/src/components/search/OptionTime.vue b/src/components/search/OptionTime.vue
index e3b9014..2cfc3d7 100644
--- a/src/components/search/OptionTime.vue
+++ b/src/components/search/OptionTime.vue
@@ -1,8 +1,8 @@
 <template>
   <!-- <el-form-item label="鏃堕棿" :prop="prop"> -->
   <el-date-picker
-    v-model="date"
-    @change="handleChange"
+    :model-value="modelValue"
+    @update:model-value="handleChange"
     :type="type"
     placeholder="閫夋嫨鏃堕棿"
     :disabled-date="disabledDate"
diff --git a/src/stores/subtask.js b/src/stores/subtask.js
index b43b07a..d8333f5 100644
--- a/src/stores/subtask.js
+++ b/src/stores/subtask.js
@@ -111,11 +111,11 @@
   }
 
   function getSummaryMap(callback) {
-    if (summaryMap.value.size === 0) {
-      onFetchMap.push(callback)
-    } else {
+    if (summaryMap.value.size > 0) {
       callback(summaryMap.value)
+      
     }
+    onFetchMap.push(callback)
   }
 
   return {
diff --git a/src/utils/echart/chart-option.js b/src/utils/echart/chart-option.js
index c7de2f8..c4b1c35 100644
--- a/src/utils/echart/chart-option.js
+++ b/src/utils/echart/chart-option.js
@@ -31,7 +31,7 @@
     //   }
     // },
     grid: {
-      left: '3%',
+      left: '10%',
       right: '4%',
       bottom: '3%',
       containLabel: true
@@ -44,7 +44,7 @@
         name: name,
         type: 'pie',
         // radius: '55%',
-        center: ['50%', '50%'],
+        // center: ['50%', '50%'],
         data: _data,
         roseType: 'radius',
         percentPrecision: 0,
diff --git a/src/views/inspection/problem/ProChangeTrack.vue b/src/views/inspection/problem/ProChangeTrack.vue
new file mode 100644
index 0000000..d88c471
--- /dev/null
+++ b/src/views/inspection/problem/ProChangeTrack.vue
@@ -0,0 +1,21 @@
+<template>
+    <BaseCard title="鏁存敼璺熻釜">
+    <el-row justify="space-between" align="middle">
+      <!-- <div class="font-large">闂鏁存敼璺熻釜</div> -->
+      <el-button></el-button>
+      <OptionTime v-model="time" type="date"></OptionTime>
+    </el-row>
+    <div>
+      <ProblemSummary :data="subtaskList" :proStatistic="proStatistic"></ProblemSummary>
+      <ProblemTable :data="subtaskList"></ProblemTable>
+    </div>
+  </BaseCard>
+</template>
+<script setup> 
+import { ref } from "vue";
+
+import ProblemTable from './component/ProblemTable.vue'
+import ProblemSummary from './component/ProblemSummary.vue'
+
+
+</script>
\ No newline at end of file
diff --git a/src/views/inspection/problem/ProblemTrack.vue b/src/views/inspection/problem/ProblemTrack.vue
index 849b107..b9a7a74 100644
--- a/src/views/inspection/problem/ProblemTrack.vue
+++ b/src/views/inspection/problem/ProblemTrack.vue
@@ -1,30 +1,34 @@
 <template>
   <!-- <div class="border-r-small"> -->
-  <BaseCard>
-    <el-row justify="space-between" align="middle">
-      <div class="font-large">闂鏁存敼璺熻釜</div>
+  <BaseCard title="鏁存敼璺熻釜">
+    <el-row justify="space-evenly" align="middle">
+      <!-- <div class="font-large">闂鏁存敼璺熻釜</div> -->
+      <el-button size="small" type="primary" icon="CaretLeft" @click="previousDay"
+        >鍓嶄竴澶�</el-button
+      >
       <OptionTime v-model="time" type="date"></OptionTime>
+      <el-button size="small" type="primary" icon="CaretRight" @click="nextDay">鍚庝竴澶�</el-button>
     </el-row>
     <div>
       <ProblemSummary :data="subtaskList" :proStatistic="proStatistic"></ProblemSummary>
       <ProblemTable :data="subtaskList"></ProblemTable>
     </div>
   </BaseCard>
-  <BaseCard>
-    <el-row justify="space-between" align="middle">
-      <div class="font-large">鍒嗘湡瓒嬪娍</div>
-      <OptionTime v-model="time"></OptionTime>
+  <BaseCard title="闂鍒嗗竷">
+    <!-- <el-row justify="space-between" align="middle">
+      <div class="font-large">闂鍒嗗竷</div>
+    </el-row> -->
+    <div>
+      <ProblemType ref="pTypeRef"></ProblemType>
+    </div>
+  </BaseCard>
+  <BaseCard title="鍒嗘湡瓒嬪娍">
+    <el-row justify="end" align="middle">
+      <!-- <div class="font-large">鍒嗘湡瓒嬪娍</div> -->
+      <!-- <OptionTime v-model="time"></OptionTime> -->
     </el-row>
     <div>
       <ProblemChangeChart ref="pChangeRef"></ProblemChangeChart>
-    </div>
-  </BaseCard>
-  <BaseCard>
-    <el-row justify="space-between" align="middle">
-      <div class="font-large">闂鍒嗗竷</div>
-    </el-row>
-    <div>
-      <ProblemType ref="pTypeRef"></ProblemType>
     </div>
   </BaseCard>
   <!-- <BaseCard>
@@ -86,6 +90,12 @@
     ...mapStores(useSubtaskStore)
   },
   methods: {
+    nextDay() {
+      this.time = dayjs(this.time).add(1, 'day').toDate()
+    },
+    previousDay() {
+      this.time = dayjs(this.time).add(-1, 'day').toDate()
+    },
     fetchSubtask() {
       // taskApi.fetchSubtaskSummaryByArea(this.area).then((res) => {
       //   this.subtaskList = res.data
diff --git a/src/views/inspection/problem/component/ProblemChangeChart.vue b/src/views/inspection/problem/component/ProblemChangeChart.vue
index 60cc1d7..f186224 100644
--- a/src/views/inspection/problem/component/ProblemChangeChart.vue
+++ b/src/views/inspection/problem/component/ProblemChangeChart.vue
@@ -1,20 +1,35 @@
 <template>
   <el-row justify="space-between">
     <el-col :span="24">
-      <el-text size="small">
+      <el-row justify="space-between" class="p-h-16">
+        <el-statistic title="鍦烘櫙鏁�" :value="sceneNum" />
+        <el-statistic title="闂鏁�" :value="proNum" />
+        <!-- <el-statistic title="鍗曞満鏅棶棰樺潎鍊�" :value="proEachSceneNum" /> -->
+        <el-statistic title="鏁存敼鏁�" :value="changeNum" />
+        <el-statistic title="鏁存敼閫氳繃鏁�" :value="changePassNum" />
+        <el-statistic title="闂鏁存敼鐜�" :value="changePer" />
+        <el-statistic title="鏁存敼閫氳繃鐜�" :value="changePassPer" />
+      </el-row>
+      <!-- <el-row justify="space-between" class="p-h-16">
+        <el-statistic title="鏁存敼閫氳繃鏁�" :value="changePassNum" />
+        <el-statistic title="闂鏁存敼鐜�" :value="changePer" />
+        <el-statistic title="鏁存敼閫氳繃鐜�" :value="changePassPer" />
+      </el-row> -->
+      <!-- <el-text size="small">
         鍦烘櫙鏁帮細{{ sceneNum }}锛岄棶棰樻�绘暟锛歿{ proNum }}锛屽崟鍦烘櫙闂鍧囧�硷細{{ proEachSceneNum }}锛�
       </el-text>
       <el-text size="small">
         鏁存敼鎬绘暟锛歿{ changeNum }}锛屾湁鏁堟暣鏀规暟锛歿{ changePassNum }}锛岄棶棰樻暣鏀圭巼锛歿{
           changePer
         }}锛屾湁鏁堟暣鏀圭巼锛歿{ changePassPer }}
-      </el-text>
+      </el-text> -->
     </el-col>
-    <!-- <el-col :span="6">
-      <el-row justify="end">
+    <!-- <el-col :span="6"> -->
+      <!-- <el-statistic title="鏈夋晥鏁存敼鐜�" :value="changePassPer" /> -->
+      <!-- <el-row justify="end">
         <OptionTime v-model="time"></OptionTime>
-      </el-row>
-    </el-col> -->
+      </el-row> -->
+    <!-- </el-col> -->
   </el-row>
   <div ref="echart" class="line-chart"></div>
 </template>
diff --git a/src/views/inspection/problem/component/ProblemSummary.vue b/src/views/inspection/problem/component/ProblemSummary.vue
index bf865c4..ea39f2d 100644
--- a/src/views/inspection/problem/component/ProblemSummary.vue
+++ b/src/views/inspection/problem/component/ProblemSummary.vue
@@ -154,6 +154,7 @@
 <style scoped>
 .pie-chart {
   /* width: 200px; */
-  height: 70px;
+  height: 100px;
+  /* background-color: aliceblue; */
 }
 </style>
diff --git a/src/views/inspection/problem/component/ProblemTable.vue b/src/views/inspection/problem/component/ProblemTable.vue
index f529c6e..e85bda7 100644
--- a/src/views/inspection/problem/component/ProblemTable.vue
+++ b/src/views/inspection/problem/component/ProblemTable.vue
@@ -29,7 +29,7 @@
     </el-table-column>
   </el-table>
   <div v-if="showMoreBtn" class="btn-more font-small">
-    <el-link type="primary" @click="showMore = !showMore">
+    <el-link type="success" @click="showMore = !showMore">
       {{ showMore ? '鏀惰捣鏇村' : '鏌ョ湅鏇村' }}
     </el-link>
   </div>
@@ -61,9 +61,9 @@
 
 const tableData = computed(() => {
   const l = props.data.map((value) => {
-    const time = value.subtask.executionendtime
-      ? value.subtask.executionendtime
-      : value.subtask.executionstarttime
+    const time = value.subtask.executionstarttime
+      ? value.subtask.executionstarttime
+      : value.subtask.executionendtime
     value.updateTime = time
     return value
   })
diff --git a/src/views/inspection/problem/component/ProblemType.vue b/src/views/inspection/problem/component/ProblemType.vue
index f65f5aa..7b40def 100644
--- a/src/views/inspection/problem/component/ProblemType.vue
+++ b/src/views/inspection/problem/component/ProblemType.vue
@@ -1,13 +1,18 @@
 <template>
   <el-row justify="space-between">
-    <el-col :span="18">
-      <el-text v-if="mainProType">
+    <el-col :span="24">
+      <el-row v-if="mainProType" justify="space-between" class="p-h-16">
+        <el-statistic title="绐佸嚭闂" :value="mainProType.name" />
+        <el-statistic title="闂鏁�" :value="mainProType.count" />
+        <el-statistic title="鍗犳瘮" :value="mainProType.per" />
+      </el-row>
+      <!-- <el-text v-if="mainProType">
         绐佸嚭闂锛歿{ mainProType.name }}锛岄棶棰樻暟锛歿{ mainProType.count }}锛屽崰姣攞{ mainProType.per }}
-      </el-text>
+      </el-text> -->
     </el-col>
     <el-col :span="6">
       <el-row justify="end">
-        <OptionTime v-model="time"></OptionTime>
+        <!-- <OptionTime v-model="time"></OptionTime> -->
       </el-row>
     </el-col>
   </el-row>
@@ -63,6 +68,14 @@
       return res
     }
   },
+  watch: {
+    'areaStore.area': {
+      handler(nV, oV) {
+        this.fetchProblemsStatistic()
+      },
+      deep: true
+    }
+  },
   methods: {
     fetchProblemsStatistic() {
       const param = unref(this.areaStore.area)
@@ -93,7 +106,8 @@
   },
   mounted() {
     this.echart = echarts.init(this.$refs.echart)
-    this.fetchProblemsStatistic()
+    // this.area = this.areaStore.area
+    // this.fetchProblemsStatistic()
   }
 }
 </script>
diff --git a/src/views/main/MonitorView.vue b/src/views/main/MonitorView.vue
index badd461..14a207c 100644
--- a/src/views/main/MonitorView.vue
+++ b/src/views/main/MonitorView.vue
@@ -1,6 +1,6 @@
 <template>
   <BaseMap></BaseMap>
-  <el-row class="overlay-container" v-if="false">
+  <el-row class="overlay-container" v-if="true">
     <el-col :span="7" class="page-right">
       <el-scrollbar height="var(--fy-body-height)" class="p-events-auto">
         <ManagementView></ManagementView>
@@ -8,7 +8,7 @@
     </el-col>
     <el-col :span="17">
       <el-scrollbar class="page-left-top">
-        <VisualizationView></VisualizationView>
+        <!-- <VisualizationView></VisualizationView> -->
       </el-scrollbar>
       <el-scrollbar class="page-left-bottom p-events-auto">
         <!-- <InspectionView></InspectionView> -->
@@ -23,6 +23,7 @@
   <SupervisionVisual class="supervision-view"></SupervisionVisual>
   <TaskStats class="task-stats"></TaskStats>
   <WorkStream class="work-stream"></WorkStream>
+  <!-- <ProblemTrack class="problem-track"></ProblemTrack> -->
 </template>
 
 <script setup>
@@ -41,6 +42,8 @@
 import ManagementView from '@/views/management/ManagementView.vue'
 import StatisticView from '@/views/management/StatisticView.vue'
 import VisualizationView from '@/views/visualization/VisualizationView.vue'
+
+import ProblemTrack from '@/views/inspection/problem/ProblemTrack.vue'
 import SupervisionVisual from '@/views/visualization/SupervisionVisual.vue'
 import WorkStream from '@/views/inspection/WorkStream.vue'
 import TaskStats from '@/views/management/TaskStats.vue'
@@ -117,7 +120,7 @@
 .task-stats {
   position: absolute;
   top: 0;
-  left: 0;
+  right: 0;
 }
 
 .supervision-view {
@@ -126,4 +129,7 @@
   left: 0;
   right: 0;
 }
+.problem-track {
+
+}
 </style>

--
Gitblit v1.9.3