|
@@ -1,135 +1,156 @@
|
|
|
<template>
|
|
|
-<div class="remarks">
|
|
|
- <el-table
|
|
|
- :data="data"
|
|
|
- border
|
|
|
- style="width: 100%;height:400px;">
|
|
|
- <el-table-column
|
|
|
- type="index"
|
|
|
- width="80"
|
|
|
- label="序号">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="pushTime"
|
|
|
- label="策略推送时间"
|
|
|
- >
|
|
|
- <template slot-scope='{row}'>{{row.pushTime?timestamp2String(row.pushTime).slice(8,10)+":"+timestamp2String(row.pushTime).slice(10,12) : '--'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="executeTime"
|
|
|
- label="策略执行时间"
|
|
|
- >
|
|
|
- <template slot-scope='{row}'>{{row.executeTime?row.executeTime.slice(8,10)+":"+row.executeTime.slice(10,12):"--"}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='冷水机组开启台数' align='center'>
|
|
|
- <template slot-scope='{row}'>{{row.chillerNumSetL+row.chillerNumSetS}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="chillWaterOutTempSet"
|
|
|
- label="出水温度设定值"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='冷冻泵开启台数' align='center'>
|
|
|
- <template slot-scope='{row}'>{{row.coolPumpNumSetL+'大'+row.coolPumpNumSetS+'小'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop label='冷却泵开启台数' min-width='120' align='center'>
|
|
|
- <template slot-scope='{row}'>{{row.chillPumpNumSetL+row.chillPumpNumSetS}}</template>
|
|
|
+ <div class="remarks">
|
|
|
+ <el-table :data="data" border style="width: 100%;height:400px;">
|
|
|
+ <el-table-column type="index" width="80" label="序号"></el-table-column>
|
|
|
+ <el-table-column prop="pushTime" label="策略推送时间">
|
|
|
+ <template
|
|
|
+ slot-scope="{row}"
|
|
|
+ >{{row.pushTime?timestamp2String(row.pushTime).slice(8,10)+":"+timestamp2String(row.pushTime).slice(10,12) : '--'}}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop label='冷却塔开启组数' min-width='120' align='center'>
|
|
|
- <template slot-scope='{row}'>{{row.coolTowerNumSetL+row.coolTowerNumSetS}}</template>
|
|
|
+ <el-table-column prop="executeTime" label="策略执行时间">
|
|
|
+ <template
|
|
|
+ slot-scope="{row}"
|
|
|
+ >{{row.executeTime?row.executeTime.slice(8,10)+":"+row.executeTime.slice(10,12):"--"}}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="zip"
|
|
|
- label="通风策略"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
-
|
|
|
- label="执行情况"
|
|
|
- >
|
|
|
- <template slot-scope="{row}"> {{row.isExecuted==0?'未执行':'已执行'}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button @click="handleClick(scope.row)" type="text" size="small">备注</el-button>
|
|
|
- <el-button @click="dumpAduit(scope.row)" v-if="scope.row.isExecuted==false" type="text" size="small">申诉</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <el-dialog
|
|
|
- title="备注"
|
|
|
- :visible.sync="dialogVisible"
|
|
|
- width="30%"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- :autosize="{ minRows: 2, maxRows: 4}"
|
|
|
- placeholder="请填写备注内容"
|
|
|
- v-model="remarks">
|
|
|
-</el-input>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogVisible = false">关闭</el-button>
|
|
|
- <el-button type="primary" @click="saveCommand">保存</el-button>
|
|
|
- </span>
|
|
|
-</el-dialog>
|
|
|
-</div>
|
|
|
-
|
|
|
+ <el-table-column prop label="冷水机组开启台数" align="center">
|
|
|
+ <template slot-scope="{row}">{{row.chillerNumSetL+row.chillerNumSetS}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="chillWaterOutTempSet" label="出水温度设定值"></el-table-column>
|
|
|
+ <el-table-column prop label="冷冻泵开启台数" align="center">
|
|
|
+ <template slot-scope="{row}">{{row.coolPumpNumSetL+'大'+row.coolPumpNumSetS+'小'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="冷却泵开启台数" min-width="120" align="center">
|
|
|
+ <template slot-scope="{row}">{{row.chillPumpNumSetL+row.chillPumpNumSetS}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop label="冷却塔开启组数" min-width="120" align="center">
|
|
|
+ <template slot-scope="{row}">{{row.coolTowerNumSetL+row.coolTowerNumSetS}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="zip" label="通风策略"></el-table-column>
|
|
|
+ <el-table-column label="执行情况">
|
|
|
+ <template slot-scope="{row}">{{row.isExecuted==0?'未执行':'已执行'}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="handleClick(scope.row)" type="text" size="small">备注</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="dumpAduit(scope.row)"
|
|
|
+ v-if="isShow(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >申诉</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <el-dialog title="备注" :visible.sync="dialogVisible" width="30%">
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 2, maxRows: 4}"
|
|
|
+ placeholder="请填写备注内容"
|
|
|
+ v-model="remarks"
|
|
|
+ ></el-input>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">关闭</el-button>
|
|
|
+ <el-button type="primary" @click="saveCommand">保存</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { updateCommand } from "@/api/strategy/strategy.js";
|
|
|
-import {timestamp2String} from '@/utils/helper.js'
|
|
|
+import { timestamp2String } from "@/utils/helper.js";
|
|
|
+import { queryWorkflow } from "@/api/appeal/appeal.js";
|
|
|
+
|
|
|
export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- timestamp2String,
|
|
|
- dialogVisible:false,
|
|
|
- remarks:'',
|
|
|
- row:""
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ timestamp2String,
|
|
|
+ dialogVisible: false,
|
|
|
+ remarks: "",
|
|
|
+ row: "",
|
|
|
+ newData: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ props: ["data", "idArr"],
|
|
|
+ methods: {
|
|
|
+ isShow(data) {
|
|
|
+ let isShow = false
|
|
|
+ if (this.newData.length) {
|
|
|
+ this.newData.forEach(el => {
|
|
|
+ if (data.appealId == el.id) {
|
|
|
+ if(el.status == 301 || el.status == 305){
|
|
|
+ isShow = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return isShow
|
|
|
+ },
|
|
|
+ appealsIng(id) {
|
|
|
+ let params = {
|
|
|
+ postParams: {
|
|
|
+ criteria: {
|
|
|
+ id: id
|
|
|
+ },
|
|
|
+ withColumns: ["customAttribute"]
|
|
|
}
|
|
|
+ };
|
|
|
+ queryWorkflow(params).then(res => {
|
|
|
+ this.newData = res.content ? res.content : [];
|
|
|
+ console.log(res);
|
|
|
+ // let arr = [];
|
|
|
+ // arr = res.content ? res.content : [];
|
|
|
+ // if (arr.length > 0) {
|
|
|
+ // arr.forEach(item => {
|
|
|
+ // arr.push(item.commandId);
|
|
|
+ // this.newArr.push(item);
|
|
|
+ // });
|
|
|
+ // this.queryExecute(arr);
|
|
|
+ // }
|
|
|
+ });
|
|
|
},
|
|
|
- props:['data'],
|
|
|
- methods:{
|
|
|
- handleClick(row){
|
|
|
- this.row = row
|
|
|
- this.dialogVisible = true
|
|
|
- },
|
|
|
- saveCommand(row){
|
|
|
- this.dialogVisible = false
|
|
|
- let postParams = {
|
|
|
- id: this.row.id,
|
|
|
- remarks: this.remarks
|
|
|
-
|
|
|
- };
|
|
|
- updateCommand({ postParams }).then(res => {
|
|
|
- if (res.result == "success") {
|
|
|
- this.$message.success("添加备注成功!");
|
|
|
- }
|
|
|
- })
|
|
|
+ handleClick(row) {
|
|
|
+ this.row = row;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ },
|
|
|
+ saveCommand(row) {
|
|
|
+ this.dialogVisible = false;
|
|
|
+ let postParams = {
|
|
|
+ id: this.row.id,
|
|
|
+ remarks: this.remarks
|
|
|
+ };
|
|
|
+ updateCommand({ postParams }).then(res => {
|
|
|
+ if (res.result == "success") {
|
|
|
+ this.$message.success("添加备注成功!");
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- dumpAduit(row){
|
|
|
- console.log(row)
|
|
|
- this.$router.push({
|
|
|
- path: "/appeal/appealDetail",
|
|
|
- query: { id:row.id }
|
|
|
+ dumpAduit(row) {
|
|
|
+ console.log(row);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/appeal/appealDetails",
|
|
|
+ query: { item: JSON.stringify(row) }
|
|
|
});
|
|
|
- }
|
|
|
}
|
|
|
-}
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ if (this.data && this.idArr) {
|
|
|
+ this.appealsIng(this.idArr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang='scss' >
|
|
|
-.remarks{
|
|
|
- .el-dialog{
|
|
|
+.remarks {
|
|
|
+ .el-dialog {
|
|
|
margin-top: 30vh !important;
|
|
|
- z-index:999999 !important;
|
|
|
+ z-index: 999999 !important;
|
|
|
}
|
|
|
}
|
|
|
- .v-modal{
|
|
|
- z-index:1!important;
|
|
|
- background: #fff !important;
|
|
|
- }
|
|
|
+.v-modal {
|
|
|
+ z-index: 1 !important;
|
|
|
+ background: #fff !important;
|
|
|
+}
|
|
|
</style>
|