riku
2025-07-29 056ea576d820729878ffd62cd54cd7598e72d07e
src/views/overlay-clue/list/ClueManage.vue
@@ -13,16 +13,11 @@
        >拉取线索</el-button
      >
    </div>
    <el-scrollbar height="70vh" class="p-h-1">
    <el-scrollbar height="70vh" class="p-h-1" v-loading="loading">
      <ClueList :dataList="clueList" @itemSelected="selectClue">
        <!-- <template #extra>
          <el-button size="small" type="primary" @click="getClues">
            发布任务
          </el-button>
        </template> -->
      </ClueList>
    </el-scrollbar>
    <el-row justify="space-between" class="p-8">
    <el-scrollbar v-show="showPage" class="p-8">
      <el-pagination
        size="small"
        v-model:current-page="currentPage"
@@ -32,7 +27,7 @@
        layout="total, sizes, pager"
        :total="total"
      />
    </el-row>
    </el-scrollbar>
  </div>
</template>
@@ -42,7 +37,7 @@
import clueApi from '@/api/clue/clueApi';
import { onMapMounted } from '@/components/map/baseMap';
import moment from 'moment';
import { ref, onMounted } from 'vue';
import { ref, onMounted, reactive, watch } from 'vue';
const emits = defineEmits('itemSelected');
@@ -51,13 +46,23 @@
// 线索清单
const clueList = ref([]);
const currentPage = ref(1);
const pageSize = ref(100);
const pageSize = ref(50);
const total = ref(0);
const showPage = ref(true);
const loading = ref(false);
watch([currentPage, pageSize], (nV, oV) => {
  if (nV[0] != oV[0] || nV[1] != oV[1]) {
    getClues();
  }
});
/**
 * 查询已下发的线索清单
 */
const getClues = function () {
  showPage.value = true;
  loading.value = true;
  let sTime;
  let eTime;
  if (updateTime.value) {
@@ -76,16 +81,22 @@
      .then((res) => {
        total.value = res.head.totalCount;
        clueList.value = res.data;
      });
      })
      .finally(() => (loading.value = false));
  });
};
function fetchRemoteClue() {
  showPage.value = false;
  loading.value = true;
  const time = moment(updateTime.value).format('YYYY-MM-DD HH:mm:ss');
  onMapMounted(() => {
    clueApi.fetchRemoteClue(time).then((res) => {
      clueList.value = res;
    });
    clueApi
      .fetchRemoteClue(time)
      .then((res) => {
        clueList.value = res;
      })
      .finally(() => (loading.value = false));
  });
}