diff --git a/src/api/staff/department/index.ts b/src/api/staff/department/index.ts index d78342e..9cc557e 100644 --- a/src/api/staff/department/index.ts +++ b/src/api/staff/department/index.ts @@ -1,20 +1,21 @@ import { defHttp } from '/@/utils/http/axios' -import { DepartmentModel, DepartmentPostModel } from '/@/api/staff/department/model' enum Api { - GetOrganizationDepartment = '/uec/user/get/organization-department', - SaveOrganizationDepartment = '/uec/user/save/organization-department', + GetOrganizationDepartment = '/dating-agency-uec/user/list/organization-department', + SaveOrganizationDepartment = '/dating-agency-uec/user/create/organization-department', } /** * 获取组织部门架构 */ -export const getOrganizationDepartment = () => - defHttp.get({ url: Api.GetOrganizationDepartment }) +export const getOrganizationDepartment = (params: any) => defHttp.get({ url: Api.GetOrganizationDepartment, params }) /** * 用户修改组织部门信息 * @param params */ -export const saveOrganizationDepartment = (params: DepartmentPostModel) => - defHttp.get({ url: Api.SaveOrganizationDepartment, params }) +export const saveOrganizationDepartment = (params: any) => defHttp.post({ url: Api.SaveOrganizationDepartment, params }) + +export const editOrganizationDepartment = (params: any) => defHttp.post({ url: '/dating-agency-uec/user/edit/organization-department', params }) + +export const deleteOrganizationDepartment = (id: string) => defHttp.post({ url: '/dating-agency-uec/user/delete/organization-department', params: {id} }) \ No newline at end of file diff --git a/src/api/staff/department/model.ts b/src/api/staff/department/model.ts deleted file mode 100644 index 7a21f4c..0000000 --- a/src/api/staff/department/model.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 组织部门接口模型 - */ -export interface DepartmentModel { - childrenList: DepartmentModel[] - departmentName: string - departmentUserId: string - departmentUserName: string - id: string - level: number - organizationId: string - parentId: string - parentIds: string - organizationMemberList: OrganizationMemberModel[] - undistributedOrganizationMemberList: OrganizationMemberModel[] -} - -/** - * 组织成员接口模型 - */ -export interface OrganizationMemberModel { - id: string - joinedTime: string - nickName: string - orgId: string - phone: string - realName: string - status: number - userId: string -} - -export interface DepartmentPostModel { - departmentName: string - departmentUserId: string - id: string - parentId: string -} diff --git a/src/locales/lang/zh-CN/routes/staff.ts b/src/locales/lang/zh-CN/routes/staff.ts index ffa2a53..cd77cb0 100644 --- a/src/locales/lang/zh-CN/routes/staff.ts +++ b/src/locales/lang/zh-CN/routes/staff.ts @@ -1,7 +1,7 @@ export default { staff: '员工管理', auth: '权限管理', - staffList: '员工列表', + staffList: '员工管理', staffAudit: '员工审核', department: '部门管理', } diff --git a/src/settings/projectSetting.ts b/src/settings/projectSetting.ts index d6e1b07..26cb69e 100644 --- a/src/settings/projectSetting.ts +++ b/src/settings/projectSetting.ts @@ -15,7 +15,7 @@ import { primaryColor } from '../../build/config/themeConfig' // ! You need to clear the browser cache after the change const setting: ProjectConfig = { // Whether to show the configuration button - showSettingButton: true, + showSettingButton: false, // Whether to show the theme switch button showDarkModeToggle: true, diff --git a/src/views/staff/staff/data.ts b/src/views/staff/staff/data.ts index a43131d..5a0e52d 100644 --- a/src/views/staff/staff/data.ts +++ b/src/views/staff/staff/data.ts @@ -1,14 +1,15 @@ import { BasicColumn, FormSchema } from '/@/components/Table' import { ref } from 'vue' import { getRoleListByPage } from '/@/api/sys/menu'; +import { getOrganizationDepartment } from '/@/api/staff/department' export const tableColumns: BasicColumn[] = [ { title: '用户id', dataIndex: 'userId' }, - { title: '姓名', dataIndex: 'realName' }, - { title: '手机号', dataIndex: 'phone' }, + { width: 100, title: '姓名', dataIndex: 'realName' }, + { width: 120,title: '手机号', dataIndex: 'phone' }, { title: '角色', dataIndex: 'role', slots: { customRender: 'role' }, }, { title: '微信昵称', dataIndex: 'nickName' }, - { title: '员工码', dataIndex: 'code' }, + { width: 80, title: '员工码', dataIndex: 'code' }, { title: '添加时间', dataIndex: 'joinedTime' }, ] export const tableFormSchema: FormSchema[] = [ @@ -51,3 +52,25 @@ export const modalFormSchema: FormSchema[] = [ }, }, ] + + +export const modalFormSchema1: FormSchema[] = [ + { + label: '部门名称', + required: true, + field: 'departmentName', + component: 'Input', + }, + { + label: '负责人姓名', + required: true, + field: 'chargePersonName', + component: 'Input', + }, + { + label: '负责人手机', + required: true, + field: 'chargePersonPhone', + component: 'Input', + }, +] diff --git a/src/views/staff/staff/index.vue b/src/views/staff/staff/index.vue index fee9870..47a0e95 100644 --- a/src/views/staff/staff/index.vue +++ b/src/views/staff/staff/index.vue @@ -1,31 +1,58 @@ @@ -35,26 +62,87 @@ }