/*!
 *  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-1d6f67c3"],{"24d2":function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return a})),o.d(t,"doEdit",(function(){return i})),o.d(t,"getProjectGroup",(function(){return n})),o.d(t,"selectAlarmTypeList",(function(){return c})),o.d(t,"getAlarmUser",(function(){return d})),o.d(t,"addAlarmUsers",(function(){return s})),o.d(t,"doDelete",(function(){return u})),o.d(t,"doAdd",(function(){return m})),o.d(t,"exportProject",(function(){return f}));var r=o("b775"),l=o("f121");function a(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(r["default"])({url:"/iot/project/select"+t,method:"get",data:e})}function i(e){return Object(r["default"])({url:"/iot/project/update",method:"post",data:e})}function n(e){return Object(r["default"])({url:"/iot/project/selectAllProjectGroup",method:"get",data:e})}function c(e){return Object(r["default"])({url:"/iot/project/selectAlarmTypeList",method:"get",data:e})}function d(e){return Object(r["default"])({url:"/iot/project/getAlarmUser?projectId="+e.projectId,method:"get",data:e})}function s(e){return Object(r["default"])({url:"/iot/project/addAlarmUsers",method:"post",data:e})}function u(e){return Object(r["default"])({url:"/iot/project/remove?",method:"post",data:e})}function m(e){return Object(r["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}},"49e6":function(e,t,o){"use strict";o.r(t);var r=o("f2bf");const l={class:"dialog-footer"};function a(e,t,o,a,i,n){const c=Object(r["resolveComponent"])("el-option"),d=Object(r["resolveComponent"])("el-select"),s=Object(r["resolveComponent"])("el-form-item"),u=Object(r["resolveComponent"])("el-form"),m=Object(r["resolveComponent"])("el-button"),f=Object(r["resolveComponent"])("el-dialog");return Object(r["openBlock"])(),Object(r["createBlock"])(f,{modelValue:i.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>i.dialogFormVisible=e),title:i.title,width:"500px",onClose:n.close},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(u,{ref:"form",model:i.form,rules:i.rules,"label-width":"80px","label-position":"left"},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(s,{label:"报警用户",prop:"userIds"},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(d,{modelValue:i.form.userIds,"onUpdate:modelValue":t[0]||(t[0]=e=>i.form.userIds=e),size:"small",filterable:"",multiple:"",placeholder:"选择报警用户"},{default:Object(r["withCtx"])(()=>[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(i.areaData,e=>(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"]),Object(r["createElementVNode"])("div",l,[Object(r["createVNode"])(m,{type:"primary",size:"small",onClick:n.save},{default:Object(r["withCtx"])(()=>t[2]||(t[2]=[Object(r["createTextVNode"])("确 定")])),_:1},8,["onClick"]),Object(r["createVNode"])(m,{size:"small",onClick:n.close},{default:Object(r["withCtx"])(()=>t[3]||(t[3]=[Object(r["createTextVNode"])("取 消")])),_:1},8,["onClick"])])]),_:1},8,["modelValue","title","onClose"])}var i=o("24d2"),n={data(){return{form:{userIds:"",projectId:""},areaData:[],rules:{userIds:[{required:!0,trigger:"blur",message:"请选择报警用户"}]},title:"",dialogFormVisible:!1}},created(){},methods:{handleCountryChange(e){if(e){const t=e.length-1;this.form.parentId=e[t]}else this.form.parentId=0},async getAlarmUser(){const{data:e}=await Object(i["getAlarmUser"])(this.form);this.areaData=e.all,this.form.userIds=e.select},showEdit(e){this.title="绑定报警用户",this.form.projectId=e,this.dialogFormVisible=!0,this.getAlarmUser()},close(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.$emit("fetch-data")},save(){this.$refs["form"].validate(async e=>{if(!e)return!1;{this.form.name=this.form.title;const{msg:e}=await Object(i["addAlarmUsers"])(this.form);this.$notify({title:e,type:"success"}),this.$refs["form"].resetFields(),this.dialogFormVisible=!1,this.$emit("RefreshGroup",this.form.projectId)}})}}},c=o("d959"),d=o.n(c);const s=d()(n,[["render",a]]);t["default"]=s}}]);