| | |
| | | <!-- |
| | | * @Author: husq 931347610@qq.com |
| | | * @Date: 2023-09-13 18:21:08 |
| | | * @LastEditors: husq 931347610@qq.com |
| | | * @LastEditTime: 2023-09-21 16:45:06 |
| | | * @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"> |
| | | |
| | | <a-spin :spinning="spinning" :delay="delayTime"> |
| | | <List @refreshList="init" :cardList="cardList" /> |
| | | </a-spin> |
| | | |
| | | <List @refreshList="init" v-model="spinning" :cardList="cardList"></List> |
| | | </div> |
| | | <!-- <button @click="goDetail">列表详情</button> --> |
| | | </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' |
| | | import Select from '/@/components/Search/Select.vue' |
| | | import List from './components/ProjectList.vue' |
| | | import { cesiumOperation } from '/@/hooks/use-cesium-tsa' |
| | | const { appContext } = getCurrentInstance() |
| | | const global = appContext.config.globalProperties |
| | | const router = useRouter() |
| | | const store = useMyStore() |
| | | const sort = ref('createTime') |
| | | const searchInput = ref(false) |
| | | interface paramsFaca { |
| | | projectStatus:string |
| | | project:string |
| | | column:string |
| | | sort:string |
| | | projectName?:string |
| | | projectStatus: string |
| | | project: string |
| | | column: string |
| | | sort: string |
| | | projectName?: string |
| | | } |
| | | const params = ref<paramsFaca>({ |
| | | projectStatus: '', |
| | |
| | | }) |
| | | // ant 加载 |
| | | const spinning = ref<boolean>(false) |
| | | const delayTime = 500 |
| | | |
| | | const goDetail = () => { |
| | | router.push({ name: ERouterName.WORKSPACE }) |
| | | store.commit('SET_POINT_LIST', []) |
| | | } |
| | | const cesium = cesiumOperation(global.$viewer) |
| | | console.log(global, 'global') |
| | | const goAdd = () => { |
| | | router.push({ name: ERouterName.ADD_PROJECT }) |
| | | store.commit('SET_POINT_LIST', []) |
| | | } |
| | | const cardList = ref<projectCard[]>([]) |
| | | // 全部状态、全部项目筛选方法 |
| | | const handleChange = (e: any) => { |
| | | console.log(e, params.value, '=============') |
| | | init() |
| | | } |
| | | // 排序方法 |
| | |
| | | // 页面初始化 |
| | | 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 |
| | | cardList.value = res.data.list |
| | | cesium.removeAllPoint() |
| | | spinning.value = false |
| | | } |
| | | onMounted(() => { |
| | |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | } |
| | | }</style> |
| | | } |
| | | </style> |