From 3282e95db0207ee133d1e98d9771dec9d83b0fc4 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 02 四月 2026 16:24:38 +0800
Subject: [PATCH] 2026.4.2 新增专题管理功能

---
 pages/supervision/index.js |   42 +++++++++++++++++++-----------------------
 1 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/pages/supervision/index.js b/pages/supervision/index.js
index 5cb0c66..7ce8c53 100644
--- a/pages/supervision/index.js
+++ b/pages/supervision/index.js
@@ -1,11 +1,13 @@
 // pages/supervision/index.js
 import { useLoading } from '../../behaviors/loading';
+import { useTopic } from './topic-proxy.js';
+import { useRankResult } from './rank-result-proxy.js';
 import { fetchGradeList } from '../../services/enterprise/fetchAssessment';
 import { sceneTypeList } from '../../common/dataSceneTypes';
 import dayjs from 'dayjs';
 
 Page({
-  behaviors: [useLoading],
+  behaviors: [useLoading, useTopic, useRankResult],
   /**
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
@@ -49,21 +51,16 @@
   init() {
     this.optionsCount++;
     // 鍖呮嫭鏃堕棿銆佸満鏅被鍨嬨�佸尯鍩熶笁涓�夐」锛屽叏閮ㄨ幏鍙栧垵濮嬪�煎悗锛屾墽琛屽姞杞�
-    if (this.optionsCount == 3) this._startLoad();
+    if (this.optionsCount == 3) {
+      // 鍒濆鍖栦笓棰樼鐞嗙殑閫夐」
+      this.initselectedTopics();
+      this._startLoad();
+    }
   },
 
   _fetchData(page) {
-    let {
-      province,
-      city,
-      district,
-      town,
-      area,
-      management,
-      sorts,
-      sceneType,
-      period,
-    } = this.data.searchOptions;
+    let { province, city, district, town, area, management, sorts, sceneType, period } =
+      this.data.searchOptions;
     return fetchGradeList({
       page,
       data: {
@@ -78,10 +75,12 @@
         sceneTypes: [sceneType],
       },
     }).then(res => {
+      const startIndex = page == 1 ? 0 : this.data.searchResult.length
       this.setData({
-        searchResult:
-          page == 1 ? res.data : this.data.searchResult.concat(res.data),
+        searchResult: page == 1 ? res.data : this.data.searchResult.concat(res.data),
       });
+      // 鑾峰彇涓撻鐩稿叧鐨勫彴璐︿俊鎭�
+      this.fetchTopicLedgers(startIndex);
       return res.head;
     });
   },
@@ -100,8 +99,10 @@
     const { timeValue } = e.detail;
     const p = dayjs(timeValue);
     const period = `${p.year()}/${p.month() + 1}-${p.month() + 1}`;
+    const time = p.format('YYYY-MM-DD');
     this.setData({
       ['searchOptions.period']: period,
+      ['searchOptions.time']: time,
     });
   },
   initTime(e) {
@@ -126,6 +127,8 @@
   },
   handleScenePickerChange(e) {
     this.setSceneValue(e);
+    // 鍒濆鍖栦笓棰樼鐞嗙殑閫夐」
+    this.initselectedTopics();
     this._startLoad();
   },
 
@@ -144,14 +147,7 @@
 
   setPopupValue(e) {
     const { searchOptions } = this.data;
-    const {
-      provinceText,
-      cityText,
-      districtText,
-      townText,
-      areaText,
-      managementText,
-    } = e.detail;
+    const { provinceText, cityText, districtText, townText, areaText, managementText } = e.detail;
     searchOptions.province = provinceText;
     searchOptions.city = cityText;
     searchOptions.district = districtText;

--
Gitblit v1.9.3