Преглед изворни кода

Merge remote-tracking branch 'origin/master'

yu jie пре 4 година
родитељ
комит
c203ad8b2f
17 измењених фајлова са 525 додато и 595 уклоњено
  1. 3 1
      src/common/setup/asyncComponent/index.ts
  2. 7 12
      src/views/information/account_info/compoments/add-business/index.vue
  3. 98 99
      src/views/information/account_info/compoments/add-managers-permission/index.vue
  4. 3 4
      src/views/information/account_info/compoments/cancel-business/index.vue
  5. 3 3
      src/views/information/account_info/compoments/detail-business/index.vue
  6. 4 5
      src/views/information/account_info/compoments/locked-business/index.vue
  7. 101 102
      src/views/information/account_info/compoments/managers-permission-delete/index.vue
  8. 101 102
      src/views/information/account_info/compoments/managers-permission-detail/index.vue
  9. 100 100
      src/views/information/account_info/compoments/managers-permission-modify/index.vue
  10. 21 80
      src/views/information/account_info/compoments/managers-permission/index.vue
  11. 11 16
      src/views/information/account_info/compoments/modify-business/index.vue
  12. 6 10
      src/views/information/account_info/compoments/reset-business/index.vue
  13. 3 4
      src/views/information/account_info/compoments/unlocked-business/index.vue
  14. 40 33
      src/views/information/account_info/list/account_info_business/index.vue
  15. 8 8
      src/views/information/account_info/list/account_info_manager/index.vue
  16. 11 11
      src/views/information/account_info/list/account_info_trade/index.vue
  17. 5 5
      src/views/information/account_info/list/setup.ts

+ 3 - 1
src/common/setup/asyncComponent/index.ts

@@ -21,7 +21,9 @@ export function handleModalComponent<T>(callback: Function, selectedRow: Ref<T>)
      */
     function openComponent(item: btnType, record: T) {
         // 更新点击的数据,处理例如,修改之后,再次打开页面是之前的数据的问题
-        record && (selectedRow.value = record);
+        if (record && selectedRow) {
+            selectedRow.value = record
+        }
         componentId.value = item.code;
     }
     return { componentId, closeComponent, openComponent }

+ 7 - 12
src/views/information/account_info/compoments/add-business/index.vue

@@ -77,13 +77,13 @@
 </template>
 
 <script lang="ts">
-import { closeModal } from '@/common/setup/modal/index';
-import { defineComponent, ref, watchEffect } from 'vue';
+import { defineComponent, ref } from 'vue';
 import { handleBusinessForm } from '../setup';
 import { BusinessFormState } from '../interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { loginAccountOperate } from '@/services/proto/accountinfo';
 import { validateAction } from '@/common/setup/form';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'add-business-info',
@@ -96,14 +96,10 @@ export default defineComponent({
     },
     setup(props, context) {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_add');
+        const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
         const { rules, formState, formRef, initFormData } = handleBusinessForm();
-        watchEffect(() => {
-            if (visible.value) {
-                formState.roleids = [props.roleid];
-            }
-        });
+        formState.roleids = [props.roleid];
         function submit() {
             validateAction<BusinessFormState>(formRef, formState).then((param) => {
                 const reqParam = {
@@ -112,14 +108,13 @@ export default defineComponent({
                 delete param.userid;
                 Object.assign(reqParam, param);
                 requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
-                    closeAction();
-                    context.emit('refresh');
+                    cancel(true);
                 });
             });
         }
         function closeAction() {
-          Object.assign(formState, initFormData())
-          cancel();
+            Object.assign(formState, initFormData());
+            cancel();
         }
         return {
             formState,

+ 98 - 99
src/views/information/account_info/compoments/add-managers-permission/index.vue

@@ -6,7 +6,7 @@
            @cancel="cancel"
            centered
            :maskClosable="false"
-           width="1230px">
+           width="100%">
     <template #footer>
       <a-button key="cancel"
                 type="primary"
@@ -82,110 +82,109 @@
 </template>
 
 <script lang="ts">
-    import {closeModal} from '@/common/setup/modal/index';
-    import {defineComponent, ref, watchEffect} from 'vue';
-    import {handleBusinessForm} from '../setup';
-    import {ErmcpRoleMenuEx} from '@/services/go/ermcp/account/interface';
-    import {queryResultLoadingAndInfo, requestResultLoadingAndInfo} from '@/common/methods/request/resultInfo';
-    import {QueryAccMgrRoleMenu} from '@/services/go/ermcp/account';
-    import {message} from 'ant-design-vue';
-    import {roleOperate} from '@/services/proto/accountinfo'
-    import {ManagerRoleOperateReq, MemberFuncMenu} from "@/services/proto/accountinfo/interface";
-    import {getUserId} from "@/services/bus/account";
-    import {getAoletype_string, getAreaUserId, getUserAccountType} from "@/services/bus/user";
-    import {getLongTypeLoginID} from "@/services/bus/login";
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, ref, watchEffect } from 'vue';
+import { handleBusinessForm } from '../setup';
+import { ErmcpRoleMenuEx } from '@/services/go/ermcp/account/interface';
+import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { QueryAccMgrRoleMenu } from '@/services/go/ermcp/account';
+import { message } from 'ant-design-vue';
+import { roleOperate } from '@/services/proto/accountinfo';
+import { ManagerRoleOperateReq, MemberFuncMenu } from '@/services/proto/accountinfo/interface';
+import { getUserId } from '@/services/bus/account';
+import { getAoletype_string, getAreaUserId, getUserAccountType } from '@/services/bus/user';
+import { getLongTypeLoginID } from '@/services/bus/login';
 
-    export default defineComponent({
-        name: 'account_info_manager_btn_add',
-        setup(props, context) {
-            // 控制关闭弹窗
-            const {visible, cancel} = closeModal('account_info_manager_btn_add');
-            const {rules, formState, formRef} = handleBusinessForm();
-            const loading = ref<boolean>(false);
-            const tableList = ref<ErmcpRoleMenuEx[]>([]);
-            const name = ref<string>('')
-            watchEffect(() => {
-                if (visible.value) {
-                    const param = {userid: getUserId(), roleid: getAoletype_string()}
-                    queryResultLoadingAndInfo(QueryAccMgrRoleMenu, loading, param).then((res) => {
-                        tableList.value = res;
+export default defineComponent({
+    name: 'account_info_manager_btn_add',
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_manager_btn_add');
+        const { rules, formState, formRef } = handleBusinessForm();
+        const loading = ref<boolean>(false);
+        const tableList = ref<ErmcpRoleMenuEx[]>([]);
+        const name = ref<string>('');
+        watchEffect(() => {
+            if (visible.value) {
+                const param = { userid: getUserId(), roleid: getAoletype_string() };
+                queryResultLoadingAndInfo(QueryAccMgrRoleMenu, loading, param).then((res) => {
+                    tableList.value = res;
+                });
+            }
+        });
+
+        function submit() {
+            const result: string[] = [];
+            // 处理已经勾选的数据
+            tableList.value.forEach((first) => {
+                if (first.Menu.ishadrole) {
+                    result.push(first.Menu.resourcecode);
+                    first.SubMenu.forEach((second) => {
+                        if (second.Menu.ishadrole) {
+                            result.push(second.Menu.resourcecode);
+                            second.SubMenu.forEach((third) => {
+                                if (third.Menu.ishadrole) {
+                                    result.push(third.Menu.resourcecode);
+                                }
+                            });
+                        }
                     });
                 }
             });
-
-            function submit() {
-                const result: string[] = []
-                // 处理已经勾选的数据
-                tableList.value.forEach(first => {
-                    if (first.Menu.ishadrole) {
-                        result.push(first.Menu.resourcecode)
-                        first.SubMenu.forEach(second => {
-                            if (second.Menu.ishadrole) {
-                                result.push(second.Menu.resourcecode)
-                                second.SubMenu.forEach(third => {
-                                    if (third.Menu.ishadrole) {
-                                        result.push(third.Menu.resourcecode)
-                                    }
-                                })
-                            }
-                        })
-                    }
-                })
-                if (!name) {
-                    message.error('请输入模板名称')
-                    return
-                }
-                if (result.length === 0) {
-                    message.error('请至少选择一个权限')
-                    return
-                }
-                const reqParam: ManagerRoleOperateReq = {
-                    autoid: getUserId(), // uint64 角色ID
-                    operatetype: 1, // uint32 操作类型-1:新增 2:修改
-                    areauserid: getAreaUserId(), // uint64 所属机构
-                    modifierid: Number(getLongTypeLoginID()), // uint64 修改人ID
-                    rolename: name.value, // string 角色名称
-                    memberfuncmenus: result.map(item => {
-                        return {
-                            resourcecode: item
-                        } as MemberFuncMenu
-                    }) // MemberFuncMenu 机构菜单
-
-                }
-                requestResultLoadingAndInfo(roleOperate, reqParam, loading, ['新增成功', '新增失败:']).then(() => {
-                    cancel();
-                    context.emit('refresh');
-                });
+            if (!name) {
+                message.error('请输入模板名称');
+                return;
             }
+            if (result.length === 0) {
+                message.error('请至少选择一个权限');
+                return;
+            }
+            const reqParam: ManagerRoleOperateReq = {
+                autoid: getUserId(), // uint64 角色ID
+                operatetype: 1, // uint32 操作类型-1:新增 2:修改
+                areauserid: getAreaUserId(), // uint64 所属机构
+                modifierid: Number(getLongTypeLoginID()), // uint64 修改人ID
+                rolename: name.value, // string 角色名称
+                memberfuncmenus: result.map((item) => {
+                    return {
+                        resourcecode: item,
+                    } as MemberFuncMenu;
+                }), // MemberFuncMenu 机构菜单
+            };
+            requestResultLoadingAndInfo(roleOperate, reqParam, loading, ['新增成功', '新增失败:']).then(() => {
+                cancel();
+                context.emit('refresh');
+            });
+        }
 
-            function secondChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx) {
-                if (sub.Menu.ishadrole) {
-                    item.Menu.ishadrole = true
-                }
+        function secondChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx) {
+            if (sub.Menu.ishadrole) {
+                item.Menu.ishadrole = true;
             }
+        }
 
-            function thirdChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx, subNext: ErmcpRoleMenuEx) {
-                if (subNext.Menu.ishadrole) {
-                    sub.Menu.ishadrole = true
-                    item.Menu.ishadrole = true
-                }
+        function thirdChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx, subNext: ErmcpRoleMenuEx) {
+            if (subNext.Menu.ishadrole) {
+                sub.Menu.ishadrole = true;
+                item.Menu.ishadrole = true;
             }
+        }
 
-            return {
-                formState,
-                rules,
-                formRef,
-                visible,
-                name,
-                cancel,
-                submit,
-                secondChange,
-                thirdChange,
-                loading,
-                tableList,
-            };
-        },
-    });
+        return {
+            formState,
+            rules,
+            formRef,
+            visible,
+            name,
+            cancel,
+            submit,
+            secondChange,
+            thirdChange,
+            loading,
+            tableList,
+        };
+    },
+});
 </script>
 
 <style lang="less">
@@ -229,7 +228,7 @@
             }
 
             .powerLeft {
-                width: 120px;
+                width: 250px;
                 padding: 0 8px;
             }
 
@@ -249,15 +248,15 @@
                     }
 
                     .left {
-                        width: 140px;
-                        min-width: 140px;
+                        width: 200px;
+                        min-width: 200px;
                         border-left: 3px solid @m-grey11;
                         border-right: 3px solid @m-grey11;
                     }
 
                     .right {
                         flex: 1;
-                        width: calc(100% - 120px);
+                        // width: calc(100% - 120px);
                     }
                 }
 

+ 3 - 4
src/views/information/account_info/compoments/cancel-business/index.vue

@@ -24,7 +24,6 @@
 </template>
 
 <script lang="ts">
-import { closeModal } from '@/common/setup/modal/index';
 import { defineComponent, ref, PropType } from 'vue';
 import { Modal } from 'ant-design-vue';
 import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
@@ -32,6 +31,7 @@ import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo
 import { loginAccountOperate } from '@/services/proto/accountinfo';
 import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
 import Detail from '../detail-commom-business/index.vue';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'account_info_business_btn_cancel',
@@ -44,7 +44,7 @@ export default defineComponent({
     },
     setup(props, context) {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_cancel');
+        const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
         function submit() {
             Modal.confirm({
@@ -59,8 +59,7 @@ export default defineComponent({
                         logintaaccounts: [],
                     };
                     requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
+                        cancel(true);
                     });
                 },
                 onCancel() {},

+ 3 - 3
src/views/information/account_info/compoments/detail-business/index.vue

@@ -18,9 +18,9 @@
 
 <script lang="ts">
 import { defineComponent, PropType } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
 import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
 import Detail from '../detail-commom-business/index.vue';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'business-detail',
@@ -33,8 +33,8 @@ export default defineComponent({
             default: {},
         },
     },
-    setup(props) {
-        const { visible, cancel } = closeModal('detail');
+    setup(props, context) {
+        const { visible, cancel } = _closeModal(context);
         return {
             visible,
             cancel,

+ 4 - 5
src/views/information/account_info/compoments/locked-business/index.vue

@@ -18,14 +18,14 @@
 </template>
 
 <script lang="ts">
-import { closeModal } from '@/common/setup/modal/index';
-import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { defineComponent, ref, PropType } from 'vue';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { loginAccountOperate } from '@/services/proto/accountinfo';
 import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
 import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
 import { Modal } from 'ant-design-vue';
 import Detail from '../detail-commom-business/index.vue';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'account_info_business_btn_locked',
@@ -38,7 +38,7 @@ export default defineComponent({
     },
     setup(props, context) {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_locked');
+        const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
         function submit() {
             Modal.confirm({
@@ -53,8 +53,7 @@ export default defineComponent({
                         logintaaccounts: [],
                     };
                     requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户锁定成功', '账户锁定失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
+                        cancel(true);
                     });
                 },
                 onCancel() {},

+ 101 - 102
src/views/information/account_info/compoments/managers-permission-delete/index.vue

@@ -6,7 +6,7 @@
            @cancel="cancel"
            centered
            :maskClosable="false"
-           width="1230px">
+           width="100%">
     <template #footer>
       <a-button key="cancel"
                 type="primary"
@@ -81,118 +81,117 @@
 </template>
 
 <script lang="ts">
-    import {closeModal} from '@/common/setup/modal/index';
-    import {defineComponent, PropType, ref, watchEffect} from 'vue';
-    import {handleBusinessForm} from '../setup';
-    import {ErmcpRole, ErmcpRoleMenuEx} from '@/services/go/ermcp/account/interface';
-    import {queryResultLoadingAndInfo, requestResultLoadingAndInfo} from '@/common/methods/request/resultInfo';
-    import {QueryAccMgrRoleMenu} from '@/services/go/ermcp/account';
-    import {message} from 'ant-design-vue';
-    import {roleOperate} from '@/services/proto/accountinfo'
-    import {ManagerRoleOperateReq, MemberFuncMenu} from "@/services/proto/accountinfo/interface";
-    import {getUserId} from "@/services/bus/account";
-    import {getAreaUserId} from "@/services/bus/user";
-    import {getLongTypeLoginID} from "@/services/bus/login";
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
+import { handleBusinessForm } from '../setup';
+import { ErmcpRole, ErmcpRoleMenuEx } from '@/services/go/ermcp/account/interface';
+import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { QueryAccMgrRoleMenu } from '@/services/go/ermcp/account';
+import { message } from 'ant-design-vue';
+import { roleOperate } from '@/services/proto/accountinfo';
+import { ManagerRoleOperateReq, MemberFuncMenu } from '@/services/proto/accountinfo/interface';
+import { getUserId } from '@/services/bus/account';
+import { getAreaUserId } from '@/services/bus/user';
+import { getLongTypeLoginID } from '@/services/bus/login';
 
-    export default defineComponent({
-        name: 'account_info_manager_btn_setting_delete',
-            props: {
+export default defineComponent({
+    name: 'account_info_manager_btn_setting_delete',
+    props: {
         selectedData: {
             default: {},
             type: Object as PropType<ErmcpRole>,
         },
     },
-        setup(props, context) {
-            // 控制关闭弹窗
-            const {visible, cancel} = closeModal('account_info_manager_btn_setting_delete');
-            const {rules, formState, formRef} = handleBusinessForm();
-            const loading = ref<boolean>(false);
-            const tableList = ref<ErmcpRoleMenuEx[]>([]);
-            const name = ref<string>('')
-            watchEffect(() => {
-                if (visible.value) {
-                    const { rolename, areauserid, autoid} = props.selectedData;
-                    name.value = rolename
-                    const param = {userid: areauserid, roleid: autoid.toString()}
-                    queryResultLoadingAndInfo(QueryAccMgrRoleMenu, loading, param).then((res) => {
-                        tableList.value = res;
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_manager_btn_setting_delete');
+        const { rules, formState, formRef } = handleBusinessForm();
+        const loading = ref<boolean>(false);
+        const tableList = ref<ErmcpRoleMenuEx[]>([]);
+        const name = ref<string>('');
+        watchEffect(() => {
+            if (visible.value) {
+                const { rolename, areauserid, autoid } = props.selectedData;
+                name.value = rolename;
+                const param = { userid: areauserid, roleid: autoid.toString() };
+                queryResultLoadingAndInfo(QueryAccMgrRoleMenu, loading, param).then((res) => {
+                    tableList.value = res;
+                });
+            }
+        });
+
+        function submit() {
+            const result: string[] = [];
+            // 处理已经勾选的数据
+            tableList.value.forEach((first) => {
+                if (first.Menu.ishadrole) {
+                    result.push(first.Menu.resourcecode);
+                    first.SubMenu.forEach((second) => {
+                        if (second.Menu.ishadrole) {
+                            result.push(second.Menu.resourcecode);
+                            second.SubMenu.forEach((third) => {
+                                if (third.Menu.ishadrole) {
+                                    result.push(third.Menu.resourcecode);
+                                }
+                            });
+                        }
                     });
                 }
             });
-
-            function submit() {
-                const result: string[] = []
-                // 处理已经勾选的数据
-                tableList.value.forEach(first => {
-                    if (first.Menu.ishadrole) {
-                        result.push(first.Menu.resourcecode)
-                        first.SubMenu.forEach(second => {
-                            if (second.Menu.ishadrole) {
-                                result.push(second.Menu.resourcecode)
-                                second.SubMenu.forEach(third => {
-                                    if (third.Menu.ishadrole) {
-                                        result.push(third.Menu.resourcecode)
-                                    }
-                                })
-                            }
-                        })
-                    }
-                })
-                if (!name) {
-                    message.error('请输入模板名称')
-                    return
-                }
-                if (result.length === 0) {
-                    message.error('请至少选择一个权限')
-                    return
-                }
-                const reqParam: ManagerRoleOperateReq = {
-                    autoid: props.selectedData.autoid, // uint64 角色ID
-                    operatetype: 3, // uint32 操作类型-1:新增 2:修改
-                    areauserid: getAreaUserId(), // uint64 所属机构
-                    modifierid: Number(getLongTypeLoginID()), // uint64 修改人ID
-                    rolename: name.value, // string 角色名称
-                    memberfuncmenus: result.map(item => {
-                        return {
-                            resourcecode: item
-                        } as MemberFuncMenu
-                    }) // MemberFuncMenu 机构菜单
-
-                }
-                requestResultLoadingAndInfo(roleOperate, reqParam, loading, ['删除成功', '删除失败:']).then(() => {
-                    cancel();
-                    context.emit('refresh');
-                });
+            if (!name) {
+                message.error('请输入模板名称');
+                return;
+            }
+            if (result.length === 0) {
+                message.error('请至少选择一个权限');
+                return;
             }
+            const reqParam: ManagerRoleOperateReq = {
+                autoid: props.selectedData.autoid, // uint64 角色ID
+                operatetype: 3, // uint32 操作类型-1:新增 2:修改
+                areauserid: getAreaUserId(), // uint64 所属机构
+                modifierid: Number(getLongTypeLoginID()), // uint64 修改人ID
+                rolename: name.value, // string 角色名称
+                memberfuncmenus: result.map((item) => {
+                    return {
+                        resourcecode: item,
+                    } as MemberFuncMenu;
+                }), // MemberFuncMenu 机构菜单
+            };
+            requestResultLoadingAndInfo(roleOperate, reqParam, loading, ['删除成功', '删除失败:']).then(() => {
+                cancel();
+                context.emit('refresh');
+            });
+        }
 
-            function secondChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx) {
-                if (sub.Menu.ishadrole) {
-                    item.Menu.ishadrole = true
-                }
+        function secondChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx) {
+            if (sub.Menu.ishadrole) {
+                item.Menu.ishadrole = true;
             }
+        }
 
-            function thirdChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx, subNext: ErmcpRoleMenuEx) {
-                if (subNext.Menu.ishadrole) {
-                    sub.Menu.ishadrole = true
-                    item.Menu.ishadrole = true
-                }
+        function thirdChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx, subNext: ErmcpRoleMenuEx) {
+            if (subNext.Menu.ishadrole) {
+                sub.Menu.ishadrole = true;
+                item.Menu.ishadrole = true;
             }
+        }
 
-            return {
-                formState,
-                rules,
-                formRef,
-                visible,
-                name,
-                cancel,
-                submit,
-                secondChange,
-                thirdChange,
-                loading,
-                tableList,
-            };
-        },
-    });
+        return {
+            formState,
+            rules,
+            formRef,
+            visible,
+            name,
+            cancel,
+            submit,
+            secondChange,
+            thirdChange,
+            loading,
+            tableList,
+        };
+    },
+});
 </script>
 
 <style lang="less">
@@ -236,7 +235,7 @@
             }
 
             .powerLeft {
-                width: 120px;
+                width: 250px;
                 padding: 0 8px;
             }
 
@@ -256,15 +255,15 @@
                     }
 
                     .left {
-                        width: 140px;
-                        min-width: 140px;
+                        width: 200px;
+                        min-width: 200px;
                         border-left: 3px solid @m-grey11;
                         border-right: 3px solid @m-grey11;
                     }
 
                     .right {
                         flex: 1;
-                        width: calc(100% - 120px);
+                        // width: calc(100% - 120px);
                     }
                 }
 

+ 101 - 102
src/views/information/account_info/compoments/managers-permission-detail/index.vue

@@ -6,7 +6,7 @@
            @cancel="cancel"
            centered
            :maskClosable="false"
-           width="1230px">
+           width="100%">
     <template #footer>
       <a-button key="cancel"
                 type="primary"
@@ -76,118 +76,117 @@
 </template>
 
 <script lang="ts">
-    import {closeModal} from '@/common/setup/modal/index';
-    import {defineComponent, PropType, ref, watchEffect} from 'vue';
-    import {handleBusinessForm} from '../setup';
-    import {ErmcpRole, ErmcpRoleMenuEx} from '@/services/go/ermcp/account/interface';
-    import {queryResultLoadingAndInfo, requestResultLoadingAndInfo} from '@/common/methods/request/resultInfo';
-    import {QueryAccMgrRoleMenu} from '@/services/go/ermcp/account';
-    import {message} from 'ant-design-vue';
-    import {roleOperate} from '@/services/proto/accountinfo'
-    import {ManagerRoleOperateReq, MemberFuncMenu} from "@/services/proto/accountinfo/interface";
-    import {getUserId} from "@/services/bus/account";
-    import {getAreaUserId} from "@/services/bus/user";
-    import {getLongTypeLoginID} from "@/services/bus/login";
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
+import { handleBusinessForm } from '../setup';
+import { ErmcpRole, ErmcpRoleMenuEx } from '@/services/go/ermcp/account/interface';
+import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { QueryAccMgrRoleMenu } from '@/services/go/ermcp/account';
+import { message } from 'ant-design-vue';
+import { roleOperate } from '@/services/proto/accountinfo';
+import { ManagerRoleOperateReq, MemberFuncMenu } from '@/services/proto/accountinfo/interface';
+import { getUserId } from '@/services/bus/account';
+import { getAreaUserId } from '@/services/bus/user';
+import { getLongTypeLoginID } from '@/services/bus/login';
 
-    export default defineComponent({
-        name: 'account_info_manager_btn_setting_detail',
-            props: {
+export default defineComponent({
+    name: 'account_info_manager_btn_setting_detail',
+    props: {
         selectedData: {
             default: {},
             type: Object as PropType<ErmcpRole>,
         },
     },
-        setup(props, context) {
-            // 控制关闭弹窗
-            const {visible, cancel} = closeModal('account_info_manager_btn_setting_detail');
-            const {rules, formState, formRef} = handleBusinessForm();
-            const loading = ref<boolean>(false);
-            const tableList = ref<ErmcpRoleMenuEx[]>([]);
-            const name = ref<string>('')
-            watchEffect(() => {
-                if (visible.value) {
-                    const { rolename, areauserid, autoid} = props.selectedData;
-                    name.value = rolename
-                    const param = {userid: areauserid, roleid: autoid.toString()}
-                    queryResultLoadingAndInfo(QueryAccMgrRoleMenu, loading, param).then((res) => {
-                        tableList.value = res;
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_manager_btn_setting_detail');
+        const { rules, formState, formRef } = handleBusinessForm();
+        const loading = ref<boolean>(false);
+        const tableList = ref<ErmcpRoleMenuEx[]>([]);
+        const name = ref<string>('');
+        watchEffect(() => {
+            if (visible.value) {
+                const { rolename, areauserid, autoid } = props.selectedData;
+                name.value = rolename;
+                const param = { userid: areauserid, roleid: autoid.toString() };
+                queryResultLoadingAndInfo(QueryAccMgrRoleMenu, loading, param).then((res) => {
+                    tableList.value = res;
+                });
+            }
+        });
+
+        function submit() {
+            const result: string[] = [];
+            // 处理已经勾选的数据
+            tableList.value.forEach((first) => {
+                if (first.Menu.ishadrole) {
+                    result.push(first.Menu.resourcecode);
+                    first.SubMenu.forEach((second) => {
+                        if (second.Menu.ishadrole) {
+                            result.push(second.Menu.resourcecode);
+                            second.SubMenu.forEach((third) => {
+                                if (third.Menu.ishadrole) {
+                                    result.push(third.Menu.resourcecode);
+                                }
+                            });
+                        }
                     });
                 }
             });
-
-            function submit() {
-                const result: string[] = []
-                // 处理已经勾选的数据
-                tableList.value.forEach(first => {
-                    if (first.Menu.ishadrole) {
-                        result.push(first.Menu.resourcecode)
-                        first.SubMenu.forEach(second => {
-                            if (second.Menu.ishadrole) {
-                                result.push(second.Menu.resourcecode)
-                                second.SubMenu.forEach(third => {
-                                    if (third.Menu.ishadrole) {
-                                        result.push(third.Menu.resourcecode)
-                                    }
-                                })
-                            }
-                        })
-                    }
-                })
-                if (!name) {
-                    message.error('请输入模板名称')
-                    return
-                }
-                if (result.length === 0) {
-                    message.error('请至少选择一个权限')
-                    return
-                }
-                const reqParam: ManagerRoleOperateReq = {
-                    autoid: getUserId(), // uint64 角色ID
-                    operatetype: 1, // uint32 操作类型-1:新增 2:修改
-                    areauserid: getAreaUserId(), // uint64 所属机构
-                    modifierid: Number(getLongTypeLoginID()), // uint64 修改人ID
-                    rolename: name.value, // string 角色名称
-                    memberfuncmenus: result.map(item => {
-                        return {
-                            resourcecode: item
-                        } as MemberFuncMenu
-                    }) // MemberFuncMenu 机构菜单
-
-                }
-                requestResultLoadingAndInfo(roleOperate, reqParam, loading, ['新增成功', '新增失败:']).then(() => {
-                    cancel();
-                    context.emit('refresh');
-                });
+            if (!name) {
+                message.error('请输入模板名称');
+                return;
+            }
+            if (result.length === 0) {
+                message.error('请至少选择一个权限');
+                return;
             }
+            const reqParam: ManagerRoleOperateReq = {
+                autoid: getUserId(), // uint64 角色ID
+                operatetype: 1, // uint32 操作类型-1:新增 2:修改
+                areauserid: getAreaUserId(), // uint64 所属机构
+                modifierid: Number(getLongTypeLoginID()), // uint64 修改人ID
+                rolename: name.value, // string 角色名称
+                memberfuncmenus: result.map((item) => {
+                    return {
+                        resourcecode: item,
+                    } as MemberFuncMenu;
+                }), // MemberFuncMenu 机构菜单
+            };
+            requestResultLoadingAndInfo(roleOperate, reqParam, loading, ['新增成功', '新增失败:']).then(() => {
+                cancel();
+                context.emit('refresh');
+            });
+        }
 
-            function secondChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx) {
-                if (sub.Menu.ishadrole) {
-                    item.Menu.ishadrole = true
-                }
+        function secondChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx) {
+            if (sub.Menu.ishadrole) {
+                item.Menu.ishadrole = true;
             }
+        }
 
-            function thirdChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx, subNext: ErmcpRoleMenuEx) {
-                if (subNext.Menu.ishadrole) {
-                    sub.Menu.ishadrole = true
-                    item.Menu.ishadrole = true
-                }
+        function thirdChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx, subNext: ErmcpRoleMenuEx) {
+            if (subNext.Menu.ishadrole) {
+                sub.Menu.ishadrole = true;
+                item.Menu.ishadrole = true;
             }
+        }
 
-            return {
-                formState,
-                rules,
-                formRef,
-                visible,
-                name,
-                cancel,
-                submit,
-                secondChange,
-                thirdChange,
-                loading,
-                tableList,
-            };
-        },
-    });
+        return {
+            formState,
+            rules,
+            formRef,
+            visible,
+            name,
+            cancel,
+            submit,
+            secondChange,
+            thirdChange,
+            loading,
+            tableList,
+        };
+    },
+});
 </script>
 
 <style lang="less">
@@ -231,7 +230,7 @@
             }
 
             .powerLeft {
-                width: 120px;
+                width: 250px;
                 padding: 0 8px;
             }
 
@@ -251,15 +250,15 @@
                     }
 
                     .left {
-                        width: 140px;
-                        min-width: 140px;
+                        width: 200px;
+                        min-width: 200px;
                         border-left: 3px solid @m-grey11;
                         border-right: 3px solid @m-grey11;
                     }
 
                     .right {
                         flex: 1;
-                        width: calc(100% - 120px);
+                        // width: calc(100% - 120px);
                     }
                 }
 

+ 100 - 100
src/views/information/account_info/compoments/managers-permission-modify/index.vue

@@ -79,117 +79,117 @@
 </template>
 
 <script lang="ts">
-    import {closeModal} from '@/common/setup/modal/index';
-    import {defineComponent, PropType, ref, watchEffect} from 'vue';
-    import {handleBusinessForm} from '../setup';
-    import {ErmcpRole, ErmcpRoleMenuEx} from '@/services/go/ermcp/account/interface';
-    import {queryResultLoadingAndInfo, requestResultLoadingAndInfo} from '@/common/methods/request/resultInfo';
-    import {QueryAccMgrRoleMenu} from '@/services/go/ermcp/account';
-    import {message} from 'ant-design-vue';
-    import {roleOperate} from '@/services/proto/accountinfo'
-    import {ManagerRoleOperateReq, MemberFuncMenu} from "@/services/proto/accountinfo/interface";
-    import {getUserId} from "@/services/bus/account";
-    import {getAreaUserId} from "@/services/bus/user";
-    import {getLongTypeLoginID} from "@/services/bus/login";
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
+import { handleBusinessForm } from '../setup';
+import { ErmcpRole, ErmcpRoleMenuEx } from '@/services/go/ermcp/account/interface';
+import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { QueryAccMgrRoleMenu } from '@/services/go/ermcp/account';
+import { message } from 'ant-design-vue';
+import { roleOperate } from '@/services/proto/accountinfo';
+import { ManagerRoleOperateReq, MemberFuncMenu } from '@/services/proto/accountinfo/interface';
+import { getUserId } from '@/services/bus/account';
+import { getAreaUserId } from '@/services/bus/user';
+import { getLongTypeLoginID } from '@/services/bus/login';
 
-    export default defineComponent({
-        name: 'account_info_manager_btn_setting_modify',
-            props: {
+export default defineComponent({
+    name: 'account_info_manager_btn_setting_modify',
+    props: {
         selectedData: {
             default: {},
             type: Object as PropType<ErmcpRole>,
         },
     },
-        setup(props, context) {
-            // 控制关闭弹窗
-            const {visible, cancel} = closeModal('account_info_manager_btn_setting_modify');
-            const {rules, formState, formRef} = handleBusinessForm();
-            const loading = ref<boolean>(false);
-            const tableList = ref<ErmcpRoleMenuEx[]>([]);
-            const name = ref<string>('')
-            watchEffect(() => {
-                if (visible.value) {
-                    const { rolename, areauserid, autoid} = props.selectedData;
-                    name.value = rolename
-                    const param = {userid: areauserid, roleid: autoid.toString()}
-                    queryResultLoadingAndInfo(QueryAccMgrRoleMenu, loading, param).then((res) => {
-                        tableList.value = res;
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_manager_btn_setting_modify');
+        const { rules, formState, formRef } = handleBusinessForm();
+        const loading = ref<boolean>(false);
+        const tableList = ref<ErmcpRoleMenuEx[]>([]);
+        const name = ref<string>('');
+        watchEffect(() => {
+            if (visible.value) {
+                const { rolename, areauserid, autoid } = props.selectedData;
+                name.value = rolename;
+                const param = { userid: areauserid, roleid: autoid.toString() };
+                queryResultLoadingAndInfo(QueryAccMgrRoleMenu, loading, param).then((res) => {
+                    tableList.value = res;
+                });
+            }
+        });
+
+        function submit() {
+            const result: string[] = [];
+            // 处理已经勾选的数据
+            tableList.value.forEach((first) => {
+                if (first.Menu.ishadrole) {
+                    result.push(first.Menu.resourcecode);
+                    first.SubMenu.forEach((second) => {
+                        if (second.Menu.ishadrole) {
+                            result.push(second.Menu.resourcecode);
+                            second.SubMenu.forEach((third) => {
+                                if (third.Menu.ishadrole) {
+                                    result.push(third.Menu.resourcecode);
+                                }
+                            });
+                        }
                     });
                 }
             });
-
-            function submit() {
-                const result: string[] = []
-                // 处理已经勾选的数据
-                tableList.value.forEach(first => {
-                    if (first.Menu.ishadrole) {
-                        result.push(first.Menu.resourcecode)
-                        first.SubMenu.forEach(second => {
-                            if (second.Menu.ishadrole) {
-                                result.push(second.Menu.resourcecode)
-                                second.SubMenu.forEach(third => {
-                                    if (third.Menu.ishadrole) {
-                                        result.push(third.Menu.resourcecode)
-                                    }
-                                })
-                            }
-                        })
-                    }
-                })
-                if (!name) {
-                    message.error('请输入模板名称')
-                    return
-                }
-                if (result.length === 0) {
-                    message.error('请至少选择一个权限')
-                    return
-                }
-                const reqParam: ManagerRoleOperateReq = {
-                    autoid: props.selectedData.autoid, // uint64 角色ID
-                    operatetype: 2, // uint32 操作类型-1:新增 2:修改
-                    areauserid: getAreaUserId(), // uint64 所属机构
-                    modifierid: Number(getLongTypeLoginID()), // uint64 修改人ID
-                    rolename: name.value, // string 角色名称
-                    memberfuncmenus: result.map(item => {
-                        return {
-                            resourcecode: item
-                        } as MemberFuncMenu
-                    }) // MemberFuncMenu 机构菜单
-                }
-                requestResultLoadingAndInfo(roleOperate, reqParam, loading, ['修改成功', '修改失败:']).then(() => {
-                    cancel();
-                    context.emit('refresh');
-                });
+            if (!name) {
+                message.error('请输入模板名称');
+                return;
+            }
+            if (result.length === 0) {
+                message.error('请至少选择一个权限');
+                return;
             }
+            const reqParam: ManagerRoleOperateReq = {
+                autoid: props.selectedData.autoid, // uint64 角色ID
+                operatetype: 2, // uint32 操作类型-1:新增 2:修改
+                areauserid: getAreaUserId(), // uint64 所属机构
+                modifierid: Number(getLongTypeLoginID()), // uint64 修改人ID
+                rolename: name.value, // string 角色名称
+                memberfuncmenus: result.map((item) => {
+                    return {
+                        resourcecode: item,
+                    } as MemberFuncMenu;
+                }), // MemberFuncMenu 机构菜单
+            };
+            requestResultLoadingAndInfo(roleOperate, reqParam, loading, ['修改成功', '修改失败:']).then(() => {
+                cancel();
+                context.emit('refresh');
+            });
+        }
 
-            function secondChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx) {
-                if (sub.Menu.ishadrole) {
-                    item.Menu.ishadrole = true
-                }
+        function secondChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx) {
+            if (sub.Menu.ishadrole) {
+                item.Menu.ishadrole = true;
             }
+        }
 
-            function thirdChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx, subNext: ErmcpRoleMenuEx) {
-                if (subNext.Menu.ishadrole) {
-                    sub.Menu.ishadrole = true
-                    item.Menu.ishadrole = true
-                }
+        function thirdChange(item: ErmcpRoleMenuEx, sub: ErmcpRoleMenuEx, subNext: ErmcpRoleMenuEx) {
+            if (subNext.Menu.ishadrole) {
+                sub.Menu.ishadrole = true;
+                item.Menu.ishadrole = true;
             }
+        }
 
-            return {
-                formState,
-                rules,
-                formRef,
-                visible,
-                name,
-                cancel,
-                submit,
-                secondChange,
-                thirdChange,
-                loading,
-                tableList,
-            };
-        },
-    });
+        return {
+            formState,
+            rules,
+            formRef,
+            visible,
+            name,
+            cancel,
+            submit,
+            secondChange,
+            thirdChange,
+            loading,
+            tableList,
+        };
+    },
+});
 </script>
 
 <style lang="less">
@@ -233,7 +233,7 @@
             }
 
             .powerLeft {
-                width: 170px;
+                width: 250px;
                 padding: 0 8px;
             }
 
@@ -253,15 +253,15 @@
                     }
 
                     .left {
-                        width: 180px;
-                        min-width: 140px;
+                        width: 200px;
+                        min-width: 200px;
                         border-left: 3px solid @m-grey11;
                         border-right: 3px solid @m-grey11;
                     }
 
                     .right {
                         flex: 1;
-                        width: calc(100% - 120px);
+                        // width: calc(100% - 120px);
                     }
                 }
 

+ 21 - 80
src/views/information/account_info/compoments/managers-permission/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 权限设置 -->
-  <a-modal class="commonModal powers-setting"
+  <a-modal class="commonModal"
            title="权限设置"
            v-model:visible="visible"
            @cancel="cancel"
@@ -43,14 +43,14 @@
 <script lang="ts">
 import { closeModal, openModal } from '@/common/setup/modal/index';
 import { ref, watchEffect } from 'vue';
-import { ErmcpRole, } from '@/services/go/ermcp/account/interface';
+import { ErmcpRole } from '@/services/go/ermcp/account/interface';
 import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { QueryAccMgrRole } from '@/services/go/ermcp/account';
 import { defineComponent, getTableEvent, BtnList } from '@/common/export/table';
-import { BtnList as btnType} from '@/common/setup/table/interface'
+import { BtnList as btnType } from '@/common/setup/table/interface';
 import Modify from '../managers-permission-modify/index.vue';
-import Delete from '../managers-permission-delete/index.vue'
-import Detail from '../managers-permission-detail/index.vue'
+import Delete from '../managers-permission-delete/index.vue';
+import Detail from '../managers-permission-detail/index.vue';
 
 export default defineComponent({
     name: 'account_info_manager_btn_setting',
@@ -68,34 +68,38 @@ export default defineComponent({
             { title: '角色名称', dataIndex: 'rolename', key: 'rolename', align: 'center' },
             { title: '创建人', dataIndex: 'modifiername', key: 'modifiername', align: 'center' },
             { title: '创建时间', dataIndex: 'modifytime', key: 'modifytime', align: 'center' },
-            { title: '状态', dataIndex: 'rolestatus', key: 'rolestatus', align: 'center', slots: { customRender: 'rolestatus' }, },
+            { title: '状态', dataIndex: 'rolestatus', key: 'rolestatus', align: 'center', slots: { customRender: 'rolestatus' } },
         ];
         // 表格事件
         const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpRole>({});
         // 按钮
         const btnList = ref<btnType[]>([
-            {lable: '修改', callback: openModal('account_info_manager_btn_setting_modify').openAction, className: 'btnPrimary'},
-            {lable: '删除', callback: openModal('account_info_manager_btn_setting_delete').openAction, className: 'btnDanger'},
-            {lable: '详情', callback: openModal('account_info_manager_btn_setting_detail').openAction, className: 'btnDeafault'},
+            { lable: '修改', callback: openModal('account_info_manager_btn_setting_modify').openAction, className: 'btnPrimary' },
+            { lable: '删除', callback: openModal('account_info_manager_btn_setting_delete').openAction, className: 'btnDanger' },
+            { lable: '详情', callback: openModal('account_info_manager_btn_setting_detail').openAction, className: 'btnDeafault' },
         ]);
         const tableList = ref<ErmcpRole[]>([]);
-        
+
         function queryTable() {
-             queryResultLoadingAndInfo(QueryAccMgrRole, loading).then((res) => {
-                 console.log(res);
-                 
-                    tableList.value = res.map((e: ErmcpRole, i: number) => Object.assign(e, {key: `${i}`}))
-                });
+            queryResultLoadingAndInfo(QueryAccMgrRole, loading).then((res) => {
+                console.log(res);
+
+                tableList.value = res.map((e: ErmcpRole, i: number) => Object.assign(e, { key: `${i}` }));
+            });
         }
         watchEffect(() => {
             if (visible.value) {
-               queryTable()
+                queryTable();
             }
         });
         return {
             visible,
             cancel,
-             expandedRowKeys, selectedRow, Rowclick, btnClick,queryTable,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            btnClick,
+            queryTable,
             loading,
             tableList,
             columns,
@@ -106,68 +110,5 @@ export default defineComponent({
 </script>
 
 <style lang="less">
-.powers-setting {
-    .powerTable {
-        width: 100%;
-        height: 100%;
-        border: 3px solid @m-grey11;
-        background-color: @m-black12;
-        font-size: 14px;
-        color: @m-white0;
-        .flex;
-        flex-direction: column;
-        .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
-            width: 90px;
-            span + span {
-                margin-right: 0;
-            }
-        }
-        .powerRow {
-            width: 100%;
-            display: inline-flex;
-            border-bottom: 3px solid @m-grey11;
-            div {
-                align-self: center;
-                align-items: center;
-            }
-            .powerLeft {
-                width: 84px;
-                padding: 0 8px;
-            }
-            .powerMiddle {
-                width: 130px;
-                .flex;
-                flex-direction: column;
-                div {
-                    width: 100%;
-                    height: 40px;
-                    line-height: 40px;
-                    padding: 0 8px;
-                    border: 3px solid @m-grey11;
-                    border-top: 0;
-                }
-                div:last-child {
-                    border-bottom: 0;
-                }
-            }
-            .powerRight {
-                flex: 1;
-                .flex;
-                flex-direction: column;
-                div {
-                    width: 100%;
-                    height: 40px;
-                    line-height: 40px;
-                    padding: 0 8px;
-                    justify-content: flex-start;
-                    border-bottom: 3px solid @m-grey11;
-                }
-                div:last-child {
-                    border-bottom: 0;
-                }
-            }
-        }
-    }
-}
 </style
 >;

+ 11 - 16
src/views/information/account_info/compoments/modify-business/index.vue

@@ -68,8 +68,7 @@
 </template>
 
 <script lang="ts">
-import { closeModal } from '@/common/setup/modal/index';
-import { defineComponent, ref, watchEffect, PropType } from 'vue';
+import { defineComponent, ref, PropType } from 'vue';
 import { handleBusinessForm } from '../setup';
 import { BusinessFormState } from '../interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
@@ -78,35 +77,32 @@ import { mergeTwoObj } from '@/utils/objHandle';
 import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
 import { getUserId } from '@/services/bus/account';
 import { validateAction } from '@/common/setup/form';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'account_info_business_btn_modify',
     components: {},
     props: {
-        selectedData: {
+        selectedRow: {
             default: {},
             type: Object as PropType<ErmcpLoginUser>,
         },
     },
     setup(props, context) {
-        // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_modify');
+        // // 控制关闭弹窗
+        const { visible, cancel } = _closeModal(context);
         const { rules, formState, formRef } = handleBusinessForm();
         const loading = ref<boolean>(false);
-        watchEffect(() => {
-            if (visible.value) {
-                mergeTwoObj(formState, props.selectedData);
-                // roletype	:string;//角色类型(逗号隔开,如22,23), 22:业务员 23:跟单员 24:交易员
-                formState.roleids = props.selectedData.roletype.split(',').map((e) => +e);
-            }
-        });
+        mergeTwoObj(formState, props.selectedRow);
+        // roletype	:string;//角色类型(逗号隔开,如22,23), 22:业务员 23:跟单员 24:交易员
+        formState.roleids = props.selectedRow.roletype.split(',').map((e) => +e);
         function submit() {
             validateAction<BusinessFormState>(formRef, formState).then((param) => {
                 const name = param.loginname;
                 const reqParam = {
                     operatetype: 2,
-                    userid: props.selectedData.userid,
-                    loginid: props.selectedData.loginid,
+                    userid: props.selectedRow.userid,
+                    loginid: props.selectedRow.loginid,
                     logincode: param.logincode,
                     areauserid: Number(getUserId()),
                     accountname: name,
@@ -116,8 +112,7 @@ export default defineComponent({
                 Object.assign(reqParam, param);
                 reqParam.accountname = name;
                 requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改账户成功', '修改账户失败:']).then(() => {
-                    cancel();
-                    context.emit('refresh');
+                    cancel(true);
                 });
             });
         }

+ 6 - 10
src/views/information/account_info/compoments/reset-business/index.vue

@@ -53,8 +53,7 @@
 </template>
 
 <script lang="ts">
-import { closeModal } from '@/common/setup/modal/index';
-import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { defineComponent, ref, PropType } from 'vue';
 import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
 import { ResetPasswordFormState } from '../interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
@@ -62,6 +61,7 @@ import { loginAccountOperate } from '@/services/proto/accountinfo';
 import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
 import { validateAction } from '@/common/setup/form';
 import { handlePasswordForm } from '../setup';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'account_info_business_btn_reset',
@@ -73,14 +73,11 @@ export default defineComponent({
     },
     setup(props, context) {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_reset');
+        const { visible, cancel } = _closeModal(context);
         const { rules, formState, formRef } = handlePasswordForm();
         const loading = ref<boolean>(false);
-        watchEffect(() => {
-            if (visible.value) {
-                formState.logincode = props.selectedData.logincode;
-            }
-        });
+
+        formState.logincode = props.selectedData.logincode;
 
         function submit() {
             validateAction<ResetPasswordFormState>(formRef, formState).then((res) => {
@@ -93,8 +90,7 @@ export default defineComponent({
                     password: res.password,
                 };
                 requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['重置登录账户密码成功', '重置登录账户密码失败:']).then(() => {
-                    cancel();
-                    context.emit('refresh');
+                    cancel(true);
                 });
             });
         }

+ 3 - 4
src/views/information/account_info/compoments/unlocked-business/index.vue

@@ -18,7 +18,6 @@
 </template>
 
 <script lang="ts">
-import { closeModal } from '@/common/setup/modal/index';
 import { defineComponent, ref, PropType } from 'vue';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { loginAccountOperate } from '@/services/proto/accountinfo';
@@ -26,6 +25,7 @@ import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
 import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
 import { Modal } from 'ant-design-vue';
 import Detail from '../detail-commom-business/index.vue';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'account_info_business_btn_unlocked',
@@ -38,7 +38,7 @@ export default defineComponent({
     },
     setup(props, context) {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_unlocked');
+        const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
         function submit() {
             Modal.confirm({
@@ -53,8 +53,7 @@ export default defineComponent({
                         logintaaccounts: [],
                     };
                     requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['解锁锁定成功', '解锁锁定失败:']).then(() => {
-                        cancel();
-                        context.emit('refresh');
+                        cancel(true);
                     });
                 },
                 onCancel() {},

+ 40 - 33
src/views/information/account_info/list/account_info_business/index.vue

@@ -34,8 +34,8 @@
             <a-col :span="12">{{item.rolename}}({{item.userlist.length}})</a-col>
             <a-col :span="12">
               <BtnList :btnList="firstBtn"
-                       :selectedData="item"
-                       @onClick="openAction" />
+                       :record="record"
+                       @click="openComponent" />
             </a-col>
           </a-row>
         </template>
@@ -51,44 +51,42 @@
               </a-row>
             </template>
             <BtnList :btnList="sub.btnList"
-                     :selectedData="sub"
-                     @onClick="moreOptenAction" />
+                     :record="sub"
+                     @click="openComponent" />
           </a-collapse-panel>
         </a-collapse>
       </a-collapse-panel>
     </a-collapse>
-    <Add @refresh="handleBtnAction"
-         :roleid="addModelData.roleid" />
-    <Modify :selectedData="moreModelData"
-            @refresh="handleBtnAction" />
-    <Reset :selectedData="moreModelData"
-           @refresh="handleBtnAction" />
-    <Locked :selectedData="moreModelData"
-            @refresh="handleBtnAction" />
-    <Unlocked :selectedData="moreModelData"
-              @refresh="handleBtnAction" />
-    <Cancel :selectedData="moreModelData"
-            @refresh="handleBtnAction" />
-    <Detail :selectedData="moreModelData" />
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedData"
+               @cancel="closeComponent"></component>
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
+import { defineComponent, initData, contextMenu, _getBtnList } from '@/common/export/table';
+import { defineAsyncComponent } from 'vue';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { handlerManagerList } from '@/common/setup/user';
 import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
-import Add from '../../compoments/add-business/index.vue';
-import Modify from '../../compoments/modify-business/index.vue';
-import Reset from '../../compoments/reset-business/index.vue';
-import Locked from '../../compoments/locked-business/index.vue';
-import Cancel from '../../compoments/cancel-business/index.vue';
-import Detail from '../../compoments/detail-business/index.vue';
-import Unlocked from '../../compoments/unlocked-business/index.vue';
+import { ModalEnum } from '@/common/constants/modalNameEnum';
+import BtnList from '@/common/components/btnList/index.vue';
+
+const Add = defineAsyncComponent(() => import('../../compoments/add-business/index.vue'));
+const Modify = defineAsyncComponent(() => import('../../compoments/modify-business/index.vue'));
+const Reset = defineAsyncComponent(() => import('../../compoments/reset-business/index.vue'));
+const Locked = defineAsyncComponent(() => import('../../compoments/locked-business/index.vue'));
+const Cancel = defineAsyncComponent(() => import('../../compoments/cancel-business/index.vue'));
+const Detail = defineAsyncComponent(() => import('../../compoments/detail-business/index.vue'));
+const Unlocked = defineAsyncComponent(() => import('../../compoments/unlocked-business/index.vue'));
+
 import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import { getUserName } from '@/services/bus/user';
 import { handleModalData, handleTableList } from '../setup';
 import { ref } from 'vue';
+import { handleModalComponent } from '@/common/setup/asyncComponent';
+import { getBtnList_ } from '@/common/setup/table/button';
 
 export default defineComponent({
     name: 'account_info_business',
@@ -96,19 +94,20 @@ export default defineComponent({
         contextMenu,
         BtnList,
         filterCustomTable,
-        Add,
-        Modify,
-        Reset,
-        Locked,
-        Cancel,
-        Detail,
-        Unlocked,
+        [ModalEnum.detail]: Detail,
+        [ModalEnum.account_info_business_btn_modify]: Modify,
+        [ModalEnum.account_info_business_btn_add]: Add,
+        [ModalEnum.account_info_business_btn_reset]: Reset,
+        [ModalEnum.account_info_business_btn_locked]: Locked,
+        [ModalEnum.account_info_business_btn_cancel]: Cancel,
+        [ModalEnum.account_info_business_btn_unlocked]: Unlocked,
     },
     setup() {
         // 加载状态
         const loading = ref<boolean>(false);
         const { tableList, queryTable } = handlerManagerList(loading, 1);
-        const [firstBtn, secondBtn] = _getBtnList('account_info_business', true).value;
+        const [firstBtn, secondBtn] = getBtnList_('account_info_business', true).value;
+
         // 新增弹窗 角色类型
         const { selectedData: addModelData, openAction } = handleModalData<ErmcpLoginUserEx>();
         // 修改 重置密码、详情等弹窗
@@ -117,12 +116,17 @@ export default defineComponent({
         function handleBtnAction() {
             handleTableList(queryTable, tableList, secondBtn);
         }
+        // 弹窗选中的数据
+        const selectedData = ref<ErmcpLoginUserEx>();
+        // 控制异步组件
+        const { componentId, closeComponent, openComponent } = handleModalComponent(handleBtnAction, selectedData);
         initData(() => {
             handleBtnAction();
         });
         // 查询
         function search(value: any) {}
         return {
+            selectedData,
             firstBtn,
             secondBtn,
             loading,
@@ -135,6 +139,9 @@ export default defineComponent({
             openAction,
             addModelData,
             moreOptenAction,
+            componentId,
+            closeComponent,
+            openComponent,
         };
     },
 });

+ 8 - 8
src/views/information/account_info/list/account_info_manager/index.vue

@@ -125,7 +125,7 @@ export default defineComponent({
         const { selectedData: moreModelData, openAction: moreOptenAction } = handleModalData<ErmcpLoginUser>();
         // 处理根据状态显示对应按钮
         function handleBtnAction() {
-            handleTableList(queryTable, tableList, thirdBtn);
+            // handleTableList(queryTable, tableList, thirdBtn);
         }
         initData(() => {
             handleBtnAction();
@@ -176,16 +176,16 @@ export default defineComponent({
         padding-left: 43px;
         padding-right: 43px;
         .btnPrimary.ant-btn {
-          margin-top: -3px;
+            margin-top: -3px;
         }
     }
     .ant-collapse.busyCollapse {
-      .operBtn.ant-btn {
-        margin-top: 0;
-        margin-bottom: 0;
-        height: 26px;
-        line-height: 26px;
-      }
+        .operBtn.ant-btn {
+            margin-top: 0;
+            margin-bottom: 0;
+            height: 26px;
+            line-height: 26px;
+        }
     }
     .ant-row.headRow {
         .ant-col:nth-child(2) {

+ 11 - 11
src/views/information/account_info/list/account_info_trade/index.vue

@@ -101,7 +101,7 @@ import filterCustomTable from '@/views/information/goods/components/filterTable/
 import { getRoleTypeName, handleBtnClickData } from '../setup';
 import { getUserName } from '@/services/bus/user';
 import Modify from '../../compoments/modify-traders/index.vue';
-import Add from '../../compoments/add-traders/index.vue'
+import Add from '../../compoments/add-traders/index.vue';
 import AddChild from '../../compoments/add-child-traders/index.vue';
 import Locked from '../../compoments/locked-trader/index.vue';
 import Unlocked from '../../compoments/unlocked-trader/index.vue';
@@ -143,9 +143,9 @@ export default defineComponent({
         const { selectedData: moreModelData, openAction: moreOptenAction } = handleModalData<ErmcpLoginUser>();
         // 处理根据状态显示对应按钮
         function handleBtnAction() {
-            handleTableList(queryTable, tableList, thirdBtn);
+            // handleTableList(queryTable, tableList, thirdBtn);
         }
-        const { firstBtnData, secondBtnData, btnClick }= handleBtnClickData()
+        const { firstBtnData, secondBtnData, btnClick } = handleBtnClickData();
         // 授权期货账户
         const accountList = ref<ErmcpTaAccount[]>([]);
 
@@ -155,13 +155,13 @@ export default defineComponent({
             queryResultLoadingAndInfo(QueryAccMgrTaaccount, loading).then((res) => {
                 accountList.value.length = 0;
                 res.forEach((el: ErmcpTaAccountEx) => {
-                    const {  subacclist } = el;
+                    const { subacclist } = el;
                     subacclist.forEach((e) => {
-                      if (e.tradestatus === 1) { //交易状态 - 1:正常
-                        accountList.value.push(e)
-                      }
-                    }
-                    );
+                        if (e.tradestatus === 1) {
+                            //交易状态 - 1:正常
+                            accountList.value.push(e);
+                        }
+                    });
                 });
             });
         });
@@ -169,8 +169,8 @@ export default defineComponent({
         function search(value: any) {}
 
         return {
-          firstBtnData,
-          btnClick,
+            firstBtnData,
+            btnClick,
             firstBtn,
             secondBtnData,
             secondBtn,

+ 5 - 5
src/views/information/account_info/list/setup.ts

@@ -1,11 +1,11 @@
-import { BtnList } from "@/common/setup/table/interface";
+import { BtnList } from '@/common/components/btnList/interface';
 import { ErmcpLoginUserEx } from "@/services/go/ermcp/account/interface";
 import { reactive, ref, Ref } from "vue";
 
 /**
  * 获取账户状态
- * @param type 
- * @returns 
+ * @param type
+ * @returns
  */
 export function getAccountStatus(type: number) {
     let result = '--'
@@ -70,8 +70,8 @@ export function getTaAccountStatus(type: number) {
 
 /**
  * 获取角色状态
- * @param type 
- * @returns 
+ * @param type
+ * @returns
  */
 export function getRoleTypeName(type: number) {
     let result = '--'