bug修复

This commit is contained in:
BianLzhaoMin 2025-08-15 12:52:17 +08:00
parent 86132f766c
commit f975d3d32c
4 changed files with 93 additions and 38 deletions

View File

@ -32,6 +32,7 @@ export const getRobotTokenFn = async () => {
bfix: 1,
}
const res = await initLoginApi(loginParams)
console.log(res, '机器人token信息---')
robotData.setTokenInfo({
deviceToken: res.data.token,
})
@ -59,6 +60,8 @@ export const getRobotDeviceListFn = async () => {
// }
const { data: res } = await getDeviceInfoApi()
console.log(res, '机器人设备信息---')
if (res?.data?.length > 0) {
const deviceInfo = res.data[0]
robotData.setRobotInfo({
@ -70,6 +73,18 @@ export const getRobotDeviceListFn = async () => {
puId: deviceInfo.puId,
}
}
if (res.length > 0) {
const deviceInfo = res[0]
robotData.setRobotInfo({
devName: deviceInfo.devName,
puId: deviceInfo.puId,
})
return {
devName: deviceInfo.devName,
puId: deviceInfo.puId,
}
}
}
// 获取地图信息
@ -99,6 +114,8 @@ export const getRobotMapInfoFn = async (puId) => {
puId,
type: 4,
})
console.log(res, '机器人地图信息---')
if (res.code === 200) {
const { Data, Height, Width, MapId, Name } = res.data
const mapInfo = {
@ -137,6 +154,7 @@ export const getRobotPointsInfoFn = async (puId) => {
puId,
type: 2,
})
console.log(res, '机器人实时定位信息---')
if (res.code === 200) {
const pointsInfo = {
Robot_x: res?.data?.Robot_x,

View File

@ -526,12 +526,16 @@ const tableColumns_1 = ref([
key: 'dataImage',
align: 'center',
render(row) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.dataImage,
fit: 'cover',
})
if (row.dataImage) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.dataImage,
fit: 'cover',
})
} else {
return '-'
}
},
},
{
@ -539,12 +543,16 @@ const tableColumns_1 = ref([
key: 'image',
align: 'center',
render(row) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.image,
fit: 'cover',
})
if (row.image) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.image,
fit: 'cover',
})
} else {
return '-'
}
},
},
])
@ -597,7 +605,16 @@ const onHandlePageSize_1Change = (pageSize) => {
//
const onHandleAddPerson = () => {
console.log('新增项目部人员')
// console.log('')
addOrEditPersonForm.value.id = null
addOrEditPersonForm.value.facePhoto = []
previewFileList.value = []
addOrEditPersonForm.value.userName = ''
addOrEditPersonForm.value.mobile = ''
addOrEditPersonForm.value.idCard = ''
addOrEditPersonForm.value.age = ''
addOrEditPersonForm.value.sex = ''
addOrEditPersonForm.value.workType = ''
addPersonPanelVisible.value = true
}
@ -785,12 +802,16 @@ const tableColumns_2 = ref([
key: 'image',
align: 'center',
render(row) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.image,
fit: 'cover',
})
if (row.image) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.image,
fit: 'cover',
})
} else {
return '-'
}
},
},
@ -832,7 +853,7 @@ const getProjectPersonList = async () => {
const { data: res } = await getUserInfoListApi(innerQueryParams_2.value)
if (res.code == 200) {
tableData_2.value = res?.rows
tableData_2.value = res?.rows.map((item) => ({ ...item, select: false }))
tableTotal_2.value = res?.total
}
}
@ -909,12 +930,16 @@ const onHandleReset_2 = () => {
//
const onHandlePage_2Change = (page) => {
innerQueryParams_2.value.pageNum = page
selectList.value = []
allSelect.value = false
getProjectPersonList()
}
//
const onHandlePageSize_2Change = (pageSize) => {
innerQueryParams_2.value.pageSize = pageSize
selectList.value = []
allSelect.value = false
getProjectPersonList()
}

View File

@ -77,12 +77,16 @@ const columns = ref([
key: 'image',
align: 'center',
render(row) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.image,
fit: 'cover',
})
if (row.image) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.image,
fit: 'cover',
})
} else {
return '-'
}
},
},
])

View File

@ -98,12 +98,16 @@ const columns = ref([
key: 'image',
align: 'center',
render(row) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.image,
fit: 'cover',
})
if (row.image) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.image,
fit: 'cover',
})
} else {
return '-'
}
},
},
{
@ -111,12 +115,16 @@ const columns = ref([
key: 'lastImage',
align: 'center',
render(row) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.lastImage,
fit: 'cover',
})
if (row.lastImage) {
return h(NImage, {
width: '48px',
height: '48px',
src: imgPreviewUrl + row.lastImage,
fit: 'cover',
})
} else {
return '-'
}
},
},
{