From abcf89c0931fc453f4fd8e1d4d48b8b469d0f3c7 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Tue, 07 May 2024 10:19:31 +0800
Subject: [PATCH] xxx

---
 src/views/position/components/financing-hold.vue |  114 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/src/views/position/components/financing-hold.vue b/src/views/position/components/financing-hold.vue
index c554f35..39773eb 100644
--- a/src/views/position/components/financing-hold.vue
+++ b/src/views/position/components/financing-hold.vue
@@ -48,7 +48,7 @@
                     icon="search"
                     style="margin-left: 8px"
                     @click=";(queryParam.pageNum = 1), getlist()"
-                    >查询
+                  >查询
                   </a-button>
                 </span>
               </a-form-item>
@@ -75,10 +75,10 @@
                 record.stockPlate == '科创'
                   ? 'blue'
                   : !record.stockPlate
-                  ? 'orange'
-                  : record.stockPlate == '创业'
-                  ? 'pink'
-                  : 'purple'
+                    ? 'orange'
+                    : record.stockPlate == '创业'
+                      ? 'pink'
+                      : 'purple'
               "
             >
               {{ record.stockPlate == '科创' ? '科创' : !record.stockPlate ? '股票' : record.stockPlate }}
@@ -113,8 +113,8 @@
                 Number(record.now_price) - record.buyOrderPrice < 0
                   ? 'greens'
                   : Number(record.now_price) - record.buyOrderPrice > 0
-                  ? 'reds'
-                  : ''
+                    ? 'reds'
+                    : ''
               "
             >
               {{ record.now_price }}
@@ -150,7 +150,7 @@
             clickpositionId = record.id
           "
           v-if="record.isLock == 0"
-          >锁仓</a
+        >锁仓</a
         >
         <a slot="action" href="javascript:;" @click="getLockopen(record.id)" v-else>解锁</a>
         <a-divider type="vertical" />
@@ -182,7 +182,7 @@
 import moment from 'moment'
 export default {
   name: 'Financinghold',
-  data() {
+  data () {
     return {
       columns: [
         {
@@ -190,13 +190,13 @@
           dataIndex: 'stockName',
           align: 'center',
           width: 180,
-          scopedSlots: { customRender: 'stockName' },
+          scopedSlots: { customRender: 'stockName' }
         },
         {
           title: '账户类型',
           dataIndex: 'positionType',
           align: 'center',
-          scopedSlots: { customRender: 'positionType' },
+          scopedSlots: { customRender: 'positionType' }
         },
         {
           title: '用户名称(ID)',
@@ -204,7 +204,7 @@
           align: 'center',
           customRender: (text, row, index) => {
             return `${row.nickName}(${row.userId})`
-          },
+          }
         },
         {
           title: '持仓订单号(ID)',
@@ -212,13 +212,13 @@
           align: 'center',
           customRender: (text, row, index) => {
             return `${row.positionSn}(${row.id})`
-          },
+          }
         },
         {
           title: '买卖方向',
           dataIndex: 'orderDirection',
           align: 'center',
-          scopedSlots: { customRender: 'orderDirection' },
+          scopedSlots: { customRender: 'orderDirection' }
         },
         {
           title: '买入价',
@@ -226,65 +226,65 @@
           align: 'center',
           customRender: (text, row, index) => {
             return text.toFixed(2)
-          },
+          }
         },
         {
           title: '现价',
           dataIndex: 'now_price',
           align: 'center',
-          scopedSlots: { customRender: 'now_price' },
+          scopedSlots: { customRender: 'now_price' }
         },
         {
           title: '浮动盈亏',
           dataIndex: 'profitAndLose',
           align: 'center',
-          scopedSlots: { customRender: 'profitAndLose' },
+          scopedSlots: { customRender: 'profitAndLose' }
         },
         {
           title: '总盈亏',
           dataIndex: 'allProfitAndLose',
           align: 'center',
-          scopedSlots: { customRender: 'allProfitAndLose' },
+          scopedSlots: { customRender: 'allProfitAndLose' }
         },
         {
           title: '数量(股)',
           dataIndex: 'orderNum',
-          align: 'center',
+          align: 'center'
         },
         {
           title: '总市值',
           dataIndex: 'orderTotalPrice',
-          align: 'center',
+          align: 'center'
         },
         {
           title: '杠杆倍数',
           dataIndex: 'orderLever',
-          align: 'center',
+          align: 'center'
         },
         {
           title: '手续费',
           dataIndex: 'orderFee',
-          align: 'center',
+          align: 'center'
         },
         {
           title: '印花税',
           dataIndex: 'orderSpread',
-          align: 'center',
+          align: 'center'
         },
         {
           title: '留仓费',
           dataIndex: 'orderStayFee',
-          align: 'center',
+          align: 'center'
         },
         {
           title: '留仓天数',
           dataIndex: 'orderStayDays',
-          align: 'center',
+          align: 'center'
         },
         {
           title: '锁定原因',
           dataIndex: 'lockMsg',
-          align: 'center',
+          align: 'center'
         },
         {
           title: '买入时间',
@@ -293,7 +293,7 @@
           width: 180,
           customRender: (text, row, index) => {
             return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
-          },
+          }
         },
         {
           title: '操作',
@@ -301,8 +301,8 @@
           align: 'center',
           fixed: 'right',
           width: 150,
-          scopedSlots: { customRender: 'action' },
-        },
+          scopedSlots: { customRender: 'action' }
+        }
       ],
       // 表头
       pagination: {
@@ -312,7 +312,7 @@
         pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
         onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
         onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
-        showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
+        showTotal: (total) => `共有 ${total} 条数据` // 分页中显示总的数据
       },
       loading: false,
       queryParam: {
@@ -322,7 +322,7 @@
         agentId: undefined,
         userId: '',
         positionSn: '',
-        state: 0,
+        state: 0
       },
       datalist: [],
       agentlist: [],
@@ -333,22 +333,22 @@
       clickpositionId: '',
       agentqueryParam: {
         pageNum: 1,
-        pageSize: 100,
-      },
+        pageSize: 100
+      }
     }
   },
-  created() {
+  created () {
     this.getlist()
   },
   methods: {
-    getCompulsoryclosing(val) {
+    getCompulsoryclosing (val) {
       var that = this
       this.$confirm({
         title: '提示',
         content: '确认要强制平仓吗?',
-        onOk() {
+        onOk () {
           var data = {
-            positionSn: val,
+            positionSn: val
           }
           positionsell(data)
             .then((res) => {
@@ -363,20 +363,20 @@
               that.$message.error({ content: '平仓失败' })
             })
         },
-        onCancel() {
+        onCancel () {
           console.log('Cancel')
-        },
+        }
       })
     },
-    getLockopen(val) {
+    getLockopen (val) {
       var that = this
       this.$confirm({
         title: '提示',
         content: '确认要解锁该持仓单?',
-        onOk() {
+        onOk () {
           var data = {
             state: 0,
-            positionId: val,
+            positionId: val
           }
           positionlock(data).then((res) => {
             if (res.status == 0) {
@@ -387,17 +387,17 @@
             }
           })
         },
-        onCancel() {
+        onCancel () {
           console.log('Cancel')
-        },
+        }
       })
     },
-    handleCancel() {
+    handleCancel () {
       this.Lockvisibledialog = false
       const form = this.$refs.createModal.form
       form.resetFields()
     },
-    getDialogok() {
+    getDialogok () {
       const form = this.$refs.createModal.form
       form.validateFields((errors, values) => {
         if (!errors) {
@@ -405,7 +405,7 @@
           var data = {
             state: 1,
             lockMsg: values.lockMsg,
-            positionId: this.clickpositionId,
+            positionId: this.clickpositionId
           }
           positionlock(data)
             .then((res) => {
@@ -425,7 +425,7 @@
         }
       })
     },
-    getinit() {
+    getinit () {
       this.queryParam = {
         pageNum: 1,
         pageSize: 10,
@@ -433,11 +433,11 @@
         agentId: undefined,
         userId: '',
         positionSn: '',
-        state: 0,
+        state: 0
       }
       this.getlist()
     },
-    getqueryParam() {
+    getqueryParam () {
       this.queryParam = {
         pageNum: 1,
         pageSize: 10,
@@ -445,10 +445,10 @@
         agentId: undefined,
         userId: '',
         positionSn: '',
-        state: 0,
+        state: 0
       }
     },
-    getagentlist() {
+    getagentlist () {
       var that = this
       this.agentloading = true
       nextagent(this.agentqueryParam).then((res) => {
@@ -458,7 +458,7 @@
         }, 500)
       })
     },
-    getlist() {
+    getlist () {
       this.loading = true
       positionlist(this.queryParam).then((res) => {
         this.datalist = res.data.list
@@ -466,16 +466,16 @@
         this.loading = false
       })
     },
-    onPageChange(page, pageSize) {
+    onPageChange (page, pageSize) {
       this.queryParam.pageNum = page
       this.getlist()
     },
-    onSizeChange(current, pageSize) {
+    onSizeChange (current, pageSize) {
       this.queryParam.pageNum = current
       this.queryParam.pageSize = pageSize
       this.getlist()
-    },
-  },
+    }
+  }
 }
 </script>
 <style scoped>

--
Gitblit v1.9.3