|
|
@@ -1,23 +1,37 @@
|
|
|
<!-- 商品订单-合约汇总 -->
|
|
|
<template>
|
|
|
- <app-table :data="[]" v-model:columns="tableColumns" />
|
|
|
+ <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
|
|
|
+ <!-- 挂牌类型 -->
|
|
|
+ <template #buyorsell="{ value }">
|
|
|
+ {{ getBuyOrSellName(value) }}
|
|
|
+ </template>
|
|
|
+ </app-table>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef } from 'vue'
|
|
|
+import { useRequest } from '@/hooks/request'
|
|
|
+import { getBuyOrSellName } from '@/constants/order'
|
|
|
+import { queryTradePosition } from '@/services/api/order'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
|
|
|
+const { loading, dataList } = useRequest(queryTradePosition, {
|
|
|
+ params: {
|
|
|
+ tradeMode: '50'
|
|
|
+ },
|
|
|
+})
|
|
|
+
|
|
|
const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
- { prop: 'unknown', label: '订单合约' },
|
|
|
- { prop: 'unknown', label: '方向' },
|
|
|
- { prop: 'unknown', label: '持有数量' },
|
|
|
- { prop: 'unknown', label: '可用数量' },
|
|
|
- { prop: 'unknown', label: '冻结数量' },
|
|
|
- { prop: 'unknown', label: '均价' },
|
|
|
+ { prop: 'goodsname', label: '订单合约' },
|
|
|
+ { prop: 'buyorsell', label: '方向' },
|
|
|
+ { prop: 'curpositionqty', label: '持有数量' },
|
|
|
+ { prop: 'enableqty', label: '可用数量' },
|
|
|
+ { prop: 'frozenqty', label: '冻结数量' },
|
|
|
+ { prop: 'averageprice', label: '均价' },
|
|
|
{ prop: 'unknown', label: '现价' },
|
|
|
- { prop: 'unknown', label: '持仓金额' },
|
|
|
- { prop: 'unknown', label: '占用保证金' },
|
|
|
- { prop: 'unknown', label: '市值' },
|
|
|
+ { prop: 'curholderamount', label: '持仓金额' },
|
|
|
+ { prop: 'usedmargin', label: '占用保证金' },
|
|
|
+ { prop: 'marketamount', label: '市值' },
|
|
|
{ prop: 'unknown', label: '浮动盈亏' },
|
|
|
])
|
|
|
</script>
|