feat
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type {Unit} from '#/api/property/resident/unit/model';
|
||||
|
||||
import {shallowRef} from 'vue';
|
||||
import {shallowRef,ref} from 'vue';
|
||||
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
|
||||
@@ -10,7 +10,7 @@ import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
|
||||
import {resident_unitInfo} from '#/api/property/resident/unit';
|
||||
import {resident_unitInfo, authGroupList} from '#/api/property/resident/unit';
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
dayjs.extend(duration);
|
||||
@@ -24,7 +24,7 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
});
|
||||
|
||||
const unitDetail = shallowRef<null | Unit>(null);
|
||||
|
||||
const authGroupName = ref('')
|
||||
async function handleOpenChange(open: boolean) {
|
||||
if (!open) {
|
||||
return null;
|
||||
@@ -33,13 +33,16 @@ async function handleOpenChange(open: boolean) {
|
||||
|
||||
const {id} = modalApi.getData() as { id: number | string };
|
||||
const response = await resident_unitInfo(id);
|
||||
const authGroupId = response.authGroupId;
|
||||
const res = await authGroupList();
|
||||
const authGroup = res.rows;
|
||||
authGroupName.value = authGroup.find(item => item.id === authGroupId)?.name;
|
||||
// 赋值
|
||||
unitDetail.value = response;
|
||||
|
||||
modalApi.modalLoading(false);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -80,7 +83,7 @@ async function handleOpenChange(open: boolean) {
|
||||
/>
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="通行权限组">
|
||||
{{ unitDetail.authGroupId ?? '-' }}
|
||||
{{ authGroupName }}
|
||||
</DescriptionsItem>
|
||||
<DescriptionsItem label="备注">
|
||||
{{ unitDetail.remark ?? '-' }}
|
||||
|
@@ -149,7 +149,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {getStatistics,getworkOrder} from '#/api/analytics';
|
||||
import {getStatistics,getworkOrder,getTodayMeetCount} from '#/api/analytics';
|
||||
import AnalyticsTrends from './analytics-trends.vue';
|
||||
import { Radio } from 'ant-design-vue';
|
||||
|
||||
@@ -203,6 +203,13 @@ const handleDateChange = (date: any) => {
|
||||
analyticsTrendsRef.value.getMeterRecordTrend(paramDate);
|
||||
}
|
||||
};
|
||||
//会议室
|
||||
const todayMeetCount = ref();
|
||||
const handleTodayMeetCount = async () => {
|
||||
todayMeetCount.value = await getTodayMeetCount();
|
||||
console.log(todayMeetCount)
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -220,6 +227,7 @@ import {
|
||||
} from '#/utils/echartsResize';
|
||||
import { useFlexibleRem } from '#/utils/useFlexibleRem';
|
||||
import {DatePicker} from "ant-design-vue";
|
||||
import {getTodayMeetCount} from "#/api/analytics";
|
||||
useFlexibleRem();
|
||||
// 路由
|
||||
const router = useRouter();
|
||||
@@ -585,6 +593,7 @@ const changeToPersonnelDuty=()=>{
|
||||
// 组件挂载时初始化
|
||||
onMounted(() => {
|
||||
getWarning()
|
||||
handleTodayMeetCount()
|
||||
|
||||
updateTime();
|
||||
timer = setInterval(updateTime, 1000);
|
||||
|
Reference in New Issue
Block a user