|
@@ -67,7 +67,7 @@ export default {
|
|
|
fits: ['cover'],
|
|
|
url: 'http://pic.bibibi.net//company/1550295969-8794.jpg@128w_128h_4e.png',
|
|
|
info: {},
|
|
|
- jobsList: [{}],
|
|
|
+ jobsList: [],
|
|
|
}),
|
|
|
created() {
|
|
|
if (this.$route.query.id) {
|
|
@@ -80,15 +80,25 @@ export default {
|
|
|
}),
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapActions(['talksOperation', 'userOperation', 'ticketsOperation']),
|
|
|
+ ...mapActions(['talksOperation', 'userOperation', 'ticketsOperation', 'postsOperation']),
|
|
|
async search() {
|
|
|
let result = await this.talksOperation({ type: 'search', data: { id: this.$route.query.id } });
|
|
|
if (`${result.errcode}` === '0') {
|
|
|
this.$set(this, `info`, result.data);
|
|
|
+ await this.searchJobs();
|
|
|
} else {
|
|
|
this.$message.error(result.errmsg ? result.errmsg : 'error');
|
|
|
}
|
|
|
},
|
|
|
+ async searchJobs() {
|
|
|
+ let jobIds = JSON.parse(JSON.stringify(this.info.jobs));
|
|
|
+ for (const item of jobIds) {
|
|
|
+ let result = await this.postsOperation({ type: 'search', data: { id: item } });
|
|
|
+ if (`${result.errcode}` === '0') {
|
|
|
+ this.jobsList.push(result.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
async getTicket() {
|
|
|
if (typeof this.user !== 'object') {
|
|
|
this.$message.error('请先登录');
|