feat(dq): 审批历史界面新增查询当前办理人按钮

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wsm
2026-07-13 17:49:00 +08:00
co-authored by Claude Opus 4.7
parent 1352dae5ab
commit 41efc43254
@@ -18,9 +18,11 @@
<div class="approval-history-filter__dept"> <div class="approval-history-filter__dept">
<a-switch v-model:checked="onlyCurrentDept" :disabled="currentUserDeptList.length === 0" @change="handleCurrentDeptChange" /> <a-switch v-model:checked="onlyCurrentDept" :disabled="currentUserDeptList.length === 0" @change="handleCurrentDeptChange" />
<span class="approval-history-filter__dept-text">仅看本部门审批历史</span> <span class="approval-history-filter__dept-text">仅看本部门审批历史</span>
<a-button type="primary" size="small" class="approval-history-filter__assignee-btn" @click="handleQueryCurrentAssignee">查询当前办理人</a-button>
</div> </div>
</div> </div>
<BasicTable @register="registerTable" /> <BasicTable @register="registerTable" />
<CurrentNodeModal ref="currentNodeModalRef" />
</div> </div>
</template> </template>
@@ -33,6 +35,7 @@
import type { BasicColumn } from '/@/components/Table'; import type { BasicColumn } from '/@/components/Table';
import { onMounted, ref, watch } from 'vue'; import { onMounted, ref, watch } from 'vue';
import { useUserStore } from '/@/store/modules/user'; import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { list as queryApprovalOpinionList } from '/@/views/taskApprovalOpinion/TaskApprovalOpinion.api'; import { list as queryApprovalOpinionList } from '/@/views/taskApprovalOpinion/TaskApprovalOpinion.api';
@@ -67,10 +70,13 @@
{ title: '审批意见', dataIndex: 'opinion', align: 'left' }, { title: '审批意见', dataIndex: 'opinion', align: 'left' },
]; ];
export default { import CurrentNodeModal from '/@/components/semri/process/CurrentNodeModal.vue';
export default {
name: 'TaskApprovalHistoryContent', name: 'TaskApprovalHistoryContent',
components: { components: {
BasicTable, BasicTable,
CurrentNodeModal,
}, },
props: { props: {
formData: { formData: {
@@ -80,6 +86,7 @@
}, },
setup(props) { setup(props) {
const userStore = useUserStore(); const userStore = useUserStore();
const { createMessage } = useMessage();
const allApprovalHistoryList = ref<ApprovalHistoryRecord[]>([]); const allApprovalHistoryList = ref<ApprovalHistoryRecord[]>([]);
const taskNameOptions = ref<string[]>([]); const taskNameOptions = ref<string[]>([]);
const selectedTaskNames = ref<string[]>([]); const selectedTaskNames = ref<string[]>([]);
@@ -88,6 +95,7 @@
const currentUserDeptIdSet = ref<Set<string>>(new Set()); const currentUserDeptIdSet = ref<Set<string>>(new Set());
const currentUserDeptCodeSet = ref<Set<string>>(new Set()); const currentUserDeptCodeSet = ref<Set<string>>(new Set());
const currentUserDeptNameSet = ref<Set<string>>(new Set()); const currentUserDeptNameSet = ref<Set<string>>(new Set());
const currentNodeModalRef = ref();
let currentUserDeptLoaded = false; let currentUserDeptLoaded = false;
let currentUserDeptLoadPromise: Promise<void> | null = null; let currentUserDeptLoadPromise: Promise<void> | null = null;
@@ -175,6 +183,15 @@
setTableData(getFilteredApprovalHistoryList()); setTableData(getFilteredApprovalHistoryList());
} }
function handleQueryCurrentAssignee() {
const processInstId = getProcessInstId();
if (!processInstId) {
createMessage.error('流程尚未发起,无法查询');
return;
}
currentNodeModalRef.value?.open({ processInstId });
}
function handleTaskNameChange(checkedValues: string[]) { function handleTaskNameChange(checkedValues: string[]) {
selectedTaskNames.value = checkedValues; selectedTaskNames.value = checkedValues;
applyApprovalHistoryFilter(); applyApprovalHistoryFilter();
@@ -325,10 +342,12 @@
selectedTaskNames, selectedTaskNames,
onlyCurrentDept, onlyCurrentDept,
currentUserDeptList, currentUserDeptList,
currentNodeModalRef,
handleTaskNameChange, handleTaskNameChange,
handleCurrentDeptChange, handleCurrentDeptChange,
selectAllTaskNames, selectAllTaskNames,
clearTaskNames, clearTaskNames,
handleQueryCurrentAssignee,
}; };
}, },
}; };
@@ -357,6 +376,10 @@
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
} }
.approval-history-filter__assignee-btn {
margin-left: auto;
}
.approval-history-filter__main { .approval-history-filter__main {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;