guoxiaohuan %!s(int64=5) %!d(string=hai) anos
pai
achega
6ca44e82c3
Modificáronse 1 ficheiros con 39 adicións e 10 borrados
  1. 39 10
      src/components/todayStrategy.vue

+ 39 - 10
src/components/todayStrategy.vue

@@ -9,11 +9,9 @@
             </el-table-column>
             <el-table-column prop='executeTime' label='策略执行时间' width='105'>
                 <template slot-scope='{row}'>
-                    <span v-if="row.onTime">{{row.onTime?row.onTime.slice(0,2)+":"+row.onTime.slice(2,4):"--"}} </span>
-                    <span v-else-if="row.offTime">{{row.offTime?row.offTime.slice(0,2)+":"+row.offTime.slice(2,4):"--"}}</span>
-                    <span v-else>
-                        {{row.executeTime?row.executeTime.slice(8,10)+":"+row.executeTime.slice(10,12):"--"}}
-                    </span>
+                    <span v-if='row.onTime'>{{row.onTime?row.onTime.slice(0,2)+":"+row.onTime.slice(2,4):"--"}}</span>
+                    <span v-else-if='row.offTime'>{{row.offTime?row.offTime.slice(0,2)+":"+row.offTime.slice(2,4):"--"}}</span>
+                    <span v-else>{{row.executeTime?row.executeTime.slice(8,10)+":"+row.executeTime.slice(10,12):"--"}}</span>
                 </template>
             </el-table-column>
             <el-table-column prop label='冷水机组开启台数' min-width='85'>
@@ -44,7 +42,7 @@
             </el-table-column>
             <el-table-column label='执行情况' width='80'>
                 <template slot-scope='{row}'>
-                    <div v-if='row.isExecuted==0' style='display: flex;align-items: center;'>
+                    <div v-if='!row.isExecuted' style='display: flex;align-items: center;'>
                         <span style='display: inline-block;width:6px;height:6px;background:#F54E45;border-radius: 3px;margin-right: 5px;'></span>
                         <span>未执行</span>
                     </div>
@@ -75,7 +73,7 @@
 <script>
 import { updateCommand } from '@/api/strategy/strategy.js'
 import { timestamp2String } from '@/utils/helper.js'
-import { queryWorkflow } from '@/api/appeal/appeal.js'
+import { queryWorkflow, queryChillerExecuteInfo } from '@/api/appeal/appeal.js'
 
 export default {
     data() {
@@ -131,7 +129,7 @@ export default {
             }
             queryWorkflow(params).then(res => {
                 this.newData = res.content ? res.content : []
-                console.log(res)
+                // console.log(res)
                 // let arr = [];
                 // arr = res.content ? res.content : [];
                 // if (arr.length > 0) {
@@ -144,7 +142,6 @@ export default {
             })
         },
         handleClick(row) {
-            console.log(row)
             this.row = row
             this.remarks = row.remarks
             this.dialogVisible = true
@@ -162,11 +159,43 @@ export default {
             })
         },
         dumpAduit(row) {
-            console.log(row)
             this.$router.push({
                 path: '/appeal/appealDetails',
                 query: { item: JSON.stringify(row) }
             })
+            // this.queryDetail(row)
+            // return
+            // this.$router.push({
+            //     path: '/appeal/appealDetails',
+            //     query: { item: JSON.stringify(row) }
+            // })
+        },
+        queryDetail(item) {
+            let params = {
+                postParams: {
+                    criteria: {
+                        id: item.id
+                    }
+                }
+            }
+            queryChillerExecuteInfo(params).then(res => {
+                let obj = Object.assign(item, res.data[0])
+                this.$router.push({
+                    path: '/appeal/appealDetails',
+                    query: { item: JSON.stringify(row) }
+                })
+                // console.log(res)
+                // this.tableList = []
+                // const list = res.data || [{}, {}, {}]
+
+                // console.log(res)
+                // const list = res.data || [{}, {}, {}]
+                // this.tableList = Object.values(list[0]).map(i => i || {})
+                // this.tableList[0].title = '当前运行状态'
+                // this.tableList[1].title = '推送策略'
+                // this.tableList[2].title = '执行策略'
+                // console.log(this.tableList)
+            })
         }
     },
     mounted() {