| | |
| | | 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", |
| | | }); |
| | | } |
| | | |
| | | //设备正常率 |
| | | 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", |
| | | }); |
| | | } |
| | |
| | | // "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 = "视图库对接稳定性" |
| | |
| | | // "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 = "视图库对接稳定性" |
| | |
| | | // "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 |
| | |
| | | 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(); |
| | |
| | | </div> |
| | | </div> |
| | | <div class="large_screen_box"> |
| | | <NewMap></NewMap> |
| | | <NewMap @clickMap="getDeptId"></NewMap> |
| | | </div> |
| | | |
| | | <div class="left_box"> |
| | |
| | | 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: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | deptId: '', |
| | | deptList: [], |
| | | isEnd: false, |
| | | activeName: "1", |
| | | activeName: "2", |
| | | testData1: [ |
| | | { |
| | | name: "省厅数据", |
| | |
| | | }; |
| | | }, |
| | | 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"); |
| | | }, |
| | |
| | | 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(); |
| | | } |
| | | }, |
| | | }; |