webpackJsonp([41],{"5t68":function(e,t){},aM3g:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("4YfN"),s=a.n(i),o=a("oFZM"),r=a("t5DY"),l=a("55us"),n=a("bSIt"),d={computed:s()({title:function(){var e="武汉市医疗急救站点信息";return"add"===this.type?e+="填写":"update"===this.type?e+="修改":"detail"===this.type&&(e+="详情"),e}},Object(n.b)(["userInfo"])),data:function(){return{dialogVisible:!1,loading:!1,formDisabled:!1,selectLoading:!1,type:"add",dataForm:{siteName:"",area:"",siteLocation:"",siteLongitude:"",siteLatitude:"",hospitalCode:"",siteStatus:""},areaList:[],hospitalList:[],rules:{siteName:[{required:!0,message:"请输入站点名称"}],area:[{required:!0,message:"请选择辖区"}],siteStatus:[{required:!0,message:"请选择站点状态"}]}}},mounted:function(){var e=this;Object(l.a)(["area"]).then(function(t){e.areaList=t.area})},methods:{init:function(e,t){var a=this;if(this.dialogVisible=!0,this.loading=!0,this.type=e,this.formDisabled="detail"===e,"update"===e||"detail"===e){if(!t)return void this.$message.error("救护车id不能为空");Object(o.c)({id:t}).then(function(e){201===e.msg?(a.dataForm=e.respData||{},a.$nextTick(function(){a.loading=!1,a.$refs.dataForm.clearValidate()})):a.$message.error(e.content)})}else this.dataForm={},this.$nextTick(function(){a.loading=!1,a.$refs.dataForm.clearValidate()})},submitForm:function(){var e=this;this.$refs.dataForm.validate(function(t){if(t){var a=s()({},e.dataForm,{auditStatus:1,hospitalCode:e.userInfo.hospitalCode,hospitalName:e.userInfo.hospitalName}),i=e.areaList.find(function(t){return t.id===e.dataForm.area});if(!i)return void e.$message.error("无效数据");var r=i.name;a.areaName=r,Object(o.f)(a).then(function(t){201===t.msg?(e.dialogVisible=!1,e.$message.success("add"===e.type?"新增成功！":"修改成功"),e.$emit("subsucc")):e.$message.error(t.content)})}})},remoteMethod:function(e){var t=this;this.selectLoading=!0,Object(r.g)(e).then(function(e){t.hospitalList=e.respData,t.selectLoading=!1})},closedHandler:function(){this.$refs.dataForm.resetFields()}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.title,visible:e.dialogVisible,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogVisible=t},closed:e.closedHandler}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"dataForm",attrs:{model:e.dataForm,size:"small","label-width":"300px",rules:e.rules,disabled:e.formDisabled}},[a("el-form-item",{attrs:{label:"站点名称(请填写单位全称)",prop:"siteName"}},[a("el-input",{attrs:{placeholder:"请输入站点名称"},model:{value:e.dataForm.siteName,callback:function(t){e.$set(e.dataForm,"siteName",t)},expression:"dataForm.siteName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"辖区（多个院区则填写主院区所属辖区）",prop:"area"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择辖区"},model:{value:e.dataForm.area,callback:function(t){e.$set(e.dataForm,"area",t)},expression:"dataForm.area"}},e._l(e.areaList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.val}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"站点位置",prop:"siteLocation"}},[a("el-input",{attrs:{placeholder:"请输入站点位置"},model:{value:e.dataForm.siteLocation,callback:function(t){e.$set(e.dataForm,"siteLocation",t)},expression:"dataForm.siteLocation"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"站点经度",prop:"siteLongitude"}},[a("el-input",{attrs:{placeholder:"请输入站点经度"},model:{value:e.dataForm.siteLongitude,callback:function(t){e.$set(e.dataForm,"siteLongitude",t)},expression:"dataForm.siteLongitude"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"站点纬度",prop:"siteLatitude"}},[a("el-input",{attrs:{placeholder:"请输入站点纬度"},model:{value:e.dataForm.siteLatitude,callback:function(t){e.$set(e.dataForm,"siteLatitude",t)},expression:"dataForm.siteLatitude"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"上级医院名称",prop:"hospitalCode"}},[e._v("\n      "+e._s(e.userInfo.hospitalName)+"\n      ")]),e._v(" "),a("el-form-item",{attrs:{label:"站点状态",prop:"siteStatus"}},[a("el-radio-group",{model:{value:e.dataForm.siteStatus,callback:function(t){e.$set(e.dataForm,"siteStatus",t)},expression:"dataForm.siteStatus"}},[a("el-radio",{attrs:{label:1}},[e._v("启用")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("停用")])],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small",disabled:e.formDisabled},on:{click:function(t){return e.submitForm()}}},[e._v("确 定")])],1)],1)},staticRenderFns:[]};var m=a("C7Lr")(d,u,!1,function(e){a("5t68")},null,null);t.default=m.exports}});
//# sourceMappingURL=41.9dd1be0ba9ca537d938d.1631513276458.js.map