From 3667807a7b7418efc090ee3fa6a6b734bc3080bf Mon Sep 17 00:00:00 2001
From: xieb <vip_xiaobin810@163.com>
Date: Wed, 13 Sep 2023 20:36:29 +0800
Subject: [PATCH] Merge branch 'develop' of http://s16s652780.51mypc.cn:49896/r/yskj/iot_drone_web into develop
---
src/pages/page-web/projects/project_list/list_page/list.vue | 37 ++++++++++++++++++++++++-------------
1 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/src/pages/page-web/projects/project_list/list_page/list.vue b/src/pages/page-web/projects/project_list/list_page/list.vue
index 73abaca..f3680ed 100644
--- a/src/pages/page-web/projects/project_list/list_page/list.vue
+++ b/src/pages/page-web/projects/project_list/list_page/list.vue
@@ -24,11 +24,7 @@
</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>
@@ -40,17 +36,21 @@
import { getPage as getProjectPage } from '/@/api/project-page'
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'
+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 +61,18 @@
})
// ant 加载
const spinning = ref<boolean>(false)
-const delayTime = 500
const goDetail = () => {
router.push({ name: ERouterName.WORKSPACE })
+ store.commit('SET_POINT_LIST', [])
}
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()
}
// 排序方法
@@ -88,10 +88,20 @@
spinning.value = false
})
cardList.value = res.data.records
+ const longitudeList = res.data.records.map((item: { id: string, longitude: any; latitude: any, projectName: string }) => {
+ return {
+ longitude: item.longitude,
+ latitude: item.latitude,
+ label: item.projectName,
+ id: item.id
+ }
+ })
+ store.commit('SET_POINT_LIST', longitudeList)
spinning.value = false
}
onMounted(() => {
init()
+ console.log(global, '+++++')
})
</script>
@@ -169,4 +179,5 @@
flex: 1;
overflow-y: auto;
}
-}</style>
+}
+</style>
--
Gitblit v1.9.3