Ver código fonte

增加tcp的枚举,修复设备类别查询错误的问题,修复交互记录类别查询错误的问题,增加医生主机上传,增加呼叫护士、增援按钮的标题设置

vothin 3 anos atrás
pai
commit
6aebaf4844

+ 3 - 0
languages/zh-CN.js

@@ -683,6 +683,8 @@ module.exports = {
     customizeRoleCallSecond: '自定义呼叫角色2',
     doctorTitle: '模拟分机医生标题',
     nurseTitle: '模拟分机护士标题',
+    doorNurseTitle: '门口机呼叫护士标题',
+    doorNursingTitle: '门口机进入护理标题',
     display: '显示',
     onDisplay: '不显示',
     upSeconds: '腕表上传定位间隔',
@@ -698,6 +700,7 @@ module.exports = {
     nurse: '护士主机APP更新',
     vnurse: '护士主机可视版',
     znurse: '总控护士主机APP更新',
+    doctor: '医生主机',
     door: '门口机APP更新',
     vdoor: '门口机可视版',
     sickbed: '5寸床位分机APP',

+ 10 - 0
src/api/ncs_partInfo.js

@@ -68,3 +68,13 @@ export function editPartSetting(params, partid) {
     data: params
   })
 }
+
+export function editShopMember(params) {
+  params.member_password = md5(params.member_password)
+  return request({
+    url: '/mgr/partinfo/edit_shop_member',
+    method: 'POST',
+    loading: true,
+    data: params
+  })
+}

+ 1 - 1
src/components/YearMonthPicker/src/main.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="display: inline-block">
-    <el-select v-if="optional" v-model="date_type" :disabled="disabled" placeholder="请选择" style="width: 100px">
+    <el-select v-if="optional" v-model="date_type" :disabled="disabled" :placeholder="this.$t('action.choice')" style="width: 100px">
       <el-option :label="this.$t('action.monthly')" value="month" />
       <el-option :label="this.$t('action.yearly')" value="year" />
       <el-option v-if="boolDay" :label="this.$t('action.daily')" value="date" />

+ 22 - 0
src/utils/enum/TcpTypeEnum.js

@@ -0,0 +1,22 @@
+import createEnum from '@/utils/enum/createEnum'
+import i18n from '@/utils/i18n'
+
+export const TCP_TYPE = createEnum(
+  {
+    CALLBACK: ['CALLBACK', i18n.t('tcpType.CALLBACK')],
+    SOS: ['SOS', i18n.t('tcpType.SOS')],
+    VOICE: ['VOICE', i18n.t('tcpType.VOICE')],
+    VIDEO: ['VIDEO', i18n.t('tcpType.VIDEO')],
+    IM: ['IM', i18n.t('tcpType.IM')],
+    DEVICE: ['DEVICE', i18n.t('tcpType.DEVICE')],
+    REINFORCE: ['REINFORCE', i18n.t('tcpType.REINFORCE')],
+    DATA: ['DATA', i18n.t('tcpType.DATA')],
+    EVENT: ['EVENT', i18n.t('tcpType.EVENT')],
+    SIDE: ['SIDE', i18n.t('tcpType.SIDE')],
+    BROADCAST: ['BROADCAST', i18n.t('tcpType.BROADCAST')],
+    TIME: ['TIME', i18n.t('tcpType.TIME')],
+    ENTRACEGUARD: ['ENTRACEGUARD', i18n.t('tcpType.ENTRACEGUARD')],
+    CHANNELIM: ['CHANNELIM', i18n.t('tcpType.CHANNELIM')],
+    LOCATION: ['LOCATION', i18n.t('tcpType.LOCATION')]
+  }
+)

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

@@ -43,7 +43,7 @@
     <el-dialog :visible.sync="customerFormVisible" :title="this.$t('customerManage.customerInfo')" class="customer-dialog">
       <el-tabs v-model="activeName" type="border-card" tab-position="bottom" width="50%" @tab-click="handleClick">
         <el-tab-pane :label="this.$t('customerManage.baseInfo')" name="customerBaseInfo">
-          <div >
+          <div>
             <el-form ref="editForm" :model="formmodel" :rules="rules" label-width="120px">
               <el-row>
                 <el-col :span="12">

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

@@ -43,7 +43,7 @@
         <el-dialog :visible.sync="customerFormVisible" :title="this.$t('customerManage.customerInfo')" class="customer-dialog">
             <el-tabs v-model="activeName" type="border-card" tab-position="bottom" width="50%" @tab-click="handleClick">
                 <el-tab-pane :label="this.$t('customerManage.baseInfo')" name="customerBaseInfo">
-                    <div style="height: 720px">
+                    <div>
                         <el-form ref="editForm" :model="formmodel" :rules="rules" label-width="120px">
                             <el-row>
                                 <el-col :span="12">

+ 19 - 19
src/views/hospital/ncs_device/deviceManager.vue

@@ -385,25 +385,25 @@ export default {
         { key: this.$t('deviceType.LED_SCREEN'), value: 6 },
         { key: this.$t('deviceType.NURSE_WATCH'), value: 7 },
         // { key: '护工腕表', value: 8 },
-        { key: this.$t('deviceType.WORKER_WATCH'), value: 9 },
-        { key: this.$t('deviceType.USER_WATCH'), value: 10 },
-        { key: this.$t('deviceType.CELL_PHONE'), value: 11 },
-        { key: this.$t('deviceType.TRANSFER_DEVICE'), value: 12 },
-        { key: this.$t('deviceType.SIMULATE_BED_DEVICE'), value: 13 },
-        { key: this.$t('deviceType.SIMULATE_EMERGENCY_BUTTON'), value: 14 },
-        { key: this.$t('deviceType.SIMULATE_DOOR_LIGHT'), value: 15 },
-        { key: this.$t('deviceType.REMOTE_CONTROL'), value: 16 },
-        { key: this.$t('deviceType.BEACON'), value: 17 },
-        { key: this.$t('deviceType.INFORMATION_BOARD'), value: 18 },
-        { key: this.$t('deviceType.ENTRANCE_GUARD'), value: 19 },
-        { key: this.$t('deviceType.VISITATION'), value: 20 },
-        { key: this.$t('deviceType.RS485_TRANSFER'), value: 21 },
-        { key: this.$t('deviceType.EMERGENCY_BUTTON'), value: 22 },
-        { key: this.$t('deviceType.RS485_DOOR'), value: 23 },
-        { key: this.$t('deviceType.ALARM_BODY_INDUCTIVE'), value: 24 },
-        { key: this.$t('deviceType.ALARM_WATER_OVERFLOW'), value: 25 },
-        { key: this.$t('deviceType.ALARM_HOUSEHOLD_GAS'), value: 26 },
-        { key: this.$t('deviceType.ALARM_HOUSEHOLD_SMOKE'), value: 27 },
+        { key: this.$t('deviceType.USER_WATCH'), value: 9 },
+        { key: this.$t('deviceType.CELL_PHONE'), value: 10 },
+        { key: this.$t('deviceType.TRANSFER_DEVICE'), value: 11 },
+        { key: this.$t('deviceType.SIMULATE_BED_DEVICE'), value: 12 },
+        { key: this.$t('deviceType.SIMULATE_EMERGENCY_BUTTON'), value: 13 },
+        { key: this.$t('deviceType.SIMULATE_DOOR_LIGHT'), value: 14 },
+        { key: this.$t('deviceType.REMOTE_CONTROL'), value: 15 },
+        { key: this.$t('deviceType.BEACON'), value: 16 },
+        { key: this.$t('deviceType.INFORMATION_BOARD'), value: 17 },
+        { key: this.$t('deviceType.ENTRANCE_GUARD'), value: 18 },
+        { key: this.$t('deviceType.VISITATION'), value: 19 },
+        { key: this.$t('deviceType.RS485_TRANSFER'), value: 20 },
+        { key: this.$t('deviceType.EMERGENCY_BUTTON'), value: 21 },
+        { key: this.$t('deviceType.RS485_DOOR'), value: 22 },
+        { key: this.$t('deviceType.ALARM_BODY_INDUCTIVE'), value: 23 },
+        { key: this.$t('deviceType.ALARM_WATER_OVERFLOW'), value: 24 },
+        { key: this.$t('deviceType.ALARM_HOUSEHOLD_GAS'), value: 25 },
+        { key: this.$t('deviceType.ALARM_HOUSEHOLD_SMOKE'), value: 26 },
+        { key: this.$t('deviceType.ALARM_BUTTON_SOS'), value: 27 },
         { key: this.$t('deviceType.VITAL_SIGNS_DEVICE'), value: 28 },
         { key: this.$t('deviceType.DOOR_LOCK'), value: 30 }
       ],

+ 23 - 20
src/views/ncs-device/components/deviceManager.vue

@@ -376,25 +376,25 @@ export default {
         { key: this.$t('deviceType.LED_SCREEN'), value: 6 },
         { key: this.$t('deviceType.NURSE_WATCH'), value: 7 },
         // { key: '护工腕表', value: 8 },
-        { key: this.$t('deviceType.WORKER_WATCH'), value: 9 },
-        { key: this.$t('deviceType.USER_WATCH'), value: 10 },
-        { key: this.$t('deviceType.CELL_PHONE'), value: 11 },
-        { key: this.$t('deviceType.TRANSFER_DEVICE'), value: 12 },
-        { key: this.$t('deviceType.SIMULATE_BED_DEVICE'), value: 13 },
-        { key: this.$t('deviceType.SIMULATE_EMERGENCY_BUTTON'), value: 14 },
-        { key: this.$t('deviceType.SIMULATE_DOOR_LIGHT'), value: 15 },
-        { key: this.$t('deviceType.REMOTE_CONTROL'), value: 16 },
-        { key: this.$t('deviceType.BEACON'), value: 17 },
-        { key: this.$t('deviceType.INFORMATION_BOARD'), value: 18 },
-        { key: this.$t('deviceType.ENTRANCE_GUARD'), value: 19 },
-        { key: this.$t('deviceType.VISITATION'), value: 20 },
-        { key: this.$t('deviceType.RS485_TRANSFER'), value: 21 },
-        { key: this.$t('deviceType.EMERGENCY_BUTTON'), value: 22 },
-        { key: this.$t('deviceType.RS485_DOOR'), value: 23 },
-        { key: this.$t('deviceType.ALARM_BODY_INDUCTIVE'), value: 24 },
-        { key: this.$t('deviceType.ALARM_WATER_OVERFLOW'), value: 25 },
-        { key: this.$t('deviceType.ALARM_HOUSEHOLD_GAS'), value: 26 },
-        { key: this.$t('deviceType.ALARM_HOUSEHOLD_SMOKE'), value: 27 },
+        { key: this.$t('deviceType.USER_WATCH'), value: 9 },
+        { key: this.$t('deviceType.CELL_PHONE'), value: 10 },
+        { key: this.$t('deviceType.TRANSFER_DEVICE'), value: 11 },
+        { key: this.$t('deviceType.SIMULATE_BED_DEVICE'), value: 12 },
+        { key: this.$t('deviceType.SIMULATE_EMERGENCY_BUTTON'), value: 13 },
+        { key: this.$t('deviceType.SIMULATE_DOOR_LIGHT'), value: 14 },
+        { key: this.$t('deviceType.REMOTE_CONTROL'), value: 15 },
+        { key: this.$t('deviceType.BEACON'), value: 16 },
+        { key: this.$t('deviceType.INFORMATION_BOARD'), value: 17 },
+        { key: this.$t('deviceType.ENTRANCE_GUARD'), value: 18 },
+        { key: this.$t('deviceType.VISITATION'), value: 19 },
+        { key: this.$t('deviceType.RS485_TRANSFER'), value: 20 },
+        { key: this.$t('deviceType.EMERGENCY_BUTTON'), value: 21 },
+        { key: this.$t('deviceType.RS485_DOOR'), value: 22 },
+        { key: this.$t('deviceType.ALARM_BODY_INDUCTIVE'), value: 23 },
+        { key: this.$t('deviceType.ALARM_WATER_OVERFLOW'), value: 24 },
+        { key: this.$t('deviceType.ALARM_HOUSEHOLD_GAS'), value: 25 },
+        { key: this.$t('deviceType.ALARM_HOUSEHOLD_SMOKE'), value: 26 },
+        { key: this.$t('deviceType.ALARM_BUTTON_SOS'), value: 27 },
         { key: this.$t('deviceType.VITAL_SIGNS_DEVICE'), value: 28 },
         { key: this.$t('deviceType.DOOR_LOCK'), value: 30 }
       ],
@@ -439,7 +439,10 @@ export default {
   watch: {
     frame(val, oldvalue) {
       console.log('watch', val)
-      this.params.fixedCondition = Object.keys(this.frame).length === 0 ? 'part_id=' + this.$store.getters.partId : 'part_id=' + this.$store.getters.partId + ' and frame_id =' + this.frame.id
+      this.params.fixedCondition = Object.keys(this.frame).length === 0 ? 'part_id=' + this.$store.getters.partId :
+          (this.frame.part_id ?  'part_id=' + this.frame.part_id + ' and frame_id =' + this.frame.id :
+              'part_id=' + this.frame.hospital_id + ' and frame_id =' + this.frame.id)
+
       this.getList()
     }
   },

+ 9 - 24
src/views/ncs-interaction/index.vue

@@ -64,6 +64,8 @@ import * as API_interaction from '@/api/ncs_interaction'
 import { unixToDate } from '@/utils/Foundation'
 import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
 import { returnDeviceType } from '@/utils/device_type'
+import {DEVICE_TYPE} from "@/utils/enum/DeviceTypeEnum";
+import {TCP_TYPE} from "@/utils/enum/TcpTypeEnum";
 
 export default {
   name: 'Index',
@@ -306,28 +308,9 @@ export default {
       return named
     },
     formatterType(param) {
-      switch (param.value) {
-        case 'CALLBACK':
-          return this.$t('tcpType.CALLBACK')
-        case 'VOICE':
-          return this.$t('tcpType.VOICE')
-        case 'VIDEO':
-          return this.$t('tcpType.VIDEO')
-        case 'IM':
-          return this.$t('tcpType.IM')
-        case 'DEVICE':
-          return this.$t('tcpType.DEVICE')
-        case 'DATA':
-          return this.$t('tcpType.DATA')
-        case 'EVENT':
-          return this.$t('tcpType.EVENT')
-        case 'BROADCAST':
-          return this.$t('tcpType.BROADCAST')
-        case 'TIME':
-          return this.$t('tcpType.TIME')
-        default:
-          return this.$t('tcpType.UNKNOWN')
-      }
+      const gridVal = param.value
+      // return this.deviceTypeTransfer.filter(p => p.value === gridVal).map(p => p.key)
+      return TCP_TYPE.getDescFromValue(gridVal)
     },
     formatterResult(param) {
       if (param.value) {
@@ -338,10 +321,12 @@ export default {
     },
     formatterDeviceType(param) {
       if (param.data.outerior_action) {
-        return returnDeviceType(param.value)
+        // return returnDeviceType(param.value)
+        return DEVICE_TYPE.getDescFromValue(param.value)
       } else {
         if (param.value) {
-          return returnDeviceType(param.value)
+          // return returnDeviceType(param.value)
+          return DEVICE_TYPE.getDescFromValue(param.value)
         } else {
           return this.$t('interaction.notOperated')
         }

+ 65 - 7
src/views/ncs-orginazition/components/partInfoEdit.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-card style="margin: 15px">
-      <el-form ref="editform" :rules="rules" label-width="130px" :model="formmodel">
+      <el-form ref="editform" :rules="rules" label-width="140px" :model="formmodel">
         <fieldset>
           <legend>{{ this.$t('partInfo.baseInfo') }}</legend>
           <el-row>
@@ -37,10 +37,19 @@
                 <el-input v-model="formmodel.member_name"
                           clearable
                           :maxlength="100"
-                          readonly
+                          :readonly="noMember"
                           :placeholder="this.$t('partInfo.inputShopMemberName')" />
               </el-form-item>
             </el-col>
+            <el-col v-if="!noMember" :span="8">
+              <el-form-item :label="this.$t('partInfo.shopMemberPassword')" prop="member_password">
+                <el-input v-model="formmodel.member_password"
+                          type="password"
+                          clearable
+                          :maxlength="100"
+                          :placeholder="this.$t('partInfo.inputShopMemberPassword')" />
+              </el-form-item>
+            </el-col>
             <el-col :span="8">
               <el-form-item :label="this.$t('partInfo.shopParentId')" prop="parent_id">
                 <el-select v-model="formmodel.parent_id" :placeholder="this.$t('partInfo.choiceShopParentId')" clearable>
@@ -343,6 +352,26 @@
               </el-form-item>
             </el-col>
             <el-col :span="8">
+              <el-form-item :label="this.$t('partInfo.doorNurseTitle')">
+                <el-input v-model="formmodel.door_nurse_title" :label="this.$t('partInfo.doorNurseTitle')" :maxlength="15" >
+                  <el-select v-model="formmodel.door_nurse_valid" slot="prepend" :placeholder="this.$t('action.choice')">
+                    <el-option :label="this.$t('partInfo.display')" :value="1"></el-option>
+                    <el-option :label="this.$t('partInfo.onDisplay')" :value="0"></el-option>
+                  </el-select>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item :label="this.$t('partInfo.doorNursingTitle')">
+                <el-input v-model="formmodel.door_nursing_title" :label="this.$t('partInfo.doorNursingTitle')" :maxlength="15" >
+                  <el-select v-model="formmodel.door_nursing_valid" slot="prepend" :placeholder="this.$t('action.choice')">
+                    <el-option :label="this.$t('partInfo.display')" :value="1" />
+                    <el-option :label="this.$t('partInfo.onDisplay')" :value="0" />
+                  </el-select>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
               <el-form-item :label="this.$t('partInfo.upSeconds')">
                 <el-input-number v-model="formmodel.up_seconds" :min="1" :max="300" :label="this.$t('partInfo.upSeconds')" />
               </el-form-item>
@@ -386,8 +415,13 @@ export default {
   },
   data() {
     return {
-      formmodel: {},
-      rules: {},
+      formmodel: {
+      },
+      rules: {
+        // member_password: [
+        //   { required: true, message: this.$t('partInfo.inputShopMemberPassword'), trigger: 'blur' }
+        // ]
+      },
       dayStart: new Date(2020, 11, 11, 7, 0),
       nightStart: new Date(2020, 11, 11, 18, 0),
       nurseLevel0Config: [],
@@ -397,6 +431,7 @@ export default {
       partRoles: [],
       systemConfig: {},
       formmodelAdmin: {},
+      noMember: true
     }
   },
   async mounted() {
@@ -412,6 +447,11 @@ export default {
       if (this.partId) {
         API_Part.getPartSetting(this.partId).then(res => {
           this.formmodel = { ...res }
+          if (!this.formmodel.member_name || this.formmodel.member_name === '') {
+            this.noMember = false
+          } else {
+            this.noMember = true
+          }
           if (!this.formmodel.id) {
             this.formmodel = {
               ...this.formmodel, ...{
@@ -450,7 +490,11 @@ export default {
                 communication_mode_mobile: 1,
                 customize_role_call_first: 0,
                 customize_role_call_second: 0,
-                auto_accept: 0
+                auto_accept: 0,
+                door_nurse_title: '呼叫护士',
+                door_nurse_valid: 1,
+                door_nursing_title: '进入护理',
+                door_nursing_valid: 1
               }
             }
           } else {
@@ -465,6 +509,10 @@ export default {
           this.formmodel.doctor_valid = res.doctor_valid
           this.formmodel.nurse_title = res.nurse_title
           this.formmodel.nurse_valid = res.nurse_valid
+          // this.formmodel.door_nurse_title = res.door_nurse_title
+          // this.formmodel.door_nurse_valid = res.door_nurse_valid
+          // this.formmodel.door_nursing_title = res.door_nursing_title
+          // this.formmodel.door_nursing_valid = res.door_nursing_valid
           this.formmodel.up_seconds = res.up_seconds
           API_SystemConfig.getConfig('groupHostTransferSeconds').then(r => {
             this.systemConfig = r
@@ -503,11 +551,21 @@ export default {
           if (this.nightStart) {
             this.formmodel.night_start = this.nightStart.toLocaleTimeString('chinese', { hour12: false })
           }
+          if (this.formmodel.member_password) {
+            let params = {}
+            params.shop_id = this.partId
+            params.member_name = this.formmodel.member_name
+            params.member_password = this.formmodel.member_password
+            API_Part.editShopMember(params).then(res => {
+              this.$message.success(this.$t('action.saveSuccess'))
+              this.noMember = true
+            })
+          }
           API_Part.editPartSetting(this.formmodel, this.partId).then(res => {
-            this.$message.success(this.$t('action.saveSuccess') + '')
+            this.$message.success(this.$t('action.saveSuccess'))
             if (this.systemConfig.id != null) {
               API_SystemConfig.update(this.systemConfig.id, this.systemConfig).then(res => {
-                this.$message.success(this.$t('action.saveSuccess') + '')
+                this.$message.success(this.$t('action.saveSuccess'))
               })
             }
           })

+ 1 - 1
src/views/ncs-orginazition/index.vue

@@ -117,7 +117,7 @@ export default {
         page_no: 1
       },
       /** 新建组织弹出参数 **/
-      formtitle: '新建组织',
+      formtitle: this.$t('partInfo.organizationAdd'),
       formshow: false,
       formmodel: {},
       rules: {

+ 5 - 0
src/views/ncs-orginazition/partInfoSetting.vue

@@ -26,6 +26,11 @@
           <app-version-manager :part-id="part_id" :device-type="201" />
         </keep-alive>
       </el-tab-pane>
+      <el-tab-pane :label="this.$t('partInfo.doctor')" name="doctor">
+        <keep-alive>
+          <app-version-manager :part-id="part_id" :device-type="2" />
+        </keep-alive>
+      </el-tab-pane>
       <el-tab-pane :label="this.$t('partInfo.door')" name="door">
         <keep-alive>
           <app-version-manager :part-id="part_id" :device-type="3" />