text: (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6993","chunk-1e96","chunk-2e34"],{BGqb:function(t,e,i){"use strict";i.r(e);var a=i("41Be"),s=i("3ADX"),r=i("twU4"),n=i("Z2hD"),o=i("qfVO"),l=i("bIOP"),c={components:{eHeader:n.default,edit:o.default,dictDetail:l.default},mixins:[s.a],data:function(){return{delLoading:!1,sup_this:this}},created:function(){var t=this;this.$nextTick(function(){t.init()})},methods:{checkPermission:a.a,beforeInit:function(){this.url="api/dict";this.params={page:this.page,size:this.size,sort:"id,desc"};var t=this.query,e=t.type,i=t.value;return e&&i&&(this.params[e]=i),this.$refs.dictDetail&&(this.$refs.dictDetail.data=[],this.$refs.dictDetail.dictName=""),!0},subDelete:function(t){var e=this;this.delLoading=!0,Object(r.b)(t).then(function(i){e.delLoading=!1,e.$refs[t].doClose(),e.init(),e.$notify({title:"删除成功",type:"success",duration:2500})}).catch(function(i){e.delLoading=!1,e.$refs[t].doClose(),console.log(i.response.data.message)})},handleCurrentChange:function(t){t&&(this.$refs.dictDetail.dictName=t.name,this.$refs.dictDetail.dictId=t.id,this.$refs.dictDetail.init())}}},d=(i("OW6U"),i("KHd+")),u=Object(d.a)(c,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("el-row",{attrs:{gutter:10}},[i("el-col",{attrs:{xs:24,sm:24,md:10,lg:10,xl:10}},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[t._v("字典列表")]),t._v(" "),t.checkPermission(["ADMIN","DICT_ALL","DICT_CREATE"])?i("el-button",{staticClass:"filter-item",staticStyle:{float:"right",padding:"4px 10px"},attrs:{size:"mini",type:"primary",icon:"el-icon-plus"},on:{click:function(e){t.$refs.header.$refs.form.dialog=!0}}},[t._v("新增")]):t._e()],1),t._v(" "),i("eHeader",{ref:"header",attrs:{query:t.query,sup_this:t.sup_this}}),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.data,size:"small","highlight-current-row":""},on:{"current-change":t.handleCurrentChange}},[i("el-table-column",{attrs:{"show-overflow-tooltip":!0,prop:"name",label:"名称"}}),t._v(" "),i("el-table-column",{attrs:{"show-overflow-tooltip":!0,prop:"remark",label:"描述"}}),t._v(" "),i("el-table-column",{attrs:{label:"操作",width:"150px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.checkPermission(["ADMIN","DICT_ALL","DICT_EDIT"])?i("edit",{attrs:{data:e.row,sup_this:t.sup_this}}):t._e(),t._v(" "),t.checkPermission(["ADMIN","DICT_ALL","DICT_DELETE"])?i("el-popover",{ref:e.row.id,attrs:{placement:"top",width:"180"}},[i("p",[t._v("此操作将删除字典与对应的字典详情，确定要删除吗？")]),t._v(" "),i("div",{staticStyle:{"text-align":"right",margin:"0"}},[i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(i){t.$refs[e.row.id].doClose()}}},[t._v("取消")]),t._v(" "),i("el-button",{attrs:{loading:t.delLoading,type:"primary",size:"mini"},on:{click:function(i){t.subDelete(e.row.id)}}},[t._v("确定")])],1),t._v(" "),i("el-button",{attrs:{slot:"reference",type:"danger",size:"mini"},slot:"reference"},[t._v("删除")])],1):t._e()]}}])})],1),t._v(" "),i("el-pagination",{staticStyle:{"margin-top":"8px"},attrs:{total:t.total,layout:"total, prev, pager, next, sizes"},on:{"size-change":t.sizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),i("el-col",{attrs:{xs:24,sm:24,md:14,lg:14,xl:14}},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[t._v("字典详情\n            "),i("span",{staticStyle:{color:"#317EF3"}},[t._v("\n              "+t._s(this.$refs.dictDetail?this.$refs.dictDetail.dictName:"")+"\n            ")])]),t._v(" "),t.checkPermission(["ADMIN","DICT_ALL","DICT_CREATE"])&&this.$refs.dictDetail&&this.$refs.dictDetail.dictName?i("el-button",{staticClass:"filter-item",staticStyle:{float:"right",padding:"4px 10px"},attrs:{size:"mini",type:"primary",icon:"el-icon-plus"},on:{click:function(e){t.$refs.dictDetail.$refs.header.$refs.form.dialog=!0}}},[t._v("新增")]):t._e()],1),t._v(" "),i("dictDetail",{ref:"dictDetail"})],1)],1)],1)],1)},[],!1,null,"61d16af4",null);u.options.__file="index.vue";e.default=u.exports},DlCE:function(t,e,i){"use strict";i.r(e);var a=i("twU4"),s={props:{isAdd:{type:Boolean,required:!0},sup_this:{type:Object,default:null}},data:function(){return{loading:!1,dialog:!1,form:{id:"",name:"",remark:""},rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}]}}},methods:{cancel:function(){this.resetForm()},doSubmit:function(){var t=this;this.$refs.form.validate(function(e){e&&(t.loading=!0,t.isAdd?t.doAdd():t.doEdit())})},doAdd:function(){var t=this;Object(a.a)(this.form).then(function(e){t.resetForm(),t.$notify({title:"添加成功",type:"success",duration:2500}),t.loading=!1,t.sup_this.init()}).catch(function(e){t.loading=!1,console.log(e.response.data.message)})},doEdit:function(){var t=this;Object(a.c)(this.form).then(function(e){t.resetForm(),t.$notify({title:"修改成功",type:"success",duration:2500}),t.loading=!1,t.sup_this.init()}).catch(function(e){t.loading=!1,console.log(e.response.data.message)})},resetForm:function(){this.dialog=!1,this.$refs.form.resetFields(),this.form={id:"",name:"",remark:""}}}},r=(i("ro71"),i("KHd+")),n=Object(r.a)(s,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{"append-to-body":!0,visible:t.dialog,title:t.isAdd?"新增字典":"编辑字典",width:"500px"},on:{"update:visible":function(e){t.dialog=e}}},[i("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,size:"small","label-width":"80px"}},[i("el-form-item",{attrs:{label:"字典名称",prop:"name"}},[i("el-input",{staticStyle:{width:"370px"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"描述"}},[i("el-input",{staticStyle:{width:"370px"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)],1),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"text"},on:{click:t.cancel}},[t._v("取消")]),t._v(" "),i("el-button",{attrs:{loading:t.loading,type:"primary"},on:{click:t.doSubmit}},[t._v("确认")])],1)],1)},[],!1,null,"1338d7c3",null);n.options.__file="form.vue";e.default=n.exports},JJA1:function(t,e,i){},LT6A:function(t,e,i){},OW6U:function(t,e,i){"use strict";var a=i("JJA1");i.n(a).a},Smfa:function(t,e,i){},Y9DL:function(t,e,i){"use strict";var a=i("LT6A");i.n(a).a},Z2hD:function(t,e,i){"use strict";i.r(e);var a=i("41Be"),s={components:{eForm:i("DlCE").default},props:{query:{type:Object,required:!0},sup_this:{type:Object,required:!0}},data:function(){return{queryTypeOptions:[{key:"name",display_name:"字典名称"},{key:"remark",display_name:"描述"}]}},methods:{checkPermission:a.a,toQuery:function(){this.sup_this.page=0,this.sup_this.init()}}},r=i("KHd+"),n=Object(r.a)(s,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"head-container"},[i("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{clearable:"",placeholder:"输入搜索内容"},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.toQuery(e):null}},model:{value:t.query.value,callback:function(e){t.$set(t.query,"value",e)},expression:"query.value"}}),t._v(" "),i("el-select",{staticClass:"filter-item",staticStyle:{width:"130px"},attrs:{clearable:"",placeholder:"类型"},model:{value:t.query.type,callback:function(e){t.$set(t.query,"type",e)},expression:"query.type"}},t._l(t.queryTypeOptions,function(t){return i("el-option",{key:t.key,attrs:{label:t.display_name,value:t.key}})})),t._v(" "),i("el-button",{staticClass:"filter-item",attrs:{size:"mini",type:"primary",icon:"el-icon-search"},on:{click:t.toQuery}},[t._v("搜索")]),t._v(" "),i("div",{staticStyle:{display:"inline-block",margin:"0px 2px"}},[i("eForm",{ref:"form",attrs:{"is-add":!0,sup_this:t.sup_this}})],1)],1)},[],!1,null,null,null);n.options.__file="header.vue";e.default=n.exports},qfVO:function(t,e,i){"use strict";i.r(e);var a={components:{eForm:i("DlCE").default},props:{data:{type:Object,required:!0},sup_this:{type:Object,required:!0}},methods:{to:function(){var t=this.$refs.form;t.form={id:this.data.id,name:this.data.name,remark:this.data.remark},t.dialog=!0}}},s=(i("Y9DL"),i("KHd+")),r=Object(s.a)(a,function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("el-button",{attrs:{size:"mini",type:"success"},on:{click:this.to}},[this._v("编辑")]),this._v(" "),e("eForm",{ref:"form",attrs:{sup_this:this.sup_this,"is-add":!1}})],1)},[],!1,null,"ee39f8fa",null);r.options.__file="edit.vue";e.default=r.exports},ro71:function(t,e,i){"use strict";var a=i("Smfa");i.n(a).a},twU4:function(t,e,i){"use strict";i.d(e,"a",function(){return s}),i.d(e,"b",function(){return r}),i.d(e,"c",function(){return n});var a=i("t3Un");function s(t){return Object(a.a)({url:"api/dict",method:"post",data:t})}function r(t){return Object(a.a)({url:"api/dict/"+t,method:"delete"})}function n(t){return Object(a.a)({url:"api/dict",method:"put",data:t})}}}]);