Handy_Cao 1 năm trước cách đây
mục cha
commit
6b00c61472

+ 9 - 1
public/locales/en-US.json

@@ -113,7 +113,15 @@
         "onehour": "1H",
         "fourhour": "4H",
         "timestrade": "Times Trade",
-        "refprice": "Reference Price"
+        "refprice": "Reference Price",
+        "Open": "Open:",
+        "High": "High:",
+        "Low": "Low:",
+        "Close": "Close:",
+        "Vol": "VOL:",
+        "Amount": "Amount:",
+        "Increase": "Increase:",
+        "Price": "Price:"
     },
     "account": {
         "title": "Funds Infos",

+ 9 - 1
public/locales/zh-CN.json

@@ -114,7 +114,15 @@
         "onehour": "1小时",
         "fourhour": "4小时",
         "timestrade": "分时成交",
-        "refprice": "参考价格"
+        "refprice": "参考价格",
+        "Open": "开:",
+        "High": "高:",
+        "Low": "低:",
+        "Close": "收:",
+        "Vol": "量:",
+        "Amount": "额:",
+        "Increase": "幅:",
+        "Price": "价:"
     },
     "account": {
         "title": "资金信息",

+ 7 - 5
src/packages/mobile/components/modules/hqchart/candlestick/index.vue

@@ -11,7 +11,7 @@ import { Chart } from 'hqchart'
 import { timerInterceptor } from '@/utils/timer'
 import { handleNumberValue } from '@/filters'
 import { ChartCycleType } from '@/constants/chart'
-import { useFuturesStore } from '@/stores'
+import { useFuturesStore, i18n } from '@/stores'
 import { useDataset } from '@/hooks/hqchart/candlestick/dataset'
 import { KLineChartContainer, NetworkFilterData, NetworkFilterCallback } from '@/hooks/hqchart/candlestick/types'
 import HQChart from '@/components/base/hqchart/index.vue'
@@ -36,6 +36,8 @@ const props = defineProps({
     }
 })
 
+const { t } = i18n.global
+
 const { cycleType, networkFilter, updateLastData } = useDataset(props.goodsCode, props.cycleType)
 const { quoteWatch, getGoodsQuote } = useFuturesStore()
 const goods = getGoodsQuote(props.goodsCode)
@@ -159,10 +161,10 @@ const chartOption = {
                 const { Open, High, Low, Close, YClose, YFClose } = data.Data
                 const yclose = YFClose ?? YClose
                 const AryText = [
-                    { Text: '开:' + handleNumberValue(Open?.toFixed(decimalplace)), Color: paint.GetColor(Open, yclose || Open) },
-                    { Text: '高:' + handleNumberValue(High?.toFixed(decimalplace)), Color: paint.GetColor(High, yclose || High) },
-                    { Text: '低:' + handleNumberValue(Low?.toFixed(decimalplace)), Color: paint.GetColor(Low, yclose || Low) },
-                    { Text: '收:' + handleNumberValue(Close?.toFixed(decimalplace)), Color: paint.GetColor(Close, yclose || Close) }
+                    { Text: t('chart.Open') + handleNumberValue(Open?.toFixed(decimalplace)), Color: paint.GetColor(Open, yclose || Open) },
+                    { Text: t('chart.High') + handleNumberValue(High?.toFixed(decimalplace)), Color: paint.GetColor(High, yclose || High) },
+                    { Text: t('chart.Low') + handleNumberValue(Low?.toFixed(decimalplace)), Color: paint.GetColor(Low, yclose || Low) },
+                    { Text: t('chart.Close') + handleNumberValue(Close?.toFixed(decimalplace)), Color: paint.GetColor(Close, yclose || Close) }
                 ]
                 return {
                     AryText

+ 7 - 5
src/packages/mobile/components/modules/hqchart/timeline/index.vue

@@ -9,7 +9,7 @@ import { shallowRef, computed } from 'vue'
 import { Chart } from 'hqchart'
 import { timerInterceptor } from '@/utils/timer'
 import { handleNumberValue, changeUnit } from '@/filters'
-import { useFuturesStore } from '@/stores'
+import { useFuturesStore, i18n } from '@/stores'
 import { useDataset } from '@/hooks/hqchart/timeline/dataset'
 import { MinuteChartContainer, NetworkFilterData, NetworkFilterCallback } from '@/hooks/hqchart/timeline/types'
 import HQChart from '@/components/base/hqchart/index.vue'
@@ -25,6 +25,8 @@ const props = defineProps({
     }
 })
 
+const { t } = i18n.global
+
 const { getTSDataAsync, timeSplit, handleXAxisScale, networkFilter, updateLastData } = useDataset(props.goodsCode)
 const { quoteWatch, getGoodsQuote } = useFuturesStore()
 const goods = getGoodsQuote(props.goodsCode)
@@ -91,13 +93,13 @@ const chartOption = {
                 const { DateTime, Open, Close, Vol, Amount, YClose, Increase = 0 } = data.Data
                 const AryText = [
                     { Text: FormatDateTimeString(DateTime, true, paint.IsShowTime), Color: paint.DateTimeColor },
-                    { Text: '价:' + handleNumberValue(Close.toFixed(decimalplace)), Color: paint.GetColor(Open, YClose || Open) },
-                    { Text: '幅:' + Increase.toFixed(2) + '%', Color: paint.GetColor(Increase, 0) }
+                    { Text: t('chart.Price') + handleNumberValue(Close.toFixed(decimalplace)), Color: paint.GetColor(Open, YClose || Open) },
+                    { Text: t('chart.Increase') + Increase.toFixed(2) + '%', Color: paint.GetColor(Increase, 0) }
                 ]
                 if (!isTradeMode99.value && !isTradeMode10.value) {
                     AryText.push(
-                        { Text: '量:' + changeUnit(Vol), Color: paint.VolColor },
-                        { Text: '额:' + changeUnit(Amount), Color: paint.AmountColor }
+                        { Text: t('chart.Vol') + changeUnit(Vol), Color: paint.VolColor },
+                        { Text: t('chart.Amount') + changeUnit(Amount), Color: paint.AmountColor }
                     )
                 }
                 return {

+ 9 - 7
src/packages/pc/components/modules/hqchart/candlestick/index.vue

@@ -11,7 +11,7 @@ import { Chart } from 'hqchart'
 import { timerInterceptor } from '@/utils/timer'
 import { changeUnit, handleNumberValue, handlePriceColor, parsePercent } from '@/filters'
 import { ChartCycleType } from '@/constants/chart'
-import { useFuturesStore } from '@/stores'
+import { useFuturesStore, i18n } from '@/stores'
 import { useDataset } from '@/hooks/hqchart/candlestick/dataset'
 import { KLineChartContainer, NetworkFilterData, NetworkFilterCallback } from '@/hooks/hqchart/candlestick/types'
 import HQChart from '@/components/base/hqchart/index.vue'
@@ -37,6 +37,8 @@ const props = defineProps({
     }
 })
 
+const { t } = i18n.global
+
 const { cycleType, networkFilter, updateLastData } = useDataset(props.goodsCode, props.cycleType)
 const { quoteWatch, getGoodsQuote } = useFuturesStore()
 const goods = getGoodsQuote(props.goodsCode)
@@ -148,15 +150,15 @@ const chartOption = {
                     AryText.push({ Text: FormatTimeString(Time), Color: paint.DateTimeColor })
                 }
                 AryText.push(
-                    { Text: '开:' + handleNumberValue(Open?.toFixed(decimalplace)), Color: paint.GetColor(Open, yclose || Open) },
-                    { Text: '高:' + handleNumberValue(High?.toFixed(decimalplace)), Color: paint.GetColor(High, yclose || High) },
-                    { Text: '低:' + handleNumberValue(Low?.toFixed(decimalplace)), Color: paint.GetColor(Low, yclose || Low) },
-                    { Text: '收:' + handleNumberValue(Close?.toFixed(decimalplace)), Color: paint.GetColor(Close, yclose || Close) }
+                    { Text: t('chart.Open') + handleNumberValue(Open?.toFixed(decimalplace)), Color: paint.GetColor(Open, yclose || Open) },
+                    { Text: t('chart.High') + handleNumberValue(High?.toFixed(decimalplace)), Color: paint.GetColor(High, yclose || High) },
+                    { Text: t('chart.Low') + handleNumberValue(Low?.toFixed(decimalplace)), Color: paint.GetColor(Low, yclose || Low) },
+                    { Text: t('chart.Close') + handleNumberValue(Close?.toFixed(decimalplace)), Color: paint.GetColor(Close, yclose || Close) }
                 )
                 if (goods.value?.trademode !== 99) {
                     AryText.push(
-                        { Text: '量:' + changeUnit(Vol), Color: paint.VolColor },
-                        { Text: '额:' + changeUnit(Amount), Color: paint.AmountColor }
+                        { Text: t('chart.Vol') + changeUnit(Vol), Color: paint.VolColor },
+                        { Text: t('chart.Amount') + changeUnit(Amount), Color: paint.AmountColor }
                     )
                 }
                 return {

+ 7 - 5
src/packages/pc/components/modules/hqchart/timeline/index.vue

@@ -7,7 +7,7 @@ import { shallowRef } from 'vue'
 import { Chart } from 'hqchart'
 import { timerInterceptor } from '@/utils/timer'
 import { handleNumberValue, changeUnit } from '@/filters'
-import { useFuturesStore } from '@/stores'
+import { useFuturesStore, i18n } from '@/stores'
 import { useDataset } from '@/hooks/hqchart/timeline/dataset'
 import { MinuteChartContainer, NetworkFilterData, NetworkFilterCallback } from '@/hooks/hqchart/timeline/types'
 import HQChart from '@/components/base/hqchart/index.vue'
@@ -24,6 +24,8 @@ const props = defineProps({
     makretId: Number
 })
 
+const { t } = i18n.global
+
 const { getTSDataAsync, timeSplit, handleXAxisScale, networkFilter, updateLastData } = useDataset(props.goodsCode, props.makretId)
 const { quoteWatch, getGoodsQuote } = useFuturesStore()
 const goods = getGoodsQuote(props.goodsCode)
@@ -71,13 +73,13 @@ const chartOption = {
                 const { DateTime, Open, Close, Vol, Amount, YClose, Increase = 0 } = data.Data
                 const AryText = [
                     { Text: FormatDateTimeString(DateTime, true, paint.IsShowTime), Color: paint.DateTimeColor },
-                    { Text: '价:' + handleNumberValue(Close.toFixed(decimalplace)), Color: paint.GetColor(Open, YClose || Open) },
-                    { Text: '幅:' + Increase.toFixed(2) + '%', Color: paint.GetColor(Increase, 0) }
+                    { Text: t('chart.Price') + handleNumberValue(Close.toFixed(decimalplace)), Color: paint.GetColor(Open, YClose || Open) },
+                    { Text: t('chart.Increase') + Increase.toFixed(2) + '%', Color: paint.GetColor(Increase, 0) }
                 ]
                 if (goods.value?.trademode !== 99) {
                     AryText.push(
-                        { Text: '量:' + changeUnit(Vol), Color: paint.VolColor },
-                        { Text: '额:' + changeUnit(Amount), Color: paint.AmountColor }
+                        { Text: t('chart.Vol') + changeUnit(Vol), Color: paint.VolColor },
+                        { Text: t('chart.Amount') + changeUnit(Amount), Color: paint.AmountColor }
                     )
                 }
                 return {

+ 4 - 4
src/packages/pc/components/modules/quote/chart/kline/index.vue

@@ -5,10 +5,10 @@
         <template v-else>
             <div class="app-echats-kline__container">
                 <ul class="legend">
-                    <li class="legend-item">开: {{ selectedItem.open }}</li>
-                    <li class="legend-item">收: {{ selectedItem.close }}</li>
-                    <li class="legend-item">高: {{ selectedItem.highest }}</li>
-                    <li class="legend-item">低: {{ selectedItem.lowest }}</li>
+                    <li class="legend-item">{{ t('chart.Open') }}{{ selectedItem.open }}</li>
+                    <li class="legend-item">{{ t('chart.Close') }}{{ selectedItem.close }}</li>
+                    <li class="legend-item">{{ t('chart.High') }}{{ selectedItem.highest }}</li>
+                    <li class="legend-item">{{ t('chart.Low') }}{{ selectedItem.lowest }}</li>
                     <li class="legend-item">MA5: {{ selectedItem.ma5 }}</li>
                     <li class="legend-item">MA10: {{ selectedItem.ma10 }}</li>
                     <li class="legend-item">MA15: {{ selectedItem.ma15 }}</li>

+ 7 - 7
src/packages/pc/components/modules/quote/price/index.vue

@@ -6,13 +6,13 @@
                 <span>{{ quote.goodsname }}</span>
             </div>
             <div class="block-bottom">
-                <div class="block-bottom-left" v-if="quote.trademode != 10">
-                    <span :class="quote.lastColor">{{ handleNumberValue(quote.last.toFixed(quote.decimalplace)) }}</span>
-                </div>
-                <div class="block-bottom-left" v-els>
-                    <span :class="quote.askColor">{{ handleNumberValue(quote.ask.toFixed(quote.decimalplace)) }}</span>
-                    <span>{{ ' / ' }}</span>
-                    <span :class="quote.bidColor">{{ handleNumberValue(quote.bid.toFixed(quote.decimalplace)) }}</span>
+                <div class="block-bottom-left">
+                    <span :class="quote.lastColor" v-if="quote.trademode != 10">{{ handleNumberValue(quote.last.toFixed(quote.decimalplace)) }}</span>
+                    <div v-else>
+                        <span :class="quote.askColor">{{ handleNumberValue(quote.ask.toFixed(quote.decimalplace)) }}</span>
+                        <span>{{ ' / ' }}</span>
+                        <span :class="quote.bidColor">{{ handleNumberValue(quote.bid.toFixed(quote.decimalplace)) }}</span>
+                    </div>
                 </div>
                 <div class="block-bottom-right">
                     <span :class="quote.lastColor">{{ quote.rise.toFixed(quote.decimalplace) }}</span>

+ 1 - 1
src/packages/pc/views/footer/pricing/position/components/transfer/index.vue

@@ -69,7 +69,7 @@ import { useOrder } from '@/business/trade'
 import { formatDecimal, parsePercent } from '@/filters'
 import { getBuyOrSellName, BuyOrSell, getPricemode2List, PriceMode } from '@/constants/order'
 import { useFuturesStore, i18n, useSettingStore } from '@/stores'
-import { EBuildType, EDelistingType, EListingSelectType, EOrderOperateType, EPriceMode, EValidType } from '@/constants/client'
+import { EBuildType, EDelistingType, EListingSelectType, EOrderOperateType, EValidType } from '@/constants/client'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
 const props = defineProps({