/*!
 *  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-087d292f"],{"23ba":function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return i})),o.d(t,"doDelete",(function(){return l})),o.d(t,"remove",(function(){return a})),o.d(t,"doAdd",(function(){return s}));var r=o("b775");function i(e){let t="?page="+e.page+"&size="+e.size;return void 0!=e.name&&""!=e.name&&(t+="&name="+e.name),Object(r["default"])({url:"/iot/project/group/select"+t,method:"get",data:e})}function l(e){return Object(r["default"])({url:"/iot/project/group/remove?groupId="+e.groupId,method:"post",data:e})}function a(e){return Object(r["default"])({url:"/iot/project/group/remove?groupId="+e.groupId,method:"post",data:e})}function s(e){return Object(r["default"])({url:"/iot/project/group/saveOrUpdate",method:"post",data:e})}},"9e4b":function(e,t,o){"use strict";o.r(t);var r=o("f2bf");const i={class:"dialog-footer"};function l(e,t,o,l,a,s){const d=Object(r["resolveComponent"])("el-input"),n=Object(r["resolveComponent"])("el-form-item"),c=Object(r["resolveComponent"])("el-form"),u=Object(r["resolveComponent"])("el-button"),m=Object(r["resolveComponent"])("el-dialog");return Object(r["openBlock"])(),Object(r["createBlock"])(m,{modelValue:a.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>a.dialogFormVisible=e),title:a.title,width:"500px",onClose:s.close},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(c,{ref:"form",model:a.form,rules:a.rules,"label-width":"80px","label-position":"left"},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(n,{label:e.$t("grouping.zmc"),prop:"title"},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(d,{modelValue:a.form.title,"onUpdate:modelValue":t[0]||(t[0]=e=>a.form.title=e),modelModifiers:{trim:!0},size:"small",autocomplete:"off"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),Object(r["createElementVNode"])("div",i,[Object(r["createVNode"])(u,{type:"primary",size:"small",onClick:s.save},{default:Object(r["withCtx"])(()=>t[2]||(t[2]=[Object(r["createTextVNode"])("确 定")])),_:1},8,["onClick"]),Object(r["createVNode"])(u,{size:"small",onClick:s.close},{default:Object(r["withCtx"])(()=>t[3]||(t[3]=[Object(r["createTextVNode"])("取 消")])),_:1},8,["onClick"])])]),_:1},8,["modelValue","title","onClose"])}var a=o("23ba"),s={name:"GroupEdit",data(){return{form:{id:"",title:"",name:"",projectId:""},areaData:[],cityData:[],rules:{title:[{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},showEdit(e){this.title="添加组",this.form.projectId=e,this.dialogFormVisible=!0},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(a["doAdd"])(this.form);this.$notify({title:e,type:"success"}),this.$refs["form"].resetFields(),this.dialogFormVisible=!1,this.$emit("RefreshGroup",this.form.projectId)}})}}},d=o("d959"),n=o.n(d);const c=n()(s,[["render",l]]);t["default"]=c}}]);