大屏测试问题修改

This commit is contained in:
zzyuan 2024-10-11 18:04:52 +08:00
parent 9b9def14d4
commit abffaf45e5
14 changed files with 533 additions and 54 deletions

View File

@ -124,7 +124,14 @@ export default {
async getChartsData(devId) {
this.desHander()
let res = await getTowerDevAttributeRecordByDevice({devId})
this.generateCharts(res.data.slice(0,9))
let arr = []
res.data.forEach(item=>{
if(item.jcName=="角度Y"){
arr.push(item)
}
})
console.log(arr)
this.generateCharts(arr.slice(0,9))
},
//
openChart() {
@ -153,6 +160,16 @@ export default {
//
let tempOption = {
title: {
top: 0,
left: 0,
text: '倾角',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
tooltip: {
trigger: 'axis',
axisPointer: {

View File

@ -177,6 +177,16 @@ export default {
//
let O2Option = {
title: {
top: 0,
left: 0,
text: '含氧量',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
@ -234,6 +244,16 @@ export default {
O2Chart.setOption(O2Option)
//
let fireOption = {
title: {
top: 0,
left: 0,
text: '可燃气体',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
grid: {
width: '80%',
height: '60%'
@ -285,6 +305,16 @@ export default {
fireChart.setOption(fireOption)
//
let COOption = {
title: {
top: 0,
left: 0,
text: '一氧化碳',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
grid: {
width: '80%',
height: '60%'
@ -340,6 +370,16 @@ export default {
COChart.setOption(COOption)
//
let H2SOption = {
title: {
top: 0,
left: 0,
text: '硫化氢',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
grid: {
width: '80%',
height: '60%'

View File

@ -184,6 +184,16 @@ export default {
})
//
let tempOption = {
title: {
top: 0,
left: 0,
text: '温度',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
@ -241,6 +251,16 @@ export default {
tempChart.setOption(tempOption)
// 湿
let wetOption = {
title: {
top: 0,
left: 0,
text: '湿度',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
grid: {
width: '80%',
height: '60%'
@ -296,6 +316,16 @@ export default {
wetChart.setOption(wetOption)
//
let loudOption = {
title: {
top: 0,
left: 0,
text: '噪声',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
grid: {
width: '80%',
height: '60%'
@ -347,6 +377,16 @@ export default {
loudChart.setOption(loudOption)
//
let airOption = {
title: {
top: 0,
left: 0,
text: '空气质量',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
grid: {
width: '80%',
height: '60%'

View File

@ -69,8 +69,8 @@ import {
queryEnvironmentInfoByIdApi,
getTowerDevAttributeRecordByDevice,
queryWarnInfoByIdApi
} from '@/api/substation/substation'
import * as echarts from 'echarts'
} from '@/api/substation/substation';
import * as echarts from 'echarts';
export default {
name: 'pullDialog',
components: {},
@ -125,10 +125,15 @@ export default {
//echart
async getChartsData(devId) {
this.desHander()
let res = await getTowerDevAttributeRecordByDevice({devId})
// console.log(res)
this.generateCharts(res.data.slice(0,9))
let res = await getTowerDevAttributeRecordByDevice({devId})
let arr = []
res.data.forEach(item=>{
if(item.jcName=="拉力"){
arr.push(item)
}
})
console.log(arr)
this.generateCharts(arr.slice(0,9))
},
//
openChart() {
@ -148,14 +153,24 @@ export default {
//echart
generateCharts(list) {
console.log(list)
let tempArr = list.map(item => {
let pullArr = list.map(item => {
return Number(item.jcValue)
})
let tempXList = list.map(item => {
let pullXList = list.map(item => {
return item.xtime
})
//
let tempOption = {
let pullOption = {
title: {
top: 0,
left: 0,
text: '拉力',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
@ -174,7 +189,7 @@ export default {
xAxis: [
{
type: 'category',
data: tempXList,
data: pullXList,
axisTick: {
alignWithLabel: true
}
@ -183,7 +198,7 @@ export default {
yAxis: [
{
type: 'value',
name: '°'
name: 'N'
}
],
series: [
@ -191,7 +206,7 @@ export default {
name: '拉力',
type: 'bar',
barWidth: '40%',
data: tempArr,
data: pullArr,
itemStyle:{
//
color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
@ -209,9 +224,8 @@ export default {
}
]
};
let tempChart = echarts.init(document.querySelector('#pullWetChart'))
tempChart.dispose()
tempChart.setOption(tempOption)
let pullChart = echarts.init(document.querySelector('#pullWetChart'))
pullChart.setOption(pullOption)
},
//
@ -220,7 +234,7 @@ export default {
myChart.dispose();
},
closeDialog() {
echarts.init(document.getElementById('#pullWetChart')).dispose()
// echarts.init(document.getElementById('#pullWetChart')).dispose()
this.$emit('closeDialog')
}
},

View File

@ -48,12 +48,12 @@
v-loading="loading"
:row-style="rowStyle"
>
<el-table-column
align="center"
width="80"
label="序号"
type="index"
/>
<el-table-column type="index" label="序号" align="center" width="80">
<!-- 使用 `index` 方法自定义索引传入当前行数据和行索引 -->
<template slot-scope="scope">
{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column
v-for="(item, v) in columnList"
:key="v"

View File

@ -0,0 +1,320 @@
<template>
<div class="wrapper">
<el-dialog
title=""
:visible.sync="ifOpen"
width="70%"
append-to-body
:close-on-click-modal="false"
@open="openChart"
@close="closeDialog"
>
<template #title>
<div style="display: flex; align-items: center">
<img src="../../assets/img/signalPrefix.png" alt="" />
<span
style="
padding: 0 15px 0 10px;
font-size: 20px;
font-weight: bold;
"
>组塔监测</span
>
<img src="../../assets/img/lineSuffix.png" alt="" />
</div>
</template>
<div class="content">
<div class="cont-lef">
<div class="sel-top">{{proData.proName}}</div>
<div
:class="['single-sel', { isActive: currentSelIndex === item.value }]"
v-for="item in deviceRange"
:key="item.value"
@click="handleEnvir(item)"
>{{ item.label }}</div
>
</div>
<div class="cont-rig">
<!-- <div class="rig-top">
<el-date-picker
v-model="dateVal"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择日期"
>
</el-date-picker>
<el-button
style="margin-left: 10px"
type="primary"
icon="el-icon-search"
size="mini"
@click="queryDate"
>搜索</el-button
>
</div> -->
<div class="rig-charts">
<div class="charts-up">
<div id="wireWetChart"></div>
</div>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import {
queryDeviceByProApi,
queryEnvironmentInfoByIdApi,
getTowerDevAttributeRecordByDevice,
queryWarnInfoByIdApi
} from '@/api/substation/substation';
import * as echarts from 'echarts';
export default {
name: 'wireDialog',
components: {},
props: {
ifOpen: {
type: Boolean,
default: false
},
proData: {
type: Object,
default: {}
},
},
data() {
return {
open: false,
deviceVal: undefined,
deviceRange: [],
dateVal: '',
selList: [
{ id: 1, name: '一号环境' },
{ id: 2, name: '二号环境' },
{ id: 3, name: '三号环境' },
],
currentSelIndex: null
}
},
mounted() {
},
methods: {
//
async getDeviceData(proId) {
let res = await queryDeviceByProApi({
proId,
devType: 124
})
if(res.data.data.length !== 0) {
this.deviceVal = res.data.data[0].devId;
this.currentSelIndex = res.data.data[0].devId;
this.deviceRange = res.data.data.map(item => {
return {
label: item.devName,
value: item.devId
}
})
this.deviceVal = this.proData.id;
this.currentSelIndex = this.proData.id;
await this.getChartsData(this.deviceVal)
}
},
//echart
async getChartsData(devId) {
this.desHander()
let res = await getTowerDevAttributeRecordByDevice({devId})
let arr = []
res.data.forEach(item=>{
if(item.jcName=="拉力"){
arr.push(item)
}
})
console.log(arr)
this.generateCharts(arr.slice(0,9))
},
//
openChart() {
this.$nextTick(() => {
this.getDeviceData(this.proData.proId)
})
},
//
handleEnvir(val) {
this.currentSelIndex = val.value
// this.generateCharts()
this.getChartsData(val.value)
},
queryDate() {
console.log(this.dateVal)
},
//echart
generateCharts(list) {
console.log(list)
let wireArr = list.map(item => {
return Number(item.jcValue)
})
let wireXList = list.map(item => {
return item.xtime
})
//
let wireOption = {
title: {
top: 0,
left: 0,
text: '拉力',
// subtext: '',
textStyle: {
color: '#000',
fontSize: 16,
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
valueFormatter:(value) => {
return value + 'N'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: wireXList,
axisTick: {
alignWithLabel: true
}
}
],
yAxis: [
{
type: 'value',
name: 'N'
}
],
series: [
{
name: '拉力',
type: 'bar',
barWidth: '40%',
data: wireArr,
itemStyle:{
//
color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
{
offset: 0,
color: '#007FFF'
},
{
offset: 1,
color: '#93D4EA'
}
]),
borderRadius: [3, 3, 0, 0],
}
}
]
};
let wireChart = echarts.init(document.querySelector('#wireWetChart'))
wireChart.setOption(wireOption)
},
//
desHander(){
let myChart = echarts.init(document.querySelector('#wireWetChart'));
myChart.dispose();
},
closeDialog() {
// echarts.init(document.getElementById('#wireWetChart')).dispose()
this.$emit('closeDialog')
}
},
}
</script>
<style lang="scss" scoped>
.content {
height: 600px;
display: flex;
justify-content: space-between;
.cont-lef {
width: 25%;
height: 100%;
margin-right: 15px;
border: 1px solid #c6d8fa;
border-radius: 10px;
.sel-top {
width: 100%;
box-sizing: border-box;
padding: 20px 40px;
background-color: #d3e4fa;
font-size: 18px;
color: #000;
}
.single-sel {
width: 100%;
box-sizing: border-box;
padding: 20px 40px;
font-size: 16px;
color: #000;
border-bottom: 1px solid #ced1d5;
cursor: pointer;
}
.isActive{
background-color: #d3e4fa;
}
}
.cont-rig {
flex: 1;
display: flex;
flex-direction: column;
.rig-top {
width: 100%;
display: flex;
margin-bottom: 10px;
}
.rig-charts {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.charts-up,
.charts-down {
width: 100%;
height: 100%;
display: flex;
justify-content: space-between;
div {
width: 100%;
height: 100%;
border: 1px dashed #98bbda;
border-radius: 5px;
box-sizing: border-box;
padding: 10px;
}
}
}
}
}
</style>

View File

@ -112,12 +112,12 @@
'linear-gradient(to bottom, #A0C9E8, #DDECFB)',
}"
>
<el-table-column
align="center"
width="80"
label="序号"
type="index"
/>
<el-table-column type="index" label="序号" align="center" width="80">
<!-- 使用 `index` 方法自定义索引传入当前行数据和行索引 -->
<template slot-scope="scope">
{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column
v-for="(item, v) in columnList"
:key="v"
@ -180,6 +180,13 @@
:proData="angleData"
>
</AngleDialog>
<WireDialog
:if-open="wireOpen"
@closeDialog="wireOpen = false"
:proData="wireData"
>
</WireDialog>
</div>
</template>
@ -196,6 +203,7 @@ import EnvirDialog from '@/components/dialog/envirDialog.vue'
import DipDialog from '@/components/dialog/dipDialog.vue'
import PullDialog from '@/components/dialog/pullDialog.vue'
import AngleDialog from '@/components/dialog/angleDialog.vue'
import WireDialog from '@/components/dialog/wireDialog.vue'
export default {
name: 'commonDialog',
components: {
@ -203,7 +211,8 @@ export default {
EnvirDialog,
DipDialog,
PullDialog,
AngleDialog
AngleDialog,
WireDialog
},
data() {
return {
@ -228,6 +237,8 @@ export default {
angleData:{},
pullOpen: false,
pullData:{},
wireOpen: false,
wireData:{},
proTypeRange: [
{ label: '变电工程', value: '1' },
{ label: '线路工程', value: '2' },
@ -442,10 +453,15 @@ export default {
},
async getTableList(func, param) {
this.loading = true
// console.log(this.queryParams.date)
if (this.queryParams.date) {
// console.log(this.queryParams.date)
this.queryParams.startTime = this.queryParams.date[0]
this.queryParams.endTime = this.queryParams.date[1]
delete this.queryParams.date
// delete this.queryParams.date
}else{
this.queryParams.startTime = undefined
this.queryParams.endTime = undefined
}
if(param) {
Object.assign(this.queryParams, param)
@ -494,6 +510,9 @@ export default {
} else if(v.devTypeName === '组塔拉力监测类') {
this.pullOpen = true;
this.pullData=v;
} else if(v.devTypeName === '牵张引线拉力监测类') {
this.wireOpen = true;
this.wireData=v;
}
}
},

View File

@ -55,6 +55,10 @@ let xizangJson = require('@/untils/mapJson/xizang.json')
let guangxiJson = require('@/untils/mapJson/guangxi.json')
let ningxiaJson = require('@/untils/mapJson/ningxia.json')
let qinghaiJson = require('@/untils/mapJson/qinghai.json')
let gansuJson = require('@/untils/mapJson/gansu.json')
let taiwanJson = require('@/untils/mapJson/taiwan.json')
let xianggangJson = require('@/untils/mapJson/xianggang.json')
let aomenJson = require('@/untils/mapJson/aomen.json')
export default {
name: 'centerTopPage',
@ -117,6 +121,10 @@ export default {
{ id: 28, json: guangxiJson },
{ id: 29, json: ningxiaJson },
{ id: 30, json: qinghaiJson },
{ id: 31, json: gansuJson },
{ id: 32, json: taiwanJson },
{ id: 33, json: xianggangJson },
{ id: 34, json: aomenJson },
]
}
},

View File

@ -243,22 +243,22 @@ export default {
this.map.addOverlay(marker)
})
this_.map.addEventListener('click', function (e) {
console.log(e)
var pt = e.latlng
geoc.getLocation(pt, function (res) {
console.log(res, 'res')
/* var addComp = res.addressComponents
this_.form.detailsAddress = `${addComp.city}${addComp.district}${addComp.street}${addComp.streetNumber}`
this_.form.province = `${addComp.province}`
this_.form.longitude = e.latlng.lng
this_.form.latitude = e.latlng.lat */
})
this_.map.clearOverlays()
point = new BMapGL.Point(e.latlng.lng, e.latlng.lat)
let marker = new BMapGL.Marker(point) //
this_.map.addOverlay(marker)
})
// this_.map.addEventListener('click', function (e) {
// console.log(e)
// var pt = e.latlng
// geoc.getLocation(pt, function (res) {
// console.log(res, 'res')
// /* var addComp = res.addressComponents
// this_.form.detailsAddress = `${addComp.city}${addComp.district}${addComp.street}${addComp.streetNumber}`
// this_.form.province = `${addComp.province}`
// this_.form.longitude = e.latlng.lng
// this_.form.latitude = e.latlng.lat */
// })
// this_.map.clearOverlays()
// point = new BMapGL.Point(e.latlng.lng, e.latlng.lat)
// let marker = new BMapGL.Marker(point) //
// this_.map.addOverlay(marker)
// })
})
},
handleCrew(v) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"adcode":710000,"name":"台湾省","center":[121.509062,25.044332],"centroid":[120.971485,23.749452],"childrenNum":0,"level":"province","acroutes":[100000],"parent":{"adcode":100000}},"geometry":{"type":"MultiPolygon","coordinates":[[[[120.443558,22.441245],[120.517584,22.408536],[120.569903,22.361728],[120.640505,22.241347],[120.659209,22.15432],[120.662001,22.066983],[120.651464,22.033165],[120.667691,21.983168],[120.70157,21.927065],[120.743246,21.915569],[120.78155,21.923957],[120.85468,21.883333],[120.87291,21.897387],[120.866482,21.98436],[120.907315,22.033208],[120.904154,22.119757],[120.914955,22.302718],[120.981658,22.528305],[121.015009,22.584168],[121.033292,22.650725],[121.078498,22.669656],[121.170544,22.723133],[121.210481,22.770665],[121.237931,22.836327],[121.324708,22.945666],[121.354687,23.01006],[121.370388,23.084347],[121.409535,23.102669],[121.430294,23.137196],[121.415015,23.195973],[121.440358,23.272096],[121.479558,23.3223],[121.497788,23.419789],[121.521497,23.483198],[121.523078,23.538708],[121.587778,23.76102],[121.621604,23.92075],[121.659381,24.006893],[121.639992,24.064276],[121.643838,24.097713],[121.678085,24.133906],[121.689044,24.174401],[121.809172,24.339055],[121.826717,24.423579],[121.867498,24.478978],[121.885464,24.529677],[121.892524,24.617912],[121.862598,24.671515],[121.837993,24.76015],[121.845053,24.836269],[121.932883,24.938645],[122.012178,25.001469],[121.980776,25.03079],[121.947425,25.031955],[121.917077,25.137908],[121.842155,25.135332],[121.782407,25.160425],[121.750531,25.160716],[121.707327,25.191493],[121.700319,25.226913],[121.655324,25.241859],[121.623026,25.294694],[121.584986,25.308926],[121.535038,25.307515],[121.444415,25.270624],[121.413487,25.238912],[121.371864,25.159885],[121.319281,25.140691],[121.209322,25.127104],[121.133135,25.078728],[121.102102,25.075153],[121.024704,25.040479],[121.009688,24.993649],[120.960899,24.940227],[120.908475,24.852012],[120.892299,24.767526],[120.823753,24.688321],[120.762371,24.658335],[120.688661,24.600678],[120.64277,24.490172],[120.589187,24.432354],[120.546299,24.370413],[120.521009,24.312038],[120.470534,24.24259],[120.451461,24.182691],[120.392029,24.11824],[120.316158,23.984881],[120.278276,23.927798],[120.245768,23.840553],[120.175377,23.807385],[120.102773,23.700981],[120.094817,23.587466],[120.121741,23.504664],[120.107831,23.341264],[120.081434,23.29191],[120.018947,23.073115],[120.029537,23.048623],[120.131382,23.002118],[120.149138,22.896715],[120.200403,22.721101],[120.274272,22.560181],[120.297191,22.531315],[120.443558,22.441245]]],[[[124.542984,25.903911],[124.586346,25.913777],[124.572805,25.93974],[124.541825,25.931031],[124.542984,25.903911]]],[[[123.445286,25.725966],[123.472104,25.713024],[123.508933,25.723237],[123.514834,25.751226],[123.483063,25.768587],[123.444496,25.746514],[123.445286,25.725966]]],[[[119.64597,23.55091],[119.701081,23.550657],[119.678057,23.600041],[119.610089,23.603953],[119.594388,23.577245],[119.566306,23.584732],[119.562565,23.530377],[119.573788,23.505885],[119.609141,23.503864],[119.64597,23.55091]]],[[[123.667207,25.914066],[123.707092,25.916873],[123.678008,25.938667],[123.667207,25.914066]]],[[[119.506031,23.625567],[119.505241,23.575814],[119.472416,23.557136],[119.523207,23.563699],[119.525578,23.624895],[119.506031,23.625567]]],[[[119.49739,23.386683],[119.495125,23.350156],[119.516885,23.349903],[119.49739,23.386683]]],[[[119.557454,23.666474],[119.604083,23.616989],[119.615516,23.660925],[119.586485,23.675974],[119.557454,23.666474]]],[[[121.46823,22.676644],[121.476502,22.64166],[121.513541,22.631833],[121.5147,22.67639],[121.46823,22.676644]]],[[[121.510538,22.087185],[121.507693,22.048523],[121.534089,22.022146],[121.594522,21.995382],[121.604586,22.022699],[121.575028,22.037122],[121.575607,22.084421],[121.510538,22.087185]]],[[[122.097533,25.500168],[122.093581,25.47183],[122.124825,25.475932],[122.097533,25.500168]]],[[[119.421467,23.216684],[119.421309,23.18935],[119.453396,23.217697],[119.421467,23.216684]]],[[[120.355042,22.327259],[120.395454,22.342287],[120.383072,22.355573],[120.355042,22.327259]]]]}}]}

File diff suppressed because one or more lines are too long

View File

@ -380,8 +380,8 @@ export default {
i: 11,
isAccord: '1*1',
componentName: '',
},
],
}
],
menuLayout: [
{
@ -486,13 +486,30 @@ export default {
methods: {
async getTableList() {
let res = await queryTableApi()
this.layout = res.data
this.layout = res.data;
console.log(this.layout)
},
handleClearPanel() {
this.layout = this.layoutT
this.layout.forEach((e) => {
e.componentName = ''
})
// this.layout = this.layoutT.slice()
this.layout = [
//
{ x: 0,y: 0,w: 3,h: 4,i: 0,isAccord: '1*1',componentName: '',},
{x: 3,y: 0,w: 3,h: 4,i: 1,isAccord: '1*1',componentName: '',},
{x: 6,y: 0,w: 3,h: 4,i: 2,isAccord: '1*1',componentName: '',},
{x: 9,y: 0,w: 3,h: 4,i: 3,isAccord: '1*1',componentName: '',},
//
{x: 0,y: 1,w: 3,h: 4,i: 4,isAccord: '1*1',componentName: '',},
{x: 3,y: 1,w: 3,h: 4,i: 5,isAccord: '1*1',componentName: '',},
{x: 6,y: 1,w: 3,h: 4,i: 6,isAccord: '1*1',componentName: '',},
{x: 9,y: 1,w: 3,h: 4,i: 7,isAccord: '1*1',componentName: '',},
//
{x: 0,y: 2,w: 3,h: 4,i: 8,isAccord: '1*1',componentName: '',},
{x: 3,y: 2,w: 3,h: 4,i: 9,isAccord: '1*1',componentName: '',},
{x: 6,y: 2,w: 3,h: 4,i: 10,isAccord: '1*1',componentName: '',},
{x: 9,y: 2,w: 3,h: 4,i: 11,isAccord: '1*1',componentName: '',}
]
},
async handleSubmit() {
// 1.