feat: 设置模块用户列表功能90%

This commit is contained in:
Zzz1zz
2025-07-06 00:12:32 +08:00
parent 1cfa0b6e4c
commit 293beb9f5d
17 changed files with 1758 additions and 147 deletions
+21 -2
View File
@@ -33,8 +33,9 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import {
IconSettings,
IconSafe,
@@ -45,7 +46,23 @@
import organization from './organization.vue';
// import { CreateDepartmentParams, createDepartment, getDepartmentList, DepartmentItem } from '@/api/setting'
const { t } = useI18n();
const currentActive = ref(4);
const route = useRoute();
const currentActive = ref(1);
// 监听路由query参数中的active参数
watch(
() => route.query.active,
(newActive) => {
if (newActive) {
const activeValue = parseInt(newActive as string, 10);
if (!Number.isNaN(activeValue)) {
currentActive.value = activeValue;
}
}
},
{ immediate: true }
);
const systemSettingList = [
{ id: 1, name: t('general-setting'), icon: IconSettings },
{ id: 2, name: t('security-setting'), icon: IconSafe },
@@ -56,6 +73,8 @@
const handleChooseSystemItem = (id: number) => {
currentActive.value = id;
};
// watch()
</script>
<style lang="less" scoped>