Преглед изворни кода

修改(招聘会缺少参加企业的列表)

lrf402788946 пре 5 година
родитељ
комит
c5c0ffda99

+ 1 - 1
src/components/detail/job-list.vue

@@ -6,7 +6,7 @@
           <p>{{ item.job_name ? item.job_name : '' }}</p>
           <p>
             <span>{{ item.city ? item.city : '' }}|</span>
-            <span>{{ item.edu ? item.edu : '' }}</span>
+            <span>{{ item.xl_req ? item.xl_req : '' }}</span>
           </p>
         </el-col>
         <el-col :span="6" class="jobfairHotLiP text-owt">

+ 2 - 0
src/pages/talk/store/index.js

@@ -2,6 +2,7 @@ import Vue from 'vue';
 import Vuex from 'vuex';
 import * as talks from '@/store/talks';
 import * as user from '@/store/user';
+import * as post from '@/store/jobs';
 import * as ticket from '@/store/ticket';
 
 Vue.use(Vuex);
@@ -10,6 +11,7 @@ export default new Vuex.Store({
   modules: {
     talks: talks,
     ticket: ticket,
+    post: post,
     user: user,
   },
 });

+ 12 - 2
src/pages/talk/views/detail.vue

@@ -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('请先登录');

+ 4 - 5
src/pages/talkList/views/list.vue

@@ -34,9 +34,8 @@
                 <el-row class="talk_li14_3"><i class="el-icon-office-building el-icon--left"></i>{{ item.address }} </el-row>
               </el-col>
               <el-col :span="6" class="talk_li6">
-                <el-row class="talk_li6_2">
-                  {{ item.date }}<br /><el-tag type="danger">{{ item.time }}</el-tag>
-                </el-row>
+                <el-row class="talk_li6_2"> {{ item.date }}<br /> </el-row>
+                <!-- <el-tag type="danger">{{ item.time }}</el-tag> -->
                 <el-row class="talk_li6_3"><i class="el-icon-view el-icon--left"></i>2019</el-row>
               </el-col>
             </el-row>
@@ -164,13 +163,13 @@ export default {
       this.search();
     },
     changeState(schIn) {
-      if (this.user.schid === undefined) {
+      if (!this.user || this.user.schid === undefined) {
         this.searchInfo.schid = undefined;
         this.changeStateBtn = false;
         this.canSpan = 24;
       } else {
         if (schIn === 'in') {
-          this.searchInfo.schid = this.user.schid;
+          this.searchInfo.schid = this.user.schid || undefined;
         } else {
           this.searchInfo.schid = undefined;
         }

+ 5 - 0
src/store/jobfair.js

@@ -8,6 +8,7 @@ const api = {
   profilesinfo: '/jobs/fairs/{id}',
   faircorps: '/jobs/faircorps',
   faircorpsInfo: '/jobs/faircorps/{id}',
+  fairJobs: '/faircorps/{id}/jobs',
 };
 export const state = () => ({});
 export const mutations = {};
@@ -56,6 +57,10 @@ export const actions = {
       let { id } = data;
       result = await this.$axios.$delete(api.faircorpsInfo, {}, { id: id });
     }
+    if (type === 'fairJobs') {
+      let { id } = data;
+      result = await this.$axios.$delete(api.fairJobs, {}, { id: id });
+    }
     return result;
   },
 };