|
|
@@ -65,6 +65,7 @@
|
|
|
<Text :size="23">{{ item.desc }}</Text>
|
|
|
</FlexCol>
|
|
|
</Touchable>
|
|
|
+ <FrameButton text="待审核" size="small" @click="navTo('/pages/dig/about/goving')" />
|
|
|
</BackgroundBox>
|
|
|
</FlexCol>
|
|
|
<template #empty>
|
|
|
@@ -109,6 +110,7 @@ import CommonTopBanner from '@/common/components/CommonTopBanner.vue';
|
|
|
import BackgroundBox from '@/components/display/block/BackgroundBox.vue';
|
|
|
import Width from '@/components/layout/space/Width.vue';
|
|
|
import PrimaryButton from '@/common/components/PrimaryButton.vue';
|
|
|
+import FrameButton from '@/common/components/FrameButton.vue';
|
|
|
|
|
|
const subTitle = ref('');
|
|
|
const searchText = ref('');
|
|
|
@@ -135,38 +137,19 @@ const listLoader = useSimplePageListLoader<{
|
|
|
throw new Error("params.collectModuleId");
|
|
|
if (!params.villageId)
|
|
|
throw new Error("params.villageId");
|
|
|
- let res = [] as CommonInfoModel[];
|
|
|
- let total = 0;
|
|
|
+ const info = (await VillageInfoApi.getList({
|
|
|
+ collectModuleId: params.collectModuleId,
|
|
|
+ subId: params.subKey ? params.subId : undefined,
|
|
|
+ subKey: params.subKey,
|
|
|
+ villageId: params.villageId,
|
|
|
+ catalogId: currentCatalog.value?.id || 0,
|
|
|
+ page,
|
|
|
+ pageSize,
|
|
|
+ keywords: searchText.value,
|
|
|
+ }));
|
|
|
+ const res = info.list;
|
|
|
+ const total = info.total;
|
|
|
|
|
|
- if (params.collectModuleId === CollectableModulesIdMap['overview']) {
|
|
|
- //村社概览特殊处理
|
|
|
- const info = await VillageInfoApi.getInfoByVillageId(params.villageId);
|
|
|
- const overviewId = info.myOverviewId || info.overviewId;
|
|
|
- if (overviewId) {
|
|
|
- res = page === 1 ? [
|
|
|
- new CommonInfoModel().setSelfValues({
|
|
|
- id: info.myOverviewId || info.overviewId || 0,
|
|
|
- title: info.title,
|
|
|
- image: info.image,
|
|
|
- villageVolunteerId: volunteerInfo.value?.id || 0,
|
|
|
- }),
|
|
|
- ] : [];
|
|
|
- total = 1;
|
|
|
- }
|
|
|
- } else {
|
|
|
- const info = (await VillageInfoApi.getList({
|
|
|
- collectModuleId: params.collectModuleId,
|
|
|
- subId: params.subKey ? params.subId : undefined,
|
|
|
- subKey: params.subKey,
|
|
|
- villageId: params.villageId,
|
|
|
- catalogId: currentCatalog.value?.id || 0,
|
|
|
- page,
|
|
|
- pageSize,
|
|
|
- keywords: searchText.value,
|
|
|
- }));
|
|
|
- res = info.list;
|
|
|
- total = info.total;
|
|
|
- }
|
|
|
const list = res.map((item) => {
|
|
|
return {
|
|
|
id: item.id,
|
|
|
@@ -174,7 +157,7 @@ const listLoader = useSimplePageListLoader<{
|
|
|
title: item.title,
|
|
|
villageVolunteerId: item.villageVolunteerId,
|
|
|
desc: DataDateUtils.formatDate(item.updatedAt, 'YYYY-MM-dd') + (
|
|
|
- authStore.isAdmin ? (' 投稿人:' + item.villageVolunteerName) : ''
|
|
|
+ (' 投稿人:' + item.villageVolunteerName)
|
|
|
)
|
|
|
}
|
|
|
})
|
|
|
@@ -209,46 +192,10 @@ function newData() {
|
|
|
});
|
|
|
}
|
|
|
function goDetail(item: { id: number, villageVolunteerId: number }) {
|
|
|
-
|
|
|
- let goToFormDisplay = false;
|
|
|
- let canEdit = false;
|
|
|
-
|
|
|
- if (!authStore.isAdmin
|
|
|
- && (!canCollect.value || item.villageVolunteerId !== volunteerInfo.value?.id)
|
|
|
- ) {
|
|
|
- //非当前村社志愿者或者不是自己提交的文章,只能查看详情
|
|
|
- //村社概览表单特殊处理
|
|
|
- if ([
|
|
|
- CollectableModulesIdMap['overview'],
|
|
|
- CollectableModulesIdMap['environment'],
|
|
|
- CollectableModulesIdMap['distribution'],
|
|
|
- CollectableModulesIdMap['ich'],
|
|
|
- CollectableModulesIdMap['relic'],
|
|
|
- CollectableModulesIdMap['folkCulture'],
|
|
|
- CollectableModulesIdMap['building'],
|
|
|
- ].includes(currentLoadData.value.collectModuleId)) {
|
|
|
- goToFormDisplay = true;
|
|
|
- }
|
|
|
- } else {
|
|
|
- goToFormDisplay = true;
|
|
|
- canEdit = true;
|
|
|
- }
|
|
|
-
|
|
|
- if (goToFormDisplay) {
|
|
|
- navTo('common', {
|
|
|
- id: item.id,
|
|
|
- villageId: querys.value.villageId,
|
|
|
- villageVolunteerId: volunteerInfo.value?.id || 0,
|
|
|
- catalogId: currentCatalog.value?.id || 0,
|
|
|
- collectModuleId: currentLoadData.value.collectModuleId,
|
|
|
- isView: !canEdit,
|
|
|
- });
|
|
|
- } else {
|
|
|
- navTo('/pages/home/discover/details', {
|
|
|
- villageId: querys.value.villageId,
|
|
|
- id: item.id,
|
|
|
- });
|
|
|
- }
|
|
|
+ navTo('/pages/home/discover/details', {
|
|
|
+ villageId: querys.value.villageId,
|
|
|
+ id: item.id,
|
|
|
+ });
|
|
|
}
|
|
|
function search() {
|
|
|
listLoader.reload();
|