seimin před 3 roky
rodič
revize
badd904806

+ 6 - 2
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1518,7 +1518,8 @@ export class HushijiandanComponent implements OnInit {
1518 1518
   filterLinkCheckLis = []; //有预约时间并且选中的
1519 1519
   linkCheckLisChange(e) {
1520 1520
     let flag = false; //检查是否紧急
1521
-    this.linkCheckLis.forEach((item) => {
1521
+    let arr = []; //选中的索引
1522
+    this.linkCheckLis.forEach((item, index) => {
1522 1523
       if (e.length) {
1523 1524
         //有选中的检查
1524 1525
         e.forEach((v) => {
@@ -1528,13 +1529,16 @@ export class HushijiandanComponent implements OnInit {
1528 1529
           }
1529 1530
           //选中的检查设置checked
1530 1531
           if (v.value == item.value) {
1531
-            item.checked = true;
1532
+            arr.push(index);
1532 1533
           }
1533 1534
         });
1534 1535
       } else {
1535 1536
         item.checked = false;
1536 1537
       }
1537 1538
     });
1539
+    this.linkCheckLis.forEach((item, index) => {
1540
+      item.checked = arr.includes(index);
1541
+    });
1538 1542
     console.log(e, this.linkCheckLis);
1539 1543
     //检查有紧急度,则加急
1540 1544
     if (flag) {