|
@@ -111,6 +111,7 @@
|
|
store
|
|
store
|
|
} from '@/store/index.js'
|
|
} from '@/store/index.js'
|
|
|
|
|
|
|
|
+ const isEventTriggered = ref(false); // 创建一个标志位
|
|
const unfitInfos = ref([])
|
|
const unfitInfos = ref([])
|
|
const consultations = ref([])
|
|
const consultations = ref([])
|
|
const dayworkInfo = ref({})
|
|
const dayworkInfo = ref({})
|
|
@@ -207,6 +208,7 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ isEventTriggered.value = true; // 更新标志位状态
|
|
// consultations.value.push(info)
|
|
// consultations.value.push(info)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -245,9 +247,14 @@
|
|
|
|
|
|
// 添加不合格信息
|
|
// 添加不合格信息
|
|
const handleAddConsultation = () => {
|
|
const handleAddConsultation = () => {
|
|
|
|
+ isEventTriggered.value = false; // 更新标志位状态
|
|
// 监听事件
|
|
// 监听事件
|
|
uni.$once('addConsulttationEvent', (data) => {
|
|
uni.$once('addConsulttationEvent', (data) => {
|
|
- addConsultation(data)
|
|
|
|
|
|
+ if (!isEventTriggered.value) {
|
|
|
|
+ // 如果事件尚未触发,则执行事件触发逻辑
|
|
|
|
+ addConsultation(data)
|
|
|
|
+ }
|
|
|
|
+
|
|
})
|
|
})
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: "/pages/sorting/consultation",
|
|
url: "/pages/sorting/consultation",
|