ソースを参照

commit 开平方向枚举

yu jie 4 年 前
コミット
d28db0c496

+ 18 - 0
src/common/constants/enumsName.ts

@@ -758,6 +758,24 @@ export function getLogType(logtype: number) {
 }
 
 /**
+ * 开平方向
+ * @param type 1-建仓 2-平仓
+ */
+export function getChannelBuildName(type: number) {
+    let result = "--"
+    switch (type) {
+        case 1:
+            result = '建仓'
+            break
+        case 2:
+            result = '平仓'
+            break
+    }
+    return result
+}
+
+
+/**
  * 资金操作类型
  * 资金操作类型 (AccountFundCmdOp)- 101:入金 102:入金手续费 103:出金 104:出金冻结 105:出金解冻 106:出金手续费 107:出金手续费冻结 108:出金手续费解冻
  * 201:交易冻结 202:交易解冻 203:交易占用 204:交易解占用 205:交易手续费冻结 206:交易手续费解冻 207:交易手续费 208:交易货款 209:交易盈亏

+ 13 - 1
src/views/business/exposure/list/futures/index.vue

@@ -23,7 +23,18 @@
                rowKey="key"
                :data-source="detailTableList"
                :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+          <!-- 买卖方向 -->
+          <template #buyorsell="{ record }">
+              <span>{{ getBuyOrSellName(record.buyorsell)  }}</span>
+          </template>
+          <!-- 开屏方向 -->
+          <template #channelbuildtype="{ record }">
+              <span>{{ getChannelBuildName(record.channelbuildtype) }}</span>
+          </template>
+
       </a-table>
+
+
     </Description>
   </div>
 </template>
@@ -40,6 +51,7 @@ import { TabList } from '@/common/components/description/interface';
 import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import Description from '@/common/components/description/index.vue';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
+import {getBuyOrSellName, getChannelBuildName} from "@/common/constants/enumsName";
 
 export default defineComponent({
     name: EnumRouterName.exposure_futures,
@@ -97,7 +109,7 @@ export default defineComponent({
                 }
             }
         });
-        return { loading, tableList, visible, closeDrawer, columns, updateColumn, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList };
+        return { loading, tableList, visible, closeDrawer, columns, updateColumn, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList, getBuyOrSellName, getChannelBuildName };
     },
 });
 </script>