Commit a147ba30 by linjinhong

fix:修改问题

parent bb0cdaef
......@@ -4421,22 +4421,37 @@ const arrangeFinish = async () => {
const submitTypesetting = () => {
const { templateWidth, type } = typesettingForm.value
// 如果是自动排版且没有填必选项
if (isAuto.value && (!templateWidth || !type)) {
return ElMessage.warning('排版类型和排版宽度为必选项')
}
// 针对排版宽度和类型分别判断
if (!templateWidth && type) {
return ElMessage.warning('请选择排版宽度')
}
if (templateWidth && !type) {
return ElMessage.warning('请选择排版类型')
} else if (!templateWidth && type) {
return ElMessage.warning('请选择排版宽度')
}
if (typesettingType.value == 3) {
if (!templateWidth && !type) {
return ElMessage.warning('排版类型和排版宽度为必选项')
}
// 针对类型 3 的特殊判断
if (typesettingType.value === 3 && (!templateWidth || !type)) {
return ElMessage.warning('排版类型和排版宽度为必选项')
}
// 设置为自动排版
isAuto.value = true
return typesettingType.value == 1
? handleReComposingDesign()
: typesettingType.value == 2
? arrangeFinish()
: downloadTifItem()
// 根据排版类型执行相应的操作
switch (typesettingType.value) {
case 1:
return handleReComposingDesign()
case 2:
return arrangeFinish()
default:
return downloadTifItem()
}
}
const changeSwitch = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment