大宝管理后台代码
xxx
dcc
2024-05-07 abcf89c0931fc453f4fd8e1d4d48b8b469d0f3c7
src/views/position/components/index-hold.vue
@@ -177,13 +177,13 @@
          dataIndex: 'indexName',
          align: 'center',
          width: 180,
          scopedSlots: { customRender: 'indexName' },
          scopedSlots: { customRender: 'indexName' }
        },
        {
          title: '账户类型',
          dataIndex: 'positionType',
          align: 'center',
          scopedSlots: { customRender: 'positionType' },
          scopedSlots: { customRender: 'positionType' }
        },
        {
          title: '用户名称(ID)',
@@ -191,7 +191,7 @@
          align: 'center',
          customRender: (text, row, index) => {
            return `${row.realName}(${row.userId})`
          },
          }
        },
        {
          title: '持仓订单号(ID)',
@@ -199,13 +199,13 @@
          align: 'center',
          customRender: (text, row, index) => {
            return `${row.positionSn}(${row.id})`
          },
          }
        },
        {
          title: '买卖方向',
          dataIndex: 'orderDirection',
          align: 'center',
          scopedSlots: { customRender: 'orderDirection' },
          scopedSlots: { customRender: 'orderDirection' }
        },
        {
          title: '买入点数',
@@ -213,50 +213,50 @@
          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: 'allDepositAmt',
          align: 'center',
          align: 'center'
        },
        {
          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: 'eachPoint',
          align: 'center',
          align: 'center'
        },
        {
          title: '双边手续费',
          dataIndex: 'orderFee',
          align: 'center',
          align: 'center'
        },
        {
          title: '锁定原因',
          dataIndex: 'lockMsg',
          align: 'center',
          align: 'center'
        },
        {
          title: '买入时间',
@@ -265,7 +265,7 @@
          width: 180,
          customRender: (text, row, index) => {
            return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
          },
          }
        },
        {
          title: '操作',
@@ -273,8 +273,8 @@
          align: 'center',
          fixed: 'right',
          width: 150,
          scopedSlots: { customRender: 'action' },
        },
          scopedSlots: { customRender: 'action' }
        }
      ],
      // 表头
      pagination: {
@@ -284,7 +284,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: {
@@ -294,7 +294,7 @@
        agentId: undefined,
        userId: '',
        positionSn: '',
        state: 0,
        state: 0
      },
      datalist: [],
      agentlist: [],
@@ -305,8 +305,8 @@
      clickpositionId: '',
      agentqueryParam: {
        pageNum: 1,
        pageSize: 100,
      },
        pageSize: 100
      }
    }
  },
  created() {},
@@ -318,7 +318,7 @@
        content: '确认要强制平仓吗?',
        onOk() {
          var data = {
            positionSn: val,
            positionSn: val
          }
          indexpositionsell(data)
            .then((res) => {
@@ -335,7 +335,7 @@
        },
        onCancel() {
          console.log('Cancel')
        },
        }
      })
    },
    getLockopen(val) {
@@ -346,7 +346,7 @@
        onOk() {
          var data = {
            state: 0,
            positionId: val,
            positionId: val
          }
          indexpositionlock(data).then((res) => {
            if (res.status == 0) {
@@ -359,7 +359,7 @@
        },
        onCancel() {
          console.log('Cancel')
        },
        }
      })
    },
    handleCancel() {
@@ -375,7 +375,7 @@
          var data = {
            state: 1,
            lockMsg: values.lockMsg,
            positionId: this.clickpositionId,
            positionId: this.clickpositionId
          }
          indexpositionlock(data).then((res) => {
            if (res.status == 0) {
@@ -399,7 +399,7 @@
        agentId: undefined,
        userId: '',
        positionSn: '',
        state: 0,
        state: 0
      }
      this.getlist()
    },
@@ -411,7 +411,7 @@
        agentId: undefined,
        userId: '',
        positionSn: '',
        state: 0,
        state: 0
      }
    },
    getagentlist() {
@@ -440,8 +440,8 @@
      this.queryParam.pageNum = current
      this.queryParam.pageSize = pageSize
      this.getlist()
    },
  },
    }
  }
}
</script>
<style scoped>