|
@@ -740,6 +740,24 @@ const batchUploadSaveApi = async (rows) => {
|
|
window.$message?.error('保存失败')
|
|
window.$message?.error('保存失败')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+//确认上传保存
|
|
|
|
+const archiveFileBatchUpdate = async (rows) => {
|
|
|
|
+ uploadSaveLoading.value = true
|
|
|
|
+ const {error, code} = await tuningApi.archiveFileBatchUpdate({
|
|
|
|
+ list: rows
|
|
|
|
+ }, false)
|
|
|
|
+ //判断状态
|
|
|
|
+ uploadSaveLoading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window.$message?.success('保存成功')
|
|
|
|
+ batchUploadCancel()
|
|
|
|
+ getTableData()
|
|
|
|
+ } else {
|
|
|
|
+ window.$message?.error('保存失败')
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
//批量新增编辑保存
|
|
//批量新增编辑保存
|
|
const batchUploadSave = async () => {
|
|
const batchUploadSave = async () => {
|
|
const rows = tableUploadData.value
|
|
const rows = tableUploadData.value
|
|
@@ -762,7 +780,7 @@ const batchUploadSave = async () => {
|
|
element.endDate = dates ? dates[1] : null
|
|
element.endDate = dates ? dates[1] : null
|
|
element.autoFileSort = index + 1
|
|
element.autoFileSort = index + 1
|
|
})
|
|
})
|
|
- await batchUploadSaveApi(rows)
|
|
|
|
|
|
+ await archiveFileBatchUpdate(rows)
|
|
} else {
|
|
} else {
|
|
await batchUploadSaveApi(rows)
|
|
await batchUploadSaveApi(rows)
|
|
}
|
|
}
|