husq
2023-09-27 2c2bc8614c8ea0ce386369eb4924da1e6aa052d1
src/pages/page-web/projects/project_list/list_page/list.vue
@@ -1,3 +1,13 @@
<!--
 * @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">
@@ -7,7 +17,7 @@
      </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" />
@@ -22,13 +32,9 @@
          </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>
@@ -38,19 +44,25 @@
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: '',
@@ -61,18 +73,20 @@
})
// 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()
}
// 排序方法
@@ -84,10 +98,11 @@
// 页面初始化
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(() => {
@@ -169,4 +184,5 @@
    flex: 1;
    overflow-y: auto;
  }
}</style>
}
</style>