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