1 line
7.7 KiB
JavaScript
1 line
7.7 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-785aab7c","chunk-14826fa3"],{"256a":function(t,a,e){"use strict";e.r(a);var r=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-card",{staticClass:"aui-card--fill",attrs:{shadow:"never"}},[e("div",{staticClass:"mod-sys__user"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{"table-props":t.tableProps,page:t.listQuery.page,limit:t.listQuery.limit,"table-data":t.tableData}},[t.tableBtn.length?e("method-btn",{attrs:{slot:"handleBtn",width:80,label:"操作","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),e("pagination",{attrs:{limit:t.listQuery.limit,page:t.listQuery.page,total:t.listQuery.total},on:{"update:limit":function(a){return t.$set(t.listQuery,"limit",a)},"update:page":function(a){return t.$set(t.listQuery,"page",a)},pagination:t.getDataList}}),e("base-dialog",{attrs:{dialogTitle:t.addOrEditTitle,dialogVisible:t.addOrUpdateVisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[e("add-or-update",{ref:"addOrUpdate",on:{successSubmit:t.successSubmit}})],1)],1)])},i=[],n=e("ed26"),o=e("d874"),s=e("12cb"),u=[{prop:"paramCode",label:s["a"].t("params.paramCode")},{prop:"paramValue",label:s["a"].t("params.paramValue")},{prop:"remark",label:s["a"].t("params.remark")}],l=[{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}],d={mixins:[n["a"]],data:function(){return{urlOptions:{getDataListURL:"/sys/params/page",deleteURL:"/sys/params"},tableProps:u,tableBtn:l,addDeleteURL:!0,formConfig:[{type:"input",label:s["a"].t("params.paramCode"),placeholder:s["a"].t("params.paramCode"),param:"paramCode"},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"button",btnName:"新增",name:"add",color:"primary",plain:!0}]}},components:{AddOrUpdate:o["default"]},methods:{buttonClick:function(t){switch(t.btnName){case"search":this.listQuery.paramCode=t.paramCode,this.listQuery.page=1,this.getDataList();break;case"add":this.addOrEditTitle="新增",this.addOrUpdateVisible=!0,this.addOrUpdateHandle();break;default:console.log(t)}}}},m=d,c=e("2877"),p=Object(c["a"])(m,r,i,!1,null,null,null);a["default"]=p.exports},"3d7b":function(t,a,e){"use strict";e("99af"),e("4160"),e("159b");a["a"]={data:function(){return{urlOptions:{submitURL:"",infoURL:"",getOption:!1,optionArrUrl:[],optionArr:{}},visible:!1,setData:!1,isGetCode:!1}},created:function(){},activated:function(){},methods:{init:function(t){var a=this;this.dataForm.id=t||"",this.visible=!0,this.urlOptions.getOption&&this.getArr(),this.$nextTick((function(){a.$refs["dataForm"].resetFields(),a.dataForm.id?a.$http.get("".concat(a.urlOptions.infoURL,"/").concat(a.dataForm.id)).then((function(t){var e=t.data;if(0!==e.code)return a.$message.error(e.msg);a.dataForm=e.data,a.setData&&a.setDataForm()})).catch((function(){})):a.isGetCode&&a.getCode()}))},getArr:function(){var t=this;this.urlOptions.optionArrUrl.forEach((function(a,e){t.$http.get(a,{params:{page:1,limit:500}}).then((function(a){var r=a.data;if(0!==r.code)return t.$message.error(r.msg);t.$set(t.urlOptions.optionArr,"arr".concat(e),r.data.list)})).catch((function(){}))}))},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(a){if(!a)return!1;t.$http[t.dataForm.id?"put":"post"](t.urlOptions.submitURL,t.dataForm).then((function(a){var e=a.data;if(0!==e.code)return t.$message.error(e.msg);t.$message({message:t.$t("prompt.success"),type:"success",duration:500,onClose:function(){t.visible=!1,t.$emit("successSubmit")}})})).catch((function(){}))}))},formClear:function(){this.$refs.dataForm.resetFields()}}}},"408c":function(t,a,e){var r=e("2b3e"),i=function(){return r.Date.now()};t.exports=i},b047c:function(t,a,e){var r=e("1a8c"),i=e("408c"),n=e("b4b0"),o="Expected a function",s=Math.max,u=Math.min;function l(t,a,e){var l,d,m,c,p,f,b=0,h=!1,g=!1,v=!0;if("function"!=typeof t)throw new TypeError(o);function $(a){var e=l,r=d;return l=d=void 0,b=a,c=t.apply(r,e),c}function y(t){return b=t,p=setTimeout(k,a),h?$(t):c}function F(t){var e=t-f,r=t-b,i=a-e;return g?u(i,m-r):i}function C(t){var e=t-f,r=t-b;return void 0===f||e>=a||e<0||g&&r>=m}function k(){var t=i();if(C(t))return O(t);p=setTimeout(k,F(t))}function O(t){return p=void 0,v&&l?$(t):(l=d=void 0,c)}function x(){void 0!==p&&clearTimeout(p),b=0,l=f=d=p=void 0}function U(){return void 0===p?c:O(i())}function w(){var t=i(),e=C(t);if(l=arguments,d=this,f=t,e){if(void 0===p)return y(f);if(g)return clearTimeout(p),p=setTimeout(k,a),$(f)}return void 0===p&&(p=setTimeout(k,a)),c}return a=n(a)||0,r(e)&&(h=!!e.leading,g="maxWait"in e,m=g?s(n(e.maxWait)||0,a):m,v="trailing"in e?!!e.trailing:v),w.cancel=x,w.flush=U,w}t.exports=l},b4b0:function(t,a,e){var r=e("1a8c"),i=e("ffd6"),n=NaN,o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt;function m(t){if("number"==typeof t)return t;if(i(t))return n;if(r(t)){var a="function"==typeof t.valueOf?t.valueOf():t;t=r(a)?a+"":a}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var e=u.test(t);return e||l.test(t)?d(t.slice(2),e?2:8):s.test(t)?n:+t}t.exports=m},d874:function(t,a,e){"use strict";e.r(a);var r=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"120px"},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&t._k(a.keyCode,"enter",13,a.key,"Enter")?null:t.dataFormSubmitHandle()}}},[e("el-form-item",{attrs:{prop:"paramCode",label:t.$t("params.paramCode")}},[e("el-input",{attrs:{placeholder:t.$t("params.paramCode")},model:{value:t.dataForm.paramCode,callback:function(a){t.$set(t.dataForm,"paramCode",a)},expression:"dataForm.paramCode"}})],1),e("el-form-item",{attrs:{prop:"paramValue",label:t.$t("params.paramValue")}},[e("el-input",{attrs:{placeholder:t.$t("params.paramValue")},model:{value:t.dataForm.paramValue,callback:function(a){t.$set(t.dataForm,"paramValue",a)},expression:"dataForm.paramValue"}})],1),e("el-form-item",{attrs:{prop:"remark",label:t.$t("params.remark")}},[e("el-input",{attrs:{placeholder:t.$t("params.remark")},model:{value:t.dataForm.remark,callback:function(a){t.$set(t.dataForm,"remark",a)},expression:"dataForm.remark"}})],1)],1)},i=[],n=e("5530"),o=e("b047c"),s=e.n(o),u=e("3d7b"),l={mixins:[u["a"]],data:function(){return{urlOptions:{submitURL:"/sys/params/",infoURL:"/sys/params"},visible:!1,dataForm:{id:"",paramCode:"",paramValue:"",remark:""}}},computed:{dataRule:function(){return{paramCode:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],paramValue:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}]}}},methods:{init:function(t){var a=this;this.dataForm.id=t||"",this.visible=!0,this.$nextTick((function(){a.$refs["dataForm"].resetFields(),a.dataForm.id&&a.getInfo()}))},getInfo:function(){var t=this;this.$http.get("/sys/params/".concat(this.dataForm.id)).then((function(a){var e=a.data;if(0!==e.code)return t.$message.error(e.msg);t.dataForm=Object(n["a"])(Object(n["a"])({},t.dataForm),e.data)})).catch((function(){}))},dataFormSubmitHandle:s()((function(){var t=this;this.$refs["dataForm"].validate((function(a){if(!a)return!1;t.$http[t.dataForm.id?"put":"post"]("/sys/params",t.dataForm).then((function(a){var e=a.data;if(0!==e.code)return t.$message.error(e.msg);t.$message({message:t.$t("prompt.success"),type:"success",duration:500,onClose:function(){t.visible=!1,t.$emit("successSubmit")}})})).catch((function(){}))}))}),1e3,{leading:!0,trailing:!1})}},d=l,m=e("2877"),c=Object(m["a"])(d,r,i,!1,null,null,null);a["default"]=c.exports},ffd6:function(t,a,e){var r=e("3729"),i=e("1310"),n="[object Symbol]";function o(t){return"symbol"==typeof t||i(t)&&r(t)==n}t.exports=o}}]); |