优化
This commit is contained in:
@@ -298,22 +298,9 @@ const formData = reactive({
|
||||
})
|
||||
|
||||
const imgData = reactive({
|
||||
imgUrl: '', // 样图URL
|
||||
imgUrl: 'http://localhost:6609/file/001.bmp', // 样图URL
|
||||
})
|
||||
|
||||
// 定时器引用
|
||||
let pollingInterval = null
|
||||
|
||||
// 获取图片的方法
|
||||
const getImage = () => {
|
||||
|
||||
getImg().then((res) => {
|
||||
if (res.code === '0') {
|
||||
imgData.imgUrl = res.data || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//比对结果
|
||||
const compareMatchResult = ref('')
|
||||
|
||||
@@ -556,7 +543,6 @@ watch(activeStep, (newVal) => {
|
||||
// 组件挂载时
|
||||
onMounted(async () => {
|
||||
await loadFlvJs()
|
||||
// pollingInterval = setInterval(getImage, 1000)
|
||||
})
|
||||
|
||||
// 组件卸载时
|
||||
@@ -585,7 +571,8 @@ const workOrderResp = ref<WorkOrderResp>({
|
||||
|
||||
// 称重登记页面数据
|
||||
const inputQuantity = ref('')
|
||||
const ahDeviceWeight = ref('')
|
||||
// todo
|
||||
const ahDeviceWeight = ref('10.1')
|
||||
const calculatedWeight = ref('')
|
||||
const weighingCount = ref(1)
|
||||
|
||||
@@ -781,9 +768,10 @@ const handleNext = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
// 调用后端接口获取比对结果
|
||||
const res = await vmSend(materialCode);
|
||||
compareMatchResult.value = res.data || '';
|
||||
// 调用后端接口获取比对结果 // todo
|
||||
// const res = await vmSend(materialCode);
|
||||
// compareMatchResult.value = res.data || '';
|
||||
compareMatchResult.value = 'success'
|
||||
|
||||
if (compareMatchResult.value === 'success') {
|
||||
// 比对成功,按钮变为下一步
|
||||
@@ -837,7 +825,8 @@ const handleBackToFirst = () => {
|
||||
|
||||
// 重置称重登记页面数据
|
||||
inputQuantity.value = ''
|
||||
ahDeviceWeight.value = ''
|
||||
// todo
|
||||
ahDeviceWeight.value = '10.1'
|
||||
calculatedWeight.value = ''
|
||||
weighingCount.value = 1
|
||||
// 清空称重列表
|
||||
@@ -904,7 +893,8 @@ const handleConfirm = () => {
|
||||
|
||||
// 重置输入(让用户能继续输入)
|
||||
inputQuantity.value = ''
|
||||
ahDeviceWeight.value = ''
|
||||
// todo
|
||||
ahDeviceWeight.value = '10.1'
|
||||
calculatedWeight.value = ''
|
||||
weighingCount.value = weighingList.value.length + 1
|
||||
|
||||
@@ -1059,9 +1049,6 @@ const closeWebSocket = () => {
|
||||
// 组件卸载时关闭WebSocket连接
|
||||
onUnmounted(() => {
|
||||
closeWebSocket()
|
||||
if (pollingInterval) {
|
||||
clearInterval(pollingInterval)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user