chunk-36ddeec9.dd45c873.js 6.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-36ddeec9"],{"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,sizeChange:t.sizeChange,add:t.openPopup}}),a("dict-edit",{attrs:{isShow:t.isPopupShow,curObj:t.curObj},on:{close:t.closePopup}})],1)},s=[],n=(a("99af"),a("ed08"),a("8147")),o=a("f1af"),r=a("4fef"),c={name:"basePublicDictSys",components:{SearchForm:n["default"],DictEdit:o["default"]},provide:function(){return{parentData:this}},mixins:[r["default"]],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()}}},l=c,u=a("2877"),d=Object(u["a"])(l,i,s,!1,null,null,null);e["default"]=d.exports},"4fef":function(t,e,a){"use strict";a.r(e);var i=a("ade3"),s=a("5530");a("4e82"),a("e9c4"),a("a9e3");e["default"]={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(s["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.searchForm=Object(s["a"])({},e),this.fetchData(e)},fetchData:function(t){var e=this;if(this.apiStr){var a={page:this.currentPage,page_size:this.pageSize};t?a=Object(s["a"])(Object(s["a"])({},a),t):this.searchForm&&(a=Object(s["a"])(Object(s["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}))}}}}},8147: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("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)},s=[],n=a("5530"),o={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(n["a"])({},t);this.$emit("change",e)},updateCash:function(){var t=this;this.$store.dispatch("user/getDict").then().then((function(e){t.$msg("更新成功~")}))}}},r=o,c=a("2877"),l=Object(c["a"])(r,i,s,!1,null,null,null);e["default"]=l.exports},f1af: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("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)},s=[],n=a("5530"),o={props:{isShow:Boolean,curObj:Object},mixins:mixins,data:function(){return{formData:[],loading:!0}},watch:{isShow:function(t){if(t){var e=Object(n["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(n["a"])({},a),s="dicttypeadd";e.curObj&&e.curObj.id&&(i.dict_id=e.curObj.id,s="dicttypeedit"),e.$api.base[s](i).then((function(t){e.$msgs("保存成功!"),e.$emit("close",i)}))}})):(this.$emit("close"),this.setDefaultValue())}}},r=o,c=a("2877"),l=Object(c["a"])(r,i,s,!1,null,null,null);e["default"]=l.exports}}]);