Pārlūkot izejas kodu

Revert "核保因子条件配置"

This reverts commit 9fb5745a3e860e453f9356e8d3f1e72de677eb38.
lihongxiao 2 gadi atpakaļ
vecāks
revīzija
7355d9d539

+ 17 - 19
src/views/AgreementManage/CarInsurance/components/PremiumFactor.vue

@@ -299,7 +299,8 @@
           <el-checkbox
             :indeterminate="checkedmData[index].isIndeterminate"
             v-model="checkedmData[index].checkAll"
-            @change="(event) => handleCheckAllChange(event, index)">全选</el-checkbox
+            @change="handleCheckAllChange(index)"
+            >全选</el-checkbox
           >
         </div>
         <div
@@ -1049,7 +1050,6 @@ export default {
     //     concant:[]
     //   };
     // });
-    console.log(this.checkedmData,22222222222222)
       this.circularContent=JSON.parse(JSON.stringify(this.circularContentPro)) 
       if (type == "1") {
         this.dialogTitle = "条件配置";
@@ -1058,23 +1058,17 @@ export default {
       }
     },
     // 全选
-    handleCheckAllChange(event,index) {
-        let arr = [];
-        let arr1 = [];
-        this.conditiondata[index].concant.forEach((val) =>{
-          // this.checkedmData[index].concant.push(...val.cities)
-          arr1.push(... val.cities)
-          arr.push(... val.cities.map(ele=>ele.label))
-        });
-
-        this.checkedmData[index].checkedCities = this.checkedmData[index].checkAll
-          ? arr
-          : [];
-          this.checkedmData[index].concant = this.checkedmData[index].checkAll
-          ? arr1
-          : [];
-        this.checkedmData[index].isIndeterminate = false;
-        this.checkedmData = [...this.checkedmData];
+    handleCheckAllChange(index) {
+      let arr = [];
+      this.conditiondata[index].concant.forEach((val) =>{
+        this.checkedmData[index].concant.push(...val.cities)
+        arr.push(... val.cities.map(ele=>ele.label))
+      });
+      this.checkedmData[index].checkedCities = this.checkedmData[index].checkAll
+        ? arr
+        : [];
+      this.checkedmData[index].isIndeterminate = false;
+      this.checkedmData = [...this.checkedmData];
     },
     // 单选
     handleCheckedCitiesChange(value,cities, index, cindex) {
@@ -1093,12 +1087,15 @@ export default {
     },
     // 条件配置保存
     conditionSave() {
+    console.log(this.circularContent,this.circularContentPro,this.checkedmData,22222222222222)
+
       this.dialogVisible = false;
      let checkedmData=[]
      checkedmData.push(...this.circularContent.slice(0,2),...this.checkedmData)
      checkedmData.forEach((val,index)=>{
       val.title=this.circularContent[index].title
      })
+   
     if(checkedmData[4].concant.length>0){
       checkedmData[4].concant.forEach((ele1,index1)=>{
         if(ele1.name=='chezhu'){
@@ -1126,6 +1123,7 @@ export default {
         this.circularContent[index].concant=Array.from(new Set([...this.circularContent[index].concant,...ele.concant])) 
       }
      })
+
     },
 
     // 另存为模板