新增预警页面

This commit is contained in:
2025-12-13 20:10:47 +08:00
parent b209e7d727
commit d409ceda8d
24 changed files with 1460 additions and 16 deletions

View File

@@ -36,12 +36,15 @@
</template>
<script setup lang="ts">
import { ref, onMounted, onUnmounted, watch, nextTick } from 'vue';
import { ref, onMounted, onUnmounted, computed, watch, nextTick } from 'vue';
import { useRouter } from 'vue-router';
import { Card } from 'ant-design-vue';
import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue';
import { bizDataReportListAll, BizDataReport } from '@jeesite/biz/api/biz/dataReport';
import { useUserStore } from '@jeesite/core/store/modules/user';
import { BizDataReportUser, bizDataReportUserListAll } from '@jeesite/biz/api/biz/dataReportUser';
const userStore = useUserStore();
const userinfo = computed(() => userStore.getUserInfo);
// 路由实例
const router = useRouter();
@@ -52,7 +55,7 @@
let scrollRafId: number | null = null;
let resizeTimer: NodeJS.Timeout | null = null;
const cardListData = ref<BizDataReport[]>([]);
const cardListData = ref<BizDataReportUser[]>([]);
// 配置项
const scrollStep = 190;
@@ -62,11 +65,12 @@
const canScrollLeft = ref(false);
const canScrollRight = ref(false);
const fetchCardList = async () => {
try {
// 新增错误处理,避免接口异常导致页面卡死
const result = await bizDataReportListAll();
const params = {
userCode: userinfo.value.loginCode,
}
const result = await bizDataReportUserListAll(params);
cardListData.value = result || []; // 防止返回 null 导致渲染异常
} catch (error) {
console.error('获取应用列表失败:', error);