wuhongyu 5 years ago
parent
commit
7c7d5ad64c

+ 55 - 0
src/components/personnel/rencai.vue

@@ -0,0 +1,55 @@
+<template>
+  <div id="policy">
+    <el-row>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="19" class="rightcont">
+            <rightcontrencai :policyInfo="policyInfo"></rightcontrencai>
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import rightcontrencai from '@/layout/personnel/rightcontrencai.vue';
+
+export default {
+  name: 'policy',
+  props: {
+    policyInfo: null,
+    info: null, //站点信息
+  },
+  components: {
+    rightcontrencai, //右边栏
+  },
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    clickList({ id }) {
+      console.log(id);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 80%;
+  margin: 0 auto;
+}
+
+.main {
+  min-height: 1700px;
+  overflow: hidden;
+  margin: 10px 0;
+}
+.main .rightcont {
+  width: 100%;
+  min-height: 1700px;
+  overflow: hidden;
+  background-color: #fff;
+}
+</style>

+ 73 - 0
src/components/personnel/rencailistDetail.vue

@@ -0,0 +1,73 @@
+<template>
+  <div id="policy">
+    <el-row>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="24" class="rightcont">
+            <listcontext v-on="$listeners" :contentList="contentList" :columnName="columnName" :total="total"></listcontext>
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import listcontext from '@/layout/personnel/listcontext.vue';
+import detali from '@/layout/supermarket/detali.vue';
+export default {
+  name: 'policy',
+  props: {
+    columnName: null, //栏目标题
+    contentList: null, //内容
+    total: null,
+    display: { type: String, default: 'list' },
+    policyInfo: null,
+  },
+  components: {
+    listcontext, //右边栏
+  },
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    clickList({ id }) {
+      console.log(id);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 80%;
+  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: 900px;
+  overflow: hidden;
+  margin: 10px 0;
+}
+
+.main .rightcont {
+  float: left;
+  width: 100%;
+  min-height: 900px;
+  overflow: hidden;
+  background-color: #fff;
+}
+</style>

+ 113 - 0
src/layout/personnel/listcontext.vue

@@ -0,0 +1,113 @@
+<template>
+  <div id="rightcont">
+    <el-col class="zhengce">
+      <el-col :span="24" class="topTitle">
+        专家列表
+      </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.name }}</el-col>
+            <el-col :span="3" class="date">
+              {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
+            </el-col>
+          </li>
+        </ul>
+        <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: {
+    columnName: null,
+    contentList: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 0,
+    pageSize: 10,
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    handleSizeChange(pageSize) {
+      // this.$emit('handleSizeChange', pageSize);
+    },
+    handleCurrentChange(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+ul {
+  margin: 0;
+}
+li {
+  padding: 0;
+  margin: 0;
+  color: #a8abb7;
+}
+.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;
+}
+</style>

+ 204 - 0
src/layout/personnel/rightcontrencai.vue

@@ -0,0 +1,204 @@
+<template>
+  <div id="rightcont">
+    <el-col class="zhengce">
+      <el-col class="tittop">
+        <el-col class="tittxt">专家详情</el-col>
+      </el-col>
+      <el-col class="titleimage">
+        <el-col :span="24">
+          <el-col :span="8" class="bgcolor">
+            <el-col class="images" :span="12">
+              <el-image style="width:140px;height:140px" :src="policyInfo.imgpath"></el-image>
+            </el-col>
+            <el-col :span="12" class="bgcolorWenzi">
+              <p>民族: {{ policyInfo.nation }}</p>
+              <p>学历:{{ policyInfo.education }}</p>
+              <p>电话:{{ policyInfo.phone }}</p>
+              <p>邮箱:{{ policyInfo.email }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="16" class="titletop1">
+            <p class="title">{{ policyInfo.title }}</p>
+            <p class="name">{{ policyInfo.name }}</p>
+            <p class="profession">求职意向:{{ policyInfo.profession }}</p>
+          </el-col>
+        </el-col>
+      </el-col>
+
+      <el-col class="date">
+        更新时间:{{ policyInfo.meta && policyInfo.meta.createdAt ? new Date(policyInfo.meta.createdAt).toLocaleDateString() : '' || '' }}
+      </el-col>
+      <el-row class="info">
+        <el-col :span="24" class="xiangxi">
+          <el-col :span="24" class="infoTop">
+            <span>详细信息</span>
+          </el-col>
+          <el-col :span="24">
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>出生年月:{{ policyInfo.birth }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>证件类型:{{ policyInfo.cardtype }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>身份证号:{{ policyInfo.cardnumber }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>初级职称:{{ policyInfo.technical }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>具体职称:{{ policyInfo.technical_actual }} </el-col>
+
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>职务:{{ policyInfo.position }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>毕业院校:{{ policyInfo.school }} </el-col>
+
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>学历:{{ policyInfo.eduback }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>学位:{{ policyInfo.degree }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>所学专业:{{ policyInfo.major_studied }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>从事专业:{{ policyInfo.professional }} </el-col>
+
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>可供咨询领域:{{ policyInfo.field_py }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>论文论著:{{ policyInfo.paper }} </el-col>
+
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>邮箱:{{ policyInfo.email }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>办公电话:{{ policyInfo.tel }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>手机号:{{ policyInfo.phone }} </el-col>
+
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>主持或参与项目情况:{{ policyInfo.project_profile }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>主要学术成就及获奖情况:{{ policyInfo.achievement }} </el-col>
+
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>领域拼音:{{ policyInfo.field_py }} </el-col>
+
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>性别:{{ policyInfo.gender }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>身份证号:{{ policyInfo.cardnumber }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>户口所在:{{ policyInfo.hukou }} </el-col>
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i>当前住址:{{ policyInfo.addr }}</el-col>
+
+            <el-col :span="12" class="mess"> <i class="el-icon-edit"></i> 婚姻状况:{{ policyInfo.marital == 0 ? '已婚' : '未婚' }} </el-col>
+            <el-col :span="24" class="mess"> <i class="el-icon-edit"></i>备注:{{ policyInfo.remark }} </el-col>
+            <el-col :span="24" class="mess"> <i class="el-icon-edit"></i>业务工作简介:{{ policyInfo.job_profile }} </el-col>
+          </el-col>
+        </el-col>
+      </el-row>
+    </el-col>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'rightcont',
+  props: { policyInfo: null },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.tittop {
+  width: 100%;
+  height: 60px;
+  line-height: 60px;
+  border-bottom: 1px solid #215299;
+}
+.tittxt {
+  width: 135px;
+  height: 60px;
+  line-height: 60px;
+  background: #215299;
+  text-align: center;
+  color: #fff;
+  font-size: 16px;
+  font-family: 'Microsoft Yahei';
+}
+.titleimage {
+  margin: 20px 20px 0 20px;
+  width: 1160px;
+  height: 200px;
+}
+.bgcolor {
+  width: 450px;
+  height: 200px;
+  background-color: #215299;
+}
+.images {
+  text-align: center;
+  padding: 28px 0;
+}
+.bgcolorWenzi {
+  height: 200px;
+  padding: 30px 0;
+}
+.bgcolorWenzi p {
+  color: #fff;
+  padding: 5px 0;
+}
+.titletop1 {
+  width: 710px;
+  height: 200px;
+  background-color: #eeeeee;
+  text-align: center;
+}
+.titletop1 .title {
+  font-weight: bold;
+
+  height: 60px;
+  line-height: 60px;
+  color: #215299;
+  font-size: 24px;
+}
+.titletop1 .name {
+  height: 50px;
+  line-height: 50px;
+  color: #215299;
+  font-size: 24px;
+}
+.titletop1 .profession {
+  height: 65px;
+  line-height: 65px;
+  text-align: center;
+  color: #215299;
+  font-size: 18px;
+}
+.date {
+  height: 50px;
+  line-height: 50px;
+  text-align: right;
+  padding: 0 50px 0 0;
+}
+.info {
+  padding: 0 30px;
+}
+.xiangxi {
+  height: 210px;
+}
+.jianjie {
+  height: 280px;
+}
+.infoTop {
+  height: 40px;
+  line-height: 40px;
+  border-bottom: 1px solid #215299;
+  width: 110%;
+}
+.infoTop span {
+  display: inline-block;
+  height: 40px;
+  background: #215299;
+  padding: 0 20px;
+  color: #fff;
+}
+.content {
+  line-height: 30px;
+  padding: 30px 0 30px 30px;
+}
+.content p {
+  font-size: 16px;
+  color: #666;
+}
+.mess {
+  padding: 29px 20px;
+  font-size: 16px;
+  color: #666;
+}
+.mess i {
+  padding: 0 10px 0 0;
+}
+</style>

+ 27 - 13
src/router/index.js

@@ -25,6 +25,33 @@ const live = [
         meta: { title: '科技超市', subSite: true },
         component: () => import('../views/market/index.vue'),
       },
+      {
+        path: '/personnel/rencai',
+        name: 'personnel',
+        meta: { title: '专家详情', subSite: true },
+        component: () => import('../views/personnel/rencai.vue'),
+      },
+      {
+        path: '/personnel/list',
+        name: 'personnel',
+        meta: { title: '专家列表', subSite: true },
+        component: () => import('../views/personnel/list.vue'),
+      },
+
+      //科技超市列表
+      {
+        path: '/supermaket/supermarketlist',
+        name: 'supermarketuct',
+        component: () => import('../views/supermaket/supermarketlist.vue'),
+      },
+
+      //xiangqing
+      {
+        path: '/supermaket/supermarketdetail',
+        name: 'supermarketdetail',
+        component: () => import('../views/supermaket/supermarketdetail.vue'),
+      },
+
       {
         path: '/dynamic/index',
         name: 'dynamic_index',
@@ -119,19 +146,6 @@ const live = [
         name: 'enterprisedg',
         component: () => import('../views/enterprise/enterprisedg.vue'),
       },
-      //科技超市列表
-      {
-        path: '/supermaket/supermarketlist',
-        name: 'supermarketuct',
-        component: () => import('../views/supermaket/supermarketlist.vue'),
-      },
-
-      //xiangqing
-      {
-        path: '/supermaket/supermarketdetail',
-        name: 'supermarketdetail',
-        component: () => import('../views/supermaket/supermarketdetail.vue'),
-      },
     ],
   },
   {

+ 7 - 15
src/views/market/index.vue

@@ -210,33 +210,25 @@ export default {
       console.log(res.data);
     },
     toProductList() {
-      // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=1';
-      window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=1');
+      this.$router.push({ path: '/supermaket/supermarketlist', query: { totaltype: 1 } });
     },
     productDetail(id) {
-      // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
-      window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '');
+      this.$router.push({ path: '/supermaket/supermarketdetail', query: { totaltype: 2, id: id } });
     },
     toTecList() {
-      // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=0';
-      window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=0');
+      this.$router.push({ path: '/supermaket/supermarketlist', query: { totaltype: 0 } });
     },
     tecDetail(id) {
-      // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=0&&?&id=' + id + '';
-      window.open('//free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=0&&?&id=' + id + '');
+      this.$router.push({ path: '/supermaket/supermarketdetail', query: { totaltype: 0, id: id } });
     },
     toServiceList() {
-      // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=2';
-      window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=2');
+      this.$router.push({ path: '/supermaket/supermarketlist', query: { totaltype: 2 } });
     },
     serviceDetail(id) {
-      // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
-      window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '');
+      this.$router.push({ path: '/supermaket/supermarketdetail', query: { totaltype: 2, id: id } });
     },
-
     fabu() {
-      // window.location.href = 'http://free.liaoningdoupo.com/platweb/enterprise/enterprisexuqiu';
-      window.open('http://free.liaoningdoupo.com/platweb/enterprise/enterprisexuqiu');
+      this.$router.push({ path: '/enterprise/enterprisexuqiu' });
     },
   },
 };

+ 69 - 0
src/views/personnel/list.vue

@@ -0,0 +1,69 @@
+<template>
+  <div id="policy">
+    <rencailist-detail
+      @handleCurrentChange="handleCurrentChange"
+      :contentList="contentList"
+      :total="total"
+      :columnName="columnName"
+      @fetch="fetchInfo"
+      :display="display"
+      :policyInfo="policyInfo"
+    ></rencailist-detail>
+  </div>
+</template>
+
+<script>
+import rencailistDetail from '@/components/personnel/rencailistDetail.vue';
+import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
+import _ from 'loadsh';
+const { mapActions: talentExperts } = createNamespacedHelpers('talentExperts');
+
+export default {
+  name: 'policy',
+  props: {},
+  components: {
+    rencailistDetail,
+  },
+  data: () => ({
+    policyInfo: {},
+    display: 'list',
+    columnName: '',
+    contentList: [],
+    total: 1,
+    skip: '',
+    tableData: {},
+  }),
+  async created() {
+    this.search();
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  methods: {
+    ...talentExperts({ list: 'query', fetch: 'fetch' }),
+
+    async search({ skip = 0, limit = 10 } = {}) {
+      skip = this.skip;
+      const res = await this.list({ skip, limit });
+      console.log(res.data);
+      console.log(res.data);
+      for (const val of res.data) {
+        if (val.totaltype == 0) {
+        }
+      }
+      this.$set(this, `contentList`, res.data);
+      this.$set(this, `total`, res.total);
+    },
+
+    async fetchInfo(id) {
+      this.$router.push({ path: '/personnel/rencai', query: { id: id } });
+    },
+    async handleCurrentChange({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 44 - 0
src/views/personnel/rencai.vue

@@ -0,0 +1,44 @@
+<template>
+  <div id="personnel">
+    <rencai-detail :policyInfo="policyInfo"></rencai-detail>
+  </div>
+</template>
+
+<script>
+import rencaiDetail from '@/components/personnel/rencai.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+
+const { mapActions: talentExperts } = createNamespacedHelpers('talentExperts');
+
+export default {
+  name: 'personnel',
+  props: {},
+  components: {
+    rencaiDetail,
+  },
+  data: () => ({
+    policyInfo: {},
+    info: {},
+  }),
+  async created() {
+    this.searchInfo();
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  methods: {
+    ...talentExperts({ newsList: 'query', newsInfo: 'fetch' }),
+
+    async searchInfo() {
+      let detailId = this.$route.query.id;
+      const res = await this.newsInfo(detailId);
+      this.$set(this, `policyInfo`, res.data);
+      console.log(res.data);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>