|
@@ -10,8 +10,9 @@
|
|
|
type="text"
|
|
type="text"
|
|
|
:placeholder="$t('common.qingshuruyaosousuodegongzuoliu')"
|
|
:placeholder="$t('common.qingshuruyaosousuodegongzuoliu')"
|
|
|
class="search-input"
|
|
class="search-input"
|
|
|
|
|
+ v-model="searchFom.workflowTitle"
|
|
|
/>
|
|
/>
|
|
|
- <button class="search-btn bg_color_primary gradient">
|
|
|
|
|
|
|
+ <button class="search-btn bg_color_primary gradient" @click.stop.prevent="getList">
|
|
|
<img :src="searchIcon" alt="" class="icon-search">
|
|
<img :src="searchIcon" alt="" class="icon-search">
|
|
|
{{$t('common.shousuo')}}
|
|
{{$t('common.shousuo')}}
|
|
|
</button>
|
|
</button>
|
|
@@ -29,13 +30,33 @@
|
|
|
<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.categoryId2 === ''}"
|
|
|
|
|
+ @click="searchFom.categoryId2 = ''; searchFom.categoryId3 = '';getList('init');categoryListTree2=[]"
|
|
|
|
|
+ :key="-1">
|
|
|
|
|
+ 全部
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="font_size14 typeItem"
|
|
|
|
|
+ v-for="item in categoryListTree" :key="item.categoryId"
|
|
|
|
|
+ :class="{'active':searchFom.categoryId2 === item.categoryId}"
|
|
|
|
|
+ @click="searchFom.categoryId2 = item.categoryId;searchFom.categoryId3 = '';categoryListTree2=[]; getList('init');getCategoryListTreeFn2();">
|
|
|
|
|
+ {{item.categoryName}}
|
|
|
|
|
+ </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="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.categoryId3 === ''}"
|
|
|
|
|
+ @click="searchFom.categoryId3 = ''; getList('init');"
|
|
|
|
|
+ :key="-1">
|
|
|
|
|
+ 全部
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="font_size14 typeItem"
|
|
|
|
|
+ v-for="item in categoryListTree2" :key="item.categoryId"
|
|
|
|
|
+ :class="{'active':searchFom.categoryId3 === item.categoryId}"
|
|
|
|
|
+ @click="searchFom.categoryId3 = item.categoryId; getList('init');">
|
|
|
|
|
+ {{item.categoryName}}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -48,9 +69,9 @@
|
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
|
<!-- 替换原有的分页代码 -->
|
|
<!-- 替换原有的分页代码 -->
|
|
|
<Pagination
|
|
<Pagination
|
|
|
- :total="pagination.total"
|
|
|
|
|
- :page-size="pagination.pageSize"
|
|
|
|
|
- :current-page="pagination.currentPage"
|
|
|
|
|
|
|
+ :total="searchFom.total"
|
|
|
|
|
+ :page-size="searchFom.pageSize"
|
|
|
|
|
+ :current-page="searchFom.pageNum"
|
|
|
@page-change="handlePageChange"
|
|
@page-change="handlePageChange"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -66,30 +87,59 @@
|
|
|
import CourseCard from '@/components/course-card.vue'
|
|
import CourseCard from '@/components/course-card.vue'
|
|
|
import Pagination from '@/components/Pagination.vue'
|
|
import Pagination from '@/components/Pagination.vue'
|
|
|
|
|
|
|
|
|
|
+ import { getCategoryListTree } from '@/api/category.js'
|
|
|
|
|
+
|
|
|
|
|
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
console.log(router,route)
|
|
console.log(router,route)
|
|
|
- import { ref, computed, reactive } from 'vue'
|
|
|
|
|
|
|
+ import { ref, computed, reactive, onMounted } from 'vue'
|
|
|
//获取参数
|
|
//获取参数
|
|
|
const query = route.query
|
|
const query = route.query
|
|
|
|
|
+ const categoryId = ref(query.categoryId || '')
|
|
|
const activePlatform = ref(query.activePlatform || '')
|
|
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 categoryListTree = ref([])
|
|
|
|
|
+ // 二级分类列表
|
|
|
|
|
+ const categoryListTree2 = ref([])
|
|
|
|
|
+ // 活动平台
|
|
|
|
|
+
|
|
|
// 添加分页相关数据
|
|
// 添加分页相关数据
|
|
|
- const pagination = reactive({
|
|
|
|
|
- currentPage: 1,
|
|
|
|
|
|
|
+ const listTotal = ref(0);
|
|
|
|
|
+ const searchFom = reactive({
|
|
|
|
|
+ categoryId1: categoryId.value,
|
|
|
|
|
+ categoryId2: '',
|
|
|
|
|
+ categoryId3: '',
|
|
|
|
|
+ workflowTitle: '',
|
|
|
|
|
+ pageNum: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
- total: 100
|
|
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+ onMounted(() => {
|
|
|
|
|
+ getList();
|
|
|
|
|
+ getCategoryListTreeFn();
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ // 查询寻找工作流列表
|
|
|
|
|
+ const getList = async (type) => {
|
|
|
|
|
+ if(type === 'init'){
|
|
|
|
|
+ searchFom.pageNum = 1
|
|
|
|
|
+ }
|
|
|
|
|
+ // const res = await getQuestList(searchFom)
|
|
|
|
|
+ // if(res.code === 200){
|
|
|
|
|
+ // }
|
|
|
|
|
+ }
|
|
|
const handlePageChange = (page) => {
|
|
const handlePageChange = (page) => {
|
|
|
- pagination.currentPage = page
|
|
|
|
|
|
|
+ searchFom.pageNum = page
|
|
|
// 这里可以添加获取数据的逻辑
|
|
// 这里可以添加获取数据的逻辑
|
|
|
console.log('当前页:', page)
|
|
console.log('当前页:', page)
|
|
|
|
|
+ getList();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const goWorkflowAdd = () => {
|
|
const goWorkflowAdd = () => {
|
|
@@ -101,6 +151,21 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ const getCategoryListTreeFn = () => {
|
|
|
|
|
+ getCategoryListTree({categoryId: categoryId.value}).then(res => {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ categoryListTree.value = res.rows || [];
|
|
|
|
|
+ })
|
|
|
|
|
+ };
|
|
|
|
|
+ const getCategoryListTreeFn2 = () => {
|
|
|
|
|
+ getCategoryListTree({categoryId: searchFom.categoryId2}).then(res => {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ categoryListTree2.value = res.rows || [];
|
|
|
|
|
+ })
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -176,10 +241,12 @@
|
|
|
}
|
|
}
|
|
|
.typeItem{
|
|
.typeItem{
|
|
|
margin: 0 8px;
|
|
margin: 0 8px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ padding: 4px 8px;
|
|
|
&.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;
|
|
|
- padding: 4px 8px;
|
|
|
|
|
|
|
+
|
|
|
color: $primary-color;
|
|
color: $primary-color;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
}
|
|
}
|