From 78100600b17b48336b5a60b0e648b1bc98a53a90 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期三, 21 八月 2024 18:00:49 +0800
Subject: [PATCH] feat:大屏查询条件
---
src/api/newpage.js | 38 +++++++++++-------
src/views/screen/components/screen-examine/components/car-chart.vue | 2 +
src/views/screen/newPage/index.vue | 51 ++++++++++++++++---------
src/views/screen/newPage/components/newMap.vue | 1
src/views/screen/components/screen-examine/components/video-chart.vue | 4 +
src/views/screen/components/screen-examine/components/face-chart.vue | 2 +
6 files changed, 64 insertions(+), 34 deletions(-)
diff --git a/src/api/newpage.js b/src/api/newpage.js
index 70c4e00..37db17d 100644
--- a/src/api/newpage.js
+++ b/src/api/newpage.js
@@ -1,57 +1,65 @@
import request from "@/utils/request";
-// 璁惧鏁版嵁
-export function getDeviceData() {
+// 鑾峰彇鍦板尯閮ㄩ棬
+export function getDepartmentData() {
return request({
- url: "/dashboard/monitor/total",
+ url: "/dashboard/department",
+ method: "get",
+ });
+}
+
+// 璁惧鏁版嵁
+export function getDeviceData(dataScope, deptId) {
+ return request({
+ url: "/dashboard/monitor/total?dataScope=" + dataScope + "&deptId=" + deptId,
method: "get",
});
}
// 宸ュ崟鏁版嵁
-export function getWorkOrderData() {
+export function getWorkOrderData(dataScope, deptId) {
return request({
- url: "/dashboard/workOrder/total",
+ url: "/dashboard/workOrder/total?dataScope=" + dataScope + "&deptId=" + deptId,
method: "get",
});
}
// 宸ュ崟鍦板尯
-export function getWorkOrderRegion() {
+export function getWorkOrderRegion(dataScope, deptId) {
return request({
- url: "/dashboard/workOrder/region",
+ url: "/dashboard/workOrder/region?dataScope=" + dataScope + "&deptId=" + deptId,
method: "get",
});
}
//璁惧姝e父鐜�
-export function getNormalRate(id) {
+export function getNormalRate(dataScope, deptId) {
return request({
- url: "/dashboard/monitor/rate?dataScope=" + id,
+ url: "/dashboard/monitor/rate?dataScope=" + dataScope + "&deptId=" + deptId,
method: "get",
});
}
//浜鸿劯鑰冩牳鏁版嵁
-export function checkFace(id) {
+export function checkFace(dataScope, deptId) {
return request({
- url: "/dashboard/check/face",
+ url: "/dashboard/check/face?dataScope=" + dataScope + "&deptId=" + deptId,
method: "get",
});
}
// 杞﹁締鑰冩牳鏁版嵁
-export function checkCar(id) {
+export function checkCar(dataScope, deptId) {
return request({
- url: "/dashboard/check/car",
+ url: "/dashboard/check/car?dataScope=" + dataScope + "&deptId=" + deptId,
method: "get",
});
}
// 瑙嗛鑰冩牳鏁版嵁
-export function checkVideo(id) {
+export function checkVideo(dataScope, deptId) {
return request({
- url: "/dashboard/check/video",
+ url: "/dashboard/check/video?dataScope=" + dataScope + "&deptId=" + deptId,
method: "get",
});
}
diff --git a/src/views/screen/components/screen-examine/components/car-chart.vue b/src/views/screen/components/screen-examine/components/car-chart.vue
index 48f4788..a21654c 100644
--- a/src/views/screen/components/screen-examine/components/car-chart.vue
+++ b/src/views/screen/components/screen-examine/components/car-chart.vue
@@ -43,6 +43,8 @@
// "vehicleUploadTimeliness": 95.26, //鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�
// "vehicleUrlAvailability": 95.26, //url鍙敤鎬�
// "vehiclePictureAvailability": 95.26 //鎶撴媿鏁版嵁澶у浘鍙敤鎬�
+ this.dataList = [];
+
let item = { value: 0, name: "", id: 0, routerUrl: "" }
item.value = this.carList.viewConnectStability
item.name = "瑙嗗浘搴撳鎺ョǔ瀹氭��"
diff --git a/src/views/screen/components/screen-examine/components/face-chart.vue b/src/views/screen/components/screen-examine/components/face-chart.vue
index 3cc6b3f..2bd3d77 100644
--- a/src/views/screen/components/screen-examine/components/face-chart.vue
+++ b/src/views/screen/components/screen-examine/components/face-chart.vue
@@ -41,6 +41,8 @@
// "faceTimingAccuracy": 96.39, //鎶撴媿鍥剧墖鏃堕挓鍑嗙‘鎬�
// "faceUploadTimeliness": 96.39, //鎶撴媿鏁版嵁涓婁紶鍙婃椂鎬�
// "facePictureAvailability": 96.39 //鎶撴媿鏁版嵁澶у浘鍙敤鎬�
+ this.dataList = [];
+
let item = { value: 0, name: "", id: 0, routerUrl: "" }
item.value = this.faceList.viewConnectStability
item.name = "瑙嗗浘搴撳鎺ョǔ瀹氭��"
diff --git a/src/views/screen/components/screen-examine/components/video-chart.vue b/src/views/screen/components/screen-examine/components/video-chart.vue
index c008384..1e44dc7 100644
--- a/src/views/screen/components/screen-examine/components/video-chart.vue
+++ b/src/views/screen/components/screen-examine/components/video-chart.vue
@@ -54,7 +54,9 @@
// "videoTransmissionBoundaryIntegrityDetection": 96.07, //浼犺緭缃戣竟鐣屽畬鏁存�ф娴嬫墸鍒嗛」
// "keyCommandImageOnline": 96.41, //鏈堣繍琛岀巼
// "operatingRate": 96.07 //閲嶇偣鎸囨尌鍥惧儚鍦ㄧ嚎鐜�
- let item = { value: 0, name: "", id: 0, routerUrl: "" }
+ this.dataList = [];
+
+ let item = { value: 0, name: "", id: 0, routerUrl: "" }
item.value = this.videoList.platformOnline
item.name = "骞冲彴鍦ㄧ嚎鐜�"
item.id = 1
diff --git a/src/views/screen/newPage/components/newMap.vue b/src/views/screen/newPage/components/newMap.vue
index e490acc..b24dc5d 100644
--- a/src/views/screen/newPage/components/newMap.vue
+++ b/src/views/screen/newPage/components/newMap.vue
@@ -121,6 +121,7 @@
mapChart = echarts.init(this.$refs.map);
mapChart.setOption(mapConfig, true);
mapChart.on("click", (params) => {
+ this.$emit('clickMap', params.name);
if (tempName === params.name) {
tempName = "";
this.initConfig();
diff --git a/src/views/screen/newPage/index.vue b/src/views/screen/newPage/index.vue
index 62ec7c4..e05723c 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">
@@ -120,7 +120,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 +135,10 @@
},
data() {
return {
+ deptId: '',
+ deptList: [],
isEnd: false,
- activeName: "1",
+ activeName: "2",
testData1: [
{
name: "鐪佸巺鏁版嵁",
@@ -161,9 +163,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 +189,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