huangbin vor 4 Jahren
Ursprung
Commit
07d4019c6d

+ 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);
                     }
                 }
 

+ 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
 >;