| | |
| | | </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 { 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: '', |
| | |
| | | }) |
| | | // 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() |
| | | } |
| | | // 排序方法 |
| | |
| | | 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> |
| | | |
| | |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | } |
| | | }</style> |
| | | } |
| | | </style> |