guhongwei 3 years ago
parent
commit
adc5059bfb

+ 77 - 6
src/views/achieveLive/expert/index.vue

@@ -2,25 +2,69 @@
   <div id="index">
     <el-row>
       <el-col :span="24" class="main">
-        专家列表
+        <el-col :span="24" class="one">
+          <el-col :span="12" class="left">
+            <span>专家总数:{{ total }}人</span>
+          </el-col>
+          <el-col :span="12" class="right">
+            <el-button type="primary" size="mini" @click="back">返回活动首页</el-button>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="two">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @check="toCheck"></data-table>
+        </el-col>
       </el-col>
     </el-row>
   </div>
 </template>
 
 <script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: expert } = createNamespacedHelpers('expert');
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: { dataTable },
   data: function() {
-    return {};
+    return {
+      opera: [{ label: '对接', method: 'check' }],
+      fields: [
+        { label: '姓名', prop: 'name' },
+        { label: 'QQ微信', prop: 'qqwx' },
+        { label: '电子邮箱', prop: 'email' },
+        { label: '文化程度', prop: 'education' },
+        { label: '毕业院校', prop: 'school' },
+        { label: '工作单位', prop: 'company' },
+        { label: '职务职称', prop: 'zwzc' },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  created() {
+    if (this.dock_id) this.search();
+  },
+  methods: {
+    ...expert(['query']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 对接
+    toCheck({ data }) {},
+    back() {
+      this.$router.push({ path: '/achieveLive/detail', query: { dock_id: this.dock_id } });
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
+    dock_id() {
+      return this.$route.query.dock_id;
+    },
   },
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -35,4 +79,31 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.main {
+  min-height: 505px;
+  box-shadow: 0 0 5px #ccc;
+  background-color: #fff;
+  padding: 20px;
+  .one {
+    margin: 0 0 10px 0;
+    height: 40px;
+    overflow: hidden;
+    border-bottom: 2px solid #666;
+    .left {
+      span {
+        display: inline-block;
+        background: #ff0000;
+        color: #fff;
+        height: 40px;
+        line-height: 40px;
+        padding: 0px 10px;
+        font-weight: bold;
+      }
+    }
+    .right {
+      text-align: right;
+    }
+  }
+}
+</style>

+ 0 - 166
src/views/achieveLive/news/index copy.vue

@@ -1,166 +0,0 @@
-<template>
-  <div id="detail">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="one">
-          <top :info="info"></top>
-        </el-col>
-        <el-col :span="24" class="two">
-          <div class="w_1200">
-            <el-col :span="24" class="two_1">
-              <el-col :span="24" class="top">
-                <el-button type="primary" size="mini" @click="back">返回</el-button>
-              </el-col>
-              <el-col :span="24" class="down">
-                <el-col :span="24" class="title">
-                  {{ detailInfo.title }}
-                </el-col>
-                <el-col :span="24" class="other">
-                  <span>发布时间:{{ detailInfo.publish_time || '暂无' }}</span>
-                  <span>信息来源:{{ detailInfo.origin || '暂无' }}</span>
-                </el-col>
-                <el-col :span="24" class="image" v-if="detailInfo.picture">
-                  <el-image :src="detailInfo.picture"></el-image>
-                </el-col>
-                <el-col :span="24" class="video" v-if="detailInfo.filepath">
-                  <video :src="detailInfo.filepath" controls="controls">
-                    您的浏览器不支持 video 标签。
-                  </video>
-                </el-col>
-                <el-col :span="24" class="content">
-                  <p v-html="detailInfo.content"></p>
-                </el-col>
-              </el-col>
-            </el-col>
-          </div>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import top from '../detail/top.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: dock } = createNamespacedHelpers('dock');
-const { mapActions: interview } = createNamespacedHelpers('interview');
-const { mapActions: roadShow } = createNamespacedHelpers('roadShow');
-export default {
-  name: 'detail',
-  props: {},
-  components: {
-    top,
-  },
-  data: function() {
-    return {
-      info: {},
-      detailInfo: {},
-    };
-  },
-  created() {
-    if (this.dock_id) this.search();
-  },
-  methods: {
-    ...dock(['fetch']),
-    ...interview({ interviewFetch: 'fetch' }),
-    ...roadShow({ roadShowFetch: 'fetch' }),
-    async search() {
-      let res = await this.fetch(this.dock_id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `info`, res.data);
-      }
-      if (this.type == '0') {
-        let res = await this.interviewFetch(this.id);
-        if (this.$checkRes(res)) {
-          this.$set(this, `detailInfo`, res.data);
-        }
-      } else if (this.type == '1') {
-        let res = await this.roadShowFetch(this.id);
-        if (this.$checkRes(res)) {
-          this.$set(this, `detailInfo`, res.data);
-        }
-      }
-    },
-    back() {
-      this.$router.push({ path: '/achieveLive/detail', query: { dock_id: this.dock_id } });
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    dock_id() {
-      return this.$route.query.dock_id;
-    },
-    id() {
-      return this.$route.query.id;
-    },
-    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 {
-  .two {
-    .two_1 {
-      min-height: 630px;
-      box-shadow: 0 0 5px #ccc;
-      background-color: #fff;
-      padding: 20px;
-      .top {
-        text-align: right;
-        margin: 0 0 10px 0;
-      }
-      .down {
-        .title {
-          text-align: center;
-          font-size: 30px;
-          font-weight: bold;
-          padding: 15px 0;
-        }
-        .other {
-          text-align: center;
-          font-size: 18px;
-          color: #666;
-          padding: 0 0 15px 0;
-          span {
-            padding: 0 0 0 10px;
-          }
-        }
-        .image {
-          text-align: center;
-          height: 300px;
-          overflow: hidden;
-          margin: 0 0 15px 0;
-          .el-image {
-            width: 50%;
-            height: 300px;
-          }
-        }
-        .video {
-          text-align: center;
-          margin: 0 0 15px 0;
-          height: 300px;
-          overflow: hidden;
-          video {
-            width: 50%;
-            height: 300px;
-            background-color: #000000;
-          }
-        }
-      }
-    }
-  }
-}
-</style>

+ 83 - 6
src/views/achieveLive/product/index.vue

@@ -2,25 +2,75 @@
   <div id="index">
     <el-row>
       <el-col :span="24" class="main">
-        产品列表
+        <el-col :span="24" class="one">
+          <el-col :span="12" class="left">
+            <span>项目成果:{{ total }}项</span>
+          </el-col>
+          <el-col :span="12" class="right">
+            <el-button type="primary" size="mini" @click="back">返回活动首页</el-button>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="two">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @check="toCheck"></data-table>
+        </el-col>
       </el-col>
     </el-row>
   </div>
 </template>
 
 <script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: statistics } = createNamespacedHelpers('statistics');
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: { dataTable },
   data: function() {
-    return {};
+    return {
+      opera: [{ label: '对接', method: 'check' }],
+      fields: [
+        { label: '产品类型', prop: 'type', format: i => (i == '0' ? '科技需求' : i == '1' ? '技术成果' : i == '2' ? '商务服务' : '未识别') },
+        { label: '产品名称', prop: 'name' },
+        { label: '所属领域', prop: 'field' },
+        { label: '合作方式', prop: 'cooperation' },
+        { label: '企业名称', prop: 'company' },
+        { label: '联系人', prop: 'contacts' },
+        { label: '联系电话', prop: 'phone' },
+        { label: '电子邮箱', prop: 'email' },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  created() {
+    if (this.dock_id) this.search();
+  },
+  methods: {
+    ...statistics(['dockProduct']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.dock_id = this.dock_id;
+      info.type = this.type;
+      let res = await this.dockProduct({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 对接
+    toCheck({ data }) {},
+    back() {
+      this.$router.push({ path: '/achieveLive/detail', query: { dock_id: this.dock_id } });
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
+    dock_id() {
+      return this.$route.query.dock_id;
+    },
+    type() {
+      return this.$route.query.type;
+    },
   },
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -35,4 +85,31 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.main {
+  min-height: 505px;
+  box-shadow: 0 0 5px #ccc;
+  background-color: #fff;
+  padding: 20px;
+  .one {
+    margin: 0 0 10px 0;
+    height: 40px;
+    overflow: hidden;
+    border-bottom: 2px solid #666;
+    .left {
+      span {
+        display: inline-block;
+        background: #ff0000;
+        color: #fff;
+        height: 40px;
+        line-height: 40px;
+        padding: 0px 10px;
+        font-weight: bold;
+      }
+    }
+    .right {
+      text-align: right;
+    }
+  }
+}
+</style>