Parcourir la source

Merge branch 'master' of http://git.cc-lotus.info/service-platform/web-website into master

wxy il y a 4 ans
Parent
commit
2e824cf6e9

+ 4 - 4
src/layout/personnel/mainInfo.vue

@@ -26,7 +26,7 @@
             </el-table>
           </el-tab-pane>
           <el-tab-pane label="找工作" name="second">
-            <el-table :data="jobsData" stripe style="width: 100%">
+            <el-table :data="jobsData" stripe style="width: 100%" border>
               <el-table-column label="招聘信息名称" align="center" :show-overflow-tooltip="true">
                 <template slot-scope="scoped">
                   <el-tooltip effect="dark" content="点击显示详情" placement="left">
@@ -47,7 +47,7 @@
             </el-table>
           </el-tab-pane>
           <el-tab-pane label="找专家" name="third">
-            <el-table :data="zhuanjiaData" stripe style="width: 100%">
+            <el-table :data="zhuanjiaData" stripe style="width: 100%" border>
               <el-table-column label="姓名" align="center">
                 <template slot-scope="scoped">
                   <el-tooltip effect="dark" content="点击显示详情" placement="left">
@@ -64,7 +64,7 @@
             </el-table>
           </el-tab-pane>
           <el-tab-pane label="找参谋" name="fourth">
-            <el-table :data="canmoData" stripe style="width: 100%">
+            <el-table :data="canmoData" stripe style="width: 100%" border>
               <el-table-column label="名称" align="center">
                 <template slot-scope="scoped">
                   <el-tooltip effect="dark" content="点击显示详情" placement="left">
@@ -76,7 +76,7 @@
               <el-table-column prop="user_name" label="发布人" align="center"> </el-table-column>
             </el-table>
           </el-tab-pane>
-          <el-tab-pane label="找合作" name="fifth" @click.native="hezuoClick()">
+          <el-tab-pane label="找合作" name="fifth" @click.native="hezuoClick()" border>
             <!-- <el-carousel height="360px">
               <el-carousel-item @click.native="$router.push({ path: '/supermaket/supermarket' })">
                 <p class="title textOver">找合作</p>

+ 10 - 6
src/store/policieszhuanjia.js

@@ -3,30 +3,34 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  columnInfo: `api/talent/experts`,
+  expertsInfo: `/api/talent/experts`,
 };
 const state = () => ({});
 const mutations = {};
 
 const actions = {
   async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.columnInfo}`, { skip, limit, ...info });
+    const res = await this.$axios.$get(`${api.expertsInfo}`, {
+      skip,
+      limit,
+      ...info,
+    });
     return res;
   },
   async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.columnInfo}`, payload);
+    const res = await this.$axios.$post(`${api.expertsInfo}`, payload);
     return res;
   },
   async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.columnInfo}/${payload}`);
+    const res = await this.$axios.$get(`${api.expertsInfo}/${payload}`);
     return res;
   },
   async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.columnInfo}/update/${id}`, data);
+    const res = await this.$axios.$post(`${api.expertsInfo}/update/${id}`, data);
     return res;
   },
   async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.columnInfo}/${payload}`);
+    const res = await this.$axios.$delete(`${api.expertsInfo}/${payload}`);
     return res;
   },
 };

+ 89 - 62
src/views/personnel/personnel.vue

@@ -7,7 +7,7 @@
       :zhuanjiaData="zhuanjiaData"
       :canmoData="canmoData"
       :messList="messList"
-      :rencaiShowList="rencaiShowList"
+      :rencaiShowList="rencaiData"
       :liebiaoList="liebiaoList"
       @detail="clickDetail"
       @detailgz="clickDetailgz"
@@ -35,9 +35,13 @@ export default {
     personnelDetail,
   },
   data: () => ({
+    // 站点信息
     info: {},
+    // 栏目信息
     liebiaoList: [],
+    // 人才
     rencaiData: [],
+
     jobsData: [],
     zhuanjiaData: [],
     canmoData: [],
@@ -67,13 +71,11 @@ export default {
         title: '标题',
       },
     ],
-    rencaiShowList: [],
     canmouId: '',
   }),
   async created() {
-    this.searchSite();
-    this.searchColumn();
-    this.searchInfo();
+    await this.search();
+    await this.searchInfo();
   },
   computed: {},
   methods: {
@@ -84,84 +86,109 @@ export default {
     ...mapzhuanjia({ zhuanjiaList: 'query', zhuanjiaInfo: 'fetch' }),
     ...mapcanmou({ canmouList: 'query', canmouInfo: 'fetch' }),
 
-    // 查询站点信息
-    async searchSite() {
+    clickDetail() {},
+    clickDetailgz() {},
+    clickDetailzj() {},
+    clickDetailcm() {},
+    onsaveClick() {},
+
+    //  查询站点信息+栏目信息
+    async search({ ...info } = {}) {
       let res = await this.showInfo();
       let object = JSON.parse(JSON.stringify(res.data));
       if (object) {
         this.$set(this, `info`, res.data);
-      } else {
-        this.$message.error(res.errmsg ? res.errmsg : 'error');
       }
-    },
-    // 查询科技政务栏目
-    async searchColumn({ ...info } = {}) {
-      const res = await this.columnList({ ...info });
+      res = await this.columnList({ ...info });
       this.$set(this, `liebiaoList`, res.data);
     },
-    async onsaveClick({ id }) {
-      const res = await this.columnInfo(id);
-      if (res.data.site === 'zpxx') {
-        this.$router.push({ path: '/personnel/recruitList', query: { id: res.data.id } });
-      } else if (res.data.site === 'gzgw') {
-        this.$router.push({ path: '/personnel/guidanceList', query: { id: res.data.id } });
-      } else if (res.data.site === 'qgjx') {
-        this.$router.push({ path: '/personnel/practiceList', query: { id: res.data.id } });
-      } else if (res.data.site === 'xxsj') {
-        this.$router.push({ path: '/personnel/diligenceList', query: { id: res.data.id } });
-      } else if (res.data.site === 'jyzd') {
-        this.$router.push({ path: '/personnel/adviserList', query: { id: res.data.id } });
-      }
-    },
-    // 人才详情
-    clickDetail({ data }) {
-      this.$router.push({ path: '/personnel/rencai', query: { id: data.id } });
-    },
-    // 工作详情
-    clickDetailgz({ data }) {
-      this.$router.push({ path: '/personnel/personnelwork', query: { id: data.id } });
-    },
-    // 专家详情
-    clickDetailzj({ data }) {
-      this.$router.push({ path: '/personnel/personnelexpert', query: { id: data.id } });
-    },
-    // 参谋详情
-    clickDetailcm({ data }) {
-      this.$router.push({ path: '/personnel/personnelcmdetail', query: { id: data.id } });
-    },
     // 查询
-    async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
+    async searchInfo({ ...info } = {}) {
       // 人才
-      const res = await this.newsList({ skip, limit, ...info });
+      let res = await this.newsList({ limit: 6, ...info });
       if (this.$checkRes(res)) {
         this.$set(this, `rencaiData`, res.data);
-        this.$set(this, `rencaiShowList`, res.data);
       }
       // 工作
-      const resJob = await this.xinxiList({ skip, limit, ...info });
-      if (this.$checkRes(resJob)) {
-        this.$set(this, `jobsData`, resJob.data);
+      res = await this.xinxiList({ limit: 6, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `jobsData`, res.data);
       }
       // 专家
-      const resZhuanjia = await this.zhuanjiaList({ skip, limit, ...info });
-      if (this.$checkRes(resZhuanjia)) {
-        // this.$set(this, `zhuanjiaData`, resZhuanjia.data);
+      res = await this.zhuanjiaList({ limit: 6, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `zhuanjiaData`, res.data);
       }
       //找参谋
-      const rescanmou = await this.columnList({ ...info });
-      for (const val of rescanmou.data) {
-        if (val.site === 'jyzd') {
-          this.$set(this, `canmouId`, val.id);
-          this.searchCanmou();
-        }
-      }
-    },
-    async searchCanmou({ skip = 0, limit = 10, column_id } = {}) {
-      const res = await this.canmouList({ skip, limit, column_id: this.canmouId });
+      let column = this.liebiaoList.find(i => i.site == 'jyzd');
+      res = await this.canmouList({ limit: 6, column_id: column.id });
       if (this.$checkRes(res)) {
         this.$set(this, `canmoData`, res.data);
       }
     },
+    // async onsaveClick({ id }) {
+    //   const res = await this.columnInfo(id);
+    //   if (res.data.site === 'zpxx') {
+    //     this.$router.push({ path: '/personnel/recruitList', query: { id: res.data.id } });
+    //   } else if (res.data.site === 'gzgw') {
+    //     this.$router.push({ path: '/personnel/guidanceList', query: { id: res.data.id } });
+    //   } else if (res.data.site === 'qgjx') {
+    //     this.$router.push({ path: '/personnel/practiceList', query: { id: res.data.id } });
+    //   } else if (res.data.site === 'xxsj') {
+    //     this.$router.push({ path: '/personnel/diligenceList', query: { id: res.data.id } });
+    //   } else if (res.data.site === 'jyzd') {
+    //     this.$router.push({ path: '/personnel/adviserList', query: { id: res.data.id } });
+    //   }
+    // },
+    // // 人才详情
+    // clickDetail({ data }) {
+    //   this.$router.push({ path: '/personnel/rencai', query: { id: data.id } });
+    // },
+    // // 工作详情
+    // clickDetailgz({ data }) {
+    //   this.$router.push({ path: '/personnel/personnelwork', query: { id: data.id } });
+    // },
+    // // 专家详情
+    // clickDetailzj({ data }) {
+    //   this.$router.push({ path: '/personnel/personnelexpert', query: { id: data.id } });
+    // },
+    // // 参谋详情
+    // clickDetailcm({ data }) {
+    //   this.$router.push({ path: '/personnel/personnelcmdetail', query: { id: data.id } });
+    // },
+    // // 查询
+    // async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
+    //   // 人才
+    //   const res = await this.newsList({ skip, limit, ...info });
+    //   if (this.$checkRes(res)) {
+    //     this.$set(this, `rencaiData`, res.data);
+    //     this.$set(this, `rencaiShowList`, res.data);
+    //   }
+    //   // 工作
+    //   const resJob = await this.xinxiList({ skip, limit, ...info });
+    //   if (this.$checkRes(resJob)) {
+    //     this.$set(this, `jobsData`, resJob.data);
+    //   }
+    //   // 专家
+    //   const resZhuanjia = await this.zhuanjiaList({ skip, limit, ...info });
+    //   if (this.$checkRes(resZhuanjia)) {
+    //     // this.$set(this, `zhuanjiaData`, resZhuanjia.data);
+    //   }
+    //   //找参谋
+    //   const rescanmou = await this.columnList({ ...info });
+    //   for (const val of rescanmou.data) {
+    //     if (val.site === 'jyzd') {
+    //       this.$set(this, `canmouId`, val.id);
+    //       this.searchCanmou();
+    //     }
+    //   }
+    // },
+    // async searchCanmou({ skip = 0, limit = 10, column_id } = {}) {
+    //   const res = await this.canmouList({ skip, limit, column_id: this.canmouId });
+    //   if (this.$checkRes(res)) {
+    //     this.$set(this, `canmoData`, res.data);
+    //   }
+    // },
   },
 };
 </script>