From 4529cc97736ab92b30fb6351b37970bf53a22794 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 01 十一月 2024 02:47:14 +0800
Subject: [PATCH] 数据中心优化完成
---
src/views/screen/newPage/index.vue | 59 ++++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 36 insertions(+), 23 deletions(-)
diff --git a/src/views/screen/newPage/index.vue b/src/views/screen/newPage/index.vue
index 62ec7c4..4e2d483 100644
--- a/src/views/screen/newPage/index.vue
+++ b/src/views/screen/newPage/index.vue
@@ -26,7 +26,7 @@
</div>
</div>
<div class="large_screen_box">
- <NewMap></NewMap>
+ <NewMap @clickMap="getDeptId"></NewMap>
</div>
<div class="left_box">
@@ -45,13 +45,13 @@
</div>
</div>
<div class="data-info">
- <div class="data-lable center">璁惧姝e父鏁�</div>
+ <div class="data-lable center">姝e父鏁�</div>
<div class="data-num type2 center">
<span v-roll>{{ item.normalNum }}</span>
</div>
</div>
<div class="data-info">
- <div class="data-lable center">璁惧寮傚父鏁�</div>
+ <div class="data-lable center">寮傚父鏁�</div>
<div class="data-num type3 center">
<span v-roll>{{ item.errorNum }}</span>
</div>
@@ -86,9 +86,8 @@
overflow: hidden;
overflow-x: auto;
margin-top: -9px;
- height: 90%;
">
- <div style="width: 750px">
+ <div style="width: 780px">
<CarChart class="wrapper-item" :carList="carList"></CarChart>
</div>
</div>
@@ -100,7 +99,6 @@
<div style="
overflow: auto;
margin-top: -9px;
- height: 90%;
">
<div style="width: 1100px">
<VideoChart class="wrapper-item" :videoList="videoList"></VideoChart>
@@ -120,7 +118,7 @@
import VideoChart from "../components/screen-examine/components/video-chart.vue";
import ScreenData from "../components/screen-data/index.vue";
import NewMap from "./components/newMap.vue";
-import { getDeviceData, getWorkOrderData, getWorkOrderRegion, getNormalRate, checkFace, checkCar, checkVideo } from "@/api/newpage";
+import { getDepartmentData, getDeviceData, getWorkOrderData, getWorkOrderRegion, getNormalRate, checkFace, checkCar, checkVideo } from "@/api/newpage";
export default {
name: "Newpage",
components: {
@@ -135,8 +133,10 @@
},
data() {
return {
+ deptId: '',
+ deptList: [],
isEnd: false,
- activeName: "1",
+ activeName: "2",
testData1: [
{
name: "鐪佸巺鏁版嵁",
@@ -161,9 +161,25 @@
};
},
mounted() {
+ // 鑾峰彇閮ㄩ棬
+ getDepartmentData()
+ .then((res) => {
+ this.deptList = res.data;
+ })
+ .catch((err) => { });
+ // 鏌ヨ鏁版嵁
this.getData();
},
methods: {
+ getDeptId(deptName) {
+ let deptId = this.deptList.find(item => item.area === deptName).deptId;
+ if (deptId === this.deptId) {
+ this.deptId = '';
+ } else {
+ this.deptId = deptId
+ }
+ this.getData();
+ },
returnPath() {
this.$router.push("/index");
},
@@ -171,47 +187,44 @@
console.log(tab, event);
},
getData() {
- getDeviceData()
+ getDeviceData(this.activeName, this.deptId)
.then((res) => {
this.deviceList = res.data;
})
.catch((err) => { });
- getWorkOrderData()
+ getWorkOrderData(this.activeName, this.deptId)
.then((res) => {
this.workOrderData = res.data;
})
.catch((err) => { });
- getWorkOrderRegion()
+ getWorkOrderRegion(this.activeName, this.deptId)
.then((res) => {
this.workOrderRegion = res.data;
})
.catch((err) => { });
- this.getTableList();
- checkCar()
+ getNormalRate(this.activeName, this.deptId)
+ .then((res) => {
+ this.tableData = res.data;
+ })
+ .catch((err) => { });
+ checkCar(this.activeName, this.deptId)
.then((res) => {
this.carList = res.data;
})
.catch((err) => { });
- checkFace()
+ checkFace(this.activeName, this.deptId)
.then((res) => {
this.faceList = res.data;
})
.catch((err) => { });
- checkVideo()
+ checkVideo(this.activeName, this.deptId)
.then((res) => {
this.videoList = res.data;
})
.catch((err) => { });
},
- getTableList() {
- getNormalRate(this.activeName)
- .then((res) => {
- this.tableData = res.data;
- })
- .catch((err) => { });
- },
tabChange() {
- this.getTableList()
+ this.getData();
}
},
};
--
Gitblit v1.8.0