Handy_Cao преди 2 години
родител
ревизия
8c4a46d6d2

+ 1 - 1
src/packages/mobile/views/order/position/components/spot/pickup/Index.vue

@@ -4,7 +4,7 @@
         <template #default="{ animation }">
             <app-view class="g-form">
                 <template #header>
-                    <app-navbar title="挂牌" @back="closed" />
+                    <app-navbar title="提货" @back="closed" />
                 </template>
                 <Form ref="formRef" class="g-form__container" @submit="onSubmit">
                     <CellGroup title="现货持仓信息" inset>

+ 3 - 2
src/packages/mobile/views/order/position/components/swap/list/Index.vue

@@ -45,7 +45,7 @@
                     </ul>
                 </div>
                 <div class="g-order-list__btnbar">
-                    <Button size="small" @click="showComponent('close', item)" round>平仓</Button>
+                    <Button size="small" v-if="useStore.userType === 5" @click="showComponent('close', item)" round>平仓</Button>
                 </div>
             </div>
         </div>
@@ -62,7 +62,7 @@ import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { getBuyOrSellName } from '@/constants/order'
 import { formatDecimal, handleNumberValue, handlePriceColor } from '@/filters'
 import { usePosition } from '@/business/position'
-import { useFuturesStore } from '@/stores'
+import { useFuturesStore, useUserStore } from '@/stores'
 import eventBus from '@/services/bus'
 
 const componentMap = new Map<string, unknown>([
@@ -70,6 +70,7 @@ const componentMap = new Map<string, unknown>([
 ])
 
 const futuresStore = useFuturesStore()
+const useStore = useUserStore()
 const { positionList, loading } = usePosition(46)
 const selectedRow = shallowRef<Model.TradePositionRsp>()
 const pullRefreshRef = shallowRef()

+ 3 - 2
src/packages/pc/views/footer/swap/position/index.vue

@@ -25,7 +25,7 @@
             <span :class="row.closeplColor">{{ formatDecimal(row.closepl, row.decimalplace) }}</span>
         </template>
         <!-- 展开行 -->
-        <template #expand="{ row }">
+        <template v-if="useStore.userType === 5" #expand="{ row }">
             <div class="buttonbar">
                 <el-button type="danger" size="small" @click="showComponent('close', row)">平仓</el-button>
             </div>
@@ -45,6 +45,7 @@ import { useComponent } from '@/hooks/component'
 import { getBuyOrSellName } from '@/constants/order'
 import { useComposeTable } from '@pc/components/base/table'
 import AppTable from '@pc/components/base/table/index.vue'
+import { useUserStore } from '@/stores'
 
 const componentMap = new Map<string, unknown>([
     ['close', defineAsyncComponent(() => import('./close/index.vue'))],
@@ -53,7 +54,7 @@ const componentMap = new Map<string, unknown>([
 const { positionList, loading } = usePosition(46)
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
-
+const useStore = useUserStore()
 const { rowKey, expandKeys, rowClick } = useComposeTable<Model.TradePositionRsp>({ rowKey: 'pkid' })
 const selectedRow = shallowRef<Model.TradePositionRsp>()