YM-WMS-WCS/dist/js/chunk-16ac8ede.7f6a231e.js

1 line
4.0 KiB
JavaScript
Raw Permalink Normal View History

2023-04-14 15:56:50 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-16ac8ede"],{"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 o=e.data;if(0!==o.code)return t.$message.error(o.msg);t.$set(t.urlOptions.optionArr,"arr".concat(a),o.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()}}}},f162:function(t,e,a){"use strict";a.r(e);var o=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":"80px"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{attrs:{clearable:"",placeholder:"名称"},model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1),a("el-form-item",{attrs:{label:"别名",prop:"alias"}},[a("el-input",{attrs:{clearable:"",placeholder:"别名"},model:{value:t.dataForm.alias,callback:function(e){t.$set(t.dataForm,"alias",e)},expression:"dataForm.alias"}})],1),a("el-form-item",{attrs:{label:"英语名称",prop:"en"}},[a("el-input",{attrs:{clearable:"",placeholder:"英语名称"},model:{value:t.dataForm.en,callback:function(e){t.$set(t.dataForm,"en",e)},expression:"dataForm.en"}})],1),a("el-form-item",{attrs:{label:"编码",prop:"code"}},[a("el-input",{attrs:{clearable:"",placeholder:"编码"},model:{value:t.dataForm.code,callback:function(e){t.$set(t.dataForm,"code",e)},expression:"dataForm.code"}})],1),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择状态"},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},t._l(t.options,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"备注",prop:"description"}},[a("el-input",{attrs:{clearable:"",placeholder:"备注"},model:{value:t.dataForm.description,callback:function(e){t.$set(t.dataForm,"description",e)},expression:"dataForm.description"}})],1)],1)},r=[],n=a("ade3"),i=a("3d7b"),s={mixins:[i["a"]],data:function(){var t;return{urlOptions:{submitURL:"/code/mtEquipmentInfo/",infoURL:"/code/mtEquipmentInfo"},isGetCode:!0,dataForm:(t={id:"",name:"",code:"",alias:"",status:""},Object(n["a"])(t,"alias",""),Object(n["a"])(t,"description",""),t),options:[{value:"0",label:"初始化"},{value:"1",label:"损坏"},{value:"2",label:"工作中"}],dataRule:{name:[{required:!0,message:"名称不能为空",trigger:"blur"}]}}},methods:{getCode:function(){var t=this;this.$http.get("/code/mtEquipmentInfo/getCode").then((function(e){var a=e.data;t.dataForm.code=a})).catch((function(){}))}}},l=s,c=a("2877"),d=Object(c["a"])(l,o,r,!1,null,null,null);e["default"]=d.exports}}]);