浏览代码

施工台账修改

duy 1 年之前
父节点
当前提交
cdda66df32
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/views/ledger/components/construction.vue

+ 4 - 3
src/views/ledger/components/construction.vue

@@ -155,15 +155,16 @@ const tableConstructionData = ref([])
 const tableConstructionLoading = ref(false)
 const getTableConstructionData = async () => {
     tableConstructionLoading.value = true
-    const { error, code, data ,msg } = await constructionApi.queryConstructionPage({
+    const { error, code, data, msg } = await constructionApi.queryConstructionPage({
         ...searchConstructionForm.value,
         projectId: projectId.value,
     })
     //判断状态
     tableConstructionLoading.value = false
     if (!error && code === 200) {
-        tableConstructionData.value = getArrValue(data['records'])
-        searchConstructionForm.value.total = data['total'] || 0
+       
+        tableConstructionData.value = getArrValue(data?.records) || []
+        searchConstructionForm.value.total = data?.total || 0
     } else {
         tableConstructionData.value = []
         searchConstructionForm.value.total = 0