From 83ac952bb66518e7ce190b08741fdef28edcfd4f Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 20 十一月 2024 09:21:36 +0800
Subject: [PATCH] 1. 修复场景报告没有图片无法下载的问题
---
src/views/fysp/data-product/ProdSceneReport.vue | 5 -
src/api/index.js | 44 +++++++-------
src/views/fysp/check/components/CompSubTaskStatistic.vue | 98 ++++++++++++++++++++++++--------
src/components/core/SiderMenu.vue | 4
src/constants/menu.js | 4
5 files changed, 102 insertions(+), 53 deletions(-)
diff --git a/src/api/index.js b/src/api/index.js
index 81c0cff..22e0559 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -38,25 +38,24 @@
i.interceptors.request.use(
function (config) {
// 鍦ㄥ彂閫佽姹備箣鍓嶅仛浜涗粈涔�
- if (import.meta.env.DEV) {
- console.log('==>璇锋眰寮�濮�');
- console.log(`${config.baseURL}${config.url}`);
- if (config.data) {
- console.log('==>璇锋眰鏁版嵁', config.data);
- }
- }
+ // if (import.meta.env.DEV) {
+ // console.log('==>璇锋眰寮�濮�');
+ // console.log(`${config.baseURL}${config.url}`);
+ // if (config.data) {
+ // console.log('==>璇锋眰鏁版嵁', config.data);
+ // }
+ // }
return config;
},
function (error) {
// 瀵硅姹傞敊璇仛浜涗粈涔�
if (import.meta.env.DEV) {
- console.log('==>璇锋眰寮�濮�');
- console.log(error);
+ console.error('|--璇锋眰閿欒: ', error);
}
- ElMessage({
- message: error,
- type: 'error'
- });
+ // ElMessage({
+ // message: error,
+ // type: 'error'
+ // });
return Promise.reject(error);
}
);
@@ -67,8 +66,12 @@
// 2xx 鑼冨洿鍐呯殑鐘舵�佺爜閮戒細瑙﹀彂璇ュ嚱鏁般��
// 瀵瑰搷搴旀暟鎹仛鐐逛粈涔�
if (import.meta.env.DEV) {
- console.log(response);
- console.log('==>璇锋眰缁撴潫');
+ console.log('|------------------------------------------');
+ console.log('|--璇锋眰: ', `${response.request.responseURL}`);
+ if (response.config.data) {
+ console.log('|--鏁版嵁: ', response.config.data);
+ }
+ console.log('|--缁撴灉: ', response.data);
}
if (response.status == 200) {
if (response.data.success != undefined && response.data.success != null) {
@@ -92,13 +95,12 @@
// 瓒呭嚭 2xx 鑼冨洿鐨勭姸鎬佺爜閮戒細瑙﹀彂璇ュ嚱鏁般��
// 瀵瑰搷搴旈敊璇仛鐐逛粈涔�
if (import.meta.env.DEV) {
- console.log(error);
- console.log('==>璇锋眰缁撴潫');
+ console.error('|--璇锋眰閿欒: ', error);
}
- ElMessage({
- message: error,
- type: 'error'
- });
+ // ElMessage({
+ // message: error,
+ // type: 'error'
+ // });
return Promise.reject(error);
}
);
diff --git a/src/components/core/SiderMenu.vue b/src/components/core/SiderMenu.vue
index 4e53868..162fc70 100644
--- a/src/components/core/SiderMenu.vue
+++ b/src/components/core/SiderMenu.vue
@@ -77,7 +77,7 @@
data() {
return {
popVisible: false,
- menuHeight: '600px',
+ menuHeight: '80vh',
title: '鐢熸�佺幆澧冪嚎涓婄洃绠�',
subTitle: '漏涓婃捣椋炵窘鐜繚绉戞妧鏈夐檺鍏徃',
sysIndex: 0,
@@ -179,7 +179,7 @@
.el-menu-vertical-demo:not(.el-menu--collapse) {
/* width: 200px; */
min-height: 100vh;
- max-height: 100vh;
+ /* max-height: 100vh; */
}
.el-menu--collapse {
diff --git a/src/constants/menu.js b/src/constants/menu.js
index 9f44cb9..c5a1b56 100644
--- a/src/constants/menu.js
+++ b/src/constants/menu.js
@@ -25,7 +25,7 @@
{
path: '/fysp/procheck',
icon: 'CircleCheck',
- name: '闂瀹℃牳'
+ name: '闂鏁存敼'
},
{
icon: 'List',
@@ -76,7 +76,7 @@
{
path: '/fysp/data-product/scenereport',
icon: 'Document',
- name: '鍦烘櫙鎶ュ憡'
+ name: '鍦烘櫙鍒嗘瀽鎶ュ憡'
}
]
},
diff --git a/src/views/fysp/check/components/CompSubTaskStatistic.vue b/src/views/fysp/check/components/CompSubTaskStatistic.vue
index 7709ba4..bdff289 100644
--- a/src/views/fysp/check/components/CompSubTaskStatistic.vue
+++ b/src/views/fysp/check/components/CompSubTaskStatistic.vue
@@ -1,14 +1,45 @@
<template>
- <el-descriptions :column="8" size="small" border direction="vertical">
- <el-descriptions-item label="浠诲姟鎬昏">{{ summary.total }}</el-descriptions-item>
- <el-descriptions-item label="闂鏈鏍�">{{ summary.proUnCheck }}</el-descriptions-item>
- <el-descriptions-item label="闂閮ㄥ垎瀹℃牳">{{ summary.proPartCheck }}</el-descriptions-item>
- <el-descriptions-item label="闂鍏ㄩ儴瀹℃牳">{{ summary.proAllCheck }}</el-descriptions-item>
- <el-descriptions-item label="鏈暣鏀�">{{ summary.UnChange }}</el-descriptions-item>
- <el-descriptions-item label="鏁存敼鏈鏍�">{{ summary.changeUnCheck }}</el-descriptions-item>
- <el-descriptions-item label="鏁存敼閮ㄥ垎瀹℃牳">{{ summary.changePartCheck }}</el-descriptions-item>
- <el-descriptions-item label="鏁存敼鍏ㄩ儴瀹℃牳">{{ summary.changeAllCheck }}</el-descriptions-item>
- </el-descriptions>
+ <el-space>
+ <el-descriptions :column="3" size="small" border direction="vertical">
+ <el-descriptions-item label="闂鏁�">{{
+ summary.proCount
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鏁存敼鏁�">{{
+ summary.changeCount
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鏁存敼鐜�">{{
+ summary.changePer
+ }}</el-descriptions-item>
+ </el-descriptions>
+ <el-descriptions :column="8" size="small" border direction="vertical">
+ <el-descriptions-item label="宸℃煡鐐规">{{
+ summary.total
+ }}</el-descriptions-item>
+ <el-descriptions-item label="闂鏈鏍�">{{
+ summary.proUnCheck
+ }}</el-descriptions-item>
+ <el-descriptions-item label="閮ㄥ垎瀹℃牳">{{
+ summary.proPartCheck
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鍏ㄩ儴瀹℃牳">{{
+ summary.proAllCheck
+ }}</el-descriptions-item>
+ </el-descriptions>
+ <el-descriptions :column="8" size="small" border direction="vertical">
+ <el-descriptions-item label="鏈暣鏀�">{{
+ summary.UnChange
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鏁存敼鏈鏍�">{{
+ summary.changeUnCheck
+ }}</el-descriptions-item>
+ <el-descriptions-item label="閮ㄥ垎瀹℃牳">{{
+ summary.changePartCheck
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鍏ㄩ儴瀹℃牳">{{
+ 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="">
@@ -34,40 +65,51 @@
UnChange: 0,
changeUnCheck: 0,
changePartCheck: 0,
- changeAllCheck: 0
- }
+ changeAllCheck: 0,
+ proCount: 0,
+ changeCount: 0,
+ changePer: '0%'
+ };
this.subtasks.forEach((s) => {
- _summary.total++
+ _summary.total++;
+ _summary.proCount += s.data.proNum;
+ _summary.changeCount += s.data.changeNum;
// 闂瀹℃牳鎯呭喌
if (s.data.proNum == 0) {
- _summary.proAllCheck++
+ _summary.proAllCheck++;
} else if (s.data.proCheckedNum == 0) {
- _summary.proUnCheck++
+ _summary.proUnCheck++;
} else if (s.data.proCheckedNum < s.data.proNum) {
- _summary.proPartCheck++
+ _summary.proPartCheck++;
} else {
- _summary.proAllCheck++
+ _summary.proAllCheck++;
}
// 鏄惁鏈夋湭鏁存敼
if (s.data.changeNum < s.data.proNum) {
- _summary.UnChange++
+ _summary.UnChange++;
}
// 鏁存敼瀹℃牳鎯呭喌
if (s.data.proNum == 0) {
- _summary.changeAllCheck++
+ _summary.changeAllCheck++;
} else if (s.data.changeNum > 0) {
if (s.data.changeCheckedNum == 0) {
- _summary.changeUnCheck++
+ _summary.changeUnCheck++;
} else if (s.data.changeCheckedNum < s.data.changeNum) {
- _summary.changePartCheck++
+ _summary.changePartCheck++;
} else {
- _summary.changeAllCheck++
+ _summary.changeAllCheck++;
}
}
- })
+ });
+
+ if (_summary.proCount != 0) {
+ _summary.changePer =
+ Math.round((_summary.changeCount / _summary.proCount) * 1000) / 10 +
+ '%';
+ }
// _summary.forEach((s, i) => {
// if (i > 0) {
// let per = Math.round((s.value / _summary[0].value) * 1000) / 10
@@ -76,8 +118,14 @@
// }
// })
- return _summary
+ return _summary;
}
}
-}
+};
</script>
+<style scoped>
+:deep(.el-descriptions__cell) {
+ padding: 0px 4px !important;
+ /* font-size: 13px !important; */
+}
+</style>
diff --git a/src/views/fysp/data-product/ProdSceneReport.vue b/src/views/fysp/data-product/ProdSceneReport.vue
index 0c55424..dd38e5c 100644
--- a/src/views/fysp/data-product/ProdSceneReport.vue
+++ b/src/views/fysp/data-product/ProdSceneReport.vue
@@ -351,10 +351,10 @@
const d2 =
i + 1 < deviceList.value.length ? deviceList.value[i + 1] : undefined;
_deviceList.push({
- _showStatusPic_1: d1._showStatusPic,
+ _showStatusPic_1: d1._showStatusPic ? d1._showStatusPic : right_triangle,
_deviceTypeName_1: d1._deviceTypeName,
// hasPic2: d2 ? true : false,
- _showStatusPic_2: d2 ? d2._showStatusPic : right_triangle,
+ _showStatusPic_2: d2 ? (d2._showStatusPic ? d2._showStatusPic : right_triangle) : right_triangle,
_deviceTypeName_2: d2 ? d2._deviceTypeName : '',
});
}
@@ -398,7 +398,6 @@
}
}
const date = dayjs(curSubtask.value.data.stPlanTime).format('MM鏈圖D鏃�');
- console.log(param);
docLoading.value = true;
exportDocx(
--
Gitblit v1.9.3