| | |
| | | <div class="app"> |
| | | <!--面包屑导航区域--> |
| | | <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb"> |
| | | <router-link to="/home" tag="el-button" type="text">{{ $t('langHome') }}</router-link> |
| | | <el-button type="text">{{ $t('Electrical') }}</el-button> |
| | | <router-link to="/Electrical/Parameter" tag="el-button" type="text">{{ $t('Parameter') }}</router-link> |
| | | <router-link to="/Electrical/Action" tag="el-button" type="text">{{ $t('Action') }}</router-link> |
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text">{{ $t('Sign') }}</router-link> |
| | | <router-link to="/Electrical/State" tag="el-button" type="text">{{ $t('State') }}</router-link> |
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text">{{ $t('Alarm') }}</router-link> |
| | | |
| | | <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link> |
| | | <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link> |
| | | <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link> |
| | | <!-- <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link> --> |
| | | <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link> |
| | | <router-link to="/Electrical/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') |
| | | }}</router-link> |
| | | </el-breadcrumb> |
| | | <div>{{ $t('Alarm') }}</div> |
| | | <div class="block"> |
| | |
| | | |
| | | |
| | | }, |
| | | created () { |
| | | // created () { |
| | | // this.init(); |
| | | |
| | | |
| | | // if (this.shijian1 == "" || this.shijian2 == "") { |
| | | // //查询当天报警信息 |
| | | // this.load(); |
| | | // } |
| | | // else { |
| | | // //根据时间查询报警信息 |
| | | // this.selectTime(); |
| | | // } |
| | | |
| | | // }, |
| | | activated(){ |
| | | |
| | | this.init(); |
| | | |
| | | |
| | | if (this.shijian1 == "" || this.shijian2 == "") { |
| | | //查询当天报警信息 |
| | | this.load(); |
| | |
| | | this.selectTime(); |
| | | } |
| | | |
| | | }, |
| | | }, |
| | | methods: { |
| | | |
| | | load () { |
| | |
| | | |
| | | }, |
| | | selectTime () { |
| | | |
| | | //moment需要单独安转依赖,npm install moment |
| | | let sj1 = moment(this.shijian1).format('YYYY-MM-DD%20HH:mm'); |
| | | let sj2 = moment(this.shijian2).format('YYYY-MM-DD%20HH:mm') |
| | |
| | | } else { |
| | | //console.log("您的浏览器支持WebSocket"); |
| | | |
| | | let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname; |
| | | let socketUrl = "ws://" + this.$t('ip')+":8888" + "/springboot-vue3/api/talk/" + viewname; |
| | | if (socket != null) { |
| | | socket.close(); |
| | | socket = null; |
| | |
| | | socket.onerror = function () { |
| | | console.log("websocket发生了错误"); |
| | | } |
| | | this.$router.afterEach(function(){ |
| | | socket.close(); |
| | | }) |
| | | } |
| | | |
| | | }, |
| | |
| | | </script> |
| | | |
| | | |
| | | <style> |
| | | <style > |
| | | .kuai_div { |
| | | /* width: 30%; */ |
| | | margin-bottom: 30px; |