吉安感知网项目-前端
张含笑
2026-01-23 bcfa7fec8c6d2d222989e34f01b5fd6300befaf8
applications/drone-command/src/views/system/user/FormDiaLog.vue
@@ -260,6 +260,8 @@
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 = () => ({
@@ -300,6 +302,7 @@
const titleEnum = ref({ edit: '编辑用户', view: '查看用户', add: '新增用户' })
const roleTree = ref([])
const deptTree = ref([])
const route = useRoute()
// 密码验证
const validatePass = (rule, value, callback) => {
@@ -383,9 +386,19 @@
      if (dialogMode.value === 'add') {
         await add(submitData)
         saveOperationLog({
            requestUri: route.path,
            title: `${route.name || '用户管理01'}-新增`,
            type: 1
         })
         ElMessage.success('新增成功')
      } else {
         await update(submitData)
         saveOperationLog({
            requestUri: route.path,
            title: `${route.name || '用户管理01'}-编辑`,
            type: 1
         })
         ElMessage.success('更新成功')
      }
      visible.value = false