刘恒 1 rok temu
rodzic
commit
0f6ad99448

+ 1 - 1
src/pages/business/channel.vue

@@ -226,7 +226,7 @@ const columns = [
   {
     title: "机构来源",
 
-    ataIndex: "managementSource",
+    dataIndex: "managementSource",
     scopedSlots: { customRender: "managementSource" },
   },
   {

+ 1 - 0
src/pages/business/index.vue

@@ -400,6 +400,7 @@ export default {
           createtimeEnd: this.formState.createtimeEnd,
           createtimeStart: this.formState.createtimeStart,
           riskCode: this.formState.riskCode,
+          dockingPerson: row.dockingPerson,
         })
         .then((res) => {
           this.listLoading = false;

+ 26 - 5
src/pages/profit/profit.vue

@@ -95,13 +95,15 @@
         :pagination="false"
         style="background: #fff"
         rowKey="id"
-        :scroll="{ y: 600 }"
+        :scroll="{ y: 900 }"
         :loading="detailsLoading"
+        @change="sortTable"
       >
-        <div slot="index" slot-scope="{ text, record }">
-          {{ text }}
-          {{ record }}
-        </div>
+        <template slot="radio" slot-scope="text">
+          <div>
+            {{ text != null ? text + "%" : "0%" }}
+          </div>
+        </template>
       </a-table>
     </a-drawer>
   </div>
@@ -212,10 +214,12 @@ export default {
         {
           title: "金额",
           dataIndex: "applyAmount",
+          sorter: true,
         },
         {
           title: "占总支出比例",
           dataIndex: "radio",
+          scopedSlots: { customRender: "radio" },
         },
       ],
       detailTable: [],
@@ -264,6 +268,23 @@ export default {
     // }, 1000);
   },
   methods: {
+    sortTable(pagination, filters, sorter) {
+      console.log(sorter);
+      if (sorter.order) {
+        const order = sorter.order === "ascend" ? "asc" : "desc";
+        if (order == "asc") {
+          // this.detailTable = this.detailTable.sort((a, b) => {
+          //   // console.log(a.applyAmount, b.applyAmount);
+          //   // return b.applyAmount - a.applyAmount;
+          // });
+        } else {
+          // this.detailTable = this.detailTable.sort((a, b) => {
+          //   // console.log(a.applyAmount, b.applyAmount);
+          //   // return a.applyAmount - b.applyAmount;
+          // });
+        }
+      }
+    },
     openDialog(val, type) {
       // console.log(val, type);
       this.detailTable = [];