|
@@ -10,7 +10,7 @@
|
|
|
</svg>
|
|
</svg>
|
|
|
{{ getUserName() }}
|
|
{{ getUserName() }}
|
|
|
</span>
|
|
</span>
|
|
|
- <BtnList :btnList="firstBtn" />
|
|
|
|
|
|
|
+ <mtp-table-button :buttons="firstBtn" @click="openComponent" />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="a-collapse-container">
|
|
<div class="a-collapse-container">
|
|
|
<a-collapse class="spotCollapse" v-for="(item, i) in tableList" :key="i + '11'" :bordered="false">
|
|
<a-collapse class="spotCollapse" v-for="(item, i) in tableList" :key="i + '11'" :bordered="false">
|
|
@@ -27,7 +27,8 @@
|
|
|
<a-row class="headRow">
|
|
<a-row class="headRow">
|
|
|
<a-col :span="12">{{ item.rolename }}({{ item.userlist.length }})</a-col>
|
|
<a-col :span="12">{{ item.rolename }}({{ item.userlist.length }})</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <BtnList :selectedData="item" :btnList="secondBtn" @onClick="openAction" />
|
|
|
|
|
|
|
+ <!-- <BtnList :selectedData="item" :btnList="secondBtn" @onClick="openAction" /> -->
|
|
|
|
|
+ <mtp-table-button :buttons="secondBtn" :record="item" @click="openComponent" />
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
</template>
|
|
</template>
|
|
@@ -39,13 +40,14 @@
|
|
|
<a-col :span="12">{{ getLoginStatusEnumItemName(sub.loginstatus) }}</a-col>
|
|
<a-col :span="12">{{ getLoginStatusEnumItemName(sub.loginstatus) }}</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
</template>
|
|
</template>
|
|
|
- <BtnList :btnList="sub.btnList" :selectedData="sub" @onClick="moreOptenAction" />
|
|
|
|
|
|
|
+ <!-- <BtnList :btnList="sub.btnList" :selectedData="sub" @onClick="moreOptenAction" /> -->
|
|
|
|
|
+ <mtp-table-button :buttons="thirdBtn" :record="sub" @click="openComponent" />
|
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
</a-collapse>
|
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
</a-collapse>
|
|
|
</div>
|
|
</div>
|
|
|
- <Add @refresh="handleBtnAction" :selectedData="addModelData" :tableList="tableList" />
|
|
|
|
|
|
|
+ <!-- <Add @refresh="handleBtnAction" :selectedData="addModelData" :tableList="tableList" />
|
|
|
<Modify :tableList="tableList" @refresh="handleBtnAction" :selectedData="moreModelData" />
|
|
<Modify :tableList="tableList" @refresh="handleBtnAction" :selectedData="moreModelData" />
|
|
|
<Cancel @refresh="handleBtnAction" :selectedData="moreModelData" />
|
|
<Cancel @refresh="handleBtnAction" :selectedData="moreModelData" />
|
|
|
<Locked @refresh="handleBtnAction" :selectedData="moreModelData" />
|
|
<Locked @refresh="handleBtnAction" :selectedData="moreModelData" />
|
|
@@ -53,59 +55,63 @@
|
|
|
<Reset @refresh="handleBtnAction" :selectedData="moreModelData" />
|
|
<Reset @refresh="handleBtnAction" :selectedData="moreModelData" />
|
|
|
<Detail :selectedData="moreModelData" />
|
|
<Detail :selectedData="moreModelData" />
|
|
|
<AddPermission @refresh="handleBtnAction" />
|
|
<AddPermission @refresh="handleBtnAction" />
|
|
|
- <Permission />
|
|
|
|
|
|
|
+ <Permission /> -->
|
|
|
|
|
+ <component :is="componentId" v-if="componentId" :tableList="tableList" :selectedData="selectedData" @cancel="closeComponent"></component>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { defineComponent, initData, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
|
|
|
|
|
|
|
+import { defineAsyncComponent, defineComponent, MtpTableButton } from '@/common/export/commonTable';
|
|
|
|
|
+import { initData } from '@/common/methods';
|
|
|
import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
|
|
import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
|
|
|
import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
|
|
import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
|
|
|
import { getAccountStatus, handleModalData, handleTableList, useTaAccount } from '../setup';
|
|
import { getAccountStatus, handleModalData, handleTableList, useTaAccount } from '../setup';
|
|
|
import { getUserName } from '@/services/bus/user';
|
|
import { getUserName } from '@/services/bus/user';
|
|
|
-import Add from '../../compoments/add-managers/index.vue';
|
|
|
|
|
-import Modify from '../../compoments/modify-managers/index.vue';
|
|
|
|
|
-import Detail from '../../compoments/detail-managers/index.vue';
|
|
|
|
|
-import Cancel from '../../compoments/cancel-managers/index.vue';
|
|
|
|
|
-import Locked from '../../compoments/locked-managers/index.vue';
|
|
|
|
|
-import Unlocked from '../../compoments/unlocked-managers/index.vue';
|
|
|
|
|
-import Reset from '../../compoments/reset-managers/index.vue';
|
|
|
|
|
-import AddPermission from '../../compoments/add-managers-permission/index.vue';
|
|
|
|
|
-import Permission from '../../compoments/managers-permission/index.vue';
|
|
|
|
|
import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
|
|
import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
|
|
|
-import { openModal } from '@/common/setup/modal';
|
|
|
|
|
import { handlerManagerList } from '@/common/setup/user';
|
|
import { handlerManagerList } from '@/common/setup/user';
|
|
|
-import { ref } from 'vue';
|
|
|
|
|
|
|
+import { ref, Ref } from 'vue';
|
|
|
|
|
+import { handleModalComponent } from '@/common/setup/asyncComponent';
|
|
|
|
|
+import { getTableButton } from '@/common/setup/table/button';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'account_info_manager',
|
|
name: 'account_info_manager',
|
|
|
components: {
|
|
components: {
|
|
|
- contextMenu,
|
|
|
|
|
- BtnList,
|
|
|
|
|
|
|
+ MtpTableButton,
|
|
|
filterCustomTable,
|
|
filterCustomTable,
|
|
|
- Add,
|
|
|
|
|
- Modify,
|
|
|
|
|
- Detail,
|
|
|
|
|
- Cancel,
|
|
|
|
|
- Locked,
|
|
|
|
|
- Unlocked,
|
|
|
|
|
- Reset,
|
|
|
|
|
- AddPermission,
|
|
|
|
|
- Permission,
|
|
|
|
|
|
|
+ detail: defineAsyncComponent(() => import('../../compoments/detail-managers/index.vue')), // 详情
|
|
|
|
|
+ account_manager_add: defineAsyncComponent(() => import('../../compoments/add-managers/index.vue')), // 新增权限模板
|
|
|
|
|
+ account_manager_setting: defineAsyncComponent(() => import('../../compoments/managers-permission/index.vue')), // 权限设置
|
|
|
|
|
+ account_manager_child_add: defineAsyncComponent(() => import('../../compoments/add-managers-permission/index.vue')), // 新增角色
|
|
|
|
|
+ account_manager_child_modify: defineAsyncComponent(() => import('../../compoments/modify-managers/index.vue')), // 修改
|
|
|
|
|
+ account_trade_child_cancel: defineAsyncComponent(() => import('../../compoments/cancel-managers/index.vue')), // 注销
|
|
|
|
|
+ account_manager_child_locked: defineAsyncComponent(() => import('../../compoments/locked-managers/index.vue')), // 锁定
|
|
|
|
|
+ account_manager_child_unlocked: defineAsyncComponent(() => import('../../compoments/unlocked-managers/index.vue')), // 解锁
|
|
|
|
|
+ account_manager_child_reset: defineAsyncComponent(() => import('../../compoments/reset-managers/index.vue')), // 重置
|
|
|
},
|
|
},
|
|
|
setup() {
|
|
setup() {
|
|
|
// 加载状态
|
|
// 加载状态
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
const { tableList, queryTable } = handlerManagerList(loading, 3);
|
|
const { tableList, queryTable } = handlerManagerList(loading, 3);
|
|
|
- const [firstBtn, secondBtn, thirdBtn] = _getBtnList('account_info_manager', true).value;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const firstBtn = getTableButton(['account_manager_add', 'account_manager_setting']);
|
|
|
|
|
+ const secondBtn = getTableButton(['account_manager_child_add']);
|
|
|
|
|
+ const thirdBtn = getTableButton(['account_manager_child_modify', 'account_manager_child_reset', 'account_manager_child_locked', 'account_manager_child_unlocked', 'account_trade_child_cancel', 'detail']);
|
|
|
|
|
+
|
|
|
// 新增弹窗
|
|
// 新增弹窗
|
|
|
const { selectedData: addModelData, openAction } = handleModalData<ErmcpLoginUserEx>();
|
|
const { selectedData: addModelData, openAction } = handleModalData<ErmcpLoginUserEx>();
|
|
|
// 修改 重置密码、详情等弹窗
|
|
// 修改 重置密码、详情等弹窗
|
|
|
const { selectedData: moreModelData, openAction: moreOptenAction } = handleModalData<ErmcpLoginUser>();
|
|
const { selectedData: moreModelData, openAction: moreOptenAction } = handleModalData<ErmcpLoginUser>();
|
|
|
|
|
+
|
|
|
// 处理根据状态显示对应按钮
|
|
// 处理根据状态显示对应按钮
|
|
|
function handleBtnAction() {
|
|
function handleBtnAction() {
|
|
|
handleTableList(queryTable, tableList, thirdBtn);
|
|
handleTableList(queryTable, tableList, thirdBtn);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 弹窗选中的数据
|
|
|
|
|
+ const selectedData = ref<ErmcpLoginUser>();
|
|
|
|
|
+ // 控制异步组件
|
|
|
|
|
+ const { componentId, closeComponent, openComponent } = handleModalComponent<ErmcpLoginUser>(handleBtnAction, selectedData as Ref<ErmcpLoginUser>);
|
|
|
|
|
+
|
|
|
// 期货账户
|
|
// 期货账户
|
|
|
const { updateTaAccount } = useTaAccount();
|
|
const { updateTaAccount } = useTaAccount();
|
|
|
initData(() => {
|
|
initData(() => {
|
|
@@ -131,6 +137,9 @@ export default defineComponent({
|
|
|
moreModelData,
|
|
moreModelData,
|
|
|
moreOptenAction,
|
|
moreOptenAction,
|
|
|
handleBtnAction,
|
|
handleBtnAction,
|
|
|
|
|
+ componentId,
|
|
|
|
|
+ closeComponent,
|
|
|
|
|
+ openComponent,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|