YM-WMS-WCS/dist/js/chunk-daee2e18.7657475f.js

1 line
12 KiB
JavaScript
Raw Normal View History

2023-04-21 16:53:32 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-daee2e18","chunk-9d70da7c","chunk-2d22d77b"],{"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},ae6b: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:"dictName",label:t.$t("dict.dictName")}},[a("el-input",{attrs:{placeholder:t.$t("dict.dictName")},model:{value:t.dataForm.dictName,callback:function(e){t.$set(t.dataForm,"dictName",e)},expression:"dataForm.dictName"}})],1),a("el-form-item",{attrs:{prop:"dictType",label:t.$t("dict.dictType")}},[a("el-input",{attrs:{placeholder:t.$t("dict.dictType")},model:{value:t.dataForm.dictType,callback:function(e){t.$set(t.dataForm,"dictType",e)},expression:"dataForm.dictType"}})],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/type/",infoURL:"/sys/dict/type"},visible:!1,dataForm:{id:"",dictName:"",dictType:"",sort:0,remark:""}}},computed:{dataRule:function(){return{dictName:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],dictType:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],sort:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}]}}},methods:{init:function(t){var e=this;this.dataForm.id=t||"",this.visible=!0,this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.dataForm.id&&e.getInfo()}))},getInfo:function(){var t=this;this.$http.get("/sys/dict/type/".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?"put":"post"]("/sys/dict/type",t.dataForm).then((