(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a07ec55a"],{"0f30":function(t,e,r){"use strict";r.r(e);var a=r("8478"),o=r("b3ad"),s=(r("b6c4"),{data:()=>({form:{id:0,image:"",sort:0},options:[]}),components:{MaterialSelect:o.a},methods:{formatItem(t){return{id:t.id,name:t.name,sub:t.sub?t.sub.map(t=>this.formatItem(t)):null}},formattedOptions(){return this.options.map(t=>this.formatItem(t))},loadDetail(){0!=this.form.id&&Object(a.c)({id:this.form.id}).then(t=>{this.form=t})},loadAllCategory(){Object(a.d)().then(t=>{this.options=t,this.options=this.formattedOptions()})},edit(){Object(a.e)(this.form).then(t=>{1==t.code&&(this.$message.success("修改成功!"),setTimeout(()=>this.$router.go(-1),500))})},create(){null==this.form.pid?this.form.pid=0:this.form.pid=this.form.pid[this.form.pid.length-1],Object(a.a)(this.form).then(t=>{null!=t&&Array.isArray(t)&&0==t.length&&(this.$message.success("新增成功!"),setTimeout(()=>this.$router.go(-1),500))})}},mounted(){this.loadAllCategory()}}),i=r("2877"),n=Object(i.a)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"ls-card"},[r("el-page-header",{attrs:{content:"新增群聊分类"},on:{back:function(e){return t.$router.go(-1)}}})],1),r("div",{staticClass:"ls-card m-t-16"},[r("div",{staticClass:"card-title"},[t._v("新增群聊分类")]),r("div",{staticClass:"card-content m-t-24"},[r("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[r("el-form-item",{attrs:{label:"群聊分类名称"}},[r("el-input",{model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),r("el-form-item",{attrs:{label:"群聊LOGO"}},[r("material-select",{attrs:{limit:1},model:{value:t.form.image,callback:function(e){t.$set(t.form,"image",e)},expression:"form.image"}})],1),r("el-form-item",{attrs:{label:"群聊排序"}},[r("el-input",{model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort",e)},expression:"form.sort"}})],1),r("el-form-item",{attrs:{label:"群聊状态"}},[r("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}})],1),r("el-form-item",{attrs:{label:"群聊父级"}},[r("el-cascader",{attrs:{options:t.options,props:{expandTrigger:"hover",checkStrictly:!0,value:"id",label:"name",children:"sub"}},model:{value:t.form.pid,callback:function(e){t.$set(t.form,"pid",e)},expression:"form.pid"}})],1),r("el-form-item",{attrs:{label:"群聊分类描述"}},[r("el-input",{model:{value:t.form.desc,callback:function(e){t.$set(t.form,"desc",e)},expression:"form.desc"}})],1)],1)],1)]),r("div",{staticClass:"bg-white ls-fixed-footer"},[r("div",{staticClass:"row-center flex",staticStyle:{height:"100%"}},[r("el-button",{attrs:{size:"small"},on:{click:function(e){return t.$router.go(-1)}}},[t._v("取消")]),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.create}},[t._v("新增")])],1)])])}),[],!1,null,null,null);e.default=n.exports},8478:function(t,e,r){"use strict";r.d(e,"d",(function(){return s})),r.d(e,"c",(function(){return i})),r.d(e,"b",(function(){return n})),r.d(e,"e",(function(){return l})),r.d(e,"a",(function(){return u})),r.d(e,"i",(function(){return c})),r.d(e,"f",(function(){return m})),r.d(e,"h",(function(){return p})),r.d(e,"g",(function(){return d})),r.d(e,"k",(function(){return f})),r.d(e,"l",(function(){return g})),r.d(e,"o",(function(){return h})),r.d(e,"j",(function(){return b})),r.d(e,"r",(function(){return v})),r.d(e,"q",(function(){return G})),r.d(e,"p",(function(){return k})),r.d(e,"n",(function(){return y})),r.d(e,"m",(function(){return C}));var a=r("f175"),o=r("6b2d");const s=t=>a.a.get("/group.GroupCategory/list",{params:t}),i=t=>a.a.get("/group.GroupCategory/detail",{params:t}),n=t=>a.a.get("/group.GroupCategory/del",{params:t}),l=t=>a.a.post("/group.GroupCategory/update",t),u=t=>a.a.post("/group.GroupCategory/create",t),c=t=>a.a.get("/group.GroupLabel/list",{params:t}),m=t=>a.a.post("/group.GroupLabel/create",t),p=t=>a.a.get("/group.GroupLabel/detail",{params:t}),d=t=>a.a.get("/group.GroupLabel/del",{params:t}),f=t=>a.a.post("/group.GroupLabel/update",t),g=t=>o.a.get("/chat.Group/list",{params:t}),h=t=>o.a.get("/chat.Group/details",{params:t}),b=t=>o.a.get("/group.GroupLabel/list",{params:t}),v=t=>o.a.post("/chat.Group/update",t),G=t=>o.a.get("/chat.Group/enable",{params:t}),k=t=>o.a.get("/chat.Group/disable",{params:t}),y=t=>o.a.get("/chat.Group/del",{params:t}),C=t=>o.a.get("/chat.Group/chat",{params:t})}}]);