♻️ refactor(calShiftList): 重命名表单类型变量为 dialogType

pull/871/MERGE
YunaiV 2026-04-12 02:39:21 +08:00
parent bf912754ca
commit b1c45fbd69
1 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ const getList = async () => {
// ==================== / ==================== // ==================== / ====================
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formType = ref('') // create - update - const dialogType = ref('') // create - update -
const formLoading = ref(false) // const formLoading = ref(false) //
const formRef = ref() // Ref const formRef = ref() // Ref
const formData = ref({ const formData = ref({
@ -131,7 +131,7 @@ const formRules = reactive({
const openForm = (type: string, row?: CalPlanShiftVO) => { const openForm = (type: string, row?: CalPlanShiftVO) => {
dialogVisible.value = true dialogVisible.value = true
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type dialogType.value = type
resetForm() resetForm()
// //
if (type === 'update' && row) { if (type === 'update' && row) {
@ -157,7 +157,7 @@ const submitForm = async () => {
formLoading.value = true formLoading.value = true
try { try {
const data = formData.value as unknown as CalPlanShiftVO const data = formData.value as unknown as CalPlanShiftVO
if (formType.value === 'create') { if (dialogType.value === 'create') {
await CalPlanShiftApi.createPlanShift(data) await CalPlanShiftApi.createPlanShift(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {