| | |
| | | </el-table> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh"> |
| | | <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'"> |
| | | <!-- {{ this.CountDowns }} --> |
| | | {{ this.CountDowns }} |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="dialogFormVisible3"> |
| | | <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'"> |
| | | <!-- {{ this.CountDowns }} --> |
| | | {{ this.CountDowns }} |
| | | </div> |
| | | </el-dialog> |
| | | <!-- <el-dialog :visible.sync="dialogFormVisible3"> |
| | | |
| | | <el-button :class="{ 'blue-button': receivedData === 1 }" @click="toggleButtonValue(1)">{{ |
| | | $t('A01Abort/ResumeTasks') }}</el-button> |
| | | <el-button :class="{ 'blue-button': receivedData2 === 1 }" @click="toggleButtonValue(2)">{{ |
| | | $t('A02Abort/ResumeTasks') }}</el-button> |
| | | |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | |
| | | </el-container> |
| | | </template> |
| | |
| | | // import Tag from '../layout/tag.vue'; |
| | | // import store from '../store'; |
| | | let socket; |
| | | |
| | | let timer; |
| | | export default { |
| | | name: "Layout", |
| | | // store, |
| | |
| | | CountDowns: "0", |
| | | EmergencyStop: false, |
| | | PromptSize: 250, |
| | | dialogFormCountDown:false |
| | | dialogFormCountDown: false |
| | | |
| | | } |
| | | }, |
| | |
| | | |
| | | }, |
| | | init() { |
| | | let viewname = "Home"; |
| | | let viewname = "Layout"; |
| | | if (typeof (WebSocket) == "undefined") { |
| | | console.log("您的浏览器不支持WebSocket"); |
| | | } else { |
| | |
| | | let obj = JSON.parse(msg.data); |
| | | if (obj.alarmmg) { |
| | | |
| | | |
| | | if (obj.alarmmg[0].length > 0) { |
| | | if (this.alarm.length > 0) { |
| | | if (this.alarm[this.alarm.length - 1].id != obj.alarmmg[0][obj.alarmmg[0].length - 1].id) { |
| | | this.alarm = obj.alarmmg[0]; |
| | | this.dialogFormVisible2 = true; |
| | | } |
| | | } else { |
| | | this.alarm = obj.alarmmg[0]; |
| | | this.dialogFormVisible2 = true; |
| | | } |
| | | } else { |
| | | if( obj.alarmmg!=null){ |
| | | this.alarm = obj.alarmmg[0]; |
| | | this.dialogFormVisible2 = false; |
| | | } |
| | | //是否急停 |
| | | if (obj.emergencystop != null) { |
| | | this.EmergencyStop = obj.emergencystop[0]; |
| | | } |
| | | |
| | | // if (obj.alarmmg[0].length > 0) { |
| | | // if (this.alarm.length > 0) { |
| | | // if (this.alarm[this.alarm.length - 1].id != obj.alarmmg[0][obj.alarmmg[0].length - 1].id) { |
| | | // this.alarm = obj.alarmmg[0]; |
| | | // this.dialogFormVisible2 = true; |
| | | // } |
| | | // } else { |
| | | // this.alarm = obj.alarmmg[0]; |
| | | // this.dialogFormVisible2 = true; |
| | | // } |
| | | // } else { |
| | | // this.alarm = obj.alarmmg[0]; |
| | | // this.dialogFormVisible2 = false; |
| | | // } |
| | | // //是否急停 |
| | | // if (obj.emergencystop != null) { |
| | | // this.EmergencyStop = obj.emergencystop[0]; |
| | | // } |
| | | |
| | | //复位倒计时 |
| | | console.log(obj.countdown); |
| | | if (obj.countdown != null) { |
| | | if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) { |
| | | this.CountDown(); |
| | | } |
| | | } |
| | | // //复位倒计时 |
| | | // if (obj.countdown != null) { |
| | | // if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) { |
| | | // this.CountDown(); |
| | | // } |
| | | // } |
| | | |
| | | //复位完成信号 |
| | | if (obj.reset != null) { |
| | | this.reset = obj.reset[0]; |
| | | } |
| | | // //复位完成信号 |
| | | // if (obj.reset != null) { |
| | | // this.reset = obj.reset[0]; |
| | | // } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | if (obj.Abort[0].length > 0) { |
| | | this.receivedData = obj.Abort[0][0]; |
| | | this.receivedData2 = obj.Abort[0][1]; |
| | | this.dialogFormVisible3 = true; |
| | | // this.dialogFormVisible3 = true; |
| | | } |
| | | } |
| | | this.$forceUpdate(); |
| | |
| | | } |
| | | } |
| | | }, |
| | | //45秒复位倒数计时 |
| | | //60秒复位倒数计时 |
| | | CountDown() { |
| | | let count = 45; |
| | | let timer = setInterval( |
| | | clearInterval(timer); |
| | | let count = 60; |
| | | timer = setInterval( |
| | | () => { |
| | | if (this.EmergencyStop == true) { |
| | | this.dialogFormCountDown = false; |
| | |
| | | this.PromptSize = 500; |
| | | this.CountDowns = count; |
| | | count--; |
| | | this.dialogFormCountDown = true; |
| | | } |
| | | else { |
| | | this.PromptSize = 200; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | }, |
| | | 1000 |
| | | ); |
| | | |
| | | if (this.reset == false && this.EmergencyStop != true) { |
| | | this.dialogFormCountDown = true; |
| | | } |
| | | }, |
| | | logout: function () { |
| | | removeToken() |
| | |
| | | '用户列表': 'UserList', |
| | | '设备管理': 'DeviceManagement', |
| | | '报警信息': 'Alarm', |
| | | '参数下发': 'Parameter', |
| | | '手动/自动': 'Manual/Automatic', |
| | | '开关控制': 'Action', |
| | | 'IO状态': 'Sign', |
| | | '权限管理': 'PermissionManagement', |