wuhongyu 4 år sedan
förälder
incheckning
ffdcf6edf3

+ 135 - 0
src/layout/myProduct/prodDetails.vue

@@ -0,0 +1,135 @@
+<template>
+  <div id="prodDetails">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <el-carousel trigger="click" class="carousel">
+            <template v-if="productInfo.image && productInfo.image.length > 0">
+              <el-carousel-item v-for="(item, index) in productInfo.image" :key="index">
+                <el-image :src="item.url" style="width:100%"> </el-image>
+              </el-carousel-item>
+            </template>
+          </el-carousel>
+          <p class="textOver">{{ productInfo.name }}</p>
+        </el-col>
+        <el-col :span="24" class="message">
+          <p>
+            <span>产品类型</span>
+            <span>{{ productInfo.totaltype === '0' ? '技术' : productInfo.totaltype === '1' ? '产品' : productInfo.totaltype === '2' ? '服务' : '暂无' }}</span>
+          </p>
+          <p>
+            <span>类型</span>
+            <span>{{ productInfo.product_type_name || '暂无' }}</span>
+          </p>
+          <p>
+            <span>研发阶段</span>
+            <span>{{ productInfo.phase == 1 ? '阶段成果' : productInfo.phase == 2 ? '最终成果' : '暂无' }}</span>
+          </p>
+          <p>
+            <span>交易方式</span>
+            <span>{{ productInfo.business === '0' ? '公用' : productInfo.business === '1' ? '转让' : productInfo.business === '2' ? '竞价' : '暂无' }}</span>
+          </p>
+          <p>
+            <span>应用领域</span>
+            <span>{{ productInfo.field || '暂无' }}</span>
+          </p>
+          <p>
+            <span>服务范围</span>
+            <span>{{ productInfo.scope || '暂无' }}</span>
+          </p>
+          <p>
+            <span>产品单价</span>
+            <span>{{ productInfo.price }}/{{ productInfo.priceunit }}</span>
+          </p>
+          <p>
+            <span>联系人</span>
+            <span>{{ productInfo.contact_user }}</span>
+          </p>
+          <p>
+            <span>联系电话</span>
+            <span>{{ productInfo.contact_tel }}</span>
+          </p>
+          <div class="introduction">
+            <p>产品简介</p>
+            <p>{{ productInfo.introduction }}</p>
+          </div>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'prodDetails',
+  props: {
+    productInfo: null,
+  },
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  .top {
+    background: #fff;
+    min-height: 250px;
+    padding: 0 15px;
+    margin: 0 0 10px 0;
+    .carousel {
+      height: 200px !important;
+      padding: 10px 0;
+    }
+    .el-image {
+      width: 100%;
+      height: 200px;
+    }
+    p {
+      font-size: 18px;
+      color: #000;
+      padding: 0 0 10px 0;
+    }
+  }
+  .message {
+    background: #fff;
+    padding: 0 15px;
+    min-height: 50px;
+    p {
+      min-height: 50px;
+      line-height: 50px;
+      border-bottom: 1px solid #ccc;
+    }
+    span:first-child {
+      display: inline-block;
+      width: 80px;
+      color: #ccc;
+    }
+    span:last-child {
+      color: #000;
+    }
+    div {
+      p {
+        border-bottom: none;
+      }
+    }
+  }
+}
+/deep/.el-carousel__container {
+  height: 200px !important;
+}
+</style>

+ 9 - 0
src/router/index.js

@@ -70,6 +70,15 @@ const routes = [
     meta: { title: '我的发布', isleftarrow: true },
     component: () => import('../views/userCenter/myProduct/index.vue'),
   },
+
+  //用户-我的发布详情
+  {
+    path: '/userCenter/myProduct/detailinfo',
+    name: 'myProduct_detailinfo',
+    meta: { title: '产品详情', isleftarrow: true },
+    component: () => import('../views/userCenter/myProduct/detailinfo.vue'),
+  },
+
   // 用户-发布产品
   {
     path: '/userCenter/myProduct/detail',

+ 1 - 0
src/views/userCenter/matter/index.vue

@@ -65,6 +65,7 @@ export default {
     // 返回
     navShow: true,
     img_path: require('@/assets/logo.png'),
+    active: 1,
   }),
   created() {},
   computed: {},

+ 9 - 2
src/views/userCenter/matter/parts/intentionList.vue

@@ -2,8 +2,11 @@
   <div id="auditList">
     <el-row>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" @click.native="$router.push({ path: '/userCenter/matter/detailinfo' })" v-for="(item, index) in list" :key="index">
-          <p class="textOver">{{ item.product_name }}</p>
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <p class="textOver">
+            <span @click="$router.push({ path: '/userCenter/matter/detailinfo' })">{{ item.product_name }}</span>
+            <span style="float:right"><van-button type="info" size="small" @click="submit">交易成功</van-button></span>
+          </p>
           <p>
             <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无phase' }}</span>
             <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
@@ -81,6 +84,10 @@ export default {
       //   this.$set(this, `list`, res.data);
       // }
     },
+
+    submit() {
+      console.log('submit');
+    },
   },
   computed: {
     ...mapState(['user']),

+ 7 - 3
src/views/userCenter/matter/parts/negotiation.vue

@@ -2,10 +2,10 @@
   <div id="auditList">
     <el-row>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" @click.native="$router.push({ path: '/userCenter/matter/detailinfo' })" v-for="(item, index) in list" :key="index">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
           <p class="textOver">
-            <span>{{ item.product_name }}</span>
-            <span><van-button type="primary" size="mini">主要按钮</van-button><van-button type="primary" size="mini">主要按钮</van-button></span>
+            <span @click="$router.push({ path: '/userCenter/matter/detailinfo' })">{{ item.product_name }}</span>
+            <span style="float:right"><van-button type="info" size="small" @click="submit">同意交易</van-button></span>
           </p>
           <p>
             <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无phase' }}</span>
@@ -84,6 +84,10 @@ export default {
       //   this.$set(this, `list`, res.data);
       // }
     },
+
+    submit() {
+      console.log('submit');
+    },
   },
   computed: {
     ...mapState(['user']),

+ 9 - 2
src/views/userCenter/matter/parts/transaction.vue

@@ -2,8 +2,11 @@
   <div id="auditList">
     <el-row>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" @click.native="$router.push({ path: '/userCenter/matter/detailinfo' })" v-for="(item, index) in list" :key="index">
-          <p class="textOver">{{ item.product_name }}</p>
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <p class="textOver">
+            <span @click="$router.push({ path: '/userCenter/matter/detailinfo' })">{{ item.product_name }}</span>
+            <!-- <span style="float:right"><van-button type="primary" size="mini" @click="submit">同意交易</van-button></span> -->
+          </p>
           <p>
             <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无phase' }}</span>
             <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
@@ -81,6 +84,10 @@ export default {
       //   this.$set(this, `list`, res.data);
       // }
     },
+
+    submit() {
+      console.log('submit');
+    },
   },
   computed: {
     ...mapState(['user']),

+ 9 - 2
src/views/userCenter/matter/parts/wholeList.vue

@@ -2,8 +2,11 @@
   <div id="auditList">
     <el-row>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" @click.native="$router.push({ path: '/userCenter/matter/detailinfo' })" v-for="(item, index) in list" :key="index">
-          <p class="textOver">{{ item.product_name }}</p>
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <p class="textOver">
+            <span @click="$router.push({ path: '/userCenter/matter/detailinfo' })">{{ item.product_name }}</span>
+            <!-- <span style="float:right"><van-button type="primary" size="mini" @click="submit">同意交易</van-button></span> -->
+          </p>
           <p>
             <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无phase' }}</span>
             <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
@@ -81,6 +84,10 @@ export default {
       //   this.$set(this, `list`, res.data);
       // }
     },
+
+    submit() {
+      console.log('submit');
+    },
   },
   computed: {
     ...mapState(['user']),

+ 80 - 0
src/views/userCenter/myProduct/detailinfo.vue

@@ -0,0 +1,80 @@
+<template>
+  <div id="">
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
+        </el-col>
+        <el-col :span="24" class="main">
+          <prodDetails :productInfo="productInfo"></prodDetails>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import NavBar from '@/layout/common/topInfo.vue';
+import prodDetails from '@/layout/myProduct/prodDetails.vue';
+export default {
+  name: 'prodDetail',
+  props: {},
+  components: {
+    NavBar,
+    prodDetails, //详情
+  },
+  data: () => ({
+    // 头部标题
+    title: '',
+    // meta为true
+    isleftarrow: '',
+    // 返回
+    navShow: true,
+    // 产品名称
+    productInfo: {
+      image: [
+        {
+          url: require('@/assets/test.jpg'),
+        },
+      ],
+      name: '产品名称',
+      totaltype: '0',
+      product_type_name: '科研',
+      phase: '1', //研发阶段
+      business: '0', //交易方式
+      field: '应用领域',
+      scope: '服务范围',
+      price: '100', //单价
+      priceunit: '公斤', //单位
+      contact_user: '联系人',
+      contact_tel: '17319450324',
+      introduction: '产品简介',
+    },
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+  mounted() {
+    this.title = this.$route.meta.title;
+    this.isleftarrow = this.$route.meta.isleftarrow;
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.style {
+  width: 100%;
+  min-height: 667px;
+  position: relative;
+  background-color: #f9fafc;
+}
+.top {
+  height: 46px;
+  overflow: hidden;
+  position: relative;
+  z-index: 999;
+}
+.main {
+  min-height: 570px;
+}
+</style>

+ 8 - 6
src/views/userCenter/myProduct/parts/auditList.vue

@@ -1,9 +1,11 @@
 <template>
-  <div id="auditList">
+  <div id="noauditList">
     <el-row>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" @click.native="$router.push({ path: '/market/prodDetail' })" v-for="(item, index) in list" :key="index">
-          <p class="textOver">{{ item.name }}</p>
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <p class="textOver">
+            <span @click="$router.push({ path: '/userCenter/myProduct/detailinfo' })">{{ item.name }}</span>
+          </p>
           <p>
             <span class="ptwo"><span>产品类型:</span>{{ item.product_type_name || '暂无' }}</span>
             <span class="ptwo"><span>研发阶段:</span>{{ item.phase == 1 ? '阶段成果' : item.phase == 2 ? '最终成果' : '暂无' }}</span>
@@ -19,20 +21,20 @@
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: product } = createNamespacedHelpers('marketproduct');
 export default {
-  name: 'auditList',
+  name: 'noauditList',
   props: {},
   components: {},
   data: function() {
     return {
       list: [
         {
-          name: '最最新新技术',
+          name: '新技术',
           product_type_name: '技术',
           phase: '1',
           field: '最新技术',
         },
         {
-          name: '最最新新技术',
+          name: '新技术',
           product_type_name: '技术',
           phase: '1',
           field: '最新技术',

+ 7 - 2
src/views/userCenter/myProduct/parts/caogaoList.vue

@@ -2,8 +2,12 @@
   <div id="technologyList">
     <el-row>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" @click.native="$router.push({ path: '/market/prodDetail' })" v-for="(item, index) in list" :key="index">
-          <p class="textOver">{{ item.name }}</p>
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <p class="textOver">
+            <span @click="$router.push({ path: '/userCenter/myProduct/detailinfo' })">{{ item.name }}</span>
+            <span style="float:right"><van-button type="info" size="small" @click="submit">删除</van-button></span>
+          </p>
+
           <p>
             <span class="ptwo"><span>产品类型:</span>{{ item.product_type_name || '暂无' }}</span>
             <span class="ptwo"><span>研发阶段:</span>{{ item.phase == 1 ? '阶段成果' : item.phase == 2 ? '最终成果' : '暂无' }}</span>
@@ -51,6 +55,7 @@ export default {
       //   this.$set(this, `list`, res.data);
       // }
     },
+    submit() {},
   },
   computed: {
     ...mapState(['user']),

+ 4 - 2
src/views/userCenter/myProduct/parts/noauditList.vue

@@ -2,8 +2,10 @@
   <div id="noauditList">
     <el-row>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="list" @click.native="$router.push({ path: '/market/prodDetail' })" v-for="(item, index) in list" :key="index">
-          <p class="textOver">{{ item.name }}</p>
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <p class="textOver">
+            <span @click="$router.push({ path: '/userCenter/myProduct/detailinfo' })">{{ item.name }}</span>
+          </p>
           <p>
             <span class="ptwo"><span>产品类型:</span>{{ item.product_type_name || '暂无' }}</span>
             <span class="ptwo"><span>研发阶段:</span>{{ item.phase == 1 ? '阶段成果' : item.phase == 2 ? '最终成果' : '暂无' }}</span>