xiaojincai 5 年 前
コミット
9bbce12ba1
1 ファイル変更23 行追加2 行削除
  1. 23 2
      src/views/task/DangerTask.vue

+ 23 - 2
src/views/task/DangerTask.vue

@@ -373,8 +373,9 @@ export default {
             }
         },
         edit(data){
-            // if(data.type != 'ent'){
+            if(data.type != 'ent'){
                 this.form.riskpoint_id=data.id;
+                this.form.enterprise_id=null;
                 this.getData()  
                 this.findRsk(data.id)            
                 //获取风险点详情
@@ -392,7 +393,27 @@ export default {
                         })
                         
                 })
-            // }
+            }else{
+                this.form.enterprise_id=data.id;
+                this.form.riskpoint_id=null;
+                this.getData()  
+                this.findRsk(data.id)            
+                //获取风险点详情
+                this.$api.getRiskpoint({id:data.id}).then(res=>{
+                        let _data=res.data.data;
+                        this.rsk={
+                                riskpoint_id:_data.id,
+                                riskpoint_name:_data.name,
+                                enterprise_name:_data.enterprise_name,
+                                enterprise_id:_data.enterprise_id,
+                        }
+                        //获取部门
+                        this.$api.getDepartmentList({enterprise_id:_data.enterprise_id}).then(res=>{
+                            this.departmentList=res.data.data.list;
+                        })
+                        
+                })
+            }
         },
         getData(){
             this.loading=true