From 3d10a75ca019864d5aa7053de0ee36d64554e171 Mon Sep 17 00:00:00 2001
From: fanluyan <754122931@qq.com>
Date: Mon, 26 Aug 2024 14:40:26 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E7=89=87=E5=9C=A8?=
=?UTF-8?q?=E7=BA=BF=E6=95=B0=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/api/index.js | 7 +-
.../picReport/components/lineStatusDialog.vue | 296 ++++++++++++++++++
src/views/picReport/components/selectLine.vue | 17 +-
src/views/picReport/index.vue | 196 +++++-------
.../picReport/{indexbak.vue => indexbak1.vue} | 100 +-----
5 files changed, 389 insertions(+), 227 deletions(-)
create mode 100644 src/views/picReport/components/lineStatusDialog.vue
rename src/views/picReport/{indexbak.vue => indexbak1.vue} (72%)
diff --git a/src/utils/api/index.js b/src/utils/api/index.js
index 84794e1..194b05f 100644
--- a/src/utils/api/index.js
+++ b/src/utils/api/index.js
@@ -241,8 +241,11 @@ export function updateAuthApi(data) {
export function picRportApi(data) {
return request({
url: "/xymanager/terminal/statMaintain",
- method: "get",
- params: data,
+ method: "post",
+ data,
+ headers: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ },
});
}
diff --git a/src/views/picReport/components/lineStatusDialog.vue b/src/views/picReport/components/lineStatusDialog.vue
new file mode 100644
index 0000000..a67b66b
--- /dev/null
+++ b/src/views/picReport/components/lineStatusDialog.vue
@@ -0,0 +1,296 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+ {{ xlName }}
+
+
+
+
+ {{ termTotalNum }}
+
+
+
+ {{ scope.row.termList.length }}
+
+
+
+
+ {{
+ ((scope.row.termList.length / termTotalNum) * 100).toFixed(
+ 2
+ ) + "%"
+ }}
+
+
+
+
+ {{
+ scope.row.termList.filter(
+ (term) => parseInt(term.uploads, 10) > 0
+ ).length
+ }}
+
+
+
+
+ {{
+ (
+ (scope.row.termList.filter(
+ (term) => parseInt(term.uploads, 10) > 0
+ ).length /
+ termTotalNum) *
+ 100
+ ).toFixed(2) + "%"
+ }}
+
+
+
+
+ {{
+ scope.row.termList.filter(
+ (term) =>
+ parseInt(term.uploads, 10) >=
+ (parseInt(picNum, 10) *
+ parseInt(norGraphRate.replace("%", ""), 10)) /
+ 100
+ ).length
+ }}
+
+
+
+
+ {{
+ (
+ (scope.row.termList.filter(
+ (term) =>
+ parseInt(term.uploads, 10) >=
+ (parseInt(picNum, 10) *
+ parseInt(norGraphRate.replace("%", ""), 10)) /
+ 100
+ ).length /
+ termTotalNum) *
+ 100
+ ).toFixed(2) + "%"
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/picReport/components/selectLine.vue b/src/views/picReport/components/selectLine.vue
index 4b1d00a..a0a8b61 100644
--- a/src/views/picReport/components/selectLine.vue
+++ b/src/views/picReport/components/selectLine.vue
@@ -36,7 +36,7 @@ export default {
const storedArray = localStorage.getItem("checkListLocal");
if (storedArray) {
// 将JSON字符串转换回数组
- this.checkList = JSON.parse(storedArray).map((item) => item.id);
+ this.checkList = JSON.parse(storedArray);
}
},
methods: {
@@ -53,20 +53,7 @@ export default {
},
saveCheck() {
console.log(this.checkList);
- const filteredItems = this.lineListData.filter((item) =>
- this.checkList.includes(item.id)
- );
- const combinedItems = filteredItems.map((item) => ({
- photoCount: item.photoCount,
- photoRate: item.photoRate,
- id: item.id,
- dyLevelName: item.dyLevelName,
- name: item.name,
- }));
- // 你可以直接返回combinedItems,或者将其赋值给data中的某个属性
- console.log(combinedItems);
- const arrayAsString = JSON.stringify(combinedItems);
- localStorage.setItem("checkListLocal", arrayAsString);
+ localStorage.setItem("checkListLocal", JSON.stringify(this.checkList));
this.dialogVisible = false;
this.$parent.getTablefun();
},
diff --git a/src/views/picReport/index.vue b/src/views/picReport/index.vue
index a5f7416..fbce125 100644
--- a/src/views/picReport/index.vue
+++ b/src/views/picReport/index.vue
@@ -2,35 +2,8 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
查询
@@ -66,29 +40,47 @@
>
-
{{ dyName }}
+
- {{ xlName }}
+
+ {{ scope.row.line.name }}
+
-
-
{{ termTotalNum }}
-
+
- {{ scope.row.termList.length }}
+ {{ scope.row.dayList[0].day }}
+
+
+ {{ scope.row.termList.length }}
+
+
+
+ {{ scope.row.dayList[0].termList.length }}
+
{{
- ((scope.row.termList.length / termTotalNum) * 100).toFixed(2) +
- "%"
- }}
-
+ (
+ (scope.row.dayList[0].termList.length /
+ scope.row.termList.length) *
+ 100
+ ).toFixed(2) + "%"
+ }}
{{
- scope.row.termList.filter(
+ scope.row.dayList[0].termList.filter(
(term) => parseInt(term.uploads, 10) > 0
).length
}}
@@ -98,23 +90,23 @@
{{
(
- (scope.row.termList.filter(
+ (scope.row.dayList[0].termList.filter(
(term) => parseInt(term.uploads, 10) > 0
).length /
- termTotalNum) *
+ scope.row.termList.length) *
100
).toFixed(2) + "%"
- }}
-
+ }}
{{
- scope.row.termList.filter(
+ scope.row.dayList[0].termList.filter(
(term) =>
parseInt(term.uploads, 10) >=
- (parseInt(formdata.picNum, 10) *
- parseInt(formdata.norGraphRate.replace("%", ""), 10)) /
+ (parseInt(scope.row.line.photoCount, 10) *
+ parseInt(scope.row.line.photoRate.replace("%", ""), 10)) /
100
).length
}}
@@ -124,14 +116,14 @@
{{
(
- (scope.row.termList.filter(
+ (scope.row.dayList[0].termList.filter(
(term) =>
parseInt(term.uploads, 10) >=
- (parseInt(formdata.picNum, 10) *
- parseInt(formdata.norGraphRate.replace("%", ""), 10)) /
+ (parseInt(scope.row.line.photoCount, 10) *
+ parseInt(scope.row.line.photoRate.replace("%", ""), 10)) /
100
).length /
- termTotalNum) *
+ scope.row.termList.length) *
100
).toFixed(2) + "%"
}}
@@ -139,13 +131,17 @@
+
+
@@ -275,23 +237,9 @@ export default {
.el-form-item--small.el-form-item {
margin-bottom: 0px;
}
- .dybox {
- .el-select {
- width: 120px;
- }
- }
- .xlbox {
- .el-select {
- width: 180px;
- }
- }
- .pambox {
- .el-input {
- width: 70px;
- }
- .el-input--suffix .el-input__inner {
- padding: 8px;
- }
+
+ .lineBtn {
+ margin-right: 12px;
}
.dateclass {
.el-date-editor.el-input,
diff --git a/src/views/picReport/indexbak.vue b/src/views/picReport/indexbak1.vue
similarity index 72%
rename from src/views/picReport/indexbak.vue
rename to src/views/picReport/indexbak1.vue
index 33cc4ef..a5f7416 100644
--- a/src/views/picReport/indexbak.vue
+++ b/src/views/picReport/indexbak1.vue
@@ -53,7 +53,6 @@
查询
-
@@ -67,46 +66,29 @@
>
-
-
- {{ scope.row.termList[0].dyName }}
-
-
+ {{ dyName }}
-
- {{ scope.row.termList[0].lineName }}
-
-
-
-
- {{ scope.row.dayList[0].day }}
-
-
-
-
- {{ scope.row.termList.length }}
-
+ {{ xlName }}
+
+ {{ termTotalNum }}
- {{ scope.row.dayList[0].termList.length }}
+ {{ scope.row.termList.length }}
{{
- (
- (scope.row.dayList[0].termList.length /
- scope.row.termList.length) *
- 100
- ).toFixed(2) + "%"
+ ((scope.row.termList.length / termTotalNum) * 100).toFixed(2) +
+ "%"
}}
{{
- scope.row.dayList[0].termList.filter(
+ scope.row.termList.filter(
(term) => parseInt(term.uploads, 10) > 0
).length
}}
@@ -116,7 +98,7 @@
{{
(
- (scope.row.dayList[0].termList.filter(
+ (scope.row.termList.filter(
(term) => parseInt(term.uploads, 10) > 0
).length /
termTotalNum) *
@@ -128,7 +110,7 @@
{{
- scope.row.dayList[0].termList.filter(
+ scope.row.termList.filter(
(term) =>
parseInt(term.uploads, 10) >=
(parseInt(formdata.picNum, 10) *
@@ -161,11 +143,9 @@