代码格式话

2024年2月1日V1.0.53
liujun 2024-01-29 14:04:24 +08:00
parent a165aac422
commit 9b7b066e9a
29 changed files with 2863 additions and 2900 deletions

View File

@ -212,11 +212,11 @@
</div> </div>
<div v-for="(item,index) in safetyEnvironmentalInspectionList" :key="index"> <div v-for="(item,index) in safetyEnvironmentalInspectionList" :key="index">
<span>{{ <span>{{
item.INSPECTION_PLACE.length > 6 ? item.INSPECTION_PLACE.substr(0, 6) + '...' : item.INSPECTION_PLACE item.INSPECTION_PLACE.length > 6 ? item.INSPECTION_PLACE.substr(0, 6) + '...' : item.INSPECTION_PLACE
}}</span> }}</span>
<span>{{ <span>{{
item.INSPECTION_TIME_START.length > 10 ? item.INSPECTION_TIME_START.substr(0, 10) + '...' : item.INSPECTION_TIME_START item.INSPECTION_TIME_START.length > 10 ? item.INSPECTION_TIME_START.substr(0, 10) + '...' : item.INSPECTION_TIME_START
}}</span> }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -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,9 +553,9 @@ 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
} else if (item.HIDDENLEVEL == 'hiddenLevel2002') { // } else if (item.HIDDENLEVEL == 'hiddenLevel2002') { //
yinhuanCount[3] = item.count yinhuanCount[3] = 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

@ -209,13 +209,13 @@ export default {
GANGKOU: this.gangkou GANGKOU: this.gangkou
} }
).then((data) => { ).then((data) => {
this.block1OptionsList[0].count1 = data.pd.PERSON_IN this.block1OptionsList[0].count1 = data.pd.PERSON_IN
this.block1OptionsList[0].count2 = data.pd.PERSON_OUT this.block1OptionsList[0].count2 = data.pd.PERSON_OUT
this.block1OptionsList[0].count3 = data.pd.PERSON_IN - data.pd.PERSON_OUT this.block1OptionsList[0].count3 = data.pd.PERSON_IN - data.pd.PERSON_OUT
this.block1OptionsList[1].count1 = data.pd.CAR_IN this.block1OptionsList[1].count1 = data.pd.CAR_IN
this.block1OptionsList[1].count2 = data.pd.CAR_OUT this.block1OptionsList[1].count2 = data.pd.CAR_OUT
this.block1OptionsList[1].count3 = data.pd.CAR_IN - data.pd.CAR_OUT this.block1OptionsList[1].count3 = data.pd.CAR_IN - data.pd.CAR_OUT
this.block1OptionsList[2].count1 = data.pd.CAMERA this.block1OptionsList[2].count1 = data.pd.CAMERA
}).catch((e) => { }).catch((e) => {
console.log(e) console.log(e)
}) })
@ -281,7 +281,7 @@ export default {
}) })
}, },
loadRecord(index) { loadRecord(index) {
this.getDoorWayRecords(index) this.getDoorWayRecords(index)
}, },
block3OptionsClick(index) { block3OptionsClick(index) {
this.block3List = [] this.block3List = []

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,68 +170,68 @@
</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,
default() { default() {
return '' return ''
}
},
type: {
type: String,
default() {
return ''
}
} }
}, },
data() { type: {
return { type: String,
config: config, default() {
info: {}, return ''
ImgList: [], }
boardList: [], }
imgList: [], },
imgList1: [], data() {
measuresList: [], return {
pd: [] config: config,
info: {},
ImgList: [],
boardList: [],
imgList: [],
imgList1: [],
measuresList: [],
pd: []
}
},
created() {
this.getData()
},
methods: {
formatTime(date, column) {
if (date) {
return dateformat(date, 'YYYY年MM月DD日HH时mm分')
} else {
return ''
} }
}, },
created() { formatDate(date, column) {
this.getData() if (date) {
return dateformat(date, 'YYYY-MM-DD')
} else {
return ''
}
}, },
methods: { getRowKey(row) {
formatTime(date, column) { return row.BLINDBOARD_ID
if (date) { },
return dateformat(date, 'YYYY年MM月DD日HH时mm分') getData() {
} else { this.listLoading = true
return '' requestFN(
'/map/Eight/getByIdCfdD',
{
id: this.id,
TYPE: this.type,
BLINDBOARD_ID: this.id
} }
}, ).then((data) => {
formatDate(date, column) { this.listLoading = false
if (date) {
return dateformat(date, 'YYYY-MM-DD')
} else {
return ''
}
},
getRowKey(row) {
return row.BLINDBOARD_ID
},
getData() {
this.listLoading = true
requestFN(
'/map/Eight/getByIdCfdD',
{
id: this.id,
TYPE: this.type,
BLINDBOARD_ID: this.id
}
).then((data) => {
this.listLoading = false
this.pd = data.pd // map this.pd = data.pd // map
this.imgList = data.imgList this.imgList = data.imgList
this.imgList1 = data.imgList1 this.imgList1 = data.imgList1
@ -241,11 +241,11 @@
this.pd.CONSTRUCTION_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[1] this.pd.CONSTRUCTION_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[1]
this.pd.LEADER_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[2] this.pd.LEADER_USER_MEASURES = this.pd.OTHER_PROTECTIVE_MEASURES.split(';_;')[2]
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

View File

@ -43,10 +43,10 @@
<td colspan="2"> <td colspan="2">
<span>{{ pd.PART_WEIGHT }}t</span> <span>{{ pd.PART_WEIGHT }}t</span>
<span style="margin-left: 20px;"> <span style="margin-left: 20px;">
{{ pd.WORK_LEVEL == '1' ? '一级作业级别' : '' }} {{ pd.WORK_LEVEL == '1' ? '一级作业级别' : '' }}
{{ pd.WORK_LEVEL == '2' ? '二级作业级别' : '' }} {{ pd.WORK_LEVEL == '2' ? '二级作业级别' : '' }}
{{ pd.WORK_LEVEL == '3' ? '三级作业级别' : '' }} {{ pd.WORK_LEVEL == '3' ? '三级作业级别' : '' }}
</span> </span>
</td> </td>
</tr> </tr>
<tr> <tr>

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,24 +501,24 @@ export default {
distance: -20, distance: -20,
length: 20, length: 20,
lineStyle: { lineStyle: {
width:2, width: 2,
color: '#0F2D5B' color: '#0F2D5B'
} }
}, },
axisLabel: { axisLabel: {
show: false show: false
}, },
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
}, },
detail: { detail: {
valueAnimation: true, valueAnimation: true,
offsetCenter: [0, '70%'], offsetCenter: [0, '70%'],
formatter: '{value}', formatter: '{value}',
color: 'inherit', // , #333 color: 'inherit', // , #333
fontSize: 20 fontSize: 20
}, },
data: [{ data: [{

View File

@ -89,7 +89,7 @@ import hoistingCfdD from './hoistingCfdD.vue'
import peoplePositionCfdD from './peoplePositionCfdD.vue' import peoplePositionCfdD from './peoplePositionCfdD.vue'
import carPositionCfdD from './carPositionCfdD.vue' import carPositionCfdD from './carPositionCfdD.vue'
import peoplePositionOne from './peoplePositionOne.vue' import peoplePositionOne from './peoplePositionOne.vue'
import hotworkFirst from "./hotworkFirst"; import hotworkFirst from './hotworkFirst'
import peoplePositionYGS from './peoplePositionYGS.vue' import peoplePositionYGS from './peoplePositionYGS.vue'
import outSourceInfo from './outSourceInfo.vue' import outSourceInfo from './outSourceInfo.vue'
import outSourceVideoInfo from './outSourceVideoInfo.vue' import outSourceVideoInfo from './outSourceVideoInfo.vue'

View File

@ -14,7 +14,7 @@
</tr> </tr>
<tr> <tr>
<td class="bbg-transparent">部门</td> <td class="bbg-transparent">部门</td>
<td >{{ info?info.DEPARTMENT_NAME:'' }}</td> <td >{{ info?info.DEPARTMENT_NAME:'' }}</td>
</tr> </tr>
<tr> <tr>
<td class="bbg-transparent">岗位</td> <td class="bbg-transparent">岗位</td>
@ -81,18 +81,18 @@ export default {
return '' return ''
} }
}, },
type: { type: {
type: String, type: String,
default() { default() {
return '' return ''
} }
}, },
infoname: { infoname: {
type: String, type: String,
default() { default() {
return '' return ''
} }
}, }
}, },
data() { data() {
return { return {

View File

@ -6,7 +6,7 @@
<table class="table-ui"> <table class="table-ui">
<tr> <tr>
<td class="bbg-transparent">姓名</td> <td class="bbg-transparent">姓名</td>
<td >{{ info?info.NAME:'' }}</td> <td >{{ info?info.NAME:'' }}</td>
</tr> </tr>
<tr> <tr>
<td class="bbg-transparent">工号</td> <td class="bbg-transparent">工号</td>
@ -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,24 +501,24 @@ export default {
distance: -20, distance: -20,
length: 20, length: 20,
lineStyle: { lineStyle: {
width:2, width: 2,
color: '#0F2D5B' color: '#0F2D5B'
} }
}, },
axisLabel: { axisLabel: {
show: false show: false
}, },
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
}, },
detail: { detail: {
valueAnimation: true, valueAnimation: true,
offsetCenter: [0, '70%'], offsetCenter: [0, '70%'],
formatter: '{value}', formatter: '{value}',
color: 'inherit', // , #333 color: 'inherit', // , #333
fontSize: 20 fontSize: 20
}, },
data: [{ data: [{

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,24 +501,24 @@ export default {
distance: -20, distance: -20,
length: 20, length: 20,
lineStyle: { lineStyle: {
width:2, width: 2,
color: '#0F2D5B' color: '#0F2D5B'
} }
}, },
axisLabel: { axisLabel: {
show: false show: false
}, },
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
}, },
detail: { detail: {
valueAnimation: true, valueAnimation: true,
offsetCenter: [0, '70%'], offsetCenter: [0, '70%'],
formatter: '{value}', formatter: '{value}',
color: 'inherit', // , #333 color: 'inherit', // , #333
fontSize: 20 fontSize: 20
}, },
data: [{ data: [{

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>

File diff suppressed because it is too large Load Diff

View File

@ -59,7 +59,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检查开始时间" prop="INSPECTION_TIME_START"> <el-form-item label="检查开始时间" prop="INSPECTION_TIME_START">
<el-date-picker v-model="form.INSPECTION_TIME_START" format="yyyy-MM-dd HH:mm" v-on:blur="checkTime(form.INSPECTION_TIME_START)" value-format="yyyy-MM-dd HH:mm" type="datetime" placeholder="选择检查开始时间"/> <el-date-picker v-model="form.INSPECTION_TIME_START" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" type="datetime" placeholder="选择检查开始时间" @blur="checkTime(form.INSPECTION_TIME_START)"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -470,9 +470,9 @@ export default {
}) })
}, },
methods: { methods: {
checkTime(data){ checkTime(data) {
if (Date.parse(data)>new Date().getTime()){ if (Date.parse(data) > new Date().getTime()) {
this.$message.error("检查开始时间需小于当前时间") this.$message.error('检查开始时间需小于当前时间')
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
} }
}, },

View File

@ -1,301 +1,301 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container"> <div class="filter-container">
<el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 200px;"/> <el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 200px;"/>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"> <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索 搜索
</el-button> </el-button>
</div> </div>
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
ref="multipleTable" ref="multipleTable"
:data="varList" :data="varList"
:row-key="getRowKey" :row-key="getRowKey"
:header-cell-style="{ :header-cell-style="{
'font-weight': 'bold', 'font-weight': 'bold',
'color': '#000' 'color': '#000'
}" }"
tooltip-effect="dark" tooltip-effect="dark"
border border
fit fit
highlight-current-row highlight-current-row
> >
<el-table-column <el-table-column
:reserve-selection="true" :reserve-selection="true"
type="selection" type="selection"
width="55" width="55"
align="center"/> align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" /> <el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="MENU_NAME" label="菜单名称" /> <el-table-column prop="MENU_NAME" label="菜单名称" />
<el-table-column prop="MENU_URL" label="菜单地址" /> <el-table-column prop="MENU_URL" label="菜单地址" />
<el-table-column prop="PARENT_ID" label="父节点id" /> <el-table-column prop="PARENT_ID" label="父节点id" />
<el-table-column prop="MENU_ORDER" label="排序" /> <el-table-column prop="MENU_ORDER" label="排序" />
<el-table-column prop="CORPINFO_ID" label="企业id" /> <el-table-column prop="CORPINFO_ID" label="企业id" />
<el-table-column prop="IS_DELETE" label="删除状态" /> <el-table-column prop="IS_DELETE" label="删除状态" />
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.APPMENUS_ID)"></el-button> <el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.APPMENUS_ID)"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.APPMENUS_ID)"></el-button> <el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.APPMENUS_ID)"></el-button>
</template> </template>
</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>
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel"></el-button> <el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel"></el-button>
</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>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='edit'?'修改':'新增'" width="600px"> <el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='edit'?'修改':'新增'" width="600px">
<el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;"> <el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
<el-form-item label="菜单名称" prop="MENU_NAME"> <el-form-item label="菜单名称" prop="MENU_NAME">
<el-input ref="MENU_NAME" id="MENU_NAME" v-model="form.MENU_NAME" maxlength="255" placeholder="这里输入菜单名称..." title="菜单名称"/> <el-input id="MENU_NAME" ref="MENU_NAME" v-model="form.MENU_NAME" maxlength="255" placeholder="这里输入菜单名称..." title="菜单名称"/>
</el-form-item> </el-form-item>
<el-form-item label="菜单地址" prop="MENU_URL"> <el-form-item label="菜单地址" prop="MENU_URL">
<el-input ref="MENU_URL" id="MENU_URL" v-model="form.MENU_URL" maxlength="255" placeholder="这里输入菜单地址..." title="菜单地址"/> <el-input id="MENU_URL" ref="MENU_URL" v-model="form.MENU_URL" maxlength="255" placeholder="这里输入菜单地址..." title="菜单地址"/>
</el-form-item> </el-form-item>
<el-form-item label="父节点id" prop="PARENT_ID"> <el-form-item label="父节点id" prop="PARENT_ID">
<el-input ref="PARENT_ID" id="PARENT_ID" v-model="form.PARENT_ID" maxlength="255" placeholder="这里输入父节点id..." title="父节点id"/> <el-input id="PARENT_ID" ref="PARENT_ID" v-model="form.PARENT_ID" maxlength="255" placeholder="这里输入父节点id..." title="父节点id"/>
</el-form-item> </el-form-item>
<el-form-item label="排序" prop="MENU_ORDER"> <el-form-item label="排序" prop="MENU_ORDER">
<el-input ref="MENU_ORDER" id="MENU_ORDER" v-model.number="form.MENU_ORDER" maxlength="11" placeholder="这里输入排序..." title="排序"/> <el-input id="MENU_ORDER" ref="MENU_ORDER" v-model.number="form.MENU_ORDER" maxlength="11" placeholder="这里输入排序..." title="排序"/>
</el-form-item> </el-form-item>
<el-form-item label="企业id" prop="CORPINFO_ID"> <el-form-item label="企业id" prop="CORPINFO_ID">
<el-input ref="CORPINFO_ID" id="CORPINFO_ID" v-model="form.CORPINFO_ID" maxlength="255" placeholder="这里输入企业id..." title="企业id"/> <el-input id="CORPINFO_ID" ref="CORPINFO_ID" v-model="form.CORPINFO_ID" maxlength="255" placeholder="这里输入企业id..." title="企业id"/>
</el-form-item> </el-form-item>
<el-form-item label="删除状态" prop="IS_DELETE"> <el-form-item label="删除状态" prop="IS_DELETE">
<el-input ref="IS_DELETE" id="IS_DELETE" v-model.number="form.IS_DELETE" maxlength="2" placeholder="这里输入删除状态..." title="删除状态"/> <el-input id="IS_DELETE" ref="IS_DELETE" v-model.number="form.IS_DELETE" maxlength="2" placeholder="这里输入删除状态..." title="删除状态"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button> <el-button @click="dialogFormEdit = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button> <el-button type="primary" @click="confirm"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/Pagination' // el-pagination import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive import waves from '@/directive/waves' // waves directive
export default { export default {
components: { Pagination }, components: { Pagination },
directives: { waves }, directives: { waves },
data() { data() {
return { return {
listLoading: true, listLoading: true,
add: false, add: false,
del: false, del: false,
edit: false, edit: false,
listQuery: { listQuery: {
page: 1, page: 1,
limit: 10 limit: 10
}, },
total: 0, total: 0,
KEYWORDS: '', KEYWORDS: '',
varList: [], varList: [],
pd: [], pd: [],
form: { form: {
MENU_NAME: '',// MENU_NAME: '', //
MENU_URL: '',// MENU_URL: '', //
PARENT_ID: '',//id PARENT_ID: '', // id
MENU_ORDER: '',// MENU_ORDER: '', //
CORPINFO_ID: '',//id CORPINFO_ID: '', // id
IS_DELETE: '',// IS_DELETE: ''//
}, },
multipleSelectionAll: [], // multipleSelectionAll: [], //
multipleSelection: [], // multipleSelection: [], //
dialogFormEdit: false, dialogFormEdit: false,
dialogType: 'add', dialogType: 'add',
rules: { rules: {
MENU_NAME: [{ required: true, message: '菜单名称不能为空', trigger: 'blur' }], MENU_NAME: [{ required: true, message: '菜单名称不能为空', trigger: 'blur' }],
MENU_URL: [{ required: true, message: '菜单地址不能为空', trigger: 'blur' }], MENU_URL: [{ required: true, message: '菜单地址不能为空', trigger: 'blur' }],
PARENT_ID: [{ required: true, message: '父节点id不能为空', trigger: 'blur' }], PARENT_ID: [{ required: true, message: '父节点id不能为空', trigger: 'blur' }],
MENU_ORDER: [ MENU_ORDER: [
{ required: true, message: '排序不能为空', trigger: 'change' }, { required: true, message: '排序不能为空', trigger: 'change' },
{ type: 'number', message: '排序必须为数字' } { type: 'number', message: '排序必须为数字' }
], ],
CORPINFO_ID: [{ required: true, message: '企业id不能为空', trigger: 'blur' }], CORPINFO_ID: [{ required: true, message: '企业id不能为空', trigger: 'blur' }],
IS_DELETE: [ IS_DELETE: [
{ required: true, message: '删除状态不能为空', trigger: 'change' }, { required: true, message: '删除状态不能为空', trigger: 'change' },
{ type: 'number', message: '删除状态必须为数字' } { type: 'number', message: '删除状态必须为数字' }
], ]
} }
} }
}, },
created() { created() {
this.getList(this.ROLE_ID) this.getList(this.ROLE_ID)
}, },
methods: { methods: {
getRowKey(row) { getRowKey(row) {
return row.APPMENUS_ID return row.APPMENUS_ID
}, },
// //
getQuery() { getQuery() {
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
this.getList() this.getList()
}, },
// //
getList() { getList() {
this.listLoading = true this.listLoading = true
requestFN( requestFN(
'/appmenus/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, '/appmenus/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{ {
KEYWORDS: this.KEYWORDS KEYWORDS: this.KEYWORDS
} }
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false
this.varList = data.varList this.varList = data.varList
this.total = data.page.totalResult this.total = data.page.totalResult
this.hasButton() this.hasButton()
this.pd = data.pd this.pd = data.pd
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
}, },
// //
handleAdd() { handleAdd() {
this.dialogType = 'add' this.dialogType = 'add'
this.resetForm() this.resetForm()
this.getDict() this.getDict()
this.dialogFormEdit = true this.dialogFormEdit = true
}, },
// //
handleEdit(ID) { handleEdit(ID) {
this.getDict() this.getDict()
this.dialogType = 'edit' this.dialogType = 'edit'
requestFN( requestFN(
'/appmenus/goEdit', '/appmenus/goEdit',
{ {
APPMENUS_ID:ID APPMENUS_ID: ID
} }
).then((data) => { ).then((data) => {
this.form = Object.assign({}, data.pd) // copy obj this.form = Object.assign({}, data.pd) // copy obj
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
this.dialogFormEdit = true this.dialogFormEdit = true
}, },
// //
confirm() { confirm() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
this.listLoading = true this.listLoading = true
requestFN( requestFN(
'/appmenus/' + this.dialogType, '/appmenus/' + this.dialogType,
this.form this.form
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false
this.dialogFormEdit = false this.dialogFormEdit = false
this.getList() this.getList()
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
} else { } else {
return false return false
} }
}) })
}, },
handleDelete(id) { handleDelete(id) {
this.$confirm('确定要删除吗?', { this.$confirm('确定要删除吗?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.listLoading = true this.listLoading = true
requestFN( requestFN(
'/appmenus/delete', '/appmenus/delete',
{ {
APPMENUS_ID: id APPMENUS_ID: id
} }
).then(() => { ).then(() => {
this.$message({ this.$message({
message: '删除成功', message: '删除成功',
type: 'success' type: 'success'
}) })
this.listLoading = false this.listLoading = false
this.varList = [] this.varList = []
this.listQuery.page = 1 this.listQuery.page = 1
this.getList() this.getList()
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
}).catch(() => { }).catch(() => {
}) })
}, },
batchDel() { batchDel() {
const _selectData = this.$refs.multipleTable.selection const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) { if (_selectData == null || _selectData.length == 0) {
this.$message({ this.$message({
message: '请选中要删除的项...', message: '请选中要删除的项...',
type: 'error' type: 'error'
}) })
return false return false
} }
const ids = _selectData.map((item, index) => { const ids = _selectData.map((item, index) => {
return item.APPMENUS_ID return item.APPMENUS_ID
}).join(',') }).join(',')
this.$confirm('确定要删除选中的数据吗?', { this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.listLoading = true this.listLoading = true
requestFN( requestFN(
'/appmenus/deleteAll', '/appmenus/deleteAll',
{ {
DATA_IDS: ids DATA_IDS: ids
} }
).then(() => { ).then(() => {
this.$message({ this.$message({
message: '删除成功', message: '删除成功',
type: 'success' type: 'success'
}) })
this.listLoading = false this.listLoading = false
this.varList = [] this.varList = []
this.listQuery.page = 1 this.listQuery.page = 1
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
this.getList() this.getList()
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
}).catch(() => { }).catch(() => {
}) })
}, },
// //
hasButton: function() { hasButton: function() {
var keys = 'appmenus:add,appmenus:del,appmenus:edit,toExcel'; var keys = 'appmenus:add,appmenus:del,appmenus:edit,toExcel'
requestFN( requestFN(
'/head/hasButton', '/head/hasButton',
{ {
keys: keys keys: keys
} }
).then((data) => { ).then((data) => {
this.add = data.appmenusfhadminadd; // this.add = data.appmenusfhadminadd //
this.del = data.appmenusfhadmindel; // this.del = data.appmenusfhadmindel //
this.edit = data.appmenusfhadminedit; // this.edit = data.appmenusfhadminedit //
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
}, },
// //
getDict: function (){ getDict: function() {
}, },
resetForm() { resetForm() {
this.form = { this.form = {
MENU_NAME: '',// MENU_NAME: '', //
MENU_URL: '',// MENU_URL: '', //
PARENT_ID: '',//id PARENT_ID: '', // id
MENU_ORDER: '',// MENU_ORDER: '', //
CORPINFO_ID: '',//id CORPINFO_ID: '', // id
IS_DELETE: '',// IS_DELETE: ''//
} }
} }
} }
} }
</script> </script>

View File

@ -603,7 +603,7 @@ export default {
if (this.pd.VILLAGE) { if (this.pd.VILLAGE) {
areaRefID.push(this.pd.VILLAGE) areaRefID.push(this.pd.VILLAGE)
} }
this.$set(this.pd,'shudi',areaRefID) this.$set(this.pd, 'shudi', areaRefID)
const refDeptLevelVal = {} const refDeptLevelVal = {}
refDeptLevelVal.id = this.pd.deptLevenlID refDeptLevelVal.id = this.pd.deptLevenlID
@ -625,7 +625,6 @@ export default {
this.pd.ROLE_ID = arrString this.pd.ROLE_ID = arrString
this.dialogFormEdit = true this.dialogFormEdit = true
await this.$nextTick() await this.$nextTick()
}, },
handleEditStatus(row, type) { handleEditStatus(row, type) {
const typeName = type == '1' ? '禁用' : '启用' const typeName = type == '1' ? '禁用' : '启用'