guhongwei 4 years ago
parent
commit
966b84fced

BIN
src/assets/achieve.png


BIN
src/assets/expert.png


BIN
src/assets/fmzl.jpg


+ 136 - 4
src/views/market/index.vue

@@ -1,19 +1,131 @@
 <template>
   <div id="index">
     <el-row>
-      <el-col :span="24" class="main"> 科技超市 </el-col>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="24" class="common one">
+            <el-col :span="12" class="left">
+              <top topText="科技成果"></top>
+              <list type="1" :list="oneList"></list>
+            </el-col>
+            <el-col :span="12" class="left">
+              <top topText="专利信息"></top>
+              <list type="2" :list="twoList"></list>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="common two">
+            <el-col :span="12" class="left">
+              <top topText="专家智库"></top>
+              <list type="3" :list="thrList"></list>
+            </el-col>
+            <el-col :span="12" class="left">
+              <top topText="项目路演"></top>
+              <list type="4" :list="fourList"></list>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="common thr">
+            <el-col :span="12" class="left">
+              <top topText="技术需求"></top>
+              <list type="5" :list="fiveList"></list>
+            </el-col>
+            <el-col :span="12" class="left">
+              <top topText="商务服务"></top>
+              <list type="6" :list="sixList"></list>
+            </el-col>
+          </el-col>
+        </div>
+      </el-col>
     </el-row>
   </div>
 </template>
 
 <script>
+import top from './parts/top.vue';
+import list from './parts/list.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: { top, list },
   data: function () {
-    return {};
+    return {
+      oneList: [
+        {
+          name: '成果名称',
+          achievebrief: '成果简介',
+          field: '所属领域',
+          contacts: '联系人',
+        },
+        {
+          name: '6条数据',
+          achievebrief: '成果简介',
+          field: '所属领域',
+          contacts: '联系人',
+        },
+      ],
+      twoList: [
+        {
+          name: '专利信息',
+          img_url: require('@a/news1.jpg'),
+        },
+        {
+          name: '6条数据',
+        },
+      ],
+      thrList: [
+        {
+          img_path: require('@a/news1.jpg'),
+          name: '专家姓名',
+          zwzc: '职务职称',
+          company: '工作动态',
+        },
+        {
+          name: '6条数据',
+          zwzc: '职务职称',
+          company: '工作动态',
+        },
+      ],
+      fourList: [
+        {
+          title: '信息标题',
+          publish_time: '2021-04-19',
+          titlejj: '信息简介',
+        },
+        {
+          title: '5条数据',
+          publish_time: '2021-04-19',
+          titlejj: '信息简介',
+        },
+      ],
+      fiveList: [
+        {
+          name: '信息标题',
+          create_time: '2021-04-19',
+          field: '所属领域',
+          cooperation: '合作方式',
+        },
+        {
+          name: '6条数据',
+          create_time: '2021-04-19',
+          field: '所属领域',
+          cooperation: '合作方式',
+        },
+      ],
+      sixList: [
+        {
+          name: '信息标题',
+          messattribute: '信息属性',
+          create_time: '2021-04-19',
+          informationdesc: '不知道是神呢',
+        },
+        {
+          name: '五条数据',
+          messattribute: '信息属性',
+          create_time: '2021-04-19',
+          informationdesc: '不知道是神呢',
+        },
+      ],
+    };
   },
   created() {},
   methods: {},
@@ -33,4 +145,24 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.main {
+  min-height: 500px;
+  margin: 10px 0 0 0;
+  .common {
+    margin: 0 0 10px 0;
+    .left {
+      width: 49.5%;
+      height: 500px;
+      overflow: hidden;
+      box-shadow: 0 0 4px #409eff;
+      border-radius: 10px;
+      margin: 0 10px 10px 0;
+      padding: 10px;
+    }
+    .left:nth-child(2n) {
+      margin: 0 0 10px 0;
+    }
+  }
+}
+</style>

+ 334 - 0
src/views/market/parts/list.vue

@@ -0,0 +1,334 @@
+<template>
+  <div id="list">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one" v-if="type == '1'">
+          <el-col :span="8" class="oneList" v-for="(item, index) in list" :key="index">
+            <el-col :span="24" class="name textOver">
+              {{ item.name }}
+            </el-col>
+            <el-col :span="24" class="brief">
+              {{ item.achievebrief }}
+            </el-col>
+            <el-col :span="24" class="other">
+              <p class="textOver">领域:{{ item.field }}</p>
+              <p class="textOver">联系人:{{ item.contacts }}</p>
+            </el-col>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="one two" v-else-if="type == '2'">
+          <el-col :span="8" class="twoList" v-for="(item, index) in list" :key="index">
+            <el-image :src="item.img_url" class="image">
+              <template #error>
+                <el-image :src="imgUrl"></el-image>
+              </template>
+            </el-image>
+            <el-col :span="24" class="name textOver">
+              {{ item.name }}
+            </el-col>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="one thr" v-else-if="type == '3'">
+          <el-col :span="8" class="thrList" v-for="(item, index) in list" :key="index">
+            <el-col :span="24" class="image">
+              <el-image :src="item.img_path">
+                <template #error>
+                  <el-image :src="expetImg"></el-image>
+                </template>
+              </el-image>
+            </el-col>
+            <el-col :span="24" class="other">
+              <p>{{ item.name }}</p>
+              <p>{{ item.zwzc || '暂无' }}</p>
+              <p>{{ item.company || '暂无' }}</p>
+            </el-col>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="one four" v-else-if="type == '4'">
+          <el-col :span="24" class="fourList" v-for="(item, index) in list" :key="index">
+            <el-col :span="24" class="top">
+              <el-col :span="19" class="title textOver">
+                {{ item.title }}
+              </el-col>
+              <el-col :span="5" class="date">
+                <span>{{ item.publish_time || '暂无' }}</span>
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="down"> 简介:{{ item.titlejj }} </el-col>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="one five" v-else-if="type == '5'">
+          <el-col :span="24" class="fiveList" v-for="(item, index) in list" :key="index">
+            <el-col :span="24" class="top">
+              <el-col :span="19" class="title textOver">
+                {{ item.name }}
+              </el-col>
+              <el-col :span="5" class="date">
+                <span>{{ item.create_time || '暂无' }}</span>
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="down">
+              <el-col :span="12" class="textOver"> 所属领域:{{ item.filed }} </el-col>
+              <el-col :span="12" class="textOver"> 合作方式:{{ item.cooperation }} </el-col>
+            </el-col>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="one six" v-else-if="type == '6'">
+          <el-col :span="24" class="sixList" v-for="(item, index) in list" :key="index">
+            <el-col :span="10" class="name textOver">
+              {{ item.name }}
+            </el-col>
+            <el-col :span="10" class="messbute"> 信息属性:{{ item.messattribute }} </el-col>
+            <el-col :span="4" class="date">
+              {{ item.create_time }}
+            </el-col>
+            <el-col :span="24" class="info">
+              {{ item.informationdesc }}
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'list',
+  props: {
+    type: { type: String },
+    list: { type: Array },
+  },
+  components: {},
+  data: function () {
+    return {
+      imgUrl: require('@a/fmzl.jpg'),
+      expetImg: require('@a/expert.png'),
+    };
+  },
+  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 {
+  padding: 5px 0 0 0;
+  .one {
+    height: 435px;
+    overflow: hidden;
+    .oneList {
+      width: 32.1%;
+      height: 212px;
+      overflow: hidden;
+      background: url('~@a/achieve.png');
+      background-size: 100% 100%;
+      background-repeat: no-repeat;
+      margin: 0 10px 10px 0;
+      padding: 20px 18px;
+      .name {
+        font-size: 16px;
+        font-weight: bold;
+        margin: 0 0 5px 0;
+      }
+      .brief {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        -webkit-line-clamp: 6;
+        word-break: break-all;
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+        font-size: 14px;
+      }
+      .other {
+        p {
+          font-size: 14px;
+          padding: 3px 0 0 0;
+        }
+      }
+    }
+    .oneList:nth-child(3n) {
+      margin: 0 0 10px 0;
+    }
+    .twoList {
+      width: 32.1%;
+      height: 210px;
+      overflow: hidden;
+      margin: 0 10px 10px 0;
+      box-shadow: 0 0 5px #ccc;
+      border-radius: 5px;
+      .image {
+        width: 100%;
+        height: 180px;
+        .el-image {
+          width: 100%;
+          height: 180px;
+        }
+      }
+      .name {
+        text-align: center;
+        padding: 2px 0;
+        font-weight: bold;
+      }
+    }
+    .twoList:nth-child(3n) {
+      margin: 0 0 10px 0;
+    }
+    .thrList {
+      width: 32.1%;
+      height: 210px;
+      overflow: hidden;
+      margin: 0 10px 10px 0;
+      box-shadow: 0 0 5px #ccc;
+      .image {
+        padding: 15px 0;
+        text-align: center;
+        .el-image {
+          width: 90px;
+          height: 90px;
+          border-radius: 90px;
+        }
+      }
+      .other {
+        padding: 0 5px;
+        p {
+          font-size: 14px;
+          padding: 4px 0 0 0;
+        }
+        p:nth-child(1) {
+          font-size: 16px;
+          font-weight: bold;
+          text-align: center;
+        }
+      }
+    }
+    .thrList:nth-child(3n) {
+      margin: 0 0 10px 0;
+    }
+    .fourList {
+      border-bottom: 1px dashed #ccc;
+      padding: 10px 0;
+      .top {
+        margin: 0 0 5px 0;
+        .title {
+          font-size: 16px;
+          font-weight: bold;
+        }
+        .date {
+          text-align: right;
+          span {
+            background: #044b79;
+            color: #fff;
+            padding: 0 5px;
+            font-size: 14px;
+            border-radius: 5px;
+          }
+        }
+      }
+      .down {
+        font-size: 14px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        -webkit-line-clamp: 2;
+        word-break: break-all;
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+        height: 40px;
+      }
+    }
+    .fiveList {
+      border-bottom: 1px dashed #ccc;
+      padding: 12px 0;
+      .top {
+        margin: 0 0 5px 0;
+        .title {
+          font-size: 16px;
+          font-weight: bold;
+        }
+        .date {
+          text-align: right;
+          span {
+            background: #044b79;
+            color: #fff;
+            padding: 0 5px;
+            font-size: 14px;
+            border-radius: 5px;
+          }
+        }
+      }
+      .down {
+        .fourList {
+          border-bottom: 1px dashed #ccc;
+          padding: 10px 0;
+          .top {
+            margin: 0 0 5px 0;
+            .title {
+              font-size: 16px;
+              font-weight: bold;
+            }
+            .date {
+              text-align: right;
+              span {
+                background: #044b79;
+                color: #fff;
+                padding: 0 5px;
+                font-size: 14px;
+                border-radius: 5px;
+              }
+            }
+          }
+          .down {
+            font-size: 14px;
+          }
+        }
+      }
+    }
+    .sixList {
+      padding: 10px 0;
+      border-bottom: 1px dashed #044b79;
+      .name {
+        font-size: 18px;
+        font-weight: bold;
+      }
+      .messbute {
+        font-size: 16px;
+      }
+      .date {
+        font-size: 16px;
+        text-align: center;
+      }
+      .info {
+        padding: 5px 0 0 0;
+        font-size: 14px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        -webkit-line-clamp: 2;
+        word-break: break-all;
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+        height: 40px;
+      }
+    }
+  }
+  .two {
+    padding: 2px;
+  }
+  .thr {
+    padding: 2px;
+  }
+}
+</style>

+ 70 - 0
src/views/market/parts/top.vue

@@ -0,0 +1,70 @@
+<template>
+  <div id="top">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-col :span="20" class="left">
+            {{ topText }}
+          </el-col>
+          <el-col :span="4" class="right">
+            <el-link :underline="false" @click="more">MORE</el-link>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'top',
+  props: {
+    topText: { type: String },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    more() {
+      this.$emit('more');
+    },
+  },
+  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 {
+    height: 40px;
+    line-height: 40px;
+    overflow: hidden;
+    border-bottom: 1px solid #ccc;
+    .left {
+      font-weight: bold;
+      font-size: 16px;
+    }
+    .right {
+      text-align: right;
+      .el-link {
+        font-weight: bold;
+      }
+    }
+  }
+}
+</style>