/*!
 *  build: vue-admin-beautiful 
 *  vue-admin-beautiful author: chuzhixin 1204505056@qq.com 
 *  vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756 
 *  time: 2024-10-10 11:14:28
 */
/*!
 *  build: vue-admin-beautiful 
 *  vue-admin-beautiful author: chuzhixin 1204505056@qq.com 
 *  vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756 
 *  time: 2024-10-10 11:14:28
 */
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b34cfc4","chunk-3b34cfc4","chunk-2d0dd0ad"],{"24d2":function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return r})),o.d(t,"doEdit",(function(){return c})),o.d(t,"getProjectGroup",(function(){return d})),o.d(t,"selectAlarmTypeList",(function(){return n})),o.d(t,"getAlarmUser",(function(){return i})),o.d(t,"addAlarmUsers",(function(){return u})),o.d(t,"doDelete",(function(){return s})),o.d(t,"doAdd",(function(){return m})),o.d(t,"exportProject",(function(){return f}));var a=o("b775"),l=o("f121");function r(e){let t="?page="+e.page+"&size="+e.size;return e.regionCode&&(t+="&regionCode="+e.regionCode),e.name&&(t+="&name="+e.name),e.leader&&(t+="&leader="+e.leader),e.contact&&(t+="&contact="+e.contact),e.groupId&&(t+="&groupId="+e.groupId),Object(a["default"])({url:"/iot/project/select"+t,method:"get",data:e})}function c(e){return Object(a["default"])({url:"/iot/project/update",method:"post",data:e})}function d(e){return Object(a["default"])({url:"/iot/project/selectAllProjectGroup",method:"get",data:e})}function n(e){return Object(a["default"])({url:"/iot/project/selectAlarmTypeList",method:"get",data:e})}function i(e){return Object(a["default"])({url:"/iot/project/getAlarmUser?projectId="+e.projectId,method:"get",data:e})}function u(e){return Object(a["default"])({url:"/iot/project/addAlarmUsers",method:"post",data:e})}function s(e){return Object(a["default"])({url:"/iot/project/remove?",method:"post",data:e})}function m(e){return Object(a["default"])({url:"/iot/project/insert",method:"post",data:e})}function f(e){let t="?page="+e.page+"&size="+e.size;return e.regionCode&&(t+="&regionCode="+e.regionCode),e.name&&(t+="&name="+e.name),e.leader&&(t+="&leader="+e.leader),e.contact&&(t+="&contact="+e.contact),e.groupId&&(t+="&groupId="+e.groupId),l["baseURL"]+"/iot/project/export"+t}},"39f5":function(e,t,o){"use strict";o("ee06")},"5f99":function(e,t,o){"use strict";function a(e,t){const o=parseInt(e),a=new Date,l=a.getDate(),r=new Date(a.setDate(l+o)),c=r.getFullYear(),d=r.getMonth()+1,n=r.getDate();let i,u;i=d<10?"0"+d:d,u=n<10?"0"+n:n;const s=t||"-";return c+s+i+s+u}function l(e=""){var t=new Date;""!=e&&(t=new Date(e));const o=t.getFullYear();let a=t.getMonth(),l=t.getDate();return a+=1,a=a.toString().padStart(2,"0"),l=l.toString().padStart(2,"0"),`${o}-${a}-${l}`}function r(e=""){var t=new Date;""!=e&&(t=new Date(e));const o=t.getFullYear();let a=t.getMonth();return a+=1,a=a.toString().padStart(2,"0"),`${o}-${a}`}function c(e=""){var t=new Date;""!=e&&(t=new Date(e));const o=t.getFullYear();return""+o}function d(e){const t=new Date,o=t.getFullYear(),a=t.getMonth()+1,l=t.getDate(),r=a-e,c=r<0?r+12:r>10?r:"0"+r,d=a>9?a:"0"+a,n=l>9?l:"0"+l,i=o+"-"+c+"-"+n,u=o+"-"+d+"-"+n;return[i,u]}function n(){const e=new Date,t=e.getFullYear(),o=e.getMonth()+1,a=e.getDate(),l=new Date(e);l.setDate(e.getDate()-1);const r=l.getFullYear(),c=(l.getMonth()+1).toString().padStart(2,"0"),d=l.getDate().toString().padStart(2,"0"),n=o>9?o:"0"+o,i=a>9?a:"0"+a,u=r+"-"+c+"-"+d,s=t+"-"+n+"-"+i;return[u,s]}function i(e){var t=new Date;""!=e&&(t=new Date(e));const o=t.getFullYear();let a=t.getMonth()+1;a=a<10?"0"+a:a;let l=t.getDate();l=l<10?"0"+l:l;let r=t.getHours();r=r<10?"0"+r:r;let c=t.getMinutes();c=c<10?"0"+c:c;let d=t.getSeconds();return d=d<10?"0"+d:d,o+"-"+a+"-"+l+" "+r+":"+c+":"+d}o.r(t),o.d(t,"getFMdate",(function(){return a})),o.d(t,"getDate",(function(){return l})),o.d(t,"getDate1",(function(){return r})),o.d(t,"getDate2",(function(){return c})),o.d(t,"getPastTime",(function(){return d})),o.d(t,"getPastTime1",(function(){return n})),o.d(t,"formatDateTime",(function(){return i}))},8065:function(e,t,o){"use strict";o.r(t);var a=o("f2bf");const l={class:"dialog-footer"};function r(e,t,o,r,c,d){const n=Object(a["resolveComponent"])("el-input"),i=Object(a["resolveComponent"])("el-form-item"),u=Object(a["resolveComponent"])("el-button"),s=Object(a["resolveComponent"])("bd-map"),m=Object(a["resolveComponent"])("el-form"),f=Object(a["resolveComponent"])("el-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(f,{modelValue:c.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>c.dialogFormVisible=e),title:c.title,width:"500px",onClose:d.close},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{ref:"form",model:c.keyWords,"label-width":"80px"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(i,{label:"位置信息"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(n,{modelValue:c.keyWords,"onUpdate:modelValue":t[0]||(t[0]=e=>c.keyWords=e)},null,8,["modelValue"])]),_:1}),Object(a["createVNode"])(u,{icon:"el-icon-search",type:"primary",onClick:d.searchAddress},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.$t("defalult.cx")),1)]),_:1},8,["onClick"]),Object(a["createVNode"])(u,{icon:"el-icon-del",type:"danger",onClick:d.delAddress,style:{float:"right"}},{default:Object(a["withCtx"])(()=>t[2]||(t[2]=[Object(a["createTextVNode"])(" 清空 ")])),_:1},8,["onClick"]),Object(a["createVNode"])(s,{ref:"maps",location:c.location,onTellFatherName:d.getLatAndLng},null,8,["location","onTellFatherName"]),Object(a["createElementVNode"])("div",l,[Object(a["createVNode"])(u,{onClick:d.close},{default:Object(a["withCtx"])(()=>t[3]||(t[3]=[Object(a["createTextVNode"])("取 消")])),_:1},8,["onClick"]),Object(a["createVNode"])(u,{type:"primary",onClick:d.define},{default:Object(a["withCtx"])(()=>t[4]||(t[4]=[Object(a["createTextVNode"])("确 定")])),_:1},8,["onClick"])])]),_:1},8,["model"])]),_:1},8,["modelValue","title","onClose"])}var c=o("a4e7a"),d={components:{bdMap:c["default"]},data(){return{location:"",coordinate:[],dialogFormVisible:!1,title:"选择位置",keyWords:""}},methods:{getLatAndLng(e){this.coordinate=e},searchAddress(){this.$refs["maps"].setPlace(this.keyWords)},delAddress(){this.keyWords="",this.$refs["maps"].removeMarker()},showMap(e){this.dialogFormVisible=!0,setTimeout(()=>{this.$refs["maps"].loadScript(e)},500)},close(){this.dialogFormVisible=!1},define(){this.$emit("setLatAndLng",this.coordinate),this.dialogFormVisible=!1}}},n=o("d959"),i=o.n(n);const u=i()(d,[["render",r]]);t["default"]=u},a284:function(e,t,o){"use strict";o.r(t);var a=o("f2bf");const l={class:"manage-container"},r=["src"],c={style:{position:"relative"}},d={class:"dialog-footer"};function n(e,t,o,n,i,u){const s=Object(a["resolveComponent"])("el-option"),m=Object(a["resolveComponent"])("el-select"),f=Object(a["resolveComponent"])("el-form-item"),b=Object(a["resolveComponent"])("el-input"),p=Object(a["resolveComponent"])("el-upload"),j=Object(a["resolveComponent"])("el-button"),h=Object(a["resolveComponent"])("el-divider"),g=Object(a["resolveComponent"])("el-date-picker"),O=Object(a["resolveComponent"])("el-form"),V=Object(a["resolveComponent"])("frame-map"),v=Object(a["resolveComponent"])("el-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(v,{modelValue:i.dialogFormVisible,"onUpdate:modelValue":t[24]||(t[24]=e=>i.dialogFormVisible=e),title:i.title,width:"50%",onClose:u.close},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",l,[Object(a["createVNode"])(O,{ref:"form",model:i.form,rules:i.rules,"label-width":"130px","label-position":"right"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(f,{label:"选择项目",prop:"projectId"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.form.projectId,"onUpdate:modelValue":t[0]||(t[0]=e=>i.form.projectId=e),size:"small",filterable:"",placeholder:"请选择项目",onChange:u.changeProject},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(i.projectData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),Object(a["createVNode"])(f,{label:e.$t("dataEnquiry.zdmc"),prop:"name"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.name,"onUpdate:modelValue":t[1]||(t[1]=e=>i.form.name=e),size:"small"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:"站点编号",prop:"code"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.code,"onUpdate:modelValue":t[2]||(t[2]=e=>i.form.code=e),size:"small"},null,8,["modelValue"])]),_:1}),Object(a["createVNode"])(f,{label:e.$t("dataEnquiry.xlh"),prop:"serial"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.serial,"onUpdate:modelValue":t[3]||(t[3]=e=>i.form.serial=e),size:"small"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:e.$t("dataEnquiry.txxy"),prop:"commPro"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.form.commPro,"onUpdate:modelValue":t[4]||(t[4]=e=>i.form.commPro=e),size:"small",filterable:"",placeholder:"请选择通信协议"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(i.commData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.dataCode,label:e.dataValue,value:e.dataCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:"站点工艺",prop:"technology"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.form.technology,"onUpdate:modelValue":t[5]||(t[5]=e=>i.form.technology=e),size:"small",filterable:"",placeholder:"请选择站点工艺"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(i.deviceTechnologyData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.dataCode,label:e.dataValue,value:e.dataCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),Object(a["createVNode"])(f,{label:"站点材质",prop:"material"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.form.material,"onUpdate:modelValue":t[6]||(t[6]=e=>i.form.material=e),size:"small",filterable:"",placeholder:"请选择站点材质"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(i.deviceMaterialData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.dataCode,label:e.dataValue,value:e.dataCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),Object(a["createVNode"])(f,{label:e.$t("dataEnquiry.csbz"),prop:"outStandard"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.form.outStandard,"onUpdate:modelValue":t[7]||(t[7]=e=>i.form.outStandard=e),size:"small",filterable:"",placeholder:"请选择出水标准"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(i.outStandardData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.dataCode,label:e.dataValue,value:e.dataCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:e.$t("device.lxys"),prop:"offlineDelay"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.offlineDelay,"onUpdate:modelValue":t[8]||(t[8]=e=>i.form.offlineDelay=e),size:"small"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:"乡镇街道",prop:"townCode"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.form.townCode,"onUpdate:modelValue":t[9]||(t[9]=e=>i.form.townCode=e),size:"small",filterable:"",placeholder:"请选择乡镇街道",onChange:u.changeTown},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(i.townsData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.townCode,label:e.townName,value:e.townCode+","+e.townName},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),Object(a["createVNode"])(f,{label:e.$t("dataEnquiry.sq"),prop:"community"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.community,"onUpdate:modelValue":t[10]||(t[10]=e=>i.form.community=e),size:"small"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:e.$t("dataEnquiry.sbgg"),prop:"specifications"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.specifications,"onUpdate:modelValue":t[11]||(t[11]=e=>i.form.specifications=e),type:"number",size:"small"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:e.$t("dataEnquiry.sblx"),prop:"type"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.form.type,"onUpdate:modelValue":t[12]||(t[12]=e=>i.form.type=e),size:"small",filterable:"",placeholder:"请选择设备类型"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(i.deviceTypeData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.dataCode,label:e.dataValue,value:e.dataCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:e.$t("dataEnquiry.fwyhs"),prop:"userNum"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.userNum,"onUpdate:modelValue":t[13]||(t[13]=e=>i.form.userNum=e),size:"small",type:"number"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:"物联网卡",prop:"simNum"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.simNum,"onUpdate:modelValue":t[14]||(t[14]=e=>i.form.simNum=e),size:"small",type:"text"},null,8,["modelValue"])]),_:1}),Object(a["createVNode"])(f,{label:e.$t("device.ztdp"),prop:"screenView"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.form.screenView,"onUpdate:modelValue":t[15]||(t[15]=e=>i.form.screenView=e),size:"small",filterable:"",placeholder:"请选择组态大屏"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(i.screenViewData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.dataCode,label:e.dataValue,value:e.dataCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:e.$t("dataEnquiry.ywry")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.leader,"onUpdate:modelValue":t[16]||(t[16]=e=>i.form.leader=e),size:"small"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:e.$t("project.lxfs")},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.contact,"onUpdate:modelValue":t[17]||(t[17]=e=>i.form.contact=e),size:"small"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:"公示牌"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(p,{class:"avatar-uploader",action:i.fileUpdateUrl,headers:{token:i.token},multiple:!0,name:"files","show-file-list":!1,"on-success":u.handleAvatarSuccess,"before-upload":u.beforeAvatarUpload},{default:Object(a["withCtx"])(()=>[i.imageUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{key:0,src:i.fileUrl+i.imageUrl,class:"avatar"},null,8,r)):Object(a["createCommentVNode"])("",!0),t[25]||(t[25]=Object(a["createElementVNode"])("i",{class:"el-icon-plus avatar-uploader-icon"},null,-1))]),_:1},8,["action","headers","on-success","before-upload"])]),_:1}),Object(a["createElementVNode"])("div",c,[Object(a["createVNode"])(f,{label:e.$t("project.wd"),prop:"latitude",style:{width:"90%"}},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.latitude,"onUpdate:modelValue":t[18]||(t[18]=e=>i.form.latitude=e),size:"small"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(f,{label:e.$t("project.jd"),prop:"longitude",style:{width:"90%"}},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.longitude,"onUpdate:modelValue":t[19]||(t[19]=e=>i.form.longitude=e),size:"small"},null,8,["modelValue"])]),_:1},8,["label"]),Object(a["createVNode"])(j,{style:{position:"absolute",right:"0",top:"30px"},type:"success",size:"small",plain:"",onClick:u.checkLocation},{default:Object(a["withCtx"])(()=>t[26]||(t[26]=[Object(a["createTextVNode"])(" 选择位置 ")])),_:1},8,["onClick"])]),Object(a["createVNode"])(h,{"content-position":"left"},{default:Object(a["withCtx"])(()=>t[27]||(t[27]=[Object(a["createTextVNode"])("设备保修信息")])),_:1}),Object(a["createVNode"])(f,{label:"设备报修到期时间",prop:"screenView"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(g,{modelValue:i.form.warrantyPeriod,"onUpdate:modelValue":t[20]||(t[20]=e=>i.form.warrantyPeriod=e),type:"date","popper-options":{modifiers:[{name:"flip",options:{fallbackPlacements:["top"],allowedAutoPlacements:["top"]}}]},placeholder:e.$t("defalult.xzrq"),onChange:u.changeBasic},null,8,["modelValue","placeholder","onChange"])]),_:1}),Object(a["createVNode"])(f,{label:"设备版本",prop:"screenView"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(m,{modelValue:i.form.deviceVersion,"onUpdate:modelValue":t[21]||(t[21]=e=>i.form.deviceVersion=e),size:"small",filterable:"",placeholder:"请选择设备版本"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(i.deviceVersionData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(s,{key:e.dataCode,label:e.dataValue,value:e.dataCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),Object(a["createVNode"])(f,{label:"站点客户联系人"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.ownerName,"onUpdate:modelValue":t[22]||(t[22]=e=>i.form.ownerName=e),size:"small",placeholder:"维修人员所联系的客户信息"},null,8,["modelValue"])]),_:1}),Object(a["createVNode"])(f,{label:"站点客户联系方式"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(b,{modelValue:i.form.ownerPhone,"onUpdate:modelValue":t[23]||(t[23]=e=>i.form.ownerPhone=e),size:"small",placeholder:"维修人员所联系的客户信息"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"]),Object(a["createElementVNode"])("div",d,[Object(a["createVNode"])(j,{type:"primary",size:"small",onClick:u.save},{default:Object(a["withCtx"])(()=>t[28]||(t[28]=[Object(a["createTextVNode"])("提交")])),_:1},8,["onClick"])])]),Object(a["createVNode"])(V,{ref:"map",onSetLatAndLng:u.setLatAndLng},null,8,["onSetLatAndLng"])]),_:1},8,["modelValue","title","onClose"])}var i=o("24d2"),u=o("aa98"),s=o("2ef0"),m=o("f121"),f=o("4360"),b=o("8065"),p=o("5f99"),j={name:"DeviceEdit",components:{frameMap:b["default"]},data(){return{form:{id:"",name:"",code:"",commPro:"",projectId:"",longitude:"",latitude:"",offlineDelay:90,townCode:"",townName:"",community:"",specifications:"",type:"",userNum:"",technology:"",material:"",ownerPhone:"",ownerName:"",outStandard:"",leader:"",contact:"",serial:"",boardImg:"",screenView:"",simNum:""},filePath:m["baseURL"]+"/static/img/",fileUpdateUrl:"",token:"",imageUrl:[],siteName:"",siteCode:"",townCode:"",projectId:"",projectData:[],rules:{projectId:[{required:!0,trigger:"change",message:"请选择项目"}],name:[{required:!0,trigger:"blur",message:"请输入站点名称"}],code:[{required:!0,trigger:"blur",message:"请输入站点编号"}],serial:[{required:!0,trigger:"blur",message:"请输入序列号"}],commPro:[{required:!0,trigger:"change",message:"请选择通信协议"}],deviceVersion:[{required:!0,trigger:"change",message:"请选择设备版本"}],technology:[{required:!0,trigger:"blur",message:"请输入站点工艺"}],material:[{required:!0,trigger:"blur",message:"请输入站点材质"}],outStandard:[{required:!0,trigger:"blur",message:"请输入出水标准"}],offlineDelay:[{required:!0,trigger:"blur",message:"请输入离线延迟"}],townCode:[{required:!0,trigger:"change",message:"请选择乡镇街道"}],specifications:[{required:!0,trigger:"blur",message:"请输入设备规格"}],type:[{required:!0,trigger:"blur",message:"请输入设备类型"}]},num:0,title:"",dialogFormVisible:!1,showMap:!1,keyWords:"",fileUrl:m["baseURL"]+"/static/img/",diffData:{},ruleForm:[],commData:[],location:[],deviceTechnologyData:[],deviceMaterialData:[],outStandardData:[],deviceTypeData:[],alarmTypeData:[],townsData:[],alarmUserData:[],screenViewData:[],deviceVersionData:[]}},created(){},methods:{changeBasic(){},checkLocation(){this.$refs["map"].showMap(this.location)},setUploadUrl(){this.token=f["default"].getters["user/token"],this.fileUpdateUrl=m["baseURL"]+"/file/uploadImg"},handleAvatarSuccess(e,t){this.form.boardImg=e.data,this.imageUrl=e.data},beforeAvatarUpload(e){const t=e.size/1024/1024<2;return t||this.$message.error("上传头像图片大小不能超过 2MB!"),t},async getProjectData(){const e={page:1,size:100},{data:t}=await Object(i["getList"])(e);this.projectData=t.items},changeProject(){this.getTownsByProject()},async getTownsByProject(){const{data:e}=await Object(u["getTownsByProject"])({projectId:this.form.projectId});this.townsData=e},changeTown(e){this.form.townCode=e.split(",")[0],this.form.townName=e.split(",")[1]},setLatAndLng(e){this.form.longitude=e.lng,this.form.latitude=e.lat},async getCommData(){const{data:e}=await Object(u["getDictData"])();this.commData=e.communicationProtocol,this.deviceTechnologyData=e.deviceTechnology,this.deviceMaterialData=e.deviceMaterial,this.outStandardData=e.outStandard,this.deviceTypeData=e.deviceType,this.screenViewData=e.screenView,this.deviceVersionData=e.deviceVersion},showEdit(e,t){if(this.getProjectData(),this.getCommData(),this.setUploadUrl(),this.location=[],1==t)this.title="添加",this.form.projectId=Object(s["toNumber"])(e.projectId),this.form.boardImg="",this.imageUrl="",this.form.townCode="";else{this.title="编辑";var o=Object.assign({},e);this.form.id=o.id,this.form.name=o.name,this.form.code=o.code,this.form.serial=o.serial,this.form.commPro=o.commPro.dataCode,this.form.projectId=o.project.id,this.form.longitude=o.longitude,this.form.latitude=o.latitude,this.form.offlineDelay=o.offlineDelay,this.form.townCode=o.townCode,this.form.townName=o.townName,this.form.community=o.community,this.form.specifications=o.specifications,this.form.boardImg=o.boardImg,this.imageUrl=o.boardImg,this.simNum=o.simNum,this.form.ownerName=o.ownerName,this.form.ownerPhone=o.ownerPhone,this.form.warrantyPeriod=o.warrantyPeriod,null!==o.type&&(this.form.type=o.type.dataCode),null!==o.technology&&(this.form.technology=o.technology.dataCode),null!==o.screenView&&(this.form.screenView=o.screenView.dataCode),null!==o.deviceVersion&&(this.form.deviceVersion=o.deviceVersion.dataCode),null!==o.type&&(this.form.type=o.type.dataCode),null!==o.material&&(this.form.material=o.material.dataCode),null!==o.outStandard&&(this.form.outStandard=o.outStandard.dataCode),this.form.leader=o.leader,this.form.contact=o.contact,this.form.userNum=o.userNum,this.siteName=o.name,this.siteCode=o.code,this.townCode=o.townName,this.location=[o.latitude,o.longitude]}this.getTownsByProject(),this.dialogFormVisible=!0},close(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.$emit("fetch-data")},getDiffData(){this.diffData={},Object.keys(this.form).forEach(e=>{this.form[e]!=this.ruleForm[e]&&(this.diffData[e]=this.form[e])})},save(){this.$refs["form"].validate(async e=>{if(!e)return!1;if(this.siteName==this.form.name&&delete this.form.name,this.siteCode==this.form.code&&delete this.form.code,this.form.warrantyPeriod&&(this.form.warrantyPeriod=Object(p["getDate"])(this.form.warrantyPeriod)),this.form.id){const{msg:e}=await Object(u["doEdit"])(this.form);this.$notify({title:e,type:"success"})}else{delete this.form.id;const{msg:e}=await Object(u["doAdd"])(this.form);this.$notify({title:e,type:"success"})}this.$refs["form"].resetFields(),this.dialogFormVisible=!1,this.$parent.fetchData()})}}},h=(o("39f5"),o("d959")),g=o.n(h);const O=g()(j,[["render",n]]);t["default"]=O},aa98:function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return r})),o.d(t,"getDeviceData",(function(){return c})),o.d(t,"doEdit",(function(){return d})),o.d(t,"doDelete",(function(){return n})),o.d(t,"doAdd",(function(){return i})),o.d(t,"selectDeviceInfo",(function(){return u})),o.d(t,"getDictData",(function(){return s})),o.d(t,"selectAllProject",(function(){return m})),o.d(t,"selectAllGroup",(function(){return f})),o.d(t,"selectAllAlarmUser",(function(){return b})),o.d(t,"copy",(function(){return p})),o.d(t,"getLatestDataByDevice",(function(){return j})),o.d(t,"getLatestData",(function(){return h})),o.d(t,"getLatestDataByDevices",(function(){return g})),o.d(t,"getHistoryData",(function(){return O})),o.d(t,"getReportHistoryData",(function(){return V})),o.d(t,"getTownsByProject",(function(){return v})),o.d(t,"getCommunitiesByTown",(function(){return C})),o.d(t,"exportDevice",(function(){return w})),o.d(t,"exportIotDevice",(function(){return y})),o.d(t,"exportData",(function(){return D})),o.d(t,"exportIotData",(function(){return N})),o.d(t,"sensors",(function(){return k})),o.d(t,"boxList",(function(){return x})),o.d(t,"fboxSync",(function(){return U})),o.d(t,"sensorInfo",(function(){return B}));var a=o("b775"),l=o("f121");function r(e){let t="?page="+e.page+"&size="+e.size;return""!=e.projectId&&void 0!=e.projectId&&(t+="&projectId="+e.projectId),""!=e.code&&void 0!=e.code&&(t+="&code="+e.code),""!=e.name&&void 0!=e.name&&(t+="&name="+e.name),""!=e.community&&void 0!=e.community&&(t+="&community="+e.community),""!=e.townCode&&void 0!=e.townCode&&(t+="&townCode="+e.townCode),""!=e.commPro&&void 0!=e.commPro&&(t+="&commPro="+e.commPro),3!=e.status&&(t+="&status="+e.status),Object(a["default"])({url:"/deviceReport/list"+t,method:"get",data:e})}function c(e){let t="?page="+e.page+"&size="+e.size;return""!=e.projectId&&void 0!=e.projectId&&(t+="&projectId="+e.projectId),""!=e.serial&&void 0!=e.serial&&(t+="&serial="+e.serial),""!=e.name&&void 0!=e.name&&(t+="&name="+e.name),""!=e.community&&void 0!=e.community&&(t+="&community="+e.community),""!=e.townCode&&void 0!=e.townCode&&(t+="&townCode="+e.townCode),"Entire agreement"!=e.commPro&&void 0!=e.commPro&&"all"!=e.commPro&&(t+="&commPro="+e.commPro),3!=e.status&&void 0!=e.status&&(t+="&status="+e.status),Object(a["default"])({url:"/iot/device/select"+t,method:"get",data:e})}function d(e){return Object(a["default"])({url:"/iot/device/update",method:"post",data:e})}function n(e){return Object(a["default"])({url:"/iot/device/remove",method:"post",data:e})}function i(e){return Object(a["default"])({url:"/iot/device/insert",method:"post",data:e})}function u(e){return Object(a["default"])({url:"/iot/device/selectDeviceInfo?deviceId="+e.deviceId,method:"get",data:e})}function s(e){return Object(a["default"])({url:"/iot/device/dict",method:"get",data:e})}function m(e){return Object(a["default"])({url:"/iot/device/selectAllProject",method:"get",data:e})}function f(e){return Object(a["default"])({url:"/iot/device/selectAllGroup?projectId="+e.projectId,method:"get",data:e})}function b(e){return Object(a["default"])({url:"/iot/device/selectAllAlarmUser",method:"get",data:e})}function p(e){return Object(a["default"])({url:"/iot/device/copy?deviceId="+e.deviceId+"&name="+e.name+"&code="+e.code+"&serial="+e.serial,method:"post",data:e})}function j(e){let t="?deviceCode="+e.deviceCode+"&page="+e.page+"&size="+e.size;return""!=e.sensorName&&(t+="&sensorName="+e.sensorName),Object(a["default"])({url:"/deviceReport/latestData"+t,method:"get",data:e})}function h(e){const t="?deviceCode="+e.deviceCode+"&page="+e.page+"&size="+e.size;return Object(a["default"])({url:"/deviceData/latestData"+t,method:"get",data:e})}function g(e){const t="?deviceCode="+e.deviceCode+"&dataKey="+e.dataKey;return Object(a["default"])({url:"/deviceData/getLatestDataByDevice"+t,method:"get",data:e})}function O(e){return Object(a["default"])({url:"/deviceData/getHistoryData?dataKey="+e.dataKey+"&start="+e.start+"&deviceCode="+e.deviceCode+"&end="+e.end,method:"get",data:e})}function V(e){return Object(a["default"])({url:"/deviceData/getHistoryChartData?dataKey="+e.dataKey+"&start="+e.start+"&deviceCode="+e.deviceCode+"&end="+e.end,method:"get",data:e})}function v(e){return Object(a["default"])({url:"/iot/device/getTownsByProject?projectId="+e.projectId,method:"get",data:e})}function C(e){return Object(a["default"])({url:"/iot/device/getCommunitiesByTown?townCode="+e.townCode,method:"get",data:e})}function w(e){var t="?projectId="+e.projectId;return l["baseURL"]+"/deviceReport/exportDevice"+t}function y(e){var t="?projectId="+e.projectId;return l["baseURL"]+"/iot/device/exportDevice"+t}function D(e){var t="?deviceCode="+e.deviceCode;return l["baseURL"]+"/deviceReport/exportData"+t}function N(e){var t="?deviceCode="+e.deviceCode;return l["baseURL"]+"/iot/device/exportData"+t}function k(e){return Object(a["default"])({url:"/deviceData/sensors?deviceCode="+e.deviceCode,method:"get",data:e})}function x(e){return Object(a["default"])({url:"/fbox/boxList",method:"get",data:e})}function U(e,t){return Object(a["default"])({url:"/fbox/sync?projectId="+t,method:"post",data:e})}function B(e){var t="?deviceCode="+e.deviceCode+"&dataKey="+e.dataKey;return Object(a["default"])({url:"/deviceData/sensorInfo"+t,method:"get",data:e})}},ee06:function(e,t,o){e.exports={"menu-color":"hsla(0,0%,27%,.95)","menu-color-active":"hsla(208,100%,55%,.95)","menu-background":"#fff","gallery-second-menu-background":"#fff"}}}]);