From ad208889ad6ca2283a06d7bc440ecd289c535d83 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 03 四月 2025 17:26:29 +0800
Subject: [PATCH] 1. 添加显示问题整改的时间; 2. 新增巡查场景数、巡查点次、复查点次的统计; 3. 添加扬尘监测数据统计结果管理(待完成)
---
src/enum/scene copy.js | 185 ++++++++++++++
src/enum/scene.js | 6
src/views/fysp/check/ProCheck.vue | 139 +++-------
src/views/fysp/check/components/CompSubTaskStatistic.vue | 226 +++++++++++++---
src/api/fytz/configApi.js | 16 +
src/components/SearchBar.vue | 32 -
src/views/fysp/evaluation/components/CompDataResultEdit.vue | 18 +
src/views/fysp/check/components/CompProRecent.vue | 52 ++-
src/views/fysp/check/components/CompProblemCard.vue | 51 +++
9 files changed, 515 insertions(+), 210 deletions(-)
diff --git a/src/api/fytz/configApi.js b/src/api/fytz/configApi.js
new file mode 100644
index 0000000..7a6ddec
--- /dev/null
+++ b/src/api/fytz/configApi.js
@@ -0,0 +1,16 @@
+import { $fytz } from '../index';
+
+/**
+ * 鍔ㄦ�侀厤缃浉鍏矨PI鎺ュ彛
+ */
+export default {
+ /**
+ * 鑾峰彇鐢ㄦ埛绫诲瀷鍙敤鐨勫満鏅寖鍥�
+ */
+ // Fixme 2025.4.2: 鏆傛椂榛樿浣跨敤绠$悊鍛樼敤鎴穒d锛屽悗缁姞鍏ユ潈闄愮鐞嗗悗锛屾牴鎹櫥褰曠敤鎴峰姩鎬佽幏鍙�
+ fetchSceneTypeRange(userId = 'pGrkC8e8eu8jGPgf') {
+ return $fytz
+ .get(`config/scene/range`, { params: { userId } })
+ .then((res) => res.data);
+ },
+};
diff --git a/src/components/SearchBar.vue b/src/components/SearchBar.vue
index b137a36..49c3e62 100644
--- a/src/components/SearchBar.vue
+++ b/src/components/SearchBar.vue
@@ -1,6 +1,6 @@
<template>
<el-row class="layout">
- <el-col :span="12">
+ <el-col :span="10">
<el-form :inline="true" :model="formSearch">
<el-form-item label="鎬讳换鍔�">
<!-- <el-input v-model="formSearch.topTaskId" placeholder="鎬讳换鍔�" /> -->
@@ -17,26 +17,17 @@
/>
</el-select>
</el-form-item>
- <el-form-item label="鍦烘櫙绫诲瀷">
- <el-select
- v-model="formSearch.sceneTypeId"
- placeholder="鍦烘櫙绫诲瀷"
- style="width: 150px"
- >
- <el-option
- v-for="s in sceneTypes"
- :key="s.value"
- :label="s.label"
- :value="s.value"
- />
- </el-select>
- </el-form-item>
+ <FYOptionScene
+ :allOption="true"
+ :type="2"
+ v-model:value="formSearch.scenetype"
+ ></FYOptionScene>
<el-form-item>
<el-button type="primary" @click="onSubmit">鏌ヨ</el-button>
</el-form-item>
</el-form>
</el-col>
- <el-col :span="12">
+ <el-col :span="14">
<el-row justify="end">
<slot name="summary"></slot>
</el-row>
@@ -46,17 +37,15 @@
<script>
import taskApi from '@/api/fysp/taskApi';
-import { enumScene } from '@/enum/scene';
export default {
emits: ['onSubmit'],
data() {
return {
topTasks: [],
- sceneTypes: enumScene(2, false),
formSearch: {
topTaskId: '',
- sceneTypeId: ''
+ scenetype: ''
}
};
},
@@ -83,15 +72,14 @@
);
const param = {
topTask: task ? task.data : {},
- sceneTypeId: this.formSearch.sceneTypeId
+ sceneTypeId: this.formSearch.scenetype.value
};
- console.log(param);
+ // console.log(param);
this.$emit('onSubmit', param);
}
},
mounted() {
- this.formSearch.sceneTypeId = this.sceneTypes[0].value;
this.getOptions();
}
};
diff --git a/src/enum/scene copy.js b/src/enum/scene copy.js
new file mode 100644
index 0000000..328c38d
--- /dev/null
+++ b/src/enum/scene copy.js
@@ -0,0 +1,185 @@
+import sceneApi from '@/api/fysp/sceneApi';
+import configApi from '@/api/fytz/configApi';
+
+/**
+ * 鍦烘櫙绫诲瀷鏋氫妇
+ * @param {Number} type 1:椋炵窘鐜绯荤粺锛�2锛氶缇界洃绠$郴缁燂紱
+ * @param {Boolean} allOption 鏄惁鍦ㄥご閮ㄦ坊鍔犫�滃叏閮ㄢ�濋�夐」
+ */
+async function enumScene(type, allOption = true) {
+ let func;
+ switch (parseInt(type)) {
+ case 1:
+ func = _enumScene_1;
+ break;
+ case 2:
+ func = _enumScene_2;
+ break;
+ default:
+ func = _enumScene_1;
+ break;
+ }
+
+ return func().then((res) => {
+ if (!allOption) {
+ return res.shift();
+ } else {
+ return res;
+ }
+ });
+}
+
+function getSceneName(value, type = 1) {
+ return enumScene(type).then((res) => {
+ return res.find((v) => {
+ if (v.value == value) {
+ return v;
+ }
+ });
+ });
+}
+
+// 椋炵窘鐜绯荤粺
+let _scene1;
+function _enumScene_1() {
+ if (_scene1) {
+ return Promise.resolve(_scene1);
+ } else {
+ return configApi.fetchSceneTypeRange().then((res) => {
+ _scene1 = res.data.map((r) => {
+ return {
+ label: r.second,
+ value: r.first
+ };
+ });
+ _scene1.unshift({
+ label: '鍏ㄩ儴',
+ value: null
+ });
+ });
+ }
+ // return [
+ // {
+ // label: '鍏ㄩ儴',
+ // value: null
+ // },
+ // {
+ // label: '椁愰ギ',
+ // value: '1'
+ // },
+ // {
+ // label: '宸ュ湴',
+ // value: '2'
+ // },
+ // {
+ // label: '鐮佸ご',
+ // value: '3'
+ // },
+ // {
+ // label: '鍫嗗満',
+ // value: '4'
+ // },
+ // {
+ // label: '鎼呮媽绔�',
+ // value: '5'
+ // },
+ // {
+ // label: '宸ヤ笟浼佷笟',
+ // value: '6'
+ // },
+ // {
+ // label: '姹戒慨',
+ // value: '7'
+ // },
+ // {
+ // label: '瀹為獙瀹�',
+ // value: '8'
+ // },
+ // {
+ // label: '鍖荤枟鏈烘瀯',
+ // value: '9'
+ // }
+ // ];
+}
+
+// 椋炵窘鐩戠绯荤粺
+let _scene2;
+function _enumScene_2() {
+ if (_scene2) {
+ return Promise.resolve(_scene2);
+ } else {
+ return sceneApi.getAllScene().then((res) => {
+ _scene2 = res.map((r) => {
+ return {
+ label: r.sceneType,
+ value: r.sceneTypeId + ''
+ };
+ });
+ _scene2.unshift({
+ label: '鍏ㄩ儴',
+ value: null
+ });
+ });
+ }
+ // return [
+ // {
+ // label: '鍏ㄩ儴',
+ // value: null
+ // },
+ // {
+ // label: '宸ュ湴',
+ // value: '1'
+ // },
+ // {
+ // label: '鐮佸ご',
+ // value: '2'
+ // },
+ // {
+ // label: '鎼呮媽绔�',
+ // value: '3'
+ // },
+ // {
+ // label: '宸ヤ笟浼佷笟',
+ // value: '4'
+ // },
+ // {
+ // label: '椁愰ギ',
+ // value: '5'
+ // },
+ // {
+ // label: '姹戒慨',
+ // value: '6'
+ // },
+ // {
+ // label: '閬撹矾鎵皹鐩戞祴鐐�',
+ // value: '9'
+ // },
+ // {
+ // label: '閬撹矾',
+ // value: '10'
+ // },
+ // {
+ // label: '鍫嗗満',
+ // value: '14'
+ // }
+ // ];
+}
+
+/**
+ * 椋炵窘鐩戠绯荤粺 鍦烘櫙绫诲瀷杞� 椋炵窘鐜绯荤粺
+ * @param {*} sceneTypeId
+ */
+async function svToTz(sceneTypeId) {
+ const sv = await _enumScene_2();
+ const tz = await _enumScene_1();
+
+ const scType = sv.find((v) => {
+ return v.value == sceneTypeId + '';
+ });
+ const tzType = tz.find((v) => {
+ return v.label == scType.label;
+ });
+ return tzType ? tzType : scType;
+}
+
+export { enumScene, getSceneName, svToTz };
diff --git a/src/enum/scene.js b/src/enum/scene.js
index 5aeb977..4e07130 100644
--- a/src/enum/scene.js
+++ b/src/enum/scene.js
@@ -119,7 +119,11 @@
{
label: '鍫嗗満',
value: '14'
- }
+ },
+ {
+ label: '绮惧搧灏忓尯',
+ value: '15'
+ },
];
}
diff --git a/src/views/fysp/check/ProCheck.vue b/src/views/fysp/check/ProCheck.vue
index 411065c..5f02bd7 100644
--- a/src/views/fysp/check/ProCheck.vue
+++ b/src/views/fysp/check/ProCheck.vue
@@ -3,7 +3,11 @@
<template #header>
<SearchBar @on-submit="search">
<template #summary>
- <CompSubTaskStatistic :subtasks="subtasks" />
+ <CompSubTaskStatistic
+ :loading="sideLoading"
+ :subtasks="subtasks"
+ :monitorObjList="curMonitorObjList"
+ />
</template>
</SearchBar>
</template>
@@ -16,29 +20,31 @@
></SideList>
</template>
<template #main>
- <ToolBar
- :title="curSubtask.title"
- :descriptions="proStatus"
- :buttons="buttons"
- :loading="mainLoading"
- ></ToolBar>
- <el-scrollbar
- v-if="curProList.length > 0"
- class="el-scrollbar"
- v-loading="mainLoading"
- >
- <CompProblemCard
- :key="i"
- v-for="(p, i) in curProList"
- :index="i + 1"
- :problem="p"
- :subtask="curSubtask.data"
- :topTask="topTask"
- @submit="updateSubtask"
- @check="handleProblemCheck"
- ></CompProblemCard>
+ <el-scrollbar >
+ <ToolBar
+ :title="curSubtask.title"
+ :descriptions="proStatus"
+ :buttons="buttons"
+ :loading="mainLoading"
+ ></ToolBar>
+ <el-scrollbar
+ v-if="curProList.length > 0"
+ class="scrollbar-inner"
+ v-loading="mainLoading"
+ >
+ <CompProblemCard
+ :key="i"
+ v-for="(p, i) in curProList"
+ :index="i + 1"
+ :problem="p"
+ :subtask="curSubtask.data"
+ :topTask="topTask"
+ @submit="updateSubtask"
+ @check="handleProblemCheck"
+ ></CompProblemCard>
+ </el-scrollbar>
+ <el-empty v-else description="鏆傛棤闂" v-loading="mainLoading" />
</el-scrollbar>
- <el-empty v-else description="鏆傛棤闂" v-loading="mainLoading" />
</template>
</BaseContentLayout>
<CompProblemAddOrUpd
@@ -97,6 +103,8 @@
mainLoading: false,
// 鎬讳换鍔�
topTask: {},
+ // 鎬讳换鍔″贰鏌ヨ鍒掓竻鍗�
+ curMonitorObjList: [],
//瀛愪换鍔″垪琛�
subtasks: [],
//褰撳墠閫変腑鐨勪换鍔�
@@ -140,81 +148,6 @@
//闂鐘舵��
proStatus() {
return ProCheckProxy.proStatusArray(this.curProList);
- },
- //浠诲姟闂瀹℃牳鎯呭喌缁熻淇℃伅
- summary() {
- const _summary = [
- {
- name: '浠诲姟鎬昏',
- value: 0,
- type: 'info'
- },
- {
- name: '闂鏈鏍�',
- value: 0,
- type: 'success',
- icon: 'SuccessFilled'
- },
- {
- name: '闂閮ㄥ垎瀹℃牳',
- value: 0,
- type: 'success',
- icon: 'SuccessFilled'
- },
- {
- name: '闂鍏ㄩ儴瀹℃牳',
- value: 0,
- type: 'success',
- icon: 'SuccessFilled'
- },
- {
- name: '鏈暣鏀�',
- value: 0,
- type: 'info',
- icon: 'WarningFilled'
- },
- {
- name: '鏁存敼鏈鏍�',
- value: 0,
- type: 'info',
- icon: 'WarningFilled'
- },
- {
- name: '鏁存敼閮ㄥ垎瀹℃牳',
- value: 0,
- type: 'warning',
- icon: 'WarningFilled'
- },
- {
- name: '鏁存敼鍏ㄩ儴瀹℃牳',
- value: 0,
- type: 'warning',
- icon: 'WarningFilled'
- }
- ];
-
- this.subtasks.forEach((s) => {
- _summary[0].value++;
-
- if (s.data.proNum == 0) {
- _summary[1].value++;
- } else if (s.data.proCheckedNum == 0) {
- _summary[3].value++;
- } else if (s.data.proCheckedNum < s.data.proNum) {
- _summary[2].value++;
- } else {
- _summary[1].value++;
- }
- });
- _summary.forEach((s, i) => {
- if (i > 0) {
- let per = Math.round((s.value / _summary[0].value) * 1000) / 10;
- if (isNaN(per)) per = 0;
- s.value = `${s.value}(${per}%)`;
- }
- });
-
- return _summary;
}
},
methods: {
@@ -253,6 +186,9 @@
this.sideLoading = false;
this.mainLoading = false;
}
+ });
+ taskApi.fetchMonitorObjectVersion(param.topTaskId).then((res) => {
+ this.curMonitorObjList = res;
});
},
//鐐瑰嚮宸︿晶鑿滃崟浠诲姟浜嬩欢
@@ -325,7 +261,12 @@
</script>
<style scoped>
-.el-scrollbar {
+.scrollbar-outer {
+ height: calc(100vh - 60px * 2 - 24px);
+ background-color: aliceblue;
+}
+
+.scrollbar-inner {
height: calc(100vh - 60px * 2 - 20px * 2 - var(--height-toolbar));
}
</style>
diff --git a/src/views/fysp/check/components/CompProRecent.vue b/src/views/fysp/check/components/CompProRecent.vue
index 930bbbb..66fc00c 100644
--- a/src/views/fysp/check/components/CompProRecent.vue
+++ b/src/views/fysp/check/components/CompProRecent.vue
@@ -58,6 +58,7 @@
import CompProblemAddOrUpd from './CompProblemAddOrUpd.vue';
import taskApi from '@/api/fysp/taskApi';
import { useCloned } from '@vueuse/core';
+import dayjs from 'dayjs';
export default {
computed: {
// repeteRate() {
@@ -97,7 +98,7 @@
}
},
components: {
- CompProblemAddOrUpd,
+ CompProblemAddOrUpd
},
mounted() {},
data() {
@@ -132,16 +133,13 @@
updateSubtask() {},
generateQueryParam() {
// 浠婂ぉ鐨勬棩鏈�
- const today = new Date();
+ const today = dayjs(this.subtask.stPlanTime);
// 涓変釜鏈堝墠
- const threeMonthsAgo = new Date(today);
- threeMonthsAgo.setMonth(today.getMonth() - 3);
+ const threeMonthsAgo = today.subtract(3, 'month');
// 璁$畻鍗婂勾鍓嶇殑鏃ユ湡
- const sixMonthsAgo = new Date(today);
- sixMonthsAgo.setMonth(today.getMonth() - 6);
+ const sixMonthsAgo = today.subtract(6, 'month');
// 璁$畻涓�骞村墠鐨勬棩鏈�
- const oneYearAgo = new Date(today);
- oneYearAgo.setFullYear(today.getFullYear() - 1);
+ const oneYearAgo = today.subtract(1, 'year');
return {
startTime:
@@ -157,28 +155,32 @@
/**
* 鑾峰彇杩戞湡鎯呭喌
* */
- async getRecentPros() {
+ getRecentPros() {
this.loading = true;
this.subtaskCount = 0;
// 鑾峰彇瀛愪换鍔″垪琛�
- await taskApi
- .getSubtaskByScene(this.generateQueryParam())
- .then((subtasks) => {
- this.curProList = [];
- if (subtasks) {
- subtasks.forEach((subtask) => {
- // 鑾峰彇闂鍒楄〃
- this.getProBySubtask(subtask);
- });
- }
- });
- // 棰濆澶勭悊
- this.curProList.sort((o1, o2) => o2.getDate() - o1.getDate());
- this.loading = false;
+ taskApi.getSubtaskByScene(this.generateQueryParam()).then((subtasks) => {
+ this.curProList = [];
+ if (subtasks) {
+ const promiseList = [];
+ subtasks.forEach((subtask) => {
+ // 鑾峰彇闂鍒楄〃
+ promiseList.push(this.getProBySubtask(subtask));
+ });
+ Promise.all(promiseList)
+ .then(() => {
+ // 棰濆澶勭悊
+ this.curProList.sort((o1, o2) => {
+ return o2._time > o1._time;
+ });
+ })
+ .finally(() => (this.loading = false));
+ }
+ });
},
// 鏍规嵁瀛愪换鍔¤幏鍙栭噷闈㈢殑闂鍒楄〃
- async getProBySubtask(subtask) {
- taskApi.getProBySubtask(subtask.stGuid).then((pros) => {
+ getProBySubtask(subtask) {
+ return taskApi.getProBySubtask(subtask.stGuid).then((pros) => {
if (pros) {
pros.forEach((pro) => {
if (pro.ptguid == this.deepCopyPro.ptguid) {
diff --git a/src/views/fysp/check/components/CompProblemCard.vue b/src/views/fysp/check/components/CompProblemCard.vue
index afbeb8c..77f907d 100644
--- a/src/views/fysp/check/components/CompProblemCard.vue
+++ b/src/views/fysp/check/components/CompProblemCard.vue
@@ -1,7 +1,7 @@
<template>
<el-card class="layout" shadow="never">
<!-- <el-row justify="space-between"> -->
- <div >
+ <div>
<el-steps
:active="proStatus.index"
finish-status="success"
@@ -13,7 +13,7 @@
</div>
<!-- </el-row> -->
- <el-descriptions :column="3" size="small">
+ <el-descriptions :column="2" size="small" border>
<template #title>
<span class="d-index">{{ index }}</span>
<span class="d-title">{{ title }}</span>
@@ -34,11 +34,17 @@
v-for="(d, i) in descriptions"
:key="i"
:label="d.name"
- >{{ d.value }}</el-descriptions-item
>
+ <template #label>
+ <el-text tag="b" size="small">
+ {{ d.name }}
+ </el-text>
+ </template>
+ {{ d.value }}
+ </el-descriptions-item>
</el-descriptions>
- <el-scrollbar style="width: 70%;">
+ <el-scrollbar>
<el-descriptions
title=" "
:column="2"
@@ -54,6 +60,11 @@
t == 0 ? 'descriptions-label-1' : 'descriptions-label-2'
"
>
+ <template #label>
+ <el-text tag="b" size="small">
+ {{ pic.title }}
+ </el-text>
+ </template>
<el-space>
<el-image
v-for="(p, i) in pic.path"
@@ -89,7 +100,11 @@
</el-col>
<el-col :span="12">
<el-row justify="end" class="btn-group">
- <el-button type="danger" size="small" @click="deletePro" :disabled="true"
+ <el-button
+ type="danger"
+ size="small"
+ @click="deletePro"
+ :disabled="true"
>鍒犻櫎</el-button
>
<!-- <el-button
@@ -261,16 +276,28 @@
},
// 闂鎻忚堪
descriptions() {
- return [
+ const des = [
{
+ icon: 'Location',
name: '闂浣嶇疆',
value: this.problem.location
},
{
+ icon: 'Clock',
name: '鎻愪氦鏃堕棿',
value: this.problem.time.replace('T', ' ').split('.')[0]
}
];
+ if (this.problem.ischanged) {
+ des.push({
+ icon: 'Clock',
+ name: '鏁存敼鏃堕棿',
+ value: this.problem.changedtime
+ ? this.problem.changedtime.replace('T', ' ').split('.')[0]
+ : this.problem.time.replace('T', ' ').split('.')[0]
+ });
+ }
+ return des;
},
// 闂鍥剧墖
pics() {
@@ -460,11 +487,11 @@
<!-- 姝ラ鏉¤嚜瀹氫箟鏍峰紡 -->
<style scoped>
-:deep(.el-steps--simple){
+:deep(.el-steps--simple) {
background: #fffbf731;
}
-:deep(.is-wait .el-step__icon){
+:deep(.is-wait .el-step__icon) {
height: 17px;
width: 17px;
margin-top: 3px;
@@ -474,7 +501,7 @@
font-size: var(--el-font-size-small);
}
-:deep(.is-success .el-step__icon){
+:deep(.is-success .el-step__icon) {
height: 17px;
width: 17px;
margin-top: 3px;
@@ -486,17 +513,17 @@
:deep(.el-step__head.is-process) {
border-color: var(--el-color-danger);
- color: var(--el-color-danger)
+ color: var(--el-color-danger);
}
:deep(.el-step__head.is-wait) {
border-color: var(--el-text-color-placeholder);
- color: var(--el-text-color-placeholder)
+ color: var(--el-text-color-placeholder);
}
:deep(.el-step__head.is-success) {
border-color: var(--el-color-success-light-3);
- color: var(--el-color-success-light-3)
+ color: var(--el-color-success-light-3);
}
:deep(.el-step__title.is-process) {
diff --git a/src/views/fysp/check/components/CompSubTaskStatistic.vue b/src/views/fysp/check/components/CompSubTaskStatistic.vue
index 375ae5c..58e88cf 100644
--- a/src/views/fysp/check/components/CompSubTaskStatistic.vue
+++ b/src/views/fysp/check/components/CompSubTaskStatistic.vue
@@ -1,97 +1,215 @@
<template>
- <el-space>
- <el-descriptions :column="3" size="small" border direction="vertical">
+ <el-row justify="end" v-loading="loading">
+ <el-descriptions :column="4" size="small" border direction="vertical">
+ <el-descriptions-item
+ label="鍦烘櫙鎬昏"
+ label-class-name="inspection-label"
+ class-name="secondary-content"
+ >
+ <template #label>
+ <el-text size="small"> 鍦烘櫙鎬昏 </el-text>
+ </template>
+ {{ progress.total }}
+ </el-descriptions-item>
+ <el-descriptions-item
+ label="宸℃煡鍦烘櫙"
+ label-class-name="inspection-label"
+ class-name="secondary-content"
+ >
+ <template #label>
+ <el-text size="small"> 宸℃煡鍦烘櫙 </el-text>
+ </template>
+ {{ progress.completedScenes }}
+ </el-descriptions-item>
+ <el-descriptions-item
+ label="宸℃煡鐐规"
+ label-class-name="inspection-label"
+ class-name="secondary-content"
+ >
+ <template #label>
+ <el-text size="small"> 宸℃煡鐐规 </el-text>
+ </template>
+ {{ progress.completedTimes }}
+ </el-descriptions-item>
+ <el-descriptions-item
+ label="澶嶆煡鐐规"
+ label-class-name="inspection-label"
+ class-name="secondary-content"
+ >
+ <template #label>
+ <el-text size="small"> 澶嶆煡鐐规 </el-text>
+ </template>
+ {{ progress.reviewTimes }}
+ </el-descriptions-item>
+ </el-descriptions>
+
+ <el-descriptions
+ class="m-l-4"
+ :column="3"
+ size="small"
+ border
+ direction="vertical"
+ >
<el-descriptions-item
label="闂鏁�"
label-class-name="problem-label"
class-name="secondary-content"
- >{{ summary.proCount }}</el-descriptions-item
>
+ <template #label>
+ <el-text size="small"> 闂鏁� </el-text>
+ </template>
+ {{ summary.proCount }}
+ </el-descriptions-item>
<el-descriptions-item
label="鏁存敼鏁�"
label-class-name="problem-label"
class-name="secondary-content"
- >{{ summary.changeCount }}</el-descriptions-item
>
+ <template #label>
+ <el-text size="small"> 鏁存敼鏁� </el-text>
+ </template>
+ {{ summary.changeCount }}
+ </el-descriptions-item>
<el-descriptions-item
label="鏁存敼鐜�"
label-class-name="problem-label"
- :class-name="summary.changePer < 1 ? 'danger-content' : 'secondary-content'"
- >{{ formatPercent(summary.changePer) }}</el-descriptions-item
+ :class-name="
+ summary.changePer < 1 ? 'danger-content' : 'secondary-content'
+ "
>
+ <template #label>
+ <el-text size="small"> 鏁存敼鐜� </el-text>
+ </template>
+ {{ formatPercent(summary.changePer) }}
+ </el-descriptions-item>
</el-descriptions>
- <el-descriptions :column="8" size="small" border direction="vertical">
+
+ <el-descriptions
+ class="m-l-4"
+ :column="8"
+ size="small"
+ border
+ direction="vertical"
+ >
<el-descriptions-item
- label="宸℃煡鐐规"
+ label="鏃犻棶棰�"
label-class-name="pro-check-label"
class-name="secondary-content"
- >{{ summary.total }}</el-descriptions-item
>
+ <template #label>
+ <el-text size="small"> 鏃犻棶棰� </el-text>
+ </template>
+ {{ summary.noProblem }}
+ </el-descriptions-item>
<el-descriptions-item
label="闂鏈鏍�"
label-class-name="pro-check-label"
- :class-name="summary.proUnCheck > 0 ? 'danger-content' : 'secondary-content'"
- >{{ summary.proUnCheck }}</el-descriptions-item
+ :class-name="
+ summary.proUnCheck > 0 ? 'danger-content' : 'secondary-content'
+ "
>
+ <template #label>
+ <el-text size="small"> 闂鏈鏍� </el-text>
+ </template>
+ {{ summary.proUnCheck }}
+ </el-descriptions-item>
<el-descriptions-item
label="閮ㄥ垎瀹℃牳"
label-class-name="pro-check-label"
- :class-name="summary.proPartCheck > 0 ? 'danger-content' : 'secondary-content'"
- >{{ summary.proPartCheck }}</el-descriptions-item
+ :class-name="
+ summary.proPartCheck > 0 ? 'danger-content' : 'secondary-content'
+ "
>
+ <template #label>
+ <el-text size="small"> 閮ㄥ垎瀹℃牳 </el-text>
+ </template>
+ {{ summary.proPartCheck }}
+ </el-descriptions-item>
<el-descriptions-item
label="鍏ㄩ儴瀹℃牳"
label-class-name="pro-check-label"
class-name="secondary-content"
- >{{ summary.proAllCheck }}</el-descriptions-item
>
- </el-descriptions>
- <el-descriptions :column="8" size="small" border direction="vertical">
+ <template #label>
+ <el-text size="small"> 鍏ㄩ儴瀹℃牳 </el-text>
+ </template>
+ {{ summary.proAllCheck }}
+ </el-descriptions-item>
+ <!-- </el-descriptions>
+ <el-descriptions
+ :column="4"
+ size="small"
+ border
+ direction="vertical"
+ > -->
<el-descriptions-item
label="鏈暣鏀�"
label-class-name="change-check-label"
- :class-name="summary.UnChange > 0 ? 'danger-content' : 'secondary-content'"
- >{{ summary.UnChange }}</el-descriptions-item
+ :class-name="
+ summary.UnChange > 0 ? 'danger-content' : 'secondary-content'
+ "
>
+ <template #label>
+ <el-text size="small"> 鏈暣鏀� </el-text>
+ </template>
+ {{ summary.UnChange }}
+ </el-descriptions-item>
<el-descriptions-item
label="鏁存敼鏈鏍�"
label-class-name="change-check-label"
- :class-name="summary.changeUnCheck > 0 ? 'danger-content' : 'secondary-content'"
- >{{ summary.changeUnCheck }}</el-descriptions-item
+ :class-name="
+ summary.changeUnCheck > 0 ? 'danger-content' : 'secondary-content'
+ "
>
+ <template #label>
+ <el-text size="small"> 鏁存敼鏈鏍� </el-text>
+ </template>
+ {{ summary.changeUnCheck }}
+ </el-descriptions-item>
<el-descriptions-item
label="閮ㄥ垎瀹℃牳"
label-class-name="change-check-label"
- :class-name="summary.changePartCheck > 0 ? 'danger-content' : 'secondary-content'"
- >{{ summary.changePartCheck }}</el-descriptions-item
+ :class-name="
+ summary.changePartCheck > 0 ? 'danger-content' : 'secondary-content'
+ "
>
+ <template #label>
+ <el-text size="small"> 閮ㄥ垎瀹℃牳 </el-text>
+ </template>
+ {{ summary.changePartCheck }}
+ </el-descriptions-item>
<el-descriptions-item
label="鍏ㄩ儴瀹℃牳"
label-class-name="change-check-label"
class-name="secondary-content"
- >{{ summary.changeAllCheck }}</el-descriptions-item
>
+ <template #label>
+ <el-text size="small"> 鍏ㄩ儴瀹℃牳 </el-text>
+ </template>
+ {{ summary.changeAllCheck }}
+ </el-descriptions-item>
</el-descriptions>
- </el-space>
- <!-- <el-space>
- <el-tag v-for="(s, i) in summary" :key="i" :type="s.type" size="small">
- <el-icon v-if="s.icon" color="">
- <component :is="s.icon"></component>
- </el-icon>
- {{ s.name + ': ' + s.value }}
- </el-tag>
- </el-space> -->
+ </el-row>
</template>
<script>
export default {
props: {
- subtasks: Array
+ loading: Boolean,
+ subtasks: {
+ type: Array,
+ default: () => []
+ },
+ monitorObjList: {
+ type: Array,
+ default: () => []
+ }
},
computed: {
//浠诲姟闂瀹℃牳鎯呭喌缁熻淇℃伅
summary() {
const _summary = {
total: 0,
+ noProblem: 0,
proUnCheck: 0,
proPartCheck: 0,
proAllCheck: 0,
@@ -110,7 +228,7 @@
// 闂瀹℃牳鎯呭喌
if (s.data.proNum == 0) {
- _summary.proAllCheck++;
+ _summary.noProblem++;
} else if (s.data.proCheckedNum == 0) {
_summary.proUnCheck++;
} else if (s.data.proCheckedNum < s.data.proNum) {
@@ -123,10 +241,9 @@
if (s.data.changeNum < s.data.proNum) {
_summary.UnChange++;
}
-
// 鏁存敼瀹℃牳鎯呭喌
- if (s.data.proNum == 0) {
- _summary.changeAllCheck++;
+ else if (s.data.proNum == 0) {
+ // _summary.changeAllCheck++;
} else if (s.data.changeNum > 0) {
if (s.data.changeCheckedNum == 0) {
_summary.changeUnCheck++;
@@ -142,6 +259,25 @@
_summary.changePer = _summary.changeCount / _summary.proCount;
}
return _summary;
+ },
+ // 宸℃煡浠诲姟鎵ц杩涘害
+ progress() {
+ const _res = {
+ total: 0,
+ completedScenes: 0,
+ completedTimes: 0,
+ reviewTimes: 0
+ };
+ this.monitorObjList.forEach((m) => {
+ _res.total++;
+ const times = parseInt(m.extension1);
+ if (times) {
+ _res.completedScenes++;
+ _res.completedTimes += times;
+ _res.reviewTimes += times - 1;
+ }
+ });
+ return _res;
}
},
methods: {
@@ -157,23 +293,21 @@
/* font-size: 13px !important; */
}
+:deep(.inspection-label) {
+ background: var(--el-color-success-light-5) !important;
+ /* color: white !important; */
+}
+
:deep(.problem-label) {
background: var(--el-color-primary-light-7) !important;
}
-:deep(.problem-content) {
- /* background: var(--el-color-danger-light-9); */
-}
:deep(.pro-check-label) {
- background: var(--el-color-success-light-7) !important;
-}
-:deep(.pro-check-content) {
+ background: var(--el-color-warning-light-7) !important;
}
:deep(.change-check-label) {
- background: var(--el-color-warning-light-7) !important;
-}
-:deep(.change-check-content) {
+ background: var(--el-color-danger-light-7) !important;
}
:deep(.danger-content) {
diff --git a/src/views/fysp/evaluation/components/CompDataResultEdit.vue b/src/views/fysp/evaluation/components/CompDataResultEdit.vue
index fbfaf1c..6463e7d 100644
--- a/src/views/fysp/evaluation/components/CompDataResultEdit.vue
+++ b/src/views/fysp/evaluation/components/CompDataResultEdit.vue
@@ -10,9 +10,7 @@
:auto-upload="false"
>
<template #trigger>
- <el-button type="primary" :loading="tableLoading"
- >涓婁紶鐩戞祴鏁版嵁缁熻缁撴灉</el-button
- >
+ <el-button type="primary" :loading="tableLoading">瀵煎叆鏂囦欢</el-button>
</template>
<template #tip>
<div>
@@ -86,7 +84,7 @@
</el-table-column>
<el-table-column prop="drTime" label="鏃堕棿" width="100">
<template #default="{ row }">
- <span>{{ $fm.formatYMD(row.drTime) }}</span>
+ <span>{{ $fm.formatYM(row.drTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="drExceedTimes" label="瓒呮爣娆℃暟">
@@ -206,6 +204,13 @@
</template>
</el-table-column>
</el-table>
+ <el-button
+ type="primary"
+ :loading="uploadLoading"
+ icon="upload"
+ @click="uploadFile"
+ >涓婁紶缁熻缁撴灉</el-button
+ >
</template>
<script setup>
import { ref, reactive, watch, onMounted, getCurrentInstance } from 'vue';
@@ -229,6 +234,7 @@
const tableLoading = ref(false);
const loadTxt = ref('');
const tips = ref('');
+const uploadLoading = ref(false);
const tableRowClassName = ({ row, rowIndex }) => {
if (row.loading) {
@@ -351,7 +357,9 @@
}
// 涓婁紶缁熻缁撴灉鏂囨。
-function uploadFile() {}
+function uploadFile() {
+ monitordataApi.uploadDustDataResult(data.value).then((res) => {});
+}
onMounted(() => {
fetchDustDataResult();
--
Gitblit v1.9.3