|
|
@@ -0,0 +1,187 @@
|
|
|
+<template>
|
|
|
+ <!--期货-->
|
|
|
+ <div class="topTableHeight">
|
|
|
+ <a-table :columns="getColumnsList()"
|
|
|
+ :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
|
|
|
+ :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }"
|
|
|
+ :pagination="false"
|
|
|
+ :loading="loading"
|
|
|
+ rowKey="key"
|
|
|
+ :data-source="tableList">
|
|
|
+ <template #totalturnover="{ text }">
|
|
|
+ <span>{{changeUnit(text)}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 涨跌 -->
|
|
|
+ <template #change="{ record }">
|
|
|
+ <span>{{quoteChange(record, record.decimalplace)}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 幅度 -->
|
|
|
+ <template #amplitude="{ record }">
|
|
|
+ <span>{{quoteAmplitude(record, record.decimalplace)}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 振幅 -->
|
|
|
+ <template #vibration="{ record }">
|
|
|
+ <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
|
|
|
+ </template>
|
|
|
+ <template #index="{ index }">
|
|
|
+ <span>{{index + 1}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 买价 -->
|
|
|
+ <template #bid="{ text, record }">
|
|
|
+ <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 卖价 -->
|
|
|
+ <template #ask="{ text, record }">
|
|
|
+ <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 最新价 -->
|
|
|
+ <template #last="{ text, record }">
|
|
|
+ <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 最低价 -->
|
|
|
+ <template #lowest="{ text, record }">
|
|
|
+ <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 最高价 -->
|
|
|
+ <template #highest="{ text, record }">
|
|
|
+ <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <ThridMenu :list="tabList"
|
|
|
+ :selectedKey="index"
|
|
|
+ @selectMenu="changeTab" />
|
|
|
+ <!-- 右键 -->
|
|
|
+ <!-- <contextMenu :contextMenu="contextMenu"
|
|
|
+ @cancel="closeContext"
|
|
|
+ :list="btnList"></contextMenu>
|
|
|
+ <component :is="componentId"
|
|
|
+ v-if="componentId"
|
|
|
+ :selectedRow="selectedRow"
|
|
|
+ @cancel="closeComponent"></component> -->
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+import { contextMenu, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
|
|
|
+
|
|
|
+import { handleSubcriteOnDemandQuote, handleQuotePriceColor, quoteChange, quoteAmplitude, quoteAmplituOfVibration } from '@/common/setup/table/tableQuote';
|
|
|
+import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
|
|
|
+
|
|
|
+import { handleTableEventAndData } from '@/common/setup/table/compose';
|
|
|
+import { TableParam } from '@/common/setup/table/interface';
|
|
|
+import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
+import { getShowBottomValue } from '@/common/config/constrolBottom';
|
|
|
+import { ref } from 'vue';
|
|
|
+import { useQueryData } from '@/common/setup/request';
|
|
|
+import { QueryQuoteGoodsListReq } from '@/services/go/Tjmd/interface';
|
|
|
+import { queryQuoteGoodsList } from '@/services/go/Tjmd';
|
|
|
+import APP from '@/services';
|
|
|
+import { getGoodsList } from '@/services/bus/goods';
|
|
|
+import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
|
|
|
+import { getColumnsList, useExternalexchange } from './setup';
|
|
|
+import ThridMenu from '@/common/components/thirdMenu/index.vue';
|
|
|
+import { Externalexchange } from '@/services/go/useInfo/interface';
|
|
|
+import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
|
|
|
+import { TabList } from '@/common/components/description/interface';
|
|
|
+
|
|
|
+export default defineComponent({
|
|
|
+ name: 'spot_trade_order_transaction_swap',
|
|
|
+ components: {
|
|
|
+ ThridMenu,
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ const isBottom = getShowBottomValue();
|
|
|
+
|
|
|
+ const { index, loading, tabList, tableList, hanldeQuoteData } = useExternalexchange();
|
|
|
+ // 行情按需订阅
|
|
|
+ let stopSubcribe = handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(tableList);
|
|
|
+ function changeTab(index: number, current: TabList) {
|
|
|
+ hanldeQuoteData(index);
|
|
|
+ console.log(index, current);
|
|
|
+ // 停止上次订阅
|
|
|
+ stopSubcribe();
|
|
|
+ // 重新发起订阅
|
|
|
+ stopSubcribe = handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(tableList);
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ index,
|
|
|
+ loading,
|
|
|
+ tabList,
|
|
|
+ changeTab,
|
|
|
+ tableList,
|
|
|
+ isBottom,
|
|
|
+ // ...handleTableEventAndData<Goods>(param),
|
|
|
+ handleQuotePriceColor,
|
|
|
+ quoteChange,
|
|
|
+ quoteAmplitude,
|
|
|
+ quoteAmplituOfVibration,
|
|
|
+ // goodsList,
|
|
|
+ getColumnsList,
|
|
|
+ // loading,
|
|
|
+ // goodsChange,
|
|
|
+ };
|
|
|
+ },
|
|
|
+});
|
|
|
+</script>
|
|
|
+<style lang="less">
|
|
|
+.noData {
|
|
|
+ .position(absolute, 28px, 0, 0, 0);
|
|
|
+}
|
|
|
+.filter-custom-table {
|
|
|
+ display: inline-flex;
|
|
|
+ padding-top: 4px;
|
|
|
+ height: 34px;
|
|
|
+ .conditionSelect:first-child {
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ .btnDeafault.ant-btn,
|
|
|
+ .operBtn.ant-btn {
|
|
|
+ height: 26px !important;
|
|
|
+ line-height: 26px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ant-select-single:not(.ant-select-customize-input) + .ant-select-single:not(.ant-select-customize-input),
|
|
|
+ .ant-select + .ant-space.ant-space-vertical {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ .ant-select-single:not(.ant-select-customize-input) {
|
|
|
+ height: 26px;
|
|
|
+ line-height: 26px !important;
|
|
|
+ .ant-select-selector {
|
|
|
+ height: 26px;
|
|
|
+ border-color: @m-grey46 !important;
|
|
|
+ background: @m-grey47;
|
|
|
+ .rounded-corners(3px);
|
|
|
+ .ant-select-selection-item {
|
|
|
+ line-height: 26px;
|
|
|
+ }
|
|
|
+ .ant-select-selection-search {
|
|
|
+ height: 26px;
|
|
|
+ .ant-select-selection-search-input {
|
|
|
+ height: 26px;
|
|
|
+ line-height: 27px !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .ant-select-selection-placeholder {
|
|
|
+ line-height: 26px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .allDatePicker.ant-calendar-picker {
|
|
|
+ height: 26px !important;
|
|
|
+ border: 1px solid @m-grey46 !important;
|
|
|
+ .ant-calendar-picker-input.ant-input {
|
|
|
+ height: 26px;
|
|
|
+ line-height: 26px;
|
|
|
+ &::placeholder {
|
|
|
+ color: @m-grey10 !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .conditionSelect + .conditionSelect {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|