AJNB 2 months ago
parent
commit
123f0f2a83
3 changed files with 55 additions and 12 deletions
  1. 45 11
      src/components/startBiddingT.vue
  2. 9 0
      src/http/api.js
  3. 1 1
      src/http/request.js

+ 45 - 11
src/components/startBiddingT.vue

@@ -35,10 +35,10 @@
       <el-h6>规则信息</el-h6>
       <el-table :data="baseInfo" stripe style="width: 100%"></el-table>
       <el-table :data="ruleInfo" stripe style="width: 100%">
-        <el-table-column prop="RuleName" label="规则名称" />
-        <el-table-column prop="NumberOfRounds" label="轮次数(轮)" />
-        <el-table-column prop="RoundTime" label="轮次时间(分钟)" />
-        <el-table-column prop="IntervalDuration" label="间隔时长(分钟)" />
+        <el-table-column prop="name" label="规则名称" />
+        <el-table-column prop="rounds" label="轮次数(轮)" />
+        <el-table-column prop="duration_minutes" label="轮次时间(分钟)" />
+        <el-table-column prop="interval_minutes" label="间隔时长(分钟)" />
       </el-table>
     </div>
     <div class="resultInfo bg">
@@ -56,11 +56,13 @@
       <el-h6>过程信息</el-h6>
       <el-table :data="baseInfo" stripe style="width: 100%"></el-table>
       <el-table :data="processInfo" stripe style="width: 100%" height="180">
-        <el-table-column prop="BiddingUnit" label="竞价单位" />
-        <el-table-column prop="FirstTime" label="第1轮竞价时间" />
-        <el-table-column prop="FirstQuote" label="第1轮报价" />
-        <el-table-column prop="SecondTime" label="第2轮竞价时间" />
-        <el-table-column prop="SecondQuote" label="第2轮报价" />
+        <el-table-column prop="supplier_name" label="竞价单位" />
+        <el-table-column prop="duration_minutes" label="第1轮竞价时间(min)" />
+        <el-table-column prop="first_round_offer" label="第1轮报价" />
+        <el-table-column prop="duration_minutes" label="第2轮竞价时间(min)" />
+        <el-table-column prop="second_round_offer" label="第2轮报价" />
+        <el-table-column prop="duration_minutes" label="第3轮竞价时间(min)" />
+        <el-table-column prop="third_round_offer" label="第3轮报价" />
       </el-table>
     </div>
     <div class="countDown">
@@ -76,6 +78,7 @@
 </template>
 
 <script>
+import {getBiddingProcessRuleInfo, getBiddingProcessInfo} from '@/http/api'
 export default {
   data() {
     return {
@@ -167,15 +170,30 @@ export default {
   },
   methods: {
     init() {
+      //基础
       this.baseInfo.pop();
       this.baseInfo.push(this.$store.state.selectedBiddingInfo);
-      
+      console.log(this.baseInfo);
+      //竞价
       this.biddingInfo.unshift({
         OpeningTime: this.getCurrentTime(),
         CurrentBiddingStatus: this.biddingInfo[0].CurrentBiddingStatus,
         CurrentRound: this.biddingInfo[0].CurrentRound
       });
       this.biddingInfo.pop();
+      //规则
+      this.queryRule();
+      //结果
+      this.resultInfo.unshift({
+        WinningBidder: this.resultInfo[0].WinningBidder,
+        WinningBidPrice: this.resultInfo[0].WinningBidPrice,
+        Clients: this.baseInfo[0].client_name,
+        PriceCeiling: this.baseInfo[0].price_limit_upper,
+        PriceFloor: this.baseInfo[0].price_limit_lower
+      })
+      this.resultInfo.pop();
+      //过程
+      this.queryProcess();
     },
     getCurrentTime() {
       const date = new Date();
@@ -186,8 +204,24 @@ export default {
       const mf = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
       const ss = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
       return `${yy}-${mm}-${dd} ${hh}:${mf}:${ss}`;
+    },
+    queryRule(){
+      getBiddingProcessRuleInfo({
+        id: this.baseInfo[0].rule_id
+      }).then(res => {
+        this.ruleInfo.pop();
+        this.ruleInfo.push(res.data)
+      })
+    },
+    queryProcess(){
+      getBiddingProcessInfo({
+        bidding_info_id: this.baseInfo[0].id
+      }).then(res => {
+        // console.log("getBiddingProcessInfo", res.data);
+        
+        this.processInfo = res.data
+      })
     }
-    
   },
   mounted() {
     this.init();

+ 9 - 0
src/http/api.js

@@ -57,6 +57,15 @@ export function getBiddingProcessRuleInfo(params){
   }
   return request(new_params);
 }
+//获取开始竞价的过程信息
+export function getBiddingProcessInfo(params){
+  let new_params = {
+    url: '/BiddingProcess/ProcessInfo',
+    method: "get",
+    params:params
+  }
+  return request(new_params);
+}
 
 
 //其实,也不一定就是params,也可以是 query 还有 data 的呀!

+ 1 - 1
src/http/request.js

@@ -12,7 +12,7 @@ const service = axios.create({
 })
 // 2.请求拦截器
 service.interceptors.request.use(config => {
-  console.log('config:', config);
+  // console.log('config:', config);
   //发请求前做的一些处理,数据转化,配置请求头,设置token,设置loading等,根据需求去添加
   config.data = JSON.stringify(config.data); //数据转化,也可以使用qs转换
   config.headers = {