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