Просмотр исходного кода

fix:修改监审目录管理-信息维护-成本调查表取消关联接口

luzhixia 1 месяц назад
Родитель
Сommit
abfb39b11c
2 измененных файлов с 25 добавлено и 12 удалено
  1. 9 0
      src/api/catalogManage.js
  2. 16 12
      src/views/costAudit/baseInfo/catalogManage/index.vue

+ 9 - 0
src/api/catalogManage.js

@@ -240,6 +240,15 @@ export function listByCurrentTemplateId(params) {
     params,
   })
 }
+// 根据id集合批量删除 /api/costCatalogSurvey/v1/
+export function batchDeleteSurvey(params) {
+  return request({
+    url: url + '/api/costCatalogSurvey/v1/',
+    method: 'delete',
+    params,
+  })
+}
+
 export function cleanByIds(data) {
   return request({
     url: url + '/api/costCatalogSurvey/v1/cleanByIds',

+ 16 - 12
src/views/costAudit/baseInfo/catalogManage/index.vue

@@ -721,7 +721,7 @@
       <el-dialog
         :title="legalDialogTitle"
         :visible.sync="legalDialogVisible"
-        width="600px"
+        width="650px"
         :close-on-click-modal="false"
       >
         <el-form
@@ -911,7 +911,7 @@
     getCostSurveyForms,
     getallCurrentCostSurveyList,
     addCostSurvey,
-    cleanByIds,
+    batchDeleteSurvey,
     // 文件管理相关API
   } from '@/api/catalogManage'
   import { getInfoList } from '@/api/auditDocManage'
@@ -1182,9 +1182,12 @@
             width: 100,
             align: 'center',
             formatter: (row) => {
-              return this.surveyStatusOptions.find(
-                (item) => item.value === row.status
-              ).label
+              return (
+                row.status &&
+                this.surveyStatusOptions.find(
+                  (item) => item.value === row.status
+                ).label
+              )
             },
           },
           {
@@ -1200,7 +1203,7 @@
         selectCostSurveyRow: [],
         selectCostSurveyPagination: {
           currentPage: 1,
-          pageSize: 10,
+          pageSize: 50,
           total: 0,
         },
         // 内容编辑弹窗相关
@@ -1302,10 +1305,10 @@
                 : '动态表'
             },
           },
-          {
-            prop: 'storageTable',
-            label: '调查表数据存储表',
-          },
+          // {
+          //   prop: 'storageTable',
+          //   label: '调查表数据存储表',
+          // },
           {
             prop: 'status',
             label: '状态',
@@ -2163,6 +2166,7 @@
         this.costSurveyDialogVisible = true
       },
       handleDeleteCostSurvey() {
+        console.log(this.selectCostSurvey)
         if (this.selectCostSurvey.length === 0) {
           this.$message.warning('请先选择要删除的成本调查表')
           return
@@ -2177,8 +2181,8 @@
           }
         )
           .then(() => {
-            cleanByIds({
-              ids: this.selectCostSurvey.map((item) => item.surveyId),
+            batchDeleteSurvey({
+              ids: this.selectCostSurvey.map((item) => item.id).join(','),
             }).then((res) => {
               this.$message.success('删除成功')
               this.loadCostSurveyData()