guhongwei 4 년 전
부모
커밋
22b4b7cea3

+ 4 - 0
src/App.vue

@@ -35,6 +35,10 @@ body {
   text-overflow: ellipsis;
   white-space: nowrap;
 }
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
 p {
   padding: 0;
   margin: 0;

BIN
src/assets/hall.jpg


+ 6 - 6
src/router/index.js

@@ -107,12 +107,12 @@ const live = [
         meta: { title: '直播大厅列表', subSite: true },
         component: () => import('../views/hallList/index.vue'),
       },
-      {
-        path: '/hallList/zongjie',
-        meta: { title: '展会总结', subSite: true },
-        name: 'dock_zongjie',
-        component: () => import('../views/hallList/zongjie.vue'),
-      },
+      // {
+      //   path: '/hallList/zongjie',
+      //   meta: { title: '展会总结', subSite: true },
+      //   name: 'dock_zongjie',
+      //   component: () => import('../views/hallList/zongjie.vue'),
+      // },
       {
         path: '/technical/list',
         name: 'technical_list',

+ 34 - 141
src/views/hallList/index.vue

@@ -1,165 +1,58 @@
 <template>
   <div id="index">
-    <el-col :span="24" class="main">
-      <el-col :span="24" class="info" style="padding:30px">
-        <el-tabs>
-          <el-tab-pane label="正在直播" name="0">
-            <list :list="listNow" :total="nowTotal" status="1" @query="searchList"></list>
-          </el-tab-pane>
-          <el-tab-pane label="下期直播" name="1">
-            <list :list="listPre" :total="preTotal" status="0" @query="searchList"></list>
-          </el-tab-pane>
-          <el-tab-pane label="已往直播" name="2">
-            <list :list="listPast" :total="pastTotal" status="2" @query="searchList"></list>
-          </el-tab-pane>
-        </el-tabs>
+    <el-row>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-tabs type="border-card" class="tabs">
+            <el-tab-pane label="科技成果在线">
+              <product></product>
+            </el-tab-pane>
+            <el-tab-pane label="人才在线">
+              <personal></personal>
+            </el-tab-pane>
+            <el-tab-pane label="专家培训在线">
+              <exports></exports>
+            </el-tab-pane>
+          </el-tabs>
+        </div>
       </el-col>
-    </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
-import _ from 'lodash';
-import list from './parts/list.vue';
+import product from './parts/product.vue';
+import personal from './parts/personal.vue';
+import exports from './parts/export.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'index',
   props: {},
-  components: { list },
-  data: () => ({
-    squareImage: require('@/assets/live/square_big.png'),
-    menuIndex: '0',
-    menuName: '直播列表',
-    menuColor: 'rgb(254, 149, 14)',
-    pageSize: 10,
-    limit: 10,
-    hangyeList: [],
-    listPre: [],
-    preTotal: 0,
-    listNow: [],
-    nowTotal: 0,
-    listPast: [],
-    pastTotal: 0,
-    liveIndex: '',
-  }),
-  created() {
-    this.searchList({ status: '0' });
-    this.searchList({ status: '1' });
-    this.searchList({ status: '2' });
+  components: {
+    product,
+    personal,
+    exports,
   },
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
   computed: {
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
+    ...mapState(['user']),
   },
   metaInfo() {
     return { title: this.$route.meta.title };
   },
-
-  methods: {
-    ...dock({ dockQuery: 'query' }),
-    async searchList({ skip = 0, limit = 10, status, ...info } = {}) {
-      let res = await this.dockQuery({ is_allowed: 1, skip, limit, status, ...info });
-      if (res.errcode === 0) {
-        if (status == '0') {
-          console.log(res.total);
-          this.$set(this, `preTotal`, res.total);
-          this.$set(this, `listPre`, res.data);
-        } else if (status == '1') {
-          this.$set(this, `nowTotal`, res.total);
-          this.$set(this, `listNow`, res.data);
-        } else {
-          console.log(res.data);
-
-          this.$set(this, `pastTotal`, res.total);
-          this.$set(this, `listPast`, res.data);
-        }
-      }
-    },
-
-    async initList({ name, skip = 0, limit = 10, ...info } = {}) {
-      this.$set(this, `pageTotal`, res.total);
-    },
-    handleCurrentChange(val) {
-      this.limit = 5;
-      this.initList({ skip: (val - 1) * this.limit, limit: this.limit });
-    },
-
-    turnTo(item) {
-      this.$router.push({ path: '/live/hallDetail', query: { id: item.id } });
-    },
-  },
 };
 </script>
 
 <style lang="less" scoped>
 .main {
-  // width: 80%;
-  width: 1200px;
-  margin: 0 auto;
-  float: none;
-}
-.menu {
-  float: left;
-  height: 450px;
-  width: 20%;
-  background: no-repeat bottom right;
-  background-image: url(../../assets/live/menu_back.jpg);
-  margin: 30px 0;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  box-shadow: 0 0 10px #bbbaba;
-}
-.menu .el-image {
-  width: 30px;
-  display: inline-table;
-  margin: 10px 5px;
-}
-.menu span {
-  font-size: 24px;
-  color: #92959a;
-  font-weight: 600;
-  margin-left: 3px;
-  position: relative;
-  top: 10px;
-}
-.menuList p {
-  line-height: 60px;
-  font-size: 18px;
-  cursor: pointer;
-  border-bottom: 1px solid #2d64b3;
-  color: #044b79;
-  font-weight: 600;
-}
-.info {
-  width: 100%;
-  float: right;
-  margin: 30px 0 30px 2px;
-  height: 585px;
-  box-shadow: 0 0 10px #2d64b3;
-  overflow: hidden;
-  right: 0px;
-  background: #ffffff;
-}
-.leftInfo {
-  height: 500px;
-  overflow: hidden;
-}
-.leftTop {
-  font-size: 18px;
-  width: 96%;
-  height: 41px;
-  line-height: 35px;
-  border-bottom: 1px solid #e5e5e5;
-  position: relative;
-  bottom: 1px;
-  margin: 10px;
-  font-weight: 600;
-  color: #22529a;
-}
-.page {
-  text-align: center;
-  margin: 10px 0;
+  margin: 15px 0;
+  min-height: 600px;
+  .tabs {
+    min-height: 600px;
+  }
 }
 </style>

+ 27 - 0
src/views/hallList/parts/export.vue

@@ -0,0 +1,27 @@
+<template>
+  <div id="export">
+    <p>export</p>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'export',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 27 - 0
src/views/hallList/parts/personal.vue

@@ -0,0 +1,27 @@
+<template>
+  <div id="personal">
+    <p>personal</p>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'personal',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 83 - 0
src/views/hallList/parts/product.vue

@@ -0,0 +1,83 @@
+<template>
+  <div id="product">
+    <el-row>
+      <el-col :span="24" class="product">
+        <!-- 是否支持多开 accordion -->
+        <el-collapse v-model="activeName" accordion>
+          <el-collapse-item title="正在直播" name="1">
+            <productlist :list="listNow" :total="nowTotal" status="1" @query="searchList"></productlist>
+          </el-collapse-item>
+          <el-collapse-item title="下期预告" name="2">
+            <productlist :list="listPre" :total="preTotal" status="0" @query="searchList"></productlist>
+          </el-collapse-item>
+          <el-collapse-item title="往期直播" name="3">
+            <productlist :list="listPast" :total="pastTotal" status="2" @query="searchList"></productlist>
+          </el-collapse-item>
+        </el-collapse>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import _ from 'lodash';
+import productlist from './productlist.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
+export default {
+  name: 'product',
+  props: {},
+  components: {
+    productlist,
+  },
+  data: function() {
+    return {
+      activeName: '1',
+      // 下期预告
+      listPre: [],
+      preTotal: 0,
+      // 正在直播
+      listNow: [],
+      nowTotal: 0,
+      // 往期直播
+      listPast: [],
+      pastTotal: 0,
+    };
+  },
+  created() {
+    this.searchList({ status: '0' });
+    this.searchList({ status: '1' });
+    this.searchList({ status: '2' });
+  },
+  methods: {
+    ...dock({ dockQuery: 'query' }),
+    async searchList({ skip = 0, limit = 10, status, ...info } = {}) {
+      let res = await this.dockQuery({ is_allowed: 1, skip, status, ...info });
+      if (res.errcode === 0) {
+        if (status == '0') {
+          this.$set(this, `preTotal`, res.total);
+          this.$set(this, `listPre`, res.data);
+        } else if (status == '1') {
+          this.$set(this, `nowTotal`, res.total);
+          this.$set(this, `listNow`, res.data);
+        } else if (status == '2') {
+          this.$set(this, `pastTotal`, res.total);
+          this.$set(this, `listPast`, res.data);
+        }
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-collapse-item__content {
+  padding-bottom: 0;
+}
+</style>

+ 144 - 0
src/views/hallList/parts/productlist.vue

@@ -0,0 +1,144 @@
+<template>
+  <div id="productlist">
+    <el-row>
+      <el-col :span="24" class="productlist">
+        <el-col :span="8" class="list" v-for="(item, index) in list" :key="index">
+          <el-image :src="hall" style="width:100%;height:200px;"></el-image>
+          <el-col :span="24" class="other">
+            <p class="textOver">{{ item.title }}</p>
+            <p class="textOver">
+              <span><i class="el-icon-location-outline"></i>{{ getprovince(item.province) }}-{{ getplace(item.place) }}</span>
+              <span><i class="el-icon-time"></i>{{ item.start_time }}-{{ item.end_time }}</span>
+            </p>
+            <p>
+              <el-button type="warning" size="mini" @click="dockBtn()" v-if="user.role == '3' || user.role == '7'">管理进入</el-button>
+              <el-button type="warning" size="mini" @click="linkBtn(item)" v-if="status == '1'">进入对接会</el-button>
+              <el-button type="warning" size="mini" @click="apply(item)" v-if="status == '0' && user.uid != undefined">申请对接会</el-button>
+              <el-button type="warning" size="mini" @click="check(item)" v-if="status == '2' && user.role == '3'">查看成果</el-button>
+            </p>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import page from '@/components/pagination.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
+const { mapActions: place } = createNamespacedHelpers('place');
+export default {
+  name: 'list',
+  props: { list: { type: Array, default: () => [] }, status: { type: String, default: '0' } },
+  components: {},
+  data: () => {
+    return {
+      hall: require('@a/hall.jpg'),
+      // 省
+      province: [],
+      // 市
+      place: [],
+    };
+  },
+  created() {
+    this.searchplace();
+  },
+  methods: {
+    ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
+    ...dock({ livefetch: 'fetch', livelist: 'query', livecreate: 'create', liveupdate: 'update' }),
+    // 过滤省
+    getprovince(item) {
+      let res = this.province.find(i => i.code == item);
+      if (res) return res.name;
+    },
+    // 过滤市
+    getplace(item) {
+      let res = this.place.find(i => i.code == item);
+      if (res) return res.name;
+    },
+    async searchplace() {
+      let res = await this.palcequery({ level: 1 });
+      let arr = await this.palcequery({ level: 2 });
+      if (res || arr) {
+        this.$set(this, `province`, res.data);
+        this.$set(this, `place`, arr.data);
+      }
+    },
+    // 管理进入
+    dockBtn() {
+      if (this.user.uid) {
+        this.$router.push({ path: '/adminCenter/index', query: { num: '1' } });
+      } else {
+        this.$router.push({ path: '/dockLogin' });
+      }
+    },
+    // 进入对接会
+    async linkBtn(item) {
+      if (this.user.uid || this.user.suid) {
+        if (
+          this.user.role == '2' ||
+          this.user.role == '3' ||
+          this.user.role == '4' ||
+          this.user.role == '5' ||
+          this.user.role == '6' ||
+          this.user.role == '7' ||
+          this.user.role == '8'
+        ) {
+          this.$router.push({ path: '/hall/directBefore', query: { id: item.id } });
+        } else {
+          this.$router.push({ path: '/webLogin' });
+        }
+      } else {
+        this.$router.push({ path: '/webLogin' });
+      }
+    },
+    // 申请对接会
+    apply(item) {
+      this.$router.push({ path: '/live/liveApply', query: { id: item.id } });
+    },
+    // 查看成果
+    check(item) {
+      this.$router.push({ path: '/hallList/zongjie', query: { id: item.id } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.productlist {
+  .list {
+    position: relative;
+    width: 32%;
+    height: 310px;
+    border: 1px solid #ccc;
+    margin: 0 15px 10px 0;
+    .other {
+      p:nth-child(1) {
+        padding: 0 10px;
+        font-size: 16px;
+        font-weight: bold;
+      }
+      p:nth-child(2) {
+        padding: 5px;
+        span:nth-child(2) {
+          float: right;
+        }
+      }
+      p:nth-child(3) {
+        position: absolute;
+        width: 100%;
+        bottom: 5px;
+        text-align: center;
+      }
+    }
+  }
+  .list:nth-child(3n) {
+    width: 33%;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 165 - 0
src/views/hallList/备份/index.vue

@@ -0,0 +1,165 @@
+<template>
+  <div id="index">
+    <el-col :span="24" class="main">
+      <el-col :span="24" class="info" style="padding:30px">
+        <el-tabs>
+          <el-tab-pane label="正在直播" name="0">
+            <list :list="listNow" :total="nowTotal" status="1" @query="searchList"></list>
+          </el-tab-pane>
+          <el-tab-pane label="下期直播" name="1">
+            <list :list="listPre" :total="preTotal" status="0" @query="searchList"></list>
+          </el-tab-pane>
+          <el-tab-pane label="已往直播" name="2">
+            <list :list="listPast" :total="pastTotal" status="2" @query="searchList"></list>
+          </el-tab-pane>
+        </el-tabs>
+      </el-col>
+    </el-col>
+  </div>
+</template>
+
+<script>
+import _ from 'lodash';
+import list from './parts/list.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
+export default {
+  name: 'index',
+  props: {},
+  components: { list },
+  data: () => ({
+    squareImage: require('@/assets/live/square_big.png'),
+    menuIndex: '0',
+    menuName: '直播列表',
+    menuColor: 'rgb(254, 149, 14)',
+    pageSize: 10,
+    limit: 10,
+    hangyeList: [],
+    listPre: [],
+    preTotal: 0,
+    listNow: [],
+    nowTotal: 0,
+    listPast: [],
+    pastTotal: 0,
+    liveIndex: '',
+  }),
+  created() {
+    this.searchList({ status: '0' });
+    this.searchList({ status: '1' });
+    this.searchList({ status: '2' });
+  },
+  computed: {
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+
+  methods: {
+    ...dock({ dockQuery: 'query' }),
+    async searchList({ skip = 0, limit = 10, status, ...info } = {}) {
+      let res = await this.dockQuery({ is_allowed: 1, skip, limit, status, ...info });
+      if (res.errcode === 0) {
+        if (status == '0') {
+          console.log(res.total);
+          this.$set(this, `preTotal`, res.total);
+          this.$set(this, `listPre`, res.data);
+        } else if (status == '1') {
+          this.$set(this, `nowTotal`, res.total);
+          this.$set(this, `listNow`, res.data);
+        } else {
+          console.log(res.data);
+
+          this.$set(this, `pastTotal`, res.total);
+          this.$set(this, `listPast`, res.data);
+        }
+      }
+    },
+
+    async initList({ name, skip = 0, limit = 10, ...info } = {}) {
+      this.$set(this, `pageTotal`, res.total);
+    },
+    handleCurrentChange(val) {
+      this.limit = 5;
+      this.initList({ skip: (val - 1) * this.limit, limit: this.limit });
+    },
+
+    turnTo(item) {
+      this.$router.push({ path: '/live/hallDetail', query: { id: item.id } });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  // width: 80%;
+  width: 1200px;
+  margin: 0 auto;
+  float: none;
+}
+.menu {
+  float: left;
+  height: 450px;
+  width: 20%;
+  background: no-repeat bottom right;
+  background-image: url(../../assets/live/menu_back.jpg);
+  margin: 30px 0;
+  padding: 10px 0 0 10px;
+  box-sizing: border-box;
+  box-shadow: 0 0 10px #bbbaba;
+}
+.menu .el-image {
+  width: 30px;
+  display: inline-table;
+  margin: 10px 5px;
+}
+.menu span {
+  font-size: 24px;
+  color: #92959a;
+  font-weight: 600;
+  margin-left: 3px;
+  position: relative;
+  top: 10px;
+}
+.menuList p {
+  line-height: 60px;
+  font-size: 18px;
+  cursor: pointer;
+  border-bottom: 1px solid #2d64b3;
+  color: #044b79;
+  font-weight: 600;
+}
+.info {
+  width: 100%;
+  float: right;
+  margin: 30px 0 30px 2px;
+  height: 585px;
+  box-shadow: 0 0 10px #2d64b3;
+  overflow: hidden;
+  right: 0px;
+  background: #ffffff;
+}
+.leftInfo {
+  height: 500px;
+  overflow: hidden;
+}
+.leftTop {
+  font-size: 18px;
+  width: 96%;
+  height: 41px;
+  line-height: 35px;
+  border-bottom: 1px solid #e5e5e5;
+  position: relative;
+  bottom: 1px;
+  margin: 10px;
+  font-weight: 600;
+  color: #22529a;
+}
+.page {
+  text-align: center;
+  margin: 10px 0;
+}
+</style>

src/views/hallList/parts/list.vue → src/views/hallList/备份/parts/list.vue


src/views/hallList/zongjie.vue → src/views/hallList/备份/zongjie.vue