|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div id="detail">
|
|
|
- <login-Detail :topinfo="site" :menulist="menu" :bannerinfo="master.bannerinfo" :noticedetail="info" :footinfo="site"></login-Detail>
|
|
|
+ <login-Detail :topinfo="site" :menulist="menu" :type="type" :bannerinfo="master.bannerinfo" :noticedetail="info" :footinfo="site"></login-Detail>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -28,6 +28,10 @@ export default {
|
|
|
info: {},
|
|
|
menu: [],
|
|
|
jobList: [],
|
|
|
+ //talk用
|
|
|
+ corpInfo: {},
|
|
|
+ //jobfair用
|
|
|
+ corpList: [],
|
|
|
}),
|
|
|
computed: {
|
|
|
type() {
|
|
@@ -48,6 +52,8 @@ export default {
|
|
|
'jobinfoOperation',
|
|
|
'postTalksInfo',
|
|
|
'postOperation',
|
|
|
+ 'fairInfoOperation',
|
|
|
+ 'corpOperation',
|
|
|
]),
|
|
|
//获取站点信息
|
|
|
async getSite() {
|
|
@@ -103,6 +109,7 @@ export default {
|
|
|
},
|
|
|
async search() {
|
|
|
if (this.type === 'jobinfo') this.getJobInfo();
|
|
|
+ if (this.type === 'talk') this.getTalk();
|
|
|
},
|
|
|
//jobinfo部分
|
|
|
async getJobInfo() {
|
|
@@ -129,6 +136,63 @@ export default {
|
|
|
}
|
|
|
this.$set(this, `jobList`, jobList);
|
|
|
},
|
|
|
+ //jobinfo结束
|
|
|
+ //talk部分
|
|
|
+ async getTalk() {
|
|
|
+ let result = await this.postTalksInfo({ type: 'search', data: { id: this.id } });
|
|
|
+ if (`${result.errcode}` === '0') {
|
|
|
+ //给this=>vue的实例下在中的list属性,赋予result。data的值
|
|
|
+ this.$set(this, 'info', result.data);
|
|
|
+ this.searchCorpInfo(this.info.corpid);
|
|
|
+ this.searchJobs();
|
|
|
+ } else {
|
|
|
+ this.$message.error(result.errmsg ? result.errmsg : 'error');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async searchCorpInfo(corpid) {
|
|
|
+ let result = await this.corpOperation({ type: 'search', data: { corpid: corpid } });
|
|
|
+ if (`${result.errcode}` === '0') {
|
|
|
+ //给this=>vue的实例下在中的list属性,赋予result。data的值
|
|
|
+ this.$set(this, 'corpInfo', result.data);
|
|
|
+ this.$set(this.corpInfo, `id`, this.info.corpid);
|
|
|
+ this.$set(this.corpInfo, `corpname`, this.info.corpname);
|
|
|
+ } else {
|
|
|
+ this.$message.error(result.errmsg ? result.errmsg : 'error');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //talk结束
|
|
|
+ //jobfair部分
|
|
|
+ async getJobfair() {
|
|
|
+ //1直接拿着参数发送请求
|
|
|
+ let result = await this.jobfairOperation({ type: 'search', data: { id: this.id } });
|
|
|
+ if (`${result.errcode}` === '0') {
|
|
|
+ //给this=>vue的实例下在中的list属性,赋予result.data的值
|
|
|
+ this.$set(this, `info`, result.data);
|
|
|
+ this.searchCorps();
|
|
|
+ } else {
|
|
|
+ this.$message.error(result.errmsg ? result.errmsg : 'error');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async searchCorps() {
|
|
|
+ let result = await this.fairInfoOperation({ type: 'searchCorp', data: { fairid: this.id } });
|
|
|
+ if (`${result.errcode}` === '0') {
|
|
|
+ this.$set(this, `corpList`, result.data);
|
|
|
+ this.searchFairJobs();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async searchFairJobs() {
|
|
|
+ let jobsList = [];
|
|
|
+ if (this.corpList.length > 0) {
|
|
|
+ for (const item of this.corpList) {
|
|
|
+ let result = await this.fairInfoOperation({ type: `searchJobs`, data: { id: item.id } });
|
|
|
+ if (`${result.errcode}` === '0') {
|
|
|
+ result.data.map(item => jobsList.push(item));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this, `jobList`, jobsList);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //jobfair结束
|
|
|
},
|
|
|
};
|
|
|
</script>
|