Commit a147ba30 by linjinhong

fix:修改问题

parent bb0cdaef
...@@ -4421,22 +4421,37 @@ const arrangeFinish = async () => { ...@@ -4421,22 +4421,37 @@ const arrangeFinish = async () => {
const submitTypesetting = () => { const submitTypesetting = () => {
const { templateWidth, type } = typesettingForm.value const { templateWidth, type } = typesettingForm.value
// 如果是自动排版且没有填必选项
if (isAuto.value && (!templateWidth || !type)) {
return ElMessage.warning('排版类型和排版宽度为必选项')
}
// 针对排版宽度和类型分别判断
if (!templateWidth && type) {
return ElMessage.warning('请选择排版宽度')
}
if (templateWidth && !type) { if (templateWidth && !type) {
return ElMessage.warning('请选择排版类型') return ElMessage.warning('请选择排版类型')
} else if (!templateWidth && type) {
return ElMessage.warning('请选择排版宽度')
} }
if (typesettingType.value == 3) {
if (!templateWidth && !type) { // 针对类型 3 的特殊判断
return ElMessage.warning('排版类型和排版宽度为必选项') if (typesettingType.value === 3 && (!templateWidth || !type)) {
} return ElMessage.warning('排版类型和排版宽度为必选项')
} }
// 设置为自动排版
isAuto.value = true isAuto.value = true
return typesettingType.value == 1
? handleReComposingDesign() // 根据排版类型执行相应的操作
: typesettingType.value == 2 switch (typesettingType.value) {
? arrangeFinish() case 1:
: downloadTifItem() return handleReComposingDesign()
case 2:
return arrangeFinish()
default:
return downloadTifItem()
}
} }
const changeSwitch = () => { 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