Przeglądaj źródła

设置485设备重启

wuyunfeng 2 lat temu
rodzic
commit
34bb86fc07

+ 2 - 0
languages/zh-CN.js

@@ -375,6 +375,8 @@ module.exports = {
     transRs485: '上属485转换盒',
     re485SipId: '485地址',
     inputRe485SipId: '请输入485地址',
+    powerControlAddress:'电源版地址',
+    controlLineNumber:'接口线路',
     sosDeviceSettingType: '报警模式',
     sosDeviceSettingStatusFalse: '不开启',
     sosDeviceSettingControlModel: '防控模式',

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

@@ -209,12 +209,24 @@
                     </el-col>
                 </el-row>
                 <el-row v-if="hasAudioId">
-                    <el-col :span="12">
+                    <el-col :span="8">
                         <el-form-item :label="this.$t('deviceManage.re485SipId')" prop="sip_id">
                             <el-input v-model="deviceModel.sip_id" clearable
                                       :placeholder="this.$t('deviceManage.inputRe485SipId')"/>
                         </el-form-item>
                     </el-col>
+                    <el-col :span="8">
+                        <el-form-item :label="this.$t('deviceManage.powerControlAddress')" prop="power_control_address">
+                            <el-input v-model="deviceModel.power_control_address" clearable
+                                      :placeholder="this.$t('deviceManage.powerControlAddress')" type="number"/>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item :label="this.$t('deviceManage.controlLineNumber')" prop="control_line_number">
+                            <el-input v-model="deviceModel.control_line_number" clearable
+                                      :placeholder="this.$t('deviceManage.controlLineNumber')" type="number"/>
+                        </el-form-item>
+                    </el-col>
                 </el-row>
                 <el-row v-if="isVitalSigns">
                     <el-col :span="12">
@@ -327,6 +339,7 @@
                 </el-row>
             </el-form>
             <div slot="footer" class="dialog-footer">
+
                 <el-button type="primary" @click="updateDevicesServerIp()">{{ this.$t('action.yes') }}</el-button>
             </div>
         </el-dialog>
@@ -694,7 +707,7 @@
                                     label: this.$t('action.reboot'),
                                     buttonType: 'warning',
                                     buttonSize: 'mini',
-                                    disabled: !this.androidDevice(param)
+                                    disabled: !this.androidDevice(param)&&!this.s485Device(param)
                                 }
                             ]}
                     },
@@ -1052,6 +1065,11 @@
                     val === DEVICE_TYPE.DIGIT_BED_DEVICE
 
             },
+            s485Device(param){
+                const val =param.data.device_type
+                return val === DEVICE_TYPE.RS485_DOOR ||
+                    val === DEVICE_TYPE.SIMULATE_BED_DEVICE && param.data.trans_rs485_id!==null
+            },
             /** 添加设备事件 **/
             handleAdd() {
                 this.deviceModel = {