fix 修复 !pr107 遗留问题
update 优化 岗位下拉框样式问题
| | |
| | | } |
| | | |
| | | // 获取岗位选择框列表 |
| | | export function optionselect(query: PostQuery): AxiosPromise<PostVO[]> { |
| | | export function optionselect(deptId?: number | string, postIds?: (number | string)[]): AxiosPromise<PostVO[]> { |
| | | return request({ |
| | | url: '/system/post/optionselect', |
| | | method: 'get', |
| | | params: query |
| | | params: { |
| | | postIds: postIds, |
| | | deptId: deptId |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | :props="{ value: 'id', label: 'label', children: 'children' }" |
| | | value-key="id" |
| | | placeholder="请选择部门" |
| | | check-strictly/> |
| | | check-strictly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="岗位状态" clearable> |
| | |
| | | <el-form-item label="岗位名称" prop="postName"> |
| | | <el-input v-model="form.postName" placeholder="请输入岗位名称" /> |
| | | </el-form-item> |
| | | <el-col> |
| | | <el-form-item label="部门" prop="deptId"> |
| | | <el-tree-select |
| | | v-model="form.deptId" |
| | | :data="deptOptions" |
| | | :props="{ value: 'id', label: 'label', children: 'children' }" |
| | | value-key="id" |
| | | placeholder="请选择部门" |
| | | check-strictly |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-form-item label="部门" prop="deptId"> |
| | | <el-tree-select |
| | | v-model="form.deptId" |
| | | :data="deptOptions" |
| | | :props="{ value: 'id', label: 'label', children: 'children' }" |
| | | value-key="id" |
| | | placeholder="请选择部门" |
| | | check-strictly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="岗位编码" prop="postCode"> |
| | | <el-input v-model="form.postCode" placeholder="请输入编码名称" /> |
| | | </el-form-item> |
| | |
| | | import { UserForm, UserQuery, UserVO } from '@/api/system/user/types'; |
| | | import { DeptVO } from '@/api/system/dept/types'; |
| | | import { RoleVO } from '@/api/system/role/types'; |
| | | import { PostVO } from '@/api/system/post/types'; |
| | | import {PostQuery, PostVO} from '@/api/system/post/types'; |
| | | import { treeselect } from '@/api/system/dept'; |
| | | import { globalHeaders } from '@/utils/request'; |
| | | import { to } from 'await-to-js'; |
| | | import {optionselect} from "@/api/system/post"; |
| | | |
| | | const router = useRouter(); |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance; |
| | |
| | | initPassword.value = response.data; |
| | | }); |
| | | }); |
| | | |
| | | // 监测部门变化加载岗位 |
| | | watch( |
| | | () => form.value.deptId, |
| | | async () => { |
| | | const response = await optionselect(form.value.deptId); |
| | | postOptions.value = response.data; |
| | | } |
| | | ); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |