| | |
| | | <script setup name="User" lang="ts"> |
| | | import api from '@/api/system/user'; |
| | | import { UserForm, UserQuery, UserVO } from '@/api/system/user/types'; |
| | | import { treeselect } from '@/api/system/dept'; |
| | | import { DeptVO } from '@/api/system/dept/types'; |
| | | import { RoleVO } from '@/api/system/role/types'; |
| | | import { PostVO } from '@/api/system/post/types'; |
| | | import { to } from 'await-to-js'; |
| | | import { treeselect } from '@/api/system/dept'; |
| | | import { globalHeaders } from '@/utils/request'; |
| | | import { to } from 'await-to-js'; |
| | | |
| | | const router = useRouter(); |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance; |
| | | const { sys_normal_disable, sys_user_sex } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'sys_user_sex')); |
| | | |
| | | const userList = ref<UserVO[]>(); |
| | | const loading = ref(true); |
| | | const showSearch = ref(true); |
| | |
| | | postIds: [], |
| | | roleIds: [] |
| | | }; |
| | | const data = reactive<PageData<UserForm, UserQuery>>({ |
| | | |
| | | const initData: PageData<UserForm, UserQuery> = { |
| | | form: { ...initFormData }, |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | userName: '', |
| | | phonenumber: '', |
| | | status: '', |
| | | deptId: '' |
| | | deptId: '', |
| | | roleId: '' |
| | | }, |
| | | rules: { |
| | | userName: [ |
| | |
| | | } |
| | | ] |
| | | } |
| | | }); |
| | | }; |
| | | const data = reactive<PageData<UserForm, UserQuery>>(initData); |
| | | |
| | | const { queryParams, form, rules } = toRefs<PageData<UserForm, UserQuery>>(data); |
| | | |
| | |
| | | inputErrorMessage: '用户密码长度必须介于 5 和 20 之间' |
| | | }) |
| | | ); |
| | | if (!err) { |
| | | if (!err && res) { |
| | | await api.resetUserPwd(row.userId, res.value); |
| | | proxy?.$modal.msgSuccess('修改成功,新密码是:' + res.value); |
| | | } |