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

Merge branch 'master' of http://git.cc-lotus.info/service-platform/web-test

guhongwei 5 лет назад
Родитель
Сommit
4a22fd55d3

+ 9 - 9
src/views/direct.vue

@@ -115,7 +115,7 @@
                       </el-col>
                       <el-col :span="4" class="btn">
                         <el-button size="mini" type="primary" @click="oneBtnDetail(item)">详情</el-button>
-                        <el-button size="mini" type="success" @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id } })"
+                        <el-button size="mini" type="success" @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id, dockid: id } })"
                           >对接</el-button
                         >
                       </el-col>
@@ -145,7 +145,7 @@
                       </el-col>
                       <el-col :span="4" class="btn">
                         <el-button size="mini" type="primary" @click="oneBtnDetail(item)">详情</el-button>
-                        <el-button size="mini" type="success" @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id } })"
+                        <el-button size="mini" type="success" @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id, dockid: id } })"
                           >对接</el-button
                         >
                       </el-col>
@@ -175,7 +175,7 @@
                       </el-col>
                       <el-col :span="4" class="btn">
                         <el-button size="mini" type="primary" @click="oneBtnDetail(item)">详情</el-button>
-                        <el-button size="mini" type="success" @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id } })"
+                        <el-button size="mini" type="success" @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id, dockid: id } })"
                           >对接</el-button
                         >
                       </el-col>
@@ -490,7 +490,7 @@ export default {
       this.$set(this, `file_path`, res.data.file_path);
       console.log(res.data);
       // 交易实况
-      let aaa = await this.tquery();
+      let aaa = await this.tquery({ dockid: this.id });
       let newaaa = aaa.data.filter(f => f.status == '1' || f.status == '2');
       for (const val of newaaa) {
         var time = moment(val.meta.createdAt).format('YYYY-MM-DD hh:mm');
@@ -498,10 +498,10 @@ export default {
       }
       this.$set(this, `directlist`, newaaa);
       // 洽谈
-      let abb = await this.tquery({ status: 0 });
+      let abb = await this.tquery({ status: 0, dockid: this.id });
       this.$set(this, `qiatan`, abb.total);
       // 意向
-      let acc = await this.tquery({ status: 1 });
+      let acc = await this.tquery({ status: 1, dockid: this.id });
 
       for (const val of acc.data) {
         var time = moment(val.meta.createdAt).format('YYYY-MM-DD hh:mm');
@@ -511,7 +511,7 @@ export default {
       this.$set(this, `dacheng`, acc.total);
       this.$set(this, `yixianglist`, acc.data);
       // 成果
-      let aee = await this.tquery({ status: 2 });
+      let aee = await this.tquery({ status: 2, dockid: this.id });
       for (const val of aee.data) {
         var time = moment(val.meta.createdAt).format('YYYY-MM-DD hh:mm');
         val.time = time;
@@ -545,7 +545,7 @@ export default {
     },
     //专家
     async searchzhanjia(newname) {
-      let res = await this.expertQuery({ skip: 0, limit: 10, name: newname });
+      let res = await this.expertQuery({ skip: 0, limit: 10, name: newname, role: 6 });
       if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
     },
     //tabs
@@ -621,7 +621,7 @@ export default {
     },
 
     zhuanjiaduijies(data) {
-      this.$router.push({ path: '/live/hall/dock/zhanjiaduijie', query: { id: data.id } });
+      this.$router.push({ path: '/live/hall/dock/zhanjiaduijie', query: { id: data.id, dockid: this.id } });
     },
     handleClicks(tab, event) {
       console.log(tab, event);

+ 0 - 276
src/views/hall/dock/dockDetail copy.vue

@@ -1,276 +0,0 @@
-<template>
-  <div id="dockDetail">
-    <el-row>
-      <el-col :span="24" class="style">
-        <el-image :src="beijingPic"></el-image>
-        <el-col :span="24" class="info">
-          <div class="w_1200">
-            <el-col :span="24" class="top">
-              <p>吉林省计算中心对接直播大厅</p>
-              <p>主办方:吉林省计算中心</p>
-            </el-col>
-            <el-col :span="24" class="main">
-              <el-col :span="6" class="btn">
-                <el-col :span="24">
-                  <el-button type="primary" icon="el-icon-tickets" @click="btnInfo">项目信息</el-button>
-                </el-col>
-                <el-col :span="24" v-if="this.user.uid != productInfo.userid">
-                  <el-button type="danger" icon="el-icon-phone-outline" @click="btnPhone">对接</el-button>
-                </el-col>
-                <el-col :span="24" v-if="this.user.uid != productInfo.userid">
-                  <el-button type="success" icon="el-icon-check" @click="btnTrade">申请交易</el-button>
-                </el-col>
-              </el-col>
-              <el-col :span="18" class="mainInfo">
-                <el-col :span="24" v-if="display === '1'">
-                  <p class="name textOver">{{ productInfo.name }}</p>
-                  <div class="brief">
-                    <p>
-                      <span>应用领域:{{ productInfo.field || '暂无' }}</span>
-                      <span>服务范围:{{ productInfo.scope || '暂无' }}</span>
-                    </p>
-                    <p>
-                      <span>产品类型:{{ productInfo.product_type_name || '暂无' }}</span>
-                      <span>研发阶段:{{ productInfo.phase == 1 ? '阶段成果' : productInfo.phase == 2 ? '最终成果' : '暂无' }}</span>
-                    </p>
-                    <p>
-                      <span>{{
-                        productInfo.business == '0' ? '公用' : productInfo.business == '1' ? '转让' : productInfo.business == '2' ? '竞价' : '暂无'
-                      }}</span>
-                      <span>交易价格:{{ productInfo.price || '暂无' }}/{{ productInfo.priceunit || '暂无' }}</span>
-                    </p>
-                  </div>
-                  <p class="intro">
-                    <span><i class="el-icon-date"></i>项目简介</span>
-                    <span>{{ productInfo.introduction || '暂无' }}</span>
-                  </p>
-                </el-col>
-                <el-col :span="24" v-if="display === '2'" class="contact">
-                  <!-- <p>
-                    联系人姓名:<span style="color:red;">{{ productInfo.contact_user }}</span>
-                  </p>
-                  <p>
-                    联系人电话:<span style="color:red;">{{ productInfo.contact_tel }}</span>
-                  </p> -->
-                  <chat :room="room"></chat>
-                </el-col>
-              </el-col>
-            </el-col>
-          </div>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import _ from 'lodash';
-import { mapState, createNamespacedHelpers } from 'vuex';
-import chat from './parts/chat.vue';
-const { mapActions: mapProduct } = createNamespacedHelpers('marketproduct');
-const { mapActions: personalRoom } = createNamespacedHelpers('personalroom');
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-export default {
-  name: 'dockDetail',
-  props: {},
-  components: { chat }, //
-  data: () => ({
-    beijingPic: require('@a/live/top_3.png'),
-    display: '1',
-    productInfo: {},
-    room: {},
-  }),
-  created() {
-    if (this.$route.query.id) {
-      this.searchInfo();
-    }
-  },
-  methods: {
-    ...mapProduct(['fetch']),
-    ...personalRoom(['create', 'countDelete']),
-    ...transaction({ buyProduct: 'create' }),
-    async searchInfo() {
-      let res = await this.fetch(this.$route.query.id);
-      if (res.errcode === 0) {
-        this.$set(this, `productInfo`, res.data);
-      }
-    },
-    // 项目信息
-    btnInfo() {
-      this.display = '1';
-    },
-    // 线下对接
-    async btnPhone() {
-      if (!this.room.id) {
-        //TODO 请求房间号
-        let obj = {};
-        if (!this.user.uid) {
-          this.$message.error('游客身份无法与卖家对话,请先注册');
-          return;
-        } else {
-          obj.buyer_id = this.user.uid;
-          obj.buyer_name = this.user.name;
-        }
-        if (!this.productInfo.userid) {
-          this.$message.error('缺少卖家信息,请联系卖家或管理员');
-          return;
-        } else {
-          obj.seller_id = this.productInfo.userid;
-          obj.seller_name = this.productInfo.contact_user;
-        }
-
-        let res = await this.create(obj);
-        if (this.$checkRes(res)) {
-          this.$set(this, `room`, res.data);
-        }
-      }
-      this.display = '2';
-    },
-    async btnTrade() {
-      let form = {};
-      form.userid = this.user.uid;
-      form.username = this.user.name;
-      form.product_id = this.productInfo.id;
-      form.product_name = this.productInfo.name;
-      form.market_userid = this.productInfo.userid;
-      form.market_username = this.productInfo.contact_user;
-      form.status = '0';
-      let res = await this.buyProduct(form);
-      this.$checkRes(res, '购买申请成功', res.errmsg || '购买申请失败');
-    },
-    killTalk() {
-      this.$alert('您确认对话已经可以结束了吗?');
-      let room_id = _.get(this.room, 'id');
-      if (room_id) {
-        this.countDelete(room_id);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  beforeDestroy() {
-    this.killTalk();
-  },
-  beforeRouteLeave(to, from, next) {
-    this.killTalk();
-    next();
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.w_1200 {
-  width: 1200px;
-  margin: 0 auto;
-}
-p {
-  padding: 0;
-  margin: 0;
-}
-.style {
-  height: 100vh;
-}
-.style .info {
-  position: relative;
-  top: -450px;
-}
-.style .top {
-  position: relative;
-  top: 0;
-  width: 100%;
-  text-align: center;
-  z-index: 999;
-  height: 230px;
-  margin: 0 0 20px 0;
-}
-.style .top p:first-child {
-  font-size: 50px;
-  color: #fff;
-}
-.style .top p:last-child {
-  font-size: 30px;
-  color: #fff;
-  position: absolute;
-  width: 100%;
-  top: 170px;
-}
-.style .main {
-  height: 740px;
-  border: 1px solid red;
-  background: #fff;
-  overflow: hidden;
-  padding: 30px 20px;
-  margin-bottom: 10px;
-}
-.main .btn div {
-  padding: 30px 0 0px 0;
-}
-/deep/.main .btn .el-button {
-  float: left;
-  margin: 0 40px;
-  width: 70%;
-}
-.main .mainInfo {
-  border: 1px solid red;
-  height: 680px;
-}
-.mainInfo .name {
-  font-size: 25px;
-  text-align: center;
-  height: 90px;
-  line-height: 90px;
-  border-bottom: 2px solid red;
-  margin: 0 60px;
-}
-.mainInfo .brief {
-  float: left;
-  padding: 0 88px 15px 88px;
-  color: red;
-  margin: 15px 20px 0 19px;
-  width: 75%;
-  border-bottom: 1px dashed red;
-}
-.mainInfo .brief p {
-  float: left;
-  width: 100%;
-  padding: 0 0 15px 0;
-}
-.mainInfo .brief p span:first-child {
-  float: left;
-  width: 50%;
-}
-.mainInfo .intro {
-  float: left;
-  padding: 20px;
-  width: 95%;
-}
-.mainInfo .intro span:first-child {
-  display: inline-block;
-  width: 100%;
-  font-size: 20px;
-  color: red;
-}
-.mainInfo .intro span:last-child {
-  display: inline-block;
-  line-height: 25px;
-  color: #666;
-  text-indent: 2rem;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  -webkit-line-clamp: 13;
-  word-break: break-all;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-}
-.mainInfo .contact {
-  padding: 20px;
-  font-size: 18px;
-}
-</style>

+ 1 - 0
src/views/hall/dock/dockDetail.vue

@@ -216,6 +216,7 @@ export default {
       form.product_name = this.detailInfo.name;
       form.market_userid = this.detailInfo.userid;
       form.market_username = this.detailInfo.contact_user;
+      form.dockid = this.$route.query.dockid;
       form.status = '0';
       if (!this.user.uid) {
         // this.$message.error('游客身份无法与卖家对话,请先注册');

+ 2 - 2
src/views/market/index.vue

@@ -34,7 +34,7 @@
           <el-col :span="24" class="downLeftTop">
             <el-image :src="downLeftTopImage"></el-image>
             <span class="topText">
-              <span>科技产品</span>
+              <span>产品供求</span>
               <span
                 ><p>P</p>
                 <p>roduct</p></span
@@ -198,7 +198,7 @@ export default {
       if (this.$checkRes(res)) this.$set(this, `expertsList`, res.data);
     },
     toProductList() {
-      this.$router.push({ path: '/market/marketlists', query: { totaltype: 1, column_name: '科技产品', display: 1 } });
+      this.$router.push({ path: '/market/marketlists', query: { totaltype: 1, column_name: '产品供求', display: 1 } });
     },
     productDetail(id) {
       this.$router.push({ path: '/market/marketlists', query: { totaltype: 1, id: id, display: 2, column_name: '科技产品' } });

+ 5 - 5
src/views/market/marketlists.vue

@@ -99,9 +99,9 @@ export default {
   },
   data: () => ({
     squareImage: require('@/assets/live/square_big.png'),
-    menuList: [{ name: '科技产品' }, { name: '技术供求' }, { name: '服务供求' }, { name: '专家供求' }],
+    menuList: [{ name: '产品供求' }, { name: '技术供求' }, { name: '服务供求' }, { name: '专家供求' }],
     menuIndex: '0',
-    menuName: '科技产品',
+    menuName: '产品供求',
     menuColor: 'rgb(254, 149, 14)',
     currentPage: 1,
     pageTotal: 0,
@@ -145,7 +145,7 @@ export default {
     ...transaction({ transactioncreate: 'create', transactionfetch: 'fetch' }),
     ...tranaudit({ tranauditcreate: 'create' }),
     async searchList({ skip = 0, limit = 10, ...info } = {}) {
-      if (this.$route.query.column_name == '科技产品') {
+      if (this.$route.query.column_name == '产品供求') {
         this.display = '1';
         this.changeMenu(this.$route.query.column_name, 0);
       } else if (this.$route.query.column_name == '技术供求') {
@@ -169,7 +169,7 @@ export default {
       this.display = '1';
       let res = [];
       this.pageSize = 5;
-      if (name == '科技产品') {
+      if (name == '产品供求') {
         let totaltype = '1';
         res = await this.list({ skip, limit, totaltype, status: 1, ...info });
         this.$set(this, `zhuantiList`, res.data);
@@ -190,7 +190,7 @@ export default {
     },
     handleCurrentChange(val) {
       const name = this.menuName;
-      if (name == '科技产品' || name == '专家供求') {
+      if (name == '产品供求' || name == '专家供求') {
         this.limit = 5;
       }
       this.initList({ name: name, skip: (val - 1) * this.limit, limit: this.limit });