chunk-5aaa625d.bb66f1c2.js 5.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5aaa625d"],{"3b4d":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("search-form",{attrs:{listLoading:t.listLoading},on:{change:t.searchHandle,add:t.openPopup}}),a("table-list",{attrs:{operationsDefaultLength:3,listLoading:t.listLoading,data:t.tableData,columns:t.listConfig,currentPage:t.currentPage,pageSize:t.pageSize,totalRecords:t.totalRecords,isAdd:!0},on:{currentChange:t.pageHandle,add:t.openPopup}}),a("dict-edit",{attrs:{isShow:t.isPopupShow,curObj:t.curObj},on:{close:t.closePopup}})],1)},n=[],s=(a("99af"),a("ed08"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("header-collapse",[a("base-form",{ref:"ruleForm",attrs:{slot:"content",data:t.searchData},slot:"content"},[a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticClass:"xl-form-btn bgc1",attrs:{loading:t.listLoading,icon:"el-icon-search"},on:{click:t.searchHandle}},[t._v("查询")]),a("el-button",{staticClass:"xl-form-btn t4",attrs:{loading:t.listLoading},on:{click:t.updateCash}},[t._v("更新缓存")])],1)])],1)}),o=[],r=a("5530"),c={props:{listLoading:Boolean},inject:["parentData"],data:function(){return{searchData:[{label:"类型名称",key:"dict_name"},{label:"编号",key:"dict_type"}]}},methods:{searchHandle:function(){var t=this.$refs.ruleForm.baseForm,e=Object(r["a"])({},t);this.$emit("change",e)},updateCash:function(){var t=this;this.$store.dispatch("user/getDict").then().then((function(e){t.$msg("更新成功~")}))}}},l=c,u=a("2877"),d=Object(u["a"])(l,s,o,!1,null,null,null),h=d.exports,p=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"show-close":!1,"close-on-click-modal":!1,visible:t.isShow,title:this.curObj&&this.curObj.id?"编辑字典类型":"添加字典类型",fullscreen:!1,width:"470px","custom-class":"xl-dialog",center:""},on:{"update:visible":function(e){t.isShow=e}}},[a("base-form",{ref:"ruleForm",staticStyle:{width:"400px"},attrs:{data:t.formData,isInline:!1,labelWidth:"120px"}},[a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticClass:"xl-form-btn t2",on:{click:t.close}},[t._v("关 闭")]),a("el-button",{staticClass:"xl-form-btn t1",on:{click:function(e){return t.close("confirm")}}},[t._v("确定")])],1)])],1)},f=[],b={props:{isShow:Boolean,curObj:Object},mixins:mixins,data:function(){return{formData:[],loading:!0}},watch:{isShow:function(t){if(t){var e=Object(r["a"])({},this.curObj);e.system||(e.system="2");var a=!1;e.dict_type&&(a=!0),this.formData=[{label:"类型代号",key:"dict_type",disabled:a,rules:1},{label:"类型名称",key:"dict_name",rules:1},{label:"类型说明",key:"remark"}],this.setDefaultValue(e)}}},methods:{systemChange:function(t){},close:function(t){var e=this;"confirm"===t?this.$refs["ruleForm"].$refs["baseForm"].validate((function(t){if(t){var a=e.$refs.ruleForm.baseForm,i=Object(r["a"])({},a),n="dicttypeadd";e.curObj&&e.curObj.id&&(i.dict_id=e.curObj.id,n="dicttypeedit"),e.$api.base[n](i).then((function(t){e.$msgs("保存成功!"),e.$emit("close",i)}))}})):(this.$emit("close"),this.setDefaultValue())}}},m=b,g=Object(u["a"])(m,p,f,!1,null,null,null),v=g.exports,D=a("4fef"),y={name:"basePublicDictSys",components:{SearchForm:h,DictEdit:v},provide:function(){return{parentData:this}},mixins:[D["a"]],created:function(){},data:function(){return{apiStr:"base.admdicttypelist",searchForm:null,isPopupShow:!1,curObj:{}}},mounted:function(){this.listConfig={rows:[{label:"类型编号",prop:"dict_type"},{label:"类型名称",prop:"dict_name"},{label:"类型说明",prop:"remark",fullShow:!0},{label:"更新人",prop:"update_by"},{label:"更新时间",prop:"update_at"},{label:"操作",width:230,type:"handle2",operations:[{label:"编辑",func:this.openPopup,btnType:"primary"},{label:"管理内容详情",func:this.linkDtl,btnType:"success"},{label:"删除",func:this.delHandle,btnType:"danger",hide:"nosys"}]}]}},methods:{delHandle:function(t){var e=this,a="确定要删除此字典吗?";this.$msg(a,"confirm",(function(){e.$api.base.dicttypedel({dict_id:t.id}).then((function(t){e.$msgs("删除成功!"),e.fetchData()}))}),null,!0)},linkDtl:function(t){this.$router.push("/base/dictDtl?dict_type=".concat(t.dict_type,"&dict_name=").concat(t.dict_name,"&id=").concat(t.id))},openPopup:function(t){this.curObj=t,this.isPopupShow=!0},closePopup:function(t){this.isPopupShow=!1,t&&this.fetchData()}}},O=y,_=Object(u["a"])(O,i,n,!1,null,null,null);e["default"]=_.exports},"4fef":function(t,e,a){"use strict";var i=a("ade3"),n=a("5530");a("1276"),a("ac1f"),a("a9e3");e["a"]={data:function(){return{listLoading:!1,tableData:[],currentPage:1,pageSize:10,totalRecords:1,listConfig:{},operations:[]}},created:function(){var t=this;this.$nextTick((function(){t.noCreated||t.fetchData()}))},methods:{searchHandle:function(t){this.currentPage=1,this.searchForm=t,this.fetchData()},sizeChange:function(t){this.pageSize=t,this.currentPage=1,this.fetchData()},pageHandle:function(t){this.currentPage=t,this.fetchData()},sortChange:function(t){this.currentPage=1;var e=Object(n["a"])({},this.searchForm);"ascending"===t.order?e.sort=JSON.stringify(Object(i["a"])({},t.prop,"asc")):e.sort=JSON.stringify(Object(i["a"])({},t.prop,"desc")),this.fetchData(e)},fetchData:function(t){var e=this;if(this.apiStr){var a={page:this.currentPage,page_size:this.pageSize};t?a=Object(n["a"])(Object(n["a"])({},a),t):this.searchForm&&(a=Object(n["a"])(Object(n["a"])({},a),this.searchForm)),this.getDataBefore&&this.getDataBefore(a),this.listLoading=!0;var i=this.apiStr.split(".");this.$api[i[0]][i[1]](a).then((function(t){return 1===e.currentPage&&(e.pageSize=t.page_size||1),e.totalRecords=t.total?Number(t.total):0,e.tableData=t.list||[],e.listLoading=!1,e.getMoreData&&e.getMoreData(t,a),t})).catch((function(t){e.listLoading=!1}))}}}}}}]);