YM-WMS-WCS/dist/js/chunk-f088640e.71040574.js

1 line
7.0 KiB
JavaScript
Raw Normal View History

2023-04-14 15:56:50 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f088640e"],{1592:function(t,e,r){},"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},5494: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.dataFormSubmit()}}},[r("el-form-item",{attrs:{prop:"name",label:t.$t("dept.name")}},[r("el-input",{attrs:{placeholder:t.$t("dept.name")},model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1),r("el-form-item",{staticClass:"dept-list",attrs:{prop:"parentName",label:t.$t("dept.parentName")}},[r("el-popover",{ref:"deptListPopover",attrs:{placement:"bottom-start",trigger:"click"},model:{value:t.deptListVisible,callback:function(e){t.deptListVisible=e},expression:"deptListVisible"}},[r("el-tree",{ref:"deptListTree",attrs:{data:t.deptList,props:{label:"name",children:"children"},"node-key":"id","highlight-current":!0,"expand-on-click-node":!1,accordion:""},on:{"current-change":t.deptListTreeCurrentChangeHandle}})],1),r("el-input",{directives:[{name:"popover",rawName:"v-popover:deptListPopover",arg:"deptListPopover"}],attrs:{readonly:!0,placeholder:t.$t("dept.parentName")},model:{value:t.dataForm.parentName,callback:function(e){t.$set(t.dataForm,"parentName",e)},expression:"dataForm.parentName"}},[1===t.$store.state.user.superAdmin&&"0"!==t.dataForm.pid?r("i",{staticClass:"el-icon-circle-close el-input__icon",attrs:{slot:"suffix"},on:{click:function(e){return e.stopPropagation(),t.deptListTreeSetDefaultHandle()}},slot:"suffix"}):t._e()])],1),r("el-form-item",{attrs:{prop:"sort",label:t.$t("dept.sort")}},[r("el-input-number",{attrs:{"controls-position":"right",min:0,label:t.$t("dept.sort")},model:{value:t.dataForm.sort,callback:function(e){t.$set(t.dataForm,"sort",e)},expression:"dataForm.sort"}})],1)],1)},i=[],n=(r("b0c0"),r("5530")),o=r("b047c"),s=r.n(o),u=r("3d7b"),d={mixins:[u["a"]],data:function(){return{urlOptions:{submitURL:"/sys/dept/",infoURL:"/sys/dept"},visible:!1,deptList:[],deptListVisible:!1,dataForm:{id:"",name:"",pid:"",parentName:"",sort:0}}},computed:{dataRule:function(){return{name:[{required:!0,message:this.$t("validate.required"),trigger:"blur"}],parentName:[{required:!0,message:this.$t("validate.required"),trigger:"change"}]}}},methods:{init:function(t){var e=this;this.dataForm.id=t||"",this.visible=!0,this.$nextTick((function(){e.$refs["dataFor