|
@@ -23,6 +23,7 @@ const user = computed(() => userStore.user)
|
|
// 接口
|
|
// 接口
|
|
import { AchievementStore } from '@/store/api/platform/achievement'
|
|
import { AchievementStore } from '@/store/api/platform/achievement'
|
|
import { DemandStore } from '@/store/api/platform/demand'
|
|
import { DemandStore } from '@/store/api/platform/demand'
|
|
|
|
+import { SupplyStore } from '@/store/api/platform/supply'
|
|
import { ProjectStore } from '@/store/api/platform/project'
|
|
import { ProjectStore } from '@/store/api/platform/project'
|
|
import { MatchStore } from '@/store/api/platform/match'
|
|
import { MatchStore } from '@/store/api/platform/match'
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
@@ -31,6 +32,7 @@ const demandStore = DemandStore()
|
|
const projectStore = ProjectStore()
|
|
const projectStore = ProjectStore()
|
|
const matchStore = MatchStore()
|
|
const matchStore = MatchStore()
|
|
const dictDataStore = DictDataStore()
|
|
const dictDataStore = DictDataStore()
|
|
|
|
+const supplyStore = SupplyStore()
|
|
// 组件
|
|
// 组件
|
|
import demand from './parts/demand.vue'
|
|
import demand from './parts/demand.vue'
|
|
import project from './parts/project.vue'
|
|
import project from './parts/project.vue'
|
|
@@ -44,6 +46,7 @@ const router = useRouter()
|
|
const type = ref('0')
|
|
const type = ref('0')
|
|
const routeType = ref('0')
|
|
const routeType = ref('0')
|
|
const form = ref({})
|
|
const form = ref({})
|
|
|
|
+const typeDemand = ref('0')
|
|
// 字典表
|
|
// 字典表
|
|
const fieldList = ref([])
|
|
const fieldList = ref([])
|
|
const statusList = ref([])
|
|
const statusList = ref([])
|
|
@@ -111,14 +114,22 @@ const search = async (query = { skip: 0, limit }) => {
|
|
}
|
|
}
|
|
let res
|
|
let res
|
|
if (routeType.value == 'achievement') res = await achieveStore.query(info)
|
|
if (routeType.value == 'achievement') res = await achieveStore.query(info)
|
|
- else if (routeType.value == 'demand') res = await demandStore.query(info)
|
|
|
|
- else if (routeType.value == 'project') res = await projectStore.query(info)
|
|
|
|
|
|
+ else if (routeType.value == 'demand') {
|
|
|
|
+ if (typeDemand.value == '0') res = await demandStore.query(info)
|
|
|
|
+ else if (typeDemand.value == '1') res = await supplyStore.query(info)
|
|
|
|
+ } else if (routeType.value == 'project') res = await projectStore.query(info)
|
|
else if (routeType.value == 'match') res = await matchStore.query(info)
|
|
else if (routeType.value == 'match') res = await matchStore.query(info)
|
|
if (res.errcode == '0') {
|
|
if (res.errcode == '0') {
|
|
list.value = res.data
|
|
list.value = res.data
|
|
total.value = res.total
|
|
total.value = res.total
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+const handleClick = async (tab) => {
|
|
|
|
+ typeDemand.value = tab.props.name
|
|
|
|
+ loading.value = true
|
|
|
|
+ await search({ skip, limit })
|
|
|
|
+ loading.value = false
|
|
|
|
+}
|
|
const searchOther = async () => {
|
|
const searchOther = async () => {
|
|
let result
|
|
let result
|
|
// 技术领域
|
|
// 技术领域
|
|
@@ -262,6 +273,7 @@ provide('total', total)
|
|
provide('currentPage', currentPage)
|
|
provide('currentPage', currentPage)
|
|
provide('sizeChange', sizeChange)
|
|
provide('sizeChange', sizeChange)
|
|
provide('changePage', changePage)
|
|
provide('changePage', changePage)
|
|
|
|
+provide('handleClick', handleClick)
|
|
</script>
|
|
</script>
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.main {
|
|
.main {
|