1 line
5.9 KiB
JavaScript
1 line
5.9 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c90b92da"],{"3d7b":function(t,e,r){"use strict";r("99af"),r("4160"),r("159b");e["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 e=this;this.dataForm.id=t||"",this.visible=!0,this.urlOptions.getOption&&this.getArr(),this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.dataForm.id?e.$http.get("".concat(e.urlOptions.infoURL,"/").concat(e.dataForm.id)).then((function(t){var r=t.data;if(0!==r.code)return e.$message.error(r.msg);e.dataForm=r.data,e.setData&&e.setDataForm()})).catch((function(){})):e.isGetCode&&e.getCode()}))},getArr:function(){var t=this;this.urlOptions.optionArrUrl.forEach((function(e,r){t.$http.get(e,{params:{page:1,limit:500}}).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.$set(t.urlOptions.optionArr,"arr".concat(r),a.data.list)})).catch((function(){}))}))},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(!e)return!1;t.$http[t.dataForm.id?"put":"post"](t.urlOptions.submitURL,t.dataForm).then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.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,e,r){var a=r("2b3e"),i=function(){return a.Date.now()};t.exports=i},5424:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"120px"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.dataFormSubmitHandle()}}},[r("el-form-item",{attrs:{prop:"dictValue",label:t.$t("dict.dictValue")}},[r("el-input",{attrs:{placeholder:t.$t("dict.dictValue")},model:{value:t.dataForm.dictValue,callback:function(e){t.$set(t.dataForm,"dictValue",e)},expression:"dataForm.dictValue"}})],1),r("el-form-item",{attrs:{prop:"dictLabel",label:t.$t("dict.dictLabel")}},[r("el-input",{attrs:{placeholder:t.$t("dict.dictLabel")},model:{value:t.dataForm.dictLabel,callback:function(e){t.$set(t.dataForm,"dictLabel",e)},expression:"dataForm.dictLabel"}})],1),r("el-form-item",{attrs:{prop:"sort",label:t.$t("dict.sort")}},[r("el-input-number",{attrs:{"controls-position":"right",min:0,label:t.$t("dict.sort")},model:{value:t.dataForm.sort,callback:function(e){t.$set(t.dataForm,"sort",e)},expression:"dataForm.sort"}})],1),r("el-form-item",{attrs:{prop:"remark",label:t.$t("dict.remark")}},[r("el-input",{attrs:{placeholder:t.$t("dict.remark")},model:{value:t.dataForm.remark,callback:function(e){t.$set(t.dataForm,"remark",e)},expression:"dataForm.remark"}})],1)],1)},i=[],n=r("5530"),o=r("b047c"),s=r.n(o),c=r("3d7b"),u={mixins:[c["a"]],data:function(){return{urlOptions:{submitURL:"/sys/dict/data/",infoURL:"/sys/dict/data"},visible:!1,dataForm:{id:"",dictTypeId:"",dictLabel:"",dictValue:"",sort:0,remark:""}}},computed:{dataRule:function(){return{dictLabel:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],dictValue:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],sort:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}]}}},methods:{init:function(t,e){var r=this;this.dataForm.id=t||"",this.dataForm.dictTypeId=e||"",this.visible=!0,this.$nextTick((function(){r.$refs["dataForm"].resetFields(),r.dataForm.id&&r.getInfo()}))},getInfo:function(){var t=this;this.$http.get("/sys/dict/data/".concat(this.dataForm.id)).then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.msg);t.dataForm=Object(n["a"])(Object(n["a"])({},t.dataForm),r.data)})).catch((function(){}))},dataFormSubmitHandle:s()((function(){var t=this;this.$refs["dataForm"].validate((function(e){if(!e)return!1;t.$http[t.dataForm.id?"put":"post"]("/sys/dict/data",t.dataForm).then((function(e){var r=e.data;if(0!==r.code)return t.$message.error(r.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=u,l=r("2877"),m=Object(l["a"])(d,a,i,!1,null,null,null);e["default"]=m.exports},b047c:function(t,e,r){var a=r("1a8c"),i=r("408c"),n=r("b4b0"),o="Expected a function",s=Math.max,c=Math.min;function u(t,e,r){var u,d,l,m,f,p,b=0,h=!1,v=!1,$=!0;if("function"!=typeof t)throw new TypeError(o);function g(e){var r=u,a=d;return u=d=void 0,b=e,m=t.apply(a,r),m}function F(t){return b=t,f=setTimeout(x,e),h?g(t):m}function y(t){var r=t-p,a=t-b,i=e-r;return v?c(i,l-a):i}function k(t){var r=t-p,a=t-b;return void 0===p||r>=e||r<0||v&&a>=l}function x(){var t=i();if(k(t))return O(t);f=setTimeout(x,y(t))}function O(t){return f=void 0,$&&u?g(t):(u=d=void 0,m)}function L(){void 0!==f&&clearTimeout(f),b=0,u=p=d=f=void 0}function T(){return void 0===f?m:O(i())}function w(){var t=i(),r=k(t);if(u=arguments,d=this,p=t,r){if(void 0===f)return F(p);if(v)return clearTimeout(f),f=setTimeout(x,e),g(p)}return void 0===f&&(f=setTimeout(x,e)),m}return e=n(e)||0,a(r)&&(h=!!r.leading,v="maxWait"in r,l=v?s(n(r.maxWait)||0,e):l,$="trailing"in r?!!r.trailing:$),w.cancel=L,w.flush=T,w}t.exports=u},b4b0:function(t,e,r){var a=r("1a8c"),i=r("ffd6"),n=NaN,o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;function l(t){if("number"==typeof t)return t;if(i(t))return n;if(a(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=a(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var r=c.test(t);return r||u.test(t)?d(t.slice(2),r?2:8):s.test(t)?n:+t}t.exports=l},ffd6:function(t,e,r){var a=r("3729"),i=r("1310"),n="[object Symbol]";function o(t){return"symbol"==typeof t||i(t)&&a(t)==n}t.exports=o}}]); |