From d41acebbd89f171b0eeb205fca4f68043ca85f95 Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期三, 03 十二月 2025 19:47:24 +0800
Subject: [PATCH] 选配与暂存
---
项目代码/DP/src/views/indexs/station-one.vue | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/DP/src/views/indexs/station-one.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/DP/src/views/indexs/station-one.vue"
index 06bd00d..9a8ae67 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/DP/src/views/indexs/station-one.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/DP/src/views/indexs/station-one.vue"
@@ -27,8 +27,8 @@
export default {
data() {
return {
- statusTypes: ['鏈夎揣', '绌鸿揣浣�', '鏈夎揣绂佺敤', '閿佸畾'], // 琛ㄥご鐘舵�佺被鍨�
- statusCounts: [0, 0, 0,0] // 瀵瑰簲鐘舵�佺殑鏁伴噺
+ statusTypes: ['鏈夎揣', '绌鸿揣浣�'], // 琛ㄥご鐘舵�佺被鍨�
+ statusCounts: [0, 0] // 瀵瑰簲鐘舵�佺殑鏁伴噺
};
},
created() {
@@ -36,15 +36,16 @@
},
methods: {
fetchData() {
- axios.post("http://127.0.0.1:5000/api/LocationInfo/LocationStatus", null)
+ axios.post("http://172.21.1.139:5000/api/LocationInfo/LocationStatuskt", null)
.then((response) => {
// 鍋囪API杩斿洖鐨勬暟鎹牸寮忎负锛歔{status: '鏈夎揣', count: 9}, {status: '绌鸿揣浣�', count: 2}, ...]
- const newCounts = [0, 0, 0,0];
+ const newCounts = [0, 0];
console.log(response.data)
+
newCounts[0] = response.data.data[0].count;
- newCounts[1] = response.data.data[1].count;
- newCounts[2] = response.data.data[2].count;
- newCounts[3] = response.data.data[3].count;
+ newCounts[1] = response.data.data[1].count+response.data.data[2].count+response.data.data[3].count;
+ // newCounts[2] = response.data.data[2].count;
+ // newCounts[3] = response.data.data[3].count;
this.statusCounts = newCounts;
})
--
Gitblit v1.9.3