"use strict";(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[842],{95995:(e,t,a)=>{a.r(t),a.d(t,{default:()=>F});var r=function(){var e=this,t=e._self._c;return t("app-container",[t("search-area",{attrs:{"need-clear":!1,"need-search-more":!1,size:"small","search-more-type":"default"},on:{search:e.fetchData}},[t("search-item",[t("dept-select",{attrs:{"need-top":!0,placeholder:"选择组织机构"},model:{value:e.listQuery.deptid,callback:function(t){e.$set(e.listQuery,"deptid",t)},expression:"listQuery.deptid"}})],1)],1),t("normal-table",{ref:"normalTable",attrs:{data:e.list,query:e.listQuery,columns:e.columns,"list-loading":e.listLoading,options:e.options,size:"small"}},[t("template",{slot:"btns"},[e.hasPerm("/deptPermission/add")?t("el-button",{attrs:{size:"small"},on:{click:e.add}},[e._v(" 新增 ")]):e._e()],1),t("template",{slot:"columns"},[t("el-table-column",{attrs:{label:"操作",width:"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return e.detail(a.row)}}},[e._v(" 详情 ")]),e.hasPerm("/deptPermission/update")?t("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return e.edit(a.row)}}},[e._v(" 修改 ")]):e._e(),e.hasPerm("/deptPermission/delete")?t("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return e.del(a.row)}}},[e._v(" 删除 ")]):e._e()]}}])})],1)],2),t("edit-dept-permission",{ref:"editDeptPermission",on:{watchChild:e.fetchData}})],1)},i=[],l=a(81037),n=(a(68309),function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{"append-to-body":"",title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[t("el-form",{ref:"dataForm",attrs:{rules:e.rules,model:e.deviceForm,"label-width":"140px","label-well-code":"right"}},[t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"组织机构",prop:"deptid"}},[t("dept-select",{attrs:{"need-top":!0,"dept-type":"03",placeholder:"选择组织机构",disabled:"detail"===e.dialogStatus},model:{value:e.deviceForm.deptid,callback:function(t){e.$set(e.deviceForm,"deptid",t)},expression:"deviceForm.deptid"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"默认城市编码",prop:"area"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入城市编码",disabled:"detail"===e.dialogStatus},model:{value:e.deviceForm.area,callback:function(t){e.$set(e.deviceForm,"area",t)},expression:"deviceForm.area"}})],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"支持设备类型",prop:"deviceType"}},[t("el-select",{attrs:{placeholder:"请选择设备类型",multiple:"","collapse-tags":"",clearable:"",disabled:"detail"===e.dialogStatus},model:{value:e.deviceForm.deviceType,callback:function(t){e.$set(e.deviceForm,"deviceType",t)},expression:"deviceForm.deviceType"}},e._l(e.deviceTypeList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"支持点位类型",prop:"wellType"}},[t("el-select",{attrs:{multiple:"","collapse-tags":"",clearable:"",placeholder:"请选择支持点位类型",disabled:"detail"===e.dialogStatus},model:{value:e.deviceForm.wellType,callback:function(t){e.$set(e.deviceForm,"wellType",t)},expression:"deviceForm.wellType"}},e._l(e.wellTypeList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"地图默认中心-经度",prop:"lng"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入经度",disabled:"detail"===e.dialogStatus},model:{value:e.deviceForm.lng,callback:function(t){e.$set(e.deviceForm,"lng",t)},expression:"deviceForm.lng"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"地图默认中心-纬度",prop:"lat"}},[t("el-input",{attrs:{clearable:"",placeholder:"请输入纬度",disabled:"detail"===e.dialogStatus},model:{value:e.deviceForm.lat,callback:function(t){e.$set(e.deviceForm,"lat",t)},expression:"deviceForm.lat"}})],1)],1)],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"detail"!==e.dialogStatus,expression:"dialogStatus === 'detail' ? false : true"}],staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.saveData}},[e._v(" 保存 ")]),t("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v(" 取消 ")])],1)],1)}),o=[],s=a(84471);function d(e){return(0,s.Z)({url:"deptPermission/list",method:"get",params:e})}function c(e){return(0,s.Z)({url:"deptPermission/add",method:"post",data:e})}function u(e){return(0,s.Z)({url:"deptPermission/update",method:"post",data:e})}function p(e){return(0,s.Z)({url:"deptPermission/delete/"+e,method:"post"})}var m=a(64171),f=a(9632);const h={name:"EditDeptPermission",components:{DeptSelect:l.Z},data:function(){return{dialogFormVisible:!1,deviceTypeList:[],dialogStatus:"",textMap:{update:"编辑",create:"新增",detail:"详情"},wellTypeList:[],deviceForm:{id:"",deptid:"",wellType:"",deviceType:"",area:"",lng:"",lat:""},rules:{deptid:[{required:!0,message:"组织id不能为空",trigger:["blur","change"]}],wellType:[{required:!0,message:"支持点位类型必选",trigger:["blur","change"]}],deviceType:[{required:!0,message:"支持设备类型必选",trigger:["blur","change"]}],lng:[{required:!0,message:"经度不能为空",trigger:["blur","change"]}],lat:[{required:!0,message:"纬度不能为空",trigger:["blur","change"]}]}}},created:function(){this.fetchDeviceType(),this.fetchWellType()},methods:{fetchDeviceType:function(){var e=this;(0,m.l7)().then((function(t){e.deviceTypeList=t.data}))},fetchWellType:function(){var e=this;(0,f.jo)().then((function(t){e.wellTypeList=t.data}))},resetForm:function(){this.deviceForm={id:"",deptid:"",wellType:"",deviceType:"",area:"",lng:"",lat:""}},initDialog:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.dialogFormVisible=!0,this.dialogStatus=e,"create"===this.dialogStatus?(this.resetForm(),this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))):"update"!==this.dialogStatus&&"detail"!==this.dialogStatus||(this.deviceForm={id:a.id,deptid:a.deptid,wellType:a.wellType,deviceType:a.deviceType,area:a.area,lng:a.lng,lat:a.lat})},saveData:function(){"update"===this.dialogStatus?this.updateData():"create"===this.dialogStatus&&this.createData()},updateData:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&u(e.deviceForm).then((function(t){200===t.code&&(e.$message.success("修改成功"),e.$emit("watchChild"),e.dialogFormVisible=!1)}))}))},createData:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&c(e.deviceForm).then((function(t){200===t.code&&e.$confirm("新增成功,是否继续新增?","提示",{confirmButtonText:"是",cancelButtonText:"否",type:"info"}).then((function(){e.resetForm(),e.$nextTick((function(){e.$refs["dataForm"].clearValidate()}))}))["catch"]((function(){e.$emit("watchChild"),e.dialogFormVisible=!1}))}))}))}}},v=h;var g=a(1001),y=(0,g.Z)(v,n,o,!1,null,"633c9578",null);const b=y.exports,w={name:"DeptPermission",components:{DeptSelect:l.Z,EditDeptPermission:b},data:function(){return{listQuery:{deptid:""},columns:[{text:"组织名称",value:"deptName",align:"center"},{text:"支持点位类型",value:"wellTypeName",align:"center"},{text:"支持设备类型",value:"deviceTypeName",align:"center"},{text:"默认城市编码",value:"area",align:"center"},{text:"地图默认中心-经度",value:"lng",align:"center"},{text:"地图默认中心-纬度",value:"lat",align:"center"}],listLoading:!1,list:[],options:{needIndex:!1}}},created:function(){this.fetchData()},mounted:function(){this.$refs.normalTable.initColumnsState(!1)},methods:{fetchData:function(){var e=this;this.listLoading=!0,d(this.listQuery).then((function(t){e.list=t.data,e.listLoading=!1}))},del:function(e){var t=this;this.$confirm("确定要删除所选配置项吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){p(e.id).then((function(e){200===e.code&&(t.$message.success("删除成功"),t.fetchData())}))}))["catch"]((function(){t.$message({type:"info",message:"已取消删除"})}))},add:function(){this.$refs.editDeptPermission.initDialog("create")},edit:function(e){this.$refs.editDeptPermission.initDialog("update",e)},detail:function(e){this.$refs.editDeptPermission.initDialog("detail",e)}}},T=w;var Z=(0,g.Z)(T,r,i,!1,null,"0ab9c0ac",null);const F=Z.exports},64171:(e,t,a)=>{a.d(t,{FR:()=>f,FU:()=>u,Ix:()=>n,S6:()=>d,e5:()=>p,fj:()=>s,l7:()=>o,nY:()=>m,xl:()=>c});var r=a(84471),i=a(80129),l=a.n(i);function n(e){return(0,r.Z)({url:"device/list-page",method:"get",params:e})}function o(e){return(0,r.Z)({url:"device/type",method:"get",params:e})}function s(e){return(0,r.Z)({url:"device/model",method:"get",params:{deviceType:e}})}function d(e){return(0,r.Z)({url:"device/add",method:"post",params:e})}function c(e){return(0,r.Z)({url:"device/update",method:"post",params:e})}function u(e){return(0,r.Z)({url:"device/delete",method:"post",params:{ids:e},paramsSerializer:function(e){return l().stringify(e,{indices:!1})}})}function p(e){var t=new FormData;return t.append("file",e),(0,r.Z)({url:"device/batchImport",method:"post",timeout:24e4,headers:{"Content-Type":"multipart/form-data"},data:t})}function m(e){return(0,r.Z)({url:"device/batchExport",method:"get",timeout:12e4,params:e,responseType:"blob"})}function f(e){return(0,r.Z)({url:"/device/offline-list-page",method:"get",params:e})}},79053:(e,t,a)=>{a.d(t,{CZ:()=>o,MB:()=>s,U4:()=>i,cd:()=>n,mv:()=>d,t5:()=>l});var r=a(84471);function i(e){return(0,r.Z)({url:"sys/dept/list",method:"get",params:e})}function l(e){return(0,r.Z)({url:"sys/dept/tree",method:"get",params:e})}function n(e){return(0,r.Z)({url:"sys/role/treeByRoleId",method:"get",params:{roleId:e}})}function o(e){return(0,r.Z)({url:"sys/dept/add",method:"post",data:e})}function s(e){return(0,r.Z)({url:"sys/dept/update",method:"post",data:e})}function d(e){return(0,r.Z)({url:"sys/dept/delete",method:"post",data:{id:e}})}},9632:(e,t,a)=>{a.d(t,{Ek:()=>p,HL:()=>v,M8:()=>s,ej:()=>c,fP:()=>y,jA:()=>u,jo:()=>d,jx:()=>f,ke:()=>h,lL:()=>g,o5:()=>w,vE:()=>o,yW:()=>m,z1:()=>b});var r=a(95082),i=a(84471),l=a(80129),n=a.n(l);function o(e){return(0,i.Z)({url:"well/list",method:"get",params:e})}function s(e){return(0,i.Z)({url:"well/info",method:"get",params:{id:e}})}function d(e){return(0,i.Z)({url:"/sys/dict/code/sluicewellType",method:"get",params:e})}function c(e){return(0,i.Z)({url:"/sys/dict/code/communicationType",method:"get",params:e})}function u(e){return(0,i.Z)({url:"well/add",method:"post",params:e})}function p(e){return(0,i.Z)({url:"well/update",method:"post",params:e})}function m(e){return(0,i.Z)({url:"well/delete",method:"post",params:{ids:e},paramsSerializer:function(e){return n().stringify(e,{indices:!1})}})}function f(e){var t=new FormData;return t.append("file",e),(0,i.Z)({url:"well/batchImport",method:"post",headers:{"Content-Type":"multipart/form-data"},data:t})}function h(e,t){return(0,i.Z)((0,r.Z)((0,r.Z)({url:"well/batchExport",method:"get",timeout:12e4,params:e},t),{},{responseType:"blob"}))}function v(e){return(0,i.Z)({url:"well/watchDataByWell",method:"get",params:{id:e}})}function g(e,t){return(0,i.Z)({url:"well/bfcf",method:"post",params:{wellId:e,bfzt:t}})}function y(e){return(0,i.Z)({url:"well/batchBfcf",method:"post",params:e})}function b(){return(0,i.Z)({url:"well/countByBfzt",method:"get"})}function w(e){return(0,i.Z)({url:"well/selectOne",method:"get",params:e})}},50275:(e,t,a)=>{a.d(t,{P7:()=>c,WP:()=>n,qd:()=>l});var r=a(89584),i=a(66347);a(21249),a(41539),a(70189),a(78783),a(33948),a(40561);function l(e){if(e&&e.length>0){var t,a=!1,r=e[0].pid,l=(0,i.Z)(e);try{for(l.s();!(t=l.n()).done;){var n=t.value;if(n.pid!==r){a=!0;break}}}catch(o){l.e(o)}finally{l.f()}return a}return!1}function n(e){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=d(e);if(a.length>1)return e;var r=s(o(e,a[0],t));return r}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0",a=arguments.length>2?arguments[2]:void 0,r=function t(a){for(var r=[],i=0;i<e.length;i++){var l=e[i],n=""+l.id,o=""+l.pid;o===a&&(l.children=t(n),r.push(l))}return r};if(!a)return r(t);var l,n=1,o=[],s=(0,i.Z)(e);try{for(s.s();!(l=s.n()).done;){var d=l.value,c=""+d.id;if(c===t)return d.children=r(t),n=0,o.push(d),o}}catch(u){s.e(u)}finally{s.f()}return 1===n?r(t):void 0}function s(e){var t=function e(t){return t.map((function(t){return t&&t.children&&t.children.length?e(t.children):delete t.children,t})),t};return t(e)}function d(e){var t=new Set;if(e){var a,l=(0,i.Z)(e);try{for(l.s();!(a=l.n()).done;){var n=a.value;t.add(n.pid)}}catch(u){l.e(u)}finally{l.f()}var o,s=(0,i.Z)(e);try{for(s.s();!(o=s.n()).done;){var d=o.value;t.has(d.id)&&t["delete"](d.id)}}catch(u){s.e(u)}finally{s.f()}var c=(0,r.Z)(t);return c}return null}function c(e){for(var t=[],a=[],r=0;r<e.length;r++)"true"!==e[r].open&&!0!==e[r].open||t.push(e[r].id),"true"!==e[r].checked&&!0!==e[r].checked||a.push(e[r].id);return[t,a]}}}]);