1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a55531f6"],{6317:function(t,e,i){},a9e7:function(t,e,i){"use strict";i.d(e,"j",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"h",(function(){return r})),i.d(e,"i",(function(){return s})),i.d(e,"f",(function(){return l})),i.d(e,"g",(function(){return c})),i.d(e,"d",(function(){return d})),i.d(e,"a",(function(){return u})),i.d(e,"b",(function(){return m})),i.d(e,"e",(function(){return f})),i.d(e,"l",(function(){return p})),i.d(e,"k",(function(){return h}));var a=i("6b6c");function n(){return Object(a.a)({url:"/system/crud/menus",method:"get"})}function o(){return Object(a.a)({url:"/system/crud/column_type",method:"get"})}function r(t){return Object(a.a)({url:"/system/crud/file_path",method:"post",data:t})}function s(t){return Object(a.a)({url:"/system/crud",method:"get",params:t})}function l(t){return Object(a.a)({url:"/system/crud/".concat(t),method:"get"})}function c(t){return Object(a.a)({url:"/system/crud/download/".concat(t),method:"get"})}function d(t){return Object(a.a)({url:"/system/crud/data_dictionary",method:"get",params:t})}function u(){return Object(a.a)({url:"/system/crud/association_table",method:"get"})}function m(t){return Object(a.a)({url:"/system/crud/association_table/".concat(t),method:"get"})}function f(t){return Object(a.a)({url:"/system/crud/data_dictionary/".concat(t),method:"get"})}function p(t,e){return Object(a.a)({url:"/system/crud/data_dictionary/".concat(t),method:"post",data:e})}function h(t,e){return Object(a.a)({url:"/system/crud/save_file/".concat(t),method:"post",data:e})}},cdfd:function(t,e,i){"use strict";i("6317")},cfa3:function(t,e,i){"use strict";i.r(e),i("b0c0");var a=i("5530"),n=(i("14d9"),i("a434"),i("2f62")),o=i("a9e7");a={name:"user_level",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,from:{name:"",page:1,limit:15},dictionaryList:[],optionsModal:!1,dictionaryName:"",optionsList:[],levelLists:[],total:0,FromData:null,imgName:"",visible:!1,titleType:"level",dictionaryId:0}},created:function(){this.getCrudDataDictionary()},computed:Object(a.a)(Object(a.a)({},Object(n.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{beforeChange:function(){this.getCrudDataDictionary()},addOneOptions:function(){this.optionsList.push({label:"",value:""})},delOneOptions:function(t){this.optionsList.splice(t,1)},eidtOptions:function(t){var e=this;this.dictionaryId=t,this.optionsModal=!0,Object(o.e)(this.dictionaryId).then((function(t){e.dictionaryName=t.data.name,e.optionsList=t.data.value||[{label:"",value:""}]}))},addOptions:function(){var t=this,e={name:this.dictionaryName,value:this.optionsList};Object(o.l)(this.dictionaryId,e).then((function(e){t.optionsModal=!1,t.dictionaryId=0,t.dictionaryName="",t.getCrudDataDictionary(),t.$message.success(e.msg)})).catch((function(e){t.$message.error(e.msg)}))},getCrudDataDictionary:function(){var t=this;Object(o.d)(this.from).then((function(e){t.dictionaryList=e.data.list,t.total=e.data.count}))},del:function(t,e,i){var a=this;e={title:e,num:i,url:"system/crud/data_dictionary/".concat(t.id),method:"delete",ids:""};this.$modalSure(e).then((function(t){a.$message.success(t.msg),a.getCrudDataDictionary()})).catch((function(t){a.$message.error(t.msg)}))},add:function(){this.optionsModal=!0,this.dictionaryId=0,this.dictionaryName="",this.optionsList=[{label:"",value:""}]},searchs:function(){this.from.page=1,this.getCrudDataDictionary()},submitFail:function(){this.getList()}}},i("cdfd"),n=i("2877"),i=Object(n.a)(a,(function(){var t=this,e=t._self._c;return e("div",[e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[e("div",{staticClass:"padding-add"},[e("el-form",{ref:"levelFrom",attrs:{model:t.from,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"字典名称:","label-for":"name"}},[e("el-input",{staticClass:"form_content_width",attrs:{clearable:"",placeholder:"请输入字典名称"},model:{value:t.from.name,callback:function(e){t.$set(t.from,"name",e)},expression:"from.name"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:t.searchs}},[t._v("查询")])],1)],1)],1)]),e("el-card",{staticClass:"ivu-mt mt16",attrs:{bordered:!1,shadow:"never"}},[e("el-button",{directives:[{name:"auth",rawName:"v-auth",value:["system-crud-data_dictionary"],expression:"['system-crud-data_dictionary']"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加数据字典")]),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",staticClass:"mt14",attrs:{data:t.dictionaryList,"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[e("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(i){return[e("span",[t._v(t._s(i.row.id))])]}}])}),e("el-table-column",{attrs:{prop:"name",label:"字典名称","min-width":"100"}}),e("el-table-column",{attrs:{label:"字典数据","min-width":"180"},scopedSlots:t._u([{key:"default",fn:function(i){return t._l(i.row.value,(function(i,a){return e("el-tag",{key:a},[t._v(t._s(i.label+" => "+i.value))])}))}}])}),e("el-table-column",{attrs:{fixed:"right",label:"操作",width:"120"},scopedSlots:t._u([{key:"default",fn:function(i){return[e("a",{on:{click:function(e){return t.eidtOptions(i.row.id)}}},[t._v("修改")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.del(i.row,"删除",i.$index)}}},[t._v("删除")])]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.from.page,limit:t.from.limit},on:{"update:page":function(e){return t.$set(t.from,"page",e)},"update:limit":function(e){return t.$set(t.from,"limit",e)},pagination:t.getCrudDataDictionary}}):t._e()],1)],1),e("el-dialog",{attrs:{visible:t.optionsModal,title:"字典配置","close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.optionsModal=e},close:t.beforeChange}},[e("div",{staticClass:"options-list"},[e("el-form",{ref:"form",attrs:{inline:!0,"label-width":"80px"}},[e("div",{staticClass:"mb10"},[e("el-form-item",{attrs:{label:"字典名称:"}},[e("el-input",{staticClass:"mr10",staticStyle:{width:"310px"},attrs:{placeholder:"字典名称"},model:{value:t.dictionaryName,callback:function(e){t.dictionaryName=e},expression:"dictionaryName"}})],1)],1),t._l(t.optionsList,(function(i,a){return e("div",{key:a,staticClass:"item"},[e("el-form-item",{attrs:{label:"数据名称:"}},[e("el-input",{staticClass:"mr10",staticStyle:{width:"150px"},attrs:{placeholder:"label"},model:{value:i.label,callback:function(e){t.$set(i,"label",e)},expression:"item.label"}})],1),e("el-form-item",{attrs:{label:"数据值:"}},[e("el-input",{staticClass:"mr10",staticStyle:{width:"150px"},attrs:{placeholder:"value"},model:{value:i.value,callback:function(e){t.$set(i,"value",e)},expression:"item.value"}})],1),e("div",{staticStyle:{display:"inline-block","margin-bottom":"14px"}},[a==t.optionsList.length-1?e("i",{staticClass:"el-icon-circle-plus-outline add",attrs:{title:"新增"},on:{click:t.addOneOptions}}):t._e(),0<a?e("i",{staticClass:"el-icon-remove-outline delete",attrs:{title:"删除"},on:{click:function(e){return t.delOneOptions(a)}}}):t._e()])],1)}))],2)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.optionsModal=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.addOptions}},[t._v("确 定")])],1)])],1)}),[],!1,null,"1bcfa883",null);e.default=i.exports}}]);
|