diff --git a/src/api/home/home.js b/src/api/home/home.js index 1cc5fbc..7ea4aa7 100644 --- a/src/api/home/home.js +++ b/src/api/home/home.js @@ -2,7 +2,7 @@ import request from '@/utils/request' // 首页设备数据 export const queryDeviceInfoApi = (data) => { - return request.get(`/base/screen/home/getDeviceModelData`, { + return request.get(`/base/screen/homeTwo/getDeviceModelDataAmount`, { params: data }) } @@ -27,6 +27,12 @@ export const queryRiskInfoApi = (data) => { params: data }) } +// 首页安全隐患预测预警 +export const getWarnPredictionRecord = (data) => { + return request.get(`/base/screen/homeTwo/getWarnPredictionRecord`, { + params: data + }) +} // 查询工作台 export const queryTableApi = (data) => { @@ -39,3 +45,10 @@ export const queryTableApi = (data) => { export const editTableApi = (data) => { return request.post(`/base/screen/home/setDeskConfig`, data) } + +// 根据工程id获取大屏首页地图工程信息 +export const getProjectAndDeviceById = (data) => { + return request.get(`/base/screen/homeTwo/getProjectAndDeviceById`, { + params: data + }) +} diff --git a/src/api/tableApis.js b/src/api/tableApis.js index a63fe7d..c947268 100644 --- a/src/api/tableApis.js +++ b/src/api/tableApis.js @@ -1,5 +1,18 @@ import request from '@/utils/request' +// 首页安全隐患预测预警 - 分页 +export const getWarnPredictionRecordAll = (data) => { + return request.get(`/base/screen/homeTwo/getWarnPredictionRecordAll`, { + params: data + }) +} +// 首页安全隐患预测预警 - 不分页 +export const getWarnPredictionRecord = (data) => { + return request.get(`/base/screen/homeTwo/getWarnPredictionRecord`, { + params: data + }) +} + // 首页施工风险数据 - 分页 export const queryRiskInfoApi = (data) => { return request.get(`/base/screen/home/getDeviceWarnRecordPage`, { @@ -23,7 +36,7 @@ export const queryProjListApi = (data) => { /** 设备列表查询 */ export const queryDeviceListApi = (data) => { - return request.get('/base/tbDevice/list', { + return request.get('/base/screen/homeTwo/getDeviceModelDataAll', { params: data }) } diff --git a/src/assets/img/back.png b/src/assets/img/back.png new file mode 100644 index 0000000..1314bdf Binary files /dev/null and b/src/assets/img/back.png differ diff --git a/src/components/home/commonDialog.vue b/src/components/home/commonDialog.vue index 7461753..2f8902d 100644 --- a/src/components/home/commonDialog.vue +++ b/src/components/home/commonDialog.vue @@ -173,6 +173,7 @@ import Pagination from '../Pagination/index.vue' import { querySenseDeviceInfoApi, queryRiskInfoApi, + getWarnPredictionRecordAll, queryProjListApi, queryDeviceListApi } from '@/api/tableApis' @@ -212,6 +213,7 @@ export default { methods: { querySenseDeviceInfoApi, queryRiskInfoApi, + getWarnPredictionRecordAll, queryProjListApi, queryDeviceListApi, setOpen(v) { @@ -226,7 +228,7 @@ export default { this.columnList = [ { t_props: 'devName', t_label: '设备名称' }, { t_props: 'devCode', t_label: '设备编号' }, - { t_props: 'bdName', t_label: '边代名称' }, + { t_props: 'proName', t_label: '所属工程' }, { t_props: 'devStatusName', t_label: '工作状态' }, ] this.currentFunc = this.queryDeviceListApi @@ -236,7 +238,7 @@ export default { this.columnList = [ { t_props: 'devName', t_label: '设备名称' }, { t_props: 'devCode', t_label: '设备编号' }, - { t_props: 'bdName', t_label: '边代名称' }, + { t_props: 'proName', t_label: '所属工程' }, { t_props: 'devStatusName', t_label: '工作状态' }, ] this.currentFunc = this.queryDeviceListApi @@ -396,11 +398,11 @@ export default { case 12: this.columnList = [ { t_props: 'proName', t_label: '工程名称' }, - { t_props: 'warnTime', t_label: '预警时间' }, - { t_props: 'warnType', t_label: '预警内容' }, + { t_props: 'createTime', t_label: '预警时间' }, + { t_props: 'content', t_label: '预警内容' }, ] - this.currentFunc = this.queryRiskInfoApi - this.getTableList(this.queryRiskInfoApi) + this.currentFunc = this.getWarnPredictionRecordAll + this.getTableList(this.getWarnPredictionRecordAll) break; case 13: this.columnList = [ diff --git a/src/components/home/countryMap.vue b/src/components/home/countryMap.vue index abe7f95..cc904cc 100644 --- a/src/components/home/countryMap.vue +++ b/src/components/home/countryMap.vue @@ -387,6 +387,7 @@ export default { { show: true, map: 'china', + type: 'map', aspectScale: 0.8, zoom: this.zoom, roam: true, // 是否允许缩放 @@ -430,6 +431,37 @@ export default { }, zlevel: 1, regions: this.geoVal || [], + tooltip: { + show:true, + trigger: 'item', + formatter: function (params) { + console.log(params) + if (params.componentSubType === 'scatter') { + let className = 'itemColor1 itemColor' + let html = ` +
+
x
+
${params.data.projName}
+
+ 省份:${params.data.province} + 经度:${params.data.value[0]} + 纬度:${params.data.value[1]} +
+
` + return html + } + // 可以在这里编写轮播的格式化内容 + // return params.name + ': ' + params.value; + } + + }, }, { map: 'china', @@ -450,7 +482,6 @@ export default { silent: true, tooltip: { show: false, - trigger: 'item', }, }, ], @@ -473,7 +504,6 @@ export default { }, tooltip: { trigger: 'item', - triggerOn: 'click', alwaysShowContent: true, showDelay: 0, //浮层显示的延迟 transitionDuration: 0.2, // 提示框浮层的移动动画过渡时间 @@ -481,25 +511,26 @@ export default { className: 'iconMap', extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0);', formatter: function (params) { + console.log(params) if (params.componentSubType === 'scatter') { let className = 'itemColor1 itemColor' let html = ` -
-
x
-
${params.data.projName}
-
- 省份:${params.data.province} - 经度:${params.data.value[0]} - 纬度:${params.data.value[1]} -
-
` +
+
x
+
${params.data.projName}
+
+ 省份:${params.data.province} + 经度:${params.data.value[0]} + 纬度:${params.data.value[1]} +
+
` return html } }, @@ -722,6 +753,7 @@ export default { this.mapEcharts.on('click', function (params) { if (params.componentSubType === 'scatter') { + // console.log(params) let option = that.mapEcharts.getOption() //获得option对象 // 点击变黄 option.series[0].data.forEach((item) => { @@ -736,6 +768,7 @@ export default { that.mapEcharts.setOption(option) that.$emit('closeMap', { value: params.data }) } + /*if (params.seriesType === 'scatter' && !params.name) { let option = that.mapEcharts.getOption() //获得option对象 // 点击变黄 diff --git a/src/components/home/leftTwo.vue b/src/components/home/leftTwo.vue index 559253b..9fe8d9c 100644 --- a/src/components/home/leftTwo.vue +++ b/src/components/home/leftTwo.vue @@ -33,8 +33,8 @@ 拉力:
- {{ senseData.towerRakeMonitor }}° - {{ senseData.towerWaterMonitor }}N + {{ senseData.towerRakeMonitor }}个 + {{ senseData.towerWaterMonitor }}个
@@ -48,7 +48,7 @@ 拉力:
- {{ senseData.leadStrainMonitor }}N + {{ senseData.leadStrainMonitor }}个
diff --git a/src/components/home/rightOne.vue b/src/components/home/rightOne.vue index b4f0c34..e37e3a0 100644 --- a/src/components/home/rightOne.vue +++ b/src/components/home/rightOne.vue @@ -19,20 +19,20 @@ :row-style="rowStyle" > + + - - @@ -42,6 +42,9 @@ @@ -139,7 +173,7 @@ export default { border-radius: 5px; border: 1px solid #EFF2FC; box-shadow: 2px 2px 2px #D9E0F3; - overflow-y: auto; + .inner-tit{ @@ -161,17 +195,15 @@ export default { margin-bottom: 15px; span{ - color: #757B87; - } } .risk-table{ - + height: 88%; width: 100%; - + overflow-y: auto; } } diff --git a/src/components/home/rightTwo.vue b/src/components/home/rightTwo.vue index c5e18bd..ce1a2e1 100644 --- a/src/components/home/rightTwo.vue +++ b/src/components/home/rightTwo.vue @@ -15,7 +15,7 @@ :show-header="false" :row-style="rowStyle" > - + @@ -136,7 +136,9 @@ export default { } .build-table { + height: 80%; width: 100%; + overflow-y: auto; } } diff --git a/src/views/Lines/index.vue b/src/views/Lines/index.vue index 92b588c..17c6174 100644 --- a/src/views/Lines/index.vue +++ b/src/views/Lines/index.vue @@ -31,15 +31,19 @@ > {{ item.projectName }} + +
+ +
{{ lefSendMsg.projName }}
+ +
- - +
- - + +
+ +
{{ sendMsg.projectName }}
+
- - - -
+
-
+
@@ -44,6 +13,7 @@
+
@@ -51,31 +21,9 @@ - -
- -
@@ -85,52 +33,44 @@
- - -
- - +
+
+
+ +
{{ lefSendMsg.projName }}
+
+
+ {{ item.title }} +
-
- + +
+ + + +
-
-
- {{ - '检修预警提示:' + - item.machineName + - '下次检修日期:' + - item.nextCheckTime + - ',请注意查收!' - }} -
-
--> +
- - - + +
@@ -153,6 +93,10 @@ import CenterFold from '../../components/home/centerFold.vue' import CommonDialog from '../../components/home/commonDialog.vue' import DipDialog from '../../components/dialog/dipDialog.vue' import EnvirDialog from '../../components/dialog/envirDialog.vue' +import ManDetect from '../../components/substation/manDetect.vue' +import EnvirDetect from '../../components/substation/envirDetect.vue' +import TowerDetect from '../../components/substation/towerDetect.vue' +import PitDetect from '../../components/substation/pitDetect.vue' import { querySubProjInfoApi } from '@/api/substation/substation' @@ -174,14 +118,28 @@ export default { CenterFold, CommonDialog, DipDialog, - EnvirDialog + EnvirDialog, + ManDetect, + EnvirDetect, + TowerDetect, + PitDetect }, name: 'Home', data() { return { childKey: 0, currentIndex: 1, - geoData: undefined + geoData: undefined, + currentLefIndex: null, + searchIpt: undefined, + lefSecList: [ + { title: '人员检测类', id: 1 }, + { title: '环境检测类', id: 2 }, + { title: '组塔检测类', id: 3 }, + { title: '基坑检测类', id: 4 }, + ], + lefSendMsg: undefined, + showSubView:false, } }, created() { @@ -203,6 +161,16 @@ export default { { name: '新疆维吾尔自治区', projName: '喀什工程', itemStyle: { normal: { areaColor: '#7DDEFF' } }, value: [87.627704, 43.793026] }, ] */ }, + computed: { + searchLefSec() { + if(!this.searchIpt) { + return this.lefSecList + } + return this.lefSecList.filter(item => { + return item.title.includes(this.searchIpt) + }) + } + }, methods: { async getGeoData() { let res = await querySubProjInfoApi() @@ -212,6 +180,7 @@ export default { name: item.projectName, province: item.areaName, projName: item.projectName, + projectId: item.projectId, itemStyle: { normal: { areaColor: '#7DDEFF' @@ -220,7 +189,15 @@ export default { value: [ Number(item.lon), Number(item.lat) - ] + ], + currentLefIndex: null, + lefSecList: [ + { title: '人员检测类', id: 1 }, + { title: '环境检测类', id: 2 }, + { title: '组塔检测类', id: 3 }, + { title: '基坑检测类', id: 4 }, + ], + lefSendMsg: undefined, } }) }, @@ -230,6 +207,20 @@ export default { param: val }) }, + handleCloseMap(val) { + console.log(val, 'closeMap') + this.lefSendMsg=val.value; + this.currentLefIndex=1 + this.showSubView=true; + }, + changeLefSec(val) { + this.currentLefIndex = val.id + }, + //关闭二级页面 + handelCloseSub(){ + this.showSubView = false + this.getGeoData() + }, } } @@ -306,8 +297,6 @@ export default { // background-clip: text; // } // } - - .container { display: flex; width: 100%; @@ -401,5 +390,67 @@ export default { margin-bottom: 12px; } } + + .page-cont{ + width: 100%; + height: 940px; + display: flex; + justify-content: space-between; + + .lef-secs{ + + width: 20%; + height: 100%; + background-color: #F3F7FF; + box-sizing: border-box; + padding: 20px; + border-radius: 5px; + border: 1px solid #EFF2FC; + box-shadow: 2px 2px 2px #D9E0F3; + overflow-y: auto; + + .single-sec{ + width: 100%; + box-sizing: border-box; + border-radius: 5px; + cursor: pointer; + padding: 10px; + display: flex; + align-items: center; + justify-content: center; + color: #000; + font-size: 18px; + background-color: #DEECFF; + border: 1px solid #D1E1FF; + margin-bottom: 15px; + + } + + .isActive{ + + background-color: #EFF4FE; + box-shadow: -3px -3px 2px #CBDCF6, + 2px 2px 2px #F8F9FE, + -2px -2px 2px #CBDCF6, + 2px 2px 2px #F8F9FE; + box-sizing: border-box; + border-radius: 5px; + + } + + } + + .rig-maps, .rig-components{ + + width: 79%; + height: 100%; + + } + + } + + + + }