|
@@ -0,0 +1,207 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <a-tabs v-model:activeKey="activeKey" centered type="card">
|
|
|
|
|
+ <a-tab-pane key="1" tab="传承人列表">
|
|
|
|
|
+ <CommonListBlock
|
|
|
|
|
+ :show-total="true"
|
|
|
|
|
+ :row-count="1"
|
|
|
|
|
+ :row-type="5"
|
|
|
|
|
+ :page-size="10"
|
|
|
|
|
+ :drop-down-names="[
|
|
|
|
|
+ {
|
|
|
|
|
+ options: selfAssessmentProgressOptions,
|
|
|
|
|
+ label: '状态',
|
|
|
|
|
+ defaultSelectedValue: lastSelfAssessmentProgress,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ options: selfAssessmentLevelOptions,
|
|
|
|
|
+ label: '等级',
|
|
|
|
|
+ defaultSelectedValue: lastSelfAssessmentLevel,
|
|
|
|
|
+ },
|
|
|
|
|
+ ]"
|
|
|
|
|
+ :load="(page: number, pageSize: number, _tag: number, searchText: string, drop: number[]) => loadSelfAssessmentAdminList(page, pageSize, searchText, drop)"
|
|
|
|
|
+ :show-detail="(item) => router.push({ name: 'CollectEvaluationForm', query: { id: item.checkId ?? item.id, userId: item.userId } })"
|
|
|
|
|
+ >
|
|
|
|
|
+ <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 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>
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ v-if="item.checkId && item.progress != null && item.progress >= 1 && item.progress < 5"
|
|
|
|
|
+ @click.stop="handleReviewSelfAssessment(item)"
|
|
|
|
|
+ >审核</a-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </CommonListBlock>
|
|
|
|
|
+ </a-tab-pane>
|
|
|
|
|
+ <a-tab-pane key="2" tab="审核记录">
|
|
|
|
|
+ <CommonListBlock
|
|
|
|
|
+ :show-total="true"
|
|
|
|
|
+ :row-count="1"
|
|
|
|
|
+ :row-type="5"
|
|
|
|
|
+ :page-size="10"
|
|
|
|
|
+ :drop-down-names="[
|
|
|
|
|
+ {
|
|
|
|
|
+ options: checkLogStatusOptions,
|
|
|
|
|
+ label: '状态',
|
|
|
|
|
+ defaultSelectedValue: lastCheckLogStatus,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ options: checkLogReviewTypeOptions,
|
|
|
|
|
+ label: '审核环节',
|
|
|
|
|
+ defaultSelectedValue: lastCheckLogReviewType,
|
|
|
|
|
+ },
|
|
|
|
|
+ ]"
|
|
|
|
|
+ :load="(page: number, pageSize: number, _tag: number, searchText: string, drop: number[]) => loadCheckLogList(page, pageSize, searchText, drop)"
|
|
|
|
|
+ :show-detail="() => {}"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #itemRight="{ item }">
|
|
|
|
|
+ <a-tag :color="item.status === 1 ? 'green' : 'red'">{{ item.statusText || (item.status === 1 ? '通过' : '退回') }}</a-tag>
|
|
|
|
|
+ <span class="mr-3 text-sm text-gray-600">{{ item.reviewTypeText }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </CommonListBlock>
|
|
|
|
|
+ </a-tab-pane>
|
|
|
|
|
+ </a-tabs>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+import { ref } from 'vue';
|
|
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
|
|
+import { message } from 'ant-design-vue';
|
|
|
|
|
+import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
+import CommonListBlock, { type DropdownCommonItem } from '@/components/content/CommonListBlock.vue';
|
|
|
|
|
+import AssessmentContentApi from '@/api/collect/AssessmentContent';
|
|
|
|
|
+import { useMemorizeVar } from '@/composeables/useMemorizeVar';
|
|
|
|
|
+
|
|
|
|
|
+const router = useRouter();
|
|
|
|
|
+
|
|
|
|
|
+const activeKey = ref('1');
|
|
|
|
|
+
|
|
|
|
|
+const { variable: lastSelfAssessmentProgress } = useMemorizeVar('adminSelfAssessmentProgress', -100);
|
|
|
|
|
+const { variable: lastSelfAssessmentLevel } = useMemorizeVar('adminSelfAssessmentLevel', 0);
|
|
|
|
|
+const { variable: lastCheckLogStatus } = useMemorizeVar('adminCheckLogStatus', 0);
|
|
|
|
|
+const { variable: lastCheckLogReviewType } = useMemorizeVar('adminCheckLogReviewType', 0);
|
|
|
|
|
+
|
|
|
|
|
+const selfAssessmentLevelOptions: DropdownCommonItem[] = [
|
|
|
|
|
+ { id: 0, name: '全部等级' },
|
|
|
|
|
+ { id: 23, name: '国家级' },
|
|
|
|
|
+ { id: 24, name: '省级' },
|
|
|
|
|
+ { id: 25, name: '市级' },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+const selfAssessmentProgressOptions: DropdownCommonItem[] = [
|
|
|
|
|
+ { id: -100, name: '全部状态' },
|
|
|
|
|
+ { id: -1, name: '未提交' },
|
|
|
|
|
+ { id: 0, name: '草稿' },
|
|
|
|
|
+ { id: 1, name: '已提交审核' },
|
|
|
|
|
+ { id: 2, name: '项目保护单位审核完成' },
|
|
|
|
|
+ { id: 3, name: '县(区)文旅部门审核完成' },
|
|
|
|
|
+ { id: 4, name: '设区市文旅部门/省非遗中心审核完成' },
|
|
|
|
|
+ { id: 5, name: '省文化和旅游厅审核完成' },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+const checkLogStatusOptions: DropdownCommonItem[] = [
|
|
|
|
|
+ { id: 0, name: '全部状态' },
|
|
|
|
|
+ { id: 1, name: '通过' },
|
|
|
|
|
+ { id: 2, name: '退回' },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+const checkLogReviewTypeOptions: DropdownCommonItem[] = [
|
|
|
|
|
+ { id: 0, name: '全部环节' },
|
|
|
|
|
+ { id: 1, name: '自评阶段' },
|
|
|
|
|
+ { id: 2, name: '项目保护单位' },
|
|
|
|
|
+ { id: 3, name: '县(区)文旅部门' },
|
|
|
|
|
+ { id: 4, name: '设区市文旅部门、省非遗中心' },
|
|
|
|
|
+ { id: 5, name: '省文化和旅游厅' },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+function selfAssessmentProgressLabel(progress: number | null | undefined) {
|
|
|
|
|
+ if (progress === null || progress === undefined)
|
|
|
|
|
+ return '未填写';
|
|
|
|
|
+ const hit = selfAssessmentProgressOptions.find((o) => o.id === progress);
|
|
|
|
|
+ return hit?.name ?? `进度 ${progress}`;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+async function loadSelfAssessmentAdminList(page: number, pageSize: number, searchText: string, dropDownValues: number[]) {
|
|
|
|
|
+ const pv = dropDownValues?.[0];
|
|
|
|
|
+ const lv = dropDownValues?.[1];
|
|
|
|
|
+ lastSelfAssessmentProgress.value = pv ?? -100;
|
|
|
|
|
+ lastSelfAssessmentLevel.value = lv ?? 0;
|
|
|
|
|
+ const progress = pv != null && pv > -50 ? pv : undefined;
|
|
|
|
|
+ const level = lv != null && lv > 0 ? lv : undefined;
|
|
|
|
|
+ const list = await AssessmentContentApi.getInheritorList({
|
|
|
|
|
+ year: new Date().getFullYear(),
|
|
|
|
|
+ page,
|
|
|
|
|
+ pageSize,
|
|
|
|
|
+ keywords: searchText?.trim() || undefined,
|
|
|
|
|
+ progress,
|
|
|
|
|
+ level,
|
|
|
|
|
+ });
|
|
|
|
|
+ return {
|
|
|
|
|
+ page,
|
|
|
|
|
+ total: list.total,
|
|
|
|
|
+ data: list.data.map((row) => ({
|
|
|
|
|
+ ...row,
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ userId: row.userId,
|
|
|
|
|
+ title: row.title ?? '?',
|
|
|
|
|
+ desc: [row.mobile, row.unit, row.ichTitle].filter(Boolean).join(' · ') || '—',
|
|
|
|
|
+ })),
|
|
|
|
|
+ };
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+async function loadCheckLogList(page: number, pageSize: number, searchText: string, dropDownValues: number[]) {
|
|
|
|
|
+ const sv = dropDownValues?.[0];
|
|
|
|
|
+ const rv = dropDownValues?.[1];
|
|
|
|
|
+ lastCheckLogStatus.value = sv ?? 0;
|
|
|
|
|
+ lastCheckLogReviewType.value = rv ?? 0;
|
|
|
|
|
+ const status = sv != null && sv > 0 ? sv : undefined;
|
|
|
|
|
+ const reviewType = rv != null && rv > 0 ? rv : undefined;
|
|
|
|
|
+ const list = await AssessmentContentApi.getCheckLogList({
|
|
|
|
|
+ year: new Date().getFullYear(),
|
|
|
|
|
+ page,
|
|
|
|
|
+ pageSize,
|
|
|
|
|
+ keywords: searchText?.trim() || undefined,
|
|
|
|
|
+ status,
|
|
|
|
|
+ reviewType,
|
|
|
|
|
+ });
|
|
|
|
|
+ return {
|
|
|
|
|
+ page,
|
|
|
|
|
+ total: list.total,
|
|
|
|
|
+ data: list.data.map((row) => ({
|
|
|
|
|
+ ...row,
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ title: row.inheritor ?? '?',
|
|
|
|
|
+ desc: [
|
|
|
|
|
+ row.reviewTypeText,
|
|
|
|
|
+ row.statusText,
|
|
|
|
|
+ row.reason,
|
|
|
|
|
+ row.createtime,
|
|
|
|
|
+ ].filter(Boolean).join(' · ') || '—',
|
|
|
|
|
+ })),
|
|
|
|
|
+ };
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handleReviewSelfAssessment(item: { checkId: number | null; userId: number | null; progress?: number | null }) {
|
|
|
|
|
+ const cid = item.checkId;
|
|
|
|
|
+ const uid = item.userId;
|
|
|
|
|
+ if (!cid || !uid) {
|
|
|
|
|
+ message.warning('缺少自查表 ID 或传承人用户 ID');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ name: 'CollectEvaluationFormReview',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ id: String(cid),
|
|
|
|
|
+ userId: String(uid),
|
|
|
|
|
+ ...(item.progress != null && item.progress !== undefined ? { progress: String(item.progress) } : {}),
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|