|
@@ -509,6 +509,7 @@
|
|
|
import avator from "@/assets/avatar.jpeg";
|
|
|
import {FRAME_TYPE} from "@/utils/enum/FrameTypeEnum";
|
|
|
import * as API_SystemConfig from "@/api/ncs_systemconfig";
|
|
|
+ import * as shop_API from "@/api/ncs_shop";
|
|
|
const serverUrl = domain.serverUrl
|
|
|
export default {
|
|
|
name: 'PatientManager',
|
|
@@ -622,6 +623,7 @@
|
|
|
},
|
|
|
/** 空床位 **/
|
|
|
emptyBeds: [],
|
|
|
+ partFrames: [],
|
|
|
/** frame 是否为空床位 */
|
|
|
isEmptyFrame: true,
|
|
|
rules: {
|
|
@@ -926,7 +928,7 @@
|
|
|
}
|
|
|
]
|
|
|
})
|
|
|
- this.getEmptyBeds()
|
|
|
+ this.getShop(this.$store.getters.partId)
|
|
|
|
|
|
this.getCloud()
|
|
|
|
|
@@ -1582,8 +1584,26 @@
|
|
|
})
|
|
|
},
|
|
|
getFrame(frame_id) {
|
|
|
- return this.emptyBeds.filter(item => item.id === frame_id)
|
|
|
+ return this.partFrames.filter(item => item.id === frame_id)
|
|
|
},
|
|
|
+ getShop(shopId) {
|
|
|
+ shop_API.getShop(shopId).then(res => {
|
|
|
+ this.shop = res;
|
|
|
+ this.getEmptyBeds()
|
|
|
+ this.getPartFrame(shopId)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getPartFrame(partId) {
|
|
|
+ if (this.shop.shop_type === "0" && this.shop.parent_id === -1) {
|
|
|
+ API_Frame.getAllFrames(partId).then(res => {
|
|
|
+ this.partFrames = [...res]
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ API_Frame.getFramesPartId(partId).then(res => {
|
|
|
+ this.partFrames = [...res]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|