| | |
| | | import { getDeptTree } from '@/api/system/dept' |
| | | import { getRoleTree } from '@/api/system/role' |
| | | import func from '@/utils/func' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | account: '', |
| | |
| | | }) |
| | | const roleTree = ref([]) |
| | | const deptTree = ref([]) |
| | | const route = useRoute() |
| | | |
| | | const validatePass = (rule, value, callback) => { |
| | | if (value === '') { |
| | |
| | | submitData.name = submitData.realName |
| | | if (dialogMode.value === 'add') { |
| | | await add(submitData) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '用户管理'}-新增`, |
| | | type: 1 |
| | | }) |
| | | } else { |
| | | await update(submitData) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '用户管理'}-编辑`, |
| | | type: 1 |
| | | }) |
| | | } |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |