This commit is contained in:
@@ -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}}
|
||||
|
Reference in New Issue
Block a user