|
@@ -9,58 +9,58 @@
|
|
|
<el-button type="text" size="mini" @click="frameAddVisible = false">取消</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div id="params-container" v-if="hospital_frame">
|
|
|
+ <div v-if="hospital_frame" id="params-container">
|
|
|
<el-card>
|
|
|
<div slot="header" class="clearfix">
|
|
|
- <span><i class="el-icon-school"></i>科室</span>
|
|
|
+ <span><i class="el-icon-school" />科室</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button type="text" class="add-params-btn" @click="handlePartDevice"><i class="el-icon-cpu"></i> 查看设备 [{{hospital_frame.device_count}}]</el-button>
|
|
|
+ <el-button type="text" class="add-params-btn" @click="handlePartDevice"><i class="el-icon-cpu" /> 查看设备 [{{ hospital_frame.device_count }}]</el-button>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
- <el-card v-if="hospital_frame.frame_room_vos" v-for="(item,index) in hospital_frame.frame_room_vos" :key="index">
|
|
|
- <div slot="header" class="clearfix" v-if="item.frame_room!=null">
|
|
|
- <span><i class="el-icon-house"></i> {{ item.frame_room.name }} 房</span>
|
|
|
- <el-dropdown trigger="click" @command="handleGroupCommand" style="float: right">
|
|
|
- <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right"></i></span>
|
|
|
+ <el-card v-for="(item,index) in hospital_frame.frame_room_vos" v-if="hospital_frame.frame_room_vos" :key="index">
|
|
|
+ <div v-if="item.frame_room!=null" slot="header" class="clearfix">
|
|
|
+ <span><i class="el-icon-house" /> {{ item.frame_room.name }} 房</span>
|
|
|
+ <el-dropdown trigger="click" style="float: right" @command="handleGroupCommand">
|
|
|
+ <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right" /></span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item :command="{type: 'edit', frame: item.frame_room}">编辑</el-dropdown-item>
|
|
|
<el-dropdown-item :command="{type: 'delete', frame: item.frame_room}">删除</el-dropdown-item>
|
|
|
- <el-dropdown-item :command="{type: 'device', frame: item.frame_room}" divided><i class="el-icon-cpu"></i> 设备 {{item.device_count}}</el-dropdown-item>
|
|
|
+ <el-dropdown-item :command="{type: 'device', frame: item.frame_room}" divided><i class="el-icon-cpu" /> 设备 {{ item.device_count }}</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</div>
|
|
|
<template v-if="item.frame_bed_vos && item.frame_bed_vos.length > 0">
|
|
|
<div v-for="(subItem, i) in item.frame_bed_vos" :key="i" class="param-item">
|
|
|
- <span><i class="el-icon-s-flag"></i> {{ subItem.frame_bed.name }} 床</span>
|
|
|
+ <span><i class="el-icon-s-flag" /> {{ subItem.frame_bed.name }} 床</span>
|
|
|
<span v-if="subItem.customer_id">
|
|
|
<el-button style="width: 150px;" size="mini" plain round @click="handleEditPatient(subItem.customer_id,subItem.frame_bed.id)">
|
|
|
- <i class="el-icon-user"></i> {{ subItem.customer_name+ ' '+ subItem.customer_age+subItem.customer_age_unit}}
|
|
|
+ <i class="el-icon-user" /> {{ subItem.customer_name+ ' '+ subItem.customer_age+subItem.customer_age_unit }}
|
|
|
<span v-if="subItem.customer_sex === 1">男</span>
|
|
|
<span v-else-if="subItem.customer_sex === 2">女</span>
|
|
|
<span v-else>未知</span>
|
|
|
</el-button>
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
- <el-button size="mini" type="success" plain round @click="handleAddPatient(subItem.frame_bed)"><i class="el-icon-circle-plus-outline"></i> 病人</el-button>
|
|
|
+ <el-button size="mini" type="success" plain round @click="handleAddPatient(subItem.frame_bed)"><i class="el-icon-circle-plus-outline" /> 病人</el-button>
|
|
|
</span>
|
|
|
<span>
|
|
|
<el-dropdown size="mini" @command="handleGroupCommand">
|
|
|
- <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right"></i></span>
|
|
|
+ <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right" /></span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item :command="{type: 'edit', frame: subItem.frame_bed}">编辑</el-dropdown-item>
|
|
|
<el-dropdown-item :command="{type: 'delete', frame: subItem.frame_bed}" style="color: #F56C6C">删除</el-dropdown-item>
|
|
|
- <el-dropdown-item :command="{type: 'device', frame: subItem.frame_bed}" divided><i class="el-icon-cpu"></i> 设备 {{subItem.device_count}}
|
|
|
+ <el-dropdown-item :command="{type: 'device', frame: subItem.frame_bed}" divided><i class="el-icon-cpu" /> 设备 {{ subItem.device_count }}
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</span>
|
|
|
</div>
|
|
|
- <el-button type="text" class="add-params-btn" @click="handleAddFrame(item.frame_room.id, item.frame_room.name)"><i class="el-icon-circle-plus"></i> 添加床位</el-button>
|
|
|
+ <el-button type="text" class="add-params-btn" @click="handleAddFrame(item.frame_room.id, item.frame_room.name)"><i class="el-icon-circle-plus" /> 添加床位</el-button>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<div class="param-item empty">暂无数据...</div>
|
|
|
- <el-button type="text" class="add-params-btn" @click="handleAddFrame(item.frame_room.id, item.frame_room.name)"><i class="el-icon-circle-plus"></i> 添加床位</el-button>
|
|
|
+ <el-button type="text" class="add-params-btn" @click="handleAddFrame(item.frame_room.id, item.frame_room.name)"><i class="el-icon-circle-plus" /> 添加床位</el-button>
|
|
|
</template>
|
|
|
</el-card>
|
|
|
</div>
|
|
@@ -70,17 +70,17 @@
|
|
|
:visible.sync="dialogPatientVisible"
|
|
|
width="85%"
|
|
|
>
|
|
|
- <customer-edit :customer-id="customerId" :frame-id="frameId" @saved="handlePatientFinished"></customer-edit>
|
|
|
+ <customer-edit :customer-id="customerId" :frame-id="frameId" @saved="handlePatientFinished" />
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog title="科室结构" :visible.sync="dialogFrameVisible" width="500px">
|
|
|
- <el-form :model="frameInfo" :rules="rules" ref="editForm" label-width="110px">
|
|
|
+ <el-form ref="editForm" :model="frameInfo" :rules="rules" label-width="110px">
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<!--医院结构名称-->
|
|
|
<el-form-item label="名称" prop="name">
|
|
|
<el-input v-model="frameInfo.name" :maxlength="20">
|
|
|
- <template slot="append">{{frameInfo.type === 4?"房":"床"}}</template>
|
|
|
+ <template slot="append">{{ frameInfo.type === 4?"房":"床" }}</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -89,7 +89,7 @@
|
|
|
<el-col :span="24">
|
|
|
<!--医院结构别名-->
|
|
|
<el-form-item label="别名" prop="alias">
|
|
|
- <el-input v-model="frameInfo.alias" :maxlength="20"></el-input>
|
|
|
+ <el-input v-model="frameInfo.alias" :maxlength="20" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -103,220 +103,222 @@
|
|
|
</el-row>
|
|
|
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" @click="handlerSubmit('editForm')" class="save">保存修改</el-button>
|
|
|
+ <el-button type="primary" class="save" @click="handlerSubmit('editForm')">保存修改</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-drawer
|
|
|
- title="设备"
|
|
|
+ :title="selectedFrame.full_name+' 设备'"
|
|
|
:visible.sync="deviceVisible"
|
|
|
:append-to-body="true"
|
|
|
size="60%"
|
|
|
- >
|
|
|
- <device-info :frame-id="frameId"></device-info>
|
|
|
+ >
|
|
|
+ <device-info :frame-id="frameId" :frame="selectedFrame" />
|
|
|
</el-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import * as HospitalFrame_API from '@/api/ncs_hospitalFrame'
|
|
|
- import * as RegExp from "@/utils/RegExp";
|
|
|
- import customerEdit from '@/views/customer/customerEdit'
|
|
|
- import DeviceInfo from '@/views/ncs-device/deviceInfo'
|
|
|
+import * as HospitalFrame_API from '@/api/ncs_hospitalFrame'
|
|
|
+import * as RegExp from '@/utils/RegExp'
|
|
|
+import customerEdit from '@/views/customer/customerEdit'
|
|
|
+import DeviceInfo from '@/views/ncs-device/deviceInfo'
|
|
|
|
|
|
- export default {
|
|
|
- name: 'hospitalFrame',
|
|
|
- components: { DeviceInfo, customerEdit },
|
|
|
- data: function() {
|
|
|
- return {
|
|
|
- hospital_frame: null,
|
|
|
- frameAddVisible: false,
|
|
|
- frameName: '',
|
|
|
- dialogPatientVisible: false,
|
|
|
- customerId: null,
|
|
|
- dialogFrameVisible: false,
|
|
|
- frameInfo: {},
|
|
|
- deviceVisible: false,
|
|
|
- frameId: 0,
|
|
|
- rules: {
|
|
|
- name: [
|
|
|
- this.MixinRequired('请输入名称!'),
|
|
|
- { min: 1, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
|
|
- {
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- if (!RegExp.userName.test(value)) {
|
|
|
- callback(new Error('只支持汉字、字母、数字、“-”、“_”的组合!'))
|
|
|
- } else {
|
|
|
- callback()
|
|
|
- }
|
|
|
+export default {
|
|
|
+ name: 'HospitalFrame',
|
|
|
+ components: { DeviceInfo, customerEdit },
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ hospital_frame: null,
|
|
|
+ frameAddVisible: false,
|
|
|
+ frameName: '',
|
|
|
+ dialogPatientVisible: false,
|
|
|
+ customerId: null,
|
|
|
+ dialogFrameVisible: false,
|
|
|
+ frameInfo: {},
|
|
|
+ deviceVisible: false,
|
|
|
+ frameId: 0,
|
|
|
+ selectedFrame: {},
|
|
|
+ rules: {
|
|
|
+ name: [
|
|
|
+ this.MixinRequired('请输入名称!'),
|
|
|
+ { min: 1, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
|
|
+ {
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ if (!RegExp.userName.test(value)) {
|
|
|
+ callback(new Error('只支持汉字、字母、数字、“-”、“_”的组合!'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
}
|
|
|
}
|
|
|
- ],
|
|
|
- alias: [
|
|
|
- { min: 1, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
|
|
- {
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- if (!value) {
|
|
|
- callback()
|
|
|
- }
|
|
|
- if (!RegExp.userName.test(value)) {
|
|
|
- callback(new Error('只支持汉字、字母、数字、“-”、“_”的组合!'))
|
|
|
- } else {
|
|
|
- callback()
|
|
|
- }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ alias: [
|
|
|
+ { min: 1, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
|
|
+ {
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ if (!value) {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ if (!RegExp.userName.test(value)) {
|
|
|
+ callback(new Error('只支持汉字、字母、数字、“-”、“_”的组合!'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
}
|
|
|
}
|
|
|
- ]
|
|
|
- },
|
|
|
- fullName: null
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ fullName: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ deviceVisible: function(newData) {
|
|
|
+ if (!newData) {
|
|
|
+ this.GET_All()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.GET_All()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ GET_All() {
|
|
|
+ HospitalFrame_API.getHospitalFrameList(this.$store.getters.userInfo.last_login_shopid).then(response => {
|
|
|
+ if (response) {
|
|
|
+ console.log(response)
|
|
|
+ this.hospital_frame = response
|
|
|
+ }
|
|
|
+ }).catch(response => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: response.message
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 下拉触发 */
|
|
|
+ handleGroupCommand(object) {
|
|
|
+ console.log(object)
|
|
|
+ this.selectedFrame = object.frame
|
|
|
+ switch (object.type) {
|
|
|
+ case 'edit':
|
|
|
+ this.handelEditFrame(object.frame)
|
|
|
+ break
|
|
|
+ case 'delete':
|
|
|
+ this.handlerDeleteFrame(object.frame.id)
|
|
|
+ break
|
|
|
+ case 'device':
|
|
|
+ this.frameId = object.frame.id
|
|
|
+ this.openDeviceList()
|
|
|
+ break
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ handleAddPatient(bedFrame) {
|
|
|
+ this.customerId = 0
|
|
|
+ this.frameId = bedFrame.id
|
|
|
+ this.dialogPatientVisible = true
|
|
|
+ },
|
|
|
+ handlePatientFinished() {
|
|
|
+ this.dialogPatientVisible = false
|
|
|
this.GET_All()
|
|
|
},
|
|
|
- watch: {
|
|
|
- deviceVisible: function(newData) {
|
|
|
- if (!newData) {
|
|
|
- this.GET_All()
|
|
|
- }
|
|
|
+ handleEditPatient(id, frameId) {
|
|
|
+ this.dialogPatientVisible = true
|
|
|
+ this.customerId = id
|
|
|
+ this.frameId = frameId
|
|
|
+ },
|
|
|
+ // frame handle
|
|
|
+ handleAddRoom() {
|
|
|
+ let parent_id = null
|
|
|
+ if (this.hospital_frame) {
|
|
|
+ parent_id = this.hospital_frame.frame_part.id
|
|
|
}
|
|
|
+ const params = { type: 4, name: this.frameName, part_id: this.$store.getters.partId, parent_id: parent_id }
|
|
|
+ params.full_name = params.name + '房'
|
|
|
+ HospitalFrame_API.addHospitalFrame(params).then(response => {
|
|
|
+ this.$message.success('添加成功!')
|
|
|
+ this.GET_All()
|
|
|
+ })
|
|
|
},
|
|
|
- methods: {
|
|
|
- GET_All() {
|
|
|
- HospitalFrame_API.getHospitalFrameList(this.$store.getters.userInfo.last_login_shopid).then(response => {
|
|
|
- if (response) {
|
|
|
- console.log(response)
|
|
|
- this.hospital_frame = response
|
|
|
- }
|
|
|
+ handleAddFrame(id, name) { // 新增床位
|
|
|
+ this.frameInfo = {}
|
|
|
+ this.frameInfo = { parent_id: id, type: 5 }
|
|
|
+ this.fullName = name
|
|
|
+ this.dialogFrameVisible = true
|
|
|
+ },
|
|
|
+ handelEditFrame(frame) {
|
|
|
+ this.frameInfo = { id: frame.id, type: frame.type, name: frame.name, alias: frame.alias, full_name: frame.full_name }
|
|
|
+ this.dialogFrameVisible = true
|
|
|
+ },
|
|
|
+ handleFrameFinished() {
|
|
|
+ this.dialogFrameVisible = false
|
|
|
+ this.GET_All()
|
|
|
+ },
|
|
|
+ /** 单条数据删除处理 */
|
|
|
+ handlerDeleteFrame(ids) {
|
|
|
+ this.$confirm('确定要删除此结构及其所有下级吗?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ HospitalFrame_API.deleteHospitalFrame(ids).then(response => {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '已删除!'
|
|
|
+ })
|
|
|
+ this.GET_All()
|
|
|
}).catch(response => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
message: response.message
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
- /** 下拉触发 */
|
|
|
- handleGroupCommand(object) {
|
|
|
- console.log(object)
|
|
|
- switch (object.type) {
|
|
|
- case 'edit':
|
|
|
- this.handelEditFrame(object.frame)
|
|
|
- break
|
|
|
- case 'delete':
|
|
|
- this.handlerDeleteFrame(object.frame.id)
|
|
|
- break
|
|
|
- case 'device':
|
|
|
- this.frameId = object.frame.id
|
|
|
- this.openDeviceList()
|
|
|
- break
|
|
|
- }
|
|
|
- },
|
|
|
- handleAddPatient(bedFrame) {
|
|
|
- this.customerId = 0
|
|
|
- this.frameId = bedFrame.id
|
|
|
- this.dialogPatientVisible = true
|
|
|
- },
|
|
|
- handlePatientFinished() {
|
|
|
- this.dialogPatientVisible = false
|
|
|
- this.GET_All()
|
|
|
- },
|
|
|
- handleEditPatient(id,frameId) {
|
|
|
- this.dialogPatientVisible = true
|
|
|
- this.customerId = id
|
|
|
- this.frameId = frameId
|
|
|
- },
|
|
|
- // frame handle
|
|
|
- handleAddRoom() {
|
|
|
- let parent_id = null
|
|
|
- if (this.hospital_frame) {
|
|
|
- parent_id = this.hospital_frame.frame_part.id
|
|
|
- }
|
|
|
- const params = { type: 4, name: this.frameName, part_id: this.$store.getters.partId, parent_id: parent_id}
|
|
|
- params.full_name = params.name + '房'
|
|
|
- HospitalFrame_API.addHospitalFrame(params).then(response => {
|
|
|
- this.$message.success('添加成功!')
|
|
|
- this.GET_All()
|
|
|
- })
|
|
|
- },
|
|
|
- handleAddFrame(id, name) { // 新增床位
|
|
|
- this.frameInfo = {}
|
|
|
- this.frameInfo = { parent_id: id, type: 5 }
|
|
|
- this.fullName = name
|
|
|
- this.dialogFrameVisible = true
|
|
|
- },
|
|
|
- handelEditFrame(frame) {
|
|
|
- this.frameInfo = { id: frame.id, type: frame.type, name: frame.name, alias: frame.alias, full_name: frame.full_name }
|
|
|
- this.dialogFrameVisible = true
|
|
|
- },
|
|
|
- handleFrameFinished() {
|
|
|
- this.dialogFrameVisible = false
|
|
|
- this.GET_All()
|
|
|
- },
|
|
|
- /** 单条数据删除处理 */
|
|
|
- handlerDeleteFrame(ids) {
|
|
|
- this.$confirm('确定要删除此结构及其所有下级吗?', '警告', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- HospitalFrame_API.deleteHospitalFrame(ids).then(response => {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '已删除!'
|
|
|
- })
|
|
|
- this.GET_All()
|
|
|
- }).catch(response => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: response.message
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
- // --------------------设备管理
|
|
|
- handlePartDevice() {
|
|
|
- this.frameId = this.hospital_frame.frame_part.id
|
|
|
- this.openDeviceList()
|
|
|
- },
|
|
|
- openDeviceList() {
|
|
|
- this.deviceVisible = true
|
|
|
- },
|
|
|
- handlerSubmit(formName) {
|
|
|
- this.$refs[formName].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- const params = this.MixinClone(this.frameInfo)
|
|
|
- if (params.id) {
|
|
|
- if (params.type === 5) {
|
|
|
- const name = params.full_name.split('-')
|
|
|
- params.full_name = name[0] + '-' + params.name + '床'
|
|
|
- } else if (params.type === 4) {
|
|
|
- params.full_name = params.name + '房'
|
|
|
- }
|
|
|
- HospitalFrame_API.updateHospitalFrame(params.id, params).then(response => {
|
|
|
- this.$message.success('修改成功!')
|
|
|
- this.handleFrameFinished()
|
|
|
- })
|
|
|
- } else {
|
|
|
- if (!params.part_id) {
|
|
|
- params.part_id = this.$store.getters.partId
|
|
|
- }
|
|
|
- params.full_name = this.fullName + '房-' + params.name + '床'
|
|
|
- HospitalFrame_API.addHospitalFrame(params).then(response => {
|
|
|
- this.$message.success('添加成功!')
|
|
|
- this.handleFrameFinished()
|
|
|
- })
|
|
|
+ // --------------------设备管理
|
|
|
+ handlePartDevice() {
|
|
|
+ this.frameId = this.hospital_frame.frame_part.id
|
|
|
+ this.openDeviceList()
|
|
|
+ },
|
|
|
+ openDeviceList() {
|
|
|
+ this.deviceVisible = true
|
|
|
+ },
|
|
|
+ handlerSubmit(formName) {
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const params = this.MixinClone(this.frameInfo)
|
|
|
+ if (params.id) {
|
|
|
+ if (params.type === 5) {
|
|
|
+ const name = params.full_name.split('-')
|
|
|
+ params.full_name = name[0] + '-' + params.name + '床'
|
|
|
+ } else if (params.type === 4) {
|
|
|
+ params.full_name = params.name + '房'
|
|
|
}
|
|
|
+ HospitalFrame_API.updateHospitalFrame(params.id, params).then(response => {
|
|
|
+ this.$message.success('修改成功!')
|
|
|
+ this.handleFrameFinished()
|
|
|
+ })
|
|
|
} else {
|
|
|
- this.$message.error('表单填写有误,请检查!')
|
|
|
- return false
|
|
|
+ if (!params.part_id) {
|
|
|
+ params.part_id = this.$store.getters.partId
|
|
|
+ }
|
|
|
+ params.full_name = this.fullName + '房-' + params.name + '床'
|
|
|
+ HospitalFrame_API.addHospitalFrame(params).then(response => {
|
|
|
+ this.$message.success('添加成功!')
|
|
|
+ this.handleFrameFinished()
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
+ } else {
|
|
|
+ this.$message.error('表单填写有误,请检查!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style type="text/scss" lang="scss" scoped>
|