浏览代码

Merge branch 'v20' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL into v20

li.shaoyi 2 年之前
父节点
当前提交
b0da285b8d

+ 7 - 1
src/packages/mobile/views/market/list/Index.vue

@@ -4,6 +4,11 @@
             <app-navbar title="参考行情" :show-back-button="showBackButton" />
         </template>
         <app-list :columns="columns" :data-list="dataList" @row-click="rowClick">
+            <!-- 商品/代码 -->
+            <template #goodsname="{ row }">
+                <span>{{ row.goodsname }}</span>
+                <span class="text-small">{{ row.goodscode }}</span>
+            </template>
             <!-- 卖价 -->
             <template #ask="{ row }">
                 <span :class="row.askColor">{{ row.ask }}</span>
@@ -61,6 +66,7 @@ const futuresStore = useFuturesStore()
 const dataList = computed(() => {
     const list = futuresStore.goodsQuoteList.filter((e) => e.marketid === 99201)
     return list.map((e) => ({
+        goodsname: e.goodsname,
         goodscode: e.goodscode,
         askColor: e.askColor,
         bidColor: e.bidColor,
@@ -85,7 +91,7 @@ const goodsCodes = dataList.value.map((e) => e.goodscode.toUpperCase())
 const subscribe = quoteSocket.createSubscribe()
 
 const columns: Model.TableColumn[] = [
-    { prop: 'goodscode', label: '合约' },
+    { prop: 'goodsname', label: '商品/合约' },
     { prop: 'ask', label: '卖价' },
     { prop: 'bid', label: '买价' },
     { prop: 'last', label: '最新价' },

+ 5 - 5
src/packages/mobile/views/swap/list/Index.vue

@@ -4,7 +4,7 @@
             <app-navbar title="掉期贸易" :show-back-button="showBackButton" />
         </template>
         <app-list :columns="columns" :data-list="tableList" @row-click="rowClick">
-            <!-- 商品/标的 -->
+            <!-- 商品/代码 -->
             <template #goodsname="{ row }">
                 <span>{{ row.goodsname }}</span>
                 <span class="text-small">{{ row.goodscode }}</span>
@@ -73,14 +73,14 @@ const { dataList, run } = useRequest(queryQuoteGoodsList, {
 })
 
 const tableList = computed(() => {
-    return dataList.value.map(({ refgoodsid,refgoodscode, goodscode, goodsname }) => {
+    return dataList.value.map(({ refgoodsid, goodscode, goodsname, refgoodsname }) => {
         const quote = futuresStore.getGoodsQuote(refgoodsid)
         const { lastColor, openedColor, lowestColor, highestColor, last = 0, presettle = 0, rise = 0, change, amplitude, highest = 0, lowest = 0, opened = 0, decimalplace } = quote.value ?? {}
         return {
             refgoodsid,
-            refgoodscode,
             goodscode,
             goodsname,
+            refgoodsname,
             lastColor,
             openedColor,
             lowestColor,
@@ -98,8 +98,8 @@ const tableList = computed(() => {
 })
 
 const columns: Model.TableColumn[] = [
-    { prop: 'goodsname', label: '商品/合约' },
-    { prop: 'refgoodscode', label: '标的' },
+    { prop: 'goodsname', label: '商品/代码' },
+    { prop: 'refgoodsname', label: '标的合约' },
     { prop: 'last', label: '当前价' },
     { prop: 'rise', label: '涨跌' },
     { prop: 'change', label: '幅度' },

+ 6 - 4
src/packages/pc/views/market/trade/swap/index.vue

@@ -66,13 +66,14 @@ const { dataList, run } = useRequest(queryQuoteGoodsList, {
 })
 
 const tableList = computed(() => {
-    return dataList.value.map(({ refgoodsid, goodscode, goodsname }) => {
+    return dataList.value.map(({ refgoodsid, goodscode, goodsname, refgoodsname }) => {
         const quote = futuresStore.getGoodsQuote(refgoodsid)
         const { lastColor, openedColor, lowestColor, highestColor, last = 0, presettle = 0, rise = 0, change, amplitude, highest = 0, lowest = 0, opened = 0, decimalplace } = quote.value ?? {}
         return {
             refgoodsid,
             goodscode,
             goodsname,
+            refgoodsname,
             lastColor,
             openedColor,
             lowestColor,
@@ -90,9 +91,10 @@ const tableList = computed(() => {
 })
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
-    { prop: 'goodscode', label: '商品代码' },
-    { prop: 'goodsname', label: '商品' },
-    { prop: 'last', label: '最新价' },
+    { prop: 'goodscode', label: '代码' },
+    { prop: 'goodsname', label: '名称' },
+    { prop: 'refgoodsname', label: '标的合约' },
+    { prop: 'last', label: '当前价' },
     { prop: 'rise', label: '涨跌' },
     { prop: 'change', label: '涨跌幅' },
     { prop: 'opened', label: '今开' },