|
|
@@ -21,6 +21,9 @@
|
|
|
:load="(page: number, pageSize: number, _tag: number, searchText: string, drop: number[]) => loadSelfAssessmentAdminList(page, pageSize, searchText, drop)"
|
|
|
:show-detail="handleReviewSelfAssessment"
|
|
|
>
|
|
|
+ <template #headLeft>
|
|
|
+ <a-button type="primary" @click="openDownloadModal">打包下载</a-button>
|
|
|
+ </template>
|
|
|
<template #itemRight="{ item }">
|
|
|
<a-popover v-if="item.rejectType && item.rejectType > 0" title="退回原因" trigger="hover">
|
|
|
<template #content>
|
|
|
@@ -73,6 +76,26 @@
|
|
|
</CommonListBlock>
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
|
+
|
|
|
+ <a-modal
|
|
|
+ v-model:open="showDownloadModal"
|
|
|
+ title="打包下载自查表"
|
|
|
+ @ok="handleDownloadZip"
|
|
|
+ :confirmLoading="downloading"
|
|
|
+ okText="下载"
|
|
|
+ cancelText="取消"
|
|
|
+ >
|
|
|
+ <a-form layout="vertical">
|
|
|
+ <a-form-item label="年份">
|
|
|
+ <a-input-number v-model:value="downloadYear" :min="2020" :max="2030" style="width: 100%" />
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item label="状态">
|
|
|
+ <a-select v-model:value="downloadProgress" style="width: 100%">
|
|
|
+ <a-select-option v-for="opt in downloadProgressOptions" :key="opt.id" :value="opt.id">{{ opt.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-form>
|
|
|
+ </a-modal>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
@@ -90,6 +113,11 @@ const router = useRouter();
|
|
|
|
|
|
const activeKey = ref('1');
|
|
|
|
|
|
+const showDownloadModal = ref(false);
|
|
|
+const downloading = ref(false);
|
|
|
+const downloadYear = ref(new Date().getFullYear() - 1);
|
|
|
+const downloadProgress = ref(-100);
|
|
|
+
|
|
|
const { variable: lastSelfAssessmentProgress } = useMemorizeVar('adminSelfAssessmentProgress', -100);
|
|
|
const { variable: lastSelfAssessmentLevel } = useMemorizeVar('adminSelfAssessmentLevel', 0);
|
|
|
const { variable: lastCheckLogStatus } = useMemorizeVar('adminCheckLogStatus', 0);
|
|
|
@@ -128,6 +156,17 @@ const checkLogReviewTypeOptions: DropdownCommonItem[] = [
|
|
|
{ id: 5, name: '省文化和旅游厅' },
|
|
|
];
|
|
|
|
|
|
+const downloadProgressOptions: 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 authStore = useAuthStore();
|
|
|
const currentUserGroups = computed(() => authStore.userInfo?.adminGroup || []);
|
|
|
@@ -223,4 +262,26 @@ function handleReviewSelfAssessment(item: SelfAssessmentDetail) {
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+async function handleDownloadZip() {
|
|
|
+ downloading.value = true;
|
|
|
+ try {
|
|
|
+ const progress = downloadProgress.value > -50 ? downloadProgress.value : undefined;
|
|
|
+ await AssessmentContentApi.downloadCheckZip({
|
|
|
+ year: downloadYear.value,
|
|
|
+ progress,
|
|
|
+ });
|
|
|
+ showDownloadModal.value = false;
|
|
|
+ message.success('下载成功');
|
|
|
+ } catch (e: any) {
|
|
|
+ message.error(e?.message || '下载失败');
|
|
|
+ } finally {
|
|
|
+ downloading.value = false;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function openDownloadModal() {
|
|
|
+ downloadProgress.value = lastSelfAssessmentProgress.value;
|
|
|
+ showDownloadModal.value = true;
|
|
|
+}
|
|
|
</script>
|