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