fix: 修复分页请求和预置点添加功能

在spjk.vue中添加isflow参数确保分页请求正确
在presetAdd.vue中使用ElLoading替代原有loading实现更好的用户体验
This commit is contained in:
tcy
2025-09-24 20:04:56 +08:00
parent d68f537537
commit 33831ecad3
2 changed files with 9 additions and 1 deletions

View File

@ -113,6 +113,12 @@ function addPre() {
inputErrorMessage: '请输入预置点名称'
})
.then(({ value }) => {
// 加载动画
const loading = ElLoading.service({
lock: true,
text: '添加中',
background: 'rgba(0, 0, 0, 0.7)',
})
formData.value.presetName = value;
addDevicePreset(formData.value)
.then(() => {
@ -120,7 +126,8 @@ function addPre() {
busPresettingBitList();
})
.finally(() => {
loading.value = false;
// loading.value = false;
loading.close();
});
})
.catch(() => { });

View File

@ -192,6 +192,7 @@ const getMonitoringListData = async () => {
const getNextPageData = async () => {
const { data: { object, sum } } = await getMonitoringList({
pageStart: pageStart.value + 1,
isflow: true,
pageSize: 3 // 只需要3个视频
})
// 确保object是数组如果不是则使用空数组