|
@@ -349,10 +349,12 @@
|
|
|
import {VITAL_SIGNS_DEVICE_TYPE} from "@/utils/enum/VitalSignsDeviceEnum";
|
|
|
import * as shop_API from "@/api/ncs_shop";
|
|
|
|
|
|
+ import ButtonCellRenderList from '@/components/AgGridCellRender/ButtonCellRenderList'
|
|
|
const DeviceUrl = domain.DeviceUrl
|
|
|
export default {
|
|
|
name: 'DeviceManager',
|
|
|
- components: {ButtonCellRender, ListFilter, RadioFilter},
|
|
|
+ components: {ButtonCellRender, ListFilter, RadioFilter,
|
|
|
+ ButtonCellRenderList},
|
|
|
props: {
|
|
|
frame: {
|
|
|
type: Object,
|
|
@@ -662,41 +664,102 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- headerName: this.$t('action.edit'), field: 'id',
|
|
|
- cellRendererFramework: 'ButtonCellRender',
|
|
|
- cellRendererParams: {
|
|
|
- onClick: this.handleEdit,
|
|
|
- label: this.$t('action.edit'),
|
|
|
- buttonType: 'primary',
|
|
|
- buttonSize: 'mini'
|
|
|
- },
|
|
|
- filter: false,
|
|
|
- pinned: 'right',
|
|
|
- lockPinned: true,
|
|
|
- width: 90,
|
|
|
- resizable: false,
|
|
|
- sortable: false
|
|
|
- },
|
|
|
- {
|
|
|
- headerName: this.$t('action.delete'), field: 'id',
|
|
|
- cellRendererFramework: 'ButtonCellRender',
|
|
|
+
|
|
|
+ { headerName: this.$t('action.handle'), field: 'id',
|
|
|
+ cellRendererFramework: 'ButtonCellRenderList',
|
|
|
cellRendererParams: param => {
|
|
|
return {
|
|
|
- onClick: this.deleteSingle,
|
|
|
- label: this.$t('action.delete'),
|
|
|
- buttonType: 'danger',
|
|
|
- buttonSize: 'mini',
|
|
|
- disabled: param.data['member_name'] === 'superadmin'
|
|
|
- }
|
|
|
+ list: [
|
|
|
+ {
|
|
|
+ onClick: this.handleEdit,
|
|
|
+ label: this.$t('action.edit'),
|
|
|
+ buttonType: 'primary',
|
|
|
+ buttonSize: 'mini'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ onClick: this.deleteSingle,
|
|
|
+ label: this.$t('action.delete'),
|
|
|
+ buttonType: 'danger',
|
|
|
+ buttonSize: 'mini',
|
|
|
+ disabled: param.data['member_name'] === 'superadmin'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ onClick: this.openDebug,
|
|
|
+ label: this.$t('action.opendebug'),
|
|
|
+ buttonType: 'success',
|
|
|
+ buttonSize: 'mini',
|
|
|
+ disabled: !this.androidDevice(param)
|
|
|
+ },{
|
|
|
+ onClick: this.rebootDevice,
|
|
|
+ label: this.$t('action.reboot'),
|
|
|
+ buttonType: 'warning',
|
|
|
+ buttonSize: 'mini',
|
|
|
+ disabled: !this.androidDevice(param)
|
|
|
+ }
|
|
|
+ ]}
|
|
|
},
|
|
|
+ filter: false,
|
|
|
pinned: 'right',
|
|
|
lockPinned: true,
|
|
|
- width: 90,
|
|
|
+ minWidth: this.$i18n.locale === 'zh' ? 260 : 380,
|
|
|
resizable: false,
|
|
|
- filter: false,
|
|
|
- sortable: false
|
|
|
- }
|
|
|
+ sortable: false },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // headerName: this.$t('action.edit'), field: 'id',
|
|
|
+ // cellRendererFramework: 'ButtonCellRender',
|
|
|
+ // cellRendererParams: {
|
|
|
+ // onClick: this.handleEdit,
|
|
|
+ // label: this.$t('action.edit'),
|
|
|
+ // buttonType: 'primary',
|
|
|
+ // buttonSize: 'mini'
|
|
|
+ // },
|
|
|
+ // filter: false,
|
|
|
+ // pinned: 'right',
|
|
|
+ // lockPinned: true,
|
|
|
+ // width: 80,
|
|
|
+ // resizable: false,
|
|
|
+ // sortable: false
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // headerName: this.$t('action.delete'), field: 'id',
|
|
|
+ // cellRendererFramework: 'ButtonCellRender',
|
|
|
+ // cellRendererParams: param => {
|
|
|
+ // return {
|
|
|
+ // onClick: this.deleteSingle,
|
|
|
+ // label: this.$t('action.delete'),
|
|
|
+ // buttonType: 'danger',
|
|
|
+ // buttonSize: 'mini',
|
|
|
+ // disabled: param.data['member_name'] === 'superadmin'
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // pinned: 'right',
|
|
|
+ // lockPinned: true,
|
|
|
+ // width: 80,
|
|
|
+ // resizable: false,
|
|
|
+ // filter: false,
|
|
|
+ // sortable: false
|
|
|
+ // },
|
|
|
+ //
|
|
|
+ // {
|
|
|
+ // headerName: this.$t('action.debug'), field: 'id',
|
|
|
+ // cellRendererFramework: 'ButtonCellRender',
|
|
|
+ // cellRendererParams: param => {
|
|
|
+ // return {
|
|
|
+ // onClick: this.deleteSingle,
|
|
|
+ // label: this.$t('action.debug'),
|
|
|
+ // buttonType: 'danger',
|
|
|
+ // buttonSize: 'mini',
|
|
|
+ // disabled: param.data['member_name'] === 'superadmin'
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // pinned: 'right',
|
|
|
+ // lockPinned: true,
|
|
|
+ // width: 80,
|
|
|
+ // resizable: false,
|
|
|
+ // filter: false,
|
|
|
+ // sortable: false
|
|
|
+ // }
|
|
|
]
|
|
|
this.defaultColDef = {
|
|
|
// filter: 'agTextColumnFilter',
|
|
@@ -950,7 +1013,6 @@
|
|
|
deviceTypeChangeToFrameTypeChange(val) {
|
|
|
if (val === DEVICE_TYPE.NURSE_HOST ||
|
|
|
val === DEVICE_TYPE.OTHER_HOST ||
|
|
|
- val === DEVICE_TYPE.NURSE_HOST ||
|
|
|
val === DEVICE_TYPE.DOCTOR_HOST ||
|
|
|
val === DEVICE_TYPE.LED_SCREEN ||
|
|
|
val === DEVICE_TYPE.LCD_SCREEN ||
|
|
@@ -979,6 +1041,17 @@
|
|
|
this.typeFrames = this.partFrames
|
|
|
}
|
|
|
},
|
|
|
+ androidDevice(param){
|
|
|
+ const val =param.data.device_type
|
|
|
+ return val === DEVICE_TYPE.NURSE_HOST ||
|
|
|
+ val === DEVICE_TYPE.OTHER_HOST ||
|
|
|
+ val === DEVICE_TYPE.NURSE_HOST ||
|
|
|
+ val === DEVICE_TYPE.DOCTOR_HOST ||
|
|
|
+ val === DEVICE_TYPE.TRANSFER_DEVICE ||
|
|
|
+ val === DEVICE_TYPE.DOOR_DEVICE ||
|
|
|
+ val === DEVICE_TYPE.DIGIT_BED_DEVICE
|
|
|
+
|
|
|
+ },
|
|
|
/** 添加设备事件 **/
|
|
|
handleAdd() {
|
|
|
this.deviceModel = {
|
|
@@ -1215,6 +1288,21 @@
|
|
|
this.serverAddressDialogVisible = false
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ openDebug(param){
|
|
|
+ API_Device.openDebug(param.id).then(res=>{
|
|
|
+ this.$message.success(this.$t('action.handleSuccess'))
|
|
|
+ }).catch(err=>{
|
|
|
+ this.$message.error(this.$t('action.handleFailed'))
|
|
|
+ })
|
|
|
+ },
|
|
|
+ rebootDevice(params){
|
|
|
+ API_Device.rebootDevice(params.id).then(res=>{
|
|
|
+ this.$message.success(this.$t('action.handleSuccess'))
|
|
|
+ }).catch(err=>{
|
|
|
+ this.$message.error(this.$t('action.handleFailed'))
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* 判断设备是否为模拟分机这种,无法在线是设备
|
|
|
*/
|