YM-WMS-WCS/dist/js/chunk-9d70da7c.62d61859.js

1 line
5.8 KiB
JavaScript
Raw Normal View History

2023-04-14 15:56:50 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9d70da7c"],{"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 i=e.data;if(0!==i.code)return t.$message.error(i.msg);t.$set(t.urlOptions.optionArr,"arr".concat(r),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 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 i=r("2b3e"),a=function(){return i.Date.now()};t.exports=a},ae6b:function(t,e,r){"use strict";r.r(e);var i=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:"dictName",label:t.$t("dict.dictName")}},[r("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),r("el-form-item",{attrs:{prop:"dictType",label:t.$t("dict.dictType")}},[r("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),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)},a=[],n=r("5530"),o=r("b047c"),s=r.n(o),c=r("3d7b"),u={mixins:[c["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 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/type",t.dataForm).then((function(e){var r=e.data;if(0!==r.