huangbin 4 лет назад
Родитель
Сommit
0d31ae1afc

Разница между файлами не показана из-за своего большого размера
+ 281 - 185
src/assets/styles/index.css


+ 11 - 0
src/assets/styles/index.less

@@ -308,4 +308,15 @@ body {
         width: 100%;
         height: 100%;
     }
+}
+
+// 行情涨跌颜色
+.default-quote-color {
+    color: @m-white5;
+}
+.up-quote-color {
+    color: @m-red1;
+}
+.down-quote-color {
+    color: @m-green4;
 }

+ 16 - 0
src/common/setup/table/tableQuote.ts

@@ -85,4 +85,20 @@ export function handleSubcriteQuote<T extends object>(tableList: Ref<T[]>, codeK
         console.log('开始订阅', result)
         addSubscribeQuotation(uuid, result);
     }
+}
+
+/**
+ * 处理行情价格颜色
+ * @param price1
+ * @param price2
+ * @returns
+ */
+export function handleQuotePriceColor(price1: number, price2: number) {
+    if (price1 === price2) {
+        return 'default-quote-color'
+    } else if (price1 > price2) {
+        return 'up-quote-color'
+    } else {
+        return 'down-quote-color'
+    }
 }

+ 34 - 0
src/services/socket/quota/adapter/index.ts

@@ -130,6 +130,40 @@ export function parseReceivePush(quotationData: any) {
                 goodsQuoteTik.last && (goodsQuoteTik.last = fn(goodsQuoteTik.last))
                 goodsQuoteTik.settle && (goodsQuoteTik.settle = fn(goodsQuoteTik.settle))
                 goodsQuoteTik.presettle && (goodsQuoteTik.presettle = fn(goodsQuoteTik.presettle))
+                goodsQuoteTik.ask && (goodsQuoteTik.ask = fn(goodsQuoteTik.ask))
+                goodsQuoteTik.ask2 && (goodsQuoteTik.ask2 = fn(goodsQuoteTik.ask2))
+                goodsQuoteTik.ask3 && (goodsQuoteTik.ask3 = fn(goodsQuoteTik.ask3))
+                goodsQuoteTik.ask4 && (goodsQuoteTik.ask4 = fn(goodsQuoteTik.ask4))
+                goodsQuoteTik.ask5 && (goodsQuoteTik.ask5 = fn(goodsQuoteTik.ask5))
+                goodsQuoteTik.ask6 && (goodsQuoteTik.ask6 = fn(goodsQuoteTik.ask6))
+                goodsQuoteTik.ask7 && (goodsQuoteTik.ask7 = fn(goodsQuoteTik.ask7))
+                goodsQuoteTik.ask8 && (goodsQuoteTik.ask8 = fn(goodsQuoteTik.ask8))
+                goodsQuoteTik.ask9 && (goodsQuoteTik.ask9 = fn(goodsQuoteTik.ask9))
+                goodsQuoteTik.ask10 && (goodsQuoteTik.ask10 = fn(goodsQuoteTik.ask10))
+                goodsQuoteTik.bid && (goodsQuoteTik.bid = fn(goodsQuoteTik.bid))
+                goodsQuoteTik.bid2 && (goodsQuoteTik.bid2 = fn(goodsQuoteTik.bid2))
+                goodsQuoteTik.bid3 && (goodsQuoteTik.bid3 = fn(goodsQuoteTik.bid3))
+                goodsQuoteTik.bid4 && (goodsQuoteTik.bid4 = fn(goodsQuoteTik.bid4))
+                goodsQuoteTik.bid5 && (goodsQuoteTik.bid5 = fn(goodsQuoteTik.bid5))
+                goodsQuoteTik.bid6 && (goodsQuoteTik.bid6 = fn(goodsQuoteTik.bid6))
+                goodsQuoteTik.bid7 && (goodsQuoteTik.bid7 = fn(goodsQuoteTik.bid7))
+                goodsQuoteTik.bid8 && (goodsQuoteTik.bid8 = fn(goodsQuoteTik.bid8))
+                goodsQuoteTik.bid9 && (goodsQuoteTik.bid9 = fn(goodsQuoteTik.bid9))
+                goodsQuoteTik.bid10 && (goodsQuoteTik.bid10 = fn(goodsQuoteTik.bid10))
+                goodsQuoteTik.averageprice && (goodsQuoteTik.averageprice = fn(goodsQuoteTik.averageprice))
+                goodsQuoteTik.grepmarketprice && (goodsQuoteTik.grepmarketprice = fn(goodsQuoteTik.grepmarketprice))
+                goodsQuoteTik.highest && (goodsQuoteTik.highest = fn(goodsQuoteTik.highest))
+                goodsQuoteTik.iep && (goodsQuoteTik.iep = fn(goodsQuoteTik.iep))
+                goodsQuoteTik.last && (goodsQuoteTik.last = fn(goodsQuoteTik.last))
+                goodsQuoteTik.limitdown && (goodsQuoteTik.limitdown = fn(goodsQuoteTik.limitdown))
+                goodsQuoteTik.limitup && (goodsQuoteTik.limitup = fn(goodsQuoteTik.limitup))
+                goodsQuoteTik.lowest && (goodsQuoteTik.lowest = fn(goodsQuoteTik.lowest))
+                goodsQuoteTik.opened && (goodsQuoteTik.opened = fn(goodsQuoteTik.opened))
+                goodsQuoteTik.preclose && (goodsQuoteTik.preclose = fn(goodsQuoteTik.preclose))
+                goodsQuoteTik.presettle && (goodsQuoteTik.presettle = fn(goodsQuoteTik.presettle))
+                goodsQuoteTik.settle && (goodsQuoteTik.settle = fn(goodsQuoteTik.settle))
+                goodsQuoteTik.strikeprice && (goodsQuoteTik.strikeprice = fn(goodsQuoteTik.strikeprice))
+
             } else {
                 console.warn(`行情推送的商品goods:${itemQuote.goodscode}在商品列表里不存在`)
             }

+ 17 - 12
src/views/market/spot_trade/spot_trade_reference_market/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!--订单交易 挂牌转让-->
+  <!--参考行情-->
   <div class="topTableHeight">
     <a-table :columns="columns"
              class="srcollYTable"
@@ -14,6 +14,12 @@
       <template #totalturnover="{ text }">
         <span>{{changeUnit(text)}}</span>
       </template>
+      <template #index="{ index }">
+        <span>{{index + 1}}</span>
+      </template>
+      <template #bid="{ text, record }">
+        <span :class="handleQuotePriceColor(text, record.preclose)">{{text}}</span>
+      </template>
     </a-table>
     <!-- 右键 -->
     <contextMenu :contextMenu="contextMenu"
@@ -34,7 +40,7 @@ import { QueryOrderQuoteReq } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/views/market/spot_trade/setup';
 import { ref } from 'vue';
-import { handleSubcriteQuote } from '@/common/setup/table/tableQuote';
+import { handleSubcriteQuote, handleQuotePriceColor } from '@/common/setup/table/tableQuote';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 import { getGoodsListByTrade, getQutoGoodsByTradeMode } from '@/services/bus/goods';
 import { TradeMode } from '@/common/constants/enumCommon';
@@ -43,27 +49,25 @@ import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
 import { changeUnit } from '@/utils/qt/common';
 
 const columnsList = [
-    { title: '序号', key: 'orderid' },
+    { title: '序号', key: 'index', width: 80 },
     { title: '代码', key: 'goodscode' },
     { title: '名称', key: 'goodsname' },
     { title: '买价', key: 'bid' },
     { title: '买量', key: 'bidvolume' },
     { title: '卖价', key: 'ask' },
     { title: '卖量', key: 'askvolume' },
-
     { title: '最新价', key: 'last' },
-
-    // { title: '涨跌', key: 'goodscode' },
-    // { title: '幅度', key: 'goodscode' },
-    { title: '今开', key: 'opened' },
+    { title: '涨跌', key: 'change' },
+    { title: '幅度', key: 'amplitude' },
+    { title: '开盘价', key: 'opened' },
     { title: '昨收价', key: 'preclose' },
     { title: '最低价', key: 'lowest' },
     { title: '最高价', key: 'highest' },
-    // {title: '振幅', key: 'goodscode'},
-    // {title: '总量', key: 'goodscode'},
-    // {title: '现量', key: 'goodscode'},
+    { title: '振幅', key: 'goodscode' },
+    { title: '总量', key: 'goodscode' },
+    { title: '现量', key: 'goodscode' },
     { title: '持仓量', key: 'holdvolume' },
-    // { title: '日增', key: 'goodscode' },
+    { title: '日增', key: 'goodscode' },
     { title: '金额', key: 'totalturnover' },
 ];
 
@@ -110,6 +114,7 @@ export default defineComponent({
             tableRef,
             columns,
             changeUnit,
+            handleQuotePriceColor,
         };
     },
 });

+ 1 - 1
src/views/report/platinum_precious_metal_sales_report/platinum_precious_metal_sales_report_departmental_tab/index.vue

@@ -18,7 +18,7 @@ export default defineComponent({
         const param: IfameRouteParam = {
             code: 'platinum_precious_metal_sales_report_departmental_tab',
             btnCodeList: [],
-            tabIndex: 1,
+            tabIndex: 2,
         };
         return { ...handleIfameRouter(param) };
     },

Некоторые файлы не были показаны из-за большого количества измененных файлов