优化设备组件

This commit is contained in:
Flow 2025-06-11 10:05:45 +08:00
parent 1a416f14d5
commit e3358736c3
2 changed files with 18 additions and 11 deletions

View File

@ -406,8 +406,8 @@ export default {
nickname: '用户昵称',
mobile: '手机号码',
email: '用户邮箱',
dept: '所属部门',
posts: '所属岗位',
dept: '所属机构',
posts: '所属权限',
roles: '所属角色',
sex: '性别',
man: '男',

View File

@ -123,10 +123,9 @@ const message = useMessage() // 消息弹窗
//
const total = ref(0)
//
  const userProfile = ref()
const userProfile = ref()
//
const deviceList = ref([])
//
const queryFormRef = ref()
//
@ -166,20 +165,29 @@ const openForm = (type: string) => {
//
const handleDeviceAction = async (action: any) => {
console.log('设备操作:', action)
if (action.action === 'details') {
//
detailsFormRef.value?.open(action.deviceId)
} else if (action.action === 'openECGData') {
//
ecgDataRef.value?.open(action.deviceId, action.deviceName)
const band = await DeviceuserApi.getDevCount(action.deviceId)
if (band > 0) {
ecgDataRef.value?.open(action.deviceId, action.deviceName)
} else {
ElMessageBox.alert('该设备无绑定人员,无法查看心电数据!', '提示', {
confirmButtonText: '确定',
type: 'warning'
})
}
} else if (action.action === 'delete') {
//
const res = await DeviceuserApi.getDevCount(action.deviceId)
if (res> 0) {
message.error('设备下有人员,不能删除,请解绑后再进行操作')
return
}
ElMessageBox.alert('该设备有绑定人员,无法删除!', '提示', {
confirmButtonText: '确定',
type: 'warning'
})
}else{
ElMessageBox.confirm('是否删除该设备?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -191,8 +199,7 @@ const handleDeviceAction = async (action: any) => {
handleQuery()
}
})
} else {
//
}
}
}