iZaiZaiA 2 ani în urmă
părinte
comite
2c8125c8f9
1 a modificat fișierele cu 5 adăugiri și 4 ștergeri
  1. 5 4
      src/views/other/first-item.vue

+ 5 - 4
src/views/other/first-item.vue

@@ -392,8 +392,8 @@ const getFirstExcelHtml = async () => {
     if (!error && code === 200 && temp) {
         let pkeyId = data?.id || ''
         pkeyIds.value = pkeyId
-        setHTableForm(temp, cid, tableFormData.value)
-        getFirstBussDataInfo(pkeyId)
+        await getFirstBussDataInfo(pkeyId)
+        setHTableForm(temp, cid)
     } else {
         isTableForm.value = false
         statusDesc.value = '暂无表单'
@@ -403,7 +403,7 @@ const getFirstExcelHtml = async () => {
 
 //渲染表单
 const tableFormApp = ref(null)
-const setHTableForm = (resData, cid, info) => {
+const setHTableForm = (resData, cid) => {
     //先卸载
     if (tableFormApp.value) {
         tableFormApp.value?.unmount()
@@ -413,7 +413,7 @@ const setHTableForm = (resData, cid, info) => {
         nextTick(() => {
             tableFormApp.value = HTableForm.createForm({
                 template: resData,
-                tableForm: info,
+                tableForm: tableFormData.value,
                 appId: `#table-form-${cid}`
             })
         })
@@ -501,6 +501,7 @@ const saveExcelBussData = async (pkeyId) => {
     const { primaryKeyId } = treeItem.value
     tableFormSaveLoading.value = true
     const linkIds = rowsToArr(tableFileData.value);
+    console.log(tableFormData.value)
     const { error, code, data } = await firstApi.saveBussData({
         ...tableFormData.value,
         projectId: projectId.value,