Browse Source

获取html参数修改

duy 1 year ago
parent
commit
cb93fc410c

+ 7 - 5
src/views/agree/land/collapse-form/form-item.vue

@@ -138,9 +138,9 @@ onMounted(async () => {
     //获取已填写的数据
     await getTableFormInfo(keyId.value)
     //按键key列表
-    await getHtmlBussColsApi(keyId.value)
+    await getHtmlBussColsApi(tableId.value)
     //渲染表单
-    await getExcelHtml(keyId.value)
+    await getExcelHtml(tableId.value)
     loading.value = false
 })
 
@@ -176,6 +176,7 @@ const getTableFormInfo = async (pkeyId) => {
     if (pkeyId) {
         const { error, code, data } = await landApi.getBussInfo({
             id: pkeyId,
+            tableId:tableId.value,
         }, false)
         const resData = getObjVal(data)
         if (!error && code === 200 && resData) {
@@ -192,7 +193,7 @@ const getTableFormInfo = async (pkeyId) => {
         }
     } else {
         tableFormInfo.value = {}
-        window?.$message?.warning('pkeyId为空')
+        // window?.$message?.warning('pkeyId为空')
     }
 }
 
@@ -201,7 +202,7 @@ const colsKeys = ref([])
 const getHtmlBussColsApi = async (pkeyId) => {
     if (pkeyId) {
         const { error, code, data } = await landApi.getBussCols({
-            id: pkeyId,
+            tableId: pkeyId,
        
         }, false)
         if (!error && code === 200) {
@@ -223,9 +224,10 @@ const getHtmlBussColsApi = async (pkeyId) => {
 //获取模板标签数据
 const excelHtml = ref('')
 const getExcelHtml = async (pkeyId) => {
+    console.log(pkeyId, 'pkeyId')
     if (pkeyId) {
         const { error, code, data } = await landApi.getExcelHtml({
-            id: pkeyId,
+            tableId: pkeyId,
         }, false)
         const resData = isString(data) ? data || '' : ''
         if (!error && code === 200 && resData) {

+ 2 - 0
src/views/agree/land/collapse-form/index.vue

@@ -419,6 +419,7 @@ const setInitDragModalTableForm = (item, index) => {
         index: index,
         item: item,
         id:item.id,
+        tableId:item.tableId,
     }
 }
 
@@ -604,6 +605,7 @@ const saveExcelBussData = async ({ id }, dragItem = null, showTip = true) => {
     if (isRegExp) {
         const formData = refs?.getFormData()
         const { error, code } = await landApi.saveBussData(formData)
+     
         setDragModalLoading(dragItem)
         if (!error && code === 200) {
             if (showTip) {

+ 5 - 3
src/views/agree/land/form.vue

@@ -108,10 +108,12 @@ const searchNodeAllTable = async () => {
     //处理数据
 
     if (!error && code === 200) {
-        agreementId.value = data
-        updateGetTablesData(data)
+        // agreementId.value = data
+        // updateGetTablesData(data)
+        ListItemDatas.value = getArrValue(data)
     } else {
-        agreementId.value = ''
+        // agreementId.value = ''
+        ListItemDatas.value = []
     }
 }
 //编辑获取表单列表