<template>
|
<div class="led-info" :style="{ 'height': documentClientHeight*0.3 + 'px' }">
|
<div class="title-text">LED信息</div>
|
<div style="padding: 20px">
|
<el-row>
|
<el-col :span="12">
|
<el-col :span="8" class="tip">名称</el-col>
|
<el-col :span="16" class="tip">{{dataForm.lightemitName}}</el-col>
|
</el-col>
|
<el-col :span="12">
|
<el-col :span="8" class="tip">网络状态</el-col>
|
<el-col :span="16" class="tip">
|
<div class="isConnet netstate" v-show="dataForm.state == true"></div>
|
<div class="unConnet netstate" v-show="dataForm.state != true"></div>
|
</el-col>
|
</el-col>
|
<el-col :span="24">
|
<el-col :span="4" class="tip">编码</el-col>
|
<el-col :span="20" class="tip">{{dataForm.lightemitControlCode}}</el-col>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="24">
|
<el-col :span="4" class="tip">屏幕分辨率</el-col>
|
<el-col :span="20" class="tip">{{resolutrion}}</el-col>
|
</el-col>
|
<el-col :span="24">
|
<el-col :span="4" class="tip">创建时间</el-col>
|
<el-col :span="20" class="tip">{{dataForm.createTime}}</el-col>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="24">
|
<el-col :span="4" class="tip">备注</el-col>
|
<el-col :span="20" class="tip"></el-col>
|
</el-col>
|
</el-row>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
data () {
|
return {
|
visible: false,
|
streetlightList: [],
|
dataForm: {
|
lightemitId: 0,
|
lightemitName: '',
|
lightemitControlCode: '',
|
// url: '',
|
// playTime: '',
|
// addTime: '',
|
playerSetting: '',
|
status: '',
|
// createUserId: '',
|
createTime: '',
|
streetlightId: '',
|
state: ''
|
},
|
resolutrion: '' // 分辨率
|
}
|
},
|
computed: {
|
lightemitStateId () {
|
return this.$store.state.led.lightemitId
|
},
|
documentClientHeight: {
|
get () { return this.$store.state.common.documentClientHeight }
|
}
|
},
|
watch: {
|
lightemitStateId (curVal, oldVal) {
|
this.getLedInfo(curVal)
|
this.getLedStatus(curVal)
|
this.getLedResolution(curVal)
|
}
|
},
|
methods: {
|
getLedInfo (lightemitId) {
|
this.$http({
|
url: this.$http.adornUrl(`/pole/polelightemit/info/${lightemitId}`),
|
method: 'get',
|
params: this.$http.adornParams()
|
}).then(({data}) => {
|
if (data && data.code === 0) {
|
this.dataForm.lightemitName = data.poleLightemit.lightemitName
|
this.dataForm.lightemitControlCode = data.poleLightemit.lightemitControlCode
|
// this.dataForm.url = data.poleLightemit.url
|
// this.dataForm.playTime = data.poleLightemit.playTime
|
// this.dataForm.addTime = data.poleLightemit.addTime
|
this.dataForm.playerSetting = data.poleLightemit.playerSetting
|
this.dataForm.status = data.poleLightemit.status
|
// this.dataForm.createUserId = data.poleLightemit.createUserId
|
this.dataForm.createTime = data.poleLightemit.createTime
|
this.dataForm.streetlightId = data.poleLightemit.streetlightId
|
}
|
})
|
},
|
getLedStatus (lightemitId) {
|
this.$http({
|
url: this.$http.adornUrl('/pole/polelightemit/ledStatus'),
|
method: 'post',
|
data: this.$http.adornData([lightemitId], false)
|
}).then(({data}) => {
|
this.dataForm.state = data.result[lightemitId] === 'true'
|
})
|
},
|
// 获取屏幕分辨率
|
getLedResolution (lightemitId) {
|
this.$http({
|
url: this.$http.adornUrl('/pole/polelightemit/getResolution'),
|
method: 'post',
|
data: this.$http.adornData(lightemitId, false)
|
}).then(({data}) => {
|
if (data && data.code === 0) {
|
this.resolutrion = data.msg
|
} else {
|
this.resolutrion = ''
|
}
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.led-info {
|
// background-image: url(~@/assets/img/led/info.png);
|
// background-size: 100% 100%;
|
// height: 400px;
|
.tip {
|
padding: 10px;
|
font-size: 1.2em;
|
&-title {
|
color: aqua;
|
}
|
};
|
.netstate {
|
width: 95px;
|
height: 30px;
|
};
|
.isConnet {
|
background-image: url(~@/assets/img/led/netstate-isconnet.png);
|
background-size: 100% 100%;
|
}
|
.unConnet {
|
background-image: url(~@/assets/img/led/netstate-unconnet.png);
|
background-size: 100% 100%;
|
}
|
|
}
|
</style>
|