(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-56c7"],{"5jPM":function(e,t,l){"use strict";var i=l("aYTu");l.n(i).a},"6B8d":function(e,t,l){"use strict";var i=l("zJNJ");l.n(i).a},MDBO:function(e,t,l){"use strict";var i=l("UQ4X");l.n(i).a},UQ4X:function(e,t,l){},a3yq:function(e,t,l){},aYTu:function(e,t,l){},dJGu:function(e,t,l){"use strict";var i=l("a3yq");l.n(i).a},eIqJ:function(e,t,l){"use strict";var i=l("KTTK"),a={name:"DownloadTemplate",props:{filename:{type:String,default:""}},methods:{downloadTemplate:function(){var e=this;if(""!==this.filename){var t=this.filename,l=this.$loading({lock:!0,text:"数据处理中,请稍后...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(i.b)(t).then(function(e){l.close(),console.log("download===",e);var i=new Blob([e.data]),a=document.createElement("a"),o=window.URL.createObjectURL(i);a.href=o,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}).catch(function(t){l.close(),e.$message.error(t.message)})}}}},o=(l("6B8d"),l("KHd+")),s=Object(o.a)(a,function(){var e=this.$createElement;return(this._self._c||e)("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:this.downloadTemplate}},[this._v("批量导入模板下载")])},[],!1,null,"5776ee8f",null);s.options.__file="index.vue";t.a=s.exports},uxJp:function(e,t,l){"use strict";l.r(t);var i=l("FyfS"),a=l.n(i),o=l("6rNY"),s=l("8jdo"),n=l("yH/+"),r=l("/gXl"),c=l("WZwz"),d=l("hgDB"),p=l("KTTK"),u=l("pMp9"),m={name:"EditWell",components:{SelectTree:n.a,DeptSelect:u.a},data:function(){return{dialogFormVisible:!1,wellForm:{id:null,wellCode:"",wellName:"",wellType:"",deptid:"",deep:"",position:"",coordinateX:"",coordinateY:"",photos:"",notes:"",qu:"",area:"",responsibleDept:"",responsibleDeptName:""},deptProps:{parent:"pid",value:"id",label:"name",children:"children"},hideUpload:!1,imageList:[],secondDeptTreeList:[],wellTypeList:[],quList:[],jiedaoList:[],textMap:{update:"编辑",create:"新增"},rules:{wellCode:[{required:!0,message:"井编号不能为空",trigger:["blur","change"]}],wellName:[{required:!0,message:"井名称不能为空",trigger:["blur","change"]}],position:[{required:!0,message:"井详细地址不能为空",trigger:["blur","change"]}],deep:[{required:!1,trigger:["blur","change"],validator:function(e,t,l){if(""!==t)if(!1===/^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/.test(t))l(new Error("请填写大于0的数字"));else{var i=parseFloat(t);i>10||i<0?l(new Error("请填写0到10数值")):l()}else l()}}],coordinateX:[{required:!0,trigger:["blur","change"],validator:function(e,t,l){""!==t?!1===/^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/.test(t)?l(new Error("请填写大于0的数字")):l():l(new Error("纬度不能为空"))}}],coordinateY:[{required:!0,trigger:["blur","change"],validator:function(e,t,l){""!==t?!1===/^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/.test(t)?l(new Error("请填写大于0的数字")):l():l(new Error("经度不能为空"))}}],deptid:[{required:!0,message:"权属单位必选",trigger:"change"}],wellType:[{required:!0,message:"井类型必选",trigger:"change"}],qu:[{required:!0,message:"所在区/县必选",trigger:"change"}],area:[{required:!0,message:"所在街道/镇必选",trigger:"change"}]},deptShowTop:!1,dialogImageUrl:"",dialogVisible:!1,labelPosition:"right",responseAssignShow:!1,isEditMode:!0,deptShow:!0}},computed:{showResponseDept:function(){return""===this.wellForm.deptid},qu:function(){return this.wellForm.qu}},watch:{"wellForm.deptid":function(e,t){""!==t&&""!==e?(this.wellForm.responsibleDept="",this.wellForm.responsibleDeptName="",this.wellForm.area="",this.wellForm.qu="",this.fetchSecondDeptTree(),this.fetchArea1()):""!==e&&(this.fetchSecondDeptTree(),this.fetchArea1())},qu:function(e){""!==e&&this.fetchArea2()}},mounted:function(){this.fetchWellType(),this.imageList=[]},methods:{initDialog:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.imageList=[],0===t.photos.length&&this.$refs.upload&&this.$refs.upload.clearFiles(),this.dialogFormVisible=e,this.fetchWellType(),this.wellForm={id:t.id,wellCode:t.wellCode,wellName:t.wellName,wellType:t.wellType,deptid:t.deptid,deep:t.deep,position:t.position,coordinateX:t.coordinateX,coordinateY:t.coordinateY,photos:t.photos,notes:t.notes,qu:t.qu,area:t.area,responsibleDept:t.responsibleDept,responsibleDeptName:t.responsibleDeptName},t.deptid&&""!==t.deptid&&(this.fetchArea1(t.deptid),this.fetchArea2(),this.fetchSecondDeptTree(),this.loading=!1);var l=t.photos.split(";"),i=!0,o=!1,s=void 0;try{for(var n,r=a()(l);!(i=(n=r.next()).done);i=!0){var c=n.value;c&&this.imageList.push({name:c,url:"http://111.198.10.15:11643/smartwell/static/"+c})}}catch(e){o=!0,s=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw s}}this.handleChange(null,this.imageList)},fetchSecondDeptTree:function(){var e=this,t={pid:this.wellForm.deptid,deptType:"04"};Object(r.e)(t).then(function(t){console.log(t.data),t.data.list&&(e.secondDeptTreeList=Object(s.c)(t.data.list,e.wellForm.deptid))})},fetchWellType:function(){var e=this;Object(d.j)().then(function(t){e.wellTypeList=[];var l=e.$store.getters.wellTypes,i=!0,o=!1,s=void 0;try{for(var n,r=a()(t.data);!(i=(n=r.next()).done);i=!0){var c=n.value;-1!==l.indexOf(c.value)&&e.wellTypeList.push(c)}}catch(e){o=!0,s=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw s}}e.wellTypeList.length<=1&&(e.showWellType=!1)})},fetchArea1:function(e){var t=this;Object(c.c)(this.wellForm.deptid).then(function(e){if(200===e.code){var l=e.data.area;Object(c.d)(l).then(function(e){t.quList=e.data})}})},deptChanged:function(){console.log("deptChanged"),this.wellForm.responsibleDept="",this.wellForm.area="",this.wellForm.qu=""},quChanged:function(){this.wellForm.area=""},fetchArea2:function(){var e=this;Object(c.d)(this.wellForm.qu).then(function(t){e.jiedaoList=t.data})},cancel:function(){var e=this;this.dialogFormVisible=!1,this.imageList=[],this.wellForm.deptid="",this.$emit("watchChild"),this.$nextTick(function(){e.$refs.dataForm.clearValidate()})},saveData:function(){var e=this;if(this.wellForm.photos="",""===this.wellForm.responsibleDept){if(this.secondDeptTreeList.length>0)return void this.$message.warning("必须选择维护机构");this.wellForm.responsibleDept=this.wellForm.deptid}var t=!0,l=!1,i=void 0;try{for(var o,s=a()(this.imageList);!(t=(o=s.next()).done);t=!0){var n=o.value,r=n.url.indexOf("/static/");-1!==r&&(r+=8),this.wellForm.photos+=n.url.substring(r)+";"}}catch(e){l=!0,i=e}finally{try{!t&&s.return&&s.return()}finally{if(l)throw i}}this.$refs.dataForm.validate(function(t){t&&Object(d.k)(e.wellForm).then(function(t){console.log("修改井"),200===t.code&&(e.$message.success("修改成功!"),e.$emit("watchChild"),e.dialogFormVisible=!1,e.imageList=[]),e.$nextTick(function(){e.$refs.dataForm.clearValidate()})})})},uploadFile:function(e){var t=this;console.log("uploadFile:"+e.file.name);Object(p.a)(e).then(function(l){200===l.code&&t.imageList.push({name:e.file.name,url:"http://111.198.10.15:11643/smartwell/static/"+l.data})})},handleBeforeUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type,l=!0,i=e.size/1024/1024<5;for(var a in t||(this.$message.error("上传图片只能是 JPG 或 PNG 格式!"),l=!1),i||(this.$message.error("上传图片大小不能超过 5MB!"),l=!1),this.fileList)this.fileList[a].name===e.name&&(this.$message.error("该图片已上传过,请选择其他图片"),l=!1);return l},handleRemove:function(e,t){for(var l in console.log("handleRemove"),this.imageList)if(this.imageList[l].name===e.name)return this.imageList.splice(l,1),void(this.hideUpload=this.imageList.length>=4)},handleExceed:function(e,t){this.$message.warning("限制选择 4 张图片,本次选择了 "+e.length+" 张图片,共选择了 "+(e.length+t.length)+" 张图片")},handlePictureCardPreview:function(e){console.log("handlePictureCardPreview"),this.dialogImageUrl=e.url,this.dialogVisible=!0},handleChange:function(e,t){console.log("handleChange"),this.hideUpload=!!t&&t.length>=4}}},h=(l("dJGu"),l("KHd+")),f=Object(h.a)(m,function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-dialog",{staticClass:"editDialog",attrs:{visible:e.dialogFormVisible,title:"编辑井","append-to-body":""},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.cancel}},[l("el-scrollbar",{attrs:{native:!1}},[l("el-form",{ref:"dataForm",attrs:{"label-position":e.labelPosition,rules:e.rules,model:e.wellForm,"label-width":"120px"}},[l("el-row",[l("el-col",{attrs:{span:10}},[l("el-form-item",{attrs:{label:"井名称",prop:"wellName"}},[l("el-input",{attrs:{type:"text",placeholder:"必填"},model:{value:e.wellForm.wellName,callback:function(t){e.$set(e.wellForm,"wellName","string"==typeof t?t.trim():t)},expression:"wellForm.wellName"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:10,offset:1}},[l("el-form-item",{attrs:{label:"井编号",prop:"wellCode"}},[l("el-input",{attrs:{disabled:e.isEditMode,type:"text",placeholder:"必填"},model:{value:e.wellForm.wellCode,callback:function(t){e.$set(e.wellForm,"wellCode","string"==typeof t?t.trim():t)},expression:"wellForm.wellCode"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:10}},[l("el-form-item",{attrs:{label:"井类型",prop:"wellType"}},[l("el-select",{attrs:{placeholder:"点击选择井类型",clearable:""},model:{value:e.wellForm.wellType,callback:function(t){e.$set(e.wellForm,"wellType",t)},expression:"wellForm.wellType"}},e._l(e.wellTypeList,function(e){return l("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})}))],1)],1),e._v(" "),l("el-col",{attrs:{span:10,offset:1}},[l("el-form-item",{attrs:{label:"权属单位",prop:"deptid"}},[l("dept-select",{attrs:{"need-top":e.deptShowTop,"dept-show":e.deptShow,"dept-type":"03",placeholder:"选择权属单位"},on:{change:e.deptChanged},model:{value:e.wellForm.deptid,callback:function(t){e.$set(e.wellForm,"deptid",t)},expression:"wellForm.deptid"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:10}},[l("el-form-item",{attrs:{label:"井深(m)",prop:"deep"}},[l("el-input",{attrs:{type:"text",placeholder:"需要装液位监测仪的井必填"},model:{value:e.wellForm.deep,callback:function(t){e.$set(e.wellForm,"deep","string"==typeof t?t.trim():t)},expression:"wellForm.deep"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:10}},[l("el-form-item",{attrs:{label:"经度",prop:"coordinateX"}},[l("el-input",{attrs:{type:"text",placeholder:"必填"},model:{value:e.wellForm.coordinateX,callback:function(t){e.$set(e.wellForm,"coordinateX","string"==typeof t?t.trim():t)},expression:"wellForm.coordinateX"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:10,offset:1}},[l("el-form-item",{attrs:{label:"纬度",prop:"coordinateY"}},[l("el-input",{attrs:{type:"text",placeholder:"必填"},model:{value:e.wellForm.coordinateY,callback:function(t){e.$set(e.wellForm,"coordinateY","string"==typeof t?t.trim():t)},expression:"wellForm.coordinateY"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:24}},[l("el-form-item",{attrs:{label:"路标图片",prop:"images"}},[l("el-upload",{ref:"upload",class:{hide:e.hideUpload},attrs:{"before-upload":e.handleBeforeUpload,"on-preview":e.handlePictureCardPreview,"on-remove":e.handleRemove,"on-exceed":e.handleExceed,"on-change":e.handleChange,"http-request":e.uploadFile,"file-list":e.imageList,limit:4,multiple:"",action:"string",accept:".jpg,.jpeg,.png ","list-type":"picture-card"}},[l("i",{staticClass:"el-icon-plus"})]),e._v(" "),l("el-dialog",{attrs:{visible:e.dialogVisible,title:"图片预览","append-to-body":""},on:{"update:visible":function(t){e.dialogVisible=t}}},[l("div",{staticClass:"imgBox"},[l("img",{staticStyle:{margin:"0 auto"},attrs:{src:e.dialogImageUrl,"max-height":"400px;",alt:""}})])])],1)],1)],1),e._v(" "),l("el-row",{attrs:{gutter:1}},[l("el-form-item",{attrs:{label:"所在区域",required:""}},[l("el-col",{attrs:{span:5}},[l("el-form-item",{attrs:{prop:"qu"}},[l("el-select",{attrs:{disabled:e.showResponseDept,placeholder:"请选择所在区/县",clearable:""},on:{change:e.quChanged},model:{value:e.wellForm.qu,callback:function(t){e.$set(e.wellForm,"qu",t)},expression:"wellForm.qu"}},e._l(e.quList,function(e){return l("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1),e._v(" "),l("el-col",{staticClass:"line",attrs:{span:1}},[e._v("区/县")]),e._v(" "),l("el-col",{attrs:{span:5}},[l("el-form-item",{attrs:{prop:"area"}},[l("el-select",{attrs:{disabled:e.showResponseDept,placeholder:"请选择所在街道/镇",clearable:""},model:{value:e.wellForm.area,callback:function(t){e.$set(e.wellForm,"area",t)},expression:"wellForm.area"}},e._l(e.jiedaoList,function(e){return l("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1),e._v(" "),l("el-col",{staticClass:"line",attrs:{span:1}},[e._v("街道/镇")])],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:15}},[l("el-form-item",{attrs:{label:"详细地址",prop:"position"}},[l("el-input",{attrs:{type:"text",placeholder:"必填"},model:{value:e.wellForm.position,callback:function(t){e.$set(e.wellForm,"position","string"==typeof t?t.trim():t)},expression:"wellForm.position"}})],1)],1)],1),e._v(" "),l("el-row",{directives:[{name:"show",rawName:"v-show",value:e.secondDeptTreeList.length>=1,expression:"secondDeptTreeList.length>=1"}],attrs:{gutter:20}},[l("el-col",{attrs:{span:13}},[l("el-form-item",{attrs:{label:"井维护机构",prop:"responsibleDept"}},[e.secondDeptTreeList.length>=1?l("el-select",{attrs:{disabled:e.showResponseDept,placeholder:"选择维护组织,不选默认为权属单位",clearable:""},model:{value:e.wellForm.responsibleDept,callback:function(t){e.$set(e.wellForm,"responsibleDept",t)},expression:"wellForm.responsibleDept"}},e._l(e.secondDeptTreeList,function(e){return l("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})):l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.responsibleDeptName,callback:function(t){e.$set(e.wellForm,"responsibleDeptName",t)},expression:"wellForm.responsibleDeptName"}})],1)],1)],1),e._v(" "),l("el-row",{attrs:{gutter:20}},[l("el-col",{staticStyle:{"margin-left":"120px","margin-bottom":"40px"},attrs:{span:15}},[l("el-button",{attrs:{size:"medium"},on:{click:e.cancel}},[e._v(" 取消")]),e._v(" "),l("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"medium"},on:{click:e.saveData}},[e._v(" 保存")])],1)],1)],1)],1)],1)},[],!1,null,null,null);f.options.__file="editWell.vue";var w=f.exports,g={name:"DetailWell",components:{SelectTree:n.a,DeptSelect:u.a},data:function(){return{dialogFormVisible:!1,wellForm:{id:null,wellCode:"",wellName:"",wellType:"",wellTypeName:"",deptid:"",deptName:"",bfztName:"",deep:"",position:"",coordinateX:"",coordinateY:"",photos:"",notes:"",qu:"",area:"",responsibleDept:"",responsibleDeptName:""},deptProps:{parent:"pid",value:"id",label:"name",children:"children"},columns:[{text:"监控内容",value:"watchType"},{text:"设备编号",value:"devcode"},{text:"设备安装日期",value:"installDate",width:110},{text:"最新数据",value:"data",width:80},{text:"设备状态",value:"onlineStateName",width:80},{text:"最后上传时间",value:"logtime",width:170}],hideUpload:!1,imageList:[],fileList:[],deptTreeList:null,secondDeptTreeList:null,wellTypeList:null,quList:null,jiedaoList:null,dialogImageUrl:"",dialogVisible:!1,labelPosition:"right",listLoading:!1,dataList:[],loading:!0}},methods:{initDialog:function(e){var t=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.imageList=[],this.loading=!0,this.dialogFormVisible=e,this.wellForm={id:l.id,wellCode:l.wellCode,wellName:l.wellName,wellType:l.wellType,wellTypeName:l.wellTypeName,bfztName:l.bfztName,deptid:l.deptid,deptName:l.deptName,deep:l.deep,position:l.position,coordinateX:l.coordinateX,coordinateY:l.coordinateY,photos:l.photos,notes:l.notes,qu:l.qu,area:l.area,responsibleDept:l.responsibleDept,responsibleDeptName:l.responsibleDeptName},l.deptid&&""!==l.deptid?(this.fetchArea1(),this.fetchArea2(),this.loading=!1):this.loading=!1;var i=l.photos.split(";"),o=!0,s=!1,n=void 0;try{for(var r,c=a()(i);!(o=(r=c.next()).done);o=!0){var p=r.value;p&&this.imageList.push({name:p,url:"http://111.198.10.15:11643/smartwell/static/"+p})}}catch(e){s=!0,n=e}finally{try{!o&&c.return&&c.return()}finally{if(s)throw n}}this.listLoading=!0,Object(d.l)(l.id).then(function(e){t.listLoading=!1,t.dataList=e.data})},fetchArea1:function(){var e=this;Object(c.c)(this.wellForm.deptid).then(function(t){if(200===t.code){var l=t.data.area;Object(c.d)(l).then(function(t){e.quList=t.data})}})},fetchArea2:function(){var e=this;Object(c.d)(this.wellForm.qu).then(function(t){e.jiedaoList=t.data,e.loading=!1})},showData:function(e){var t={devcode:e.devcode,deviceType:e.type},l=this.$router.resolve({name:"DataManage",query:t,params:t});window.open(l.href,"_blank")},cancel:function(){this.imageList=[],this.dialogFormVisible=!1},handlePictureCardPreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0}}},v=(l("MDBO"),Object(h.a)(g,function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-dialog",{staticClass:"editDialog",attrs:{visible:e.dialogFormVisible,title:"井详情","append-to-body":""},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.cancel}},[l("el-scrollbar",{attrs:{native:!1}},[l("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"dataForm",attrs:{"label-position":e.labelPosition,model:e.wellForm,"label-width":"120px"}},[l("el-row",[l("el-col",{attrs:{span:10}},[l("el-form-item",{attrs:{label:"井名称",prop:"wellName"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.wellName,callback:function(t){e.$set(e.wellForm,"wellName",t)},expression:"wellForm.wellName"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:10,offset:1}},[l("el-form-item",{attrs:{label:"井编号",prop:"wellCode"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.wellCode,callback:function(t){e.$set(e.wellForm,"wellCode",t)},expression:"wellForm.wellCode"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:10}},[l("el-form-item",{attrs:{label:"井类型",prop:"wellType"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.wellTypeName,callback:function(t){e.$set(e.wellForm,"wellTypeName",t)},expression:"wellForm.wellTypeName"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:10,offset:1}},[l("el-form-item",{attrs:{label:"权属单位",prop:"deptid"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.deptName,callback:function(t){e.$set(e.wellForm,"deptName",t)},expression:"wellForm.deptName"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:10}},[l("el-form-item",{attrs:{label:"井深(m)",prop:"deep"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.deep,callback:function(t){e.$set(e.wellForm,"deep",t)},expression:"wellForm.deep"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:10,offset:1}},[l("el-form-item",{attrs:{label:"布防状态",prop:"coordinateX"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.bfztName,callback:function(t){e.$set(e.wellForm,"bfztName",t)},expression:"wellForm.bfztName"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:10}},[l("el-form-item",{attrs:{label:"经度",prop:"coordinateX"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.coordinateX,callback:function(t){e.$set(e.wellForm,"coordinateX",t)},expression:"wellForm.coordinateX"}})],1)],1),e._v(" "),l("el-col",{attrs:{span:10,offset:1}},[l("el-form-item",{attrs:{label:"纬度",prop:"coordinateY"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.coordinateY,callback:function(t){e.$set(e.wellForm,"coordinateY",t)},expression:"wellForm.coordinateY"}})],1)],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:24}},[l("el-form-item",{attrs:{label:"路标图片",prop:"images"}},[0==e.imageList.length?l("div",[e._v("\n 无\n ")]):l("el-upload",{ref:"upload",staticClass:"hide",attrs:{"file-list":e.imageList,"on-preview":e.handlePictureCardPreview,multiple:"",accept:".jpg,.jpeg,.png ",action:"string","list-type":"picture-card",disabled:""}},[l("i",{staticClass:"el-icon-plus"})]),e._v(" "),l("el-dialog",{attrs:{visible:e.dialogVisible,title:"图片预览","append-to-body":""},on:{"update:visible":function(t){e.dialogVisible=t}}},[l("div",{staticClass:"imgBox"},[l("img",{staticStyle:{width:"100%",margin:"0 auto"},attrs:{src:e.dialogImageUrl,alt:""}})])])],1)],1)],1),e._v(" "),l("el-row",{attrs:{gutter:1}},[l("el-form-item",{attrs:{label:"所在区域",required:""}},[l("el-col",{attrs:{span:5}},[l("el-form-item",{attrs:{prop:"qu"}},[l("el-select",{attrs:{placeholder:"未知",disabled:""},model:{value:e.wellForm.qu,callback:function(t){e.$set(e.wellForm,"qu",t)},expression:"wellForm.qu"}},e._l(e.quList,function(e){return l("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1),e._v(" "),l("el-col",{staticClass:"line",attrs:{span:1}},[e._v("区/县")]),e._v(" "),l("el-col",{attrs:{span:5}},[l("el-form-item",{attrs:{prop:"area"}},[l("el-select",{attrs:{placeholder:"未知",disabled:""},model:{value:e.wellForm.area,callback:function(t){e.$set(e.wellForm,"area",t)},expression:"wellForm.area"}},e._l(e.jiedaoList,function(e){return l("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1),e._v(" "),l("el-col",{staticClass:"line",attrs:{span:1}},[e._v("街道/镇")])],1)],1),e._v(" "),l("el-row",[l("el-col",{attrs:{span:15}},[l("el-form-item",{attrs:{label:"详细地址",prop:"position"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.position,callback:function(t){e.$set(e.wellForm,"position",t)},expression:"wellForm.position"}})],1)],1)],1),e._v(" "),l("el-row",{attrs:{gutter:20}},[l("el-col",{attrs:{span:10}},[l("el-form-item",{attrs:{label:"井维护单位",prop:"responsibleDept"}},[l("el-input",{attrs:{type:"text",placeholder:"未知",disabled:""},model:{value:e.wellForm.responsibleDeptName,callback:function(t){e.$set(e.wellForm,"responsibleDeptName",t)},expression:"wellForm.responsibleDeptName"}})],1)],1)],1)],1),e._v(" "),l("div",{staticClass:"watch-div"},[l("el-row",{staticClass:"table-title"},[l("el-col",{attrs:{span:3}},[l("div",{staticClass:"title-header"},[l("i",{staticClass:"el-icon-menu"}),e._v("监控数据")])])],1),e._v(" "),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticClass:"table",attrs:{data:e.dataList,border:""}},[l("el-table-column",{attrs:{align:"center",type:"index"}}),e._v(" "),e._l(e.columns,function(t){return l("el-table-column",{key:t.value,attrs:{label:t.text,width:t.width,align:"center","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(l){return[e._v("\n "+e._s(l.row[t.value])+"\n ")]}}])})}),e._v(" "),l("el-table-column",{attrs:{label:"操作",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{attrs:{type:"text"},on:{click:function(l){e.showData(t.row)}}},[e._v("查看历史数据")])]}}])})],2)],1)],1)],1)},[],!1,null,null,null));v.options.__file="detailWell.vue";var b=v.exports,y={name:"ListWell",components:{DownloadTemplate:l("eIqJ").a,SelectTree:n.a,addWell:o.default,editWell:w,detailWell:b,DeptSelect:u.a},data:function(){return{listQuery:{keywords:"",wellType:"",deptid:"",offset:1,limit:20,sort:"wellCode",order:"asc"},columns:[{text:"井编号",value:"wellCode",width:130,align:"center"},{text:"井名称",value:"wellName",align:"center"},{text:"井深(m)",value:"deep",width:80,align:"center"},{text:"详细地址",value:"position",align:"center"},{text:"井类型",value:"wellTypeName",width:70,align:"center"},{text:"权属单位",value:"deptName",align:"center"},{text:"设备数量",value:"deviceCount",width:100,align:"center",type:"Button"},{text:"布防状态",value:"bfztName",width:80,align:"center"}],multipleSelection:[],list:[],total:0,showWellType:!0,wellTypeList:null,deptProps:{parent:"pid",value:"id",label:"name",children:"children"},deptTreeList:null,deptShowTop:!1,listLoading:!0,fullscreenLoading:!1,editShow:!1,detailShow:!1,filename:"sluicewell_template.xlsx",fileList:[],btnNames:{"布防":"撤防","撤防":"布防"},btnStatus:{"撤防":"success","布防":"danger"}}},created:function(){this.fetchWellType(),this.fetchData()},activated:function(){console.log("activated"),this.fetchData()},methods:{detail:function(e){this.detailShow=!0,this.$refs.detailwell.initDialog(!0,e)},checkSelection:function(){return 0!==this.multipleSelection.length},add:function(){this.$router.push({path:"addWell",query:{type:"add"}})},edit:function(e){this.dialogFormVisible=!0,this.editShow=!0,this.$refs.editwell.initDialog(this.dialogFormVisible,e)},del:function(){var e=this;if(this.checkSelection()){var t=[];this.multipleSelection.forEach(function(e,l){t.push(e.id)}),this.$confirm("确定要删除所选井吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.f)(t).then(function(t){200===t.code&&(e.$message.success("删除成功"),e.fetchData())})})}else this.$message.error("至少选中一项")},uploadFile:function(e){var t=this;console.log("uploadFile");var l=e.file;if(!(l.size/1024/1024<5))return this.$message.error("请上传5M以下的excel文件"),!1;var i=this.$loading({lock:!0,text:"导入中,请稍后...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(d.d)(l).then(function(e){i.close(),200===e.code?(t.$message.success("导入成功"),t.fileList=[],t.fetchData()):t.$message.error(e.message)}).catch(function(){i.close()}),this.fileList=[]},batchExport:function(){var e=this.$loading({lock:!0,text:"下载中,请稍后...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"}),t=this,l={onDownloadProgress:function(e){console.log(e);var l=parseInt(e.loaded/e.total*100);console.log("percent:"+l,"total:"+e.total),t.$nextTick(function(){t.percent=l})}};Object(d.c)(this.listQuery,l).then(function(t){e.close(),console.log("download===",t);var l=new Blob([t.data]),i=document.createElement("a"),a=window.URL.createObjectURL(l);i.href=a,i.download="井列表.xlsx",document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(a)}).catch(function(t){e.close()})},bfcf:function(e){var t=this;"1"===e.bfzt?this.$confirm("确定要对该井进行撤防吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.e)(e.id,"0").then(function(e){200===e.code&&(t.$message.success("撤防成功"),t.fetchData())})}):this.$confirm("确定要对该井进行布防吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.e)(e.id,"1").then(function(e){200===e.code&&(t.$message.success("布防成功"),t.fetchData())})})},batchBf:function(){var e=this,t={keywords:this.listQuery.keywords,owner:this.listQuery.owner,position:this.listQuery.position,wellType:this.listQuery.wellType,deptid:this.listQuery.deptid,notes:this.listQuery.notes,bfzt:"1"};this.$confirm("确定要对列表中的全部井进行布防吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.b)(t).then(function(t){200===t.code&&(e.$message.success("布防成功"),e.fetchData())})})},batchCf:function(){var e=this,t={keywords:this.listQuery.keywords,owner:this.listQuery.owner,position:this.listQuery.position,wellType:this.listQuery.wellType,deptid:this.listQuery.deptid,notes:this.listQuery.notes,bfzt:"0"};this.$confirm("确定要对列表中的全部井进行撤防吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.b)(t).then(function(t){200===t.code&&(e.$message.success("撤防成功"),e.fetchData())})})},search:function(){this.fetchData(!1)},fetchData:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.listLoading=!0,t||(this.listQuery.offset=1),Object(d.h)(this.listQuery).then(function(t){console.log(t.data),e.list=t.data.rows,e.total=parseInt(t.data.total),e.listLoading=!1})},fetchWellType:function(){var e=this;Object(d.j)().then(function(t){e.wellTypeList=[];var l=e.$store.getters.wellTypes,i=!0,o=!1,s=void 0;try{for(var n,r=a()(t.data);!(i=(n=r.next()).done);i=!0){var c=n.value;-1!==l.indexOf(c.value)&&e.wellTypeList.push(c)}}catch(e){o=!0,s=e}finally{try{!i&&r.return&&r.return()}finally{if(o)throw s}}e.wellTypeList.length<=1&&(e.showWellType=!1)})},goDeviceList:function(e){this.$router.push({name:"DeviceList",query:{wellCode:e.wellCode}})},goAlarmRecords:function(e){this.$router.push({name:"AlarmRecords",query:{wellCode:e.wellCode}})},handleSuccess:function(){console.log("handleSuccess")},indexMethod:function(e){return this.listQuery.limit*(this.listQuery.offset-1)+e+1},handleSizeChange:function(e){this.listQuery.limit=e,this.fetchData()},handleCurrentChange:function(e){this.listQuery.offset=e,this.fetchData()},handleSelectionChange:function(e){this.multipleSelection=e}}},_=(l("5jPM"),Object(h.a)(y,function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"app-container"},[l("div",{staticClass:"search-div"},[l("el-form",{ref:"selectForm",staticClass:"form-container",attrs:{inline:!0,model:e.listQuery}},[l("el-row",[l("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"keywords"}},[l("el-input",{attrs:{placeholder:"井编号",clearable:""},model:{value:e.listQuery.keywords,callback:function(t){e.$set(e.listQuery,"keywords","string"==typeof t?t.trim():t)},expression:"listQuery.keywords"}})],1),e._v(" "),e.showWellType?l("el-form-item",{staticClass:"selectForm-container-item",attrs:{prop:"wellType"}},[l("el-select",{attrs:{placeholder:"选择井类型",clearable:""},model:{value:e.listQuery.wellType,callback:function(t){e.$set(e.listQuery,"wellType",t)},expression:"listQuery.wellType"}},e._l(e.wellTypeList,function(e){return l("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})}))],1):e._e(),e._v(" "),l("el-form-item",{staticClass:"selectForm-container-item"},[l("dept-select",{attrs:{"need-top":e.deptShowTop,"dept-type":"03",placeholder:"选择权属单位"},model:{value:e.listQuery.deptid,callback:function(t){e.$set(e.listQuery,"deptid",t)},expression:"listQuery.deptid"}})],1),e._v(" "),l("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.search}},[e._v("搜索")])],1)],1)],1),e._v(" "),l("div",[l("el-row",{staticClass:"table-title"},[l("el-col",{attrs:{span:6}},[l("div",{staticClass:"title-header"},[l("i",{staticClass:"el-icon-menu"}),e._v("数据列表")])]),e._v(" "),l("el-col",{staticClass:"edit_btns",attrs:{span:18}},[e.hasPerm("/well/batchExport")?l("el-button",{staticClass:"edit_btn",attrs:{disabled:0===e.total,size:"small"},on:{click:e.batchExport}},[e._v("导出记录")]):e._e(),e._v(" "),e.hasPerm("/well/batchImport")?l("download-template",{attrs:{filename:e.filename}}):e._e(),e._v(" "),e.hasPerm("/well/batchImport")?l("el-upload",{staticClass:"edit_btn",attrs:{limit:1,"show-file-list":!1,"http-request":e.uploadFile,"file-list":e.fileList,action:"string",accept:".xls,.xlsx"}},[l("el-button",{attrs:{slot:"trigger",size:"small"},slot:"trigger"},[e._v("批量导入")])],1):e._e(),e._v(" "),e.hasPerm("/well/batchBfcf")?l("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:e.batchBf}},[e._v("一键布防")]):e._e(),e._v(" "),e.hasPerm("/well/batchBfcf")?l("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:e.batchCf}},[e._v("一键撤防")]):e._e(),e._v(" "),e.hasPerm("/well/delete")?l("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:e.del}},[e._v("删除")]):e._e(),e._v(" "),e.hasPerm("/well/add")?l("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:e.add}},[e._v("新增")]):e._e()],1)],1),e._v(" "),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticClass:"table",attrs:{data:e.list,border:""},on:{"selection-change":e.handleSelectionChange}},[l("el-table-column",{attrs:{align:"center",type:"selection",width:"55"}}),e._v(" "),l("el-table-column",{attrs:{index:e.indexMethod,align:"center",type:"index"}}),e._v(" "),e._l(e.columns,function(t){return l("el-table-column",{key:t.value,attrs:{label:t.text,width:t.width,align:t.align,"show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(i){return["Button"==t.type&&i.row.deviceCount>0?l("el-button",{attrs:{type:"text"},on:{click:function(t){e.goDeviceList(i.row)}}},[e._v(e._s(i.row[t.value]))]):l("span",{class:t.class},[e._v(e._s(i.row[t.value]))])]}}])})}),e._v(" "),e.hasPerm("/well/bfcf")?l("el-table-column",{attrs:{label:"布撤防",align:"center",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{attrs:{type:e.btnStatus[t.row.bfztName],size:"mini"},on:{click:function(l){e.bfcf(t.row)}}},[e._v(e._s(e.btnNames[t.row.bfztName]))])]}}])}):e._e(),e._v(" "),l("el-table-column",{attrs:{label:"操作",align:"center",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{attrs:{type:"text"},on:{click:function(l){e.detail(t.row)}}},[e._v("详情")]),e._v(" "),e.hasPerm("/well/update")?l("el-button",{attrs:{type:"text"},on:{click:function(l){e.edit(t.row)}}},[e._v("编辑")]):e._e(),e._v(" "),l("el-button",{attrs:{type:"text"},on:{click:function(l){e.goAlarmRecords(t.row)}}},[e._v("告警记录")])]}}])})],2)],1),e._v(" "),l("div",{staticClass:"pagination-container"},[l("el-pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>e.listQuery.limit,expression:"total>listQuery.limit"}],attrs:{"current-page":e.listQuery.offset,"page-sizes":[20,30,50],"page-size":e.listQuery.limit,total:e.total,align:"center",layout:"total, sizes, prev, pager, next"},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),e._v(" "),l("edit-well",{ref:"editwell",on:{watchChild:e.fetchData}}),e._v(" "),l("detail-well",{ref:"detailwell"})],1)},[],!1,null,"0113f7a1",null));_.options.__file="listWell.vue";t.default=_.exports},zJNJ:function(e,t,l){}}]);