Răsfoiți Sursa

日志复制修改

duy 2 luni în urmă
părinte
comite
ed7bf0e9e2
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 6 0
      src/views/ledger/components/table-form.vue

+ 6 - 0
src/views/ledger/components/table-form.vue

@@ -679,8 +679,11 @@ const copyTableFormClick = () => {
     const formLog = formLogDataList.value
     const logIndex = formLogIndex.value
     const defaultData = setFormDefaultData(formLog[logIndex])
+    console.log(tableFormData.value, '复制表格内容')
     formLogDataList.value.push({
+
         ...defaultData,
+        ...tableFormData.value,
         id: '',
     })
     const index = formLogDataList.value.length - 1
@@ -939,7 +942,10 @@ const uploadFileClick = () => {
         success: async (file, res) => {
                 if (getObjVal(res.data)) {
                     tableFormData.value = res.data
+                    const formIndex = formLogIndex.value
+                     formLogDataList.value[formIndex] = tableFormData.value
                 } else {
+                       formLogDataList.value[ formLogIndex.value] = {}
                     tableFormData.value = {}
                 }
             window.$message.success('文件上传成功')