修复:工作人员列表切换后自动加载数据
监听工作人员类型变化,切换安装、配送和运维菜单时自动重置搜索及页码并重新查询;补充资源、搜索和人员关联回归检查,同时更新中文需求说明与操作日志。
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!--
|
||||
功能:展示标准资源列表,并将新建、详情和编辑入口导航到独立页面。
|
||||
版本:v2.2.0
|
||||
版本:v2.2.1
|
||||
-->
|
||||
<template>
|
||||
<a-card :title="listTitle" :bordered="false">
|
||||
@@ -470,8 +470,9 @@ onMounted(async () => {
|
||||
});
|
||||
onBeforeUnmount(avatarLoader.reset);
|
||||
watch(
|
||||
() => props.definition.resource,
|
||||
[() => props.definition.resource, () => staffType.value],
|
||||
async () => {
|
||||
// 同一工作人员资源切换角色菜单时,复位旧查询并主动加载当前角色数据。
|
||||
await resetSearchState();
|
||||
await Promise.all([
|
||||
relations.preload(displayFields.value),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 功能描述:管理标准资源列表的可搜索字段、关键字状态和 URL 查询参数。
|
||||
* 版本:v1.0.0
|
||||
* 版本:v1.0.1
|
||||
*/
|
||||
import { computed, reactive, type Ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
@@ -73,7 +73,7 @@ export function useResourceListSearch(
|
||||
async function resetSearchState() {
|
||||
page.value = 1;
|
||||
filters.keyword = '';
|
||||
if (route.query.keyword) await syncQuery();
|
||||
if (route.query.keyword || route.query.page) await syncQuery();
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user