| | |
| | | >拉取线索</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"> |
| | | </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" |
| | |
| | | layout="total, sizes, pager" |
| | | :total="total" |
| | | /> |
| | | </el-row> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import clueApi from '@/api/clue/clueApi'; |
| | | import { onMapMounted } from '@/components/map/baseMap'; |
| | | import moment from 'moment'; |
| | | import { ref, onMounted, reactive } from 'vue'; |
| | | import { ref, onMounted, reactive, watch } from 'vue'; |
| | | |
| | | const emits = defineEmits('itemSelected'); |
| | | |
| | |
| | | // 线索清单 |
| | | 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) { |
| | |
| | | .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)); |
| | | }); |
| | | } |
| | | |