chunk-003812ff.6104e712.js 4.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-003812ff"],{"0755":function(e,t,a){"use strict";a("99af");var i=a("f121"),r=a("59aa"),n=a("2b0e"),s="".concat(i["a"],"/serviceability/saService");t["a"]={getSaServiceList:function(e){return r["a"].get("".concat(s,"/getSaServiceList"),{params:e}).then((function(e){if(e&&e.data&&e.data.list)return e.data;n["default"].prototype.$message.error("加载服务列表失败")}))},getSaServiceEntity:function(e){return r["a"].get("".concat(s,"/getEntity?id=").concat(e)).then((function(e){if(e&&e.data&&"success"===e.data.type)return e.data;n["default"].prototype.$message.error("加载服务失败")}))},deleteAllSaService:function(e){return r["a"].post("".concat(s,"/deleteAll"),e)},deleteSaService:function(e){return r["a"].post("".concat(s,"/delete?id=").concat(e))},saveSaService:function(e){return r["a"].post("".concat(s,"/save"),e)}}},e9fc:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-form",{ref:"saServiceForm",staticClass:"with-border",attrs:{id:"saServiceForm","label-position":"right",size:"small","label-width":"100px",model:e.entity,rules:e.rules}},[a("el-row",{attrs:{type:"flex",justify:"center"}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{prop:"name",label:"名称"}},[a("el-input",{attrs:{placeholder:"请输入名称",disabled:e.inViewMode},model:{value:e.entity.name,callback:function(t){e.$set(e.entity,"name",t)},expression:"entity.name"}})],1)],1)],1),a("el-row",{attrs:{type:"flex",justify:"center"}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{prop:"system",label:"所属系统"}},[a("el-select",{attrs:{"popper-append-to-body":!0,clearable:"",disabled:e.inViewMode,placeholder:"请选择所属系统"},model:{value:e.entity.system,callback:function(t){e.$set(e.entity,"system",t)},expression:"entity.system"}},e._l(e.getDictByField("system"),(function(e){return a("el-option",{key:e.id,attrs:{label:e.paramName,value:e.paramCode}})})),1)],1)],1)],1),a("el-row",{attrs:{type:"flex",justify:"center"}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{prop:"type",label:"类型"}},[a("el-select",{attrs:{"popper-append-to-body":!0,clearable:"",disabled:e.inViewMode,placeholder:"请选择类型"},model:{value:e.entity.type,callback:function(t){e.$set(e.entity,"type",t)},expression:"entity.type"}},e._l(e.getDictByField("type"),(function(e){return a("el-option",{key:e.id,attrs:{label:e.paramName,value:e.paramCode}})})),1)],1)],1)],1),a("el-row",{attrs:{type:"flex",justify:"center"}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{prop:"status",label:"启用状态"}},[a("el-select",{attrs:{"popper-append-to-body":!0,clearable:"",disabled:e.inViewMode,placeholder:"请选择启用状态"},model:{value:e.entity.status,callback:function(t){e.$set(e.entity,"status",t)},expression:"entity.status"}},e._l(e.getDictByField("status"),(function(e){return a("el-option",{key:e.id,attrs:{label:e.paramName,value:e.paramCode}})})),1)],1)],1)],1)],1)},r=[],n=a("0755"),s=a("f8ff"),l={name:"saServiceForm",props:{editType:{default:""},id:{default:""}},data:function(){return{entity:{name:"",system:"",type:"",status:""},dataLoading:!1,fieldDictTypeMap:{system:"SYSTEM_CODE",type:"SERVICE_TYPE",status:"SERVICE_STATUS"},pageDictMap:{},rules:{name:[{max:255,message:"长度不能超过 255 个字符",trigger:"blur"}],system:[{max:42,message:"长度不能超过 42 个字符",trigger:"blur"}],type:[{max:255,message:"长度不能超过 255 个字符",trigger:"blur"}],status:[{max:255,message:"长度不能超过 255 个字符",trigger:"blur"}]}}},computed:{inViewMode:function(){return"view"===(this.$route.query.editType||this.editType||"view")},incomingPkValue:function(){return this.id||this.$route.query.id}},methods:{initFormData:function(){var e=this,t=e.incomingPkValue;t&&(e.dataLoading=!0,n["a"].getSaServiceEntity(t).then((function(t){e.dataLoading=!1,e.entity=t.data})))},save:function(e){var t=this;t.$refs.saServiceForm.validate((function(a){a?n["a"].saveSaService(t.entity).then((function(a){a&&"success"===a.data.type?(t.$message.success("保存可用性服务成功"),e()):t.$message.error("保存可用性服务失败")})):t.$message.error("内容填写有误,请修改后再提交")}))},getDictByField:function(e){var t=this;return t.pageDictMap[t.fieldDictTypeMap[e]]}},created:function(){var e=this;Object(s["g"])().then((function(){e.pageDictMap=e.dictionary,e.initFormData()}))}},o=l,c=a("2877"),p=Object(c["a"])(o,i,r,!1,null,"56586b16",null);t["default"]=p.exports}}]);