|
@@ -1,7 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view style="background:#f1f1f1;" class="padding-sm">
|
|
<view style="background:#f1f1f1;" class="padding-sm">
|
|
|
|
|
|
-
|
|
|
|
<!-- 下拉选择 -->
|
|
<!-- 下拉选择 -->
|
|
<view class="searchSelect shadow" v-if="flag">
|
|
<view class="searchSelect shadow" v-if="flag">
|
|
<view class="cu-bar search bg-white">
|
|
<view class="cu-bar search bg-white">
|
|
@@ -14,10 +13,11 @@
|
|
</view>
|
|
</view>
|
|
<view class="select-items">
|
|
<view class="select-items">
|
|
<view class="select-item" v-for="(item,index) in searchList" @click="clickSelectItem(item,index)"
|
|
<view class="select-item" v-for="(item,index) in searchList" @click="clickSelectItem(item,index)"
|
|
- :key="index">{{item}}</view>
|
|
|
|
|
|
+ :key="index">{{item.owner_name}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 下拉选择 end -->
|
|
<!-- 下拉选择 end -->
|
|
|
|
+
|
|
<!-- <search-Select :flag="flag"></search-Select> -->
|
|
<!-- <search-Select :flag="flag"></search-Select> -->
|
|
|
|
|
|
<!-- 图表 -->
|
|
<!-- 图表 -->
|
|
@@ -31,7 +31,7 @@
|
|
</view>
|
|
</view>
|
|
<view style="height:570rpx">
|
|
<view style="height:570rpx">
|
|
<view v-if="Inv == 0">
|
|
<view v-if="Inv == 0">
|
|
- <chart :bindData="staticData" v-if="hackReset"></chart>
|
|
|
|
|
|
+ <chart :bindData="staticData" v-if="hackReset&& JSON.stringify(staticData) != '{}'"></chart>
|
|
</view>
|
|
</view>
|
|
<view v-if="Inv == 1">
|
|
<view v-if="Inv == 1">
|
|
<chart2 :bindData="staticData"></chart2>
|
|
<chart2 :bindData="staticData"></chart2>
|
|
@@ -54,7 +54,7 @@
|
|
<image src="../../static/chart3-5.png" style="width:64rpx;height:64rpx"></image>
|
|
<image src="../../static/chart3-5.png" style="width:64rpx;height:64rpx"></image>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
- <chart3 :bindData="staticData" :searchList="searchList" :searchList2="searchList2">
|
|
|
|
|
|
+ <chart3 :bindData="staticData" >
|
|
</chart3>
|
|
</chart3>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -100,7 +100,7 @@
|
|
return {
|
|
return {
|
|
staticData: {},
|
|
staticData: {},
|
|
alarmCount: json.staticData.data[0].alarmCount,
|
|
alarmCount: json.staticData.data[0].alarmCount,
|
|
- cuIconList: json.cuIconList,
|
|
|
|
|
|
+ // cuIconList: json.cuIconList,
|
|
Inv: 0,
|
|
Inv: 0,
|
|
|
|
|
|
|
|
|
|
@@ -110,6 +110,77 @@
|
|
|
|
|
|
|
|
|
|
searchInput: '',
|
|
searchInput: '',
|
|
|
|
+ selectedCode:10012,
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ cuIconList : [{
|
|
|
|
+ imgUrl: '../../static/square1.png',
|
|
|
|
+ badge: 120,
|
|
|
|
+ name: '综合报警',
|
|
|
|
+ redirectUrl: '/pages/siteList/siteList?type=1'
|
|
|
|
+ }, {
|
|
|
|
+ imgUrl: '../../static/square2.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '设备管理',
|
|
|
|
+ redirectUrl: '/pages/siteList/siteList?type=2'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ imgUrl: '../../static/square-xf.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '消防督查单',
|
|
|
|
+ redirectUrl: ''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ imgUrl: '../../static/square-xj.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '巡检',
|
|
|
|
+ redirectUrl: ''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ imgUrl: '../../static/square-bx.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '报修',
|
|
|
|
+ redirectUrl: ''
|
|
|
|
+ }, {
|
|
|
|
+ imgUrl: '../../static/square-wb.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '维保',
|
|
|
|
+ redirectUrl: ''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ imgUrl: '../../static/square-sp.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '视频监测',
|
|
|
|
+ redirectUrl: ''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ imgUrl: '../../static/square-bz.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '风险保障',
|
|
|
|
+ redirectUrl: ''
|
|
|
|
+ }, {
|
|
|
|
+ imgUrl: '../../static/square-rl.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '人脸识别',
|
|
|
|
+ redirectUrl: ''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ imgUrl: '../../static/square-sb.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '设备注册',
|
|
|
|
+ redirectUrl: ''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ imgUrl: '../../static/square-yh.png',
|
|
|
|
+ badge: 0,
|
|
|
|
+ name: '用户管理',
|
|
|
|
+ redirectUrl: ''
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -123,12 +194,21 @@
|
|
},
|
|
},
|
|
|
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
|
+
|
|
|
|
+ // 数据渲染
|
|
|
|
+ this.getHomeData();
|
|
|
|
+
|
|
|
|
|
|
// 图表切换渲染
|
|
// 图表切换渲染
|
|
- this.hackReset = true;
|
|
|
|
|
|
+ this.hackReset = false;
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.hackReset = true;
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.getHandleData();
|
|
|
|
+ this.getSearchList()
|
|
|
|
|
|
- // 数据渲染
|
|
|
|
- this.getSearchList();
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 九宫格页面跳转
|
|
// 九宫格页面跳转
|
|
@@ -136,10 +216,10 @@
|
|
let url = "";
|
|
let url = "";
|
|
switch (index) {
|
|
switch (index) {
|
|
case 0:
|
|
case 0:
|
|
- url = "/pages/alarmingList/alarmingList"
|
|
|
|
|
|
+ url = "/pages/alarmingList/alarmingList?companyCode="+this.selectedCode
|
|
break;
|
|
break;
|
|
case 1:
|
|
case 1:
|
|
- url = "/pages/deviceType/deviceType"
|
|
|
|
|
|
+ url = "/pages/deviceType/deviceType?companyCode="+this.selectedCode
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
url = "/pages/inspectList/inspectList"
|
|
url = "/pages/inspectList/inspectList"
|
|
@@ -202,15 +282,15 @@
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
- //请求
|
|
|
|
|
|
+ //站点下拉请求
|
|
async getSearchList(param = {}) {
|
|
async getSearchList(param = {}) {
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
url: 'Index/getCompanyList',
|
|
url: 'Index/getCompanyList',
|
|
data: param
|
|
data: param
|
|
})
|
|
})
|
|
res.data.data.forEach(item => {
|
|
res.data.data.forEach(item => {
|
|
- this.searchList.push(item.owner_name)
|
|
|
|
- this.searchList2.push(item.owner_name)
|
|
|
|
|
|
+ this.searchList.push(item)
|
|
|
|
+ this.searchList2.push(item)
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
@@ -221,8 +301,9 @@
|
|
|
|
|
|
// 下拉选择
|
|
// 下拉选择
|
|
clickSelectItem(item, index) {
|
|
clickSelectItem(item, index) {
|
|
|
|
+ this.selectedCode=item.owner_code;
|
|
this.getSearchList({
|
|
this.getSearchList({
|
|
- "siteName": item
|
|
|
|
|
|
+ "owner_code": item.owner_code
|
|
});
|
|
});
|
|
this.flag = false
|
|
this.flag = false
|
|
},
|
|
},
|
|
@@ -244,8 +325,8 @@
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
- //请求
|
|
|
|
- async getSearchList(param = {}) {
|
|
|
|
|
|
+ //echarts图表请求
|
|
|
|
+ async getHomeData(param = {}) {
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
url: 'Index/getHomePageData',
|
|
url: 'Index/getHomePageData',
|
|
data: param
|
|
data: param
|
|
@@ -255,6 +336,16 @@
|
|
this.staticData=res.data.data[0]
|
|
this.staticData=res.data.data[0]
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ // 未处理告警请求
|
|
|
|
+ async getHandleData() {
|
|
|
|
+ const res = await this.$myRequest({
|
|
|
|
+ url: 'Index/getFunctionalModuleStatistics',
|
|
|
|
+ showLoading: true
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.cuIconList[0].badge = res.data.data[0].fire_brigade_inspector_count;
|
|
|
|
+ this.cuIconList[2].badge = res.data.data[0].comprehensive_alarm_count
|
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|
|
|
|