|
@@ -38,52 +38,37 @@
|
|
|
</div>
|
|
|
<div class="mine-body" style="text-align: center;">
|
|
|
<el-tabs value="myProject" @tab-click="handleTabClick" v-loading="loading" style="width: 90%;margin-left: 5%">
|
|
|
- <el-tab-pane name="myProject">
|
|
|
+ <el-tab-pane name="myProject" v-if="currTab == 'project'">
|
|
|
<span v-if="projectAndTaskArr == null || projectAndTaskArr.length == 0"> 暂无项目 </span>
|
|
|
<el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle" justify="center"
|
|
|
style="font-size: 14px;">
|
|
|
<el-col :span="6" type="flex" align="middle" justify="center">项目图片</el-col>
|
|
|
<el-col :span="6" type="flex" align="middle" justify="center">项目名称</el-col>
|
|
|
- <el-col :span="6" type="flex" align="middle" justify="center">应用类型</el-col>
|
|
|
- <el-col :span="2" type="flex" align="middle" justify="center">项目预算</el-col>
|
|
|
+ <el-col :span="3" type="flex" align="middle" justify="center">应用类型</el-col>
|
|
|
+ <el-col :span="3" type="flex" align="middle" justify="center">项目预算</el-col>
|
|
|
+ <el-col :span="3" type="flex" align="middle" justify="center">参与人数</el-col>
|
|
|
<el-col :span="4" type="flex" align="middle" justify="center">操作</el-col>
|
|
|
</el-row>
|
|
|
- <project-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 ) || currTab == 'project'"
|
|
|
+ <project-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 )"
|
|
|
v-for="(item,index) in projectAndTaskArr" :key="index" :projectItem="item"/>
|
|
|
- <task-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 ) || currTab == 'task'"
|
|
|
- v-for="(item,index) in projectAndTaskArr" :key="index" :projectItem="item"/>
|
|
|
-<!-- <div v-if="projectAndTaskArr != null || projectAndTaskArr.length > 0"-->
|
|
|
-<!-- v-for="(item,index) in projectAndTaskArr" :key="index" :projectItem="item">-->
|
|
|
+ </el-tab-pane>
|
|
|
|
|
|
-<!-- <template>-->
|
|
|
-<!-- <div class="project-item-container">-->
|
|
|
-<!-- <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">-->
|
|
|
-<!-- <el-col :span="6" type="flex" align="middle" justify="center">-->
|
|
|
-<!-- <el-badge :value="item.statusVO.text" class="item" :type="item.statusVO.style">-->
|
|
|
-<!-- <img class="project-cover" src="@/assets/img/home_ban1.jpg">-->
|
|
|
-<!-- </el-badge>-->
|
|
|
-<!-- </el-col>-->
|
|
|
-<!-- <el-col :span="6" type="flex" align="middle" justify="center">{{item.name}}</el-col>-->
|
|
|
-<!-- <!–<el-col :span="4">{{project.id}}</el-col>–>-->
|
|
|
-<!-- <el-col :span="6" type="flex" align="middle" justify="center">-->
|
|
|
-<!-- <span style="font-size: 10px;"-->
|
|
|
-<!-- v-bind:class="['badge']"-->
|
|
|
-<!-- >{{item.platform}}</span>-->
|
|
|
-<!-- </el-col>-->
|
|
|
-<!-- <el-col :span="2" type="flex" align="middle" justify="center">-->
|
|
|
-<!-- <div class="badge">¥{{item.budget}}</div>-->
|
|
|
-<!-- </el-col>-->
|
|
|
-<!-- <el-col :span="4" type="flex" align="middle" justify="center">-->
|
|
|
-<!-- <el-badge v-if="item.needHandle" is-dot class="item">-->
|
|
|
-<!-- <span class="btn btn-small btn-info" @click="goToProjectDetail(item.id)">查看详情</span>-->
|
|
|
-<!-- </el-badge>-->
|
|
|
-<!-- <span v-if="!item.needHandle" class="btn btn-small btn-info" @click="goToProjectDetail(item.id)">查看详情</span>-->
|
|
|
-<!-- </el-col>-->
|
|
|
-<!-- </el-row>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </div>-->
|
|
|
+ <el-tab-pane name="myProject" v-if="currTab == 'task'">
|
|
|
+ <span v-if="projectAndTaskArr == null || projectAndTaskArr.length == 0"> 暂无项目 </span>
|
|
|
+ <el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle" justify="center"
|
|
|
+ style="font-size: 14px;">
|
|
|
+ <el-col :span="5">任务封面</el-col>
|
|
|
+ <el-col :span="4">任务名称</el-col>
|
|
|
+ <el-col :span="4">测试类型</el-col>
|
|
|
+ <el-col :span="4">任务预算</el-col>
|
|
|
+ <el-col :span="4">领取人数</el-col>
|
|
|
+ <el-col :span="3">操作</el-col>
|
|
|
+ </el-row>
|
|
|
+ <task-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 )"
|
|
|
+ v-for="(item,index2) in projectAndTaskArr" :key="index2" :task="item"/>
|
|
|
</el-tab-pane>
|
|
|
+
|
|
|
+
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
|
|
@@ -134,6 +119,7 @@
|
|
|
comments: {TaskItem, ProjectItem},
|
|
|
data(){
|
|
|
return {
|
|
|
+ loading: false,
|
|
|
isLogin: false,
|
|
|
searchType:'project',
|
|
|
searchVal: '',
|
|
@@ -147,13 +133,13 @@
|
|
|
{label:"热门测试任务",name:"task"}
|
|
|
],
|
|
|
projectAndTaskArr:[],
|
|
|
- type: 0,
|
|
|
activePage:1,
|
|
|
totalElements:0,
|
|
|
type: ''
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
+ TaskItem,
|
|
|
ProjectItem,
|
|
|
SearchBar,
|
|
|
SquareCard,
|
|
@@ -164,6 +150,7 @@
|
|
|
},
|
|
|
methods:{
|
|
|
loadData(){
|
|
|
+ this.showLoading();
|
|
|
if (storageGet('user') != null) {
|
|
|
this.isLogin = true;
|
|
|
}
|
|
@@ -175,26 +162,29 @@
|
|
|
this.currTab = 'task';
|
|
|
this.getHotTask();
|
|
|
}
|
|
|
+ this.hideLoading();
|
|
|
},
|
|
|
getHotProject(){
|
|
|
let params = {
|
|
|
- "keyword": this.keyword,//搜索关键字
|
|
|
+ "keyword": this.searchVal,//搜索关键字
|
|
|
"activePage": this.activePage,//指定页面
|
|
|
"columnFilters":[]
|
|
|
};
|
|
|
Http.post(Apis.PROJECT.MORE_HOT_PROJECT, params).then((res) => {
|
|
|
console.log(res.data);
|
|
|
this.projectAndTaskArr = res.data.content;
|
|
|
+ this.totalElements = res.data.totalElements;
|
|
|
})
|
|
|
},
|
|
|
getHotTask(){
|
|
|
let params = {
|
|
|
- "keyword": this.keyword,//搜索关键字
|
|
|
+ "keyword": this.searchVal,//搜索关键字
|
|
|
"activePage": this.activePage,//指定页面
|
|
|
"columnFilters":[]
|
|
|
};
|
|
|
Http.post(Apis.TASK.MORE_HOT_TASK, params).then((res) => {
|
|
|
this.projectAndTaskArr = res.data.content;
|
|
|
+ this.totalElements = res.data.totalElements;
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -235,27 +225,23 @@
|
|
|
}
|
|
|
},
|
|
|
handleSearchData(){
|
|
|
- let url = '/api/square/search/list';
|
|
|
- let params = {
|
|
|
- "keyword": this.searchVal,//搜索关键字
|
|
|
- "activePage": this.activePage,//指定页面
|
|
|
- "columnFilters":
|
|
|
- [
|
|
|
- {
|
|
|
- "type": this.searchType // 查询项目就是project,任务就是task
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
- Http.post(url,params).then((res)=>{
|
|
|
- this.currTab = this.searchType;
|
|
|
- this.projectAndTaskArr = res.data.content;
|
|
|
- this.totalElements=res.data.totalElements;
|
|
|
- })
|
|
|
+ console.log("this.searchVal " + this.searchVal)
|
|
|
+ if(this.currTab == 'project'){
|
|
|
+ this.getHotProject();
|
|
|
+ }else{
|
|
|
+ this.getHotTask();
|
|
|
+ }
|
|
|
},
|
|
|
handlePageChange(index){
|
|
|
this.activePage = index;
|
|
|
this.searchData();
|
|
|
- }
|
|
|
+ },
|
|
|
+ showLoading () {
|
|
|
+ this.loading = true
|
|
|
+ },
|
|
|
+ hideLoading () {
|
|
|
+ this.loading = false
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.loadData();
|
|
@@ -276,4 +262,35 @@
|
|
|
padding: 15px 0 15px 15px;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ .mine-container {
|
|
|
+ padding: 0 80px 40px 80px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .mine-top-wrapper {
|
|
|
+ height: 350px;
|
|
|
+ background-color: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ [class*="el-col-"] {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .advertise-imgs {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .advertise-imgs img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .user-banner {
|
|
|
+ text-align: center;
|
|
|
+ display: inline-table;
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
</style>
|