前端不合规代码格式化

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

@ -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

@ -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

@ -202,7 +202,7 @@ export default {
{ id: '0', name: '请选择' }, { id: '0', name: '请选择' },
{ id: '1', name: '油管区' }, { id: '1', name: '油管区' },
{ id: '2', name: '码头区' } { id: '2', name: '码头区' }
], ]
} }
}, },
async created() { async created() {
@ -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) => {

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
}, },

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

@ -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

@ -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: {
@ -136,33 +136,33 @@ export default {
}, },
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'
} }
}, },
@ -173,7 +173,7 @@ export default {
}, },
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) {
@ -191,7 +191,7 @@ 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: {
@ -201,35 +201,34 @@ export default {
}, },
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: [

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

@ -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: {
@ -136,33 +136,33 @@ export default {
}, },
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'
} }
}, },
@ -173,7 +173,7 @@ export default {
}, },
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) {
@ -191,7 +191,7 @@ 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: {
@ -201,35 +201,34 @@ export default {
}, },
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: [

View File

@ -106,7 +106,6 @@ export default {
this.initEcharts2(data) this.initEcharts2(data)
} }
if (data.pd.WINDSPEED != '-') { if (data.pd.WINDSPEED != '-') {
this.initEcharts3(data) this.initEcharts3(data)
} }
}) })

View File

@ -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: {
@ -136,33 +136,33 @@ export default {
}, },
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'
} }
}, },
@ -173,7 +173,7 @@ export default {
}, },
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) {
@ -191,7 +191,7 @@ 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: {
@ -201,35 +201,34 @@ export default {
}, },
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: [

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>