diff --git a/src/views/equipement/standard/book/components/config/eighth/config.vue b/src/views/equipement/standard/book/components/config/eighth/config.vue index 3b2a79e..a99f1df 100644 --- a/src/views/equipement/standard/book/components/config/eighth/config.vue +++ b/src/views/equipement/standard/book/components/config/eighth/config.vue @@ -131,12 +131,12 @@ * @param checkoutList 选中的数组 * @param list 操作的数组 */ -const delRow = (checkoutList: IList[], list: IList[]) => { +const delRow = (checkoutList: IList[], listParam: IList[]) => { if (!checkoutList.length) { ElMessage.warning('请选中要删除的行') } else { - list = list.filter((item: any) => { + list.value = listParam.filter((item: any) => { return !checkoutList.includes(item) }) } @@ -188,7 +188,13 @@ if (!checkArrayDataUnique()) { return false } const params = { itemCategoryId: form.value.itemCategoryId, // 核查项分类id - checkItemDataETwoList: list.value, + checkItemDataETwoList: list.value.map((item: any) => { + return { + ...item, + checkType: item.checkType.join(','), // 核查类型 + remark: form.value.remark, + } + }), equipmentId: infoId.value, // 配套设备id } const loading = ElLoading.service({ @@ -232,7 +238,13 @@ } getCheckItemDetail(params).then((res) => { if (res && res.data && res.data.checkItemDataETwoList && res.data.checkItemDataETwoList.length) { - list.value = res.data.checkItemDataETwoList + list.value = res.data.checkItemDataETwoList.map((e: any) => { + return { + ...e, + checkType: e.checkType ? e.checkType.split(',') : [], // 核查类型 + } + }) + form.value.remark = list.value[0].remark // 核查项备注 } loading.close() }) @@ -384,7 +396,7 @@ filterable :placeholder="pageType === 'detail' ? ' ' : `${item.text}`" > - +