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

fixup! feat: 给各模块增加租户查询条件

喵你个旺呀 пре 1 година
родитељ
комит
107ed550d1

+ 2 - 2
Web/src/views/login/index.vue

@@ -77,7 +77,7 @@ const state = reactive({
 	tabsActiveName: 'account',
 	tenantInfo: {
 		host: location.host.toLowerCase(),
-		id: undefined,
+		id: undefined as number | undefined,
 		list: [],
 	},
 	isScan: false,
@@ -95,7 +95,7 @@ onMounted(() => {
 // 处理租户信息
 const getTenantInfo = async () => {
 	const list = await getAPI(SysTenantApi).apiSysTenantListGet().then(res => res.data.result ?? []);
-	const tenant = list.find((item) => item.host === state.host);
+	const tenant = list.find((item: any) => item.host === state.tenantInfo.host);
 	state.tenantInfo.id = parseInt(route.query.t ?? (tenant ?? list[0])?.value);
 	state.tenantInfo.list = list;
 	return state.tenantInfo;

+ 1 - 0
Web/src/views/system/config/index.vue

@@ -35,6 +35,7 @@ import { getAPI } from '/@/utils/axios-utils';
 import { SysConfigApi } from '/@/api-services/api';
 import ModifyRecord from '/@/components/table/modifyRecord.vue';
 import EditConfig from '/@/views/system/config/component/editConfig.vue';
+import {EmptyObjectType, RefType} from "/@/types/global";
 
 // 引入组件
 const Table = defineAsyncComponent(() => import('/@/components/table/index.vue'));

+ 1 - 0
Web/src/views/system/file/index.vue

@@ -169,6 +169,7 @@ const uploadRef = ref<UploadInstance>();
 const editSysFileRef = ref<InstanceType<typeof EditSysFile>>();
 const state = reactive({
 	loading: false,
+	tenantList: [] as Array<any>,
 	fileData: [] as Array<SysFile>,
 	queryParams: {
 		tenantId: undefined,

+ 1 - 0
Web/src/views/system/ldap/index.vue

@@ -85,6 +85,7 @@ const userStore = useUserInfo();
 const editLdapRef = ref<InstanceType<typeof EditLdap>>();
 const state = reactive({
 	loading: false,
+	tenantList: [] as Array<any>,
 	tableData: [] as any,
 	queryParams: {
 		tenantId: undefined,

+ 1 - 0
Web/src/views/system/log/difflog/index.vue

@@ -95,6 +95,7 @@ import { useUserInfo } from "/@/stores/userInfo";
 const userStore = useUserInfo();
 const state = reactive({
 	loading: false,
+	tenantList: [] as Array<any>,
 	queryParams: {
 		tenantId: undefined,
 		startTime: undefined,

+ 1 - 0
Web/src/views/system/log/exlog/index.vue

@@ -131,6 +131,7 @@ const userStore = useUserInfo();
 const state = reactive({
 	loading: false,
 	loadingDetail: false,
+	tenantList: [] as Array<any>,
 	queryParams: {
 		tenantId: undefined,
 		startTime: undefined,

+ 1 - 0
Web/src/views/system/log/oplog/index.vue

@@ -125,6 +125,7 @@ const userStore = useUserInfo();
 const state = reactive({
 	loading: false,
 	loadingDetail: false,
+	tenantList: [] as Array<any>,
 	queryParams: {
 		tenantId: undefined,
 		startTime: undefined,

+ 1 - 0
Web/src/views/system/log/vislog/index.vue

@@ -91,6 +91,7 @@ import { SysLogVisApi, SysTenantApi } from '/@/api-services/api';
 const userStore = useUserInfo();
 const state = reactive({
 	loading: false,
+	tenantList: [] as Array<any>,
 	queryParams: {
 		tenantId: undefined,
 		startTime: undefined,

+ 1 - 0
Web/src/views/system/onlineUser/index.vue

@@ -69,6 +69,7 @@ const userStore = useUserInfo();
 const state = reactive({
 	loading: false,
 	isVisible: false,
+	tenantList: [] as Array<any>,
 	queryParams: {
 		userName: undefined,
 		realName: undefined,

+ 1 - 0
Web/src/views/system/org/index.vue

@@ -81,6 +81,7 @@ const editOrgRef = ref<InstanceType<typeof EditOrg>>();
 const orgTreeRef = ref<InstanceType<typeof OrgTree>>();
 const state = reactive({
 	loading: false,
+	tenantList: [] as Array<any>,
 	orgData: [] as Array<SysOrg>, // 机构列表数据
 	orgTreeData: [] as Array<SysOrg>, // 机构树所有数据
 	queryParams: {

+ 1 - 0
Web/src/views/system/plugin/index.vue

@@ -76,6 +76,7 @@ const userStore = useUserInfo();
 const editPluginRef = ref<InstanceType<typeof EditPlugin>>();
 const state = reactive({
 	loading: false,
+	tenantList: [] as Array<any>,
 	pluginData: [] as Array<SysPlugin>,
 	queryParams: {
 		tenantId: undefined,

+ 1 - 0
Web/src/views/system/pos/index.vue

@@ -90,6 +90,7 @@ const editPosRef = ref<InstanceType<typeof EditPos>>();
 const state = reactive({
 	loading: false,
 	posData: [] as Array<SysPos>,
+	tenantList: [] as Array<any>,
 	queryParams: {
 		tenantId: undefined,
 		name: undefined,

+ 1 - 0
Web/src/views/system/print/index.vue

@@ -76,6 +76,7 @@ const userStore = useUserInfo();
 const editPrintRef = ref<InstanceType<typeof EditPrint>>();
 const state = reactive({
 	loading: false,
+	tenantList: [] as Array<any>,
 	printData: [] as Array<SysPrint>,
 	queryParams: {
 		tenantId: undefined,

+ 1 - 0
Web/src/views/system/role/index.vue

@@ -88,6 +88,7 @@ const editRoleRef = ref<InstanceType<typeof EditRole>>();
 const grantDataRef = ref<InstanceType<typeof GrantData>>();
 const state = reactive({
 	loading: false,
+	tenantList: [] as Array<any>,
 	roleData: [] as Array<SysRole>,
 	queryParams: {
 		tenantId: undefined,

+ 2 - 0
Web/src/views/system/user/index.vue

@@ -126,6 +126,7 @@ const orgTreeRef = ref<InstanceType<typeof OrgTree>>();
 const editUserRef = ref<InstanceType<typeof EditUser>>();
 const state = reactive({
 	loading: false,
+	tenantList: [] as Array<any>,
 	userData: [] as Array<SysUser>,
 	orgTreeData: [] as Array<SysOrg>,
 	queryParams: {
@@ -134,6 +135,7 @@ const state = reactive({
 		realName: undefined,
 		phone: undefined,
 		posName: undefined,
+		tenantId: undefined,
 	},
 	tableParams: {
 		page: 1,