|
|
@@ -229,8 +229,9 @@ const formRules = reactive({
|
|
|
|
|
|
const formRef = ref() // 表单 Ref
|
|
|
const inspectItemChoose = (rows) => {
|
|
|
+ debugger
|
|
|
rows.forEach((it) => {
|
|
|
- const ifExist = items.value.find((item) => item.id === it.id)
|
|
|
+ const ifExist = items.value.find((item) => item.itemId === it.id)
|
|
|
if (!ifExist) {
|
|
|
items.value.push(it)
|
|
|
console.log(JSON.stringify(it))
|
|
|
@@ -274,7 +275,7 @@ const itemsWithIndex = computed(() => {
|
|
|
})
|
|
|
const itemsWithIndexUpdate = computed(() => {
|
|
|
return items.value.map((item, index) => ({
|
|
|
- itemId: item.itemId,
|
|
|
+ itemId: item.itemId||item.id,
|
|
|
item: item.item,
|
|
|
standard: item.standard,
|
|
|
index: index + 1 // 序号从1开始
|