Merge remote-tracking branch 'origin/master'

This commit is contained in:
ye1023
2026-07-14 10:37:41 +08:00
2 changed files with 78 additions and 47 deletions
@@ -199,6 +199,7 @@
return Object.assign(params, queryParam); return Object.assign(params, queryParam);
}, },
afterFetch: async (items) => { afterFetch: async (items) => {
fetchStatusStats();
return calcLedgerRowSpan(items); return calcLedgerRowSpan(items);
}, },
}, },
@@ -241,7 +242,7 @@
Object.assign(statsData, res); Object.assign(statsData, res);
} }
} catch (e) { } catch (e) {
// stats fetch failure is non-critical console.error('【巡视整改-状态统计】获取状态统计数据失败', e);
} }
} }
@@ -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,67 +342,80 @@
selectedTaskNames, selectedTaskNames,
onlyCurrentDept, onlyCurrentDept,
currentUserDeptList, currentUserDeptList,
currentNodeModalRef,
handleTaskNameChange, handleTaskNameChange,
handleCurrentDeptChange, handleCurrentDeptChange,
selectAllTaskNames, selectAllTaskNames,
clearTaskNames, clearTaskNames,
handleQueryCurrentAssignee,
}; };
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.approval-history-pane { .approval-history-pane {
height: 100%; height: 100%;
padding: 4px 0; // 1. 增加 padding16px 左右,24px 上下,给四周留出足够的呼吸感
} padding: 16px 24px;
box-sizing: border-box;
background-color: #fff; // 确保有纯白背景,防止透出底色显得贴边
}
.approval-history-filter { .approval-history-filter {
margin-bottom: 8px; margin-bottom: 16px; // 2. 增加过滤栏和下方表格的间距
padding: 4px 0; padding: 12px 16px;
} background-color: #fafafa; // 3. 给过滤区域加一个浅色微背景框,视觉上更有层次感
border-radius: 4px;
}
.approval-history-filter__dept { .approval-history-filter__main {
display: flex; display: flex;
align-items: center; align-items: flex-start;
gap: 8px; gap: 8px;
margin-top: 10px; }
line-height: 24px;
}
.approval-history-filter__dept-text { .approval-history-filter__label {
color: rgba(0, 0, 0, 0.85); flex: 0 0 auto;
} line-height: 32px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500; // 稍微加粗标签
}
.approval-history-filter__main { .approval-history-filter__checkboxes {
display: flex; display: flex;
align-items: flex-start; flex: 1;
gap: 8px; flex-wrap: wrap;
} gap: 6px 12px;
min-width: 0;
padding-top: 5px;
.approval-history-filter__label { :deep(.ant-checkbox-wrapper) {
flex: 0 0 auto; margin-left: 0;
line-height: 32px;
color: rgba(0, 0, 0, 0.85);
} }
}
.approval-history-filter__checkboxes { .approval-history-filter__actions {
display: flex; display: flex;
flex: 1; flex: 0 0 auto;
flex-wrap: wrap; align-items: center;
gap: 6px 12px; line-height: 32px;
min-width: 0; }
padding-top: 5px;
:deep(.ant-checkbox-wrapper) { .approval-history-filter__dept {
margin-left: 0; display: flex;
} align-items: center;
} gap: 8px;
margin-top: 12px; // 稍微拉开上下两排过滤器的距离
line-height: 24px;
border-top: 1px dashed #f0f0f0; // 加一条虚线分割,更美观
padding-top: 12px;
}
.approval-history-filter__actions { .approval-history-filter__dept-text {
display: flex; color: rgba(0, 0, 0, 0.85);
flex: 0 0 auto; }
align-items: center;
line-height: 32px; .approval-history-filter__assignee-btn {
} margin-left: auto;
}
</style> </style>