Forráskód Böngészése

fix:修补名称显示,分页参数

cb_luzhixia 1 hónapja
szülő
commit
5157fc315d

+ 3 - 1
src/components/costAudit/EstablishmentDialog.vue

@@ -572,7 +572,9 @@
             // this.formData.areaCode = ''
             if (this.$permission.getUserInfo()) {
               let user = this.$permission.getUserInfo()
-              if (user.dataScope === 1) {
+              if (user.dataScope === 0) {
+                this.formData.areaCode = user.provinceCode
+              } else if (user.dataScope === 1) {
                 this.formData.areaCode = user.cityCode
               } else if (user.dataScope === 2) {
                 this.formData.areaCode = user.countyCode

+ 1 - 1
src/views/costAudit/baseInfo/auditDocManage/index.vue

@@ -300,7 +300,7 @@
         this.loading = true
         const params = {
           pageSize: this.pageSize,
-          pageNum: this.currentPage,
+          page: this.currentPage,
           ...this.searchForm,
         }
         getInfoList(params)

+ 1 - 1
src/views/costAudit/baseInfo/auditReviewDocManage/index.vue

@@ -732,7 +732,7 @@
         try {
           const params = {
             ...this.searchForm,
-            pageNum: this.currentPage,
+            page: this.currentPage,
             pageSize: this.pageSize,
           }
           const response = await getDocList(params)

+ 16 - 21
src/views/costAudit/baseInfo/costFormManage/index.vue

@@ -603,28 +603,23 @@
       },
       // 获取监审类别名称
       batchGetCatalogNames() {
-        this.tableData.forEach((row) => {
-          const catalogIds = row.catalogId.split(',').map((id) => id.trim())
-          catalogIds.forEach((catalogId) => {
-            if (!catalogId) return
+        // 递归查找名称
+        this.CatalogNameMap = {}
+        this._recursiveCatalogMap(this.catalogListOptions)
+      },
 
-            getCatalogDetail(catalogId)
-              .then((res) => {
-                if (res && res.value && res.value.catalogName) {
-                  this.$set(
-                    this.CatalogNameMap,
-                    catalogId,
-                    res.value.catalogName
-                  )
-                } else {
-                  this.$set(this.CatalogNameMap, catalogId, '无名称')
-                }
-              })
-              .catch((err) => {
-                console.error('获取获取失败', catalogId, err)
-                this.$set(this.CatalogNameMap, catalogId, '获取失败')
-              })
-          })
+      // 递归遍历目录树并构建ID到名称的映射
+      _recursiveCatalogMap(catalogs) {
+        if (!Array.isArray(catalogs) || catalogs.length === 0) {
+          return
+        }
+        catalogs.forEach((item) => {
+          // 为当前目录项添加映射
+          this.CatalogNameMap[item.id] = item.catalogName
+          // 递归处理子目录
+          if (item.children && Array.isArray(item.children)) {
+            this._recursiveCatalogMap(item.children)
+          }
         })
       },
       // 批量删除

+ 16 - 21
src/views/costAudit/baseInfo/costVerifyManage/index.vue

@@ -1292,28 +1292,23 @@
       },
       // 获取监审类别名称
       batchGetCatalogNames() {
-        this.tableData.forEach((row) => {
-          const catalogIds = row.catalogId.split(',').map((id) => id.trim())
-          catalogIds.forEach((catalogId) => {
-            if (!catalogId) return
+        // 递归查找名称
+        this.CatalogNameMap = {}
+        this._recursiveCatalogMap(this.catalogListOptions)
+      },
 
-            getCatalogDetail(catalogId)
-              .then((res) => {
-                if (res && res.value && res.value.catalogName) {
-                  this.$set(
-                    this.CatalogNameMap,
-                    catalogId,
-                    res.value.catalogName
-                  )
-                } else {
-                  this.$set(this.CatalogNameMap, catalogId, '无名称')
-                }
-              })
-              .catch((err) => {
-                console.error('获取获取失败', catalogId, err)
-                this.$set(this.CatalogNameMap, catalogId, '获取失败')
-              })
-          })
+      // 递归遍历目录树并构建ID到名称的映射
+      _recursiveCatalogMap(catalogs) {
+        if (!Array.isArray(catalogs) || catalogs.length === 0) {
+          return
+        }
+        catalogs.forEach((item) => {
+          // 为当前目录项添加映射
+          this.CatalogNameMap[item.id] = item.catalogName
+          // 递归处理子目录
+          if (item.children && Array.isArray(item.children)) {
+            this._recursiveCatalogMap(item.children)
+          }
         })
       },
       // 获取所有状态为启用的成本核定表模板数据

+ 16 - 21
src/views/costAudit/baseInfo/financeSheetManage/index.vue

@@ -604,28 +604,23 @@
       },
       // 获取监审类别名称
       batchGetCatalogNames() {
-        this.tableData.forEach((row) => {
-          const catalogIds = row.catalogId.split(',').map((id) => id.trim())
-          catalogIds.forEach((catalogId) => {
-            if (!catalogId) return
+        // 递归查找名称
+        this.CatalogNameMap = {}
+        this._recursiveCatalogMap(this.catalogListOptions)
+      },
 
-            getCatalogDetail(catalogId)
-              .then((res) => {
-                if (res && res.value && res.value.catalogName) {
-                  this.$set(
-                    this.CatalogNameMap,
-                    catalogId,
-                    res.value.catalogName
-                  )
-                } else {
-                  this.$set(this.CatalogNameMap, catalogId, '无名称')
-                }
-              })
-              .catch((err) => {
-                console.error('获取获取失败', catalogId, err)
-                this.$set(this.CatalogNameMap, catalogId, '获取失败')
-              })
-          })
+      // 递归遍历目录树并构建ID到名称的映射
+      _recursiveCatalogMap(catalogs) {
+        if (!Array.isArray(catalogs) || catalogs.length === 0) {
+          return
+        }
+        catalogs.forEach((item) => {
+          // 为当前目录项添加映射
+          this.CatalogNameMap[item.id] = item.catalogName
+          // 递归处理子目录
+          if (item.children && Array.isArray(item.children)) {
+            this._recursiveCatalogMap(item.children)
+          }
         })
       },
       // 批量删除

+ 0 - 2
src/views/costAudit/projectInfo/auditProjectManage/annualReviewPlan/CatalogCascader.vue

@@ -67,7 +67,6 @@
     mounted() {},
     methods: {
       handleValueChange(newVal) {
-        console.log('newVal', newVal)
         // 只有当目录数据加载完成后才处理回显
         if (this.catalogListOptions && this.catalogListOptions.length > 0) {
           const formattedData = this.formatRelatedItemsForDisplay({
@@ -78,7 +77,6 @@
               parentId: 'parentId',
             },
           })
-          console.log('formattedData', formattedData)
           this.catalogId = formattedData.catalogId || []
         }
       },

+ 0 - 7
src/views/costAudit/projectInfo/auditProjectManage/annualReviewPlan/index.vue

@@ -741,13 +741,6 @@
       // 处理监审目录选择后的回调
       handleCatalogChange(value) {
         this.currentProject.catalogId = value
-        // 监审形式赋值
-        // const selectedCatalog = this.catalogList.find(
-        //   (item) => item.id === value
-        // )
-        // if (selectedCatalog) {
-        //   this.currentProject.auditType = selectedCatalog.auditType
-        // }
       },
 
       // 处理新增

+ 1 - 1
src/views/costAudit/projectInfo/auditProjectManage/initiation/index.vue

@@ -293,7 +293,7 @@
         // 分页信息
         pagination: {
           currentPage: 1,
-          pageSize: 10,
+          pageSize: 50,
           total: 0,
         },
         // 加载状态