|
@@ -76,7 +76,8 @@ export default {
|
|
|
dateNow: '',
|
|
|
applyUser: '',
|
|
|
localName: '',
|
|
|
- type: ''
|
|
|
+ type: '',
|
|
|
+ tabledata: []
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -103,6 +104,43 @@ export default {
|
|
|
back() {
|
|
|
this.$router.push('/appeal')
|
|
|
},
|
|
|
+ tableMethods(obj) {
|
|
|
+ this.tableList = []
|
|
|
+ console.log(this.detailObj)
|
|
|
+ obj.current.title = '当前运行状态'
|
|
|
+ obj.recommend.title = '推送策略'
|
|
|
+ obj.real.title = '执行策略'
|
|
|
+ this.tableList.push(obj.current)
|
|
|
+ let arr = []
|
|
|
+ arr.push(obj.recommend)
|
|
|
+ if (arr.length > 0) {
|
|
|
+ arr.forEach(item => {
|
|
|
+ let obj1 = {
|
|
|
+ title: '推送策略',
|
|
|
+ id: item.id,
|
|
|
+ date: item.date,
|
|
|
+ time: item.time,
|
|
|
+ projectId: item.projectId,
|
|
|
+ chillerNumSetLOrg: item.chillerNumSetL,
|
|
|
+ chillerNumSetSOrg: item.chillerNumSetS,
|
|
|
+ chillWaterOutTempSetOrg: item.chillWaterOutTempSet,
|
|
|
+ coolPumpNumSetLOrg: item.coolPumpNumSetL,
|
|
|
+ coolPumpNumSetSOrg: item.coolPumpNumSetS,
|
|
|
+ coolPumpFreqSetOrg: item.coolPumpFreqSet,
|
|
|
+ chillPumpNumSetLOrg: item.chillPumpNumSetL,
|
|
|
+ chillPumpNumSetSOrg: item.chillPumpNumSetS,
|
|
|
+ chillPumpFreqSetOrg: item.chillPumpFreqSet,
|
|
|
+ coolTowerNumSetLOrg: item.coolTowerNumSetL,
|
|
|
+ coolTowerNumSetSOrg: item.coolTowerNumSetS,
|
|
|
+ coolTowerFreqSetOrg: item.coolTowerFreqSet,
|
|
|
+ plrAllOrg: item.plrAllOrg
|
|
|
+ }
|
|
|
+ this.tableList.push(obj1)
|
|
|
+ })
|
|
|
+
|
|
|
+ this.tableList.push(obj.real)
|
|
|
+ }
|
|
|
+ },
|
|
|
queryDetail(commandId) {
|
|
|
let params = {
|
|
|
postParams: {
|
|
@@ -112,42 +150,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
queryChillerExecuteInfo(params).then(res => {
|
|
|
+ console.log(res)
|
|
|
this.tableList = []
|
|
|
const list = res.data || [{}, {}, {}]
|
|
|
- if (list.length > 0) {
|
|
|
- let current = list[0].current
|
|
|
- current.title = '当前运行状态'
|
|
|
- this.tableList.push(current)
|
|
|
- list.forEach(item => {
|
|
|
- if (Object.keys(item.recommend).length > 0) {
|
|
|
- let obj = {
|
|
|
- title: '推送策略',
|
|
|
- id: item.recommend.id,
|
|
|
- date: item.recommend.date,
|
|
|
- time: item.recommend.time,
|
|
|
- projectId: item.recommend.projectId,
|
|
|
- chillerNumSetLOrg: item.recommend.chillerNumSetL,
|
|
|
- chillerNumSetSOrg: item.recommend.chillerNumSetS,
|
|
|
- chillWaterOutTempSetOrg: item.recommend.chillWaterOutTempSet,
|
|
|
- coolPumpNumSetLOrg: item.recommend.coolPumpNumSetL,
|
|
|
- coolPumpNumSetSOrg: item.recommend.coolPumpNumSetS,
|
|
|
- coolPumpFreqSetOrg: item.recommend.coolPumpFreqSet,
|
|
|
- chillPumpNumSetLOrg: item.recommend.chillPumpNumSetL,
|
|
|
- chillPumpNumSetSOrg: item.recommend.chillPumpNumSetS,
|
|
|
- chillPumpFreqSetOrg: item.recommend.chillPumpFreqSet,
|
|
|
- coolTowerNumSetLOrg: item.recommend.coolTowerNumSetL,
|
|
|
- coolTowerNumSetSOrg: item.recommend.coolTowerNumSetS,
|
|
|
- coolTowerFreqSetOrg: item.recommend.coolTowerFreqSet,
|
|
|
- plrAllOrg: item.recommend.plrAllOrg
|
|
|
- }
|
|
|
- this.tableList.push(obj)
|
|
|
- }
|
|
|
- })
|
|
|
|
|
|
- let real = list[0].real
|
|
|
- real.title = '执行策略'
|
|
|
- this.tableList.push(real)
|
|
|
- }
|
|
|
// console.log(res)
|
|
|
// const list = res.data || [{}, {}, {}]
|
|
|
// this.tableList = Object.values(list[0]).map(i => i || {})
|
|
@@ -193,8 +199,7 @@ export default {
|
|
|
.locale('zh-cn')
|
|
|
.format('YYYY.MM.DD')
|
|
|
if (Object.keys(this.detailObj).length > 0) {
|
|
|
- console.log(this.detailObj)
|
|
|
- // return;
|
|
|
+ this.tableMethods(this.detailObj)
|
|
|
this.quertName(this.detailObj.applyUser)
|
|
|
let projects = this.$store.state.projects.projects
|
|
|
projects.forEach(el => {
|