1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-869697e4"],{3098:function(e,t,a){},cdb7:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"system-config"},[a("el-card",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],staticClass:"search-card"},[a("div",{staticClass:"form-wrap"},[a("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{prop:"configName"}},[a("el-input",{attrs:{placeholder:e.$t("system.config.898564-1"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.configName,callback:function(t){e.$set(e.queryParams,"configName",t)},expression:"queryParams.configName"}})],1),a("el-form-item",{attrs:{prop:"configKey"}},[a("el-input",{attrs:{placeholder:e.$t("system.config.898564-3"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.configKey,callback:function(t){e.$set(e.queryParams,"configKey",t)},expression:"queryParams.configKey"}})],1),a("el-form-item",{attrs:{prop:"configType"}},[a("el-select",{attrs:{placeholder:e.$t("system.config.898564-4"),clearable:""},model:{value:e.queryParams.configType,callback:function(t){e.$set(e.queryParams,"configType",t)},expression:"queryParams.configType"}},e._l(e.dict.type.sys_yes_no,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e.searchShow?[a("el-form-item",[a("el-date-picker",{staticStyle:{width:"240px"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"-","start-placeholder":e.$t("system.dict.index.880996-3"),"end-placeholder":e.$t("system.dict.index.880996-4")},model:{value:e.dateRange,callback:function(t){e.dateRange=t},expression:"dateRange"}})],1)]:e._e()],2),a("div",{staticClass:"search-btn-group"},[a("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("search")))]),a("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("reset")))]),a("el-button",{attrs:{type:"text"},on:{click:e.searchChange}},[a("span",{staticStyle:{color:"#486ff2","margin-left":"14px"}},[e._v(e._s(e.searchShow?e.$t("template.index.891112-113"):e.$t("template.index.891112-112")))]),a("i",{class:{"el-icon-arrow-down":!e.searchShow,"el-icon-arrow-up":e.searchShow},staticStyle:{color:"#486ff2","margin-left":"10px"}})])],1)],1)]),a("el-card",[a("el-row",{staticStyle:{"margin-bottom":"16px"},attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:config:add"],expression:"['system:config:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"small"},on:{click:e.handleAdd}},[e._v(e._s(e.$t("add")))])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:config:edit"],expression:"['system:config:edit']"}],attrs:{plain:"",icon:"el-icon-edit",size:"small",disabled:e.single},on:{click:e.handleUpdate}},[e._v(e._s(e.$t("update")))])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:config:remove"],expression:"['system:config:remove']"}],attrs:{plain:"",icon:"el-icon-delete",size:"small",disabled:e.multiple},on:{click:e.handleDelete}},[e._v(e._s(e.$t("del")))])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:config:export"],expression:"['system:config:export']"}],attrs:{plain:"",icon:"el-icon-download",size:"small"},on:{click:e.handleExport}},[e._v(e._s(e.$t("export")))])],1),a("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.configList,border:!1},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),a("el-table-column",{attrs:{label:e.$t("system.config.898564-5"),align:"center",prop:"configId",width:"80"}}),a("el-table-column",{attrs:{label:e.$t("system.config.898564-0"),align:"left",prop:"configName","show-overflow-tooltip":!0,"min-width":"210"}}),a("el-table-column",{attrs:{label:e.$t("system.config.898564-2"),align:"left",prop:"configKey","show-overflow-tooltip":!0,"min-width":"210"}}),a("el-table-column",{attrs:{label:e.$t("system.config.898564-6"),align:"left",prop:"configValue","min-width":"180"}}),a("el-table-column",{attrs:{label:e.$t("system.config.898564-4"),align:"center",prop:"configType",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("dict-tag",{attrs:{options:e.dict.type.sys_yes_no,value:t.row.configType}})]}}])}),a("el-table-column",{attrs:{label:e.$t("remark"),align:"left","header-align":"left",prop:"remark","show-overflow-tooltip":!0,"min-width":"250"}}),a("el-table-column",{attrs:{label:e.$t("creatTime"),align:"center",prop:"createTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.createTime)))])]}}])}),a("el-table-column",{attrs:{fixed:"right",label:e.$t("opation"),align:"center","class-name":"small-padding fixed-width",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:config:edit"],expression:"['system:config:edit']"}],attrs:{size:"small",type:"text",icon:"el-icon-edit"},on:{click:function(a){return e.handleUpdate(t.row)}}},[e._v(e._s(e.$t("update")))]),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:config:remove"],expression:"['system:config:remove']"}],attrs:{size:"small",type:"text",icon:"el-icon-delete"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v(e._s(e.$t("del")))])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],staticStyle:{"margin-bottom":"20px"},attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}})],1),a("el-dialog",{attrs:{title:e.title,visible:e.open,width:"600px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:e.$t("system.config.898564-0"),prop:"configName"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:e.$t("system.config.898564-1")},model:{value:e.form.configName,callback:function(t){e.$set(e.form,"configName",t)},expression:"form.configName"}})],1),a("el-form-item",{attrs:{label:e.$t("system.config.898564-2"),prop:"configKey"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:e.$t("system.config.898564-3")},model:{value:e.form.configKey,callback:function(t){e.$set(e.form,"configKey",t)},expression:"form.configKey"}})],1),a("el-form-item",{attrs:{label:e.$t("system.config.898564-6"),prop:"configValue"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:e.$t("system.config.898564-7")},model:{value:e.form.configValue,callback:function(t){e.$set(e.form,"configValue",t)},expression:"form.configValue"}})],1),a("el-form-item",{attrs:{label:e.$t("system.config.898564-4"),prop:"configType"}},[a("el-radio-group",{model:{value:e.form.configType,callback:function(t){e.$set(e.form,"configType",t)},expression:"form.configType"}},e._l(e.dict.type.sys_yes_no,(function(t){return a("el-radio",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.label))])})),1)],1),a("el-form-item",{attrs:{label:e.$t("remark"),prop:"remark"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{type:"textarea",placeholder:e.$t("plzInput"),autosize:{minRows:3,maxRows:5}},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("confirm")))]),a("el-button",{on:{click:e.cancel}},[e._v(e._s(e.$t("cancel")))])],1)],1)],1)},n=[],o=a("5530"),s=(a("d81d"),a("c0c3")),r={name:"Config",dicts:["sys_yes_no"],data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,searchShow:!1,total:0,configList:[],title:"",open:!1,dateRange:[],queryParams:{pageNum:1,pageSize:10,configName:void 0,configKey:void 0,configType:void 0},form:{},rules:{configName:[{required:!0,message:this.$t("system.config.898564-8"),trigger:"blur"}],configKey:[{required:!0,message:this.$t("system.config.898564-9"),trigger:"blur"}],configValue:[{required:!0,message:this.$t("system.config.898564-10"),trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,Object(s["e"])(this.addDateRange(this.queryParams,this.dateRange)).then((function(t){e.configList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={configId:void 0,configName:void 0,configKey:void 0,configValue:void 0,configType:"Y",remark:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.dateRange=[],this.resetForm("queryForm"),this.handleQuery()},handleAdd:function(){this.reset(),this.open=!0,this.title=this.$t("system.config.898564-11")},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.configId})),this.single=1!=e.length,this.multiple=!e.length},handleUpdate:function(e){var t=this;this.reset();var a=e.configId||this.ids;Object(s["c"])(a).then((function(e){t.form=e.data,t.open=!0,t.title=t.$t("system.config.898564-12")}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(void 0!=e.form.configId?Object(s["g"])(e.form).then((function(t){e.$modal.msgSuccess(e.$t("updateSuccess")),e.open=!1,e.getList()})):Object(s["a"])(e.form).then((function(t){e.$modal.msgSuccess(e.$t("addSuccess")),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,a=e.configId||this.ids;this.$modal.confirm(this.$t("system.config.898564-13",[a])).then((function(){return Object(s["b"])(a)})).then((function(){t.getList(),t.$modal.msgSuccess(t.$t("delSuccess"))})).catch((function(){}))},handleExport:function(){this.download("system/config/export",Object(o["a"])({},this.queryParams),"config_".concat((new Date).getTime(),".xlsx"))},handleRefreshCache:function(){var e=this;Object(s["f"])().then((function(){e.$modal.msgSuccess(e.$t("system.dict.index.880996-12"))}))},searchChange:function(){this.searchShow=!this.searchShow}}},l=r,c=(a("f4f9"),a("2877")),m=Object(c["a"])(l,i,n,!1,null,"27329931",null);t["default"]=m.exports},f4f9:function(e,t,a){"use strict";a("3098")}}]); |