|
|
@@ -10,7 +10,10 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="explore-sorter">
|
|
|
- <el-select class="sort-select" style="width: 150px;" placeholder="排序方式" v-model="sort">
|
|
|
+ <el-select class="sort-select" style="width: 150px;" placeholder="排序方式"
|
|
|
+ v-model="sort"
|
|
|
+ @change="sortChange"
|
|
|
+ >
|
|
|
<template #prefix>
|
|
|
<span style="padding-left: 5px;">
|
|
|
<i class="el-icon-sort"></i>
|
|
|
@@ -31,6 +34,15 @@
|
|
|
<div class="explore-main">
|
|
|
<ExploreItem class="explore-item" v-for="communication in communicationList" :key="communication.id" :communicationVO="communication" />
|
|
|
</div>
|
|
|
+ <div class="pagination">
|
|
|
+ <el-pagination
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :page-size="size"
|
|
|
+ :total="total"
|
|
|
+ @current-change="pageChange"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -42,6 +54,9 @@ export default {
|
|
|
components: {ExploreItem},
|
|
|
data() {
|
|
|
return {
|
|
|
+ page: 1,
|
|
|
+ size: 5,
|
|
|
+ total: 0,
|
|
|
// explore-selector
|
|
|
checkAll: true,
|
|
|
checkedTypes: ["难题", "活动", "其他"],
|
|
|
@@ -49,33 +64,28 @@ export default {
|
|
|
isIndeterminate: false,
|
|
|
// explore-search
|
|
|
content: "",
|
|
|
- sort: "",
|
|
|
- communicationList: [
|
|
|
- {id: 1, title: "[网络感知]手机热点随流高精度高性能的网络侧识别技术", publisherName: "赵礼菁", organization: "云核心网技术规划部", email: "zhaolifing@huawei.com", type: "难题",
|
|
|
- description: "技术背景企业办公采用5G接入内网时,需要对办公终端通过手机热点接入内网进行严格管理精细化管控热点后设备的接入行为。",
|
|
|
- photos: "https://mjh1.oss-cn-hangzhou.aliyuncs.com/hci/no-image.png",
|
|
|
- publishTime: "2022-09-10",
|
|
|
- deadline: "2024-10-09"
|
|
|
- },
|
|
|
- {id: 2, title: "[网络感知]手机热点随流高精度高性能的网络侧识别技术", publisherName: "礼菁", organization: "云核心网技术规划部", email: "zhaolifing@huawei.com", type: "活动",
|
|
|
- description: "技术背景企业办公采用5G接入内网时,需要对办公终端通过手机热点接入内网进行严格管理精细化管控热点后设备的接入行为。",
|
|
|
- photos: "https://mjh1.oss-cn-hangzhou.aliyuncs.com/hci/no-image.png",
|
|
|
- publishTime: "2022-09-10",
|
|
|
- deadline: "2024-10-09"
|
|
|
- },
|
|
|
- {id: 3, title: "[网络感知]手机热点随流高精度高性能的网络侧识别技术", publisherName: "赵菁", organization: "云核心网技术规划部", email: "zhaolifing@huawei.com", type: "其他",
|
|
|
- description: "技术背景企业办公采用5G接入内网时,需要对办公终端通过手机热点接入内网进行严格管理精细化管控热点后设备的接入行为。" +
|
|
|
- "技术背景企业办公采用5G接入内网时,需要对办公终端通过手机热点接入内网进行严格管理精细化管控热点后设备的接入行为。" +
|
|
|
- "技术背景企业办公采用5G接入内网时,需要对办公终端通过手机热点接入内网进行严格管理精细化管控热点后设备的接入行为。" +
|
|
|
- "技术背景企业办公采用5G接入内网时,需要对办公终端通过手机热点接入内网进行严格管理精细化管控热点后设备的接入行为。",
|
|
|
- photos: "https://mjh1.oss-cn-hangzhou.aliyuncs.com/hci/no-image.png",
|
|
|
- publishTime: "2022-09-10",
|
|
|
- deadline: "2024-10-09"
|
|
|
- },
|
|
|
- ]
|
|
|
+ sort: "publishAsc",
|
|
|
+ communicationList: [],
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ userId() {
|
|
|
+ return Number(this.$store.state.user.id);
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ fetchData(){
|
|
|
+ const payload = {
|
|
|
+ userId: this.userId,
|
|
|
+ page: this.page,
|
|
|
+ size: this.size,
|
|
|
+ sort: this.sort
|
|
|
+ };
|
|
|
+ this.$apis.getAllCommunications(payload).then(res=>{
|
|
|
+ this.communicationList = res.data.data;
|
|
|
+ this.total = this.communicationList.length;
|
|
|
+ });
|
|
|
+ },
|
|
|
handleCheckAllChange(val) {
|
|
|
this.checkedTypes = val ? this.types : [];
|
|
|
this.isIndeterminate = false;
|
|
|
@@ -84,8 +94,18 @@ export default {
|
|
|
let checkedCount = value.length;
|
|
|
this.checkAll = checkedCount === this.types.length;
|
|
|
this.isIndeterminate = checkedCount > 0 && checkedCount < this.types.length;
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ pageChange(currentPage){
|
|
|
+ this.page = currentPage;
|
|
|
+ this.fetchData();
|
|
|
+ },
|
|
|
+ sortChange(){
|
|
|
+ this.fetchData();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ async mounted() {
|
|
|
+ this.fetchData();
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
@@ -122,4 +142,10 @@ export default {
|
|
|
.explore-item{
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
+
|
|
|
+.pagination{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
</style>
|