This commit is contained in:
@@ -247,8 +247,8 @@
|
||||
ElOption
|
||||
} from 'element-plus'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { RoleType } from '@/types/api'
|
||||
import type { PlatformRole, PermissionTreeNode } from '@/types/api'
|
||||
import { RoleStatus, RoleType } from '@/types/api'
|
||||
import type { PlatformRole, PermissionTreeNode, PlatformRoleFormData } from '@/types/api'
|
||||
import type { SearchFormItem } from '@/types'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { RoutesAlias } from '@/router/routesAlias'
|
||||
@@ -381,12 +381,18 @@
|
||||
]
|
||||
})
|
||||
|
||||
const form = reactive<any>({
|
||||
type RoleFormState = PlatformRoleFormData & {
|
||||
id: number
|
||||
credit_enabled: boolean
|
||||
credit_limit_yuan: number
|
||||
}
|
||||
|
||||
const form = reactive<RoleFormState>({
|
||||
id: 0,
|
||||
role_name: '',
|
||||
role_desc: '',
|
||||
role_type: 1,
|
||||
status: CommonStatus.ENABLED,
|
||||
role_type: RoleType.PLATFORM,
|
||||
status: RoleStatus.ENABLED,
|
||||
credit_enabled: false,
|
||||
credit_limit_yuan: 0
|
||||
})
|
||||
@@ -1138,7 +1144,7 @@
|
||||
form.role_name = ''
|
||||
form.role_desc = ''
|
||||
form.role_type = 1
|
||||
form.status = CommonStatus.ENABLED
|
||||
form.status = RoleStatus.ENABLED
|
||||
form.credit_enabled = false
|
||||
form.credit_limit_yuan = 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user