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 @@ + + + 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 }} + - - {{ termTotalNum }} - + + + + + + + + ( + (scope.row.dayList[0].termList.length / + scope.row.termList.length) * + 100 + ).toFixed(2) + "%" + }}