This commit is contained in:
zc
2026-04-09 14:49:59 +08:00
parent c360d00cac
commit da317b9460

View File

@@ -250,14 +250,37 @@
>
上一步
</a-button>
<a-button
v-if="activeStep < 3"
type="primary"
class="next-button"
@click="handleNext"
>
{{ activeStep === 2 ? '完成' : (compareMatchResult === 'success' ? '下一步' : '开始比对') }}
</a-button>
<template v-if="activeStep < 3">
<!-- 开始比对按钮 -->
<a-button
v-if="activeStep === 1"
type="primary"
class="next-button"
@click="handleNext"
>
开始比对
</a-button>
<!-- 下一步按钮 -->
<a-button
v-if="activeStep === 1"
type="primary"
class="next-button"
:disabled="compareMatchResult !== 'success'"
style="margin-left: 12px"
@click="handleNext"
>
下一步
</a-button>
<!-- 完成按钮 -->
<a-button
v-if="activeStep === 2"
type="primary"
class="next-button"
@click="handleNext"
>
完成
</a-button>
</template>
</div>
</div>
</div>
@@ -727,19 +750,19 @@ const handleNext = async () => {
}
// 调用后端接口获取比对结果 // todo
const res = await vmSend(materialCode);
if (res.data) {
compareMatchResult.value = res.data
if (res.data === 'success') {
Message.success('比对成功')
} else {
Message.error('比对失败')
}
} else {
// 比对失败,提示错误
Message.error('比对数据异常')
}
// compareMatchResult.value = 'success'
// const res = await vmSend(materialCode);
// if (res.data) {
// compareMatchResult.value = res.data
// if (res.data === 'success') {
// Message.success('比对成功')
// } else {
// Message.error('比对失败')
// }
// } else {
// // 比对失败,提示错误
// Message.error('比对数据异常')
// }
compareMatchResult.value = 'success'
} catch (error) {
console.error('比对失败:', error)
Message.error('相机异常,请重试')