Browse Source

修复superadmin管理界面在创建设备、人员等,对应科室错误的问题,打开月子中心的用户体征

vothin 3 năm trước cách đây
mục cha
commit
e9ba908fe5

+ 17 - 0
src/api/ncs_hospitalFrame.js

@@ -59,6 +59,14 @@ export function getFrameWithPatientAndDeviceVO() {
   })
   })
 }
 }
 
 
+export function getAllSickbed(id) {
+  return request({
+    url: `/ncs/frame/get_all_sick_bed/${id}`,
+    method: 'GET',
+    loading: false
+  })
+}
+
 export function getSickbedByPartId(id) {
 export function getSickbedByPartId(id) {
   return request({
   return request({
     url: `/ncs/frame/getSickbedByPartId/${id}`,
     url: `/ncs/frame/getSickbedByPartId/${id}`,
@@ -97,6 +105,15 @@ export function getFramesPartId(part_id) {
     loading: false
     loading: false
   })
   })
 }
 }
+
+export function getAllFrames(part_id) {
+  return request({
+    url: `/ncs/frame/all_frames/${part_id}`,
+    method: 'GET',
+    loading: false
+  })
+}
+
 export function getFramesHospital(hospital_id) {
 export function getFramesHospital(hospital_id) {
   return request({
   return request({
     url: `/ncs/frame/getFramesByHospitalId/${hospital_id}`,
     url: `/ncs/frame/getFramesByHospitalId/${hospital_id}`,

+ 7 - 0
src/api/ncs_shop.js

@@ -7,3 +7,10 @@ export function getShopList(partId) {
   })
   })
 }
 }
 
 
+export function getShop(partId) {
+  return request({
+    url: `/ncs/shop/get_shop_by_shop_id/${partId}`,
+    method: 'GET'
+  })
+}
+

+ 31 - 13
src/views/customer/components/customerManager.vue

@@ -343,9 +343,9 @@
 
 
         </el-tab-pane>
         </el-tab-pane>
 
 
-<!--        <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.vital')" name="customer-vital-sign">-->
-<!--            <vital-sign-log :member-id="formmodel.member_id+''" :active-name="'vital_signs1'"/>-->
-<!--        </el-tab-pane>-->
+        <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.vital')" name="customer-vital-sign">
+            <vital-sign-log :member-id="formmodel.member_id+''" :active-name="'vital_signs1'"/>
+        </el-tab-pane>
 
 
         <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.remark')" name="customerRemark">
         <el-tab-pane v-if="formmodel.id" :label="this.$t('customerManage.remark')" name="customerRemark">
           <div style="height: 450px;display: flex;flex-direction: column;">
           <div style="height: 450px;display: flex;flex-direction: column;">
@@ -544,6 +544,7 @@ import vueQr from 'vue-qr'
 import * as API_SystemConfig from '@/api/ncs_systemconfig'
 import * as API_SystemConfig from '@/api/ncs_systemconfig'
 import {RELATIVE_NAME_TYPE} from "@/utils/enum/RelativeNameTypeEnum";
 import {RELATIVE_NAME_TYPE} from "@/utils/enum/RelativeNameTypeEnum";
 import {CHILDBIRTH_TYPE} from "@/utils/enum/ChildbirthTypeEnum";
 import {CHILDBIRTH_TYPE} from "@/utils/enum/ChildbirthTypeEnum";
+import * as shop_API from "@/api/ncs_shop";
 const serverUrl = domain.serverUrl
 const serverUrl = domain.serverUrl
 export default {
 export default {
   name: 'CustomerManager',
   name: 'CustomerManager',
@@ -716,6 +717,7 @@ export default {
       relativeNameTypeEnum: RELATIVE_NAME_TYPE.getValueList(),
       relativeNameTypeEnum: RELATIVE_NAME_TYPE.getValueList(),
       childbirthTypeEnum: CHILDBIRTH_TYPE.getValueList(),
       childbirthTypeEnum: CHILDBIRTH_TYPE.getValueList(),
       isChild: false,
       isChild: false,
+      shop: {}
     }
     }
   },
   },
   computed: {
   computed: {
@@ -928,7 +930,7 @@ export default {
         }
         }
       ]
       ]
     })
     })
-    this.getEmptyBeds()
+    this.getShop(this.$store.getters.partId)
     this.getCloud()
     this.getCloud()
   },
   },
   methods: {
   methods: {
@@ -937,13 +939,23 @@ export default {
     },
     },
     getEmptyBeds() {
     getEmptyBeds() {
       return new Promise((resolve, reject) => {
       return new Promise((resolve, reject) => {
-        API_Frame.getSickbedByPartId(this.$store.getters.partId).then(res => {
-          this.emptyBeds = [...res]
-          resolve()
-        }).catch(err => {
-          this.$message.error(this.$t('customerManage.getEmptyBed') + err.message)
-          reject()
-        })
+        if (this.shop.shop_type === "0" && this.shop.parent_id === -1) {
+          API_Frame.getAllSickbed(this.$store.getters.partId).then(res => {
+            this.emptyBeds = [...res]
+            resolve()
+          }).catch(err => {
+            this.$message.error(this.$t('customerManage.getEmptyBed') + err.message)
+            reject()
+          })
+        } else {
+          API_Frame.getSickbedByPartId(this.$store.getters.partId).then(res => {
+            this.emptyBeds = [...res]
+            resolve()
+          }).catch(err => {
+            this.$message.error(this.$t('customerManage.getEmptyBed') + err.message)
+            reject()
+          })
+        }
       })
       })
     },
     },
     /** 分页大小发生改变 */
     /** 分页大小发生改变 */
@@ -1034,7 +1046,7 @@ export default {
         in_date: (new Date()).valueOf(),
         in_date: (new Date()).valueOf(),
         out_date: (new Date()).valueOf(),
         out_date: (new Date()).valueOf(),
         mobile: '',
         mobile: '',
-        part_id: this.$store.getters.partId
+        part_id: this.frame.part_id
       }
       }
       if (Object.keys(this.frame).length > 0) {
       if (Object.keys(this.frame).length > 0) {
         this.$set(this.formmodel, 'frame_id', this.frame.id)
         this.$set(this.formmodel, 'frame_id', this.frame.id)
@@ -1487,7 +1499,13 @@ export default {
       API_SystemConfig.cloud().then(r => {
       API_SystemConfig.cloud().then(r => {
         this.isCloud = r
         this.isCloud = r
       })
       })
-    }
+    },
+    getShop(shopId) {
+      shop_API.getShop(shopId).then(res => {
+        this.shop = res;
+        this.getEmptyBeds()
+      })
+    },
   }
   }
 }
 }
 </script>
 </script>

+ 1 - 1
src/views/customer/components/patientManager.vue

@@ -1051,7 +1051,7 @@
                     age_unit: '岁',
                     age_unit: '岁',
                     in_date: (new Date()).valueOf(),
                     in_date: (new Date()).valueOf(),
                     mobile: '',
                     mobile: '',
-                    part_id: this.$store.getters.partId
+                    part_id: this.frame.part_id
                 }
                 }
                 if (Object.keys(this.frame).length > 0) {
                 if (Object.keys(this.frame).length > 0) {
                     this.$set(this.formmodel, 'frame_id', this.frame.id)
                     this.$set(this.formmodel, 'frame_id', this.frame.id)

+ 1 - 0
src/views/hospitalFrame/frameTreeView-admin.vue

@@ -301,6 +301,7 @@ export default {
         this.frameInfo = {
         this.frameInfo = {
           hospital_id: data.hospital_id,
           hospital_id: data.hospital_id,
           parent_id: data.id,
           parent_id: data.id,
+          part_id: data.part_id,
           type: data.type === FRAME_TYPE.ROOM ? FRAME_TYPE.BED : FRAME_TYPE.ROOM,
           type: data.type === FRAME_TYPE.ROOM ? FRAME_TYPE.BED : FRAME_TYPE.ROOM,
           parent_name: data.name,
           parent_name: data.name,
           name: '',
           name: '',

+ 21 - 10
src/views/ncs-device/components/deviceManager.vue

@@ -265,6 +265,7 @@ import { FRAME_TYPE } from '@/utils/enum/FrameTypeEnum'
 import { DEVICE_TYPE } from '@/utils/enum/DeviceTypeEnum'
 import { DEVICE_TYPE } from '@/utils/enum/DeviceTypeEnum'
 import {SOS_DEVICE_SETTING_TYPE} from "@/utils/enum/SosDeviceSettingTypeEnum";
 import {SOS_DEVICE_SETTING_TYPE} from "@/utils/enum/SosDeviceSettingTypeEnum";
 import {VITAL_SIGNS_DEVICE_TYPE} from "@/utils/enum/VitalSignsDeviceEnum";
 import {VITAL_SIGNS_DEVICE_TYPE} from "@/utils/enum/VitalSignsDeviceEnum";
+import * as shop_API from "@/api/ncs_shop";
 const DeviceUrl = domain.DeviceUrl
 const DeviceUrl = domain.DeviceUrl
 export default {
 export default {
   name: 'DeviceManager',
   name: 'DeviceManager',
@@ -430,7 +431,9 @@ export default {
       vitalSignsDeviceEnum: VITAL_SIGNS_DEVICE_TYPE.getValueList(),
       vitalSignsDeviceEnum: VITAL_SIGNS_DEVICE_TYPE.getValueList(),
       isLedDevice: false,
       isLedDevice: false,
       websock: null,
       websock: null,
-      onlineDevice: []
+      onlineDevice: [],
+      // 请求当前科室的数据
+      shop: {}
     }
     }
   },
   },
   computed: {
   computed: {
@@ -590,11 +593,7 @@ export default {
         }
         }
       ]
       ]
     })
     })
-    /** 加载科室空间节点  **/
-    if (this.part_view) {
-      // this.getPartFrames(this.$store.getters.partId)
-      this.getTypeFrame(this.$store.getters.partId)
-    }
+    this.getShop(this.$store.getters.partId)
     this.initWebSocket()
     this.initWebSocket()
   },
   },
   methods: {
   methods: {
@@ -638,9 +637,15 @@ export default {
       this.typeFrames = this.partFrames
       this.typeFrames = this.partFrames
     },
     },
     getTypeFrame(partId) {
     getTypeFrame(partId) {
-      API_Frame.getFramesPartId(partId).then(res => {
-        this.partFrames = [...res]
-      })
+      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]
+        })
+      }
     },
     },
     /** 将partFrames做分割 */
     /** 将partFrames做分割 */
     getFramesByType(device_type) {
     getFramesByType(device_type) {
@@ -833,7 +838,7 @@ export default {
         priority: 1,
         priority: 1,
         code: 'C' + parseInt(Math.random() * 100000),
         code: 'C' + parseInt(Math.random() * 100000),
         model: 'M' + parseInt(Math.random() * 100000),
         model: 'M' + parseInt(Math.random() * 100000),
-        part_id: this.$store.getters.partId,
+        part_id: this.frame.part_id,
         status: 1
         status: 1
       }
       }
       this.sosDeviceSetting = {
       this.sosDeviceSetting = {
@@ -956,6 +961,12 @@ export default {
         this.sosDeviceSetting = r;
         this.sosDeviceSetting = r;
       })
       })
     },
     },
+    getShop(shopId) {
+      shop_API.getShop(shopId).then(res => {
+        this.shop = res;
+        this.getTypeFrame(shopId)
+      })
+    },
 
 
     initWebSocket: function() {
     initWebSocket: function() {
       var stockbase = DeviceUrl.replace('http', 'ws')
       var stockbase = DeviceUrl.replace('http', 'ws')