| | |
| | | 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 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() |
| | | } |
| | | // 排序方法 |
| | |
| | | spinning.value = false |
| | | }) |
| | | cardList.value = res.data.records |
| | | const longitudeList = res.data.records.map((item: { id:string, longitude: any; latitude: any, projectName:string }) => { |
| | | const longitudeList = res.data.records.map((item: { id: string, longitude: any; latitude: any, projectName: string }) => { |
| | | return { |
| | | longitude: item.longitude, |
| | | latitude: item.latitude, |
| | |
| | | id: item.id |
| | | } |
| | | }) |
| | | console.log(longitudeList, 'longitudeList') |
| | | store.commit('SET_POINT_LIST', longitudeList) |
| | | spinning.value = false |
| | | } |
| | | onMounted(() => { |
| | | init() |
| | | console.log(global, '+++++') |
| | | }) |
| | | </script> |
| | | |