|
@@ -34,21 +34,44 @@
|
|
|
<div class="container" style="margin: 20px auto;">
|
|
|
<div class="create-body">
|
|
|
<div class="title h2">众测资源</div>
|
|
|
+ <template style="color: black">
|
|
|
+ <el-table
|
|
|
+ ref="multipleTable"
|
|
|
+ :data="curResourceList"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ style="width: 100%; font-size: 20px; color: black">
|
|
|
+ <el-table-column
|
|
|
+ label="图标"
|
|
|
+ width="100">
|
|
|
+ <template slot-scope="scope"><img :src="scope.row.photoUrl" style="width: 50px; height: 50px;"/></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="名称"
|
|
|
+ align="left"
|
|
|
+ width="300">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="type"
|
|
|
+ align="left"
|
|
|
+ label="类型">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="state"
|
|
|
+ align="left"
|
|
|
+ label="状态">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="unitWork"
|
|
|
+ align="center"
|
|
|
+ label="单位">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
<el-collapse accordion style="margin: 0 30px">
|
|
|
- <el-collapse-item v-for="(item,index) in curResourceList" :key="item.id" class="item-template">
|
|
|
- <template slot="title">
|
|
|
- <el-row style="width: 100%;font-size: 16px">
|
|
|
- <el-col :span="2"><img :src="item.photoUrl" style="width: 50px; height: 50px;"></el-col>
|
|
|
- <el-col :span="8">{{item.name}}</el-col>
|
|
|
-<!-- <el-col :span="5">{{item.gender}}性别无</el-col>-->
|
|
|
-<!-- <el-col :span="5">{{item.county}}省市无</el-col>-->
|
|
|
-<!-- <el-col :span="4">{{item.taskCount}}</el-col>-->
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
- </el-collapse-item>
|
|
|
<el-pagination
|
|
|
v-if="curResourceList&&curResourceList.length"
|
|
|
- :page-size="9"
|
|
|
+ :page-size="3"
|
|
|
layout="prev, pager, next"
|
|
|
:total="totalElements"
|
|
|
:current-page="activePage"
|
|
@@ -70,12 +93,12 @@
|
|
|
|
|
|
export default {
|
|
|
name: "ResourceList",
|
|
|
- props: ['searchVal', 'resourceList'],
|
|
|
components: {TopSearch},
|
|
|
data() {
|
|
|
return {
|
|
|
isLogin: false,
|
|
|
- // searchVal: '',
|
|
|
+ searchVal: '',
|
|
|
+ curResourceList: [],
|
|
|
searchType: '2',
|
|
|
searchTypeArr: [
|
|
|
{
|
|
@@ -98,7 +121,6 @@
|
|
|
"name": "专家",
|
|
|
"value": "3"
|
|
|
}],
|
|
|
- curResourceList: this.resourceList,
|
|
|
activePage: 1,
|
|
|
totalElements: 0
|
|
|
}
|
|
@@ -108,38 +130,48 @@
|
|
|
if (storageGet('user') != null) {
|
|
|
this.isLogin = true;
|
|
|
}
|
|
|
- let url = '/api/common/index/resource';
|
|
|
- let params = {
|
|
|
- "keyword": this.searchVal,
|
|
|
- "activePage": this.activePage,
|
|
|
- "columnFilters": [
|
|
|
- {
|
|
|
- "field": "type",
|
|
|
- "type": "enums",
|
|
|
- "enums": this.searchTypeArr,
|
|
|
- "value": this.searchType
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- Http.post(url, params).then((res) => {
|
|
|
- console.log(res.data)
|
|
|
- this.curResourceList = res.data.content;
|
|
|
- })
|
|
|
+ this.searchVal = this.$route.params.searchVal;
|
|
|
+ this.handleSearchData();
|
|
|
},
|
|
|
checkLogin() {
|
|
|
if (!this.isLogin) {
|
|
|
- console.log("请登录后访问");
|
|
|
notify('warning', '请登录后访问');
|
|
|
} else {
|
|
|
- console.log("已登录");
|
|
|
this.$router.push('/project/create');
|
|
|
}
|
|
|
},
|
|
|
handleSearchData() {
|
|
|
+ if(this.searchType == 0){
|
|
|
+ // this.$router.push({name: 'Square2.0', params: {searchVal: this.searchVal, searchType: "project"}});
|
|
|
+ }else if(this.searchType == 1){
|
|
|
+ this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
|
|
|
+ }else if(this.searchType == 2){
|
|
|
+ let url = '/api/common/index/page';
|
|
|
+ let params = {
|
|
|
+ "keyword": this.searchVal,
|
|
|
+ "activePage": 1,
|
|
|
+ "columnFilters": [
|
|
|
+ {
|
|
|
+ "field": "type",
|
|
|
+ "type": "enums",
|
|
|
+ "enums": this.searchTypeArr,
|
|
|
+ "value": this.searchType
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ Http.post(url, params).then((res) => {
|
|
|
+ this.curResourceList = res.data.resourcePage.content;
|
|
|
+ this.totalElements = res.data.resourcePage.totalElements;
|
|
|
+ })
|
|
|
+ }else if(this.searchType == 3){
|
|
|
+ this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
|
|
|
+ }
|
|
|
+ },
|
|
|
+ nextPage(){
|
|
|
let url = '/api/common/index/page';
|
|
|
let params = {
|
|
|
"keyword": this.searchVal,
|
|
|
- "activePage": 1,
|
|
|
+ "activePage": this.activePage,
|
|
|
"columnFilters": [
|
|
|
{
|
|
|
"field": "type",
|
|
@@ -148,9 +180,10 @@
|
|
|
"value": this.searchType
|
|
|
}
|
|
|
]
|
|
|
- }
|
|
|
+ };
|
|
|
Http.post(url, params).then((res) => {
|
|
|
this.curResourceList = res.data.resourcePage.content;
|
|
|
+ this.totalElements = res.data.resourcePage.totalElements;
|
|
|
})
|
|
|
},
|
|
|
gotoHome() {
|
|
@@ -161,7 +194,7 @@
|
|
|
},
|
|
|
handlePageChange(index) {
|
|
|
this.activePage = index;
|
|
|
- this.searchData();
|
|
|
+ this.nextPage();
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|