| | |
| | | |
| | | <template slot-scope="{ row }" slot="dxzt"> |
| | | <el-tag>{{ |
| | | row.dxzt == "0" ? "掉线" : row.dxzt == "1" ? "在线" : "无" |
| | | row.dxzt == "0" ? "掉线" : row.dxzt == "1" ? "正常" :row.dxzt == "2" ? "报警":row.dxzt == "3" ? "故障":"无" |
| | | }} |
| | | </el-tag> |
| | | </template> |
| | |
| | | label: "故障状态", |
| | | prop: "state", |
| | | addDisplay: false, |
| | | editDisplay: false |
| | | editDisplay: false, |
| | | hide:true |
| | | }, |
| | | { |
| | | label: "故障原因", |
| | |
| | | //判断是新增还是修改 |
| | | if(that.isEdit){ |
| | | getclient(this.form.id).then(res => { |
| | | that.province = res.data.data.province; |
| | | that.city = res.data.data.city; |
| | | that.district = res.data.data.district; |
| | | |
| | | // that.province = res.data.data.province; |
| | | // that.city = res.data.data.city; |
| | | // that.district = res.data.data.district; |
| | | }); |
| | | } |
| | | |
| | |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if(Array.isArray(row.deptId)){ |
| | | row.deptId = row.deptId.join(","); |
| | | } |
| | | update(row).then(() => { |
| | | // this.initFlag = false; |
| | | this.onLoad(this.page); |
| | |
| | | } else if (data.records[i].heartbeat == "") { |
| | | data.records[i].dxzt = 0; |
| | | } else { |
| | | data.records[i].dxzt = 1; |
| | | if(data.records[i].dtype==1){ |
| | | data.records[i].dxzt = data.records[i].dtype; |
| | | } |
| | | if(data.records[i].dtype==2){ |
| | | data.records[i].dxzt = 2; |
| | | } |
| | | if(data.records[i].dtype==3){ |
| | | data.records[i].dxzt = 3; |
| | | } |
| | | if(data.records[i].dtype=="" || data.records[i].dtype==0){ |
| | | data.records[i].dxzt = 1; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |