data-dump/files/dist_en/static/js/chunk-38774454.ece9b298.js

1 line
11 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-38774454"],{"09fb":function(t,e,a){"use strict";a("b89e")},"129f":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},"841c":function(t,e,a){"use strict";var n=a("d784"),i=a("825a"),o=a("1d80"),r=a("129f"),l=a("14c3");n("search",1,(function(t,e,a){return[function(e){var a=o(this),n=void 0==e?void 0:e[t];return void 0!==n?n.call(e,a):new RegExp(e)[t](String(a))},function(t){var n=a(e,t,this);if(n.done)return n.value;var o=i(t),s=String(this),u=o.lastIndex;r(u,0)||(o.lastIndex=0);var c=l(o,s);return r(o.lastIndex,u)||(o.lastIndex=u),null===c?-1:c.index}]}))},b0de:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"Code"}},[a("el-input",{attrs:{clearable:""},model:{value:t.form.code,callback:function(e){t.$set(t.form,"code",e)},expression:"form.code"}})],1)],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"Value"}},[a("el-input",{attrs:{clearable:""},model:{value:t.form.value,callback:function(e){t.$set(t.form,"value",e)},expression:"form.value"}})],1)],1),a("el-col",{staticClass:"cm-align-right",attrs:{span:12}},[a("el-button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("Search")]),a("el-button",{on:{click:t.initParams}},[t._v("Clear")])],1)],1)],1),a("div",{staticClass:"cm-operate-row"},[a("el-button",{on:{click:t.addRowHandle}},[t._v("Add")])],1),a("Table",{ref:"sysConfigManageTable",attrs:{columns:t.table.columns,"request-function":t.table.getList,border:"",params:t.form},scopedSlots:t._u([{key:"operate",fn:function(e){var n=e.scope;return[a("el-button",{staticClass:"el-icon-edit",attrs:{type:"text",size:"mini"},on:{click:function(e){return t.editRowHandle(n.row)}}},[t._v(" Edit ")]),a("el-button",{staticClass:"el-icon-delete cm-danger",attrs:{type:"text",size:"mini"},on:{click:function(e){return t.deleteRowHandle(n.row)}}},[t._v(" Delete ")])]}}])}),a("AddAndEdit",{attrs:{type:t.dialogType,"dialog-visible":t.dialogVisible,form:t.editForm},on:{"update:dialogVisible":function(e){t.dialogVisible=e},"update:dialog-visible":function(e){t.dialogVisible=e},"update:form":function(e){t.editForm=e},close:t.initEditForm,success:t.search}})],1)},i=[],o=a("5530"),r=(a("e9c4"),a("ac1f"),a("841c"),a("fa7d")),l=a("b775");function s(t){return Object(l["a"])({url:"/systemConfig/page",method:"get",params:t})}function u(t){return Object(l["a"])({url:"/systemConfig",method:"post",data:t})}function c(t){return Object(l["a"])({url:"/systemConfig",method:"put",data:t})}function d(t){return Object(l["a"])({url:"/systemConfig",method:"delete",data:t})}var p=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{visible:t.dialogVisible,width:"80%","show-close":!1,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e},open:t.open,close:t.initForm},scopedSlots:t._u([{key:"title",fn:function(){return[a("span",{staticClass:"el-dialog__title"},[t._v(" "+t._s("edit"==t.type?"Edit":"Add")+" ")])]},proxy:!0}])},[a("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"Value"}},["BATCH_TYPE"!==t.form.code?a("el-input",{model:{value:t.form.value,callback:function(e){t.$set(t.form,"value",e)},expression:"form.value"}}):a("el-select",{model:{value:t.form.value,callback:function(e){t.$set(t.form,"value",e)},expression:"form.value"}},t._l(t.batchValue,(function(t){return a("el-option",{key:t,attrs:{label:t,value:t}})})),1)],1)],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){return t.changeVisible(!1)}}},[t._v("Cancel")]),a("el-button",{attrs:{type:"primary"},on:{click:t.submitData}},[t._v(t._s("edit"==t.type?"Save":"Add")+" ")])],1)],1)},f=[],g={components:{},props:{type:{type:String,default:"edit"},dialogVisible:{type:Boolean,default:!1},form:{type:Object,default:function(){return{}}}},data:function(){return{name:"",batchValue:["YEAR","MONTH","WEEK"]}},created:function(){},methods:{open:function(){},changeVisible:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.$emit("update:dialogVisible",t),e&&this.$emit("success",!0)},add:function(t){var e=this;c(t).then((function(t){console.log("Add",t),!0===t.data?(e.$message.success("Added successfully"),e.changeVisible(!1,!0)):e.$message.error(t.message||"error")}))},edit:function(t){var e=this;u(t).then((function(t){!0===t.data?(e.$message.success("Saved successfully"),e.changeVisible(!1,!0)):e.$message.error(t.message||"error")}))},submitData:function(){"add"===this.type?this.add(this.form):this.edit(this.form)},initForm:function(){this.$emit("close")}}},m=g,h=a("2877"),b=Object(h["a"])(m,p,f,!1,null,"44c9f0f8",null),v=b.exports,y=a("f4f7"),_=[{type:"index",label:"Index",prop:"index",width:50},{label:"Code",prop:"code"},{label:"Remark",prop:"comment"},{label:"Created Time",prop:"createdDate"},{label:"Last Modified Time",prop:"lastModifiedDate"},{label:"Value",prop:"value"},{label:"Actions",prop:"operate",isSlot:!0,width:120}],S={apis:"",id:"",createdDate:"",type:""},w={name:"SysConfigManage",components:{AddAndEdit:v,Table:y["a"]},data:function(){return{form:S,table:{columns:_,getList:s},dialogType:null,dialogVisible:!1,editForm:{}}},created:function(){},methods:{search:function(){this.$refs.sysConfigManageTable.handleGetList(Object(r["a"])(Object(o["a"])(Object(o["a"])({},this.form),{},{current:1,size:10})))},initParams:function(){Object(r["b"])(this.form)},addRowHandle:function(){this.dialogType="add",this.dialogVisible=!0},editRowHandle:function(t){this.dialogType="edit",this.editForm=JSON.parse(JSON.stringify(t)),this.dialogVisible=!0},deleteRowHandle:function(t){var e=this;d(t).then((function(t){console.log("delete",t),!0===t.data&&(e.$message.success("Deleted successfully"),e.search())}))},initEditForm:function(){this.editForm={}}}},$=w,k=Object(h["a"])($,n,i,!1,null,null,null);e["default"]=k.exports},b89e:function(t,e,a){},e9c4:function(t,e,a){var n=a("23e7"),i=a("d066"),o=a("d039"),r=i("JSON","stringify"),l=/[\uD800-\uDFFF]/g,s=/^[\uD800-\uDBFF]$/,u=/^[\uDC00-\uDFFF]$/,c=function(t,e,a){var n=a.charAt(e-1),i=a.charAt(e+1);return s.test(t)&&!u.test(i)||u.test(t)&&!s.test(n)?"\\u"+t.charCodeAt(0).toString(16):t},d=o((function(){return'"\\udf06\\ud834"'!==r("\udf06\ud834")||'"\\udead"'!==r("\udead")}));r&&n({target:"JSON",stat:!0,forced:d},{stringify:function(t,e,a){var n=r.apply(null,arguments);return"string"==typeof n?n.replace(l,c):n}})},f4f7:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-table",t._g(t._b({directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"refTable",attrs:{data:t.data}},"el-table",t.$attrs,!1),t.$listeners),[t._l(t.columns,(function(e){return[e.isSlot?a("el-table-column",t._g(t._b({key:e.prop,scopedSlots:t._u([{key:"header",fn:function(a){return[t._t(e.prop+"__header",[t._v(" "+t._s(a.column.label)+" ")],{column:a.column})]}},{key:"default",fn:function(n){return[t._t(e.prop,[a("span",[t._v(t._s(n.row[e.prop]))])],{scope:n})]}}],null,!0)},"el-table-column",e,!1),t.$listeners)):a("el-table-column",t._g(t._b({key:e.prop,attrs:{"show-overflow-tooltip":""}},"el-table-column",e,!1),t.$listeners))]}))],2),t.paged?[a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.pagination.total>0,expression:"pagination.total > 0"}],staticClass:"cm-align-right",attrs:{total:t.pagination.total,page:t.pagination.currentPage,limit:t.pagination.pageSize},on:{"update:total":function(e){return t.$set(t.pagination,"total",e)},"update:page":function(e){return t.$set(t.pagination,"currentPage",e)},"update:limit":function(e){return t.$set(t.pagination,"pageSize",e)},pagination:t.handlePagination}})]:t._e()],2)},i=[],o=a("5530"),r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[a("el-pagination",t._b({attrs:{background:t.background,"current-page":t.currentPage,"page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total,"hide-on-single-page":t.hideOnSinglePage},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},l=[],s=(a("a9e3"),{name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},hideOnSinglePage:{type:Boolean,default:!0}},computed:{currentPage:{get:function(){return this.page},set:function(t){this.$emit("update:page",t)}},pageSize:{get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}}},methods:{handleSizeChange:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&scrollTo(0,800)},handleCurrentChange:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&scrollTo(0,800)}}}),u=s,c=(a("09fb"),a("2877")),d=Object(c["a"])(u,r,l,!1,null,"9b02a8a4",null),p=d.exports,f=a("fa7d"),g={name:"Table",components:{Pagination:p},props:{columns:{type:Array,default:function(){return[]}},requestFunction:{type:Function,required:!0},params:{type:Object,default:function(){return{}}},paged:{type:Boolean,default:!0},auto:{type:Boolean,default:!0}},data:function(){return{data:[],pagination:{pageSize:10,currentPage:1,total:0},listLoading:!1}},created:function(){this.auto&&this.handleGetList()},methods:{handleGetList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(o["a"])({current:this.pagination.currentPage,size:this.pagination.pageSize},Object(f["a"])(this.params));this.listLoading=!0,this.requestFunction(Object(o["a"])({current:this.paged?this.pagination.currentPage:void 0,size:this.paged?this.pagination.pageSize:void 0},e)).then((function(e){var a=e.data;t.listLoading=!1,t.data=a.records,t.pagination={pageSize:a.size,currentPage:a.current,total:a.total}}))},handlePagination:function(){this.handleGetList()}}},m=g,h=Object(c["a"])(m,n,i,!1,null,"10d7f8bf",null);e["a"]=h.exports},fa7d:function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return i}));a("d3b7"),a("159b"),a("b64b");function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={};return Object.keys(t).forEach((function(a){""!==t[a]&&void 0!==t[a]||(t[a]=null),e[a]=t[a]})),e}function i(t){Object.keys(t).forEach((function(e){t[e]=""}))}}}]);