|
@@ -24,20 +24,49 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="typeList flex-between typeborder">
|
|
<div class="typeList flex-between typeborder">
|
|
|
<div class="gray font_size14 typeName">平台:</div>
|
|
<div class="gray font_size14 typeName">平台:</div>
|
|
|
- <div class="flex_1 gap10">
|
|
|
|
|
- <div class="font_size14 typeItem active" v-for="item in 5" :key="item">全部</div>
|
|
|
|
|
|
|
+ <div class="flex_1 gap10">
|
|
|
|
|
+ <div class="font_size14 typeItem" :class="{'active':searchFom.categoryId1 === ''}"
|
|
|
|
|
+ @click="searchFom.categoryId1 = ''; getList('init');"
|
|
|
|
|
+ :key="-1">
|
|
|
|
|
+ 全部
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="font_size14 typeItem" :class="{'active':item.categoryId === searchFom.categoryId1}"
|
|
|
|
|
+ @click="searchFom.categoryId1 = item.categoryId; getList('init');"
|
|
|
|
|
+ v-for="item in CategoryList" :key="item.categoryId">
|
|
|
|
|
+ {{item.categoryName}}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="typeList flex-between typeborder">
|
|
<div class="typeList flex-between typeborder">
|
|
|
<div class="gray font_size14 typeName">需求状态:</div>
|
|
<div class="gray font_size14 typeName">需求状态:</div>
|
|
|
<div class="flex_1 gap10">
|
|
<div class="flex_1 gap10">
|
|
|
- <div class="font_size14 typeItem active" v-for="item in 5" :key="item">全部</div>
|
|
|
|
|
|
|
+ <div class="font_size14 typeItem"
|
|
|
|
|
+ :class="{'active':searchFom.applyStatus == ''}"
|
|
|
|
|
+ @click="searchFom.applyStatus = ''; getList('init');"
|
|
|
|
|
+ :key="-1">全部</div>
|
|
|
|
|
+ <div class="font_size14 typeItem"
|
|
|
|
|
+ :class="{'active':item.applyStatus === searchFom.applyStatus}"
|
|
|
|
|
+ @click="searchFom.applyStatus = item.applyStatus; getList('init');"
|
|
|
|
|
+ v-for="item in [{applyStatus:'1',applyStatusName:'报名中'},{applyStatus:'2',applyStatusName:'已结束'}]" :key="item.applyStatus">
|
|
|
|
|
+ {{item.applyStatusName}}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="typeList flex-between">
|
|
<div class="typeList flex-between">
|
|
|
<div class="gray font_size14 typeName">发布时间:</div>
|
|
<div class="gray font_size14 typeName">发布时间:</div>
|
|
|
- <div class="flex_1 gap10">
|
|
|
|
|
- <div class="font_size14 typeItem active" v-for="item in 5" :key="item">全部</div>
|
|
|
|
|
|
|
+ <div class="flex_1">
|
|
|
|
|
+ <div style="width: 320px">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ v-model="publishTime"
|
|
|
|
|
+ type="daterange"
|
|
|
|
|
+ placeholder="选择日期范围"
|
|
|
|
|
+ format="YYYY-MM-DD"
|
|
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
|
|
+ :disabled-date="time => time.getTime() > Date.now()"
|
|
|
|
|
+ @change="getList('init')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -121,6 +150,7 @@
|
|
|
|
|
|
|
|
import Pagination from '@/components/Pagination.vue'
|
|
import Pagination from '@/components/Pagination.vue'
|
|
|
import { getQuestList } from '@/api/workflowTrade.js'
|
|
import { getQuestList } from '@/api/workflowTrade.js'
|
|
|
|
|
+ import { getCategoryList } from '@/api/category.js'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -134,25 +164,30 @@
|
|
|
|
|
|
|
|
//获取参数
|
|
//获取参数
|
|
|
const query = route.query
|
|
const query = route.query
|
|
|
- const activePlatform = ref(query.activePlatform || '')
|
|
|
|
|
//获取当前路由路径
|
|
//获取当前路由路径
|
|
|
// const currentPath = ref(router.currentRoute.value.path)
|
|
// const currentPath = ref(router.currentRoute.value.path)
|
|
|
const isChildRoute = computed(() => {
|
|
const isChildRoute = computed(() => {
|
|
|
return route.matched.length > 1
|
|
return route.matched.length > 1
|
|
|
})
|
|
})
|
|
|
|
|
+ // 一级分类列表
|
|
|
|
|
+ const CategoryList = ref([])
|
|
|
|
|
+
|
|
|
// 添加分页相关数据
|
|
// 添加分页相关数据
|
|
|
const list = ref([])
|
|
const list = ref([])
|
|
|
const listTotal = ref(0)
|
|
const listTotal = ref(0)
|
|
|
|
|
+ const publishTime = ref(['', ''])
|
|
|
const searchFom = reactive({
|
|
const searchFom = reactive({
|
|
|
categoryId1: '',
|
|
categoryId1: '',
|
|
|
- categoryId2: '',
|
|
|
|
|
- categoryId3: '',
|
|
|
|
|
title: '',
|
|
title: '',
|
|
|
|
|
+ applyStatus: '',//1:报名中,2:已结束
|
|
|
|
|
+ publishTimeBegin: '',
|
|
|
|
|
+ publishTimeEnd: '',
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
})
|
|
})
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getList();
|
|
getList();
|
|
|
|
|
+ getCategoryListFn();
|
|
|
})
|
|
})
|
|
|
const handlePageChange = (page) => {
|
|
const handlePageChange = (page) => {
|
|
|
searchFom.pageNum = page
|
|
searchFom.pageNum = page
|
|
@@ -165,6 +200,8 @@
|
|
|
if(type === 'init'){
|
|
if(type === 'init'){
|
|
|
searchFom.pageNum = 1
|
|
searchFom.pageNum = 1
|
|
|
}
|
|
}
|
|
|
|
|
+ searchFom.publishTimeBegin = publishTime.value && publishTime.value[0] ? publishTime.value[0] : ''
|
|
|
|
|
+ searchFom.publishTimeEnd = publishTime.value && publishTime.value[1] ? publishTime.value[1] : ''
|
|
|
const res = await getQuestList(searchFom)
|
|
const res = await getQuestList(searchFom)
|
|
|
if(res.code === 200){
|
|
if(res.code === 200){
|
|
|
// listTotal.value = res.data.total
|
|
// listTotal.value = res.data.total
|
|
@@ -190,6 +227,14 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
};
|
|
};
|
|
|
|
|
+ const getCategoryListFn = async () => {
|
|
|
|
|
+ console.log('获取一级分类列表')
|
|
|
|
|
+ const res = await getCategoryList({categoryLevel:1})
|
|
|
|
|
+ if(res.code === 200){
|
|
|
|
|
+ console.log('一级分类列表',res.data)
|
|
|
|
|
+ CategoryList.value = res.rows || []
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -265,6 +310,7 @@
|
|
|
}
|
|
}
|
|
|
.typeItem{
|
|
.typeItem{
|
|
|
margin: 0 8px;
|
|
margin: 0 8px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
&.active{
|
|
&.active{
|
|
|
background: rgba(45,113,255,0.1);
|
|
background: rgba(45,113,255,0.1);
|
|
|
border-radius: 4px 4px 4px 4px;
|
|
border-radius: 4px 4px 4px 4px;
|