| | |
| | | <!-- |
| | | * @Author: husq 931347610@qq.com |
| | | * @Date: 2023-09-13 18:21:08 |
| | | * @LastEditors: husq 931347610@qq.com |
| | | * @LastEditTime: 2023-09-13 19:24:39 |
| | | * @FilePath: \Cloud-API-Demo-Web\src\pages\page-web\projects\project_list\list_page\list.vue |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. |
| | | --> |
| | | <template> |
| | | <div class="project"> |
| | | <div class="side-header"> |
| | |
| | | </div> |
| | | <div class="border-bottom"></div> |
| | | </div> |
| | | <div class="side-filter-warp"> |
| | | <!-- <div class="side-filter-warp"> |
| | | <div class="side-filter flex-display flex-align-center flex-justify-between"> |
| | | <Select :bordered="false" :options="statusOption" v-model="params.projectStatus" @handleChange="handleChange" /> |
| | | <Select :bordered="false" :options="projectOption" v-model="params.project" @handleChange="handleChange" /> |
| | |
| | | </template> |
| | | </a-input> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <div class="wrap_card"> |
| | | <List @refreshList="init" v-model="spinning" :cardList="cardList"></List> |
| | | </div> |
| | |
| | | import { ERouterName } from '/@/types/enums' |
| | | import { statusOption, sortOption, projectOption, map, sortEnum } from './data' |
| | | import { getPage as getProjectPage } from '/@/api/project-page' |
| | | import { getPlatform } from '/@/api/manage' |
| | | import { PlusCircleOutlined, MonitorOutlined } from '@ant-design/icons-vue' |
| | | import { projectCard } from './components/data' |
| | | import { useMyStore } from '/@/store' |
| | |
| | | // 页面初始化 |
| | | const init = async () => { |
| | | spinning.value = true |
| | | const res = await getProjectPage(params.value).catch(e => { |
| | | const res = await getPlatform(params.value, 1, 20).catch(e => { |
| | | spinning.value = false |
| | | }) |
| | | cardList.value = res.data.records |
| | | const longitudeList = res.data.records.map((item: { id: string, longitude: any; latitude: any, projectName: string }) => { |
| | | console.log(res, '=====res=====') |
| | | cardList.value = res.data.list |
| | | const longitudeList = res.data.list.map((item: { id: string, longitude: any; latitude: any, projectName: string }) => { |
| | | return { |
| | | longitude: item.longitude, |
| | | latitude: item.latitude, |
| | |
| | | id: item.id |
| | | } |
| | | }) |
| | | store.commit('SET_POINT_LIST', longitudeList) |
| | | // store.commit('SET_POINT_LIST', longitudeList) |
| | | spinning.value = false |
| | | } |
| | | onMounted(() => { |
| | | init() |
| | | console.log(global, '+++++') |
| | | }) |
| | | </script> |
| | | |