浏览代码

Merge branch 'master' of http://git.cc-lotus.info/live/web-live

lrf402788946 3 年之前
父节点
当前提交
3af4b07ec2

+ 2 - 1
src/components/detail-model/achieveInfo.vue

@@ -232,7 +232,8 @@ export default {
     },
     //供求对接
     async onSubmit() {
-      let data = { dock_id: this.dock_id, product_id: this.form.id, s_id: this.form.user_id, s_name: this.form.company, s_phone: this.form.phone };
+      let data = { product_id: this.form.id, s_id: this.form.user_id, s_name: this.form.company, s_phone: this.form.phone };
+      if (this.dock_id) data.dock_id = this.dock_id;
       if (!_.get(this.user, 'id')) {
         this.$message({
           dangerouslyUseHTMLString: true,

+ 281 - 0
src/components/detail-model/businessInfo.vue

@@ -0,0 +1,281 @@
+<template>
+  <div id="businessInfo">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-col :span="24" class="name">
+            <p class="textOver">{{ form.name || '暂无' }}</p>
+            <p>{{ getDate(form.meta) }}</p>
+          </el-col>
+          <el-col :span="12">
+            <el-col :span="8" class="otherInfo textOver">
+              需求程度
+            </el-col>
+            <el-col :span="16" class="otherInfo textOver">
+              {{ form.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">
+              {{ form.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">
+              {{ form.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">
+              {{ form.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(form.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">
+              {{ form.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">
+              {{ form.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">
+              {{ form.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">
+              {{ form.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">
+              {{ form.expect || '暂无' }}
+            </el-col>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="anniu" v-if="showBtn">
+          <el-button type="primary" size="mini" @click="btnPhone()">交流洽谈</el-button>
+          <el-button type="success" size="mini" @click="onSubmit()">供求对接</el-button>
+        </el-col>
+      </el-col>
+    </el-row>
+    <el-dialog title="对接" :visible.sync="dialogTableVisible">
+      <chat :room="room"></chat>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import chat from '@c/chat.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: personRoom } = createNamespacedHelpers('personRoom');
+const { mapActions: dockTranscation } = createNamespacedHelpers('dockTranscation');
+import _ from 'lodash';
+var moment = require('moment');
+export default {
+  name: 'businessInfo',
+  props: {
+    form: { type: Object },
+    showBtn: { type: Boolean, default: () => true },
+  },
+  components: { chat },
+  data: function() {
+    return {
+      dialogTableVisible: false,
+      room: {},
+    };
+  },
+  created() {},
+  methods: {
+    ...personRoom(['create']),
+    ...dockTranscation({ tranCreate: 'create' }),
+    async btnPhone() {
+      if (!this.room.id) {
+        //TODO 请求房间号
+        let obj = {};
+        if (!_.get(this.user, 'id')) {
+          // this.$message.error('游客身份无法与卖家对话,请先注册');
+          this.$message({
+            dangerouslyUseHTMLString: true,
+            message: '<strong><a href="http://broadcast.waityou24.cn/live/login" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
+            type: 'error',
+          });
+          return;
+        } else {
+          obj.p1_id = this.user.id;
+          obj.p1 = this.user.name;
+        }
+        if (!this.form.user_id) {
+          this.$message.error('缺少卖家信息,请联系卖家或管理员');
+          return;
+        } else {
+          obj.p2_id = this.form.user_id;
+          obj.p2 = this.form.contacts;
+        }
+        let res = await this.create(obj);
+        if (this.$checkRes(res)) {
+          this.$set(this, `room`, res.data);
+        }
+      }
+      this.dialogTableVisible = true;
+    },
+    //供求对接
+    async onSubmit() {
+      let data = { product_id: this.form.id, s_id: this.form.user_id, s_name: this.form.company, s_phone: this.form.phone };
+      if (this.dock_id) data.dock_id = this.dock_id;
+      if (!_.get(this.user, 'id')) {
+        this.$message({
+          dangerouslyUseHTMLString: true,
+          message: '<strong><a href="http://broadcast.waityou24.cn/live/login" style="color:red;">游客身份无法与专家进行对接,请先注册</a></strong>',
+          type: 'error',
+        });
+        return;
+      } else {
+        // 需求者信息
+        data.d_id = this.user.id;
+        data.d_name = this.user.name;
+        data.d_phone = this.user.phone;
+      }
+      if (data.d_id === data.s_id) {
+        this.$message.error('您不能对自己进行对接!');
+        return;
+      }
+      const res = await this.tranCreate(data);
+      this.$checkRes(res, '对接成功', res.errmsg || '对接失败');
+    },
+    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 newsDate = moment(date).format('YYYY-MM-DD');
+      if (newsDate) return newsDate;
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    dock_id() {
+      return this.$route.query.dock_id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  margin: 10px 0 0 0;
+  .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;
+
+      //  .otherInfo {
+      //   padding: 10px;
+      //   font-size: 16px;
+      //   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;
+      }
+    }
+  }
+  .anniu {
+    text-align: center;
+    /deep/.el-button {
+      margin: 0 10px;
+    }
+  }
+}
+</style>

+ 2 - 1
src/components/detail-model/expertInfo.vue

@@ -181,7 +181,8 @@ export default {
     },
     //供求对接
     async onSubmit() {
-      let data = { dock_id: this.dock_id, product_id: this.form.user_id, s_id: this.form.user_id, s_name: this.form.name, s_phone: this.form.phone };
+      let data = { product_id: this.form.user_id, s_id: this.form.user_id, s_name: this.form.name, s_phone: this.form.phone };
+      if (this.dock_id) data.dock_id = this.dock_id;
       if (!_.get(this.user, 'id')) {
         this.$message({
           dangerouslyUseHTMLString: true,

+ 2 - 1
src/components/detail-model/techolInfo.vue

@@ -195,7 +195,8 @@ export default {
     },
     //供求对接
     async onSubmit() {
-      let data = { dock_id: this.dock_id, product_id: this.form.id, s_id: this.form.user_id, s_name: this.form.company, s_phone: this.form.phone };
+      let data = { product_id: this.form.id, s_id: this.form.user_id, s_name: this.form.company, s_phone: this.form.phone };
+      if (this.dock_id) data.dock_id = this.dock_id;
       if (!_.get(this.user, 'id')) {
         this.$message({
           dangerouslyUseHTMLString: true,

+ 0 - 149
src/views/admin/live/achieve/apply copy.vue

@@ -1,149 +0,0 @@
-<template>
-  <div id="aApply">
-    <el-row>
-      <el-col :span="24">
-        <el-col :span="24" class="leftTop"> <span>|</span> <span>申请管理</span> </el-col>
-        <el-col :span="24" class="info">
-          <span v-if="display == 'list'">
-            <data-table :fields="fields" :opera="opera" :data="list" :total="total" @check="toCheck"></data-table>
-          </span>
-          <span v-else>
-            <el-col :span="24">
-              <!-- <el-table :data="goodsList" border style="width: 100%">
-                <el-table-column prop="name" label="产品名称" align="center" show-overflow-tooltip> </el-table-column>
-                <el-table-column label="类型" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.type == '0' ? '科技需求' : scope.row.type == '1' ? '技术成果' : '商务服务' }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column prop="contacts" label="联系人" align="center" show-overflow-tooltip> </el-table-column>
-                <el-table-column prop="phone" label="电话" align="center"> </el-table-column>
-                <el-table-column prop="field" label="所属领域" align="center" show-overflow-tooltip> </el-table-column>
-                <el-table-column prop="cooperation" label="合作方式" align="center"> </el-table-column>
-                <el-table-column label="用户状态" align="center">
-                  <template slot-scope="scope">
-                    <span>{{ scope.row.dockStatus == '0' ? '待审核' : scope.row.dockStatus == '1' ? '通过' : '拒绝' }}</span>
-                  </template>
-                </el-table-column>
-                <el-table-column fixed="right" label="操作" align="center">
-                  <template slot-scope="scope">
-                    <el-button @click="toCheck(scope.row)" type="text" size="small">审核</el-button>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <el-col :span="24" class="page">
-                <el-pagination
-                  @current-change="handleCurrentChange1"
-                  :current-page="currentPage1"
-                  layout="total, prev, pager, next, jumper"
-                  :total="goodsTotal"
-                  :page-size="pageSize"
-                >
-                </el-pagination>
-              </el-col> -->
-              <goodsList :list="gList" :total="gTotal" @search="getGoodsList" @check="toGoodsCheck" @back="display = 'list'"></goodsList>
-            </el-col>
-          </span>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import goodsList from './apply/goodsList.vue';
-import dataTable from '@common/src/components/frame/filter-page-table.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: dockUser } = createNamespacedHelpers('dockUser');
-export default {
-  name: 'aApply',
-  props: {},
-  components: { dataTable, goodsList },
-  data: function() {
-    return {
-      display: 'list',
-      opera: [
-        {
-          label: '审核',
-          method: 'check',
-        },
-      ],
-      fields: [
-        { label: '姓名', prop: 'user_name' },
-        { label: '电话', prop: 'contact_tel' },
-        { label: '申请时间', prop: 'apply_time' },
-        { label: '用户状态', prop: 'status', format: i => (i == '1' ? '已通过' : i == '2' ? '已拒绝' : '未审核') },
-      ],
-      list: [],
-      total: 0,
-      gList: [],
-      gTotal: 0,
-      gListIndex: 0,
-      gUserid: '',
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...dockUser(['query', 'update', 'delete', 'goodsCheck']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      info.dock_id = this.user.id;
-      const res = await this.query({ skip, limit, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    toCheck({ index }) {
-      this.display = 'goodsList';
-      this.$set(this, `gListIndex`, index);
-      const list = _.slice(_.get(this.list[this.gListIndex], 'goodsList', []), 0, 20);
-      this.$set(this, `gList`, list);
-      this.$set(this, `gTotal`, _.get(this.list[this.gListIndex], 'goodsList', []).length);
-      this.$set(this, `gUserid`, _.get(this.list[this.gListIndex], 'id'));
-    },
-    getGoodsList({ skip, limit }) {
-      const list = _.slice(_.get(this.list[this.gListIndex], 'goodsList', []), skip, skip + limit);
-      this.$set(this, `gList`, list);
-    },
-    async toGoodsCheck(data) {
-      const res = await this.goodsCheck({ ...data, id: this.gUserid });
-      if (this.$checkRes(res, '审核完成', res.errmsg || '审核失败')) {
-        this.search();
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.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;
-}
-.info {
-  padding: 0 40px 0 10px;
-}
-.page {
-  text-align: center;
-  padding: 10px 0;
-}
-</style>

+ 1 - 27
src/views/market/list/achieve.vue

@@ -4,7 +4,7 @@
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
-      <dmodel :displayBtn="true" :data="detail" v-if="detail" @submit="toSubmit">
+      <dmodel :displayBtn="true" :data="detail" v-if="detail">
         <el-button size="mini" type="primary" @click="$router.push({ path: './list', query: { index: $route.query.index } })"> 返回</el-button>
       </dmodel>
     </template>
@@ -17,7 +17,6 @@ import listPage from '@c/list/list-page.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: product } = createNamespacedHelpers('product');
 const { mapActions: code } = createNamespacedHelpers('code');
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
 export default {
   name: 'achieve',
   props: ['listModel'],
@@ -42,7 +41,6 @@ export default {
     this.search();
   },
   methods: {
-    ...transaction({ getTran: 'query', createTran: 'create' }),
     ...product(['query', 'fetch']),
     ...code({ codeQuery: 'query' }),
     // 查询相关
@@ -96,30 +94,6 @@ export default {
         this.$set(this, `dropList`, newRes);
       }
     },
-    //供求对接
-    async toSubmit(data) {
-      const obj = {
-        supplier: _.get(data, 'user_id'),
-        s_name: _.get(data, 'contacts'),
-        s_phone: _.get(data, 'phone'),
-        product_id: _.get(data, 'id'),
-        product: _.get(data, 'name'),
-        demander: _.get(this.user, 'id'),
-        d_name: _.get(this.user, 'name'),
-        d_phone: _.get(this.user, 'phone'),
-      };
-      if (obj.demander === obj.supplier) {
-        this.$message.error('您不能对自己的成果进行对接!');
-        return;
-      }
-      const list = await this.getTran({ product_id: obj.product_id, demander: obj.demander });
-      if (list.total > 0) {
-        this.$message.warning('您已申请供求对接,无需再次申请!');
-        return;
-      }
-      const res = await this.createTran(obj);
-      this.$checkRes(res, '对接成功', res.errmsg || '对接失败');
-    },
   },
   computed: {
     ...mapState(['user', 'menuParams']),

+ 1 - 28
src/views/market/list/business.vue

@@ -4,7 +4,7 @@
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
-      <dmodel :displayBtn="true" :data="detail" v-if="detail" @submit="toSubmit">
+      <dmodel :displayBtn="true" :data="detail" v-if="detail">
         <el-button size="mini" type="primary" @click="$router.push({ path: './list', query: { index: $route.query.index } })"> 返回</el-button>
       </dmodel>
     </template>
@@ -15,7 +15,6 @@
 import listPage from '@c/list/list-page.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: product } = createNamespacedHelpers('product');
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
 export default {
   name: 'business',
   props: ['listModel'],
@@ -36,7 +35,6 @@ export default {
     this.search();
   },
   methods: {
-    ...transaction({ getTran: 'query', createTran: 'create' }),
     ...product(['query', 'fetch']),
     // 查询相关
     async search({ skip = 0, limit = this.pageSize, ...info } = {}) {
@@ -66,31 +64,6 @@ export default {
         this.$set(this, `detail`, res.data);
       }
     },
-    //供求对接
-    async toSubmit(data) {
-      console.log(data);
-      const obj = {
-        supplier: _.get(data, 'user_id'),
-        s_name: _.get(data, 'contacts'),
-        s_phone: _.get(data, 'phone'),
-        product_id: _.get(data, 'id'),
-        product: _.get(data, 'name'),
-        demander: _.get(this.user, 'id'),
-        d_name: _.get(this.user, 'name'),
-        d_phone: _.get(this.user, 'phone'),
-      };
-      if (obj.demander === obj.supplier) {
-        this.$message.error('您不能对自己的服务进行对接!');
-        return;
-      }
-      const list = await this.getTran({ product_id: obj.product_id, demander: obj.demander });
-      if (list.total > 0) {
-        this.$message.warning('您已申请,无需再次申请!');
-        return;
-      }
-      const res = await this.createTran(obj);
-      this.$checkRes(res, '对接成功', res.errmsg || '对接失败');
-    },
   },
   computed: {
     ...mapState(['user', 'menuParams']),

+ 18 - 318
src/views/market/list/detail-model/model-1.vue

@@ -5,342 +5,42 @@
         <slot></slot>
       </el-col>
     </el-row>
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="top">
-          <el-col :span="7" class="left" v-if="data.image != ''">
-            <el-carousel trigger="click" height="345px" :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="7" v-else class="achieveImage">
-            <p class="name textOver">{{ data.name }}</p>
-            <p class="brief">{{ data.achievebrief }}</p>
-            <p class="other">
-              <span class="textOver">领域:{{ data.field }}</span>
-              <span class="textOver">联系人:{{ data.contacts }}</span>
-            </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 || '暂无' }}
-              </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.achievestatus || '暂无' }}
-              </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.achievesource || '暂无' }}
-              </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.achieveown || '暂无' }}
-              </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.intentionprice || '暂无' }}
-              </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">
-                联系方式
-              </el-col>
-              <el-col :span="16" class="otherInfo textOver">
-                <el-tooltip class="item" effect="dark" placement="top">
-                  <div slot="content">{{ data.email }}/{{ data.qqwx || '暂无' }}</div>
-                  <p class="textOver">{{ data.email }}/{{ data.qqwx || '暂无' }}</p>
-                </el-tooltip>
-              </el-col>
-            </el-col>
-            <el-col :span="24">
-              <el-col :span="4" class="otherInfo textOver">
-                项目路演
-              </el-col>
-              <el-col :span="20" class="otherInfo textOver">
-                <el-link :href="data.roadshow" :underline="false">{{ data.roadshow ? '观看演示文件' : '暂无' }}</el-link>
-              </el-col>
-            </el-col>
-            <el-col :span="24">
-              <el-col :span="4" class="otherInfo textOver">
-                专利信息
-              </el-col>
-              <el-col :span="20" class="otherInfo textOver" style="padding: 6px">
-                <el-button type="primary" size="mini" @click="dialogTableVisible1 = true">专利信息</el-button>
-              </el-col>
-            </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.achievebrief || '暂无' }}
-            </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.features || '暂无' }}
-            </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.team || '暂无' }}
-            </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.condition || '暂无' }}
-            </el-col>
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="anniu" v-if="displayBtn">
-          <el-button type="primary" size="mini" @click="btnPhone()">交流洽谈</el-button>
-          <el-button type="success" size="mini" @click="onSubmit()">供求对接</el-button>
-        </el-col>
-      </el-col>
-    </el-row>
-
-    <el-dialog title="专利信息" :visible.sync="dialogTableVisible1">
-      <el-table :data="data.patent" style="width: 100%" border>
-        <el-table-column prop="patentinfo" label="专利信息" align="center"> </el-table-column>
-        <el-table-column prop="patentstatus" label="专利状态" align="center"> </el-table-column>
-      </el-table>
-    </el-dialog>
-
-    <el-dialog title="对接" :visible.sync="dialogTableVisible" destroy-on-close>
-      <chat :room="room"></chat>
-    </el-dialog>
+    <el-col :span="24" class="two">
+      <achieveInfo :form="data"></achieveInfo>
+    </el-col>
   </div>
 </template>
 
 <script>
-import chat from '@c/chat.vue';
+import achieveInfo from '@c/detail-model/achieveInfo.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const _ = require('lodash');
-const { mapActions: personRoom } = createNamespacedHelpers('personRoom');
 export default {
   name: 'model-1',
   props: {
-    displayBtn: { type: Boolean },
     data: { type: Object, default: () => {} },
   },
-  components: { chat },
+  components: {
+    achieveInfo,
+  },
   data: function() {
-    return {
-      dialogTableVisible: false,
-      dialogTableVisible1: false,
-      room: {},
-    };
+    return {};
   },
   created() {},
-  methods: {
-    ...personRoom(['create']),
-    // 对接
-    async btnPhone() {
-      if (!this.room.id) {
-        //TODO 请求房间号
-        let obj = {};
-        if (!_.get(this.user, 'id')) {
-          // this.$message.error('游客身份无法与卖家对话,请先注册');
-          this.$message({
-            dangerouslyUseHTMLString: true,
-            message: '<strong><a href="http://broadcast.waityou24.cn/live/login" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
-            type: 'error',
-          });
-          return;
-        } else {
-          obj.p1_id = this.user.id;
-          obj.p1 = this.user.name;
-        }
-        if (!this.data.user_id) {
-          this.$message.error('缺少卖家信息,请联系卖家或管理员');
-          return;
-        } else {
-          obj.p2_id = this.data.user_id;
-          obj.p2 = this.data.contacts;
-        }
-        let res = await this.create(obj);
-        if (this.$checkRes(res)) {
-          this.$set(this, `room`, res.data);
-        }
-      }
-      this.dialogTableVisible = true;
-    },
-    // 对接
-    onSubmit() {
-      // TODO 提交申请即可
-      this.$emit('submit', _.cloneDeep(this.data));
-    },
-  },
+  methods: {},
   computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
+    ...mapState(['user']),
   },
   metaInfo() {
     return { title: this.$route.meta.title };
   },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
 };
 </script>
 
-<style lang="less" scoped>
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-  margin: 0;
-  font-weight: 200;
-  font-family: Microsoft yahei;
-  font-size: 18px;
-}
-.main {
-  margin: 10px 0 0 0;
-  .top {
-    height: 360px;
-    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;
-      }
-    }
-    .achieveImage {
-      position: relative;
-      height: 348px;
-      background: url('~@p/技术成果1.png');
-      background-size: 100% 100%;
-      background-repeat: no-repeat;
-      padding: 28px 25px;
-      .name {
-        font-size: 16px;
-        font-weight: bold;
-        margin: 10px 0;
-      }
-      .brief {
-        font-size: 14px;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        -webkit-line-clamp: 11;
-        word-break: break-all;
-        display: -webkit-box;
-        -webkit-box-orient: vertical;
-      }
-      .other {
-        position: absolute;
-        bottom: 10px;
-        width: 82%;
-        font-size: 14px;
-        span {
-          display: inline-block;
-          width: 100%;
-        }
-      }
-    }
-  }
-  .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;
-      }
-    }
-  }
-  .anniu {
-    text-align: center;
-    /deep/.el-button {
-      margin: 0 10px;
-    }
-  }
-}
-</style>
+<style lang="less" scoped></style>

+ 18 - 236
src/views/market/list/detail-model/model-3.vue

@@ -5,260 +5,42 @@
         <slot></slot>
       </el-col>
     </el-row>
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="top">
-          <el-col :span="24" class="name">
-            <p class="textOver">{{ data.name || '暂无' }}</p>
-            <p>{{ data.meta | getDate }}</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 :span="24" class="anniu" v-if="displayBtn">
-          <el-button type="primary" size="mini" @click="btnPhone()">交流洽谈</el-button>
-          <el-button type="success" size="mini" @click="onSubmit()">供求对接</el-button>
-        </el-col>
-      </el-col>
-    </el-row>
-    <el-dialog title="对接" :visible.sync="dialogTableVisible">
-      <chat :room="room"></chat>
-    </el-dialog>
+    <el-col :span="24" class="two">
+      <businessInfo :form="data"></businessInfo>
+    </el-col>
   </div>
 </template>
 
 <script>
-const _ = require('lodash');
-import chat from '@c/chat.vue';
+import businessInfo from '@c/detail-model/businessInfo.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: personRoom } = createNamespacedHelpers('personRoom');
 export default {
   name: 'model-3',
   props: {
-    displayBtn: { type: Boolean },
     data: { type: Object, default: () => {} },
   },
-  components: { chat },
+  components: {
+    businessInfo,
+  },
   data: function() {
-    return {
-      dialogTableVisible: false,
-      room: {},
-    };
+    return {};
   },
   created() {},
-  methods: {
-    ...personRoom(['create']),
-    // 对接
-    async btnPhone() {
-      if (!this.room.id) {
-        //TODO 请求房间号
-        let obj = {};
-        if (!_.get(this.user, 'id')) {
-          // this.$message.error('游客身份无法与卖家对话,请先注册');
-          this.$message({
-            dangerouslyUseHTMLString: true,
-            message: '<strong><a href="http://broadcast.waityou24.cn/live/login" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
-            type: 'error',
-          });
-          return;
-        } else {
-          obj.p1_id = this.user.id;
-          obj.p1 = this.user.name;
-        }
-        if (!this.data.user_id) {
-          this.$message.error('缺少卖家信息,请联系卖家或管理员');
-          return;
-        } else {
-          obj.p2_id = this.data.user_id;
-          obj.p2 = this.data.contacts;
-        }
-        let res = await this.create(obj);
-        if (this.$checkRes(res)) {
-          this.$set(this, `room`, res.data);
-        }
-      }
-      this.dialogTableVisible = true;
-    },
-    // 对接
-    onSubmit() {
-      this.$emit('submit', _.cloneDeep(this.data));
-    },
-    // 隐藏手机号
-    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;
-        }
-      }
-    },
-  },
-  // 过滤时间
-  filters: {
-    getDate(meta) {
-      let createdAt = _.get(meta, `createdAt`);
-      let date = new Date(createdAt)
-        .toLocaleDateString()
-        .replace('/', '-')
-        .replace('/', '-');
-      return date;
-    },
-  },
+  methods: {},
   computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
+    ...mapState(['user']),
   },
   metaInfo() {
     return { title: this.$route.meta.title };
   },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
 };
 </script>
 
-<style lang="less" scoped>
-.main {
-  margin: 10px 0 0 0;
-  .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;
-
-      //  .otherInfo {
-      //   padding: 10px;
-      //   font-size: 16px;
-      //   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;
-      }
-    }
-  }
-  .anniu {
-    text-align: center;
-    /deep/.el-button {
-      margin: 0 10px;
-    }
-  }
-}
-</style>
+<style lang="less" scoped></style>

+ 284 - 0
src/views/market/list/detail-model/model-4 copy.vue

@@ -0,0 +1,284 @@
+<template>
+  <div id="model-4">
+    <el-row type="flex" justify="end">
+      <el-col :span="2">
+        <slot></slot>
+      </el-col>
+    </el-row>
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-col :span="6" class="left">
+            <el-image v-if="data.img_path != null || undefined" :src="data.img_path" style="width:100%;height:220px;"></el-image>
+            <el-image v-else :src="expertimage" style="width:100%;height:220px;"></el-image>
+          </el-col>
+          <el-col :span="18" 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-col>
+            </el-col>
+            <el-col :span="12">
+              <el-col :span="8" class="otherInfo textOver">
+                毕业院校
+              </el-col>
+              <el-col :span="16" class="otherInfo textOver">
+                {{ data.school || '暂无' }}
+              </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.education || '暂无' }}
+              </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.birthDate || '暂无' }}
+              </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.zwzc || '暂无' }}
+              </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">
+                {{ getphone(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">
+                {{ data.email || '暂无' }}
+              </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.expertise || '暂无' }}
+              </el-col>
+            </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.workexperience || '暂无' }}
+            </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.scientific || '暂无' }}
+            </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.undertakingproject || '暂无' }}
+            </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.scienceaward || '暂无' }}
+            </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.social || '暂无' }}
+            </el-col>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="anniu" v-if="displayBtn">
+          <el-button type="primary" size="mini" @click="btnPhone()">交流洽谈</el-button>
+          <el-button type="success" size="mini" @click="onSubmit()">供求对接</el-button>
+        </el-col>
+      </el-col>
+    </el-row>
+    <el-dialog title="对接" :visible.sync="dialogTableVisible">
+      <chat :room="room"></chat>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import chat from '@c/chat.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const _ = require('lodash');
+const { mapActions: personRoom } = createNamespacedHelpers('personRoom');
+export default {
+  name: 'model-4',
+  props: {
+    displayBtn: { type: Boolean },
+    data: { type: Object, default: () => {} },
+  },
+  components: { chat },
+  data: function() {
+    return {
+      expertimage: require('@p/live/222.png'),
+      dialogTableVisible: false,
+      room: {},
+    };
+  },
+  created() {},
+  methods: {
+    ...personRoom(['create']),
+    // 对接
+    async btnPhone() {
+      if (!this.room.id) {
+        //TODO 请求房间号
+        let obj = {};
+        if (!_.get(this.user, 'id')) {
+          // this.$message.error('游客身份无法与卖家对话,请先注册');
+          this.$message({
+            dangerouslyUseHTMLString: true,
+            message: '<strong><a href="http://broadcast.waityou24.cn/live/login" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
+            type: 'error',
+          });
+          return;
+        } else {
+          obj.p1_id = this.user.id;
+          obj.p1 = this.user.name;
+        }
+        if (!this.data.id) {
+          this.$message.error('缺少专家信息,请联系管理员');
+          return;
+        } else {
+          obj.p2_id = this.data.id;
+          obj.p2 = this.data.name;
+        }
+        let res = await this.create(obj);
+        if (this.$checkRes(res)) {
+          this.$set(this, `room`, res.data);
+        }
+      }
+      this.dialogTableVisible = true;
+    },
+    // 对接
+    onSubmit() {
+      this.$emit('submit', _.cloneDeep(this.data));
+    },
+    // 隐藏手机号
+    getphone(value) {
+      if (value == undefined) {
+        return '暂无';
+      } else {
+        if (value.length === 11 || value.length === 12) {
+          let start = value.slice(0, 4);
+          let end = value.slice(-3);
+          return `${start}****${end}`;
+        } else if (value.length === 20) {
+          let start = value.slice(0, 13);
+          let end = value.slice(-3);
+          return `${start}****${end}`;
+        } else {
+          return value;
+        }
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user', 'menuParams']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  margin: 0;
+  font-weight: 200;
+  font-family: Microsoft yahei;
+  font-size: 18px;
+}
+.main {
+  margin: 10px 0 0 0;
+  .top {
+    height: 230px;
+    overflow: hidden;
+    .right {
+      padding: 0 0 0 10px;
+      .name {
+        font-size: 18px;
+        font-weight: bold;
+        padding: 10px;
+        text-align: center;
+        border: 1px solid #ccc;
+      }
+      .otherInfo {
+        font-size: 16px;
+        padding: 10px;
+        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;
+      }
+    }
+  }
+  .anniu {
+    text-align: center;
+    /deep/.el-button {
+      margin: 0 10px;
+    }
+  }
+}
+</style>

+ 18 - 258
src/views/market/list/detail-model/model-4.vue

@@ -5,280 +5,40 @@
         <slot></slot>
       </el-col>
     </el-row>
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="top">
-          <el-col :span="6" class="left">
-            <el-image v-if="data.img_path != null || undefined" :src="data.img_path" style="width:100%;height:220px;"></el-image>
-            <el-image v-else :src="expertimage" style="width:100%;height:220px;"></el-image>
-          </el-col>
-          <el-col :span="18" 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-col>
-            </el-col>
-            <el-col :span="12">
-              <el-col :span="8" class="otherInfo textOver">
-                毕业院校
-              </el-col>
-              <el-col :span="16" class="otherInfo textOver">
-                {{ data.school || '暂无' }}
-              </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.education || '暂无' }}
-              </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.birthDate || '暂无' }}
-              </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.zwzc || '暂无' }}
-              </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">
-                {{ getphone(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">
-                {{ data.email || '暂无' }}
-              </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.expertise || '暂无' }}
-              </el-col>
-            </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.workexperience || '暂无' }}
-            </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.scientific || '暂无' }}
-            </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.undertakingproject || '暂无' }}
-            </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.scienceaward || '暂无' }}
-            </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.social || '暂无' }}
-            </el-col>
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="anniu" v-if="displayBtn">
-          <el-button type="primary" size="mini" @click="btnPhone()">交流洽谈</el-button>
-          <el-button type="success" size="mini" @click="onSubmit()">供求对接</el-button>
-        </el-col>
-      </el-col>
-    </el-row>
-    <el-dialog title="对接" :visible.sync="dialogTableVisible">
-      <chat :room="room"></chat>
-    </el-dialog>
+    <el-col :span="24" class="two">
+      <expertInfo :form="data"></expertInfo>
+    </el-col>
   </div>
 </template>
 
 <script>
-import chat from '@c/chat.vue';
+import expertInfo from '@c/detail-model/expertInfo.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const _ = require('lodash');
-const { mapActions: personRoom } = createNamespacedHelpers('personRoom');
 export default {
   name: 'model-4',
-  props: {
-    displayBtn: { type: Boolean },
-    data: { type: Object, default: () => {} },
+  props: { data: { type: Object, default: () => {} } },
+  components: {
+    expertInfo,
   },
-  components: { chat },
   data: function() {
-    return {
-      expertimage: require('@p/live/222.png'),
-      dialogTableVisible: false,
-      room: {},
-    };
+    return {};
   },
   created() {},
-  methods: {
-    ...personRoom(['create']),
-    // 对接
-    async btnPhone() {
-      if (!this.room.id) {
-        //TODO 请求房间号
-        let obj = {};
-        if (!_.get(this.user, 'id')) {
-          // this.$message.error('游客身份无法与卖家对话,请先注册');
-          this.$message({
-            dangerouslyUseHTMLString: true,
-            message: '<strong><a href="http://broadcast.waityou24.cn/live/login" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
-            type: 'error',
-          });
-          return;
-        } else {
-          obj.p1_id = this.user.id;
-          obj.p1 = this.user.name;
-        }
-        if (!this.data.id) {
-          this.$message.error('缺少专家信息,请联系管理员');
-          return;
-        } else {
-          obj.p2_id = this.data.id;
-          obj.p2 = this.data.name;
-        }
-        let res = await this.create(obj);
-        if (this.$checkRes(res)) {
-          this.$set(this, `room`, res.data);
-        }
-      }
-      this.dialogTableVisible = true;
-    },
-    // 对接
-    onSubmit() {
-      this.$emit('submit', _.cloneDeep(this.data));
-    },
-    // 隐藏手机号
-    getphone(value) {
-      if (value == undefined) {
-        return '暂无';
-      } else {
-        if (value.length === 11 || value.length === 12) {
-          let start = value.slice(0, 4);
-          let end = value.slice(-3);
-          return `${start}****${end}`;
-        } else if (value.length === 20) {
-          let start = value.slice(0, 13);
-          let end = value.slice(-3);
-          return `${start}****${end}`;
-        } else {
-          return value;
-        }
-      }
-    },
-  },
+  methods: {},
   computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
+    ...mapState(['user']),
   },
   metaInfo() {
     return { title: this.$route.meta.title };
   },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
 };
 </script>
 
-<style lang="less" scoped>
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-  margin: 0;
-  font-weight: 200;
-  font-family: Microsoft yahei;
-  font-size: 18px;
-}
-.main {
-  margin: 10px 0 0 0;
-  .top {
-    height: 230px;
-    overflow: hidden;
-    .right {
-      padding: 0 0 0 10px;
-      .name {
-        font-size: 18px;
-        font-weight: bold;
-        padding: 10px;
-        text-align: center;
-        border: 1px solid #ccc;
-      }
-      .otherInfo {
-        font-size: 16px;
-        padding: 10px;
-        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;
-      }
-    }
-  }
-  .anniu {
-    text-align: center;
-    /deep/.el-button {
-      margin: 0 10px;
-    }
-  }
-}
-</style>
+<style lang="less" scoped></style>

+ 18 - 279
src/views/market/list/detail-model/model-5.vue

@@ -5,303 +5,42 @@
         <slot></slot>
       </el-col>
     </el-row>
-    <el-row>
-      <el-col :span="24" class="main">
-        <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="7" v-else class="achieveImage">
-            <p>紧急程度</p>
-            <p><el-rate v-model="value" disabled :max="max" :texts="texts" :colors="colors"> </el-rate></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="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 :span="24" class="anniu" v-if="displayBtn">
-          <el-button type="primary" size="mini" @click="btnPhone()">交流洽谈</el-button>
-          <el-button type="success" size="mini" @click="onSubmit()">供求对接</el-button>
-        </el-col>
-      </el-col>
-    </el-row>
-    <el-dialog title="对接" :visible.sync="dialogTableVisible">
-      <chat :room="room"></chat>
-    </el-dialog>
+    <el-col :span="24" class="two">
+      <techolInfo :form="data"></techolInfo>
+    </el-col>
   </div>
 </template>
 
 <script>
-import chat from '@c/chat.vue';
+import techolInfo from '@c/detail-model/techolInfo.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const _ = require('lodash');
-const { mapActions: personRoom } = createNamespacedHelpers('personRoom');
 export default {
   name: 'model-5',
   props: {
-    displayBtn: { type: Boolean },
     data: { type: Object, default: () => {} },
   },
-  components: { chat },
+  components: {
+    techolInfo,
+  },
   data: function() {
-    return {
-      achievezb: require('@p/3.png'),
-      dialogTableVisible: false,
-      room: {},
-      value: 1,
-      max: 3,
-      colors: ['#ff0000', '#ff0000', '#ff0000'],
-      texts: ['一般', '紧急', '长期'],
-    };
+    return {};
   },
   created() {},
-  methods: {
-    ...personRoom(['create']),
-    // 对接
-    async btnPhone() {
-      if (!this.room.id) {
-        //TODO 请求房间号
-        let obj = {};
-        if (!_.get(this.user, 'id')) {
-          // this.$message.error('游客身份无法与卖家对话,请先注册');
-          this.$message({
-            dangerouslyUseHTMLString: true,
-            message: '<strong><a href="http://broadcast.waityou24.cn/live/login" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
-            type: 'error',
-          });
-          return;
-        } else {
-          obj.p1_id = this.user.id;
-          obj.p1 = this.user.name;
-        }
-        if (!this.data.user_id) {
-          this.$message.error('缺少卖家信息,请联系卖家或管理员');
-          return;
-        } else {
-          obj.p2_id = this.data.user_id;
-          obj.p2 = this.data.contacts;
-        }
-        let res = await this.create(obj);
-        if (this.$checkRes(res)) {
-          this.$set(this, `room`, res.data);
-        }
-      }
-      this.dialogTableVisible = true;
-    },
-    // 对接
-    onSubmit() {
-      this.$emit('submit', _.cloneDeep(this.data));
-    },
-    // 隐藏手机号
-    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;
-        }
-      }
-    },
-  },
+  methods: {},
   computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
+    ...mapState(['user']),
   },
   metaInfo() {
     return { title: this.$route.meta.title };
   },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
 };
 </script>
 
-<style lang="less" scoped>
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-  margin: 0;
-  font-weight: 200;
-  font-family: Microsoft yahei;
-  font-size: 18px;
-}
-.main {
-  margin: 10px 0 0 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;
-      }
-    }
-  }
-  .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;
-      }
-    }
-  }
-  .anniu {
-    text-align: center;
-    /deep/.el-button {
-      margin: 0 10px;
-    }
-  }
-  .achieveImage {
-    height: 305px;
-    overflow: hidden;
-    p:nth-child(1) {
-      font-size: 25px;
-      text-align: left;
-      padding: 10px 0;
-    }
-    p:nth-child(2) {
-      margin: 60px 0 0 0;
-      text-align: center;
-      .el-rate__icon {
-        font-size: 60px;
-      }
-    }
-  }
-}
-/deep/.el-rate__icon {
-  font-size: 60px;
-}
-</style>
+<style lang="less" scoped></style>

+ 1 - 27
src/views/market/list/expert.vue

@@ -13,7 +13,7 @@
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
-      <dmodel :displayBtn="true" :data="detail" v-if="detail" @submit="toSubmit">
+      <dmodel :displayBtn="true" :data="detail" v-if="detail">
         <el-button size="mini" type="primary" @click="$router.push({ path: './list', query: { index: $route.query.index } })"> 返回</el-button>
       </dmodel>
     </template>
@@ -25,7 +25,6 @@ import listPage from '@c/list/list-page.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: expert } = createNamespacedHelpers('expert');
 const { mapActions: code } = createNamespacedHelpers('code');
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
 export default {
   name: 'expert',
   props: ['listModel'],
@@ -49,7 +48,6 @@ export default {
     this.search();
   },
   methods: {
-    ...transaction({ getTran: 'query', createTran: 'create' }),
     ...expert(['query', 'fetch']),
     ...code({ codeQuery: 'query' }),
     // 查询相关
@@ -91,30 +89,6 @@ export default {
         this.$set(this, `dropList`, newRes);
       }
     },
-    //供求对接
-    async toSubmit(data) {
-      const obj = {
-        supplier: _.get(data, 'id'),
-        s_name: _.get(data, 'name'),
-        s_phone: _.get(data, 'phone'),
-        product_id: _.get(data, 'id'),
-        product: _.get(data, 'name'),
-        demander: _.get(this.user, 'id'),
-        d_name: _.get(this.user, 'name'),
-        d_phone: _.get(this.user, 'phone'),
-      };
-      if (obj.demander === obj.supplier) {
-        this.$message.error('您不能对自己进行对接!');
-        return;
-      }
-      const list = await this.getTran({ product_id: obj.product_id, demander: obj.demander });
-      if (list.total > 0) {
-        this.$message.warning('您已申请供求对接,无需再次申请!');
-        return;
-      }
-      const res = await this.createTran(obj);
-      this.$checkRes(res, '对接成功', res.errmsg || '对接失败');
-    },
   },
   computed: {
     ...mapState(['user', 'menuParams']),

+ 1 - 27
src/views/market/list/technolgy.vue

@@ -4,7 +4,7 @@
       <component :is="model" :list="list"></component>
     </list-page>
     <template v-else>
-      <dmodel :displayBtn="true" :data="detail" v-if="detail" @submit="toSubmit">
+      <dmodel :displayBtn="true" :data="detail" v-if="detail">
         <el-button size="mini" type="primary" @click="$router.push({ path: './list', query: { index: $route.query.index } })"> 返回</el-button>
       </dmodel>
     </template>
@@ -15,7 +15,6 @@
 import listPage from '@c/list/list-page.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: product } = createNamespacedHelpers('product');
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
 export default {
   name: 'technolgy',
   props: ['listModel'],
@@ -36,7 +35,6 @@ export default {
     this.search();
   },
   methods: {
-    ...transaction({ getTran: 'query', createTran: 'create' }),
     ...product(['query', 'fetch']),
     // 查询相关
     async search({ skip = 0, limit = this.pageSize, ...info } = {}) {
@@ -66,30 +64,6 @@ export default {
         this.$set(this, `detail`, res.data);
       }
     },
-    //供求对接
-    async toSubmit(data) {
-      const obj = {
-        supplier: _.get(data, 'user_id'),
-        s_name: _.get(data, 'contacts'),
-        s_phone: _.get(data, 'phone'),
-        product_id: _.get(data, 'id'),
-        product: _.get(data, 'name'),
-        demander: _.get(this.user, 'id'),
-        d_name: _.get(this.user, 'name'),
-        d_phone: _.get(this.user, 'phone'),
-      };
-      if (obj.demander === obj.supplier) {
-        this.$message.error('您不能对自己的成果进行对接!');
-        return;
-      }
-      const list = await this.getTran({ product_id: obj.product_id, demander: obj.demander });
-      if (list.total > 0) {
-        this.$message.warning('您已申请供求对接,无需再次申请!');
-        return;
-      }
-      const res = await this.createTran(obj);
-      this.$checkRes(res, '对接成功', res.errmsg || '对接失败');
-    },
   },
   computed: {
     ...mapState(['user', 'menuParams']),