项目修改

This commit is contained in:
FrancisHu 2024-09-26 18:02:21 +08:00
parent d7ebe48d1e
commit 1ea188fd63
7 changed files with 231 additions and 142 deletions

View File

@ -28,10 +28,16 @@ export default {
mounted() { mounted() {
autofit.init({ autofit.init({
designHeight: 1080, /* designHeight: 1080,
designWidth: 1920, designWidth: 1920, */
renderDom: '#app', el: '#app',
dw: 1920, // Width of your design layout
dh: 1080, // Height of your design layout
scaleType: 'contain', // Scaling type, 'contain' scales the content proportionally
offsetLeft: 0, // No left offset
offsetTop: 0, // No top offse
resize: true, resize: true,
cssMode: 'scale'
}) })
}, },
} }

View File

@ -54,6 +54,13 @@ export const queryEnvironmentInfoByIdApi = (data) => {
}) })
} }
// 根据工程id查询预警信息
export const queryWarnInfoByIdApi = (data) => {
return request.get(`/base/screen/info/getPowerDevAttributeRecordByWarn`, {
params: data
})
}
// 根据设备id查询折线图数据 // 根据设备id查询折线图数据
export const queryChartsInfoByIdApi = (data) => { export const queryChartsInfoByIdApi = (data) => {
return request.get(`/base/screen/info/getDevAttributeRecordById`, { return request.get(`/base/screen/info/getDevAttributeRecordById`, {
@ -68,9 +75,23 @@ export const queryLimitSpaceApi = (data) => {
}) })
} }
// 查询组塔监测设备 // 查询组塔监测设备 - 当日监测
export const queryTowerWatchApi = (data) => { export const queryTowerTodayApi = (data) => {
return request.get(`/base/screen/info/getTowerDevAttributeRecordByDay`, {
params: data
})
}
// 查询组塔监测设备 - 报警记录
export const queryTowerWarnApi = (data) => {
return request.get(`/base/screen/info/getPowerDevAttributeRecordByWarn`, { return request.get(`/base/screen/info/getPowerDevAttributeRecordByWarn`, {
params: data params: data
}) })
} }
// 查询基坑数据
export const queryPitDataApi = (data) => {
return request.get(`/base/screen/info/getPitDevAttributeRecordByDevice`, {
params: data
})
}

View File

@ -130,8 +130,6 @@
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="item.t_slot === 'code'"> <template v-if="item.t_slot === 'code'">
<span <span
style="color: #029EFC; cursor: pointer"
@click="toggleCode(scope.row)"
> >
{{ scope.row[item.t_props] }} {{ scope.row[item.t_props] }}
</span> </span>

View File

@ -34,32 +34,32 @@
<span>{{ item.tit }}</span> <span>{{ item.tit }}</span>
</div>--> </div>-->
<div class="single-icon"> <div class="single-icon">
<span style="color: #42C8E3">37°C</span> <span style="color: #42C8E3">{{ environmentInfoList ? environmentInfoList[8].jcValue : '' }}°C</span>
<span>温度</span> <span>温度</span>
<img src="../../assets/img/temp.png" alt=""> <img src="../../assets/img/temp.png" alt="">
</div> </div>
<div class="single-icon"> <div class="single-icon">
<span style="color: #FDA496">32m/s</span> <span style="color: #FDA496">{{ environmentInfoList ? environmentInfoList[7].jcValue : '' }}m/s</span>
<span>风速</span> <span>风速</span>
<img src="../../assets/img/wind.png" alt=""> <img src="../../assets/img/wind.png" alt="">
</div> </div>
<div class="single-icon"> <div class="single-icon">
<span style="color: #87D674">60%</span> <span style="color: #87D674">{{ environmentInfoList ? environmentInfoList[9].jcValue : '' }}%rh</span>
<span>湿度</span> <span>湿度</span>
<img src="../../assets/img/wet.png" alt=""> <img src="../../assets/img/wet.png" alt="">
</div> </div>
<div class="single-icon"> <div class="single-icon">
<span style="color: #F2AD49">{{ environmentInfoList[5].jcValue }}分贝</span> <span style="color: #F2AD49">{{ environmentInfoList ? environmentInfoList[5].jcValue : '' }}db</span>
<span>噪声</span> <span>噪声</span>
<img src="../../assets/img/loud.png" alt=""> <img src="../../assets/img/loud.png" alt="">
</div> </div>
<div class="single-icon"> <div class="single-icon">
<span style="color: #9634CC">{{ environmentInfoList[3].jcValue }}/ugm3</span> <span style="color: #9634CC">{{ environmentInfoList ? environmentInfoList[3].jcValue : '' }}/ugm3</span>
<span>PM2.5</span> <span>PM2.5</span>
<img src="../../assets/img/pm2.5.png" alt=""> <img src="../../assets/img/pm2.5.png" alt="">
</div> </div>
<div class="single-icon"> <div class="single-icon">
<span style="color: #1DB1C0">{{ environmentInfoList[4].jcValue }}/ugm3</span> <span style="color: #1DB1C0">{{ environmentInfoList ? environmentInfoList[4].jcValue : '' }}/ugm3</span>
<span>PM10</span> <span>PM10</span>
<img src="../../assets/img/pm10.png" alt=""> <img src="../../assets/img/pm10.png" alt="">
</div> </div>
@ -155,7 +155,7 @@ export default {
name: 'manDetect', name: 'manDetect',
data() { data() {
return { return {
environmentInfoList: [], environmentInfoList: undefined,
deviceVal: undefined, deviceVal: undefined,
deviceRange: [], deviceRange: [],
tableList: [ tableList: [
@ -197,17 +197,20 @@ export default {
methods: { methods: {
async getDeviceData(proId) { async getDeviceData(proId) {
let res = await queryDeviceByProApi({ let res = await queryDeviceByProApi({
proId proId,
devType: 116
}) })
this.deviceVal = res.data.data[0].devId if(res.data.data.length !== 0) {
this.deviceRange = res.data.data.map(item => { this.deviceVal = res.data.data[0].devId
return { this.deviceRange = res.data.data.map(item => {
label: item.devName, return {
value: item.devId label: item.devName,
} value: item.devId
}) }
await this.getEnvironmentData(this.deviceVal) })
await this.getChartsData(this.deviceVal) await this.getEnvironmentData(this.deviceVal)
await this.getChartsData(this.deviceVal)
}
}, },
async getEnvironmentData(devId) { async getEnvironmentData(devId) {
let res = await queryEnvironmentInfoByIdApi({ let res = await queryEnvironmentInfoByIdApi({
@ -321,7 +324,7 @@ export default {
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: '%', name: '%rh',
}, },
series: [ series: [
{ {
@ -376,7 +379,7 @@ export default {
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: '分贝', name: 'db',
}, },
series: [ series: [
{ {

View File

@ -3,8 +3,26 @@
<div class="pit-lef"> <div class="pit-lef">
<div class="tower-watch"> <div class="tower-watch">
<div class="inner-tit"> <div class="inner-tit">
<img src="../../assets/img/lef-badge.png" alt=""> <div>
组塔检测 <img src="../../assets/img/lef-badge.png" alt="">
组塔检测
</div>
<div style="display: flex; justify-content: right">
<el-select
v-model="pitVal"
clearable
filterable
placeholder="请选择"
@change="pitChange"
>
<el-option
v-for="item in pitRange"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div> </div>
<div class="work-icons"> <div class="work-icons">
<!-- <div <!-- <div
@ -155,6 +173,8 @@
<script> <script>
import { import {
queryDeviceByProApi,
queryPitDataApi,
queryLimitSpaceApi queryLimitSpaceApi
} from '@/api/substation/substation' } from '@/api/substation/substation'
import * as echarts from 'echarts' import * as echarts from 'echarts'
@ -172,6 +192,8 @@ export default {
data() { data() {
return { return {
currentPit: 1, currentPit: 1,
pitVal: undefined,
pitRange: [],
// 0线 1 2线 // 0线 1 2线
pitList: [ pitList: [
{ id: 1, status: 1 }, { id: 1, status: 1 },
@ -195,9 +217,32 @@ export default {
mounted() { mounted() {
console.log(this.sendMsg) console.log(this.sendMsg)
this.getLimitData(this.sendMsg.projectId) this.getLimitData(this.sendMsg.projectId)
this.generateCharts() this.getDeviceData(this.sendMsg.projectId)
// this.generateCharts()
}, },
methods: { methods: {
async getDeviceData(proId) {
let res = await queryDeviceByProApi({
proId,
devType: 119
})
if(res.data.data.length !== 0) {
this.pitVal = res.data.data[0].devId
this.pitRange = res.data.data.map(item => {
return {
label: item.devName,
value: item.devId
}
})
await this.getPitData(this.pitVal)
}
},
async getPitData(devId) {
let res = await queryPitDataApi({
devId
})
this.generateCharts(res.data)
},
async getLimitData(proId) { async getLimitData(proId) {
let res = await queryLimitSpaceApi({ let res = await queryLimitSpaceApi({
proId proId
@ -207,6 +252,10 @@ export default {
selPit(val) { selPit(val) {
this.currentPit = val.id this.currentPit = val.id
}, },
pitChange(e) {
console.log(e)
this.getPitData(e)
},
rowStyle(scope) { rowStyle(scope) {
if(scope.rowIndex % 2 === 0) { if(scope.rowIndex % 2 === 0) {
return { return {
@ -218,7 +267,19 @@ export default {
} }
} }
}, },
generateCharts() { generateCharts(list) {
let O2Arr = list['含氧量'].map(item => {
return Number(item.jcValue)
})
let COArr = list['一氧化碳'].map(item => {
return Number(item.jcValue)
})
let fireArr = list['可燃气体'].map(item => {
return Number(item.jcValue)
})
let H2SArr = list['硫化氢'].map(item => {
return Number(item.jcValue)
})
// //
let O2Option = { let O2Option = {
tooltip: { tooltip: {
@ -256,7 +317,7 @@ export default {
name: '含氧量', name: '含氧量',
type: 'bar', type: 'bar',
barWidth: '40%', barWidth: '40%',
data: [118, 112, 93, 98, 107, 91, 96], data: O2Arr,
itemStyle:{ itemStyle:{
// //
color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [ color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
@ -302,7 +363,7 @@ export default {
series: [ series: [
{ {
name: '可燃气体', name: '可燃气体',
data: [301, 350, 313, 352, 426, 487, 503], data: fireArr,
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
@ -353,7 +414,7 @@ export default {
series: [ series: [
{ {
name: '一氧化碳', name: '一氧化碳',
data: [90, 94, 101, 66, 86, 72, 60], data: COArr,
type: 'line', type: 'line',
smooth: true, smooth: true,
lineStyle: { lineStyle: {
@ -423,7 +484,7 @@ export default {
},*/ },*/
{ {
name: '硫化氢', name: '硫化氢',
data: [205, 182, 97, 264, 173, 473, 235], data: H2SArr,
type: 'line', type: 'line',
lineStyle: { lineStyle: {
color: '#4B84FC' color: '#4B84FC'
@ -483,12 +544,13 @@ export default {
.inner-tit{ .inner-tit{
width: 100%; width: 45%;
box-sizing: border-box; box-sizing: border-box;
padding: 10px 20px; padding: 10px 20px;
background-color: #EFF4FE; background-color: #EFF4FE;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
color: #000; color: #000;
font-size: 20px; font-size: 20px;
font-family: 'YouShe', sans-serif; font-family: 'YouShe', sans-serif;

View File

@ -21,12 +21,38 @@
在线 在线
</div> </div>
</div> </div>
<span>倾角监测设备</span>
<div class="lef-tower-pic"> <div class="lef-tower-pic">
<div <div
:class="['single-tower', { isActive: currentTower === item.id } ]" :class="['single-tower', { isActive: currentAngleTower === item.id } ]"
v-for="item in towerList" v-for="item in towerAngleList"
:key="item.id" :key="item.id"
@click="selTower(item)" @click="selTowerAngle(item)"
>
<img
v-if="item.status === 0"
src="../../assets/img/offline.png"
alt=""
/>
<img
v-if="item.status === 1"
src="../../assets/img/alerting.png"
alt=""
/>
<img
v-if="item.status === 2"
src="../../assets/img/inline.png"
alt=""
/>
</div>
</div>
<span>拉力监测设备</span>
<div class="lef-tower-pic">
<div
:class="['single-tower', { isActive: currentPullTower === item.id } ]"
v-for="item in towerPullList"
:key="item.id"
@click="selTowerPull(item)"
> >
<img <img
v-if="item.status === 0" v-if="item.status === 0"
@ -121,13 +147,13 @@
:row-style="rowStyle" :row-style="rowStyle"
> >
<el-table-column <el-table-column
prop="name" prop="devName"
label="设备名称" label="设备名称"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="time" prop="jcTime"
label="时间" label="时间"
align="center" align="center"
width="180" width="180"
@ -137,14 +163,12 @@
prop="angle" prop="angle"
label="倾角" label="倾角"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="force" prop="pull"
label="拉力" label="拉力"
align="center" align="center"
> >
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -161,13 +185,13 @@
:row-style="rowStyle" :row-style="rowStyle"
> >
<el-table-column <el-table-column
prop="name" prop="devName"
label="设备名称" label="设备名称"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="time" prop="jcTime"
label="时间" label="时间"
align="center" align="center"
width="180" width="180"
@ -181,7 +205,7 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="force" prop="pull"
label="拉力" label="拉力"
align="center" align="center"
@ -195,7 +219,8 @@
<script> <script>
import { import {
queryTowerWatchApi queryTowerTodayApi,
queryTowerWarnApi
} from '@/api/substation/substation' } from '@/api/substation/substation'
export default { export default {
components: { components: {
@ -210,9 +235,10 @@ export default {
name: 'towerDetect', name: 'towerDetect',
data() { data() {
return { return {
currentTower: 1, currentAngleTower: 1,
currentPullTower: 1,
// 0线 1 2线 // 0线 1 2线
towerList: [ towerAngleList: [
{ id: 1, status: 1 }, { id: 1, status: 1 },
{ id: 2, status: 2 }, { id: 2, status: 2 },
{ id: 3, status: 0 }, { id: 3, status: 0 },
@ -224,87 +250,20 @@ export default {
{ id: 9, status: 2 }, { id: 9, status: 2 },
{ id: 10, status: 2 }, { id: 10, status: 2 },
], ],
detectList: [ towerPullList: [
{ { id: 1, status: 1 },
name: 'xx设备', { id: 2, status: 2 },
time: '2024.10.01 12:04:03', { id: 3, status: 0 },
angle: '30°', { id: 4, status: 0 },
force: '30N' { id: 5, status: 2 },
}, { id: 6, status: 2 },
{ { id: 7, status: 1 },
name: 'xx设备', { id: 8, status: 1 },
time: '2024.10.01 12:04:03', { id: 9, status: 2 },
angle: '30°', { id: 10, status: 2 },
force: '30N'
},
{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
], ],
alertList: [ detectList: [],
{ alertList: []
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},{
name: 'xx设备',
time: '2024.10.01 12:04:03',
angle: '30°',
force: '30N'
},
]
} }
}, },
created() { created() {
@ -313,16 +272,41 @@ export default {
mounted() { mounted() {
console.log(this.sendMsg) console.log(this.sendMsg)
this.getTowerTodayData(this.sendMsg.projectId)
this.getTowerWarnData(this.sendMsg.projectId) this.getTowerWarnData(this.sendMsg.projectId)
}, },
methods: { methods: {
async getTowerWarnData(devId) { async getTowerWarnData(proId) {
let res = await queryTowerWatchApi({ let res = await queryTowerWarnApi({
devId proId
}) })
res.data.forEach(item => {
if(item.devType === 'angle') {
item.angle = item.jcValue
} else if(item.dev === 'pull') {
item.pull = item.jcValue
}
})
this.alertList = res.data
}, },
selTower(val) { async getTowerTodayData(proId) {
this.currentTower = val.id let res = await queryTowerTodayApi({
proId
})
res.data.forEach(item => {
if(item.devType === 'angle') {
item.angle = item.jcValue
} else if(item.dev === 'pull') {
item.pull = item.jcValue
}
})
this.detectList = res.data
},
selTowerAngle(val) {
this.currentAngleTower = val.id
},
selTowerPull(val) {
this.currentPullTower = val.id
}, },
rowStyle(scope) { rowStyle(scope) {
if(scope.rowIndex % 2 === 0) { if(scope.rowIndex % 2 === 0) {
@ -407,7 +391,7 @@ export default {
.lef-spin{ .lef-spin{
width: 100%; width: 100%;
height: 30px; height: 4%;
display: flex; display: flex;
align-items: center; align-items: center;
color: #000; color: #000;
@ -432,19 +416,29 @@ export default {
} }
span{
padding: 15px 0;
color: #000;
font-size: 16px;
}
.lef-tower-pic{ .lef-tower-pic{
flex: 1; width: 100%;
height: 350px;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
flex-wrap: wrap; flex-wrap: wrap;
overflow-y: auto;
.single-tower{ .single-tower{
width: 35%; width: 35%;
height: 17%; height: 135px;
border-radius: 20px; border-radius: 20px;
cursor: pointer; cursor: pointer;
display: flex; display: flex;

View File

@ -35,13 +35,13 @@
<!-- 左侧数据模块列表 --> <!-- 左侧数据模块列表 -->
<div class="leftModuleBox"> <div class="leftModuleBox">
<div style="height: 200px; margin-bottom: 10px"> <div style="height: 200px; margin-bottom: 10px">
<LeftOne @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">
<LeftTwo @openDialog="handleDialog"></LeftTwo> <LeftTwo :key="childKey" @openDialog="handleDialog"></LeftTwo>
</div> </div>
<div style="height: 300px"> <div style="height: 300px">
<LeftThree @openDialog="handleDialog"></LeftThree> <LeftThree :key="childKey" @openDialog="handleDialog"></LeftThree>
</div> </div>
</div> </div>
<!-- 中间3D效果展示 --> <!-- 中间3D效果展示 -->
@ -80,10 +80,10 @@
<!-- 右侧数据模块列表 --> <!-- 右侧数据模块列表 -->
<div class="rightModuleBox"> <div class="rightModuleBox">
<div style="height: 470px; margin-bottom: 10px"> <div style="height: 470px; margin-bottom: 10px">
<RightOne @openDialog="handleDialog"></RightOne> <RightOne :key="childKey" @openDialog="handleDialog"></RightOne>
</div> </div>
<div style="height: 470px"> <div style="height: 470px">
<rightTwo @openDialog="handleDialog"></rightTwo> <rightTwo :key="childKey" @openDialog="handleDialog"></rightTwo>
</div> </div>
<!-- <rightThree></rightThree>--> <!-- <rightThree></rightThree>-->
<!-- <LeftThree></LeftThree>--> <!-- <LeftThree></LeftThree>-->
@ -179,6 +179,7 @@ export default {
name: 'Home', name: 'Home',
data() { data() {
return { return {
childKey: 0,
currentIndex: 1, currentIndex: 1,
geoData: undefined geoData: undefined
} }
@ -190,6 +191,10 @@ export default {
mounted() { mounted() {
this.getGeoData() this.getGeoData()
setInterval(() => {
this.childKey++
this.getGeoData()
}, 1000 * 60)
/* this.geoData = [ /* this.geoData = [
{ name: '北京市', projName: '王府井工程', itemStyle: { normal: { areaColor: '#7DDEFF' } }, value: [116.407526, 39.90403] }, { name: '北京市', projName: '王府井工程', itemStyle: { normal: { areaColor: '#7DDEFF' } }, value: [116.407526, 39.90403] },
{ name: '上海市', projName: '外滩工程', itemStyle: { normal: { areaColor: '#7DDEFF' } }, value: [121.473701, 31.230416] }, { name: '上海市', projName: '外滩工程', itemStyle: { normal: { areaColor: '#7DDEFF' } }, value: [121.473701, 31.230416] },