diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 067fcf2..d432c55 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -404,7 +404,7 @@ const local: App.I18n.Schema = { emptyLeader: '暂无负责人', userName: '用户名', userGender: '性别', - nickName: '昵称', + nickName: '用户昵称', deptName: '所属组织', positionName: '岗位', userPhone: '手机号', @@ -422,7 +422,7 @@ const local: App.I18n.Schema = { form: { userName: '请输入用户名', userGender: '请选择性别', - nickName: '请输入昵称', + nickName: '请输入用户昵称', orgName: '请输入组织名称', orgCode: '请输入组织编码', orgTypeLabel: '请选择组织类型', diff --git a/src/service/api/dict.ts b/src/service/api/dict.ts index 09822ec..3daf039 100644 --- a/src/service/api/dict.ts +++ b/src/service/api/dict.ts @@ -104,7 +104,7 @@ export function fetchBatchDeleteDictData(ids: number[]) { } /** 通过岗位编码获取该字典的所有字典数据 */ -export function fetchGetDictDataByCode(code: String) { +export function fetchGetDictDataByCode(code: string) { return request>({ url: `${DICT_DATA_PREFIX}/code?code=${code}`, method: 'get' diff --git a/src/typings/api/system-manage.d.ts b/src/typings/api/system-manage.d.ts index 2ef8ec2..e9e3145 100644 --- a/src/typings/api/system-manage.d.ts +++ b/src/typings/api/system-manage.d.ts @@ -146,6 +146,7 @@ declare namespace Api { Pick & Pick & { username?: string; + nickname?: string; mobile?: string; deptId?: number; roleId?: number; diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index 9ec9af5..5cf7450 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -89,8 +89,8 @@ const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagi columns: () => [ { prop: 'selection', type: 'selection', width: 48 }, { prop: 'index', type: 'index', label: '序号', width: 64 }, - { prop: 'name', label: '岗位名称', minWidth: 160, showOverflowTooltip: true }, - { prop: 'code', label: '岗位编码', minWidth: 180, showOverflowTooltip: true }, + { prop: 'name', label: '岗位名称', minWidth: 200, showOverflowTooltip: true }, + { prop: 'code', label: '岗位编码', minWidth: 330, showOverflowTooltip: true }, { prop: 'postType', label: '岗位类型', diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 02f9a3f..e1ae59e 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -106,6 +106,7 @@ const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagi width: 196, align: 'center', fixed: 'right', + className: 'role-operate-column', formatter: row => ( (); +const { fromUserIndex = false, deptId = 100, orgType = 'company' } = defineProps(); + +/** + * 判断节点是否为母节点(根节点) + * + * 母节点是指树形数据中的第一层节点 + * + * @param data 节点数据 + */ +function isRootNode(data: Api.SystemManage.UserManagementRelationTreeRespVO): boolean { + return treeData.value.some(node => node.userId === data.userId); +} + +/** + * 判断母节点的编辑按钮是否应该隐藏 + * + * 当组织类型为部门、方向或团队时,隐藏母节点的编辑按钮 + */ +const shouldHideRootEdit = computed(() => { + return fromUserIndex && orgType !== 'company'; +}); /** * 初始化搜索参数 @@ -379,7 +402,6 @@ onMounted(async () => { :data="treeData" :props="treeProps" node-key="userId" - default-expand-all :expand-on-click-node="false" @check="handleNodeCheck" > @@ -389,14 +411,14 @@ onMounted(async () => { {{ node.label }} -
+
新增 - + @@ -416,7 +438,6 @@ onMounted(async () => { -
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index f94ba38..0b1b3f6 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -38,7 +38,7 @@ function getInitSearchParams(): Api.SystemManage.UserSearchParams { return { pageNo: 1, pageSize: 10, - username: undefined, + nickname: undefined, mobile: undefined, status: undefined, deptId: undefined, @@ -211,7 +211,7 @@ const {columns, columnChecks, data, loading, getDataByPage, mobilePagination} = { prop: 'positionName', label: $t('page.system.user.positionName'), - minWidth: 140, + minWidth: 200, showOverflowTooltip: true, formatter: row => getNullableLabel(row.positionName) }, @@ -772,7 +772,7 @@ onMounted(async () => { :show-footer="false" max-body-height="70vh" > - + diff --git a/src/views/system/user/modules/user-search.vue b/src/views/system/user/modules/user-search.vue index 29da050..b3e36ed 100644 --- a/src/views/system/user/modules/user-search.vue +++ b/src/views/system/user/modules/user-search.vue @@ -37,12 +37,12 @@ const model = defineModel('model', { required @search="$emit('search')" > - +