Selaa lähdekoodia

修改报警时间设置

vothin 3 vuotta sitten
vanhempi
commit
70b0ba24e0

+ 2 - 2
src/utils/enum/DeviceTypeEnum.js

@@ -6,8 +6,8 @@ export const DEVICE_TYPE = createEnum(
     DOCTOR_HOST: [2, '医生主机'],
     DOOR_DEVICE: [3, '门口机'],
     DIGIT_BED_DEVICE: [4, '床位分机'],
-    LED_SCREEN: [5, 'LCD走廊屏'],
-    LCD_SCREEN: [6, 'LED点阵屏'],
+    LCD_SCREEN: [5, 'LCD走廊屏'],
+    LED_SCREEN: [6, 'LED点阵屏'],
     NURSE_WATCH: [7, '护士移动'],
     WORKER_WATCH: [8, '护工移动'],
     USER_WATCH: [9, '用户移动'],

+ 45 - 6
src/views/hospital/ncs_device/deviceManager.vue

@@ -200,11 +200,35 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-radio-group label="报警时间单位" v-model="sosDeviceSetting.unit" size="mini" prop="unit">
-              <el-radio label="小时">小时</el-radio>
-              <el-radio label="分钟">分钟</el-radio>
-              <el-radio label="秒">秒</el-radio>
-            </el-radio-group>
+            <el-form-item label="报警时间单位" prop="unit">
+              <el-radio-group v-model="sosDeviceSetting.unit" size="mini" prop="unit">
+                <el-radio label="小时">小时</el-radio>
+                <el-radio label="分钟">分钟</el-radio>
+                <el-radio label="秒">秒</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="isLedDevice">
+          <el-col :span="12">
+            <el-form-item label="点阵屏规格" prop="led_resolution_ratio">
+              <el-input v-model="deviceModel.led_resolution_ratio" clearable placeholder="点阵屏规格" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="语音播放" prop="led_voice">
+              <el-radio-group v-model="deviceModel.led_voice" size="mini" prop="unit">
+                <el-radio :label=1>开启语音</el-radio>
+                <el-radio :label=0>关闭语音</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="isLedDevice">
+          <el-col :span="12">
+            <el-form-item label="字体大小" prop="led_font_size">
+              <el-input-number v-model="deviceModel.led_font_size" controls-position="right" :min="0" :max="60" />
+            </el-form-item>
           </el-col>
         </el-row>
       </el-form>
@@ -302,6 +326,15 @@ export default {
         // sip_id: [
         //   { required: true, message: '请输入485地址', trigger: 'blur' }
         // ]
+        led_resolution_ratio: [
+          { required: true, message: '点阵屏规格', trigger: 'blur' }
+        ],
+        led_voice: [
+          { required: true, message: '点阵屏语音播放', trigger: 'blur' }
+        ],
+        led_font_size: [
+          { required: true, message: '点阵屏字体大小', trigger: 'blur' }
+        ],
       },
       partFrames: [],
       typeFrames: [],
@@ -356,7 +389,8 @@ export default {
           value: 2,
           label: '关爱老人模式'
         }
-      ]
+      ],
+      isLedDevice: false
     }
   },
   computed: {
@@ -650,6 +684,8 @@ export default {
           val === DEVICE_TYPE.SIMULATE_DOOR_LIGHT
       this.hasSosDeviceSettings = val === DEVICE_TYPE.ALARM_BODY_INDUCTIVE ||
           val === DEVICE_TYPE.DOOR_LOCK
+      this.isLedDevice = val === DEVICE_TYPE.LED_SCREEN ||
+          val === DEVICE_TYPE.LCD_SCREEN
     },
     /** 设备类型选中对应的空间结构  **/
     deviceTypeChangeToFrameTypeChange(val) {
@@ -706,6 +742,7 @@ export default {
       this.getRoles({ page_size: 200, page_no: 1, fixedCondition: ' shop_id = -1', sort: ' role_id', dir: 'desc' })
       this.hasAudioId = false
       this.hasSosDeviceSettings = false
+      this.isLedDevice = false
       this.getDevices(this.$store.getters.partId)
       this.deviceEditTitle = '添加设备'
       this.deviceDialogVisible = true
@@ -726,6 +763,8 @@ export default {
           params.device_type === DEVICE_TYPE.SIMULATE_DOOR_LIGHT
       this.hasSosDeviceSettings = params.device_type === DEVICE_TYPE.ALARM_BODY_INDUCTIVE ||
           params.device_type === DEVICE_TYPE.DOOR_LOCK
+      this.isLedDevice = params.device_type === DEVICE_TYPE.LED_SCREEN ||
+          params.device_type === DEVICE_TYPE.LCD_SCREEN
       this.deviceModel = {
         ...params
       }

+ 44 - 5
src/views/ncs-device/components/deviceManager.vue

@@ -197,11 +197,35 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-radio-group label="报警时间单位" v-model="sosDeviceSetting.unit" size="mini" prop="unit">
-              <el-radio label="小时">小时</el-radio>
-              <el-radio label="分钟">分钟</el-radio>
-              <el-radio label="秒">秒</el-radio>
-            </el-radio-group>
+            <el-form-item label="报警时间单位" prop="unit">
+              <el-radio-group v-model="sosDeviceSetting.unit" size="mini" prop="unit">
+                <el-radio label="小时">小时</el-radio>
+                <el-radio label="分钟">分钟</el-radio>
+                <el-radio label="秒">秒</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="isLedDevice">
+          <el-col :span="12">
+            <el-form-item label="点阵屏规格" prop="led_resolution_ratio">
+              <el-input v-model="deviceModel.led_resolution_ratio" clearable placeholder="点阵屏规格" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="语音播放" prop="led_voice">
+              <el-radio-group v-model="deviceModel.led_voice" size="mini" prop="unit">
+                <el-radio :label=1>开启语音</el-radio>
+                <el-radio :label=0>关闭语音</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="isLedDevice">
+          <el-col :span="12">
+            <el-form-item label="字体大小" prop="led_font_size">
+              <el-input-number v-model="deviceModel.led_font_size" controls-position="right" :min="0" :max="60" />
+            </el-form-item>
           </el-col>
         </el-row>
       </el-form>
@@ -311,6 +335,15 @@ export default {
         // unit: [
         //   { required: true, message: '报警时间单位', trigger: 'blur' }
         // ],
+        led_resolution_ratio: [
+          { required: true, message: '点阵屏规格', trigger: 'blur' }
+        ],
+        led_voice: [
+          { required: true, message: '点阵屏语音播放', trigger: 'blur' }
+        ],
+        led_font_size: [
+          { required: true, message: '点阵屏字体大小', trigger: 'blur' }
+        ],
       },
       partFrames: [],
       typeFrames: [],
@@ -368,6 +401,7 @@ export default {
           label: '关爱老人模式'
         }
       ],
+      isLedDevice: false,
       websock: null,
       onlineDevice: []
     }
@@ -723,6 +757,8 @@ export default {
                         val === DEVICE_TYPE.SIMULATE_DOOR_LIGHT
       this.hasSosDeviceSettings = val === DEVICE_TYPE.ALARM_BODY_INDUCTIVE ||
           val === DEVICE_TYPE.DOOR_LOCK
+      this.isLedDevice = val === DEVICE_TYPE.LED_SCREEN ||
+          val === DEVICE_TYPE.LCD_SCREEN
     },
     /** 设备类型选中对应的空间结构  **/
     deviceTypeChangeToFrameTypeChange(val) {
@@ -783,6 +819,7 @@ export default {
       this.getRoles({ page_size: 200, page_no: 1, fixedCondition: ' shop_id = -1', sort: ' role_id', dir: 'desc' })
       this.hasAudioId = false
       this.hasSosDeviceSettings = false
+      this.isLedDevice = false
       this.getDevices(this.$store.getters.partId)
       this.deviceEditTitle = '添加设备'
       this.deviceDialogVisible = true
@@ -802,6 +839,8 @@ export default {
                         params.device_type === DEVICE_TYPE.SIMULATE_DOOR_LIGHT
       this.hasSosDeviceSettings = params.device_type === DEVICE_TYPE.ALARM_BODY_INDUCTIVE ||
           params.device_type === DEVICE_TYPE.DOOR_LOCK
+      this.isLedDevice = params.device_type === DEVICE_TYPE.LED_SCREEN ||
+          params.device_type === DEVICE_TYPE.LCD_SCREEN
       this.deviceModel = {
         ...params
       }