|
|
@@ -26,7 +26,7 @@
|
|
|
>
|
|
|
<template #headLeft>
|
|
|
<div class="flex flex-col gap-2">
|
|
|
- <div class="flex flex-row items-center gap-2">
|
|
|
+ <div class="flex flex-row items-center gap-2 flex-wrap">
|
|
|
<a-button type="primary" @click="openDownloadModal">打包下载</a-button>
|
|
|
<a-button @click="openExportExcelModal">导出Excel</a-button>
|
|
|
<a-button @click="openSummaryDownloadModal">审核结果汇总下载</a-button>
|
|
|
@@ -35,39 +35,78 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #itemRight="{ item }">
|
|
|
- <a-popover v-if="item.rejectType && item.rejectType > 0" title="退回原因" trigger="hover">
|
|
|
- <template #content>
|
|
|
- <div style="max-width: 300px">{{ item.rejectReason || '无' }}</div>
|
|
|
- </template>
|
|
|
- <span class="mr-3 text-sm" style="color: #f5222d; cursor: pointer;">
|
|
|
- <ExclamationCircleOutlined /> 已退回
|
|
|
- </span>
|
|
|
- </a-popover>
|
|
|
- <span
|
|
|
- v-else
|
|
|
- class="mr-3 text-sm text-gray-600"
|
|
|
- >
|
|
|
- {{ selfAssessmentProgressLabel(item.progress) }}
|
|
|
- </span>
|
|
|
- <a-button type="link" @click.stop="router.push({ name: 'CollectEvaluationForm', query: { id: item.checkId ?? item.id, userId: item.userId } })">编辑</a-button>
|
|
|
-
|
|
|
- <div v-if="item.checkId && canReviewButPrevNotCompleted(item.progress)" class="flex flex-row items-center mr-3 text-sm">
|
|
|
- <ExclamationCircleOutlined /> 上一阶段未审核完成
|
|
|
+ <div class="flex flex-col md:flex-row md:items-center shrink-0 mt-3 md:mt-2">
|
|
|
+ <!-- 传承协议 状态与审核 -->
|
|
|
+ <div class="relative flex flex-row items-center flex-wrap">
|
|
|
+
|
|
|
+ <span class="text-xs text-gray-300 absolute -top-2 left-0">传承协议状态</span>
|
|
|
+ <span
|
|
|
+ class="text-sm text-gray-600 truncate max-w-35"
|
|
|
+ :title="agreementProgressLabel(item.agreementProgress)"
|
|
|
+ >
|
|
|
+ {{ agreementProgressLabel(item.agreementProgress) }}
|
|
|
+ </span>
|
|
|
+ <a-button type="link" @click.stop="handleEditAgreement(item)">编辑</a-button>
|
|
|
+ <div v-if="item.agreementId && canReviewButPrevNotCompleted(item.agreementProgress)" class="flex flex-row items-center text-sm">
|
|
|
+ <ExclamationCircleOutlined /> 上一阶段未完成
|
|
|
+ </div>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ v-else-if="item.agreementId && canReview(item.agreementProgress)"
|
|
|
+ @click.stop="handleReviewAgreement(item)"
|
|
|
+ >
|
|
|
+ 审核
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ disabled
|
|
|
+ v-else-if="item.agreementId && isCurrentLevelReviewed(item.agreementProgress)"
|
|
|
+ >
|
|
|
+ 已审核
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ <!-- 分隔线(移动端横向 / 桌面端竖向) -->
|
|
|
+ <div class="my-3 border-t border-gray-300 md:my-0 md:mx-3 md:border-t-0 md:border-l md:h-6"></div>
|
|
|
+ <!-- 自查评估表 状态与审核 -->
|
|
|
+ <div class="relative flex flex-row items-center flex-wrap">
|
|
|
+
|
|
|
+ <span class="text-xs text-gray-300 absolute -top-2 left-0">自查评估表状态</span>
|
|
|
+ <a-popover v-if="item.rejectType && item.rejectType > 0" title="退回原因" trigger="hover">
|
|
|
+ <template #content>
|
|
|
+ <div style="max-width: 300px">{{ item.rejectReason || '无' }}</div>
|
|
|
+ </template>
|
|
|
+ <span class="text-sm" style="color: #f5222d; cursor: pointer;">
|
|
|
+ <ExclamationCircleOutlined /> 已退回
|
|
|
+ </span>
|
|
|
+ </a-popover>
|
|
|
+ <span
|
|
|
+ v-else
|
|
|
+ class="text-sm text-gray-600 truncate max-w-35"
|
|
|
+ :title="selfAssessmentProgressLabel(item.progress)"
|
|
|
+ >
|
|
|
+ {{ selfAssessmentProgressLabel(item.progress) }}
|
|
|
+ </span>
|
|
|
+ <a-button type="link" @click.stop="router.push({ name: 'CollectEvaluationForm', query: { id: item.checkId ?? item.id, userId: item.userId } })">编辑</a-button>
|
|
|
+
|
|
|
+ <div v-if="item.checkId && canReviewButPrevNotCompleted(item.progress)" class="flex flex-row items-center text-sm">
|
|
|
+ <ExclamationCircleOutlined /> 上一阶段未完成
|
|
|
+ </div>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ v-else-if="item.checkId && canReview(item.progress)"
|
|
|
+ @click.stop="handleReviewSelfAssessment(item)"
|
|
|
+ >
|
|
|
+ 审核
|
|
|
+ </a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ v-else-if="item.agreementId && isCurrentLevelReviewed(item.progress)"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ 已审核
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- v-else-if="item.checkId && canReview(item.progress)"
|
|
|
- @click.stop="handleReviewSelfAssessment(item)"
|
|
|
- >
|
|
|
- 审核
|
|
|
- </a-button>
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- v-else-if="item.agreementId && isCurrentLevelReviewed(item.progress)"
|
|
|
- disabled
|
|
|
- >
|
|
|
- 已审核
|
|
|
- </a-button>
|
|
|
</template>
|
|
|
</CommonListBlock>
|
|
|
|
|
|
@@ -228,6 +267,42 @@ function selfAssessmentProgressLabel(progress: number | null | undefined) {
|
|
|
return hit?.name ?? `进度 ${progress}`;
|
|
|
}
|
|
|
|
|
|
+const agreementProgressLabels: Record<number, string> = {
|
|
|
+ [-1]: '未提交',
|
|
|
+ [0]: '草稿',
|
|
|
+ [1]: '已提交待审核',
|
|
|
+ [2]: '项目保护单位审核完成',
|
|
|
+ [3]: '县(区)文旅部门审核完成',
|
|
|
+ [4]: '设区市文旅部门、省非遗中心审核完成',
|
|
|
+ [5]: '省文化和旅游厅审核完成',
|
|
|
+};
|
|
|
+
|
|
|
+function agreementProgressLabel(progress: number | null | undefined) {
|
|
|
+ if (progress === null || progress === undefined)
|
|
|
+ return '未填写';
|
|
|
+ return agreementProgressLabels[progress] ?? `进度 ${progress}`;
|
|
|
+}
|
|
|
+
|
|
|
+function handleEditAgreement(item: any) {
|
|
|
+ console.log(item);
|
|
|
+ router.push({
|
|
|
+ name: 'CollectAgreementSign',
|
|
|
+ query: { id: item.agreementId && item.agreementId > 0 ? item.agreementId : 0, userId: item.userId ?? 0 },
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+function handleReviewAgreement(item: any) {
|
|
|
+ if (!item.agreementId || !item.userId) return;
|
|
|
+ router.push({
|
|
|
+ name: 'CollectAgreementSignReview',
|
|
|
+ query: {
|
|
|
+ id: String(item.agreementId),
|
|
|
+ userId: String(item.userId),
|
|
|
+ ...(item.agreementProgress != null ? { progress: String(item.agreementProgress) } : {}),
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
async function loadSelfAssessmentAdminList(page: number, pageSize: number, searchText: string, dropDownValues: number[]) {
|
|
|
const pv = dropDownValues?.[0];
|
|
|
const st = dropDownValues?.[1];
|
|
|
@@ -250,14 +325,14 @@ async function loadSelfAssessmentAdminList(page: number, pageSize: number, searc
|
|
|
...row,
|
|
|
id: row.id,
|
|
|
userId: row.userId,
|
|
|
- title: row.title ?? '?',
|
|
|
- desc: [row.mobile, row.unit, row.ichTitle].filter(Boolean).join(' · ') || '—',
|
|
|
+ title: [(row.title ?? '?') , (row.mobile ?? '')].join(' '),
|
|
|
+ desc: [row.unit, row.ichTitle].filter(Boolean).join(' · ') || '—',
|
|
|
})),
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function handleReviewSelfAssessment(item: SelfAssessmentDetail) {
|
|
|
- const cid = item.checkId;
|
|
|
+ /* const cid = item.checkId;
|
|
|
const uid = item.userId;
|
|
|
if (!cid || !uid) {
|
|
|
message.warning('缺少自查表 ID 或传承人用户 ID');
|
|
|
@@ -270,7 +345,7 @@ function handleReviewSelfAssessment(item: SelfAssessmentDetail) {
|
|
|
userId: String(uid),
|
|
|
...(item.progress != null && item.progress !== undefined ? { progress: String(item.progress) } : {}),
|
|
|
},
|
|
|
- });
|
|
|
+ }); */
|
|
|
}
|
|
|
|
|
|
async function handleDownloadZip() {
|