前端不合规代码格式化

2024年2月1日V1.0.53^2^2
liujun 2024-01-31 14:13:49 +08:00
parent 688eb1bd1b
commit f8c31c41df
24 changed files with 407 additions and 407 deletions

View File

@ -507,7 +507,7 @@ export default {
count3 = item.count count3 = item.count
} }
}) })
this.safetyEnvironmentalInspectionList = data.insList.length > 4 ? data.insList.splice(0,4) : data.insList this.safetyEnvironmentalInspectionList = data.insList.length > 4 ? data.insList.splice(0, 4) : data.insList
this.initEcharts4(count1, count2, count3) this.initEcharts4(count1, count2, count3)
}) })
}, },
@ -553,7 +553,7 @@ export default {
// } // }
if (item.HIDDENLEVEL == 'hiddenLevel1004') { // if (item.HIDDENLEVEL == 'hiddenLevel1004') { //
yinhuanCount[0] = item.count yinhuanCount[0] = item.count
}else if (item.HIDDENLEVEL == 'hiddenLevel1002') { // } else if (item.HIDDENLEVEL == 'hiddenLevel1002') { //
yinhuanCount[1] = item.count yinhuanCount[1] = item.count
} else if (item.HIDDENLEVEL == 'jdyh001') { // } else if (item.HIDDENLEVEL == 'jdyh001') { //
yinhuanCount[2] = item.count yinhuanCount[2] = item.count

View File

@ -84,7 +84,7 @@
</div> </div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div> </div>
<div style="height: 50px"></div> <div style="height: 50px"/>
</div> </div>
</template> </template>
<script> <script>

View File

@ -14,8 +14,8 @@
<script> <script>
import List from './components/list' import List from './components/list'
import Detail from './components/detail' import Detail from './components/detail'
import ListCfd from "./components/list_cfd" import ListCfd from './components/list_cfd'
import DetailCfd from "./components/detail_cfd" import DetailCfd from './components/detail_cfd'
export default { export default {
components: { components: {
List: List, List: List,
@ -23,13 +23,6 @@ export default {
ListCfd: ListCfd, ListCfd: ListCfd,
DetailCfd: DetailCfd DetailCfd: DetailCfd
}, },
created() {
if (this.CORPINFO_ID == '035958e685cf4850bc40151c5e0617a6') {
this.activeName = 'ListCfd'
} else {
this.activeName = 'List'
}
},
data() { data() {
return { return {
activeName: 'List', activeName: 'List',
@ -49,6 +42,13 @@ export default {
} }
} }
}, },
created() {
if (this.CORPINFO_ID == '035958e685cf4850bc40151c5e0617a6') {
this.activeName = 'ListCfd'
} else {
this.activeName = 'List'
}
},
methods: { methods: {
goBack() { goBack() {
this.$parent.activeName = 'CorpInfo' this.$parent.activeName = 'CorpInfo'

View File

@ -1,5 +1,10 @@
<template> <template>
<component :is="parentObj.activeName"/> <div>
<FireControlRoom v-if="parentObj.activeName === 'FireControlRoom'"/>
<FirePumpRoom v-if="parentObj.activeName === 'FirePumpRoom'"/>
<FireResources v-if="parentObj.activeName === 'FireResources'"/>
<List v-show="parentObj.activeName === 'List'"/>
</div>
</template> </template>
<script> <script>
import List from './components/list' import List from './components/list'

View File

@ -247,7 +247,7 @@ export default {
console.log(data.varList) console.log(data.varList)
if (data.varList) { if (data.varList) {
this.varList = data.varList this.varList = data.varList
}else { } else {
this.varList = [] this.varList = []
} }
this.total = data.page.totalResult this.total = data.page.totalResult

View File

@ -612,7 +612,7 @@ export default {
immediate: false immediate: false
}, },
//'form.ENDTIME': { // 'form.ENDTIME': {
// handler: function() { // handler: function() {
// // eslint-disable-next-line no-unused-vars // // eslint-disable-next-line no-unused-vars
// var time = formatDate(new Date(), 'YYYY-MM-DD') // var time = formatDate(new Date(), 'YYYY-MM-DD')
@ -622,7 +622,7 @@ export default {
// this.form.STATE = '2' // this.form.STATE = '2'
// } // }
// } // }
//}, // },
TRAINING_TIME: function(newData, oldData) { TRAINING_TIME: function(newData, oldData) {
if (!newData) { if (!newData) {
this.TRAINING_TIME = ['', ''] this.TRAINING_TIME = ['', '']

View File

@ -82,7 +82,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page-btn-group"> <div class="page-btn-group">
<div> <div>
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button> <el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>

View File

@ -141,7 +141,7 @@ import TiandiMap from '../../../components/TianMap/TiandiMap'
import Platformvideo from '../platformelectronic/components/platformvideo.vue' import Platformvideo from '../platformelectronic/components/platformvideo.vue'
import SelectTree from '@/components/SelectTree' import SelectTree from '@/components/SelectTree'
export default { export default {
components: { Pagination, TiandiMap ,Platformvideo,SelectTree}, components: { Pagination, TiandiMap, Platformvideo, SelectTree },
directives: { waves }, directives: { waves },
data() { data() {
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
@ -163,10 +163,10 @@ export default {
dialogFormMap: false, dialogFormMap: false,
corpList: [], corpList: [],
form: { form: {
CORPINFO_ID:'', CORPINFO_ID: '',
bianjiequyu:[], bianjiequyu: [],
PLATFORMELECTRONIC_ID:'', PLATFORMELECTRONIC_ID: '',
LONGITUDEANDLATITUDE:'', LONGITUDEANDLATITUDE: '',
VIDEOMANAGER_ID: '', VIDEOMANAGER_ID: '',
VIDEO_RESOURCES_ID: '', VIDEO_RESOURCES_ID: '',
VIDEO_TYPE: 1, VIDEO_TYPE: 1,
@ -176,7 +176,7 @@ export default {
PLATFORMVIDEOMANAGEMENT_ID: '', PLATFORMVIDEOMANAGEMENT_ID: '',
LATITUDE: '', LATITUDE: '',
LONGITUDE: '', LONGITUDE: '',
SUOSHUQUYU:'' SUOSHUQUYU: ''
}, },
rules: { rules: {
CORPINFO_ID: [ CORPINFO_ID: [
@ -189,20 +189,20 @@ export default {
{ required: true, message: '请选择摄像头', trigger: 'blur' } { required: true, message: '请选择摄像头', trigger: 'blur' }
] ]
}, },
dialogForm : false, dialogForm: false,
msg:'add' , msg: 'add',
defaultProps: { defaultProps: {
value: 'id', value: 'id',
children: 'nodes', children: 'nodes',
label: 'name' label: 'name'
}, },
quyuList :[], quyuList: [],
shexiangtouForm:{}, shexiangtouForm: {},
statusList: [ statusList: [
{ id: '0', name: '请选择' }, { id: '0', name: '请选择' },
{ id: '1', name: '油管区' }, { id: '1', name: '油管区' },
{ id: '2', name: '码头区' } { id: '2', name: '码头区' }
], ]
} }
}, },
async created() { async created() {
@ -225,7 +225,7 @@ export default {
this.KEYWORDS = '' this.KEYWORDS = ''
this.getQuery() this.getQuery()
}, },
getquyuList(){ // getquyuList() { //
requestFN( requestFN(
'/dictionaries/listSelectTree', '/dictionaries/listSelectTree',
{ {
@ -235,7 +235,7 @@ export default {
this.quyuList = JSON.parse(data.zTreeNodes) this.quyuList = JSON.parse(data.zTreeNodes)
}) })
}, },
getCorpList() { // getCorpList() { //
requestFN( requestFN(
'/corpinfo/listAll', '/corpinfo/listAll',
{} {}
@ -245,12 +245,12 @@ export default {
}) })
}, },
getAllList() { // getAllList() { //
return new Promise(resolve => { return new Promise(resolve => {
requestFN( requestFN(
'/platformelectronic/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, '/platformelectronic/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{ {
KEYWORDS:this.KEYWORDS KEYWORDS: this.KEYWORDS
} }
).then((data) => { ).then((data) => {
this.varList = data.varList this.varList = data.varList
@ -268,16 +268,16 @@ export default {
this.dialogForm = true this.dialogForm = true
// this.$refs.platformvideo.init() // this.$refs.platformvideo.init()
}, },
resetForm(){ resetForm() {
this.shexiangtouForm.LONGITUDE = '' this.shexiangtouForm.LONGITUDE = ''
this.shexiangtouForm.LATITUDE = '' this.shexiangtouForm.LATITUDE = ''
this.shexiangtouForm.SUOSHUQUYU = '' this.shexiangtouForm.SUOSHUQUYU = ''
this.form.LONGITUDEANDLATITUDE = '' this.form.LONGITUDEANDLATITUDE = ''
this.shexiangtouForm = {} this.shexiangtouForm = {}
this.form= { this.form = {
CORPINFO_ID:'', CORPINFO_ID: '',
bianjiequyu:'', bianjiequyu: '',
LONGITUDEANDLATITUDE:'', LONGITUDEANDLATITUDE: '',
VIDEOMANAGER_ID: '', VIDEOMANAGER_ID: '',
VIDEO_RESOURCES_ID: '', VIDEO_RESOURCES_ID: '',
VIDEO_TYPE: 1, VIDEO_TYPE: 1,
@ -290,7 +290,7 @@ export default {
} }
}, },
upload(){ upload() {
var _this = this var _this = this
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
@ -323,14 +323,14 @@ export default {
selectVideo(row) { selectVideo(row) {
this.$refs.platformvideo.init() this.$refs.platformvideo.init()
}, },
goEdit(row){ goEdit(row) {
this.dialogForm = true this.dialogForm = true
this.listLoading = true this.listLoading = true
return new Promise(resolve => { return new Promise(resolve => {
requestFN( requestFN(
'/platformelectronic/goEdit', '/platformelectronic/goEdit',
{ {
PLATFORMELECTRONIC_ID :row.PLATFORMELECTRONIC_ID PLATFORMELECTRONIC_ID: row.PLATFORMELECTRONIC_ID
} }
).then((data) => { ).then((data) => {
this.shexiangtouForm = data.pd this.shexiangtouForm = data.pd
@ -339,7 +339,7 @@ export default {
this.form.VIDEONAME = data.pd.NAME this.form.VIDEONAME = data.pd.NAME
this.form.CODE = data.pd.INDEXCODE this.form.CODE = data.pd.INDEXCODE
this.form.SUOSHUQUYU = data.pd.SUOSHUQUYU this.form.SUOSHUQUYU = data.pd.SUOSHUQUYU
this.form.LONGITUDEANDLATITUDE = data.pd.LONGITUDE + "," +data.pd.LATITUDE this.form.LONGITUDEANDLATITUDE = data.pd.LONGITUDE + ',' + data.pd.LATITUDE
this.listLoading = false this.listLoading = false
resolve() resolve()
}).catch((e) => { }).catch((e) => {
@ -370,8 +370,8 @@ export default {
REGIONNAME: row.regionName, REGIONNAME: row.regionName,
REGIONPATH: row.regionPath, REGIONPATH: row.regionPath,
REGIONPATHNAM: row.regionPathName, REGIONPATHNAM: row.regionPathName,
VIDEONAME : row.name, VIDEONAME: row.name,
CODE:row.indexCode CODE: row.indexCode
} }
this.$set(this.form, 'VIDEONAME', row.name) this.$set(this.form, 'VIDEONAME', row.name)
this.$set(this.form, 'CODE', row.indexCode) this.$set(this.form, 'CODE', row.indexCode)
@ -381,7 +381,7 @@ export default {
}, },
// //
setPosition() { setPosition() {
if(this.shexiangtouForm.PLATFORMELECTRONIC_ID != null){ if (this.shexiangtouForm.PLATFORMELECTRONIC_ID != null) {
} }
this.shexiangtouForm.LONGITUDE = this.form.LONGITUDE this.shexiangtouForm.LONGITUDE = this.form.LONGITUDE
@ -423,10 +423,10 @@ export default {
}, },
handleMap(row) { handleMap(row) {
if(row != null){ if (row != null) {
this.form.LONGITUDE = row.LONGITUDE this.form.LONGITUDE = row.LONGITUDE
this.form.LATITUDE = row.LATITUDE this.form.LATITUDE = row.LATITUDE
this.shexiangtouForm =row this.shexiangtouForm = row
} }
this.dialogFormMap = true this.dialogFormMap = true
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -307,7 +307,7 @@ export default {
{ {
PLATFORMVIDEOMANAGEMENT_ID: row.PLATFORMVIDEOMANAGEMENT_ID PLATFORMVIDEOMANAGEMENT_ID: row.PLATFORMVIDEOMANAGEMENT_ID
} }
).then(async (res) => { ).then(async(res) => {
// this.dialogVideoHLS = true // this.dialogVideoHLS = true
this.getList() this.getList()
await this.getAllList() await this.getAllList()

View File

@ -16,7 +16,7 @@
<div class="block3"> <div class="block3">
<layout-title title="人员定位信息"/> <layout-title title="人员定位信息"/>
<div class="options"> <div class="options">
<div v-for="(item,index) in block3OptionsList" :key="index" class="option" v-if="index === 2"> <div v-for="(item,index) in block3OptionsList" v-if="index === 2" :key="index" class="option">
<img :src="item.img" class="img_top" alt=""> <img :src="item.img" class="img_top" alt="">
<img class="img_bottom" src="../../../assets/map/gangkou_index/img1.png" alt=""> <img class="img_bottom" src="../../../assets/map/gangkou_index/img1.png" alt="">
<div class="label">{{ item.label }}</div> <div class="label">{{ item.label }}</div>

View File

@ -95,7 +95,7 @@ export default {
title: '人员闸机数', title: '人员闸机数',
img: require('../../../assets/map/menjin/ico1.png'), img: require('../../../assets/map/menjin/ico1.png'),
label1: '在线数', label1: '在线数',
count1: 0, count1: 0
// label2: '线', // label2: '线',
// count2: 0 // count2: 0
}, },
@ -103,7 +103,7 @@ export default {
title: '车辆闸机数', title: '车辆闸机数',
img: require('../../../assets/map/menjin/ico2.png'), img: require('../../../assets/map/menjin/ico2.png'),
label1: '在线数', label1: '在线数',
count1: 0, count1: 0
// label2: '线', // label2: '线',
// count2: 0 // count2: 0
}, },
@ -199,15 +199,15 @@ export default {
GANGKOU: this.gangkou GANGKOU: this.gangkou
} }
).then((data) => { ).then((data) => {
/*this.block1OptionsList[0].count1 = data.onlinePerGate /* this.block1OptionsList[0].count1 = data.onlinePerGate
this.block1OptionsList[0].count2 = data.offlinePerGate this.block1OptionsList[0].count2 = data.offlinePerGate
this.block1OptionsList[1].count1 = data.onlineCarGate this.block1OptionsList[1].count1 = data.onlineCarGate
this.block1OptionsList[1].count2 = data.offlineCarGate this.block1OptionsList[1].count2 = data.offlineCarGate
this.block1OptionsList[2].count1 = data.cameraCount*/ this.block1OptionsList[2].count1 = data.cameraCount*/
this.block1OptionsList[0].count1 = data.onlinePerGate+data.offlinePerGate this.block1OptionsList[0].count1 = data.onlinePerGate + data.offlinePerGate
//this.block1OptionsList[0].count2 = // this.block1OptionsList[0].count2 =
this.block1OptionsList[1].count1 = data.onlineCarGate+data.offlineCarGate this.block1OptionsList[1].count1 = data.onlineCarGate + data.offlineCarGate
//this.block1OptionsList[1].count2 = // this.block1OptionsList[1].count2 =
this.block1OptionsList[2].count1 = data.cameraCount this.block1OptionsList[2].count1 = data.cameraCount
}).catch((e) => { }).catch((e) => {
console.log(e) console.log(e)

View File

@ -19,11 +19,11 @@
<div class="title">{{ item.title }}</div> <div class="title">{{ item.title }}</div>
<div class="info"> <div class="info">
<div class="img"><img :src="item.img" alt=""></div> <div class="img"><img :src="item.img" alt=""></div>
<div class="count" v-if="item.title == '监测站数'"> <div v-if="item.title == '监测站数'" class="count">
<div>在线数<count-to :start-val="0" :end-val="+item.onlinecount" :duration="3600"/></div> <div>在线数<count-to :start-val="0" :end-val="+item.onlinecount" :duration="3600"/></div>
<div>离线数<count-to :start-val="0" :end-val="+item.Offlinecount" :duration="3600"/></div> <div>离线数<count-to :start-val="0" :end-val="+item.Offlinecount" :duration="3600"/></div>
</div> </div>
<div class="count" v-else> <div v-else class="count">
<div>在线数-</div> <div>在线数-</div>
<div>离线数-</div> <div>离线数-</div>
</div> </div>

View File

@ -170,10 +170,10 @@
</template> </template>
<script> <script>
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import moment from 'moment/moment' import moment from 'moment/moment'
export default { export default {
props: { props: {
id: { id: {
type: String, type: String,
@ -245,7 +245,7 @@
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

View File

@ -72,31 +72,31 @@
<tr> <tr>
<td class="bbg-transparent">动火单位(部门)负责人意见</td> <td class="bbg-transparent">动火单位(部门)负责人意见</td>
<td colspan="5"> <td colspan="5">
<img v-if="info.HOT_WORK_USER_PRINCIPAL" v-viewer :src="config.fileUrl+info.HOT_WORK_USER_PRINCIPAL" width="50px" height="50px"> <img v-viewer v-if="info.HOT_WORK_USER_PRINCIPAL" :src="config.fileUrl+info.HOT_WORK_USER_PRINCIPAL" width="50px" height="50px">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="bbg-transparent">现场管辖单位(部门)负责人意见</td> <td class="bbg-transparent">现场管辖单位(部门)负责人意见</td>
<td colspan="5"> <td colspan="5">
<img v-if="info.UNIT_LEADER_PRINCIPAL" v-viewer :src="config.fileUrl+info.UNIT_LEADER_PRINCIPAL" width="50px" height="50px"> <img v-viewer v-if="info.UNIT_LEADER_PRINCIPAL" :src="config.fileUrl+info.UNIT_LEADER_PRINCIPAL" width="50px" height="50px">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="bbg-transparent">动火许可证签发单位意见</td> <td class="bbg-transparent">动火许可证签发单位意见</td>
<td colspan="5"> <td colspan="5">
<img v-if="info.ISSUING_PRINCIPAL" v-viewer :src="config.fileUrl+info.ISSUING_PRINCIPAL" width="50px" height="50px"> <img v-viewer v-if="info.ISSUING_PRINCIPAL" :src="config.fileUrl+info.ISSUING_PRINCIPAL" width="50px" height="50px">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="bbg-transparent" rowspan="2">动火前管辖单位现场人员许可</td> <td class="bbg-transparent" rowspan="2">动火前管辖单位现场人员许可</td>
<td colspan="2"> <td colspan="2">
姓名 姓名
<img v-if="info.HOT_WORK_PERSON_PRINCIPAL" v-viewer :src="config.fileUrl+info.HOT_WORK_PERSON_PRINCIPAL" width="50px" height="50px"> <img v-viewer v-if="info.HOT_WORK_PERSON_PRINCIPAL" :src="config.fileUrl+info.HOT_WORK_PERSON_PRINCIPAL" width="50px" height="50px">
</td> </td>
<td class="bbg-transparent" rowspan="2">动火后管辖单位现场人员验收</td> <td class="bbg-transparent" rowspan="2">动火后管辖单位现场人员验收</td>
<td colspan="2"> <td colspan="2">
姓名 姓名
<img v-if="info.HOT_WORK_AFTER_PRINCIPAL" v-viewer :src="config.fileUrl+info.HOT_WORK_AFTER_PRINCIPAL" width="50px" height="50px"> <img v-viewer v-if="info.HOT_WORK_AFTER_PRINCIPAL" :src="config.fileUrl+info.HOT_WORK_AFTER_PRINCIPAL" width="50px" height="50px">
</td> </td>
</tr> </tr>
<tr> <tr>
@ -116,7 +116,7 @@
<td>{{ item.userName }}</td> <td>{{ item.userName }}</td>
<td>{{ item.TIME }}</td> <td>{{ item.TIME }}</td>
<td> <td>
<img v-if="item.FILEPATH" v-viewer :src="config.fileUrl+item.FILEPATH" width="50px" height="50px"> <img v-viewer v-if="item.FILEPATH" :src="config.fileUrl+item.FILEPATH" width="50px" height="50px">
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container print-work"> <div class="app-container print-work">
<div class="level-title"> <div class="level-title">
<h1>{{ info.EQUIPMENTNAME }}实时监测数据 {{info.OPERATTIME}}</h1> <h1>{{ info.EQUIPMENTNAME }}实时监测数据 {{ info.OPERATTIME }}</h1>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<div id="main4"/> <div id="main4"/>
@ -32,7 +32,7 @@ import * as echarts from 'echarts'
let myChart4 = null let myChart4 = null
let myChart5 = null let myChart5 = null
let myChart6 = null const myChart6 = null
export default { export default {
props: { props: {
id: { id: {
@ -46,12 +46,12 @@ export default {
default() { default() {
return '' return ''
} }
}, }
}, },
data() { data() {
return { return {
config: config, config: config,
info: {}, info: {}
} }
}, },
mounted() { mounted() {
@ -73,7 +73,7 @@ export default {
'/map/getById', '/map/getById',
{ {
id: this.id, id: this.id,
TYPE: this.type, TYPE: this.type
} }
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false
@ -96,7 +96,7 @@ export default {
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
fontSize: 16, fontSize: 16,
color: "#fff" color: '#fff'
} }
}, },
series: { series: {
@ -123,60 +123,60 @@ export default {
axisTick: { axisTick: {
show: true, show: true,
splitNumber: 5, splitNumber: 5,
lineStyle:{ lineStyle: {
color:'#fff' color: '#fff'
} }
}, },
splitLine: { splitLine: {
length: 10, length: 10,
lineStyle: { lineStyle: {
width: 5, width: 5,
color:'#fff' color: '#fff'
} }
}, },
axisLabel: { axisLabel: {
formatter: function(e) { formatter: function(e) {
switch (e + "") { switch (e + '') {
case "0": case '0':
return "北"; return '北'
case "45": case '45':
return "东北"; return '东北'
case "135": case '135':
return "东南"; return '东南'
case "225": case '225':
return "西南" return '西南'
case "315": case '315':
return "西北"; return '西北'
case "360": case '360':
return "北"; return '北'
case "180": case '180':
return "南"; return '南'
case "90": case '90':
return "东"; return '东'
case "270": case '270':
return "西"; return '西'
default: default:
return e; return e
} }
}, },
distance: -60, distance: -60,
textStyle: { textStyle: {
fontSize: 14, fontSize: 14,
fontWeight: "", fontWeight: '',
color:'#fff' color: '#fff'
} }
}, },
pointer: { pointer: {
show: true, show: true,
length:'80%', length: '80%',
width:5 width: 5
}, },
detail: { detail: {
formatter: function(param) { formatter: function(param) {
var level = ''; var level = ''
if (param > 0 && param < 90){ if (param > 0 && param < 90) {
level = '东北' level = '东北'
} else if (param > 90 && param < 180){ } else if (param > 90 && param < 180) {
level = '东南' level = '东南'
} else if (param > 180 && param < 270) { } else if (param > 180 && param < 270) {
level = '西南' level = '西南'
@ -191,45 +191,44 @@ export default {
} else if (param == 180) { } else if (param == 180) {
level = '正南' level = '正南'
} }
return "当前风向:"+level + "(" + param + "°)"; return '当前风向:' + level + '(' + param + '°)'
}, },
offsetCenter: [0, 190], offsetCenter: [0, 190],
textStyle: { textStyle: {
fontSize: 14, fontSize: 14,
color:'#fff' color: '#fff'
} }
}, },
data: [data.pd.WINDDIRECTION] data: [data.pd.WINDDIRECTION]
} }
}; }
myChart4.setOption(option) myChart4.setOption(option)
}, },
initEcharts2(data) { initEcharts2(data) {
myChart5 = echarts.init(document.querySelector('#main5')) myChart5 = echarts.init(document.querySelector('#main5'))
var value = data.pd.TEMPERATURE; var value = data.pd.TEMPERATURE
var kd = []; var kd = []
// 使35 // 使35
for (var i = 0, len = 130; i <= len; i++) { for (var i = 0, len = 130; i <= len; i++) {
if (i > 100 || i < 30) { if (i > 100 || i < 30) {
kd.push('0') kd.push('0')
} else { } else {
if (i % 5 === 0) { if (i % 5 === 0) {
kd.push('5'); kd.push('5')
} else { } else {
kd.push('3'); kd.push('3')
} }
} }
} }
// console.log(kd) // console.log(kd)
// 00-1000-1300-30 // 00-1000-1300-30
function getData(value) { function getData(value) {
return [Number(value) + 30]; return [Number(value) + 30]
} }
console.log(getData(value)) console.log(getData(value))
var data = getData(value + 30); var data = getData(value + 30)
var mercuryColor = '#fd4d49'; var mercuryColor = '#fd4d49'
var borderColor = '#fd4d49'; var borderColor = '#fd4d49'
const option = { const option = {
title: { title: {
@ -238,18 +237,18 @@ export default {
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
fontSize: 16, fontSize: 16,
color: "#fff" color: '#fff'
} }
}, },
yAxis: [{ yAxis: [{
show: false, show: false,
min: 0, min: 0,
max: 130, max: 130
}, { }, {
show: false, show: false,
data: [], data: [],
min: 0, min: 0,
max: 130, max: 130
}], }],
xAxis: [{ xAxis: [{
show: false, show: false,
@ -263,7 +262,7 @@ export default {
}, { }, {
show: false, show: false,
min: -110, min: -110,
max: 100, max: 100
}], }],
series: [{ series: [{
@ -276,7 +275,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: mercuryColor, color: mercuryColor,
barBorderRadius: 0, barBorderRadius: 0
} }
}, },
label: { label: {
@ -285,11 +284,11 @@ export default {
position: 'top', position: 'top',
formatter: function(param) { formatter: function(param) {
// 00-1000-1300-30 // 00-1000-1300-30
return (((param.value * 100) - (30 * 100)) / 100) + '°C'; return (((param.value * 100) - (30 * 100)) / 100) + '°C'
}, },
textStyle: { textStyle: {
color: '#ccc', color: '#ccc',
fontSize: '10', fontSize: '10'
} }
} }
}, },
@ -304,7 +303,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: '#ffffff', color: '#ffffff',
barBorderRadius: 50, barBorderRadius: 50
} }
}, },
z: 1 z: 1
@ -318,7 +317,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: borderColor, color: borderColor,
barBorderRadius: 50, barBorderRadius: 50
} }
}, },
z: 0 z: 0
@ -332,7 +331,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: mercuryColor, color: mercuryColor,
opacity: 1, opacity: 1
} }
}, },
z: 2 z: 2
@ -346,7 +345,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: '#ffffff', color: '#ffffff',
opacity: 1, opacity: 1
} }
}, },
z: 1 z: 1
@ -360,7 +359,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: borderColor, color: borderColor,
opacity: 1, opacity: 1
} }
}, },
z: 0 z: 0
@ -379,12 +378,12 @@ export default {
formatter: function(params) { formatter: function(params) {
// 00-1000-1300-30 // 00-1000-1300-30
if (params.dataIndex > 100 || params.dataIndex < 30) { if (params.dataIndex > 100 || params.dataIndex < 30) {
return ''; return ''
} else { } else {
if (params.dataIndex % 5 === 0) { if (params.dataIndex % 5 === 0) {
return params.dataIndex - 30; return params.dataIndex - 30
} else { } else {
return ''; return ''
} }
} }
} }
@ -396,12 +395,12 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: borderColor, color: borderColor,
barBorderRadius: 10, barBorderRadius: 10
} }
}, },
z: 0 z: 0
}] }]
}; }
myChart5.setOption(option) myChart5.setOption(option)
}, },
initEcharts3(data) { initEcharts3(data) {
@ -414,7 +413,7 @@ export default {
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
fontSize: 16, fontSize: 16,
color: "#fff" color: '#fff'
} }
}, },
series: [ series: [
@ -424,7 +423,7 @@ export default {
min: 0, min: 0,
max: 30, max: 30,
splitNumber: 10, splitNumber: 10,
center:['50%', '55%'], center: ['50%', '55%'],
radius: '73%', radius: '73%',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
@ -436,7 +435,7 @@ export default {
distance: -20, distance: -20,
length: 20, length: 20,
lineStyle: { lineStyle: {
width:2, width: 2,
color: '#0F2D5B' color: '#0F2D5B'
} }
}, },
@ -465,7 +464,7 @@ export default {
min: 0, min: 0,
max: 30, max: 30,
splitNumber: 10, splitNumber: 10,
center:['50%', '55%'], center: ['50%', '55%'],
radius: '65%', radius: '65%',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
@ -481,17 +480,17 @@ export default {
silent: true, silent: true,
pointer: { pointer: {
length: '85%', length: '85%',
width:4, width: 4,
itemStyle: { itemStyle: {
color: 'inherit', color: 'inherit',
borderWidth: 1, borderWidth: 1,
borderColor:'inherit', // '#0D3778', borderColor: 'inherit', // '#0D3778',
shadowColor: 'inherit', shadowColor: 'inherit',
shadowBlur: 1 shadowBlur: 1
} }
}, },
axisTick: { axisTick: {
show:false, show: false,
distance: -20, distance: -20,
length: 5, length: 5,
lineStyle: { lineStyle: {
@ -502,7 +501,7 @@ export default {
distance: -20, distance: -20,
length: 20, length: 20,
lineStyle: { lineStyle: {
width:2, width: 2,
color: '#0F2D5B' color: '#0F2D5B'
} }
}, },
@ -511,7 +510,7 @@ export default {
}, },
title: { // title: { //
show: true, // , true show: true, // , true
offsetCenter: [0, '95%'], // offsetCenter: [0, '95%'], //
color: '#ccc', // , #333 color: '#ccc', // , #333
fontSize: 15 // , 15 fontSize: 15 // , 15
}, },

View File

@ -92,7 +92,7 @@ export default {
default() { default() {
return '' return ''
} }
}, }
}, },
data() { data() {
return { return {

View File

@ -65,7 +65,7 @@ export default {
default() { default() {
return '' return ''
} }
}, }
}, },
data() { data() {
return { return {

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container print-work"> <div class="app-container print-work">
<div class="level-title"> <div class="level-title">
<h1>{{ info.EQUIPMENTNAME }}实时监测数据 {{info.OPERATTIME}}</h1> <h1>{{ info.EQUIPMENTNAME }}实时监测数据 {{ info.OPERATTIME }}</h1>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<div id="main4"/> <div id="main4"/>
@ -32,7 +32,7 @@ import * as echarts from 'echarts'
let myChart4 = null let myChart4 = null
let myChart5 = null let myChart5 = null
let myChart6 = null const myChart6 = null
export default { export default {
props: { props: {
id: { id: {
@ -46,12 +46,12 @@ export default {
default() { default() {
return '' return ''
} }
}, }
}, },
data() { data() {
return { return {
config: config, config: config,
info: {}, info: {}
} }
}, },
mounted() { mounted() {
@ -73,7 +73,7 @@ export default {
'/map/getById', '/map/getById',
{ {
id: this.id, id: this.id,
TYPE: this.type, TYPE: this.type
} }
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false
@ -96,7 +96,7 @@ export default {
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
fontSize: 16, fontSize: 16,
color: "#fff" color: '#fff'
} }
}, },
series: { series: {
@ -123,60 +123,60 @@ export default {
axisTick: { axisTick: {
show: true, show: true,
splitNumber: 5, splitNumber: 5,
lineStyle:{ lineStyle: {
color:'#fff' color: '#fff'
} }
}, },
splitLine: { splitLine: {
length: 10, length: 10,
lineStyle: { lineStyle: {
width: 5, width: 5,
color:'#fff' color: '#fff'
} }
}, },
axisLabel: { axisLabel: {
formatter: function(e) { formatter: function(e) {
switch (e + "") { switch (e + '') {
case "0": case '0':
return "北"; return '北'
case "45": case '45':
return "东北"; return '东北'
case "135": case '135':
return "东南"; return '东南'
case "225": case '225':
return "西南" return '西南'
case "315": case '315':
return "西北"; return '西北'
case "360": case '360':
return "北"; return '北'
case "180": case '180':
return "南"; return '南'
case "90": case '90':
return "东"; return '东'
case "270": case '270':
return "西"; return '西'
default: default:
return e; return e
} }
}, },
distance: -60, distance: -60,
textStyle: { textStyle: {
fontSize: 14, fontSize: 14,
fontWeight: "", fontWeight: '',
color:'#fff' color: '#fff'
} }
}, },
pointer: { pointer: {
show: true, show: true,
length:'80%', length: '80%',
width:5 width: 5
}, },
detail: { detail: {
formatter: function(param) { formatter: function(param) {
var level = ''; var level = ''
if (param > 0 && param < 90){ if (param > 0 && param < 90) {
level = '东北' level = '东北'
} else if (param > 90 && param < 180){ } else if (param > 90 && param < 180) {
level = '东南' level = '东南'
} else if (param > 180 && param < 270) { } else if (param > 180 && param < 270) {
level = '西南' level = '西南'
@ -191,45 +191,44 @@ export default {
} else if (param == 180) { } else if (param == 180) {
level = '正南' level = '正南'
} }
return "当前风向:"+level + "(" + param + "°)"; return '当前风向:' + level + '(' + param + '°)'
}, },
offsetCenter: [0, 190], offsetCenter: [0, 190],
textStyle: { textStyle: {
fontSize: 14, fontSize: 14,
color:'#fff' color: '#fff'
} }
}, },
data: [data.pd.WINDDIRECTION] data: [data.pd.WINDDIRECTION]
} }
}; }
myChart4.setOption(option) myChart4.setOption(option)
}, },
initEcharts2(data) { initEcharts2(data) {
myChart5 = echarts.init(document.querySelector('#main5')) myChart5 = echarts.init(document.querySelector('#main5'))
var value = data.pd.TEMPERATURE; var value = data.pd.TEMPERATURE
var kd = []; var kd = []
// 使35 // 使35
for (var i = 0, len = 130; i <= len; i++) { for (var i = 0, len = 130; i <= len; i++) {
if (i > 100 || i < 30) { if (i > 100 || i < 30) {
kd.push('0') kd.push('0')
} else { } else {
if (i % 5 === 0) { if (i % 5 === 0) {
kd.push('5'); kd.push('5')
} else { } else {
kd.push('3'); kd.push('3')
} }
} }
} }
// console.log(kd) // console.log(kd)
// 00-1000-1300-30 // 00-1000-1300-30
function getData(value) { function getData(value) {
return [Number(value) + 30]; return [Number(value) + 30]
} }
console.log(getData(value)) console.log(getData(value))
var data = getData(value + 30); var data = getData(value + 30)
var mercuryColor = '#fd4d49'; var mercuryColor = '#fd4d49'
var borderColor = '#fd4d49'; var borderColor = '#fd4d49'
const option = { const option = {
title: { title: {
@ -238,18 +237,18 @@ export default {
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
fontSize: 16, fontSize: 16,
color: "#fff" color: '#fff'
} }
}, },
yAxis: [{ yAxis: [{
show: false, show: false,
min: 0, min: 0,
max: 130, max: 130
}, { }, {
show: false, show: false,
data: [], data: [],
min: 0, min: 0,
max: 130, max: 130
}], }],
xAxis: [{ xAxis: [{
show: false, show: false,
@ -263,7 +262,7 @@ export default {
}, { }, {
show: false, show: false,
min: -110, min: -110,
max: 100, max: 100
}], }],
series: [{ series: [{
@ -276,7 +275,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: mercuryColor, color: mercuryColor,
barBorderRadius: 0, barBorderRadius: 0
} }
}, },
label: { label: {
@ -285,11 +284,11 @@ export default {
position: 'top', position: 'top',
formatter: function(param) { formatter: function(param) {
// 00-1000-1300-30 // 00-1000-1300-30
return (((param.value * 100) - (30 * 100)) / 100) + '°C'; return (((param.value * 100) - (30 * 100)) / 100) + '°C'
}, },
textStyle: { textStyle: {
color: '#ccc', color: '#ccc',
fontSize: '10', fontSize: '10'
} }
} }
}, },
@ -304,7 +303,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: '#ffffff', color: '#ffffff',
barBorderRadius: 50, barBorderRadius: 50
} }
}, },
z: 1 z: 1
@ -318,7 +317,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: borderColor, color: borderColor,
barBorderRadius: 50, barBorderRadius: 50
} }
}, },
z: 0 z: 0
@ -332,7 +331,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: mercuryColor, color: mercuryColor,
opacity: 1, opacity: 1
} }
}, },
z: 2 z: 2
@ -346,7 +345,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: '#ffffff', color: '#ffffff',
opacity: 1, opacity: 1
} }
}, },
z: 1 z: 1
@ -360,7 +359,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: borderColor, color: borderColor,
opacity: 1, opacity: 1
} }
}, },
z: 0 z: 0
@ -379,12 +378,12 @@ export default {
formatter: function(params) { formatter: function(params) {
// 00-1000-1300-30 // 00-1000-1300-30
if (params.dataIndex > 100 || params.dataIndex < 30) { if (params.dataIndex > 100 || params.dataIndex < 30) {
return ''; return ''
} else { } else {
if (params.dataIndex % 5 === 0) { if (params.dataIndex % 5 === 0) {
return params.dataIndex - 30; return params.dataIndex - 30
} else { } else {
return ''; return ''
} }
} }
} }
@ -396,12 +395,12 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: borderColor, color: borderColor,
barBorderRadius: 10, barBorderRadius: 10
} }
}, },
z: 0 z: 0
}] }]
}; }
myChart5.setOption(option) myChart5.setOption(option)
}, },
initEcharts3(data) { initEcharts3(data) {
@ -414,7 +413,7 @@ export default {
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
fontSize: 16, fontSize: 16,
color: "#fff" color: '#fff'
} }
}, },
series: [ series: [
@ -424,7 +423,7 @@ export default {
min: 0, min: 0,
max: 30, max: 30,
splitNumber: 10, splitNumber: 10,
center:['50%', '55%'], center: ['50%', '55%'],
radius: '73%', radius: '73%',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
@ -436,7 +435,7 @@ export default {
distance: -20, distance: -20,
length: 20, length: 20,
lineStyle: { lineStyle: {
width:2, width: 2,
color: '#0F2D5B' color: '#0F2D5B'
} }
}, },
@ -465,7 +464,7 @@ export default {
min: 0, min: 0,
max: 30, max: 30,
splitNumber: 10, splitNumber: 10,
center:['50%', '55%'], center: ['50%', '55%'],
radius: '65%', radius: '65%',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
@ -481,17 +480,17 @@ export default {
silent: true, silent: true,
pointer: { pointer: {
length: '85%', length: '85%',
width:4, width: 4,
itemStyle: { itemStyle: {
color: 'inherit', color: 'inherit',
borderWidth: 1, borderWidth: 1,
borderColor:'inherit', // '#0D3778', borderColor: 'inherit', // '#0D3778',
shadowColor: 'inherit', shadowColor: 'inherit',
shadowBlur: 1 shadowBlur: 1
} }
}, },
axisTick: { axisTick: {
show:false, show: false,
distance: -20, distance: -20,
length: 5, length: 5,
lineStyle: { lineStyle: {
@ -502,7 +501,7 @@ export default {
distance: -20, distance: -20,
length: 20, length: 20,
lineStyle: { lineStyle: {
width:2, width: 2,
color: '#0F2D5B' color: '#0F2D5B'
} }
}, },
@ -511,7 +510,7 @@ export default {
}, },
title: { // title: { //
show: true, // , true show: true, // , true
offsetCenter: [0, '95%'], // offsetCenter: [0, '95%'], //
color: '#ccc', // , #333 color: '#ccc', // , #333
fontSize: 15 // , 15 fontSize: 15 // , 15
}, },

View File

@ -48,7 +48,7 @@ export default {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
this.player = new Aliplayer({ this.player = new Aliplayer({
'id': 'aLiVideoPlayer', 'id': 'aLiVideoPlayer',
'source': res.data.url? res.data.url.replace('http://192.168.0.253:83', 'http://60.2.209.238:8992/videoApi') : '', 'source': res.data.url ? res.data.url.replace('http://192.168.0.253:83', 'http://60.2.209.238:8992/videoApi') : '',
'width': '100%', 'width': '100%',
'height': '500px', 'height': '500px',
'autoplay': true, 'autoplay': true,

View File

@ -95,18 +95,17 @@ export default {
this.info.TEMPERATURE = data.pd.TEMPERATURE || '-' this.info.TEMPERATURE = data.pd.TEMPERATURE || '-'
this.info.WINDSPEED = data.pd.WINDSPEED || '-' this.info.WINDSPEED = data.pd.WINDSPEED || '-'
this.info.WINDDIRECTION = data.pd.WINDDIRECTION || '-' this.info.WINDDIRECTION = data.pd.WINDDIRECTION || '-'
this.$nextTick(()=>{ this.$nextTick(() => {
if(data.pd.WINDDIRECTION != '-'){ if (data.pd.WINDDIRECTION != '-') {
console.log(this.info.WINDDIRECTION) console.log(this.info.WINDDIRECTION)
this.initEcharts1(data) this.initEcharts1(data)
this.info.WINDDIRECTION = this.calculateWindDirection(this.info.WINDDIRECTION) this.info.WINDDIRECTION = this.calculateWindDirection(this.info.WINDDIRECTION)
console.log(this.info.WINDDIRECTION) console.log(this.info.WINDDIRECTION)
} }
if(data.pd.TEMPERATURE != '-'){ if (data.pd.TEMPERATURE != '-') {
this.initEcharts2(data) this.initEcharts2(data)
} }
if(data.pd.WINDSPEED != '-'){ if (data.pd.WINDSPEED != '-') {
this.initEcharts3(data) this.initEcharts3(data)
} }
}) })

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container print-work"> <div class="app-container print-work">
<div class="level-title"> <div class="level-title">
<h1>{{ info.EQUIPMENTNAME }}实时监测数据 {{info.OPERATTIME}}</h1> <h1>{{ info.EQUIPMENTNAME }}实时监测数据 {{ info.OPERATTIME }}</h1>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<div id="main4"/> <div id="main4"/>
@ -32,7 +32,7 @@ import * as echarts from 'echarts'
let myChart4 = null let myChart4 = null
let myChart5 = null let myChart5 = null
let myChart6 = null const myChart6 = null
export default { export default {
props: { props: {
id: { id: {
@ -46,12 +46,12 @@ export default {
default() { default() {
return '' return ''
} }
}, }
}, },
data() { data() {
return { return {
config: config, config: config,
info: {}, info: {}
} }
}, },
mounted() { mounted() {
@ -73,7 +73,7 @@ export default {
'/map/getById', '/map/getById',
{ {
id: this.id, id: this.id,
TYPE: this.type, TYPE: this.type
} }
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false
@ -96,7 +96,7 @@ export default {
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
fontSize: 16, fontSize: 16,
color: "#fff" color: '#fff'
} }
}, },
series: { series: {
@ -123,60 +123,60 @@ export default {
axisTick: { axisTick: {
show: true, show: true,
splitNumber: 5, splitNumber: 5,
lineStyle:{ lineStyle: {
color:'#fff' color: '#fff'
} }
}, },
splitLine: { splitLine: {
length: 10, length: 10,
lineStyle: { lineStyle: {
width: 5, width: 5,
color:'#fff' color: '#fff'
} }
}, },
axisLabel: { axisLabel: {
formatter: function(e) { formatter: function(e) {
switch (e + "") { switch (e + '') {
case "0": case '0':
return "北"; return '北'
case "45": case '45':
return "东北"; return '东北'
case "135": case '135':
return "东南"; return '东南'
case "225": case '225':
return "西南" return '西南'
case "315": case '315':
return "西北"; return '西北'
case "360": case '360':
return "北"; return '北'
case "180": case '180':
return "南"; return '南'
case "90": case '90':
return "东"; return '东'
case "270": case '270':
return "西"; return '西'
default: default:
return e; return e
} }
}, },
distance: -60, distance: -60,
textStyle: { textStyle: {
fontSize: 14, fontSize: 14,
fontWeight: "", fontWeight: '',
color:'#fff' color: '#fff'
} }
}, },
pointer: { pointer: {
show: true, show: true,
length:'80%', length: '80%',
width:5 width: 5
}, },
detail: { detail: {
formatter: function(param) { formatter: function(param) {
var level = ''; var level = ''
if (param > 0 && param < 90){ if (param > 0 && param < 90) {
level = '东北' level = '东北'
} else if (param > 90 && param < 180){ } else if (param > 90 && param < 180) {
level = '东南' level = '东南'
} else if (param > 180 && param < 270) { } else if (param > 180 && param < 270) {
level = '西南' level = '西南'
@ -191,45 +191,44 @@ export default {
} else if (param == 180) { } else if (param == 180) {
level = '正南' level = '正南'
} }
return "当前风向:"+level + "(" + param + "°)"; return '当前风向:' + level + '(' + param + '°)'
}, },
offsetCenter: [0, 190], offsetCenter: [0, 190],
textStyle: { textStyle: {
fontSize: 14, fontSize: 14,
color:'#fff' color: '#fff'
} }
}, },
data: [data.pd.WINDDIRECTION] data: [data.pd.WINDDIRECTION]
} }
}; }
myChart4.setOption(option) myChart4.setOption(option)
}, },
initEcharts2(data) { initEcharts2(data) {
myChart5 = echarts.init(document.querySelector('#main5')) myChart5 = echarts.init(document.querySelector('#main5'))
var value = data.pd.TEMPERATURE; var value = data.pd.TEMPERATURE
var kd = []; var kd = []
// 使35 // 使35
for (var i = 0, len = 130; i <= len; i++) { for (var i = 0, len = 130; i <= len; i++) {
if (i > 100 || i < 30) { if (i > 100 || i < 30) {
kd.push('0') kd.push('0')
} else { } else {
if (i % 5 === 0) { if (i % 5 === 0) {
kd.push('5'); kd.push('5')
} else { } else {
kd.push('3'); kd.push('3')
} }
} }
} }
// console.log(kd) // console.log(kd)
// 00-1000-1300-30 // 00-1000-1300-30
function getData(value) { function getData(value) {
return [Number(value) + 30]; return [Number(value) + 30]
} }
console.log(getData(value)) console.log(getData(value))
var data = getData(value + 30); var data = getData(value + 30)
var mercuryColor = '#fd4d49'; var mercuryColor = '#fd4d49'
var borderColor = '#fd4d49'; var borderColor = '#fd4d49'
const option = { const option = {
title: { title: {
@ -238,18 +237,18 @@ export default {
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
fontSize: 16, fontSize: 16,
color: "#fff" color: '#fff'
} }
}, },
yAxis: [{ yAxis: [{
show: false, show: false,
min: 0, min: 0,
max: 130, max: 130
}, { }, {
show: false, show: false,
data: [], data: [],
min: 0, min: 0,
max: 130, max: 130
}], }],
xAxis: [{ xAxis: [{
show: false, show: false,
@ -263,7 +262,7 @@ export default {
}, { }, {
show: false, show: false,
min: -110, min: -110,
max: 100, max: 100
}], }],
series: [{ series: [{
@ -276,7 +275,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: mercuryColor, color: mercuryColor,
barBorderRadius: 0, barBorderRadius: 0
} }
}, },
label: { label: {
@ -285,11 +284,11 @@ export default {
position: 'top', position: 'top',
formatter: function(param) { formatter: function(param) {
// 00-1000-1300-30 // 00-1000-1300-30
return (((param.value * 100) - (30 * 100)) / 100) + '°C'; return (((param.value * 100) - (30 * 100)) / 100) + '°C'
}, },
textStyle: { textStyle: {
color: '#ccc', color: '#ccc',
fontSize: '10', fontSize: '10'
} }
} }
}, },
@ -304,7 +303,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: '#ffffff', color: '#ffffff',
barBorderRadius: 50, barBorderRadius: 50
} }
}, },
z: 1 z: 1
@ -318,7 +317,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: borderColor, color: borderColor,
barBorderRadius: 50, barBorderRadius: 50
} }
}, },
z: 0 z: 0
@ -332,7 +331,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: mercuryColor, color: mercuryColor,
opacity: 1, opacity: 1
} }
}, },
z: 2 z: 2
@ -346,7 +345,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: '#ffffff', color: '#ffffff',
opacity: 1, opacity: 1
} }
}, },
z: 1 z: 1
@ -360,7 +359,7 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: borderColor, color: borderColor,
opacity: 1, opacity: 1
} }
}, },
z: 0 z: 0
@ -379,12 +378,12 @@ export default {
formatter: function(params) { formatter: function(params) {
// 00-1000-1300-30 // 00-1000-1300-30
if (params.dataIndex > 100 || params.dataIndex < 30) { if (params.dataIndex > 100 || params.dataIndex < 30) {
return ''; return ''
} else { } else {
if (params.dataIndex % 5 === 0) { if (params.dataIndex % 5 === 0) {
return params.dataIndex - 30; return params.dataIndex - 30
} else { } else {
return ''; return ''
} }
} }
} }
@ -396,12 +395,12 @@ export default {
itemStyle: { itemStyle: {
normal: { normal: {
color: borderColor, color: borderColor,
barBorderRadius: 10, barBorderRadius: 10
} }
}, },
z: 0 z: 0
}] }]
}; }
myChart5.setOption(option) myChart5.setOption(option)
}, },
initEcharts3(data) { initEcharts3(data) {
@ -414,7 +413,7 @@ export default {
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
fontSize: 16, fontSize: 16,
color: "#fff" color: '#fff'
} }
}, },
series: [ series: [
@ -424,7 +423,7 @@ export default {
min: 0, min: 0,
max: 30, max: 30,
splitNumber: 10, splitNumber: 10,
center:['50%', '55%'], center: ['50%', '55%'],
radius: '73%', radius: '73%',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
@ -436,7 +435,7 @@ export default {
distance: -20, distance: -20,
length: 20, length: 20,
lineStyle: { lineStyle: {
width:2, width: 2,
color: '#0F2D5B' color: '#0F2D5B'
} }
}, },
@ -465,7 +464,7 @@ export default {
min: 0, min: 0,
max: 30, max: 30,
splitNumber: 10, splitNumber: 10,
center:['50%', '55%'], center: ['50%', '55%'],
radius: '65%', radius: '65%',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
@ -481,17 +480,17 @@ export default {
silent: true, silent: true,
pointer: { pointer: {
length: '85%', length: '85%',
width:4, width: 4,
itemStyle: { itemStyle: {
color: 'inherit', color: 'inherit',
borderWidth: 1, borderWidth: 1,
borderColor:'inherit', // '#0D3778', borderColor: 'inherit', // '#0D3778',
shadowColor: 'inherit', shadowColor: 'inherit',
shadowBlur: 1 shadowBlur: 1
} }
}, },
axisTick: { axisTick: {
show:false, show: false,
distance: -20, distance: -20,
length: 5, length: 5,
lineStyle: { lineStyle: {
@ -502,7 +501,7 @@ export default {
distance: -20, distance: -20,
length: 20, length: 20,
lineStyle: { lineStyle: {
width:2, width: 2,
color: '#0F2D5B' color: '#0F2D5B'
} }
}, },
@ -511,7 +510,7 @@ export default {
}, },
title: { // title: { //
show: true, // , true show: true, // , true
offsetCenter: [0, '95%'], // offsetCenter: [0, '95%'], //
color: '#ccc', // , #333 color: '#ccc', // , #333
fontSize: 15 // , 15 fontSize: 15 // , 15
}, },

View File

@ -47,8 +47,8 @@
</div> </div>
<el-carousel :interval="4000" type="card" height="200px"> <el-carousel :interval="4000" type="card" height="200px">
<el-carousel-item v-for="(image, index) in images" :key="index"> <el-carousel-item v-for="(image, index) in images" :key="index">
<img v-if="gangkou === '00004'" v-viewer :src="config.cfdfileUrl + image.FILEPATH" style="max-width: 100%;"> <img v-viewer v-if="gangkou === '00004'" :src="config.cfdfileUrl + image.FILEPATH" style="max-width: 100%;">
<img v-else v-viewer :src="config.fileUrl + image.FILEPATH" style="max-width: 100%;"> <img v-viewer v-else :src="config.fileUrl + image.FILEPATH" style="max-width: 100%;">
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
@ -109,8 +109,8 @@
</div> </div>
<el-carousel :interval="4000" type="card" height="200px"> <el-carousel :interval="4000" type="card" height="200px">
<el-carousel-item v-for="(image, index) in images" :key="index"> <el-carousel-item v-for="(image, index) in images" :key="index">
<img v-if="gangkou === '00004'" v-viewer :src="config.cfdfileUrl + image.FILEPATH" style="max-width: 100%;"> <img v-viewer v-if="gangkou === '00004'" :src="config.cfdfileUrl + image.FILEPATH" style="max-width: 100%;">
<img v-else v-viewer :src="config.fileUrl + image.FILEPATH" style="max-width: 100%;"> <img v-viewer v-else :src="config.fileUrl + image.FILEPATH" style="max-width: 100%;">
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>