大屏地图修改首页修改,变电,线路数据修改

This commit is contained in:
zzyuan 2024-09-28 11:15:59 +08:00
parent f68e9f4ea3
commit ff4cd5c299
11 changed files with 367 additions and 206 deletions

View File

@ -2,7 +2,7 @@ import request from '@/utils/request'
// 首页设备数据 // 首页设备数据
export const queryDeviceInfoApi = (data) => { export const queryDeviceInfoApi = (data) => {
return request.get(`/base/screen/home/getDeviceModelData`, { return request.get(`/base/screen/homeTwo/getDeviceModelDataAmount`, {
params: data params: data
}) })
} }
@ -27,6 +27,12 @@ export const queryRiskInfoApi = (data) => {
params: data params: data
}) })
} }
// 首页安全隐患预测预警
export const getWarnPredictionRecord = (data) => {
return request.get(`/base/screen/homeTwo/getWarnPredictionRecord`, {
params: data
})
}
// 查询工作台 // 查询工作台
export const queryTableApi = (data) => { export const queryTableApi = (data) => {
@ -39,3 +45,10 @@ export const queryTableApi = (data) => {
export const editTableApi = (data) => { export const editTableApi = (data) => {
return request.post(`/base/screen/home/setDeskConfig`, data) return request.post(`/base/screen/home/setDeskConfig`, data)
} }
// 根据工程id获取大屏首页地图工程信息
export const getProjectAndDeviceById = (data) => {
return request.get(`/base/screen/homeTwo/getProjectAndDeviceById`, {
params: data
})
}

View File

@ -1,5 +1,18 @@
import request from '@/utils/request' 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) => { export const queryRiskInfoApi = (data) => {
return request.get(`/base/screen/home/getDeviceWarnRecordPage`, { return request.get(`/base/screen/home/getDeviceWarnRecordPage`, {
@ -23,7 +36,7 @@ export const queryProjListApi = (data) => {
/** 设备列表查询 */ /** 设备列表查询 */
export const queryDeviceListApi = (data) => { export const queryDeviceListApi = (data) => {
return request.get('/base/tbDevice/list', { return request.get('/base/screen/homeTwo/getDeviceModelDataAll', {
params: data params: data
}) })
} }

BIN
src/assets/img/back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

View File

@ -173,6 +173,7 @@ import Pagination from '../Pagination/index.vue'
import { import {
querySenseDeviceInfoApi, querySenseDeviceInfoApi,
queryRiskInfoApi, queryRiskInfoApi,
getWarnPredictionRecordAll,
queryProjListApi, queryProjListApi,
queryDeviceListApi queryDeviceListApi
} from '@/api/tableApis' } from '@/api/tableApis'
@ -212,6 +213,7 @@ export default {
methods: { methods: {
querySenseDeviceInfoApi, querySenseDeviceInfoApi,
queryRiskInfoApi, queryRiskInfoApi,
getWarnPredictionRecordAll,
queryProjListApi, queryProjListApi,
queryDeviceListApi, queryDeviceListApi,
setOpen(v) { setOpen(v) {
@ -226,7 +228,7 @@ export default {
this.columnList = [ this.columnList = [
{ t_props: 'devName', t_label: '设备名称' }, { t_props: 'devName', t_label: '设备名称' },
{ t_props: 'devCode', t_label: '设备编号' }, { t_props: 'devCode', t_label: '设备编号' },
{ t_props: 'bdName', t_label: '边代名称' }, { t_props: 'proName', t_label: '所属工程' },
{ t_props: 'devStatusName', t_label: '工作状态' }, { t_props: 'devStatusName', t_label: '工作状态' },
] ]
this.currentFunc = this.queryDeviceListApi this.currentFunc = this.queryDeviceListApi
@ -236,7 +238,7 @@ export default {
this.columnList = [ this.columnList = [
{ t_props: 'devName', t_label: '设备名称' }, { t_props: 'devName', t_label: '设备名称' },
{ t_props: 'devCode', t_label: '设备编号' }, { t_props: 'devCode', t_label: '设备编号' },
{ t_props: 'bdName', t_label: '边代名称' }, { t_props: 'proName', t_label: '所属工程' },
{ t_props: 'devStatusName', t_label: '工作状态' }, { t_props: 'devStatusName', t_label: '工作状态' },
] ]
this.currentFunc = this.queryDeviceListApi this.currentFunc = this.queryDeviceListApi
@ -396,11 +398,11 @@ export default {
case 12: case 12:
this.columnList = [ this.columnList = [
{ t_props: 'proName', t_label: '工程名称' }, { t_props: 'proName', t_label: '工程名称' },
{ t_props: 'warnTime', t_label: '预警时间' }, { t_props: 'createTime', t_label: '预警时间' },
{ t_props: 'warnType', t_label: '预警内容' }, { t_props: 'content', t_label: '预警内容' },
] ]
this.currentFunc = this.queryRiskInfoApi this.currentFunc = this.getWarnPredictionRecordAll
this.getTableList(this.queryRiskInfoApi) this.getTableList(this.getWarnPredictionRecordAll)
break; break;
case 13: case 13:
this.columnList = [ this.columnList = [

View File

@ -387,6 +387,7 @@ export default {
{ {
show: true, show: true,
map: 'china', map: 'china',
type: 'map',
aspectScale: 0.8, aspectScale: 0.8,
zoom: this.zoom, zoom: this.zoom,
roam: true, // roam: true, //
@ -430,6 +431,37 @@ export default {
}, },
zlevel: 1, zlevel: 1,
regions: this.geoVal || [], regions: this.geoVal || [],
tooltip: {
show:true,
trigger: 'item',
formatter: function (params) {
console.log(params)
if (params.componentSubType === 'scatter') {
let className = 'itemColor1 itemColor'
let html = `
<div
id="pop-tooltip"
style="
width:260px;height:140px;border-radius: 15px;
background: linear-gradient(to bottom, #4D8DFF, #57B9FF, #4D8DFF);
padding:12px;position: relative;display: flex;flex-direction: column;
"
>
<div id="tooltipGB" onclick="document.querySelector('#pop-tooltip').style.display = 'none'" style="position: absolute;cursor: pointer; width:30px;height:30px;line-height:30px;text-align:center;right:5px;top:5px;font-size: 20px;">x</div>
<div style="font-size: 18px; height: 20px;line-height:20px;">${params.data.projName}</div>
<div class="scrollTooltip" style="margin-top:10px;flex: 1; overflow-y:auto;white-space:normal;font-size: 16px;font-weight: 400; position:relative; display: flex; flex-direction: column; justify-content: space-around;">
<span style="padding-bottom: 5px">省份${params.data.province}</span>
<span style="padding-bottom: 5px">经度${params.data.value[0]}</span>
<span style="padding-bottom: 5px">纬度${params.data.value[1]}</span>
</div>
</div>`
return html
}
//
// return params.name + ': ' + params.value;
}
},
}, },
{ {
map: 'china', map: 'china',
@ -450,7 +482,6 @@ export default {
silent: true, silent: true,
tooltip: { tooltip: {
show: false, show: false,
trigger: 'item',
}, },
}, },
], ],
@ -473,7 +504,6 @@ export default {
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
triggerOn: 'click',
alwaysShowContent: true, alwaysShowContent: true,
showDelay: 0, // showDelay: 0, //
transitionDuration: 0.2, // transitionDuration: 0.2, //
@ -481,25 +511,26 @@ export default {
className: 'iconMap', className: 'iconMap',
extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0);', extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0);',
formatter: function (params) { formatter: function (params) {
console.log(params)
if (params.componentSubType === 'scatter') { if (params.componentSubType === 'scatter') {
let className = 'itemColor1 itemColor' let className = 'itemColor1 itemColor'
let html = ` let html = `
<div <div
id="pop-tooltip" id="pop-tooltip"
style=" style="
width:260px;height:140px;border-radius: 15px; width:260px;height:140px;border-radius: 15px;
background: linear-gradient(to bottom, #4D8DFF, #57B9FF, #4D8DFF); background: linear-gradient(to bottom, #4D8DFF, #57B9FF, #4D8DFF);
padding:12px;position: relative;display: flex;flex-direction: column; padding:12px;position: relative;display: flex;flex-direction: column;
" "
> >
<div id="tooltipGB" onclick="document.querySelector('#pop-tooltip').style.display = 'none'" style="position: absolute;cursor: pointer; width:30px;height:30px;line-height:30px;text-align:center;right:5px;top:5px;font-size: 20px;">x</div> <div id="tooltipGB" onclick="document.querySelector('#pop-tooltip').style.display = 'none'" style="position: absolute;cursor: pointer; width:30px;height:30px;line-height:30px;text-align:center;right:5px;top:5px;font-size: 20px;">x</div>
<div style="font-size: 18px; height: 20px;line-height:20px;">${params.data.projName}</div> <div style="font-size: 18px; height: 20px;line-height:20px;">${params.data.projName}</div>
<div class="scrollTooltip" style="margin-top:10px;flex: 1; overflow-y:auto;white-space:normal;font-size: 16px;font-weight: 400; position:relative; display: flex; flex-direction: column; justify-content: space-around;"> <div class="scrollTooltip" style="margin-top:10px;flex: 1; overflow-y:auto;white-space:normal;font-size: 16px;font-weight: 400; position:relative; display: flex; flex-direction: column; justify-content: space-around;">
<span style="padding-bottom: 5px">省份${params.data.province}</span> <span style="padding-bottom: 5px">省份${params.data.province}</span>
<span style="padding-bottom: 5px">经度${params.data.value[0]}</span> <span style="padding-bottom: 5px">经度${params.data.value[0]}</span>
<span style="padding-bottom: 5px">纬度${params.data.value[1]}</span> <span style="padding-bottom: 5px">纬度${params.data.value[1]}</span>
</div> </div>
</div>` </div>`
return html return html
} }
}, },
@ -722,6 +753,7 @@ export default {
this.mapEcharts.on('click', function (params) { this.mapEcharts.on('click', function (params) {
if (params.componentSubType === 'scatter') { if (params.componentSubType === 'scatter') {
// console.log(params)
let option = that.mapEcharts.getOption() //option let option = that.mapEcharts.getOption() //option
// //
option.series[0].data.forEach((item) => { option.series[0].data.forEach((item) => {
@ -736,6 +768,7 @@ export default {
that.mapEcharts.setOption(option) that.mapEcharts.setOption(option)
that.$emit('closeMap', { value: params.data }) that.$emit('closeMap', { value: params.data })
} }
/*if (params.seriesType === 'scatter' && !params.name) { /*if (params.seriesType === 'scatter' && !params.name) {
let option = that.mapEcharts.getOption() //option let option = that.mapEcharts.getOption() //option
// //

View File

@ -33,8 +33,8 @@
<span @click="toggleDialog(7)">拉力</span> <span @click="toggleDialog(7)">拉力</span>
</div> </div>
<div class="rig-counts"> <div class="rig-counts">
<span>{{ senseData.towerRakeMonitor }}°</span> <span>{{ senseData.towerRakeMonitor }}</span>
<span>{{ senseData.towerWaterMonitor }}N</span> <span>{{ senseData.towerWaterMonitor }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -48,7 +48,7 @@
<span @click="toggleDialog(8)">拉力</span> <span @click="toggleDialog(8)">拉力</span>
</div> </div>
<div class="rig-counts"> <div class="rig-counts">
<span>{{ senseData.leadStrainMonitor }}N</span> <span>{{ senseData.leadStrainMonitor }}</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -19,20 +19,20 @@
:row-style="rowStyle" :row-style="rowStyle"
> >
<el-table-column <el-table-column
prop="date" prop="proName"
label="工程名称"
align="center"
>
</el-table-column>
<el-table-column
prop="createTime"
label="日期" label="日期"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="content"
label="姓名" label="内容"
align="center"
>
</el-table-column>
<el-table-column
prop="address"
label="地址"
align="center" align="center"
> >
</el-table-column> </el-table-column>
@ -42,6 +42,9 @@
</template> </template>
<script> <script>
import {
getWarnPredictionRecord
} from '@/api/home/home'
export default { export default {
components: { components: {
@ -50,61 +53,69 @@ export default {
data() { data() {
return { return {
tableList: [ tableList: [
/* { // {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, { // }, {
date: 'xxx工程', // date: 'xxx',
name: '2024.1.1 12:23', // name: '2024.1.1 12:23',
address: '明天有大风' // address: ''
}, */ // },
] ]
}; };
}, },
mounted() { mounted() {
this.getRiskData()
}, },
destroyed() { destroyed() {
}, },
methods: { methods: {
async getRiskData() {
let param = {
startTime:this.timeFormat(),
endTime:this.timeFormat(),
}
let res = await getWarnPredictionRecord(param)
this.tableList = res.data;
},
toggleDialog(v) { toggleDialog(v) {
this.$emit('openDialog', { order: v }) this.$emit('openDialog', { order: v })
}, },
@ -119,6 +130,29 @@ export default {
} }
} }
}, },
timeFormat() {
let date = new Date();
//
let formatStr = 'yyyy-mm-dd';
const timeSource = {
'y': date.getFullYear().toString(), //
'm': (date.getMonth() + 1).toString().padStart(2, '0'), //
'd': date.getDate().toString().padStart(2, '0'), //
'h': date.getHours().toString().padStart(2, '0'), //
'M': date.getMinutes().toString().padStart(2, '0'), //
's': date.getSeconds().toString().padStart(2, '0') //
//
}
for (const key in timeSource) {
const [ret] = new RegExp(`${key}+`).exec(formatStr) || []
if (ret) {
//
const beginIndex = key === 'y' && ret.length === 2 ? 2 : 0
formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex))
}
}
return formatStr
},
}, },
}; };
</script> </script>
@ -139,7 +173,7 @@ export default {
border-radius: 5px; border-radius: 5px;
border: 1px solid #EFF2FC; border: 1px solid #EFF2FC;
box-shadow: 2px 2px 2px #D9E0F3; box-shadow: 2px 2px 2px #D9E0F3;
overflow-y: auto;
.inner-tit{ .inner-tit{
@ -161,17 +195,15 @@ export default {
margin-bottom: 15px; margin-bottom: 15px;
span{ span{
color: #757B87; color: #757B87;
} }
} }
.risk-table{ .risk-table{
height: 88%;
width: 100%; width: 100%;
overflow-y: auto;
} }
} }

View File

@ -15,7 +15,7 @@
:show-header="false" :show-header="false"
:row-style="rowStyle" :row-style="rowStyle"
> >
<el-table-column prop="projectName" label="" align="center"> <el-table-column prop="devName" label="" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="warnTime" label="" align="center"> <el-table-column prop="warnTime" label="" align="center">
</el-table-column> </el-table-column>
@ -136,7 +136,9 @@ export default {
} }
.build-table { .build-table {
height: 80%;
width: 100%; width: 100%;
overflow-y: auto;
} }
} }
</style> </style>

View File

@ -32,14 +32,18 @@
{{ item.projectName }} {{ item.projectName }}
</div> </div>
</div> </div>
<!-- 选项 --> <div v-if="showLefSec" style="display: flex;margin-bottom: 20px;align-items: center;">
<el-input <img src="../../assets/img/back.png" alt="" @click="handelCloseSub">
placeholder="请输入内容" <div style="color: #000;font-size: 24px;font-weight: bold;margin-left: 20px;">{{ lefSendMsg.projName }}</div>
suffix-icon="el-icon-search" <!-- 选项 -->
v-model="searchIpt" <!-- <el-input
style="margin-bottom: 20px" placeholder="请输入内容"
v-if="showLefSec" suffix-icon="el-icon-search"
/> v-model="searchIpt"
style="margin-left: 20px;"
/> -->
</div>
<div <div
:class="['single-sec', { isActive: currentLefIndex === item.id }]" :class="['single-sec', { isActive: currentLefIndex === item.id }]"
v-for="item in searchLefSec" v-for="item in searchLefSec"
@ -201,6 +205,7 @@ export default {
name: tower.gtName, name: tower.gtName,
projName: tower.gtName, projName: tower.gtName,
projectId: proj.projectId, projectId: proj.projectId,
province: proj.areaName,
itemStyle: { normal: { areaColor: '#7DDEFF' } }, itemStyle: { normal: { areaColor: '#7DDEFF' } },
value: [ value: [
Number(tower.lon), Number(tower.lon),
@ -250,12 +255,19 @@ export default {
this.currentCountryIndex = undefined this.currentCountryIndex = undefined
this.sendMap = 1 this.sendMap = 1
}, },
///
handleCloseMap(val) { handleCloseMap(val) {
console.log(val, 'closeMap') console.log(val, 'closeMap')
this.lefSendMsg = val.value this.lefSendMsg = val.value
this.showProjSec = false this.showProjSec = false
this.currentLefIndex = 1 this.currentLefIndex = 1
this.showLefSec = true this.showLefSec = true
},
//
handelCloseSub(){
this.showProjSec = true
this.showLefSec = false
this.renderAllProj()
} }
} }
} }

View File

@ -40,14 +40,11 @@
{{ item.projectName }} {{ item.projectName }}
</div> </div>
</div> </div>
<!-- 选项 -->
<el-input <div v-if="showLefSec" style="display: flex;margin-bottom: 20px;align-items: center;">
placeholder="请输入内容" <img src="../../assets/img/back.png" alt="" @click="handelCloseSub">
suffix-icon="el-icon-search" <div style="color: #000;font-size: 24px;font-weight: bold;margin-left: 20px;">{{ sendMsg.projectName }}</div>
v-model="searchIpt" </div>
style="margin-bottom: 20px"
v-if="showLefSec"
/>
<div <div
:class="['single-sec', { isActive: currentLefIndex === item.id }]" :class="['single-sec', { isActive: currentLefIndex === item.id }]"
v-for="item in searchLefSec" v-for="item in searchLefSec"
@ -227,6 +224,12 @@ export default {
this.showLefSec = true this.showLefSec = true
this.showProjSec = false this.showProjSec = false
}, },
//
handelCloseSub(){
this.showProjSec = true
this.showLefSec = false
this.getGeoData()
},
changeLefSec(val) { changeLefSec(val) {
this.currentLefIndex = val.id this.currentLefIndex = val.id
}, },

View File

@ -1,40 +1,9 @@
<template> <template>
<div class="homePage"> <div class="homePage">
<!-- <global-bar <div class="container" v-if="!showSubView">
:index-count="currentIndex"
>
</global-bar>-->
<!-- <div class="tit-cont">
<div class="inner-tit">
<div
v-for="item in titList"
:key="item.id"
:class="[ 'single-tit', { isActive: currentIndex === item.id } ]"
@click="changeTitle(item)"
>
<h4>
<span v-if="item.title !== null">{{ item.title }}</span>
<img
v-if="item.title !== null && currentIndex === item.id"
src="../../assets/img/tit-bottom.png"
alt=""/>
<img
v-if="item.title !== null && currentIndex !== item.id"
src="../../assets/img/title-nosel.png"
alt=""/>
</h4>
</div>
&lt;!&ndash; <div class="tit-cen"></div>
<div class="tit-rig">2</div>&ndash;&gt;
</div>
</div>-->
<!-- <div class="homePage_title" @click="routerClick">
<div>智慧仓储管理平台</div>
</div> -->
<div class="container">
<!-- 左侧数据模块列表 --> <!-- 左侧数据模块列表 -->
<div class="leftModuleBox"> <div class="leftModuleBox">
<div style="height: 200px; margin-bottom: 10px"> <div style="height: 200px; margin-bottom: 10px" >
<LeftOne :key="childKey" @openDialog="handleDialog"></LeftOne> <LeftOne :key="childKey" @openDialog="handleDialog"></LeftOne>
</div> </div>
<div style="height: 430px; margin-bottom: 10px"> <div style="height: 430px; margin-bottom: 10px">
@ -44,6 +13,7 @@
<LeftThree :key="childKey" @openDialog="handleDialog"></LeftThree> <LeftThree :key="childKey" @openDialog="handleDialog"></LeftThree>
</div> </div>
</div> </div>
<!-- 中间3D效果展示 --> <!-- 中间3D效果展示 -->
<div class="centerModuleBox"> <div class="centerModuleBox">
<div class="center-top"> <div class="center-top">
@ -51,31 +21,9 @@
<CountryMap <CountryMap
:send-height="'627px'" :send-height="'627px'"
:send-geo="geoData" :send-geo="geoData"
@closeMap="handleCloseMap"
></CountryMap> ></CountryMap>
<!-- 重庆地图 -->
<!-- <Center3DMap></Center3DMap>-->
</div> </div>
<!-- <div class="center-bottom">
<CenterBottom></CenterBottom>
</div>-->
<!-- <div class="buttom-box">
<div class="buttonTop">
<div
:class="maType == 1 ? 'on' : ''"
class="buttom1"
@click="getMapSelect(1)"
>
施工机具
</div>
<div
:class="maType == 2 ? 'on' : ''"
class="buttom1"
@click="getMapSelect(2)"
>
工器具
</div>
</div>
</div>-->
</div> </div>
<!-- 右侧数据模块列表 --> <!-- 右侧数据模块列表 -->
<div class="rightModuleBox"> <div class="rightModuleBox">
@ -85,52 +33,44 @@
<div style="height: 470px"> <div style="height: 470px">
<rightTwo :key="childKey" @openDialog="handleDialog"></rightTwo> <rightTwo :key="childKey" @openDialog="handleDialog"></rightTwo>
</div> </div>
<!-- <rightThree></rightThree>-->
<!-- <LeftThree></LeftThree>-->
<!-- <RightFour></RightFour> -->
</div> </div>
</div> </div>
<!-- 获取天气 --> <!-- 地图点击二级页面 -->
<!-- <div class="weather"> <div class="page-cont" v-if="showSubView">
<div class="weather_box"> <div class="lef-secs">
<div><img alt="" src="../../assets/img/myImage//time.png" /></div> <div style="display: flex;margin-bottom: 20px;align-items: center;">
<div class="dateTimeString">{{ dateTimeString }}</div> <img src="../../assets/img/back.png" alt="" @click="handelCloseSub">
&lt;!&ndash; <div class="weatherData"> <div style="color: #000;font-size: 24px;font-weight: bold;margin-left: 20px;">{{ lefSendMsg.projName }}</div>
<img class="weatherUrl" :src="weatherUrl" alt="" /><span </div>
class="weather_title" <div :class="['single-sec', { isActive: currentLefIndex === item.id }]" v-for="item in searchLefSec" :key="item.id" @click="changeLefSec(item)">
>{{ weatherData.weather }}</span {{ item.title }}
><span>{{ weatherData.temperature }}</span> </div>
</div> &ndash;&gt;
</div>
</div> </div>
<div class="sound">
<img src="../../assets/img/myImage/sound.png" alt="" /> <div class="rig-components">
<man-detect
v-if="currentLefIndex === 1"
:send-msg="lefSendMsg"
></man-detect>
<envir-detect
v-if="currentLefIndex === 2"
:send-msg="lefSendMsg"
></envir-detect>
<tower-detect
v-if="currentLefIndex === 3"
:send-msg="lefSendMsg"
></tower-detect>
<pit-detect
v-if="currentLefIndex === 4"
:send-msg="lefSendMsg"
></pit-detect>
</div> </div>
<div class="wrap"> </div>
<div id="inner">
<span id="first" v-for="(item, index) of transformList" :key="index">{{
'检修预警提示:' +
item.machineName +
'下次检修日期:' +
item.nextCheckTime +
',请注意查收!'
}}</span>
</div>
</div>-->
<common-dialog
ref="dialogRef"
>
</common-dialog>
<!-- <envir-dialog <!-- 弹窗统一控制组件 -->
ref="envirRef" <common-dialog ref="dialogRef"></common-dialog>
></envir-dialog>
<dip-dialog
ref="dipRef"
></dip-dialog>-->
</div> </div>
</template> </template>
@ -153,6 +93,10 @@ import CenterFold from '../../components/home/centerFold.vue'
import CommonDialog from '../../components/home/commonDialog.vue' import CommonDialog from '../../components/home/commonDialog.vue'
import DipDialog from '../../components/dialog/dipDialog.vue' import DipDialog from '../../components/dialog/dipDialog.vue'
import EnvirDialog from '../../components/dialog/envirDialog.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 { import {
querySubProjInfoApi querySubProjInfoApi
} from '@/api/substation/substation' } from '@/api/substation/substation'
@ -174,14 +118,28 @@ export default {
CenterFold, CenterFold,
CommonDialog, CommonDialog,
DipDialog, DipDialog,
EnvirDialog EnvirDialog,
ManDetect,
EnvirDetect,
TowerDetect,
PitDetect
}, },
name: 'Home', name: 'Home',
data() { data() {
return { return {
childKey: 0, childKey: 0,
currentIndex: 1, 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() { created() {
@ -203,6 +161,16 @@ export default {
{ name: '新疆维吾尔自治区', projName: '喀什工程', itemStyle: { normal: { areaColor: '#7DDEFF' } }, value: [87.627704, 43.793026] }, { 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: { methods: {
async getGeoData() { async getGeoData() {
let res = await querySubProjInfoApi() let res = await querySubProjInfoApi()
@ -212,6 +180,7 @@ export default {
name: item.projectName, name: item.projectName,
province: item.areaName, province: item.areaName,
projName: item.projectName, projName: item.projectName,
projectId: item.projectId,
itemStyle: { itemStyle: {
normal: { normal: {
areaColor: '#7DDEFF' areaColor: '#7DDEFF'
@ -220,7 +189,15 @@ export default {
value: [ value: [
Number(item.lon), Number(item.lon),
Number(item.lat) 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 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()
},
} }
} }
</script> </script>
@ -306,8 +297,6 @@ export default {
// background-clip: text; // background-clip: text;
// } // }
// } // }
.container { .container {
display: flex; display: flex;
width: 100%; width: 100%;
@ -401,5 +390,67 @@ export default {
margin-bottom: 12px; 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%;
}
}
} }
</style> </style>