| | |
| | | <div class="status-next" @click="next"> |
| | | <el-icon><ArrowRight /></el-icon> |
| | | </div> |
| | | <div class="status-content-cardp" v-for="item in timestatus" style="width: 33.3333%; height: 50%;"> |
| | | <div class="status-content-cardp" v-for="item in timestatus" :style="{'width': (100/column) + '%'}"> |
| | | <div class="status-card-box" style="border-color: #ccc;"> |
| | | <div class="status-card-top"> |
| | | <div class="status-card-detail"> |
| | |
| | | stationlabel: "", |
| | | stationlabelList: [], |
| | | current: "1", |
| | | size: "9", |
| | | total: 0, |
| | | deviceStatus: [], |
| | | workStationGroupIdList: [] |
| | | workStationGroupIdList: [], |
| | | line: "", |
| | | column: "" |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getdevicestatus(); //获取顶部title |
| | | this.getstationlabelList(); //获取标签视图下的list |
| | | this.setIntervalTime(); //十秒增加时间 |
| | | this.getSetting(); //设置几行几列 |
| | | }, |
| | | methods: { |
| | | getSetting() { |
| | | this.$HTTP.get(`/api/blade-system/param/detail?paramKey=mdc.realtime.setting`).then(res=> { |
| | | if(res.code == 200) { |
| | | var paramValue = JSON.parse(res.data.paramValue); |
| | | this.line = paramValue.line==0?1:paramValue.line; |
| | | this.column = paramValue.column; |
| | | this.current = "1"; |
| | | this.size = this.line * this.column; |
| | | this.getdevicestatus(); //获取顶部title/具体数据 |
| | | } |
| | | }) |
| | | }, |
| | | setIntervalTime() { |
| | | function addTime(timeStr) { |
| | | var increaseByMilliseconds = 10 * 1000; // 10秒转换为毫秒 |
| | |
| | | this.gettimestatus(); |
| | | }, |
| | | next() { |
| | | if((this.total/9 - this.current) < 0) return; |
| | | this.current = Number(this.current) + 1; |
| | | this.gettimestatus(); |
| | | if((this.current * this.line) < this.total/this.column) { |
| | | this.current = Number(this.current) + 1; |
| | | this.gettimestatus(); |
| | | } |
| | | }, |
| | | goSet() { |
| | | this.$router.push('/mdc/configuration'); |
| | |
| | | workStationGroupIdList: this.workStationGroupIdList |
| | | } |
| | | this.timestatus = []; |
| | | this.$HTTP.post(`/api/blade-cps/workstation/real-time-status?current=${this.current}&size=9`,obj).then(res=> { |
| | | this.$HTTP.post(`/api/blade-cps/workstation/real-time-status?current=${this.current}&size=${this.size}`,obj).then(res=> { |
| | | if(res.code == 200) { |
| | | var ids = []; |
| | | res.data.records.forEach(item=> { |
| | |
| | | display: block; |
| | | } |
| | | .status-content-cardp { |
| | | min-width: 266px; |
| | | height: 50%; |
| | | min-height: 170px; |
| | | margin: 0; |
| | | padding: 4px; |