czh-20260624-过滤admin账户;首页增加刷新按钮

This commit is contained in:
zhihao
2026-06-24 15:33:10 +08:00
parent 7dc302fed0
commit 3529487956
5 changed files with 57 additions and 15 deletions
@@ -10,6 +10,7 @@
</div>
<div class="my-work__tab" :class="{ 'my-work__tab--active': activeTab === 'cc' }" @click="activeTab = 'cc'">我的抄送</div>
</div>
<ReloadOutlined class="my-work__refresh" :class="{ 'my-work__refresh--spinning': refreshing }" @click="handleRefresh" />
<a class="my-work__more" @click="goMore">
更多
<RightOutlined class="my-work__more-icon" />
@@ -62,7 +63,7 @@
import HeaderCell from '/@/components/Table/src/components/HeaderCell.vue';
import { useListPage } from '/@/hooks/system/useListPage';
import { useModal } from '/@/components/Modal';
import { RightOutlined, QuestionCircleOutlined } from '@ant-design/icons-vue';
import { RightOutlined, QuestionCircleOutlined, ReloadOutlined } from '@ant-design/icons-vue';
import { Tooltip } from 'ant-design-vue';
import TaskHandleModal from '/@/views/super/bpm/process/personalOffice/myHandleTask/modal/TaskHandleModal.vue';
import SelectEntrusterModal from '/@/views/super/bpm/process/personalOffice/myHandleTask/modal/SelectEntrusterModal.vue';
@@ -81,6 +82,9 @@
const router = useRouter();
const activeTab = ref<'todo' | 'cc'>('todo');
const todoTotal = ref(0);
const refreshing = ref(false);
const emit = defineEmits(['refresh']);
const { tableContext: todoContext } = useListPage({
designScope: 'process-portal-todo',
@@ -131,6 +135,17 @@
}
}
async function handleRefresh() {
refreshing.value = true;
try {
reloadTodo();
await fetchTodoTotal();
emit('refresh');
} finally {
refreshing.value = false;
}
}
function goMore() {
if (activeTab.value === 'todo') {
router.push('/task/myTodoTaskInfo');
@@ -286,6 +301,32 @@
margin: 0;
}
&__refresh {
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
cursor: pointer;
transition: color 0.2s;
&:hover {
color: @primary-color;
}
&--spinning {
animation: spin 0.8s linear infinite;
color: @primary-color;
cursor: default;
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
&__actions {
display: flex;
align-items: center;