|
@@ -23,6 +23,7 @@
|
|
|
<div class="toolbar-btns">
|
|
|
<el-button v-if="part_view" type="primary" size="mini" @click="handleAdd">{{ this.$t('deviceManage.deviceAdd') }}</el-button>
|
|
|
<el-button v-if="part_view" type="danger" size="mini" @click="batchDelete">{{ this.$t('action.deleteList') }}</el-button>
|
|
|
+ <el-button v-if="!part_view" type="primary" size="mini" @click="deviceServerChange">{{ this.$t('deviceManage.deviceServerChange') }}</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-pagination
|
|
@@ -247,6 +248,24 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 设备编辑弹窗 -->
|
|
|
+
|
|
|
+ <el-dialog :title="this.$t('deviceManage.deviceServerChange')" :visible.sync="serverAddressDialogVisible" width="30%">
|
|
|
+ <el-form ref="deviceServerChange" :rules="serverAddressRules" label-width="120px" :model="serverAddress">
|
|
|
+ <el-row>
|
|
|
+ <el-form-item :label="this.$t('deviceManage.serverIp')" >
|
|
|
+ <el-input v-model="serverAddress.server_ip" clearable :maxlength="20" :placeholder="this.$t('deviceManage.inputServerIp')" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item :label="this.$t('deviceManage.serverPort')">
|
|
|
+ <el-input v-model="serverAddress.server_port" clearable :maxlength="20" :placeholder="this.$t('deviceManage.inputServerPort')" />
|
|
|
+ </el-form-item>
|
|
|
+ </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>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -266,6 +285,7 @@ import { DEVICE_TYPE } from '@/utils/enum/DeviceTypeEnum'
|
|
|
import {SOS_DEVICE_SETTING_TYPE} from "@/utils/enum/SosDeviceSettingTypeEnum";
|
|
|
import {VITAL_SIGNS_DEVICE_TYPE} from "@/utils/enum/VitalSignsDeviceEnum";
|
|
|
import * as shop_API from "@/api/ncs_shop";
|
|
|
+import {updateDevicesServerIp} from "@/api/ncs_device";
|
|
|
const DeviceUrl = domain.DeviceUrl
|
|
|
export default {
|
|
|
name: 'DeviceManager',
|
|
@@ -433,7 +453,20 @@ export default {
|
|
|
websock: null,
|
|
|
onlineDevice: [],
|
|
|
// 请求当前科室的数据
|
|
|
- shop: {}
|
|
|
+ shop: {},
|
|
|
+ serverAddress: {
|
|
|
+ server_ip: '172.28.100.100',
|
|
|
+ server_port: '8006'
|
|
|
+ },
|
|
|
+ serverAddressDialogVisible: false,
|
|
|
+ serverAddressRules: {
|
|
|
+ serverIp: [
|
|
|
+ this.MixinRequired(this.$t('deviceManage.inputServerIp'))
|
|
|
+ ],
|
|
|
+ serverPort: [
|
|
|
+ this.MixinRequired(this.$t('deviceManage.inputServerPort'))
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -1017,6 +1050,15 @@ export default {
|
|
|
ids.push(item.id)
|
|
|
})
|
|
|
this.handlerDelete(ids.join(','))
|
|
|
+ },
|
|
|
+ deviceServerChange() {
|
|
|
+ this.serverAddressDialogVisible = true
|
|
|
+ },
|
|
|
+ updateDevicesServerIp() {
|
|
|
+ API_Device.updateDevicesServerIp(this.serverAddress).then(r => {
|
|
|
+ this.$message.success(this.$t('action.settingsSuccess'))
|
|
|
+ this.serverAddressDialogVisible = false
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
}
|