快乐的梦鱼 пре 2 месеци
родитељ
комит
8efd9da7ee

+ 3 - 1
src/api/inhert/VillageApi.ts

@@ -184,6 +184,7 @@ export class VillageCatalogListItem extends DataModel<VillageCatalogListItem> {
   spacer = '';
   haschild = false;
   typeId = -1;
+  total = -1;
 }
 
 export class VillageApi extends AppServerRequestModule<DataModel> {
@@ -289,9 +290,10 @@ export class VillageApi extends AppServerRequestModule<DataModel> {
     return map;
   }
 
-  async getCatalogList(villageId?: number, pid?: number) {
+  async getCatalogList(villageId?: number, volunteerId?: number, pid?: number) {
     return (this.get('/village/village/getCatalogList', '村落目录列表', {
       village_id: villageId,
+      village_volunteer_id: volunteerId,
       pid: pid === 0 ? undefined : pid,
     })) 
       .then(res => transformArrayDataModel<VillageCatalogListItem>(VillageCatalogListItem, res.data2, `村落目录列表`, true))

+ 7 - 1
src/pages/dig/components/CollectModuleList.vue

@@ -14,6 +14,7 @@
         :icon="item.icon"
         :title="item.title"
         :desc="item.desc"
+        :extra="item.extra"
         :enable="typeof item.enable === 'string' ? canCollect(item.enable) : item.enable"
         @click="handleClick(item)"
       />
@@ -54,7 +55,11 @@ async function loadList() {
     currentTaskDefItems.value = TaskRootDef
   }
   if (props.taskPid >= 0) {
-    const res = (await VillageApi.getCatalogList(props.villageId, props.taskPid));
+    const res = (await VillageApi.getCatalogList(
+      props.villageId, 
+      props.villageVolunteerId,
+      props.taskPid
+    ));
     if (res.length === 0)
       return;
     currentTaskDefItems.value = res
@@ -64,6 +69,7 @@ async function loadList() {
           const formDefine = collectModuleInternalName ? getVillageInfoForm(collectModuleInternalName, -1) : undefined;
           return {
             ...item,
+            extra: item.total >= 0 ? `采集数:${item.total}` : '',
             enable: canCollectCatalog(item.id),
             catalogItem: item,
             goForm: collectModuleInternalName ? [ 

+ 17 - 11
src/pages/dig/components/TaskList.vue

@@ -28,7 +28,11 @@ defineProps({
   enable: {
     type: Boolean,
     default: true,
-  }
+  },
+  extra: {
+    type: String,
+    default: '',
+  },
 })
 </script>
 
@@ -45,15 +49,17 @@ defineProps({
         <Text class="desc" :fontSize="24" color="text.second" :text="desc" />
       </FlexCol>
     </FlexRow>
-    <Button v-if="button" 
-      type="primary" 
-      shape="round" 
-      size="small" 
-      :radius="40" 
-      :touchable="enable"
-      @click="$emit('click')"
-      :text="enable ? '去完成' : '未开放'"
-    />
-    <view v-else></view>
+    <FlexRow align="center" :flexShrink="0" :gap="15">
+      <Text v-if="extra" class="extra" :fontSize="24" color="text.second" :text="extra" />
+      <Button v-if="button" 
+        type="primary" 
+        shape="round" 
+        size="small" 
+        :radius="40" 
+        :touchable="enable"
+        @click="$emit('click')"
+        :text="enable ? '去完成' : '未开放'"
+      />  
+    </FlexRow>
   </FlexRow>
 </template>

+ 1 - 17
src/pages/dig/forms/data/history.ts

@@ -1,7 +1,6 @@
 import { CommonInfoModel } from "@/api/inhert/VillageInfoApi";
-import type { SingleForm } from "../forms";
 import { villageCommonContent } from "./common";
-import type { FieldProps } from "@/components/form/Field.vue";
+import type { SingleForm } from "../forms";
 
 export const villageInfoStoryFormItems: SingleForm = [CommonInfoModel, (r) => ({
   formItems: [
@@ -40,21 +39,6 @@ export const villageInfoFigureFormItems: SingleForm = [CommonInfoModel, (r) => (
         message: '请输入标题',
       }]
     },
-    {
-      label: '历史人物简介',
-      name: 'brief',
-      type: 'richtext',
-      defaultValue: '',
-      additionalProps: {
-        placeholder: '请输入简介',
-        maxLength: 500,
-        showWordLimit: true,
-      } as FieldProps,
-      rules: [{
-        required: true,
-        message: '请输入简介',
-      }]
-    },
     ...villageCommonContent(r, {
       title: '历史人物',
       showTitle: false,

+ 1 - 0
src/pages/dig/forms/list.vue

@@ -125,6 +125,7 @@ function newData() {
     id: -1,
     villageId: querys.value.villageId,  
     villageVolunteerId: querys.value.villageVolunteerId,  
+    catalogId: querys.value.catalogId,
     subType: querys.value.subType,  
     subId: querys.value.subId,  
   });

+ 1 - 0
src/pages/dig/forms/tasks.ts

@@ -9,6 +9,7 @@ export type TaskMenuDefItem = {
   icon: string;
   enable: string|boolean;
   name?: string;
+  extra?: string;
   goForm?: {
     title: string;
     name: string;