Commit 4c270780c932281a233342401321db51478bd226

Authored by fengtao
1 parent 5ce80d6f

fix:修改客户进入判断

... ... @@ -50,6 +50,7 @@
50 50 icon: 'ant-design:login-outlined',
51 51 tooltip: '以客户用户身份登录',
52 52 onClick: handleLoginCustomAdmin.bind(null, record),
  53 + ifShow: !isAdmin(role),
53 54 },
54 55 {
55 56 label: '用户详情',
... ... @@ -110,6 +111,9 @@
110 111 import { RouteRecordRaw } from 'vue-router';
111 112 import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic';
112 113 import { PageEnum } from '/@/enums/pageEnum';
  114 + import { getAuthCache } from '/@/utils/auth';
  115 + import { USER_INFO_KEY } from '/@/enums/cacheEnum';
  116 + import { isAdmin } from '/@/enums/roleEnum';
113 117
114 118 export default defineComponent({
115 119 name: 'AccountManagement',
... ... @@ -124,6 +128,9 @@
124 128 Popconfirm,
125 129 },
126 130 setup() {
  131 + const userInfo: any = getAuthCache(USER_INFO_KEY);
  132 + const role: string = userInfo?.roles[0];
  133 +
127 134 const go = useGo();
128 135 const [registerModal, { openModal }] = useModal();
129 136 let searchInfo = reactive<Recordable>({});
... ... @@ -137,7 +144,7 @@
137 144 formConfig: {
138 145 labelWidth: 120,
139 146 schemas: searchFormSchema,
140   - autoSubmitOnEnter: true,
  147 + // autoSubmitOnEnter: true,
141 148 resetFunc: resetFn,
142 149 },
143 150 useSearchForm: true,
... ... @@ -148,6 +155,7 @@
148 155 title: '操作',
149 156 dataIndex: 'action',
150 157 slots: { customRender: 'action' },
  158 + fixed: 'right',
151 159 },
152 160 });
153 161 const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions } = useBatchDelete(
... ... @@ -218,6 +226,8 @@
218 226 organizationIdTreeRef,
219 227 hasBatchDelete,
220 228 handleDeleteOrBatchDelete,
  229 + isAdmin,
  230 + role,
221 231 };
222 232 },
223 233 });
... ...