|
|
@@ -7,7 +7,7 @@
|
|
|
<svg class="icon svg-icon" aria-hidden="true">
|
|
|
<use xlink:href="#icon-shuzhuangtu"></use>
|
|
|
</svg>
|
|
|
- {{ getUserName() }}
|
|
|
+ {{ getAreaUserName() }}
|
|
|
</span>
|
|
|
<mtp-table-button :buttons="firstBtn" @click="openComponent" />
|
|
|
</div>
|
|
|
@@ -53,7 +53,7 @@ import { initData } from '@/common/methods';
|
|
|
import { defineAsyncComponent, defineComponent, MtpTableButton } from '@/common/export/commonTable';
|
|
|
import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
|
|
|
import { getRoleTypeName, useSelectedData, handleBtnList } from '../setup';
|
|
|
-import { getUserName } from '@/services/bus/user';
|
|
|
+import { getAreaUserName } from '@/services/bus/user';
|
|
|
import { handleTableList } from '../setup';
|
|
|
import { ErmcpLoginUser, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
|
|
|
import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
@@ -64,82 +64,82 @@ import { getTableButton } from '@/common/setup/table/button';
|
|
|
import { Ref, ref } from 'vue';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: 'account_info_trade',
|
|
|
- components: {
|
|
|
- MtpTableButton,
|
|
|
- filterCustomTable,
|
|
|
- detail: defineAsyncComponent(() => import('../../compoments/detail-trader/index.vue')),
|
|
|
- account_trade_modify: defineAsyncComponent(() => import('../../compoments/modify-traders/index.vue')),
|
|
|
- account_trade_add: defineAsyncComponent(() => import('../../compoments/add-traders/index.vue')),
|
|
|
- account_trade_child_add: defineAsyncComponent(() => import('../../compoments/add-child-traders/index.vue')),
|
|
|
- account_trade_child_locked: defineAsyncComponent(() => import('../../compoments/locked-trader/index.vue')),
|
|
|
- account_trade_child_unlocked: defineAsyncComponent(() => import('../../compoments/unlocked-trader/index.vue')),
|
|
|
- account_trade_child_cancel: defineAsyncComponent(() => import('../../compoments/cancel-trader/index.vue')),
|
|
|
- account_trade_child_reset: defineAsyncComponent(() => import('../../compoments/reset-trader/index.vue')),
|
|
|
- account_trade_child_modify: defineAsyncComponent(() => import('../../compoments/modify-child-traders/index.vue')),
|
|
|
- },
|
|
|
- setup() {
|
|
|
- // 加载状态
|
|
|
- const loading = ref<boolean>(false);
|
|
|
- const { tableList, queryTable } = handlerManagerList(loading, 2);
|
|
|
+ name: 'account_info_trade',
|
|
|
+ components: {
|
|
|
+ MtpTableButton,
|
|
|
+ filterCustomTable,
|
|
|
+ detail: defineAsyncComponent(() => import('../../compoments/detail-trader/index.vue')),
|
|
|
+ account_trade_modify: defineAsyncComponent(() => import('../../compoments/modify-traders/index.vue')),
|
|
|
+ account_trade_add: defineAsyncComponent(() => import('../../compoments/add-traders/index.vue')),
|
|
|
+ account_trade_child_add: defineAsyncComponent(() => import('../../compoments/add-child-traders/index.vue')),
|
|
|
+ account_trade_child_locked: defineAsyncComponent(() => import('../../compoments/locked-trader/index.vue')),
|
|
|
+ account_trade_child_unlocked: defineAsyncComponent(() => import('../../compoments/unlocked-trader/index.vue')),
|
|
|
+ account_trade_child_cancel: defineAsyncComponent(() => import('../../compoments/cancel-trader/index.vue')),
|
|
|
+ account_trade_child_reset: defineAsyncComponent(() => import('../../compoments/reset-trader/index.vue')),
|
|
|
+ account_trade_child_modify: defineAsyncComponent(() => import('../../compoments/modify-child-traders/index.vue')),
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ // 加载状态
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
+ const { tableList, queryTable } = handlerManagerList(loading, 2);
|
|
|
|
|
|
- const firstBtn = getTableButton(['account_trade_add']);
|
|
|
- const secondBtn = getTableButton(['account_trade_modify', 'account_trade_child_add']);
|
|
|
- const thirdBtn = getTableButton(['account_trade_add', 'account_trade_modify', 'account_trade_child_add'], true);
|
|
|
+ const firstBtn = getTableButton(['account_trade_add']);
|
|
|
+ const secondBtn = getTableButton(['account_trade_modify', 'account_trade_child_add']);
|
|
|
+ const thirdBtn = getTableButton(['account_trade_add', 'account_trade_modify', 'account_trade_child_add'], true);
|
|
|
|
|
|
- // 获取列表数据
|
|
|
- function queryTableAction() {
|
|
|
- handleTableList(queryTable, tableList);
|
|
|
- }
|
|
|
+ // 获取列表数据
|
|
|
+ function queryTableAction() {
|
|
|
+ handleTableList(queryTable, tableList);
|
|
|
+ }
|
|
|
|
|
|
- // 授权期货账户
|
|
|
- const accountList = ref<ErmcpTaAccount[]>([]);
|
|
|
- // 弹窗选中的数据
|
|
|
- const selectedData = ref<ErmcpLoginUser>();
|
|
|
- // 控制异步组件
|
|
|
- const { componentId, closeComponent, openComponent } = handleModalComponent<ErmcpLoginUser>(queryTableAction, selectedData as Ref<ErmcpLoginUser>);
|
|
|
+ // 授权期货账户
|
|
|
+ const accountList = ref<ErmcpTaAccount[]>([]);
|
|
|
+ // 弹窗选中的数据
|
|
|
+ const selectedData = ref<ErmcpLoginUser>();
|
|
|
+ // 控制异步组件
|
|
|
+ const { componentId, closeComponent, openComponent } = handleModalComponent<ErmcpLoginUser>(queryTableAction, selectedData as Ref<ErmcpLoginUser>);
|
|
|
|
|
|
- // 处理点击 二级按钮时候 选中的数据
|
|
|
- const { firstSelectedData, openSecondBtnAction } = useSelectedData(tableList, openComponent);
|
|
|
+ // 处理点击 二级按钮时候 选中的数据
|
|
|
+ const { firstSelectedData, openSecondBtnAction } = useSelectedData(tableList, openComponent);
|
|
|
|
|
|
- initData(() => {
|
|
|
- queryTableAction();
|
|
|
- // 处理授权期货账户
|
|
|
- queryResultLoadingAndInfo(QueryAccMgrTaaccount, loading).then((res) => {
|
|
|
- accountList.value.length = 0;
|
|
|
- res.forEach((el: ErmcpTaAccountEx) => {
|
|
|
- const { subacclist } = el;
|
|
|
- subacclist.forEach((e) => {
|
|
|
- if (e.tradestatus === 1) {
|
|
|
- //交易状态 - 1:正常
|
|
|
- accountList.value.push(e);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
+ initData(() => {
|
|
|
+ queryTableAction();
|
|
|
+ // 处理授权期货账户
|
|
|
+ queryResultLoadingAndInfo(QueryAccMgrTaaccount, loading).then((res) => {
|
|
|
+ accountList.value.length = 0;
|
|
|
+ res.forEach((el: ErmcpTaAccountEx) => {
|
|
|
+ const { subacclist } = el;
|
|
|
+ subacclist.forEach((e) => {
|
|
|
+ if (e.tradestatus === 1) {
|
|
|
+ //交易状态 - 1:正常
|
|
|
+ accountList.value.push(e);
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
- // 查询
|
|
|
- function search(value: any) {}
|
|
|
+ });
|
|
|
+ });
|
|
|
+ // 查询
|
|
|
+ function search(value: any) { }
|
|
|
|
|
|
- return {
|
|
|
- selectedData,
|
|
|
- firstBtn,
|
|
|
- secondBtn,
|
|
|
- thirdBtn,
|
|
|
- loading,
|
|
|
- search,
|
|
|
- tableList,
|
|
|
- accountList,
|
|
|
- getRoleTypeName,
|
|
|
- handleBtnList,
|
|
|
- getUserName,
|
|
|
- componentId,
|
|
|
- closeComponent,
|
|
|
- openComponent,
|
|
|
- openSecondBtnAction,
|
|
|
- firstSelectedData,
|
|
|
- };
|
|
|
- },
|
|
|
+ return {
|
|
|
+ selectedData,
|
|
|
+ firstBtn,
|
|
|
+ secondBtn,
|
|
|
+ thirdBtn,
|
|
|
+ loading,
|
|
|
+ search,
|
|
|
+ tableList,
|
|
|
+ accountList,
|
|
|
+ getRoleTypeName,
|
|
|
+ handleBtnList,
|
|
|
+ getAreaUserName,
|
|
|
+ componentId,
|
|
|
+ closeComponent,
|
|
|
+ openComponent,
|
|
|
+ openSecondBtnAction,
|
|
|
+ firstSelectedData,
|
|
|
+ };
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|
|
|
|