<template>
|
<div class="streetlight-info" :style="{ 'height': documentClientHeight + 'px' }">
|
<div class="title-text">智能路灯信息</div>
|
<div style="padding: 20px">
|
<el-row>
|
<el-col :span="12" class="tip">
|
<el-col :span="6" class="tip">ID</el-col>
|
<el-col :span="18" class="tip">{{dataForm.streetlightId}}</el-col>
|
</el-col>
|
<el-col :span="12" class="tip">
|
<el-col :span="6" class="tip">亮度</el-col>
|
<el-col :span="18" class="tip">{{dataForm.light}}</el-col>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12" class="tip">
|
<el-col :span="6" class="tip">名称</el-col>
|
<el-col :span="18" class="tip">{{dataForm.streetlightName}}</el-col>
|
</el-col>
|
<el-col :span="12" class="tip">
|
<el-col :span="6" class="tip">创建时间</el-col>
|
<el-col :span="18" class="tip">{{dataForm.addTime}}</el-col>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12" class="tip">
|
<el-col :span="6" class="tip">经度</el-col>
|
<el-col :span="18" class="tip">{{dataForm.longitude}}</el-col>
|
</el-col>
|
<el-col :span="12" class="tip">
|
<el-col :span="6" class="tip">纬度</el-col>
|
<el-col :span="18" class="tip">{{dataForm.latitude}}</el-col>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col class="tip">
|
<el-col :span="3" class="tip">地址</el-col>
|
<el-col :span="18" class="tip">{{dataForm.streetlightAddress}}</el-col>
|
</el-col>
|
</el-row>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
data () {
|
return {
|
dataForm: {
|
streetlightId: 0,
|
streetlightName: ' ',
|
streetlightAddress: ' ',
|
longitude: '',
|
latitude: '',
|
addTime: '',
|
codeNumber: '',
|
power: '',
|
control: '',
|
light: '',
|
city: '',
|
cityCode: '',
|
singLampId: '',
|
remark: '',
|
updateTime: '',
|
createUserId: '',
|
createTime: '',
|
userId: '',
|
linkMethod: ''
|
}
|
}
|
},
|
computed: {
|
streetlightStateId () {
|
return this.$store.state.streetlight.streetlightId
|
},
|
documentClientHeight: {
|
get () { return this.$store.state.common.documentClientHeight * 0.2 }
|
}
|
},
|
watch: {
|
streetlightStateId (curVal, oldVal) {
|
this.getStreetlightInfo(curVal)
|
}
|
},
|
methods: {
|
getStreetlightInfo (streetlightId) {
|
this.$http({
|
url: this.$http.adornUrl(`/pole/polestreetlight/info/${streetlightId}`),
|
method: 'get',
|
params: this.$http.adornParams()
|
}).then(({data}) => {
|
if (data && data.code === 0) {
|
this.dataForm.streetlightId = data.polestreetlight.streetlightId
|
this.dataForm.streetlightName = data.polestreetlight.streetlightName
|
this.dataForm.streetlightAddress = data.polestreetlight.streetlightAddress
|
this.dataForm.longitude = data.polestreetlight.longitude
|
this.dataForm.latitude = data.polestreetlight.latitude
|
this.dataForm.addTime = data.polestreetlight.addTime
|
this.dataForm.codeNumber = data.polestreetlight.codeNumber
|
this.dataForm.power = data.polestreetlight.power
|
this.dataForm.control = data.polestreetlight.control
|
this.dataForm.light = data.polestreetlight.light
|
this.dataForm.city = data.polestreetlight.city
|
this.dataForm.cityCode = data.polestreetlight.cityCode
|
this.dataForm.singLampId = data.polestreetlight.singLampId
|
this.dataForm.remark = data.polestreetlight.remark
|
this.dataForm.updateTime = data.polestreetlight.updateTime
|
this.dataForm.createUserId = data.polestreetlight.createUserId
|
this.dataForm.createTime = data.polestreetlight.createTime
|
this.dataForm.userId = data.polestreetlight.userId
|
this.dataForm.linkMethod = data.polestreetlight.linkMethod
|
}
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.streetlight-info {
|
// background-image: url(~@/assets/img/streetlight/info.png);
|
// background-size: 100% 100%;
|
.tip {
|
padding: 4px;
|
font-size: 1.1em;
|
&-title {
|
color: aqua;
|
}
|
}
|
}
|
</style>
|