fix:图片显示
All checks were successful
/ Explore-Gitea-Actions (push) Successful in 13m48s

This commit is contained in:
2025-08-23 19:25:11 +08:00
parent 5c40b534f2
commit 67b7e64600
18 changed files with 191 additions and 75 deletions

View File

@@ -9,14 +9,15 @@ import duration from 'dayjs/plugin/duration';
import relativeTime from 'dayjs/plugin/relativeTime';
import {personInfo} from '#/api/property/resident/person';
import type {Person} from "#/api/property/resident/person/model";
import type {PersonVO} from "#/api/property/resident/person/model";
import {accessControlColumns,carColumns} from "#/views/property/resident/person/data";
import {renderDict, renderDictValue} from "#/utils/render";
import {ossInfo} from "#/api/system/oss";
dayjs.extend(duration);
dayjs.extend(relativeTime);
const personDetail = shallowRef<null | Person>(null);
const personDetail = shallowRef<null | PersonVO>(null);
const [BasicModal, modalApi] = useVbenModal({
onOpenChange: handleOpenChange,
@@ -38,7 +39,10 @@ async function handleOpenChange(open: boolean) {
const {id} = modalApi.getData() as { id: number | string };
// 赋值
personDetail.value = await personInfo(id);
if(personDetail.value.img){
const res = await ossInfo([personDetail.value.img]);
personDetail.value.imgPath = res?.[0]?.url
}
modalApi.modalLoading(false);
}
@@ -64,7 +68,7 @@ async function handleOpenChange(open: boolean) {
<!-- {{ personDetail.locathon }}-->
<!-- </DescriptionsItem>-->
<DescriptionsItem label="人脸图片">
{{ personDetail.img }}
<img v-if="personDetail.imgPath" :src="personDetail.imgPath" alt="图片加载失败" class="w-[100px] h-[100px]" />
</DescriptionsItem>
<DescriptionsItem label="入驻时间">
{{ personDetail.time}}