Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue
| | |
| | | //执行重连 |
| | | that.websocketStart(); |
| | | } |
| | | }, 10000); |
| | | }, 4000); |
| | | } else { |
| | | console.log("WebSocket连接没有建立成功!!"); |
| | | //执行重连 |
| | | that.websocketStart(); |
| | | } |
| | | }, 3000); |
| | | }, 1000); |
| | | }, |
| | | |
| | | onDialogTableVisible() { |
| | |
| | | |
| | | <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> |
| | |
| | | initFlag: true, |
| | | loading: true, |
| | | menuVisible:false, |
| | | isEdit:false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | label: "故障状态", |
| | | prop: "state", |
| | | addDisplay: false, |
| | | editDisplay: false |
| | | editDisplay: false, |
| | | hide:true |
| | | }, |
| | | { |
| | | label: "故障原因", |
| | |
| | | if (val) { |
| | | var that = this; |
| | | //重新加载一次页面详情数据,解决新的省市区无法写入问题 |
| | | //判断是新增还是修改 |
| | | if(that.isEdit){ |
| | | getclient(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | // that.province = res.data.data.province; |
| | | // that.city = res.data.data.city; |
| | | // that.district = res.data.data.district; |
| | | }); |
| | | } |
| | | |
| | | //经纬度替换 |
| | | this.form.wd = val.latitude; |
| | | this.form.jd = val.longitude; |
| | |
| | | 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, |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | row.deptId = row.deptId.join(","); |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | // row.jd=row.map.latitude; |
| | | // row.wd=row.map.longitude; |
| | | update(row).then(() => { |
| | | // this.initFlag = false; |
| | | this.onLoad(this.page); |
| | |
| | | if (["edit", "view"].includes(type)) { |
| | | getclient(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | this.isEdit=true; |
| | | }); |
| | | } |
| | | if (["add"].includes(type)) { |
| | | this.isEdit=false; |
| | | } |
| | | // this.initFlag = true; |
| | | done(); |
| | |
| | | } 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; |
| | | } |
| | | } |
| | | |
| | |
| | | bz: this.form.bz, |
| | | snumber: this.form.alarmId, |
| | | sname: this.form.alarmPeople, |
| | | deviceNumber:this.form.deviceNumber, |
| | | zc: zc, |
| | | zctime: this.getDate().current, |
| | | }; |
| | |
| | | datas: [], //cc |
| | | loadings: true, //等待 |
| | | querys: {}, //搜索 |
| | | isEdit:false, |
| | | pages: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if (val) { |
| | | if(that.isEdit){ |
| | | getDetail(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | this.form.wd = val.latitude; |
| | | this.form.jd = val.longitude; |
| | | }); |
| | | } |
| | | //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始 |
| | | var address = val.formattedAddress.toString(); |
| | | if (address.search("县") != -1) { |
| | |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit"].includes(type)) { |
| | | that.isEdit=true; |
| | | getDetail(this.form.id).then((res) => { |
| | | if (this.form.type == "1") { |
| | | const data = res.data.data; |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | if (["edit"].includes(type)) { |
| | | that.isEdit=false; |
| | | } |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | |
| | | { |
| | | label: "所属部门", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | multiple: true, |
| | | type: "cascader", |
| | | //multiple: true, |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |