Bläddra i källkod

更新招聘信息列表

wuhongyuq 5 år sedan
förälder
incheckning
4813a24917

+ 1 - 1
src/components/personnel/personnelcmdetail.vue

@@ -35,7 +35,7 @@ import top from '@/layout/index/top.vue';
 import logo from '@/layout/index/logo.vue';
 import menuInfo from '@/layout/index/menuInfo.vue';
 import foot from '@/layout/index/foot.vue';
-import fenlei from '@/layout/shuju/fenleis.vue';
+import fenleis from '@/layout/personnel/fenleis.vue';
 import contextcm from '@/layout/personnel/contextcm.vue';
 
 export default {

+ 12 - 4
src/components/personnel/personnelist.vue

@@ -25,7 +25,14 @@
             </el-col>
           </el-col>
           <el-col :span="19" class="rightcont">
-            <rightzhaopin v-on="$listeners" :columnName="columnName" :contentList="contentList" :total="total" v-if="display === 'list'"></rightzhaopin>
+            <rightzhaopin
+              v-on="$listeners"
+              :columnName="columnName"
+              :contentList="contentList"
+              :jobsData="jobsData"
+              :total="total"
+              v-if="display === 'list'"
+            ></rightzhaopin>
             <rightzpdetail v-else :columnTitle="columnTitle" :policyInfo="policyInfo"></rightzpdetail>
           </el-col>
         </div>
@@ -59,6 +66,7 @@ export default {
     display: { type: String, default: 'list' },
     columnTitle: null, //信息详情头部栏目标题
     policyInfo: null, //信息详情
+    jobsData: null,
   },
   components: {
     top, //头部
@@ -111,21 +119,21 @@ export default {
 }
 .leftTop {
   background: #fff;
-  height: 420px;
+  height: 360px;
   overflow: hidden;
   margin: 0 0 10px 0;
 }
 .main .fenlei {
   float: left;
   width: 240px;
-  min-height: 800px;
+  min-height: 740px;
   margin: 0 10px 0 0;
   overflow: hidden;
 }
 .main .rightcont {
   float: left;
   width: 950px;
-  min-height: 800px;
+  min-height: 740px;
   overflow: hidden;
   background-color: #fff;
 }

+ 153 - 0
src/components/personnel/personnelqita.vue

@@ -0,0 +1,153 @@
+<template>
+  <div id="policy">
+    <el-row>
+      <el-col :span="24" class="top">
+        <top></top>
+      </el-col>
+      <el-col :span="24" class="logo">
+        <div class="w_1200">
+          <logo :info="info"></logo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="menu">
+        <div class="w_1200">
+          <menuInfo></menuInfo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="5" class="fenlei">
+            <el-col :span="24" class="leftTop">
+              <fenleilist :liebiaoList="liebiaoList" v-on="$listeners"></fenleilist>
+            </el-col>
+            <el-col :span="24" class="leftDiao">
+              <examine></examine>
+            </el-col>
+          </el-col>
+          <el-col :span="19" class="rightcont">
+            <rightqita
+              v-on="$listeners"
+              :columnName="columnName"
+              :contentList="contentList"
+              :canmoData="canmoData"
+              :total="total"
+              v-if="display === 'list'"
+            ></rightqita>
+            <rightzpdetailqita v-else :columnTitle="columnTitle" :policyInfo="policyInfo"></rightzpdetailqita>
+          </el-col>
+        </div>
+      </el-col>
+      <el-col :span="24" class="foot">
+        <div class="w_1200">
+          <foot :info="info"></foot>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from '@/layout/index/top.vue';
+import logo from '@/layout/index/logo.vue';
+import menuInfo from '@/layout/index/menuInfo.vue';
+import foot from '@/layout/index/foot.vue';
+import fenleilist from '@/layout/personnel/fenleilist.vue';
+import rightqita from '@/layout/personnel/rightqita.vue';
+import rightzpdetailqita from '@/layout/personnel/rightzpdetailqita.vue';
+import examine from '@/layout/personCenter/question.vue';
+export default {
+  name: 'policy',
+  props: {
+    info: null, //站点信息
+    liebiaoList: null,
+    columnName: null, //栏目标题
+    contentList: null, //内容
+    total: null,
+    display: { type: String, default: 'list' },
+    columnTitle: null, //信息详情头部栏目标题
+    policyInfo: null, //信息详情
+    canmoData: null,
+  },
+  components: {
+    top, //头部
+    logo, //logo
+    menuInfo, //导航
+    foot, //底部
+    fenleilist, //左边分类
+    rightqita, //右边栏
+    rightzpdetailqita,
+    examine,
+  },
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    clickList({ id }) {
+      console.log(id);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.top {
+  height: 40px;
+  overflow: hidden;
+  background-color: rgba(11, 58, 125, 0.8);
+}
+.logo {
+  height: 200px;
+  overflow: hidden;
+}
+.menu {
+  height: 70px;
+  overflow: hidden;
+}
+.main {
+  min-height: 600px;
+  overflow: hidden;
+  margin: 10px 0;
+}
+.leftDiao {
+  background: #fff;
+  height: 370px;
+  overflow: hidden;
+}
+.leftTop {
+  background: #fff;
+  height: 360px;
+  overflow: hidden;
+  margin: 0 0 10px 0;
+}
+.main .fenlei {
+  float: left;
+  width: 240px;
+  min-height: 740px;
+  margin: 0 10px 0 0;
+  overflow: hidden;
+}
+.main .rightcont {
+  float: left;
+  width: 950px;
+  min-height: 740px;
+  overflow: hidden;
+  background-color: #fff;
+}
+.main .link {
+  float: left;
+  width: 100%;
+  height: 100px;
+  overflow: hidden;
+  background-color: #fff;
+}
+.foot {
+  float: left;
+  width: 100%;
+  height: 120px;
+  overflow: hidden;
+}
+</style>

+ 1 - 1
src/layout/personnel/fenleilist.vue

@@ -2,7 +2,7 @@
   <div id="fenlei">
     <el-col class="swfl">
       <el-image style="width:22px;height:22px;margin:0 5px -5px 0;" :src="src"></el-image>
-      <span>政策分类</span>
+      <span>分类导航</span>
     </el-col>
     <el-col>
       <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="#215299" active-text-color="#215299">

+ 65 - 0
src/layout/personnel/fenleis.vue

@@ -0,0 +1,65 @@
+<template>
+  <div id="fenlei">
+    <el-col class="swfl">
+      <el-image style="width:22px;height:22px;margin:0 5px -5px 0;" :src="src"></el-image>
+      <span>分类导航</span>
+    </el-col>
+    <el-col>
+      <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="#215299" active-text-color="#215299">
+        <el-menu-item index="1" v-for="(item, index) in liebiaoList" :key="index"
+          ><span slot="title" @click="clickUrl(item.id)">{{ item.name }}</span></el-menu-item
+        >
+      </el-menu>
+    </el-col>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'fenlei',
+  props: {
+    liebiaoList: null,
+  },
+  components: {},
+  data: () => ({
+    src: require('@/assets/swfl.png'),
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    clickUrl(id) {
+      this.$emit('clickLists', { id });
+    },
+    handleOpen(key, keyPath) {
+      console.log(key, keyPath);
+    },
+    handleClose(key, keyPath) {
+      console.log(key, keyPath);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.swfl {
+  height: 60px;
+  width: 240px;
+  line-height: 60px;
+  background-color: #22529a;
+  text-align: center;
+}
+.swfl span {
+  font-size: 22px;
+  color: #ffffff;
+}
+/deep/.el-menu-item {
+  height: 60px;
+  text-align: center;
+  line-height: 60px;
+  border-bottom: 1px dashed;
+  font-size: 22px;
+}
+/deep/.el-menu-item:last-child {
+  border-bottom: none;
+}
+</style>

+ 124 - 0
src/layout/personnel/rightqita.vue

@@ -0,0 +1,124 @@
+<template>
+  <div id="rightcont">
+    <el-col class="zhengce">
+      <el-col :span="24" class="topTitle">
+        {{ columnName }}
+      </el-col>
+      <el-col :span="24" class="info">
+        <el-table :data="canmoData" stripe style="width: 100%">
+          <el-table-column label="名称" align="center">
+            <template slot-scope="scoped">
+              <el-tooltip effect="dark" content="点击显示详情" placement="left">
+                <el-col :span="24" @click.native="clickDetailcm(scoped.row)">{{ scoped.row.name }}</el-col>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+          <el-table-column prop="infotype" label="信息类型" align="center"> </el-table-column>
+          <el-table-column prop="user_name" label="发布人" align="center"> </el-table-column>
+        </el-table>
+        <el-col class="page" :span="24">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            layout="total,  prev, pager, next, jumper"
+            :total="total"
+          >
+          </el-pagination>
+        </el-col>
+      </el-col>
+    </el-col>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'rightcont',
+  props: {
+    canmoData: null,
+    columnName: null,
+    contentList: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 1,
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+    },
+    clickDetailcm(row) {
+      this.$emit('detail', { data: row });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.zhengce {
+  height: 660px;
+  padding: 20px;
+  overflow: hidden;
+}
+.topTitle {
+  font-size: 22px;
+  color: #22529a;
+  margin: 0 0 20px 0;
+}
+.info {
+  height: 570px;
+  overflow: hidden;
+}
+.info ul {
+  height: 510px;
+  overflow: hidden;
+  padding: 0 0 0 20px;
+}
+.info ul li {
+  float: left;
+  width: 100%;
+  padding: 0 0 13px 0;
+}
+.info ul li .title {
+  font-size: 16px;
+  color: #60636d;
+}
+.info ul li .date {
+  font-size: 16px;
+  color: #a8abb7;
+  text-align: right;
+}
+.info ul li:hover {
+  cursor: pointer;
+}
+.info ul li:hover .title {
+  color: #22529a;
+}
+.info ul li:hover .date {
+  color: #22529a;
+}
+.page {
+  padding: 11px 0;
+  text-align: center;
+}
+/deep/.el-table td {
+  padding: 8px 0;
+}
+/deep/.el-table th {
+  padding: 8px 0;
+  background-color: #f5f4f4;
+}
+/deep/ .el-table th.is-leaf {
+  border-bottom: none;
+  color: #000;
+}
+/deep/.el-table td {
+  border-bottom: none;
+}
+</style>

+ 23 - 8
src/layout/personnel/rightzhaopin.vue

@@ -5,14 +5,25 @@
         {{ columnName }}
       </el-col>
       <el-col :span="24" class="info">
-        <ul>
-          <li v-for="(item, index) in contentList" :key="index" @click="$emit('fetch', item.id)">
-            <el-col :span="21" class="title textOver">{{ item.title }}</el-col>
-            <el-col :span="3" class="date">
-              {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
-            </el-col>
-          </li>
-        </ul>
+        <el-table :data="jobsData" stripe style="width: 100%">
+          <el-table-column label="招聘信息名称" align="center">
+            <template slot-scope="scoped">
+              <el-tooltip effect="dark" content="点击显示详情" placement="left">
+                <el-col :span="24" @click.native="clickDetailgz(scoped.row)">{{ scoped.row.name }}</el-col>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+          <el-table-column prop="profession" label="公司名称" align="center"> </el-table-column>
+          <el-table-column prop="workplace" label="工作地点" align="center"> </el-table-column>
+          <el-table-column prop="workexp" label="工作经验" align="center"> </el-table-column>
+          <el-table-column prop="people_number" label="招聘人数" align="center"> </el-table-column>
+          <el-table-column prop="education" label="学历" align="center"> </el-table-column>
+          <el-table-column prop="job_nature" label="工作性质" align="center">
+            <template v-slot="scoped">
+              {{ `${scoped.row.job_nature}` === `0` ? '兼职' : '全职' }}
+            </template>
+          </el-table-column>
+        </el-table>
         <el-col class="page" :span="24">
           <el-pagination
             @size-change="handleSizeChange"
@@ -32,6 +43,7 @@
 export default {
   name: 'rightcont',
   props: {
+    jobsData: null,
     columnName: null,
     contentList: null,
     total: null,
@@ -49,6 +61,9 @@ export default {
     handleCurrentChange(val) {
       console.log(`当前页: ${val}`);
     },
+    clickDetailgz(row) {
+      this.$emit('detail', { data: row });
+    },
   },
 };
 </script>

+ 102 - 0
src/layout/personnel/rightzpdetailqita.vue

@@ -0,0 +1,102 @@
+<template>
+  <div id="policyrightcont">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="topInfo">
+          <span>{{ columnTitle }}</span>
+        </el-col>
+        <el-col :span="24" class="infoMess">
+          <el-col :span="24" class="title">
+            {{ policyInfo.title }}
+          </el-col>
+          <el-col :span="24" class="infoDate">
+            <p>
+              <span>发布人:{{ policyInfo.user_name }}</span>
+              <span>来源:{{ policyInfo.orgin }}</span>
+              <span>发布时间: {{ policyInfo.meta && policyInfo.meta.createdAt ? new Date(policyInfo.meta.createdAt).toLocaleDateString() : '' || '' }}</span>
+            </p>
+          </el-col>
+          <el-col v-if="policyInfo.picture" class="image">
+            <el-image style="width:50%" :src="policyInfo.picture"></el-image>
+          </el-col>
+          <el-col :span="24" class="content">
+            <p v-html="policyInfo.content"></p>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'policyrightcont',
+  props: {
+    columnTitle: null,
+    policyInfo: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.info {
+  padding: 0 20px;
+}
+.topInfo {
+  height: 60px;
+  line-height: 60px;
+  font-size: 22px;
+}
+.infoMess .title {
+  line-height: 30px;
+  text-align: center;
+  font-size: 16px;
+  font-weight: bold;
+  color: #000000;
+  margin: 0 0 20px 0;
+}
+.infoDate {
+  height: 36px;
+  line-height: 36px;
+}
+.infoDate p {
+  width: 700px;
+  background: #eeeeee;
+  margin: 0 105px;
+}
+.infoDate p span {
+  font-size: 14px;
+  color: #000;
+  padding: 0 0 0 80px;
+}
+.infoMess .image {
+  text-align: center;
+  margin: 20px 0 0 0;
+}
+.content {
+  padding: 0px 0 20px 0;
+}
+/deep/.el-table td {
+  padding: 8px 0;
+}
+/deep/.el-table th {
+  padding: 8px 0;
+  background-color: #f5f4f4;
+}
+/deep/ .el-table th.is-leaf {
+  border-bottom: none;
+  color: #000;
+}
+/deep/.el-table td {
+  border-bottom: none;
+}
+</style>

+ 5 - 0
src/router/index.js

@@ -172,6 +172,11 @@ const routes = [
     path: '/personnel/personnelcmdetail',
     component: () => import('../views/personnel/personnelcmdetail.vue'),
   },
+  {
+    path: '/personnel/personnelqita',
+    component: () => import('../views/personnel/personnelqita.vue'),
+  },
+
   //科技人才-招聘信息
   {
     path: '/personnel/recruit',

+ 16 - 2
src/views/personnel/personnelist.vue

@@ -11,6 +11,8 @@
       :policyInfo="policyInfo"
       @clickLists="submit"
       @fetch="fetchInfo"
+      @detailgz="clickDetailgz"
+      :jobsData="jobsData"
     ></personnelist-detail>
   </div>
 </template>
@@ -21,8 +23,8 @@ import { createNamespacedHelpers, mapGetters } from 'vuex';
 import _ from 'loadsh';
 const { mapActions: mapSite } = createNamespacedHelpers('site');
 const { mapActions: mappolicyColumn } = createNamespacedHelpers('policiesColumn');
-const { mapActions: mappolicyNews } = createNamespacedHelpers('policiesColumn');
-
+const { mapActions: mappolicyNews } = createNamespacedHelpers('policiesxinxi');
+// policiesxinxi
 export default {
   name: 'shujulist',
   props: {},
@@ -37,11 +39,13 @@ export default {
     leftId: '',
     columnTitle: '',
     policyInfo: {},
+    jobsData: [],
   }),
   async created() {
     this.searchSite();
     await this.policyColumn();
     await this.defaultColumn();
+    await this.searchInfojobs();
   },
   computed: {},
   methods: {
@@ -64,6 +68,12 @@ export default {
         this.$set(this, `liebiaoList`, res.data);
       }
     },
+    async searchInfojobs({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.policyNew({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `jobsData`, res.data);
+      }
+    },
     submit({ id }) {
       this.$set(this, `leftId`, id);
       this.display = 'list';
@@ -95,6 +105,10 @@ export default {
       this.$set(this, `policyInfo`, res.data);
       // 查询详情,赋值
     },
+    clickDetailgz({ data }) {
+      // 点击这个方法,跳转页面,并把id传过去,并用id查询详情
+      this.$router.push({ path: '/personnel/personnelwork', query: { id: data.id } });
+    },
   },
 };
 </script>

+ 116 - 0
src/views/personnel/personnelqita.vue

@@ -0,0 +1,116 @@
+<template>
+  <div id="shujulist">
+    <personnelqita-detail
+      :info="info"
+      :liebiaoList="liebiaoList"
+      :display="display"
+      :columnName="columnName"
+      :contentList="contentList"
+      :total="total"
+      :columnTitle="columnTitle"
+      :policyInfo="policyInfo"
+      @clickLists="submit"
+      @fetch="fetchInfo"
+      @detail="clickDetail"
+      @detailgz="clickDetailcm"
+      :canmoData="canmoData"
+    ></personnelqita-detail>
+  </div>
+</template>
+
+<script>
+import personnelqitaDetail from '@/components/personnel/personnelqita.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+import _ from 'loadsh';
+const { mapActions: mapSite } = createNamespacedHelpers('site');
+const { mapActions: mappolicyColumn } = createNamespacedHelpers('policiesColumn');
+const { mapActions: mappolicyNews } = createNamespacedHelpers('policiesjbxx');
+// policiesxinxi policiesxinxi
+export default {
+  name: 'shujulist',
+  props: {},
+  components: { personnelqitaDetail },
+  data: () => ({
+    info: {},
+    liebiaoList: [],
+    canmoData: [],
+    display: 'list',
+    columnName: '',
+    contentList: [],
+    total: 1,
+    leftId: '',
+    columnTitle: '',
+    policyInfo: {},
+  }),
+  async created() {
+    this.searchSite();
+    await this.policyColumn();
+    await this.defaultColumn();
+  },
+  computed: {},
+  methods: {
+    ...mapSite(['showInfo']),
+    ...mappolicyColumn({ policyColumns: 'query', policyfetch: 'fetch' }),
+    ...mappolicyNews({ policyNew: 'query', newsFetch: 'fetch' }),
+    // 查询站点信息
+    async searchSite() {
+      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 policyColumn({ ...info } = {}) {
+      const res = await this.policyColumns({ ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `liebiaoList`, res.data);
+      }
+    },
+    async searchInfojobs({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.policyNew({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `canmoData`, res.data);
+      }
+    },
+    submit({ id }) {
+      this.$set(this, `leftId`, id);
+      this.display = 'list';
+      this.searchRight();
+    },
+    async searchRight({ skip = 0, limit = 10, column_id } = {}) {
+      const res = await this.policyNew({ skip, limit, column_id: this.leftId });
+      for (const val of res.data) {
+        const result = await this.policyfetch(val.column_id);
+        val.column_name = result.data.name;
+      }
+      this.$set(this, `contentList`, res.data);
+      this.$set(this, `total`, res.data.length);
+      for (const val of res.data) {
+        this.$set(this, `columnName`, val.column_name);
+      }
+    },
+    async defaultColumn() {
+      if (!(this.liebiaoList.length > 0)) return;
+      let id = _.get(this.liebiaoList[0], 'id', false);
+      if (!id) return;
+      this.submit({ id });
+    },
+    async fetchInfo(id) {
+      this.display = 'detail';
+      const res = await this.newsFetch(id);
+      const result = await this.policyfetch(res.data.column_id);
+      this.$set(this, `columnTitle`, result.data.name);
+      this.$set(this, `policyInfo`, res.data);
+      // 查询详情,赋值
+    },
+    clickDetailcm({ data }) {
+      // 点击这个方法,跳转页面,并把id传过去,并用id查询详情
+      this.$router.push({ path: '/personnel/personnelwork', query: { id: data.id } });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>