|
@@ -13,9 +13,9 @@ import type { SelectProps } from 'ant-design-vue';
|
|
|
import { BasicTable, useTable } from '/@/components/Table';
|
|
|
// import { JSelectInput } from '/@/components/Form';
|
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
-import { list as roleList } from '../../role/role.api';
|
|
|
+import { list as getroleList } from '../../role/role.api';
|
|
|
import { roleColumns, userColumns, roleSchema, userSchema } from '../permission/permission.data';
|
|
|
-import { list as userList } from '../../user/user.api';
|
|
|
+import { listNoCareTenant as getuserList } from '../../user/user.api';
|
|
|
// import AppSelect from './AppSelect.vue';
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -37,7 +37,7 @@ type Key = string | number;
|
|
|
const appList = ref<SelectProps['options']>([]);
|
|
|
const handleClick = () => {
|
|
|
emit('update:clickParam', { ...props.clickParam, appId: appId.value });
|
|
|
- setProps({ api: appId.value ? (tabType.value === 'role' ? roleList : userList) : undefined, dataSource: appId.value ? undefined : [] });
|
|
|
+ setProps({ api: appId.value ? (tabType.value === 'role' ? getroleList : getuserList) : undefined, dataSource: appId.value ? undefined : [] });
|
|
|
reload();
|
|
|
};
|
|
|
|
|
@@ -47,8 +47,7 @@ watch(tabType, () => deleteSelect());
|
|
|
// 列表页面公共参数、方法
|
|
|
const { prefixCls, tableContext } = useListPage({
|
|
|
tableProps: {
|
|
|
- // api: tabType.value === 'role' ? roleList : userList,
|
|
|
- api: appId.value ? (tabType.value === 'role' ? roleList : userList) : undefined,
|
|
|
+ api: appId.value ? (tabType.value === 'role' ? getroleList : getuserList) : undefined,
|
|
|
dataSource: appId.value ? undefined : [],
|
|
|
columns: tabType.value === 'role' ? roleColumns : userColumns,
|
|
|
size: 'small',
|
|
@@ -62,6 +61,13 @@ const { prefixCls, tableContext } = useListPage({
|
|
|
tableSetting: { fullScreen: true },
|
|
|
beforeFetch: (params) => {
|
|
|
params.appId = appId.value;
|
|
|
+ //模糊查询
|
|
|
+ if(params.roleName){
|
|
|
+ params.roleName ='*'+ params.roleName.trim()+'*';
|
|
|
+ }
|
|
|
+ if(params.realname){
|
|
|
+ params.realname ='*'+ params.realname.trim()+'*';
|
|
|
+ }
|
|
|
},
|
|
|
formConfig: {
|
|
|
schemas: tabType.value === 'role' ? roleSchema : userSchema,
|