huangbin 4 år sedan
förälder
incheckning
1b4a888bf0

+ 1 - 0
src/common/constants/buttonType.ts

@@ -42,6 +42,7 @@ export interface ButtonType {
     account_info_manager_btn_add: string; // 管理账户 新增
     account_info_manager_btn_modify: string; // 管理账户 修改
     account_info_manager_btn_permission: string; // 管理账户 权限设置
+    account_info_manager_btn_permission_add: string; // 管理账户 新增
     account_info_manager_btn_reset: string; // 管理账户 重置密码
     account_info_manager_btn_locked: string; // 管理账户 锁定
     account_info_manager_btn_unlocked: string; // 管理账户 解锁

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

@@ -77,10 +77,10 @@ import { loginAccountOperate } from '@/services/proto/accountinfo';
 import { QueryAccMgrRoleMenu } from '@/services/go/ermcp/account';
 
 export default defineComponent({
-    name: 'account_info_manager_btn_permission',
+    name: 'account_info_manager_btn_permission_add',
     setup(props, context) {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_manager_btn_permission');
+        const { visible, cancel } = closeModal('account_info_manager_btn_permission_add');
         const { rules, formState, formRef } = handleBusinessForm();
         const loading = ref<boolean>(false);
         const tableList = ref<ErmcpRoleMenuEx[]>([]);

+ 157 - 0
src/views/information/account_info/compoments/managers-permission/index.vue

@@ -0,0 +1,157 @@
+<template>
+  <!-- 权限设置 -->
+  <a-modal class="commonModal add-powers"
+           title="权限设置"
+           v-model:visible="visible"
+           @cancel="cancel"
+           :loading="loading"
+           centered
+           :maskClosable="false"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">完成</a-button>
+    </template>
+    <a-table :columns="columns"
+             :data-source="tableList"
+             :pagination="false">
+    </a-table>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, ref, watchEffect } from 'vue';
+import { handleBusinessForm } from '../setup';
+import { ErmcpRole } from '@/services/go/ermcp/account/interface';
+import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { QueryAccMgrRole } from '@/services/go/ermcp/account';
+
+export default defineComponent({
+    name: 'account_info_manager_btn_permission',
+    setup() {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_manager_btn_permission');
+        const loading = ref<boolean>(false);
+        const columns = [
+            { title: '角色名称', dataIndex: 'rolename', key: 'rolename' },
+            { title: '创建人', dataIndex: 'modifiername', key: 'modifiername' },
+            { title: '创建时间', dataIndex: 'modifytime', key: 'modifytime' },
+            { title: '状态', dataIndex: 'rolestatus', key: 'rolestatus' },
+        ];
+        const tableList = ref<ErmcpRole[]>([]);
+        watchEffect(() => {
+            if (visible.value) {
+                queryResultLoadingAndInfo(QueryAccMgrRole, loading).then((res) => {
+                    tableList.value = res;
+                });
+            }
+        });
+        return {
+            visible,
+            cancel,
+            loading,
+            tableList,
+            columns,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-business-info {
+}
+.add-traders {
+}
+.add-managers {
+}
+.add-powers {
+    .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;
+                }
+            }
+        }
+    }
+}
+.add-futures {
+}
+.add-futures-son {
+}
+.add-arbitrage {
+    .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
+        width: 100px;
+        span + span {
+            margin-right: 0;
+        }
+    }
+    .ant-checkbox-group.autoWidth {
+        width: 520px;
+        .ant-checkbox-wrapper {
+            width: auto;
+        }
+    }
+    .checkboxGroupItem {
+        .ant-row {
+            margin-bottom: 10px;
+        }
+    }
+}
+</style
+>;

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

@@ -11,7 +11,7 @@
         </svg>
         {{getUserName()}}
       </span>
-      <a-button>权限设置</a-button>
+      <a-button @click="openPermission">权限设置</a-button>
       <a-button @click="openAddPermission">新增</a-button>
     </div>
 
@@ -75,6 +75,7 @@
            :selectedData="moreModelData" />
     <Detail :selectedData="moreModelData" />
     <AddPermission />
+    <Permission />
   </div>
 </template>
 
@@ -93,6 +94,7 @@ import Locked from '../../compoments/locked-managers/index.vue';
 import Unlocked from '../../compoments/unlocked-managers/index.vue';
 import Reset from '../../compoments/reset-managers/index.vue';
 import AddPermission from '../../compoments/add-managers-permission/index.vue';
+import Permission from '../../compoments/managers-permission/index.vue';
 import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import { openModal } from '@/common/setup/modal';
 
@@ -110,6 +112,7 @@ export default defineComponent({
         Unlocked,
         Reset,
         AddPermission,
+        Permission,
     },
     setup() {
         const { loading, tableList, queryTable } = queryTableList();
@@ -123,7 +126,9 @@ export default defineComponent({
             handleTableList(queryTable, tableList, forDataBtn.value);
         }
         // 新增角色
-        const { openAction: openAddPermission } = openModal('account_info_manager_btn_permission');
+        const { openAction: openAddPermission } = openModal('account_info_manager_btn_permission_add');
+        // 权限设置列表
+        const { openAction: openPermission } = openModal('account_info_manager_btn_permission');
         initData(() => {
             handleBtnAction();
         });
@@ -146,6 +151,7 @@ export default defineComponent({
             moreOptenAction,
             handleBtnAction,
             openAddPermission,
+            openPermission,
         };
     },
 });