2023-04-21 16:53:32 +08:00
|
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-12d9958a","chunk-c90b92da"],{"3d7b":function(t,e,a){"use strict";a("99af"),a("4160"),a("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 a=t.data;if(0!==a.code)return e.$message.error(a.msg);e.dataForm=a.data,e.setData&&e.setDataForm()})).catch((function(){})):e.isGetCode&&e.getCode()}))},getArr:function(){var t=this;this.urlOptions.optionArrUrl.forEach((function(e,a){t.$http.get(e,{params:{page:1,limit:500}}).then((function(e){var i=e.data;if(0!==i.code)return t.$message.error(i.msg);t.$set(t.urlOptions.optionArr,"arr".concat(a),i.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 a=e.data;if(0!==a.code)return t.$message.error(a.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,a){var i=a("2b3e"),r=function(){return i.Date.now()};t.exports=r},5424:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("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()}}},[a("el-form-item",{attrs:{prop:"dictValue",label:t.$t("dict.dictValue")}},[a("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),a("el-form-item",{attrs:{prop:"dictLabel",label:t.$t("dict.dictLabel")}},[a("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),a("el-form-item",{attrs:{prop:"sort",label:t.$t("dict.sort")}},[a("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),a("el-form-item",{attrs:{prop:"remark",label:t.$t("dict.remark")}},[a("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)},r=[],n=a("5530"),s=a("b047c"),o=a.n(s),d=a("3d7b"),c={mixins:[d["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 a=this;this.dataForm.id=t||"",this.dataForm.dictTypeId=e||"",this.visible=!0,this.$nextTick((function(){a.$refs["dataForm"].resetFields(),a.dataForm.id&&a.getInfo()}))},getInfo:function(){var t=this;this.$http.get("/sys/dict/data/".concat(this.dataForm.id)).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.dataForm=Object(n["a"])(Object(n["a"])({},t.dataForm),a.data)})).catch((function(){}))},dataFormSubmitHandle:o()((function(){var t=this;this.$refs["dataForm"].validate((function(e){if(!e)return!1;t.$http[t.dataForm.id?"pu
|