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

View File

@ -526,12 +526,16 @@ const tableColumns_1 = ref([
key: 'dataImage', key: 'dataImage',
align: 'center', align: 'center',
render(row) { render(row) {
return h(NImage, { if (row.dataImage) {
width: '48px', return h(NImage, {
height: '48px', width: '48px',
src: imgPreviewUrl + row.dataImage, height: '48px',
fit: 'cover', src: imgPreviewUrl + row.dataImage,
}) fit: 'cover',
})
} else {
return '-'
}
}, },
}, },
{ {
@ -539,12 +543,16 @@ const tableColumns_1 = ref([
key: 'image', key: 'image',
align: 'center', align: 'center',
render(row) { render(row) {
return h(NImage, { if (row.image) {
width: '48px', return h(NImage, {
height: '48px', width: '48px',
src: imgPreviewUrl + row.image, height: '48px',
fit: 'cover', src: imgPreviewUrl + row.image,
}) fit: 'cover',
})
} else {
return '-'
}
}, },
}, },
]) ])
@ -597,7 +605,16 @@ const onHandlePageSize_1Change = (pageSize) => {
// //
const onHandleAddPerson = () => { 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 addPersonPanelVisible.value = true
} }
@ -785,12 +802,16 @@ const tableColumns_2 = ref([
key: 'image', key: 'image',
align: 'center', align: 'center',
render(row) { render(row) {
return h(NImage, { if (row.image) {
width: '48px', return h(NImage, {
height: '48px', width: '48px',
src: imgPreviewUrl + row.image, height: '48px',
fit: 'cover', src: imgPreviewUrl + row.image,
}) fit: 'cover',
})
} else {
return '-'
}
}, },
}, },
@ -832,7 +853,7 @@ const getProjectPersonList = async () => {
const { data: res } = await getUserInfoListApi(innerQueryParams_2.value) const { data: res } = await getUserInfoListApi(innerQueryParams_2.value)
if (res.code == 200) { if (res.code == 200) {
tableData_2.value = res?.rows tableData_2.value = res?.rows.map((item) => ({ ...item, select: false }))
tableTotal_2.value = res?.total tableTotal_2.value = res?.total
} }
} }
@ -909,12 +930,16 @@ const onHandleReset_2 = () => {
// //
const onHandlePage_2Change = (page) => { const onHandlePage_2Change = (page) => {
innerQueryParams_2.value.pageNum = page innerQueryParams_2.value.pageNum = page
selectList.value = []
allSelect.value = false
getProjectPersonList() getProjectPersonList()
} }
// //
const onHandlePageSize_2Change = (pageSize) => { const onHandlePageSize_2Change = (pageSize) => {
innerQueryParams_2.value.pageSize = pageSize innerQueryParams_2.value.pageSize = pageSize
selectList.value = []
allSelect.value = false
getProjectPersonList() getProjectPersonList()
} }

View File

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

View File

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