|
@@ -18,13 +18,15 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<span v-if="list.length > 0">
|
|
<span v-if="list.length > 0">
|
|
- <el-row class="list_row" v-for="(item, index) in list" :key="index" @click.native="link(item.id)">
|
|
|
|
- <el-col :span="24">
|
|
|
|
|
|
+ <el-row class="list_row" v-for="(item, index) in list" :key="index" @click.native="link(item.id)" :gutter="10">
|
|
|
|
+ <el-col :span="4">
|
|
|
|
+ <el-image fit="cover" :src="item.corp.identity.logo_url"></el-image>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="20">
|
|
<el-col :span="24" class="title">
|
|
<el-col :span="24" class="title">
|
|
- {{ item.title }}
|
|
|
|
|
|
+ {{ item.corpname }}
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="24" class="schname"> 主办方:{{ item.schname }} </el-col>
|
|
|
|
- <el-col :span="20" class="corpname"> 参会企业:{{ item.corpname }} </el-col>
|
|
|
|
|
|
+ <el-col :span="20" class="corpname title_display"> {{ item.title }} </el-col>
|
|
<el-col :span="4" class="view">
|
|
<el-col :span="4" class="view">
|
|
<i class="el-icon-view info_icon"></i>
|
|
<i class="el-icon-view info_icon"></i>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -107,8 +109,14 @@
|
|
<script>
|
|
<script>
|
|
import listLayout from '@/layout/list-layout.vue';
|
|
import listLayout from '@/layout/list-layout.vue';
|
|
import nodata from '@/components/nodata.vue';
|
|
import nodata from '@/components/nodata.vue';
|
|
|
|
+import _ from 'lodash';
|
|
import { mapActions, mapState } from 'vuex';
|
|
import { mapActions, mapState } from 'vuex';
|
|
export default {
|
|
export default {
|
|
|
|
+ metaInfo() {
|
|
|
|
+ return {
|
|
|
|
+ title: '招聘信息',
|
|
|
|
+ };
|
|
|
|
+ },
|
|
name: 'jobinfo',
|
|
name: 'jobinfo',
|
|
props: {},
|
|
props: {},
|
|
components: {
|
|
components: {
|
|
@@ -130,7 +138,6 @@ export default {
|
|
tags: {},
|
|
tags: {},
|
|
list: [],
|
|
list: [],
|
|
divideIndex: 0,
|
|
divideIndex: 0,
|
|
- url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
|
|
|
|
}),
|
|
}),
|
|
created() {
|
|
created() {
|
|
this.search();
|
|
this.search();
|
|
@@ -147,10 +154,9 @@ export default {
|
|
}),
|
|
}),
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapActions(['jobinfoOperation']),
|
|
|
|
|
|
+ ...mapActions(['jobinfoOperation', 'corpOperation']),
|
|
//添加type形参
|
|
//添加type形参
|
|
async search(type) {
|
|
async search(type) {
|
|
- console.log('in function:');
|
|
|
|
let skip = 0;
|
|
let skip = 0;
|
|
//判断下type,如果type存在.当前页加一
|
|
//判断下type,如果type存在.当前页加一
|
|
if (type && type === 'nextPage') {
|
|
if (type && type === 'nextPage') {
|
|
@@ -162,8 +168,9 @@ export default {
|
|
let result = await this.jobinfoOperation({ type: 'list', data: { skip: skip, limit: this.$limit, ...this.searchInfo, is_publish: 1 } }); //查询,添加skip和limit参数
|
|
let result = await this.jobinfoOperation({ type: 'list', data: { skip: skip, limit: this.$limit, ...this.searchInfo, is_publish: 1 } }); //查询,添加skip和limit参数
|
|
if (`${result.errcode}` === '0') {
|
|
if (`${result.errcode}` === '0') {
|
|
//给this=>vue的实例下在中的list属性,赋予result。data的值
|
|
//给this=>vue的实例下在中的list属性,赋予result。data的值
|
|
|
|
+ let arr = await this.searchCorp(result.data);
|
|
if (type && type === 'nextPage') {
|
|
if (type && type === 'nextPage') {
|
|
- this.$set(this, `list`, this.list.concat(result.data)); //将现有的列表和请求来的数据列表合并到一起,自动追加在下面import '@/plugins/var';
|
|
|
|
|
|
+ this.$set(this, `list`, this.list.concat(arr)); //将现有的列表和请求来的数据列表合并到一起,自动追加在下面import '@/plugins/var';
|
|
} else {
|
|
} else {
|
|
this.$set(this, `list`, result.data);
|
|
this.$set(this, `list`, result.data);
|
|
}
|
|
}
|
|
@@ -199,6 +206,18 @@ export default {
|
|
});
|
|
});
|
|
if (typeof info === 'string') return `${info.substring(0, this.divideIndex)}...`;
|
|
if (typeof info === 'string') return `${info.substring(0, this.divideIndex)}...`;
|
|
},
|
|
},
|
|
|
|
+ async searchCorp(data) {
|
|
|
|
+ for (let item of data) {
|
|
|
|
+ let res = await this.corpOperation({ type: 'search', data: { corpid: item.corpid } });
|
|
|
|
+ item.corp = res;
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ filters: {
|
|
|
|
+ getData(search) {
|
|
|
|
+ return _.get(this.list, `search`);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -226,7 +245,7 @@ export default {
|
|
}
|
|
}
|
|
.list_row .corpname {
|
|
.list_row .corpname {
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
- color: #333;
|
|
|
|
|
|
+ color: #33333394;
|
|
}
|
|
}
|
|
.list_row .view {
|
|
.list_row .view {
|
|
text-align: right;
|
|
text-align: right;
|
|
@@ -243,4 +262,10 @@ export default {
|
|
color: #409eff;
|
|
color: #409eff;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
+.title_display {
|
|
|
|
+ display: -webkit-box;
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|