|
|
@@ -67,12 +67,12 @@
|
|
|
</Touchable>
|
|
|
<FlexCol>
|
|
|
<FlexRow>
|
|
|
- <FrameButton text="待审核" size="small" @click="navTo('/pages/dig/about/goving')" />
|
|
|
- <FrameButton v-if="isManagement" text="管理" size="small" @click="goEdit(item)" />
|
|
|
+ <FrameButton :text="item.statusText" size="midium" @click="navTo('/pages/dig/about/goving')" />
|
|
|
+ <FrameButton v-if="isManagement" text="管理" size="midium" @click="goEdit(item)" />
|
|
|
</FlexRow>
|
|
|
- <FlexRow>
|
|
|
- <IconButton icon="icon-appreciate-light" size="30" :text="item.likes" color="primary" />
|
|
|
- <IconButton icon="like-filling" size="small" color="primary" />
|
|
|
+ <FlexRow gap="gap.md">
|
|
|
+ <IconButton icon="appreciate-light-fill" size="30" :text="item.likes" color="primary" />
|
|
|
+ <IconButton icon="appreciate-light" size="30" :rotate="180" :text="item.disLikes" color="primary" />
|
|
|
</FlexRow>
|
|
|
</FlexCol>
|
|
|
</BackgroundBox>
|
|
|
@@ -112,7 +112,7 @@ import H4 from '@/components/typography/H4.vue';
|
|
|
import Touchable from '@/components/feedback/Touchable.vue';
|
|
|
import XBarSpace from '@/components/layout/space/XBarSpace.vue';
|
|
|
import Result from '@/components/feedback/Result.vue';
|
|
|
-import VillageApi, { type VillageCatalogListItem } from '@/api/inhert/VillageApi';
|
|
|
+import VillageApi, { VillageCatalogListItem } from '@/api/inhert/VillageApi';
|
|
|
import Icon from '@/components/basic/Icon.vue';
|
|
|
import CommonTopBanner from '@/common/components/CommonTopBanner.vue';
|
|
|
import BackgroundBox from '@/components/display/block/BackgroundBox.vue';
|
|
|
@@ -160,6 +160,7 @@ const listLoader = useSimplePageListLoader(8, async (page, pageSize, params) =>
|
|
|
),
|
|
|
disLikes: item.dislikeNum.toString(),
|
|
|
likes: item.likeNum.toString(),
|
|
|
+ statusText: item.statusText,
|
|
|
}
|
|
|
})
|
|
|
return {
|
|
|
@@ -234,7 +235,7 @@ const currentLoadData = ref({
|
|
|
subId: 0,
|
|
|
subKey: '',
|
|
|
subTitle: '',
|
|
|
- catalogId: 0,
|
|
|
+ catalogId: 0 as number|undefined,
|
|
|
villageId: 0,
|
|
|
villageVolunteerId: 0,
|
|
|
});
|
|
|
@@ -249,6 +250,19 @@ function loadListCatalog(catalog: VillageCatalogListItem) {
|
|
|
return;
|
|
|
currentCatalog.value = catalog;
|
|
|
try {
|
|
|
+ if (catalog.id === 0) {
|
|
|
+ currentLoadData.value = {
|
|
|
+ collectModuleId: querys.value.collectModuleId,
|
|
|
+ subId: -1,
|
|
|
+ subKey: 'type',
|
|
|
+ subTitle: querys.value.title,
|
|
|
+ catalogId: undefined,
|
|
|
+ villageId: querys.value.villageId,
|
|
|
+ villageVolunteerId: volunteerInfo.value?.id || 0,
|
|
|
+ }
|
|
|
+ listLoader.load(true, currentLoadData.value)
|
|
|
+ return;
|
|
|
+ }
|
|
|
const formDefine = getVillageInfoForm(querys.value.collectModuleId, -1);
|
|
|
const goForm = [
|
|
|
querys.value.collectModuleId,
|
|
|
@@ -275,34 +289,6 @@ function loadListCatalog(catalog: VillageCatalogListItem) {
|
|
|
}
|
|
|
listLoader.load(true, currentLoadData.value)
|
|
|
}
|
|
|
-function loadListNoCatalog() {
|
|
|
- try {
|
|
|
- const formDefine = getVillageInfoForm(querys.value.collectModuleId, -1);
|
|
|
- const goForm = [
|
|
|
- querys.value.collectModuleId,
|
|
|
- -1,
|
|
|
- formDefine?.[2].typeName,
|
|
|
- querys.value.collectModuleId === CollectableModulesIdMap['overview'] ? 'common' : undefined,
|
|
|
- querys.value.title,
|
|
|
- undefined,
|
|
|
- ] as TaskMenuDefGoForm;
|
|
|
-
|
|
|
- currentLoadData.value = {
|
|
|
- collectModuleId: querys.value.collectModuleId,
|
|
|
- subId: goForm[1],
|
|
|
- subKey: goForm[2] || 'type',
|
|
|
- subTitle: goForm[4] || querys.value.title,
|
|
|
- catalogId: goForm[5] || 0,
|
|
|
- villageId: querys.value.villageId,
|
|
|
- villageVolunteerId: volunteerInfo.value?.id || 0,
|
|
|
- }
|
|
|
- } catch (e) {
|
|
|
- console.error(e);
|
|
|
- error.value = '任务不存在';
|
|
|
- return;
|
|
|
- }
|
|
|
- listLoader.load(true, currentLoadData.value)
|
|
|
-}
|
|
|
|
|
|
const { querys } = useLoadQuerys({
|
|
|
collectModuleId: 0,
|
|
|
@@ -333,11 +319,12 @@ const { querys } = useLoadQuerys({
|
|
|
pushCatalogWithCurrentCatalog(catalog);
|
|
|
});
|
|
|
|
|
|
- if (catalogs.value.length === 0) {
|
|
|
- loadListNoCatalog();
|
|
|
- } else {
|
|
|
- loadListCatalog(catalogs.value[0] as VillageCatalogListItem);
|
|
|
- }
|
|
|
+ catalogs.value.unshift(new VillageCatalogListItem().setSelfValues({
|
|
|
+ id: 0,
|
|
|
+ title: '全部',
|
|
|
+ }));
|
|
|
+
|
|
|
+ loadListCatalog(catalogs.value[0] as VillageCatalogListItem);
|
|
|
currentTitle.value = querys.title || '共编村史';
|
|
|
});
|
|
|
|