How to use isEffect method in Playwright Internal

Best JavaScript code snippet using playwright-internal

index.js

Source:index.js Github

copy

Full Screen

1/* eslint-disable no-unused-expressions */2/* eslint-disable eqeqeq */3/* eslint-disable no-const-assign */4import React, { Fragment, useRef, useState, useEffect } from "react";5import { Row, Col, Form, Select, Input, Button, Table, Cascader, message, Tag, Tabs, Checkbox } from "antd";6import { Cascader as RCascader } from 'rsuite';7import "rsuite/dist/rsuite.min.css";8import AntdInputTag from "antd-input-tag";9import groupTags from '../../utils/tagData.js'10const { Option } = Select;11const TestForm = (props) => {12 const [channelName, setChannelName] = useState('抖音');13 const childRef = useRef();14 const [data, setData] = useState(["aa", "bb", "cc", "dd"]);15 const updateChildState = () => {16 // changeVal就是子组件暴露给父组件的方法17 setData(childRef.current.changeVal());18 };19 const columns = [20 {21 title: 'Name',22 dataIndex: 'name',23 key: 'name',24 },25 {26 title: 'Age',27 dataIndex: 'age',28 key: 'age',29 },30 ];31 const productTree = [32 {33 "id": 3,34 "parentId": null,35 "code": "000183",36 "name": "华海财险",37 "type": null,38 "isEffect": null,39 "children": [40 {41 "id": null,42 "parentId": 3,43 "code": "HHM01",44 "name": "福海e生百万医疗保险月缴版(HHM01)",45 "type": null,46 "isEffect": null,47 "children": null48 },49 {50 "id": null,51 "parentId": 3,52 "code": "HHY01",53 "name": "福海e生百万医疗保险年缴版(HHY01)",54 "type": null,55 "isEffect": null,56 "children": null57 },58 {59 "id": null,60 "parentId": 3,61 "code": "HHM02",62 "name": "福海e生百万医疗保险月缴均分版(HHM02)",63 "type": null,64 "isEffect": null,65 "children": null66 },67 {68 "id": null,69 "parentId": 3,70 "code": "HHM03",71 "name": "福海e生百万医疗保险月缴版测试新商户号(HHM03)",72 "type": null,73 "isEffect": null,74 "children": null75 }76 ]77 },78 {79 "id": 6,80 "parentId": null,81 "code": "000154",82 "name": "华泰",83 "type": null,84 "isEffect": null,85 "children": [86 {87 "id": null,88 "parentId": 6,89 "code": "HTM01",90 "name": "华泰安康百万医疗险月缴版(HTM01)",91 "type": null,92 "isEffect": null,93 "children": null94 },95 {96 "id": null,97 "parentId": 6,98 "code": "HTY01",99 "name": "华泰安康百万医疗险年缴版(HTY01)",100 "type": null,101 "isEffect": null,102 "children": null103 },104 {105 "id": null,106 "parentId": 6,107 "code": "HTSZ",108 "name": "华泰善诊(HTSZ)",109 "type": null,110 "isEffect": null,111 "children": null112 },113 {114 "id": null,115 "parentId": 6,116 "code": "HTHYWZ",117 "name": "300元咨询问诊服务(HTHYWZ)",118 "type": null,119 "isEffect": null,120 "children": null121 }122 ]123 },124 {125 "id": 7,126 "parentId": null,127 "code": "000111",128 "name": "现代财险",129 "type": null,130 "isEffect": null,131 "children": [132 {133 "id": null,134 "parentId": 7,135 "code": "XDCM01",136 "name": "橙易保百万医疗保险月缴版(XDCM01)",137 "type": null,138 "isEffect": null,139 "children": null140 },141 {142 "id": null,143 "parentId": 7,144 "code": "XDCY01",145 "name": "橙易保百万医疗保险年缴版(XDCY01)",146 "type": null,147 "isEffect": null,148 "children": null149 },150 {151 "id": null,152 "parentId": 7,153 "code": "XDZJM01",154 "name": "橙易保重大疾病险月缴版(XDZJM01)",155 "type": null,156 "isEffect": null,157 "children": null158 },159 {160 "id": null,161 "parentId": 7,162 "code": "XDZJY01",163 "name": "橙易保重大疾病险年缴版(XDZJY01)",164 "type": null,165 "isEffect": null,166 "children": null167 },168 {169 "id": null,170 "parentId": 7,171 "code": "XDCM02",172 "name": "橙易保百万医疗保险月缴版(XDCM02)",173 "type": null,174 "isEffect": null,175 "children": null176 },177 {178 "id": null,179 "parentId": 7,180 "code": "XDCY02",181 "name": "橙易保百万医疗保险年缴版(XDCY02)",182 "type": null,183 "isEffect": null,184 "children": null185 },186 {187 "id": null,188 "parentId": 7,189 "code": "XDHYWZ",190 "name": "300元咨询问诊服务(XDHYWZ)",191 "type": null,192 "isEffect": null,193 "children": null194 },195 {196 "id": null,197 "parentId": 7,198 "code": "XDCM03",199 "name": "橙易保百万医疗保险月缴版(XDCM03)",200 "type": null,201 "isEffect": null,202 "children": null203 },204 {205 "id": null,206 "parentId": 7,207 "code": "XDZJM02",208 "name": "橙易保重大疾病险月缴版(XDZJM02)",209 "type": null,210 "isEffect": null,211 "children": null212 },213 {214 "id": null,215 "parentId": 7,216 "code": "XDZJY02",217 "name": "橙易保重大疾病险年缴版(XDZJY02)",218 "type": null,219 "isEffect": null,220 "children": null221 },222 {223 "id": null,224 "parentId": 7,225 "code": "XDCM04",226 "name": "橙易保百万医疗保险月缴版(XDCM04)",227 "type": null,228 "isEffect": null,229 "children": null230 },231 {232 "id": null,233 "parentId": 7,234 "code": "XDCY03",235 "name": "橙易保百万医疗保险年缴版(XDCY03)",236 "type": null,237 "isEffect": null,238 "children": null239 },240 {241 "id": null,242 "parentId": 7,243 "code": "XDCXM01",244 "name": "橙易保百万医疗保险月缴版(XDCXM01)",245 "type": null,246 "isEffect": null,247 "children": null248 },249 {250 "id": null,251 "parentId": 7,252 "code": "XDCXY01",253 "name": "橙易保百万医疗保险年缴版(XDCXY01)",254 "type": null,255 "isEffect": null,256 "children": null257 },258 {259 "id": null,260 "parentId": 7,261 "code": "XDHYTJ",262 "name": "现代互医体检(XDHYTJ)",263 "type": null,264 "isEffect": null,265 "children": null266 }267 ]268 },269 {270 "id": 12,271 "parentId": null,272 "code": "KAISEN",273 "name": "凯森",274 "type": null,275 "isEffect": null,276 "children": [277 {278 "id": null,279 "parentId": 12,280 "code": "KSM01",281 "name": "众安百万医疗保险2020月缴版(KSM01)",282 "type": null,283 "isEffect": null,284 "children": null285 },286 {287 "id": null,288 "parentId": 12,289 "code": "KSY01",290 "name": "众安百万医疗保险2020年缴版(KSY01)",291 "type": null,292 "isEffect": null,293 "children": null294 },295 {296 "id": null,297 "parentId": 12,298 "code": "KSMWM",299 "name": "众安百万医疗保险2020月缴版(KSMWM)",300 "type": null,301 "isEffect": null,302 "children": null303 },304 {305 "id": null,306 "parentId": 12,307 "code": "KSMAXC",308 "name": "众安百万医疗保险2020月缴版(KSMAXC)",309 "type": null,310 "isEffect": null,311 "children": null312 },313 {314 "id": null,315 "parentId": 12,316 "code": "KSMAB",317 "name": "众安百万医疗保险2020月缴版(KSMAB)",318 "type": null,319 "isEffect": null,320 "children": null321 },322 {323 "id": null,324 "parentId": 12,325 "code": "KSYAXC",326 "name": "众安百万医疗保险2020年缴版(KSYAXC)",327 "type": null,328 "isEffect": null,329 "children": null330 },331 {332 "id": null,333 "parentId": 12,334 "code": "KSYWM",335 "name": "众安百万医疗保险2020年缴版(KSYWM)",336 "type": null,337 "isEffect": null,338 "children": null339 },340 {341 "id": null,342 "parentId": 12,343 "code": "KSYAB",344 "name": "众安百万医疗保险2020年缴版(KSYAB)",345 "type": null,346 "isEffect": null,347 "children": null348 },349 {350 "id": null,351 "parentId": 12,352 "code": "AR36",353 "name": "尊享e生综合意外(基础月缴版)(AR36)",354 "type": null,355 "isEffect": null,356 "children": null357 },358 {359 "id": null,360 "parentId": 12,361 "code": "AR35",362 "name": "尊享e生综合意外(基础年缴版)(AR35)",363 "type": null,364 "isEffect": null,365 "children": null366 },367 {368 "id": null,369 "parentId": 12,370 "code": "AT14$AXC",371 "name": "众安百万防癌医疗险2020月缴版(AT14$AXC)",372 "type": null,373 "isEffect": null,374 "children": null375 },376 {377 "id": null,378 "parentId": 12,379 "code": "AT13$AXC",380 "name": "众安百万防癌医疗险2020年缴版(AT13$AXC)",381 "type": null,382 "isEffect": null,383 "children": null384 },385 {386 "id": null,387 "parentId": 12,388 "code": "AR36$AXC",389 "name": "尊享e生综合意外(基础月缴版)(AR36$AXC)",390 "type": null,391 "isEffect": null,392 "children": null393 },394 {395 "id": null,396 "parentId": 12,397 "code": "AR35$AXC",398 "name": "尊享e生综合意外(基础年缴版)(AR35$AXC)",399 "type": null,400 "isEffect": null,401 "children": null402 },403 {404 "id": null,405 "parentId": 12,406 "code": "AT14$WM",407 "name": "众安百万防癌医疗险2020月缴版(AT14$WM)",408 "type": null,409 "isEffect": null,410 "children": null411 },412 {413 "id": null,414 "parentId": 12,415 "code": "AT13$WM",416 "name": "众安百万防癌医疗险2020年缴版(AT13$WM)",417 "type": null,418 "isEffect": null,419 "children": null420 },421 {422 "id": null,423 "parentId": 12,424 "code": "AR36$WM",425 "name": "尊享e生综合意外(基础月缴版)(AR36$WM)",426 "type": null,427 "isEffect": null,428 "children": null429 },430 {431 "id": null,432 "parentId": 12,433 "code": "AR35$WM",434 "name": "尊享e生综合意外(基础年缴版)(AR35$WM)",435 "type": null,436 "isEffect": null,437 "children": null438 },439 {440 "id": null,441 "parentId": 12,442 "code": "AT14$CL",443 "name": "众安百万防癌医疗险2020月缴版(AT14$CL)",444 "type": null,445 "isEffect": null,446 "children": null447 },448 {449 "id": null,450 "parentId": 12,451 "code": "AT13$CL",452 "name": "众安百万防癌医疗险2020年缴版(AT13$CL)",453 "type": null,454 "isEffect": null,455 "children": null456 },457 {458 "id": null,459 "parentId": 12,460 "code": "AR36$CL",461 "name": "尊享e生综合意外(基础月缴版)(AR36$CL)",462 "type": null,463 "isEffect": null,464 "children": null465 },466 {467 "id": null,468 "parentId": 12,469 "code": "AR35$CL",470 "name": "尊享e生综合意外(基础年缴版)(AR35$CL)",471 "type": null,472 "isEffect": null,473 "children": null474 },475 {476 "id": null,477 "parentId": 12,478 "code": "AT14$AB",479 "name": "众安百万防癌医疗险2020月缴版(AT14$AB)",480 "type": null,481 "isEffect": null,482 "children": null483 },484 {485 "id": null,486 "parentId": 12,487 "code": "AT13$AB",488 "name": "众安百万防癌医疗险2020年缴版(AT13$AB)",489 "type": null,490 "isEffect": null,491 "children": null492 },493 {494 "id": null,495 "parentId": 12,496 "code": "AR36$AB",497 "name": "尊享e生综合意外(基础月缴版)(AR36$AB)",498 "type": null,499 "isEffect": null,500 "children": null501 },502 {503 "id": null,504 "parentId": 12,505 "code": "AR35$AB",506 "name": "尊享e生综合意外(基础年缴版)(AR35$AB)",507 "type": null,508 "isEffect": null,509 "children": null510 },511 {512 "id": null,513 "parentId": 12,514 "code": "KSMCL",515 "name": "众安百万医疗保险2020月缴版(KSMCL)",516 "type": null,517 "isEffect": null,518 "children": null519 },520 {521 "id": null,522 "parentId": 12,523 "code": "KSYCL",524 "name": "众安百万医疗保险2020年缴版(KSYCL)",525 "type": null,526 "isEffect": null,527 "children": null528 },529 {530 "id": null,531 "parentId": 12,532 "code": "KSMDLL",533 "name": "众安百万医疗保险2020月缴版(KSMDLL)",534 "type": null,535 "isEffect": null,536 "children": null537 },538 {539 "id": null,540 "parentId": 12,541 "code": "KSYDLL",542 "name": "众安百万医疗保险2020年缴版(KSYDLL)",543 "type": null,544 "isEffect": null,545 "children": null546 },547 {548 "id": null,549 "parentId": 12,550 "code": "AP21$KS",551 "name": "“周周领”重大疾病(赠险)(AP21$KS)",552 "type": null,553 "isEffect": null,554 "children": null555 },556 {557 "id": null,558 "parentId": 12,559 "code": "AX68$KS",560 "name": "“周周领”重大疾病(赠险)(AX68$KS)",561 "type": null,562 "isEffect": null,563 "children": null564 }565 ]566 },567 {568 "id": 15,569 "parentId": null,570 "code": "000038",571 "name": "亚太财险",572 "type": null,573 "isEffect": null,574 "children": [575 {576 "id": null,577 "parentId": 15,578 "code": "YTCM01",579 "name": "亚太安康百万医疗保险月缴版(YTCM01)",580 "type": null,581 "isEffect": null,582 "children": null583 },584 {585 "id": null,586 "parentId": 15,587 "code": "YTCY01",588 "name": "亚太安康百万医疗保险年缴版(YTCY01)",589 "type": null,590 "isEffect": null,591 "children": null592 },593 {594 "id": null,595 "parentId": 15,596 "code": "YTSZ",597 "name": "亚太善诊(YTSZ)",598 "type": null,599 "isEffect": null,600 "children": null601 },602 {603 "id": null,604 "parentId": 15,605 "code": "YTHYWZ",606 "name": "300元咨询问诊服务(YTHYWZ)",607 "type": null,608 "isEffect": null,609 "children": null610 },611 {612 "id": null,613 "parentId": 15,614 "code": "YTCM02",615 "name": "亚太安康百万医疗保险月缴版(YTCM02)",616 "type": null,617 "isEffect": null,618 "children": null619 },620 {621 "id": null,622 "parentId": 15,623 "code": "YTCY02",624 "name": "亚太安康百万医疗保险年缴版(YTCY02)",625 "type": null,626 "isEffect": null,627 "children": null628 },629 {630 "id": null,631 "parentId": 15,632 "code": "YTHYTJ",633 "name": "亚太互医体检(YTHYTJ)",634 "type": null,635 "isEffect": null,636 "children": null637 }638 ]639 },640 {641 "id": 17,642 "parentId": null,643 "code": "000060",644 "name": "利宝保险",645 "type": null,646 "isEffect": null,647 "children": [648 {649 "id": null,650 "parentId": 17,651 "code": "LBM01",652 "name": "利宝百万医疗险月缴版(LBM01)",653 "type": null,654 "isEffect": null,655 "children": null656 },657 {658 "id": null,659 "parentId": 17,660 "code": "LBZ01",661 "name": "利宝重大疾病保险(赠险)(LBZ01)",662 "type": null,663 "isEffect": null,664 "children": null665 },666 {667 "id": null,668 "parentId": 17,669 "code": "LBY01",670 "name": "利宝百万医疗险年缴版(LBY01)",671 "type": null,672 "isEffect": null,673 "children": null674 },675 {676 "id": null,677 "parentId": 17,678 "code": "LBHYWZ",679 "name": "300元咨询问诊服务(LBHYWZ)",680 "type": null,681 "isEffect": null,682 "children": null683 }684 ]685 },686 {687 "id": 18,688 "parentId": null,689 "code": "000142",690 "name": "国任财险",691 "type": null,692 "isEffect": null,693 "children": [694 {695 "id": null,696 "parentId": 18,697 "code": "GRCM01",698 "name": "任小康百万医疗保险月缴版(GRCM01)",699 "type": null,700 "isEffect": null,701 "children": null702 },703 {704 "id": null,705 "parentId": 18,706 "code": "GRCY01",707 "name": "任小康百万医疗保险年缴版(GRCY01)",708 "type": null,709 "isEffect": null,710 "children": null711 },712 {713 "id": null,714 "parentId": 18,715 "code": "GRHYWZ",716 "name": "300元咨询问诊服务(GRHYWZ)",717 "type": null,718 "isEffect": null,719 "children": null720 }721 ]722 },723 {724 "id": 19,725 "parentId": null,726 "code": "HEINIU",727 "name": "黑牛",728 "type": null,729 "isEffect": null,730 "children": [731 {732 "id": null,733 "parentId": 19,734 "code": "PTC418",735 "name": "黑牛短险(PTC418)",736 "type": null,737 "isEffect": null,738 "children": null739 }740 ]741 },742 {743 "id": 25,744 "parentId": null,745 "code": "000010",746 "name": "大地财险",747 "type": null,748 "isEffect": null,749 "children": [750 {751 "id": null,752 "parentId": 25,753 "code": "WVB2150150",754 "name": "大地百万医疗保险月缴版(WVB2150150)",755 "type": null,756 "isEffect": null,757 "children": null758 },759 {760 "id": null,761 "parentId": 25,762 "code": "WVB2150151",763 "name": "大地百万医疗保险月缴版(WVB2150151)",764 "type": null,765 "isEffect": null,766 "children": null767 },768 {769 "id": null,770 "parentId": 25,771 "code": "WVB2150147",772 "name": "大地百万医疗保险年缴版(WVB2150147)",773 "type": null,774 "isEffect": null,775 "children": null776 },777 {778 "id": null,779 "parentId": 25,780 "code": "WVB2150148",781 "name": "大地百万医疗保险年缴版(WVB2150148)",782 "type": null,783 "isEffect": null,784 "children": null785 },786 {787 "id": null,788 "parentId": 25,789 "code": "DDSZ",790 "name": "大地善诊(DDSZ)",791 "type": null,792 "isEffect": null,793 "children": null794 },795 {796 "id": null,797 "parentId": 25,798 "code": "DDHYWZ",799 "name": "300元咨询问诊服务(DDHYWZ)",800 "type": null,801 "isEffect": null,802 "children": null803 },804 {805 "id": null,806 "parentId": 25,807 "code": "WVB2150183",808 "name": "大地百万医疗保险月缴版(WVB2150183)",809 "type": null,810 "isEffect": null,811 "children": null812 },813 {814 "id": null,815 "parentId": 25,816 "code": "WVB2150184",817 "name": "大地百万医疗保险月缴版(WVB2150184)",818 "type": null,819 "isEffect": null,820 "children": null821 },822 {823 "id": null,824 "parentId": 25,825 "code": "DDHYTJ",826 "name": "大地互医体检(DDHYTJ)",827 "type": null,828 "isEffect": null,829 "children": null830 }831 ]832 },833 {834 "id": 26,835 "parentId": null,836 "code": "000016",837 "name": "平安保险",838 "type": null,839 "isEffect": null,840 "children": [841 {842 "id": null,843 "parentId": 26,844 "code": "MP03021259",845 "name": "平安·E生平安·疾病守护金(专享版)(MP03021259)",846 "type": null,847 "isEffect": null,848 "children": null849 },850 {851 "id": null,852 "parentId": 26,853 "code": "MP03021718",854 "name": "平安个人交通工具意外险(赠险)(MP03021718)",855 "type": null,856 "isEffect": null,857 "children": null858 },859 {860 "id": null,861 "parentId": 26,862 "code": "MP03021724",863 "name": "平安E生平安·百万医疗险(月缴)(MP03021724)",864 "type": null,865 "isEffect": null,866 "children": null867 },868 {869 "id": null,870 "parentId": 26,871 "code": "MP03021725",872 "name": "平安E生平安·百万医疗险(年缴)(MP03021725)",873 "type": null,874 "isEffect": null,875 "children": null876 }877 ]878 },879 {880 "id": 27,881 "parentId": null,882 "code": "000040",883 "name": "东京海上",884 "type": null,885 "isEffect": null,886 "children": [887 {888 "id": null,889 "parentId": 27,890 "code": "DJHSYA",891 "name": "福如东海个人医疗入门款(DJHSYA)",892 "type": null,893 "isEffect": null,894 "children": null895 },896 {897 "id": null,898 "parentId": 27,899 "code": "DJHSYB",900 "name": "福如东海个人医疗经典款(DJHSYB)",901 "type": null,902 "isEffect": null,903 "children": null904 },905 {906 "id": null,907 "parentId": 27,908 "code": "DJHSYC",909 "name": "福如东海个人医疗旗舰款(DJHSYC)",910 "type": null,911 "isEffect": null,912 "children": null913 }914 ]915 },916 {917 "id": 1002,918 "parentId": null,919 "code": "000179",920 "name": "众安健康险",921 "type": null,922 "isEffect": null,923 "children": [924 {925 "id": null,926 "parentId": 1002,927 "code": "AN06$24890102",928 "name": "众安百万医疗保险2020年缴版(AN06$24890102)",929 "type": null,930 "isEffect": null,931 "children": null932 },933 {934 "id": null,935 "parentId": 1002,936 "code": "AN07$2102099445",937 "name": "众安百万医疗保险2020月缴版(AN07$2102099445)",938 "type": null,939 "isEffect": null,940 "children": null941 },942 {943 "id": null,944 "parentId": 1002,945 "code": "RONGANBAO",946 "name": "城市惠民保(RONGANBAO)",947 "type": null,948 "isEffect": null,949 "children": null950 },951 {952 "id": null,953 "parentId": 1002,954 "code": "FHB",955 "name": "福惠保(FHB)",956 "type": null,957 "isEffect": null,958 "children": null959 },960 {961 "id": null,962 "parentId": 1002,963 "code": "AP21",964 "name": "“周周领”重大疾病(赠险)(AP21)",965 "type": null,966 "isEffect": null,967 "children": null968 },969 {970 "id": null,971 "parentId": 1002,972 "code": "HSBZA",973 "name": "惠宿保(HSBZA)",974 "type": null,975 "isEffect": null,976 "children": null977 },978 {979 "id": null,980 "parentId": 1002,981 "code": "AS71",982 "name": "100万出行意外险-福利版(AS71)",983 "type": null,984 "isEffect": null,985 "children": null986 },987 {988 "id": null,989 "parentId": 1002,990 "code": "AT14",991 "name": "众安百万防癌医疗险2020月缴版(AT14)",992 "type": null,993 "isEffect": null,994 "children": null995 },996 {997 "id": null,998 "parentId": 1002,999 "code": "AT13",1000 "name": "众安百万防癌医疗险2020年缴版(AT13)",1001 "type": null,1002 "isEffect": null,1003 "children": null1004 },1005 {1006 "id": null,1007 "parentId": 1002,1008 "code": "AV74",1009 "name": "百万航空意外(赠险)(AV74)",1010 "type": null,1011 "isEffect": null,1012 "children": null1013 },1014 {1015 "id": null,1016 "parentId": 1002,1017 "code": "AT34",1018 "name": "众安10万抗疫保障金(AT34)",1019 "type": null,1020 "isEffect": null,1021 "children": null1022 },1023 {1024 "id": null,1025 "parentId": 1002,1026 "code": "AP21$RP",1027 "name": "“周周领”重大疾病(赠险)(AP21$RP)",1028 "type": null,1029 "isEffect": null,1030 "children": null1031 },1032 {1033 "id": null,1034 "parentId": 1002,1035 "code": "AS71$RP",1036 "name": "100万出行意外险-福利版(AS71$RP)",1037 "type": null,1038 "isEffect": null,1039 "children": null1040 },1041 {1042 "id": null,1043 "parentId": 1002,1044 "code": "AT34$RP",1045 "name": "众安10万抗疫保障金(AT34$RP)",1046 "type": null,1047 "isEffect": null,1048 "children": null1049 },1050 {1051 "id": null,1052 "parentId": 1002,1053 "code": "AV27",1054 "name": "尊享e生2021版月缴版A(AV27)",1055 "type": null,1056 "isEffect": null,1057 "children": null1058 },1059 {1060 "id": null,1061 "parentId": 1002,1062 "code": "AV25",1063 "name": "尊享e生2021版年缴版A(AV25)",1064 "type": null,1065 "isEffect": null,1066 "children": null1067 },1068 {1069 "id": null,1070 "parentId": 1002,1071 "code": "AV28",1072 "name": "尊享e生2021版月缴版B(AV28)",1073 "type": null,1074 "isEffect": null,1075 "children": null1076 },1077 {1078 "id": null,1079 "parentId": 1002,1080 "code": "AV26",1081 "name": "尊享e生2021版年缴版B(AV26)",1082 "type": null,1083 "isEffect": null,1084 "children": null1085 },1086 {1087 "id": null,1088 "parentId": 1002,1089 "code": "AV27$RP",1090 "name": "尊享e生2021版月缴版A(AV27$RP)",1091 "type": null,1092 "isEffect": null,1093 "children": null1094 },1095 {1096 "id": null,1097 "parentId": 1002,1098 "code": "AV25$RP",1099 "name": "尊享e生2021版年缴版A(AV25$RP)",1100 "type": null,1101 "isEffect": null,1102 "children": null1103 },1104 {1105 "id": null,1106 "parentId": 1002,1107 "code": "AV28$RP",1108 "name": "尊享e生2021版月缴版B(AV28$RP)",1109 "type": null,1110 "isEffect": null,1111 "children": null1112 },1113 {1114 "id": null,1115 "parentId": 1002,1116 "code": "AV26$RP",1117 "name": "尊享e生2021版年缴版B(AV26$RP)",1118 "type": null,1119 "isEffect": null,1120 "children": null1121 },1122 {1123 "id": null,1124 "parentId": 1002,1125 "code": "AX68",1126 "name": "“周周领”重大疾病(赠险)(AX68)",1127 "type": null,1128 "isEffect": null,1129 "children": null1130 },1131 {1132 "id": null,1133 "parentId": 1002,1134 "code": "AX68$RP",1135 "name": "“周周领”重大疾病(赠险)(AX68$RP)",1136 "type": null,1137 "isEffect": null,1138 "children": null1139 },1140 {1141 "id": null,1142 "parentId": 1002,1143 "code": "AW80",1144 "name": "众安百万医疗保险福利版A(AW80)",1145 "type": null,1146 "isEffect": null,1147 "children": null1148 },1149 {1150 "id": null,1151 "parentId": 1002,1152 "code": "AV48",1153 "name": "众安百万医疗保险2021月缴版(AV48)",1154 "type": null,1155 "isEffect": null,1156 "children": null1157 },1158 {1159 "id": null,1160 "parentId": 1002,1161 "code": "AV44",1162 "name": "众安百万医疗保险2021年缴版(AV44)",1163 "type": null,1164 "isEffect": null,1165 "children": null1166 },1167 {1168 "id": null,1169 "parentId": 1002,1170 "code": "AV49",1171 "name": "众安百万医疗保险2021(月缴版D)(AV49)",1172 "type": null,1173 "isEffect": null,1174 "children": null1175 },1176 {1177 "id": null,1178 "parentId": 1002,1179 "code": "AV45",1180 "name": "众安百万医疗保险2021(年缴版B)(AV45)",1181 "type": null,1182 "isEffect": null,1183 "children": null1184 },1185 {1186 "id": null,1187 "parentId": 1002,1188 "code": "AX68$WZ",1189 "name": "“周周领”重大疾病(赠险)(AX68$WZ)",1190 "type": null,1191 "isEffect": null,1192 "children": null1193 },1194 {1195 "id": null,1196 "parentId": 1002,1197 "code": "ZAHYWZ",1198 "name": "300元咨询问诊服务(ZAHYWZ)",1199 "type": null,1200 "isEffect": null,1201 "children": null1202 },1203 {1204 "id": null,1205 "parentId": 1002,1206 "code": "AV29",1207 "name": "尊享e生2021版月缴版C(AV29)",1208 "type": null,1209 "isEffect": null,1210 "children": null1211 },1212 {1213 "id": null,1214 "parentId": 1002,1215 "code": "AV30",1216 "name": "尊享e生2021版月缴版D(AV30)",1217 "type": null,1218 "isEffect": null,1219 "children": null1220 },1221 {1222 "id": null,1223 "parentId": 1002,1224 "code": "CO29",1225 "name": "众安门诊保(普惠月缴版)(CO29)",1226 "type": null,1227 "isEffect": null,1228 "children": null1229 },1230 {1231 "id": null,1232 "parentId": 1002,1233 "code": "CO28",1234 "name": "众安门诊保(普惠年缴版)(CO28)",1235 "type": null,1236 "isEffect": null,1237 "children": null1238 },1239 {1240 "id": null,1241 "parentId": 1002,1242 "code": "CO86",1243 "name": "众安门诊保(免费版)(CO86)",1244 "type": null,1245 "isEffect": null,1246 "children": null1247 },1248 {1249 "id": null,1250 "parentId": 1002,1251 "code": "CH71",1252 "name": "众安百万防癌医疗险2021(升级版)分期版A(CH71)",1253 "type": null,1254 "isEffect": null,1255 "children": null1256 },1257 {1258 "id": null,1259 "parentId": 1002,1260 "code": "CH69",1261 "name": "众安百万防癌医疗险2021(升级版)年缴版A(CH69)",1262 "type": null,1263 "isEffect": null,1264 "children": null1265 },1266 {1267 "id": null,1268 "parentId": 1002,1269 "code": "CM25",1270 "name": "尊享e生2021普惠版A(CM25)",1271 "type": null,1272 "isEffect": null,1273 "children": null1274 },1275 {1276 "id": null,1277 "parentId": 1002,1278 "code": "CM26",1279 "name": "尊享e生2021普惠版B(CM26)",1280 "type": null,1281 "isEffect": null,1282 "children": null1283 },1284 {1285 "id": null,1286 "parentId": 1002,1287 "code": "AV29$ZB",1288 "name": "尊享e生2021版月缴版C(AV29$ZB)",1289 "type": null,1290 "isEffect": null,1291 "children": null1292 },1293 {1294 "id": null,1295 "parentId": 1002,1296 "code": "AV30$ZB",1297 "name": "尊享e生2021版月缴版D(AV30$ZB)",1298 "type": null,1299 "isEffect": null,1300 "children": null1301 },1302 {1303 "id": null,1304 "parentId": 1002,1305 "code": "AV25$ZB",1306 "name": "尊享e生2021版年缴版A(AV25$ZB)",1307 "type": null,1308 "isEffect": null,1309 "children": null1310 },1311 {1312 "id": null,1313 "parentId": 1002,1314 "code": "AV26$ZB",1315 "name": "尊享e生2021版年缴版B(AV26$ZB)",1316 "type": null,1317 "isEffect": null,1318 "children": null1319 },1320 {1321 "id": null,1322 "parentId": 1002,1323 "code": "CN74",1324 "name": "众安门急诊医疗险年缴版(CN74)",1325 "type": null,1326 "isEffect": null,1327 "children": null1328 },1329 {1330 "id": null,1331 "parentId": 1002,1332 "code": "CN75",1333 "name": "众安门急诊医疗险月缴版(CN75)",1334 "type": null,1335 "isEffect": null,1336 "children": null1337 },1338 {1339 "id": null,1340 "parentId": 1002,1341 "code": "CO86$RP",1342 "name": "众安门诊保(免费版)(CO86$RP)",1343 "type": null,1344 "isEffect": null,1345 "children": null1346 },1347 {1348 "id": null,1349 "parentId": 1002,1350 "code": "ZAHYTJ",1351 "name": "众安互医体检(ZAHYTJ)",1352 "type": null,1353 "isEffect": null,1354 "children": null1355 }1356 ]1357 },1358 {1359 "id": 5001,1360 "parentId": null,1361 "code": "000189",1362 "name": "渤海财险",1363 "type": null,1364 "isEffect": null,1365 "children": [1366 {1367 "id": null,1368 "parentId": 5001,1369 "code": "BH01",1370 "name": "渤海财险百万医疗产品(BH01)",1371 "type": null,1372 "isEffect": null,1373 "children": null1374 }1375 ]1376 },1377 {1378 "id": 6002,1379 "parentId": null,1380 "code": "000002",1381 "name": "人保",1382 "type": null,1383 "isEffect": null,1384 "children": [1385 {1386 "id": null,1387 "parentId": 6002,1388 "code": "FHBPICC",1389 "name": "福惠保(FHBPICC)",1390 "type": null,1391 "isEffect": null,1392 "children": null1393 },1394 {1395 "id": null,1396 "parentId": 6002,1397 "code": "XHBPICC",1398 "name": "襄惠保(XHBPICC)",1399 "type": null,1400 "isEffect": null,1401 "children": null1402 },1403 {1404 "id": null,1405 "parentId": 6002,1406 "code": "PICCJNM01",1407 "name": "相伴无忧百万医疗保险月缴版(PICCJNM01)",1408 "type": null,1409 "isEffect": null,1410 "children": null1411 },1412 {1413 "id": null,1414 "parentId": 6002,1415 "code": "PICCJNY01",1416 "name": "相伴无忧百万医疗保险年缴版(PICCJNY01)",1417 "type": null,1418 "isEffect": null,1419 "children": null1420 }1421 ]1422 },1423 {1424 "id": 6003,1425 "parentId": null,1426 "code": "000022",1427 "name": "天安财险",1428 "type": null,1429 "isEffect": null,1430 "children": [1431 {1432 "id": null,1433 "parentId": 6003,1434 "code": "TA01",1435 "name": "天安添福e保 百万医疗保险月缴版(TA01)",1436 "type": null,1437 "isEffect": null,1438 "children": null1439 },1440 {1441 "id": null,1442 "parentId": 6003,1443 "code": "TA02",1444 "name": "天安添福e保 百万医疗保险年缴版(TA02)",1445 "type": null,1446 "isEffect": null,1447 "children": null1448 }1449 ]1450 },1451 {1452 "id": 6004,1453 "parentId": null,1454 "code": "000208",1455 "name": "前海财险",1456 "type": null,1457 "isEffect": null,1458 "children": [1459 {1460 "id": null,1461 "parentId": 6004,1462 "code": "QHM01",1463 "name": "前多福e生保月缴版(QHM01)",1464 "type": null,1465 "isEffect": null,1466 "children": null1467 },1468 {1469 "id": null,1470 "parentId": 6004,1471 "code": "QHY01",1472 "name": "前多福e生保年缴版(QHY01)",1473 "type": null,1474 "isEffect": null,1475 "children": null1476 },1477 {1478 "id": null,1479 "parentId": 6004,1480 "code": "QHM02",1481 "name": "前多福e生保月缴版(QHM02)",1482 "type": null,1483 "isEffect": null,1484 "children": null1485 },1486 {1487 "id": null,1488 "parentId": 6004,1489 "code": "QHY02",1490 "name": "前多福e生保年缴版(QHY02)",1491 "type": null,1492 "isEffect": null,1493 "children": null1494 }1495 ]1496 }1497 ];1498 const scasData = [1499 {1500 "id": 1,1501 "parentId": 461,1502 "code": "short",1503 "name": "短险项目",1504 "type": "leads_business_type",1505 "isEffect": "true",1506 "isPartChoose": null,1507 "children": [1508 {1509 "id": 5,1510 "parentId": 1,1511 "code": "short_kaisen_telemarketing",1512 "name": "电销业务",1513 "type": "leads_reach_type",1514 "isEffect": "true",1515 "isPartChoose": null,1516 "children": [1517 {1518 "id": 12,1519 "parentId": 5,1520 "code": "AXCRGSMARTCALL",1521 "name": "爱心筹智能外呼转人工外呼(AXCRGSMARTCALL)",1522 "type": "leads_business_scene",1523 "isEffect": "true",1524 "isPartChoose": null,1525 "children": []1526 },1527 {1528 "id": 13,1529 "parentId": 5,1530 "code": "GIFT2SHORT",1531 "name": "暖哇赠转短人工外呼(GIFT2SHORT)",1532 "type": "leads_business_scene",1533 "isEffect": "true",1534 "isPartChoose": null,1535 "children": []1536 },1537 {1538 "id": 14,1539 "parentId": 5,1540 "code": "INSTALLMENT",1541 "name": "暖哇续期人工外呼(INSTALLMENT)",1542 "type": "leads_business_scene",1543 "isEffect": "true",1544 "isPartChoose": null,1545 "children": []1546 },1547 {1548 "id": 15,1549 "parentId": 5,1550 "code": "LBCL2SHORT",1551 "name": "利宝存量人工外呼(LBCL2SHORT)",1552 "type": "leads_business_scene",1553 "isEffect": "true",1554 "isPartChoose": null,1555 "children": []1556 },1557 {1558 "id": 17,1559 "parentId": 5,1560 "code": "UNPAIDZACPA",1561 "name": "健康未支付(UNPAIDZACPA)",1562 "type": "leads_business_scene",1563 "isEffect": "false",1564 "isPartChoose": null,1565 "children": []1566 },1567 {1568 "id": 18,1569 "parentId": 5,1570 "code": "ZAGIFT2SHORT",1571 "name": "健康赠转短(ZAGIFT2SHORT)",1572 "type": "leads_business_scene",1573 "isEffect": "false",1574 "isPartChoose": null,1575 "children": []1576 },1577 {1578 "id": 19,1579 "parentId": 5,1580 "code": "ZAINSTALLMENT",1581 "name": "健康续期(ZAINSTALLMENT)",1582 "type": "leads_business_scene",1583 "isEffect": "true",1584 "isPartChoose": null,1585 "children": []1586 },1587 {1588 "id": 50,1589 "parentId": 5,1590 "code": "SHORT2LONG",1591 "name": "短转长(SHORT2LONG)",1592 "type": "leads_business_scene",1593 "isEffect": "true",1594 "isPartChoose": null,1595 "children": []1596 },1597 {1598 "id": 230,1599 "parentId": 5,1600 "code": "STCAPTCH",1601 "name": "爱帮短险留资(STCAPTCH)",1602 "type": "leads_business_scene",1603 "isEffect": "true",1604 "isPartChoose": null,1605 "children": []1606 },1607 {1608 "id": 231,1609 "parentId": 5,1610 "code": "STBROWSE",1611 "name": "短险浏览(STBROWSE)",1612 "type": "leads_business_scene",1613 "isEffect": "true",1614 "isPartChoose": null,1615 "children": []1616 },1617 {1618 "id": 232,1619 "parentId": 5,1620 "code": "FICAPTCH",1621 "name": "爱帮赠险留资(FICAPTCH)",1622 "type": "leads_business_scene",1623 "isEffect": "true",1624 "isPartChoose": null,1625 "children": []1626 },1627 {1628 "id": 233,1629 "parentId": 5,1630 "code": "LBGIFT2SHORT",1631 "name": "利宝赠转短(LBGIFT2SHORT)",1632 "type": "leads_business_scene",1633 "isEffect": "true",1634 "isPartChoose": null,1635 "children": []1636 },1637 {1638 "id": 305,1639 "parentId": 5,1640 "code": "INSTALLMENTM2",1641 "name": "暖哇M2分期人工外呼(INSTALLMENTM2)",1642 "type": "leads_business_scene",1643 "isEffect": "true",1644 "isPartChoose": null,1645 "children": []1646 },1647 {1648 "id": 306,1649 "parentId": 5,1650 "code": "INSTALLMENTM2AI",1651 "name": "暖哇M2分期智能外呼(INSTALLMENTM2AI)",1652 "type": "leads_business_scene",1653 "isEffect": "true",1654 "isPartChoose": null,1655 "children": []1656 },1657 {1658 "id": 312,1659 "parentId": 5,1660 "code": "LBSTCAPTCH",1661 "name": "爱帮短险留资(LBSTCAPTCH)",1662 "type": "leads_business_scene",1663 "isEffect": "true",1664 "isPartChoose": null,1665 "children": []1666 },1667 {1668 "id": 313,1669 "parentId": 5,1670 "code": "LBSTBROWSE",1671 "name": "短险浏览(LBSTBROWSE)",1672 "type": "leads_business_scene",1673 "isEffect": "true",1674 "isPartChoose": null,1675 "children": []1676 },1677 {1678 "id": 314,1679 "parentId": 5,1680 "code": "LBFICAPTCH",1681 "name": "爱帮赠险留资(LBFICAPTCH)",1682 "type": "leads_business_scene",1683 "isEffect": "true",1684 "isPartChoose": null,1685 "children": []1686 },1687 {1688 "id": 325,1689 "parentId": 5,1690 "code": "INSTLLMENTM2",1691 "name": "续期M2人工外呼(INSTLLMENTM2)",1692 "type": "leads_business_scene",1693 "isEffect": "true",1694 "isPartChoose": null,1695 "children": []1696 },1697 {1698 "id": 326,1699 "parentId": 5,1700 "code": "INSTLLMENTM2AI",1701 "name": "续期M2智能外呼(INSTLLMENTM2AI)",1702 "type": "leads_business_scene",1703 "isEffect": "true",1704 "isPartChoose": null,1705 "children": []1706 },1707 {1708 "id": 327,1709 "parentId": 5,1710 "code": "YTCL2SHORT",1711 "name": "亚太存量人工外呼(YTCL2SHORT)",1712 "type": "leads_business_scene",1713 "isEffect": "true",1714 "isPartChoose": null,1715 "children": []1716 },1717 {1718 "id": 340,1719 "parentId": 5,1720 "code": "ABCL2SHORT",1721 "name": "付费险脱保(ABCL2SHORT)",1722 "type": "leads_business_scene",1723 "isEffect": "true",1724 "isPartChoose": null,1725 "children": []1726 },1727 {1728 "id": 342,1729 "parentId": 5,1730 "code": "DDCL2SHORT",1731 "name": "大地人工外呼转化(DDCL2SHORT)",1732 "type": "leads_business_scene",1733 "isEffect": "true",1734 "isPartChoose": null,1735 "children": []1736 },1737 {1738 "id": 347,1739 "parentId": 5,1740 "code": "CONSULT",1741 "name": "爱邦咨询(CONSULT)",1742 "type": "leads_business_scene",1743 "isEffect": "true",1744 "isPartChoose": null,1745 "children": []1746 },1747 {1748 "id": 454,1749 "parentId": 5,1750 "code": "ZASERVUNPAID",1751 "name": "众安服销未支付(ZASERVUNPAID)",1752 "type": "leads_business_scene",1753 "isEffect": "true",1754 "isPartChoose": null,1755 "children": []1756 },1757 {1758 "id": 458,1759 "parentId": 5,1760 "code": "ZAHEALTHLIVE",1761 "name": "众安健康直播留咨(ZAHEALTHLIVE)",1762 "type": "leads_business_scene",1763 "isEffect": "true",1764 "isPartChoose": null,1765 "children": []1766 },1767 {1768 "id": 460,1769 "parentId": 5,1770 "code": "ZASERVADD",1771 "name": "众安服销加保(ZASERVADD)",1772 "type": "leads_business_scene",1773 "isEffect": "true",1774 "isPartChoose": null,1775 "children": []1776 },1777 {1778 "id": 481,1779 "parentId": 5,1780 "code": "ZASERVINSTALLMENTM2",1781 "name": "众安服销续期到期前跟进M2(ZASERVINSTALLMENTM2)",1782 "type": "leads_business_scene",1783 "isEffect": "true",1784 "isPartChoose": null,1785 "children": []1786 },1787 {1788 "id": 482,1789 "parentId": 5,1790 "code": "ZASERVINSTALLMENTM3",1791 "name": "众安服销续期到期前跟进M3(ZASERVINSTALLMENTM3)",1792 "type": "leads_business_scene",1793 "isEffect": "true",1794 "isPartChoose": null,1795 "children": []1796 },1797 {1798 "id": 483,1799 "parentId": 5,1800 "code": "ZASERVINSTALLMENTM4",1801 "name": "众安服销续期到期前跟进M4(ZASERVINSTALLMENTM4)",1802 "type": "leads_business_scene",1803 "isEffect": "true",1804 "isPartChoose": null,1805 "children": []1806 },1807 {1808 "id": 484,1809 "parentId": 5,1810 "code": "ZASERVINSTALLMENTM5",1811 "name": "众安服销续期到期前跟进M5(ZASERVINSTALLMENTM5)",1812 "type": "leads_business_scene",1813 "isEffect": "true",1814 "isPartChoose": null,1815 "children": []1816 },1817 {1818 "id": 485,1819 "parentId": 5,1820 "code": "ZASERVINSTALLMENTM6",1821 "name": "众安服销续期到期前跟进M6(ZASERVINSTALLMENTM6)",1822 "type": "leads_business_scene",1823 "isEffect": "true",1824 "isPartChoose": null,1825 "children": []1826 },1827 {1828 "id": 486,1829 "parentId": 5,1830 "code": "ZASERVINSTALLMENTM7",1831 "name": "众安服销续期到期前跟进M7(ZASERVINSTALLMENTM7)",1832 "type": "leads_business_scene",1833 "isEffect": "true",1834 "isPartChoose": null,1835 "children": []1836 },1837 {1838 "id": 487,1839 "parentId": 5,1840 "code": "ZASERVINSTALLMENTM8",1841 "name": "众安服销续期到期前跟进M8(ZASERVINSTALLMENTM8)",1842 "type": "leads_business_scene",1843 "isEffect": "true",1844 "isPartChoose": null,1845 "children": []1846 },1847 {1848 "id": 488,1849 "parentId": 5,1850 "code": "ZASERVINSTALLMENTM9",1851 "name": "众安服销续期到期前跟进M9(ZASERVINSTALLMENTM9)",1852 "type": "leads_business_scene",1853 "isEffect": "true",1854 "isPartChoose": null,1855 "children": []1856 },1857 {1858 "id": 489,1859 "parentId": 5,1860 "code": "ZASERVINSTALLMENTM10",1861 "name": "众安服销续期到期前跟进M10(ZASERVINSTALLMENTM10)",1862 "type": "leads_business_scene",1863 "isEffect": "true",1864 "isPartChoose": null,1865 "children": []1866 },1867 {1868 "id": 490,1869 "parentId": 5,1870 "code": "ZASERVINSTALLMENTM11",1871 "name": "众安服销续期到期前跟进M11(ZASERVINSTALLMENTM11)",1872 "type": "leads_business_scene",1873 "isEffect": "true",1874 "isPartChoose": null,1875 "children": []1876 },1877 {1878 "id": 491,1879 "parentId": 5,1880 "code": "ZASERVINSTALLMENTM12",1881 "name": "众安服销续期到期前跟进M12(ZASERVINSTALLMENTM12)",1882 "type": "leads_business_scene",1883 "isEffect": "true",1884 "isPartChoose": null,1885 "children": []1886 },1887 {1888 "id": 4601,1889 "parentId": 5,1890 "code": "ZASERVINSTALLMENTM2",1891 "name": "众安服销续期2期(ZASERVINSTALLMENTM2)",1892 "type": "leads_business_scene",1893 "isEffect": "true",1894 "isPartChoose": null,1895 "children": []1896 },1897 {1898 "id": 4602,1899 "parentId": 5,1900 "code": "ZASERVINSTALLMENTM3",1901 "name": "众安服销续期3期(ZASERVINSTALLMENTM3)",1902 "type": "leads_business_scene",1903 "isEffect": "true",1904 "isPartChoose": null,1905 "children": []1906 },1907 {1908 "id": 15009,1909 "parentId": 5,1910 "code": "dddd",1911 "name": "开发4(dddd)",1912 "type": "leads_business_scene",1913 "isEffect": "true",1914 "isPartChoose": null,1915 "children": [1916 {1917 "id": 16,1918 "parentId": 15009,1919 "code": "UNPAID1",1920 "name": "暖哇未支付",1921 "type": "leads_business_type",1922 "isEffect": "true",1923 "isPartChoose": null,1924 "children": []1925 },1926 {1927 "id": 11001,1928 "parentId": 15009,1929 "code": "ces",1930 "name": "测试1",1931 "type": "dddd",1932 "isEffect": "true",1933 "isPartChoose": null,1934 "children": [1935 {1936 "id": 6002,1937 "parentId": 11001,1938 "code": "eeeddddddddddd",1939 "name": "开发1",1940 "type": "ces",1941 "isEffect": "true",1942 "isPartChoose": null,1943 "children": [1944 {1945 "id": 14001,1946 "parentId": 6002,1947 "code": "dededede",1948 "name": "开发1fffrfr",1949 "type": "eeeddddddddddd",1950 "isEffect": "true",1951 "isPartChoose": null,1952 "children": [1953 {1954 "id": 14004,1955 "parentId": 14001,1956 "code": "hyhyhyhy",1957 "name": "开发1hyhy",1958 "type": "no1",1959 "isEffect": "true",1960 "isPartChoose": null,1961 "children": []1962 },1963 {1964 "id": 20022,1965 "parentId": 14001,1966 "code": "gold_right_hand",1967 "name": "黄金右手",1968 "type": "no1",1969 "isEffect": "true",1970 "isPartChoose": null,1971 "children": []1972 }1973 ]1974 }1975 ]1976 },1977 {1978 "id": 13002,1979 "parentId": 11001,1980 "code": "gggrg",1981 "name": "开发1ggg",1982 "type": "ces",1983 "isEffect": "true",1984 "isPartChoose": null,1985 "children": [1986 {1987 "id": 14005,1988 "parentId": 13002,1989 "code": "ooooo",1990 "name": "开发1o",1991 "type": "ces",1992 "isEffect": "true",1993 "isPartChoose": null,1994 "children": []1995 }1996 ]1997 },1998 {1999 "id": 14006,2000 "parentId": 11001,2001 "code": "gtgtgtgt",2002 "name": "开发1gtgtg",2003 "type": "ces",2004 "isEffect": "true",2005 "isPartChoose": null,2006 "children": []2007 },2008 {2009 "id": 14007,2010 "parentId": 11001,2011 "code": "ttttttttttttttttt",2012 "name": "开发1111ttttttttttt",2013 "type": "ces",2014 "isEffect": "true",2015 "isPartChoose": null,2016 "children": [2017 {2018 "id": 15001,2019 "parentId": 14007,2020 "code": "trtrtr",2021 "name": "trtrtr",2022 "type": "rr",2023 "isEffect": "true",2024 "isPartChoose": null,2025 "children": []2026 },2027 {2028 "id": 15008,2029 "parentId": 14007,2030 "code": "ffff",2031 "name": "开发3344",2032 "type": "rr",2033 "isEffect": "true",2034 "isPartChoose": null,2035 "children": []2036 },2037 {2038 "id": 16001,2039 "parentId": 14007,2040 "code": "rrrrrrrrrrrrrrrrr",2041 "name": "rrrrr",2042 "type": "rr",2043 "isEffect": "true",2044 "isPartChoose": null,2045 "children": []2046 }2047 ]2048 },2049 {2050 "id": 15004,2051 "parentId": 11001,2052 "code": "ceshi",2053 "name": "测试一",2054 "type": "ces",2055 "isEffect": "true",2056 "isPartChoose": null,2057 "children": []2058 },2059 {2060 "id": 15005,2061 "parentId": 11001,2062 "code": "测试",2063 "name": "测试呦",2064 "type": "ces",2065 "isEffect": "true",2066 "isPartChoose": null,2067 "children": []2068 },2069 {2070 "id": 15006,2071 "parentId": 11001,2072 "code": "ceshiya",2073 "name": "测试呀",2074 "type": "ces",2075 "isEffect": "true",2076 "isPartChoose": null,2077 "children": []2078 },2079 {2080 "id": 15007,2081 "parentId": 11001,2082 "code": "hh",2083 "name": "测试一样",2084 "type": "ces",2085 "isEffect": "true",2086 "isPartChoose": null,2087 "children": []2088 },2089 {2090 "id": 15010,2091 "parentId": 11001,2092 "code": "type1",2093 "name": "测试了",2094 "type": "ces",2095 "isEffect": "true",2096 "isPartChoose": null,2097 "children": [2098 {2099 "id": 16005,2100 "parentId": 15010,2101 "code": "ttytyyt",2102 "name": "开发1",2103 "type": "ghhj",2104 "isEffect": "true",2105 "isPartChoose": null,2106 "children": [2107 {2108 "id": 16006,2109 "parentId": 16005,2110 "code": "hhh",2111 "name": "hhh",2112 "type": "hhh",2113 "isEffect": "true",2114 "isPartChoose": null,2115 "children": [2116 {2117 "id": 16007,2118 "parentId": 16006,2119 "code": "kk",2120 "name": "kk",2121 "type": "kkk",2122 "isEffect": "true",2123 "isPartChoose": null,2124 "children": []2125 }2126 ]2127 },2128 {2129 "id": 20029,2130 "parentId": 16005,2131 "code": "lbGQiOiJmaXJzdF9jaGFubmVsX25hbWUiLCJ0ZXh0Ijoi5LiA57qn5rig6YGT5ZCN56ewIiwidmFsdWUiOiLliKnlrp3lkajlkajpooYifSx7ImZpZWxkIjoic2Vjb25",2132 "name": "lbGQiOiJmaXJzdF9jaGFubmVsX25hbWUiLCJ0ZXh0Ijoi5LiA57qn5rig6YGT5ZCN56ewIiwidmFsdWUiOiLliKnlrp3lkajlkajpooYifSx7ImZpZWxkIjoic2Vjb25",2133 "type": "hhh",2134 "isEffect": "true",2135 "isPartChoose": null,2136 "children": []2137 }2138 ]2139 },2140 {2141 "id": 18002,2142 "parentId": 15010,2143 "code": "huiguiyi",2144 "name": "回归",2145 "type": "ghhj",2146 "isEffect": "true",2147 "isPartChoose": null,2148 "children": []2149 },2150 {2151 "id": 18011,2152 "parentId": 15010,2153 "code": "asd",2154 "name": "丫丫",2155 "type": "ghhj",2156 "isEffect": "true",2157 "isPartChoose": null,2158 "children": []2159 },2160 {2161 "id": 18013,2162 "parentId": 15010,2163 "code": "asds",2164 "name": "yyy",2165 "type": "ghhj",2166 "isEffect": "true",2167 "isPartChoose": null,2168 "children": []2169 },2170 {2171 "id": 19001,2172 "parentId": 15010,2173 "code": "asdas",2174 "name": "ajgsjg",2175 "type": "ghhj",2176 "isEffect": "true",2177 "isPartChoose": null,2178 "children": []2179 }2180 ]2181 }2182 ]2183 },2184 {2185 "id": 16002,2186 "parentId": 15009,2187 "code": "dededede",2188 "name": "开发1",2189 "type": "dddd",2190 "isEffect": "true",2191 "isPartChoose": null,2192 "children": [2193 {2194 "id": 16003,2195 "parentId": 16002,2196 "code": "ddedeedee",2197 "name": "ededede",2198 "type": "dededded",2199 "isEffect": "true",2200 "isPartChoose": null,2201 "children": [2202 {2203 "id": 16004,2204 "parentId": 16003,2205 "code": "gtgt",2206 "name": "gtgt",2207 "type": "gtgt",2208 "isEffect": "true",2209 "isPartChoose": null,2210 "children": []2211 }2212 ]2213 }2214 ]2215 },2216 {2217 "id": 23004,2218 "parentId": 15009,2219 "code": "开发3",2220 "name": "开发3",2221 "type": "dddd",2222 "isEffect": "true",2223 "isPartChoose": null,2224 "children": []2225 }2226 ]2227 },2228 {2229 "id": 20034,2230 "parentId": 5,2231 "code": "MFUPGRADE",2232 "name": "魔方在保升级(MFUPGRADE)",2233 "type": "leads_business_scene",2234 "isEffect": "true",2235 "isPartChoose": null,2236 "children": []2237 },2238 {2239 "id": 23005,2240 "parentId": 5,2241 "code": "UNPAID",2242 "name": "暖哇未支付(UNPAID)",2243 "type": "leads_business_scene",2244 "isEffect": "true",2245 "isPartChoose": null,2246 "children": []2247 },2248 {2249 "id": 41001,2250 "parentId": 5,2251 "code": "MFUNPAID",2252 "name": "魔方未支付(MFUNPAID)",2253 "type": "leads_business_scene",2254 "isEffect": "true",2255 "isPartChoose": null,2256 "children": []2257 }2258 ]2259 },2260 {2261 "id": 6,2262 "parentId": 1,2263 "code": "short_smart_call",2264 "name": "智能外呼",2265 "type": "leads_reach_type",2266 "isEffect": "true",2267 "isPartChoose": null,2268 "children": [2269 {2270 "id": 20,2271 "parentId": 6,2272 "code": "CAPTCHA_30",2273 "name": "暖哇赠转短留资智能外呼(CAPTCHA_30)",2274 "type": "leads_business_scene",2275 "isEffect": "true",2276 "isPartChoose": null,2277 "children": []2278 },2279 {2280 "id": 21,2281 "parentId": 6,2282 "code": "INSTALLMENTSMARTCALL",2283 "name": "暖哇续期人工外呼后兜底智能外呼(INSTALLMENTSMARTCALL)",2284 "type": "leads_business_scene",2285 "isEffect": "true",2286 "isPartChoose": null,2287 "children": []2288 },2289 {2290 "id": 22,2291 "parentId": 6,2292 "code": "gift2shortT2",2293 "name": "赠转短接通未转化T+2智能外呼(gift2shortT2)",2294 "type": "leads_business_scene",2295 "isEffect": "true",2296 "isPartChoose": null,2297 "children": []2298 },2299 {2300 "id": 23,2301 "parentId": 6,2302 "code": "gift2shortT30",2303 "name": "赠转短未拨打T30回收智能外呼(gift2shortT30)",2304 "type": "leads_business_scene",2305 "isEffect": "true",2306 "isPartChoose": null,2307 "children": []2308 },2309 {2310 "id": 24,2311 "parentId": 6,2312 "code": "gift2shortT2F",2313 "name": "赠转短未接通未转化T+2智能外呼(gift2shortT2F)",2314 "type": "leads_business_scene",2315 "isEffect": "true",2316 "isPartChoose": null,2317 "children": []2318 },2319 {2320 "id": 25,2321 "parentId": 6,2322 "code": "gift2shortkn",2323 "name": "存量历史未拨打赠转短(gift2shortkn)",2324 "type": "leads_business_scene",2325 "isEffect": "true",2326 "isPartChoose": null,2327 "children": []2328 },2329 {2330 "id": 26,2331 "parentId": 6,2332 "code": "INSTALLMENTM2T7F",2333 "name": "续期人工外呼未接通M2下发T+7智能外呼(INSTALLMENTM2T7F)",2334 "type": "leads_business_scene",2335 "isEffect": "true",2336 "isPartChoose": null,2337 "children": []2338 },2339 {2340 "id": 27,2341 "parentId": 6,2342 "code": "INSTALLMENTM3T7F",2343 "name": "续期人工外呼未接通M3下发T+7智能外呼(INSTALLMENTM3T7F)",2344 "type": "leads_business_scene",2345 "isEffect": "true",2346 "isPartChoose": null,2347 "children": []2348 },2349 {2350 "id": 28,2351 "parentId": 6,2352 "code": "AXCAIWH",2353 "name": "爱心筹智能外呼(AXCAIWH)",2354 "type": "leads_business_scene",2355 "isEffect": "true",2356 "isPartChoose": null,2357 "children": []2358 },2359 {2360 "id": 29,2361 "parentId": 6,2362 "code": "installmentT3AIM6",2363 "name": "续期应缴日起T+3D未支付M6智能外呼(installmentT3AIM6)",2364 "type": "leads_business_scene",2365 "isEffect": "true",2366 "isPartChoose": null,2367 "children": []2368 },2369 {2370 "id": 30,2371 "parentId": 6,2372 "code": "installmentT3AIM5",2373 "name": "续期应缴日起T+3D未支付M5智能外呼(installmentT3AIM5)",2374 "type": "leads_business_scene",2375 "isEffect": "true",2376 "isPartChoose": null,2377 "children": []2378 },2379 {2380 "id": 31,2381 "parentId": 6,2382 "code": "installmentT3AIM4",2383 "name": "续期应缴日起T+3D未支付M4智能外呼(installmentT3AIM4)",2384 "type": "leads_business_scene",2385 "isEffect": "true",2386 "isPartChoose": null,2387 "children": []2388 },2389 {2390 "id": 32,2391 "parentId": 6,2392 "code": "installmentT3AIM3",2393 "name": "续期应缴日起T+3D未支付M3智能外呼(installmentT3AIM3)",2394 "type": "leads_business_scene",2395 "isEffect": "true",2396 "isPartChoose": null,2397 "children": []2398 },2399 {2400 "id": 33,2401 "parentId": 6,2402 "code": "installmentT3AIM2",2403 "name": "续期应缴日起T+3D未支付M2智能外呼(installmentT3AIM2)",2404 "type": "leads_business_scene",2405 "isEffect": "true",2406 "isPartChoose": null,2407 "children": []2408 },2409 {2410 "id": 34,2411 "parentId": 6,2412 "code": "AXCSMARTCALL",2413 "name": "爱心筹智能外呼(AXCSMARTCALL)",2414 "type": "leads_business_scene",2415 "isEffect": "true",2416 "isPartChoose": null,2417 "children": []2418 }2419 ]2420 },2421 {2422 "id": 40001,2423 "parentId": 1,2424 "code": "internetchannel",2425 "name": "网销业务",2426 "type": "leads_reach_type",2427 "isEffect": "true",2428 "isPartChoose": null,2429 "children": []2430 }2431 ]2432 },2433 {2434 "id": 2,2435 "parentId": 461,2436 "code": "work_wx",2437 "name": "企业微信",2438 "type": "leads_business_type",2439 "isEffect": "true",2440 "isPartChoose": null,2441 "children": [2442 {2443 "id": 7,2444 "parentId": 2,2445 "code": "work_wx_smart_call",2446 "name": "智能外呼",2447 "type": "leads_reach_type",2448 "isEffect": "true",2449 "isPartChoose": null,2450 "children": [2451 {2452 "id": 35,2453 "parentId": 7,2454 "code": "T1",2455 "name": "短转长外呼T+1接通智能外呼添加企微(T1)",2456 "type": "leads_business_scene",2457 "isEffect": "true",2458 "isPartChoose": null,2459 "children": []2460 },2461 {2462 "id": 36,2463 "parentId": 7,2464 "code": "T3",2465 "name": "短转长外呼T+3未接通智能外呼添加企微(T3)",2466 "type": "leads_business_scene",2467 "isEffect": "true",2468 "isPartChoose": null,2469 "children": []2470 },2471 {2472 "id": 37,2473 "parentId": 7,2474 "code": "short2longqwkn",2475 "name": "存量历史短转长未添加数据智能外呼(short2longqwkn)",2476 "type": "leads_business_scene",2477 "isEffect": "true",2478 "isPartChoose": null,2479 "children": []2480 },2481 {2482 "id": 38,2483 "parentId": 7,2484 "code": "G2SQWGZHT3",2485 "name": "暖哇赠转短公众号成单,短信触达未转化+30min智能外呼添加企微(G2SQWGZHT3)",2486 "type": "leads_business_scene",2487 "isEffect": "true",2488 "isPartChoose": null,2489 "children": []2490 },2491 {2492 "id": 39,2493 "parentId": 7,2494 "code": "G2SQWT3F",2495 "name": "暖哇赠转短外呼未转化,T+1D短信触达未转化+30min智能外呼添加企微(G2SQWT3F)",2496 "type": "leads_business_scene",2497 "isEffect": "true",2498 "isPartChoose": null,2499 "children": []2500 }2501 ]2502 }2503 ]2504 },2505 {2506 "id": 3,2507 "parentId": 461,2508 "code": "site_innerd",2509 "name": "站内运营d",2510 "type": "leads_business_type",2511 "isEffect": "true",2512 "isPartChoose": null,2513 "children": [2514 {2515 "id": 8,2516 "parentId": 3,2517 "code": "site_inner_short_flow",2518 "name": "短险跟进22",2519 "type": "leads_reach_type",2520 "isEffect": "true",2521 "isPartChoose": null,2522 "children": [2523 {2524 "id": 40,2525 "parentId": 8,2526 "code": "G2SQWGZH",2527 "name": "暖哇赠转短公众号成单,10min短信触达(G2SQWGZH)",2528 "type": "leads_business_scene",2529 "isEffect": "true",2530 "isPartChoose": null,2531 "children": []2532 },2533 {2534 "id": 41,2535 "parentId": 8,2536 "code": "LBBIRTHDX10H",2537 "name": "利宝存量生日触达早10点(LBBIRTHDX10H)",2538 "type": "leads_business_scene",2539 "isEffect": "true",2540 "isPartChoose": null,2541 "children": []2542 }2543 ]2544 },2545 {2546 "id": 9,2547 "parentId": 3,2548 "code": "site_inner_outer_transform",2549 "name": "外部合作转化",2550 "type": "leads_reach_type",2551 "isEffect": "true",2552 "isPartChoose": null,2553 "children": [2554 {2555 "id": 42,2556 "parentId": 9,2557 "code": "LBBIRTHMBXX9H",2558 "name": "利宝存量生日触达早9点(LBBIRTHMBXX9H)",2559 "type": "leads_business_scene",2560 "isEffect": "true",2561 "isPartChoose": null,2562 "children": []2563 },2564 {2565 "id": 43,2566 "parentId": 9,2567 "code": "LBBIRTHZNWHD2",2568 "name": "利宝存量生日智能外呼(LBBIRTHZNWHD2)",2569 "type": "leads_business_scene",2570 "isEffect": "true",2571 "isPartChoose": null,2572 "children": []2573 },2574 {2575 "id": 44,2576 "parentId": 9,2577 "code": "LBCXSXDX10H",2578 "name": "利宝存量失效短信10点(LBCXSXDX10H)",2579 "type": "leads_business_scene",2580 "isEffect": "true",2581 "isPartChoose": null,2582 "children": []2583 },2584 {2585 "id": 45,2586 "parentId": 9,2587 "code": "LBCXSXMBXX9H",2588 "name": "利宝存量失效短信9点(LBCXSXMBXX9H)",2589 "type": "leads_business_scene",2590 "isEffect": "true",2591 "isPartChoose": null,2592 "children": []2593 },2594 {2595 "id": 46,2596 "parentId": 9,2597 "code": "LBCXSXZNWHD2",2598 "name": "利宝存量失效智能外呼(LBCXSXZNWHD2)",2599 "type": "leads_business_scene",2600 "isEffect": "true",2601 "isPartChoose": null,2602 "children": []2603 },2604 {2605 "id": 47,2606 "parentId": 9,2607 "code": "YXCLCD2021",2608 "name": "2021元宵存量触达(YXCLCD2021)",2609 "type": "leads_business_scene",2610 "isEffect": "true",2611 "isPartChoose": null,2612 "children": []2613 }2614 ]2615 },2616 {2617 "id": 10,2618 "parentId": 3,2619 "code": "site_inner_stock_transform",2620 "name": "存量转化",2621 "type": "leads_reach_type",2622 "isEffect": "true",2623 "isPartChoose": null,2624 "children": [2625 {2626 "id": 48,2627 "parentId": 10,2628 "code": "CLYY",2629 "name": "202104存量转化策略执行(CLYY)",2630 "type": "leads_business_scene",2631 "isEffect": "true",2632 "isPartChoose": null,2633 "children": []2634 },2635 {2636 "id": 49,2637 "parentId": 10,2638 "code": "G2SQWT1F",2639 "name": "暖哇赠转短外呼未转化,T+1D短信触达(G2SQWT1F)",2640 "type": "leads_business_scene",2641 "isEffect": "true",2642 "isPartChoose": null,2643 "children": []2644 }2645 ]2646 }2647 ]2648 },2649 {2650 "id": 16,2651 "parentId": 15009,2652 "code": "UNPAID1",2653 "name": "暖哇未支付",2654 "type": "leads_business_type",2655 "isEffect": "true",2656 "isPartChoose": null,2657 "children": []2658 },2659 {2660 "id": 18001,2661 "parentId": 461,2662 "code": "huigui",2663 "name": "回归",2664 "type": "leads_business_type",2665 "isEffect": "true",2666 "isPartChoose": null,2667 "children": []2668 },2669 {2670 "id": 33003,2671 "parentId": 461,2672 "code": "rewfdf44d",2673 "name": "开发1111",2674 "type": "leads_business_type",2675 "isEffect": "true",2676 "isPartChoose": null,2677 "children": [2678 {2679 "id": 33006,2680 "parentId": 33003,2681 "code": "eee",2682 "name": "开发1111",2683 "type": "leads_reach_type",2684 "isEffect": "true",2685 "isPartChoose": null,2686 "children": []2687 }2688 ]2689 }2690 ];2691 const dataFormat = (arr) => {2692 let newArr = [];2693 if (arr != undefined && arr.length > 0) {2694 newArr = arr.map(item => {2695 item.label = item.name;2696 item.value = item.code;2697 if (item.children != undefined && item.children.length > 0) {2698 dataFormat(item.children);2699 }2700 return item;2701 });2702 }2703 return deleteChildren(newArr);2704 }2705 // 删除 树形结构 最后一个children为空数组的值.2706 const deleteChildren = (arr) => {2707 let childs = arr2708 for (let i = childs.length; i--; i > 0) {2709 if (childs[i].children) {2710 if (childs[i].children.length) {2711 deleteChildren(childs[i].children)2712 } else {2713 delete childs[i].children2714 }2715 }2716 }2717 return arr2718 }2719 const [columnsArr, setColumnsArr] = useState(columns);2720 const [tagVal, setTagVal] = useState([]);2721 useEffect(() => {2722 form.setFieldsValue({2723 channelName2724 })2725 })2726 const [form] = Form.useForm();2727 const onValuesChange = (values) => {2728 console.log('result', values)2729 };2730 const onChangeChannelName = (newChannelName) => {2731 setChannelName(newChannelName);2732 setTimeout(() => {2733 form.setFieldsValue({2734 channelName2735 })2736 }, 0)2737 }2738 const onSelectChange = (val) => {2739 // console.log('result val', val);2740 // val === 'other' && columns.push({2741 // title: 'Address',2742 // dataIndex: 'address',2743 // key: 'address',2744 // });2745 console.log('columns', columns)2746 if (val === 'other') {2747 setColumnsArr(columns.concat({2748 title: 'Address',2749 dataIndex: 'address',2750 key: 'address',2751 }))2752 } else {2753 setColumnsArr(columns);2754 }2755 console.log('result', columns);2756 }2757 const handleChange = () => {2758 console.log('12312')2759 }2760 const onChange = (val) => {2761 console.log('onChange val', val);2762 setTagVal(val);2763 form.setFieldsValue({2764 loveTags: val2765 })2766 }2767 const onTagsChange = (val) => {2768 console.log('onTagsChange val', val);2769 setTagVal(val);2770 form.setFieldsValue({2771 loveTags: val2772 })2773 }2774 const handleChangeTag = (tag, checked) => {2775 const nextSelectedTags = checked ? [...tagVal, tag] : tagVal.filter((t) => t !== tag);2776 if (nextSelectedTags.length > 5) {2777 message.warning(`最多只能选择 ${5} 个标签!`);2778 return;2779 }2780 console.log('nextSelectedTags', nextSelectedTags);2781 onChange?.(nextSelectedTags);2782 onTagsChange?.(nextSelectedTags);2783 setTagVal(checked ? [...tagVal, tag] : tagVal.filter((t) => t !== tag))2784 };2785 /**2786 * 分组标签视图2787 */2788 const groupTagsView =2789 groupTags &&2790 groupTags.map((groupTag) => {2791 return (2792 <Tabs.TabPane tab={groupTag.name} key={groupTag.name}>2793 {groupTag.tags.map((tag) => {2794 return (2795 <Tag.CheckableTag2796 key={tag}2797 checked={tagVal.indexOf(tag) > -1}2798 onChange={(checked) => handleChangeTag(tag, checked)}2799 >2800 {tag}2801 </Tag.CheckableTag>2802 );2803 })}2804 </Tabs.TabPane>2805 );2806 });2807 return (2808 <div>2809 <br /><br />2810 <h2>测试代码改变表单字段值,是否触发</h2>2811 <br /><br />2812 <Form2813 form={form}2814 onValuesChange={onValuesChange}2815 >2816 <Row gutter={[10, 10]} style={{ width: '100%' }}>2817 <Col>2818 <Form.Item2819 label="一级渠道名称"2820 name="channelName"2821 >2822 <Input placeholder="请输入一级渠道名称" allowClear />2823 </Form.Item>2824 </Col>2825 <Col>2826 <Form.Item2827 label="一级渠道编码"2828 name="channelCode"2829 >2830 <Input placeholder="请输入一级渠道名称" allowClear />2831 </Form.Item>2832 </Col>2833 </Row>2834 <Row>2835 <Col>2836 <Form.Item2837 label="下拉可搜可选"2838 name="searchVal"2839 >2840 <Select2841 showSearch2842 style={{ width: 200 }}2843 placeholder="Search to Select"2844 optionFilterProp="children"2845 >2846 <Option value="1">Not Identified</Option>2847 <Option value="2">Closed</Option>2848 <Option value="3">Communicated</Option>2849 <Option value="4">Identified</Option>2850 <Option value="5">Resolved</Option>2851 <Option value="6">Cancelled</Option>2852 </Select>2853 </Form.Item>2854 </Col>2855 </Row>2856 <Row>2857 <Col>2858 <Form.Item2859 label="下拉选择测试"2860 name="shhw"2861 >2862 <Select2863 style={{ width: 200 }}2864 placeholder="Search to Select"2865 onChange={onSelectChange}2866 >2867 <Option value="hhw">化合物</Option>2868 <Option value="other">其他</Option>2869 </Select>2870 </Form.Item>2871 </Col>2872 </Row>2873 <Row>2874 <Col span={24}>2875 <Form.Item2876 label="选择喜欢标签"2877 name="loveTags"2878 >2879 <Select2880 style={{ width: '100%' }}2881 // value={tagVal}2882 mode="multiple"2883 // showSearch2884 dropdownRender={(e) => {2885 return (2886 <>2887 {e.props.searchValue.length > 0 ? (2888 e2889 ) : (2890 <div style={{ paddingLeft: '10px' }}>2891 <Tabs>{groupTagsView}</Tabs>2892 </div>2893 )}2894 </>2895 );2896 }}2897 onChange={(value1) => {2898 onChange?.(value1);2899 }}2900 optionFilterProp="children"2901 placeholder={props.placeholder ?? `最多可选 5 个标签`}2902 // loading={tagLoading}2903 tokenSeparators={[',']}2904 allowClear2905 >2906 {/* {optionTagsView} */}2907 </Select>2908 </Form.Item>2909 </Col>2910 </Row>2911 <Row>2912 <Col>2913 <Form.Item label="">2914 <Button2915 type="primary"2916 // htmlType="submit"2917 style={{ marginRight: 12, marginTop: 30 }}2918 onClick={() => onChangeChannelName('头条')}2919 >2920 改变值2921 </Button>2922 </Form.Item>2923 </Col>2924 </Row>2925 <Row>2926 <Col span={12}>2927 <Cascader2928 style={{ width: '100%' }}2929 placeholder="请选择产品"2930 options={2931 productTree && dataFormat(productTree)2932 }2933 onChange={(val) => { console.log(val) }}2934 multiple2935 />2936 </Col>2937 </Row>2938 <br /><br />2939 <Row>2940 <Col span={12}>2941 <RCascader2942 // style={{ width: '100%' }}2943 placeholder="请选择产品"2944 data={2945 scasData && dataFormat(scasData)2946 }2947 onChange={(val) => { console.log('111', val) }}2948 menuWidth={290}2949 appearance="default" style={{ width: 340 }}2950 renderValue={(value, activePaths, activeItemLabel) => {2951 console.log(activePaths[activePaths.length - 1].name);2952 return activePaths[activePaths.length - 1].name2953 // return activePaths.map(item => item.label).join(' > ');2954 }}2955 />2956 </Col>2957 </Row>2958 <br /><br />2959 <Row gutter={[10, 30]}>2960 <Col span={24}>2961 <div2962 contentEditable={true}2963 suppressContentEditableWarning="true"2964 style={{2965 width: 320,2966 minHeight: 80,2967 borderRadius: 5,2968 border: '1px solid #dedede',2969 paddingTop: 10,2970 paddingLeft: 8,2971 paddingRight: 8,2972 paddingBottom: 102973 }}2974 onChange={handleChange}2975 >2976 <Tag color="magenta" closable>magenta</Tag>2977 </div>2978 </Col>2979 <br /> <br /> <br />2980 <Col span={24}>2981 <AntdInputTag value={data} ref={childRef} />2982 <Button style={{ marginTop: 10 }} onClick={updateChildState}>2983 获取子组件数据2984 </Button>2985 <div>{JSON.stringify(data)}</div>2986 </Col>2987 </Row>2988 </Form>2989 <br /><br />2990 <Checkbox.Group value={['1', '2']}>2991 <Checkbox value='1'>1</Checkbox>2992 <Checkbox value='2'>2</Checkbox>2993 <Checkbox value='3'>3</Checkbox>2994 <Checkbox value='4'>4</Checkbox>2995 </Checkbox.Group>2996 <br /><br />2997 <Table2998 columns={columnsArr}2999 dataSource={[]}3000 />3001 </div>3002 );3003}...

Full Screen

Full Screen

oringindata.js

Source:oringindata.js Github

copy

Full Screen

1import {Attack,act,pas,res} from './mankind/skills.js'2import{armors,weapons} from './modes/equipments.js'3var Package0=[4 {type:'特殊物品',name:'随侯珠',description:`“径盈寸,纯白而夜光,可以烛室”“随侯之珠,卞和之璧,得之者富,失之者贫”“皆至宝也,故随和并称。”`},5 {type:'竹简',name:'《孙子兵法》', description:`兵者,国之大事,死生之地,存亡之道,不可不察!`},6 {type:'竹简',name:'《吕氏春秋》',description:`吕不韦及其门客所编,囊括百家。史记春秋、士农工商、寓言时事、无所不包。可惜秦王不喜!`},7]8var honors=['士伍','上造','公士','鸟簪','不更','大夫','官大夫','公大夫','公乘','五大夫','左庶长',9'右庶长','左更','中更','右更','少上造','大良造','驷车庶长','大庶长','关内侯','彻侯'10]11var box0=[ 12armors[0][Math.floor(Math.random()*2)],weapons[Math.floor(Math.random()*2)][Math.floor(Math.random()*4)],13{type:'消耗品',name:'草药',effect:{hp:10},description:'随处可见的草药,有一定的毒副作用!',pastype:'药材'},14{type:'消耗品',name:'草药',effect:{hp:10},description:'随处可见的草药,有一定的毒副作用!',pastype:'药材'},15{type:'消耗品',name:'草药',effect:{hp:10},description:'随处可见的草药,有一定的毒副作用!',pastype:'药材'},16{type:'消耗品',name:'汤药',effect:{hp:30},description:'服用方便,疗效好,降低了药物的毒副作用',pastype:'药材'},17{type:'消耗品',name:'干粮',effect:{hp:20},description:'“汝欲远行,当备干粮”',pastype:'食物'},18]19var storage0=[{type:'特殊物品',name:'验',description:'“验”:“南郡、安陆县、云梦乡、夕阳里人,名黑夫,家中第二子,是士伍,高七尺五寸。”'},20{type:'特殊物品',name:'传',description:'“传”:“今有:云梦乡、夕阳里士伍,名黑夫,往县城服更役,沿途不可阻拦。”'},]21var headwears=[22 {name:'头巾',effect:{def:2,atk:0},iseffect:''},23 {name:'黑色头巾',effect:{def:3,atk:1},description:'减少少许被攻击的可能',iseffect:''},24 {name:'褐色头巾',effect:{def:4,atk:2},description:'减少少许被攻击的可能',iseffect:''},25 {name:'蓝色头巾',effect:{def:5,atk:3},description:'减少少许被攻击的可能',iseffect:''},26 {name:'木簪',effect:{def:8,atk:4},description:'身份的证明',iseffect:''},27 {name:'骨簪',effect:{def:10,atk:5},description:'身份的证明',iseffect:''},28 {name:'铜簪',effect:{def:12,atk:6},description:'身份的证明',iseffect:''},29 {name:'玉簪',effect:{def:14,atk:7},description:'身份的证明',iseffect:''},30 {name:'弁',effect:{def:17,atk:9},description:'圆形小帽,骑兵战士所着',iseffect:''},31 {name:'发髻',effect:{def:20,atk:11},description:'底层军吏,身份的证明',iseffect:''},32 {name:'木冠',effect:{def:23,atk:13},description:'下级军吏',iseffect:''},33 {name:'长冠',effect:{def:26,atk:15},description:'中下级军官',iseffect:''},34 {name:'双版长冠',effect:{def:29,atk:17},description:'中上级军官',iseffect:''},35 {name:'深紫色鹖冠',effect:{def:34,atk:20},description:'秦代将军独有',iseffect:''},36 37 {name:'玉冠',effect:{def:38,atk:23},description:'加爵当进冠',iseffect:''},38 {name:'武冠',effect:{def:42,atk:26},description:'位高权重,入宫参政,不可免冠',iseffect:''},39 {name:'法冠',effect:{def:46,atk:29},description:'官员头戴冠,身穿宽袍大袖,腰配书刀,手执笏板,耳簪白笔。',iseffect:''},40 {name:'袍服',effect:{def:50,atk:32},description:'位高权重,入宫参政,不可免冠',iseffect:''},41 {name:'佩绶',effect:{def:54,atk:35},description:'秦始皇常戴通天冠,废周代六冕之制,只着“玄衣裳”,百官戴法冠和武冠,穿袍服,佩绶。',iseffect:''},42 {name:'通天冠',effect:{def:55,atk:40},description:'秦始皇常戴通天冠。',iseffect:''},43 {name:'玄衣裳',effect:{def:60,atk:50},description:'秦始皇常着玄衣袍。',iseffect:''},44]45var ground0=[{type:'石头',name:'地面',description:'质地坚硬,良好地材'}]46var position0={x:1100,y:2700}47var user0={48 killnum:9,49 money:100,50 exp:0,51 proportyLimit:{maxhp:100,maxep:10,restore:6,maxleveln:20,},52 name:'黑夫',53 level:0,54 hp:50,55 ep:6,56 atk:10,57 def:10,58 yan:storage0[0],59 zhuan:storage0[1],60 skills:{61 attack:Attack,62 passives:[pas[1]],63 actives:[act[0],res[0],res[1]]64 },65 equipments : {66 headwear:headwears,67 weapon: null,68 armor: null69 }70}71var human=[`商鞅(约公元前395年-公元前338年),姬姓,公孙氏,名鞅,卫国人。72战国时期政治家、改革家、思想家,法家代表人物,卫国国君后代。商鞅辅佐秦孝公,73积极实行变法,使秦国成为富裕强大的国家,史称“商鞅变法”。政治上,改革了秦国户籍、74军功爵位、土地制度、行政区划、税收、度量衡以及民风民俗,并制定了严酷的法律;75经济上,主张重农抑商、奖励耕战;军事上,统率秦军收复了河西之地,赐予商于十五邑,76号为商君,史称为商鞅。公元前338年,秦孝公逝世后,商鞅被公子虔指为谋反,战败死于彤地,尸身车裂,全家被杀。`,77]78var gameset0={restar:false,SavaDatas:[{descrip:'自动存储',name:'存档0:',time:`时间:2020-2-10-下午`,number:0}]}79var musics=[{name:`武林雄音`,type:'fight',src:'../static/0.mp3'},{name:`信长之望`,type:'fight',src:`../static/1.mp3`},80{name:`高雅`,type:'gentel',src:`../static/2.mp3`},{name:`望月之城`,type:'gentel',src:`../static/3.mp3`},81{name:`临安初雨`,type:'fight',src:`../static/4.mp3`},{name:`渐渐吸引`,type:'fight',src:`../static/5.mp3`},82{name:`恨爱交加`,type:'gentel',src:`../static/6.mp3`},{name:`百鬼夜行`,type:'fight',src:`../static/7.mp3`},83{name:`永远同在`,type:'fight',src:`../static/8.mp3`},{name:`女儿情`,type:'gentel',src:`../static/9.mp3`},84{name:`喵喵之歌`,type:'gentel',src:`../static/10.mp3`},{name:`天使之王`,type:'fight',src:`../static/11.mp3`},85{name:`背水一战`,type:'fight',src:`../static/12.mp3`},86]...

Full Screen

Full Screen

kclLoader.js

Source:kclLoader.js Github

copy

Full Screen

1const { BinaryParser } = require("./binaryParser.js")2const { ModelBuilder } = require("./modelBuilder.js")3const { Vec3 } = require("../math/vec3.js")4class KclLoader5{6 static load(bytes, cfg)7 {8 let parser = new BinaryParser(bytes)9 10 let section1Offset = parser.readUInt32()11 let section2Offset = parser.readUInt32()12 let section3Offset = parser.readUInt32()13 let section4Offset = parser.readUInt32()14 15 let vertices = []16 parser.seek(section1Offset)17 while (parser.head < section2Offset)18 {19 let x = parser.readFloat32()20 let y = parser.readFloat32()21 let z = parser.readFloat32()22 vertices.push(new Vec3(x, -z, -y))23 }24 25 let normals = []26 parser.seek(section2Offset)27 while (parser.head < section3Offset)28 {29 let x = parser.readFloat32()30 let y = parser.readFloat32()31 let z = parser.readFloat32()32 normals.push(new Vec3(x, -z, -y))33 }34 35 let model = new ModelBuilder()36 37 let collisionTypeData =38 [39 { c: [1.0, 1.0, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Road40 { c: [1.0, 0.9, 0.8, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Slippery Road41 { c: [0.0, 0.8, 0.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Weak Off-Road42 { c: [0.0, 0.6, 0.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Off-Road43 { c: [0.0, 0.4, 0.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Heavy Off-Road44 { c: [1.0, 0.9, 0.8, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Slippery Road45 { c: [1.0, 0.5, 0.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Boost Pad46 { c: [1.0, 0.6, 0.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Boost Ramp47 { c: [1.0, 0.7, 0.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Jump Pad48 { c: [1.0, 1.0, 1.0, 0.5], isDeath: false, isInvis: true, isEffect: false }, // Item Road49 { c: [0.8, 0.0, 0.0, 0.8], isDeath: true, isInvis: false, isEffect: false }, // Solid Fall50 { c: [0.0, 0.5, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Moving Water51 { c: [0.6, 0.6, 0.6, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Wall52 { c: [0.0, 0.0, 0.6, 0.8], isDeath: false, isInvis: true, isEffect: false }, // Invisible Wall53 { c: [0.6, 0.6, 0.6, 0.5], isDeath: false, isInvis: true, isEffect: false }, // Item Wall54 { c: [0.6, 0.6, 0.6, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Wall55 { c: [0.8, 0.0, 0.0, 0.8], isDeath: true, isInvis: false, isEffect: false }, // Fall Boundary56 { c: [1.0, 0.0, 0.5, 1.0], isDeath: false, isInvis: false, isEffect: true }, // Cannon Activator57 { c: [1.0, 0.0, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: true }, // Force Recalculation58 { c: [0.0, 0.3, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Half-pipe Ramp59 { c: [0.6, 0.6, 0.6, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Wall60 { c: [0.9, 0.9, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Moving Road61 { c: [0.9, 0.7, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Gravity Road62 { c: [1.0, 1.0, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Road63 { c: [1.0, 0.0, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: true }, // Sound Trigger64 { c: [1.0, 0.0, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: true }, // Unknown65 { c: [1.0, 0.0, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: true }, // Effect Trigger66 { c: [1.0, 0.0, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: true }, // Unknown67 { c: [1.0, 0.0, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: true }, // Unknown68 { c: [0.9, 0.9, 1.0, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Moving Road69 { c: [0.8, 0.7, 0.8, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Special Wall70 { c: [0.6, 0.6, 0.6, 1.0], isDeath: false, isInvis: false, isEffect: false }, // Wall71 ]72 73 parser.seek(section3Offset + 0x10)74 while (parser.head < section4Offset)75 {76 let len = parser.readFloat32()77 let posIndex = parser.readUInt16()78 let dirIndex = parser.readUInt16()79 let normAIndex = parser.readUInt16()80 let normBIndex = parser.readUInt16()81 let normCIndex = parser.readUInt16()82 let collisionFlags = parser.readUInt16()83 84 if (posIndex >= vertices.length ||85 dirIndex >= normals.length ||86 normAIndex >= normals.length ||87 normBIndex >= normals.length ||88 normCIndex >= normals.length)89 continue90 91 let vertex = vertices[posIndex]92 let direction = normals[dirIndex]93 let normalA = normals[normAIndex]94 let normalB = normals[normBIndex]95 let normalC = normals[normCIndex]96 97 let crossA = normalA.cross(direction)98 let crossB = normalB.cross(direction)99 let v1 = vertex100 let v2 = vertex.add(crossB.scale(len / crossB.dot(normalC)))101 let v3 = vertex.add(crossA.scale(len / crossA.dot(normalC)))102 103 if (!v1.isFinite() || !v2.isFinite() || !v3.isFinite())104 continue105 106 let flagBasicType = collisionFlags & 0x1f107 if (flagBasicType >= collisionTypeData.length)108 continue109 110 let data = collisionTypeData[flagBasicType]111 if (cfg && data.isDeath && cfg.kclEnableDeathBarriers !== undefined && !cfg.kclEnableDeathBarriers)112 continue113 114 if (cfg && data.isInvis && cfg.kclEnableInvisible !== undefined && !cfg.kclEnableInvisible)115 continue116 117 if (cfg && data.isEffect && cfg.kclEnableEffects !== undefined && !cfg.kclEnableEffects)118 continue119 120 let color = data.c121 if (cfg && cfg.kclEnableColors !== undefined && !cfg.kclEnableColors)122 color = [1, 1, 1, 1]123 124 model.addTri(v1, v2, v3, color, color, color)125 }126 127 return model.calculateNormals()128 }129}130if (module)...

Full Screen

Full Screen

Options.js

Source:Options.js Github

copy

Full Screen

1var __reflect = (this && this.__reflect) || function (p, c, t) {2 p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;3};4var __extends = this && this.__extends || function __extends(t, e) { 5 function r() { 6 this.constructor = t;7}8for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);9r.prototype = e.prototype, t.prototype = new r();10};11var Options = (function (_super) {12 __extends(Options, _super);13 function Options() {14 var _this = _super.call(this) || this;15 _this.skinName = "OptionsSkin";16 return _this;17 }18 Options.prototype.createChildren = function () {19 _super.prototype.createChildren.call(this);20 this.init();21 };22 Options.prototype.init = function () {23 var _this = this;24 this.btn_music.init("musicOn_png", "musicOff_png");25 this.btn_effect.init("soundOn_png", "soundOff_png");26 //TODO 振动按钮素材待替换27 this.btn_vibrator.init("musicOn_png", "musicOff_png");28 //音乐开关29 this.btn_music.addEventListener(egret.TouchEvent.TOUCH_TAP, function () {30 SoundManager.Instance.isMusicOn = !SoundManager.Instance.isMusicOn;31 _this.btn_music.changeState(SoundManager.Instance.isMusicOn);32 }, this);33 //音效开关34 this.btn_effect.addEventListener(egret.TouchEvent.TOUCH_TAP, function () {35 // SoundManager.Instance.isEffect = !SoundManager.Instance.isEffect;36 // this.btn_music.changeState(SoundManager.Instance.isEffect);37 }, this);38 //振动开关39 this.btn_vibrator.addEventListener(egret.TouchEvent.TOUCH_TAP, function () {40 // SoundManager.Instance.isEffect = !SoundManager.Instance.isEffect;41 // this.btn_music.changeState(SoundManager.Instance.isEffect);42 }, this);43 //返回按钮44 this.btn_return.addEventListener(egret.TouchEvent.TOUCH_TAP, function () {45 SenceManager.Instance.removeSence(SenceManager.Instance.options);46 }, this);47 };48 return Options;49}(eui.Component));...

Full Screen

Full Screen

Checkbox2.js

Source:Checkbox2.js Github

copy

Full Screen

1//props2//3//4//dispatch({5// topicClassify:value6//})7//defaultValue:''8//引入css9var React = require('react');10window.$ = require('jquery/dist/jquery.js')11var $=window.$;12import { DatePicker } from 'antd';13var Checkbox2=React.createClass({14 getInitialState(){15 return ({16 none: true,17 isEffect: false,18 isPilot: false19 })20 },21 handleChange1(e){22 var self=this;23 this.setState({24 none:false,25 isEffect:e.target.checked26 },function(){27 self.props.dispatch({28 isEffect:Number(self.state.isEffect)29 })30 if (!self.state.isEffect&&!self.state.isPilot) {31 self.setState({32 none:true33 })34 }35 })36 },37 handleChange2(e){38 var self=this;39 this.setState({40 none:false,41 isPilot:e.target.checked42 },function(){43 self.props.dispatch({44 isPilot:Number(self.state.isPilot)45 })46 if (!self.state.isEffect&&!self.state.isPilot) {47 self.setState({48 none:true49 })50 }51 })52 },53 handleNone(e){54 var self=this;55 if (e.target.checked) {56 this.setState({57 none:true,58 isEffect:false,59 isPilot:false60 },function(){61 self.props.dispatch({62 isEffect:0,63 isPilot:064 })65 })66 }else{67 this.setState({68 none:false69 })70 }71 },72 render(){73 return(74 <div>75 <label className="radio-inline">76 <input onChange={this.handleNone} value='0' checked={this.state.none} name='none' className="radioclass" type="checkbox"/><span></span>77 不限78 </label>79 <label className="radio-inline">80 <input onChange={this.handleChange1} value='0' checked={this.state.isEffect} name='isEffect' type="checkbox"/><span></span>81 现行有效82 </label>83 <label className="radio-inline">84 <input onChange={this.handleChange2} value='0' checked={this.state.isPilot} name='isPilot' type="checkbox"/><span></span>85 试点86 </label>87 </div>88 )89 }90})...

Full Screen

Full Screen

effect.mjs

Source:effect.mjs Github

copy

Full Screen

1import { sleep } from "../util.mjs"2export function take(pattern) {3 return {4 isEffect: true,5 type: "take",6 pattern,7 }8}9export function put(action) {10 return {11 isEffect: true,12 type: "put",13 action,14 }15}16export function call(fn, ...args) {17 return {18 isEffect: true,19 type: "call",20 fn,21 args,22 }23}24export function fork(saga) {25 return {26 isEffect: true,27 type: "fork",28 saga,29 }30}31export function select(selector) {32 return {33 isEffect: true,34 type: "select",35 selector,36 }37}38export function all(obj) {39 return {40 isEffect: true,41 type: "all",42 obj,43 }44}45export function cancel(task) {46 return {47 isEffect: true,48 type: "cancel",49 task,50 }51}...

Full Screen

Full Screen

effect.js

Source:effect.js Github

copy

Full Screen

1import { sleep } from "../util.js"2export function take(pattern) {3 return {4 isEffect: true,5 type: "take",6 pattern,7 }8}9export function put(action) {10 return {11 isEffect: true,12 type: "put",13 action,14 }15}16export function call(fn, ...args) {17 return {18 isEffect: true,19 type: "call",20 fn,21 args,22 }23}24export function fork(saga) {25 return {26 isEffect: true,27 type: "fork",28 saga,29 }30}31export function select(selector) {32 return {33 isEffect: true,34 type: "select",35 selector,36 }37}38export function all(obj) {39 return {40 isEffect: true,41 type: "all",42 obj,43 }44}45export function cancel(task) {46 return {47 isEffect: true,48 type: "cancel",49 task,50 }51}...

Full Screen

Full Screen

createPromiseMiddleware.js

Source:createPromiseMiddleware.js Github

copy

Full Screen

1import { NAMESPACE_SEP } from './constants';2export default function createPromiseMiddleware(app) {3 return () => next => action => {4 const { type } = action;5 if (isEffect(type)) {6 return new Promise((resolve, reject) => {7 next({8 __resolve: resolve,9 __reject: reject,10 ...action,11 });12 });13 } else {14 return next(action);15 }16 };17 function isEffect(type) {18 let isEffect = false19 if (!type || typeof type !== 'string') return false;20 const [namespace] = type.split(NAMESPACE_SEP);21 const model = app._models.filter(m => m.namespace === namespace)[0];22 if (model) {23 if (model.effects && model.effects[type]) {24 isEffect = true25 }26 }27 return isEffect28 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require("playwright");2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 const isEffect = await page.evaluate(() => window.isEffect);7 console.log(isEffect);8 await browser.close();9})();10const { chromium } = require("playwright");11(async () => {12 const browser = await chromium.launch();13 const context = await browser.newContext();14 const page = await context.newPage();15 const isEffect = await page.evaluate(() => window.isEffect);16 console.log(isEffect);17 await browser.close();18})();19How to use Playwright's new BrowserType.connect() method?20How to use Playwright's new BrowserType.connectOverCDP() method?21How to use Playwright's new BrowserType.launchServer() method?22How to use Playwright's new BrowserType.launchPersistentContext() method?23How to use Playwright's new BrowserType.launchPersistentContext() method?24How to use Playwright's new BrowserType.launch() method?25How to use Playwright's new BrowserContext.overridePermissions() method?26How to use Playwright's new BrowserContext.newCDPSession() method?27How to use Playwright's new BrowserContext.newPage() method?28How to use Playwright's new BrowserContext.clearCookies() method?29How to use Playwright's new BrowserContext.clearPermissions() method?30How to use Playwright's new BrowserContext.clearGeolocation() method?31How to use Playwright's new BrowserContext.addCookies() method?32How to use Playwright's new BrowserContext.addInitScript() method?33How to use Playwright's new BrowserContext.addInitScript() method?

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.screenshot({ path: 'google.png' });7 await browser.close();8})();9const { chromium } = require('playwright');10(async () => {11 const browser = await chromium.launch();12 const context = await browser.newContext();13 const page = await context.newPage();14 await page.screenshot({ path: 'google.png' });15 await browser.close();16})();17const { chromium } = require('playwright');18(async () => {19 const browser = await chromium.launch();20 const context = await browser.newContext();21 const page = await context.newPage();22 await page.screenshot({ path: 'google.png' });23 await browser.close();24})();25const { chromium } = require('playwright');26(async () => {27 const browser = await chromium.launch();28 const context = await browser.newContext();29 const page = await context.newPage();30 await page.screenshot({ path: 'google.png' });31 await browser.close();32})();33const { chromium } = require('playwright');34(async () => {35 const browser = await chromium.launch();36 const context = await browser.newContext();37 const page = await context.newPage();38 await page.screenshot({ path: 'google.png' });39 await browser.close();40})();41const { chromium } = require('playwright');42(async () => {43 const browser = await chromium.launch();44 const context = await browser.newContext();45 const page = await context.newPage();46 await page.screenshot({ path

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isEffect } = require('@playwright/test/lib/frames');2const { test } = require('@playwright/test');3test('test', async ({ page }) => {4 const isEffectResult = isEffect(page);5 console.log('isEffectResult: ', isEffectResult);6});7const { test } = require('@playwright/test');8test('test', async ({ page }) => {9 const isEffectResult = isEffect(page);10 console.log('isEffectResult: ', isEffectResult);11});12I am trying to create a test case for a web application that uses a custom drag and drop functionality. I am using Playwright to automate the test case. The drag and drop functionality is working fine with the mouse pointer, but when I use the mouse.down() and mouse.up() method, the drag and drop functionality is not working as expected. I have tried to use the mouse.move() method to move the mouse pointer to the desired location, but that is also not working. I am using the mouse.down() and mouse.up() method to drag and drop a button from the left side of the screen to the right side of the screen. The button is not being dragged to the right side of the screen. The button is being dragged to the left side of the screen. I have also tried to use the mouse.move() method to move the mouse pointer to the desired location, but that is also not working. I am using the mouse.down() and mouse.up() method to drag and drop a button from the left side of the screen to the right side of the screen. The button is not being dragged to the right side of the screen. The button is being dragged to the left side of the screen. I have also tried to use the mouse.move() method to move the mouse pointer to the desired location, but that is also not working. I am using the mouse.down() and mouse.up() method to drag and drop a button from the left side of the screen to the right side of the screen. The button is not being dragged to the right side of the screen. The button is being dragged to the left side of the screen. I have also tried to use the mouse.move() method to move the

Full Screen

Using AI Code Generation

copy

Full Screen

1const {InternalUtils} = require('@playwright/test/lib/utils/internalUtils');2const {chromium} = require('playwright');3(async () => {4 const browser = await chromium.launch();5 const page = await browser.newPage();6 const hasButton = await InternalUtils.isEffect(page, async page => {7 return await page.isVisible('text=Get started');8 });9 console.log(hasButton);10 await browser.close();11})();12const { test, expect } = require('@playwright/test');13const {InternalUtils} = require('@playwright/test/lib/utils/internalUtils');14test('is button visible', async ({ page }) => {15 const hasButton = await InternalUtils.isEffect(page, async page => {16 return await page.isVisible('text=Get started');17 });18 expect(hasButton).toBe(true);19});

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isEffect } = require('playwright/lib/internal/api');2const {chromium} = require('playwright');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 const navigationPromise = page.waitForNavigation();8 await navigationPromise;9 await page.fill('#tsf > div:nth-child(2) > div > div.RNNXgb > div > div.a4bIc > input', 'Playwright');10 await page.click('#tsf > div:nth-child(2) > div > div.FPdoLc.VlcLAe > center > input.gNO89b');11 await navigationPromise;12 await page.click('text=Playwright - end-to-end testing for modern web apps');

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isEffect } = require('playwright/lib/client/effect');2const { test, expect } = require('@playwright/test');3test('isEffect', async ({ page }) => {4 const aTag = await page.$('a');5 const isEffect = await page.evaluate((aTag) => {6 return Object.getPrototypeOf(aTag).isEffect;7 }, aTag);8 expect(isEffect).toBe(true);9});10const { isEffect } = require('playwright/lib/client/effect');11const { test, expect } = require('@playwright/test');12test('isEffect', async ({ page }) => {13 const aTag = await page.$('a');14 const isEffect = await page.evaluate((aTag) => {15 return Object.getPrototypeOf(aTag).isEffect;16 }, aTag);17 if (isEffect) {18 const effectValue = await aTag.evaluateHandle((aTag) => aTag);19 expect(await effectValue.jsonValue()).toBe('a');20 }21});

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium, webkit, firefox } = require('playwright');2const { isEffect } = require('playwright/lib/internal/recorder/frames');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 await page.type('input[title="Search"]', 'Hello World!');8 await page.click('input[type="submit"]');9 await page.waitForSelector('text=Hello World!');10 await page.click('text=Hello World!');

Full Screen

Using AI Code Generation

copy

Full Screen

1const { isEffect } = require('playwright/lib/utils/stackTrace');2const stackTrace = require('stack-trace');3const caller = require('caller');4const callerFile = caller();5const trace = stackTrace.get();6const callerTrace = stackTrace.parse(callerFile);7const callerFileName = callerTrace[0].getFileName();8const callerFunctionName = callerTrace[0].getFunctionName();9const callerTrace = stackTrace.parse(callerFile);10const callerFileName = callerTrace[0].getFileName();11const callerFunctionName = callerTrace[0].getFunctionName();12const isCallerEffect = isEffect(trace[0]);13const isCallerEffect = isEffect(trace[0]);14const callerFileName = callerTrace[0].getFileName();15const callerFunctionName = callerTrace[0].getFunctionName();16const isCallerEffect = isEffect(trace[0]);17const isCallerEffect = isEffect(trace[0]);18const callerFileName = callerTrace[0].getFileName();19const callerFunctionName = callerTrace[0].getFunctionName();20const isCallerEffect = isEffect(trace[0]);21const isCallerEffect = isEffect(trace[0]);22const callerFileName = callerTrace[0].getFileName();23const callerFunctionName = callerTrace[0].getFunctionName();24const isCallerEffect = isEffect(trace[0]);25const isCallerEffect = isEffect(trace[0]);

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful