|
@@ -105,7 +105,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="vr-right">
|
|
<div class="vr-right">
|
|
- <eq-right :envData='envData' :Info='Info' :noAlarmNum='noAlarmNum' :ElecConsumPData='ElecConsumPData'
|
|
|
|
|
|
+ <eq-right :Info='Info' :envData='envData' :noAlarmNum='noAlarmNum' :ElecConsumPData='ElecConsumPData'
|
|
:AccElecConsumData="AccElecConsumData" :orderCount='orderCount' :moniData='moniData'></eq-right>
|
|
:AccElecConsumData="AccElecConsumData" :orderCount='orderCount' :moniData='moniData'></eq-right>
|
|
</div>
|
|
</div>
|
|
<div class="mask-bg"></div>
|
|
<div class="mask-bg"></div>
|
|
@@ -171,7 +171,7 @@ export default {
|
|
bdObjName: "--",
|
|
bdObjName: "--",
|
|
flObjName: "--",
|
|
flObjName: "--",
|
|
isQR: '',
|
|
isQR: '',
|
|
- objctId: 'Sp1101080001001003001',
|
|
|
|
|
|
+ objectId: 'Sp1101080001001003001',
|
|
ElecConsumPData: "", // 耗电功率
|
|
ElecConsumPData: "", // 耗电功率
|
|
AccElecConsumData: "", // 累计用电量
|
|
AccElecConsumData: "", // 累计用电量
|
|
orderCount: 0, // 工单
|
|
orderCount: 0, // 工单
|
|
@@ -191,26 +191,41 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
mounted () {
|
|
mounted () {
|
|
- this.initData()
|
|
|
|
- this.searchBuildingName()
|
|
|
|
- this.noRecoverAlarm()
|
|
|
|
- this.envInfo()
|
|
|
|
- this.getCurrentData()
|
|
|
|
- this.underwayOrder()
|
|
|
|
- this.getMoniCount()
|
|
|
|
|
|
+ this.getEqNameAndId()
|
|
|
|
+ // this.initData()
|
|
|
|
+ // this.searchBuildingName()
|
|
|
|
+ // this.noRecoverAlarm()
|
|
|
|
+ // this.envInfo()
|
|
|
|
+ // this.getCurrentData()
|
|
|
|
+ // this.underwayOrder()
|
|
|
|
+ // this.getMoniCount()
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getEqNameAndId () {
|
|
|
|
+ let hostUrl = location.search
|
|
|
|
+ this.objectId = hostUrl.split("&")[0].toString().split("=")[1]
|
|
|
|
+ let pid = hostUrl.split("&")[1].toString().split("=")[1]
|
|
|
|
+ console.log(pid, this.$store.state.projId)
|
|
|
|
+ this.$store.commit('setProId', pid)
|
|
|
|
+ this.initData(this.objectId)
|
|
|
|
+ this.searchBuildingName(this.objectId)
|
|
|
|
+ this.noRecoverAlarm(this.objectId)
|
|
|
|
+ this.envInfo(this.objectId)
|
|
|
|
+ this.getCurrentData(this.objectId)
|
|
|
|
+ this.underwayOrder(this.objectId)
|
|
|
|
+ this.getMoniCount(this.objectId)
|
|
|
|
+ },
|
|
// 右侧耗电功率和累计用电量的统计
|
|
// 右侧耗电功率和累计用电量的统计
|
|
- getCurrentData () {
|
|
|
|
|
|
+ getCurrentData (objectId) {
|
|
let params = {
|
|
let params = {
|
|
criterias: [
|
|
criterias: [
|
|
{
|
|
{
|
|
- id: this.objctId,
|
|
|
|
|
|
+ id: objectId,
|
|
code: "ElecConsumP"
|
|
code: "ElecConsumP"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- id: this.objctId,
|
|
|
|
|
|
+ id: objectId,
|
|
code: "AccElecConsum"
|
|
code: "AccElecConsum"
|
|
}
|
|
}
|
|
]
|
|
]
|
|
@@ -231,10 +246,10 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 右侧进行中的工单
|
|
// 右侧进行中的工单
|
|
- underwayOrder () {
|
|
|
|
|
|
+ underwayOrder (objectId) {
|
|
let params = {
|
|
let params = {
|
|
order_state: "5",
|
|
order_state: "5",
|
|
- space_ids: [this.objctId],
|
|
|
|
|
|
+ space_ids: [objectId],
|
|
user_id: "systemId",
|
|
user_id: "systemId",
|
|
project_id: this.$store.state.projId,
|
|
project_id: this.$store.state.projId,
|
|
start_time: "20180101000000",
|
|
start_time: "20180101000000",
|
|
@@ -246,9 +261,9 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 摄像头数量
|
|
// 摄像头数量
|
|
- getMoniCount () {
|
|
|
|
|
|
+ getMoniCount (objectId) {
|
|
let params = {
|
|
let params = {
|
|
- id: this.objctId
|
|
|
|
|
|
+ id: objectId
|
|
}
|
|
}
|
|
axios.post(`/api/front-api/monitor/list?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
axios.post(`/api/front-api/monitor/list?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
let data = res.data
|
|
let data = res.data
|
|
@@ -258,12 +273,12 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 空间建筑的名称查询
|
|
// 空间建筑的名称查询
|
|
- searchBuildingName () {
|
|
|
|
|
|
+ searchBuildingName (objectId) {
|
|
let params = {
|
|
let params = {
|
|
keywords: [],
|
|
keywords: [],
|
|
category: ['SpObj'],
|
|
category: ['SpObj'],
|
|
limit: 1,
|
|
limit: 1,
|
|
- ids: [this.objctId]
|
|
|
|
|
|
+ ids: [objectId]
|
|
}
|
|
}
|
|
axios.post(`/data-platform-3/data-platform-3/object/search?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
axios.post(`/data-platform-3/data-platform-3/object/search?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
let data = res.data
|
|
let data = res.data
|
|
@@ -279,10 +294,10 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 未恢复的报警条数
|
|
// 未恢复的报警条数
|
|
- noRecoverAlarm () {
|
|
|
|
|
|
+ noRecoverAlarm (objectId) {
|
|
let params = {
|
|
let params = {
|
|
criteria: {
|
|
criteria: {
|
|
- objectId: this.objctId,
|
|
|
|
|
|
+ objectId: objectId,
|
|
status: 'alalrm'
|
|
status: 'alalrm'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -294,13 +309,13 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// c02等信息
|
|
// c02等信息
|
|
- envInfo () {
|
|
|
|
|
|
+ envInfo (objectId) {
|
|
let params = {
|
|
let params = {
|
|
criterias: [
|
|
criterias: [
|
|
- { id: this.objctId, code: 'Tdb' },
|
|
|
|
- { id: this.objctId, code: 'RH' },
|
|
|
|
- { id: this.objctId, code: 'CO2' },
|
|
|
|
- { id: this.objctId, code: 'PM2.5' }
|
|
|
|
|
|
+ { id: objectId, code: 'Tdb' },
|
|
|
|
+ { id: objectId, code: 'RH' },
|
|
|
|
+ { id: objectId, code: 'CO2' },
|
|
|
|
+ { id: objectId, code: 'PM2.5' }
|
|
]
|
|
]
|
|
}
|
|
}
|
|
axios.post(`/data-platform-3/data-platform-3/parameter/batch_query_param?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
axios.post(`/data-platform-3/data-platform-3/parameter/batch_query_param?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
@@ -325,16 +340,17 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 获取数据信息
|
|
// 获取数据信息
|
|
- initData () {
|
|
|
|
|
|
+ initData (objectId) {
|
|
let params = {
|
|
let params = {
|
|
criterias: [
|
|
criterias: [
|
|
- {id: this.objctId}
|
|
|
|
|
|
+ {id: objectId}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
axios.post(`/data-platform-3/data-platform-3/object/batch_query?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
axios.post(`/data-platform-3/data-platform-3/object/batch_query?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
let data = res.data
|
|
let data = res.data
|
|
if (data.Result == 'success') {
|
|
if (data.Result == 'success') {
|
|
this.Info = data.Content[0]
|
|
this.Info = data.Content[0]
|
|
|
|
+ console.log(this.Info)
|
|
if (this.Info.infos.Pic) {
|
|
if (this.Info.infos.Pic) {
|
|
this.draw(this.Info.infos.Pic[0].key)
|
|
this.draw(this.Info.infos.Pic[0].key)
|
|
}
|
|
}
|
|
@@ -378,7 +394,7 @@ export default {
|
|
criteria: {
|
|
criteria: {
|
|
graphType: 'EquipinSpace',
|
|
graphType: 'EquipinSpace',
|
|
relType: '1',
|
|
relType: '1',
|
|
- toId: this.objctId, // 空间id
|
|
|
|
|
|
+ toId: this.objectId, // 空间id
|
|
side: 'fromId'
|
|
side: 'fromId'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -412,7 +428,7 @@ export default {
|
|
// 服务于空间设备未恢复的报警条数
|
|
// 服务于空间设备未恢复的报警条数
|
|
equipInSpace () {
|
|
equipInSpace () {
|
|
let params = {
|
|
let params = {
|
|
- spaceId: this.objctId // 空间id
|
|
|
|
|
|
+ spaceId: this.objectId // 空间id
|
|
}
|
|
}
|
|
axios.post(`/alarm-system/alarm-system/alarm/equipInSpace/query?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
axios.post(`/alarm-system/alarm-system/alarm/equipInSpace/query?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
let data = res.data
|
|
let data = res.data
|
|
@@ -441,7 +457,7 @@ export default {
|
|
//
|
|
//
|
|
equipForSpace () {
|
|
equipForSpace () {
|
|
let params = {
|
|
let params = {
|
|
- spaceId: this.objctId // 空间id
|
|
|
|
|
|
+ spaceId: this.objectId // 空间id
|
|
}
|
|
}
|
|
axios.post(`/alarm-system/alarm-system/alarm/equipForSpace/query?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
axios.post(`/alarm-system/alarm-system/alarm/equipForSpace/query?projectId=${this.$store.state.projId}&secret=`, params).then(res => {
|
|
let data = res.data
|
|
let data = res.data
|