Просмотр исходного кода

Merge branch 'master' of http://git.cc-lotus.info/Free-cysci/cysci-website

lrf402788946 4 лет назад
Родитель
Сommit
31b6dc3ced

BIN
src/assets/kjpd.png


BIN
src/assets/train.png


+ 14 - 0
src/router/index.js

@@ -37,6 +37,13 @@ const web = [
         meta: { title: '科技服务' },
         component: () => import('../views/service/index.vue'),
       },
+      {
+        path: '/service/register',
+        name: 'service_register',
+        meta: { title: '用户注册' },
+        component: () => import('../views/service/register.vue'),
+      },
+
       {
         path: '/market/index',
         name: 'market_index',
@@ -70,6 +77,13 @@ const web = [
     meta: { title: '管理登录' },
     component: () => import('../views/login.vue'),
   },
+  // 宣传培训详情页
+  {
+    path: '/train/detail',
+    name: 'train_detail',
+    meta: { title: '宣传培训-详情页' },
+    component: () => import('../views/train/detail.vue'),
+  },
   {
     path: '/adminCenter/homeIndex',
     name: 'adminCenter',

+ 7 - 6
src/views/adminCenter/expert/detail.vue

@@ -33,18 +33,19 @@ export default {
       fields: [
         { label: '姓名', model: 'name', type: 'text' },
         { label: '电话号码', model: 'phone', options: { maxLength: 11 }, type: 'text' },
+        { label: '邮箱', model: 'email', type: 'text' },
         { label: '地址', model: 'addr', type: 'text' },
         { label: '办公电话', model: 'office_phone', type: 'text' },
         { label: '所属行业', model: 'profession', type: 'text' },
-        { label: '最高学历', model: 'education', type: 'text' },
-        { label: '毕业院校', model: 'school', type: 'text' },
-        { label: '出生日期', model: 'birthDate', type: 'date', type: 'text' },
+
+        { label: '头像图片', model: 'img_path', custom: true },
         { label: 'qq&微信', model: 'qqwx', type: 'text' },
-        { label: '邮箱', model: 'email', type: 'text' },
-        { label: '单位名称', model: 'company', type: 'text' },
+        { label: '出生日期', model: 'birthDate', type: 'date', type: 'text' },
+        { label: '毕业院校', model: 'school', type: 'text' },
+        { label: '最高学历', model: 'education', type: 'text' },
         { label: '职务职称', model: 'zwzc', type: 'text' },
         { label: '擅长领域', model: 'expertise', type: 'text' },
-        { label: '头像图片', model: 'img_path', custom: true },
+        { label: '工作单位', model: 'company', type: 'text' },
         { label: '工作经历', model: 'workexperience', type: 'textarea', options: { maxRows: 5, minRows: 3 }, type: 'text' },
         { label: '科研综述', model: 'scientific', type: 'textarea', options: { maxRows: 5, minRows: 3 }, type: 'text' },
         { label: '承担项目', model: 'undertakingproject', type: 'text' },

+ 179 - 49
src/views/market/detail-model/model-4.vue

@@ -6,30 +6,121 @@
           <slot></slot>
         </el-col>
         <el-col :span="24" class="info">
-          <el-col :span="24" class="title">
-            {{ data.title }}
-          </el-col>
-          <el-col :span="24" class="other">
-            <el-col :span="12" class="text">
-              信息来源:<span>{{ data.origin }}</span>
+          <el-col :span="24" class="top">
+            <el-col :span="7" class="left" v-if="data.image != ''">
+              <el-carousel trigger="click" height="305px" :autoplay="false">
+                <el-carousel-item v-for="(item, index) in data.image" :key="index">
+                  <el-image :src="item.url" style="width: 99%; height: 345px; border: 1px solid #ccc"></el-image>
+                </el-carousel-item>
+              </el-carousel>
             </el-col>
-            <el-col :span="12" class="text">
-              发布时间:<span>{{ data.release_time }}</span>
+            <el-col :span="7" v-else class="achieveImage">
+              <!-- <el-image :src="achievezb" style="height:305px;"></el-image>
+            <el-col :span="24" class="company textOver">
+              {{ data.company }}
+            </el-col>
+            <el-col :span="24" class="aName">
+              {{ data.name }}
+            </el-col>
+            <el-col :span="24" class="a-brief">{{ data.requirementdesc }}</el-col>
+            <el-col :span="24" class="cont">
+              <el-col :span="24" class="a-field">领域:{{ data.field }}</el-col>
+              <el-col :span="24" class="a-contacts">联系人:{{ data.contacts }}</el-col>
+            </el-col> -->
+              <p>紧急程度</p>
+              <p><el-rate v-model="value" disabled :max="max" :texts="texts" :colors="colors"> </el-rate></p>
+              <!-- <p>{{ data.degreeurgency || '暂无' }}</p> -->
+            </el-col>
+            <el-col :span="17" class="right">
+              <el-col :span="24" class="name textOver">
+                {{ data.name || '暂无' }}
+              </el-col>
+              <el-col :span="24">
+                <el-col :span="4" class="otherInfo textOver"> 需求方 </el-col>
+                <el-col :span="20" class="otherInfo textOver">
+                  {{ data.company }}
+                  <el-link v-if="data.companyweb != null || ''" :href="data.companyweb" :underline="false" target="_blank">({{ data.companyweb }})</el-link>
+                </el-col>
+              </el-col>
+              <el-col :span="12">
+                <el-col :span="8" class="otherInfo textOver"> 所属领域 </el-col>
+                <el-col :span="16" class="otherInfo textOver">
+                  {{ data.field || '暂无' }}
+                </el-col>
+              </el-col>
+              <el-col :span="12">
+                <el-col :span="8" class="otherInfo textOver"> 合作方式 </el-col>
+                <el-col :span="16" class="otherInfo textOver">
+                  {{ data.cooperation ? data.cooperation : '暂无' }}
+                </el-col>
+              </el-col>
+              <el-col :span="12">
+                <el-col :span="8" class="otherInfo textOver"> 紧急程度 </el-col>
+                <el-col :span="16" class="otherInfo textOver"> {{ data.demand || '暂无' }} </el-col>
+              </el-col>
+              <el-col :span="12">
+                <el-col :span="8" class="otherInfo textOver"> 投资预算 </el-col>
+                <el-col :span="16" class="otherInfo textOver"> {{ data.budget || '暂无' }} </el-col>
+              </el-col>
+              <el-col :span="12">
+                <el-col :span="8" class="otherInfo textOver"> 联系人 </el-col>
+                <el-col :span="16" class="otherInfo textOver">
+                  {{ data.contacts || '暂无' }}
+                </el-col>
+              </el-col>
+              <el-col :span="12">
+                <el-col :span="8" class="otherInfo textOver"> QQ/微信 </el-col>
+                <el-col :span="16" class="otherInfo textOver">
+                  {{ data.qqwx || '暂无' }}
+                </el-col>
+              </el-col>
+              <el-col :span="24">
+                <el-col :span="4" class="otherInfo textOver"> 联系电话 </el-col>
+                <el-col :span="20" class="otherInfo textOver">
+                  {{ getphone(data.phone) || '暂无' }}
+                </el-col>
+              </el-col>
+              <el-col :span="24">
+                <el-col :span="4" class="otherInfo textOver"> 电子邮箱 </el-col>
+                <el-col :span="20" class="otherInfo textOver">
+                  {{ data.email || '暂无' }}
+                </el-col>
+              </el-col>
             </el-col>
           </el-col>
-          <el-col :span="24" class="content">
-            <p v-html="data.content"></p>
-          </el-col>
-          <el-col :span="24" class="image" v-if="data.image">
-            <el-carousel height="300px" :interval="2000">
-              <el-carousel-item v-for="(tag, index) in data.image" :key="index">
-                <el-image :src="tag.url"></el-image>
-              </el-carousel-item>
-            </el-carousel>
-          </el-col>
-          <el-col :span="24" class="fileUrl" v-if="data.fileUrl && data.fileUrl.length > 0">
-            <p>附件:</p>
-            <el-link :href="data.fileUrl[0].url">{{ data.fileUrl[0].name }}</el-link>
+          <el-col :span="24" class="down">
+            <el-col :span="24" class="downInfo">
+              <el-col :span="4" class="tit">
+                <h2>需求说明</h2>
+              </el-col>
+              <el-col :span="20" class="info">
+                {{ data.requirementdesc || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="downInfo">
+              <el-col :span="4" class="tit">
+                <h2>预期目标</h2>
+              </el-col>
+              <el-col :span="20" class="info">
+                {{ data.expect || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="downInfo">
+              <el-col :span="4" class="tit">
+                <h2>需求现状</h2>
+              </el-col>
+              <el-col :span="20" class="info">
+                {{ data.present || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="downInfo">
+              <el-col :span="4" class="tit">
+                <h2>合作要求</h2>
+              </el-col>
+              <el-col :span="20" class="info">
+                {{ data.condition || '暂无' }}
+              </el-col>
+            </el-col>
           </el-col>
         </el-col>
       </el-col>
@@ -38,6 +129,7 @@
 </template>
 
 <script>
+const _ = require('lodash');
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'model-0',
@@ -46,10 +138,30 @@ export default {
   },
   components: {},
   data: function () {
-    return {};
+    return {
+      value: 1,
+      max: 3,
+      colors: ['#ff0000', '#ff0000', '#ff0000'],
+      texts: ['一般', '紧急', '长期'],
+    };
   },
   created() {},
-  methods: {},
+  methods: {
+    // 隐藏手机号
+    getphone(value) {
+      if (value == undefined) {
+        return '暂无';
+      } else {
+        if (value.length === 11) {
+          let start = value.slice(0, 4);
+          let end = value.slice(-3);
+          return `${start}****${end}`;
+        } else {
+          return value;
+        }
+      }
+    },
+  },
   computed: {
     ...mapState(['user']),
   },
@@ -73,40 +185,58 @@ export default {
     margin: 0 0 10px 0;
   }
   .info {
-    .title {
-      font-size: 18px;
-      text-align: center;
-      font-weight: bold;
-      margin: 0 0 15px 0;
+    .top {
+      height: 315px;
+      overflow: hidden;
+      .right {
+        padding: 0 0 0 10px;
+        .name {
+          font-size: 18px;
+          font-weight: bold;
+          padding: 10px;
+          border: 1px solid #ccc;
+          text-align: center;
+        }
+        .otherInfo {
+          padding: 10px;
+          font-size: 16px;
+          border: 1px solid #ccc;
+        }
+      }
     }
-    .other {
+    .down {
       margin: 0 0 15px 0;
-      .text {
-        font-size: 14px;
-        color: #666;
-        text-align: right;
-        padding: 0 10px;
-        span {
-          color: #000;
+      .downInfo {
+        border: 1px solid #ccc;
+        .tit {
+          height: 150px;
+          line-height: 150px;
+          text-align: center;
+          border-right: 1px solid #ccc;
+        }
+        .info {
+          font-size: 16px;
+          padding: 10px;
+          min-height: 150px;
         }
       }
-      .text:nth-child(2) {
+    }
+    .achieveImage {
+      height: 305px;
+      overflow: hidden;
+      p:nth-child(1) {
+        font-size: 25px;
         text-align: left;
+        padding: 10px 0;
       }
-    }
-    .content {
-      font-size: 16px;
-      text-indent: 2rem;
-      margin: 0 0 15px 0;
-    }
-    .image {
-      text-align: center;
-      padding: 0 26%;
-      .el-image {
-        width: 100%;
-        height: 100%;
+      p:nth-child(2) {
+        margin: 60px 0 0 0;
+        text-align: center;
       }
     }
   }
 }
+/deep/.el-rate__icon {
+  font-size: 60px;
+}
 </style>

+ 194 - 0
src/views/market/detail-model/model-5.vue

@@ -0,0 +1,194 @@
+<template>
+  <div id="model-0">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="btn">
+          <slot></slot>
+        </el-col>
+        <el-col :span="24" class="info">
+          <el-col :span="24" class="top">
+            <el-col :span="24" class="name">
+              <p class="textOver">{{ data.name || '暂无' }}</p>
+              <p>{{ getDate(data.meta.createdAt) }}</p>
+            </el-col>
+            <el-col :span="12">
+              <el-col :span="8" class="otherInfo textOver"> 需求程度 </el-col>
+              <el-col :span="16" class="otherInfo textOver">
+                {{ data.demand || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="12">
+              <el-col :span="8" class="otherInfo textOver"> 信息属性 </el-col>
+              <el-col :span="16" class="otherInfo textOver">
+                {{ data.messattribute || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="12">
+              <el-col :span="8" class="otherInfo textOver"> 联系人 </el-col>
+              <el-col :span="16" class="otherInfo textOver">
+                {{ data.contacts || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="12">
+              <el-col :span="8" class="otherInfo textOver"> QQ/微信 </el-col>
+              <el-col :span="16" class="otherInfo textOver">
+                {{ data.qqwx || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="12">
+              <el-col :span="8" class="otherInfo textOver"> 联系电话 </el-col>
+              <el-col :span="16" class="otherInfo textOver">
+                {{ getphone(data.phone) || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="12">
+              <el-col :span="8" class="otherInfo textOver"> 电子邮箱 </el-col>
+              <el-col :span="16" class="otherInfo textOver">
+                {{ data.email || '暂无' }}
+              </el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="down">
+            <el-col :span="24" class="downInfo">
+              <el-col :span="4" class="tit">
+                <h2>信息描述</h2>
+              </el-col>
+              <el-col :span="20" class="info">
+                {{ data.informationdesc || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="downInfo">
+              <el-col :span="4" class="tit">
+                <h2>核心要素</h2>
+              </el-col>
+              <el-col :span="20" class="info">
+                {{ data.coreelements || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="downInfo">
+              <el-col :span="4" class="tit">
+                <h2>价格信息</h2>
+              </el-col>
+              <el-col :span="20" class="info">
+                {{ data.priceinfo || '暂无' }}
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="downInfo">
+              <el-col :span="4" class="tit">
+                <h2>商务预期</h2>
+              </el-col>
+              <el-col :span="20" class="info">
+                {{ data.expect || '暂无' }}
+              </el-col>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+const moment = require('moment');
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'model-0',
+  props: {
+    data: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    // 隐藏手机号
+    getphone(value) {
+      if (value == undefined) {
+        return '暂无';
+      } else {
+        if (value.length === 11) {
+          let start = value.slice(0, 4);
+          let end = value.slice(-3);
+          return `${start}****${end}`;
+        } else {
+          return value;
+        }
+      }
+    },
+    getDate(date) {
+      let newDate = moment(date).format('YYYY-MM-DD');
+      if (newDate) return newDate;
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .btn {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+  .info {
+    .top {
+      height: 180px;
+      overflow: hidden;
+      margin: 0 0 15px 0;
+      .name {
+        padding: 5px 10px;
+        border: 1px solid #ccc;
+        text-align: center;
+        p:nth-child(1) {
+          font-size: 18px;
+          font-weight: bold;
+        }
+        p:nth-child(2) {
+          font-size: 12px;
+          padding: 5px 0 0 0;
+        }
+      }
+      .otherInfo {
+        font-size: 16px;
+        padding: 5px 10px;
+        height: 40px;
+        border: 1px solid #ccc;
+      }
+    }
+    .down {
+      margin: 0 0 15px 0;
+      .downInfo {
+        border: 1px solid #ccc;
+        .tit {
+          height: 150px;
+          line-height: 150px;
+          text-align: center;
+          border-right: 1px solid #ccc;
+        }
+        .info {
+          font-size: 16px;
+          padding: 10px;
+          min-height: 150px;
+        }
+        h2 {
+          margin: 0;
+        }
+      }
+    }
+  }
+}
+</style>

+ 8 - 3
src/views/market/list-model/model-4.vue

@@ -4,14 +4,14 @@
       <el-col :span="24" class="main">
         <el-col :span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="detail(item.id)">
           <el-col :span="24" class="title textOver">
-            {{ item.title }}
+            {{ item.name }}
           </el-col>
           <el-col :span="24" class="other">
             <el-col :span="12" class="text textOver">
-              信息来源:<span>{{ item.origin }}</span>
+              所属领域:<span>{{ item.field }}</span>
             </el-col>
             <el-col :span="12" class="text textOver">
-              发布时间:<span>{{ item.release_time }}</span>
+              发布时间:<span>{{ getDate(item.meta.createdAt) }}</span>
             </el-col>
           </el-col>
         </el-col>
@@ -21,6 +21,7 @@
 </template>
 
 <script>
+const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'model-4',
@@ -36,6 +37,10 @@ export default {
     detail(id) {
       this.$router.push({ path: './list', query: { index: this.index, id } });
     },
+    getDate(date) {
+      let newDate = moment(date).format('YYYY-MM-DD');
+      if (newDate) return newDate;
+    },
   },
   computed: {
     ...mapState(['user']),

+ 91 - 0
src/views/market/list-model/model-5.vue

@@ -0,0 +1,91 @@
+<template>
+  <div id="model-4">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="detail(item.id)">
+          <el-col :span="24" class="title textOver">
+            {{ item.name }}
+          </el-col>
+          <el-col :span="24" class="other">
+            <el-col :span="12" class="text textOver">
+              信息属性:<span>{{ item.messattribute }}</span>
+            </el-col>
+            <el-col :span="12" class="text textOver">
+              发布时间:<span>{{ getDate(item.meta.createdAt) }}</span>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const moment = require('moment');
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'model-4',
+  props: {
+    list: { type: Array, default: () => [] },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    detail(id) {
+      this.$router.push({ path: './list', query: { index: this.index, id } });
+    },
+    getDate(date) {
+      let newDate = moment(date).format('YYYY-MM-DD');
+      if (newDate) return newDate;
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    index() {
+      return parseInt(this.$route.query.index) || 0;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .list {
+    padding: 12px 10px;
+    border-bottom: 1px solid #ccc;
+    .title {
+      font-size: 16px;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      .text {
+        font-size: 14px;
+        color: #666;
+        span {
+          color: #000;
+        }
+      }
+    }
+  }
+  .list:hover {
+    cursor: pointer;
+    .title {
+      color: #409eff;
+      font-weight: bold;
+    }
+  }
+}
+</style>

+ 6 - 10
src/views/market/list/jxxq.vue

@@ -14,25 +14,22 @@
 <script>
 const _ = require('lodash');
 import listPage from '@c/list/list-page.vue';
-const { newsColumn } = require('@common/dict/index');
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: news } = createNamespacedHelpers('news');
+const { mapActions: product } = createNamespacedHelpers('product');
 export default {
   name: 'jxxq',
   props: ['listModel'],
   components: {
     listPage,
-    model2: () => import('../list-model/model-2.vue'),
-    dmodel: () => import('../detail-model/model-2.vue'),
+    model4: () => import('../list-model/model-4.vue'),
+    dmodel: () => import('../detail-model/model-4.vue'),
   },
   data: function () {
     return {
-      // 栏目
-      column: newsColumn,
       // 列表
       list: [],
       total: 0,
-      pageSize: 4,
+      pageSize: 7,
       // 详情
       detail: {},
     };
@@ -41,10 +38,9 @@ export default {
     this.search();
   },
   methods: {
-    ...news(['query', 'fetch']),
+    ...product(['query', 'fetch']),
     async search({ skip = 0, limit = this.pageSize, ...info } = {}) {
-      info.column_name = this.column[this.listModel];
-      let res = await this.query({ skip, limit, ...info });
+      let res = await this.query({ skip, limit, type: 0, ...info });
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
         this.$set(this, `total`, res.total);

+ 6 - 10
src/views/market/list/swfw.vue

@@ -14,25 +14,22 @@
 <script>
 const _ = require('lodash');
 import listPage from '@c/list/list-page.vue';
-const { newsColumn } = require('@common/dict/index');
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: news } = createNamespacedHelpers('news');
+const { mapActions: product } = createNamespacedHelpers('product');
 export default {
   name: 'swfw',
   props: ['listModel'],
   components: {
     listPage,
-    model2: () => import('../list-model/model-2.vue'),
-    dmodel: () => import('../detail-model/model-2.vue'),
+    model5: () => import('../list-model/model-5.vue'),
+    dmodel: () => import('../detail-model/model-5.vue'),
   },
   data: function () {
     return {
-      // 栏目
-      column: newsColumn,
       // 列表
       list: [],
       total: 0,
-      pageSize: 4,
+      pageSize: 7,
       // 详情
       detail: {},
     };
@@ -41,10 +38,9 @@ export default {
     this.search();
   },
   methods: {
-    ...news(['query', 'fetch']),
+    ...product(['query', 'fetch']),
     async search({ skip = 0, limit = this.pageSize, ...info } = {}) {
-      info.column_name = this.column[this.listModel];
-      let res = await this.query({ skip, limit, ...info });
+      let res = await this.query({ skip, limit, type: 2, ...info });
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
         this.$set(this, `total`, res.total);

+ 7 - 0
src/views/service/btnList.js

@@ -2,29 +2,36 @@ export const btnList = [
   {
     icon: 'iconkejixiangmu',
     name: '科技项目评审',
+    type: '1',
   },
   {
     icon: 'iconHNTE',
     name: '高企政策服务',
+    type: '2',
   },
   {
     icon: 'icontianchongxing-',
     name: '创新劵服务',
+    type: '3',
   },
   {
     icon: 'iconchengguo',
     name: '科技成果评价',
+    type: '4',
   },
   {
     icon: 'iconzj',
     name: '专家智库',
+    type: '5',
   },
   {
     icon: 'iconzhongguohangtiantubiaoheji-weizhuanlunkuo-',
     name: '企业管理',
+    type: '6',
   },
   {
     icon: 'iconjigouguanli',
     name: '机构管理',
+    type: '7',
   },
 ];

+ 20 - 2
src/views/service/index.vue

@@ -4,7 +4,7 @@
       <el-col :span="24" class="main">
         <div class="w_1200">
           <el-col :span="24" class="one">
-            <el-col :span="6" class="list" v-for="(item, index) in list" :key="index">
+            <el-col :span="6" class="list" v-for="(item, index) in list" :key="index" @click.native="link(item.type)">
               <el-col :span="24" class="name">
                 <i class="iconfont" :class="item.icon"></i>
                 <p>{{ item.name }}</p>
@@ -39,7 +39,25 @@ export default {
     };
   },
   created() {},
-  methods: {},
+  methods: {
+    link(type) {
+      if (type == '1') {
+        console.log('1');
+      } else if (type == '2') {
+        console.log('2');
+      } else if (type == '3') {
+        console.log('3');
+      } else if (type == '4') {
+        console.log('4');
+      } else if (type == '5') {
+        this.$router.push({ path: '/service/register', query: { type: type } });
+      } else if (type == '6') {
+        this.$router.push({ path: '/service/register', query: { type: type } });
+      } else if (type == '7') {
+        this.$router.push({ path: '/service/register', query: { type: type } });
+      }
+    },
+  },
   computed: {
     ...mapState(['user']),
   },

+ 88 - 0
src/views/service/register.vue

@@ -0,0 +1,88 @@
+<template>
+  <div id="register">
+    <el-row>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="24" class="one">
+            <el-col :span="24" class="btn">
+              <el-button type="primary" size="mini" @click="back">返回</el-button>
+            </el-col>
+            <el-col :span="24" class="text">环南湖科创先导区双创服务平台-{{ type == '5' ? '专家' : type == '6' ? '企业' : '机构' }}账号注册</el-col>
+            <el-col :span="24" class="dwon">
+              <expert v-if="type == '5'"></expert>
+              <company v-else-if="type == '6'"></company>
+              <mechanism v-else-if="type == '7'"></mechanism>
+            </el-col>
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import expert from './register/expert.vue';
+import company from './register/company.vue';
+import mechanism from './register/mechanism.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'register',
+  props: {},
+  components: { expert, company, mechanism },
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    back() {
+      this.$router.push({ path: '/service/index' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    type() {
+      return this.$route.query.type;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  min-height: 500px;
+  margin: 10px 0;
+  .one {
+    min-height: 500px;
+    border-radius: 5px;
+    border: 1px solid #ccc;
+    .btn {
+      padding: 10px;
+      text-align: right;
+    }
+    .text {
+      font-size: 30px;
+      text-align: center;
+    }
+    .dwon {
+      padding: 0 10px;
+      .title {
+        font-size: 16px;
+        font-weight: bold;
+        border-bottom: 1px dashed #ccc;
+        padding: 10px 0;
+        margin: 0 0 10px 0;
+      }
+    }
+  }
+}
+</style>

+ 188 - 0
src/views/service/register/company.vue

@@ -0,0 +1,188 @@
+<template>
+  <div id="company">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+            <el-col :span="24" class="title"> 基本信息 </el-col>
+            <el-col :span="24" class="info">
+              <el-form-item label="企业名称" prop="name">
+                <el-input v-model="form.name" placeholder="请输入企业名称"></el-input>
+              </el-form-item>
+              <el-form-item label="机构代码" prop="institution_code">
+                <el-input v-model="form.institution_code" placeholder="请输入机构代码"></el-input>
+              </el-form-item>
+              <el-form-item label="手机号" prop="phone">
+                <el-input v-model="form.phone" placeholder="请输入手机号"></el-input>
+              </el-form-item>
+              <el-form-item label="登录密码" prop="passwd">
+                <el-input v-model="form.passwd" placeholder="请输入登录密码" show-password></el-input>
+              </el-form-item>
+              <el-form-item label="电子邮箱" prop="email">
+                <el-input v-model="form.email" placeholder="请输入电子邮箱"></el-input>
+              </el-form-item>
+              <el-form-item label="联系地址" prop="addr">
+                <el-input v-model="form.addr" placeholder="请输入联系地址"></el-input>
+              </el-form-item>
+              <el-form-item label="办公电话" prop="office_phone">
+                <el-input v-model="form.office_phone" placeholder="请输入办公电话"></el-input>
+              </el-form-item>
+              <el-form-item label="所属行业" prop="profession">
+                <el-input v-model="form.profession" placeholder="请输入所属行业"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="title"> 详细信息 </el-col>
+            <el-col :span="24" class="info">
+              <el-form-item label="注册类型" prop="companytype">
+                <el-input v-model="form.companytype" placeholder="请输入注册类型"></el-input>
+              </el-form-item>
+              <el-form-item label="注册时间" prop="companydate">
+                <el-date-picker v-model="form.companydate" placeholder="请选择" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date"> </el-date-picker>
+              </el-form-item>
+              <el-form-item label="注册资金" prop="companycapital">
+                <el-input v-model="form.companycapital" placeholder="请输入注册资金"></el-input>
+              </el-form-item>
+              <el-form-item label="企业法人" prop="companyperson">
+                <el-input v-model="form.companyperson" placeholder="请输入企业法人"></el-input>
+              </el-form-item>
+              <el-form-item label="企业总收入" prop="sndqyzsr">
+                <el-input v-model="form.sndqyzsr" placeholder="请输入上年度企业总收入"></el-input>
+              </el-form-item>
+              <el-form-item label="研发费用" prop="sndyffy">
+                <el-input v-model="form.sndyffy" placeholder="请输入上年度研发费用"></el-input>
+              </el-form-item>
+              <el-form-item label="企业总人数" prop="companytotal">
+                <el-input v-model="form.companytotal" placeholder="请输入企业总人数"></el-input>
+              </el-form-item>
+              <el-form-item label="研发人数" prop="zjzyfrs">
+                <el-input v-model="form.zjzyfrs" placeholder="请输入专&兼职研发人数"></el-input>
+              </el-form-item>
+              <el-form-item label="企业简介" prop="companybrief">
+                <el-input
+                  v-model="form.companybrief"
+                  placeholder="请输入企业简介"
+                  type="textarea"
+                  maxlength="300"
+                  :autosize="{ minRows: 4, maxRows: 6 }"
+                  show-word-limit
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="主要产品" prop="mainproduct">
+                <el-input
+                  v-model="form.mainproduct"
+                  placeholder="请输入主要产品"
+                  type="textarea"
+                  maxlength="300"
+                  :autosize="{ minRows: 4, maxRows: 6 }"
+                  show-word-limit
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="资质&荣誉" prop="qualifications">
+                <el-input
+                  v-model="form.qualifications"
+                  placeholder="请输入企业资质&荣誉"
+                  type="textarea"
+                  maxlength="300"
+                  :autosize="{ minRows: 4, maxRows: 6 }"
+                  show-word-limit
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="btn">
+              <el-button type="primary" size="mini">取消注册</el-button>
+              <el-button type="primary" size="mini" @click="onSubmit('form')">提交注册</el-button>
+            </el-col>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: organization } = createNamespacedHelpers('organization');
+export default {
+  name: 'company',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {},
+      rules: {
+        name: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
+        phone: [
+          { required: true, message: '请输入手机号', trigger: 'blur' },
+          { max: 11, message: '不得超过11' },
+        ],
+        passwd: [{ required: true, message: '请输入登录密码', trigger: 'blur' }],
+        email: [{ required: true, message: '请输入电子邮箱', trigger: 'blur' }],
+        addr: [{ required: true, message: '请输入联系地址', trigger: 'blur' }],
+        office_phone: [{ required: true, message: '请输入办公电话', trigger: 'blur' }],
+        profession: [{ required: true, message: '请输入所属行业', trigger: 'blur' }],
+        institution_code: [{ required: true, message: '请输入机构代码', trigger: 'blur' }],
+      },
+    };
+  },
+  created() {},
+  methods: {
+    ...organization(['create']),
+    onSubmit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          let data = this.form;
+          data.status = '0';
+          let res = await this.create(data);
+          if (this.$checkRes(res)) {
+            this.$message({
+              message: '账号注册成功',
+              type: 'success',
+            });
+            this.$router.push({ path: '/service/index' });
+          }
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    .title {
+      font-size: 16px;
+      font-weight: bold;
+      border-bottom: 1px dashed #ccc;
+      padding: 0 0 10px 0;
+      margin: 0 0 10px 0;
+    }
+    .info {
+      border: 1px solid #ccc;
+      border-radius: 5px;
+      padding: 10px;
+      margin: 0 0 10px 0;
+    }
+    .btn {
+      text-align: center;
+      margin: 0 0 10px 0;
+    }
+  }
+}
+</style>

+ 207 - 0
src/views/service/register/expert.vue

@@ -0,0 +1,207 @@
+<template>
+  <div id="expert">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+            <el-col :span="24" class="title"> 基本信息 </el-col>
+            <el-col :span="24" class="info">
+              <el-form-item label="姓名" prop="name">
+                <el-input v-model="form.name" placeholder="请输入姓名"></el-input>
+              </el-form-item>
+              <el-form-item label="手机号" prop="phone">
+                <el-input v-model="form.phone" placeholder="请输入手机号"></el-input>
+              </el-form-item>
+              <el-form-item label="登录密码" prop="passwd">
+                <el-input v-model="form.passwd" placeholder="请输入登录密码" show-password></el-input>
+              </el-form-item>
+              <el-form-item label="电子邮箱" prop="email">
+                <el-input v-model="form.email" placeholder="请输入电子邮箱"></el-input>
+              </el-form-item>
+              <el-form-item label="联系地址" prop="addr">
+                <el-input v-model="form.addr" placeholder="请输入联系地址"></el-input>
+              </el-form-item>
+              <el-form-item label="办公电话" prop="office_phone">
+                <el-input v-model="form.office_phone" placeholder="请输入办公电话"></el-input>
+              </el-form-item>
+              <el-form-item label="所属行业" prop="profession">
+                <el-input v-model="form.profession" placeholder="请输入所属行业"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="title"> 详细信息 </el-col>
+            <el-col :span="24" class="info">
+              <el-form-item label="头像图片" prop="img_path">
+                <e-upload url="/files/cysci/expert_imgpath/upload" :limit="1" v-model="form.image"></e-upload>
+              </el-form-item>
+              <el-form-item label="qq&微信" prop="qqwx">
+                <el-input v-model="form.qqwx" placeholder="请输入qq&微信"></el-input>
+              </el-form-item>
+              <el-form-item label="出生日期" prop="birthDate">
+                <el-date-picker v-model="form.birthDate" placeholder="请选择" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date"> </el-date-picker>
+              </el-form-item>
+              <el-form-item label="毕业院校" prop="school">
+                <el-input v-model="form.school" placeholder="请输入毕业院校"></el-input>
+              </el-form-item>
+              <el-form-item label="最高学历" prop="education">
+                <el-input v-model="form.education" placeholder="请输入最高学历"></el-input>
+              </el-form-item>
+              <el-form-item label="职务职称" prop="zwzc">
+                <el-input v-model="form.zwzc" placeholder="请输入职务职称"></el-input>
+              </el-form-item>
+              <el-form-item label="擅长领域" prop="expertise">
+                <el-input v-model="form.expertise" placeholder="请输入擅长领域"></el-input>
+              </el-form-item>
+              <el-form-item label="工作单位" prop="company">
+                <el-input v-model="form.company" placeholder="请输入工作单位"></el-input>
+              </el-form-item>
+              <el-form-item label="工作经历" prop="workexperience">
+                <el-input
+                  v-model="form.workexperience"
+                  placeholder="请输入工作经历"
+                  type="textarea"
+                  maxlength="300"
+                  :autosize="{ minRows: 4, maxRows: 6 }"
+                  show-word-limit
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="科研综述" prop="scientific">
+                <el-input
+                  v-model="form.scientific"
+                  placeholder="请输入科研综述"
+                  type="textarea"
+                  maxlength="300"
+                  :autosize="{ minRows: 4, maxRows: 6 }"
+                  show-word-limit
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="承担项目" prop="undertakingproject">
+                <el-input
+                  v-model="form.undertakingproject"
+                  placeholder="请输入承担项目"
+                  type="textarea"
+                  maxlength="300"
+                  :autosize="{ minRows: 4, maxRows: 6 }"
+                  show-word-limit
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="科技奖励" prop="scienceaward">
+                <el-input
+                  v-model="form.scienceaward"
+                  placeholder="请输入科技奖励"
+                  type="textarea"
+                  maxlength="300"
+                  :autosize="{ minRows: 4, maxRows: 6 }"
+                  show-word-limit
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="社会任职" prop="social">
+                <el-input
+                  v-model="form.social"
+                  placeholder="请输入社会任职"
+                  type="textarea"
+                  maxlength="300"
+                  :autosize="{ minRows: 4, maxRows: 6 }"
+                  show-word-limit
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" class="btn">
+              <el-button type="primary" size="mini">取消注册</el-button>
+              <el-button type="primary" size="mini" @click="onSubmit('form')">提交注册</el-button>
+            </el-col>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mapExpert } = createNamespacedHelpers('expert');
+export default {
+  name: 'expert',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {
+        image: [],
+        status: '0',
+      },
+      rules: {
+        name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
+        phone: [
+          { required: true, message: '请输入手机号', trigger: 'blur' },
+          { max: 11, message: '不得超过11' },
+        ],
+        passwd: [{ required: true, message: '请输入登录密码', trigger: 'blur' }],
+        email: [{ required: true, message: '请输入电子邮箱', trigger: 'blur' }],
+        addr: [{ required: true, message: '请输入联系地址', trigger: 'blur' }],
+        office_phone: [{ required: true, message: '请输入办公电话', trigger: 'blur' }],
+        profession: [{ required: true, message: '请输入所属行业', trigger: 'blur' }],
+      },
+    };
+  },
+  created() {},
+  methods: {
+    ...mapExpert(['create']),
+    onSubmit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          let data = this.form;
+          data.status = '0';
+          let res = await this.create(data);
+          if (this.$checkRes(res)) {
+            this.$message({
+              message: '账号注册成功',
+              type: 'success',
+            });
+            this.$router.push({ path: '/service/index' });
+          }
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    .title {
+      font-size: 16px;
+      font-weight: bold;
+      border-bottom: 1px dashed #ccc;
+      padding: 0 0 10px 0;
+      margin: 0 0 10px 0;
+    }
+    .info {
+      border: 1px solid #ccc;
+      border-radius: 5px;
+      padding: 10px;
+      margin: 0 0 10px 0;
+    }
+    .btn {
+      text-align: center;
+      margin: 0 0 10px 0;
+    }
+  }
+}
+</style>

+ 130 - 0
src/views/service/register/mechanism.vue

@@ -0,0 +1,130 @@
+<template>
+  <div id="company">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+            <el-col :span="24" class="title"> 基本信息 </el-col>
+            <el-col :span="24" class="info">
+              <el-form-item label="机构名称" prop="name">
+                <el-input v-model="form.name" placeholder="请输入机构名称"></el-input>
+              </el-form-item>
+              <el-form-item label="联系人" prop="contacts">
+                <el-input v-model="form.contacts" placeholder="请输入联系人"></el-input>
+              </el-form-item>
+              <el-form-item label="联系电话" prop="phone">
+                <el-input v-model="form.phone" placeholder="请输入联系电话"></el-input>
+              </el-form-item>
+              <el-form-item label="登录密码" prop="passwd">
+                <el-input v-model="form.passwd" placeholder="请输入登录密码" show-password></el-input>
+              </el-form-item>
+              <el-form-item label="电子邮箱" prop="email">
+                <el-input v-model="form.email" placeholder="请输入电子邮箱"></el-input>
+              </el-form-item>
+              <el-form-item label="联系地址" prop="address">
+                <el-input v-model="form.address" placeholder="请输入联系地址"></el-input>
+              </el-form-item>
+              <el-form-item label="所属行业" prop="profession">
+                <el-input v-model="form.profession" placeholder="请输入所属行业"></el-input>
+              </el-form-item>
+            </el-col>
+            <!-- <el-col :span="24" class="title"> 详细信息 </el-col>
+            <el-col :span="24" class="info"> 111 </el-col> -->
+            <el-col :span="24" class="btn">
+              <el-button type="primary" size="mini">取消注册</el-button>
+              <el-button type="primary" size="mini" @click="onSubmit('form')">提交注册</el-button>
+            </el-col>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mapMechanism } = createNamespacedHelpers('mechanism');
+export default {
+  name: 'company',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {},
+      rules: {
+        name: [{ required: true, message: '请输入机构名称', trigger: 'blur' }],
+        contacts: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
+        phone: [
+          { required: true, message: '请输入手机号', trigger: 'blur' },
+          { max: 11, message: '不得超过11' },
+        ],
+        passwd: [{ required: true, message: '请输入登录密码', trigger: 'blur' }],
+        email: [{ required: true, message: '请输入电子邮箱', trigger: 'blur' }],
+        address: [{ required: true, message: '请输入联系地址', trigger: 'blur' }],
+        profession: [{ required: true, message: '请输入所属行业', trigger: 'blur' }],
+      },
+    };
+  },
+  created() {},
+  methods: {
+    ...mapMechanism(['create']),
+    onSubmit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          let data = this.form;
+          data.status = '0';
+          console.log(data);
+          let res = await this.create(data);
+          if (this.$checkRes(res)) {
+            this.$message({
+              message: '账号注册成功',
+              type: 'success',
+            });
+            this.$router.push({ path: '/service/index' });
+          }
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    .title {
+      font-size: 16px;
+      font-weight: bold;
+      border-bottom: 1px dashed #ccc;
+      padding: 0 0 10px 0;
+      margin: 0 0 10px 0;
+    }
+    .info {
+      border: 1px solid #ccc;
+      border-radius: 5px;
+      padding: 10px;
+      margin: 0 0 10px 0;
+    }
+    .btn {
+      text-align: center;
+      margin: 0 0 10px 0;
+    }
+  }
+}
+</style>

+ 246 - 0
src/views/train/detail.vue

@@ -0,0 +1,246 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="24" class="top"> 宣传培训-{{ column_name }} </el-col>
+          <el-col :span="24" class="info">
+            <el-col :span="24" class="one">
+              <el-button type="primary" size="mini" @click="$router.push({ path: '/train/index' })">返回</el-button>
+            </el-col>
+            <el-col :span="24" class="two">
+              <el-col :span="24" class="title">
+                {{ info.title }}
+              </el-col>
+              <el-col :span="24" class="twoVideo">
+                <el-col :span="18" class="left">
+                  <video :src="video_url" controls="" controlsList="nodownload">您的浏览器不支持 video 标签。</video>
+                </el-col>
+                <el-col :span="6" class="right">
+                  <h1>视频列表</h1>
+                  <el-col :span="24" class="list">
+                    <el-col :span="24" class="videoList" v-for="(item, index) in videoList" :key="index" @click.native="show(item, index)">
+                      <el-col :span="12" class="file">
+                        <video :src="item.url" controlsList="nodownload" :poster="posterUrl">您的浏览器不支持 video 标签。</video>
+                      </el-col>
+                      <el-col :span="12" class="videoInfo">
+                        <p :style="`color:${menuIndex == index ? menuColor : ''}`">{{ item.name }}</p>
+                      </el-col>
+                    </el-col>
+                  </el-col>
+                </el-col>
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="thr">
+              <el-tabs type="border-card">
+                <el-tab-pane label="视频简介">
+                  <p class="textOver"><span>举办方:</span>{{ info.organizers || '暂无' }}</p>
+                  <p class="textOver"><span>举办城市:</span>{{ info.province || '暂无' }}-{{ info.city || '暂无' }}</p>
+                  <p class="textOver"><span>培训时间:</span>{{ info.start_time || '暂无' }}-{{ info.end_time || '暂无' }}</p>
+                  <p><span>视频简介:</span>{{ info.brief || '暂无' }}</p>
+                </el-tab-pane>
+              </el-tabs>
+            </el-col>
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: online } = createNamespacedHelpers('online');
+const { mapActions: code } = createNamespacedHelpers('code');
+var moment = require('moment');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      info: {},
+      // 视频
+      video_url: '',
+      videoList: [],
+      menuIndex: '',
+      menuColor: 'rgb(64,158,255)',
+      posterUrl: require('@a/train.png'),
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...online(['fetch']),
+    ...code(['xzqh']),
+    async search() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `videoList`, res.data.video);
+        this.$set(this, `info`, res.data);
+      }
+    },
+    // 查询省市
+    async searchXzqh(data) {
+      if (data.province) {
+        const res = await this.xzqh();
+        if (this.$checkRes(res)) {
+          data.province = res.data.find((i) => i.code == data.province).name;
+        }
+      }
+      if (data.city) {
+        const res = await this.xzqh({ code: data.city });
+        if (this.$checkRes(res)) {
+          data.city = res.data.find((i) => i.code == data.city).name;
+        }
+      }
+    },
+    show(data, index) {
+      if (data) {
+        this.menuIndex = index;
+        this.$set(this, `video_url`, data.url);
+      }
+    },
+    searchvideo() {
+      this.show(this.videoList[0], '0');
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+    column_name() {
+      return this.$route.query.column_name;
+    },
+  },
+  watch: {
+    videoList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val) {
+          this.searchvideo();
+        }
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  background: url('~@a/kjpd.png');
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  height: 100%;
+  .top {
+    font-size: 50px;
+    color: #ffffff;
+    font-family: '楷体';
+    height: 130px;
+    line-height: 130px;
+  }
+  .info {
+    min-height: 800px;
+    background: #ffffff5f;
+    border-radius: 10px;
+    padding: 20px;
+    .one {
+      text-align: right;
+      margin: 0 0 10px 0;
+    }
+    .two {
+      margin: 0 0 10px 0;
+      .title {
+        font-size: 35px;
+        font-weight: bold;
+        text-align: center;
+        font-family: cursive;
+        margin: 0 0 10px 0;
+      }
+      .twoVideo {
+        height: 430px;
+        background: #000;
+        .left {
+          video {
+            width: 100%;
+            height: 430px;
+          }
+        }
+        .right {
+          height: 430px;
+          background: #000;
+          h1 {
+            height: 40px;
+            line-height: 40px;
+            text-align: center;
+            color: #fff;
+            font-size: 16px;
+            background: #409eff;
+            margin: 0;
+          }
+          .list {
+            height: 390px;
+            overflow: auto;
+            padding: 0px 10px;
+            .videoList {
+              border-radius: 10px;
+              border: 1px solid #fff;
+              color: #fff;
+              margin: 10px 0 0 0;
+              height: 120px;
+              .file {
+                video {
+                  width: 100%;
+                  height: 117px;
+                  overflow: hidden;
+                }
+              }
+              .videoInfo {
+                padding: 10px 5px;
+                p {
+                  font-size: 12px;
+                  margin: 0 0 5px 0;
+                }
+                p:nth-child(1) {
+                  font-size: 16px;
+                  overflow: hidden;
+                  text-overflow: ellipsis;
+                  -webkit-line-clamp: 2;
+                  word-break: break-all;
+                  display: -webkit-box;
+                  -webkit-box-orient: vertical;
+                }
+              }
+            }
+            .videoList:hover {
+              cursor: pointer;
+              .videoInfo {
+                p:nth-child(1) {
+                  color: #409eff;
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    .thr {
+      /deep/.el-tabs--border-card {
+        background: transparent;
+      }
+      p {
+        border-bottom: 1px dashed #ccc;
+        color: #000000;
+        font-weight: bold;
+        padding: 10px 0;
+      }
+    }
+  }
+}
+</style>

+ 157 - 0
src/views/train/index copy.vue

@@ -0,0 +1,157 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="24" class="common">
+            <el-col :span="8" class="one">
+              <el-col :span="24" class="image">
+                <el-image :src="xspxUrl"></el-image>
+              </el-col>
+              <el-col :span="24" class="info">
+                <p>线上培训</p>
+                <p>举办地点:<span>吉林省长春市</span></p>
+                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
+              </el-col>
+              <el-col :span="24" class="btn">
+                <el-button type="primary" size="mini">进人展会</el-button>
+              </el-col>
+            </el-col>
+            <el-col :span="8" class="one">
+              <el-col :span="24" class="image">
+                <el-image :src="xpfbUrl"></el-image>
+              </el-col>
+              <el-col :span="24" class="info">
+                <p>线上新品发布</p>
+                <p>举办地点:<span>吉林省长春市</span></p>
+                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
+              </el-col>
+              <el-col :span="24" class="btn">
+                <el-button type="primary" size="mini">进人展会</el-button>
+              </el-col>
+            </el-col>
+            <el-col :span="8" class="one">
+              <el-col :span="24" class="image">
+                <el-image :src="xszhUrl"></el-image>
+              </el-col>
+              <el-col :span="24" class="info">
+                <p>线上展会</p>
+                <p>举办地点:<span>吉林省长春市</span></p>
+                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
+              </el-col>
+              <el-col :span="24" class="btn">
+                <el-button type="primary" size="mini">进人展会</el-button>
+              </el-col>
+            </el-col>
+            <el-col :span="8" class="one">
+              <el-col :span="24" class="image">
+                <el-image :src="kjcpUrl"></el-image>
+              </el-col>
+              <el-col :span="24" class="info">
+                <p>线上科技产品宣传</p>
+                <p>举办地点:<span>吉林省长春市</span></p>
+                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
+              </el-col>
+              <el-col :span="24" class="btn">
+                <el-button type="primary" size="mini">进人展会</el-button>
+              </el-col>
+            </el-col>
+            <el-col :span="8" class="one">
+              <el-col :span="24" class="image">
+                <el-image :src="kpjyUrl"></el-image>
+              </el-col>
+              <el-col :span="24" class="info">
+                <p>线上科普教育</p>
+                <p>举办地点:<span>吉林省长春市</span></p>
+                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
+              </el-col>
+              <el-col :span="24" class="btn">
+                <el-button type="primary" size="mini">进人展会</el-button>
+              </el-col>
+            </el-col>
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      xspxUrl: require('@a/xspx.jpg'),
+      xpfbUrl: require('@a/xpfb.jpg'),
+      xszhUrl: require('@a/xszh.jpg'),
+      kjcpUrl: require('@a/kjcp.jpg'),
+      kpjyUrl: require('@a/kpjy.jpg'),
+    };
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  min-height: 500px;
+  margin: 10px 0 0 0;
+  .common {
+    .one {
+      width: 32.7%;
+      height: 370px;
+      box-shadow: 0 0 5px #ccc;
+      border-radius: 5px;
+      margin: 0 10px 10px 0;
+      .image {
+        /deep/.el-image__inner {
+          width: 100%;
+          height: 225px;
+          border-top-left-radius: 5px;
+          border-top-right-radius: 5px;
+        }
+      }
+      .info {
+        padding: 0 10px;
+        p {
+          font-size: 14px;
+          margin: 0 0 8px 0;
+        }
+        p:nth-child(1) {
+          font-size: 16px;
+          font-weight: bold;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          -webkit-line-clamp: 2;
+          word-break: break-all;
+          display: -webkit-box;
+          -webkit-box-orient: vertical;
+        }
+      }
+      .btn {
+        text-align: center;
+      }
+    }
+    .one:nth-child(3n) {
+      margin: 0 0 10px 0;
+    }
+  }
+}
+</style>

+ 53 - 65
src/views/train/index.vue

@@ -4,69 +4,21 @@
       <el-col :span="24" class="main">
         <div class="w_1200">
           <el-col :span="24" class="common">
-            <el-col :span="8" class="one">
+            <el-col :span="8" class="one" v-for="(item, index) in list" :key="index">
               <el-col :span="24" class="image">
-                <el-image :src="xspxUrl"></el-image>
+                <el-image :src="getImage(item.image)"></el-image>
               </el-col>
               <el-col :span="24" class="info">
-                <p>线上培训</p>
-                <p>举办地点:<span>吉林省长春市</span></p>
-                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
+                <p>{{ item.title }}</p>
+                <p>
+                  举办地点:<span>{{ item.province }}-{{ item.city }}</span>
+                </p>
+                <p>
+                  举办时间:<span>{{ item.start_time }}-{{ item.end_time }}</span>
+                </p>
               </el-col>
               <el-col :span="24" class="btn">
-                <el-button type="primary" size="mini">进人展会</el-button>
-              </el-col>
-            </el-col>
-            <el-col :span="8" class="one">
-              <el-col :span="24" class="image">
-                <el-image :src="xpfbUrl"></el-image>
-              </el-col>
-              <el-col :span="24" class="info">
-                <p>线上新品发布</p>
-                <p>举办地点:<span>吉林省长春市</span></p>
-                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
-              </el-col>
-              <el-col :span="24" class="btn">
-                <el-button type="primary" size="mini">进人展会</el-button>
-              </el-col>
-            </el-col>
-            <el-col :span="8" class="one">
-              <el-col :span="24" class="image">
-                <el-image :src="xszhUrl"></el-image>
-              </el-col>
-              <el-col :span="24" class="info">
-                <p>线上展会</p>
-                <p>举办地点:<span>吉林省长春市</span></p>
-                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
-              </el-col>
-              <el-col :span="24" class="btn">
-                <el-button type="primary" size="mini">进人展会</el-button>
-              </el-col>
-            </el-col>
-            <el-col :span="8" class="one">
-              <el-col :span="24" class="image">
-                <el-image :src="kjcpUrl"></el-image>
-              </el-col>
-              <el-col :span="24" class="info">
-                <p>线上科技产品宣传</p>
-                <p>举办地点:<span>吉林省长春市</span></p>
-                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
-              </el-col>
-              <el-col :span="24" class="btn">
-                <el-button type="primary" size="mini">进人展会</el-button>
-              </el-col>
-            </el-col>
-            <el-col :span="8" class="one">
-              <el-col :span="24" class="image">
-                <el-image :src="kpjyUrl"></el-image>
-              </el-col>
-              <el-col :span="24" class="info">
-                <p>线上科普教育</p>
-                <p>举办地点:<span>吉林省长春市</span></p>
-                <p>举办时间:<span>2021-04-19 10:00:00-2021-04-19 10:00:00</span></p>
-              </el-col>
-              <el-col :span="24" class="btn">
-                <el-button type="primary" size="mini">进人展会</el-button>
+                <el-button type="primary" size="mini" @click="detail(item)">进人展会</el-button>
               </el-col>
             </el-col>
           </el-col>
@@ -77,22 +29,58 @@
 </template>
 
 <script>
+const _ = require('lodash');
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: online } = createNamespacedHelpers('online');
+const { mapActions: code } = createNamespacedHelpers('code');
 export default {
   name: 'index',
   props: {},
   components: {},
   data: function () {
     return {
-      xspxUrl: require('@a/xspx.jpg'),
-      xpfbUrl: require('@a/xpfb.jpg'),
-      xszhUrl: require('@a/xszh.jpg'),
-      kjcpUrl: require('@a/kjcp.jpg'),
-      kpjyUrl: require('@a/kpjy.jpg'),
+      list: [],
     };
   },
-  created() {},
-  methods: {},
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...online(['query']),
+    ...code(['xzqh']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        for (const val of res.data) this.searchXzqh(val);
+        this.$set(this, `list`, res.data);
+      }
+    },
+    // 切换图片
+    getImage(data) {
+      if (_.map(data, 'url')[0]) {
+        return _.map(data, 'url')[0];
+      }
+    },
+    // 查询省市
+    async searchXzqh(data) {
+      if (data.province) {
+        const res = await this.xzqh();
+        if (this.$checkRes(res)) {
+          data.province = res.data.find((i) => i.code == data.province).name;
+        }
+      }
+      if (data.city) {
+        const res = await this.xzqh({ code: data.city });
+        if (this.$checkRes(res)) {
+          data.city = res.data.find((i) => i.code == data.city).name;
+        }
+      }
+    },
+    // 进入展会
+    detail(data) {
+      this.$router.push({ path: '/train/detail', query: { id: data.id, column_name: data.column_name } });
+    },
+  },
   computed: {
     ...mapState(['user']),
   },