Selaa lähdekoodia

📦 管理员查看传承协议与自查表签名

快乐的梦鱼 1 päivä sitten
vanhempi
commit
0ff3e3b602
4 muutettua tiedostoa jossa 77 lisäystä ja 2 poistoa
  1. 1 1
      src/common/ConstStrings.ts
  2. 71 0
      src/pages/admin.vue
  3. 1 1
      src/pages/admin/seminar.vue
  4. 4 0
      src/pages/index.vue

+ 1 - 1
src/common/ConstStrings.ts

@@ -1,2 +1,2 @@
 export const NO_CONTENT_STRING = '无内容,请添加内容!';
-export const TITLE = '闽南文化资源调查采集平台';
+export const TITLE = '闽南文化数字资源采集平台';

+ 71 - 0
src/pages/admin.vue

@@ -106,6 +106,34 @@
           <a-tab-pane key="7" tab="区级非遗传承人">
             <a-empty description="暂无数据" />
           </a-tab-pane>
+          <a-tab-pane key="8" tab="自查评估表">
+            <CommonListBlock
+              :show-total="true"
+              :row-count="1"
+              :row-type="5"
+              :page-size="10"
+              :load="(page: number, pageSize: number, _tag: number, searchText: string, _drop: number[]) => loadSelfAssessmentAdminList(page, pageSize, searchText)"
+              :show-detail="(item) => router.push({ name: 'CollectEvaluationForm', query: { id: item.id, userId: item.userId } })"
+            >
+              <template #itemRight="{ item }">
+                <a-button type="link" @click.stop="router.push({ name: 'CollectEvaluationForm', query: { id: item.id, userId: item.userId } })">编辑</a-button>
+              </template>
+            </CommonListBlock>
+          </a-tab-pane>
+          <a-tab-pane key="9" tab="传承协议签名">
+            <CommonListBlock
+              :show-total="true"
+              :row-count="1"
+              :row-type="5"
+              :page-size="10"
+              :load="(page: number, pageSize: number, _tag: number, searchText: string, _drop: number[]) => loadAgreementSignAdminList(page, pageSize, searchText)"
+              :show-detail="(item) => router.push({ name: 'CollectAgreementSign', query: { id: item.id, userId: item.userId } })"
+            >
+              <template #itemRight="{ item }">
+                <a-button type="link" @click.stop="router.push({ name: 'CollectAgreementSign', query: { id: item.id, userId: item.userId } })">编辑</a-button>
+              </template>
+            </CommonListBlock>
+          </a-tab-pane>
           <a-tab-pane v-if="false" key="4" tab="重点区域">
             <div class="flex justify-end">
               <a-button type="primary" :disabled="true" @click="router.push({ name: 'FormWork' })">+ 新增</a-button>
@@ -145,6 +173,7 @@ import useClipboard from 'vue-clipboard3';
 import CommonContent, { GetContentListParams } from '@/api/CommonContent';
 import CommonListBlock, { type DropdownCommonItem } from '@/components/content/CommonListBlock.vue';
 import InheritorContent from '@/api/inheritor/InheritorContent';
+import AssessmentContentApi from '@/api/collect/AssessmentContent';
 import AdminItemState from './components/AdminItemState.vue';
 import { InfoCircleOutlined } from '@ant-design/icons-vue';
 import { useSimpleDataLoader } from '@/composeables/useSimpleDataLoader';
@@ -303,6 +332,48 @@ async function loadAreaData(page: number, pageSize: number, dropDownValues: numb
   }
 }
 
+/** 管理员:自查评估表分页(与小程序 evaluation-list 一致,关键词走接口) */
+async function loadSelfAssessmentAdminList(page: number, pageSize: number, searchText: string) {
+  const list = await AssessmentContentApi.getSelfAssessmentList({
+    year: new Date().getFullYear(),
+    page,
+    pageSize,
+    keywords: searchText?.trim() || undefined,
+  });
+  return {
+    page,
+    total: list.total,
+    data: list.data.map((row) => ({
+      ...row,
+      id: row.id,
+      userId: row.userId,
+      title: row.inheritor ?? '?',
+      desc: [row.mobile, row.unit, row.ichName].filter(Boolean).join(' · ') || '—',
+    })),
+  };
+}
+
+/** 管理员:传承协议分页(小程序 argeement-sign-list 误用评估接口,此处使用 getAgreementList) */
+async function loadAgreementSignAdminList(page: number, pageSize: number, searchText: string) {
+  const list = await AssessmentContentApi.getAgreementList({
+    year: new Date().getFullYear(),
+    page,
+    pageSize,
+    keywords: searchText?.trim() || undefined,
+  });
+  return {
+    page,
+    total: list.total,
+    data: list.data.map((row) => ({
+      ...row,
+      id: row.id,
+      userId: row.userId,
+      title: row.partyB ?? row.partyA ?? '?',
+      desc: [row.mobile, row.ich].filter(Boolean).join(' · ') || '—',
+    })),
+  };
+}
+
 async function handleCopyAccount(item: GetContentListItem) {
   let result;
   try {

+ 1 - 1
src/pages/admin/seminar.vue

@@ -90,7 +90,7 @@ function handleGoSeminar(item: InheritorWorkInfo) {
 
 
 function handleSearch() {
-  worksData.loadData(undefined, true);
+  worksData.load(true);
 }
 
 </script>

+ 4 - 0
src/pages/index.vue

@@ -99,6 +99,10 @@ const activeKey = ref('1');
 }
 .hero-header {
   margin-bottom: 40px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
 }
 .hero-logo {
   width: 60px;