瀏覽代碼

Merge remote-tracking branch 'origin/master'

yby 2 月之前
父節點
當前提交
a8cd5999ef
共有 7 個文件被更改,包括 276 次插入190 次删除
  1. 112 89
      src/components/BiddingTable.vue
  2. 25 20
      src/components/RulesTable.vue
  3. 65 48
      src/components/startBiddingT.vue
  4. 39 28
      src/http/api.js
  5. 22 0
      src/main.js
  6. 12 4
      src/store/index.js
  7. 1 1
      src/views/MainT.vue

+ 112 - 89
src/components/BiddingTable.vue

@@ -1,6 +1,8 @@
 <script>
-import {Delete, Download, Edit, Plus, Refresh, Search} from "@element-plus/icons-vue";
-import {ElMessageBox} from "element-plus";
+import { Delete, Download, Edit, Monitor, Plus, Refresh, Search } from "@element-plus/icons-vue";
+import { ElMessageBox } from "element-plus";
+import { getAllBiddingInfo, getBiddingInfoByCondition, deleteBiddingInfo } from "@/http/api"
+import { ElMessage } from 'element-plus';
 
 export default {
   name: "BiddingTable",
@@ -28,11 +30,11 @@ export default {
     return {
       searchForm: {
         title: '',
-        startTime: '',
-        endTime: '',
-        invoiceType: '',
-        paymentTime: '',
-        biddingStatus: '',
+        bidding_start_time: '',
+        bidding_end_time: '',
+        invoice_type: '',
+        payment_time: '',
+        bidding_status: '',
       },
       tableData: [
         {
@@ -63,36 +65,74 @@ export default {
         procurementRule: '',
         clientName: '',
         priceCap: '',
-        priceFloor: ''
+        priceFloor: '',
+        bidding_status: '',
       },
       dialogVisible: false
     }
   },
   methods: {
+    query() {
+      getBiddingInfoByCondition(this.searchForm).then(
+        res => {
+          this.tableData = res.data
+          ElMessage.success("搜索成功")
+        }
+      )
+    },
+    deleteById(scope) {
+      ElMessageBox.confirm('将要删除本条记录,是否继续?',
+        '警告',
+        {
+          confirmButtonText: '删除',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+          deleteBiddingInfo({
+            id: scope.row.id
+          }),
+            ElMessage({
+              type: 'success',
+              message: '删除成功!',
+            });
+            this.tableData.splice(scope.$index, 1);
+        }).catch((err) => {
+          ElMessage({
+            type: 'info',
+            message: '取消操作' + err,
+          });
+        })
+    },
     resetSearchForm() {
       // 手动重置表单字段
       this.searchForm.title = '';
-      this.searchForm.startTime = '';
-      this.searchForm.endTime = '';
-      this.searchForm.invoiceType = '';
-      this.searchForm.paymentTime = '';
-      this.searchForm.biddingStatus = '';
+      this.searchForm.bidding_start_time = '';
+      this.searchForm.bidding_end_time = '';
+      this.searchForm.invoice_type = '';
+      this.searchForm.payment_time = '';
+      this.searchForm.bidding_status = '';
     },
     handleClose(done) {
       ElMessageBox.confirm('Are you sure to close this dialog?')
-          .then(() => {
-            done()
-          })
-          .catch(() => {
-            // catch error
-          })
+        .then(() => {
+          done()
+        })
+        .catch(() => {
+          // catch error
+        })
     },
-    direct(item, arr) {
+    direct(item, arr, index) {
       this.$router.push(item.name)
       this.$store.commit("addEditableTabs", item);
       this.$store.commit("changeCurrentPath", arr)
+      this.$store.state.selectedBiddingInfo = this.tableData[index];
+      // console.log("this.$store.state.selectedBiddingInfo", this.$store.state.selectedBiddingInfo);
+      
     },
-  }
+  },
+  mounted() {
+    this.query();
+  },
 }
 </script>
 
@@ -108,18 +148,18 @@ export default {
         <el-col :span="6">
           <el-form-item label="招采开始时间">
             <el-date-picker type="date" placeholder="请选择招采开始时间" clearable="clearable"
-                            v-model="searchForm.startTime"></el-date-picker>
+              v-model="searchForm.bidding_start_time"></el-date-picker>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label="招采结束时间">
             <el-date-picker type="date" placeholder="请选择招采结束时间" clearable="clearable"
-                            v-model="searchForm.endTime"></el-date-picker>
+              v-model="searchForm.bidding_end_time"></el-date-picker>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label="发票类型">
-            <el-select placeholder="请选择发票类型" v-model="searchForm.invoiceType">
+            <el-select placeholder="请选择发票类型" v-model="searchForm.invoice_type">
               <el-option label="普通发票"></el-option>
             </el-select>
           </el-form-item>
@@ -130,25 +170,27 @@ export default {
         <el-col :span="6">
           <el-form-item label="付款时间">
             <el-date-picker type="date" placeholder="请选择付款时间" clearable="clearable"
-                            v-model="searchForm.paymentTime"></el-date-picker>
+              v-model="searchForm.payment_time"></el-date-picker>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label="竞标状态">
-            <el-select placeholder="请选择竞标状态" v-model="searchForm.invoiceType">
-              <el-option label="已结束"></el-option>
+            <el-select placeholder="请选择竞标状态" v-model="searchForm.bidding_status">
+              <el-option value="已结束" label="已结束"></el-option>
+              <el-option value="未进行" label="未进行"></el-option>
+              <el-option value="进行中" label="进行中"></el-option>
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-row :gutter="20">
-              <el-form-item>
-                <el-button type="primary" :icon="Search">搜索</el-button>
-              </el-form-item>
+            <el-form-item>
+              <el-button type="primary" :icon="Search" @click="query">搜索</el-button>
+            </el-form-item>
             &nbsp;&nbsp;
-              <el-form-item>
-                <el-button :icon="Refresh" @click="resetSearchForm">重置</el-button>
-              </el-form-item>
+            <el-form-item>
+              <el-button :icon="Refresh" @click="resetSearchForm">重置</el-button>
+            </el-form-item>
           </el-row>
         </el-col>
       </el-row>
@@ -157,72 +199,42 @@ export default {
     <el-button type="success" :icon="Edit" plain>修改</el-button>
     <el-button type="danger" :icon="Delete" plain>删除</el-button>
     <el-button type="warning" :icon="Download" plain>导出</el-button>
-    <el-table
-        ref="multipleTable"
-        :data="tableData"
-        tooltip-effect="dark"
-        style="width: 100%"
-        @selection-change="handleSelectionChange">
-      <el-table-column
-          type="selection">
+    <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
+      @selection-change="handleSelectionChange">
+      <el-table-column type="selection">
       </el-table-column>
-      <el-table-column
-          prop="title"
-          label="标题">
+      <el-table-column prop="title" label="标题">
       </el-table-column>
-      <el-table-column
-          prop="quantity"
-          label="数量">
+      <el-table-column prop="purchase_quantity" label="数量">
       </el-table-column>
-      <el-table-column
-          prop="unit"
-          label="单位">
+      <el-table-column prop="purchase_unit" label="单位">
       </el-table-column>
-      <el-table-column
-          prop="startTime"
-          label="招采开始时间">
+      <el-table-column prop="bidding_start_time" label="招采开始时间">
       </el-table-column>
-      <el-table-column
-          prop="endTime"
-          label="招采结束时间">
+      <el-table-column prop="bidding_end_time" label="招采结束时间">
       </el-table-column>
-      <el-table-column
-          prop="biddingType"
-          label="采购类型">
+      <el-table-column prop="purchase_type" label="采购类型">
       </el-table-column>
-      <el-table-column
-          prop="remainingTime"
-          label="剩余时间">
+      <el-table-column prop="rest_time" label="剩余时间">
       </el-table-column>
-      <el-table-column
-          prop="biddingStatus"
-          label="竞标状态">
+      <el-table-column prop="bidding_status" label="竞标状态">
       </el-table-column>
-      <el-table-column
-          prop="clientName"
-          label="委托方名称">
+      <el-table-column prop="client_name" label="委托方名称">
       </el-table-column>
-      <el-table-column
-          prop="priceCap"
-          label="限制价格上限">
+      <el-table-column prop="price_limit_upper" label="限制价格上限">
       </el-table-column>
-      <el-table-column
-          prop="priceFloor"
-          label="限制价格下限">
+      <el-table-column prop="price_limit_lower" label="限制价格下限">
       </el-table-column>
-      <el-table-column
-          prop="operation"
-          label="操作" width="150%">
-        <el-button type="primary" size="small" @click="direct({ name: '/startBidding', title: '开始竞价' }, ['集团功能', '开始竞价'])" >竞标详情</el-button>&nbsp;
-        <el-link type="primary" :icon="Delete">删除</el-link>
+      <el-table-column prop="operation" label="操作" width="150%">
+        <template #default="scope">
+          <el-button type="primary" size="small"
+            @click="direct({ name: '/startBidding', title: '开始竞价' }, ['集团功能', '开始竞价'], scope.$index)">竞标详情</el-button>&nbsp;
+          <el-link type="primary" size="small" @click="deleteById(scope)">删除</el-link>
+        </template>
+
       </el-table-column>
     </el-table>
-    <el-dialog
-        v-model="dialogVisible"
-        title="添加竞价信息"
-        width="50%"
-        :before-close="handleClose"
-    >
+    <el-dialog v-model="dialogVisible" title="添加竞价信息" width="50%" :before-close="handleClose">
       <el-form :inline="false" :model="addForm">
         <el-row :gutter="20">
           <el-col :span="12">
@@ -256,13 +268,13 @@ export default {
           <el-col :span="12">
             <el-form-item label="招采开始时间" required="required">
               <el-date-picker type="date" placeholder="请选择招采开始时间" clearable="clearable"
-                              v-model="addForm.startTime"></el-date-picker>
+                v-model="addForm.startTime"></el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="招采结束时间" required="required">
               <el-date-picker type="date" placeholder="请选择招采结束时间" clearable="clearable"
-                              v-model="addForm.endTime"></el-date-picker>
+                v-model="addForm.endTime"></el-date-picker>
             </el-form-item>
           </el-col>
         </el-row>
@@ -275,7 +287,7 @@ export default {
           <el-col :span="12">
             <el-form-item label="最晚到货时间">
               <el-date-picker type="date" placeholder="请选择最晚到货时间" clearable="clearable"
-                              v-model="addForm.arrivalDeadline"></el-date-picker>
+                v-model="addForm.arrivalDeadline"></el-date-picker>
             </el-form-item>
           </el-col>
         </el-row>
@@ -290,7 +302,7 @@ export default {
           <el-col :span="12">
             <el-form-item label="付款时间">
               <el-date-picker type="date" placeholder="请选择付款时间" clearable="clearable"
-                              v-model="addForm.paymentTime"></el-date-picker>
+                v-model="addForm.paymentTime"></el-date-picker>
             </el-form-item>
           </el-col>
         </el-row>
@@ -322,6 +334,17 @@ export default {
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="竞标状态" required="required">
+              <el-select placeholder="请选择竞标状态" v-model="addForm.bidding_status">
+                <el-option value="已结束" label="已结束"></el-option>
+                <el-option value="未进行" label="未进行"></el-option>
+                <el-option value="进行中" label="进行中"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <template #footer>
         <div class="dialog-footer">

+ 25 - 20
src/components/RulesTable.vue

@@ -11,6 +11,7 @@ import {
   Upload
 } from "@element-plus/icons-vue";
 import {ElMessageBox} from "element-plus";
+import {addRuleInfo} from "@/http/api";
 
 export default {
   name: "RulesTable",
@@ -65,8 +66,8 @@ export default {
       addForm: {
         name: '',
         rounds: '',
-        duration: '',
-        interval: ''
+        duration_minutes: '',
+        interval_minutes: ''
       },
       dialogVisible: false
     }
@@ -87,6 +88,10 @@ export default {
           .catch(() => {
             // catch error
           })
+    },
+    addRule(){
+      addRuleInfo(this.addForm);
+      this.dialogVisible = false;
     }
   }
 }
@@ -170,11 +175,11 @@ export default {
         <el-form-item label="轮次数" required="required">
           <el-col :span="18">
             <el-select placeholder="请选择轮次数" v-model="addForm.rounds">
-              <el-option label="1"></el-option>
-              <el-option label="2"></el-option>
-              <el-option label="3"></el-option>
-              <el-option label="4"></el-option>
-              <el-option label="5"></el-option>
+              <el-option label="1" value="1"></el-option>
+              <el-option label="2" value="2"></el-option>
+              <el-option label="3" value="3"></el-option>
+              <el-option label="4" value="4"></el-option>
+              <el-option label="5" value="5"></el-option>
             </el-select>
           </el-col>
           <el-col :span="6">
@@ -183,12 +188,12 @@ export default {
         </el-form-item>
         <el-form-item label="轮次时间" required="required">
           <el-col :span="18">
-            <el-select placeholder="请选择轮次时间" v-model="addForm.duration">
-              <el-option label="1"></el-option>
-              <el-option label="2"></el-option>
-              <el-option label="3"></el-option>
-              <el-option label="4"></el-option>
-              <el-option label="5"></el-option>
+            <el-select placeholder="请选择轮次时间" v-model="addForm.duration_minutes">
+              <el-option label="1" value="1"></el-option>
+              <el-option label="2" value="2"></el-option>
+              <el-option label="3" value="3"></el-option>
+              <el-option label="4" value="4"></el-option>
+              <el-option label="5" value="5"></el-option>
             </el-select>
           </el-col>
           <el-col :span="6">
@@ -197,12 +202,12 @@ export default {
         </el-form-item>
         <el-form-item label="间隔时长" required="required">
           <el-col :span="18">
-            <el-select placeholder="请选择间隔时长" v-model="addForm.interval">
-              <el-option label="1"></el-option>
-              <el-option label="2"></el-option>
-              <el-option label="3"></el-option>
-              <el-option label="4"></el-option>
-              <el-option label="5"></el-option>
+            <el-select placeholder="请选择间隔时长" v-model="addForm.interval_minutes">
+              <el-option label="1" value="1"></el-option>
+              <el-option label="2" value="2"></el-option>
+              <el-option label="3" value="3"></el-option>
+              <el-option label="4" value="4"></el-option>
+              <el-option label="5" value="5"></el-option>
             </el-select>
           </el-col>
           <el-col :span="6">
@@ -213,7 +218,7 @@ export default {
       <template #footer>
         <div class="dialog-footer">
           <el-button @click="dialogVisible = false">取消</el-button>
-          <el-button type="primary" @click="dialogVisible = false">
+          <el-button type="primary" @click="addRule">
             确定
           </el-button>
         </div>

+ 65 - 48
src/components/startBiddingT.vue

@@ -2,30 +2,30 @@
   <div class="main">
     <div class="baseInfo bg">
       <el-h6>基础信息</el-h6>
-      <el-table :data="baseInfo.one" stripe style="width: 100%"></el-table>
-      <el-table :data="baseInfo.one" stripe style="width: 100%" >
-        <el-table-column prop="Name" label="名称" />
-        <el-table-column prop="PurchaseQuantity" label="采购数量" />
-        <el-table-column prop="PurchasingUnitOfMeasurement" label="采购计量单位" />
-        <el-table-column prop="RecruitmentStartTime" label="招采开始时间" />
+      <el-table :data="baseInfo" stripe style="width: 100%"></el-table>
+      <el-table :data="baseInfo" stripe style="width: 100%">
+        <el-table-column prop="title" label="名称" />
+        <el-table-column prop="purchase_quantity" label="采购数量" />
+        <el-table-column prop="purchase_unit" label="采购计量单位" />
+        <el-table-column prop="bidding_start_time" label="招采开始时间" />
       </el-table>
-      <el-table :data="baseInfo.two" stripe style="width: 100%" >
-        <el-table-column prop="RecruitmentEndTime" label="招采结束时间" />
-        <el-table-column prop="PurchaseType" label="采购类型" />
-        <el-table-column prop="PlaceOfSupply" label="供货地点" />
-        <el-table-column prop="LatestArrivalTime" label="最晚到货时间" />
+      <el-table :data="baseInfo" stripe style="width: 100%">
+        <el-table-column prop="bidding_end_time" label="招采结束时间" />
+        <el-table-column prop="purchase_type" label="采购类型" />
+        <el-table-column prop="supply_location" label="供货地点" />
+        <el-table-column prop="latest_delivery_time" label="最晚到货时间" />
       </el-table>
-      <el-table :data="baseInfo.three" stripe style="width: 100%" >
-        <el-table-column prop="InvoiceType" label="发票类型" />
-        <el-table-column prop="TimeOfPayment" label="付款时间" />
-        <el-table-column prop="CreationTime" label="创建时间" />
-        <el-table-column prop="Founder" label="创建人" />
+      <el-table :data="baseInfo" stripe style="width: 100%">
+        <el-table-column prop="invoice_type" label="发票类型" />
+        <el-table-column prop="payment_time" label="付款时间" />
+        <el-table-column prop="create_time" label="创建时间" />
+        <el-table-column prop="creator" label="创建人" />
       </el-table>
     </div>
     <div class="biddingInfo bg">
       <el-h6>竞价信息</el-h6>
-      <el-table :data="baseInfo.one" stripe style="width: 100%"></el-table>
-      <el-table :data="biddingInfo" stripe style="width: 100%;">
+      <el-table :data="baseInfo" stripe style="width: 100%"></el-table>
+      <el-table :data="biddingInfo" stripe style="width: 100%;" ref="table">
         <el-table-column prop="OpeningTime" label="开始时间" />
         <el-table-column prop="CurrentBiddingStatus" label="当前竞标状态" />
         <el-table-column prop="CurrentRound" label="当前轮次" />
@@ -33,7 +33,7 @@
     </div>
     <div class="ruleInfo bg">
       <el-h6>规则信息</el-h6>
-      <el-table :data="baseInfo.one" stripe style="width: 100%"></el-table>
+      <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="轮次数(轮)" />
@@ -43,7 +43,7 @@
     </div>
     <div class="resultInfo bg">
       <el-h6>结果信息</el-h6>
-      <el-table :data="baseInfo.one" stripe style="width: 100%"></el-table>
+      <el-table :data="baseInfo" stripe style="width: 100%"></el-table>
       <el-table :data="resultInfo" stripe style="width: 100%">
         <el-table-column prop="WinningBidder" label="中标单位" />
         <el-table-column prop="WinningBidPrice" label="中标价格" />
@@ -54,7 +54,7 @@
     </div>
     <div class="processInfo bg">
       <el-h6>过程信息</el-h6>
-      <el-table :data="baseInfo.one" stripe style="width: 100%"></el-table>
+      <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轮竞价时间" />
@@ -79,35 +79,25 @@
 export default {
   data() {
     return {
-      baseInfo: {
-        one: [
-          {
-            Name: 'test',
-            PurchaseQuantity: 5000,
-            PurchasingUnitOfMeasurement: '吨',
-            RecruitmentStartTime: '2024-08-28'
-          }
-        ],
-        two: [
-          {
-            RecruitmentEndTime: '2024-08-21',
-            PurchaseType: '煤炭',
-            PlaceOfSupply: '工大操场',
-            LatestArrivalTime: '2024-08-20'
-          }
-        ],
-        three: [
-          {
-            InvoiceType: '普通发票',
-            TimeOfPayment: '2024-08-21',
-            CreationTime: '2024-08-19 15:51:18',
-            Founder: 'hjj'
-          }
-        ]
-      },
+      baseInfo: [
+        {
+          title: 'test',
+          purchase_quantity: 5000,
+          purchase_unit: '吨',
+          bidding_start_time: '2024-08-28',
+          bidding_end_time: '2024-08-21',
+          purchase_type: '煤炭',
+          supply_location: '工大操场',
+          latest_delivery_time: '2024-08-20',
+          invoice_type: '普通发票',
+          payment_time: '2024-08-21',
+          create_time: '2024-08-19 15:51:18',
+          creator: 'hjj',
+        }
+      ],
       biddingInfo: [
         {
-          OpeningTime: '2024-08-19',
+          OpeningTime: '2024-08-23',
           CurrentBiddingStatus: '进行中',
           CurrentRound: 1,
         }
@@ -175,6 +165,33 @@ export default {
       ]
     }
   },
+  methods: {
+    init() {
+      this.baseInfo.pop();
+      this.baseInfo.push(this.$store.state.selectedBiddingInfo);
+      
+      this.biddingInfo.unshift({
+        OpeningTime: this.getCurrentTime(),
+        CurrentBiddingStatus: this.biddingInfo[0].CurrentBiddingStatus,
+        CurrentRound: this.biddingInfo[0].CurrentRound
+      });
+      this.biddingInfo.pop();
+    },
+    getCurrentTime() {
+      const date = new Date();
+      const yy = date.getFullYear();
+      const mm = date.getMonth() + 1;
+      const dd = date.getDate();
+      const hh = date.getHours();
+      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}`;
+    }
+    
+  },
+  mounted() {
+    this.init();
+  }
 }
 </script>
 

+ 39 - 28
src/http/api.js

@@ -1,43 +1,44 @@
 import request from "./request";
-import qs from "qs";
- 
-const baseUrl = '/api'
- 
- 
-//登录
-export function authCodeLogin(params) {
-  return request({
-    url: baseUrl + "/authCodeLogin/" + params.code,
+//测试
+export function test(params){
+  let new_params = {
+    url: '/BiddingProcess/ProcessInfo',
     method: "get",
-  });
+    params:params
+  }
+  console.log('new_params',new_params);
+  
+  return request(new_params);
 }
-//退出
-// eslint-disable-next-line no-unused-vars
-export function authLogout(params) {
-  return request({
-    url: baseUrl + "/logout",
+//竞价信息
+//获取全部竞价信息
+export function getAllBiddingInfo(){
+  let new_params = {
+    url: '/BiddingInfo/QueryAll',
     method: "get",
-  });
+  }
+  return request(new_params);
 }
-//获取用户数据
-export function getUserInfo(params) {
-  return request({
-    url: baseUrl + "/getUserInfo",
+//获取多条件查询的竞价信息
+export function getBiddingInfoByCondition(params){
+  let new_params = {
+    url: '/BiddingInfo/QueryMultCondition',
     method: "get",
-    params:qs.stringify(params)
-  });
+    params:params
+  }
+  return request(new_params);
 }
-
-export function test(params){
+//删除指定竞价信息
+export function deleteBiddingInfo(params){
   let new_params = {
-    url: '/BiddingProcess/ProcessInfo',
+    url: '/BiddingInfo/DeleteById',
     method: "get",
     params:params
   }
-  console.log('new_params',new_params);
-  
   return request(new_params);
 }
+
+//开始竞价
 //获取开始竞价的基础信息
 export function getBiddingProcessBaseInfo(params){
   let new_params = {
@@ -112,7 +113,17 @@ export function updateSuppliersAddress(params){
   return request(new_params);
 }
 
-
+//规则
+//新增规则
+export function addRuleInfo(params){
+  console.log('rule:'+params);
+  let new_params = {
+    url: '/Rules/addRule',
+    method: "post",
+    data: params
+  }
+  return request(new_params);
+}
 //其实,也不一定就是params,也可以是 query 还有 data 的呀!
 //params是添加到url的请求字符串中的,用于get请求。(后面这句不对)会将参数加到 url后面。所以,传递的都是字符串。无法传递参数中含有json格式的数据
 //而data是添加到请求体(body)中的, 用于post请求。添加到请求体(body)中,json 格式也是可以的。

+ 22 - 0
src/main.js

@@ -26,3 +26,25 @@ app.use(ElementPlus)
 app.use(router)
 app.use(store)
 app.mount('#app')
+
+// app.vue写在script里面  main.js写在app挂在完之后
+const debounce = (fn, delay) => {
+    let timer
+     return (...args) => {
+       if (timer) {
+         clearTimeout(timer)
+       }
+       timer = setTimeout(() => {
+         fn(...args)
+       }, delay)
+     }
+  }
+    
+  const _ResizeObserver = window.ResizeObserver;
+  window.ResizeObserver = class ResizeObserver extends _ResizeObserver{
+     constructor(callback) {
+       callback = debounce(callback, 200);
+       super(callback);
+     }
+  }
+  

+ 12 - 4
src/store/index.js

@@ -5,12 +5,20 @@ export default createStore({
         editableTabsValue: '1',
         editableTabs: [],
         tabIndex: 1,
-        currentPath:''
+        currentPath: '',
+        biddingProcess: {
+            baseInfo: '',
+            ruleInfo: '',
+            processInfo: '',
+        },
+        selectedBiddingInfo: {
+
+        }
     },
     getters: {
-        getCurrentPath(state){
+        getCurrentPath(state) {
             return state.currentPath
-        }
+        },
     },
     mutations: {
         addEditableTabs(state, tab) {
@@ -24,7 +32,7 @@ export default createStore({
             }
             state.editableTabsValue = tab.name
         },
-        changeCurrentPath(state, arr){
+        changeCurrentPath(state, arr) {
             state.currentPath = '首页/' + arr.join('/');
         }
     },

+ 1 - 1
src/views/MainT.vue

@@ -145,7 +145,7 @@ export default {
     this.direct({ name: '/index', title: '首页', arr: []});
   },
   mounted() {
-    
+    // this.test();
   },
   computed:{
     currentPath(){