| | |
| | | |
| | | <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 => { |
| | | debugger; |
| | | 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; |
| | | }); |
| | | } |
| | | |
| | |
| | | this.form.street = address.substring(address.indexOf("区")+1,address.length); |
| | | } |
| | | //写入新的省市区 |
| | | that.form.province = val.addressComponent.province; |
| | | if(val.addressComponent.city==""){ |
| | | that.form.city = val.addressComponent.province; |
| | | }else{ |
| | | that.form.city = val.addressComponent.city; |
| | | } |
| | | that.form.district = val.addressComponent.district; |
| | | that.form.province = "11"; |
| | | that.form.city = "1101"; |
| | | that.form.district = "110101"; |
| | | // that.form.province = val.addressComponent.province; |
| | | // if(val.addressComponent.city==""){ |
| | | // that.form.city = val.addressComponent.province; |
| | | // }else{ |
| | | // that.form.city = val.addressComponent.city; |
| | | // } |
| | | // that.form.district = val.addressComponent.district; |
| | | //调用接口获取省市区编号 |
| | | } |
| | | }, |
| | | immediate: true, |
| | |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | debugger; |
| | | if (["edit", "view"].includes(type)) { |
| | | getclient(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | |
| | | } else if (data.records[i].heartbeat == "") { |
| | | data.records[i].dxzt = 0; |
| | | } else { |
| | | data.records[i].dxzt = 1; |
| | | data.records[i].dxzt = data.records[i].dtype; |
| | | } |
| | | } |
| | | |