|
@@ -163,6 +163,10 @@
|
|
</el-row>
|
|
</el-row>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="two">
|
|
<el-col :span="24" class="two">
|
|
|
|
+ <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
|
|
|
+ <el-tab-pane label="需求" name="0"></el-tab-pane>
|
|
|
|
+ <el-tab-pane label="供给" name="1"></el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
<el-col
|
|
<el-col
|
|
:span="24"
|
|
:span="24"
|
|
class="list"
|
|
class="list"
|
|
@@ -220,8 +224,10 @@ const $checkRes = inject('$checkRes')
|
|
import { get } from 'lodash-es'
|
|
import { get } from 'lodash-es'
|
|
// 接口
|
|
// 接口
|
|
import { DemandStore } from '@/store/api/platform/demand'
|
|
import { DemandStore } from '@/store/api/platform/demand'
|
|
|
|
+import { SupplyStore } from '@/store/api/platform/supply'
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
const store = DemandStore()
|
|
const store = DemandStore()
|
|
|
|
+const supplyStore = SupplyStore()
|
|
const dictDataStore = DictDataStore()
|
|
const dictDataStore = DictDataStore()
|
|
// 图片引入
|
|
// 图片引入
|
|
import demand from '@/assets/innovation.png'
|
|
import demand from '@/assets/innovation.png'
|
|
@@ -229,6 +235,7 @@ import demand from '@/assets/innovation.png'
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
// 加载中
|
|
// 加载中
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
|
|
+const type = ref('0')
|
|
// 列表
|
|
// 列表
|
|
const list = ref([])
|
|
const list = ref([])
|
|
let skip = 0
|
|
let skip = 0
|
|
@@ -300,7 +307,10 @@ const search = async (query = { skip: 0, limit }) => {
|
|
return i.value
|
|
return i.value
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- const res = await store.list(info)
|
|
|
|
|
|
+
|
|
|
|
+ let res
|
|
|
|
+ if (type.value == '0') res = await store.list(info)
|
|
|
|
+ else if (type.value == '1') res = await supplyStore.list(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
|
|
@@ -317,6 +327,12 @@ const getArea = (data) => {
|
|
if (data) return data.join(',')
|
|
if (data) return data.join(',')
|
|
else return '暂无地区'
|
|
else return '暂无地区'
|
|
}
|
|
}
|
|
|
|
+const handleClick = async (tab) => {
|
|
|
|
+ type.value = tab.props.name
|
|
|
|
+ loading.value = true
|
|
|
|
+ await search({ skip, limit })
|
|
|
|
+ loading.value = false
|
|
|
|
+}
|
|
// 选择查询
|
|
// 选择查询
|
|
const toSelect = async (item, num) => {
|
|
const toSelect = async (item, num) => {
|
|
if (item.is_active) return
|
|
if (item.is_active) return
|