guhongwei 5 年 前
コミット
682cfe501f

+ 75 - 4
src/views/dynamic/dealDetail.vue

@@ -26,7 +26,18 @@
                 <el-col :span="17" class="centerInfo">
                   <el-image :src="infoUrl"></el-image>
                   <el-col :span="24" class="message">
-                    xinxi
+                    <el-col :span="12" class="messageLeft">
+                      <p>项目名称</p>
+                      <p>产品名称:{{ dealDetails.product_name }}</p>
+                      <p>发布时间:{{ dealDetails.meta | getDate }}</p>
+                      <p>产品说明:{{ dealDetails.description }}</p>
+                    </el-col>
+                    <el-col :span="12" class="messageRight">
+                      <p :span="24">购买人:{{ dealDetails.username }}</p>
+                      <el-col :span="24" v-if="dealDetails.pic">
+                        <el-image style="width:100%;height:400px;" :src="dealDetails.pic"></el-image>
+                      </el-col>
+                    </el-col>
                   </el-col>
                 </el-col>
               </el-col>
@@ -47,7 +58,7 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions } = createNamespacedHelpers('transaction');
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
 export default {
   name: 'dealDetail',
   props: {},
@@ -66,12 +77,30 @@ export default {
     },
   },
   methods: {
-    ...mapActions(['fetch']),
+    ...transaction(['fetch']),
     async search() {
       let res = await this.fetch(this.id);
       res.data.status = parseInt(res.data.status);
+      // this.$set(this, `dealDetails`, res.data);
+      // if (res.data.status == 0) {
+      //   res.data.status = res.data.status + 1;
+      // } else if (res.data.status == 1) {
+      //   res.data.status = res.data.status + 1;
+      // } else if (res.data.status == 2) {
+      //   res.data.status = res.data.status + 1;
+      // }
+      res.data.status = res.data.status + 1;
       this.$set(this, `dealDetails`, res.data);
-      console.log(res);
+    },
+  },
+  filters: {
+    getDate(meta) {
+      let createdAt = _.get(meta, `createdAt`);
+      let date = new Date(createdAt)
+        .toLocaleDateString()
+        .replace('/', '-')
+        .replace('/', '-');
+      return date;
     },
   },
 };
@@ -161,6 +190,48 @@ export default {
   left: 14%;
   width: 77%;
   height: 455px;
+  overflow: hidden;
+}
+// .main .two .info .center .centerInfo .message .messageLeft {
+// }
+.main .two .info .center .centerInfo .message .messageLeft p:first-child {
+  text-align: center;
+  font-size: 30px;
+  font-family: 黑体;
+  letter-spacing: 10px;
+  padding: 0 0 15px 0;
+}
+.main .two .info .center .centerInfo .message .messageLeft p:nth-child(2) {
+  font-size: 22px;
+  font-family: 黑体;
+  padding: 0 10px 15px 10px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.main .two .info .center .centerInfo .message .messageLeft p:nth-child(3) {
+  font-size: 22px;
+  font-family: 黑体;
+  padding: 0 10px 15px 10px;
+}
+.main .two .info .center .centerInfo .message .messageLeft p:nth-child(4) {
+  font-size: 22px;
+  font-family: 黑体;
+  padding: 0 10px 15px 10px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-line-clamp: 12;
+  word-break: break-all;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  line-height: 27px;
+}
+// .main .two .info .center .centerInfo .message .messageRight {
+// }
+.main .two .info .center .centerInfo .message .messageRight p {
+  font-size: 30px;
+  font-family: 黑体;
+  padding: 0 10px 15px 10px;
 }
 .main .two .info .right {
   width: 20px;

+ 7 - 7
src/views/dynamic/index.vue

@@ -96,7 +96,7 @@ export default {
 .dataShow {
   float: left;
   width: 100%;
-  height: 709px;
+  height: 675px;
   overflow: hidden;
   margin: 0 0 30px 0;
 }
@@ -120,12 +120,12 @@ export default {
 .dataShow .dataShowInfo {
   float: left;
   width: 100%;
-  height: 707px;
+  height: 670px;
 }
 .dataShow .dataShowInfo .left {
   float: left;
   width: 33%;
-  height: 707px;
+  height: 670px;
 }
 .dataShow .dataShowInfo .left p:first-child {
   float: left;
@@ -138,7 +138,7 @@ export default {
 .dataShow .dataShowInfo .left p:last-child {
   float: left;
   width: 2px;
-  height: 606px;
+  height: 570px;
   background: #003e70;
   margin: 0;
   position: relative;
@@ -147,19 +147,19 @@ export default {
 .dataShow .dataShowInfo .center {
   float: left;
   width: 33%;
-  height: 707px;
+  height: 670px;
   // border: 1px solid red;
 }
 .dataShow .dataShowInfo .right {
   float: left;
   width: 34%;
-  height: 707px;
+  height: 670px;
   // border: 1px solid red;
 }
 .dataShow .dataShowInfo .right p:first-child {
   float: left;
   width: 2px;
-  height: 606px;
+  height: 570px;
   background: #003e70;
   margin: 0;
   position: relative;

+ 4 - 1
src/views/dynamic/parts/down-pie.vue

@@ -12,7 +12,9 @@
             <el-table-column prop="username" label="采购单位" align="center"> </el-table-column>
             <el-table-column prop="status" label="交易状态" align="center">
               <template v-slot="scoped">
-                {{ `${scoped.row.status}` === `0` ? '正在洽谈' : `${scoped.row.status}` === `1` ? '达成意向' : '交易完成' }}
+                {{
+                  `${scoped.row.status}` === `0` ? '正在洽谈' : `${scoped.row.status}` === `1` ? '达成意向' : `${scoped.row.status}` === `2` ? '交易完成' : ''
+                }}
               </template>
             </el-table-column>
             <el-table-column label="操作" width="100" align="center">
@@ -65,6 +67,7 @@ export default {
       if (this.$checkRes(res)) {
         let arr = res.data.filter(f => f.status != '3');
         let newArr = _.chunk(arr, 6);
+        console.log(newArr[0]);
         this.$set(this, `tableData`, newArr[0]);
         let taking = rooms.errcode == 0 ? rooms.total : 0;
         let s1 = res.data.filter(f => f.status == '1'); //达成意向