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">
<a-switch v-model:checked="onlyCurrentDept" :disabled="currentUserDeptList.length === 0" @change="handleCurrentDeptChange" />
<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>
<BasicTable @register="registerTable" />
<CurrentNodeModal ref="currentNodeModalRef" />
</div>
</template>
@@ -33,6 +35,7 @@
import type { BasicColumn } from '/@/components/Table';
import { onMounted, ref, watch } from 'vue';
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
import { defHttp } from '/@/utils/http/axios';
import { list as queryApprovalOpinionList } from '/@/views/taskApprovalOpinion/TaskApprovalOpinion.api';
@@ -67,10 +70,13 @@
{ title: '审批意见', dataIndex: 'opinion', align: 'left' },
];
export default {
import CurrentNodeModal from '/@/components/semri/process/CurrentNodeModal.vue';
export default {
name: 'TaskApprovalHistoryContent',
components: {
BasicTable,
CurrentNodeModal,
},
props: {
formData: {
@@ -80,6 +86,7 @@
},
setup(props) {
const userStore = useUserStore();
const { createMessage } = useMessage();
const allApprovalHistoryList = ref<ApprovalHistoryRecord[]>([]);
const taskNameOptions = ref<string[]>([]);
const selectedTaskNames = ref<string[]>([]);
@@ -88,6 +95,7 @@
const currentUserDeptIdSet = ref<Set<string>>(new Set());
const currentUserDeptCodeSet = ref<Set<string>>(new Set());
const currentUserDeptNameSet = ref<Set<string>>(new Set());
const currentNodeModalRef = ref();
let currentUserDeptLoaded = false;
let currentUserDeptLoadPromise: Promise<void> | null = null;
@@ -175,6 +183,15 @@
setTableData(getFilteredApprovalHistoryList());
}
function handleQueryCurrentAssignee() {
const processInstId = getProcessInstId();
if (!processInstId) {
createMessage.error('流程尚未发起,无法查询');
return;
}
currentNodeModalRef.value?.open({ processInstId });
}
function handleTaskNameChange(checkedValues: string[]) {
selectedTaskNames.value = checkedValues;
applyApprovalHistoryFilter();
@@ -325,10 +342,12 @@
selectedTaskNames,
onlyCurrentDept,
currentUserDeptList,
currentNodeModalRef,
handleTaskNameChange,
handleCurrentDeptChange,
selectAllTaskNames,
clearTaskNames,
handleQueryCurrentAssignee,
};
},
};
@@ -357,6 +376,10 @@
color: rgba(0, 0, 0, 0.85);
}
.approval-history-filter__assignee-btn {
margin-left: auto;
}
.approval-history-filter__main {
display: flex;
align-items: flex-start;