chunk-2d0c9a89.4b55aff1.js 5.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c9a89"],{"59a0":function(t,e,a){"use strict";function i(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function r(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?i(Object(a),!0).forEach((function(e){s(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function s(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}a.r(e);var n=function(){var t=this,e=t._self._c;return e("a-card",{attrs:{bordered:!1}},[e("a-drawer",{attrs:{title:"字典列表",width:t.screenWidth,visible:t.visible},on:{close:t.onClose}},[e("div",{style:{padding:"10px",border:"1px solid #e9e9e9",background:"#fff"}},[e("div",{staticClass:"table-page-search-wrapper"},[e("a-form",{attrs:{layout:"inline",form:t.form},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.searchQuery.apply(null,arguments)}}},[e("a-row",{attrs:{gutter:10}},[e("a-col",{attrs:{md:8,sm:12}},[e("a-form-item",{attrs:{label:"名称"}},[e("a-input",{staticStyle:{width:"120px"},attrs:{placeholder:"请输入名称"},model:{value:t.queryParam.itemText,callback:function(e){t.$set(t.queryParam,"itemText",e)},expression:"queryParam.itemText"}})],1)],1),e("a-col",{attrs:{md:9,sm:24}},[e("a-form-item",{staticStyle:{width:"170px"},attrs:{label:"状态",labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[e("a-select",{attrs:{placeholder:"请选择"},model:{value:t.queryParam.status,callback:function(e){t.$set(t.queryParam,"status",e)},expression:"queryParam.status"}},[e("a-select-option",{attrs:{value:"1"}},[t._v("正常")]),e("a-select-option",{attrs:{value:"0"}},[t._v("禁用")])],1)],1)],1),e("a-col",{attrs:{md:7,sm:24}},[e("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"left"}},[e("a-button",{attrs:{type:"primary"},on:{click:t.searchQuery}},[t._v("搜索")]),e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary"},on:{click:t.searchReset}},[t._v("重置")])],1)])],1),e("a-row",[e("a-col",{attrs:{md:2,sm:24}},[e("a-button",{staticStyle:{"margin-bottom":"10px"},attrs:{type:"primary"},on:{click:t.handleAdd}},[t._v("新增")])],1)],1)],1)],1),e("div",[e("a-table",{ref:"table",attrs:{rowKey:"itemValue",size:"middle",columns:t.columns,dataSource:t.dataSource,pagination:t.ipagination,loading:t.loading},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"action",fn:function(a,i){return e("span",{},[e("a",{on:{click:function(e){return t.handleEdit(r(r({},i),{},{dictId:t.dictId}))}}},[t._v("编辑")]),e("a-divider",{attrs:{type:"vertical"}}),e("a-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(){return t.handleDelete({itemValue:i.itemValue,id:t.dictId})}}},[e("a",[t._v("删除")])])],1)}}])})],1)])]),e("dict-item-modal",{ref:"modalForm",on:{ok:t.modalFormOk}})],1)},o=[],l=a("88bc"),c=a.n(l),d=a("ca00"),u=a("8144"),m=a("b65a"),p={name:"DictItemList",mixins:[m["a"]],components:{DictItemModal:u["default"]},data:function(){return{columns:[{title:"名称",align:"center",dataIndex:"itemText"},{title:"数据值",align:"center",dataIndex:"itemValue"},{title:"操作",dataIndex:"action",align:"center",scopedSlots:{customRender:"action"}}],queryParam:{dictId:"",dictName:"",itemText:"",delFlag:"1",status:[]},title:"操作",visible:!1,screenWidth:800,model:{},dictId:"",status:1,labelCol:{xs:{span:5},sm:{span:5}},wrapperCol:{xs:{span:12},sm:{span:12}},form:this.$form.createForm(this),validatorRules:{itemText:{rules:[{required:!0,message:"请输入名称!"}]},itemValue:{rules:[{required:!0,message:"请输入数据值!"}]}},url:{list:"/admin/dictItem/list",delete:"/admin/dictItem/delete",deleteBatch:"/admin/dictItem/deleteBatch"}}},created:function(){this.resetScreenSize()},methods:{add:function(t){this.dictId=t,this.edit({})},edit:function(t){var e=this;t._id&&(this.dictId=t._id),this.queryParam={},this.form.resetFields(),this.model=Object.assign({},t),this.model.dictId=this.dictId,this.model.status=this.status,this.visible=!0,this.$nextTick((function(){e.form.setFieldsValue(c()(e.model,"itemText","itemValue"))})),this.loadData()},getQueryParams:function(){var t=Object.assign({},this.queryParam);return t.dictId=this.dictId,t.field=this.getQueryField(),t.pageNo=this.ipagination.current,t.pageSize=this.ipagination.pageSize,this.superQueryParams&&(t["superQueryParams"]=encodeURI(this.superQueryParams),t["superQueryMatchType"]=this.superQueryMatchType),Object(d["d"])(t)},handleAdd:function(){this.$refs.modalForm.add(this.dictId),this.$refs.modalForm.title="新增"},showDrawer:function(){this.visible=!0},onClose:function(){this.visible=!1,this.form.resetFields(),this.dataSource=[]},resetScreenSize:function(){var t=document.body.clientWidth;this.screenWidth=t<600?t:600}}},h=p,f=a("2877"),y=Object(f["a"])(h,n,o,!1,null,"37dfbd26",null);e["default"]=y.exports}}]);