gydx_wx 2 tháng trước cách đây
mục cha
commit
642edda8c2
1 tập tin đã thay đổi với 64 bổ sung10 xóa
  1. 64 10
      gydxnbplus/src/views/CompetitiveM.vue

+ 64 - 10
gydxnbplus/src/views/CompetitiveM.vue

@@ -84,8 +84,8 @@
             <el-table-column prop="ResultUnit" label="中标单位"></el-table-column>
             <el-table-column prop="ResultPrice" label="中标价格"></el-table-column>
             <el-table-column prop="EntrustPerson" label="委托方"></el-table-column>
+            <el-table-column prop="PriceMin" label="价格下限"></el-table-column>
             <el-table-column prop="PriceMax" label="价格上限"></el-table-column>
-            <el-table-column prop="'PriceMin" label="价格下限"></el-table-column>
           </el-table>
         </el-row>
       </el-aside>
@@ -144,6 +144,8 @@
             <el-table-column prop="OnePrice" label="第一轮报价"></el-table-column>
             <el-table-column prop="TwoTime" label="第二轮竞价时间"></el-table-column>
             <el-table-column prop="TwoPrice" label="第二轮报价"></el-table-column>
+            <el-table-column prop="ThirdTime" label="第三轮竞价时间"></el-table-column>
+            <el-table-column prop="ThirdPrice" label="第三轮报价"></el-table-column>
           </el-table>
         </el-row>
       </el-main>
@@ -157,7 +159,53 @@ export default {
   created() {
     const dataStr = this.$route.query.data;
     const data = JSON.parse(dataStr);
-    console.log(data[0].biddingMesName, "这是sb的名字")
+
+    //处理时间
+    const dateTime = data[0].clickStartTime;
+    const date = new Date(dateTime);
+    // 转换为本地时间
+    const localDate = new Date(date.getTime() - (date.getTimezoneOffset() * 60000));
+    // 提取本地时间的日期部分
+    const datePart = localDate.toISOString().split('T')[0];
+    // 提取本地时间的时间部分
+    const timePart = localDate.toISOString().split('T')[1].split('.')[0];
+    const formattedTime = datePart + " " + timePart;
+
+    let foodRule = {
+      FoodRuleID: data[0].foodRuleID,
+    }
+    //调用方法找到规则
+    const FindRule = async () => {
+      http.post('/action/FoodRuleVO/queryRuleByID', foodRule).then(res => {
+        this.RuleData = [
+          {
+            RuleName: res[0].foodRuleName,
+            Round: res[0].totalRounds,
+            RoundTime: res[0].roundsTime,
+            GapTime: res[0].roundSpacingTime
+          }
+        ]
+      })
+    }
+
+    //调用方法找到委托方
+    let ClientMes = {
+      ClientID: data[0].clientID,
+    }
+    const FindClient = async () => {
+      http.post('/action/Client/queryById', ClientMes).then(res => {
+        this.ResultData = [
+          {
+            EntrustPerson: res[0].clientName,
+            PriceMax: data[0].maxPrice,
+            PriceMin: data[0].minPrice
+          }
+        ]
+      })
+    }
+
+    FindRule()
+    FindClient()
 
     this.BasicDataComp_T = [
       {
@@ -168,7 +216,6 @@ export default {
       }
     ];
     this.BasicDataComp_M = [
-      // 根据数据结构设置 BasicDataComp_M 的值
       {
         BuyEndTime: data[0].biddingEndTime || '默认结束时间',
         buyType: data[0].biddingType || '默认采购类型',
@@ -183,9 +230,13 @@ export default {
         createTime: data[0].biddingMesCreate,
         createPerson: 'WX'
       }
-    ],
-      console.log(data);
-    // 在这里可以对获取到的数据进行进一步的处理和使用
+    ];
+    this.CompetitiveData = [
+      {
+        CDStartTime: formattedTime,
+      }
+    ];
+    console.log(data)
   },
   setup() {
     const message = ref('')
@@ -197,6 +248,7 @@ export default {
   },
   data() {
     return {
+
       BasicDataComp_T: [
         // { name: 'test', buyTotal: 5000, unit: '吨', BuyStartTime: '2024-8-28' }
       ],
@@ -225,18 +277,18 @@ export default {
 
       ProcessData: [
         // {Unit:'',OneTime:'',OnePrice:'',TwoTime:'',TwoPrice:'',}
-      ]
+      ],
     };
   },
 }
 </script>
 
 <script setup>
+import http from '@/utils/http';
 import { onBeforeUnmount, onMounted } from 'vue'
 let CountdownMessage = ref('')
 
 const websocket = ref(null)
-// const messageInput = ref('')
 
 onMounted(() => {
   if ('WebSocket' in window) {
@@ -334,9 +386,11 @@ span {
   text-align: center;
   color: red;
   font-size: 90px;
-  max-width: 100px; /* 设置最大宽度 */
+  max-width: 100px;
+  /* 设置最大宽度 */
 }
-.ChatMes{
+
+.ChatMes {
   margin-top: 15px;
   padding: 10px;
   height: 40%;