Jelajahi Sumber

Revert " 风险管理评估时,评估风险项数据丢失"

This reverts commit 6e016d17e476b3c90d26d5ba73f30e5544301868.
shenQiLong 1 hari lalu
induk
melakukan
194cb15817
1 mengubah file dengan 1 tambahan dan 48 penghapusan
  1. 1 48
      src/views/platform/risk/riskDetail.vue

+ 1 - 48
src/views/platform/risk/riskDetail.vue

@@ -351,18 +351,6 @@
                 />
               </template>
             </el-table-column>
-            <el-table-column v-if="!readonly">
-              <template slot-scope="scope">
-                <el-button
-                  type="danger"
-                  size="mini"
-                  icon="ibps-icon-remove"
-                  @click="handleDelete(scope.$index, scope.row)"
-                >
-                  删除
-                </el-button>
-              </template>
-            </el-table-column>
           </el-table>
         </div>
 
@@ -500,9 +488,7 @@ export default {
       fengXianJiSuan: [],
       muban: '2',
       leixing: '安全',
-      riskResponse: ['风险降低', '风险接受', '风险回避'],
-      yiShanChuFengXianList: [],
-      yiShanChuFengXianId: []
+      riskResponse: ['风险降低', '风险接受', '风险回避']
     }
   },
   computed: {
@@ -570,7 +556,6 @@ export default {
         this.loading = true
         const order = data.replace(/,/g, "','")
         // const sql = `select * from t_fxkzb where find_in_set(id_ , '${data}') ORDER BY FIELD(id_, '${order}')`
-        const tableList = JSON.parse(JSON.stringify(this.tableList))
         this.$common
           .request('query', {
             key: 'getRiskLibraryData',
@@ -619,22 +604,6 @@ export default {
                 )
               }
             })
-            //处理在风险库被删除的风险项
-            const bIdSet = new Set(data1.map((item) => item.id_))
-            this.yiShanChuFengXianList =
-              this.Ids.filter((item) => !bIdSet.has(item)) || []
-            //处理在风险库被删除同时风险评估里点击了删除的风险项
-            const idsYiShanChu =
-              this.yiShanChuFengXianList.filter(
-                (item) =>
-                  !this.yiShanChuFengXianId.includes(item.shi_bie_xiang_)
-              ) || []
-            console.log(tableList, this.tableList, idsYiShanChu, data1)
-            const tableListYiShanChu =
-              tableList.filter((item) =>
-                idsYiShanChu.includes(item.shi_bie_xiang_)
-              ) || []
-            this.tableList = [...this.tableList, ...tableListYiShanChu]
             this.loading = false
           })
       }
@@ -888,7 +857,6 @@ export default {
     },
     close() {
       this.dialogVisible = false
-      this.isNotFengxianku = true
       this.$emit('close')
       setTimeout(() => {
         this.rowParams = {}
@@ -903,7 +871,6 @@ export default {
         this.rowParams = row
       }
       this.dialogVisible = true
-      this.yiShanChuFengXianId = []
       !this.readonly && this.refreshSortable()
     },
     // 计算风险指数
@@ -1276,20 +1243,6 @@ export default {
         this.$message.warning(error.message)
         throw new Error(error.message)
       }
-    },
-    handleDelete(index, row) {
-      const xuan_ze_feng_xian = JSON.parse(
-        JSON.stringify(this.form.xuan_ze_feng_xian)
-      )
-
-      this.form.xuan_ze_feng_xian = xuan_ze_feng_xian
-        ?.split(',')
-        .filter((item) => item !== row.shi_bie_xiang_)
-        .join(',')
-
-      this.tableList.splice(index, 1)
-      this.yiShanChuFengXianId.push(row.shi_bie_xiang_)
-      // console.log(this.yiShanChuFengXianId)
     }
   }
 }