From 198ee074fd40fe0f3d620593ee559f72f79aa5c2 Mon Sep 17 00:00:00 2001 From: qmj <37242163+qmj666@users.noreply.github.com> Date: Thu, 14 Aug 2025 10:32:07 +0800 Subject: [PATCH] init --- .editorconfig | 16 ++++++++++++++++ .eslintrc | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 15 +++++++++++++++ .webpackrc.js | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/MES关键操作说明.xlsx | Bin 0 -> 17948 bytes public/MES打印机更换纸张后亮红灯解决方法.pdf | Bin 0 -> 541840 bytes public/favicon.ico | Bin 0 -> 17012 bytes public/index.html | 21 +++++++++++++++++++++ public/x6.js | 12 ++++++++++++ public/数字工厂MES系统操作指引.pdf | Bin 0 -> 8379978 bytes public/车间MES打印机更换纸张.pdf | Bin 0 -> 891423 bytes src/assets/add.svg | 1 + src/assets/addChild.svg | 1 + src/assets/areas.json | 1 + src/assets/btnComponentIcon/1.png | Bin 0 -> 583 bytes src/assets/btnComponentIcon/10.png | Bin 0 -> 936 bytes src/assets/btnComponentIcon/10_1.png | Bin 0 -> 917 bytes src/assets/btnComponentIcon/11.png | Bin 0 -> 746 bytes src/assets/btnComponentIcon/11_1.png | Bin 0 -> 724 bytes src/assets/btnComponentIcon/12.png | Bin 0 -> 743 bytes src/assets/btnComponentIcon/12_1.png | Bin 0 -> 703 bytes src/assets/btnComponentIcon/13.png | Bin 0 -> 507 bytes src/assets/btnComponentIcon/13_1.png | Bin 0 -> 505 bytes src/assets/btnComponentIcon/14.png | Bin 0 -> 378 bytes src/assets/btnComponentIcon/14_1.png | Bin 0 -> 372 bytes src/assets/btnComponentIcon/15.png | Bin 0 -> 1058 bytes src/assets/btnComponentIcon/15_1.png | Bin 0 -> 1018 bytes src/assets/btnComponentIcon/16.png | Bin 0 -> 593 bytes src/assets/btnComponentIcon/16_1.png | Bin 0 -> 567 bytes src/assets/btnComponentIcon/17.png | Bin 0 -> 762 bytes src/assets/btnComponentIcon/17_1.png | Bin 0 -> 751 bytes src/assets/btnComponentIcon/18.png | Bin 0 -> 554 bytes src/assets/btnComponentIcon/18_1.png | Bin 0 -> 547 bytes src/assets/btnComponentIcon/19.png | Bin 0 -> 788 bytes src/assets/btnComponentIcon/19_1.png | Bin 0 -> 770 bytes src/assets/btnComponentIcon/1_1.png | Bin 0 -> 562 bytes src/assets/btnComponentIcon/2.png | Bin 0 -> 780 bytes src/assets/btnComponentIcon/20.png | Bin 0 -> 921 bytes src/assets/btnComponentIcon/20_1.png | Bin 0 -> 910 bytes src/assets/btnComponentIcon/21.png | Bin 0 -> 440 bytes src/assets/btnComponentIcon/21_1.png | Bin 0 -> 434 bytes src/assets/btnComponentIcon/22.png | Bin 0 -> 747 bytes src/assets/btnComponentIcon/22_1.png | Bin 0 -> 722 bytes src/assets/btnComponentIcon/23.png | Bin 0 -> 887 bytes src/assets/btnComponentIcon/23_1.png | Bin 0 -> 845 bytes src/assets/btnComponentIcon/24.png | Bin 0 -> 413 bytes src/assets/btnComponentIcon/24_1.png | Bin 0 -> 408 bytes src/assets/btnComponentIcon/2_1.png | Bin 0 -> 768 bytes src/assets/btnComponentIcon/3.png | Bin 0 -> 791 bytes src/assets/btnComponentIcon/3_1.png | Bin 0 -> 776 bytes src/assets/btnComponentIcon/4.png | Bin 0 -> 551 bytes src/assets/btnComponentIcon/4_1.png | Bin 0 -> 554 bytes src/assets/btnComponentIcon/5.png | Bin 0 -> 413 bytes src/assets/btnComponentIcon/5_1.png | Bin 0 -> 464 bytes src/assets/btnComponentIcon/6.png | Bin 0 -> 907 bytes src/assets/btnComponentIcon/6_1.png | Bin 0 -> 842 bytes src/assets/btnComponentIcon/7.png | Bin 0 -> 788 bytes src/assets/btnComponentIcon/7_1.png | Bin 0 -> 766 bytes src/assets/btnComponentIcon/8.png | Bin 0 -> 786 bytes src/assets/btnComponentIcon/8_1.png | Bin 0 -> 765 bytes src/assets/btnComponentIcon/9.png | Bin 0 -> 489 bytes src/assets/btnComponentIcon/9_1.png | Bin 0 -> 485 bytes src/assets/cities.json | 1 + src/assets/close.svg | 14 ++++++++++++++ src/assets/copy.svg | 1 + src/assets/copyall.svg | 1 + src/assets/default2.png | Bin 0 -> 11702 bytes src/assets/delete.svg | 1 + src/assets/disableadd.svg | 1 + src/assets/disableaddChild.svg | 1 + src/assets/disablecopy.svg | 1 + src/assets/disablecopyall.svg | 1 + src/assets/disabledelete.svg | 1 + src/assets/disablematerial.svg | 1 + src/assets/disablematerialremark.svg | 1 + src/assets/disableprocess.svg | 1 + src/assets/eject.svg | 1 + src/assets/ejectleft.svg | 1 + src/assets/file.svg | 5 +++++ src/assets/file_single.svg | 1 + src/assets/foot_logo.png | Bin 0 -> 15891 bytes src/assets/footer_logo.png | Bin 0 -> 1283 bytes src/assets/hasChecked.svg | 1 + src/assets/haveCancel.png | Bin 0 -> 28218 bytes src/assets/haveChecked.png | Bin 0 -> 34088 bytes src/assets/haveChecking.svg | 12 ++++++++++++ src/assets/icons/index.js | 3 +++ src/assets/icons/svg/Frame 55.svg | 5 +++++ src/assets/icons/svg/Frame 60.svg | 4 ++++ src/assets/icons/svg/Frame 67.svg | 3 +++ src/assets/icons/svg/Frame 82.svg | 5 +++++ src/assets/icons/svg/Frame 83.svg | 3 +++ src/assets/icons/svg/Frame 84.svg | 3 +++ src/assets/icons/svg/Frame 87.svg | 3 +++ src/assets/icons/svg/Frame 88.svg | 3 +++ src/assets/icons/svg/Frame 89.svg | 4 ++++ src/assets/icons/svg/Frame 90.svg | 3 +++ src/assets/icons/svg/Frame 91.svg | 3 +++ src/assets/icons/svg/_account.svg | 3 +++ src/assets/icons/svg/_add.svg | 3 +++ src/assets/icons/svg/_bottom.svg | 3 +++ src/assets/icons/svg/_calculator.svg | 3 +++ src/assets/icons/svg/_card.svg | 3 +++ src/assets/icons/svg/_check.svg | 3 +++ src/assets/icons/svg/_close.svg | 3 +++ src/assets/icons/svg/_copy.svg | 3 +++ src/assets/icons/svg/_copyall.svg | 5 +++++ src/assets/icons/svg/_custom.svg | 4 ++++ src/assets/icons/svg/_delete.svg | 3 +++ src/assets/icons/svg/_edit.svg | 3 +++ src/assets/icons/svg/_export.svg | 3 +++ src/assets/icons/svg/_function.svg | 1 + src/assets/icons/svg/_function2.svg | 3 +++ src/assets/icons/svg/_gen.svg | 3 +++ src/assets/icons/svg/_material.svg | 3 +++ src/assets/icons/svg/_next.svg | 4 ++++ src/assets/icons/svg/_nextpage.svg | 3 +++ src/assets/icons/svg/_password.svg | 3 +++ src/assets/icons/svg/_plus.svg | 3 +++ src/assets/icons/svg/_prevpage.svg | 3 +++ src/assets/icons/svg/_printer.svg | 5 +++++ src/assets/icons/svg/_process.svg | 3 +++ src/assets/icons/svg/_reload.svg | 3 +++ src/assets/icons/svg/_rollback.svg | 3 +++ src/assets/icons/svg/_save.svg | 3 +++ src/assets/icons/svg/_search.svg | 3 +++ src/assets/icons/svg/_setting.svg | 10 ++++++++++ src/assets/icons/svg/_top.svg | 3 +++ src/assets/icons/svg/_tree.svg | 3 +++ src/assets/icons/svg/_upload.svg | 3 +++ src/assets/icons/svg/gongneng.svg | 10 ++++++++++ src/assets/icons/svg/jiahao.svg | 3 +++ src/assets/icons/svg/jiahao_1 1.svg | 10 ++++++++++ src/assets/icons/svg/quxiaoshenhe.svg | 3 +++ src/assets/icons/svg/shengchengshoukuandan.svg | 3 +++ src/assets/icons/svg/xiangmubujian 1.svg | 10 ++++++++++ src/assets/logo.png | Bin 0 -> 17012 bytes src/assets/logo_pic.png | Bin 0 -> 18587 bytes src/assets/material.svg | 1 + src/assets/materialremark.svg | 1 + src/assets/oee/addFill.svg | 1 + src/assets/oee/addState.svg | 1 + src/assets/oee/brint.svg | 1 + src/assets/oee/changeWork.svg | 1 + src/assets/oee/close.svg | 1 + src/assets/oee/commonIcon.svg | 1 + src/assets/oee/company.svg | 1 + src/assets/oee/currentState.svg | 1 + src/assets/oee/del.png | Bin 0 -> 15810 bytes src/assets/oee/del0.png | Bin 0 -> 1148 bytes src/assets/oee/dete.svg | 1 + src/assets/oee/facereg.svg | 1 + src/assets/oee/facescan.svg | 1 + src/assets/oee/fileManage.svg | 1 + src/assets/oee/firstTing.svg | 1 + src/assets/oee/loginCompany.png | Bin 0 -> 3445 bytes src/assets/oee/logo.png | Bin 0 -> 11671 bytes src/assets/oee/panle.svg | 1 + src/assets/oee/passWord.svg | 1 + src/assets/oee/processRepoort.svg | 1 + src/assets/oee/productWork.svg | 1 + src/assets/oee/qr2.png | Bin 0 -> 1576 bytes src/assets/oee/refresh0.png | Bin 0 -> 3851 bytes src/assets/oee/right.svg | 1 + src/assets/oee/see.svg | 1 + src/assets/oee/setting.svg | 1 + src/assets/oee/team.svg | 1 + src/assets/oee/voice0.png | Bin 0 -> 2331 bytes src/assets/oee/wages.svg | 1 + src/assets/param.svg | 1 + src/assets/process.svg | 1 + src/assets/prompt.png | Bin 0 -> 4203 bytes src/assets/provinces.json | 1 + src/assets/quanping.svg | 1 + src/assets/treematerial.svg | 1 + src/assets/treeprocess.svg | 1 + src/components/Charts/Bar/index.js | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/BrokenLine/index.js | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/ColorBlock/index.js | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/Columnar/index.js | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/ColumnarGroup/index.js | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/ColumnarStack/index.js | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/EqualColumnarStack/index.js | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/Gantt/Gantt.css | 3 +++ src/components/Charts/Gantt/MessageArea/Message.js | 24 ++++++++++++++++++++++++ src/components/Charts/Gantt/MessageArea/MessageArea.css | 18 ++++++++++++++++++ src/components/Charts/Gantt/MessageArea/index.js | 4 ++++ src/components/Charts/Gantt/index.js | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/Gauge/index.js | 235 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/Pie/index.js | 279 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/Pie/index.less | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/PieGroup/index.js | 31 +++++++++++++++++++++++++++++++ src/components/Charts/TimeLineGroup/index.js | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/TimelineChart/index.js | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/TimelineChart/index.less | 3 +++ src/components/Charts/WaterWave/index.js | 205 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Charts/WaterWave/index.less | 29 +++++++++++++++++++++++++++++ src/components/Charts/equal.js | 17 +++++++++++++++++ src/components/Charts/index.js | 33 +++++++++++++++++++++++++++++++++ src/components/Charts/index.less | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/AntdDraggableDiv.js | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/AntdDraggableModal.js | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/AntdDraggableModal/antDraggle.less | 29 +++++++++++++++++++++++++++++ src/components/Common/ComFunc.js | 658 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonBase.js | 2270 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonBillEvent.js | 7464 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonComponent/index.js | 3180 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonComponent/index_new.js | 1188 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonHooks/useCommonBase.js | 2936 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonHooks/useCommonHooksTestEvent.js | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonInstructSet.js | 3188 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonListEvent.js | 3017 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonListSelect/index.js | 339 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonListSelect/index.less | 8 ++++++++ src/components/Common/CommonListSelectTree/index.js | 582 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonListTabEvent.js | 3032 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonListTreeEvent.js | 2362 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonListTreeSelect/index.js | 622 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonSubBillEvent.js | 5572 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonTable/index.js | 12549 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonTable/index.less | 765 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonView/index.js | 294 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonView/index.less | 0 src/components/Common/CommonViewDrag/index.js | 901 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonViewDrag/index.less | 336 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonViewDragable/index.js | 527 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonViewDragable/index.less | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonViewDragable/rglUtils.js | 322 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonViewTable/index.js | 681 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CommonViewTable/index.less | 0 src/components/Common/ContextMenuModal.js | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CostomHooks/useGetData.js | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/CostomHooks/useTitleChange.js | 32 ++++++++++++++++++++++++++++++++ src/components/Common/OfficePreview/index.js | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/ReactDebounce/config.js | 9 +++++++++ src/components/Common/ReactDebounce/debounce.js | 11 +++++++++++ src/components/Common/ReactDebounce/index.jsx | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/ReactDebounce/merge-config.js | 39 +++++++++++++++++++++++++++++++++++++++ src/components/Common/ReactDebounce/should-update.js | 9 +++++++++ src/components/Common/SearchComponent/index.js | 1335 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/SearchComponent/index.less | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/ShowImage/ShowImage.js | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/ShowImage/ShowImage.less | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/SlaveMemo.js | 352 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/Tree/StaticTree.js | 375 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/Tree/Tree.css | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/commonBusiness.js | 1310 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Common/commonFunc.js | 774 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Draggable/index.js | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Draggable/index.less | 14 ++++++++++++++ src/components/FaceDetect/index.js | 528 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/FaceDetect/index.less | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/NumberInfo/index.js | 34 ++++++++++++++++++++++++++++++++++ src/components/NumberInfo/index.less | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/PrintPdf/PreviewPdf.js | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/PrintPdf/PrintPdf.js | 28 ++++++++++++++++++++++++++++ src/components/PrintPdf/printpdf.less | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/SvgIcon/index.js | 23 +++++++++++++++++++++++ src/components/Tab/TabComponent.js | 306 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Tab/index.less | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Vlist/index.js | 555 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/Vlist/index.less | 16 ++++++++++++++++ src/components/Vlist/index_back.js | 458 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/VlistNew/index.js | 1053 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/default.less | 1015 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/g2.js | 25 +++++++++++++++++++++++++ src/index.ejs | 34 ++++++++++++++++++++++++++++++++++ src/index.js | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/index.less | 4679 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/indexNew.less | 453 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/RunningStatus/index.js | 615 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/RunningStatus/index.less | 321 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/buttonComponent/index.js | 348 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/buttonComponent/index.less | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/choosePalletComponent/index.js | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/choosePalletComponent/index.less | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/commonFilePreviewComponent/index.js | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/commonFilePreviewComponent/index.less | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/commonModalComponent/index.js | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/commonModalComponent/index.less | 0 src/mes/common/commonModelComponent/Table/SWasteType/Modal.jsx | 29 +++++++++++++++++++++++++++++ src/mes/common/commonModelComponent/Table/SWasteType/index.jsx | 433 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/commonModelComponent/Table/SWasteType/index.less | 27 +++++++++++++++++++++++++++ src/mes/common/commonModelComponent/index.js | 2630 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/commonModelComponent/index.less | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/commonOperationBarComponent/index.js | 1508 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/commonOperationBarComponent/index.less | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/commonOperationBarComponent/qrScan.js | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/faceCollectionComponent/index.js | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/faceCollectionComponent/index.less | 5 +++++ src/mes/common/inputMultiModalComponent/index.js | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/inputMultiModalComponent/index.less | 19 +++++++++++++++++++ src/mes/common/routerComponent/index.js | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/siderInfoComponent/assets/facilityIcon.png | Bin 0 -> 1320 bytes src/mes/common/siderInfoComponent/assets/groupIcon.png | Bin 0 -> 1655 bytes src/mes/common/siderInfoComponent/assets/taskIcon.png | Bin 0 -> 768 bytes src/mes/common/siderInfoComponent/assets/user.jpg | Bin 0 -> 40882 bytes src/mes/common/siderInfoComponent/assets/userPost.png | Bin 0 -> 39485 bytes src/mes/common/siderInfoComponent/clockComponent/index.js | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/siderInfoComponent/clockComponent/index.less | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/siderInfoComponent/index.js | 857 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/siderInfoComponent/index.less | 376 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/tbTimeModalComponent/index.js | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/common/tbTimeModalComponent/index.less | 6 ++++++ src/mes/costomPageFun/index.js | 1598 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/indexMes/assets/c_guideIcon.png | Bin 0 -> 1620 bytes src/mes/indexMes/assets/c_planTaskIcon.png | Bin 0 -> 1320 bytes src/mes/indexMes/assets/c_proExeIcon.png | Bin 0 -> 1576 bytes src/mes/indexMes/assets/c_queryTraceIcon.png | Bin 0 -> 1295 bytes src/mes/indexMes/assets/c_serviceIcon.png | Bin 0 -> 1445 bytes src/mes/indexMes/assets/c_systemIcon.png | Bin 0 -> 1183 bytes src/mes/indexMes/assets/c_teamIcon.png | Bin 0 -> 1655 bytes src/mes/indexMes/assets/changePwd.svg | 6 ++++++ src/mes/indexMes/assets/clock.svg | 6 ++++++ src/mes/indexMes/assets/dateTimeIcon.png | Bin 0 -> 932 bytes src/mes/indexMes/assets/guideIcon.png | Bin 0 -> 1459 bytes src/mes/indexMes/assets/logo.png | Bin 0 -> 4104 bytes src/mes/indexMes/assets/logout.svg | 6 ++++++ src/mes/indexMes/assets/planTaskIcon.png | Bin 0 -> 1199 bytes src/mes/indexMes/assets/proExeIcon.png | Bin 0 -> 1426 bytes src/mes/indexMes/assets/queryTraceIcon.png | Bin 0 -> 1203 bytes src/mes/indexMes/assets/serviceIcon.png | Bin 0 -> 1355 bytes src/mes/indexMes/assets/shutdown.svg | 6 ++++++ src/mes/indexMes/assets/shutdownIcon.png | Bin 0 -> 901 bytes src/mes/indexMes/assets/systemIcon.png | Bin 0 -> 1083 bytes src/mes/indexMes/assets/teamIcon.png | Bin 0 -> 1491 bytes src/mes/indexMes/index.js | 1269 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/indexMes/index.less | 464 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/login/asstes/face.png | Bin 0 -> 2468 bytes src/mes/login/asstes/login.png | Bin 0 -> 2025614 bytes src/mes/login/asstes/logo.png | Bin 0 -> 2272 bytes src/mes/login/index.js | 581 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/login/index.less | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/operationGuide/assets/image1.png | Bin 0 -> 16917 bytes src/mes/operationGuide/assets/image2.png | Bin 0 -> 19188 bytes src/mes/operationGuide/assets/image3.png | Bin 0 -> 61242 bytes src/mes/operationGuide/assets/image4.png | Bin 0 -> 61400 bytes src/mes/operationGuide/assets/temp.jpg | Bin 0 -> 300350 bytes src/mes/operationGuide/assets/title1.png | Bin 0 -> 352 bytes src/mes/operationGuide/component/BroadsideCard.js | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/operationGuide/component/FlowChart.js | 410 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/operationGuide/index.js | 15 +++++++++++++++ src/mes/operationGuide/index.less | 248 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/productionExec/assets/folder.png | Bin 0 -> 511 bytes src/mes/productionExec/index.js | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/productionExec/index.less | 22 ++++++++++++++++++++++ src/mes/productionExec/noticeModal/index.js | 378 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/productionExec/noticeModal/index.less | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/productionExec/noticeModal/reportInfoButton.js | 221 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/productionExec/productionExecMain/index.js | 2618 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/productionExec/productionExecMain/index.less | 595 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/productionExec/productionExecMain/operationFetch.js | 40 ++++++++++++++++++++++++++++++++++++++++ src/mes/productionExec/quickSwitchTabComponent/index.js | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/productionExec/quickSwitchTabComponent/index.less | 36 ++++++++++++++++++++++++++++++++++++ src/mes/queryTracking/index.js | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/mes/queryTracking/index.less | 5 +++++ src/mes/scheduledTasks/abnormalEventReporting/index.js | 497 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/abnormalEventReporting/index.less | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/assets/annunciate.png | Bin 0 -> 547 bytes src/mes/scheduledTasks/assets/status.png | Bin 0 -> 615 bytes src/mes/scheduledTasks/assets/task.png | Bin 0 -> 690 bytes src/mes/scheduledTasks/assets/taskInfo.png | Bin 0 -> 338 bytes src/mes/scheduledTasks/assets/taskInfo2.png | Bin 0 -> 580 bytes src/mes/scheduledTasks/assets/taskIssue.png | Bin 0 -> 323 bytes src/mes/scheduledTasks/assets/temp.png | Bin 0 -> 424038 bytes src/mes/scheduledTasks/assets/time.png | Bin 0 -> 1020 bytes src/mes/scheduledTasks/index.js | 36 ++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/index.less | 5 +++++ src/mes/scheduledTasks/machineTasks/common/handlePause.js | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/machineTasks/index.js | 1164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/machineTasks/index.less | 463 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/prenatalReminderInfo/assets/1.png | Bin 0 -> 511 bytes src/mes/scheduledTasks/prenatalReminderInfo/assets/2.png | Bin 0 -> 528 bytes src/mes/scheduledTasks/prenatalReminderInfo/assets/3.png | Bin 0 -> 552 bytes src/mes/scheduledTasks/prenatalReminderInfo/assets/4.png | Bin 0 -> 635 bytes src/mes/scheduledTasks/prenatalReminderInfo/assets/5.png | Bin 0 -> 601 bytes src/mes/scheduledTasks/prenatalReminderInfo/assets/6.png | Bin 0 -> 553 bytes src/mes/scheduledTasks/prenatalReminderInfo/assets/7.png | Bin 0 -> 404 bytes src/mes/scheduledTasks/prenatalReminderInfo/index.js | 246 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/prenatalReminderInfo/index.less | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/processInstructionBook/index.js | 376 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/processInstructionBook/index.less | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/scheduledTasks/processInstructionBook/tempData.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/serviceUpkeep/equipmentRepair/index.js | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/serviceUpkeep/equipmentRepair/index.less | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/serviceUpkeep/index.js | 28 ++++++++++++++++++++++++++++ src/mes/serviceUpkeep/index.less | 5 +++++ src/mes/teamInfo/assets/face.png | Bin 0 -> 2468 bytes src/mes/teamInfo/assets/joinIcon.png | Bin 0 -> 983 bytes src/mes/teamInfo/assets/teaIcon.png | Bin 0 -> 1655 bytes src/mes/teamInfo/assets/temp.jpg | Bin 0 -> 202459 bytes src/mes/teamInfo/assets/user.jpg | Bin 0 -> 41846 bytes src/mes/teamInfo/assets/userImgs.png | Bin 0 -> 44617 bytes src/mes/teamInfo/index.js | 765 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mes/teamInfo/index.less | 245 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/mixins.less | 10 ++++++++++ src/models/app.js | 689 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/models/content.js | 293 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/models/index.js | 18 ++++++++++++++++++ src/models/login.js | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/models/loginMes.js | 42 ++++++++++++++++++++++++++++++++++++++++++ src/models/loginOee.js | 41 +++++++++++++++++++++++++++++++++++++++++ src/models/menuPanel.js | 29 +++++++++++++++++++++++++++++ src/oee/common/AffixOeeMenu.js | 627 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/commonOeeBill.js | 3165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/commonOeeReport.js | 342 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/indexOee.js | 935 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oee.less | 1001 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeChooseEmployee.js | 281 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeCommonList.js | 266 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeCommonListTab.js | 1532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeCurrentState.js | 669 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeDownCountTime.js | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeKeyBoard.css | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeKeyBoard.js | 420 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeLabelPrint.js | 360 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeProcessReport.js | 249 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeSearchComponent.js | 246 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeStartWork.js | 3011 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeToolBar.js | 47 +++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeToolBarNew.js | 2050 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/common/oeeWagesSearch.js | 264 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/login/LoginOee.js | 733 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/oee/login/LoginOee.less | 268 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/pad/indexPad/index.js | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/pad/indexPad/index.less | 18 ++++++++++++++++++ src/pad/setCountModalComponent/index.js | 461 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/pad/setCountModalComponent/index.less | 41 +++++++++++++++++++++++++++++++++++++++++ src/pad/verifyScrapBill/index.js | 675 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/pad/verifyScrapBill/index.less | 237 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/pad/verifyScrapList/index.js | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/pad/verifyScrapList/index.less | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/router.js | 30 ++++++++++++++++++++++++++++++ src/routes/IndexPage.less | 382 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/routes/mes/indexMes.js | 42 ++++++++++++++++++++++++++++++++++++++++++ src/routes/mes/login.js | 16 ++++++++++++++++ src/routes/mes/routerComponent.js | 42 ++++++++++++++++++++++++++++++++++++++++++ src/routes/oee/common/commonOeeBill.js | 36 ++++++++++++++++++++++++++++++++++++ src/routes/oee/common/commonOeeRepot.js | 35 +++++++++++++++++++++++++++++++++++ src/routes/oee/common/indexOee.js | 34 ++++++++++++++++++++++++++++++++++ src/routes/oee/common/oeeChooseEmployee.js | 37 +++++++++++++++++++++++++++++++++++++ src/routes/oee/common/oeeCommonList.js | 29 +++++++++++++++++++++++++++++ src/routes/oee/common/oeeCommonListTab.js | 29 +++++++++++++++++++++++++++++ src/routes/oee/common/oeeCurrentState.js | 39 +++++++++++++++++++++++++++++++++++++++ src/routes/oee/common/oeeProcessReport.js | 34 ++++++++++++++++++++++++++++++++++ src/routes/oee/common/oeeStartWork.js | 34 ++++++++++++++++++++++++++++++++++ src/routes/oee/common/oeeWagesSearch.js | 29 +++++++++++++++++++++++++++++ src/routes/oee/login/LoginOee.js | 35 +++++++++++++++++++++++++++++++++++ src/routes/pad/indexPad.js | 26 ++++++++++++++++++++++++++ src/services/services.js | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/utils/config.js | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/utils/request.js | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/utils/utils.js | 590 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/variable.less | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ webpack.config.js | 41 +++++++++++++++++++++++++++++++++++++++++ 456 files changed, 115415 insertions(+), 0 deletions(-) create mode 100644 .editorconfig create mode 100644 .eslintrc create mode 100644 .gitignore create mode 100644 .webpackrc.js create mode 100644 package.json create mode 100644 public/MES关键操作说明.xlsx create mode 100644 public/MES打印机更换纸张后亮红灯解决方法.pdf create mode 100644 public/favicon.ico create mode 100644 public/index.html create mode 100644 public/x6.js create mode 100644 public/数字工厂MES系统操作指引.pdf create mode 100644 public/车间MES打印机更换纸张.pdf create mode 100644 src/assets/add.svg create mode 100644 src/assets/addChild.svg create mode 100644 src/assets/areas.json create mode 100644 src/assets/btnComponentIcon/1.png create mode 100644 src/assets/btnComponentIcon/10.png create mode 100644 src/assets/btnComponentIcon/10_1.png create mode 100644 src/assets/btnComponentIcon/11.png create mode 100644 src/assets/btnComponentIcon/11_1.png create mode 100644 src/assets/btnComponentIcon/12.png create mode 100644 src/assets/btnComponentIcon/12_1.png create mode 100644 src/assets/btnComponentIcon/13.png create mode 100644 src/assets/btnComponentIcon/13_1.png create mode 100644 src/assets/btnComponentIcon/14.png create mode 100644 src/assets/btnComponentIcon/14_1.png create mode 100644 src/assets/btnComponentIcon/15.png create mode 100644 src/assets/btnComponentIcon/15_1.png create mode 100644 src/assets/btnComponentIcon/16.png create mode 100644 src/assets/btnComponentIcon/16_1.png create mode 100644 src/assets/btnComponentIcon/17.png create mode 100644 src/assets/btnComponentIcon/17_1.png create mode 100644 src/assets/btnComponentIcon/18.png create mode 100644 src/assets/btnComponentIcon/18_1.png create mode 100644 src/assets/btnComponentIcon/19.png create mode 100644 src/assets/btnComponentIcon/19_1.png create mode 100644 src/assets/btnComponentIcon/1_1.png create mode 100644 src/assets/btnComponentIcon/2.png create mode 100644 src/assets/btnComponentIcon/20.png create mode 100644 src/assets/btnComponentIcon/20_1.png create mode 100644 src/assets/btnComponentIcon/21.png create mode 100644 src/assets/btnComponentIcon/21_1.png create mode 100644 src/assets/btnComponentIcon/22.png create mode 100644 src/assets/btnComponentIcon/22_1.png create mode 100644 src/assets/btnComponentIcon/23.png create mode 100644 src/assets/btnComponentIcon/23_1.png create mode 100644 src/assets/btnComponentIcon/24.png create mode 100644 src/assets/btnComponentIcon/24_1.png create mode 100644 src/assets/btnComponentIcon/2_1.png create mode 100644 src/assets/btnComponentIcon/3.png create mode 100644 src/assets/btnComponentIcon/3_1.png create mode 100644 src/assets/btnComponentIcon/4.png create mode 100644 src/assets/btnComponentIcon/4_1.png create mode 100644 src/assets/btnComponentIcon/5.png create mode 100644 src/assets/btnComponentIcon/5_1.png create mode 100644 src/assets/btnComponentIcon/6.png create mode 100644 src/assets/btnComponentIcon/6_1.png create mode 100644 src/assets/btnComponentIcon/7.png create mode 100644 src/assets/btnComponentIcon/7_1.png create mode 100644 src/assets/btnComponentIcon/8.png create mode 100644 src/assets/btnComponentIcon/8_1.png create mode 100644 src/assets/btnComponentIcon/9.png create mode 100644 src/assets/btnComponentIcon/9_1.png create mode 100644 src/assets/cities.json create mode 100644 src/assets/close.svg create mode 100644 src/assets/copy.svg create mode 100644 src/assets/copyall.svg create mode 100644 src/assets/default2.png create mode 100644 src/assets/delete.svg create mode 100644 src/assets/disableadd.svg create mode 100644 src/assets/disableaddChild.svg create mode 100644 src/assets/disablecopy.svg create mode 100644 src/assets/disablecopyall.svg create mode 100644 src/assets/disabledelete.svg create mode 100644 src/assets/disablematerial.svg create mode 100644 src/assets/disablematerialremark.svg create mode 100644 src/assets/disableprocess.svg create mode 100644 src/assets/eject.svg create mode 100644 src/assets/ejectleft.svg create mode 100644 src/assets/file.svg create mode 100644 src/assets/file_single.svg create mode 100644 src/assets/foot_logo.png create mode 100644 src/assets/footer_logo.png create mode 100644 src/assets/hasChecked.svg create mode 100644 src/assets/haveCancel.png create mode 100644 src/assets/haveChecked.png create mode 100644 src/assets/haveChecking.svg create mode 100644 src/assets/icons/index.js create mode 100644 src/assets/icons/svg/Frame 55.svg create mode 100644 src/assets/icons/svg/Frame 60.svg create mode 100644 src/assets/icons/svg/Frame 67.svg create mode 100644 src/assets/icons/svg/Frame 82.svg create mode 100644 src/assets/icons/svg/Frame 83.svg create mode 100644 src/assets/icons/svg/Frame 84.svg create mode 100644 src/assets/icons/svg/Frame 87.svg create mode 100644 src/assets/icons/svg/Frame 88.svg create mode 100644 src/assets/icons/svg/Frame 89.svg create mode 100644 src/assets/icons/svg/Frame 90.svg create mode 100644 src/assets/icons/svg/Frame 91.svg create mode 100644 src/assets/icons/svg/_account.svg create mode 100644 src/assets/icons/svg/_add.svg create mode 100644 src/assets/icons/svg/_bottom.svg create mode 100644 src/assets/icons/svg/_calculator.svg create mode 100644 src/assets/icons/svg/_card.svg create mode 100644 src/assets/icons/svg/_check.svg create mode 100644 src/assets/icons/svg/_close.svg create mode 100644 src/assets/icons/svg/_copy.svg create mode 100644 src/assets/icons/svg/_copyall.svg create mode 100644 src/assets/icons/svg/_custom.svg create mode 100644 src/assets/icons/svg/_delete.svg create mode 100644 src/assets/icons/svg/_edit.svg create mode 100644 src/assets/icons/svg/_export.svg create mode 100644 src/assets/icons/svg/_function.svg create mode 100644 src/assets/icons/svg/_function2.svg create mode 100644 src/assets/icons/svg/_gen.svg create mode 100644 src/assets/icons/svg/_material.svg create mode 100644 src/assets/icons/svg/_next.svg create mode 100644 src/assets/icons/svg/_nextpage.svg create mode 100644 src/assets/icons/svg/_password.svg create mode 100644 src/assets/icons/svg/_plus.svg create mode 100644 src/assets/icons/svg/_prevpage.svg create mode 100644 src/assets/icons/svg/_printer.svg create mode 100644 src/assets/icons/svg/_process.svg create mode 100644 src/assets/icons/svg/_reload.svg create mode 100644 src/assets/icons/svg/_rollback.svg create mode 100644 src/assets/icons/svg/_save.svg create mode 100644 src/assets/icons/svg/_search.svg create mode 100644 src/assets/icons/svg/_setting.svg create mode 100644 src/assets/icons/svg/_top.svg create mode 100644 src/assets/icons/svg/_tree.svg create mode 100644 src/assets/icons/svg/_upload.svg create mode 100644 src/assets/icons/svg/gongneng.svg create mode 100644 src/assets/icons/svg/jiahao.svg create mode 100644 src/assets/icons/svg/jiahao_1 1.svg create mode 100644 src/assets/icons/svg/quxiaoshenhe.svg create mode 100644 src/assets/icons/svg/shengchengshoukuandan.svg create mode 100644 src/assets/icons/svg/xiangmubujian 1.svg create mode 100644 src/assets/logo.png create mode 100644 src/assets/logo_pic.png create mode 100644 src/assets/material.svg create mode 100644 src/assets/materialremark.svg create mode 100644 src/assets/oee/addFill.svg create mode 100644 src/assets/oee/addState.svg create mode 100644 src/assets/oee/brint.svg create mode 100644 src/assets/oee/changeWork.svg create mode 100644 src/assets/oee/close.svg create mode 100644 src/assets/oee/commonIcon.svg create mode 100644 src/assets/oee/company.svg create mode 100644 src/assets/oee/currentState.svg create mode 100644 src/assets/oee/del.png create mode 100644 src/assets/oee/del0.png create mode 100644 src/assets/oee/dete.svg create mode 100644 src/assets/oee/facereg.svg create mode 100644 src/assets/oee/facescan.svg create mode 100644 src/assets/oee/fileManage.svg create mode 100644 src/assets/oee/firstTing.svg create mode 100644 src/assets/oee/loginCompany.png create mode 100644 src/assets/oee/logo.png create mode 100644 src/assets/oee/panle.svg create mode 100644 src/assets/oee/passWord.svg create mode 100644 src/assets/oee/processRepoort.svg create mode 100644 src/assets/oee/productWork.svg create mode 100644 src/assets/oee/qr2.png create mode 100644 src/assets/oee/refresh0.png create mode 100644 src/assets/oee/right.svg create mode 100644 src/assets/oee/see.svg create mode 100644 src/assets/oee/setting.svg create mode 100644 src/assets/oee/team.svg create mode 100644 src/assets/oee/voice0.png create mode 100644 src/assets/oee/wages.svg create mode 100644 src/assets/param.svg create mode 100644 src/assets/process.svg create mode 100644 src/assets/prompt.png create mode 100644 src/assets/provinces.json create mode 100644 src/assets/quanping.svg create mode 100644 src/assets/treematerial.svg create mode 100644 src/assets/treeprocess.svg create mode 100644 src/components/Charts/Bar/index.js create mode 100644 src/components/Charts/BrokenLine/index.js create mode 100644 src/components/Charts/ColorBlock/index.js create mode 100644 src/components/Charts/Columnar/index.js create mode 100644 src/components/Charts/ColumnarGroup/index.js create mode 100644 src/components/Charts/ColumnarStack/index.js create mode 100644 src/components/Charts/EqualColumnarStack/index.js create mode 100644 src/components/Charts/Gantt/Gantt.css create mode 100644 src/components/Charts/Gantt/MessageArea/Message.js create mode 100644 src/components/Charts/Gantt/MessageArea/MessageArea.css create mode 100644 src/components/Charts/Gantt/MessageArea/index.js create mode 100644 src/components/Charts/Gantt/index.js create mode 100644 src/components/Charts/Gauge/index.js create mode 100644 src/components/Charts/Pie/index.js create mode 100644 src/components/Charts/Pie/index.less create mode 100644 src/components/Charts/PieGroup/index.js create mode 100644 src/components/Charts/TimeLineGroup/index.js create mode 100644 src/components/Charts/TimelineChart/index.js create mode 100644 src/components/Charts/TimelineChart/index.less create mode 100644 src/components/Charts/WaterWave/index.js create mode 100644 src/components/Charts/WaterWave/index.less create mode 100644 src/components/Charts/equal.js create mode 100644 src/components/Charts/index.js create mode 100644 src/components/Charts/index.less create mode 100644 src/components/Common/AntdDraggableDiv.js create mode 100644 src/components/Common/AntdDraggableModal.js create mode 100644 src/components/Common/AntdDraggableModal/antDraggle.less create mode 100644 src/components/Common/ComFunc.js create mode 100644 src/components/Common/CommonBase.js create mode 100644 src/components/Common/CommonBillEvent.js create mode 100644 src/components/Common/CommonComponent/index.js create mode 100644 src/components/Common/CommonComponent/index_new.js create mode 100644 src/components/Common/CommonHooks/useCommonBase.js create mode 100644 src/components/Common/CommonHooks/useCommonHooksTestEvent.js create mode 100644 src/components/Common/CommonInstructSet.js create mode 100644 src/components/Common/CommonListEvent.js create mode 100644 src/components/Common/CommonListSelect/index.js create mode 100644 src/components/Common/CommonListSelect/index.less create mode 100644 src/components/Common/CommonListSelectTree/index.js create mode 100644 src/components/Common/CommonListTabEvent.js create mode 100644 src/components/Common/CommonListTreeEvent.js create mode 100644 src/components/Common/CommonListTreeSelect/index.js create mode 100644 src/components/Common/CommonSubBillEvent.js create mode 100644 src/components/Common/CommonTable/index.js create mode 100644 src/components/Common/CommonTable/index.less create mode 100644 src/components/Common/CommonView/index.js create mode 100644 src/components/Common/CommonView/index.less create mode 100644 src/components/Common/CommonViewDrag/index.js create mode 100644 src/components/Common/CommonViewDrag/index.less create mode 100644 src/components/Common/CommonViewDragable/index.js create mode 100644 src/components/Common/CommonViewDragable/index.less create mode 100644 src/components/Common/CommonViewDragable/rglUtils.js create mode 100644 src/components/Common/CommonViewTable/index.js create mode 100644 src/components/Common/CommonViewTable/index.less create mode 100644 src/components/Common/ContextMenuModal.js create mode 100644 src/components/Common/CostomHooks/useGetData.js create mode 100644 src/components/Common/CostomHooks/useTitleChange.js create mode 100644 src/components/Common/OfficePreview/index.js create mode 100644 src/components/Common/ReactDebounce/config.js create mode 100644 src/components/Common/ReactDebounce/debounce.js create mode 100644 src/components/Common/ReactDebounce/index.jsx create mode 100644 src/components/Common/ReactDebounce/merge-config.js create mode 100644 src/components/Common/ReactDebounce/should-update.js create mode 100644 src/components/Common/SearchComponent/index.js create mode 100644 src/components/Common/SearchComponent/index.less create mode 100644 src/components/Common/ShowImage/ShowImage.js create mode 100644 src/components/Common/ShowImage/ShowImage.less create mode 100644 src/components/Common/SlaveMemo.js create mode 100644 src/components/Common/Tree/StaticTree.js create mode 100644 src/components/Common/Tree/Tree.css create mode 100644 src/components/Common/commonBusiness.js create mode 100644 src/components/Common/commonFunc.js create mode 100644 src/components/Draggable/index.js create mode 100644 src/components/Draggable/index.less create mode 100644 src/components/FaceDetect/index.js create mode 100644 src/components/FaceDetect/index.less create mode 100644 src/components/NumberInfo/index.js create mode 100644 src/components/NumberInfo/index.less create mode 100644 src/components/PrintPdf/PreviewPdf.js create mode 100644 src/components/PrintPdf/PrintPdf.js create mode 100644 src/components/PrintPdf/printpdf.less create mode 100644 src/components/SvgIcon/index.js create mode 100644 src/components/Tab/TabComponent.js create mode 100644 src/components/Tab/index.less create mode 100644 src/components/Vlist/index.js create mode 100644 src/components/Vlist/index.less create mode 100644 src/components/Vlist/index_back.js create mode 100644 src/components/VlistNew/index.js create mode 100644 src/default.less create mode 100644 src/g2.js create mode 100644 src/index.ejs create mode 100644 src/index.js create mode 100644 src/index.less create mode 100644 src/indexNew.less create mode 100644 src/mes/common/RunningStatus/index.js create mode 100644 src/mes/common/RunningStatus/index.less create mode 100644 src/mes/common/buttonComponent/index.js create mode 100644 src/mes/common/buttonComponent/index.less create mode 100644 src/mes/common/choosePalletComponent/index.js create mode 100644 src/mes/common/choosePalletComponent/index.less create mode 100644 src/mes/common/commonFilePreviewComponent/index.js create mode 100644 src/mes/common/commonFilePreviewComponent/index.less create mode 100644 src/mes/common/commonModalComponent/index.js create mode 100644 src/mes/common/commonModalComponent/index.less create mode 100644 src/mes/common/commonModelComponent/Table/SWasteType/Modal.jsx create mode 100644 src/mes/common/commonModelComponent/Table/SWasteType/index.jsx create mode 100644 src/mes/common/commonModelComponent/Table/SWasteType/index.less create mode 100644 src/mes/common/commonModelComponent/index.js create mode 100644 src/mes/common/commonModelComponent/index.less create mode 100644 src/mes/common/commonOperationBarComponent/index.js create mode 100644 src/mes/common/commonOperationBarComponent/index.less create mode 100644 src/mes/common/commonOperationBarComponent/qrScan.js create mode 100644 src/mes/common/faceCollectionComponent/index.js create mode 100644 src/mes/common/faceCollectionComponent/index.less create mode 100644 src/mes/common/inputMultiModalComponent/index.js create mode 100644 src/mes/common/inputMultiModalComponent/index.less create mode 100644 src/mes/common/routerComponent/index.js create mode 100644 src/mes/common/siderInfoComponent/assets/facilityIcon.png create mode 100644 src/mes/common/siderInfoComponent/assets/groupIcon.png create mode 100644 src/mes/common/siderInfoComponent/assets/taskIcon.png create mode 100644 src/mes/common/siderInfoComponent/assets/user.jpg create mode 100644 src/mes/common/siderInfoComponent/assets/userPost.png create mode 100644 src/mes/common/siderInfoComponent/clockComponent/index.js create mode 100644 src/mes/common/siderInfoComponent/clockComponent/index.less create mode 100644 src/mes/common/siderInfoComponent/index.js create mode 100644 src/mes/common/siderInfoComponent/index.less create mode 100644 src/mes/common/tbTimeModalComponent/index.js create mode 100644 src/mes/common/tbTimeModalComponent/index.less create mode 100644 src/mes/costomPageFun/index.js create mode 100644 src/mes/indexMes/assets/c_guideIcon.png create mode 100644 src/mes/indexMes/assets/c_planTaskIcon.png create mode 100644 src/mes/indexMes/assets/c_proExeIcon.png create mode 100644 src/mes/indexMes/assets/c_queryTraceIcon.png create mode 100644 src/mes/indexMes/assets/c_serviceIcon.png create mode 100644 src/mes/indexMes/assets/c_systemIcon.png create mode 100644 src/mes/indexMes/assets/c_teamIcon.png create mode 100644 src/mes/indexMes/assets/changePwd.svg create mode 100644 src/mes/indexMes/assets/clock.svg create mode 100644 src/mes/indexMes/assets/dateTimeIcon.png create mode 100644 src/mes/indexMes/assets/guideIcon.png create mode 100644 src/mes/indexMes/assets/logo.png create mode 100644 src/mes/indexMes/assets/logout.svg create mode 100644 src/mes/indexMes/assets/planTaskIcon.png create mode 100644 src/mes/indexMes/assets/proExeIcon.png create mode 100644 src/mes/indexMes/assets/queryTraceIcon.png create mode 100644 src/mes/indexMes/assets/serviceIcon.png create mode 100644 src/mes/indexMes/assets/shutdown.svg create mode 100644 src/mes/indexMes/assets/shutdownIcon.png create mode 100644 src/mes/indexMes/assets/systemIcon.png create mode 100644 src/mes/indexMes/assets/teamIcon.png create mode 100644 src/mes/indexMes/index.js create mode 100644 src/mes/indexMes/index.less create mode 100644 src/mes/login/asstes/face.png create mode 100644 src/mes/login/asstes/login.png create mode 100644 src/mes/login/asstes/logo.png create mode 100644 src/mes/login/index.js create mode 100644 src/mes/login/index.less create mode 100644 src/mes/operationGuide/assets/image1.png create mode 100644 src/mes/operationGuide/assets/image2.png create mode 100644 src/mes/operationGuide/assets/image3.png create mode 100644 src/mes/operationGuide/assets/image4.png create mode 100644 src/mes/operationGuide/assets/temp.jpg create mode 100644 src/mes/operationGuide/assets/title1.png create mode 100644 src/mes/operationGuide/component/BroadsideCard.js create mode 100644 src/mes/operationGuide/component/FlowChart.js create mode 100644 src/mes/operationGuide/index.js create mode 100644 src/mes/operationGuide/index.less create mode 100644 src/mes/productionExec/assets/folder.png create mode 100644 src/mes/productionExec/index.js create mode 100644 src/mes/productionExec/index.less create mode 100644 src/mes/productionExec/noticeModal/index.js create mode 100644 src/mes/productionExec/noticeModal/index.less create mode 100644 src/mes/productionExec/noticeModal/reportInfoButton.js create mode 100644 src/mes/productionExec/productionExecMain/index.js create mode 100644 src/mes/productionExec/productionExecMain/index.less create mode 100644 src/mes/productionExec/productionExecMain/operationFetch.js create mode 100644 src/mes/productionExec/quickSwitchTabComponent/index.js create mode 100644 src/mes/productionExec/quickSwitchTabComponent/index.less create mode 100644 src/mes/queryTracking/index.js create mode 100644 src/mes/queryTracking/index.less create mode 100644 src/mes/scheduledTasks/abnormalEventReporting/index.js create mode 100644 src/mes/scheduledTasks/abnormalEventReporting/index.less create mode 100644 src/mes/scheduledTasks/assets/annunciate.png create mode 100644 src/mes/scheduledTasks/assets/status.png create mode 100644 src/mes/scheduledTasks/assets/task.png create mode 100644 src/mes/scheduledTasks/assets/taskInfo.png create mode 100644 src/mes/scheduledTasks/assets/taskInfo2.png create mode 100644 src/mes/scheduledTasks/assets/taskIssue.png create mode 100644 src/mes/scheduledTasks/assets/temp.png create mode 100644 src/mes/scheduledTasks/assets/time.png create mode 100644 src/mes/scheduledTasks/index.js create mode 100644 src/mes/scheduledTasks/index.less create mode 100644 src/mes/scheduledTasks/machineTasks/common/handlePause.js create mode 100644 src/mes/scheduledTasks/machineTasks/index.js create mode 100644 src/mes/scheduledTasks/machineTasks/index.less create mode 100644 src/mes/scheduledTasks/prenatalReminderInfo/assets/1.png create mode 100644 src/mes/scheduledTasks/prenatalReminderInfo/assets/2.png create mode 100644 src/mes/scheduledTasks/prenatalReminderInfo/assets/3.png create mode 100644 src/mes/scheduledTasks/prenatalReminderInfo/assets/4.png create mode 100644 src/mes/scheduledTasks/prenatalReminderInfo/assets/5.png create mode 100644 src/mes/scheduledTasks/prenatalReminderInfo/assets/6.png create mode 100644 src/mes/scheduledTasks/prenatalReminderInfo/assets/7.png create mode 100644 src/mes/scheduledTasks/prenatalReminderInfo/index.js create mode 100644 src/mes/scheduledTasks/prenatalReminderInfo/index.less create mode 100644 src/mes/scheduledTasks/processInstructionBook/index.js create mode 100644 src/mes/scheduledTasks/processInstructionBook/index.less create mode 100644 src/mes/scheduledTasks/processInstructionBook/tempData.js create mode 100644 src/mes/serviceUpkeep/equipmentRepair/index.js create mode 100644 src/mes/serviceUpkeep/equipmentRepair/index.less create mode 100644 src/mes/serviceUpkeep/index.js create mode 100644 src/mes/serviceUpkeep/index.less create mode 100644 src/mes/teamInfo/assets/face.png create mode 100644 src/mes/teamInfo/assets/joinIcon.png create mode 100644 src/mes/teamInfo/assets/teaIcon.png create mode 100644 src/mes/teamInfo/assets/temp.jpg create mode 100644 src/mes/teamInfo/assets/user.jpg create mode 100644 src/mes/teamInfo/assets/userImgs.png create mode 100644 src/mes/teamInfo/index.js create mode 100644 src/mes/teamInfo/index.less create mode 100644 src/mixins.less create mode 100644 src/models/app.js create mode 100644 src/models/content.js create mode 100644 src/models/index.js create mode 100644 src/models/login.js create mode 100644 src/models/loginMes.js create mode 100644 src/models/loginOee.js create mode 100644 src/models/menuPanel.js create mode 100644 src/oee/common/AffixOeeMenu.js create mode 100644 src/oee/common/commonOeeBill.js create mode 100644 src/oee/common/commonOeeReport.js create mode 100644 src/oee/common/indexOee.js create mode 100644 src/oee/common/oee.less create mode 100644 src/oee/common/oeeChooseEmployee.js create mode 100644 src/oee/common/oeeCommonList.js create mode 100644 src/oee/common/oeeCommonListTab.js create mode 100644 src/oee/common/oeeCurrentState.js create mode 100644 src/oee/common/oeeDownCountTime.js create mode 100644 src/oee/common/oeeKeyBoard.css create mode 100644 src/oee/common/oeeKeyBoard.js create mode 100644 src/oee/common/oeeLabelPrint.js create mode 100644 src/oee/common/oeeProcessReport.js create mode 100644 src/oee/common/oeeSearchComponent.js create mode 100644 src/oee/common/oeeStartWork.js create mode 100644 src/oee/common/oeeToolBar.js create mode 100644 src/oee/common/oeeToolBarNew.js create mode 100644 src/oee/common/oeeWagesSearch.js create mode 100644 src/oee/login/LoginOee.js create mode 100644 src/oee/login/LoginOee.less create mode 100644 src/pad/indexPad/index.js create mode 100644 src/pad/indexPad/index.less create mode 100644 src/pad/setCountModalComponent/index.js create mode 100644 src/pad/setCountModalComponent/index.less create mode 100644 src/pad/verifyScrapBill/index.js create mode 100644 src/pad/verifyScrapBill/index.less create mode 100644 src/pad/verifyScrapList/index.js create mode 100644 src/pad/verifyScrapList/index.less create mode 100644 src/router.js create mode 100644 src/routes/IndexPage.less create mode 100644 src/routes/mes/indexMes.js create mode 100644 src/routes/mes/login.js create mode 100644 src/routes/mes/routerComponent.js create mode 100644 src/routes/oee/common/commonOeeBill.js create mode 100644 src/routes/oee/common/commonOeeRepot.js create mode 100644 src/routes/oee/common/indexOee.js create mode 100644 src/routes/oee/common/oeeChooseEmployee.js create mode 100644 src/routes/oee/common/oeeCommonList.js create mode 100644 src/routes/oee/common/oeeCommonListTab.js create mode 100644 src/routes/oee/common/oeeCurrentState.js create mode 100644 src/routes/oee/common/oeeProcessReport.js create mode 100644 src/routes/oee/common/oeeStartWork.js create mode 100644 src/routes/oee/common/oeeWagesSearch.js create mode 100644 src/routes/oee/login/LoginOee.js create mode 100644 src/routes/pad/indexPad.js create mode 100644 src/services/services.js create mode 100644 src/utils/config.js create mode 100644 src/utils/request.js create mode 100644 src/utils/utils.js create mode 100644 src/variable.less create mode 100644 webpack.config.js diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7e3649a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..a9bc8b1 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,60 @@ +{ + "parser": "babel-eslint", + // "extends": "airbnb", + "env": { + "browser": true, + "node": true, + "es6": true, + "mocha": true, + "jest": true, + "jasmine": true + }, + "plugins": [ + "jsx-a11y" + ], + "rules": { + "arrow-body-style": [0], + "consistent-return": [0], + "generator-star-spacing": [0], + "global-require": [1], + "import/extensions": [0], + "import/no-extraneous-dependencies": [0], + "import/no-unresolved": [0], + "import/prefer-default-export": [0], + "jsx-a11y/no-static-element-interactions": [0], + "jsx-a11y/anchor-is-valid": [ "error", { + "components": [ "Link" ], + "specialLink": [ "hrefLeft", "hrefRight" ], + "aspects": [ "noHref", "invalidHref", "preferButton" ] + }], + "no-restricted-globals": ["error", "event", "fdescribe"], + "jsx-a11y/click-events-have-key-events": [0], + "no-bitwise": [0], + "no-cond-assign": [0], + "no-else-return": [0], + "no-nested-ternary": [0], + "no-restricted-syntax": [0], + "no-use-before-define": [0], + "react/forbid-prop-types": [0], + "react/jsx-filename-extension": [1, { "extensions": [".js"] }], + "react/jsx-no-bind": [0], + "react/prefer-stateless-function": [0], + "react/prop-types": [0], + "require-yield": [1], + "linebreak-style": 0, //去除eslint控制 LF/CRLF的判断 //packjson.json "set port=9000&&roadhog server" + "max-len": [0, 200, 4], //每行太多老要回车 + "no-param-reassign": [0], //禁止给参数重新赋值 + "react/no-multi-comp": [0], + "no-shadow": [0], + "no-await-in-loop": [0], + "camelcase": [1, {"properties": "never"}] + }, + "parserOptions": { + "ecmaFeatures": { + "experimentalObjectRestSpread": true + } + }, + "ignorePatterns": [ + "*.html" + ] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cf125a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.idea +package-lock.json +pnpm-lock.yaml +# production +/dist + +# misc +.DS_Store +npm-debug.log* +/.history +/*.zip diff --git a/.webpackrc.js b/.webpackrc.js new file mode 100644 index 0000000..b636823 --- /dev/null +++ b/.webpackrc.js @@ -0,0 +1,75 @@ +export default { + "entry": { + index: "./src/index.js", + "vendor": [ + "react", + "react-dom", + "dva", + "prop-types", + "lodash", + "classnames" + ], + "antd": [ + "antd/lib/button", + "antd/lib/icon", + "antd/lib/breadcrumb", + "antd/lib/form", + "antd/lib/menu", + "antd/lib/input", + "antd/lib/input-number", + "antd/lib/dropdown", + "antd/lib/table", + "antd/lib/tabs", + "antd/lib/modal", + "antd/lib/row", + "antd/lib/col" + ], + "components":[ + "./src/components/Common/CommonComponent" + ] + }, + "disableCSSModules": false, + "publicPath": "/", + "hash": true, + "extraBabelPlugins": [ + ["import", { "libraryName": "antd"}, "pc"], + ["import", { "libraryName": "antd-mobile", "style": true }, "mobile"] + ], + "env": { + "development": { + "extraBabelPlugins": [ + "dva-hmr", "dynamic-import-node" + ], + }, + "dllPlugin": { + "exclude": [ + "babel-runtime", + "roadhog" + ], + "include": [ + "dva/router", + "dva/saga", + "dva/fetch" + ] + } + }, + "commons": [ + { + "names": ["vendor", "antd", "components"], + "minChunks": "Infinity" + } + ], + "lessLoaderOptions": { + "javascriptEnabled": true + }, + "theme": { + "@primary-color": "#1890FF", + "@link-color": "#1890FF", + "@table-header-bg": '#e6e6e6', + "@disabled-bg": '#fff', + "@table-border-color": '#AAA', + "@border-color-split": '#AAA', + "@font-family": "Monospaced Number, Chinese Quote, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif", + }, + "html": { "template": "./src/index.ejs" } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..cadc844 --- /dev/null +++ b/package.json @@ -0,0 +1,152 @@ +{ + "name": "dik-dik", + "version": "1.0.5", + "private": true, + "scripts": { + "start": "set port=8543&roadhog server --progress --watch --colors --profile", + "build": "roadhog build", + "lint": "eslint --ext .js src test", + "precommit": "npm run lint" + }, + "engines": { + "install-node": "6.9.2" + }, + "dependencies": { + "@ant-design/compatible": "^1.0.8", + "@ant-design/icons": "^4.6.2", + "@antv/data-set": "0.10.1", + "@antv/g2": "^4.1.24", + "@js-preview/docx": "^1.3.0", + "@js-preview/excel": "^1.4.4", + "@js-preview/pdf": "^2.0.3", + "ahooks": "^2.10.9", + "antd": "^4.24.15", + "antd-mobile": "^2.3.1", + "babel-plugin-transform-decorators-legacy": "1.3.5", + "babel-polyfill": "6.26.0", + "babel-runtime": "6.26.0", + "classnames": "^2.2.6", + "copy-to-clipboard": "^3.3.1", + "core-js": "2.5.7", + "dhtmlx-gantt": "^7.1.6", + "dva": "^2.4.1", + "dva-router-config": "^1.1.0", + "g-cloud": "1.0.2-beta", + "g2": "2.3.13", + "g2-plugin-slider": "1.2.1", + "history": "5.0.0", + "ignore-loader": "^0.1.2", + "immutability-helper": "^3.0.1", + "jsqr": "^1.3.1", + "lodash": "4.17.11", + "lodash-decorators": "6.0.0", + "lodash.clonedeep": "4.5.0", + "moment": "2.22.2", + "numeral": "2.0.6", + "prop-types": "15.6.2", + "qs": "6.5.2", + "rc-form": "^2.4.11", + "react": "^17.0.2", + "react-container-query": "0.11.0", + "react-dnd": "^14.0.2", + "react-dnd-html5-backend": "^14.0.0", + "react-document-title": "2.0.3", + "react-dom": "^17.0.2", + "react-draggable": "4.4.5", + "react-fittext": "1.0.0", + "react-flow-renderer": "^10.3.16", + "react-grid-layout": "1.3.4", + "react-highlight-words": "0.16.0", + "react-hot-keys": "1.3.1", + "react-pdf": "^5.5.0", + "react-resizable": "^3.0.4", + "react-sortable-hoc": "^2.0.0", + "react-window": "^1.8.6", + "sortablejs": "^1.15.0", + "terser-webpack-plugin-legacy": "^1.2.5", + "url-loader": "^4.1.1" + }, + "devDependencies": { + "antd-mobile-icons": "^0.3.0", + "babel-eslint": "8.2.5", + "babel-jest": "21.0.0", + "babel-plugin-dva-hmr": "0.4.1", + "babel-plugin-dynamic-import-node": "^2.3.3", + "babel-plugin-import": "1.11.0", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-plugin-transform-decorators-legacy": "1.3.4", + "babel-plugin-transform-runtime": "6.23.0", + "babel-preset-env": "1.7.0", + "babel-preset-react": "6.24.1", + "braft-editor": "^2.3.9", + "cross-env": "5.2.0", + "cross-port-killer": "1.0.1", + "dva-router-config": "^1.1.0", + "enzyme": "3.7.0", + "enzyme-adapter-react-16": "1.6.0", + "eslint": "4.19.1", + "eslint-config-airbnb": "16.1.0", + "eslint-plugin-babel": "4.1.2", + "eslint-plugin-compat": "2.6.2", + "eslint-plugin-import": "2.14.0", + "eslint-plugin-jsx-a11y": "6.1.2", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-react": "7.11.1", + "expect": "1.20.2", + "gh-pages": "1.2.0", + "husky": "0.14.3", + "jest": "21.2.1", + "lint-staged": "4.3.0", + "lodash.flow": "^3.5.0", + "mockjs": "1.0.1-beta3", + "prettier": "1.14.3", + "pro-download": "1.0.1", + "react-test-renderer": "15.6.1", + "redbox-react": "1.6.0", + "roadhog-api-doc": "0.3.4", + "rollbar": "2.5.0", + "stylelint": "9.7.1", + "stylelint-config-standard": "18.2.0", + "svg-sprite-loader": "^6.0.11", + "svgo-loader": "^3.0.0", + "xly_roadhog": "^1.2.3" + }, + "optionalDependencies": { + "nightmare": "2.10.0" + }, + "babel": { + "presets": [ + "env", + "react" + ], + "plugins": [ + "transform-decorators-legacy", + "transform-class-properties" + ] + }, + "jest": { + "setupFiles": [ + "/tests/setupTests.js" + ], + "testMatch": [ + "**/?(*.)(spec|test|e2e).js?(x)" + ], + "setupTestFrameworkScriptFile": "/tests/jasmine.js", + "moduleFileExtensions": [ + "js", + "jsx" + ], + "moduleNameMapper": { + "\\.(css|less)$": "/tests/styleMock.js" + } + }, + "lint-staged": { + "**/*.{js,jsx}": "lint-staged:js", + "**/*.less": "stylelint --syntax less" + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 10" + ] +} diff --git a/public/MES关键操作说明.xlsx b/public/MES关键操作说明.xlsx new file mode 100644 index 0000000..c97e746 Binary files /dev/null and b/public/MES关键操作说明.xlsx differ diff --git a/public/MES打印机更换纸张后亮红灯解决方法.pdf b/public/MES打印机更换纸张后亮红灯解决方法.pdf new file mode 100644 index 0000000..16ea3e3 Binary files /dev/null and b/public/MES打印机更换纸张后亮红灯解决方法.pdf differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..090bd6d Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..64fce76 --- /dev/null +++ b/public/index.html @@ -0,0 +1,21 @@ + + + + + + MES全局设备操作平台 + + + + + + +
+ + + + + + + + diff --git a/public/x6.js b/public/x6.js new file mode 100644 index 0000000..4eabeca --- /dev/null +++ b/public/x6.js @@ -0,0 +1,12 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).X6={})}(this,(function(t){"use strict";function e(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o}"object"==typeof window&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((t=>{Object.prototype.hasOwnProperty.call(t,"append")||Object.defineProperty(t,"append",{configurable:!0,enumerable:!0,writable:!0,value(...t){const e=document.createDocumentFragment();t.forEach((t=>{const n=t instanceof Node;e.appendChild(n?t:document.createTextNode(String(t)))})),this.appendChild(e)}})}));class r{get disposed(){return!0===this._disposed}dispose(){this._disposed=!0}}!function(t){t.dispose=function(){return(t,e,n)=>{const r=n.value,i=t.__proto__;n.value=function(...t){this.disposed||(r.call(this,...t),i.dispose.call(this))}}}}(r||(r={}));class i{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach((t=>{t.dispose()})),this.items.clear())}contains(t){return this.items.has(t)}add(t){this.items.add(t)}remove(t){this.items.delete(t)}clear(){this.items.clear()}}!function(t){t.from=function(e){const n=new t;return e.forEach((t=>{n.add(t)})),n}}(i||(i={}));var s="object"==typeof global&&global&&global.Object===Object&&global,o="object"==typeof self&&self&&self.Object===Object&&self,a=s||o||Function("return this")(),l=a.Symbol,c=Object.prototype,h=c.hasOwnProperty,u=c.toString,g=l?l.toStringTag:void 0;var d=Object.prototype.toString;var f="[object Null]",p="[object Undefined]",m=l?l.toStringTag:void 0;function y(t){return null==t?void 0===t?p:f:m&&m in Object(t)?function(t){var e=h.call(t,g),n=t[g];try{t[g]=void 0;var r=!0}catch(t){}var i=u.call(t);return r&&(e?t[g]=n:delete t[g]),i}(t):function(t){return d.call(t)}(t)}function v(t){return null!=t&&"object"==typeof t}var b="[object Symbol]";function x(t){return"symbol"==typeof t||v(t)&&y(t)==b}var w=NaN;function A(t){return"number"==typeof t?t:x(t)?w:+t}function C(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n0){if(++e>=Rt)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Ft=$t(ft),Gt=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /;var qt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Wt(t){return function(){return t}}var Ht=function(){try{var t=ut(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Jt=Ht?function(t,e){return Ht(t,"toString",{configurable:!0,enumerable:!1,value:Wt(e),writable:!0})}:H,Xt=$t(Jt);function Yt(t,e){for(var n=-1,r=null==t?0:t.length;++n-1}var ee=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function ne(t,e,n){var r=e+"";return Xt(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(qt,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Yt(ee,(function(n){var r="_."+n[0];e&n[1]&&!te(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(Gt);return e?e[1].split(Ut):[]}(r),n)))}var re=1,ie=2,se=4,oe=8,ae=32,le=64;function ce(t,e,n,r,i,s,o,a,l,c){var h=e&oe;e|=h?ae:le,(e&=~(h?le:ae))&se||(e&=~(re|ie));var u=[t,e,i,h?s:void 0,h?o:void 0,h?void 0:s,h?void 0:o,a,l,c],g=n.apply(void 0,u);return Dt(t)&&Ft(g,u),g.placeholder=r,ne(g,t,e)}function he(t){return t.placeholder}var ue=9007199254740991,ge=/^(?:0|[1-9]\d*)$/;function de(t,e){var n=typeof t;return!!(e=null==e?ue:e)&&("number"==n||"symbol"!=n&&ge.test(t))&&t>-1&&t%1==0&&t1&&b.reverse(),u&&c-1&&t%1==0&&t<=Ke}function tn(t){return null!=t&&Qe(t.length)&&!K(t)}function en(t,e,n){if(!B(n))return!1;var r=typeof e;return!!("number"==r?tn(n)&&de(e,n.length):"string"==r&&e in n)&&qe(n[e],t)}function nn(t){return Ze((function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(i--,s):void 0,o&&en(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r-1},Kn.prototype.set=function(t,e){var n=this.__data__,r=Yn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Qn=ut(a,"Map");function tr(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function er(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e0&&n(a)?e>1?vr(a,e-1,n,r,i):pr(i,a):r||(i[i.length]=a)}return i}function br(t){return(null==t?0:t.length)?vr(t,1):[]}function xr(t){return Xt(Ye(t,void 0,br),t+"")}var wr=xr(fr),Ar=On(Object.getPrototypeOf,Object),Cr="[object Object]",Pr=Function.prototype,Mr=Object.prototype,Er=Pr.toString,Sr=Mr.hasOwnProperty,Or=Er.call(Object);function Tr(t){if(!v(t)||y(t)!=Cr)return!1;var e=Ar(t);if(null===e)return!0;var n=Sr.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Er.call(n)==Or}var kr="[object DOMException]",Nr="[object Error]";function jr(t){if(!v(t))return!1;var e=y(t);return e==Nr||e==kr||"string"==typeof t.message&&"string"==typeof t.name&&!Tr(t)}var _r=Ze((function(t,e){try{return bt(t,void 0,e)}catch(t){return jr(t)?t:new Error(t)}})),Lr="Expected a function";function Br(t,e){var n;if("function"!=typeof e)throw new TypeError(Lr);return t=q(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var Ir=Ze((function(t,e,n){var r=1;if(n.length){var i=me(n,he(Ir));r|=32}return $e(t,r,e,n,i)}));Ir.placeholder={};var Dr=xr((function(t,e){return Yt(e,(function(e){e=ur(e),Ue(t,e,Ir(t[e],t))})),t})),Rr=Ze((function(t,e,n){var r=3;if(n.length){var i=me(n,he(Rr));r|=32}return $e(e,r,t,n,i)}));function Vr(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r=r?t:Vr(t,e,n)}Rr.placeholder={};var $r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Fr(t){return $r.test(t)}var Gr="\\ud800-\\udfff",Ur="["+Gr+"]",qr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Wr="\\ud83c[\\udffb-\\udfff]",Hr="[^"+Gr+"]",Jr="(?:\\ud83c[\\udde6-\\uddff]){2}",Xr="[\\ud800-\\udbff][\\udc00-\\udfff]",Yr="(?:"+qr+"|"+Wr+")"+"?",Zr="[\\ufe0e\\ufe0f]?",Kr=Zr+Yr+("(?:\\u200d(?:"+[Hr,Jr,Xr].join("|")+")"+Zr+Yr+")*"),Qr="(?:"+[Hr+qr+"?",qr,Jr,Xr,Ur].join("|")+")",ti=RegExp(Wr+"(?="+Wr+")|"+Qr+Kr,"g");function ei(t){return Fr(t)?function(t){return t.match(ti)||[]}(t):function(t){return t.split("")}(t)}function ni(t){return function(e){var n=Fr(e=lr(e))?ei(e):void 0,r=n?n[0]:e.charAt(0),i=n?zr(n,1).join(""):e.slice(1);return r[t]()+i}}var ri=ni("toUpperCase");function ii(t){return ri(lr(t).toLowerCase())}function si(t,e,n,r){var i=-1,s=null==t?0:t.length;for(r&&s&&(n=t[++i]);++i=e?t:e)),t}function Hi(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=$(n))==n?n:0),void 0!==e&&(e=(e=$(e))==e?e:0),Wi($(t),e,n)}var Ji=200;function Xi(t){var e=this.__data__=new Kn(t);this.size=e.size}function Yi(t,e){return t&&Je(e,jn(e),t)}Xi.prototype.clear=function(){this.__data__=new Kn,this.size=0},Xi.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xi.prototype.get=function(t){return this.__data__.get(t)},Xi.prototype.has=function(t){return this.__data__.has(t)},Xi.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!Qn||r.lengtha))return!1;var c=s.get(t),h=s.get(e);if(c&&h)return c==e&&h==t;var u=-1,g=!0,d=n&To?new Mo:void 0;for(s.set(t,e),s.set(e,t);++u=e||n<0||u&&t-c>=s}function p(){var t=Ia();if(f(t))return m(t);a=setTimeout(p,function(t){var n=e-(t-l);return u?Va(n,s-(t-c)):n}(t))}function m(t){return a=void 0,g&&r?d(t):(r=i=void 0,o)}function y(){var t=Ia(),n=f(t);if(r=arguments,i=this,l=t,n){if(void 0===a)return function(t){return c=t,a=setTimeout(p,e),h?d(t):o}(l);if(u)return clearTimeout(a),a=setTimeout(p,e),d(l)}return void 0===a&&(a=setTimeout(p,e)),o}return e=$(e)||0,B(n)&&(h=!!n.leading,s=(u="maxWait"in n)?Ra($(n.maxWait)||0,e):s,g="trailing"in n?!!n.trailing:g),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},y.flush=function(){return void 0===a?o:m(Ia())},y}var $a=Object.prototype,Fa=$a.hasOwnProperty,Ga=Ze((function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&en(e[0],e[1],i)&&(r=1);++n=rl&&(s=So,o=!1,e=new Mo(e));t:for(;++i":">",'"':""","'":"'"}),Pl=/[&<>"']/g,Ml=RegExp(Pl.source);function El(t){return(t=lr(t))&&Ml.test(t)?t.replace(Pl,Cl):t}var Sl=/[\\^$.*+?()[\]{}|]/g,Ol=RegExp(Sl.source);function Tl(t,e){for(var n=-1,r=null==t?0:t.length;++n-1?i[s?e[o]:o]:void 0}}var Bl=Math.max;function Il(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:q(n);return i<0&&(i=Bl(r+i,0)),Zt(t,va(e),i)}var Dl=Ll(Il);function Rl(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}var Vl=Math.max,zl=Math.min;function $l(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=q(n),i=n<0?Vl(r+i,0):zl(i,r-1)),Zt(t,va(e),i,!0)}var Fl=Ll($l);function Gl(t){return t&&t.length?t[0]:void 0}function Ul(t,e){var n=-1,r=tn(t)?Array(t.length):[];return Sa(t,(function(t,i,s){r[++n]=e(t,i,s)})),r}function ql(t,e){return(P(t)?C:Ul)(t,va(e))}var Wl=1/0;var Hl=1/0;var Jl=512;var Xl=$i("floor"),Yl="Expected a function",Zl=8,Kl=32,Ql=128,tc=256;function ec(t){return xr((function(e){var n=e.length,r=n,i=jt.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new TypeError(Yl);if(i&&!o&&"wrapper"==Nt(s))var o=new jt([],!0)}for(r=o?r:n;++re}function lc(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=$(e),n=$(n)),t(e,n)}}var cc=lc(ac),hc=lc((function(t,e){return t>=e})),uc=Object.prototype.hasOwnProperty;function gc(t,e){return null!=t&&uc.call(t,e)}function dc(t,e){return null!=t&&ua(t,e,gc)}var fc=Math.max,pc=Math.min;var mc="[object String]";function yc(t){return"string"==typeof t||!P(t)&&v(t)&&y(t)==mc}function vc(t,e){return C(e,(function(e){return t[e]}))}function bc(t){return null==t?[]:vc(t,jn(t))}var xc=Math.max;var wc=Math.max;var Ac=Math.min;function Cc(t,e,n){for(var r=n?nl:te,i=t[0].length,s=t.length,o=s,a=Array(s),l=1/0,c=[];o--;){var h=t[o];o&&e&&(h=C(h,bn(e))),l=Ac(h.length,l),a[o]=!n&&(e||i>=120&&h.length>=120)?new Mo(o&&h):void 0}h=t[0];var u=-1,g=a[0];t:for(;++u1),e})),Je(t,hs(t),n),r&&(n=po(n,7,zh));for(var i=e.length;i--;)Vh(n,e[i]);return n}));function Fh(t,e,n,r){if(!B(t))return t;for(var i=-1,s=(e=cr(e,t)).length,o=s-1,a=t;null!=a&&++ie||s&&o&&l&&!a&&!c||r&&o&&l||!n&&l||!i)return 1;if(!r&&!s&&!c&&t=a?l:l*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Hh(t){return xr((function(e){return e=C(e,bn(va)),Ze((function(n){var r=this;return t(e,(function(t){return bt(t,r,n)}))}))}))}var Jh=Hh(C),Xh=Ze,Yh=Math.min,Zh=Xh((function(t,e){var n=(e=1==e.length&&P(e[0])?C(e[0],bn(va)):C(vr(e,1),bn(va))).length;return Ze((function(r){for(var i=-1,s=Yh(r.length,n);++itu)return n;do{e%2&&(n+=t),(e=eu(e/2))&&(t+=t)}while(e);return n}var ru=ma("length"),iu="\\ud800-\\udfff",su="["+iu+"]",ou="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",au="\\ud83c[\\udffb-\\udfff]",lu="[^"+iu+"]",cu="(?:\\ud83c[\\udde6-\\uddff]){2}",hu="[\\ud800-\\udbff][\\udc00-\\udfff]",uu="(?:"+ou+"|"+au+")"+"?",gu="[\\ufe0e\\ufe0f]?",du=gu+uu+("(?:\\u200d(?:"+[lu,cu,hu].join("|")+")"+gu+uu+")*"),fu="(?:"+[lu+ou+"?",ou,cu,hu,su].join("|")+")",pu=RegExp(au+"(?="+au+")|"+fu+du,"g");function mu(t){return Fr(t)?function(t){for(var e=pu.lastIndex=0;pu.test(t);)++e;return e}(t):ru(t)}var yu=Math.ceil;function vu(t,e){var n=(e=void 0===e?" ":O(e)).length;if(n<2)return n?nu(e,t):e;var r=nu(e,yu(t/mu(e)));return Fr(e)?zr(ei(r),0,t).join(""):r.slice(0,t)}var bu=Math.ceil,xu=Math.floor;var wu=/^\s+/,Au=a.parseInt;var Cu=Ze((function(t,e){return $e(t,32,void 0,e,me(e,he(Cu)))}));Cu.placeholder={};var Pu=Ze((function(t,e){return $e(t,64,void 0,e,me(e,he(Pu)))}));Pu.placeholder={};var Mu=Ta((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Eu=xr((function(t,e){return null==t?{}:function(t,e){return Gh(t,e,(function(e,n){return ga(t,n)}))}(t,e)}));function Su(t,e,n,r){for(var i=n-1,s=t.length;++i-1;)a!==t&&Ou.call(a,l,1),Ou.call(t,l,1);return t}function ku(t,e){return t&&t.length&&e&&e.length?Tu(t,e):t}var Nu=Ze(ku);var ju=Array.prototype.splice;function _u(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==s){var s=i;de(i)?ju.call(t,i,1):Vh(t,i)}}return t}var Lu=xr((function(t,e){var n=null==t?0:t.length,r=fr(t,e);return _u(t,C(e,(function(t){return de(t,n)?+t:t})).sort(qh)),r})),Bu=Math.floor,Iu=Math.random;function Du(t,e){return t+Bu(Iu()*(e-t+1))}var Ru=parseFloat,Vu=Math.min,zu=Math.random;var $u=Math.ceil,Fu=Math.max;function Gu(t){return function(e,n,r){return r&&"number"!=typeof r&&en(e,n,r)&&(n=r=void 0),e=U(e),void 0===n?(n=e,e=0):n=U(n),function(t,e,n,r){for(var i=-1,s=Fu($u((e-t)/(n||1)),0),o=Array(s);s--;)o[r?s:++i]=t,t+=n;return o}(e,n,r=void 0===r?e1&&en(t,e[0],e[1])?e=[]:n>2&&en(e[0],e[1],e[2])&&(e=[e[0]]),Wh(t,vr(e,1),[])})),ug=4294967294,gg=Math.floor,dg=Math.min;function fg(t,e,n,r){var i=0,s=null==t?0:t.length;if(0===s)return 0;for(var o=(e=n(e))!=e,a=null===e,l=x(e),c=void 0===e;i>>1,o=t[s];null!==o&&!x(o)&&(n?o<=e:o/g,Ng={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:kg,variable:"",imports:{_:{escape:El}}},jg="Invalid `variable` option passed into `_.template`",_g=/\b__p \+= '';/g,Lg=/\b(__p \+=) '' \+/g,Bg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ig=/[()=,{}\[\]\/\s]/,Dg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Rg=/($^)/,Vg=/['\n\r\u2028\u2029\\]/g,zg=Object.prototype.hasOwnProperty;var $g="Expected a function";function Fg(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError($g);return B(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),za(t,e,{leading:r,maxWait:e,trailing:i})}function Gg(t,e){return e(t)}var Ug=9007199254740991,qg=4294967295,Wg=Math.min;function Hg(t,e){var n=t;return n instanceof Et&&(n=n.value()),si(e,(function(t,e){return e.func.apply(e.thisArg,pr([t],e.args))}),n)}function Jg(){return Hg(this.__wrapped__,this.__actions__)}var Xg=9007199254740991;function Yg(t,e){for(var n=t.length;n--&&Qt(e,t[n],0)>-1;);return n}function Zg(t,e){for(var n=-1,r=t.length;++n-1;);return n}var Kg=/^\s+/;var Qg=30,td="...",ed=/\w*$/;var nd=oi({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rd=/&(?:amp|lt|gt|quot|#39);/g,id=RegExp(rd.source);var sd=ds&&1/jo(new ds([,-0]))[1]==1/0?function(t){return new ds(t)}:St,od=200;function ad(t,e,n){var r=-1,i=te,s=t.length,o=!0,a=[],l=a;if(n)o=!1,i=nl;else if(s>=od){var c=e?null:sd(t);if(c)return jo(c);o=!1,i=So,l=new Mo}else l=e?[]:a;t:for(;++r1||this.__actions__.length)&&r instanceof Et&&de(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Gg,args:[i],thisArg:void 0}),new jt(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));function wd(t,e,n){var r=t.length;if(r<2)return r?ad(t[0]):[];for(var i=-1,s=Array(r);++i1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,md(t,n)})),Od={chunk:function(t,e,n){e=(n?en(t,e,n):void 0===e)?1:qi(q(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var i=0,s=0,o=Array(Ui(r/e));ii?0:i+n),(r=void 0===r||r>i?i:q(r))<0&&(r+=i),r=n>r?0:jl(r);n-1:!!i&&Qt(t,e,n)>-1},invokeMap:Rc,keyBy:gh,map:ql,orderBy:function(t,e,n,r){return null==t?[]:(P(e)||(e=null==e?[]:[e]),P(n=r?void 0:n)||(n=null==n?[]:[n]),Wh(t,e,n))},partition:Mu,reduce:function(t,e,n){var r=P(t)?si:Hu,i=arguments.length<3;return r(t,va(e),n,i,Sa)},reduceRight:function(t,e,n){var r=P(t)?Ju:Hu,i=arguments.length<3;return r(t,va(e),n,i,ml)},reject:function(t,e){return(P(t)?ns:_l)(t,_h(va(e)))},sample:function(t){return(P(t)?Qu:tg)(t)},sampleSize:function(t,e,n){return e=(n?en(t,e,n):void 0===e)?1:q(e),(P(t)?ng:rg)(t,e)},shuffle:function(t){return(P(t)?ig:sg)(t)},size:function(t){if(null==t)return 0;if(tn(t))return yc(t)?mu(t):t.length;var e=Ms(t);return e==og||e==ag?t.size:Nn(t).length},some:function(t,e,n){var r=P(t)?Eo:cg;return n&&en(t,e,n)&&(e=void 0),r(t,va(e))},sortBy:hg},kd={now:Ia},Nd={after:function(t,e){if("function"!=typeof e)throw new TypeError(W);return t=q(t),function(){if(--t<1)return e.apply(this,arguments)}},ary:Ge,before:Br,bind:Ir,bindKey:Rr,curry:_a,curryRight:Ba,debounce:za,defer:tl,delay:el,flip:function(t){return $e(t,Jl)},memoize:rr,negate:_h,once:function(t){return Br(2,t)},overArgs:Zh,partial:Cu,partialRight:Pu,rearg:Wu,rest:function(t,e){if("function"!=typeof t)throw new TypeError(Xu);return Ze(t,e=void 0===e?e:q(e))},spread:function(t,e){if("function"!=typeof t)throw new TypeError(wg);return e=null==e?0:Ag(q(e),0),Ze((function(n){var r=n[e],i=zr(n,0,e);return r&&pr(i,r),bt(t,this,i)}))},throttle:Fg,unary:function(t){return Ge(t,1)},wrap:function(t,e){return Cu(ul(e),t)}},jd={castArray:function(){if(!arguments.length)return[];var t=arguments[0];return P(t)?t:[t]},clone:yo,cloneDeep:xo,cloneDeepWith:function(t,e){return po(t,wo|Ao,e="function"==typeof e?e:void 0)},cloneWith:function(t,e){return po(t,Co,e="function"==typeof e?e:void 0)},conformsTo:function(t,e){return null==e||xa(t,e,jn(e))},eq:qe,gt:cc,gte:hc,isArguments:gn,isArray:P,isArrayBuffer:$c,isArrayLike:tn,isArrayLikeObject:qa,isBoolean:function(t){return!0===t||!1===t||v(t)&&y(t)==Fc},isBuffer:yn,isDate:qc,isElement:function(t){return v(t)&&1===t.nodeType&&!Tr(t)},isEmpty:Xc,isEqual:Yc,isEqualWith:function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?na(t,e,void 0,n):!!r},isError:jr,isFinite:function(t){return"number"==typeof t&&Zc(t)},isFunction:K,isInteger:Kc,isLength:Qe,isMap:no,isMatch:function(t,e){return t===e||sa(t,e,aa(e))},isMatchWith:function(t,e,n){return n="function"==typeof n?n:void 0,sa(t,e,aa(e),n)},isNaN:function(t){return th(t)&&t!=+t},isNative:function(t){if(eh(t))throw new Error(nh);return ht(t)},isNil:function(t){return null==t},isNull:function(t){return null===t},isNumber:th,isObject:B,isObjectLike:v,isPlainObject:Tr,isRegExp:sh,isSafeInteger:function(t){return Kc(t)&&t>=-oh&&t<=oh},isSet:so,isString:yc,isSymbol:x,isTypedArray:Mn,isUndefined:function(t){return void 0===t},isWeakMap:function(t){return v(t)&&Ms(t)==ah},isWeakSet:function(t){return v(t)&&y(t)==lh},lt:vh,lte:bh,toArray:Dh,toFinite:U,toInteger:q,toLength:jl,toNumber:$,toPlainObject:Ha,toSafeInteger:function(t){return t?Wi(q(t),-Xg,Xg):0===t?t:0},toString:lr},_d={add:k,ceil:Fi,divide:cl,floor:Xl,max:Ch,maxBy:function(t,e){return t&&t.length?Ah(t,va(e),ac):void 0},mean:function(t){return Eh(t,H)},meanBy:function(t,e){return Eh(t,va(e))},min:function(t){return t&&t.length?Ah(t,H,yh):void 0},minBy:function(t,e){return t&&t.length?Ah(t,va(e),yh):void 0},multiply:Nh,round:Ku,subtract:Pg,sum:function(t){return t&&t.length?Ph(t,H):0},sumBy:function(t,e){return t&&t.length?Ph(t,va(e)):0}},Ld=Hi,Bd=function(t,e,n){return e=U(e),void 0===n?(n=e,e=0):n=U(n),function(t,e,n){return t>=pc(e,n)&&te){var r=t;t=e,e=r}if(n||t%1||e%1){var i=zu();return Vu(t+i*(e-t+Ru("1e-"+((i+"").length-1))),e)}return Du(t,e)},Dd={assign:Ln,assignIn:Rn,assignInWith:Vn,assignWith:zn,at:wr,create:function(t,e){var n=mt(t);return null==e?n:Yi(n,e)},defaults:Ga,defaultsDeep:Za,entries:wl,entriesIn:Al,extend:Rn,extendWith:Vn,findKey:function(t,e){return Rl(t,va(e),Ma)},findLastKey:function(t,e){return Rl(t,va(e),pl)},forIn:function(t,e){return null==t?t:Pa(t,ul(e),Dn)},forInRight:function(t,e){return null==t?t:fl(t,ul(e),Dn)},forOwn:function(t,e){return t&&Ma(t,ul(e))},forOwnRight:function(t,e){return t&&pl(t,ul(e))},functions:function(t){return null==t?[]:ic(t,jn(t))},functionsIn:function(t){return null==t?[]:ic(t,Dn(t))},get:dr,has:dc,hasIn:ga,invert:kc,invertBy:Lc,invoke:Dc,keys:jn,keysIn:Dn,mapKeys:function(t,e){var n={};return e=va(e),Ma(t,(function(t,r,i){Ue(n,e(t,r,i),t)})),n},mapValues:function(t,e){var n={};return e=va(e),Ma(t,(function(t,r,i){Ue(n,r,e(t,r,i))})),n},merge:Sh,mergeWith:Ya,omit:$h,omitBy:function(t,e){return Uh(t,_h(va(e)))},pick:Eu,pickBy:Uh,result:function(t,e,n){var r=-1,i=(e=cr(e,t)).length;for(i||(i=1,t=void 0);++r=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},plant:function(t){for(var e,n=this;n instanceof Pt;){var r=Lt(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},reverse:function(){var t=this.__wrapped__;if(t instanceof Et){var e=t;return this.__actions__.length&&(e=new Et(this)),(e=e.reverse()).__actions__.push({func:Gg,args:[Zu],thisArg:void 0}),new jt(e,this.__chain__)}return this.thru(Zu)},tap:function(t,e){return e(t),t},thru:Gg,toIterator:function(){return this},toJSON:Jg,value:Jg,valueOf:Jg,wrapperChain:function(){return Gi(this)}},Vd={camelCase:Ri,capitalize:ii,deburr:hi,endsWith:function(t,e,n){t=lr(t),e=O(e);var r=t.length,i=n=void 0===n?r:Wi(q(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},escape:El,escapeRegExp:function(t){return(t=lr(t))&&Ol.test(t)?t.replace(Sl,"\\$&"):t},kebabCase:uh,lowerCase:ph,lowerFirst:mh,pad:function(t,e,n){t=lr(t);var r=(e=q(e))?mu(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return vu(xu(i),n)+t+vu(bu(i),n)},padEnd:function(t,e,n){t=lr(t);var r=(e=q(e))?mu(t):0;return e&&r>>0)?(t=lr(t))&&("string"==typeof e||null!=e&&!sh(e))&&!(e=O(e))&&Fr(t)?zr(ei(t),0,n):t.split(e,n):[]},startCase:Cg,startsWith:function(t,e,n){return t=lr(t),n=null==n?0:Wi(q(n),0,t.length),e=O(e),t.slice(n,n+e.length)==e},template:function(t,e,n){var r=Ng.imports._.templateSettings||Ng;n&&en(t,e,n)&&(e=void 0),t=lr(t),e=Vn({},e,r,Sg);var i,s,o=Vn({},e.imports,r.imports,Sg),a=jn(o),l=vc(o,a),c=0,h=e.interpolate||Rg,u="__p += '",g=RegExp((e.escape||Rg).source+"|"+h.source+"|"+(h===kg?Dg:Rg).source+"|"+(e.evaluate||Rg).source+"|$","g"),d=zg.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(g,(function(e,n,r,o,a,l){return r||(r=o),u+=t.slice(c,l).replace(Vg,Tg),n&&(i=!0,u+="' +\n__e("+n+") +\n'"),a&&(s=!0,u+="';\n"+a+";\n__p += '"),r&&(u+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+e.length,e})),u+="';\n";var f=zg.call(e,"variable")&&e.variable;if(f){if(Ig.test(f))throw new Error(jg)}else u="with (obj) {\n"+u+"\n}\n";u=(s?u.replace(_g,""):u).replace(Lg,"$1").replace(Bg,"$1;"),u="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var p=_r((function(){return Function(a,d+"return "+u).apply(void 0,l)}));if(p.source=u,jr(p))throw p;return p},templateSettings:Ng,toLower:function(t){return lr(t).toLowerCase()},toUpper:function(t){return lr(t).toUpperCase()},trim:function(t,e,n){if((t=lr(t))&&(n||void 0===e))return L(t);if(!t||!(e=O(e)))return t;var r=ei(t),i=ei(e);return zr(r,Zg(r,i),Yg(r,i)+1).join("")},trimEnd:function(t,e,n){if((t=lr(t))&&(n||void 0===e))return t.slice(0,j(t)+1);if(!t||!(e=O(e)))return t;var r=ei(t);return zr(r,0,Yg(r,ei(e))+1).join("")},trimStart:function(t,e,n){if((t=lr(t))&&(n||void 0===e))return t.replace(Kg,"");if(!t||!(e=O(e)))return t;var r=ei(t);return zr(r,Zg(r,ei(e))).join("")},truncate:function(t,e){var n=Qg,r=td;if(B(e)){var i="separator"in e?e.separator:i;n="length"in e?q(e.length):n,r="omission"in e?O(e.omission):r}var s=(t=lr(t)).length;if(Fr(t)){var o=ei(t);s=o.length}if(n>=s)return t;var a=n-mu(r);if(a<1)return r;var l=o?zr(o,0,a).join(""):t.slice(0,a);if(void 0===i)return l+r;if(o&&(a+=l.length-a),sh(i)){if(t.slice(a).search(i)){var c,h=l;for(i.global||(i=RegExp(i.source,lr(ed.exec(i))+"g")),i.lastIndex=0;c=i.exec(h);)var u=c.index;l=l.slice(0,void 0===u?a:u)}}else if(t.indexOf(O(i),a)!=a){var g=l.lastIndexOf(i);g>-1&&(l=l.slice(0,g))}return l+r},unescape:function(t){return(t=lr(t))&&id.test(t)?t.replace(rd,nd):t},upperCase:vd,upperFirst:ri,words:Bi},zd={attempt:_r,bindAll:Dr,cond:function(t){var e=null==t?0:t.length,n=va;return t=e?C(t,(function(t){if("function"!=typeof t[1])throw new TypeError(ba);return[n(t[0]),t[1]]})):[],Ze((function(n){for(var r=-1;++rUg)return[];var n=qg,r=Wg(t,qg);e=ul(e),t-=qg;for(var i=on(r,e);++n + * Build: `lodash modularize exports="es" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +var Wd,Hd=4294967295,Jd=Array.prototype,Xd=Object.prototype.hasOwnProperty,Yd=l?l.iterator:void 0,Zd=Math.max,Kd=Math.min,Qd=function(t){return function(e,n,r){if(null==r){var i=B(n),s=i&&jn(n),o=s&&s.length&&ic(n,s);(o?o.length:i)||(r=n,n=e,e=this)}return t(e,n,r)}}(kh);function tf(t,e,n){if(n)switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2]);case 4:return t.call(e,n[0],n[1],n[2],n[3]);case 5:return t.call(e,n[0],n[1],n[2],n[3],n[4]);case 6:return t.call(e,n[0],n[1],n[2],n[3],n[4],n[5]);default:return t.apply(e,n)}return t.call(e)}function ef(t,e,...n){return tf(t,e,n)}function nf(t){return"object"==typeof t&&t.then&&"function"==typeof t.then}function rf(t){return null!=t&&(t instanceof Promise||nf(t))}function sf(...t){const e=[];t.forEach((t=>{Array.isArray(t)?e.push(...t):e.push(t)}));if(e.some((t=>rf(t)))){const t=e.map((t=>rf(t)?t:Promise.resolve(!1!==t)));return Promise.all(t).then((t=>t.reduce(((t,e)=>!1!==e&&t),!0)))}return e.every((t=>!1!==t))}It.after=Nd.after,It.ary=Nd.ary,It.assign=Dd.assign,It.assignIn=Dd.assignIn,It.assignInWith=Dd.assignInWith,It.assignWith=Dd.assignWith,It.at=Dd.at,It.before=Nd.before,It.bind=Nd.bind,It.bindAll=zd.bindAll,It.bindKey=Nd.bindKey,It.castArray=jd.castArray,It.chain=Rd.chain,It.chunk=Od.chunk,It.compact=Od.compact,It.concat=Od.concat,It.cond=zd.cond,It.conforms=zd.conforms,It.constant=zd.constant,It.countBy=Td.countBy,It.create=Dd.create,It.curry=Nd.curry,It.curryRight=Nd.curryRight,It.debounce=Nd.debounce,It.defaults=Dd.defaults,It.defaultsDeep=Dd.defaultsDeep,It.defer=Nd.defer,It.delay=Nd.delay,It.difference=Od.difference,It.differenceBy=Od.differenceBy,It.differenceWith=Od.differenceWith,It.drop=Od.drop,It.dropRight=Od.dropRight,It.dropRightWhile=Od.dropRightWhile,It.dropWhile=Od.dropWhile,It.fill=Od.fill,It.filter=Td.filter,It.flatMap=Td.flatMap,It.flatMapDeep=Td.flatMapDeep,It.flatMapDepth=Td.flatMapDepth,It.flatten=Od.flatten,It.flattenDeep=Od.flattenDeep,It.flattenDepth=Od.flattenDepth,It.flip=Nd.flip,It.flow=zd.flow,It.flowRight=zd.flowRight,It.fromPairs=Od.fromPairs,It.functions=Dd.functions,It.functionsIn=Dd.functionsIn,It.groupBy=Td.groupBy,It.initial=Od.initial,It.intersection=Od.intersection,It.intersectionBy=Od.intersectionBy,It.intersectionWith=Od.intersectionWith,It.invert=Dd.invert,It.invertBy=Dd.invertBy,It.invokeMap=Td.invokeMap,It.iteratee=zd.iteratee,It.keyBy=Td.keyBy,It.keys=jn,It.keysIn=Dd.keysIn,It.map=Td.map,It.mapKeys=Dd.mapKeys,It.mapValues=Dd.mapValues,It.matches=zd.matches,It.matchesProperty=zd.matchesProperty,It.memoize=Nd.memoize,It.merge=Dd.merge,It.mergeWith=Dd.mergeWith,It.method=zd.method,It.methodOf=zd.methodOf,It.mixin=Qd,It.negate=_h,It.nthArg=zd.nthArg,It.omit=Dd.omit,It.omitBy=Dd.omitBy,It.once=Nd.once,It.orderBy=Td.orderBy,It.over=zd.over,It.overArgs=Nd.overArgs,It.overEvery=zd.overEvery,It.overSome=zd.overSome,It.partial=Nd.partial,It.partialRight=Nd.partialRight,It.partition=Td.partition,It.pick=Dd.pick,It.pickBy=Dd.pickBy,It.property=zd.property,It.propertyOf=zd.propertyOf,It.pull=Od.pull,It.pullAll=Od.pullAll,It.pullAllBy=Od.pullAllBy,It.pullAllWith=Od.pullAllWith,It.pullAt=Od.pullAt,It.range=zd.range,It.rangeRight=zd.rangeRight,It.rearg=Nd.rearg,It.reject=Td.reject,It.remove=Od.remove,It.rest=Nd.rest,It.reverse=Od.reverse,It.sampleSize=Td.sampleSize,It.set=Dd.set,It.setWith=Dd.setWith,It.shuffle=Td.shuffle,It.slice=Od.slice,It.sortBy=Td.sortBy,It.sortedUniq=Od.sortedUniq,It.sortedUniqBy=Od.sortedUniqBy,It.split=Vd.split,It.spread=Nd.spread,It.tail=Od.tail,It.take=Od.take,It.takeRight=Od.takeRight,It.takeRightWhile=Od.takeRightWhile,It.takeWhile=Od.takeWhile,It.tap=Rd.tap,It.throttle=Nd.throttle,It.thru=Gg,It.toArray=jd.toArray,It.toPairs=Dd.toPairs,It.toPairsIn=Dd.toPairsIn,It.toPath=zd.toPath,It.toPlainObject=jd.toPlainObject,It.transform=Dd.transform,It.unary=Nd.unary,It.union=Od.union,It.unionBy=Od.unionBy,It.unionWith=Od.unionWith,It.uniq=Od.uniq,It.uniqBy=Od.uniqBy,It.uniqWith=Od.uniqWith,It.unset=Dd.unset,It.unzip=Od.unzip,It.unzipWith=Od.unzipWith,It.update=Dd.update,It.updateWith=Dd.updateWith,It.values=Dd.values,It.valuesIn=Dd.valuesIn,It.without=Od.without,It.words=Vd.words,It.wrap=Nd.wrap,It.xor=Od.xor,It.xorBy=Od.xorBy,It.xorWith=Od.xorWith,It.zip=Od.zip,It.zipObject=Od.zipObject,It.zipObjectDeep=Od.zipObjectDeep,It.zipWith=Od.zipWith,It.entries=Dd.toPairs,It.entriesIn=Dd.toPairsIn,It.extend=Dd.assignIn,It.extendWith=Dd.assignInWith,Qd(It,It),It.add=_d.add,It.attempt=zd.attempt,It.camelCase=Vd.camelCase,It.capitalize=Vd.capitalize,It.ceil=_d.ceil,It.clamp=Ld,It.clone=jd.clone,It.cloneDeep=jd.cloneDeep,It.cloneDeepWith=jd.cloneDeepWith,It.cloneWith=jd.cloneWith,It.conformsTo=jd.conformsTo,It.deburr=Vd.deburr,It.defaultTo=zd.defaultTo,It.divide=_d.divide,It.endsWith=Vd.endsWith,It.eq=jd.eq,It.escape=Vd.escape,It.escapeRegExp=Vd.escapeRegExp,It.every=Td.every,It.find=Td.find,It.findIndex=Od.findIndex,It.findKey=Dd.findKey,It.findLast=Td.findLast,It.findLastIndex=Od.findLastIndex,It.findLastKey=Dd.findLastKey,It.floor=_d.floor,It.forEach=Td.forEach,It.forEachRight=Td.forEachRight,It.forIn=Dd.forIn,It.forInRight=Dd.forInRight,It.forOwn=Dd.forOwn,It.forOwnRight=Dd.forOwnRight,It.get=Dd.get,It.gt=jd.gt,It.gte=jd.gte,It.has=Dd.has,It.hasIn=Dd.hasIn,It.head=Od.head,It.identity=H,It.includes=Td.includes,It.indexOf=Od.indexOf,It.inRange=Bd,It.invoke=Dd.invoke,It.isArguments=jd.isArguments,It.isArray=P,It.isArrayBuffer=jd.isArrayBuffer,It.isArrayLike=jd.isArrayLike,It.isArrayLikeObject=jd.isArrayLikeObject,It.isBoolean=jd.isBoolean,It.isBuffer=jd.isBuffer,It.isDate=jd.isDate,It.isElement=jd.isElement,It.isEmpty=jd.isEmpty,It.isEqual=jd.isEqual,It.isEqualWith=jd.isEqualWith,It.isError=jd.isError,It.isFinite=jd.isFinite,It.isFunction=jd.isFunction,It.isInteger=jd.isInteger,It.isLength=jd.isLength,It.isMap=jd.isMap,It.isMatch=jd.isMatch,It.isMatchWith=jd.isMatchWith,It.isNaN=jd.isNaN,It.isNative=jd.isNative,It.isNil=jd.isNil,It.isNull=jd.isNull,It.isNumber=jd.isNumber,It.isObject=B,It.isObjectLike=jd.isObjectLike,It.isPlainObject=jd.isPlainObject,It.isRegExp=jd.isRegExp,It.isSafeInteger=jd.isSafeInteger,It.isSet=jd.isSet,It.isString=jd.isString,It.isSymbol=jd.isSymbol,It.isTypedArray=jd.isTypedArray,It.isUndefined=jd.isUndefined,It.isWeakMap=jd.isWeakMap,It.isWeakSet=jd.isWeakSet,It.join=Od.join,It.kebabCase=Vd.kebabCase,It.last=ol,It.lastIndexOf=Od.lastIndexOf,It.lowerCase=Vd.lowerCase,It.lowerFirst=Vd.lowerFirst,It.lt=jd.lt,It.lte=jd.lte,It.max=_d.max,It.maxBy=_d.maxBy,It.mean=_d.mean,It.meanBy=_d.meanBy,It.min=_d.min,It.minBy=_d.minBy,It.stubArray=zd.stubArray,It.stubFalse=zd.stubFalse,It.stubObject=zd.stubObject,It.stubString=zd.stubString,It.stubTrue=zd.stubTrue,It.multiply=_d.multiply,It.nth=Od.nth,It.noop=zd.noop,It.now=kd.now,It.pad=Vd.pad,It.padEnd=Vd.padEnd,It.padStart=Vd.padStart,It.parseInt=Vd.parseInt,It.random=Id,It.reduce=Td.reduce,It.reduceRight=Td.reduceRight,It.repeat=Vd.repeat,It.replace=Vd.replace,It.result=Dd.result,It.round=_d.round,It.sample=Td.sample,It.size=Td.size,It.snakeCase=Vd.snakeCase,It.some=Td.some,It.sortedIndex=Od.sortedIndex,It.sortedIndexBy=Od.sortedIndexBy,It.sortedIndexOf=Od.sortedIndexOf,It.sortedLastIndex=Od.sortedLastIndex,It.sortedLastIndexBy=Od.sortedLastIndexBy,It.sortedLastIndexOf=Od.sortedLastIndexOf,It.startCase=Vd.startCase,It.startsWith=Vd.startsWith,It.subtract=_d.subtract,It.sum=_d.sum,It.sumBy=_d.sumBy,It.template=Vd.template,It.times=zd.times,It.toFinite=jd.toFinite,It.toInteger=q,It.toLength=jd.toLength,It.toLower=Vd.toLower,It.toNumber=jd.toNumber,It.toSafeInteger=jd.toSafeInteger,It.toString=jd.toString,It.toUpper=Vd.toUpper,It.trim=Vd.trim,It.trimEnd=Vd.trimEnd,It.trimStart=Vd.trimStart,It.truncate=Vd.truncate,It.unescape=Vd.unescape,It.uniqueId=zd.uniqueId,It.upperCase=Vd.upperCase,It.upperFirst=Vd.upperFirst,It.each=Td.forEach,It.eachRight=Td.forEachRight,It.first=Od.head,Qd(It,(Wd={},Ma(It,(function(t,e){Xd.call(It.prototype,e)||(Wd[e]=t)})),Wd),{chain:!1}),It.VERSION="4.17.21",(It.templateSettings=Vd.templateSettings).imports._=It,Yt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){It[t].placeholder=It})),Yt(["drop","take"],(function(t,e){Et.prototype[t]=function(n){n=void 0===n?1:Zd(q(n),0);var r=this.__filtered__&&!e?new Et(this):this.clone();return r.__filtered__?r.__takeCount__=Kd(n,r.__takeCount__):r.__views__.push({size:Kd(n,Hd),type:t+(r.__dir__<0?"Right":"")}),r},Et.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Yt(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Et.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:va(t),type:n}),e.__filtered__=e.__filtered__||r,e}})),Yt(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Et.prototype[t]=function(){return this[n](1).value()[0]}})),Yt(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Et.prototype[t]=function(){return this.__filtered__?new Et(this):this[n](1)}})),Et.prototype.compact=function(){return this.filter(H)},Et.prototype.find=function(t){return this.filter(t).head()},Et.prototype.findLast=function(t){return this.reverse().find(t)},Et.prototype.invokeMap=Ze((function(t,e){return"function"==typeof t?new Et(this):this.map((function(n){return Ic(n,t,e)}))})),Et.prototype.reject=function(t){return this.filter(_h(va(t)))},Et.prototype.slice=function(t,e){t=q(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Et(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=q(e))<0?n.dropRight(-e):n.take(e-t)),n)},Et.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Et.prototype.toArray=function(){return this.take(Hd)},Ma(Et.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=It[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);i&&(It.prototype[e]=function(){var e=this.__wrapped__,o=r?[1]:arguments,a=e instanceof Et,l=o[0],c=a||P(e),h=function(t){var e=i.apply(It,pr([t],o));return r&&u?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(a=c=!1);var u=this.__chain__,g=!!this.__actions__.length,d=s&&!u,f=a&&!g;if(!s&&c){e=f?e:new Et(this);var p=t.apply(e,o);return p.__actions__.push({func:Gg,args:[h],thisArg:void 0}),new jt(p,u)}return d&&f?t.apply(this,o):(p=this.thru(h),d?r?p.value()[0]:p.value():p)})})),Yt(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Jd[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);It.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(P(i)?i:[],t)}return this[n]((function(n){return e.apply(P(n)?n:[],t)}))}})),Ma(Et.prototype,(function(t,e){var n=It[e];if(n){var r=n.name+"";Xd.call(Tt,r)||(Tt[r]=[]),Tt[r].push({name:e,func:n})}})),Tt[Ce(void 0,2).name]=[{name:"wrapper",func:void 0}],Et.prototype.clone=function(){var t=new Et(this.__wrapped__);return t.__actions__=_t(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=_t(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=_t(this.__views__),t},Et.prototype.reverse=function(){if(this.__filtered__){var t=new Et(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Et.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=P(t),r=e<0,i=n?t.length:0,s=function(t,e,n){for(var r=-1,i=n.length;++r(this.off(t,r),af([e,n],i));return this.on(t,r,this)}off(t,e,n){if(!(t||e||n))return this.listeners={},this;const r=this.listeners;return(t?[t]:Object.keys(r)).forEach((t=>{const i=r[t];if(i)if(e||n)for(let t=i.length-2;t>=0;t-=2)e&&i[t]!==e||n&&i[t+1]!==n||i.splice(t,2);else delete r[t]})),this}trigger(t,...e){let n=!0;if("*"!==t){const r=this.listeners[t];null!=r&&(n=af([...r],e))}const r=this.listeners["*"];return null!=r?sf([n,af([...r],[t,...e])]):n}emit(t,...e){return this.trigger(t,...e)}}function cf(t,...e){e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((n=>{"constructor"!==n&&Object.defineProperty(t.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n))}))}))}const hf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])};function uf(t,e){function n(){this.constructor=t}hf(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}const gf=/^\s*class\s+/.test(`${class{}}`)||/^\s*class\s*\{/.test(`${class{}}`);function df(t,e){let n;return gf?n=class extends e{}:(n=function(){return e.apply(this,arguments)},uf(n,e)),Object.defineProperty(n,"name",{value:t}),n}function ff(t,e){return null!=t?t:e}function pf(t){return"__proto__"===t}function mf(t,e,n="/"){let r;const i=Array.isArray(e)?e:e.split(n);if(i.length)for(r=t;i.length;){const t=i.shift();if(Object(r)!==r||!t||!(t in r))return;r=r[t]}return r}function yf(t,e,n,r="/"){const i=Array.isArray(e)?e:e.split(r),s=i.pop();if(s&&!pf(s)){let e=t;i.forEach((t=>{pf(t)||(null==e[t]&&(e[t]={}),e=e[t])})),e[s]=n}return t}function vf(t,e,n="/"){const r=Array.isArray(e)?e.slice():e.split(n),i=r.pop();if(i)if(r.length>0){const e=mf(t,r);e&&delete e[i]}else delete t[i];return t}var bf=Object.freeze({__proto__:null,applyMixins:cf,clone:yo,cloneDeep:xo,createClass:df,defaults:Ga,defaultsDeep:Za,ensure:ff,flatten:function t(e,n="/",r){const i={};Object.keys(e).forEach((s=>{const o=e[s];let a="object"==typeof o||Array.isArray(o);if(a&&r&&r(o)&&(a=!1),a){const e=t(o,n,r);Object.keys(e).forEach((t=>{i[s+n+t]=e[t]}))}else i[s]=o}));for(const t in e)Object.prototype.hasOwnProperty.call(e,t);return i},getBoolean:function(t,e,n){const r=null!=t?t[e]:null;return null==r?n:!!r},getByPath:mf,getNumber:function(t,e,n){let r=null!=t?t[e]:null;return null==r?n:(r=+r,Number.isNaN(r)||!Number.isFinite(r)?n:r)},getValue:function(t,e,n){const r=null!=t?t[e]:null;return void 0!==n?ff(r,n):r},has:dc,inherit:uf,isEmpty:Xc,isEqual:Yc,isMaliciousProp:pf,isObject:B,isPlainObject:Tr,merge:Sh,pick:Eu,setByPath:yf,unsetByPath:vf}),xf=window&&window.__decorate||function(t,e,n,r){var i,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o};class wf extends lf{dispose(){this.off()}}xf([r.dispose()],wf.prototype,"dispose",null),function(t){t.dispose=r.dispose}(wf||(wf={})),cf(wf,r);var Af=Object.freeze({__proto__:null,difference:sl,groupBy:oc,max:Ch,sortBy:hg,sortedIndex:yg,sortedIndexBy:vg,union:ld,uniq:ud});const Cf=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Pf=Cf((t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase())),Mf=Cf((t=>Cg(Ri(t)).replace(/ /g,""))),Ef=Cf((t=>vd(t).replace(/ /g,"_"))),Sf=Cf((t=>ph(t).replace(/ /g,"."))),Of=Cf((t=>ph(t).replace(/ /g,"/"))),Tf=Cf((t=>ri(ph(t)))),kf=Cf((t=>Cg(Ri(t))));function Nf(t){let e=2166136261,n=!1,r=t;for(let t=0,i=r.length;t127&&!n&&(r=unescape(encodeURIComponent(r)),i=r.charCodeAt(t),n=!0),e^=i,e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}return e>>>0}function jf(){let t="";const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let n=0,r=e.length;nn?o-n:1,c=e.length>n+o?n+o:e.length;i[0]=o;let h=o;for(let t=1;tn)return;const u=r;r=i,i=u}const o=r[e.length];return o>n?void 0:o}var Bf=Object.freeze({__proto__:null,camelCase:Ri,constantCase:Ef,dotCase:Sf,getSpellingSuggestion:_f,hashcode:Nf,kebabCase:Pf,lowerFirst:mh,pascalCase:Mf,pathCase:Of,sentenceCase:Tf,titleCase:kf,uniqueId:dd,upperFirst:ri,uuid:jf});function If(t){return"string"==typeof t&&"%"===t.slice(-1)}function Df(t,e){if(null==t)return 0;let n;if("string"==typeof t){if(n=parseFloat(t),If(t)&&(n/=100,Number.isFinite(n)))return n*e}else n=t;return Number.isFinite(n)?n>0&&n<1?n*e:n:0}function Rf(t){if("object"==typeof t){let e=0,n=0,r=0,i=0;return null!=t.vertical&&Number.isFinite(t.vertical)&&(n=i=t.vertical),null!=t.horizontal&&Number.isFinite(t.horizontal)&&(r=e=t.horizontal),null!=t.left&&Number.isFinite(t.left)&&(e=t.left),null!=t.top&&Number.isFinite(t.top)&&(n=t.top),null!=t.right&&Number.isFinite(t.right)&&(r=t.right),null!=t.bottom&&Number.isFinite(t.bottom)&&(i=t.bottom),{top:n,right:r,bottom:i,left:e}}let e=0;return null!=t&&Number.isFinite(t)&&(e=t),{top:e,right:e,bottom:e,left:e}}var Vf=Object.freeze({__proto__:null,clamp:Hi,isNumber:th,isPercentage:If,mod:function(t,e){return(t%e+e)%e},normalizePercentage:Df,normalizeSides:Rf,parseCssNumeric:function(t,e){const n=parseFloat(t);if(Number.isNaN(n))return null;let r;if(null==e)r="[A-Za-z]*";else if(Array.isArray(e)){if(0===e.length)return null;r=e.join("|")}else"string"==typeof e&&(r=e);const i=function(e){const n=new RegExp(`(?:\\d+(?:\\.\\d+)*)(${e})$`).exec(t);return n?n[1]:null}(r);return null===i?null:{unit:i,value:n}},random:function(t,e){if(null==e)e=null==t?1:t,t=0;else if(e=0,$f=!!t.match(/(iPad|iPhone|iPod)/g),Ff=t.indexOf("Windows")>=0,Gf=t.indexOf("MSIE")>=0,Uf=!!t.match(/Trident\/7\./),qf=!!t.match(/Edge\//),Wf=t.indexOf("Mozilla/")>=0&&t.indexOf("MSIE")<0&&t.indexOf("Edge/")<0,Jf=t.indexOf("Chrome/")>=0&&t.indexOf("Edge/")<0,Xf=t.indexOf("Opera/")>=0||t.indexOf("OPR/")>=0,Yf=t.indexOf("Firefox/")>=0,Zf=t.indexOf("AppleWebKit/")>=0&&t.indexOf("Chrome/")<0&&t.indexOf("Edge/")<0,"object"==typeof document&&(ep=!document.createElementNS||"[object SVGForeignObjectElement]"!=`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`||t.indexOf("Opera/")>=0)}if("object"==typeof window&&(Hf=null!=window.chrome&&null!=window.chrome.app&&null!=window.chrome.app.runtime,Qf=null!=window.PointerEvent&&!zf),"object"==typeof document){Kf="ontouchstart"in document.documentElement;try{const t=Object.defineProperty({},"passive",{get(){tp=!0}}),e=document.createElement("div");e.addEventListener&&e.addEventListener("click",(()=>{}),t)}catch(t){}}var np;t.Platform=void 0,(np=t.Platform||(t.Platform={})).IS_MAC=zf,np.IS_IOS=$f,np.IS_WINDOWS=Ff,np.IS_IE=Gf,np.IS_IE11=Uf,np.IS_EDGE=qf,np.IS_NETSCAPE=Wf,np.IS_CHROME_APP=Hf,np.IS_CHROME=Jf,np.IS_OPERA=Xf,np.IS_FIREFOX=Yf,np.IS_SAFARI=Zf,np.SUPPORT_TOUCH=Kf,np.SUPPORT_POINTER=Qf,np.SUPPORT_PASSIVE=tp,np.NO_FOREIGNOBJECT=ep,np.SUPPORT_FOREIGNOBJECT=!np.NO_FOREIGNOBJECT,function(t){function e(){const t=window.module;return null!=t&&null!=t.hot&&null!=t.hot.status?t.hot.status():"unkonwn"}t.getHMRStatus=e,t.isApplyingHMR=function(){return"apply"===e()};const n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};t.isEventSupported=function(t){const e=document.createElement(n[t]||"div"),r=`on${t}`;let i=r in e;return i||(e.setAttribute(r,"return;"),i="function"==typeof e[r]),i}}(t.Platform||(t.Platform={}));const rp=/[\t\r\n\f]/g,ip=/\S+/g,sp=t=>` ${t} `;function op(t){return t&&t.getAttribute&&t.getAttribute("class")||""}function ap(t,e){if(null==t||null==e)return!1;const n=sp(op(t)),r=sp(e);return 1===t.nodeType&&n.replace(rp," ").includes(r)}function lp(t,e){if(null!=t&&null!=e){if("function"==typeof e)return lp(t,e(op(t)));if("string"==typeof e&&1===t.nodeType){const n=e.match(ip)||[],r=sp(op(t)).replace(rp," ");let i=n.reduce(((t,e)=>t.indexOf(sp(e))<0?`${t}${e} `:t),r);i=i.trim(),r!==i&&t.setAttribute("class",i)}}}function cp(t,e){if(null!=t){if("function"==typeof e)return cp(t,e(op(t)));if((!e||"string"==typeof e)&&1===t.nodeType){const n=(e||"").match(ip)||[],r=sp(op(t)).replace(rp," ");let i=n.reduce(((t,e)=>{const n=sp(e);return t.indexOf(n)>-1?t.replace(n," "):t}),r);i=e?i.trim():"",r!==i&&t.setAttribute("class",i)}}}function hp(t,e,n){if(null!=t&&null!=e)if(null==n||"string"!=typeof e){if("function"==typeof e)return hp(t,e(op(t),n),n);if("string"==typeof e){(e.match(ip)||[]).forEach((e=>{ap(t,e)?cp(t,e):lp(t,e)}))}}else n?lp(t,e):cp(t,e)}let up=0;function gp(){return up+=1,`v${up}`}function dp(t){return null!=t.id&&""!==t.id||(t.id=gp()),t.id}function fp(t){return null!=t&&("function"==typeof t.getScreenCTM&&t instanceof SVGElement)}const pp={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},mp="1.1";function yp(t,e=document){return e.createElement(t)}function vp(t,e=pp.xhtml,n=document){return n.createElementNS(e,t)}function bp(t,e=document){return vp(t,pp.svg,e)}function xp(t){if(t){const e=`${t}`,{documentElement:n}=wp(e,{async:!1});return n}const e=document.createElementNS(pp.svg,"svg");return e.setAttributeNS(pp.xmlns,"xmlns:xlink",pp.xlink),e.setAttribute("version",mp),e}function wp(t,e={}){let n;try{const r=new DOMParser;if(null!=e.async){r.async=e.async}n=r.parseFromString(t,e.mimeType||"text/xml")}catch(t){n=void 0}if(!n||n.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${t}`);return n}function Ap(t,e=!0){const n=t.nodeName;return e?n.toLowerCase():n.toUpperCase()}function Cp(t){let e=0,n=t.previousSibling;for(;n;)1===n.nodeType&&(e+=1),n=n.previousSibling;return e}function Pp(t,e){return t.querySelectorAll(e)}function Mp(t,e){return t.querySelector(e)}function Ep(t,e,n){const r=t.ownerSVGElement;let i=t.parentNode;for(;i&&i!==n&&i!==r;){if(ap(i,e))return i;i=i.parentNode}return null}function Sp(t,e){const n=e&&e.parentNode;return t===n||!!(n&&1===n.nodeType&&16&t.compareDocumentPosition(n))}function Op(t){if(t){(Array.isArray(t)?t:[t]).forEach((t=>{t.parentNode&&t.parentNode.removeChild(t)}))}}function Tp(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function kp(t,e){(Array.isArray(e)?e:[e]).forEach((e=>{null!=e&&t.appendChild(e)}))}function Np(t,e){const n=t.firstChild;return n?jp(n,e):kp(t,e)}function jp(t,e){const n=t.parentNode;if(n){(Array.isArray(e)?e:[e]).forEach((e=>{null!=e&&n.insertBefore(e,t)}))}}function _p(t,e){null!=e&&e.appendChild(t)}function Lp(t){return!!t&&1===t.nodeType}function Bp(t){try{return t instanceof HTMLElement}catch(e){return"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument}}const Ip=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function Dp(t,e){return t.getAttribute(e)}function Rp(t,e){const n=Fp(e);n.ns?t.hasAttributeNS(n.ns,n.local)&&t.removeAttributeNS(n.ns,n.local):t.hasAttribute(e)&&t.removeAttribute(e)}function Vp(t,e,n){if(null==n)return Rp(t,e);const r=Fp(e);r.ns&&"string"==typeof n?t.setAttributeNS(r.ns,e,n):"id"===e?t.id=`${n}`:t.setAttribute(e,`${n}`)}function zp(t,e){Object.keys(e).forEach((n=>{Vp(t,n,e[n])}))}function $p(t,e,n){if(null==e){const e=t.attributes,n={};for(let t=0;t{const r=Ip.includes(n)?n:Pf(n);e[r]=t[n]})),e}function Up(t){const e={};return t.split(";").forEach((t=>{const n=t.trim();if(n){const t=n.split("=");t.length&&(e[t[0].trim()]=t[1]?t[1].trim():"")}})),e}function qp(t,e){return Object.keys(e).forEach((n=>{if("class"===n)t[n]=t[n]?`${t[n]} ${e[n]}`:e[n];else if("style"===n){const r="object"==typeof t[n],i="object"==typeof e[n];let s,o;r&&i?(s=t[n],o=e[n]):r?(s=t[n],o=Up(e[n])):i?(s=Up(t[n]),o=e[n]):(s=Up(t[n]),o=Up(e[n])),t[n]=qp(s,o)}else t[n]=e[n]})),t}function Wp(t,e,n={}){const r=n.offset||0,i=[],s=[];let o,a,l=null;for(let c=0;c=l&&ct.starte>=t.start&&et.start&&n<=t.end||t.start>=e&&t.end{t.start=e?t.end+=n:t.start>=e&&(t.start+=n,t.end+=n)})),t}});let Xp;t.DataUri=void 0,function(t){function e(t){const e="data:";return t.substr(0,e.length)===e}function n(t){let e=t.replace(/\s/g,"");e=decodeURIComponent(e);const n=e.indexOf(","),r=e.slice(0,n),i=r.split(":")[1].split(";")[0],s=e.slice(n+1);let o;o=r.indexOf("base64")>=0?atob(s):unescape(encodeURIComponent(s));const a=new Uint8Array(o.length);for(let t=0;tn(null,t)));const r=()=>{n(new Error(`Failed to load image: ${t}`))},i=window.FileReader?t=>{if(200===t.status){const e=new FileReader;e.onload=t=>{const e=t.target.result;n(null,e)},e.onerror=r,e.readAsDataURL(t.response)}else r()}:e=>{if(200===e.status){let r=t.split(".").pop()||"png";"svg"===r&&(r="svg+xml");const i=`data:image/${r};base64,`,s=new Uint8Array(e.response),o=i+btoa((t=>{const e=[];for(let n=0;ni(s))),s.send()},t.dataUriToBlob=n,t.downloadBlob=r,t.downloadDataUri=function(t,e){r(n(t),e)},t.svgToDataUrl=function(t,e={}){let n=null;const r=e=>(null==n&&(n=function(t){const e=t.match(/]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return e&&e[2]?e[2].replace(/\s+/," ").split(" "):null}(t)),null!=n?i(n[e]):null),s=e=>{const n=t.match(e);return n&&n[2]?i(n[2]):null};let o=e.width;if(null==o&&(o=s(/]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),null==o&&(o=r(2)),null==o)throw new Error("Can not parse width from svg string");let a=e.height;if(null==a&&(a=s(/]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),null==a&&(a=r(3)),null==a)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(t).replace(/'/g,"%27").replace(/"/g,"%22")}`}}(t.DataUri||(t.DataUri={}));const Yp={px:t=>t,mm:t=>Xp*t,cm:t=>Xp*t*10,in:t=>Xp*t*25.4,pt:t=>Xp*(25.4*t/72),pc:t=>Xp*(25.4*t/6)};t.Unit=void 0,function(t){function e(t,e,n){const r=document.createElement("div"),i=r.style;i.display="inline-block",i.position="absolute",i.left="-15000px",i.top="-15000px",i.width=t+(n||"px"),i.height=e+(n||"px"),document.body.appendChild(r);const s=r.getBoundingClientRect(),o={width:s.width||0,height:s.height||0};return document.body.removeChild(r),o}t.measure=e,t.toPx=function(t,n){null==Xp&&(Xp=e("1","1","mm").width);const r=n?Yp[n]:null;return r?r(t):t}}(t.Unit||(t.Unit={}));const Zp=/-(.)/g;const Kp={},Qp=["webkit","ms","moz","o"],tm=document?document.createElement("div").style:{};function em(t){const e=t.replace(Zp,((t,e)=>e.toUpperCase()));if(null==Kp[e]){const t=e.charAt(0).toUpperCase()+e.slice(1);Kp[e]=e in tm?e:function(t){for(let e=0;e{e[n]=hm(t,n)})),e}if("string"==typeof e)return void 0===n?hm(t,e):void um(t,e,n);for(const n in e)gm(t,n,e[n])}const dm={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};class fm{get[Symbol.toStringTag](){return fm.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(t){this.node.id=t}constructor(t,e,n){if(!t)throw new TypeError("Invalid element to create vector");let r;if(fm.isVector(t))r=t.node;else if("string"==typeof t)if("svg"===t.toLowerCase())r=xp();else if("<"===t[0]){const e=xp(t);r=document.importNode(e.firstChild,!0)}else r=document.createElementNS(pp.svg,t);else r=t;this.node=r,e&&this.setAttributes(e),n&&this.append(n)}transform(t,e){return null==t?Km(this.node):(Km(this.node,t,e),this)}translate(t,e=0,n={}){return null==t?Qm(this.node):(Qm(this.node,t,e,n),this)}rotate(t,e,n,r={}){return null==t?ty(this.node):(ty(this.node,t,e,n,r),this)}scale(t,e){return null==t?ey(this.node):(ey(this.node,t,e),this)}getTransformToElement(t){const e=fm.toNode(t);return ny(this.node,e)}removeAttribute(t){return Rp(this.node,t),this}getAttribute(t){return Dp(this.node,t)}setAttribute(t,e){return Vp(this.node,t,e),this}setAttributes(t){return zp(this.node,t),this}attr(t,e){return null==t?$p(this.node):"string"==typeof t&&void 0===e?$p(this.node,t):("object"==typeof t?$p(this.node,t):$p(this.node,t,e),this)}svg(){return this.node instanceof SVGSVGElement?this:fm.create(this.node.ownerSVGElement)}defs(){const t=this.svg()||this,e=t.node.getElementsByTagName("defs")[0];return e?fm.create(e):fm.create("defs").appendTo(t)}text(t,e={}){return bm(this.node,t,e),this}tagName(){return Ap(this.node)}clone(){return fm.create(this.node.cloneNode(!0))}remove(){return Op(this.node),this}empty(){return Tp(this.node),this}append(t){return kp(this.node,fm.toNodes(t)),this}appendTo(t){return _p(this.node,fm.isVector(t)?t.node:t),this}prepend(t){return Np(this.node,fm.toNodes(t)),this}before(t){return jp(this.node,fm.toNodes(t)),this}replace(t){return this.node.parentNode&&this.node.parentNode.replaceChild(fm.toNode(t),this.node),fm.create(t)}first(){return this.node.firstChild?fm.create(this.node.firstChild):null}last(){return this.node.lastChild?fm.create(this.node.lastChild):null}get(t){const e=this.node.childNodes[t];return e?fm.create(e):null}indexOf(t){return Array.prototype.slice.call(this.node.childNodes).indexOf(fm.toNode(t))}find(t){const e=[],n=Pp(this.node,t);if(n)for(let t=0,r=n.length;tr(t))):[r(t)]}}(fm||(fm={}));const pm=document.createElement("canvas").getContext("2d");function mm(t,e,n){const r=n.eol,i=n.baseSize,s=n.lineHeight;let o,a=0;const l={},c=e.length-1;for(let s=0;s<=c;s+=1){let l=e[s],h=null;if("object"==typeof l){const t=l.attrs,e=fm.create("tspan",t);o=e.node;let u=l.t;r&&s===c&&(u+=r),o.textContent=u;const g=t.class;g&&e.addClass(g),n.includeAnnotationIndices&&e.attr("annotations",l.annotations.join(",")),h=parseFloat(t["font-size"]),void 0===h&&(h=i),h&&h>a&&(a=h)}else r&&s===c&&(l+=r),o=document.createTextNode(l||" "),i&&i>a&&(a=i);t.appendChild(o)}return a&&(l.maxFontSize=a),s?l.lineHeight=s:a&&(l.lineHeight=1.2*a),l}const ym=/em$/;function vm(t,e){const n=parseFloat(t);return ym.test(t)?n*e:n}function bm(t,e,n={}){e=Hp(e);const r=n.eol;let i=n.textPath;const s=n.textVerticalAnchor,o="middle"===s||"bottom"===s||"top"===s;let a=n.x;void 0===a&&(a=t.getAttribute("x")||0);const l=n.includeAnnotationIndices;let c=n.annotations;c&&!Array.isArray(c)&&(c=[c]);const h=n.lineHeight,u="auto"===h,g=u?"1.5em":h||"1em";let d=!0;const f=t.childNodes;if(1===f.length){const t=f[0];t&&"TITLE"===t.tagName.toUpperCase()&&(d=!1)}d&&Tp(t),$p(t,{"xml:space":"preserve",display:e||n.displayEmpty?null:"none"});const p=$p(t,"font-size");let m,y,v=parseFloat(p);v||(v=16,!o&&!c||p||$p(t,"font-size",`${v}`)),i?("string"==typeof i&&(i={d:i}),m=function(t,e){const n=fm.create(e),r=fm.create("textPath"),i=t.d;if(i&&void 0===t["xlink:href"]){const t=fm.create("path").attr("d",i).appendTo(n.defs());r.attr("xlink:href",`#${t.id}`)}return"object"==typeof t&&r.attr(t),r.node}(i,t)):m=document.createDocumentFragment();let b,x=0;const w=e.split("\n"),A=[],C=w.length-1;for(let t=0;t<=C;t+=1){y=g;let e="v-line";const n=bp("tspan");let s,o=w[t];if(o)if(c){s=mm(n,Wp(o,c,{offset:-x,includeAnnotationIndices:l}),{eol:t!==C&&r,baseSize:v,lineHeight:u?null:g,includeAnnotationIndices:l});const e=s.lineHeight;e&&u&&0!==t&&(y=e),0===t&&(b=.8*s.maxFontSize)}else r&&t!==C&&(o+=r),n.textContent=o;else{n.textContent="-",e+=" v-empty-line";const t=n.style;t.fillOpacity=0,t.strokeOpacity=0,c&&(s={})}s&&A.push(s),t>0&&n.setAttribute("dy",y),(t>0||i)&&n.setAttribute("x",a),n.className.baseVal=e,m.appendChild(n),x+=o.length+1}if(o)if(c)y=function(t,e,n,r){if(!Array.isArray(e))return 0;const i=e.length;if(!i)return 0;let s=e[0];const o=vm(s.maxFontSize,n)||n;let a=0;const l=vm(r,n);for(let t=1;t0?(t=parseFloat(g)||1,t*=C,ym.test(g)||(t/=v)):t=0,s){case"middle":y=.3-t/2+"em";break;case"bottom":y=-t-.3+"em"}}else 0===s?y="0em":s?y=s:(y=0,null==t.getAttribute("y")&&t.setAttribute("y",`${b||"0.8em"}`));m.firstChild.setAttribute("dy",y),t.appendChild(m)}function xm(t,e={}){if(!t)return{width:0};const n=[],r=e["font-size"]?`${parseFloat(e["font-size"])}px`:"14px";return n.push(e["font-style"]||"normal"),n.push(e["font-variant"]||"normal"),n.push(e["font-weight"]||400),n.push(r),n.push(e["font-family"]||"sans-serif"),pm.font=n.join(" "),pm.measureText(t)}function wm(t,e,n,r={}){if(e>=n)return[t,""];const i=t.length,s={};let o=Math.round(e/n*i-1);for(o<0&&(o=0);o>=0&&oe)o-=1;else{if(!(l<=e))break;o+=1}}return[t.slice(0,o),t.slice(o)]}function Am(t,e,n={},r={}){const i=e.width,s=e.height,o=r.eol||"\n",a=n.fontSize||14,l=n.lineHeight?parseFloat(n.lineHeight):Math.ceil(1.4*a),c=Math.floor(s/l);if(t.indexOf(o)>-1){const i=jf(),s=[];return t.split(o).map((t=>{const o=Am(t,Object.assign(Object.assign({},e),{height:Number.MAX_SAFE_INTEGER}),n,Object.assign(Object.assign({},r),{eol:i}));o&&s.push(...o.split(i))})),s.slice(0,c).join(o)}const{width:h}=xm(t,n);if(hi)){u.push(g);break}if(t===c-1){const[t]=wm(g,i-p,d,n);u.push(f?`${t}${f}`:t)}else{const[t,e]=wm(g,i,d,n);u.push(t),g=e,d=xm(g,n).width}}return u.join(o)}const Cm=.551784;function Pm(t,e,n=NaN){const r=t.getAttribute(e);if(null==r)return n;const i=parseFloat(r);return Number.isNaN(i)?n:i}function Mm(t,e=1){const n=t.getTotalLength(),r=[];let i,s=0;for(;s`${t.x} ${t.y}`)).join(" L")}`}function km(t){const e=[],n=t.points;if(n)for(let t=0,r=n.numberOfItems;t=0){const i=Jm(Um(t));e=[i.translateX,i.translateY],n=[i.rotation],r=[i.scaleX,i.scaleY];const s=[];0===e[0]&&0===e[1]||s.push(`translate(${e.join(",")})`),1===r[0]&&1===r[1]||s.push(`scale(${r.join(",")})`),0!==n[0]&&s.push(`rotate(${n[0]})`),t=s.join(" ")}else{const s=t.match(/translate\((.*?)\)/);s&&(e=s[1].split(i));const o=t.match(/rotate\((.*?)\)/);o&&(n=o[1].split(i));const a=t.match(/scale\((.*?)\)/);a&&(r=a[1].split(i))}}const i=r&&r[0]?parseFloat(r[0]):1;return{raw:t||"",translation:{tx:e&&e[0]?parseInt(e[0],10):0,ty:e&&e[1]?parseInt(e[1],10):0},rotation:{angle:n&&n[0]?parseInt(n[0],10):0,cx:n&&n[1]?parseInt(n[1],10):void 0,cy:n&&n[2]?parseInt(n[2],10):void 0},scale:{sx:i,sy:r&&r[1]?parseFloat(r[1]):i}}}function Hm(t,e){return{x:e.x*t.a+e.y*t.c+0,y:e.x*t.b+e.y*t.d+0}}function Jm(t){const e=Hm(t,{x:0,y:1}),n=Hm(t,{x:1,y:0}),r=180/Math.PI*Math.atan2(e.y,e.x)-90;return{skewX:r,skewY:180/Math.PI*Math.atan2(n.y,n.x),translateX:t.e,translateY:t.f,scaleX:Math.sqrt(t.a*t.a+t.b*t.b),scaleY:Math.sqrt(t.c*t.c+t.d*t.d),rotation:r}}function Xm(t){let e,n,r,i;return t?(e=null==t.a?1:t.a,i=null==t.d?1:t.d,n=t.b,r=t.c):e=i=1,{sx:n?Math.sqrt(e*e+n*n):e,sy:r?Math.sqrt(r*r+i*i):i}}function Ym(t){let e={x:0,y:1};t&&(e=Hm(t,e));const n=180*Math.atan2(e.y,e.x)/Math.PI%360-90;return{angle:n%360+(n<0?360:0)}}function Zm(t){return{tx:t&&t.e||0,ty:t&&t.f||0}}function Km(t,e,n={}){if(null==e)return Um($p(t,"transform"));if(n.absolute)return void t.setAttribute("transform",qm(e));const r=t.transform,i=Gm(e);r.baseVal.appendItem(i)}function Qm(t,e,n=0,r={}){let i=$p(t,"transform");const s=Wm(i);if(null==e)return s.translation;i=s.raw,i=i.replace(/translate\([^)]*\)/g,"").trim();const o=`translate(${r.absolute?e:s.translation.tx+e},${r.absolute?n:s.translation.ty+n})`;t.setAttribute("transform",`${o} ${i}`.trim())}function ty(t,e,n,r,i={}){let s=$p(t,"transform");const o=Wm(s);if(null==e)return o.rotation;s=o.raw,s=s.replace(/rotate\([^)]*\)/g,"").trim(),e%=360;const a=`rotate(${i.absolute?e:o.rotation.angle+e}${null!=n&&null!=r?`,${n},${r}`:""})`;t.setAttribute("transform",`${s} ${a}`.trim())}function ey(t,e,n){let r=$p(t,"transform");const i=Wm(r);if(null==e)return i.scale;n=null==n?e:n,r=i.raw,r=r.replace(/scale\([^)]*\)/g,"").trim();const s=`scale(${e},${n})`;t.setAttribute("transform",`${r} ${s}`.trim())}function ny(t,e){if(fp(e)&&fp(t)){const n=e.getScreenCTM(),r=t.getScreenCTM();if(n&&r)return n.inverse().multiply(r)}return Fm()}function ry(t,e){let n=Fm();if(fp(e)&&fp(t)){let r=t;const i=[];for(;r&&r!==e;){const t=Um(r.getAttribute("transform")||null);i.push(t),r=r.parentNode}i.reverse().forEach((t=>{n=n.multiply(t)}))}return n}function iy(t,e,n){const r=t instanceof SVGSVGElement?t:t.ownerSVGElement,i=r.createSVGPoint();i.x=e,i.y=n;try{const e=r.getScreenCTM(),n=i.matrixTransform(e.inverse()),s=ny(t,r).inverse();return n.matrixTransform(s)}catch(t){return i}}var sy,oy,ay;!function(t){const e={};t.get=function(t){return e[t]||{}},t.register=function(t,n){e[t]=n},t.unregister=function(t){delete e[t]}}(sy||(sy={})),function(t){const e=new WeakMap;t.ensure=function(t){return e.has(t)||e.set(t,{events:Object.create(null)}),e.get(t)},t.get=function(t){return e.get(t)},t.remove=function(t){return e.delete(t)}}(oy||(oy={})),function(t){t.returnTrue=()=>!0,t.returnFalse=()=>!1,t.stopPropagationCallback=function(t){t.stopPropagation()},t.addEventListener=function(t,e,n){null!=t.addEventListener&&t.addEventListener(e,n)},t.removeEventListener=function(t,e,n){null!=t.removeEventListener&&t.removeEventListener(e,n)}}(ay||(ay={})),function(t){const e=/[^\x20\t\r\n\f]+/g,n=/^([^.]*)(?:\.(.+)|)/;t.splitType=function(t){return(t||"").match(e)||[""]},t.normalizeType=function(t){const e=n.exec(t)||[];return{originType:e[1]?e[1].trim():e[1],namespaces:e[2]?e[2].split(".").map((t=>t.trim())).sort():[]}},t.isValidTarget=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType},t.isValidSelector=function(t,e){if(e){const n=t;return null!=n.querySelector&&null!=n.querySelector(e)}return!0}}(ay||(ay={})),function(t){let e=0;const n=new WeakMap;t.ensureHandlerId=function(t){return n.has(t)||(n.set(t,e),e+=1),n.get(t)},t.getHandlerId=function(t){return n.get(t)},t.removeHandlerId=function(t){return n.delete(t)},t.setHandlerId=function(t,e){return n.set(t,e)}}(ay||(ay={})),function(t){t.getHandlerQueue=function(t,e){const n=[],r=oy.get(t),i=r&&r.events&&r.events[e.type],s=i&&i.handlers||[],o=i?i.delegateCount:0;if(o>0&&!("click"===e.type&&"number"==typeof e.button&&e.button>=1))for(let r=e.target;r!==t;r=r.parentNode||t)if(1===r.nodeType&&("click"!==e.type||!0!==r.disabled)){const e=[],i={};for(let n=0;n{e.push(t)})),i[a]=e.includes(r)}i[a]&&e.push(o)}e.length&&n.push({elem:r,handlers:e})}return o{const t=this.originalEvent;this.isDefaultPrevented=ay.returnTrue,t&&!this.isSimulated&&t.preventDefault()},this.stopPropagation=()=>{const t=this.originalEvent;this.isPropagationStopped=ay.returnTrue,t&&!this.isSimulated&&t.stopPropagation()},this.stopImmediatePropagation=()=>{const t=this.originalEvent;this.isImmediatePropagationStopped=ay.returnTrue,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()},"string"==typeof t?this.type=t:t.type&&(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?ay.returnTrue:ay.returnFalse,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.timeStamp=t.timeStamp),e&&Object.assign(this,e),this.timeStamp||(this.timeStamp=Date.now())}}!function(t){t.create=function(e){return e instanceof t?e:new t(e)}}(ly||(ly={})),function(t){t.addProperty=function(e,n){Object.defineProperty(t.prototype,e,{enumerable:!0,configurable:!0,get:"function"==typeof n?function(){if(this.originalEvent)return n(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})}}(ly||(ly={})),function(t){const e={bubbles:!0,cancelable:!0,eventPhase:!0,detail:!0,view:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pageX:!0,pageY:!0,screenX:!0,screenY:!0,toElement:!0,pointerId:!0,pointerType:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,touches:!0,changedTouches:!0,targetTouches:!0,which:!0,altKey:!0,ctrlKey:!0,metaKey:!0,shiftKey:!0};Object.keys(e).forEach((n=>t.addProperty(n,e[n])))}(ly||(ly={})),sy.register("load",{noBubble:!0}),sy.register("beforeunload",{postDispatch(t,e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}),sy.register("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(t,e){let n;const r=e.relatedTarget,i=e.handleObj;return r&&(r===t||ay.contains(t,r))||(e.type=i.originType,n=i.handler.call(t,e),e.type="mouseover"),n}}),sy.register("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(t,e){let n;const r=e.relatedTarget,i=e.handleObj;return r&&(r===t||ay.contains(t,r))||(e.type=i.originType,n=i.handler.call(t,e),e.type="mouseout"),n}});var cy,hy,uy,gy=window&&window.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i{const{originType:n,namespaces:r}=ay.normalizeType(e);if(!n)return;let u=n,g=sy.get(u);u=(o?g.delegateType:g.bindType)||u,g=sy.get(u);const d=Object.assign({type:u,originType:n,data:s,selector:o,guid:h,handler:i,namespace:r.join(".")},a),f=l.events;let p=f[u];p||(p=f[u]={handlers:[],delegateCount:0},g.setup&&!1!==g.setup(t,s,r,c)||ay.addEventListener(t,u,c)),g.add&&(ay.removeHandlerId(d.handler),g.add(t,d),ay.setHandlerId(d.handler,h)),o?(p.handlers.splice(p.delegateCount,0,d),p.delegateCount+=1):p.handlers.push(d)}))},t.off=function t(e,n,r,i,s){const o=oy.get(e);if(!o)return;const a=o.events;a&&(ay.splitType(n).forEach((n=>{const{originType:l,namespaces:c}=ay.normalizeType(n);if(!l)return void Object.keys(a).forEach((s=>{t(e,s+n,r,i,!0)}));let h=l;const u=sy.get(h);h=(i?u.delegateType:u.bindType)||h;const g=a[h];if(!g)return;const d=c.length>0?new RegExp(`(^|\\.)${c.join("\\.(?:.*\\.|)")}(\\.|$)`):null,f=g.handlers.length;for(let t=g.handlers.length-1;t>=0;t-=1){const n=g.handlers[t];!s&&l!==n.originType||r&&ay.getHandlerId(r)!==n.guid||!(null==d||n.namespace&&d.test(n.namespace))||!(null==i||i===n.selector||"**"===i&&n.selector)||(g.handlers.splice(t,1),n.selector&&(g.delegateCount-=1),u.remove&&u.remove(e,n))}f&&0===g.handlers.length&&(u.teardown&&!1!==u.teardown(e,c,o.handler)||ay.removeEventListener(e,h,o.handler),delete a[h])})),0===Object.keys(a).length&&oy.remove(e))},t.dispatch=n,t.trigger=function(t,n,r,i){let s=t,o="string"==typeof t?t:t.type,a="string"==typeof t||null==s.namespace?[]:s.namespace.split(".");const l=r;if(3===l.nodeType||8===l.nodeType)return;o.indexOf(".")>-1&&(a=o.split("."),o=a.shift(),a.sort());const c=o.indexOf(":")<0&&`on${o}`;s=t instanceof ly?t:new ly(o,"object"==typeof t?t:null),s.namespace=a.join("."),s.rnamespace=s.namespace?new RegExp(`(^|\\.)${a.join("\\.(?:.*\\.|)")}(\\.|$)`):null,s.result=void 0,s.target||(s.target=l);const h=[s];Array.isArray(n)?h.push(...n):h.push(n);const u=sy.get(o);if(!i&&u.trigger&&!1===u.trigger(l,s,n))return;let g;const d=[l];if(!i&&!u.noBubble&&!ay.isWindow(l)){g=u.delegateType||o;let t=l,e=l.parentNode;for(;null!=e;)d.push(e),t=e,e=e.parentNode;if(t===(l.ownerDocument||document)){const e=t.defaultView||t.parentWindow||window;d.push(e)}}let f=l;for(let t=0,e=d.length;t1?g:u.bindType||o;const n=oy.get(e);n&&n.events[s.type]&&n.handler&&n.handler.call(e,...h);const r=c&&e[c]||null;r&&ay.isValidTarget(e)&&(s.result=r.call(e,...h),!1===s.result&&s.preventDefault())}if(s.type=o,!i&&!s.isDefaultPrevented()){const t=u.preventDefault;if((null==t||!1===t(d.pop(),s,n))&&ay.isValidTarget(l)&&c&&"function"==typeof l[o]&&!ay.isWindow(l)){const t=l[c];t&&(l[c]=null),e=o,s.isPropagationStopped()&&f.addEventListener(o,ay.stopPropagationCallback),l[o](),s.isPropagationStopped()&&f.removeEventListener(o,ay.stopPropagationCallback),e=void 0,t&&(l[c]=t)}}return s.result}}(cy||(cy={})),function(t){t.on=function(t,e,n,r,i){return uy.on(t,e,n,r,i),t},t.once=function(t,e,n,r,i){return uy.on(t,e,n,r,i,!0),t},t.off=function(t,e,n,r){return uy.off(t,e,n,r),t},t.trigger=function(t,e,n,r){return cy.trigger(e,n,t,r),t}}(hy||(hy={})),function(t){t.on=function e(n,r,i,s,o,a){if("object"==typeof r)return"string"!=typeof i&&(s=s||i,i=void 0),void Object.keys(r).forEach((t=>e(n,t,i,s,r[t],a)));if(null==s&&null==o?(o=i,s=i=void 0):null==o&&("string"==typeof i?(o=s,s=void 0):(o=s,s=i,i=void 0)),!1===o)o=ay.returnFalse;else if(!o)return;if(a){const e=o;o=function(r,...i){return t.off(n,r),e.call(this,r,...i)},ay.setHandlerId(o,ay.ensureHandlerId(e))}cy.on(n,r,o,s,i)},t.off=function t(e,n,r,i){const s=n;if(s&&null!=s.preventDefault&&null!=s.handleObj){const e=s.handleObj;t(s.delegateTarget,e.namespace?`${e.originType}.${e.namespace}`:e.originType,e.selector,e.handler)}else if("object"!=typeof n)!1!==r&&"function"!=typeof r||(i=r,r=void 0),!1===i&&(i=ay.returnFalse),cy.off(e,n,i,r);else{const i=n;Object.keys(i).forEach((n=>t(e,n,r,i[n])))}}}(uy||(uy={}));class dy{constructor(e,n,r){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=t.Platform.isEventSupported("wheel")?"wheel":"mousewheel",this.target=e,this.onWheelCallback=n,this.onWheelGuard=r,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){this.target.addEventListener(this.eventName,this.onWheel,{passive:!1})}disable(){this.target.removeEventListener(this.eventName,this.onWheel)}onWheel(t){if(null!=this.onWheelGuard&&!this.onWheelGuard(t))return;let e;this.deltaX+=t.deltaX,this.deltaY+=t.deltaY,t.preventDefault(),0===this.deltaX&&0===this.deltaY||(t.stopPropagation(),e=!0),!0===e&&0===this.animationFrameId&&(this.animationFrameId=requestAnimationFrame((()=>{this.didWheel(t)})))}didWheel(t){this.animationFrameId=0,this.onWheelCallback(t,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function fy(t){const e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView;return{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}}var py=Object.freeze({__proto__:null,CASE_SENSITIVE_ATTR:Ip,get Event(){return hy},get EventHook(){return sy},get EventObject(){return ly},KAPPA:Cm,MouseWheelHandle:dy,addClass:lp,after:function(t,e){const n=t.parentNode;if(n){(Array.isArray(e)?e:[e]).forEach((e=>{null!=e&&n.insertBefore(e,t.nextSibling)}))}},append:kp,appendTo:_p,attr:$p,before:jp,breakText:Am,children:function(t,e){const n=[];let r=t.firstChild;for(;r;r=r.nextSibling)1===r.nodeType&&(e&&!ap(r,e)||n.push(r));return n},circleToPathData:Nm,clearSelection:rm,computeStyle:om,computeStyleInt:am,contains:Sp,createElement:yp,createElementNS:vp,createSVGMatrix:Fm,createSVGPoint:$m,createSVGTransform:Gm,createSlicePathData:function(t,e,n,r){const i=2*Math.PI-1e-6,s=t,o=e;let a=n,l=r;if(l=i?s?`M0,${o}A${o},${o} 0 1,1 0,${-o}A${o},${o} 0 1,1 0,${o}M0,${s}A${s},${s} 0 1,0 0,${-s}A${s},${s} 0 1,0 0,${s}Z`:`M0,${o}A${o},${o} 0 1,1 0,${-o}A${o},${o} 0 1,1 0,${o}Z`:s?`M${o*u},${o*g}A${o},${o} 0 ${h},1 ${o*d},${o*f}L${s*d},${s*f}A${s},${s} 0 ${h},0 ${s*u},${s*g}Z`:`M${o*u},${o*g}A${o},${o} 0 ${h},1 ${o*d},${o*f}L0,0Z`},createSvgDocument:xp,createSvgElement:bp,css:lm,data:gm,decomposeMatrix:Jm,ellipseToPathData:jm,empty:Tp,ensureId:dp,find:Pp,findOne:Mp,findParentByClass:Ep,getAttribute:Dp,getClass:op,getComputedStyle:nm,getData:hm,getPointsFromSvgElement:km,getTransformToElement:ny,getTransformToParentElement:ry,getVendorPrefixedName:em,hasClass:ap,hasScrollbars:function(t){const e=nm(t);return null!=e&&("scroll"===e.overflow||"auto"===e.overflow)},height:function(t){return t.getBoundingClientRect().height},index:Cp,isCSSVariable:sm,isElement:Lp,isHTMLElement:Bp,isSVGGraphicsElement:fp,kebablizeAttrs:Gp,lineToPathData:Em,matrixToRotation:Ym,matrixToScale:Xm,matrixToTransformString:qm,matrixToTranslation:Zm,measureText:xm,mergeAttrs:qp,ns:pp,offset:fy,parseTransformString:Wm,parseXML:wp,polygonToPathData:Sm,polylineToPathData:Om,position:function(t){const e="fixed"===om(t,"position");let n;if(e){const e=t.getBoundingClientRect();n={left:e.left,top:e.top}}else n=fy(t);if(!e){const e=t.ownerDocument;let r=t.offsetParent||e.documentElement;for(;(r===e.body||r===e.documentElement)&&"static"===om(r,"position");)r=r.parentNode;if(r!==t&&Lp(r)){const t=fy(r);n.top-=t.top+am(r,"borderTopWidth"),n.left-=t.left+am(r,"borderLeftWidth")}}return{top:n.top-am(t,"marginTop"),left:n.left-am(t,"marginLeft")}},prepend:Np,prop:function t(e,n,r){if(n){if("string"==typeof n)return n=dm[n]||n,arguments.length<3?e[n]:void(e[n]=r);for(const r in n)t(e,r,n[r])}},qualifyAttr:Fp,rectToPathData:Lm,rectangleToPathData:_m,remove:Op,removeAttribute:Rp,removeClass:cp,rotate:ty,sample:Mm,scale:ey,setAttribute:Vp,setAttributes:zp,setData:um,setPrefixedStyle:function(t,e,n){const r=em(e);null!=r&&(t[r]=n),t[e]=n},splitTextByLength:wm,styleToObject:Up,svgVersion:mp,tagName:Ap,text:bm,toLocalPoint:iy,toPath:Bm,toPathData:Im,toggleClass:hp,transform:Km,transformStringToMatrix:Um,translate:Qm,uniqueId:gp,width:function(t){return t.getBoundingClientRect().width}});function my(t,e=60){let n=null;return(...r)=>{n&&clearTimeout(n),n=window.setTimeout((()=>{t.apply(this,r)}),e)}}const yy="undefined"!=typeof ResizeObserver?function(t){let e=null,n=[];const r=my((()=>{n.forEach((e=>{e(t)}))})),i=()=>{e&&(e.disconnect(),n=[],e=null)};return{element:t,bind:i=>{e||(e=(()=>{const e=new ResizeObserver(r);return e.observe(t),r(),e})()),-1===n.indexOf(i)&&n.push(i)},destroy:i,unbind:t=>{const r=n.indexOf(t);-1!==r&&n.splice(r,1),0===n.length&&e&&i()}}}:function(t){let e=null,n=[];const r=my((()=>{n.forEach((e=>e(t)))})),i=()=>{e&&e.parentNode&&(e.contentDocument&&e.contentDocument.defaultView.removeEventListener("resize",r),e.parentNode.removeChild(e),e=null,n=[])};return{element:t,bind:i=>{e||(e=(()=>{"static"===getComputedStyle(t).position&&(t.style.position="relative");const e=document.createElement("object");return e.onload=()=>{e.contentDocument.defaultView.addEventListener("resize",r),r()},e.style.display="block",e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.height="100%",e.style.width="100%",e.style.overflow="hidden",e.style.pointerEvents="none",e.style.zIndex="-1",e.style.opacity="0",e.setAttribute("tabindex","-1"),e.type="text/html",t.appendChild(e),e.data="about:blank",e})()),-1===n.indexOf(i)&&n.push(i)},destroy:i,unbind:t=>{const r=n.indexOf(t);-1!==r&&n.splice(r,1),0===n.length&&e&&i()}}};t.SizeSensor=void 0,function(t){const e=new WeakMap;function n(t){let n=e.get(t);return n||(n=yy(t),e.set(t,n),n)}t.bind=(t,e)=>{const r=n(t);return r.bind(e),()=>r.unbind(e)},t.clear=t=>{!function(t){t.destroy(),e.delete(t.element)}(n(t))}}(t.SizeSensor||(t.SizeSensor={}));class vy{constructor(t={}){this.comparator=t.comparator||vy.defaultComparator,this.index={},this.data=t.data||[],this.heapify()}isEmpty(){return 0===this.data.length}insert(t,e,n){const r={priority:t,value:e},i=this.data.length;return n&&(r.id=n,this.index[n]=i),this.data.push(r),this.bubbleUp(i),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}updatePriority(t,e){const n=this.index[t];if(void 0===n)throw new Error(`Node with id '${t}' was not found in the heap.`);const r=this.data,i=r[n].priority,s=this.comparator(e,i);s<0?(r[n].priority=e,this.bubbleUp(n)):s>0&&(r[n].priority=e,this.bubbleDown(n))}remove(){const t=this.data,e=t[0],n=t.pop();return e.id&&delete this.index[e.id],t.length>0&&(t[0]=n,n.id&&(this.index[n.id]=0),this.bubbleDown(0)),e?e.value:null}heapify(){for(let t=0;t0&&(r=i-1>>>1,this.comparator(e[i].priority,e[r].priority)<0);){n=e[r],e[r]=e[i];let t=e[i].id;null!=t&&(this.index[t]=r),e[i]=n,t=e[i].id,null!=t&&(this.index[t]=i),i=r}}bubbleDown(t){const e=this.data,n=e.length-1;let r=t;for(;;){const t=1+(r<<1),i=t+1;let s=r;if(t<=n&&this.comparator(e[t].priority,e[s].priority)<0&&(s=t),i<=n&&this.comparator(e[i].priority,e[s].priority)<0&&(s=i),s===r)break;{const t=e[s];e[s]=e[r];let n=e[r].id;null!=n&&(this.index[n]=s),e[r]=t,n=e[r].id,null!=n&&(this.index[n]=r),r=s}}}}var by,xy;!function(t){t.defaultComparator=(t,e)=>t-e}(vy||(vy={})),t.Dijkstra=void 0,(t.Dijkstra||(t.Dijkstra={})).run=function(t,e,n=((t,e)=>1)){const r={},i={},s={},o=new vy;for(r[e]=0,Object.keys(t).forEach((t=>{t!==e&&(r[t]=1/0),o.insert(r[t],t,t)}));!o.isEmpty();){const e=o.remove();s[e]=!0;const a=t[e]||[];for(let t=0;t{const e=this[t].toString(16);return e.length<2?`0${e}`:e})).join("")}`}toRGBA(){return this.toArray()}toHSLA(){return wy.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(t){const e=`${this.r},${this.g},${this.b},`;return t?`rgb(${e})`:`rgba(${e},${this.a})`}toGrey(){return wy.makeGrey(Math.round((this.r+this.g+this.b)/3),this.a)}toArray(){return[this.r,this.g,this.b,this.a]}toString(){return this.toCSS()}}!function(t){function e(e){return new t([...a(e),1])}function n(e){const n=e.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(n){const e=n[1].split(/\s*,\s*/).map((t=>parseInt(t,10)));return new t(e)}return null}function r(t,e,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?t+(e-t)*r:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function i(e){const n=e.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(n){const e=n[2].split(/\s*,\s*/),r=(parseFloat(e[0])%360+360)%360/360,i=parseFloat(e[1])/100,o=parseFloat(e[2])/100,a=null==e[3]?1:parseInt(e[3],10);return new t(s(r,i,o,a))}return null}function s(t,e,n,i){const s=Array.isArray(t)?t[0]:t,o=Array.isArray(t)?t[1]:e,a=Array.isArray(t)?t[2]:n,l=Array.isArray(t)?t[3]:i,c=a<=.5?a*(o+1):a+o-a*o,h=2*a-c;return[256*r(h,c,s+1/3),256*r(h,c,s),256*r(h,c,s-1/3),null==l?1:l]}function o(e){return new t(Math.round(256*Math.random()),Math.round(256*Math.random()),Math.round(256*Math.random()),e?void 0:parseFloat(Math.random().toFixed(2)))}function a(t){const e=0===t.indexOf("#")?t:`#${t}`;let n=Number(`0x${e.substr(1)}`);if(4!==e.length&&7!==e.length||Number.isNaN(n))throw new Error("Invalid hex color.");const r=4===e.length?4:8,i=(1<{const t=n&i;return n>>=r,4===r?17*t:t}));return[s[2],s[1],s[0]]}function l(t,e,n){const r=t=>t.length<2?`0${t}`:t;return`${r(t.toString(16))}${r(e.toString(16))}${r(n.toString(16))}`}function c(t,e){if("string"==typeof t){const n="#"===t[0],r=parseInt(n?t.substr(1):t,16),i=Hi((r>>16)+e,0,255),s=Hi((r>>8&255)+e,0,255);return`${n?"#":""}${(Hi((255&r)+e,0,255)|s<<8|i<<16).toString(16)}`}const n=a(c(l(t[0],t[1],t[2]),e));return[n[0],n[1],n[2],t[3]]}t.fromArray=function(e){return new t(e)},t.fromHex=e,t.fromRGBA=n,t.fromHSLA=i,t.fromString=function(r){if(r.startsWith("#"))return e(r);if(r.startsWith("rgb"))return n(r);const s=t.named[r];return s?e(s):i(r)},t.makeGrey=function(e,n){return t.fromArray([e,e,e,n])},t.rgba2hsla=function(t,e,n,r){const i=Array.isArray(t)?t[0]:t,s=Array.isArray(t)?t[1]:e,o=Array.isArray(t)?t[2]:n,a=Array.isArray(t)?t[3]:r,l=Math.max(i,s,o),c=Math.min(i,s,o),h=(l+c)/2;let u=0,g=0;if(c!==l){const t=l-c;switch(g=h>.5?t/(2-l-c):t/(l+c),l){case i:u=(s-o)/t+(s186?"#000000":"#ffffff":`${n?"#":""}${l(255-r,255-i,255-s)}`}const n=t[0],r=t[1],i=t[2],s=t[3];return e?.299*n+.587*r+.114*i>186?[0,0,0,s]:[255,255,255,s]:[255-n,255-r,255-i,s]},t.lighten=function(t,e){return c(t,e)},t.darken=function(t,e){return c(t,-e)}}(wy||(wy={})),function(t){t.named={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",burntsienna:"#ea7e5d",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(wy||(wy={}));class Ay{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(t){return this.map.has(t)}get(t){return this.map.get(t)}set(t,e){this.map.set(t,e),this.arr.push(t)}delete(t){const e=this.arr.indexOf(t);e>=0&&this.arr.splice(e,1);const n=this.map.get(t);return this.map.delete(t),n}each(t){this.arr.forEach((e=>{const n=this.map.get(e);t(n,e)}))}dispose(){this.clear()}}t.ModifierKey=void 0,function(t){function e(t){const e=[],n=[];return Array.isArray(t)?e.push(...t):t.split("|").forEach((t=>{-1===t.indexOf("&")?e.push(t):n.push(...t.split("&"))})),{or:e,and:n}}t.parse=e,t.equals=function(t,n){if(null!=t&&null!=n){const r=e(t),i=e(n),s=r.or.sort(),o=i.or.sort(),a=r.and.sort(),l=i.and.sort(),c=(t,e)=>t.length===e.length&&(0===t.length||t.every(((t,n)=>t===e[n])));return c(s,o)&&c(a,l)}return null==t&&null==n},t.isMatch=function(t,n,r){if(null==n||Array.isArray(n)&&0===n.length)return!r||!0!==t.altKey&&!0!==t.ctrlKey&&!0!==t.metaKey&&!0!==t.shiftKey;const{or:i,and:s}=e(n),o=e=>{const n=`${e.toLowerCase()}Key`;return!0===t[n]};return i.some((t=>o(t)))&&s.every((t=>o(t)))}}(t.ModifierKey||(t.ModifierKey={})),t.Timing=void 0,(by=t.Timing||(t.Timing={})).linear=t=>t,by.quad=t=>t*t,by.cubic=t=>t*t*t,by.inout=t=>{if(t<=0)return 0;if(t>=1)return 1;const e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)},by.exponential=t=>Math.pow(2,10*(t-1)),by.bounce=t=>{for(let e=0,n=1;;e+=n,n/=2)if(t>=(7-4*e)/11){const r=(11-6*e-11*t)/4;return-r*r+n*n}},function(t){t.decorators={reverse:t=>e=>1-t(1-e),reflect:t=>e=>.5*(e<.5?t(2*e):2-t(2-2*e)),clamp:(t,e=0,n=1)=>r=>{const i=t(r);return in?n:i},back:(t=1.70158)=>e=>e*e*((t+1)*e-t),elastic:(t=1.5)=>e=>Math.pow(2,10*(e-1))*Math.cos(20*Math.PI*t/3*e)}}(t.Timing||(t.Timing={})),function(t){function e(t){const e=t/1;if(e<1/2.75)return 7.5625*e*e;if(e<2/2.75){const t=e-1.5/2.75;return 7.5625*t*t+.75}if(e<2.5/2.75){const t=e-2.25/2.75;return 7.5625*t*t+.9375}{const t=e-2.625/2.75;return 7.5625*t*t+.984375}}function n(t){return 1-e(1-t)}t.easeInSine=function(t){return-1*Math.cos(t*(Math.PI/2))+1},t.easeOutSine=function(t){return Math.sin(t*(Math.PI/2))},t.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.easeInQuad=function(t){return t*t},t.easeOutQuad=function(t){return t*(2-t)},t.easeInOutQuad=function(t){return t<.5?2*t*t:(4-2*t)*t-1},t.easeInCubic=function(t){return t*t*t},t.easeOutCubic=function(t){const e=t-1;return e*e*e+1},t.easeInOutCubic=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},t.easeInQuart=function(t){return t*t*t*t},t.easeOutQuart=function(t){const e=t-1;return 1-e*e*e*e},t.easeInOutQuart=function(t){const e=t-1;return t<.5?8*t*t*t*t:1-8*e*e*e*e},t.easeInQuint=function(t){return t*t*t*t*t},t.easeOutQuint=function(t){const e=t-1;return 1+e*e*e*e*e},t.easeInOutQuint=function(t){const e=t-1;return t<.5?16*t*t*t*t*t:1+16*e*e*e*e*e},t.easeInExpo=function(t){return 0===t?0:Math.pow(2,10*(t-1))},t.easeOutExpo=function(t){return 1===t?1:1-Math.pow(2,-10*t)},t.easeInOutExpo=function(t){if(0===t||1===t)return t;const e=2*t,n=e-1;return e<1?.5*Math.pow(2,10*n):.5*(2-Math.pow(2,-10*n))},t.easeInCirc=function(t){const e=t/1;return-1*(Math.sqrt(1-e*t)-1)},t.easeOutCirc=function(t){const e=t-1;return Math.sqrt(1-e*e)},t.easeInOutCirc=function(t){const e=2*t,n=e-2;return e<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-n*n)+1)},t.easeInBack=function(t,e=1.70158){return t*t*((e+1)*t-e)},t.easeOutBack=function(t,e=1.70158){const n=t/1-1;return n*n*((e+1)*n+e)+1},t.easeInOutBack=function(t,e=1.70158){const n=2*t,r=n-2,i=1.525*e;return n<1?.5*n*n*((i+1)*n-i):.5*(r*r*((i+1)*r+i)+2)},t.easeInElastic=function(t,e=.7){if(0===t||1===t)return t;const n=t/1-1,r=1-e,i=r/(2*Math.PI)*Math.asin(1);return-Math.pow(2,10*n)*Math.sin((n-i)*(2*Math.PI)/r)},t.easeOutElastic=function(t,e=.7){const n=1-e,r=2*t;if(0===t||1===t)return t;const i=n/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*r)*Math.sin((r-i)*(2*Math.PI)/n)+1},t.easeInOutElastic=function(t,e=.65){const n=1-e;if(0===t||1===t)return t;const r=2*t,i=r-1,s=n/(2*Math.PI)*Math.asin(1);return r<1?Math.pow(2,10*i)*Math.sin((i-s)*(2*Math.PI)/n)*-.5:Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/n)*.5+1},t.easeOutBounce=e,t.easeInBounce=n,t.easeInOutBounce=function(t){return t<.5?.5*n(2*t):.5*e(2*t-1)+.5}}(t.Timing||(t.Timing={})),t.Interp=void 0,(xy=t.Interp||(t.Interp={})).number=(t,e)=>{const n=e-t;return e=>t+n*e},xy.object=(t,e)=>{const n=Object.keys(t);return r=>{const i={};for(let s=n.length-1;-1!==s;s-=1){const o=n[s];i[o]=t[o]+(e[o]-t[o])*r}return i}},xy.unit=(t,e)=>{const n=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=n.exec(t),i=n.exec(e),s=i?i[1]:"",o=r?+r[1]:0,a=i?+i[1]:0,l=s.indexOf("."),c=l>0?s[1].length-l-1:0,h=a-o,u=r?r[2]:"";return t=>(o+h*t).toFixed(c)+u},xy.color=(t,e)=>{const n=parseInt(t.slice(1),16),r=parseInt(e.slice(1),16),i=255&n,s=(255&r)-i,o=65280&n,a=(65280&r)-o,l=16711680&n,c=(16711680&r)-l;return t=>`#${(1<<24|i+s*t&255|o+a*t&65280|l+c*t&16711680).toString(16).slice(1)}`};const Cy=[];function Py(e,n){const r=Cy.find((t=>t.name===e));if(!(r&&(r.loadTimes+=1,r.loadTimes>1)||t.Platform.isApplyingHMR())){const t=document.createElement("style");t.setAttribute("type","text/css"),t.textContent=n;const r=document.querySelector("head");r&&r.insertBefore(t,r.firstChild),Cy.push({name:e,loadTimes:1,styleElement:t})}}function My(t){const e=Cy.findIndex((e=>e.name===t));if(e>-1){const t=Cy[e];if(t.loadTimes-=1,t.loadTimes>0)return;let n=t.styleElement;n&&n.parentNode&&n.parentNode.removeChild(n),n=null,Cy.splice(e,1)}}var Ey,Sy,Oy=Object.freeze({__proto__:null,clean:My,ensure:Py});t.Angle=void 0,(Ey=t.Angle||(t.Angle={})).toDeg=function(t){return 180*t/Math.PI%360},Ey.toRad=function(t,e=!1){return(e?t:t%360)*Math.PI/180},Ey.normalize=function(t){return t%360+(t<0?360:0)},t.GeometryUtil=void 0,(Sy=t.GeometryUtil||(t.GeometryUtil={})).round=function(t,e=0){return Number.isInteger(t)?t:+t.toFixed(e)},Sy.random=function(t,e){let n,r;if(null==e?(r=null==t?1:t,n=0):(r=e,n=null==t?0:t),rn?n:t:te?e:t},Sy.snapToGrid=function(t,e){return e*Math.round(t/e)},Sy.containsPoint=function(t,e){return null!=e&&null!=t&&e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height},Sy.squaredLength=function(t,e){const n=t.x-e.x,r=t.y-e.y;return n*n+r*r};class Ty{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class ky extends Ty{constructor(t,e){super(),this.x=null==t?0:t,this.y=null==e?0:e}round(e=0){return this.x=t.GeometryUtil.round(this.x,e),this.y=t.GeometryUtil.round(this.y,e),this}add(t,e){const n=ky.create(t,e);return this.x+=n.x,this.y+=n.y,this}update(t,e){const n=ky.create(t,e);return this.x=n.x,this.y=n.y,this}translate(t,e){const n=ky.create(t,e);return this.x+=n.x,this.y+=n.y,this}rotate(t,e){const n=ky.rotate(this,t,e);return this.x=n.x,this.y=n.y,this}scale(t,e,n=new ky){const r=ky.create(n);return this.x=r.x+t*(this.x-r.x),this.y=r.y+e*(this.y-r.y),this}closest(t){if(1===t.length)return ky.create(t[0]);let e=null,n=1/0;return t.forEach((t=>{const r=this.squaredDistance(t);rr&&(o=(this.x+this.width-r)/(f.x-r)),f.y>i&&(h=(this.y+this.height-i)/(f.y-i));const p=n.topRight;p.x>r&&(a=(this.x+this.width-r)/(p.x-r)),p.yi&&(g=(this.y+this.height-i)/(m.y-i)),{sx:Math.min(s,o,a,l),sy:Math.min(c,h,u,g)}}getMaxUniformScaleToFit(t,e=this.center){const n=this.getMaxScaleToFit(t,e);return Math.min(n.sx,n.sy)}containsPoint(e,n){return t.GeometryUtil.containsPoint(this,ky.create(e,n))}containsRect(t,e,n,r){const i=Ny.create(t,e,n,r),s=this.x,o=this.y,a=this.width,l=this.height,c=i.x,h=i.y,u=i.width,g=i.height;return 0!==a&&0!==l&&0!==u&&0!==g&&(c>=s&&h>=o&&c+u<=s+a&&h+g<=o+l)}intersectsWithLine(t){const e=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],n=[],r=[];return e.forEach((e=>{const i=t.intersectsWithLine(e);null!==i&&r.indexOf(i.toString())<0&&(n.push(i),r.push(i.toString()))})),n.length>0?n:null}intersectsWithLineFromCenterToPoint(t,e){const n=ky.clone(t),r=this.center;let i=null;null!=e&&0!==e&&n.rotate(e,r);const s=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],o=new jy(r,n);for(let t=s.length-1;t>=0;t-=1){const e=s[t].intersectsWithLine(o);if(null!==e){i=e;break}}return i&&null!=e&&0!==e&&i.rotate(-e,r),i}intersectsWithRect(t,e,n,r){const i=Ny.create(t,e,n,r);if(!this.isIntersectWithRect(i))return null;const s=this.origin,o=this.corner,a=i.origin,l=i.corner,c=Math.max(s.x,a.x),h=Math.max(s.y,a.y);return new Ny(c,h,Math.min(o.x,l.x)-c,Math.min(o.y,l.y)-h)}isIntersectWithRect(t,e,n,r){const i=Ny.create(t,e,n,r),s=this.origin,o=this.corner,a=i.origin,l=i.corner;return!(l.x<=s.x||l.y<=s.y||a.x>=o.x||a.y>=o.y)}normalize(){let t=this.x,e=this.y,n=this.width,r=this.height;return this.width<0&&(t=this.x+this.width,n=-this.width),this.height<0&&(e=this.y+this.height,r=-this.height),this.x=t,this.y=e,this.width=n,this.height=r,this}union(t){const e=Ny.clone(t),n=this.origin,r=this.corner,i=e.origin,s=e.corner,o=Math.min(n.x,i.x),a=Math.min(n.y,i.y),l=Math.max(r.x,s.x),c=Math.max(r.y,s.y);return new Ny(o,a,l-o,c-a)}getNearestSideToPoint(t){const e=ky.clone(t),n=e.x-this.x,r=this.x+this.width-e.x,i=e.y-this.y;let s=n,o="left";return r=1?n.clone():e.lerp(n,t)}pointAtLength(t){const e=this.start,n=this.end;let r=!0;t<0&&(r=!1,t=-t);const i=this.length();if(t>=i)return r?n.clone():e.clone();const s=(r?t:i-t)/i;return this.pointAt(s)}divideAt(t){const e=this.pointAt(t);return[new jy(this.start,e),new jy(e,this.end)]}divideAtLength(t){const e=this.pointAtLength(t);return[new jy(this.start,e),new jy(e,this.end)]}containsPoint(t){const e=this.start,n=this.end;if(0!==e.cross(t,n))return!1;const r=this.length();return!(new jy(e,t).length()>r)&&!(new jy(t,n).length()>r)}intersect(t,e){const n=t.intersectsWithLine(this,e);return n?Array.isArray(n)?n:[n]:null}intersectsWithLine(t){const e=new ky(this.end.x-this.start.x,this.end.y-this.start.y),n=new ky(t.end.x-t.start.x,t.end.y-t.start.y),r=e.x*n.y-e.y*n.x,i=new ky(t.start.x-this.start.x,t.start.y-this.start.y),s=i.x*n.y-i.y*n.x,o=i.x*e.y-i.y*e.x;if(0===r||s*r<0||o*r<0)return null;if(r>0){if(s>r||o>r)return null}else if(s0&&(r-=s,i-=o,a=r*s+i*o,a<0&&(a=0))),a<0?-1:a>0?1:0}equals(t){return null!=t&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.end.x===t.end.x&&this.end.y===t.end.y}clone(){return new jy(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}!function(t){t.isLine=function(e){return null!=e&&e instanceof t}}(jy||(jy={}));let _y=class t extends Ty{get center(){return new ky(this.x,this.y)}constructor(t,e,n,r){super(),this.x=null==t?0:t,this.y=null==e?0:e,this.a=null==n?0:n,this.b=null==r?0:r}bbox(){return Ny.fromEllipse(this)}getCenter(){return this.center}inflate(t,e){const n=t,r=null!=e?e:t;return this.a+=2*n,this.b+=2*r,this}normalizedDistance(t,e){const n=ky.create(t,e),r=n.x-this.x,i=n.y-this.y,s=this.a,o=this.b;return r*r/(s*s)+i*i/(o*o)}containsPoint(t,e){return this.normalizedDistance(t,e)<=1}intersectsWithLine(t){const e=[],n=this.a,r=this.b,i=t.start,s=t.end,o=t.vector(),a=i.diff(new ky(this.x,this.y)),l=new ky(o.x/(n*n),o.y/(r*r)),c=new ky(a.x/(n*n),a.y/(r*r)),h=o.dot(l),u=o.dot(c),g=u*u-h*(a.dot(c)-1);if(g<0)return null;if(g>0){const t=Math.sqrt(g),n=(-u-t)/h,r=(-u+t)/h;if((n<0||n>1)&&(r<0||r>1))return null;n>=0&&n<=1&&e.push(i.lerp(s,n)),r>=0&&r<=1&&e.push(i.lerp(s,r))}else{const t=-u/h;if(!(t>=0&&t<=1))return null;e.push(i.lerp(s,t))}return e}intersectsWithLineFromCenterToPoint(t,e=0){const n=ky.clone(t);e&&n.rotate(e,this.getCenter());const r=n.x-this.x,i=n.y-this.y;let s;if(0===r)return s=this.bbox().getNearestPointToPoint(n),e?s.rotate(-e,this.getCenter()):s;const o=i/r,a=o*o,l=this.a*this.a,c=this.b*this.b;let h=Math.sqrt(1/(1/l+a/c));h=r<0?-h:h;const u=o*h;return s=new ky(this.x+h,this.y+u),e?s.rotate(-e,this.getCenter()):s}tangentTheta(t){const e=ky.clone(t),n=e.x,r=e.y,i=this.a,s=this.b,o=this.bbox().center,a=o.x,l=o.y,c=n>o.x+i/2,h=no.x?r-30:r+30,u=i*i/(n-a)-i*i*(r-l)*(g-l)/(s*s*(n-a))+a):(u=r>o.y?n+30:n-30,g=s*s/(r-l)-s*s*(n-a)*(u-a)/(i*i*(r-l))+l),new ky(u,g).theta(e)}scale(t,e){return this.a*=t,this.b*=e,this}rotate(e,n){const r=Ny.fromEllipse(this);r.rotate(e,n);const i=t.fromRect(r);return this.a=i.a,this.b=i.b,this.x=i.x,this.y=i.y,this}translate(t,e){const n=ky.create(t,e);return this.x+=n.x,this.y+=n.y,this}equals(t){return null!=t&&t.x===this.x&&t.y===this.y&&t.a===this.a&&t.b===this.b}clone(){return new t(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}};!function(t){t.isEllipse=function(e){return null!=e&&e instanceof t}}(_y||(_y={})),function(t){function e(e){return t.isEllipse(e)?e.clone():Array.isArray(e)?new t(e[0],e[1],e[2],e[3]):new t(e.x,e.y,e.a,e.b)}t.create=function(n,r,i,s){return null==n||"number"==typeof n?new t(n,r,i,s):e(n)},t.parse=e,t.fromRect=function(e){const n=e.center;return new t(n.x,n.y,e.width/2,e.height/2)}}(_y||(_y={}));const Ly=new RegExp("^[\\s\\dLMCZz,.]*$");function By(t){return"string"==typeof t&&Ly.test(t)}function Iy(t,e){return(t%e+e)%e}function Dy(t,e={}){const n=[];return t&&t.length&&t.forEach((t=>{Array.isArray(t)?n.push({x:t[0],y:t[1]}):n.push({x:t.x,y:t.y})})),function(t,e,n,r,i){const s=[],o=t[t.length-1],a=null!=e&&e>0,l=e||0;if(r&&a){const e=(t=t.slice())[0],n=new ky(o.x+(e.x-o.x)/2,o.y+(e.y-o.y)/2);t.splice(0,0,n)}let c=t[0],h=1;for(n?s.push("M",c.x,c.y):s.push("L",c.x,c.y);h<(r?t.length:t.length-1);){let e=t[Iy(h,t.length)],n=c.x-e.x,r=c.y-e.y;if(a&&(0!==n||0!==r)&&(null==i||i.indexOf(h-1)<0)){let i=Math.sqrt(n*n+r*r);const o=n*Math.min(l,i/2)/i,a=r*Math.min(l,i/2)/i,c=e.x+o,u=e.y+a;s.push("L",c,u);let g=t[Iy(h+1,t.length)];for(;h"string"==typeof t?t:+t.toFixed(3))).join(" ")}(n,e.round,null==e.initialMove||e.initialMove,e.close,e.exclude)}function Ry(t,e,n,r,i=0,s=0,o=0,a,l){if(0===n||0===r)return[];a-=t,l-=e,n=Math.abs(n),r=Math.abs(r);const c=-a/2,h=-l/2,u=Math.cos(i*Math.PI/180),g=Math.sin(i*Math.PI/180),d=u*c+g*h,f=-1*g*c+u*h,p=d*d,m=f*f,y=n*n,v=r*r,b=p/y+m/v;let x;if(b>1)n=Math.sqrt(b)*n,r=Math.sqrt(b)*r,x=0;else{let t=1;s===o&&(t=-1),x=t*Math.sqrt((y*v-y*m-v*p)/(y*m+v*p))}const w=x*n*f/r,A=-1*x*r*d/n,C=u*w-g*A+a/2,P=g*w+u*A+l/2;let M=Math.atan2((f-A)/r,(d-w)/n)-Math.atan2(0,1),E=M>=0?M:2*Math.PI+M;M=Math.atan2((-f-A)/r,(-d-w)/n)-Math.atan2((f-A)/r,(d-w)/n);let S=M>=0?M:2*Math.PI+M;0===o&&S>0?S-=2*Math.PI:0!==o&&S<0&&(S+=2*Math.PI);const O=2*S/Math.PI,T=Math.ceil(O<0?-1*O:O),k=S/T,N=8/3*Math.sin(k/4)*Math.sin(k/4)/Math.sin(k/2),j=u*n,_=u*r,L=g*n,B=g*r;let I=Math.cos(E),D=Math.sin(E),R=-N*(j*D+B*I),V=-N*(L*D-_*I),z=0,$=0;const F=[];for(let n=0;n+t.toFixed(2)))}function Vy(t,e,n,r,i=0,s=0,o=0,a,l){const c=[],h=Ry(t,e,n,r,i,s,o,a,l);if(null!=h)for(let t=0,e=h.length;tky.create(t)))}else this.points=[]}scale(t,e,n=new ky){return this.points.forEach((r=>r.scale(t,e,n))),this}rotate(t,e){return this.points.forEach((n=>n.rotate(t,e))),this}translate(t,e){const n=ky.create(t,e);return this.points.forEach((t=>t.translate(n.x,n.y))),this}round(t=0){return this.points.forEach((e=>e.round(t))),this}bbox(){if(0===this.points.length)return new Ny;let t=1/0,e=-1/0,n=1/0,r=-1/0;const i=this.points;for(let s=0,o=i.length;se&&(e=a),lr&&(r=l)}return new Ny(t,n,e-t,r-n)}closestPoint(t){const e=this.closestPointLength(t);return this.pointAtLength(e)}closestPointLength(t){const e=this.points,n=e.length;if(0===n||1===n)return 0;let r=0,i=0,s=1/0;for(let o=0,a=n-1;oc.y||r>s.y&&r<=c.y){const e=s.x-n>c.x-n?s.x-n:c.x-n;if(e>=0){const i=new ky(n+e,r),s=new jy(t,i);h.intersectsWithLine(s)&&(a+=1)}}o=l}return a%2==1}intersectsWithLine(t){const e=[];for(let n=0,r=this.points.length-1;n0?e:null}isDifferentiable(){for(let t=0,e=this.points.length-1;t=1)return e[n-1].clone();const r=this.length()*t;return this.pointAtLength(r)}pointAtLength(t){const e=this.points,n=e.length;if(0===n)return null;if(1===n)return e[0].clone();let r=!0;t<0&&(r=!1,t=-t);let i=0;for(let s=0,o=n-1;s1&&(t=1);const n=this.length()*t;return this.tangentAtLength(n)}tangentAtLength(t){const e=this.points,n=e.length;if(0===n||1===n)return null;let r,i=!0;t<0&&(i=!1,t=-t);let s=0;for(let o=0,a=n-1;or.x)&&(r=e[t]);const i=[];for(let t=0;t{let n=t[2]-e[2];return 0===n&&(n=e[1]-t[1]),n})),i.length>2){const t=i[i.length-1];i.unshift(t)}const s={},o=[],a=t=>`${t[0].toString()}@${t[1]}`;for(;0!==i.length;){const t=i.pop(),e=t[0];if(s[a(t)])continue;let n=!1;for(;!n;)if(o.length<2)o.push(t),n=!0;else{const r=o.pop(),l=r[0],c=o.pop(),h=c[0],u=h.cross(l,e);if(u<0)o.push(c),o.push(r),o.push(t),n=!0;else if(0===u){const t=1e-10,n=l.angleBetween(h,e);Math.abs(n-180)2&&o.pop();let c=-1;for(let t=0,e=o.length;t0){const t=o.slice(c),e=o.slice(0,c);h=t.concat(e)}else h=o;const u=[];for(let t=0,e=h.length;tt.equals(this.points[e]))))}clone(){return new t(this.points.map((t=>t.clone())))}toJSON(){return this.points.map((t=>t.toJSON()))}serialize(){return this.points.map((t=>`${t.serialize()}`)).join(" ")}};!function(t){t.isPolyline=function(e){return null!=e&&e instanceof t}}(zy||(zy={})),function(t){t.parse=function(e){const n=e.trim();if(""===n)return new t;const r=[],i=n.split(/\s*,\s*|\s+/);for(let t=0,e=i.length;t0&&y<1&&g.push(y)}else x=p*p-4*m*f,w=Math.sqrt(x),x<0||(v=(-p+w)/(2*f),v>0&&v<1&&g.push(v),b=(-p-w)/(2*f),b>0&&b<1&&g.push(b));let M=g.length;const E=M;for(;M;)M-=1,y=g[M],P=1-y,A=P*P*P*i+3*P*P*y*o+3*P*y*y*l+y*y*y*h,d[0][M]=A,C=P*P*P*s+3*P*P*y*a+3*P*y*y*c+y*y*y*u,d[1][M]=C;g[E]=0,g[E+1]=1,d[0][E]=i,d[1][E]=s,d[0][E+1]=h,d[1][E+1]=u,g.length=E+2,d[0].length=E+2,d[1].length=E+2;const S=Math.min.apply(null,d[0]),O=Math.min.apply(null,d[1]),T=Math.max.apply(null,d[0]),k=Math.max.apply(null,d[1]);return new Ny(S,O,T-S,k-O)}closestPoint(t,e={}){return this.pointAtT(this.closestPointT(t,e))}closestPointLength(t,e={}){const n=this.getOptions(e);return this.lengthAtT(this.closestPointT(t,n),n)}closestPointNormalizedLength(t,e={}){const n=this.getOptions(e),r=this.closestPointLength(t,n);if(!r)return 0;const i=this.length(n);return 0===i?0:r/i}closestPointT(t,e={}){const n=this.getPrecision(e),r=this.getDivisions(e),i=Math.pow(10,-n);let s=null,o=0,a=0,l=0,c=0,h=0,u=null;const g=r.length;let d=g>0?1/g:0;for(r.forEach(((e,n)=>{const r=e.start.distance(t),i=e.end.distance(t),g=r+i;(null==u||g=1)return this.divideAtT(1);const n=this.tAt(t,e);return this.divideAtT(n)}divideAtLength(t,e={}){const n=this.tAtLength(t,e);return this.divideAtT(n)}divide(t){return this.divideAtT(t)}divideAtT(t){const e=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return[new $y(e,e,e,e),new $y(e,n,r,i)];if(t>=1)return[new $y(e,n,r,i),new $y(i,i,i,i)];const s=this.getSkeletonPoints(t),o=s.startControlPoint1,a=s.startControlPoint2,l=s.divider,c=s.dividerControlPoint1,h=s.dividerControlPoint2;return[new $y(e,o,a,l),new $y(l,c,h,i)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(t){const e=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return{startControlPoint1:e.clone(),startControlPoint2:e.clone(),divider:e.clone(),dividerControlPoint1:n.clone(),dividerControlPoint2:r.clone()};if(t>=1)return{startControlPoint1:n.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};const s=new jy(e,n).pointAt(t),o=new jy(n,r).pointAt(t),a=new jy(r,i).pointAt(t),l=new jy(s,o).pointAt(t),c=new jy(o,a).pointAt(t);return{startControlPoint1:s,startControlPoint2:l,divider:new jy(l,c).pointAt(t),dividerControlPoint1:c,dividerControlPoint2:a}}getSubdivisions(t={}){const e=this.getPrecision(t);let n=[new $y(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(0===e)return n;let r=this.endpointDistance();const i=Math.pow(10,-e);let s=0;for(;;){s+=1;const t=[];n.forEach((e=>{const n=e.divide(.5);t.push(n[0],n[1])}));const e=t.reduce(((t,e)=>t+e.endpointDistance()),0);if(s>1&&(0!==e?(e-r)/e:0)t+e.endpointDistance()),0)}lengthAtT(t,e={}){if(t<=0)return 0;const n=void 0===e.precision?this.PRECISION:e.precision;return this.divide(t)[0].length({precision:n})}pointAt(t,e={}){if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();const n=this.tAt(t,e);return this.pointAtT(n)}pointAtLength(t,e={}){const n=this.tAtLength(t,e);return this.pointAtT(n)}pointAtT(t){return t<=0?this.start.clone():t>=1?this.end.clone():this.getSkeletonPoints(t).divider}isDifferentiable(){const t=this.start,e=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(n)&&n.equals(r))}tangentAt(t,e={}){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);const n=this.tAt(t,e);return this.tangentAtT(n)}tangentAtLength(t,e={}){if(!this.isDifferentiable())return null;const n=this.tAtLength(t,e);return this.tangentAtT(n)}tangentAtT(t){if(!this.isDifferentiable())return null;t<0&&(t=0),t>1&&(t=1);const e=this.getSkeletonPoints(t),n=e.startControlPoint2,r=e.dividerControlPoint1,i=e.divider,s=new jy(n,r);return s.translate(i.x-n.x,i.y-n.y),s}getPrecision(t={}){return null==t.precision?this.PRECISION:t.precision}getDivisions(t={}){if(null!=t.subdivisions)return t.subdivisions;const e=this.getPrecision(t);return this.getSubdivisions({precision:e})}getOptions(t={}){return{precision:this.getPrecision(t),subdivisions:this.getDivisions(t)}}tAt(t,e={}){if(t<=0)return 0;if(t>=1)return 1;const n=this.getOptions(e),r=this.length(n)*t;return this.tAtLength(r,n)}tAtLength(t,e={}){let n=!0;t<0&&(n=!1,t=-t);const r=this.getPrecision(e),i=this.getDivisions(e),s={precision:r,subdivisions:i};let o,a,l=null,c=0,h=0,u=0;const g=i.length;let d=g>0?1/g:0;for(let e=0;en.push(t.end.clone()))),n}toPolyline(t={}){return new zy(this.toPoints(t))}scale(t,e,n){return this.start.scale(t,e,n),this.controlPoint1.scale(t,e,n),this.controlPoint2.scale(t,e,n),this.end.scale(t,e,n),this}rotate(t,e){return this.start.rotate(t,e),this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return"number"==typeof t?(this.start.translate(t,e),this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return null!=t&&this.start.equals(t.start)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)&&this.end.equals(t.end)}clone(){return new $y(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}!function(t){t.isCurve=function(e){return null!=e&&e instanceof t}}($y||($y={})),function(t){function e(t){const e=t.length,n=[],r=[];let i=2;n[0]=t[0]/i;for(let s=1;sky.clone(t))),r=[],i=[],s=n.length-1;if(1===s)return r[0]=new ky((2*n[0].x+n[1].x)/3,(2*n[0].y+n[1].y)/3),i[0]=new ky(2*r[0].x-n[0].x,2*r[0].y-n[0].y),[r,i];const o=[];for(let t=1;t=1?n:n*t}divideAtT(t){if(this.divideAt)return this.divideAt(t);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(t){if(this.pointAt)return this.pointAt(t);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(t){if(this.tangentAt)return this.tangentAt(t);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class Gy extends Fy{constructor(t,e){super(),jy.isLine(t)?this.endPoint=t.end.clone().round(2):this.endPoint=ky.create(t,e).round(2)}get type(){return"L"}get line(){return new jy(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[new Gy(e[0]),new Gy(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[new Gy(e[0]),new Gy(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return null!=this.previousSegment&&!this.start.equals(this.end)}clone(){return new Gy(this.end)}scale(t,e,n){return this.end.scale(t,e,n),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return"number"==typeof t?this.end.translate(t,e):this.end.translate(t),this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}!function(t){t.create=function(...e){const n=e.length,r=e[0];if(jy.isLine(r))return new t(r);if(ky.isPointLike(r))return 1===n?new t(r):e.map((e=>new t(e)));if(2===n)return new t(+e[0],+e[1]);const i=[];for(let r=0;r1&&(h=Math.sqrt(h),n*=h,r*=h);const y=n*n,v=r*r,b=(s===o?-1:1)*Math.sqrt(Math.abs((y*v-y*c*c-v*i*i)/(y*c*c+v*i*i)));p=b*n*c/r+(t+a)/2,m=b*-r*i/n+(e+l)/2,d=Math.asin((e-m)/r),f=Math.asin((l-m)/r),d=tf&&(d-=2*Math.PI),!o&&f>d&&(f-=2*Math.PI)}let v=f-d;if(Math.abs(v)>h){const t=f,e=a,s=l;f=d+h*(o&&f>d?1:-1),y=Xy(a=p+n*Math.cos(f),l=m+r*Math.sin(f),n,r,i,0,o,e,s,[f,t,p,m])}v=f-d;const b=Math.cos(d),x=Math.sin(d),w=Math.cos(f),A=Math.sin(f),C=Math.tan(v/4),P=4/3*(n*C),M=4/3*(r*C),E=[t,e],S=[t+P*x,e-M*b],O=[a+P*A,l-M*w],T=[a,l];if(S[0]=2*E[0]-S[0],S[1]=2*E[1]-S[1],c)return[S,O,T].concat(y);{y=[S,O,T].concat(y).join().split(",");const t=[],e=y.length;for(let n=0;n{const o=[];let a=e.toLowerCase();n.replace(r,((t,e)=>(e&&o.push(+e),t))),"m"===a&&o.length>2&&(s.push([e,...o.splice(0,2)]),a="l",e="m"===e?"l":"L");const l=i[a];for(;o.length>=l&&(s.push([e,...o.splice(0,l)]),l););return t})),s}(t);if(!e||!e.length)return[["M",0,0]];let n=0,r=0,i=0,s=0;const o=[];for(let t=0,a=e.length;t7){t[n].shift();const r=t[n];for(;r.length;)s[n]="A",n+=1,t.splice(n,0,["C"].concat(r.splice(0,6)));t.splice(n,1),a=e.length}}const s=[];let o="",a=e.length;for(let t=0;t0&&(o=s[t-1])),e[t]=r(e[t],n,o),"A"!==s[t]&&"C"===a&&(s[t]="C"),i(e,t);const l=e[t],c=l.length;n.x=l[c-2],n.y=l[c-1],n.bx=parseFloat(l[c-4])||n.x,n.by=parseFloat(l[c-3])||n.y}return e[0][0]&&"M"===e[0][0]||e.unshift(["M",0,0]),e}function Ky(e){return Zy(e).map((e=>e.map((e=>"string"==typeof e?e:t.GeometryUtil.round(e,2))))).join(",").split(",").join(" ")}!function(t){t.create=function(...e){const n=e.length,r=e[0];if($y.isCurve(r))return new t(r);if(ky.isPointLike(r)){if(3===n)return new t(e[0],e[1],e[2]);const r=[];for(let i=0;i{0===r&&this.appendSegment(e.createSegment("M",t.start)),null==n||n.end.equals(t.start)||this.appendSegment(e.createSegment("M",t.start)),jy.isLine(t)?this.appendSegment(e.createSegment("L",t.end)):$y.isCurve(t)&&this.appendSegment(e.createSegment("C",t.controlPoint1,t.controlPoint2,t.end)),n=t}))}else{t.forEach((t=>{t.isSegment&&this.appendSegment(t)}))}else null!=t&&(jy.isLine(t)?(this.appendSegment(e.createSegment("M",t.start)),this.appendSegment(e.createSegment("L",t.end))):$y.isCurve(t)?(this.appendSegment(e.createSegment("M",t.start)),this.appendSegment(e.createSegment("C",t.controlPoint1,t.controlPoint2,t.end))):zy.isPolyline(t)?t.points&&t.points.length&&t.points.forEach(((t,n)=>{const r=0===n?e.createSegment("M",t):e.createSegment("L",t);this.appendSegment(r)})):t.isSegment&&this.appendSegment(t))}get start(){const t=this.segments,e=t.length;if(0===e)return null;for(let n=0;n=0;n-=1){const e=t[n];if(e.isVisible)return e.end}return t[e-1].end}moveTo(...t){return this.appendSegment(qy.create.call(null,...t))}lineTo(...t){return this.appendSegment(Gy.create.call(null,...t))}curveTo(...t){return this.appendSegment(Wy.create.call(null,...t))}arcTo(t,e,n,r,i,s,o){const a=this.end||new ky,l="number"==typeof s?Ry(a.x,a.y,t,e,n,r,i,s,o):Ry(a.x,a.y,t,e,n,r,i,s.x,s.y);if(null!=l)for(let t=0,e=l.length;tn||t<0)throw new Error("Index out of range.");let r,i=null,s=null;if(0!==n&&(t>=1?(i=this.segments[t-1],s=i.nextSegment):(i=null,s=this.segments[0])),Array.isArray(e))for(let n=0,o=e.length;n=e||n<0)throw new Error("Index out of range.");return n}segmentAt(t,e={}){const n=this.segmentIndexAt(t,e);return n?this.getSegment(n):null}segmentAtLength(t,e={}){const n=this.segmentIndexAtLength(t,e);return n?this.getSegment(n):null}segmentIndexAt(e,n={}){if(0===this.segments.length)return null;const r=t.GeometryUtil.clamp(e,0,1),i=this.getOptions(n),s=this.length(i)*r;return this.segmentIndexAtLength(s,i)}segmentIndexAtLength(t,e={}){const n=this.segments.length;if(0===n)return null;let r=!0;t<0&&(r=!1,t=-t);const i=this.getPrecision(e),s=this.getSubdivisions(e);let o=0,a=null;for(let e=0;e=1)return this.end.clone();const n=this.getOptions(e),r=this.length(n)*t;return this.pointAtLength(r,n)}pointAtLength(t,e={}){if(0===this.segments.length)return null;if(0===t)return this.start.clone();let n=!0;t<0&&(n=!1,t=-t);const r=this.getPrecision(e),i=this.getSubdivisions(e);let s,o=0;for(let e=0,a=this.segments.length;e=r)return n[r-1].pointAtT(1);const s=t.GeometryUtil.clamp(e.value,0,1);return n[i].pointAtT(s)}divideAt(e,n={}){if(0===this.segments.length)return null;const r=t.GeometryUtil.clamp(e,0,1),i=this.getOptions(n),s=this.length(i)*r;return this.divideAtLength(s,i)}divideAtLength(t,n={}){if(0===this.segments.length)return null;let r=!0;t<0&&(r=!1,t=-t);const i=this.getPrecision(n),s=this.getSubdivisions(n);let o,a,l,c,h,u=0;for(let e=0,n=this.segments.length;e=r&&(i=r-1,s=1);const o=this.getPrecision(n),a=this.getSubdivisions(n);let l=0;for(let t=0;t=n)return this.segments[n-1].tangentAtT(1);const i=t.GeometryUtil.clamp(e.value,0,1);return this.segments[r].tangentAtT(i)}getPrecision(t={}){return null==t.precision?this.PRECISION:t.precision}getSubdivisions(t={}){if(null==t.segmentSubdivisions){const e=this.getPrecision(t);return this.getSegmentSubdivisions({precision:e})}return t.segmentSubdivisions}getOptions(t={}){return{precision:this.getPrecision(t),segmentSubdivisions:this.getSubdivisions(t)}}toPoints(t={}){const e=this.segments,n=e.length;if(0===n)return null;const r=this.getSubdivisions(t),i=[];let s=[];for(let t=0;t0?e.forEach((t=>s.push(t.start))):s.push(n.start)}else s.length>0&&(s.push(e[t-1].end),i.push(s),s=[])}return s.length>0&&(s.push(this.end),i.push(s)),i}toPolylines(t={}){const e=this.toPoints(t);return e?e.map((t=>new zy(t))):null}scale(t,e,n){return this.segments.forEach((r=>r.scale(t,e,n))),this}rotate(t,e){return this.segments.forEach((n=>n.rotate(t,e))),this}translate(t,e){return"number"==typeof t?this.segments.forEach((n=>n.translate(t,e))):this.segments.forEach((e=>e.translate(t))),this}clone(){const t=new e;return this.segments.forEach((e=>t.appendSegment(e.clone()))),t}equals(t){if(null==t)return!1;const e=this.segments,n=t.segments,r=e.length;if(n.length!==r)return!1;for(let t=0;tt.toJSON()))}serialize(){if(!this.isValid())throw new Error("Invalid path segments.");return this.segments.map((t=>t.serialize())).join(" ")}toString(){return this.serialize()}};!function(t){t.isPath=function(e){return null!=e&&e instanceof t}}(Qy||(Qy={})),function(t){function e(t,...e){if("M"===t)return qy.create.call(null,...e);if("L"===t)return Gy.create.call(null,...e);if("C"===t)return Wy.create.call(null,...e);if("z"===t||"Z"===t)return Uy.create();throw new Error(`Invalid path segment type "${t}"`)}t.parse=function(n){if(!n)return new t;const r=new t,i=t.normalize(n).match(/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g);if(null!=i)for(let t=0,n=i.length;t+t)),i=e.call(null,t,...n);r.appendSegment(i)}}return r},t.createSegment=e}(Qy||(Qy={})),function(t){t.normalize=Ky,t.isValid=By,t.drawArc=Vy,t.drawPoints=Dy,t.arcToCurves=Ry}(Qy||(Qy={}));class tv{constructor(t){this.options=Object.assign({},t),this.data=this.options.data||{},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this)}get names(){return Object.keys(this.data)}register(e,n,r=!1){if("object"==typeof e)return void Object.entries(e).forEach((([t,e])=>{this.register(t,e,n)}));!this.exist(e)||r||t.Platform.isApplyingHMR()||this.onDuplicated(e);const i=this.options.process,s=i?ef(i,this,e,n):n;return this.data[e]=s,s}unregister(t){const e=t?this.data[t]:null;return delete this.data[t],e}get(t){return t?this.data[t]:null}exist(t){return!!t&&null!=this.data[t]}onDuplicated(t){try{throw this.options.onConflict&&ef(this.options.onConflict,this,t),new Error(`${ri(this.options.type)} with name '${t}' already registered.`)}catch(t){throw t}}onNotFound(t,e){throw new Error(this.getSpellingSuggestion(t,e))}getSpellingSuggestion(t,e){const n=this.getSpellingSuggestionForName(t),r=e?`${e} ${mh(this.options.type)}`:this.options.type;return`${ri(r)} with name '${t}' does not exist.${n?` Did you mean '${n}'?`:""}`}getSpellingSuggestionForName(t){return _f(t,Object.keys(this.data),(t=>t))}}!function(t){t.create=function(e){return new t(e)}}(tv||(tv={}));const ev={color:"#aaaaaa",thickness:1,markup:"rect",update(t,e){const n=e.thickness*e.sx,r=e.thickness*e.sy;$p(t,{width:n,height:r,rx:n,ry:r,fill:e.color})}},nv={color:"#aaaaaa",thickness:1,markup:"rect",update(t,e){const n=e.sx<=1?e.thickness*e.sx:e.thickness;$p(t,{width:n,height:n,rx:n,ry:n,fill:e.color})}},rv={color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(t,e){let n;const r=e.width,i=e.height,s=e.thickness;n=r-s>=0&&i-s>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",$p(t,{d:n,stroke:e.color,"stroke-width":e.thickness})}},iv=[{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(t,e){let n;const r=e.width,i=e.height,s=e.thickness;n=r-s>=0&&i-s>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",$p(t,{d:n,stroke:e.color,"stroke-width":e.thickness})}},{color:"rgba(224,224,224,0.2)",thickness:3,factor:4,markup:"path",update(t,e){let n;const r=e.factor||1,i=e.width*r,s=e.height*r,o=e.thickness;n=i-o>=0&&s-o>=0?["M",i,0,"H0 M0 0 V0",s].join(" "):"M 0 0 0 0",e.width=i,e.height=s,$p(t,{d:n,stroke:e.color,"stroke-width":e.thickness})}}];var sv=Object.freeze({__proto__:null,dot:ev,doubleMesh:iv,fixedDot:nv,mesh:rv});class ov{constructor(){this.patterns={},this.root=fm.create(xp(),{width:"100%",height:"100%"},[bp("defs")]).node}add(t,e){const n=this.root.childNodes[0];n&&n.appendChild(e),this.patterns[t]=e,fm.create("rect",{width:"100%",height:"100%",fill:`url(#${t})`}).appendTo(this.root)}get(t){return this.patterns[t]}has(t){return null!=this.patterns[t]}}!function(t){t.presets=sv,t.registry=tv.create({type:"grid"}),t.registry.register(t.presets,!0)}(ov||(ov={}));const av=function(t){const e=document.createElement("canvas"),n=t.width,r=t.height;e.width=2*n,e.height=r;const i=e.getContext("2d");return i.drawImage(t,0,0,n,r),i.translate(2*n,0),i.scale(-1,1),i.drawImage(t,0,0,n,r),e},lv=function(t){const e=document.createElement("canvas"),n=t.width,r=t.height;e.width=n,e.height=2*r;const i=e.getContext("2d");return i.drawImage(t,0,0,n,r),i.translate(0,2*r),i.scale(1,-1),i.drawImage(t,0,0,n,r),e},cv=function(t){const e=document.createElement("canvas"),n=t.width,r=t.height;e.width=2*n,e.height=2*r;const i=e.getContext("2d");return i.drawImage(t,0,0,n,r),i.setTransform(-1,0,0,-1,e.width,e.height),i.drawImage(t,0,0,n,r),i.setTransform(-1,0,0,1,e.width,0),i.drawImage(t,0,0,n,r),i.setTransform(1,0,0,-1,0,e.height),i.drawImage(t,0,0,n,r),e};var hv,uv=Object.freeze({__proto__:null,flipX:av,flipXY:cv,flipY:lv,watermark:function(e,n){const r=e.width,i=e.height,s=document.createElement("canvas");s.width=3*r,s.height=3*i;const o=s.getContext("2d"),a=null!=n.angle?-n.angle:-20,l=t.Angle.toRad(a),c=s.width/4,h=s.height/4;for(let t=0;t<4;t+=1)for(let n=0;n<4;n+=1)(t+n)%2>0&&(o.setTransform(1,0,0,1,(2*t-1)*c,(2*n-1)*h),o.rotate(l),o.drawImage(e,-r/2,-i/2,r,i));return s}});function gv(t,e){return null!=t?t:e}function dv(t,e){return null!=t&&Number.isFinite(t)?t:e}!function(t){t.presets=Object.assign({},uv),t.presets["flip-x"]=av,t.presets["flip-y"]=lv,t.presets["flip-xy"]=cv,t.registry=tv.create({type:"background pattern"}),t.registry.register(t.presets,!0)}(hv||(hv={}));var fv,pv=Object.freeze({__proto__:null,blur:function(t={}){const e=dv(t.x,2);return`\n \n \n \n `.trim()},brightness:function(t={}){const e=dv(t.amount,1);return`\n \n \n \n \n \n \n \n `.trim()},contrast:function(t={}){const e=dv(t.amount,1),n=.5-e/2;return`\n \n \n \n \n \n \n \n `.trim()},dropShadow:function(t={}){const e=dv(t.dx,0),n=dv(t.dy,0),r=gv(t.color,"black"),i=dv(t.blur,4),s=dv(t.opacity,1);return"SVGFEDropShadowElement"in window?`\n \n `.trim():`\n \n \n \n \n \n \n \n \n \n \n \n `.trim()},grayScale:function(t={}){const e=dv(t.amount,1),n=.7152-.7152*(1-e);return`\n \n \n \n `.trim()},highlight:function(t={}){const e=gv(t.color,"red"),n=dv(t.blur,0),r=dv(t.width,1);return`\n \n \n \n \n \n \n \n `.trim()},hueRotate:function(t={}){return`\n \n \n \n `.trim()},invert:function(t={}){const e=dv(t.amount,1),n=1-e;return`\n \n \n \n \n \n \n \n `.trim()},outline:function(t={}){const e=gv(t.color,"blue"),n=dv(t.width,1),r=dv(t.margin,2);return`\n \n \n \n \n \n \n \n \n \n \n \n `.trim()},saturate:function(t={}){return`\n \n \n \n `.trim()},sepia:function(t={}){const e=dv(t.amount,1);return`\n \n \n \n `.trim()}});!function(t){t.presets=pv,t.registry=tv.create({type:"filter"}),t.registry.register(t.presets,!0)}(fv||(fv={}));const mv={xlinkHref:"xlink:href",xlinkShow:"xlink:show",xlinkRole:"xlink:role",xlinkType:"xlink:type",xlinkArcrole:"xlink:arcrole",xlinkTitle:"xlink:title",xlinkActuate:"xlink:actuate",xmlSpace:"xml:space",xmlBase:"xml:base",xmlLang:"xml:lang",preserveAspectRatio:"preserveAspectRatio",requiredExtension:"requiredExtension",requiredFeatures:"requiredFeatures",systemLanguage:"systemLanguage",externalResourcesRequired:"externalResourceRequired"},yv={position:zv("x","width","origin")},vv={position:zv("y","height","origin")},bv={position:zv("x","width","corner")},xv={position:zv("y","height","corner")},wv={set:$v("width","width")},Av={set:$v("height","height")},Cv={set:$v("rx","width")},Pv={set:$v("ry","height")},Mv={set:(t=>{const e=$v("r","width"),n=$v("r","height");return function(t,r){const i=r.refBBox;return ef(i.height>i.width?e:n,this,t,r)}})()},Ev={set(t,{refBBox:e}){let n=parseFloat(t);const r=If(t);r&&(n/=100);const i=Math.sqrt(e.height*e.height+e.width*e.width);let s;return Number.isFinite(n)&&(s=r||n>=0&&n<=1?n*i:Math.max(n+i,0)),{r:s}}},Sv={set:$v("cx","width")},Ov={set:$v("cy","height")},Tv={set:Gv({resetOffset:!0})},kv={set:Gv({resetOffset:!1})},Nv={set:Uv({resetOffset:!0})},jv={set:Uv({resetOffset:!1})},_v=Mv,Lv=Tv,Bv=Nv,Iv=yv,Dv=vv,Rv=wv,Vv=Av;function zv(t,e,n){return(r,{refBBox:i})=>{if(null==r)return null;let s=parseFloat(r);const o=If(r);let a;if(o&&(s/=100),Number.isFinite(s)){const r=i[n];a=o||s>0&&s<1?r[t]+i[e]*s:r[t]+s}const l=new ky;return l[t]=a||0,l}}function $v(t,e){return function(n,{refBBox:r}){let i=parseFloat(n);const s=If(n);s&&(i/=100);const o={};if(Number.isFinite(i)){const n=s||i>=0&&i<=1?i*r[e]:Math.max(i+r[e],0);o[t]=n}return o}}function Fv(t,e){const n="x6-shape",r=e&&e.resetOffset;return function(e,{elem:i,refBBox:s}){let o=gm(i,n);if(!o||o.value!==e){const r=t(e);o={value:e,shape:r,shapeBBox:r.bbox()},gm(i,n,o)}const a=o.shape.clone(),l=o.shapeBBox.clone(),c=l.getOrigin(),h=s.getOrigin();l.x=h.x,l.y=h.y;const u=s.getMaxScaleToFit(l,h),g=0===l.width||0===s.width?1:u.sx,d=0===l.height||0===s.height?1:u.sy;return a.scale(g,d,c),r&&a.translate(-c.x,-c.y),a}}function Gv(t){const e=Fv((function(t){return Qy.parse(t)}),t);return(t,n)=>({d:e(t,n).serialize()})}function Uv(t){const e=Fv((t=>new zy(t)),t);return(t,n)=>({points:e(t,n).serialize()})}const qv={qualify:Tr,set:(t,{view:e})=>`url(#${e.graph.defineGradient(t)})`},Wv={qualify:Tr,set(t,{view:e}){const n=e.cell,r=Object.assign({},t);if(n.isEdge()&&"linearGradient"===r.type){const t=e,i=t.sourcePoint,s=t.targetPoint;r.id=`gradient-${r.type}-${n.id}`,r.attrs=Object.assign(Object.assign({},r.attrs),{x1:i.x,y1:i.y,x2:s.x,y2:s.y,gradientUnits:"userSpaceOnUse"}),e.graph.defs.remove(r.id)}return`url(#${e.graph.defineGradient(r)})`}},Hv={qualify:(t,{attrs:e})=>null==e.textWrap||!Tr(e.textWrap),set(t,{view:e,elem:n,attrs:r}){const i="x6-text",s=gm(n,i),o=t=>{try{return JSON.parse(t)}catch(e){return t}},a={x:r.x,eol:r.eol,annotations:o(r.annotations),textPath:o(r["text-path"]||r.textPath),textVerticalAnchor:r["text-vertical-anchor"]||r.textVerticalAnchor,displayEmpty:"true"===(r["display-empty"]||r.displayEmpty),lineHeight:r["line-height"]||r.lineHeight},l=r["font-size"]||r.fontSize,c=JSON.stringify([t,a]);if(l&&n.setAttribute("font-size",l),null==s||s!==c){const r=a.textPath;if(null!=r&&"object"==typeof r){const t=r.selector;if("string"==typeof t){const n=e.find(t)[0];n instanceof SVGPathElement&&(dp(n),a.textPath=Object.assign({"xlink:href":`#${n.id}`},r))}}bm(n,`${t}`,a),gm(n,i,c)}}},Jv={qualify:Tr,set(t,{view:e,elem:n,attrs:r,refBBox:i}){const s=t,o=s.width||0;If(o)?i.width*=parseFloat(o)/100:o<=0?i.width+=o:i.width=o;const a=s.height||0;let l;If(a)?i.height*=parseFloat(a)/100:a<=0?i.height+=a:i.height=a;let c=s.text;null==c&&(c=r.text||(null==n?void 0:n.textContent)),l=null!=c?Am(`${c}`,i,{"font-weight":r["font-weight"]||r.fontWeight,"font-size":r["font-size"]||r.fontSize,"font-family":r["font-family"]||r.fontFamily,lineHeight:r.lineHeight},{ellipsis:s.ellipsis}):"",ef(Hv.set,this,l,{view:e,elem:n,attrs:r,refBBox:i,cell:e.cell})}},Xv=(t,{attrs:e})=>void 0!==e.text,Yv={qualify:Xv},Zv={qualify:Xv},Kv={qualify:Xv},Qv={qualify:Xv},tb={qualify:Xv},eb={qualify:Xv},nb={qualify:(t,{elem:e})=>e instanceof SVGElement,set(t,{elem:e}){const n="x6-title",r=`${t}`,i=gm(e,n);if(null==i||i!==r){gm(e,n,r);const t=e.firstChild;if(t&&"TITLE"===t.tagName.toUpperCase()){t.textContent=r}else{const n=document.createElementNS(e.namespaceURI,"title");n.textContent=r,e.insertBefore(n,t)}}}},rb={offset:ob("x","width","right")},ib={offset:ob("y","height","bottom")},sb={offset:(t,{refBBox:e})=>t?{x:-e.x,y:-e.y}:{x:0,y:0}};function ob(t,e,n){return(r,{refBBox:i})=>{const s=new ky;let o;return o="middle"===r?i[e]/2:r===n?i[e]:"number"==typeof r&&Number.isFinite(r)?r>-1&&r<1?-i[e]*r:-r:If(r)?i[e]*parseFloat(r)/100:0,s[t]=-(i[t]+o),s}}const ab={qualify:Tr,set(t,{elem:e}){lm(e,t)}},lb={set(t,{elem:e}){e.innerHTML=`${t}`}},cb={qualify:Tr,set:(t,{view:e})=>`url(#${e.graph.defineFilter(t)})`},hb={set:t=>null!=t&&"object"==typeof t&&t.id?t.id:t};function ub(t,e,n){let r,i;"object"==typeof e?(r=e.x,i=e.y):(r=e,i=n);const s=Qy.parse(t),o=s.bbox();if(o){let t=-o.height/2-o.y,e=-o.width/2-o.x;"number"==typeof r&&(e-=r),"number"==typeof i&&(t-=i),s.translate(e,t)}return s.serialize()}function gb(t,e,n,r=3/4,i={}){const s=t.size||10,o=t.width||s,a=t.height||s,l=new Qy,c={};if(e)l.moveTo(o,0).lineTo(0,a/2).lineTo(o,a),c.fill="none";else{if(l.moveTo(0,a/2),l.lineTo(o,0),!n){const t=Hi(r,0,1);l.lineTo(o*t,a/2)}l.lineTo(o,a),l.close()}return Object.assign(Object.assign(Object.assign({},c),i),{tagName:"path",d:ub(l.serialize(),{x:null!=t.offset?t.offset:-o/2})})}const db=t=>{var{r:n}=t,r=e(t,["r"]);const i=n||5;return Object.assign(Object.assign({cx:i},r),{tagName:"circle",r:i})};var fb,pb=Object.freeze({__proto__:null,async:t=>{var{width:n,height:r,offset:i,open:s,flip:o}=t,a=e(t,["width","height","offset","open","flip"]);let l=r||6;const c=n||10,h=!0===s,u=!0===o,g=Object.assign(Object.assign({},a),{tagName:"path"});u&&(l=-l);const d=new Qy;return d.moveTo(0,l).lineTo(c,0),h?g.fill="none":(d.lineTo(c,l),d.close()),g.d=ub(d.serialize(),{x:i||-c/2,y:l/2}),g},block:t=>{var{size:n,width:r,height:i,offset:s,open:o}=t;return gb({size:n,width:r,height:i,offset:s},!0===o,!0,void 0,e(t,["size","width","height","offset","open"]))},circle:db,circlePlus:t=>{var{r:n}=t,r=e(t,["r"]);const i=n||5,s=new Qy;return s.moveTo(i,0).lineTo(i,2*i),s.moveTo(0,i).lineTo(2*i,i),{children:[Object.assign(Object.assign({},db({r:i})),{fill:"none"}),Object.assign(Object.assign({},r),{tagName:"path",d:ub(s.serialize(),-i)})]}},classic:t=>{var{size:n,width:r,height:i,offset:s,factor:o}=t;return gb({size:n,width:r,height:i,offset:s},!1,!1,o,e(t,["size","width","height","offset","factor"]))},cross:t=>{var{size:n,width:r,height:i,offset:s}=t,o=e(t,["size","width","height","offset"]);const a=n||10,l=r||a,c=i||a,h=new Qy;return h.moveTo(0,0).lineTo(l,c).moveTo(0,c).lineTo(l,0),Object.assign(Object.assign({},o),{tagName:"path",fill:"none",d:ub(h.serialize(),s||-l/2)})},diamond:t=>{var{size:n,width:r,height:i,offset:s}=t,o=e(t,["size","width","height","offset"]);const a=n||10,l=r||a,c=i||a,h=new Qy;return h.moveTo(0,c/2).lineTo(l/2,0).lineTo(l,c/2).lineTo(l/2,c).close(),Object.assign(Object.assign({},o),{tagName:"path",d:ub(h.serialize(),null==s?-l/2:s)})},ellipse:t=>{var{rx:n,ry:r}=t,i=e(t,["rx","ry"]);const s=n||5,o=r||5;return Object.assign(Object.assign({cx:s},i),{tagName:"ellipse",rx:s,ry:o})},path:t=>{var{d:n,offsetX:r,offsetY:i}=t,s=e(t,["d","offsetX","offsetY"]);return Object.assign(Object.assign({},s),{tagName:"path",d:ub(n,r,i)})}});function mb(t){return"string"==typeof t||Tr(t)}!function(t){t.presets=pb,t.registry=tv.create({type:"marker"}),t.registry.register(t.presets,!0)}(fb||(fb={})),function(t){t.normalize=ub}(fb||(fb={}));const yb={qualify:mb,set:(t,{view:e,attrs:n})=>xb("marker-start",t,e,n)},vb={qualify:mb,set:(t,{view:e,attrs:n})=>xb("marker-end",t,e,n,{transform:"rotate(180)"})},bb={qualify:mb,set:(t,{view:e,attrs:n})=>xb("marker-mid",t,e,n)};function xb(t,n,r,i,s={}){const o="string"==typeof n?{name:n}:n,{name:a,args:l}=o,c=e(o,["name","args"]);let h=c;if(a&&"string"==typeof a){const t=fb.registry.get(a);if(!t)return fb.registry.onNotFound(a);h=t(Object.assign(Object.assign({},c),l))}const u=Object.assign(Object.assign(Object.assign({},function(t,e){const n={},r=t.stroke;"string"==typeof r&&(n.stroke=r,n.fill=r);let i=t.strokeOpacity;null==i&&(i=t["stroke-opacity"]);null==i&&(i=t.opacity);null!=i&&(n["stroke-opacity"]=i,n["fill-opacity"]=i);if("marker-mid"!==e){const r=parseFloat(t.strokeWidth||t["stroke-width"]);if(Number.isFinite(r)&&r>1){const t=Math.ceil(r/2);n.refX="marker-start"===e?t:-t}}return n}(i,t)),s),h);return{[t]:`url(#${r.graph.defineMarker(u)})`}}const wb=(t,{view:e})=>e.cell.isEdge(),Ab={qualify:wb,set(t,e){var n,r,i,s;const o=e.view,a=t.reverse||!1,l=t.stubs||0;let c;if(Number.isFinite(l)&&0!==l)if(a){let t,e;const a=o.getConnectionLength()||0;l<0?(t=(a+l)/2,e=-l):(t=l,e=a-2*l);const h=o.getConnection();c=null===(s=null===(i=null===(r=null===(n=null==h?void 0:h.divideAtLength(t))||void 0===n?void 0:n[1])||void 0===r?void 0:r.divideAtLength(e))||void 0===i?void 0:i[0])||void 0===s?void 0:s.serialize()}else{let t;if(l<0){t=((o.getConnectionLength()||0)+l)/2}else t=l;const e=o.getConnection();if(e){const n=e.divideAtLength(t),r=e.divideAtLength(-t);n&&r&&(c=`${n[0].serialize()} ${r[1].serialize()}`)}}return{d:c||o.getConnectionPathData()}}},Cb={qualify:wb,set:Tb("getTangentAtLength",{rotate:!0})},Pb={qualify:wb,set:Tb("getTangentAtLength",{rotate:!1})},Mb={qualify:wb,set:Tb("getTangentAtRatio",{rotate:!0})},Eb={qualify:wb,set:Tb("getTangentAtRatio",{rotate:!1})},Sb=Cb,Ob=Mb;function Tb(t,e){const n={x:1,y:0};return(r,i)=>{let s,o;const a=i.view,l=a[t](Number(r));return l?(o=e.rotate?l.vector().vectorAngle(n):0,s=l.start):(s=a.path.start,o=0),0===o?{transform:`translate(${s.x},${s.y}')`}:{transform:`translate(${s.x},${s.y}') rotate(${o})`}}}var kb,Nb=Object.freeze({__proto__:null,annotations:Qv,atConnectionLength:Sb,atConnectionLengthIgnoreGradient:Pb,atConnectionLengthKeepGradient:Cb,atConnectionRatio:Ob,atConnectionRatioIgnoreGradient:Eb,atConnectionRatioKeepGradient:Mb,connection:Ab,displayEmpty:eb,eol:tb,fill:qv,filter:cb,html:lb,lineHeight:Yv,port:hb,ref:{},refCx:Sv,refCy:Ov,refD:Lv,refDKeepOffset:kv,refDResetOffset:Tv,refDx:bv,refDy:xv,refHeight:Av,refHeight2:Vv,refPoints:Bv,refPointsKeepOffset:jv,refPointsResetOffset:Nv,refR:_v,refRCircumscribed:Ev,refRInscribed:Mv,refRx:Cv,refRy:Pv,refWidth:wv,refWidth2:Rv,refX:yv,refX2:Iv,refY:vv,refY2:Dv,resetOffset:sb,sourceMarker:yb,stroke:Wv,style:ab,targetMarker:vb,text:Hv,textPath:Kv,textVerticalAnchor:Zv,textWrap:Jv,title:nb,vertexMarker:bb,xAlign:rb,yAlign:ib});!function(t){t.isValidDefinition=function(t,e,n){if(null!=t){if("string"==typeof t)return!0;if("function"!=typeof t.qualify||ef(t.qualify,this,e,n))return!0}return!1}}(kb||(kb={})),function(t){t.presets=Object.assign(Object.assign({},mv),Nb),t.registry=tv.create({type:"attribute definition"}),t.registry.register(t.presets,!0)}(kb||(kb={}));const jb={prefixCls:"x6",autoInsertCSS:!0,useCSSSelector:!0,prefix:t=>`${jb.prefixCls}-${t}`},_b=jb.prefix("highlighted"),Lb={highlight(t,e,n){lp(e,n&&n.className||_b)},unhighlight(t,e,n){cp(e,n&&n.className||_b)}},Bb=jb.prefix("highlight-opacity"),Ib={highlight(t,e){lp(e,Bb)},unhighlight(t,e){cp(e,Bb)}};t.Util=void 0,function(t){const e=bp("svg");function n(t,e){const n=$m(t.x,t.y).matrixTransform(e);return new ky(n.x,n.y)}function r(t,n){const r=e.createSVGPoint();r.x=t.x,r.y=t.y;const i=r.matrixTransform(n);r.x=t.x+t.width,r.y=t.y;const s=r.matrixTransform(n);r.x=t.x+t.width,r.y=t.y+t.height;const o=r.matrixTransform(n);r.x=t.x,r.y=t.y+t.height;const a=r.matrixTransform(n),l=Math.min(i.x,s.x,o.x,a.x),c=Math.max(i.x,s.x,o.x,a.x),h=Math.min(i.y,s.y,o.y,a.y),u=Math.max(i.y,s.y,o.y,a.y);return new Ny(l,h,c-l,u-h)}function i(t,e={}){let n;if(!t.ownerSVGElement||!fp(t)){if(Bp(t)){const{left:e,top:n,width:r,height:i}=s(t);return new Ny(e,n,r,i)}return new Ny(0,0,0,0)}let o=e.target;if(!e.recursive){try{n=t.getBBox()}catch(e){n={x:t.clientLeft,y:t.clientTop,width:t.clientWidth,height:t.clientHeight}}if(!o)return Ny.create(n);return r(n,ny(t,o))}{const e=t.childNodes,r=e.length;if(0===r)return i(t,{target:o});o||(o=t);for(let t=0;t{const n=t.getAttribute(e),r=n?parseFloat(n):0;return Number.isNaN(r)?0:r};switch(t instanceof SVGElement&&t.nodeName.toLowerCase()){case"rect":return new Ny(e("x"),e("y"),e("width"),e("height"));case"circle":return new _y(e("cx"),e("cy"),e("r"),e("r"));case"ellipse":return new _y(e("cx"),e("cy"),e("rx"),e("ry"));case"polyline":{const e=km(t);return new zy(e)}case"polygon":{const e=km(t);return e.length>1&&e.push(e[0]),new zy(e)}case"path":{let e=t.getAttribute("d");return Qy.isValid(e)||(e=Qy.normalize(e)),Qy.parse(e)}case"line":return new jy(e("x1"),e("y1"),e("x2"),e("y2"))}return i(t)}function a(t){if(null==t)return null;let e=t;do{let t=e.tagName;if("string"!=typeof t)return null;if(t=t.toUpperCase(),ap(e,"x6-port"))e=e.nextElementSibling;else if("G"===t)e=e.firstElementChild;else{if("TITLE"!==t)break;e=e.nextElementSibling}}while(e);return e}t.normalizeMarker=ub,t.transformPoint=n,t.transformLine=function(t,e){return new jy(n(t.start,e),n(t.end,e))},t.transformPolyline=function(t,e){let r=t instanceof zy?t.points:t;return Array.isArray(r)||(r=[]),new zy(r.map((t=>n(t,e))))},t.transformRectangle=r,t.bbox=function(t,e,n){let i;const s=t.ownerSVGElement;if(!s)return new Ny(0,0,0,0);try{i=t.getBBox()}catch(e){i={x:t.clientLeft,y:t.clientTop,width:t.clientWidth,height:t.clientHeight}}return e?Ny.create(i):r(i,ny(t,n||s))},t.getBBox=i,t.getBoundingOffsetRect=s,t.toGeometryShape=o,t.translateAndAutoOrient=function(t,e,n,r){const s=ky.create(e),o=ky.create(n);if(!r){r=t instanceof SVGSVGElement?t:t.ownerSVGElement}const a=ey(t);t.setAttribute("transform","");const l=i(t,{target:r}).scale(a.sx,a.sy),c=Gm();c.setTranslate(-l.x-l.width/2,-l.y-l.height/2);const h=Gm(),u=s.angleBetween(o,s.clone().translate(1,0));u&&h.setRotate(u,0,0);const g=Gm(),d=s.clone().move(o,l.width/2);g.setTranslate(2*s.x-d.x,2*s.y-d.y);const f=ny(t,r),p=Gm();p.setMatrix(g.matrix.multiply(h.matrix.multiply(c.matrix.multiply(f.scale(a.sx,a.sy))))),t.setAttribute("transform",qm(p.matrix))},t.findShapeNode=a,t.getBBoxV2=function(t){const e=a(t);if(!fp(e)){if(Bp(t)){const{left:e,top:n,width:r,height:i}=s(t);return new Ny(e,n,r,i)}return new Ny(0,0,0,0)}return o(e).bbox()||Ny.create()}}(t.Util||(t.Util={}));const Db={padding:3,rx:0,ry:0,attrs:{"stroke-width":3,stroke:"#FEB663"}},Rb={highlight(e,n,r){const i=Vb.getHighlighterId(n,r);if(Vb.hasCache(i))return;r=Za({},r,Db);const s=fm.create(n);let o,a;try{o=s.toPathData()}catch(e){a=t.Util.bbox(s.node,!0),o=Lm(Object.assign(Object.assign({},r),a))}const l=bp("path");if($p(l,Object.assign({d:o,"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},r.attrs?Gp(r.attrs):null)),e.isEdgeElement(n))$p(l,"d",e.getConnectionPathData());else{let n=s.getTransformToElement(e.container);const i=r.padding;if(i){null==a&&(a=t.Util.bbox(s.node,!0));const e=a.x+a.width/2,r=a.y+a.height/2;a=t.Util.transformRectangle(a,n);const o=Math.max(a.width,1),l=Math.max(a.height,1),c=(o+i)/o,h=(l+i)/l,u=Fm({a:c,b:0,c:0,d:h,e:e-c*e,f:r-h*r});n=n.multiply(u)}Km(l,n)}lp(l,jb.prefix("highlight-stroke"));const c=e.cell,h=()=>Vb.removeHighlighter(i);c.on("removed",h),c.model&&c.model.on("reseted",h),e.container.appendChild(l),Vb.setCache(i,l)},unhighlight(t,e,n){Vb.removeHighlighter(Vb.getHighlighterId(e,n))}};var Vb;!function(t){t.getHighlighterId=function(t,e){return dp(t),t.id+JSON.stringify(e)};const e={};t.setCache=function(t,n){e[t]=n},t.hasCache=function(t){return null!=e[t]},t.removeHighlighter=function(t){const n=e[t];n&&(Op(n),delete e[t])}}(Vb||(Vb={}));var zb,$b=Object.freeze({__proto__:null,className:Lb,opacity:Ib,stroke:Rb});function Fb(t,e={}){return new ky(Df(e.x,t.width),Df(e.y,t.height))}function Gb(t,e,n){return Object.assign({angle:e,position:t.toJSON()},n)}!function(t){t.check=function(t,e){if("function"!=typeof e.highlight)throw new Error(`Highlighter '${t}' is missing required \`highlight()\` method`);if("function"!=typeof e.unhighlight)throw new Error(`Highlighter '${t}' is missing required \`unhighlight()\` method`)}}(zb||(zb={})),function(t){t.presets=$b,t.registry=tv.create({type:"highlighter"}),t.registry.register(t.presets,!0)}(zb||(zb={}));function Ub(t,e,n,r){const i=e.getCenter(),s=e.getTopCenter(),o=e.width/e.height,a=_y.fromRect(e),l=t.length;return t.map(((t,e)=>{const c=n+r(e,l),h=s.clone().rotate(-c,i).scale(o,1,i),u=t.compensateRotate?-a.tangentTheta(h):0;return(t.dx||t.dy)&&h.translate(t.dx||0,t.dy||0),t.dr&&h.move(i,t.dr),Gb(h.round(),u,t)}))}function qb(t,n,r,i){const s=new jy(n,r),o=t.length;return t.map(((t,n)=>{var{strict:r}=t,a=e(t,["strict"]);const l=r||i.strict?(n+1)/(o+1):(n+.5)/o,c=s.pointAt(l);return(a.dx||a.dy)&&c.translate(a.dx||0,a.dy||0),Gb(c.round(),0,a)}))}var Wb,Hb=Object.freeze({__proto__:null,absolute:(t,e)=>t.map((({x:t,y:n,angle:r})=>Gb(Fb(e,{x:t,y:n}),r||0))),bottom:(t,e,n)=>qb(t,e.getBottomLeft(),e.getBottomRight(),n),ellipse:(t,e,n)=>{const r=n.start||0,i=n.step||20;return Ub(t,e,r,((t,e)=>(t+.5-e/2)*i))},ellipseSpread:(t,e,n)=>{const r=n.start||0,i=n.step||360/t.length;return Ub(t,e,r,(t=>t*i))},left:(t,e,n)=>qb(t,e.getTopLeft(),e.getBottomLeft(),n),line:(t,e,n)=>qb(t,Fb(e,n.start||e.getOrigin()),Fb(e,n.end||e.getCorner()),n),right:(t,e,n)=>qb(t,e.getTopRight(),e.getBottomRight(),n),top:(t,e,n)=>qb(t,e.getTopLeft(),e.getTopRight(),n)});!function(t){t.presets=Hb,t.registry=tv.create({type:"port layout"}),t.registry.register(t.presets,!0)}(Wb||(Wb={}));const Jb={position:{x:0,y:0},angle:0,attrs:{".":{y:"0","text-anchor":"start"}}};function Xb(t,e){const{x:n,y:r,angle:i,attrs:s}=e||{};return Za({},{angle:i,attrs:s,position:{x:n,y:r}},t,Jb)}function Yb(t,e,n,r){const i=null!=r.offset?r.offset:15,s=e.getCenter().theta(t),o=Kb(e);let a,l,c,h,u=0;return so[2]?(a=".3em",l=i,c=0,h="start"):so[2]?(a=".3em",l=-i,c=0,h="end"):s-270&&s<-90?(o="start",l=s-180):o="end",Xb({position:t.clone().move(i,r).diff(t).round().round().toJSON(),angle:e?l:0,attrs:{".":{y:a,"text-anchor":o}}},n)}var tx,ex,nx=Object.freeze({__proto__:null,bottom:(t,e,n)=>Xb({position:{x:0,y:15},attrs:{".":{y:".6em","text-anchor":"middle"}}},n),inside:(t,e,n)=>Zb(t,e,!1,n),insideOriented:(t,e,n)=>Zb(t,e,!0,n),left:(t,e,n)=>Xb({position:{x:-15,y:0},attrs:{".":{y:".3em","text-anchor":"end"}}},n),manual:(t,e,n)=>Xb({position:e.getTopLeft()},n),outside:(t,e,n)=>Yb(t,e,!1,n),outsideOriented:(t,e,n)=>Yb(t,e,!0,n),radial:(t,e,n)=>Qb(t.diff(e.getCenter()),!1,n),radialOriented:(t,e,n)=>Qb(t.diff(e.getCenter()),!0,n),right:(t,e,n)=>Xb({position:{x:15,y:0},attrs:{".":{y:".3em","text-anchor":"start"}}},n),top:(t,e,n)=>Xb({position:{x:0,y:-15},attrs:{".":{"text-anchor":"middle"}}},n)});!function(t){t.presets=nx,t.registry=tv.create({type:"port label layout"}),t.registry.register(t.presets,!0)}(tx||(tx={}));class rx extends wf{get priority(){return 2}constructor(){super(),this.cid=ex.uniqueId(),rx.views[this.cid]=this}confirmUpdate(t,e){return 0}empty(t=this.container){return Tp(t),this}unmount(t=this.container){return Op(t),this}remove(t=this.container){return t===this.container&&(this.removeEventListeners(document),this.onRemove(),delete rx.views[this.cid]),this.unmount(t),this}onRemove(){}setClass(t,e=this.container){e.classList.value=Array.isArray(t)?t.join(" "):t}addClass(t,e=this.container){return lp(e,Array.isArray(t)?t.join(" "):t),this}removeClass(t,e=this.container){return cp(e,Array.isArray(t)?t.join(" "):t),this}setStyle(t,e=this.container){return lm(e,t),this}setAttrs(t,e=this.container){return null!=t&&null!=e&&$p(e,t),this}findAttr(t,e=this.container){let n=e;for(;n&&1===n.nodeType;){const e=n.getAttribute(t);if(null!=e)return e;if(n===this.container)return null;n=n.parentNode}return null}find(t,e=this.container,n=this.selectors){return rx.find(t,e,n).elems}findOne(t,e=this.container,n=this.selectors){const r=this.find(t,e,n);return r.length>0?r[0]:null}findByAttr(t,e=this.container){let n=e;for(;n&&n.getAttribute;){const e=n.getAttribute(t);if((null!=e||n===this.container)&&"false"!==e)return n;n=n.parentNode}return null}getSelector(t,e){let n;if(t===this.container)return"string"==typeof e&&(n=`> ${e}`),n;if(t){const r=Cp(t)+1;n=`${t.tagName.toLowerCase()}:nth-child(${r})`,e&&(n+=` > ${e}`),n=this.getSelector(t.parentNode,n)}return n}prefixClassName(t){return jb.prefix(t)}delegateEvents(t,e){if(null==t)return this;e||this.undelegateEvents();const n=/^(\S+)\s*(.*)$/;return Object.keys(t).forEach((e=>{const r=e.match(n);if(null==r)return;const i=this.getEventHandler(t[e]);"function"==typeof i&&this.delegateEvent(r[1],r[2],i)})),this}undelegateEvents(){return hy.off(this.container,this.getEventNamespace()),this}delegateDocumentEvents(t,e){return this.addEventListeners(document,t,e),this}undelegateDocumentEvents(){return this.removeEventListeners(document),this}delegateEvent(t,e,n){return hy.on(this.container,t+this.getEventNamespace(),e,n),this}undelegateEvent(t,e,n){const r=t+this.getEventNamespace();return null==e?hy.off(this.container,r):"string"==typeof e?hy.off(this.container,r,e,n):hy.off(this.container,r,e),this}addEventListeners(t,e,n){if(null==e)return this;const r=this.getEventNamespace();return Object.keys(e).forEach((i=>{const s=this.getEventHandler(e[i]);"function"==typeof s&&hy.on(t,i+r,n,s)})),this}removeEventListeners(t){return null!=t&&hy.off(t,this.getEventNamespace()),this}getEventNamespace(){return`.${jb.prefixCls}-event-${this.cid}`}getEventHandler(t){let e;if("string"==typeof t){const n=this[t];"function"==typeof n&&(e=(...t)=>n.call(this,...t))}else e=(...e)=>t.call(this,...e);return e}getEventTarget(t,e={}){const{target:n,type:r,clientX:i=0,clientY:s=0}=t;return e.fromPoint||"touchmove"===r||"touchend"===r?document.elementFromPoint(i,s):n}stopPropagation(t){return this.setEventData(t,{propagationStopped:!0}),this}isPropagationStopped(t){return!0===this.getEventData(t).propagationStopped}getEventData(t){return this.eventData(t)}setEventData(t,e){return this.eventData(t,e)}eventData(t,e){if(null==t)throw new TypeError("Event object required");let n=t.data;const r=`__${this.cid}__`;return null==e?null==n?{}:n[r]||{}:(null==n&&(n=t.data={}),null==n[r]?n[r]=Object.assign({},e):n[r]=Object.assign(Object.assign({},n[r]),e),n[r])}normalizeEvent(t){return rx.normalizeEvent(t)}}!function(t){t.createElement=function(t,e){return e?bp(t||"g"):vp(t||"div")},t.find=function(t,e,n){if(!t||"."===t)return{elems:[e]};if(n){const e=n[t];if(e)return{elems:Array.isArray(e)?e:[e]}}if(jb.useCSSSelector){const n=t.includes(">")?`:scope ${t}`:t;return{isCSSSelector:!0,elems:Array.prototype.slice.call(e.querySelectorAll(n))}}return{elems:[]}},t.normalizeEvent=function(t){let e=t;const n=t.originalEvent,r=n&&n.changedTouches&&n.changedTouches[0];if(r){for(const e in t)void 0===r[e]&&(r[e]=t[e]);e=r}return e}}(rx||(rx={})),function(t){t.views={},t.getView=function(e){return t.views[e]||null}}(rx||(rx={})),function(t){let e=0;t.uniqueId=function(){const t=`v${e}`;return e+=1,t}}(ex||(ex={}));class ix{constructor(t){this.view=t,this.clean()}clean(){this.elemCache&&this.elemCache.dispose(),this.elemCache=new Ay,this.pathCache={}}get(t){return this.elemCache.has(t)||this.elemCache.set(t,{}),this.elemCache.get(t)}getData(t){const e=this.get(t);return e.data||(e.data={}),e.data}getMatrix(t){const e=this.get(t);if(null==e.matrix){const n=this.view.container;e.matrix=ry(t,n)}return Fm(e.matrix)}getShape(e){const n=this.get(e);return null==n.shape&&(n.shape=t.Util.toGeometryShape(e)),n.shape.clone()}getBoundingRect(e){const n=this.get(e);return null==n.boundingRect&&(n.boundingRect=t.Util.getBBoxV2(e)),n.boundingRect.clone()}}t.Markup=void 0,function(t){function e(t){return null!=t&&"string"==typeof t}function n(t,e={ns:pp.svg}){const n=document.createDocumentFragment(),r={},i={},s=[{markup:Array.isArray(t)?t:[t],parent:n,ns:e.ns}];for(;s.length>0;){const t=s.pop();let e=t.ns||pp.svg;const n=t.markup,o=t.parent;n.forEach((t=>{const n=t.tagName;if(!n)throw new TypeError("Invalid tagName");t.ns&&(e=t.ns);const a=e?vp(n,e):yp(n),l=t.attrs;l&&$p(a,Gp(l));const c=t.style;c&&lm(a,c);const h=t.className;null!=h&&a.setAttribute("class",Array.isArray(h)?h.join(" "):h),t.textContent&&(a.textContent=t.textContent);const u=t.selector;if(null!=u){if(i[u])throw new TypeError("Selector must be unique");i[u]=a}if(t.groupSelector){let e=t.groupSelector;Array.isArray(e)||(e=[e]),e.forEach((t=>{r[t]||(r[t]=[]),r[t].push(a)}))}o.appendChild(a);const g=t.children;Array.isArray(g)&&s.push({ns:e,markup:g,parent:a})}))}return Object.keys(r).forEach((t=>{if(i[t])throw new Error("Ambiguous group selector");i[t]=r[t]})),{fragment:n,selectors:i,groups:r}}function r(t){return t instanceof SVGElement?bp("g"):yp("div")}t.isJSONMarkup=function(t){return null!=t&&!e(t)},t.isStringMarkup=e,t.clone=function(t){return null==t||e(t)?t:xo(t)},t.sanitize=function(t){return`${t}`.trim().replace(/[\r|\n]/g," ").replace(/>\s+<")},t.parseJSONMarkup=n,t.renderMarkup=function(t){if(e(t)){const e=fm.createVectors(t),n=e.length;if(1===n)return{elem:e[0].node};if(n>1){const t=r(e[0].node);return e.forEach((e=>{t.appendChild(e.node)})),{elem:t}}return{}}const i=n(t),s=i.fragment;let o=null;return s.childNodes.length>1?(o=r(s.firstChild),o.appendChild(s)):o=s.firstChild,{elem:o,selectors:i.selectors}},t.parseLabelStringMarkup=function(t){const e=fm.createVectors(t),n=document.createDocumentFragment();for(let t=0,r=e.length;t ${s} > ${r}`:`> ${s}`,i;const o=e.parentNode;return i=o&&o.childNodes.length>1?`${s}:nth-child(${Cp(e)+1})`:s,r&&(i+=` > ${r}`),t(e.parentNode,n,i)}return r},function(t){t.getPortContainerMarkup=function(){return"g"},t.getPortMarkup=function(){return{tagName:"circle",selector:"circle",attrs:{r:10,fill:"#FFFFFF",stroke:"#000000"}}},t.getPortLabelMarkup=function(){return{tagName:"text",selector:"text",attrs:{fill:"#000000"}}}}(t.Markup||(t.Markup={})),function(t){t.getEdgeMarkup=function(){return[{tagName:"path",selector:"wrap",groupSelector:"lines",attrs:{fill:"none",cursor:"pointer",stroke:"transparent",strokeLinecap:"round"}},{tagName:"path",selector:"line",groupSelector:"lines",attrs:{fill:"none",pointerEvents:"none"}}]}}(t.Markup||(t.Markup={})),function(t){t.getForeignObjectMarkup=function(t=!1){return{tagName:"foreignObject",selector:"fo",children:[{ns:pp.xhtml,tagName:"body",selector:"foBody",attrs:{xmlns:pp.xhtml},style:{width:"100%",height:"100%",background:"transparent"},children:t?[]:[{tagName:"div",selector:"foContent",style:{width:"100%",height:"100%"}}]}]}}}(t.Markup||(t.Markup={}));class sx{constructor(t){this.view=t}get cell(){return this.view.cell}getDefinition(t){return this.cell.getAttrDefinition(t)}processAttrs(t,e){let n,r,i,s;const o=[];return Object.keys(e).forEach((r=>{const i=e[r],s=this.getDefinition(r),a=ef(kb.isValidDefinition,this.view,s,i,{elem:t,attrs:e,cell:this.cell,view:this.view});if(s&&a)"string"==typeof s?(null==n&&(n={}),n[s]=i):null!==i&&o.push({name:r,definition:s});else{null==n&&(n={});const t=Ip.includes(r)?r:Pf(r);n[t]=i}})),o.forEach((({name:t,definition:n})=>{const o=e[t];"function"==typeof n.set&&(null==r&&(r={}),r[t]=o);"function"==typeof n.offset&&(null==i&&(i={}),i[t]=o);"function"==typeof n.position&&(null==s&&(s={}),s[t]=o)})),{raw:e,normal:n,set:r,offset:i,position:s}}mergeProcessedAttrs(t,e){t.set=Object.assign(Object.assign({},t.set),e.set),t.position=Object.assign(Object.assign({},t.position),e.position),t.offset=Object.assign(Object.assign({},t.offset),e.offset);const n=t.normal&&t.normal.transform;null!=n&&e.normal&&(e.normal.transform=n),t.normal=e.normal}findAttrs(t,e,n,r){const i=[],s=new Ay;return Object.keys(t).forEach((o=>{const a=t[o];if(!Tr(a))return;const{isCSSSelector:l,elems:c}=rx.find(o,e,r);n[o]=c;for(let t=0,e=c.length;t{const e=s.get(t),n=e.attrs;e.attrs=n.reduceRight(((t,e)=>Sh(t,e)),{})})),s}updateRelativeAttrs(e,n,r){const i=n.raw||{};let s=n.normal||{};const o=n.set,a=n.position,l=n.offset,c=()=>({elem:e,cell:this.cell,view:this.view,attrs:i,refBBox:r.clone()});if(null!=o&&Object.keys(o).forEach((t=>{const e=o[t],n=this.getDefinition(t);if(null!=n){const r=ef(n.set,this.view,e,c());"object"==typeof r?s=Object.assign(Object.assign({},s),r):null!=r&&(s[t]=r)}})),e instanceof HTMLElement)return void this.view.setAttrs(s,e);const h=s.transform,u=Um(h?`${h}`:null),g=new ky(u.e,u.f);h&&(delete s.transform,u.e=0,u.f=0);let d=!1;null!=a&&Object.keys(a).forEach((t=>{const e=a[t],n=this.getDefinition(t);if(null!=n){const t=ef(n.position,this.view,e,c());null!=t&&(d=!0,g.translate(ky.create(t)))}})),this.view.setAttrs(s,e);let f=!1;if(null!=l){const n=this.view.getBoundingRectOfElement(e);if(n.width>0&&n.height>0){const r=t.Util.transformRectangle(n,u);Object.keys(l).forEach((t=>{const n=l[t],s=this.getDefinition(t);if(null!=s){const t=ef(s.offset,this.view,n,{elem:e,cell:this.cell,view:this.view,attrs:i,refBBox:r});null!=t&&(f=!0,g.translate(ky.create(t)))}}))}}(null!=h||d||f)&&(g.round(1),u.e=g.x,u.f=g.y,e.setAttribute("transform",qm(u)))}update(e,n,r){const i={},s=this.findAttrs(r.attrs||n,e,i,r.selectors),o=r.attrs?this.findAttrs(n,e,i,r.selectors):s,a=[];s.each((t=>{const n=t.elem,s=t.attrs,l=this.processAttrs(n,s);if(null==l.set&&null==l.position&&null==l.offset)this.view.setAttrs(l.normal,n);else{const t=o.get(n),c=t?t.attrs:null,h=c&&null==s.ref?c.ref:s.ref;let u;if(h){if(u=(i[h]||this.view.find(h,e,r.selectors))[0],!u)throw new Error(`"${h}" reference does not exist.`)}else u=null;const g={node:n,refNode:u,attributes:c,processedAttributes:l},d=a.findIndex((t=>t.refNode===n));d>-1?a.splice(d,0,g):a.push(g)}}));const l=new Ay;let c;a.forEach((n=>{const i=n.node,s=n.refNode;let o;const a=null!=s&&null!=r.rotatableNode&&Sp(r.rotatableNode,s);if(s&&(o=l.get(s)),!o){const n=a?r.rotatableNode:e;o=s?t.Util.getBBox(s,{target:n}):r.rootBBox,s&&l.set(s,o)}let h;r.attrs&&n.attributes?(h=this.processAttrs(i,n.attributes),this.mergeProcessedAttrs(h,n.processedAttributes)):h=n.processedAttributes;let u=o;a&&null!=r.rotatableNode&&!r.rotatableNode.contains(i)&&(c||(c=Um($p(r.rotatableNode,"transform"))),u=t.Util.transformRectangle(o,c)),this.updateRelativeAttrs(i,h,u)}))}}class ox{get cell(){return this.view.cell}constructor(t,e,n=[]){this.view=t;const r={},i={};let s=0;Object.keys(e).forEach((t=>{let n=e[t];Array.isArray(n)||(n=[n]),n.forEach((e=>{let n=r[e];n||(s+=1,n=r[e]=1<{r[t]||(s+=1,r[t]=1<25)throw new Error("Maximum number of flags exceeded.");this.flags=r,this.attrs=i,this.bootstrap=n}getFlag(t){const e=this.flags;return null==e?0:Array.isArray(t)?t.reduce(((t,n)=>t|e[n]),0):0|e[t]}hasAction(t,e){return t&this.getFlag(e)}removeAction(t,e){return t^t&this.getFlag(e)}getBootstrapFlag(){return this.getFlag(this.bootstrap)}getChangedFlag(){let t=0;return this.attrs?(Object.keys(this.attrs).forEach((e=>{this.cell.hasChanged(e)&&(t|=this.attrs[e])})),t):t}}class ax extends rx{static getDefaults(){return this.defaults}static config(t){this.defaults=this.getOptions(t)}static getOptions(t){const n=(t,e)=>null!=e?ud([...Array.isArray(t)?t:[t],...Array.isArray(e)?e:[e]]):Array.isArray(t)?[...t]:[t],r=xo(this.getDefaults()),{bootstrap:i,actions:s,events:o,documentEvents:a}=t,l=e(t,["bootstrap","actions","events","documentEvents"]);return i&&(r.bootstrap=n(r.bootstrap,i)),s&&Object.entries(s).forEach((([t,e])=>{const i=r.actions[t];e&&i?r.actions[t]=n(i,e):e&&(r.actions[t]=n(e))})),o&&(r.events=Object.assign(Object.assign({},r.events),o)),t.documentEvents&&(r.documentEvents=Object.assign(Object.assign({},r.documentEvents),a)),Sh(r,l)}get[Symbol.toStringTag](){return ax.toStringTag}constructor(t,e={}){super(),this.cell=t,this.options=this.ensureOptions(e),this.graph=this.options.graph,this.attr=new sx(this),this.flag=new ox(this,this.options.actions,this.options.bootstrap),this.cache=new ix(this),this.setContainer(this.ensureContainer()),this.setup(),this.init()}init(){}onRemove(){this.removeTools()}get priority(){return this.options.priority}get rootSelector(){return this.options.rootSelector}getConstructor(){return this.constructor}ensureOptions(t){return this.getConstructor().getOptions(t)}getContainerTagName(){return this.options.isSvgElement?"g":"div"}getContainerStyle(){}getContainerAttrs(){return{"data-cell-id":this.cell.id,"data-shape":this.cell.shape}}getContainerClassName(){return this.prefixClassName("cell")}ensureContainer(){return rx.createElement(this.getContainerTagName(),this.options.isSvgElement)}setContainer(t){if(this.container!==t){this.undelegateEvents(),this.container=t,null!=this.options.events&&this.delegateEvents(this.options.events);const e=this.getContainerAttrs();null!=e&&this.setAttrs(e,t);const n=this.getContainerStyle();null!=n&&this.setStyle(n,t);const r=this.getContainerClassName();null!=r&&this.addClass(r,t)}return this}isNodeView(){return!1}isEdgeView(){return!1}render(){return this}confirmUpdate(t,e={}){return 0}getBootstrapFlag(){return this.flag.getBootstrapFlag()}getFlag(t){return this.flag.getFlag(t)}hasAction(t,e){return this.flag.hasAction(t,e)}removeAction(t,e){return this.flag.removeAction(t,e)}handleAction(t,e,n,r){if(this.hasAction(t,e)){n();const i=[e];return r&&("string"==typeof r?i.push(r):i.push(...r)),this.removeAction(t,i)}return t}setup(){this.cell.on("changed",this.onCellChanged,this)}onCellChanged({options:t}){this.onAttrsChange(t)}onAttrsChange(t){let e=this.flag.getChangedFlag();!t.updated&&e&&(t.dirty&&this.hasAction(e,"update")&&(e|=this.getFlag("render")),t.toolId&&(t.async=!1),null!=this.graph&&this.graph.renderer.requestViewUpdate(this,e,t))}parseJSONMarkup(e,n){const r=t.Markup.parseJSONMarkup(e),i=r.selectors,s=this.rootSelector;if(n&&s){if(i[s])throw new Error("Invalid root selector");i[s]=n}return r}can(t){let e=this.graph.options.interacting;if("function"==typeof e&&(e=ef(e,this.graph,this)),"object"==typeof e){let n=e[t];return"function"==typeof n&&(n=ef(n,this.graph,this)),!1!==n}return"boolean"==typeof e&&e}cleanCache(){return this.cache.clean(),this}getCache(t){return this.cache.get(t)}getDataOfElement(t){return this.cache.getData(t)}getMatrixOfElement(t){return this.cache.getMatrix(t)}getShapeOfElement(t){return this.cache.getShape(t)}getBoundingRectOfElement(t){return this.cache.getBoundingRect(t)}getBBoxOfElement(e){const n=this.getBoundingRectOfElement(e),r=this.getMatrixOfElement(e),i=this.getRootRotatedMatrix(),s=this.getRootTranslatedMatrix();return t.Util.transformRectangle(n,s.multiply(i).multiply(r))}getUnrotatedBBoxOfElement(e){const n=this.getBoundingRectOfElement(e),r=this.getMatrixOfElement(e),i=this.getRootTranslatedMatrix();return t.Util.transformRectangle(n,i.multiply(r))}getBBox(t={}){let e;if(t.useCellGeometry){const t=this.cell,n=t.isNode()?t.getAngle():0;e=t.getBBox().bbox(n)}else e=this.getBBoxOfElement(this.container);return this.graph.coord.localToGraphRect(e)}getRootTranslatedMatrix(){const t=this.cell,e=t.isNode()?t.getPosition():{x:0,y:0};return Fm().translate(e.x,e.y)}getRootRotatedMatrix(){let t=Fm();const e=this.cell,n=e.isNode()?e.getAngle():0;if(n){const r=e.getBBox(),i=r.width/2,s=r.height/2;t=t.translate(i,s).rotate(n).translate(-i,-s)}return t}findMagnet(t=this.container){return this.findByAttr("magnet",t)}updateAttrs(t,e,n={}){null==n.rootBBox&&(n.rootBBox=new Ny),null==n.selectors&&(n.selectors=this.selectors),this.attr.update(t,e,n)}isEdgeElement(t){return this.cell.isEdge()&&(null==t||t===this.container)}prepareHighlight(t,e={}){const n=t||this.container;return e.partial=n===this.container,n}highlight(t,e={}){const n=this.prepareHighlight(t,e);return this.notify("cell:highlight",{magnet:n,options:e,view:this,cell:this.cell}),this.isEdgeView()?this.notify("edge:highlight",{magnet:n,options:e,view:this,edge:this.cell,cell:this.cell}):this.isNodeView()&&this.notify("node:highlight",{magnet:n,options:e,view:this,node:this.cell,cell:this.cell}),this}unhighlight(t,e={}){const n=this.prepareHighlight(t,e);return this.notify("cell:unhighlight",{magnet:n,options:e,view:this,cell:this.cell}),this.isNodeView()?this.notify("node:unhighlight",{magnet:n,options:e,view:this,node:this.cell,cell:this.cell}):this.isEdgeView()&&this.notify("edge:unhighlight",{magnet:n,options:e,view:this,edge:this.cell,cell:this.cell}),this}notifyUnhighlight(t,e){}getEdgeTerminal(t,e,n,r,i){const s=this.cell,o=this.findAttr("port",t),a=t.getAttribute("data-selector"),l={cell:s.id};return null!=a&&(l.magnet=a),null!=o?(l.port=o,s.isNode()&&(s.hasPort(o)||null!=a||(l.selector=this.getSelector(t)))):null==a&&this.container!==t&&(l.selector=this.getSelector(t)),l}getMagnetFromEdgeTerminal(t){const e=this.cell,n=this.container,r=t.port;let i,s=t.magnet;return null!=r&&e.isNode()&&e.hasPort(r)?i=this.findPortElem(r,s)||n:(s||(s=t.selector),s||null==r||(s=`[port="${r}"]`),i=this.findOne(s,n,this.selectors)),i}hasTools(t){const e=this.tools;return null!=e&&(null==t||e.name===t)}addTools(t){if(this.removeTools(),t){if(!this.can("toolsAddable"))return this;const e=lx.isToolsView(t)?t:new lx(t);this.tools=e,e.config({view:this}),e.mount()}return this}updateTools(t={}){return this.tools&&this.tools.update(t),this}removeTools(){return this.tools&&(this.tools.remove(),this.tools=null),this}hideTools(){return this.tools&&this.tools.hide(),this}showTools(){return this.tools&&this.tools.show(),this}renderTools(){const t=this.cell.getTools();return this.addTools(t),this}notify(t,e){return this.trigger(t,e),this.graph.trigger(t,e),this}getEventArgs(t,e,n){const r=this,i=r.cell;return null==e||null==n?{e:t,view:r,cell:i}:{e:t,x:e,y:n,view:r,cell:i}}onClick(t,e,n){this.notify("cell:click",this.getEventArgs(t,e,n))}onDblClick(t,e,n){this.notify("cell:dblclick",this.getEventArgs(t,e,n))}onContextMenu(t,e,n){this.notify("cell:contextmenu",this.getEventArgs(t,e,n))}onMouseDown(t,e,n){this.cell.model&&(this.cachedModelForMouseEvent=this.cell.model,this.cachedModelForMouseEvent.startBatch("mouse")),this.notify("cell:mousedown",this.getEventArgs(t,e,n))}onMouseUp(t,e,n){this.notify("cell:mouseup",this.getEventArgs(t,e,n)),this.cachedModelForMouseEvent&&(this.cachedModelForMouseEvent.stopBatch("mouse",{cell:this.cell}),this.cachedModelForMouseEvent=null)}onMouseMove(t,e,n){this.notify("cell:mousemove",this.getEventArgs(t,e,n))}onMouseOver(t){this.notify("cell:mouseover",this.getEventArgs(t))}onMouseOut(t){this.notify("cell:mouseout",this.getEventArgs(t))}onMouseEnter(t){this.notify("cell:mouseenter",this.getEventArgs(t))}onMouseLeave(t){this.notify("cell:mouseleave",this.getEventArgs(t))}onMouseWheel(t,e,n,r){this.notify("cell:mousewheel",Object.assign({delta:r},this.getEventArgs(t,e,n)))}onCustomEvent(t,e,n,r){this.notify("cell:customevent",Object.assign({name:e},this.getEventArgs(t,n,r))),this.notify(e,Object.assign({},this.getEventArgs(t,n,r)))}onMagnetMouseDown(t,e,n,r){}onMagnetDblClick(t,e,n,r){}onMagnetContextMenu(t,e,n,r){}onLabelMouseDown(t,e,n){}checkMouseleave(t){const e=this.getEventTarget(t,{fromPoint:!0}),n=this.graph.findViewByElem(e);n!==this&&(this.onMouseLeave(t),n&&n.onMouseEnter(t))}dispose(){this.cell.off("changed",this.onCellChanged,this)}}ax.defaults={isSvgElement:!0,rootSelector:"root",priority:0,bootstrap:[],actions:{}},n([ax.dispose()],ax.prototype,"dispose",null),function(t){t.Flag=ox,t.Attr=sx}(ax||(ax={})),function(t){t.toStringTag=`X6.${t.name}`,t.isCellView=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],r=e;return(null==n||n===t.toStringTag)&&"function"==typeof r.isNodeView&&"function"==typeof r.isEdgeView&&"function"==typeof r.confirmUpdate}}(ax||(ax={})),function(t){t.priority=function(t){return function(e){e.config({priority:t})}},t.bootstrap=function(t){return function(e){e.config({bootstrap:t})}}}(ax||(ax={})),function(t){t.registry=tv.create({type:"view"})}(ax||(ax={}));class lx extends rx{get name(){return this.options.name}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get[Symbol.toStringTag](){return lx.toStringTag}constructor(t={}){super(),this.svgContainer=this.createContainer(!0,t),this.htmlContainer=this.createContainer(!1,t),this.config(t)}createContainer(t,e){const n=t?rx.createElement("g",!0):rx.createElement("div",!1);return lp(n,this.prefixClassName("cell-tools")),e.className&&lp(n,e.className),n}config(t){if(this.options=Object.assign(Object.assign({},this.options),t),!ax.isCellView(t.view)||t.view===this.cellView)return this;this.cellView=t.view,this.cell.isEdge()?(lp(this.svgContainer,this.prefixClassName("edge-tools")),lp(this.htmlContainer,this.prefixClassName("edge-tools"))):this.cell.isNode()&&(lp(this.svgContainer,this.prefixClassName("node-tools")),lp(this.htmlContainer,this.prefixClassName("node-tools"))),this.svgContainer.setAttribute("data-cell-id",this.cell.id),this.htmlContainer.setAttribute("data-cell-id",this.cell.id),this.name&&(this.svgContainer.setAttribute("data-tools-name",this.name),this.htmlContainer.setAttribute("data-tools-name",this.name));const e=this.options.items;if(!Array.isArray(e))return this;this.tools=[];const n=[];e.forEach((t=>{if(lx.ToolItem.isToolItem(t))"vertices"===t.name?n.unshift(t):n.push(t);else{"vertices"===("object"==typeof t?t.name:t)?n.unshift(t):n.push(t)}}));for(let t=0;t{t.toolId!==e.cid&&e.isVisible()&&e.update()})),this}focus(t){const e=this.tools;return e&&e.forEach((e=>{t===e?e.show():e.hide()})),this}blur(t){const e=this.tools;return e&&e.forEach((e=>{e===t||e.isVisible()||(e.show(),e.update())})),this}hide(){return this.focus(null)}show(){return this.blur(null)}remove(){const t=this.tools;return t&&(t.forEach((t=>t.remove())),this.tools=null),Op(this.svgContainer),Op(this.htmlContainer),super.remove()}mount(){const t=this.tools,e=this.cellView;if(e&&t){const n=t.some((t=>!1!==t.options.isSVGElement)),r=t.some((t=>!1===t.options.isSVGElement));if(n){(this.options.local?e.container:e.graph.view.decorator).appendChild(this.svgContainer)}r&&this.graph.container.appendChild(this.htmlContainer)}return this}}!function(t){t.toStringTag=`X6.${t.name}`,t.isToolsView=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],r=e;return(null==n||n===t.toStringTag)&&null!=r.graph&&null!=r.cell&&"function"==typeof r.config&&"function"==typeof r.update&&"function"==typeof r.focus&&"function"==typeof r.blur&&"function"==typeof r.show&&"function"==typeof r.hide}}(lx||(lx={})),function(e){class n extends rx{static getDefaults(){return this.defaults}static config(t){this.defaults=this.getOptions(t)}static getOptions(t){return Sh(xo(this.getDefaults()),t)}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get name(){return this.options.name}get[Symbol.toStringTag](){return n.toStringTag}constructor(t={}){super(),this.visible=!0,this.options=this.getOptions(t),this.container=rx.createElement(this.options.tagName||"g",!1!==this.options.isSVGElement),lp(this.container,this.prefixClassName("cell-tool")),"string"==typeof this.options.className&&lp(this.container,this.options.className),this.init()}init(){}getOptions(t){return this.constructor.getOptions(t)}delegateEvents(){return this.options.events&&super.delegateEvents(this.options.events),this}config(t,e){return this.cellView=t,this.parent=e,this.stamp(this.container),this.cell.isEdge()?lp(this.container,this.prefixClassName("edge-tool")):this.cell.isNode()&&lp(this.container,this.prefixClassName("node-tool")),this.name&&this.container.setAttribute("data-tool-name",this.name),this.delegateEvents(),this}render(){this.empty();const e=this.options.markup;if(e){const n=t.Markup.parseJSONMarkup(e);this.container.appendChild(n.fragment),this.childNodes=n.selectors}return this.onRender(),this}onRender(){}update(){return this}stamp(t){t&&t.setAttribute("data-cell-id",this.cellView.cell.id)}show(){return this.container.style.display="",this.visible=!0,this}hide(){return this.container.style.display="none",this.visible=!1,this}isVisible(){return this.visible}focus(){const t=this.options.focusOpacity;return null!=t&&Number.isFinite(t)&&(this.container.style.opacity=`${t}`),this.parent.focus(this),this}blur(){return this.container.style.opacity="",this.parent.blur(this),this}guard(t){return null==this.graph||null==this.cellView||this.graph.view.guard(t,this.cellView)}}n.defaults={isSVGElement:!0,tagName:"g"},e.ToolItem=n,function(t){let e=0;t.define=function(t){const n=df((r=t.name)?Mf(r):(e+=1,`CustomTool${e}`),this);var r;return n.config(t),n}}(n=e.ToolItem||(e.ToolItem={})),function(t){t.toStringTag=`X6.${t.name}`,t.isToolItem=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],r=e;return(null==n||n===t.toStringTag)&&null!=r.graph&&null!=r.cell&&"function"==typeof r.config&&"function"==typeof r.update&&"function"==typeof r.focus&&"function"==typeof r.blur&&"function"==typeof r.show&&"function"==typeof r.hide&&"function"==typeof r.isVisible}}(n=e.ToolItem||(e.ToolItem={}))}(lx||(lx={}));function cx(t,e){return 0===e?"0%":`${Math.round(t/e*100)}%`}function hx(t){return(e,n,r,i)=>n.isEdgeElement(r)?function(t,e,n,r,i){const s=n.getConnection();if(!s)return e;const o=s.closestPointLength(i);if(t){const t=s.length();e.anchor={name:"ratio",args:{ratio:o/t}}}else e.anchor={name:"length",args:{length:o}};return e}(t,e,n,0,i):function(t,e,n,r,i){const s=n.cell,o=s.getAngle(),a=n.getUnrotatedBBoxOfElement(r),l=s.getBBox().getCenter(),c=ky.create(i).rotate(o,l);let h=c.x-a.x,u=c.y-a.y;t&&(h=cx(h,a.width),u=cx(u,a.height));return e.anchor={name:"topLeft",args:{dx:h,dy:u,rotate:!0}},e}(t,e,n,r,i)}const ux=hx(!0),gx=hx(!1);var dx,fx=Object.freeze({__proto__:null,noop:t=>t,pinAbsolute:gx,pinRelative:ux});function px(t,e,n,r){return ef(dx.presets.pinRelative,this.graph,{},e,n,t,this.cell,r,{}).anchor}function mx(t,e){return e?t.cell.getBBox():t.cell.isEdge()?t.getConnection().bbox():t.getUnrotatedBBoxOfElement(t.container)}!function(t){t.presets=fx,t.registry=tv.create({type:"connection strategy"}),t.registry.register(t.presets,!0)}(dx||(dx={}));class yx extends lx.ToolItem{onRender(){lp(this.container,this.prefixClassName("cell-tool-button")),this.update()}update(){return this.updatePosition(),this}updatePosition(){const t=this.cellView.cell.isEdge()?this.getEdgeMatrix():this.getNodeMatrix();Km(this.container,t,{absolute:!0})}getNodeMatrix(){const t=this.cellView,e=this.options;let{x:n=0,y:r=0}=e;const{offset:i,useCellGeometry:s,rotate:o}=e;let a=mx(t,s);const l=t.cell.getAngle();o||(a=a.bbox(l));let c=0,h=0;"number"==typeof i?(c=i,h=i):"object"==typeof i&&(c=i.x,h=i.y),n=Df(n,a.width),r=Df(r,a.height);let u=Fm().translate(a.x+a.width/2,a.y+a.height/2);return o&&(u=u.rotate(l)),u=u.translate(n+c-a.width/2,r+h-a.height/2),u}getEdgeMatrix(){const t=this.cellView,e=this.options,{offset:n=0,distance:r=0,rotate:i}=e;let s,o,a;const l=Df(r,1);s=l>=0&&l<=1?t.getTangentAtRatio(l):t.getTangentAtLength(l),s?(o=s.start,a=s.vector().vectorAngle(new ky(1,0))||0):(o=t.getConnection().start,a=0);let c=Fm().translate(o.x,o.y).rotate(a);return c="object"==typeof n?c.translate(n.x||0,n.y||0):c.translate(0,n),i||(c=c.rotate(-a)),c}onMouseDown(t){if(this.guard(t))return;t.stopPropagation(),t.preventDefault();const e=this.options.onClick;"function"==typeof e&&ef(e,this.cellView,{e:t,view:this.cellView,cell:this.cellView.cell,btn:this})}}!function(t){t.config({name:"button",useCellGeometry:!0,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"}})}(yx||(yx={})),function(t){t.Remove=t.define({name:"button-remove",markup:[{tagName:"circle",selector:"button",attrs:{r:7,fill:"#FF1D00",cursor:"pointer"}},{tagName:"path",selector:"icon",attrs:{d:"M -3 -3 3 3 M -3 3 3 -3",fill:"none",stroke:"#FFFFFF","stroke-width":2,"pointer-events":"none"}}],distance:60,offset:0,useCellGeometry:!0,onClick({view:t,btn:e}){e.parent.remove(),t.cell.remove({ui:!0,toolId:e.cid})}})}(yx||(yx={}));class vx extends lx.ToolItem{onRender(){if(lp(this.container,this.prefixClassName("cell-tool-boundary")),this.options.attrs){const t=this.options.attrs,{class:n}=t,r=e(t,["class"]);$p(this.container,Gp(r)),n&&lp(this.container,n)}this.update()}update(){const t=this.cellView,e=this.options,{useCellGeometry:n,rotate:r}=e,i=Rf(e.padding);let s=mx(t,n).moveAndExpand({x:-i.left,y:-i.top,width:i.left+i.right,height:i.top+i.bottom});const o=t.cell;if(o.isNode()){const t=o.getAngle();if(t)if(r){const e=o.getBBox().getCenter();ty(this.container,t,e.x,e.y,{absolute:!0})}else s=s.bbox(t)}return $p(this.container,s.toJSON()),this}}!function(t){t.config({name:"boundary",tagName:"rect",padding:10,useCellGeometry:!0,attrs:{fill:"none",stroke:"#333","stroke-width":.5,"stroke-dasharray":"5, 5","pointer-events":"none"}})}(vx||(vx={}));class bx extends lx.ToolItem{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}onRender(){return this.addClass(this.prefixClassName("edge-tool-vertices")),this.options.addable&&this.updatePath(),this.resetHandles(),this.renderHandles(),this}update(){return this.vertices.length===this.handles.length?this.updateHandles():(this.resetHandles(),this.renderHandles()),this.options.addable&&this.updatePath(),this}resetHandles(){const t=this.handles;this.handles=[],t&&t.forEach((t=>{this.stopHandleListening(t),t.remove()}))}renderHandles(){const t=this.vertices;for(let e=0,n=t.length;ethis.guard(t),attrs:this.options.attrs||{}});i&&i(s),s.updatePosition(n.x,n.y),this.stamp(s.container),this.container.appendChild(s.container),this.handles.push(s),this.startHandleListening(s)}}updateHandles(){const t=this.vertices;for(let e=0,n=t.length;e0?n[t-1]:e.sourceAnchor,i=t0){const r=this.getNeighborPoints(e),i=r.prev,s=r.next;Math.abs(t.x-i.x)new t.Handle(e),markup:[{tagName:"path",selector:"connection",className:e,attrs:{fill:"none",stroke:"transparent","stroke-width":10,cursor:"pointer"}}],events:{[`mousedown .${e}`]:"onPathMouseDown",[`touchstart .${e}`]:"onPathMouseDown"}})}(bx||(bx={}));class xx extends lx.ToolItem{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}update(){return this.render(),this}onRender(){lp(this.container,this.prefixClassName("edge-tool-segments")),this.resetHandles();const t=this.cellView,e=[...this.vertices];e.unshift(t.sourcePoint),e.push(t.targetPoint);for(let t=0,n=e.length;tthis.guard(t),attrs:this.options.attrs||{}});return this.options.processHandle&&this.options.processHandle(r),this.updateHandle(r,t,e),this.container.appendChild(r.container),this.startHandleListening(r),r}startHandleListening(t){t.on("change",this.onHandleChange,this),t.on("changing",this.onHandleChanging,this),t.on("changed",this.onHandleChanged,this)}stopHandleListening(t){t.off("change",this.onHandleChange,this),t.off("changing",this.onHandleChanging,this),t.off("changed",this.onHandleChanged,this)}resetHandles(){const t=this.handles;this.handles=[],t&&t.forEach((t=>{this.stopHandleListening(t),t.remove()}))}shiftHandleIndexes(t){const e=this.handles;for(let n=0,r=e.length;nnew t.Handle(e),anchor:px})}(xx||(xx={}));class wx extends lx.ToolItem{get type(){return this.options.type}onRender(){lp(this.container,this.prefixClassName(`edge-tool-${this.type}-anchor`)),this.toggleArea(!1),this.update()}update(){const t=this.type;return this.cellView.getTerminalView(t)?(this.updateAnchor(),this.updateArea(),this.container.style.display=""):this.container.style.display="none",this}updateAnchor(){const t=this.childNodes;if(!t)return;const e=t.anchor;if(!e)return;const n=this.type,r=this.cellView,i=this.options,s=r.getTerminalAnchor(n),o=r.cell.prop([n,"anchor"]);e.setAttribute("transform",`translate(${s.x}, ${s.y})`);const a=o?i.customAnchorAttrs:i.defaultAnchorAttrs;a&&Object.keys(a).forEach((t=>{e.setAttribute(t,a[t])}))}updateArea(){const t=this.childNodes;if(!t)return;const e=t.area;if(!e)return;const n=this.type,r=this.cellView,i=r.getTerminalView(n);if(i){const t=i.cell,s=r.getTerminalMagnet(n);let o,a,l,c=this.options.areaPadding||0;Number.isFinite(c)||(c=0),i.isEdgeElement(s)?(o=i.getBBox(),a=0,l=o.getCenter()):(o=i.getUnrotatedBBoxOfElement(s),a=t.getAngle(),l=o.getCenter(),a&&l.rotate(-a,t.getBBox().getCenter())),o.inflate(c),$p(e,{x:-o.width/2,y:-o.height/2,width:o.width,height:o.height,transform:`translate(${l.x}, ${l.y}) rotate(${a})`})}}toggleArea(t){if(this.childNodes){const e=this.childNodes.area;e&&(e.style.display=t?"":"none")}}onMouseDown(t){this.guard(t)||(t.stopPropagation(),t.preventDefault(),this.graph.view.undelegateEvents(),this.options.documentEvents&&this.delegateDocumentEvents(this.options.documentEvents),this.focus(),this.toggleArea(this.options.restrictArea),this.cell.startBatch("move-anchor",{ui:!0,toolId:this.cid}))}resetAnchor(t){const e=this.type,n=this.cell;t?n.prop([e,"anchor"],t,{rewrite:!0,ui:!0,toolId:this.cid}):n.removeProp([e,"anchor"],{ui:!0,toolId:this.cid})}onMouseMove(t){const e=this.type,n=this.cellView,r=n.getTerminalView(e);if(null==r)return;const i=this.normalizeEvent(t),s=r.cell,o=n.getTerminalMagnet(e);let a=this.graph.coord.clientToLocalPoint(i.clientX,i.clientY);const l=this.options.snap;if("function"==typeof l){const t=ef(l,n,a,r,o,e,n,this);a=ky.create(t)}if(this.options.restrictArea)if(r.isEdgeElement(o)){const t=r.getClosestPoint(a);t&&(a=t)}else{const t=r.getUnrotatedBBoxOfElement(o),e=s.getAngle(),n=s.getBBox().getCenter(),i=a.clone().rotate(e,n);t.containsPoint(i)||(a=t.getNearestPointToPoint(i).rotate(-e,n))}let c;const h=this.options.anchor;"function"==typeof h&&(c=ef(h,n,a,r,o,e,n,this)),this.resetAnchor(c),this.update()}onMouseUp(t){this.graph.view.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);const e=this.cellView;this.options.removeRedundancies&&e.removeRedundantLinearVertices({ui:!0,toolId:this.cid}),this.cell.stopBatch("move-anchor",{ui:!0,toolId:this.cid})}onDblClick(){const t=this.options.resetAnchor;t&&this.resetAnchor(!0===t?void 0:t),this.update()}}!function(t){t.config({tagName:"g",markup:[{tagName:"circle",selector:"anchor",attrs:{cursor:"pointer"}},{tagName:"rect",selector:"area",attrs:{"pointer-events":"none",fill:"none",stroke:"#33334F","stroke-dasharray":"2,4",rx:5,ry:5}}],events:{mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDblClick"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},customAnchorAttrs:{"stroke-width":4,stroke:"#33334F",fill:"#FFFFFF",r:5},defaultAnchorAttrs:{"stroke-width":2,stroke:"#FFFFFF",fill:"#33334F",r:6},areaPadding:6,snapRadius:10,resetAnchor:!0,restrictArea:!0,removeRedundancies:!0,anchor:px,snap(t,e,n,r,i,s){const o=s.options.snapRadius||0,a="source"===r,l=a?0:-1,c=this.cell.getVertexAt(l)||this.getTerminalAnchor(a?"target":"source");return c&&(Math.abs(c.x-t.x){this.editor&&(this.editor.focus(),this.selectText())}))}selectText(){if(window.getSelection&&this.editor){const t=document.createRange(),e=window.getSelection();t.selectNodeContents(this.editor),e.removeAllRanges(),e.addRange(t)}}getCellText(){const{getText:t}=this.options;if("function"==typeof t)return ef(t,this.cellView,{cell:this.cell,index:this.labelIndex});if("string"==typeof t){if(this.cell.isNode())return this.cell.attr(t);if(this.cell.isEdge()&&-1!==this.labelIndex)return this.cell.prop(`labels/${this.labelIndex}/attrs/${t}`)}}setCellText(t){const e=this.options.setText;if("function"!=typeof e){if("string"==typeof e){if(this.cell.isNode())return void(null!==t&&this.cell.attr(e,t));if(this.cell.isEdge()){const n=this.cell;if(-1===this.labelIndex){if(t){const r={position:{distance:this.distance},attrs:{}};yf(r,`attrs/${e}`,t),n.appendLabel(r)}}else null!==t?n.prop(`labels/${this.labelIndex}/attrs/${e}`,t):"number"==typeof this.labelIndex&&n.removeLabelAt(this.labelIndex)}}}else ef(e,this.cellView,{cell:this.cell,value:t,index:this.labelIndex,distance:this.distance})}onRemove(){const t=this.cellView;t&&t.off("cell:dblclick",this.dblClick),this.removeElement()}}var Ox,Tx;!function(t){t.config({tagName:"div",isSVGElement:!1,events:{mousedown:"onMouseDown",touchstart:"onMouseDown"},documentEvents:{mouseup:"onDocumentMouseUp",touchend:"onDocumentMouseUp",touchcancel:"onDocumentMouseUp"}})}(Sx||(Sx={})),function(t){t.NodeEditor=t.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},getText:"text/text",setText:"text/text"}),t.EdgeEditor=t.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},labelAddable:!0,getText:"label/text",setText:"label/text"})}(Sx||(Sx={})),function(t){t.presets={boundary:vx,button:yx,"button-remove":yx.Remove,"node-editor":Sx.NodeEditor},t.registry=tv.create({type:"node tool",process(t,n){if("function"==typeof n)return n;let r=lx.ToolItem;const{inherit:i}=n,s=e(n,["inherit"]);if(i){const t=this.get(i);null==t?this.onNotFound(i,"inherited"):r=t}return null==s.name&&(s.name=t),r.define.call(r,s)}}),t.registry.register(t.presets,!0)}(Ox||(Ox={})),function(t){t.presets={boundary:vx,vertices:bx,segments:xx,button:yx,"button-remove":yx.Remove,"source-anchor":Ax,"target-anchor":Cx,"source-arrowhead":Mx,"target-arrowhead":Ex,"edge-editor":Sx.EdgeEditor},t.registry=tv.create({type:"edge tool",process(t,n){if("function"==typeof n)return n;let r=lx.ToolItem;const{inherit:i}=n,s=e(n,["inherit"]);if(i){const t=this.get(i);null==t?this.onNotFound(i,"inherited"):r=t}return null==s.name&&(s.name=t),r.define.call(r,s)}}),t.registry.register(t.presets,!0)}(Tx||(Tx={}));const kx=Vx("center"),Nx=Vx("topCenter"),jx=Vx("bottomCenter"),_x=Vx("leftMiddle"),Lx=Vx("rightMiddle"),Bx=Vx("topLeft"),Ix=Vx("topRight"),Dx=Vx("bottomLeft"),Rx=Vx("bottomRight");function Vx(t){return function(e,n,r,i={}){const s=i.rotate?e.getUnrotatedBBoxOfElement(n):e.getBBoxOfElement(n),o=s[t];o.x+=Df(i.dx,s.width),o.y+=Df(i.dy,s.height);const a=e.cell;return i.rotate?o.rotate(-a.getAngle(),a.getBBox().getCenter()):o}}function zx(t){return function(e,n,r,i){if(r instanceof Element){const s=this.graph.findViewByElem(r);let o;if(s)if(s.isEdgeElement(r)){o=$x(s,null!=i.fixedAt?i.fixedAt:"50%")}else o=s.getBBoxOfElement(r).getCenter();else o=new ky;return t.call(this,e,n,o,i)}return t.apply(this,arguments)}}function $x(t,e){const n=If(e),r="string"==typeof e?parseFloat(e):e;return n?t.getPointAtRatio(r/100):t.getPointAtLength(r)}const Fx=zx((function(e,n,r,i){const s=e.cell.getAngle(),o=e.getBBoxOfElement(n),a=o.getCenter(),l=o.getTopLeft(),c=o.getBottomRight();let h=i.padding;if(Number.isFinite(h)||(h=0),l.y+h<=r.y&&r.y<=c.y-h){const e=r.y-a.y;a.x+=0===s||180===s?0:1*e/Math.tan(t.Angle.toRad(s)),a.y+=e}else if(l.x+h<=r.x&&r.x<=c.x-h){const e=r.x-a.x;a.y+=90===s||270===s?0:e*Math.tan(t.Angle.toRad(s)),a.x+=e}return a})),Gx=zx((function(t,e,n,r){let i,s,o=0;const a=t.cell;r.rotate?(i=t.getUnrotatedBBoxOfElement(e),s=a.getBBox().getCenter(),o=a.getAngle()):i=t.getBBoxOfElement(e);const l=r.padding;null!=l&&Number.isFinite(l)&&i.inflate(l),r.rotate&&n.rotate(o,s);const c=i.getNearestSideToPoint(n);let h;switch(c){case"left":h=i.getLeftMiddle();break;case"right":h=i.getRightMiddle();break;case"top":h=i.getTopCenter();break;case"bottom":h=i.getBottomCenter()}const u=r.direction;return"H"===u?"top"!==c&&"bottom"!==c||(h=n.x<=i.x+i.width?i.getLeftMiddle():i.getRightMiddle()):"V"===u&&(h=n.y<=i.y+i.height?i.getTopCenter():i.getBottomCenter()),r.rotate?h.rotate(-o,s):h}));var Ux,qx=Object.freeze({__proto__:null,bottom:jx,bottomLeft:Dx,bottomRight:Rx,center:kx,left:_x,midSide:Gx,nodeCenter:function(t,e,n,r,i){const s=t.cell.getConnectionPoint(this.cell,i);return(r.dx||r.dy)&&s.translate(r.dx||0,r.dy||0),s},orth:Fx,right:Lx,top:Nx,topLeft:Bx,topRight:Ix});!function(t){t.presets=qx,t.registry=tv.create({type:"node endpoint"}),t.registry.register(t.presets,!0)}(Ux||(Ux={}));const Wx=function(t,e,n,r){const i=t.getClosestPoint(n);return null!=i?i:new ky},Hx=zx(Wx),Jx=zx((function(t,e,n,r){const i=1e6,s=t.getConnection(),o=t.getConnectionSubdivisions(),a=new jy(n.clone().translate(0,i),n.clone().translate(0,-i)),l=new jy(n.clone().translate(i,0),n.clone().translate(-i,0)),c=a.intersect(s,{segmentSubdivisions:o}),h=l.intersect(s,{segmentSubdivisions:o}),u=[];return c&&u.push(...c),h&&u.push(...h),u.length>0?n.closest(u):null!=r.fallbackAt?$x(t,r.fallbackAt):ef(Wx,this,t,e,n,r)}));var Xx,Yx=Object.freeze({__proto__:null,closest:Hx,length:function(t,e,n,r){const i=null!=r.length?r.length:20;return t.getPointAtLength(i)},orth:Jx,ratio:function(t,e,n,r){let i=null!=r.ratio?r.ratio:.5;return i>1&&(i/=100),t.getPointAtRatio(i)}});function Zx(t,e,n){let r;if("object"==typeof n){if(Number.isFinite(n.y)){const r=new jy(e,t),{start:i,end:s}=r.parallel(n.y);e=i,t=s}r=n.x}else r=n;if(null==r||!Number.isFinite(r))return t;const i=t.distance(e);return 0===r&&i>0?t:t.move(e,-Math.min(r,i-1))}function Kx(t){const e=t.getAttribute("stroke-width");return null===e?0:parseFloat(e)||0}!function(t){t.presets=Yx,t.registry=tv.create({type:"edge endpoint"}),t.registry.register(t.presets,!0)}(Xx||(Xx={}));const Qx=function(t,e,n,r){const i=e.getBBoxOfElement(n);r.stroked&&i.inflate(Kx(n)/2);const s=t.intersect(i);return Zx(s&&s.length?t.start.closest(s):t.end,t.start,r.offset)};var tw,ew=Object.freeze({__proto__:null,anchor:function(t,e,n,r){const{alignOffset:i,align:s}=r;return s&&function(t,e,n=0){const{start:r,end:i}=t;let s,o,a,l;switch(e){case"left":l="x",s=i,o=r,a=-1;break;case"right":l="x",s=r,o=i,a=1;break;case"top":l="y",s=i,o=r,a=-1;break;case"bottom":l="y",s=r,o=i,a=1;break;default:return}r[l]ky.create(t)));a.unshift(s),a.push(o);let l=null;const c=[];for(let t=0,n=a.length-1;te.y?"N":"S":t.y===e.y?t.x>e.x?"W":"E":null}function a(t,e,r){const i=new ky(t.x,e.y),s=new ky(e.x,t.y),a=o(t,i),l=o(t,s),c=r?n[r]:null,h=a===r||a!==c&&(l===c||l!==r)?i:s;return{points:[h],direction:o(h,e)}}function l(t,e,n){const r=i(t,e,n);return{points:[r],direction:o(r,e)}}e.getBBoxSize=s,e.getBearing=o,e.vertexToVertex=a,e.nodeToVertex=l,e.vertexToNode=function(t,e,n,r){const a=[new ky(t.x,e.y),new ky(e.x,t.y)],l=a.filter((t=>!n.containsPoint(t))),c=l.filter((e=>o(e,t)!==r));let h;if(c.length>0)return h=c.filter((e=>o(t,e)===r)).pop(),h=h||c[0],{points:[h],direction:o(h,e)};{h=sl(a,l)[0];const c=ky.create(e).move(h,-s(n,r)/2);return{points:[i(c,t,n),c],direction:o(c,e)}}},e.nodeToNode=function(t,e,n,r){let i=l(e,t,r);const c=i.points[0];if(n.containsPoint(c)){i=l(t,e,n);const h=i.points[0];if(r.containsPoint(h)){const u=ky.create(t).move(h,-s(n,o(t,h))/2),g=ky.create(e).move(c,-s(r,o(e,c))/2),d=new jy(u,g).getCenter(),f=l(t,d,n),p=a(d,e,f.direction);i.points=[f.points[0],p.points[0]],i.direction=p.direction}}return i},e.insideNode=function(e,n,s,a,l){const c=s.union(a).inflate(1),h=c.getCenter(),u=h.distance(n)>h.distance(e),g=u?n:e,d=u?e:n;let f,p,m,y;return l?(f=ky.fromPolar(c.width+c.height,r[l],g),f=c.getNearestPointToPoint(f).move(f,-1)):f=c.getNearestPointToPoint(g).move(g,1),p=i(f,d,c),f.round().equals(p.round())?(p=ky.fromPolar(c.width+c.height,t.Angle.toRad(f.theta(g))+Math.PI/2,d),p=c.getNearestPointToPoint(p).move(d,1).round(),m=i(f,p,c),y=u?[p,m,f]:[f,m,p]):y=u?[p,f]:[f,p],{points:y,direction:o(u?f:p,n)}}}(aw||(aw={}));const lw={step:10,maxLoopCount:2e3,precision:1,maxDirectionChange:90,perpendicular:!0,excludeTerminals:[],excludeNodes:[],excludeShapes:[],startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost(){return cw(this.step,this)},directions(){const t=cw(this.step,this),e=cw(this.cost,this);return[{cost:e,offsetX:t,offsetY:0},{cost:e,offsetX:-t,offsetY:0},{cost:e,offsetX:0,offsetY:t},{cost:e,offsetX:0,offsetY:-t}]},penalties(){const t=cw(this.step,this);return{0:0,45:t/2,90:t/2}},paddingBox(){const t=cw(this.step,this);return{x:-t,y:-t,width:2*t,height:2*t}},fallbackRouter:ow,draggingRouter:null,snapToGrid:!0};function cw(t,e){return"function"==typeof t?t.call(e):t}class hw{constructor(){this.items=[],this.hash={},this.values={}}add(t,e){this.hash[t]?this.items.splice(this.items.indexOf(t),1):this.hash[t]=1,this.values[t]=e;const n=vg(this.items,t,(t=>this.values[t]));this.items.splice(n,0,t)}pop(){const t=this.items.shift();return t&&(this.hash[t]=2),t}isOpen(t){return 1===this.hash[t]}isClose(t){return 2===this.hash[t]}isEmpty(){return 0===this.items.length}}class uw{constructor(t){this.options=t,this.mapGridSize=100,this.map={}}build(t,e){const n=this.options,r=n.excludeTerminals.reduce(((n,r)=>{const i=e[r];if(i){const e=t.getCell(i.cell);e&&n.push(e)}return n}),[]);let i=[];const s=t.getCell(e.getSourceCellId());s&&(i=ld(i,s.getAncestors().map((t=>t.id))));const o=t.getCell(e.getTargetCellId());o&&(i=ld(i,o.getAncestors().map((t=>t.id))));const a=this.mapGridSize;return t.getNodes().reduce(((t,e)=>{const s=r.some((t=>t.id===e.id)),o=!!e.shape&&n.excludeShapes.includes(e.shape),l=n.excludeNodes.some((t=>"string"==typeof t?e.id===t:t===e)),c=i.includes(e.id),h=o||s||l||c;if(e.isVisible()&&!h){const r=e.getBBox().moveAndExpand(n.paddingBox),i=r.getOrigin().snapToGrid(a),s=r.getCorner().snapToGrid(a);for(let e=i.x;e<=s.x;e+=a)for(let n=i.y;n<=s.y;n+=a){const i=new ky(e,n).toString();null==t[i]&&(t[i]=[]),t[i].push(r)}}return t}),this.map),this}isAccessible(t){const e=t.clone().snapToGrid(this.mapGridSize).toString(),n=this.map[e];return!n||n.every((e=>!e.containsPoint(t)))}}function gw(t,e){const n=t.sourceBBox.clone();return e&&e.paddingBox?n.moveAndExpand(e.paddingBox):n}function dw(t,e){const n=t.targetBBox.clone();return e&&e.paddingBox?n.moveAndExpand(e.paddingBox):n}function fw(t,e){if(t.sourceAnchor)return t.sourceAnchor;return gw(t,e).getCenter()}function pw(e,n,r,i,s){const o=360/r,a=e.theta(function(t,e,n,r){const i=r.step,s=e.x-t.x,o=e.y-t.y,a=s/n.x,l=o/n.y,c=a*i,h=l*i;return new ky(t.x+c,t.y+h)}(e,n,i,s)),l=t.Angle.normalize(a+o/2);return o*Math.floor(l/o)}function mw(t,e){const n=Math.abs(t-e);return n>180?360-n:n}function yw(t,e){if(!t)return e;const n=Math.abs(t),r=Math.round(n/e);if(!r)return n;return e+(n-r*e)/r}function vw(t,e){return t.round(e)}function bw(e,n,r){return vw(function(e,n){const r=n.source,i=t.GeometryUtil.snapToGrid(e.x-r.x,n.x)+r.x,s=t.GeometryUtil.snapToGrid(e.y-r.y,n.y)+r.y;return new ky(i,s)}(e.clone(),n),r)}function xw(t){return t.toString()}function ww(t){return new ky(0===t.x?0:Math.abs(t.x)/t.x,0===t.y?0:Math.abs(t.y)/t.y)}function Aw(t,e){let n=1/0;for(let r=0,i=e.length;r{if(n.includes(l)){const n=o[l],c=new ky(t.x+n.x*(Math.abs(a.x)+e.width),t.y+n.y*(Math.abs(a.y)+e.height)),h=new jy(t,c).intersect(e)||[];let u,g=null;for(let e=0;eu)&&(u=r,g=n)}if(g){let t=bw(g,r,s);e.containsPoint(t)&&(t=bw(t.translate(n.x*r.x,n.y*r.y),r,s)),i.push(t)}}return i}),[]);return e.containsPoint(t)||l.push(bw(t,r,s)),l}function Pw(t,e,n,r,i){const s=[];let o,a=ww(i.diff(n)),l=xw(n),c=t[l];for(;c;){o=e[l];const n=ww(o.diff(c));n.equals(a)||(s.unshift(o),a=n),l=xw(c),c=t[l]}const h=e[l];return ww(h.diff(r)).equals(a)||s.unshift(h),s}function Mw(t,e,n,r,i){const s=i.precision;let o,a;o=Ny.isRectangle(e)?vw(fw(t,i).clone(),s):vw(e.clone(),s),a=Ny.isRectangle(n)?vw(function(t,e){return t.targetAnchor?t.targetAnchor:dw(t,e).getCenter()}(t,i).clone(),s):vw(n.clone(),s);const l=function(t,e,n){return{source:e.clone(),x:yw(n.x-e.x,t),y:yw(n.y-e.y,t)}}(i.step,o,a),c=o,h=a;let u,g;if(u=Ny.isRectangle(e)?Cw(c,e,i.startDirections,l,i):[c],g=Ny.isRectangle(n)?Cw(a,n,i.endDirections,l,i):[h],u=u.filter((t=>r.isAccessible(t))),g=g.filter((t=>r.isAccessible(t))),u.length>0&&g.length>0){const t=new hw,e={},n={},o={};for(let n=0,r=u.length;n{e.gridOffsetX=e.offsetX/n*t.x,e.gridOffsetY=e.offsetY/n*t.y})),e.directions}(l,i),y=m.length,v=g.reduce(((t,e)=>{const n=xw(e);return t.push(n),t}),[]),b=ky.equalPoints(u,g);let x=i.maxLoopCount;for(;!t.isEmpty()&&x>0;){const u=t.pop(),w=e[u],A=n[u],C=o[u],P=w.equals(c),M=null==A;let E;E=M?d?P?null:pw(c,w,y,l,i):a:pw(A,w,y,l,i);if(!(M&&b)&&v.indexOf(u)>=0)return i.previousDirectionAngle=E,Pw(n,e,w,c,h);for(let a=0;ai.maxDirectionChange)continue;const u=bw(w.clone().translate(f.gridOffsetX||0,f.gridOffsetY||0),l,s),b=xw(u);if(t.isClose(b)||!r.isAccessible(u))continue;if(v.indexOf(b)>=0){if(!u.equals(h)){if(mw(c,pw(u,h,y,l,i))>i.maxDirectionChange)continue}}const x=C+f.cost+(P?0:i.penalties[p]);(!t.isOpen(b)||x(t[n]="fallbackRouter"===n||"draggingRouter"===n||"fallbackRoute"===n?e[n]:cw(e[n],e),t)),{});if(n.padding){const t=Rf(n.padding);n.paddingBox={x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}return n.directions.forEach((e=>{const n=new ky(0,0),r=new ky(e.offsetX,e.offsetY);e.angle=t.Angle.normalize(n.theta(r))})),n}(n),s=gw(r,i),o=dw(r,i),a=fw(r,i),l=new uw(i).build(r.graph.model,r.cell),c=e.map((t=>ky.create(t))),h=[];let u,g,d=a;for(let t=0,n=c.length;t<=n;t+=1){let n=null;if(u=g||s,g=c[t],null==g){g=o;const t=r.cell;if((null==t.getSourceCellId()||null==t.getTargetCellId())&&"function"==typeof i.draggingRouter){const t=u===s?a:u,e=g.getOrigin();n=ef(i.draggingRouter,r,t,e,i)}}if(null==n&&(n=Mw(r,u,g,l,i)),null===n)return console.warn("Unable to execute manhattan algorithm, use orth instead"),ef(i.fallbackRouter,this,e,i,r);const f=n[0];f&&f.equals(d)&&n.shift(),d=n[n.length-1]||d,h.push(...n)}return i.snapToGrid?function(t,e=10){if(t.length<=1)return t;for(let n=0,r=t.length;n90){const t=o;o=a,a=t}const l=i%90<45?o:a,c=new jy(e,l),h=90*Math.ceil(i/90),u=ky.fromPolar(c.squaredLength(),t.Angle.toRad(h+135),l),g=new jy(n,u),d=c.intersectsWithLine(g),f=d||n,p=d?f:e,m=360/r.directions.length,y=p.theta(n),v=t.Angle.normalize(y+m/2),b=m*Math.floor(v/m);return r.previousDirectionAngle=b,f&&s.push(f.round()),s.push(n),s}};function Tw(t,e){if(null!=e&&!1!==e){const n="boolean"==typeof e?0:e;if(n>0){const e=ky.create(t[1]).move(t[2],n),r=ky.create(t[1]).move(t[0],n);return[e.toJSON(),...t,r.toJSON()]}{const e=t[1];return[Object.assign({},e),...t,Object.assign({},e)]}}return t}var kw,Nw=Object.freeze({__proto__:null,er:function(t,e,n){const r=e.offset||32,i=null==e.min?16:e.min;let s=0,o=e.direction;const a=n.sourceBBox,l=n.targetBBox,c=a.getCenter(),h=l.getCenter();if("number"==typeof r&&(s=r),null==o){let t=l.left-a.right,e=l.top-a.bottom;t>=0&&e>=0?o=t>=e?"L":"T":t<=0&&e>=0?(t=a.left-l.right,o=t>=0&&t>=e?"R":"T"):t>=0&&e<=0?(e=a.top-l.bottom,o=e>=0?t>=e?"L":"B":"L"):(t=a.left-l.right,e=a.top-l.bottom,o=t>=0&&e>=0?t>=e?"R":"B":t<=0&&e>=0?"B":t>=0&&e<=0||Math.abs(t)>Math.abs(e)?"R":"B")}let u,g,d;"H"===o?o=h.x-c.x>=0?"L":"R":"V"===o&&(o=h.y-c.y>=0?"T":"B"),"center"===r&&("L"===o?s=(l.left-a.right)/2:"R"===o?s=(a.left-l.right)/2:"T"===o?s=(l.top-a.bottom)/2:"B"===o&&(s=(a.top-l.bottom)/2));const f="L"===o||"R"===o;if(f){if(h.y===c.y)return[...t];d="L"===o?1:-1,u="x",g="width"}else{if(h.x===c.x)return[...t];d="T"===o?1:-1,u="y",g="height"}const p=c.clone(),m=h.clone();if(p[u]+=d*(a[g]/2+s),m[u]-=d*(l[g]/2+s),f){const t=p.x,e=m.x,n=a.width/2+i,r=l.width/2+i;h.x>c.x?e<=t&&(p.x=Math.max(e,c.x+n),m.x=Math.min(t,h.x-r)):e>=t&&(p.x=Math.min(e,c.x-n),m.x=Math.max(t,h.x+r))}else{const t=p.y,e=m.y,n=a.height/2+i,r=l.height/2+i;h.y>c.y?e<=t&&(p.y=Math.max(e,c.y+n),m.y=Math.min(t,h.y-r)):e>=t&&(p.y=Math.min(e,c.y-n),m.y=Math.max(t,h.y+r))}return[p.toJSON(),...t,m.toJSON()]},loop:function(e,n,r){const i=n.width||50,s=(n.height||80)/2,o=n.angle||"auto",a=r.sourceAnchor,l=r.targetAnchor,c=r.sourceBBox,h=r.targetBBox;if(a.equals(l)){const e=e=>{const n=t.Angle.toRad(e),r=Math.sin(n),o=Math.cos(n),l=new ky(a.x+o*i,a.y+r*i),c=new ky(l.x-o*s,l.y-r*s),h=c.clone().rotate(-90,l),u=c.clone().rotate(90,l);return[h.toJSON(),l.toJSON(),u.toJSON()]},r=t=>{const e=a.clone().move(t,-1),n=new jy(e,t);return!c.containsPoint(t)&&!c.intersectsWithLine(n)},l=[0,90,180,270,45,135,225,315];if("number"==typeof o)return Tw(e(o),n.merge);const h=c.getCenter();if(h.equals(a))return Tw(e(0),n.merge);const u=h.angleBetween(a,h.clone().translate(1,0));let g=e(u);if(r(g[1]))return Tw(g,n.merge);for(let t=1,i=l.length;t0?l[c]=a[c]:a[c]=l[c],[a.toJSON(),...t,l.toJSON()]},orth:ow});!function(t){t.presets=Nw,t.registry=tv.create({type:"router"}),t.registry.register(t.presets,!0)}(kw||(kw={}));const jw=1,_w=1/3,Lw=2/3;function Bw(t,e,n=[]){const r=[t,...n,e],i=[];return r.forEach(((t,e)=>{const n=r[e+1];null!=n&&i.push(new jy(t,n))})),i}function Iw(t,e){return new jy(t,e).squaredLength()}function Dw(t,e,n,r){const i=new Qy;let s;return s=Qy.createSegment("M",t[0].start),i.appendSegment(s),t.forEach(((o,a)=>{if(Rw.includes(o)){let t,r,a,l;if("arc"===n){t=-90,r=o.start.diff(o.end);(r.x<0||0===r.x&&r.y<0)&&(t+=180);const e=o.getCenter(),n=new jy(e,o.end).rotate(t,e);let c;c=new jy(o.start,e),a=c.pointAt(2/3).rotate(t,o.start),l=n.pointAt(1/3).rotate(-t,n.end),s=Qy.createSegment("C",a,l,n.end),i.appendSegment(s),c=new jy(e,o.end),a=n.pointAt(1/3).rotate(t,n.end),l=c.pointAt(1/3).rotate(-t,o.end),s=Qy.createSegment("C",a,l,o.end),i.appendSegment(s)}else if("gap"===n)s=Qy.createSegment("M",o.end),i.appendSegment(s);else if("cubic"===n){t=o.start.theta(o.end);const n=.6*e;let c=1.35*e;r=o.start.diff(o.end);(r.x<0||0===r.x&&r.y<0)&&(c*=-1),a=new ky(o.start.x+n,o.start.y+c).rotate(t,o.start),l=new ky(o.end.x-n,o.end.y+c).rotate(t,o.end),s=Qy.createSegment("C",a,l,o.end),i.appendSegment(s)}}else{const e=t[a+1];0===r||!e||Rw.includes(e)?(s=Qy.createSegment("L",o.end),i.appendSegment(s)):function(t,e,n,r,i){const s=n.distance(r)/2,o=n.distance(i)/2,a=-Math.min(t,s),l=-Math.min(t,o),c=n.clone().move(r,a).round(),h=n.clone().move(i,l).round(),u=new ky(_w*c.x+Lw*n.x,Lw*n.y+_w*c.y),g=new ky(_w*h.x+Lw*n.x,Lw*n.y+_w*h.y);let d;d=Qy.createSegment("L",c),e.appendSegment(d),d=Qy.createSegment("C",u,g,h),e.appendSegment(d)}(r,i,o.end,o.start,e.end)}})),i}let Rw,Vw;var zw,$w=Object.freeze({__proto__:null,jumpover:function(t,e,n,r={}){Rw=[],Vw=[],function(t){let e=t.graph._jumpOverUpdateList;if(null==e&&(e=t.graph._jumpOverUpdateList=[],t.graph.on("cell:mouseup",(()=>{const e=t.graph._jumpOverUpdateList;setTimeout((()=>{for(let t=0;t{e=t.graph._jumpOverUpdateList=[]}))),e.indexOf(t)<0){e.push(t);const n=()=>e.splice(e.indexOf(t),1);t.cell.once("change:connector",n),t.cell.once("removed",n)}}(this);const i=r.size||5,s=r.type||"arc",o=r.radius||0,a=r.ignoreConnectors||["smooth"],l=this.graph,c=l.model.getEdges();if(1===c.length)return Dw(Bw(t,e,n),i,s,o);const h=this.cell,u=c.indexOf(h),g=l.options.connecting.connector||{},d=c.filter(((t,e)=>{const n=t.getConnector()||g;return!a.includes(n.name)&&(!(e>u)||"jumpover"!==n.name)})),f=d.map((t=>l.findViewByCell(t))),p=Bw(t,e,n),m=f.map((t=>null==t?[]:t===this?p:Bw(t.sourcePoint,t.targetPoint,t.routePoints))),y=[];p.forEach((t=>{const e=d.reduce(((e,n,r)=>{if(n!==h){const n=function(t,e){const n=[];return e.forEach((e=>{const r=t.intersectsWithLine(e);r&&n.push(r)})),n}(t,m[r]);e.push(...n)}return e}),[]).sort(((e,n)=>Iw(t.start,e)-Iw(t.start,n)));e.length>0?y.push(...function(t,e,n){return e.reduce(((r,i,s)=>{if(Vw.includes(i))return r;const o=r.pop()||t,a=ky.create(i).move(o.start,-n);let l=ky.create(i).move(o.start,+n);const c=e[s+1];if(null!=c){const t=l.distance(c);t<=n&&(l=c.move(o.start,t),Vw.push(c))}else if(a.distance(o.end)<2*n+jw)return r.push(o),r;if(l.distance(o.start)<2*n+jw)return r.push(o),r;const h=new jy(a,l);return Rw.push(h),r.push(new jy(o.start,a),h,new jy(l,o.end)),r}),[])}(t,e,i)):y.push(t)}));const v=Dw(y,i,s,o);return Rw=[],Vw=[],r.raw?v:v.serialize()},loop:function(t,e,n,r={}){const i=3===n.length?0:1,s=ky.create(n[0+i]),o=ky.create(n[2+i]),a=ky.create(n[1+i]);if(!ky.equals(t,e)){const n=new ky((t.x+e.x)/2,(t.y+e.y)/2),r=n.angleBetween(ky.create(t).rotate(90,n),a);r>1&&(s.rotate(180-r,n),o.rotate(180-r,n),a.rotate(180-r,n))}const l=`\n M ${t.x} ${t.y}\n Q ${s.x} ${s.y} ${a.x} ${a.y}\n Q ${o.x} ${o.y} ${e.x} ${e.y}\n `;return r.raw?Qy.parse(l):l},normal:function(t,e,n,r={}){const i=[t,...n,e],s=new zy(i),o=new Qy(s);return r.raw?o:o.serialize()},rounded:function(t,e,n,r={}){const i=new Qy;i.appendSegment(Qy.createSegment("M",t));const s=1/3,o=2/3,a=r.radius||10;let l,c;for(let r=0,h=n.length;r=Math.abs(t.y-e.y)?"H":"V"),"H"===s){const n=(t.x+e.x)/2;i.appendSegment(Qy.createSegment("C",n,t.y,n,e.y,e.x,e.y))}else{const n=(t.y+e.y)/2;i.appendSegment(Qy.createSegment("C",t.x,n,e.x,n,e.x,e.y))}return r.raw?i:i.serialize()}});!function(t){t.presets=$w,t.registry=tv.create({type:"connector"}),t.registry.register(t.presets,!0)}(zw||(zw={}));var Fw,Gw=Object.freeze({__proto__:null,get Attr(){return kb},get Background(){return hv},get ConnectionPoint(){return tw},get Connector(){return zw},get EdgeAnchor(){return Xx},get EdgeTool(){return Tx},get Filter(){return fv},get Grid(){return ov},get Highlighter(){return zb},get Marker(){return fb},get NodeAnchor(){return Ux},get NodeTool(){return Ox},get PortLabelLayout(){return tx},get PortLayout(){return Wb},get Registry(){return tv},get Router(){return kw}});class Uw extends wf{constructor(t={}){super(),this.pending=!1,this.changing=!1,this.data={},this.mutate(xo(t)),this.changed={}}mutate(t,e={}){const n=!0===e.unset,r=!0===e.silent,i=[],s=this.changing;this.changing=!0,s||(this.previous=xo(this.data),this.changed={});const o=this.data,a=this.previous,l=this.changed;if(Object.keys(t).forEach((e=>{const r=e,s=t[r];Yc(o[r],s)||i.push(r),Yc(a[r],s)?delete l[r]:l[r]=s,n?delete o[r]:o[r]=s})),!r&&i.length>0&&(this.pending=!0,this.pendingOptions=e,i.forEach((t=>{this.emit("change:*",{key:t,options:e,store:this,current:o[t],previous:a[t]})}))),s)return this;if(!r)for(;this.pending;)this.pending=!1,this.emit("changed",{current:o,previous:a,store:this,options:this.pendingOptions});return this.pending=!1,this.changing=!1,this.pendingOptions=null,this}get(t,e){if(null==t)return this.data;const n=this.data[t];return null==n?e:n}getPrevious(t){if(this.previous){const e=this.previous[t];return null==e?void 0:e}}set(t,e,n){return null!=t&&("object"==typeof t?this.mutate(t,e):this.mutate({[t]:e},n)),this}remove(t,e){const n=void 0,r={};let i;if("string"==typeof t)r[t]=n,i=e;else if(Array.isArray(t))t.forEach((t=>r[t]=n)),i=e;else{for(const t in this.data)r[t]=n;i=t}return this.mutate(r,Object.assign(Object.assign({},i),{unset:!0})),this}getByPath(t){return mf(this.data,t,"/")}setByPath(t,e,n={}){const r="/",i=Array.isArray(t)?[...t]:t.split(r),s=Array.isArray(t)?t.join(r):t,o=i[0],a=i.length;if(n.propertyPath=s,n.propertyValue=e,n.propertyPathArray=i,1===a)this.set(o,e,n);else{const s={};let l=s,c=o;for(let t=1;t0:t in this.changed}getChanges(t){if(null==t)return this.hasChanged()?xo(this.changed):null;const e=this.changing?this.previous:this.data,n={};let r;for(const i in t){const s=t[i];Yc(e[i],s)||(n[i]=s,r=!0)}return r?xo(n):null}toJSON(){return xo(this.data)}clone(){return new(0,this.constructor)(this.data)}dispose(){this.off(),this.data={},this.previous={},this.changed={},this.pending=!1,this.changing=!1,this.pendingOptions=null,this.trigger("disposed",{store:this})}}n([wf.dispose()],Uw.prototype,"dispose",null);class qw{constructor(t){this.cell=t,this.ids={},this.cache={}}get(){return Object.keys(this.ids)}start(t,e,n={},r="/"){const i=this.cell.getPropByPath(t),s=Ga(n,qw.defaultOptions),o=this.getTiming(s.timing),a=this.getInterp(s.interp,i,e);let l=0;const c=Array.isArray(t)?t.join(r):t,h=Array.isArray(t)?t:t.split(r),u=()=>{const t=(new Date).getTime();0===l&&(l=t);let e=(t-l)/s.duration;e<1?this.ids[c]=requestAnimationFrame(u):e=1;const r=a(o(e));this.cell.setPropByPath(h,r),n.progress&&n.progress(Object.assign({progress:e,currentValue:r},this.getArgs(c))),1===e&&(this.cell.notify("transition:complete",this.getArgs(c)),n.complete&&n.complete(this.getArgs(c)),this.cell.notify("transition:finish",this.getArgs(c)),n.finish&&n.finish(this.getArgs(c)),this.clean(c))};return setTimeout((()=>{this.stop(t,void 0,r),this.cache[c]={startValue:i,targetValue:e,options:s},this.ids[c]=requestAnimationFrame(u),this.cell.notify("transition:start",this.getArgs(c)),n.start&&n.start(this.getArgs(c))}),n.delay),this.stop.bind(this,t,r,n)}stop(t,e={},n="/"){const r=Array.isArray(t)?t:t.split(n);return Object.keys(this.ids).filter((t=>Yc(r,t.split(n).slice(0,r.length)))).forEach((t=>{cancelAnimationFrame(this.ids[t]);const n=this.cache[t],r=this.getArgs(t),i=Object.assign(Object.assign({},n.options),e),s=i.jumpedToEnd;s&&null!=n.targetValue&&(this.cell.setPropByPath(t,n.targetValue),this.cell.notify("transition:end",Object.assign({},r)),this.cell.notify("transition:complete",Object.assign({},r)),i.complete&&i.complete(Object.assign({},r)));const o=Object.assign({jumpedToEnd:s},r);this.cell.notify("transition:stop",Object.assign({},o)),i.stop&&i.stop(Object.assign({},o)),this.cell.notify("transition:finish",Object.assign({},r)),i.finish&&i.finish(Object.assign({},r)),this.clean(t)})),this}clean(t){delete this.ids[t],delete this.cache[t]}getTiming(e){return"string"==typeof e?t.Timing[e]:e}getInterp(e,n,r){return e?e(n,r):"number"==typeof r?t.Interp.number(n,r):"string"==typeof r?"#"===r[0]?t.Interp.color(n,r):t.Interp.unit(n,r):t.Interp.object(n,r)}getArgs(t){const e=this.cache[t];return{path:t,startValue:e.startValue,targetValue:e.targetValue,cell:this.cell}}}!function(t){t.defaultOptions={delay:10,duration:100,timing:"linear"}}(qw||(qw={}));class Ww extends wf{static config(t){const{markup:n,propHooks:r,attrHooks:i}=t,s=e(t,["markup","propHooks","attrHooks"]);null!=n&&(this.markup=n),r&&(this.propHooks=this.propHooks.slice(),Array.isArray(r)?this.propHooks.push(...r):"function"==typeof r?this.propHooks.push(r):Object.values(r).forEach((t=>{"function"==typeof t&&this.propHooks.push(t)}))),i&&(this.attrHooks=Object.assign(Object.assign({},this.attrHooks),i)),this.defaults=Sh({},this.defaults,s)}static getMarkup(){return this.markup}static getDefaults(t){return t?this.defaults:xo(this.defaults)}static getAttrHooks(){return this.attrHooks}static applyPropHooks(t,e){return this.propHooks.reduce(((e,n)=>n?ef(n,t,e):e),e)}get[Symbol.toStringTag](){return Ww.toStringTag}constructor(t={}){super();const e=this.constructor.getDefaults(!0),n=Sh({},this.preprocess(e),this.preprocess(t));this.id=n.id||jf(),this.store=new Uw(n),this.animation=new qw(this),this.setup(),this.init(),this.postprocess(t)}init(){}get model(){return this._model}set model(t){this._model!==t&&(this._model=t)}preprocess(t,e){const n=t.id,r=this.constructor.applyPropHooks(this,t);return null==n&&!0!==e&&(r.id=jf()),r}postprocess(t){}setup(){this.store.on("change:*",(t=>{const{key:e,current:n,previous:r,options:i}=t;this.notify("change:*",{key:e,options:i,current:n,previous:r,cell:this}),this.notify(`change:${e}`,{options:i,current:n,previous:r,cell:this});const s=e;"source"!==s&&"target"!==s||this.notify("change:terminal",{type:s,current:n,previous:r,options:i,cell:this})})),this.store.on("changed",(({options:t})=>this.notify("changed",{options:t,cell:this})))}notify(t,e){this.trigger(t,e);const n=this.model;return n&&(n.notify(`cell:${t}`,e),this.isNode()?n.notify(`node:${t}`,Object.assign(Object.assign({},e),{node:this})):this.isEdge()&&n.notify(`edge:${t}`,Object.assign(Object.assign({},e),{edge:this}))),this}isNode(){return!1}isEdge(){return!1}isSameStore(t){return this.store===t.store}get view(){return this.store.get("view")}get shape(){return this.store.get("shape","")}getProp(t,e){return null==t?this.store.get():this.store.get(t,e)}setProp(t,e,n){if("string"==typeof t)this.store.set(t,e,n);else{const n=this.preprocess(t,!0);this.store.set(Sh({},this.getProp(),n),e),this.postprocess(t)}return this}removeProp(t,e){return"string"==typeof t||Array.isArray(t)?this.store.removeByPath(t,e):this.store.remove(e),this}hasChanged(t){return null==t?this.store.hasChanged():this.store.hasChanged(t)}getPropByPath(t){return this.store.getByPath(t)}setPropByPath(t,e,n={}){return this.model&&("children"===t?this._children=e?e.map((t=>this.model.getCell(t))).filter((t=>null!=t)):null:"parent"===t&&(this._parent=e?this.model.getCell(e):null)),this.store.setByPath(t,e,n),this}removePropByPath(t,e={}){const n=Array.isArray(t)?t:t.split("/");return"attrs"===n[0]&&(e.dirty=!0),this.store.removeByPath(n,e),this}prop(t,e,n){return null==t?this.getProp():"string"==typeof t||Array.isArray(t)?1===arguments.length?this.getPropByPath(t):null==e?this.removePropByPath(t,n||{}):this.setPropByPath(t,e,n||{}):this.setProp(t,e||{})}previous(t){return this.store.getPrevious(t)}get zIndex(){return this.getZIndex()}set zIndex(t){null==t?this.removeZIndex():this.setZIndex(t)}getZIndex(){return this.store.get("zIndex")}setZIndex(t,e={}){return this.store.set("zIndex",t,e),this}removeZIndex(t={}){return this.store.remove("zIndex",t),this}toFront(t={}){const e=this.model;if(e){let n,r=e.getMaxZIndex();t.deep?(n=this.getDescendants({deep:!0,breadthFirst:!0}),n.unshift(this)):n=[this],r=r-n.length+1;const i=e.total();let s=e.indexOf(this)!==i-n.length;s||(s=n.some(((t,e)=>t.getZIndex()!==r+e))),s&&this.batchUpdate("to-front",(()=>{r+=n.length,n.forEach(((e,n)=>{e.setZIndex(r+n,t)}))}))}return this}toBack(t={}){const e=this.model;if(e){let n,r=e.getMinZIndex();t.deep?(n=this.getDescendants({deep:!0,breadthFirst:!0}),n.unshift(this)):n=[this];let i=0!==e.indexOf(this);i||(i=n.some(((t,e)=>t.getZIndex()!==r+e))),i&&this.batchUpdate("to-back",(()=>{r-=n.length,n.forEach(((e,n)=>{e.setZIndex(r+n,t)}))}))}return this}get markup(){return this.getMarkup()}set markup(t){null==t?this.removeMarkup():this.setMarkup(t)}getMarkup(){let t=this.store.get("markup");if(null==t){t=this.constructor.getMarkup()}return t}setMarkup(t,e={}){return this.store.set("markup",t,e),this}removeMarkup(t={}){return this.store.remove("markup",t),this}get attrs(){return this.getAttrs()}set attrs(t){null==t?this.removeAttrs():this.setAttrs(t)}getAttrs(){const t=this.store.get("attrs");return t?Object.assign({},t):{}}setAttrs(t,e={}){if(null==t)this.removeAttrs(e);else{const n=t=>this.store.set("attrs",t,e);if(!0===e.overwrite)n(t);else{const r=this.getAttrs();!1===e.deep?n(Object.assign(Object.assign({},r),t)):n(Sh({},r,t))}}return this}replaceAttrs(t,e={}){return this.setAttrs(t,Object.assign(Object.assign({},e),{overwrite:!0}))}updateAttrs(t,e={}){return this.setAttrs(t,Object.assign(Object.assign({},e),{deep:!1}))}removeAttrs(t={}){return this.store.remove("attrs",t),this}getAttrDefinition(t){if(!t)return null;const e=this.constructor.getAttrHooks()||{};let n=e[t]||kb.registry.get(t);if(!n){const r=Ri(t);n=e[r]||kb.registry.get(r)}return n||null}getAttrByPath(t){return null==t||""===t?this.getAttrs():this.getPropByPath(this.prefixAttrPath(t))}setAttrByPath(t,e,n={}){return this.setPropByPath(this.prefixAttrPath(t),e,n),this}removeAttrByPath(t,e={}){return this.removePropByPath(this.prefixAttrPath(t),e),this}prefixAttrPath(t){return Array.isArray(t)?["attrs"].concat(t):`attrs/${t}`}attr(t,e,n){return null==t?this.getAttrByPath():"string"==typeof t||Array.isArray(t)?1===arguments.length?this.getAttrByPath(t):null==e?this.removeAttrByPath(t,n||{}):this.setAttrByPath(t,e,n||{}):this.setAttrs(t,e||{})}get visible(){return this.isVisible()}set visible(t){this.setVisible(t)}setVisible(t,e={}){return this.store.set("visible",t,e),this}isVisible(){return!1!==this.store.get("visible")}show(t={}){return this.isVisible()||this.setVisible(!0,t),this}hide(t={}){return this.isVisible()&&this.setVisible(!1,t),this}toggleVisible(t,e={}){const n="boolean"==typeof t?e:t;return("boolean"==typeof t?t:!this.isVisible())?this.show(n):this.hide(n),this}get data(){return this.getData()}set data(t){this.setData(t)}getData(){return this.store.get("data")}setData(t,e={}){if(null==t)this.removeData(e);else{const n=t=>this.store.set("data",t,e);if(!0===e.overwrite)n(t);else{const r=this.getData();!1===e.deep?n("object"==typeof t?Object.assign(Object.assign({},r),t):t):n(Sh({},r,t))}}return this}replaceData(t,e={}){return this.setData(t,Object.assign(Object.assign({},e),{overwrite:!0}))}updateData(t,e={}){return this.setData(t,Object.assign(Object.assign({},e),{deep:!1}))}removeData(t={}){return this.store.remove("data",t),this}get parent(){return this.getParent()}get children(){return this.getChildren()}getParentId(){return this.store.get("parent")}getParent(){const t=this.getParentId();if(t&&this.model){const e=this.model.getCell(t);return this._parent=e,e}return null}getChildren(){const t=this.store.get("children");if(t&&t.length&&this.model){const e=t.map((t=>{var e;return null===(e=this.model)||void 0===e?void 0:e.getCell(t)})).filter((t=>null!=t));return this._children=e,[...e]}return null}hasParent(){return null!=this.parent}isParentOf(t){return null!=t&&t.getParent()===this}isChildOf(t){return null!=t&&this.getParent()===t}eachChild(t,e){return this.children&&this.children.forEach(t,e),this}filterChild(t,e){return this.children?this.children.filter(t,e):[]}getChildCount(){return null==this.children?0:this.children.length}getChildIndex(t){return null==this.children?-1:this.children.indexOf(t)}getChildAt(t){return null!=this.children&&t>=0?this.children[t]:null}getAncestors(t={}){const e=[];let n=this.getParent();for(;n;)e.push(n),n=!1!==t.deep?n.getParent():null;return e}getDescendants(t={}){if(!1!==t.deep){if(t.breadthFirst){const t=[],e=this.getChildren()||[];for(;e.length>0;){const n=e.shift(),r=n.getChildren();t.push(n),r&&e.push(...r)}return t}{const e=this.getChildren()||[];return e.forEach((n=>{e.push(...n.getDescendants(t))})),e}}return this.getChildren()||[]}isDescendantOf(t,e={}){if(null==t)return!1;if(!1!==e.deep){let e=this.getParent();for(;e;){if(e===t)return!0;e=e.getParent()}return!1}return this.isChildOf(t)}isAncestorOf(t,e={}){return null!=t&&t.isDescendantOf(this,e)}contains(t){return this.isAncestorOf(t)}getCommonAncestor(...t){return Ww.getCommonAncestor(this,...t)}setParent(t,e={}){return this._parent=t,t?this.store.set("parent",t.id,e):this.store.remove("parent",e),this}setChildren(t,e={}){return this._children=t,null!=t?this.store.set("children",t.map((t=>t.id)),e):this.store.remove("children",e),this}unembed(t,e={}){const n=this.children;if(null!=n&&null!=t){const r=this.getChildIndex(t);-1!==r&&(n.splice(r,1),t.setParent(null,e),this.setChildren(n,e))}return this}embed(t,e={}){return t.addTo(this,e),this}addTo(t,e={}){return Ww.isCell(t)?t.addChild(this,e):t.addCell(this,e),this}insertTo(t,e,n={}){return t.insertChild(this,e,n),this}addChild(t,e={}){return this.insertChild(t,void 0,e)}insertChild(t,e,n={}){if(null!=t&&t!==this){const r=t.getParent(),i=this!==r;let s=e;if(null==s&&(s=this.getChildCount(),i||(s-=1)),r){const e=r.getChildren();if(e){const i=e.indexOf(t);i>=0&&(t.setParent(null,n),e.splice(i,1),r.setChildren(e,n))}}let o=this.children;if(null==o?(o=[],o.push(t)):o.splice(s,0,t),t.setParent(this,n),this.setChildren(o,n),i&&this.model){const t=this.model.getIncomingEdges(this),e=this.model.getOutgoingEdges(this);t&&t.forEach((t=>t.updateParent(n))),e&&e.forEach((t=>t.updateParent(n)))}this.model&&this.model.addCell(t,n)}return this}removeFromParent(t={}){const e=this.getParent();if(null!=e){const n=e.getChildIndex(this);e.removeChildAt(n,t)}return this}removeChild(t,e={}){const n=this.getChildIndex(t);return this.removeChildAt(n,e)}removeChildAt(t,e={}){const n=this.getChildAt(t);return null!=this.children&&null!=n&&(this.unembed(n,e),n.remove(e)),n}remove(t={}){return this.batchUpdate("remove",(()=>{const e=this.getParent();e&&e.removeChild(this,t),!1!==t.deep&&this.eachChild((e=>e.remove(t))),this.model&&this.model.removeCell(this,t)})),this}transition(t,e,n={},r="/"){return this.animation.start(t,e,n,r)}stopTransition(t,e,n="/"){return this.animation.stop(t,e,n),this}getTransitions(){return this.animation.get()}translate(t,e,n){return this}scale(t,e,n,r){return this}addTools(t,e,n){const r=Array.isArray(t)?t:[t],i="string"==typeof e?e:null,s="object"==typeof e?e:"object"==typeof n?n:{};if(s.reset)return this.setTools({name:i,items:r,local:s.local},s);let o=xo(this.getTools());return null==o||null==i||o.name===i?(null==o&&(o={}),o.items||(o.items=[]),o.name=i,o.items=[...o.items,...r],this.setTools(Object.assign({},o),s)):void 0}setTools(t,e={}){return null==t?this.removeTools():this.store.set("tools",Ww.normalizeTools(t),e),this}getTools(){return this.store.get("tools")}removeTools(t={}){return this.store.remove("tools",t),this}hasTools(t){const e=this.getTools();return null!=e&&(null==t||e.name===t)}hasTool(t){const e=this.getTools();return null!=e&&e.items.some((e=>"string"==typeof e?e===t:e.name===t))}removeTool(t,e={}){const n=xo(this.getTools());if(n){let r=!1;const i=n.items.slice(),s=t=>{i.splice(t,1),r=!0};if("number"==typeof t)s(t);else for(let e=i.length-1;e>=0;e-=1){const n=i[e];("string"==typeof n?n===t:n.name===t)&&s(e)}r&&(n.items=i,this.setTools(n,e))}return this}getBBox(t){return new Ny}getConnectionPoint(t,e){return new ky}toJSON(t={}){const e=Object.assign({},this.store.get()),n=Object.prototype.toString,r=this.isNode()?"node":this.isEdge()?"edge":"cell";if(!e.shape){const t=this.constructor;throw new Error(`Unable to serialize ${r} missing "shape" prop, check the ${r} "${t.name||n.call(t)}"`)}const i=this.constructor,s=!0===t.diff,o=e.attrs||{},a=i.getDefaults(!0),l=s?this.preprocess(a,!0):a,c=l.attrs||{},h={};Object.entries(e).forEach((([t,i])=>{if(null!=i&&!Array.isArray(i)&&"object"==typeof i&&!Tr(i))throw new Error(`Can only serialize ${r} with plain-object props, but got a "${n.call(i)}" type of key "${t}" on ${r} "${this.id}"`);if("attrs"!==t&&"shape"!==t&&s){Yc(i,l[t])&&delete e[t]}})),Object.keys(o).forEach((t=>{const e=o[t],n=c[t];Object.keys(e).forEach((r=>{const i=e[r],s=n?n[r]:null;null==i||"object"!=typeof i||Array.isArray(i)?null!=n&&Yc(s,i)||(null==h[t]&&(h[t]={}),h[t][r]=i):Object.keys(i).forEach((e=>{const o=i[e];if(null==n||null==s||!B(s)||!Yc(s[e],o)){null==h[t]&&(h[t]={}),null==h[t][r]&&(h[t][r]={});h[t][r][e]=o}}))}))}));const u=Object.assign(Object.assign({},e),{attrs:Xc(h)?void 0:h});null==u.attrs&&delete u.attrs;const g=u;return 0===g.angle&&delete g.angle,xo(g)}clone(t={}){if(!t.deep){const e=Object.assign({},this.store.get());t.keepId||delete e.id,delete e.parent,delete e.children;return new(0,this.constructor)(e)}return Ww.deepClone(this)[this.id]}findView(t){return t.findViewByCell(this)}startBatch(t,e={},n=this.model){return this.notify("batch:start",{name:t,data:e,cell:this}),n&&n.startBatch(t,Object.assign(Object.assign({},e),{cell:this})),this}stopBatch(t,e={},n=this.model){return n&&n.stopBatch(t,Object.assign(Object.assign({},e),{cell:this})),this.notify("batch:stop",{name:t,data:e,cell:this}),this}batchUpdate(t,e,n){const r=this.model;this.startBatch(t,n,r);const i=e();return this.stopBatch(t,n,r),i}dispose(){this.removeFromParent(),this.store.dispose()}}Ww.defaults={},Ww.attrHooks={},Ww.propHooks=[],n([wf.dispose()],Ww.prototype,"dispose",null),function(t){t.normalizeTools=function(t){return"string"==typeof t?{items:[t]}:Array.isArray(t)?{items:t}:t.items?t:{items:[t]}}}(Ww||(Ww={})),function(t){t.toStringTag=`X6.${t.name}`,t.isCell=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],r=e;return(null==n||n===t.toStringTag)&&"function"==typeof r.isNode&&"function"==typeof r.isEdge&&"function"==typeof r.prop&&"function"==typeof r.attr}}(Ww||(Ww={})),function(t){t.getCommonAncestor=function(...t){const e=t.filter((t=>null!=t)).map((t=>t.getAncestors())).sort(((t,e)=>t.length-e.length));return e.shift().find((t=>e.every((e=>e.includes(t)))))||null},t.getCellsBBox=function(t,e={}){let n=null;for(let r=0,i=t.length;r(t[e.id]=e.clone(),t)),{});return e.forEach((t=>{const e=n[t.id];if(e.isEdge()){const t=e.getSourceCellId(),r=e.getTargetCellId();t&&n[t]&&e.setSource(Object.assign(Object.assign({},e.getSource()),{cell:n[t].id})),r&&n[r]&&e.setTarget(Object.assign(Object.assign({},e.getTarget()),{cell:n[r].id}))}const r=t.getParent();r&&n[r.id]&&e.setParent(n[r.id]);const i=t.getChildren();if(i&&i.length){const t=i.reduce(((t,e)=>(n[e.id]&&t.push(n[e.id]),t)),[]);t.length>0&&e.setChildren(t)}})),n}}(Ww||(Ww={})),function(t){t.config({propHooks(n){var{tools:r}=n,i=e(n,["tools"]);return r&&(i.tools=t.normalizeTools(r)),i}})}(Ww||(Ww={})),function(t){let e,n;t.exist=function(t,r){return r?null!=e&&e.exist(t):null!=n&&n.exist(t)},t.setEdgeRegistry=function(t){e=t},t.setNodeRegistry=function(t){n=t}}(Fw||(Fw={}));class Hw{constructor(t){this.ports=[],this.groups={},this.init(xo(t))}getPorts(){return this.ports}getGroup(t){return null!=t?this.groups[t]:null}getPortsByGroup(t){return this.ports.filter((e=>e.group===t||null==e.group&&null==t))}getPortsLayoutByGroup(t,e){const n=this.getPortsByGroup(t),r=t?this.getGroup(t):null,i=r?r.position:null,s=i?i.name:null;let o;if(null!=s){const t=Wb.registry.get(s);if(null==t)return Wb.registry.onNotFound(s);o=t}else o=Wb.presets.left;const a=n.map((t=>t&&t.position&&t.position.args||{})),l=i&&i.args||{};return o(a,e,l).map(((t,r)=>{const i=n[r];return{portLayout:t,portId:i.id,portSize:i.size,portAttrs:i.attrs,labelSize:i.label.size,labelLayout:this.getPortLabelLayout(i,ky.create(t.position),e)}}))}init(t){const{groups:e,items:n}=t;null!=e&&Object.keys(e).forEach((t=>{this.groups[t]=this.parseGroup(e[t])})),Array.isArray(n)&&n.forEach((t=>{this.ports.push(this.parsePort(t))}))}parseGroup(t){return Object.assign(Object.assign({},t),{label:this.getLabel(t,!0),position:this.getPortPosition(t.position,!0)})}parsePort(t){const e=Object.assign({},t),n=this.getGroup(t.group)||{};return e.markup=e.markup||n.markup,e.attrs=Sh({},n.attrs,e.attrs),e.position=this.createPosition(n,e),e.label=Sh({},n.label,this.getLabel(e)),e.zIndex=this.getZIndex(n,e),e.size=Object.assign(Object.assign({},n.size),e.size),e}getZIndex(t,e){return"number"==typeof e.zIndex?e.zIndex:"number"==typeof t.zIndex||"auto"===t.zIndex?t.zIndex:"auto"}createPosition(t,e){return Sh({name:"left",args:{}},t.position,{args:e.args})}getPortPosition(t,e=!1){if(null==t){if(e)return{name:"left",args:{}}}else{if("string"==typeof t)return{name:t,args:{}};if(Array.isArray(t))return{name:"absolute",args:{x:t[0],y:t[1]}};if("object"==typeof t)return t}return{args:{}}}getPortLabelPosition(t,e=!1){if(null==t){if(e)return{name:"left",args:{}}}else{if("string"==typeof t)return{name:t,args:{}};if("object"==typeof t)return t}return{args:{}}}getLabel(t,e=!1){const n=t.label||{};return n.position=this.getPortLabelPosition(n.position,e),n}getPortLabelLayout(t,e,n){const r=t.label.position.name||"left",i=t.label.position.args||{},s=tx.registry.get(r)||tx.presets.left;return s?s(e,n,i):null}}let Jw=class n extends Ww{get[Symbol.toStringTag](){return n.toStringTag}constructor(t={}){super(t),this.initPorts()}preprocess(t,n){const{x:r,y:i,width:s,height:o}=t,a=e(t,["x","y","width","height"]);if(null!=r||null!=i){const t=a.position;a.position=Object.assign(Object.assign({},t),{x:null!=r?r:t?t.x:0,y:null!=i?i:t?t.y:0})}if(null!=s||null!=o){const t=a.size;a.size=Object.assign(Object.assign({},t),{width:null!=s?s:t?t.width:0,height:null!=o?o:t?t.height:0})}return super.preprocess(a,n)}isNode(){return!0}size(t,e,n){return void 0===t?this.getSize():"number"==typeof t?this.setSize(t,e,n):this.setSize(t,e)}getSize(){const t=this.store.get("size");return t?Object.assign({},t):{width:1,height:1}}setSize(t,e,n){return"object"==typeof t?this.resize(t.width,t.height,e):this.resize(t,e,n),this}resize(e,n,r={}){this.startBatch("resize",r);const i=r.direction;if(i){const s=this.getSize();switch(i){case"left":case"right":n=s.height;break;case"top":case"bottom":e=s.width}let o={right:0,"top-right":0,top:1,"top-left":1,left:2,"bottom-left":2,bottom:3,"bottom-right":3}[i];const a=t.Angle.normalize(this.getAngle()||0);r.absolute&&(o+=Math.floor((a+45)/90),o%=4);const l=this.getBBox();let c;c=0===o?l.getBottomLeft():1===o?l.getCorner():2===o?l.getTopRight():l.getOrigin();const h=c.clone().rotate(-a,l.getCenter()),u=Math.sqrt(e*e+n*n)/2;let g=o*Math.PI/2;g+=Math.atan(o%2==0?n/e:e/n),g-=t.Angle.toRad(a);const d=ky.fromPolar(u,g,h).clone().translate(e/-2,n/-2);this.store.set("size",{width:e,height:n},r),this.setPosition(d.x,d.y,r)}else this.store.set("size",{width:e,height:n},r);return this.stopBatch("resize",r),this}scale(t,e,n,r={}){const i=this.getBBox().scale(t,e,null==n?void 0:n);return this.startBatch("scale",r),this.setPosition(i.x,i.y,r),this.resize(i.width,i.height,r),this.stopBatch("scale"),this}position(t,e,n){return"number"==typeof t?this.setPosition(t,e,n):this.getPosition(t)}getPosition(t={}){if(t.relative){const t=this.getParent();if(null!=t&&t.isNode()){const e=this.getPosition(),n=t.getPosition();return{x:e.x-n.x,y:e.y-n.y}}}const e=this.store.get("position");return e?Object.assign({},e):{x:0,y:0}}setPosition(t,e,n={}){let r,i,s;if("object"==typeof t?(r=t.x,i=t.y,s=e||{}):(r=t,i=e,s=n||{}),s.relative){const t=this.getParent();if(null!=t&&t.isNode()){const e=t.getPosition();r+=e.x,i+=e.y}}if(s.deep){const t=this.getPosition();this.translate(r-t.x,i-t.y,s)}else this.store.set("position",{x:r,y:i},s);return this}translate(e=0,n=0,r={}){if(0===e&&0===n)return this;r.translateBy=r.translateBy||this.id;const i=this.getPosition();if(null!=r.restrict&&r.translateBy===this.id){const t=this.getBBox({deep:!0}),s=r.restrict,o=i.x-t.x,a=i.y-t.y,l=Math.max(s.x+o,Math.min(s.x+s.width+o-t.width,i.x+e)),c=Math.max(s.y+a,Math.min(s.y+s.height+a-t.height,i.y+n));e=l-i.x,n=c-i.y}const s={x:i.x+e,y:i.y+n};return r.tx=e,r.ty=n,r.transition?("object"!=typeof r.transition&&(r.transition={}),this.transition("position",s,Object.assign(Object.assign({},r.transition),{interp:t.Interp.object})),this.eachChild((t=>{var i;(null===(i=r.exclude)||void 0===i?void 0:i.includes(t))||t.translate(e,n,r)}))):(this.startBatch("translate",r),this.store.set("position",s,r),this.eachChild((t=>{var i;(null===(i=r.exclude)||void 0===i?void 0:i.includes(t))||t.translate(e,n,r)})),this.stopBatch("translate",r)),this}angle(t,e){return null==t?this.getAngle():this.rotate(t,e)}getAngle(){return this.store.get("angle",0)}rotate(t,e={}){const n=this.getAngle();if(e.center){const r=this.getSize(),i=this.getPosition(),s=this.getBBox().getCenter();s.rotate(n-t,e.center);const o=s.x-r.width/2-i.x,a=s.y-r.height/2-i.y;this.startBatch("rotate",{angle:t,options:e}),this.setPosition(i.x+o,i.y+a,e),this.rotate(t,Object.assign(Object.assign({},e),{center:null})),this.stopBatch("rotate")}else this.store.set("angle",e.absolute?t:(n+t)%360,e);return this}getBBox(t={}){if(t.deep){const t=this.getDescendants({deep:!0,breadthFirst:!0});return t.push(this),Ww.getCellsBBox(t)}return Ny.fromPositionAndSize(this.getPosition(),this.getSize())}getConnectionPoint(t,e){const n=this.getBBox(),r=n.getCenter(),i=t.getTerminal(e);if(null==i)return r;const s=i.port;if(!s||!this.hasPort(s))return r;const o=this.getPort(s);if(!o||!o.group)return r;const a=this.getPortsPosition(o.group)[s].position,l=ky.create(a).translate(n.getOrigin()),c=this.getAngle();return c&&l.rotate(-c,r),l}fit(t={}){const e=(this.getChildren()||[]).filter((t=>t.isNode()));if(0===e.length)return this;this.startBatch("fit-embeds",t),t.deep&&e.forEach((e=>e.fit(t)));let{x:n,y:r,width:i,height:s}=Ww.getCellsBBox(e);const o=Rf(t.padding);return n-=o.left,r-=o.top,i+=o.left+o.right,s+=o.bottom+o.top,this.store.set({position:{x:n,y:r},size:{width:i,height:s}},t),this.stopBatch("fit-embeds"),this}get portContainerMarkup(){return this.getPortContainerMarkup()}set portContainerMarkup(t){this.setPortContainerMarkup(t)}getDefaultPortContainerMarkup(){return this.store.get("defaultPortContainerMarkup")||t.Markup.getPortContainerMarkup()}getPortContainerMarkup(){return this.store.get("portContainerMarkup")||this.getDefaultPortContainerMarkup()}setPortContainerMarkup(e,n={}){return this.store.set("portContainerMarkup",t.Markup.clone(e),n),this}get portMarkup(){return this.getPortMarkup()}set portMarkup(t){this.setPortMarkup(t)}getDefaultPortMarkup(){return this.store.get("defaultPortMarkup")||t.Markup.getPortMarkup()}getPortMarkup(){return this.store.get("portMarkup")||this.getDefaultPortMarkup()}setPortMarkup(e,n={}){return this.store.set("portMarkup",t.Markup.clone(e),n),this}get portLabelMarkup(){return this.getPortLabelMarkup()}set portLabelMarkup(t){this.setPortLabelMarkup(t)}getDefaultPortLabelMarkup(){return this.store.get("defaultPortLabelMarkup")||t.Markup.getPortLabelMarkup()}getPortLabelMarkup(){return this.store.get("portLabelMarkup")||this.getDefaultPortLabelMarkup()}setPortLabelMarkup(e,n={}){return this.store.set("portLabelMarkup",t.Markup.clone(e),n),this}get ports(){const t=this.store.get("ports",{items:[]});return null==t.items&&(t.items=[]),t}getPorts(){return xo(this.ports.items)}getPortsByGroup(t){return this.getPorts().filter((e=>e.group===t))}getPort(t){return xo(this.ports.items.find((e=>e.id&&e.id===t)))}getPortAt(t){return this.ports.items[t]||null}hasPorts(){return this.ports.items.length>0}hasPort(t){return-1!==this.getPortIndex(t)}getPortIndex(t){const e="string"==typeof t?t:t.id;return null!=e?this.ports.items.findIndex((t=>t.id===e)):-1}getPortsPosition(t){const e=this.getSize();return this.port.getPortsLayoutByGroup(t,new Ny(0,0,e.width,e.height)).reduce(((t,e)=>{const n=e.portLayout;return t[e.portId]={position:Object.assign({},n.position),angle:n.angle||0},t}),{})}getPortProp(t,e){return this.getPropByPath(this.prefixPortPath(t,e))}setPortProp(t,e,n,r){if("string"==typeof e||Array.isArray(e)){const i=this.prefixPortPath(t,e),s=n;return this.setPropByPath(i,s,r)}const i=this.prefixPortPath(t),s=e;return this.setPropByPath(i,s,n)}removePortProp(t,e,n){return"string"==typeof e||Array.isArray(e)?this.removePropByPath(this.prefixPortPath(t,e),n):this.removePropByPath(this.prefixPortPath(t),e)}portProp(t,e,n,r){return null==e?this.getPortProp(t):"string"==typeof e||Array.isArray(e)?2===arguments.length?this.getPortProp(t,e):null==n?this.removePortProp(t,e,r):this.setPortProp(t,e,n,r):this.setPortProp(t,e,n)}prefixPortPath(t,e){const n=this.getPortIndex(t);if(-1===n)throw new Error(`Unable to find port with id: "${t}"`);return null==e||""===e?["ports","items",`${n}`]:Array.isArray(e)?["ports","items",`${n}`,...e]:`ports/items/${n}/${e}`}addPort(t,e){const n=[...this.ports.items];return n.push(t),this.setPropByPath("ports/items",n,e),this}addPorts(t,e){return this.setPropByPath("ports/items",[...this.ports.items,...t],e),this}insertPort(t,e,n){const r=[...this.ports.items];return r.splice(t,0,e),this.setPropByPath("ports/items",r,n),this}removePort(t,e={}){return this.removePortAt(this.getPortIndex(t),e)}removePortAt(t,e={}){if(t>=0){const n=[...this.ports.items];n.splice(t,1),e.rewrite=!0,this.setPropByPath("ports/items",n,e)}return this}removePorts(t,e){let n;if(Array.isArray(t)){if(n=e||{},t.length){n.rewrite=!0;const e=[...this.ports.items].filter((e=>!t.some((t=>{const n="string"==typeof t?t:t.id;return e.id===n}))));this.setPropByPath("ports/items",e,n)}}else n=t||{},n.rewrite=!0,this.setPropByPath("ports/items",[],n);return this}getParsedPorts(){return this.port.getPorts()}getParsedGroups(){return this.port.groups}getPortsLayoutByGroup(t,e){return this.port.getPortsLayoutByGroup(t,e)}initPorts(){this.updatePortData(),this.on("change:ports",(()=>{this.processRemovedPort(),this.updatePortData()}))}processRemovedPort(){const t=this.ports,e={};t.items.forEach((t=>{t.id&&(e[t.id]=!0)}));const n={};(this.store.getPrevious("ports")||{items:[]}).items.forEach((t=>{t.id&&!e[t.id]&&(n[t.id]=!0)}));const r=this.model;if(r&&!Xc(n)){r.getConnectedEdges(this,{incoming:!0}).forEach((t=>{const e=t.getTargetPortId();e&&n[e]&&t.remove()}));r.getConnectedEdges(this,{outgoing:!0}).forEach((t=>{const e=t.getSourcePortId();e&&n[e]&&t.remove()}))}}validatePorts(){const t={},e=[];return this.ports.items.forEach((n=>{"object"!=typeof n&&e.push(`Invalid port ${n}.`),null==n.id&&(n.id=this.generatePortId()),t[n.id]&&e.push("Duplicitied port id."),t[n.id]=!0})),e}generatePortId(){return jf()}updatePortData(){const t=this.validatePorts();if(t.length>0)throw this.store.set("ports",this.store.getPrevious("ports")),new Error(t.join(" "));const e=this.port?this.port.getPorts():null;this.port=new Hw(this.ports);const n=this.port.getPorts(),r=e?n.filter((t=>e.find((e=>e.id===t.id))?null:t)):[...n],i=e?e.filter((t=>n.find((e=>e.id===t.id))?null:t)):[];r.length>0&&this.notify("ports:added",{added:r,cell:this,node:this}),i.length>0&&this.notify("ports:removed",{removed:i,cell:this,node:this})}};Jw.defaults={angle:0,position:{x:0,y:0},size:{width:1,height:1}},function(t){t.toStringTag=`X6.${t.name}`,t.isNode=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],r=e;return(null==n||n===t.toStringTag)&&"function"==typeof r.isNode&&"function"==typeof r.isEdge&&"function"==typeof r.prop&&"function"==typeof r.attr&&"function"==typeof r.size&&"function"==typeof r.position}}(Jw||(Jw={})),function(t){t.config({propHooks(t){var{ports:n}=t,r=e(t,["ports"]);return n&&(r.ports=Array.isArray(n)?{items:n}:n),r}})}(Jw||(Jw={})),function(t){t.registry=tv.create({type:"node",process(n,r){if(Fw.exist(n,!0))throw new Error(`Node with name '${n}' was registered by anthor Edge`);if("function"==typeof r)return r.config({shape:n}),r;let i=t;const{inherit:s}=r,o=e(r,["inherit"]);if(s)if("string"==typeof s){const t=this.get(s);null==t?this.onNotFound(s,"inherited"):i=t}else i=s;null==o.constructorName&&(o.constructorName=n);const a=i.define.call(i,o);return a.config({shape:n}),a}}),Fw.setNodeRegistry(t.registry)}(Jw||(Jw={})),function(t){let n=0;t.define=function(r){const{constructorName:i,overwrite:s}=r,o=e(r,["constructorName","overwrite"]),a=df((l=i||o.shape)?Mf(l):(n+=1,`CustomNode${n}`),this);var l;return a.config(o),o.shape&&t.registry.register(o.shape,a,s),a},t.create=function(e){const n=e.shape||"rect",r=t.registry.get(n);return r?new r(e):t.registry.onNotFound(n)}}(Jw||(Jw={}));let Xw=class n extends Ww{get[Symbol.toStringTag](){return n.toStringTag}constructor(t={}){super(t)}preprocess(t,n){const{source:r,sourceCell:i,sourcePort:s,sourcePoint:o,target:a,targetCell:l,targetPort:c,targetPoint:h}=t,u=e(t,["source","sourceCell","sourcePort","sourcePoint","target","targetCell","targetPort","targetPoint"]),g=t=>"string"==typeof t||"number"==typeof t;if(null!=r)if(Ww.isCell(r))u.source={cell:r.id};else if(g(r))u.source={cell:r};else if(ky.isPoint(r))u.source=r.toJSON();else if(Array.isArray(r))u.source={x:r[0],y:r[1]};else{const t=r.cell;Ww.isCell(t)?u.source=Object.assign(Object.assign({},r),{cell:t.id}):u.source=r}if(null!=i||null!=s){let t=u.source;if(null!=i){const e=g(i)?i:i.id;t?t.cell=e:t=u.source={cell:e}}null!=s&&t&&(t.port=s)}else null!=o&&(u.source=ky.create(o).toJSON());if(null!=a)if(Ww.isCell(a))u.target={cell:a.id};else if(g(a))u.target={cell:a};else if(ky.isPoint(a))u.target=a.toJSON();else if(Array.isArray(a))u.target={x:a[0],y:a[1]};else{const t=a.cell;Ww.isCell(t)?u.target=Object.assign(Object.assign({},a),{cell:t.id}):u.target=a}if(null!=l||null!=c){let t=u.target;if(null!=l){const e=g(l)?l:l.id;t?t.cell=e:t=u.target={cell:e}}null!=c&&t&&(t.port=c)}else null!=h&&(u.target=ky.create(h).toJSON());return super.preprocess(u,n)}setup(){super.setup(),this.on("change:labels",(t=>this.onLabelsChanged(t))),this.on("change:vertices",(t=>this.onVertexsChanged(t)))}isEdge(){return!0}disconnect(t={}){return this.store.set({source:{x:0,y:0},target:{x:0,y:0}},t),this}get source(){return this.getSource()}set source(t){this.setSource(t)}getSource(){return this.getTerminal("source")}getSourceCellId(){return this.source.cell}getSourcePortId(){return this.source.port}setSource(t,e,n={}){return this.setTerminal("source",t,e,n)}get target(){return this.getTarget()}set target(t){this.setTarget(t)}getTarget(){return this.getTerminal("target")}getTargetCellId(){return this.target.cell}getTargetPortId(){return this.target.port}setTarget(t,e,n={}){return this.setTerminal("target",t,e,n)}getTerminal(t){return Object.assign({},this.store.get(t))}setTerminal(t,e,n,r={}){if(Ww.isCell(e))return this.store.set(t,Sh({},n,{cell:e.id}),r),this;const i=e;return ky.isPoint(e)||null!=i.x&&null!=i.y?(this.store.set(t,Sh({},n,{x:i.x,y:i.y}),r),this):(this.store.set(t,xo(e),r),this)}getSourcePoint(){return this.getTerminalPoint("source")}getTargetPoint(){return this.getTerminalPoint("target")}getTerminalPoint(t){const e=this[t];if(ky.isPointLike(e))return ky.create(e);const n=this.getTerminalCell(t);return n?n.getConnectionPoint(this,t):new ky}getSourceCell(){return this.getTerminalCell("source")}getTargetCell(){return this.getTerminalCell("target")}getTerminalCell(t){if(this.model){const e="source"===t?this.getSourceCellId():this.getTargetCellId();if(e)return this.model.getCell(e)}return null}getSourceNode(){return this.getTerminalNode("source")}getTargetNode(){return this.getTerminalNode("target")}getTerminalNode(t){let e=this;const n={};for(;e&&e.isEdge();){if(n[e.id])return null;n[e.id]=!0,e=e.getTerminalCell(t)}return e&&e.isNode()?e:null}get router(){return this.getRouter()}set router(t){null==t?this.removeRouter():this.setRouter(t)}getRouter(){return this.store.get("router")}setRouter(t,e,n){return"object"==typeof t?this.store.set("router",t,e):this.store.set("router",{name:t,args:e},n),this}removeRouter(t={}){return this.store.remove("router",t),this}get connector(){return this.getConnector()}set connector(t){null==t?this.removeConnector():this.setConnector(t)}getConnector(){return this.store.get("connector")}setConnector(t,e,n){return"object"==typeof t?this.store.set("connector",t,e):this.store.set("connector",{name:t,args:e},n),this}removeConnector(t={}){return this.store.remove("connector",t)}getDefaultLabel(){const t=this.constructor;return xo(this.store.get("defaultLabel")||t.defaultLabel||{})}get labels(){return this.getLabels()}set labels(t){this.setLabels(t)}getLabels(){return[...this.store.get("labels",[])].map((t=>this.parseLabel(t)))}setLabels(t,e={}){return this.store.set("labels",Array.isArray(t)?t:[t],e),this}insertLabel(t,e,n={}){const r=this.getLabels(),i=r.length;let s=null!=e&&Number.isFinite(e)?e:i;return s<0&&(s=i+s+1),r.splice(s,0,this.parseLabel(t)),this.setLabels(r,n)}appendLabel(t,e={}){return this.insertLabel(t,-1,e)}getLabelAt(t){const e=this.getLabels();return null!=t&&Number.isFinite(t)?this.parseLabel(e[t]):null}setLabelAt(t,e,n={}){if(null!=t&&Number.isFinite(t)){const r=this.getLabels();r[t]=this.parseLabel(e),this.setLabels(r,n)}return this}removeLabelAt(t,e={}){const n=this.getLabels(),r=null!=t&&Number.isFinite(t)?t:-1,i=n.splice(r,1);return this.setLabels(n,e),i.length?i[0]:null}parseLabel(t){if("string"==typeof t){return this.constructor.parseStringLabel(t)}return t}onLabelsChanged({previous:t,current:e}){const n=t&&e?e.filter((e=>t.find((t=>e===t||Yc(e,t)))?null:e)):e?[...e]:[],r=t&&e?t.filter((t=>e.find((e=>t===e||Yc(t,e)))?null:t)):t?[...t]:[];n.length>0&&this.notify("labels:added",{added:n,cell:this,edge:this}),r.length>0&&this.notify("labels:removed",{removed:r,cell:this,edge:this})}get vertices(){return this.getVertices()}set vertices(t){this.setVertices(t)}getVertices(){return[...this.store.get("vertices",[])]}setVertices(t,e={}){const n=Array.isArray(t)?t:[t];return this.store.set("vertices",n.map((t=>ky.toJSON(t))),e),this}insertVertex(t,e,n={}){const r=this.getVertices(),i=r.length;let s=null!=e&&Number.isFinite(e)?e:i;return s<0&&(s=i+s+1),r.splice(s,0,ky.toJSON(t)),this.setVertices(r,n)}appendVertex(t,e={}){return this.insertVertex(t,-1,e)}getVertexAt(t){if(null!=t&&Number.isFinite(t)){return this.getVertices()[t]}return null}setVertexAt(t,e,n={}){if(null!=t&&Number.isFinite(t)){const r=this.getVertices();r[t]=e,this.setVertices(r,n)}return this}removeVertexAt(t,e={}){const n=this.getVertices(),r=null!=t&&Number.isFinite(t)?t:-1;return n.splice(r,1),this.setVertices(n,e)}onVertexsChanged({previous:t,current:e}){const n=t&&e?e.filter((e=>t.find((t=>ky.equals(e,t)))?null:e)):e?[...e]:[],r=t&&e?t.filter((t=>e.find((e=>ky.equals(t,e)))?null:t)):t?[...t]:[];n.length>0&&this.notify("vertexs:added",{added:n,cell:this,edge:this}),r.length>0&&this.notify("vertexs:removed",{removed:r,cell:this,edge:this})}getDefaultMarkup(){return this.store.get("defaultMarkup")||t.Markup.getEdgeMarkup()}getMarkup(){return super.getMarkup()||this.getDefaultMarkup()}translate(t,e,n={}){return n.translateBy=n.translateBy||this.id,n.tx=t,n.ty=e,this.applyToPoints((n=>({x:(n.x||0)+t,y:(n.y||0)+e})),n)}scale(t,e,n,r={}){return this.applyToPoints((r=>ky.create(r).scale(t,e,n).toJSON()),r)}applyToPoints(t,e={}){const n={},r=this.getSource(),i=this.getTarget();ky.isPointLike(r)&&(n.source=t(r)),ky.isPointLike(i)&&(n.target=t(i));const s=this.getVertices();return s.length>0&&(n.vertices=s.map(t)),this.store.set(n,e),this}getBBox(){return this.getPolyline().bbox()}getConnectionPoint(){return this.getPolyline().pointAt(.5)}getPolyline(){const t=[this.getSourcePoint(),...this.getVertices().map((t=>ky.create(t))),this.getTargetPoint()];return new zy(t)}updateParent(t){let e=null;const n=this.getSourceCell(),r=this.getTargetCell(),i=this.getParent();return n&&r&&(e=n===r||n.isDescendantOf(r)?r:r.isDescendantOf(n)?n:Ww.getCommonAncestor(n,r)),i&&e&&e.id!==i.id&&i.unembed(this,t),!e||i&&i.id===e.id||e.embed(this,t),e}hasLoop(t={}){const e=this.getSource(),n=this.getTarget(),r=e.cell,i=n.cell;if(!r||!i)return!1;let s=r===i;if(!s&&t.deep&&this._model){const e=this.getSourceCell(),n=this.getTargetCell();e&&n&&(s=e.isAncestorOf(n,t)||n.isAncestorOf(e,t))}return s}getFragmentAncestor(){const t=[this,this.getSourceNode(),this.getTargetNode()].filter((t=>null!=t));return this.getCommonAncestor(...t)}isFragmentDescendantOf(t){const e=this.getFragmentAncestor();return!!e&&(e.id===t.id||e.isDescendantOf(t))}};Xw.defaults={},function(t){t.equalTerminals=function(t,e){const n=t,r=e;return n.cell===r.cell&&(n.port===r.port||null==n.port&&null==r.port)}}(Xw||(Xw={})),function(t){t.defaultLabel={markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"}],attrs:{text:{fill:"#000",fontSize:14,textAnchor:"middle",textVerticalAnchor:"middle",pointerEvents:"none"},rect:{ref:"label",fill:"#fff",rx:3,ry:3,refWidth:1,refHeight:1,refX:0,refY:0}},position:{distance:.5}},t.parseStringLabel=function(t){return{attrs:{label:{text:t}}}}}(Xw||(Xw={})),function(t){t.toStringTag=`X6.${t.name}`,t.isEdge=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],r=e;return(null==n||n===t.toStringTag)&&"function"==typeof r.isNode&&"function"==typeof r.isEdge&&"function"==typeof r.prop&&"function"==typeof r.attr&&"function"==typeof r.disconnect&&"function"==typeof r.getSource&&"function"==typeof r.getTarget}}(Xw||(Xw={})),function(t){t.registry=tv.create({type:"edge",process(n,r){if(Fw.exist(n,!1))throw new Error(`Edge with name '${n}' was registered by anthor Node`);if("function"==typeof r)return r.config({shape:n}),r;let i=t;const{inherit:s="edge"}=r,o=e(r,["inherit"]);if("string"==typeof s){const t=this.get(s||"edge");null==t&&s?this.onNotFound(s,"inherited"):i=t}else i=s;null==o.constructorName&&(o.constructorName=n);const a=i.define.call(i,o);return a.config({shape:n}),a}}),Fw.setEdgeRegistry(t.registry)}(Xw||(Xw={})),function(t){let n=0;t.define=function(r){const{constructorName:i,overwrite:s}=r,o=e(r,["constructorName","overwrite"]),a=df((l=i||o.shape)?Mf(l):(n+=1,`CustomEdge${n}`),this);var l;return a.config(o),o.shape&&t.registry.register(o.shape,a,s),a},t.create=function(e){const n=e.shape||"edge",r=t.registry.get(n);return r?new r(e):t.registry.onNotFound(n)}}(Xw||(Xw={})),function(t){const n="basic.edge";t.config({shape:n,propHooks(n){const{label:r,vertices:i}=n,s=e(n,["label","vertices"]);if(r){null==s.labels&&(s.labels=[]);const e="string"==typeof r?t.parseStringLabel(r):r;s.labels.push(e)}return i&&Array.isArray(i)&&(s.vertices=i.map((t=>ky.create(t).toJSON()))),s}}),t.registry.register(n,t)}(Xw||(Xw={}));class Yw extends wf{constructor(t,e={}){super(),this.length=0,this.comparator=e.comparator||"zIndex",this.clean(),t&&this.reset(t,{silent:!0})}toJSON(){return this.cells.map((t=>t.toJSON()))}add(t,e,n){let r,i;"number"==typeof e?(r=e,i=Object.assign({merge:!1},n)):(r=this.length,i=Object.assign({merge:!1},e)),r>this.length&&(r=this.length),r<0&&(r+=this.length+1);const s=Array.isArray(t)?t:[t],o=this.comparator&&"number"!=typeof e&&!1!==i.sort,a=this.comparator||null;let l=!1;const c=[],h=[];return s.forEach((t=>{const e=this.get(t);e?i.merge&&!t.isSameStore(e)&&(e.setProp(t.getProp(),n),h.push(e),o&&!l&&(l=null==a||"function"==typeof a?e.hasChanged():"string"==typeof a?e.hasChanged(a):a.some((t=>e.hasChanged(t))))):(c.push(t),this.reference(t))})),c.length&&(o&&(l=!0),this.cells.splice(r,0,...c),this.length=this.cells.length),l&&this.sort({silent:!0}),i.silent||(c.forEach(((t,e)=>{const n={cell:t,index:r+e,options:i};this.trigger("added",n),i.dryrun||t.notify("added",Object.assign({},n))})),l&&this.trigger("sorted"),(c.length||h.length)&&this.trigger("updated",{added:c,merged:h,removed:[],options:i})),this}remove(t,e={}){const n=Array.isArray(t)?t:[t],r=this.removeCells(n,e);return!e.silent&&r.length>0&&this.trigger("updated",{options:e,removed:r,added:[],merged:[]}),Array.isArray(t)?r:r[0]}removeCells(t,e){const n=[];for(let r=0;rthis.unreference(t))),this.clean(),this.add(t,Object.assign({silent:!0},e)),!e.silent){const t=this.cells.slice();this.trigger("reseted",{options:e,previous:n,current:t});const r=[],i=[];t.forEach((t=>{n.some((e=>e.id===t.id))||r.push(t)})),n.forEach((e=>{t.some((t=>t.id===e.id))||i.push(e)})),this.trigger("updated",{options:e,added:r,removed:i,merged:[]})}return this}push(t,e){return this.add(t,this.length,e)}pop(t){const e=this.at(this.length-1);return this.remove(e,t)}unshift(t,e){return this.add(t,0,e)}shift(t){const e=this.at(0);return this.remove(e,t)}get(t){if(null==t)return null;const e="string"==typeof t||"number"==typeof t?t:t.id;return this.map[e]||null}has(t){return null!=this.get(t)}at(t){return t<0&&(t+=this.length),this.cells[t]||null}first(){return this.at(0)}last(){return this.at(-1)}indexOf(t){return this.cells.indexOf(t)}toArray(){return this.cells.slice()}sort(t={}){return null!=this.comparator&&(this.cells=hg(this.cells,this.comparator),t.silent||this.trigger("sorted")),this}clone(){return new(0,this.constructor)(this.cells.slice(),{comparator:this.comparator})}reference(t){this.map[t.id]=t,t.on("*",this.notifyCellEvent,this)}unreference(t){t.off("*",this.notifyCellEvent,this),delete this.map[t.id]}notifyCellEvent(t,e){const n=e.cell;this.trigger(`cell:${t}`,e),n&&(n.isNode()?this.trigger(`node:${t}`,Object.assign(Object.assign({},e),{node:n})):n.isEdge()&&this.trigger(`edge:${t}`,Object.assign(Object.assign({},e),{edge:n})))}clean(){this.length=0,this.cells=[],this.map={}}dispose(){this.reset([])}}n([Yw.dispose()],Yw.prototype,"dispose",null);class Zw extends wf{get[Symbol.toStringTag](){return Zw.toStringTag}constructor(t=[]){super(),this.batches={},this.addings=new WeakMap,this.nodes={},this.edges={},this.outgoings={},this.incomings={},this.collection=new Yw(t),this.setup()}notify(t,e){this.trigger(t,e);const n=this.graph;return n&&("sorted"===t||"reseted"===t||"updated"===t?n.trigger(`model:${t}`,e):n.trigger(t,e)),this}setup(){const t=this.collection;t.on("sorted",(()=>this.notify("sorted",null))),t.on("updated",(t=>this.notify("updated",t))),t.on("cell:change:zIndex",(()=>this.sortOnChangeZ())),t.on("added",(({cell:t})=>{this.onCellAdded(t)})),t.on("removed",(t=>{const e=t.cell;this.onCellRemoved(e,t.options),this.notify("cell:removed",t),e.isNode()?this.notify("node:removed",Object.assign(Object.assign({},t),{node:e})):e.isEdge()&&this.notify("edge:removed",Object.assign(Object.assign({},t),{edge:e}))})),t.on("reseted",(t=>{this.onReset(t.current),this.notify("reseted",t)})),t.on("edge:change:source",(({edge:t})=>this.onEdgeTerminalChanged(t,"source"))),t.on("edge:change:target",(({edge:t})=>{this.onEdgeTerminalChanged(t,"target")}))}sortOnChangeZ(){this.collection.sort()}onCellAdded(t){const e=t.id;t.isEdge()?(t.updateParent(),this.edges[e]=!0,this.onEdgeTerminalChanged(t,"source"),this.onEdgeTerminalChanged(t,"target")):this.nodes[e]=!0}onCellRemoved(t,e){const n=t.id;if(t.isEdge()){delete this.edges[n];const e=t.getSource(),r=t.getTarget();if(e&&e.cell){const t=this.outgoings[e.cell],r=t?t.indexOf(n):-1;r>=0&&(t.splice(r,1),0===t.length&&delete this.outgoings[e.cell])}if(r&&r.cell){const t=this.incomings[r.cell],e=t?t.indexOf(n):-1;e>=0&&(t.splice(e,1),0===t.length&&delete this.incomings[r.cell])}}else delete this.nodes[n];e.clear||(e.disconnectEdges?this.disconnectConnectedEdges(t,e):this.removeConnectedEdges(t,e)),t.model===this&&(t.model=null)}onReset(t){this.nodes={},this.edges={},this.outgoings={},this.incomings={},t.forEach((t=>this.onCellAdded(t)))}onEdgeTerminalChanged(t,e){const n="source"===e?this.outgoings:this.incomings,r=t.previous(e);if(r&&r.cell){const e=Ww.isCell(r.cell)?r.cell.id:r.cell,i=n[e],s=i?i.indexOf(t.id):-1;s>=0&&(i.splice(s,1),0===i.length&&delete n[e])}const i=t.getTerminal(e);if(i&&i.cell){const e=Ww.isCell(i.cell)?i.cell.id:i.cell,r=n[e]||[];-1===r.indexOf(t.id)&&r.push(t.id),n[e]=r}}prepareCell(t,e){return t.model||e&&e.dryrun||(t.model=this),null==t.zIndex&&t.setZIndex(this.getMaxZIndex()+1,{silent:!0}),t}resetCells(t,e={}){return t.map((t=>this.prepareCell(t,Object.assign(Object.assign({},e),{dryrun:!0})))),this.collection.reset(t,e),t.map((t=>this.prepareCell(t,{options:e}))),this}clear(t={}){const e=this.getCells();if(0===e.length)return this;const n=Object.assign(Object.assign({},t),{clear:!0});return this.batchUpdate("clear",(()=>{const t=e.sort(((t,e)=>(t.isEdge()?1:2)-(e.isEdge()?1:2)));for(;t.length>0;){const e=t.shift();e&&e.remove(n)}}),n),this}addNode(t,e={}){const n=Jw.isNode(t)?t:this.createNode(t);return this.addCell(n,e),n}updateNode(t,e={}){const n=this.createNode(t),r=n.getProp();return n.dispose(),this.updateCell(r,e)}createNode(t){return Jw.create(t)}addEdge(t,e={}){const n=Xw.isEdge(t)?t:this.createEdge(t);return this.addCell(n,e),n}createEdge(t){return Xw.create(t)}updateEdge(t,e={}){const n=this.createEdge(t),r=n.getProp();return n.dispose(),this.updateCell(r,e)}addCell(t,e={}){return Array.isArray(t)?this.addCells(t,e):(this.collection.has(t)||this.addings.has(t)||(this.addings.set(t,!0),this.collection.add(this.prepareCell(t,e),e),t.eachChild((t=>this.addCell(t,e))),this.addings.delete(t)),this)}addCells(t,e={}){const n=t.length;if(0===n)return this;const r=Object.assign(Object.assign({},e),{position:n-1,maxPosition:n-1});return this.startBatch("add",Object.assign(Object.assign({},r),{cells:t})),t.forEach((t=>{this.addCell(t,r),r.position-=1})),this.stopBatch("add",Object.assign(Object.assign({},r),{cells:t})),this}updateCell(t,e={}){const n=t.id&&this.getCell(t.id);return!!n&&this.batchUpdate("update",(()=>(Object.entries(t).forEach((([t,r])=>n.setProp(t,r,e))),!0)),t)}removeCell(t,e={}){const n="string"==typeof t?this.getCell(t):t;return n&&this.has(n)?this.collection.remove(n,e):null}updateCellId(t,e){if(t.id===e)return;this.startBatch("update",{id:e}),t.prop("id",e);const n=t.clone({keepId:!0});this.addCell(n);return this.getConnectedEdges(t).forEach((n=>{const r=n.getSourceCell(),i=n.getTargetCell();r===t&&n.setSource(Object.assign(Object.assign({},n.getSource()),{cell:e})),i===t&&n.setTarget(Object.assign(Object.assign({},n.getTarget()),{cell:e}))})),this.removeCell(t),this.stopBatch("update",{id:e}),n}removeCells(t,e={}){return t.length?this.batchUpdate("remove",(()=>t.map((t=>this.removeCell(t,e))))):[]}removeConnectedEdges(t,e={}){const n=this.getConnectedEdges(t);return n.forEach((t=>{t.remove(e)})),n}disconnectConnectedEdges(t,e={}){const n="string"==typeof t?t:t.id;this.getConnectedEdges(t).forEach((t=>{const r=t.getSourceCellId(),i=t.getTargetCellId();r===n&&t.setSource({x:0,y:0},e),i===n&&t.setTarget({x:0,y:0},e)}))}has(t){return this.collection.has(t)}total(){return this.collection.length}indexOf(t){return this.collection.indexOf(t)}getCell(t){return this.collection.get(t)}getCells(){return this.collection.toArray()}getFirstCell(){return this.collection.first()}getLastCell(){return this.collection.last()}getMinZIndex(){const t=this.collection.first();return t&&t.getZIndex()||0}getMaxZIndex(){const t=this.collection.last();return t&&t.getZIndex()||0}getCellsFromCache(t){return t?Object.keys(t).map((t=>this.getCell(t))).filter((t=>null!=t)):[]}getNodes(){return this.getCellsFromCache(this.nodes)}getEdges(){return this.getCellsFromCache(this.edges)}getOutgoingEdges(t){const e="string"==typeof t?t:t.id,n=this.outgoings[e];return n?n.map((t=>this.getCell(t))).filter((t=>t&&t.isEdge())):null}getIncomingEdges(t){const e="string"==typeof t?t:t.id,n=this.incomings[e];return n?n.map((t=>this.getCell(t))).filter((t=>t&&t.isEdge())):null}getConnectedEdges(t,e={}){const n=[],r="string"==typeof t?this.getCell(t):t;if(null==r)return n;const i={},s=e.indirect;let o=e.incoming,a=e.outgoing;null==o&&null==a&&(o=a=!0);const l=(t,e)=>{const r=e?this.getOutgoingEdges(t):this.getIncomingEdges(t);if(null!=r&&r.forEach((t=>{i[t.id]||(n.push(t),i[t.id]=!0,s&&(o&&l(t,!1),a&&l(t,!0)))})),s&&t.isEdge()){const r=e?t.getTargetCell():t.getSourceCell();r&&r.isEdge()&&(i[r.id]||(n.push(r),l(r,e)))}};if(a&&l(r,!0),o&&l(r,!1),e.deep){const t=r.getDescendants({deep:!0}),s={};t.forEach((t=>{t.isNode()&&(s[t.id]=!0)}));const l=(t,r)=>{const o=r?this.getOutgoingEdges(t.id):this.getIncomingEdges(t.id);null!=o&&o.forEach((t=>{if(!i[t.id]){const r=t.getSourceCell(),o=t.getTargetCell();if(!e.enclosed&&r&&s[r.id]&&o&&s[o.id])return;n.push(t),i[t.id]=!0}}))};t.forEach((t=>{t.isEdge()||(a&&l(t,!0),o&&l(t,!1))}))}return n}isBoundary(t,e){const n="string"==typeof t?this.getCell(t):t,r=e?this.getIncomingEdges(n):this.getOutgoingEdges(n);return null==r||0===r.length}getBoundaryNodes(t){const e=[];return Object.keys(this.nodes).forEach((n=>{if(this.isBoundary(n,t)){const t=this.getCell(n);t&&e.push(t)}})),e}getRoots(){return this.getBoundaryNodes(!0)}getLeafs(){return this.getBoundaryNodes(!1)}isRoot(t){return this.isBoundary(t,!0)}isLeaf(t){return this.isBoundary(t,!1)}getNeighbors(t,e={}){let n=e.incoming,r=e.outgoing;null==n&&null==r&&(n=r=!0);const i=this.getConnectedEdges(t,e).reduce(((i,s)=>{const o=s.hasLoop(e),a=s.getSourceCell(),l=s.getTargetCell();return n&&a&&a.isNode()&&!i[a.id]&&(!o&&(a===t||e.deep&&a.isDescendantOf(t))||(i[a.id]=a)),r&&l&&l.isNode()&&!i[l.id]&&(!o&&(l===t||e.deep&&l.isDescendantOf(t))||(i[l.id]=l)),i}),{});if(t.isEdge()){if(n){const e=t.getSourceCell();e&&e.isNode()&&!i[e.id]&&(i[e.id]=e)}if(r){const e=t.getTargetCell();e&&e.isNode()&&!i[e.id]&&(i[e.id]=e)}}return Object.keys(i).map((t=>i[t]))}isNeighbor(t,e,n={}){let r=n.incoming,i=n.outgoing;return null==r&&null==i&&(r=i=!0),this.getConnectedEdges(t,n).some((t=>{const n=t.getSourceCell(),s=t.getTargetCell();return!(!r||!n||n.id!==e.id)||!(!i||!s||s.id!==e.id)}))}getSuccessors(t,e={}){const n=[];return this.search(t,((r,i)=>{r!==t&&this.matchDistance(i,e.distance)&&n.push(r)}),Object.assign(Object.assign({},e),{outgoing:!0})),n}isSuccessor(t,e,n={}){let r=!1;return this.search(t,((i,s)=>{if(i===e&&i!==t&&this.matchDistance(s,n.distance))return r=!0,!1}),Object.assign(Object.assign({},n),{outgoing:!0})),r}getPredecessors(t,e={}){const n=[];return this.search(t,((r,i)=>{r!==t&&this.matchDistance(i,e.distance)&&n.push(r)}),Object.assign(Object.assign({},e),{incoming:!0})),n}isPredecessor(t,e,n={}){let r=!1;return this.search(t,((i,s)=>{if(i===e&&i!==t&&this.matchDistance(s,n.distance))return r=!0,!1}),Object.assign(Object.assign({},n),{incoming:!0})),r}matchDistance(t,e){return null==e||("function"==typeof e?e(t):!(!Array.isArray(e)||!e.includes(t))||t===e)}getCommonAncestor(...t){const e=[];return t.forEach((t=>{t&&(Array.isArray(t)?e.push(...t):e.push(t))})),Ww.getCommonAncestor(...e)}getSubGraph(t,e={}){const n=[],r={},i=[],s=[],o=t=>{r[t.id]||(n.push(t),r[t.id]=t,t.isEdge()&&s.push(t),t.isNode()&&i.push(t))};return t.forEach((t=>{if(o(t),e.deep){t.getDescendants({deep:!0}).forEach((t=>o(t)))}})),s.forEach((t=>{const e=t.getSourceCell(),s=t.getTargetCell();e&&!r[e.id]&&(n.push(e),r[e.id]=e,e.isNode()&&i.push(e)),s&&!r[s.id]&&(n.push(s),r[s.id]=s,s.isNode()&&i.push(s))})),i.forEach((t=>{this.getConnectedEdges(t,e).forEach((t=>{const e=t.getSourceCell(),i=t.getTargetCell();!r[t.id]&&e&&r[e.id]&&i&&r[i.id]&&(n.push(t),r[t.id]=t)}))})),n}cloneSubGraph(t,e={}){const n=this.getSubGraph(t,e);return this.cloneCells(n)}cloneCells(t){return Ww.cloneCells(t)}getNodesFromPoint(t,e){const n="number"==typeof t?{x:t,y:e||0}:t;return this.getNodes().filter((t=>t.getBBox().containsPoint(n)))}getNodesInArea(t,e,n,r,i){const s="number"==typeof t?new Ny(t,e,n,r):Ny.create(t),o="number"==typeof t?i:e,a=o&&o.strict;return this.getNodes().filter((t=>{const e=t.getBBox();return a?s.containsRect(e):s.isIntersectWithRect(e)}))}getEdgesInArea(t,e,n,r,i){const s="number"==typeof t?new Ny(t,e,n,r):Ny.create(t),o="number"==typeof t?i:e,a=o&&o.strict;return this.getEdges().filter((t=>{const e=t.getBBox();return 0===e.width?e.inflate(1,0):0===e.height&&e.inflate(0,1),a?s.containsRect(e):s.isIntersectWithRect(e)}))}getNodesUnderNode(t,e={}){const n=t.getBBox();return(null==e.by||"bbox"===e.by?this.getNodesInArea(n):this.getNodesFromPoint(n[e.by])).filter((e=>t.id!==e.id&&!e.isDescendantOf(t)))}getAllCellsBBox(){return this.getCellsBBox(this.getCells())}getCellsBBox(t,e={}){return Ww.getCellsBBox(t,e)}search(t,e,n={}){n.breadthFirst?this.breadthFirstSearch(t,e,n):this.depthFirstSearch(t,e,n)}breadthFirstSearch(t,e,n={}){const r=[],i={},s={};for(r.push(t),s[t.id]=0;r.length>0;){const t=r.shift();if(null==t||i[t.id])continue;if(i[t.id]=!0,!1===ef(e,this,t,s[t.id]))continue;this.getNeighbors(t,n).forEach((e=>{s[e.id]=s[t.id]+1,r.push(e)}))}}depthFirstSearch(t,e,n={}){const r=[],i={},s={};for(r.push(t),s[t.id]=0;r.length>0;){const t=r.pop();if(null==t||i[t.id])continue;if(i[t.id]=!0,!1===ef(e,this,t,s[t.id]))continue;const o=this.getNeighbors(t,n),a=r.length;o.forEach((e=>{s[e.id]=s[t.id]+1,r.splice(a,0,e)}))}}getShortestPath(e,n,r={}){const i={};this.getEdges().forEach((t=>{const e=t.getSourceCellId(),n=t.getTargetCellId();e&&n&&(i[e]||(i[e]=[]),i[n]||(i[n]=[]),i[e].push(n),r.directed||i[n].push(e))}));const s="string"==typeof e?e:e.id,o=t.Dijkstra.run(i,s,r.weight),a=[];let l="string"==typeof n?n:n.id;for(o[l]&&a.push(l);l=o[l];)a.unshift(l);return a}translate(t,e,n){return this.getCells().filter((t=>!t.hasParent())).forEach((r=>r.translate(t,e,n))),this}resize(t,e,n){return this.resizeCells(t,e,this.getCells(),n)}resizeCells(t,e,n,r={}){const i=this.getCellsBBox(n);if(i){const s=Math.max(t/i.width,0),o=Math.max(e/i.height,0),a=i.getOrigin();n.forEach((t=>t.scale(s,o,a,r)))}return this}toJSON(t={}){return Zw.toJSON(this.getCells(),t)}parseJSON(t){return Zw.fromJSON(t)}fromJSON(t,e={}){const n=this.parseJSON(t);return this.resetCells(n,e),this}startBatch(t,e={}){return this.batches[t]=(this.batches[t]||0)+1,this.notify("batch:start",{name:t,data:e}),this}stopBatch(t,e={}){return this.batches[t]=(this.batches[t]||0)-1,this.notify("batch:stop",{name:t,data:e}),this}batchUpdate(t,e,n={}){this.startBatch(t,n);const r=e();return this.stopBatch(t,n),r}hasActiveBatch(t=Object.keys(this.batches)){return(Array.isArray(t)?t:[t]).some((t=>this.batches[t]>0))}dispose(){this.collection.dispose()}}n([Zw.dispose()],Zw.prototype,"dispose",null),function(t){t.toStringTag=`X6.${t.name}`,t.isModel=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],r=e;return(null==n||n===t.toStringTag)&&"function"==typeof r.addNode&&"function"==typeof r.addEdge&&null!=r.collection}}(Zw||(Zw={})),function(t){t.toJSON=function(t,e={}){return{cells:t.map((t=>t.toJSON(e)))}},t.fromJSON=function(t){const e=[];return Array.isArray(t)?e.push(...t):(t.cells&&e.push(...t.cells),t.nodes&&t.nodes.forEach((t=>{null==t.shape&&(t.shape="rect"),e.push(t)})),t.edges&&t.edges.forEach((t=>{null==t.shape&&(t.shape="edge"),e.push(t)}))),e.map((t=>{const e=t.shape;if(e){if(Jw.registry.exist(e))return Jw.create(t);if(Xw.registry.exist(e))return Xw.create(t)}throw new Error("The `shape` should be specified when creating a node/edge instance")}))}}(Zw||(Zw={}));let Kw=class extends Jw{get label(){return this.getLabel()}set label(t){this.setLabel(t)}getLabel(){return this.getAttrByPath("text/text")}setLabel(t,e){return null==t?this.removeLabel():this.setAttrByPath("text/text",t,e),this}removeLabel(){return this.removeAttrByPath("text/text"),this}};function Qw(t,e="body"){return[{tagName:t,selector:e},{tagName:"text",selector:"label"}]}function tA(t,e,n={}){const r={constructorName:t,markup:Qw(t,n.selector),attrs:{[t]:Object.assign({},Kw.bodyAttr)}};return(n.parent||Kw).define(Sh(r,e,{shape:t}))}!function(t){t.bodyAttr={fill:"#ffffff",stroke:"#333333",strokeWidth:2},t.labelAttr={fontSize:14,fill:"#000000",refX:.5,refY:.5,textAnchor:"middle",textVerticalAnchor:"middle",fontFamily:"Arial, helvetica, sans-serif"},t.config({attrs:{text:Object.assign({},t.labelAttr)},propHooks(t){const{label:n}=t,r=e(t,["label"]);return n&&yf(r,"attrs/text/text",n),r},visible:!0})}(Kw||(Kw={}));const eA=tA("rect",{attrs:{body:{refWidth:"100%",refHeight:"100%"}}}),nA=Xw.define({shape:"edge",markup:[{tagName:"path",selector:"wrap",groupSelector:"lines",attrs:{fill:"none",cursor:"pointer",stroke:"transparent",strokeLinecap:"round"}},{tagName:"path",selector:"line",groupSelector:"lines",attrs:{fill:"none",pointerEvents:"none"}}],attrs:{lines:{connection:!0,strokeLinejoin:"round"},wrap:{strokeWidth:10},line:{stroke:"#333",strokeWidth:2,targetMarker:"classic"}}}),rA=tA("ellipse",{attrs:{body:{refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%"}}});class iA extends Kw{get points(){return this.getPoints()}set points(t){this.setPoints(t)}getPoints(){return this.getAttrByPath("body/refPoints")}setPoints(t,e){return null==t?this.removePoints():this.setAttrByPath("body/refPoints",iA.pointsToString(t),e),this}removePoints(){return this.removeAttrByPath("body/refPoints"),this}}!function(t){function n(t){return"string"==typeof t?t:t.map((t=>Array.isArray(t)?t.join(","):ky.isPointLike(t)?`${t.x}, ${t.y}`:"")).join(" ")}t.pointsToString=n,t.config({propHooks(t){const{points:r}=t,i=e(t,["points"]);if(r){const t=n(r);t&&yf(i,"attrs/body/refPoints",t)}return i}})}(iA||(iA={}));const sA=tA("polygon",{},{parent:iA}),oA=tA("polyline",{},{parent:iA}),aA=Kw.define({shape:"path",markup:[{tagName:"rect",selector:"bg"},{tagName:"path",selector:"body"},{tagName:"text",selector:"label"}],attrs:{bg:{refWidth:"100%",refHeight:"100%",fill:"none",stroke:"none",pointerEvents:"all"},body:{fill:"none",stroke:"#000",strokeWidth:2}},propHooks(t){const{path:n}=t,r=e(t,["path"]);return n&&yf(r,"attrs/body/refD",n),r}}),lA=Kw.define({shape:"text-block",markup:[{tagName:"rect",selector:"body"},t.Platform.SUPPORT_FOREIGNOBJECT?{tagName:"foreignObject",selector:"foreignObject",children:[{tagName:"div",ns:pp.xhtml,selector:"label",style:{width:"100%",height:"100%",position:"static",backgroundColor:"transparent",textAlign:"center",margin:0,padding:"0px 5px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}}]}:{tagName:"text",selector:"label",attrs:{textAnchor:"middle"}}],attrs:{body:Object.assign(Object.assign({},Kw.bodyAttr),{refWidth:"100%",refHeight:"100%"}),foreignObject:{refWidth:"100%",refHeight:"100%"},label:{style:{fontSize:14}}},propHooks(t){const{text:n}=t,r=e(t,["text"]);return n&&yf(r,"attrs/label/text",n),r},attrHooks:{text:{set(t,{cell:e,view:n,refBBox:r,elem:i,attrs:s}){if(!(i instanceof HTMLElement)){const o=s.style||{},a={text:t,width:-5,height:"100%"},l=Object.assign({textVerticalAnchor:"middle"},o);return ef(kb.presets.textWrap.set,this,a,{cell:e,view:n,elem:i,refBBox:r,attrs:l}),{fill:o.color||null}}i.textContent=t},position(t,{refBBox:e,elem:n}){if(n instanceof SVGElement)return e.getCenter()}}}}),cA=tA("image",{attrs:{image:{refWidth:"100%",refHeight:"100%"}},propHooks:function(t="xlink:href"){return n=>{const{imageUrl:r,imageWidth:i,imageHeight:s}=n,o=e(n,["imageUrl","imageWidth","imageHeight"]);if(null!=r||null!=i||null!=s){const e=()=>{if(o.attrs){const e=o.attrs.image;null!=r&&(e[t]=r),null!=i&&(e.width=i),null!=s&&(e.height=s),o.attrs.image=e}};o.attrs?(null==o.attrs.image&&(o.attrs.image={}),e()):(o.attrs={image:{}},e())}return o}}()},{selector:"image"}),hA=tA("circle",{attrs:{body:{refCx:"50%",refCy:"50%",refR:"50%"}}});class uA extends ax{constructor(){super(...arguments),this.portsCache={}}get[Symbol.toStringTag](){return uA.toStringTag}getContainerClassName(){const t=[super.getContainerClassName(),this.prefixClassName("node")];return this.can("nodeMovable")||t.push(this.prefixClassName("node-immovable")),t.join(" ")}updateClassName(t){const e=t.target;if(e.hasAttribute("magnet")){const t=this.prefixClassName("port-unconnectable");this.can("magnetConnectable")?cp(e,t):lp(e,t)}else{const t=this.prefixClassName("node-immovable");this.can("nodeMovable")?this.removeClass(t):this.addClass(t)}}isNodeView(){return!0}confirmUpdate(t,e={}){let n=t;return this.hasAction(n,"ports")&&(this.removePorts(),this.cleanPortsCache()),this.hasAction(n,"render")?(this.render(),n=this.removeAction(n,["render","update","resize","translate","rotate","ports","tools"])):(n=this.handleAction(n,"resize",(()=>this.resize()),"update"),n=this.handleAction(n,"update",(()=>this.update()),jb.useCSSSelector?"ports":null),n=this.handleAction(n,"translate",(()=>this.translate())),n=this.handleAction(n,"rotate",(()=>this.rotate())),n=this.handleAction(n,"ports",(()=>this.renderPorts())),n=this.handleAction(n,"tools",(()=>{this.getFlag("tools")===t?this.renderTools():this.updateTools(e)}))),n}update(t){this.cleanCache(),jb.useCSSSelector&&this.removePorts();const e=this.cell,n=e.getSize(),r=e.getAttrs();this.updateAttrs(this.container,r,{attrs:t===r?null:t,rootBBox:new Ny(0,0,n.width,n.height),selectors:this.selectors}),jb.useCSSSelector&&this.renderPorts()}renderMarkup(){const t=this.cell.markup;if(t){if("string"==typeof t)throw new TypeError("Not support string markup.");return this.renderJSONMarkup(t)}throw new TypeError("Invalid node markup.")}renderJSONMarkup(t){const e=this.parseJSONMarkup(t,this.container);this.selectors=e.selectors,this.container.appendChild(e.fragment)}render(){return this.empty(),this.renderMarkup(),this.resize(),this.updateTransform(),jb.useCSSSelector||this.renderPorts(),this.renderTools(),this}resize(){this.cell.getAngle()&&this.rotate(),this.update()}translate(){this.updateTransform()}rotate(){this.updateTransform()}getTranslationString(){const t=this.cell.getPosition();return`translate(${t.x},${t.y})`}getRotationString(){const t=this.cell.getAngle();if(t){const e=this.cell.getSize();return`rotate(${t},${e.width/2},${e.height/2})`}}updateTransform(){let t=this.getTranslationString();const e=this.getRotationString();e&&(t+=` ${e}`),this.container.setAttribute("transform",t)}findPortElem(t,e){const n=t?this.portsCache[t]:null;if(!n)return null;const r=n.portContentElement,i=n.portContentSelectors||{};return this.findOne(e,r,i)}cleanPortsCache(){this.portsCache={}}removePorts(){Object.values(this.portsCache).forEach((t=>{Op(t.portElement)}))}renderPorts(){const t=this.container,e=[];t.childNodes.forEach((t=>{e.push(t)}));const n=this.cell.getParsedPorts(),r=oc(n,"zIndex"),i="auto";r[i]&&r[i].forEach((n=>{const r=this.getPortElement(n);t.append(r),e.push(r)})),Object.keys(r).forEach((t=>{if(t!==i){const n=parseInt(t,10);this.appendPorts(r[t],n,e)}})),this.updatePorts()}appendPorts(t,e,n){const r=t.map((t=>this.getPortElement(t)));n[e]||e<0?jp(n[Math.max(e,0)],r):kp(this.container,r)}getPortElement(t){const e=this.portsCache[t.id];return e?e.portElement:this.createPortElement(t)}createPortElement(e){let n=t.Markup.renderMarkup(this.cell.getPortContainerMarkup());const r=n.elem;if(null==r)throw new Error("Invalid port container markup.");n=t.Markup.renderMarkup(this.getPortMarkup(e));const i=n.elem,s=n.selectors;if(null==i)throw new Error("Invalid port markup.");this.setAttrs({port:e.id,"port-group":e.group},i);let o="x6-port";e.group&&(o+=` x6-port-${e.group}`),lp(r,o),lp(r,"x6-port"),lp(i,"x6-port-body"),r.appendChild(i);let a,l,c=s;if(this.existPortLabel(e)){if(n=t.Markup.renderMarkup(this.getPortLabelMarkup(e.label)),a=n.elem,l=n.selectors,null==a)throw new Error("Invalid port label markup.");if(s&&l){for(const t in l)if(s[t]&&t!==this.rootSelector)throw new Error("Selectors within port must be unique.");c=Object.assign(Object.assign({},s),l)}lp(a,"x6-port-label"),r.appendChild(a)}return this.portsCache[e.id]={portElement:r,portSelectors:c,portLabelElement:a,portLabelSelectors:l,portContentElement:i,portContentSelectors:s},this.graph.options.onPortRendered&&this.graph.options.onPortRendered({port:e,node:this.cell,container:r,selectors:c,labelContainer:a,labelSelectors:l,contentContainer:i,contentSelectors:s}),r}updatePorts(){const t=this.cell.getParsedGroups(),e=Object.keys(t);0===e.length?this.updatePortGroup():e.forEach((t=>this.updatePortGroup(t)))}updatePortGroup(t){const e=Ny.fromSize(this.cell.getSize()),n=this.cell.getPortsLayoutByGroup(t,e);for(let t=0,e=n.length;ti.options.clickThreshold||this.notify("node:magnet:click",Object.assign({magnet:e},this.getEventArgs(t,n,r)))}onMagnetDblClick(t,e,n,r){this.notify("node:magnet:dblclick",Object.assign({magnet:e},this.getEventArgs(t,n,r)))}onMagnetContextMenu(t,e,n,r){this.notify("node:magnet:contextmenu",Object.assign({magnet:e},this.getEventArgs(t,n,r)))}onMagnetMouseDown(t,e,n,r){this.startMagnetDragging(t,n,r)}onCustomEvent(t,e,n,r){this.notify("node:customevent",Object.assign({name:e},this.getEventArgs(t,n,r))),super.onCustomEvent(t,e,n,r)}prepareEmbedding(t){const e=this.graph,n=this.getEventData(t).cell||this.cell,r=e.findViewByCell(n),i=e.snapToGrid(t.clientX,t.clientY);this.notify("node:embed",{e:t,node:n,view:r,cell:n,x:i.x,y:i.y,currentParent:n.getParent()})}processEmbedding(t,e){const n=e.cell||this.cell,r=e.graph||this.graph,i=r.options.embedding,s=i.findParent;let o="function"==typeof s?ef(s,r,{view:this,node:this.cell}).filter((t=>Ww.isCell(t)&&this.cell.id!==t.id&&!t.isDescendantOf(this.cell))):r.model.getNodesUnderNode(n,{by:s});if(i.frontOnly&&o.length>0){const t=oc(o,"zIndex"),e=Ch(Object.keys(t).map((t=>parseInt(t,10))));e&&(o=t[e])}o=o.filter((t=>t.visible));let a=null;const l=e.candidateEmbedView,c=i.validate;for(let t=o.length-1;t>=0;t-=1){const e=o[t];if(l&&l.cell.id===e.id){a=l;break}{const t=e.findView(r);if(c&&ef(c,r,{child:this.cell,parent:t.cell,childView:this,parentView:t})){a=t;break}}}this.clearEmbedding(e),a&&a.highlight(null,{type:"embedding"}),e.candidateEmbedView=a;const h=r.snapToGrid(t.clientX,t.clientY);this.notify("node:embedding",{e:t,cell:n,node:n,view:r.findViewByCell(n),x:h.x,y:h.y,currentParent:n.getParent(),candidateParent:a?a.cell:null})}clearEmbedding(t){const e=t.candidateEmbedView;e&&(e.unhighlight(null,{type:"embedding"}),t.candidateEmbedView=null)}finalizeEmbedding(t,e){this.graph.startBatch("embedding");const n=e.cell||this.cell,r=e.graph||this.graph,i=r.findViewByCell(n),s=n.getParent(),o=e.candidateEmbedView;if(o?(o.unhighlight(null,{type:"embedding"}),e.candidateEmbedView=null,null!=s&&s.id===o.cell.id||o.cell.insertChild(n,void 0,{ui:!0})):s&&s.unembed(n,{ui:!0}),r.model.getConnectedEdges(n,{deep:!0}).forEach((t=>{t.updateParent({ui:!0})})),i&&o){const e=r.snapToGrid(t.clientX,t.clientY);i.notify("node:embedded",{e:t,cell:n,x:e.x,y:e.y,node:n,view:r.findViewByCell(n),previousParent:s,currentParent:n.getParent()})}this.graph.stopBatch("embedding")}getDelegatedView(){let t=this.cell,e=this;for(;e&&!t.isEdge();){if(!t.hasParent()||e.can("stopDelegateOnDragging"))return e;t=t.getParent(),e=this.graph.findViewByCell(t)}return null}validateMagnet(t,e,n){if("passive"!==e.getAttribute("magnet")){const r=this.graph.options.connecting.validateMagnet;return!r||ef(r,this.graph,{e:n,magnet:e,view:t,cell:t.cell})}return!1}startMagnetDragging(t,e,n){if(!this.can("magnetConnectable"))return;t.stopPropagation();const r=t.currentTarget,i=this.graph;this.setEventData(t,{targetMagnet:r}),this.validateMagnet(this,r,t)?(i.options.magnetThreshold<=0&&this.startConnectting(t,r,e,n),this.setEventData(t,{action:"magnet"}),this.stopPropagation(t)):this.onMouseDown(t,e,n),i.view.delegateDragEvents(t,this)}startConnectting(t,e,n,r){this.graph.model.startBatch("add-edge");const i=this.createEdgeFromMagnet(e,n,r);i.setEventData(t,i.prepareArrowheadDragging("target",{x:n,y:r,isNewEdge:!0,fallbackAction:"remove"})),this.setEventData(t,{edgeView:i}),i.notifyMouseDown(t,n,r)}getDefaultEdge(t,e){let n;const r=this.graph.options.connecting.createEdge;return r&&(n=ef(r,this.graph,{sourceMagnet:e,sourceView:t,sourceCell:t.cell})),n}createEdgeFromMagnet(t,e,n){const r=this.graph,i=r.model,s=this.getDefaultEdge(this,t);return s.setSource(Object.assign(Object.assign({},s.getSource()),this.getEdgeTerminal(t,e,n,s,"source"))),s.setTarget(Object.assign(Object.assign({},s.getTarget()),{x:e,y:n})),s.addTo(i,{async:!1,ui:!0}),s.findView(r)}dragMagnet(t,e,n){const r=this.getEventData(t),i=r.edgeView;if(i)i.onMouseMove(t,e,n),this.autoScrollGraph(t.clientX,t.clientY);else{const i=this.graph,s=i.options.magnetThreshold,o=this.getEventTarget(t),a=r.targetMagnet;if("onleave"===s){if(a===o||a.contains(o))return}else if(i.view.getMouseMovedCount(t)<=s)return;this.startConnectting(t,a,e,n)}}stopMagnetDragging(t,e,n){const r=this.eventData(t).edgeView;r&&(r.onMouseUp(t,e,n),this.graph.model.stopBatch("add-edge"))}notifyUnhandledMouseDown(t,e,n){this.notify("node:unhandled:mousedown",{e:t,x:e,y:n,view:this,cell:this.cell,node:this.cell})}notifyNodeMove(t,e,n,r,i){let s=[i];const o=this.graph.getPlugin("selection");if(o&&o.isSelectionMovable()){const t=o.getSelectedCells();t.includes(i)&&(s=t.filter((t=>t.isNode())))}s.forEach((i=>{this.notify(t,{e:e,x:n,y:r,cell:i,node:i,view:i.findView(this.graph)})}))}getRestrictArea(t){const e=this.graph.options.translating.restrict,n="function"==typeof e?ef(e,this.graph,t):e;return"number"==typeof n?this.graph.transform.getGraphArea().inflate(n):!0===n?this.graph.transform.getGraphArea():n||null}startNodeDragging(t,e,n){const r=this.getDelegatedView();if(null==r||!r.can("nodeMovable"))return this.notifyUnhandledMouseDown(t,e,n);this.setEventData(t,{targetView:r,action:"move"});const i=ky.create(r.cell.getPosition());r.setEventData(t,{moving:!1,offset:i.diff(e,n),restrict:this.getRestrictArea(r)})}dragNode(e,n,r){const i=this.cell,s=this.graph,o=s.getGridSize(),a=this.getEventData(e),l=a.offset,c=a.restrict;a.moving||(a.moving=!0,this.addClass("node-moving"),this.notifyNodeMove("node:move",e,n,r,this.cell)),this.autoScrollGraph(e.clientX,e.clientY);const h=t.GeometryUtil.snapToGrid(n+l.x,o),u=t.GeometryUtil.snapToGrid(r+l.y,o);i.setPosition(h,u,{restrict:c,deep:!0,ui:!0}),s.options.embedding.enabled&&(a.embedding||(this.prepareEmbedding(e),a.embedding=!0),this.processEmbedding(e,a))}stopNodeDragging(t,e,n){const r=this.getEventData(t);r.embedding&&this.finalizeEmbedding(t,r),r.moving&&(this.removeClass("node-moving"),this.notifyNodeMove("node:moved",t,e,n,this.cell)),r.moving=!1,r.embedding=!1}autoScrollGraph(t,e){const n=this.graph.getPlugin("scroller");n&&n.autoScroll(t,e)}}!function(t){t.toStringTag=`X6.${t.name}`,t.isNodeView=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],r=e;return(null==n||n===t.toStringTag)&&"function"==typeof r.isNodeView&&"function"==typeof r.isEdgeView&&"function"==typeof r.confirmUpdate&&"function"==typeof r.update&&"function"==typeof r.findPortElem&&"function"==typeof r.resize&&"function"==typeof r.rotate&&"function"==typeof r.translate}}(uA||(uA={})),uA.config({isSvgElement:!0,priority:0,bootstrap:["render"],actions:{view:["render"],markup:["render"],attrs:["update"],size:["resize","ports","tools"],angle:["rotate","tools"],position:["translate","tools"],ports:["ports"],tools:["tools"]}}),uA.registry.register("node",uA,!0);class gA extends ax{constructor(){super(...arguments),this.POINT_ROUNDING=2}get[Symbol.toStringTag](){return gA.toStringTag}getContainerClassName(){return[super.getContainerClassName(),this.prefixClassName("edge")].join(" ")}get sourceBBox(){const t=this.sourceView;if(!t){const t=this.cell.getSource();return new Ny(t.x,t.y)}const e=this.sourceMagnet;return t.isEdgeElement(e)?new Ny(this.sourceAnchor.x,this.sourceAnchor.y):t.getBBoxOfElement(e||t.container)}get targetBBox(){const t=this.targetView;if(!t){const t=this.cell.getTarget();return new Ny(t.x,t.y)}const e=this.targetMagnet;return t.isEdgeElement(e)?new Ny(this.targetAnchor.x,this.targetAnchor.y):t.getBBoxOfElement(e||t.container)}isEdgeView(){return!0}confirmUpdate(t,e={}){let n=t;if(this.hasAction(n,"source")){if(!this.updateTerminalProperties("source"))return n;n=this.removeAction(n,"source")}if(this.hasAction(n,"target")){if(!this.updateTerminalProperties("target"))return n;n=this.removeAction(n,"target")}return this.hasAction(n,"render")?(this.render(),n=this.removeAction(n,["render","update","labels","tools"]),n):(n=this.handleAction(n,"update",(()=>this.update(e))),n=this.handleAction(n,"labels",(()=>this.onLabelsChange(e))),n=this.handleAction(n,"tools",(()=>this.renderTools())),n)}render(){return this.empty(),this.renderMarkup(),this.labelContainer=null,this.renderLabels(),this.update(),this.renderTools(),this}renderMarkup(){const t=this.cell.markup;if(t){if("string"==typeof t)throw new TypeError("Not support string markup.");return this.renderJSONMarkup(t)}throw new TypeError("Invalid edge markup.")}renderJSONMarkup(t){const e=this.parseJSONMarkup(t,this.container);this.selectors=e.selectors,this.container.append(e.fragment)}customizeLabels(){if(this.labelContainer){const t=this.cell,e=t.labels;for(let n=0,r=e.length;n1){if(e[n[1]]){if(2===r)return"object"==typeof t.propertyValue&&dc(t.propertyValue,"markup");if("markup"!==n[2])return!1}}}return!0}parseLabelMarkup(t){return t?"string"==typeof t?this.parseLabelStringMarkup(t):this.parseJSONMarkup(t):null}parseLabelStringMarkup(t){const e=fm.createVectors(t),n=document.createDocumentFragment();for(let t=0,r=e.length;t1||"G"!==r[0].nodeName.toUpperCase()?fm.create("g").append(e):fm.create(r[0]),n.addClass(this.prefixClassName("edge-label")),{node:n.node,selectors:t.selectors}}updateLabels(){if(this.labelContainer){const t=this.cell,e=t.labels,n=this.can("edgeLabelMovable"),r=t.getDefaultLabel();for(let t=0,i=e.length;tt.toJSON())),a=o.length;return i===a?0:(e.setVertices(o.slice(1,a-1),t),i-a)}getTerminalView(t){switch(t){case"source":return this.sourceView||null;case"target":return this.targetView||null;default:throw new Error(`Unknown terminal type '${t}'`)}}getTerminalAnchor(t){switch(t){case"source":return ky.create(this.sourceAnchor);case"target":return ky.create(this.targetAnchor);default:throw new Error(`Unknown terminal type '${t}'`)}}getTerminalConnectionPoint(t){switch(t){case"source":return ky.create(this.sourcePoint);case"target":return ky.create(this.targetPoint);default:throw new Error(`Unknown terminal type '${t}'`)}}getTerminalMagnet(t,e={}){switch(t){case"source":{if(e.raw)return this.sourceMagnet;const t=this.sourceView;return t?this.sourceMagnet||t.container:null}case"target":{if(e.raw)return this.targetMagnet;const t=this.targetView;return t?this.targetMagnet||t.container:null}default:throw new Error(`Unknown terminal type '${t}'`)}}updateConnection(t={}){const e=this.cell;if(t.translateBy&&e.isFragmentDescendantOf(t.translateBy)){const e=t.tx||0,n=t.ty||0;this.routePoints=new zy(this.routePoints).translate(e,n).points,this.translateConnectionPoints(e,n),this.path.translate(e,n)}else{const t=e.getVertices(),n=this.findAnchors(t);this.sourceAnchor=n.source,this.targetAnchor=n.target,this.routePoints=this.findRoutePoints(t);const r=this.findConnectionPoints(this.routePoints,this.sourceAnchor,this.targetAnchor);this.sourcePoint=r.source,this.targetPoint=r.target;const i=this.findMarkerPoints(this.routePoints,this.sourcePoint,this.targetPoint);this.path=this.findPath(this.routePoints,i.source||this.sourcePoint,i.target||this.targetPoint)}this.cleanCache()}findAnchors(t){const e=this.cell,n=e.source,r=e.target,i=t[0],s=t[t.length-1];return r.priority&&!n.priority?this.findAnchorsOrdered("target",s,"source",i):this.findAnchorsOrdered("source",i,"target",s)}findAnchorsOrdered(t,e,n,r){let i,s;const o=this.cell,a=o[t],l=o[n],c=this.getTerminalView(t),h=this.getTerminalView(n),u=this.getTerminalMagnet(t),g=this.getTerminalMagnet(n);if(c){let n;n=e?ky.create(e):h?g:ky.create(l),i=this.getAnchor(a.anchor,c,u,n,t)}else i=ky.create(a);if(h){const t=ky.create(r||i);s=this.getAnchor(l.anchor,h,g,t,n)}else s=ky.isPointLike(l)?ky.create(l):new ky;return{[t]:i,[n]:s}}getAnchor(t,e,n,r,i){const s=e.isEdgeElement(n),o=this.graph.options.connecting;let a,l="string"==typeof t?{name:t}:t;if(!l){const t=s?("source"===i?o.sourceEdgeAnchor:o.targetEdgeAnchor)||o.edgeAnchor:("source"===i?o.sourceAnchor:o.targetAnchor)||o.anchor;l="string"==typeof t?{name:t}:t}if(!l)throw new Error("Anchor should be specified.");const c=l.name;if(s){const t=Xx.registry.get(c);if("function"!=typeof t)return Xx.registry.onNotFound(c);a=ef(t,this,e,n,r,l.args||{},i)}else{const t=Ux.registry.get(c);if("function"!=typeof t)return Ux.registry.onNotFound(c);a=ef(t,this,e,n,r,l.args||{},i)}return a?a.round(this.POINT_ROUNDING):new ky}findRoutePoints(t=[]){const e=this.graph.options.connecting.router||kw.presets.normal,n=this.cell.getRouter()||e;let r;if("function"==typeof n)r=ef(n,this,t,{},this);else{const e="string"==typeof n?n:n.name,i="string"==typeof n?{}:n.args||{},s=e?kw.registry.get(e):kw.presets.normal;if("function"!=typeof s)return kw.registry.onNotFound(e);r=ef(s,this,t,i,this)}return null==r?t.map((t=>ky.create(t))):r.map((t=>ky.create(t)))}findConnectionPoints(t,e,n){const r=this.cell,i=this.graph.options.connecting,s=r.getSource(),o=r.getTarget(),a=this.sourceView,l=this.targetView,c=t[0],h=t[t.length-1];let u,g;if(a&&!a.isEdgeElement(this.sourceMagnet)){const t=this.sourceMagnet||a.container,r=new jy(c||n,e),o=s.connectionPoint||i.sourceConnectionPoint||i.connectionPoint;u=this.getConnectionPoint(o,a,t,r,"source")}else u=e;if(l&&!l.isEdgeElement(this.targetMagnet)){const t=this.targetMagnet||l.container,r=o.connectionPoint||i.targetConnectionPoint||i.connectionPoint,s=new jy(h||e,n);g=this.getConnectionPoint(r,l,t,s,"target")}else g=n;return{source:u,target:g}}getConnectionPoint(t,e,n,r,i){const s=r.end;if(null==t)return s;const o="string"==typeof t?t:t.name,a="string"==typeof t?{}:t.args,l=tw.registry.get(o);if("function"!=typeof l)return tw.registry.onNotFound(o);const c=ef(l,this,r,e,n,a||{},i);return c?c.round(this.POINT_ROUNDING):s}findMarkerPoints(t,e,n){const r=t=>{const e=this.cell.getAttrs(),n=Object.keys(e);for(let r=0,i=n.length;r0?y/f:0),c&&(y=-1*(f-y)||1),i.distance=y,a||(p=h.tangentAtT(d)),p)m=p.pointOffset(g);else{const t=h.pointAtT(d),e=g.diff(t);m={x:e.x,y:e.y}}return i.offset=m,i.angle=o,i}normalizeLabelPosition(t){return"number"==typeof t?{distance:t}:t}getLabelTransformationMatrix(e){const n=this.normalizeLabelPosition(e),r=n.options||{},i=n.angle||0,s=n.distance,o=s>0&&s<=1;let a=0;const l={x:0,y:0},c=n.offset;c&&("number"==typeof c?a=c:(null!=c.x&&(l.x=c.x),null!=c.y&&(l.y=c.y)));const h=0!==l.x||0!==l.y||0===a,u=r.keepGradient,g=r.ensureLegibility,d=this.path,f={segmentSubdivisions:this.getConnectionSubdivisions()},p=o?s*this.getConnectionLength():s,m=d.tangentAtLength(p,f);let y,v=i;if(m){if(h)y=m.start,y.translate(l);else{const t=m.clone();t.rotate(-90,m.start),t.setLength(a),y=t.end}u&&(v=m.angle()+i,g&&(v=t.Angle.normalize((v+90)%180-90)))}else y=d.start,h&&y.translate(l);return Fm().translate(y.x,y.y).rotate(v)}getVertexIndex(t,e){const n=this.cell.getVertices(),r=this.getClosestPointLength(new ky(t,e));let i=0;if(null!=r)for(const t=n.length;i(e[i]=t,e[i+1]=t.container===n?void 0:n,e)}beforeArrowheadDragging(t){t.zIndex=this.cell.zIndex,this.cell.toFront();const e=this.container.style;t.pointerEvents=e.pointerEvents,e.pointerEvents="none",this.graph.options.connecting.highlight&&this.highlightAvailableMagnets(t)}afterArrowheadDragging(t){null!=t.zIndex&&(this.cell.setZIndex(t.zIndex,{ui:!0}),t.zIndex=null);this.container.style.pointerEvents=t.pointerEvents||"",this.graph.options.connecting.highlight&&this.unhighlightAvailableMagnets(t)}validateConnection(t,e,n,r,i,s,o){const a=this.graph.options.connecting,l=a.allowLoop,c=a.allowNode,h=a.allowEdge,u=a.allowPort,g=a.allowMulti,d=a.validateConnection,f=s?s.cell:null,p="target"===i?n:t,m="target"===i?r:e;let y=!0;const v=a=>{const l="source"===i?o?o.port:null:f?f.getSourcePortId():null,c="target"===i?o?o.port:null:f?f.getTargetPortId():null;return ef(a,this.graph,{edge:f,edgeView:s,sourceView:t,targetView:n,sourcePort:l,targetPort:c,sourceMagnet:e,targetMagnet:r,sourceCell:t?t.cell:null,targetCell:n?n.cell:null,type:i})};if(null!=l&&("boolean"==typeof l?l||t!==n||(y=!1):y=v(l)),y&&null!=u&&("boolean"==typeof u?!u&&m&&(y=!1):y=v(u)),y&&null!=h&&("boolean"==typeof h?!h&&gA.isEdgeView(p)&&(y=!1):y=v(h)),y&&null!=c&&null==m&&("boolean"==typeof c?!c&&uA.isNodeView(p)&&(y=!1):y=v(c)),y&&null!=g&&s){const t=s.cell,e="source"===i?o:t.getSource(),n="target"===i?o:t.getTarget(),r=o?this.graph.getCellById(o.cell):null;if(e&&n&&e.cell&&n.cell&&r)if("function"==typeof g)y=v(g);else{const t=this.graph.model.getConnectedEdges(r,{outgoing:"source"===i,incoming:"target"===i});if(t.length)if("withPort"===g){t.some((t=>{const r=t.getSource(),i=t.getTarget();return r&&i&&r.cell===e.cell&&i.cell===n.cell&&null!=r.port&&r.port===e.port&&null!=i.port&&i.port===n.port}))&&(y=!1)}else if(!g){t.some((t=>{const r=t.getSource(),i=t.getTarget();return r&&i&&r.cell===e.cell&&i.cell===n.cell}))&&(y=!1)}}}return y&&null!=d&&(y=v(d)),y}allowConnectToBlank(t){const e=this.graph,n=e.options.connecting.allowBlank;if("function"!=typeof n)return!!n;const r=e.findViewByCell(t),i=t.getSourceCell(),s=t.getTargetCell(),o=e.findViewByCell(i),a=e.findViewByCell(s);return ef(n,e,{edge:t,edgeView:r,sourceCell:i,targetCell:s,sourceView:o,targetView:a,sourcePort:t.getSourcePortId(),targetPort:t.getTargetPortId(),sourceMagnet:r.sourceMagnet,targetMagnet:r.targetMagnet})}validateEdge(t,e,n){const r=this.graph;if(!this.allowConnectToBlank(t)){const e=t.getSourceCellId(),n=t.getTargetCellId();if(!e||!n)return!1}const i=r.options.connecting.validateEdge;return!i||ef(i,r,{edge:t,type:e,previous:n})}arrowheadDragging(t,e,n,r){r.x=e,r.y=n,r.currentTarget!==t&&(r.currentMagnet&&r.currentView&&r.currentView.unhighlight(r.currentMagnet,{type:"magnetAdsorbed"}),r.currentView=this.graph.findViewByElem(t),r.currentView?(r.currentMagnet=r.currentView.findMagnet(t),r.currentMagnet&&this.validateConnection(...r.getValidateConnectionArgs(r.currentView,r.currentMagnet),r.currentView.getEdgeTerminal(r.currentMagnet,e,n,this.cell,r.terminalType))?r.currentView.highlight(r.currentMagnet,{type:"magnetAdsorbed"}):r.currentMagnet=null):r.currentMagnet=null),r.currentTarget=t,this.cell.prop(r.terminalType,{x:e,y:n},Object.assign(Object.assign({},r.options),{ui:!0}))}arrowheadDragged(t,e,n){const r=t.currentView,i=t.currentMagnet;if(!i||!r)return;r.unhighlight(i,{type:"magnetAdsorbed"});const s=t.terminalType,o=r.getEdgeTerminal(i,e,n,this.cell,s);this.cell.setTerminal(s,o,{ui:!0})}snapArrowhead(t,e,n){const r=this.graph,{snap:i,allowEdge:s}=r.options.connecting,o="object"==typeof i&&i.radius||50,a=r.renderer.findViewsInArea({x:t-o,y:e-o,width:2*o,height:2*o},{nodeOnly:!0});if(s){const n=r.renderer.findEdgeViewsFromPoint({x:t,y:e},o).filter((t=>t!==this));a.push(...n)}const l=n.closestView||null,c=n.closestMagnet||null;let h;n.closestView=null,n.closestMagnet=null;let u=Number.MAX_SAFE_INTEGER;const g=new ky(t,e);let d;a.forEach((r=>{if("false"!==r.container.getAttribute("magnet")){if(r.isNodeView())h=r.cell.getBBox().getCenter().distance(g);else if(r.isEdgeView()){const t=r.getClosestPoint(g);h=t?t.distance(g):Number.MAX_SAFE_INTEGER}h{if("false"!==i.getAttribute("magnet")){const s=r.getBBoxOfElement(i);h=g.distance(s.getCenter()),hthis.validateConnection(...t.getValidateConnectionArgs(i,e),i.getEdgeTerminal(e,t.x,t.y,this.cell,t.terminalType))));if(o.length>0){for(let t=0,e=o.length;t{const n=this.graph.findViewByCell(t);if(n){e[t].forEach((t=>{n.unhighlight(t,{type:"magnetAvailable"})})),n.unhighlight(null,{type:"nodeAvailable"})}})),t.marked=null}startArrowheadDragging(t,e,n){if(!this.can("arrowheadMovable"))return void this.notifyUnhandledMouseDown(t,e,n);const r=t.target.getAttribute("data-terminal"),i=this.prepareArrowheadDragging(r,{x:e,y:n});this.setEventData(t,i)}dragArrowhead(t,e,n){const r=this.getEventData(t);this.graph.options.connecting.snap?this.snapArrowhead(e,n,r):this.arrowheadDragging(this.getEventTarget(t),e,n,r)}stopArrowheadDragging(t,e,n){const r=this.graph,i=this.getEventData(t);r.options.connecting.snap?this.snapArrowheadEnd(i):this.arrowheadDragged(i,e,n);this.validateEdge(this.cell,i.terminalType,i.initialTerminal)?(this.finishEmbedding(i),this.notifyConnectionEvent(i,t)):this.fallbackConnection(i),this.afterArrowheadDragging(i)}startLabelDragging(t,e,n){if(this.can("edgeLabelMovable")){const e=t.currentTarget,n=parseInt(e.getAttribute("data-index"),10),r=this.getLabelPositionAngle(n),i=this.getLabelPositionArgs(n),s=this.getDefaultLabelPositionArgs(),o=this.mergeLabelPositionArgs(i,s);this.setEventData(t,{index:n,positionAngle:r,positionArgs:o,stopPropagation:!0,action:"drag-label"})}else this.setEventData(t,{stopPropagation:!0});this.graph.view.delegateDragEvents(t,this)}dragLabel(t,e,n){const r=this.getEventData(t),i=this.cell.getLabelAt(r.index),s=Sh({},i,{position:this.getLabelPosition(e,n,r.positionAngle,r.positionArgs)});this.cell.setLabelAt(r.index,s)}stopLabelDragging(t,e,n){}}!function(t){t.toStringTag=`X6.${t.name}`,t.isEdgeView=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],r=e;return(null==n||n===t.toStringTag)&&"function"==typeof r.isNodeView&&"function"==typeof r.isEdgeView&&"function"==typeof r.confirmUpdate&&"function"==typeof r.update&&"function"==typeof r.getConnection}}(gA||(gA={})),gA.config({isSvgElement:!0,priority:1,bootstrap:["render","source","target"],actions:{view:["render"],markup:["render"],attrs:["update"],source:["source","update"],target:["target","update"],router:["update"],connector:["update"],labels:["labels"],defaultLabel:["labels"],tools:["tools"],vertices:["vertices","update"]}}),gA.registry.register("edge",gA,!0);class dA extends rx{get options(){return this.graph.options}constructor(e){super(),this.graph=e;const{selectors:n,fragment:r}=t.Markup.parseJSONMarkup(dA.markup);this.background=n.background,this.grid=n.grid,this.svg=n.svg,this.defs=n.defs,this.viewport=n.viewport,this.primer=n.primer,this.stage=n.stage,this.decorator=n.decorator,this.overlay=n.overlay,this.container=this.options.container,this.restore=dA.snapshoot(this.container),lp(this.container,this.prefixClassName("graph")),kp(this.container,r),this.delegateEvents()}delegateEvents(){const t=this.constructor;return super.delegateEvents(t.events),this}guard(t,e){return"mousedown"===t.type&&2===t.button||(!(!this.options.guard||!this.options.guard(t,e))||(t.data&&void 0!==t.data.guarded?t.data.guarded:!(e&&e.cell&&Ww.isCell(e.cell))&&(this.svg!==t.target&&this.container!==t.target&&!this.svg.contains(t.target))))}findView(t){return this.graph.findViewByElem(t)}onDblClick(t){this.options.preventDefaultDblClick&&t.preventDefault();const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onDblClick(e,r.x,r.y):this.graph.trigger("blank:dblclick",{e:e,x:r.x,y:r.y})}onClick(t){if(this.getMouseMovedCount(t)<=this.options.clickThreshold){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onClick(e,r.x,r.y):this.graph.trigger("blank:click",{e:e,x:r.x,y:r.y})}}isPreventDefaultContextMenu(t){let e=this.options.preventDefaultContextMenu;return"function"==typeof e&&(e=ef(e,this.graph,{view:t})),e}onContextMenu(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.isPreventDefaultContextMenu(n)&&t.preventDefault(),this.guard(e,n))return;const r=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onContextMenu(e,r.x,r.y):this.graph.trigger("blank:contextmenu",{e:e,x:r.x,y:r.y})}delegateDragEvents(t,e){null==t.data&&(t.data={}),this.setEventData(t,{currentView:e||null,mouseMovedCount:0,startPosition:{x:t.clientX,y:t.clientY}});const n=this.constructor;this.delegateDocumentEvents(n.documentEvents,t.data),this.undelegateEvents()}getMouseMovedCount(t){return this.getEventData(t).mouseMovedCount||0}onMouseDown(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;this.options.preventDefaultMouseDown&&t.preventDefault();const r=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onMouseDown(e,r.x,r.y):(this.options.preventDefaultBlankAction&&["touchstart"].includes(e.type)&&t.preventDefault(),this.graph.trigger("blank:mousedown",{e:e,x:r.x,y:r.y})),this.delegateDragEvents(e,n)}onMouseMove(t){const e=this.getEventData(t),n=e.startPosition;if(n&&n.x===t.clientX&&n.y===t.clientY)return;null==e.mouseMovedCount&&(e.mouseMovedCount=0),e.mouseMovedCount+=1;if(e.mouseMovedCount<=this.options.moveThreshold)return;const r=this.normalizeEvent(t),i=this.graph.snapToGrid(r.clientX,r.clientY),s=e.currentView;s?s.onMouseMove(r,i.x,i.y):this.graph.trigger("blank:mousemove",{e:r,x:i.x,y:i.y}),this.setEventData(r,e)}onMouseUp(t){this.undelegateDocumentEvents();const e=this.normalizeEvent(t),n=this.graph.snapToGrid(e.clientX,e.clientY),r=this.getEventData(t).currentView;if(r?r.onMouseUp(e,n.x,n.y):this.graph.trigger("blank:mouseup",{e:e,x:n.x,y:n.y}),!t.isPropagationStopped()){const e=new ly(t,{type:"click",data:t.data});this.onClick(e)}t.stopImmediatePropagation(),this.delegateEvents()}onMouseOver(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(!this.guard(e,n))if(n)n.onMouseOver(e);else{if(this.container===e.target)return;this.graph.trigger("blank:mouseover",{e:e})}}onMouseOut(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(!this.guard(e,n))if(n)n.onMouseOut(e);else{if(this.container===e.target)return;this.graph.trigger("blank:mouseout",{e:e})}}onMouseEnter(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=this.graph.findViewByElem(e.relatedTarget);if(n){if(r===n)return;n.onMouseEnter(e)}else{if(r)return;this.graph.trigger("graph:mouseenter",{e:e})}}onMouseLeave(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=this.graph.findViewByElem(e.relatedTarget);if(n){if(r===n)return;n.onMouseLeave(e)}else{if(r)return;this.graph.trigger("graph:mouseleave",{e:e})}}onMouseWheel(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const r=e.originalEvent,i=this.graph.snapToGrid(r.clientX,r.clientY),s=Math.max(-1,Math.min(1,r.wheelDelta||-r.detail));n?n.onMouseWheel(e,i.x,i.y,s):this.graph.trigger("blank:mousewheel",{e:e,delta:s,x:i.x,y:i.y})}onCustomEvent(t){const e=t.currentTarget,n=e.getAttribute("event")||e.getAttribute("data-event");if(n){const r=this.findView(e);if(r){const e=this.normalizeEvent(t);if(this.guard(e,r))return;const i=this.graph.snapToGrid(e.clientX,e.clientY);r.onCustomEvent(e,n,i.x,i.y)}}}handleMagnetEvent(t,e){const n=t.currentTarget,r=n.getAttribute("magnet");if(r&&"false"!==r.toLowerCase()){const r=this.findView(n);if(r){const i=this.normalizeEvent(t);if(this.guard(i,r))return;const s=this.graph.snapToGrid(i.clientX,i.clientY);ef(e,this.graph,r,i,n,s.x,s.y)}}}onMagnetMouseDown(t){this.handleMagnetEvent(t,((t,e,n,r,i)=>{t.onMagnetMouseDown(e,n,r,i)}))}onMagnetDblClick(t){this.handleMagnetEvent(t,((t,e,n,r,i)=>{t.onMagnetDblClick(e,n,r,i)}))}onMagnetContextMenu(t){const e=this.findView(t.target);this.isPreventDefaultContextMenu(e)&&t.preventDefault(),this.handleMagnetEvent(t,((t,e,n,r,i)=>{t.onMagnetContextMenu(e,n,r,i)}))}onLabelMouseDown(t){const e=t.currentTarget,n=this.findView(e);if(n){const e=this.normalizeEvent(t);if(this.guard(e,n))return;const r=this.graph.snapToGrid(e.clientX,e.clientY);n.onLabelMouseDown(e,r.x,r.y)}}onImageDragStart(){return!1}dispose(){this.undelegateEvents(),this.undelegateDocumentEvents(),this.restore(),this.restore=()=>{}}}n([rx.dispose()],dA.prototype,"dispose",null),function(t){const e=`${jb.prefixCls}-graph`;t.markup=[{ns:pp.xhtml,tagName:"div",selector:"background",className:`${e}-background`},{ns:pp.xhtml,tagName:"div",selector:"grid",className:`${e}-grid`},{ns:pp.svg,tagName:"svg",selector:"svg",className:`${e}-svg`,attrs:{width:"100%",height:"100%","xmlns:xlink":pp.xlink},children:[{tagName:"defs",selector:"defs"},{tagName:"g",selector:"viewport",className:`${e}-svg-viewport`,children:[{tagName:"g",selector:"primer",className:`${e}-svg-primer`},{tagName:"g",selector:"stage",className:`${e}-svg-stage`},{tagName:"g",selector:"decorator",className:`${e}-svg-decorator`},{tagName:"g",selector:"overlay",className:`${e}-svg-overlay`}]}]}],t.snapshoot=function(t){const e=t.cloneNode();return t.childNodes.forEach((t=>e.appendChild(t))),()=>{for(Tp(t);t.attributes.length>0;)t.removeAttribute(t.attributes[0].name);for(let n=0,r=e.attributes.length;nt.appendChild(e)))}}}(dA||(dA={})),function(t){const e=jb.prefixCls;t.events={dblclick:"onDblClick",contextmenu:"onContextMenu",touchstart:"onMouseDown",mousedown:"onMouseDown",mouseover:"onMouseOver",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousewheel:"onMouseWheel",DOMMouseScroll:"onMouseWheel",[`mouseenter .${e}-cell`]:"onMouseEnter",[`mouseleave .${e}-cell`]:"onMouseLeave",[`mouseenter .${e}-cell-tools`]:"onMouseEnter",[`mouseleave .${e}-cell-tools`]:"onMouseLeave",[`mousedown .${e}-cell [event]`]:"onCustomEvent",[`touchstart .${e}-cell [event]`]:"onCustomEvent",[`mousedown .${e}-cell [data-event]`]:"onCustomEvent",[`touchstart .${e}-cell [data-event]`]:"onCustomEvent",[`dblclick .${e}-cell [magnet]`]:"onMagnetDblClick",[`contextmenu .${e}-cell [magnet]`]:"onMagnetContextMenu",[`mousedown .${e}-cell [magnet]`]:"onMagnetMouseDown",[`touchstart .${e}-cell [magnet]`]:"onMagnetMouseDown",[`dblclick .${e}-cell [data-magnet]`]:"onMagnetDblClick",[`contextmenu .${e}-cell [data-magnet]`]:"onMagnetContextMenu",[`mousedown .${e}-cell [data-magnet]`]:"onMagnetMouseDown",[`touchstart .${e}-cell [data-magnet]`]:"onMagnetMouseDown",[`dragstart .${e}-cell image`]:"onImageDragStart",[`mousedown .${e}-edge .${e}-edge-label`]:"onLabelMouseDown",[`touchstart .${e}-edge .${e}-edge-label`]:"onLabelMouseDown"},t.documentEvents={mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"}}(dA||(dA={}));class fA extends r{get options(){return this.graph.options}get model(){return this.graph.model}get view(){return this.graph.view}constructor(t){super(),this.graph=t,this.init()}init(){}}class pA extends fA{init(){jb.autoInsertCSS&&Py("core",".x6-graph {\n position: relative;\n overflow: hidden;\n outline: none;\n touch-action: none;\n}\n.x6-graph-background,\n.x6-graph-grid,\n.x6-graph-svg {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n.x6-graph-background-stage,\n.x6-graph-grid-stage,\n.x6-graph-svg-stage {\n user-select: none;\n}\n.x6-graph.x6-graph-pannable {\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n.x6-graph.x6-graph-panning {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n}\n.x6-node {\n cursor: move;\n /* stylelint-disable-next-line */\n}\n.x6-node.x6-node-immovable {\n cursor: default;\n}\n.x6-node * {\n -webkit-user-drag: none;\n}\n.x6-node .scalable * {\n vector-effect: non-scaling-stroke;\n}\n.x6-node [magnet='true'] {\n cursor: crosshair;\n transition: opacity 0.3s;\n}\n.x6-node [magnet='true']:hover {\n opacity: 0.7;\n}\n.x6-node foreignObject {\n display: block;\n overflow: visible;\n background-color: transparent;\n}\n.x6-node foreignObject > body {\n position: static;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: visible;\n background-color: transparent;\n}\n.x6-edge .source-marker,\n.x6-edge .target-marker {\n vector-effect: non-scaling-stroke;\n}\n.x6-edge .connection {\n stroke-linejoin: round;\n fill: none;\n}\n.x6-edge .connection-wrap {\n cursor: move;\n opacity: 0;\n fill: none;\n stroke: #000;\n stroke-width: 15;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.x6-edge .connection-wrap:hover {\n opacity: 0.4;\n stroke-opacity: 0.4;\n}\n.x6-edge .vertices {\n cursor: move;\n opacity: 0;\n}\n.x6-edge .vertices .vertex {\n fill: #1abc9c;\n}\n.x6-edge .vertices .vertex :hover {\n fill: #34495e;\n stroke: none;\n}\n.x6-edge .vertices .vertex-remove {\n cursor: pointer;\n fill: #fff;\n}\n.x6-edge .vertices .vertex-remove-area {\n cursor: pointer;\n opacity: 0.1;\n}\n.x6-edge .vertices .vertex-group:hover .vertex-remove-area {\n opacity: 1;\n}\n.x6-edge .arrowheads {\n cursor: move;\n opacity: 0;\n}\n.x6-edge .arrowheads .arrowhead {\n fill: #1abc9c;\n}\n.x6-edge .arrowheads .arrowhead :hover {\n fill: #f39c12;\n stroke: none;\n}\n.x6-edge .tools {\n cursor: pointer;\n opacity: 0;\n}\n.x6-edge .tools .tool-options {\n display: none;\n}\n.x6-edge .tools .tool-remove circle {\n fill: #f00;\n}\n.x6-edge .tools .tool-remove path {\n fill: #fff;\n}\n.x6-edge:hover .vertices,\n.x6-edge:hover .arrowheads,\n.x6-edge:hover .tools {\n opacity: 1;\n}\n.x6-highlight-opacity {\n opacity: 0.3;\n}\n.x6-cell-tool-editor {\n position: relative;\n display: inline-block;\n min-height: 1em;\n margin: 0;\n padding: 0;\n line-height: 1;\n white-space: normal;\n text-align: center;\n vertical-align: top;\n overflow-wrap: normal;\n outline: none;\n transform-origin: 0 0;\n -webkit-user-drag: none;\n}\n.x6-edge-tool-editor {\n border: 1px solid #275fc5;\n border-radius: 2px;\n}\n")}dispose(){My("core")}}var mA,yA;n([pA.dispose()],pA.prototype,"dispose",null),t.Options=void 0,(mA=t.Options||(t.Options={})).get=function(t){const{grid:n,panning:r,mousewheel:i,embedding:s}=t,o=e(t,["grid","panning","mousewheel","embedding"]),a=t.container;if(null==a)throw new Error("Ensure the container of the graph is specified and valid");null==o.width&&(o.width=a.clientWidth),null==o.height&&(o.height=a.clientHeight);const l=Sh({},mA.defaults,o),c={size:10,visible:!1};return l.grid="number"==typeof n?{size:n,visible:!1}:"boolean"==typeof n?Object.assign(Object.assign({},c),{visible:n}):Object.assign(Object.assign({},c),n),["panning","mousewheel","embedding"].forEach((e=>{const n=t[e];"boolean"==typeof n?l[e].enabled=n:l[e]=Object.assign(Object.assign({},l[e]),n)})),l},function(t){t.defaults={x:0,y:0,scaling:{min:.01,max:16},grid:{size:10,visible:!1},background:!1,panning:{enabled:!1,eventTypes:["leftMouseDown"]},mousewheel:{enabled:!1,factor:1.2,zoomAtMousePosition:!0},highlighting:{default:{name:"stroke",args:{padding:3}},nodeAvailable:{name:"className",args:{className:jb.prefix("available-node")}},magnetAvailable:{name:"className",args:{className:jb.prefix("available-magnet")}}},connecting:{snap:!1,allowLoop:!0,allowNode:!0,allowEdge:!1,allowPort:!0,allowBlank:!0,allowMulti:!0,highlight:!1,anchor:"center",edgeAnchor:"ratio",connectionPoint:"boundary",router:"normal",connector:"normal",validateConnection:({type:t,sourceView:e,targetView:n})=>null!=("target"===t?n:e),createEdge:()=>new nA},translating:{restrict:!1},embedding:{enabled:!1,findParent:"bbox",frontOnly:!0,validate:()=>!0},moveThreshold:0,clickThreshold:0,magnetThreshold:0,preventDefaultDblClick:!0,preventDefaultMouseDown:!1,preventDefaultContextMenu:!0,preventDefaultBlankAction:!0,interacting:{edgeLabelMovable:!1},async:!0,virtual:!1,guard:()=>!1}}(t.Options||(t.Options={}));class vA extends fA{get elem(){return this.view.grid}get grid(){return this.options.grid}init(){this.startListening(),this.draw(this.grid)}startListening(){this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this)}stopListening(){this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this)}setVisible(t){this.grid.visible!==t&&(this.grid.visible=t,this.update())}getGridSize(){return this.grid.size}setGridSize(t){this.grid.size=Math.max(t,1),this.update()}show(){this.setVisible(!0),this.update()}hide(){this.setVisible(!1),this.update()}clear(){this.elem.style.backgroundImage=""}draw(t){this.clear(),this.instance=null,Object.assign(this.grid,t),this.patterns=this.resolveGrid(t),this.update()}update(t={}){const n=this.grid.size;if(n<=1||!this.grid.visible)return this.clear();const r=this.graph.matrix(),i=this.getInstance(),s=Array.isArray(t)?t:[t];this.patterns.forEach(((t,o)=>{const a=`pattern_${o}`,l=r.a||1,c=r.d||1,{update:h,markup:u}=t,g=e(t,["update","markup"]),d=Object.assign(Object.assign(Object.assign({},g),s[o]),{sx:l,sy:c,ox:r.e||0,oy:r.f||0,width:n*l,height:n*c});i.has(a)||i.add(a,fm.create("pattern",{id:a,patternUnits:"userSpaceOnUse"},fm.createVectors(u)).node);const f=i.get(a);"function"==typeof h&&h(f.childNodes[0],d);let p=d.ox%d.width;p<0&&(p+=d.width);let m=d.oy%d.height;m<0&&(m+=d.height),$p(f,{x:p,y:m,width:d.width,height:d.height})}));const o=(new XMLSerializer).serializeToString(i.root),a=`url(data:image/svg+xml;base64,${btoa(o)})`;this.elem.style.backgroundImage=a}getInstance(){return this.instance||(this.instance=new ov),this.instance}resolveGrid(t){if(!t)return[];const e=t.type;if(null==e)return[Object.assign(Object.assign({},ov.presets.dot),t.args)];const n=ov.registry.get(e);if(n){let e=t.args||[];return Array.isArray(e)||(e=[e]),Array.isArray(n)?n.map(((t,n)=>Object.assign(Object.assign({},t),e[n]))):[Object.assign(Object.assign({},n),e[0])]}return ov.registry.onNotFound(e)}dispose(){this.stopListening(),this.clear()}}n([fA.dispose()],vA.prototype,"dispose",null);class bA extends fA{get container(){return this.graph.view.container}get viewport(){return this.graph.view.viewport}get stage(){return this.graph.view.stage}init(){this.resize()}getMatrix(){const t=this.viewport.getAttribute("transform");return t!==this.viewportTransformString&&(this.viewportMatrix=this.viewport.getCTM(),this.viewportTransformString=t),Fm(this.viewportMatrix)}setMatrix(t){const e=Fm(t),n=qm(e);this.viewport.setAttribute("transform",n),this.viewportMatrix=e,this.viewportTransformString=n}resize(t,e){let n=void 0===t?this.options.width:t,r=void 0===e?this.options.height:e;this.options.width=n,this.options.height=r,"number"==typeof n&&(n=Math.round(n)),"number"==typeof r&&(r=Math.round(r)),this.container.style.width=null==n?"":`${n}px`,this.container.style.height=null==r?"":`${r}px`;const i=this.getComputedSize();return this.graph.trigger("resize",Object.assign({},i)),this}getComputedSize(){let t=this.options.width,e=this.options.height;return th(t)||(t=this.container.clientWidth),th(e)||(e=this.container.clientHeight),{width:t,height:e}}getScale(){return Xm(this.getMatrix())}scale(t,e=t,n=0,r=0){if(t=this.clampScale(t),e=this.clampScale(e),n||r){const i=this.getTranslation(),s=i.tx-n*(t-1),o=i.ty-r*(e-1);s===i.tx&&o===i.ty||this.translate(s,o)}const i=this.getMatrix();return i.a=t,i.d=e,this.setMatrix(i),this.graph.trigger("scale",{sx:t,sy:e,ox:n,oy:r}),this}clampScale(t){const e=this.graph.options.scaling;return Hi(t,e.min||.01,e.max||16)}getZoom(){return this.getScale().sx}zoom(t,e){e=e||{};let n=t,r=t;const i=this.getScale(),s=this.getComputedSize();let o=s.width/2,a=s.height/2;if(e.absolute||(n+=i.sx,r+=i.sy),e.scaleGrid&&(n=Math.round(n/e.scaleGrid)*e.scaleGrid,r=Math.round(r/e.scaleGrid)*e.scaleGrid),e.maxScale&&(n=Math.min(e.maxScale,n),r=Math.min(e.maxScale,r)),e.minScale&&(n=Math.max(e.minScale,n),r=Math.max(e.minScale,r)),e.center&&(o=e.center.x,a=e.center.y),n=this.clampScale(n),r=this.clampScale(r),o||a){const t=this.getTranslation(),e=o-(o-t.tx)*(n/i.sx),s=a-(a-t.ty)*(r/i.sy);e===t.tx&&s===t.ty||this.translate(e,s)}return this.scale(n,r),this}getRotation(){return Ym(this.getMatrix())}rotate(e,n,r){if(null==n||null==r){const e=t.Util.getBBox(this.stage);n=e.width/2,r=e.height/2}const i=this.getMatrix().translate(n,r).rotate(e).translate(-n,-r);return this.setMatrix(i),this}getTranslation(){return Zm(this.getMatrix())}translate(t,e){const n=this.getMatrix();n.e=t||0,n.f=e||0,this.setMatrix(n);const r=this.getTranslation();return this.options.x=r.tx,this.options.y=r.ty,this.graph.trigger("translate",Object.assign({},r)),this}setOrigin(t,e){return this.translate(t||0,e||0)}fitToContent(t,e,n,r){if("object"==typeof t){const i=t;t=i.gridWidth||1,e=i.gridHeight||1,n=i.padding||0,r=i}else t=t||1,e=e||1,n=n||0,null==r&&(r={});const i=Rf(n),s=r.border||0,o=r.contentArea?Ny.create(r.contentArea):this.getContentArea(r);s>0&&o.inflate(s);const a=this.getScale(),l=this.getTranslation(),c=a.sx,h=a.sy;o.x*=c,o.y*=h,o.width*=c,o.height*=h;let u=Math.max(Math.ceil((o.width+o.x)/t),1)*t,g=Math.max(Math.ceil((o.height+o.y)/e),1)*e,d=0,f=0;("negative"===r.allowNewOrigin&&o.x<0||"positive"===r.allowNewOrigin&&o.x>=0||"any"===r.allowNewOrigin)&&(d=Math.ceil(-o.x/t)*t,d+=i.left,u+=d),("negative"===r.allowNewOrigin&&o.y<0||"positive"===r.allowNewOrigin&&o.y>=0||"any"===r.allowNewOrigin)&&(f=Math.ceil(-o.y/e)*e,f+=i.top,g+=f),u+=i.right,g+=i.bottom,u=Math.max(u,r.minWidth||0),g=Math.max(g,r.minHeight||0),u=Math.min(u,r.maxWidth||Number.MAX_SAFE_INTEGER),g=Math.min(g,r.maxHeight||Number.MAX_SAFE_INTEGER);const p=this.getComputedSize(),m=u!==p.width||g!==p.height;return(d!==l.tx||f!==l.ty)&&this.translate(d,f),m&&this.resize(u,g),new Ny(-d/c,-f/h,u/c,g/h)}scaleContentToFit(t={}){this.scaleContentToFitImpl(t)}scaleContentToFitImpl(t={},e=!0){let n,r;if(t.contentArea){const e=t.contentArea;n=this.graph.localToGraph(e),r=ky.create(e)}else n=this.getContentBBox(t),r=this.graph.graphToLocal(n);if(!n.width||!n.height)return;const i=Rf(t.padding),s=t.minScale||0,o=t.maxScale||Number.MAX_SAFE_INTEGER,a=t.minScaleX||s,l=t.maxScaleX||o,c=t.minScaleY||s,h=t.maxScaleY||o;let u;if(t.viewportArea)u=t.viewportArea;else{const t=this.getComputedSize(),e=this.getTranslation();u={x:e.tx,y:e.ty,width:t.width,height:t.height}}u=Ny.create(u).moveAndExpand({x:i.left,y:i.top,width:-i.left-i.right,height:-i.top-i.bottom});const g=this.getScale();let d=u.width/n.width*g.sx,f=u.height/n.height*g.sy;!1!==t.preserveAspectRatio&&(d=f=Math.min(d,f));const p=t.scaleGrid;if(p&&(d=p*Math.floor(d/p),f=p*Math.floor(f/p)),d=Hi(d,a,l),f=Hi(f,c,h),this.scale(d,f),e){const t=this.options,e=u.x-r.x*d-t.x,n=u.y-r.y*f-t.y;this.translate(e,n)}}getContentArea(e={}){return!1!==e.useCellGeometry?this.model.getAllCellsBBox()||new Ny:t.Util.getBBox(this.stage)}getContentBBox(t={}){return this.graph.localToGraph(this.getContentArea(t))}getGraphArea(){const t=Ny.fromSize(this.getComputedSize());return this.graph.graphToLocal(t)}zoomToRect(t,e={}){const n=Ny.create(t),r=this.graph;e.contentArea=n,null==e.viewportArea&&(e.viewportArea={x:r.options.x,y:r.options.y,width:this.options.width,height:this.options.height}),this.scaleContentToFitImpl(e,!1);const i=n.getCenter();return this.centerPoint(i.x,i.y),this}zoomToFit(t={}){return this.zoomToRect(this.getContentArea(t),t)}centerPoint(t,e){const n=this.getComputedSize(),r=this.getScale(),i=this.getTranslation(),s=n.width/2,o=n.height/2;e="number"==typeof e?e:o,t=s-(t="number"==typeof t?t:s)*r.sx,e=o-e*r.sy,i.tx===t&&i.ty===e||this.translate(t,e)}centerContent(t){const e=this.graph.getContentArea(t).getCenter();this.centerPoint(e.x,e.y)}centerCell(t){return this.positionCell(t,"center")}positionPoint(t,e,n){const r=this.getComputedSize();(e=Df(e,Math.max(0,r.width)))<0&&(e=r.width+e),(n=Df(n,Math.max(0,r.height)))<0&&(n=r.height+n);const i=this.getTranslation(),s=this.getScale(),o=e-t.x*s.sx,a=n-t.y*s.sy;i.tx===o&&i.ty===a||this.translate(o,a)}positionRect(t,e){const n=Ny.create(t);switch(e){case"center":return this.positionPoint(n.getCenter(),"50%","50%");case"top":return this.positionPoint(n.getTopCenter(),"50%",0);case"top-right":return this.positionPoint(n.getTopRight(),"100%",0);case"right":return this.positionPoint(n.getRightMiddle(),"100%","50%");case"bottom-right":return this.positionPoint(n.getBottomRight(),"100%","100%");case"bottom":return this.positionPoint(n.getBottomCenter(),"50%","100%");case"bottom-left":return this.positionPoint(n.getBottomLeft(),0,"100%");case"left":return this.positionPoint(n.getLeftMiddle(),0,"50%");case"top-left":return this.positionPoint(n.getTopLeft(),0,0);default:return this}}positionCell(t,e){const n=t.getBBox();return this.positionRect(n,e)}positionContent(t,e){const n=this.graph.getContentArea(e);return this.positionRect(n,t)}}class xA extends fA{get elem(){return this.view.background}init(){this.startListening(),this.options.background&&this.draw(this.options.background)}startListening(){this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this)}stopListening(){this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this)}updateBackgroundImage(t={}){let e=t.size||"auto auto",n=t.position||"center";const r=this.graph.transform.getScale(),i=this.graph.translate();if("object"==typeof n){n=`${i.tx+r.sx*(n.x||0)}px ${i.ty+r.sy*(n.y||0)}px`}"object"==typeof e&&(e=Ny.fromSize(e).scale(r.sx,r.sy),e=`${e.width}px ${e.height}px`),this.elem.style.backgroundSize=e,this.elem.style.backgroundPosition=n}drawBackgroundImage(t,e={}){if(!(t instanceof HTMLImageElement))return void(this.elem.style.backgroundImage="");const n=this.optionsCache;if(n&&n.image!==e.image)return;let r;const i=e.opacity,s=e.size;let o=e.repeat||"no-repeat";const a=hv.registry.get(o);if("function"==typeof a){const n=e.quality||1;t.width*=n,t.height*=n;const i=a(t,e);if(!(i instanceof HTMLCanvasElement))throw new Error("Background pattern must return an HTML Canvas instance");r=i.toDataURL("image/png"),o=e.repeat&&o!==e.repeat?e.repeat:"repeat","object"==typeof s?(s.width*=i.width/t.width,s.height*=i.height/t.height):void 0===s&&(e.size={width:i.width/n,height:i.height/n})}else r=t.src,void 0===s&&(e.size={width:t.width,height:t.height});null!=n&&"object"==typeof e.size&&e.image===n.image&&e.repeat===n.repeat&&e.quality===n.quality&&(n.size=yo(e.size));const l=this.elem.style;l.backgroundImage=`url(${r})`,l.backgroundRepeat=o,l.opacity=null==i||i>=1?"":`${i}`,this.updateBackgroundImage(e)}updateBackgroundColor(t){this.elem.style.backgroundColor=t||""}updateBackgroundOptions(t){this.graph.options.background=t}update(){this.optionsCache&&this.updateBackgroundImage(this.optionsCache)}draw(t){const e=t||{};if(this.updateBackgroundOptions(t),this.updateBackgroundColor(e.color),e.image){this.optionsCache=yo(e);const n=document.createElement("img");n.onload=()=>this.drawBackgroundImage(n,t),n.setAttribute("crossorigin","anonymous"),n.src=e.image}else this.drawBackgroundImage(null),this.optionsCache=null}clear(){this.draw()}dispose(){this.clear(),this.stopListening()}}n([fA.dispose()],xA.prototype,"dispose",null);class wA extends fA{get widgetOptions(){return this.options.panning}get pannable(){return this.widgetOptions&&!0===this.widgetOptions.enabled}init(){this.onRightMouseDown=this.onRightMouseDown.bind(this),this.startListening(),this.updateClassName()}startListening(){this.graph.on("blank:mousedown",this.onMouseDown,this),this.graph.on("node:unhandled:mousedown",this.onMouseDown,this),this.graph.on("edge:unhandled:mousedown",this.onMouseDown,this),hy.on(this.graph.container,"mousedown",this.onRightMouseDown),this.mousewheelHandle=new dy(this.graph.container,this.onMouseWheel.bind(this),this.allowMouseWheel.bind(this)),this.mousewheelHandle.enable()}stopListening(){this.graph.off("blank:mousedown",this.onMouseDown,this),this.graph.off("node:unhandled:mousedown",this.onMouseDown,this),this.graph.off("edge:unhandled:mousedown",this.onMouseDown,this),hy.off(this.graph.container,"mousedown",this.onRightMouseDown),this.mousewheelHandle&&this.mousewheelHandle.disable()}allowPanning(e,n){return this.pannable&&t.ModifierKey.isMatch(e,this.widgetOptions.modifiers,n)}startPanning(t){const e=this.view.normalizeEvent(t);this.clientX=e.clientX,this.clientY=e.clientY,this.panning=!0,this.updateClassName(),hy.on(document.body,{"mousemove.panning touchmove.panning":this.pan.bind(this),"mouseup.panning touchend.panning":this.stopPanning.bind(this),"mouseleave.panning":this.stopPanning.bind(this)}),hy.on(window,"mouseup.panning",this.stopPanning.bind(this))}pan(t){const e=this.view.normalizeEvent(t),n=e.clientX-this.clientX,r=e.clientY-this.clientY;this.clientX=e.clientX,this.clientY=e.clientY,this.graph.translateBy(n,r)}stopPanning(t){this.panning=!1,this.updateClassName(),hy.off(document.body,".panning"),hy.off(window,".panning")}updateClassName(){const t=this.view.container,e=this.view.prefixClassName("graph-panning"),n=this.view.prefixClassName("graph-pannable");this.pannable?this.panning?(lp(t,e),cp(t,n)):(cp(t,e),lp(t,n)):(cp(t,e),cp(t,n))}onMouseDown({e:t}){if(!this.allowBlankMouseDown(t))return;const e=this.graph.getPlugin("selection"),n=e&&e.allowRubberband(t,!0);(this.allowPanning(t,!0)||this.allowPanning(t)&&!n)&&this.startPanning(t)}onRightMouseDown(t){const e=this.widgetOptions.eventTypes;(null==e?void 0:e.includes("rightMouseDown"))&&2===t.button&&this.allowPanning(t,!0)&&this.startPanning(t)}onMouseWheel(t,e,n){this.graph.translateBy(-e,-n)}allowBlankMouseDown(t){const e=this.widgetOptions.eventTypes;return(null==e?void 0:e.includes("leftMouseDown"))&&0===t.button||(null==e?void 0:e.includes("mouseWheelDown"))&&1===t.button}allowMouseWheel(t){var e;return this.pannable&&!t.ctrlKey&&(null===(e=this.widgetOptions.eventTypes)||void 0===e?void 0:e.includes("mouseWheel"))}autoPanning(t,e){const n=10,r=this.graph.getGraphArea();let i=0,s=0;t<=r.left+n&&(i=-10),e<=r.top+n&&(s=-10),t>=r.right-n&&(i=n),e>=r.bottom-n&&(s=n),0===i&&0===s||this.graph.translateBy(-i,-s)}enablePanning(){this.pannable||(this.widgetOptions.enabled=!0,this.updateClassName())}disablePanning(){this.pannable&&(this.widgetOptions.enabled=!1,this.updateClassName())}dispose(){this.stopListening()}}n([fA.dispose()],wA.prototype,"dispose",null);class AA extends fA{constructor(){super(...arguments),this.cumulatedFactor=1}get widgetOptions(){return this.options.mousewheel}init(){this.container=this.graph.container,this.target=this.widgetOptions.global?document:this.container,this.mousewheelHandle=new dy(this.target,this.onMouseWheel.bind(this),this.allowMouseWheel.bind(this)),this.widgetOptions.enabled&&this.enable(!0)}get disabled(){return!0!==this.widgetOptions.enabled}enable(t){(this.disabled||t)&&(this.widgetOptions.enabled=!0,this.mousewheelHandle.enable())}disable(){this.disabled||(this.widgetOptions.enabled=!1,this.mousewheelHandle.disable())}allowMouseWheel(e){const n=this.widgetOptions.guard;return(null==n||n(e))&&t.ModifierKey.isMatch(e,this.widgetOptions.modifiers)}onMouseWheel(e){const n=this.widgetOptions.guard;if((null==n||n(e))&&t.ModifierKey.isMatch(e,this.widgetOptions.modifiers)){const t=this.widgetOptions.factor||1.2;null==this.currentScale&&(this.startPos={x:e.clientX,y:e.clientY},this.currentScale=this.graph.transform.getScale().sx);e.deltaY<0?this.currentScale<.15?this.cumulatedFactor=(this.currentScale+.01)/this.currentScale:(this.cumulatedFactor=Math.round(this.currentScale*t*20)/20/this.currentScale,1===this.cumulatedFactor&&(this.cumulatedFactor=1.05)):this.currentScale<=.15?this.cumulatedFactor=(this.currentScale-.01)/this.currentScale:(this.cumulatedFactor=Math.round(this.currentScale*(1/t)*20)/20/this.currentScale,1===this.cumulatedFactor&&(this.cumulatedFactor=.95)),this.cumulatedFactor=Math.max(.01,Math.min(this.currentScale*this.cumulatedFactor,160)/this.currentScale);const n=this.currentScale;let r=this.graph.transform.clampScale(n*this.cumulatedFactor);if(r=Hi(r,this.widgetOptions.minScale||Number.MIN_SAFE_INTEGER,this.widgetOptions.maxScale||Number.MAX_SAFE_INTEGER),r!==n)if(this.widgetOptions.zoomAtMousePosition){const t=!!this.graph.getPlugin("scroller")?this.graph.clientToLocal(this.startPos):this.graph.clientToGraph(this.startPos);this.graph.zoom(r,{absolute:!0,center:t.clone()})}else this.graph.zoom(r,{absolute:!0});this.currentScale=null,this.cumulatedFactor=1}}dispose(){this.disable()}}n([r.dispose()],AA.prototype,"dispose",null);class CA extends fA{init(){this.resetRenderArea=Fg(this.resetRenderArea,200,{leading:!0}),this.resetRenderArea(),this.startListening()}startListening(){this.graph.on("translate",this.resetRenderArea,this),this.graph.on("scale",this.resetRenderArea,this),this.graph.on("resize",this.resetRenderArea,this)}stopListening(){this.graph.off("translate",this.resetRenderArea,this),this.graph.off("scale",this.resetRenderArea,this),this.graph.off("resize",this.resetRenderArea,this)}enableVirtualRender(){this.options.virtual=!0,this.resetRenderArea()}disableVirtualRender(){this.options.virtual=!1,this.graph.renderer.setRenderArea(void 0)}resetRenderArea(){if(this.options.virtual){const t=this.graph.getGraphArea();this.graph.renderer.setRenderArea(t)}}dispose(){this.stopListening()}}n([fA.dispose()],CA.prototype,"dispose",null);class PA{constructor(){this.isFlushing=!1,this.isFlushPending=!1,this.scheduleId=0,this.queue=[],this.frameInterval=33,this.initialTime=Date.now()}queueJob(t){if(t.priority&yA.PRIOR)t.cb();else{const e=this.findInsertionIndex(t);e>=0&&this.queue.splice(e,0,t)}}queueFlush(){this.isFlushing||this.isFlushPending||(this.isFlushPending=!0,this.scheduleJob())}queueFlushSync(){this.isFlushing||this.isFlushPending||(this.isFlushPending=!0,this.flushJobsSync())}clearJobs(){this.queue.length=0,this.isFlushing=!1,this.isFlushPending=!1,this.cancelScheduleJob()}flushJobs(){this.isFlushPending=!1,this.isFlushing=!0;const t=this.getCurrentTime();let e;for(;(e=this.queue.shift())&&(e.cb(),!(this.getCurrentTime()-t>=this.frameInterval)););this.isFlushing=!1,this.queue.length&&this.queueFlush()}flushJobsSync(){let t;for(this.isFlushPending=!1,this.isFlushing=!0;t=this.queue.shift();)try{t.cb()}catch(t){console.log(t)}this.isFlushing=!1}findInsertionIndex(t){let e=0,n=this.queue.length,r=n-1;const i=t.priority;for(;e<=r;){const t=(r-e>>1)+e;i<=this.queue[t].priority?e=t+1:(n=t,r=t-1)}return n}scheduleJob(){"requestIdleCallback"in window?(this.scheduleId&&this.cancelScheduleJob(),this.scheduleId=window.requestIdleCallback(this.flushJobs.bind(this),{timeout:100})):(this.scheduleId&&this.cancelScheduleJob(),this.scheduleId=window.setTimeout(this.flushJobs.bind(this)))}cancelScheduleJob(){"cancelIdleCallback"in window?(this.scheduleId&&window.cancelIdleCallback(this.scheduleId),this.scheduleId=0):(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduleId=0)}getCurrentTime(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():Date.now()-this.initialTime}}!function(t){t[t.Update=2]="Update",t[t.RenderEdge=4]="RenderEdge",t[t.RenderNode=8]="RenderNode",t[t.PRIOR=1048576]="PRIOR"}(yA||(yA={}));class MA extends r{get model(){return this.graph.model}get container(){return this.graph.view.stage}constructor(t){super(),this.views={},this.willRemoveViews={},this.queue=new PA,this.graph=t,this.init()}init(){this.startListening(),this.renderViews(this.model.getCells())}startListening(){this.model.on("reseted",this.onModelReseted,this),this.model.on("cell:added",this.onCellAdded,this),this.model.on("cell:removed",this.onCellRemoved,this),this.model.on("cell:change:zIndex",this.onCellZIndexChanged,this),this.model.on("cell:change:visible",this.onCellVisibleChanged,this)}stopListening(){this.model.off("reseted",this.onModelReseted,this),this.model.off("cell:added",this.onCellAdded,this),this.model.off("cell:removed",this.onCellRemoved,this),this.model.off("cell:change:zIndex",this.onCellZIndexChanged,this),this.model.off("cell:change:visible",this.onCellVisibleChanged,this)}onModelReseted({options:t}){this.queue.clearJobs(),this.removeZPivots(),this.resetViews();const e=this.model.getCells();this.renderViews(e,Object.assign(Object.assign({},t),{queue:e.map((t=>t.id))}))}onCellAdded({cell:t,options:e}){this.renderViews([t],e)}onCellRemoved({cell:t}){this.removeViews([t])}onCellZIndexChanged({cell:t,options:e}){const n=this.views[t.id];n&&this.requestViewUpdate(n.view,MA.FLAG_INSERT,e,yA.Update,!0)}onCellVisibleChanged({cell:t,current:e}){this.toggleVisible(t,!!e)}requestViewUpdate(t,e,n={},r=yA.Update,i=!0){const s=t.cell.id,o=this.views[s];if(!o)return;o.flag=e,o.options=n;(t.hasAction(e,["translate","resize","rotate"])||!1===n.async)&&(r=yA.PRIOR,i=!1),this.queue.queueJob({id:s,priority:r,cb:()=>{this.renderViewInArea(t,e,n);const r=n.queue;if(r){const e=r.indexOf(t.cell.id);e>=0&&r.splice(e,1),0===r.length&&this.graph.trigger("render:done")}}});this.getEffectedEdges(t).forEach((t=>{this.requestViewUpdate(t.view,t.flag,n,r,!1)})),i&&this.flush()}setRenderArea(t){this.renderArea=t,this.flushWaitingViews()}isViewMounted(t){if(null==t)return!1;const e=this.views[t.cell.id];return!!e&&e.state===MA.ViewState.MOUNTED}renderViews(t,e={}){t.sort(((t,e)=>t.isNode()&&e.isEdge()?-1:0)),t.forEach((t=>{const n=t.id;let r=0,i=this.views[n];if(i)r=MA.FLAG_INSERT;else{const s=this.createCellView(t);s&&(s.graph=this.graph,r=MA.FLAG_INSERT|s.getBootstrapFlag(),i={view:s,flag:r,options:e,state:MA.ViewState.CREATED},this.views[n]=i)}i&&this.requestViewUpdate(i.view,r,e,this.getRenderPriority(i.view),!1)})),this.flush()}renderViewInArea(t,e,n={}){const r=t.cell,i=r.id,s=this.views[i];if(!s)return;let o=0;this.isUpdatable(t)||s.state===MA.ViewState.MOUNTED?(o=this.updateView(t,e,n),s.flag=o):s.state=MA.ViewState.WAITING,o&&r.isEdge()&&0==(o&t.getFlag(["source","target"]))&&this.queue.queueJob({id:i,priority:yA.RenderEdge,cb:()=>{this.updateView(t,e,n)}})}removeViews(t){t.forEach((t=>{const e=t.id,n=this.views[e];n&&(this.willRemoveViews[e]=n,delete this.views[e],this.queue.queueJob({id:e,priority:this.getRenderPriority(n.view),cb:()=>{this.removeView(n.view)}}))})),this.flush()}flush(){this.graph.options.async?this.queue.queueFlush():this.queue.queueFlushSync()}flushWaitingViews(){Object.values(this.views).forEach((t=>{if(t&&t.state===MA.ViewState.WAITING){const{view:e,flag:n,options:r}=t;this.requestViewUpdate(e,n,r,this.getRenderPriority(e),!1)}})),this.flush()}updateView(t,e,n={}){if(null==t)return 0;if(ax.isCellView(t)){if(e&MA.FLAG_REMOVE)return this.removeView(t.cell),0;e&MA.FLAG_INSERT&&(this.insertView(t),e^=MA.FLAG_INSERT)}return e?t.confirmUpdate(e,n):0}insertView(t){const e=this.views[t.cell.id];if(e){const n=t.cell.getZIndex(),r=this.addZPivot(n);this.container.insertBefore(t.container,r),t.cell.isVisible()||this.toggleVisible(t.cell,!1),e.state=MA.ViewState.MOUNTED,this.graph.trigger("view:mounted",{view:t})}}resetViews(){this.willRemoveViews=Object.assign(Object.assign({},this.views),this.willRemoveViews),Object.values(this.willRemoveViews).forEach((t=>{t&&this.removeView(t.view)})),this.views={},this.willRemoveViews={}}removeView(t){const e=t.cell,n=this.willRemoveViews[e.id];n&&t&&(n.view.remove(),delete this.willRemoveViews[e.id],this.graph.trigger("view:unmounted",{view:t}))}toggleVisible(t,e){const n=this.model.getConnectedEdges(t);for(let t=0,r=n.length;tr&&(r=e)}const i=this.container;if(r!==-1/0){const t=e[r];i.insertBefore(n,t.nextSibling)}else i.insertBefore(n,i.firstChild);return n}removeZPivots(){this.zPivots&&Object.values(this.zPivots).forEach((t=>{t&&t.parentNode&&t.parentNode.removeChild(t)})),this.zPivots={}}createCellView(t){const e={graph:this.graph},n=this.graph.options.createCellView;if(n){const r=ef(n,this.graph,t);if(r)return new r(t,e);if(null===r)return null}const r=t.view;if(null!=r&&"string"==typeof r){const n=ax.registry.get(r);return n?new n(t,e):ax.registry.onNotFound(r)}return t.isNode()?new uA(t,e):t.isEdge()?new gA(t,e):null}getEffectedEdges(t){const e=[],n=t.cell,r=this.model.getConnectedEdges(n);for(let t=0,i=r.length;t{this.views[t].view.dispose()})),this.views={}}}n([r.dispose()],MA.prototype,"dispose",null),function(t){t.FLAG_INSERT=1<<30,t.FLAG_REMOVE=1<<29,t.FLAG_RENDER=67108863}(MA||(MA={})),function(t){var e;(e=t.ViewState||(t.ViewState={}))[e.CREATED=0]="CREATED",e[e.MOUNTED=1]="MOUNTED",e[e.WAITING=2]="WAITING"}(MA||(MA={}));class EA extends fA{constructor(){super(...arguments),this.schedule=new MA(this.graph)}requestViewUpdate(t,e,n={}){this.schedule.requestViewUpdate(t,e,n)}isViewMounted(t){return this.schedule.isViewMounted(t)}setRenderArea(t){this.schedule.setRenderArea(t)}findViewByElem(t){if(null==t)return null;const e=this.options.container,n="string"==typeof t?e.querySelector(t):t instanceof Element?t:t[0];if(n){const t=this.graph.view.findAttr("data-cell-id",n);if(t){const e=this.schedule.views;if(e[t])return e[t].view}}return null}findViewByCell(t){if(null==t)return null;const e=Ww.isCell(t)?t.id:t,n=this.schedule.views;return n[e]?n[e].view:null}findViewsFromPoint(e){const n={x:e.x,y:e.y};return this.model.getCells().map((t=>this.findViewByCell(t))).filter((e=>null!=e&&t.Util.getBBox(e.container,{target:this.view.stage}).containsPoint(n)))}findEdgeViewsFromPoint(t,e=5){return this.model.getEdges().map((t=>this.findViewByCell(t))).filter((n=>{if(null!=n){const r=n.getClosestPoint(t);if(r)return r.distance(t)<=e}return!1}))}findViewsInArea(e,n={}){const r=Ny.create(e);return this.model.getCells().map((t=>this.findViewByCell(t))).filter((e=>{if(e){if(n.nodeOnly&&!e.isNodeView())return!1;const i=t.Util.getBBox(e.container,{target:this.view.stage});return 0===i.width?i.inflate(1,0):0===i.height&&i.inflate(0,1),n.strict?r.containsRect(i):r.isIntersectWithRect(i)}return!1}))}dispose(){this.schedule.dispose()}}n([fA.dispose()],EA.prototype,"dispose",null);class SA extends fA{get cid(){return this.graph.view.cid}get svg(){return this.view.svg}get defs(){return this.view.defs}isDefined(t){return null!=this.svg.getElementById(t)}filter(e){let n=e.id;const r=e.name;if(n||(n=`filter-${r}-${this.cid}-${Nf(JSON.stringify(e))}`),!this.isDefined(n)){const i=fv.registry.get(r);if(null==i)return fv.registry.onNotFound(r);const s=i(e.args||{}),o=Object.assign(Object.assign({x:-1,y:-1,width:3,height:3,filterUnits:"objectBoundingBox"},e.attrs),{id:n});fm.create(t.Markup.sanitize(s),o).appendTo(this.defs)}return n}gradient(t){let e=t.id;const n=t.type;if(e||(e=`gradient-${n}-${this.cid}-${Nf(JSON.stringify(t))}`),!this.isDefined(e)){const r=t.stops.map((t=>{const e=null!=t.opacity&&Number.isFinite(t.opacity)?t.opacity:1;return``})),i=`<${n}>${r.join("")}`,s=Object.assign({id:e},t.attrs);fm.create(i,s).appendTo(this.defs)}return e}marker(t){const{id:n,refX:r,refY:i,markerUnits:s,markerOrient:o,tagName:a,children:l}=t,c=e(t,["id","refX","refY","markerUnits","markerOrient","tagName","children"]);let h=n;if(h||(h=`marker-${this.cid}-${Nf(JSON.stringify(t))}`),!this.isDefined(h)){"path"!==a&&delete c.d;const t=fm.create("marker",{refX:r,refY:i,id:h,overflow:"visible",orient:null!=o?o:"auto",markerUnits:s||"userSpaceOnUse"},l?l.map((t=>{var{tagName:n}=t,r=e(t,["tagName"]);return fm.create(`${n}`||"path",Gp(Object.assign(Object.assign({},c),r)))})):[fm.create(a||"path",Gp(c))]);this.defs.appendChild(t.node)}return h}remove(t){const e=this.svg.getElementById(t);e&&e.parentNode&&e.parentNode.removeChild(e)}}class OA extends fA{getClientMatrix(){return Fm(this.view.stage.getScreenCTM())}getClientOffset(){const t=this.view.svg.getBoundingClientRect();return new ky(t.left,t.top)}getPageOffset(){return this.getClientOffset().translate(window.scrollX,window.scrollY)}snapToGrid(t,e){return("number"==typeof t?this.clientToLocalPoint(t,e):this.clientToLocalPoint(t.x,t.y)).snapToGrid(this.graph.getGridSize())}localToGraphPoint(e,n){const r=ky.create(e,n);return t.Util.transformPoint(r,this.graph.matrix())}localToClientPoint(e,n){const r=ky.create(e,n);return t.Util.transformPoint(r,this.getClientMatrix())}localToPagePoint(t,e){return("number"==typeof t?this.localToGraphPoint(t,e):this.localToGraphPoint(t)).translate(this.getPageOffset())}localToGraphRect(e,n,r,i){const s=Ny.create(e,n,r,i);return t.Util.transformRectangle(s,this.graph.matrix())}localToClientRect(e,n,r,i){const s=Ny.create(e,n,r,i);return t.Util.transformRectangle(s,this.getClientMatrix())}localToPageRect(t,e,n,r){return("number"==typeof t?this.localToGraphRect(t,e,n,r):this.localToGraphRect(t)).translate(this.getPageOffset())}graphToLocalPoint(e,n){const r=ky.create(e,n);return t.Util.transformPoint(r,this.graph.matrix().inverse())}clientToLocalPoint(e,n){const r=ky.create(e,n);return t.Util.transformPoint(r,this.getClientMatrix().inverse())}clientToGraphPoint(e,n){const r=ky.create(e,n);return t.Util.transformPoint(r,this.graph.matrix().multiply(this.getClientMatrix().inverse()))}pageToLocalPoint(t,e){const n=ky.create(t,e).diff(this.getPageOffset());return this.graphToLocalPoint(n)}graphToLocalRect(e,n,r,i){const s=Ny.create(e,n,r,i);return t.Util.transformRectangle(s,this.graph.matrix().inverse())}clientToLocalRect(e,n,r,i){const s=Ny.create(e,n,r,i);return t.Util.transformRectangle(s,this.getClientMatrix().inverse())}clientToGraphRect(e,n,r,i){const s=Ny.create(e,n,r,i);return t.Util.transformRectangle(s,this.graph.matrix().multiply(this.getClientMatrix().inverse()))}pageToLocalRect(t,e,n,r){const i=Ny.create(t,e,n,r),s=this.getPageOffset();return i.x-=s.x,i.y-=s.y,this.graphToLocalRect(i)}}class TA extends fA{constructor(){super(...arguments),this.highlights={}}init(){this.startListening()}startListening(){this.graph.on("cell:highlight",this.onCellHighlight,this),this.graph.on("cell:unhighlight",this.onCellUnhighlight,this)}stopListening(){this.graph.off("cell:highlight",this.onCellHighlight,this),this.graph.off("cell:unhighlight",this.onCellUnhighlight,this)}onCellHighlight({view:t,magnet:e,options:n={}}){const r=this.resolveHighlighter(n);if(!r)return;const i=this.getHighlighterId(e,r);if(!this.highlights[i]){const n=r.highlighter;n.highlight(t,e,Object.assign({},r.args)),this.highlights[i]={cellView:t,magnet:e,highlighter:n,args:r.args}}}onCellUnhighlight({magnet:t,options:e={}}){const n=this.resolveHighlighter(e);if(!n)return;const r=this.getHighlighterId(t,n);this.unhighlight(r)}resolveHighlighter(t){const e=this.options;let n=t.highlighter;if(null==n){const r=t.type;n=r&&e.highlighting[r]||e.highlighting.default}if(null==n)return null;const r="string"==typeof n?{name:n}:n,i=r.name,s=zb.registry.get(i);return null==s?zb.registry.onNotFound(i):(zb.check(i,s),{name:i,highlighter:s,args:r.args||{}})}getHighlighterId(t,e){return dp(t),e.name+t.id+JSON.stringify(e.args)}unhighlight(t){const e=this.highlights[t];e&&(e.highlighter.unhighlight(e.cellView,e.magnet,e.args),delete this.highlights[t])}dispose(){Object.keys(this.highlights).forEach((t=>this.unhighlight(t))),this.stopListening()}}n([TA.dispose()],TA.prototype,"dispose",null);class kA extends fA{getScroller(){const t=this.graph.getPlugin("scroller");return t&&t.options.enabled?t:null}getContainer(){const t=this.getScroller();return t?t.container.parentElement:this.graph.container.parentElement}getSensorTarget(){const t=this.options.autoResize;if(t)return"boolean"==typeof t?this.getContainer():t}init(){if(this.options.autoResize){const e=this.getSensorTarget();e&&t.SizeSensor.bind(e,(()=>{const t=e.offsetWidth,n=e.offsetHeight;this.resize(t,n)}))}}resize(t,e){const n=this.getScroller();n?n.resize(t,e):this.graph.transform.resize(t,e)}dispose(){t.SizeSensor.clear(this.graph.container)}}n([fA.dispose()],kA.prototype,"dispose",null);class NA extends wf{get container(){return this.options.container}get[Symbol.toStringTag](){return NA.toStringTag}constructor(e){super(),this.installedPlugins=new Set,this.options=t.Options.get(e),this.css=new pA(this),this.view=new dA(this),this.defs=new SA(this),this.coord=new OA(this),this.transform=new bA(this),this.highlight=new TA(this),this.grid=new vA(this),this.background=new xA(this),this.options.model?this.model=this.options.model:(this.model=new Zw,this.model.graph=this),this.renderer=new EA(this),this.panning=new wA(this),this.mousewheel=new AA(this),this.virtualRender=new CA(this),this.size=new kA(this)}isNode(t){return t.isNode()}isEdge(t){return t.isEdge()}resetCells(t,e={}){return this.model.resetCells(t,e),this}clearCells(t={}){return this.model.clear(t),this}toJSON(t={}){return this.model.toJSON(t)}parseJSON(t){return this.model.parseJSON(t)}fromJSON(t,e={}){return this.model.fromJSON(t,e),this}getCellById(t){return this.model.getCell(t)}addNode(t,e={}){return this.model.addNode(t,e)}addNodes(t,e={}){return this.addCell(t.map((t=>Jw.isNode(t)?t:this.createNode(t))),e)}createNode(t){return this.model.createNode(t)}removeNode(t,e={}){return this.model.removeCell(t,e)}addEdge(t,e={}){return this.model.addEdge(t,e)}addEdges(t,e={}){return this.addCell(t.map((t=>Xw.isEdge(t)?t:this.createEdge(t))),e)}removeEdge(t,e={}){return this.model.removeCell(t,e)}createEdge(t){return this.model.createEdge(t)}addCell(t,e={}){return this.model.addCell(t,e),this}removeCell(t,e={}){return this.model.removeCell(t,e)}removeCells(t,e={}){return this.model.removeCells(t,e)}removeConnectedEdges(t,e={}){return this.model.removeConnectedEdges(t,e)}disconnectConnectedEdges(t,e={}){return this.model.disconnectConnectedEdges(t,e),this}hasCell(t){return this.model.has(t)}getCells(){return this.model.getCells()}getCellCount(){return this.model.total()}getNodes(){return this.model.getNodes()}getEdges(){return this.model.getEdges()}getOutgoingEdges(t){return this.model.getOutgoingEdges(t)}getIncomingEdges(t){return this.model.getIncomingEdges(t)}getConnectedEdges(t,e={}){return this.model.getConnectedEdges(t,e)}getRootNodes(){return this.model.getRoots()}getLeafNodes(){return this.model.getLeafs()}isRootNode(t){return this.model.isRoot(t)}isLeafNode(t){return this.model.isLeaf(t)}getNeighbors(t,e={}){return this.model.getNeighbors(t,e)}isNeighbor(t,e,n={}){return this.model.isNeighbor(t,e,n)}getSuccessors(t,e={}){return this.model.getSuccessors(t,e)}isSuccessor(t,e,n={}){return this.model.isSuccessor(t,e,n)}getPredecessors(t,e={}){return this.model.getPredecessors(t,e)}isPredecessor(t,e,n={}){return this.model.isPredecessor(t,e,n)}getCommonAncestor(...t){return this.model.getCommonAncestor(...t)}getSubGraph(t,e={}){return this.model.getSubGraph(t,e)}cloneSubGraph(t,e={}){return this.model.cloneSubGraph(t,e)}cloneCells(t){return this.model.cloneCells(t)}getNodesFromPoint(t,e){return this.model.getNodesFromPoint(t,e)}getNodesInArea(t,e,n,r,i){return this.model.getNodesInArea(t,e,n,r,i)}getNodesUnderNode(t,e={}){return this.model.getNodesUnderNode(t,e)}searchCell(t,e,n={}){return this.model.search(t,e,n),this}getShortestPath(t,e,n={}){return this.model.getShortestPath(t,e,n)}getAllCellsBBox(){return this.model.getAllCellsBBox()}getCellsBBox(t,e={}){return this.model.getCellsBBox(t,e)}startBatch(t,e={}){this.model.startBatch(t,e)}stopBatch(t,e={}){this.model.stopBatch(t,e)}batchUpdate(t,e,n){const r="string"==typeof t?t:"update",i="string"==typeof t?e:t,s="function"==typeof e?n:e;this.startBatch(r,s);const o=i();return this.stopBatch(r,s),o}updateCellId(t,e){return this.model.updateCellId(t,e)}findView(t){return Ww.isCell(t)?this.findViewByCell(t):this.findViewByElem(t)}findViews(t){return Ny.isRectangleLike(t)?this.findViewsInArea(t):ky.isPointLike(t)?this.findViewsFromPoint(t):[]}findViewByCell(t){return this.renderer.findViewByCell(t)}findViewByElem(t){return this.renderer.findViewByElem(t)}findViewsFromPoint(t,e){const n="number"==typeof t?{x:t,y:e}:t;return this.renderer.findViewsFromPoint(n)}findViewsInArea(t,e,n,r,i){const s="number"==typeof t?{x:t,y:e,width:n,height:r}:t,o="number"==typeof t?i:e;return this.renderer.findViewsInArea(s,o)}matrix(t){return void 0===t?this.transform.getMatrix():(this.transform.setMatrix(t),this)}resize(t,e){const n=this.getPlugin("scroller");return n?n.resize(t,e):this.transform.resize(t,e),this}scale(t,e=t,n=0,r=0){return void 0===t?this.transform.getScale():(this.transform.scale(t,e,n,r),this)}zoom(t,e){const n=this.getPlugin("scroller");if(n){if(void 0===t)return n.zoom();n.zoom(t,e)}else{if(void 0===t)return this.transform.getZoom();this.transform.zoom(t,e)}return this}zoomTo(t,e={}){const n=this.getPlugin("scroller");return n?n.zoom(t,Object.assign(Object.assign({},e),{absolute:!0})):this.transform.zoom(t,Object.assign(Object.assign({},e),{absolute:!0})),this}zoomToRect(t,e={}){const n=this.getPlugin("scroller");return n?n.zoomToRect(t,e):this.transform.zoomToRect(t,e),this}zoomToFit(t={}){const e=this.getPlugin("scroller");return e?e.zoomToFit(t):this.transform.zoomToFit(t),this}rotate(t,e,n){return void 0===t?this.transform.getRotation():(this.transform.rotate(t,e,n),this)}translate(t,e){return void 0===t?this.transform.getTranslation():(this.transform.translate(t,e),this)}translateBy(t,e){const n=this.translate(),r=n.tx+t,i=n.ty+e;return this.translate(r,i)}getGraphArea(){return this.transform.getGraphArea()}getContentArea(t={}){return this.transform.getContentArea(t)}getContentBBox(t={}){return this.transform.getContentBBox(t)}fitToContent(t,e,n,r){return this.transform.fitToContent(t,e,n,r)}scaleContentToFit(t={}){return this.transform.scaleContentToFit(t),this}center(t){return this.centerPoint(t)}centerPoint(t,e,n){const r=this.getPlugin("scroller");return r?r.centerPoint(t,e,n):this.transform.centerPoint(t,e),this}centerContent(t){const e=this.getPlugin("scroller");return e?e.centerContent(t):this.transform.centerContent(t),this}centerCell(t,e){const n=this.getPlugin("scroller");return n?n.centerCell(t,e):this.transform.centerCell(t),this}positionPoint(t,e,n,r={}){const i=this.getPlugin("scroller");return i?i.positionPoint(t,e,n,r):this.transform.positionPoint(t,e,n),this}positionRect(t,e,n){const r=this.getPlugin("scroller");return r?r.positionRect(t,e,n):this.transform.positionRect(t,e),this}positionCell(t,e,n){const r=this.getPlugin("scroller");return r?r.positionCell(t,e,n):this.transform.positionCell(t,e),this}positionContent(t,e){const n=this.getPlugin("scroller");return n?n.positionContent(t,e):this.transform.positionContent(t,e),this}snapToGrid(t,e){return this.coord.snapToGrid(t,e)}pageToLocal(t,e,n,r){return Ny.isRectangleLike(t)?this.coord.pageToLocalRect(t):"number"==typeof t&&"number"==typeof e&&"number"==typeof n&&"number"==typeof r?this.coord.pageToLocalRect(t,e,n,r):this.coord.pageToLocalPoint(t,e)}localToPage(t,e,n,r){return Ny.isRectangleLike(t)?this.coord.localToPageRect(t):"number"==typeof t&&"number"==typeof e&&"number"==typeof n&&"number"==typeof r?this.coord.localToPageRect(t,e,n,r):this.coord.localToPagePoint(t,e)}clientToLocal(t,e,n,r){return Ny.isRectangleLike(t)?this.coord.clientToLocalRect(t):"number"==typeof t&&"number"==typeof e&&"number"==typeof n&&"number"==typeof r?this.coord.clientToLocalRect(t,e,n,r):this.coord.clientToLocalPoint(t,e)}localToClient(t,e,n,r){return Ny.isRectangleLike(t)?this.coord.localToClientRect(t):"number"==typeof t&&"number"==typeof e&&"number"==typeof n&&"number"==typeof r?this.coord.localToClientRect(t,e,n,r):this.coord.localToClientPoint(t,e)}localToGraph(t,e,n,r){return Ny.isRectangleLike(t)?this.coord.localToGraphRect(t):"number"==typeof t&&"number"==typeof e&&"number"==typeof n&&"number"==typeof r?this.coord.localToGraphRect(t,e,n,r):this.coord.localToGraphPoint(t,e)}graphToLocal(t,e,n,r){return Ny.isRectangleLike(t)?this.coord.graphToLocalRect(t):"number"==typeof t&&"number"==typeof e&&"number"==typeof n&&"number"==typeof r?this.coord.graphToLocalRect(t,e,n,r):this.coord.graphToLocalPoint(t,e)}clientToGraph(t,e,n,r){return Ny.isRectangleLike(t)?this.coord.clientToGraphRect(t):"number"==typeof t&&"number"==typeof e&&"number"==typeof n&&"number"==typeof r?this.coord.clientToGraphRect(t,e,n,r):this.coord.clientToGraphPoint(t,e)}defineFilter(t){return this.defs.filter(t)}defineGradient(t){return this.defs.gradient(t)}defineMarker(t){return this.defs.marker(t)}getGridSize(){return this.grid.getGridSize()}setGridSize(t){return this.grid.setGridSize(t),this}showGrid(){return this.grid.show(),this}hideGrid(){return this.grid.hide(),this}clearGrid(){return this.grid.clear(),this}drawGrid(t){return this.grid.draw(t),this}updateBackground(){return this.background.update(),this}drawBackground(t,e){const n=this.getPlugin("scroller");return null==n||null!=this.options.background&&e?this.background.draw(t):n.drawBackground(t,e),this}clearBackground(t){const e=this.getPlugin("scroller");return null==e||null!=this.options.background&&t?this.background.clear():e.clearBackground(t),this}enableVirtualRender(){return this.virtualRender.enableVirtualRender(),this}disableVirtualRender(){return this.virtualRender.disableVirtualRender(),this}isMouseWheelEnabled(){return!this.mousewheel.disabled}enableMouseWheel(){return this.mousewheel.enable(),this}disableMouseWheel(){return this.mousewheel.disable(),this}toggleMouseWheel(t){return null==t?this.isMouseWheelEnabled()?this.disableMouseWheel():this.enableMouseWheel():t?this.enableMouseWheel():this.disableMouseWheel(),this}isPannable(){const t=this.getPlugin("scroller");return t?t.isPannable():this.panning.pannable}enablePanning(){const t=this.getPlugin("scroller");return t?t.enablePanning():this.panning.enablePanning(),this}disablePanning(){const t=this.getPlugin("scroller");return t?t.disablePanning():this.panning.disablePanning(),this}togglePanning(t){return null==t?this.isPannable()?this.disablePanning():this.enablePanning():t!==this.isPannable()&&(t?this.enablePanning():this.disablePanning()),this}use(t,...e){return this.installedPlugins.has(t)||(this.installedPlugins.add(t),t.init(this,...e)),this}getPlugin(t){return Array.from(this.installedPlugins).find((e=>e.name===t))}getPlugins(t){return Array.from(this.installedPlugins).filter((e=>t.includes(e.name)))}enablePlugins(t){let e=t;Array.isArray(e)||(e=[e]);const n=this.getPlugins(e);return null==n||n.forEach((t=>{var e;null===(e=null==t?void 0:t.enable)||void 0===e||e.call(t)})),this}disablePlugins(t){let e=t;Array.isArray(e)||(e=[e]);const n=this.getPlugins(e);return null==n||n.forEach((t=>{var e;null===(e=null==t?void 0:t.disable)||void 0===e||e.call(t)})),this}isPluginEnabled(t){var e;const n=this.getPlugin(t);return null===(e=null==n?void 0:n.isEnabled)||void 0===e?void 0:e.call(n)}disposePlugins(t){let e=t;Array.isArray(e)||(e=[e]);const n=this.getPlugins(e);return null==n||n.forEach((t=>{t.dispose(),this.installedPlugins.delete(t)})),this}dispose(t=!0){t&&this.model.dispose(),this.css.dispose(),this.defs.dispose(),this.grid.dispose(),this.coord.dispose(),this.transform.dispose(),this.highlight.dispose(),this.background.dispose(),this.mousewheel.dispose(),this.panning.dispose(),this.view.dispose(),this.renderer.dispose(),this.installedPlugins.forEach((t=>{t.dispose()}))}}n([wf.dispose()],NA.prototype,"dispose",null),function(t){t.View=dA,t.Renderer=EA,t.MouseWheel=AA,t.DefsManager=SA,t.GridManager=vA,t.CoordManager=OA,t.TransformManager=bA,t.HighlightManager=TA,t.BackgroundManager=xA,t.PanningManager=wA}(NA||(NA={})),function(t){t.toStringTag=`X6.${t.name}`,t.isGraph=function(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag];return null==n||n===t.toStringTag}}(NA||(NA={})),function(t){t.render=function(e,n){const r=e instanceof HTMLElement?new t({container:e}):new t(e);return null!=n&&r.fromJSON(n),r}}(NA||(NA={})),function(t){t.registerNode=Jw.registry.register,t.registerEdge=Xw.registry.register,t.registerView=ax.registry.register,t.registerAttr=kb.registry.register,t.registerGrid=ov.registry.register,t.registerFilter=fv.registry.register,t.registerNodeTool=Ox.registry.register,t.registerEdgeTool=Tx.registry.register,t.registerBackground=hv.registry.register,t.registerHighlighter=zb.registry.register,t.registerPortLayout=Wb.registry.register,t.registerPortLabelLayout=tx.registry.register,t.registerMarker=fb.registry.register,t.registerRouter=kw.registry.register,t.registerConnector=zw.registry.register,t.registerAnchor=Ux.registry.register,t.registerEdgeAnchor=Xx.registry.register,t.registerConnectionPoint=tw.registry.register}(NA||(NA={})),function(t){t.unregisterNode=Jw.registry.unregister,t.unregisterEdge=Xw.registry.unregister,t.unregisterView=ax.registry.unregister,t.unregisterAttr=kb.registry.unregister,t.unregisterGrid=ov.registry.unregister,t.unregisterFilter=fv.registry.unregister,t.unregisterNodeTool=Ox.registry.unregister,t.unregisterEdgeTool=Tx.registry.unregister,t.unregisterBackground=hv.registry.unregister,t.unregisterHighlighter=zb.registry.unregister,t.unregisterPortLayout=Wb.registry.unregister,t.unregisterPortLabelLayout=tx.registry.unregister,t.unregisterMarker=fb.registry.unregister,t.unregisterRouter=kw.registry.unregister,t.unregisterConnector=zw.registry.unregister,t.unregisterAnchor=Ux.registry.unregister,t.unregisterEdgeAnchor=Xx.registry.unregister,t.unregisterConnectionPoint=tw.registry.unregister}(NA||(NA={}));class jA extends Jw{}!function(t){class e extends uA{init(){super.init(),this.cell.on("change:*",this.onCellChangeAny,this)}onCellChangeAny({key:e}){const n=t.shapeMaps[this.cell.shape];if(n){const{effect:t}=n;t&&!t.includes(e)||this.renderHTMLComponent()}}confirmUpdate(t){const n=super.confirmUpdate(t);return this.handleAction(n,e.action,(()=>this.renderHTMLComponent()))}renderHTMLComponent(){const e=this.selectors&&this.selectors.foContent;if(e){Tp(e);const n=t.shapeMaps[this.cell.shape];if(!n)return;let{html:r}=n;"function"==typeof r&&(r=r(this.cell)),r&&("string"==typeof r?e.innerHTML=r:kp(e,r))}}dispose(){this.cell.off("change:*",this.onCellChangeAny,this)}}n([e.dispose()],e.prototype,"dispose",null),t.View=e,function(t){t.action="html",t.config({bootstrap:[t.action],actions:{html:t.action}}),uA.registry.register("html-view",t,!0)}(e=t.View||(t.View={}))}(jA||(jA={})),function(e){e.config({view:"html-view",markup:[{tagName:"rect",selector:"body"},Object.assign({},t.Markup.getForeignObjectMarkup()),{tagName:"text",selector:"label"}],attrs:{body:{fill:"none",stroke:"none",refWidth:"100%",refHeight:"100%"},fo:{refWidth:"100%",refHeight:"100%"}}}),Jw.registry.register("html",e,!0)}(jA||(jA={})),function(t){t.shapeMaps={},t.register=function(n){const{shape:r,html:i,effect:s,inherit:o}=n,a=e(n,["shape","html","effect","inherit"]);if(!r)throw new Error("should specify shape in config");t.shapeMaps[r]={html:i,effect:s},NA.registerNode(r,Object.assign({inherit:o||"html"},a),!0)}}(jA||(jA={}));var _A=Object.freeze({__proto__:null,Circle:hA,Edge:nA,Ellipse:rA,get HTML(){return jA},Image:cA,Path:aA,Polygon:sA,Polyline:oA,Rect:eA,TextBlock:lA});t.ArrayExt=Af,t.BackgroundManager=xA,t.Basecoat=wf,t.Cell=Ww,t.CellView=ax,t.Collection=Yw,t.Color=wy,t.Config=jb,t.CssLoader=Oy,t.Curve=$y,t.Dictionary=Ay,t.Disablable=class extends wf{get disabled(){return!0===this._disabled}enable(){delete this._disabled}disable(){this._disabled=!0}},t.Disposable=r,t.DisposableDelegate=class{constructor(t){this.callback=t}get disposed(){return!this.callback}dispose(){if(!this.callback)return;const t=this.callback;this.callback=null,t()}},t.DisposableSet=i,t.Dom=py,t.Edge=Xw,t.EdgeView=gA,t.Ellipse=_y,t.Events=lf,t.FunctionExt=of,t.Graph=NA,t.GraphView=dA,t.Line=jy,t.Model=Zw,t.Node=Jw,t.NodeView=uA,t.NumberExt=Vf,t.ObjectExt=bf,t.Path=Qy,t.Point=ky,t.Polyline=zy,t.PriorityQueue=vy,t.Rectangle=Ny,t.Registry=Gw,t.Segment=Fy,t.Shape=_A,t.StringExt=Bf,t.Text=Jp,t.ToolsView=lx,t.TransformManager=bA,t.Vector=fm,t.View=rx,t.normalizePathData=Ky})); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/数字工厂MES系统操作指引.pdf b/public/数字工厂MES系统操作指引.pdf new file mode 100644 index 0000000..bc590b1 Binary files /dev/null and b/public/数字工厂MES系统操作指引.pdf differ diff --git a/public/车间MES打印机更换纸张.pdf b/public/车间MES打印机更换纸张.pdf new file mode 100644 index 0000000..ccab883 Binary files /dev/null and b/public/车间MES打印机更换纸张.pdf differ diff --git a/src/assets/add.svg b/src/assets/add.svg new file mode 100644 index 0000000..df163b7 --- /dev/null +++ b/src/assets/add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/addChild.svg b/src/assets/addChild.svg new file mode 100644 index 0000000..d288b4b --- /dev/null +++ b/src/assets/addChild.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/areas.json b/src/assets/areas.json new file mode 100644 index 0000000..19bebc2 --- /dev/null +++ b/src/assets/areas.json @@ -0,0 +1 @@ +[{"code":"110101","name":"东城区","cityCode":"1101","provinceCode":"11"},{"code":"110102","name":"西城区","cityCode":"1101","provinceCode":"11"},{"code":"110105","name":"朝阳区","cityCode":"1101","provinceCode":"11"},{"code":"110106","name":"丰台区","cityCode":"1101","provinceCode":"11"},{"code":"110107","name":"石景山区","cityCode":"1101","provinceCode":"11"},{"code":"110108","name":"海淀区","cityCode":"1101","provinceCode":"11"},{"code":"110109","name":"门头沟区","cityCode":"1101","provinceCode":"11"},{"code":"110111","name":"房山区","cityCode":"1101","provinceCode":"11"},{"code":"110112","name":"通州区","cityCode":"1101","provinceCode":"11"},{"code":"110113","name":"顺义区","cityCode":"1101","provinceCode":"11"},{"code":"110114","name":"昌平区","cityCode":"1101","provinceCode":"11"},{"code":"110115","name":"大兴区","cityCode":"1101","provinceCode":"11"},{"code":"110116","name":"怀柔区","cityCode":"1101","provinceCode":"11"},{"code":"110117","name":"平谷区","cityCode":"1101","provinceCode":"11"},{"code":"110118","name":"密云区","cityCode":"1101","provinceCode":"11"},{"code":"110119","name":"延庆区","cityCode":"1101","provinceCode":"11"},{"code":"120101","name":"和平区","cityCode":"1201","provinceCode":"12"},{"code":"120102","name":"河东区","cityCode":"1201","provinceCode":"12"},{"code":"120103","name":"河西区","cityCode":"1201","provinceCode":"12"},{"code":"120104","name":"南开区","cityCode":"1201","provinceCode":"12"},{"code":"120105","name":"河北区","cityCode":"1201","provinceCode":"12"},{"code":"120106","name":"红桥区","cityCode":"1201","provinceCode":"12"},{"code":"120110","name":"东丽区","cityCode":"1201","provinceCode":"12"},{"code":"120111","name":"西青区","cityCode":"1201","provinceCode":"12"},{"code":"120112","name":"津南区","cityCode":"1201","provinceCode":"12"},{"code":"120113","name":"北辰区","cityCode":"1201","provinceCode":"12"},{"code":"120114","name":"武清区","cityCode":"1201","provinceCode":"12"},{"code":"120115","name":"宝坻区","cityCode":"1201","provinceCode":"12"},{"code":"120116","name":"滨海新区","cityCode":"1201","provinceCode":"12"},{"code":"120117","name":"宁河区","cityCode":"1201","provinceCode":"12"},{"code":"120118","name":"静海区","cityCode":"1201","provinceCode":"12"},{"code":"120119","name":"蓟州区","cityCode":"1201","provinceCode":"12"},{"code":"130102","name":"长安区","cityCode":"1301","provinceCode":"13"},{"code":"130104","name":"桥西区","cityCode":"1301","provinceCode":"13"},{"code":"130105","name":"新华区","cityCode":"1301","provinceCode":"13"},{"code":"130107","name":"井陉矿区","cityCode":"1301","provinceCode":"13"},{"code":"130108","name":"裕华区","cityCode":"1301","provinceCode":"13"},{"code":"130109","name":"藁城区","cityCode":"1301","provinceCode":"13"},{"code":"130110","name":"鹿泉区","cityCode":"1301","provinceCode":"13"},{"code":"130111","name":"栾城区","cityCode":"1301","provinceCode":"13"},{"code":"130121","name":"井陉县","cityCode":"1301","provinceCode":"13"},{"code":"130123","name":"正定县","cityCode":"1301","provinceCode":"13"},{"code":"130125","name":"行唐县","cityCode":"1301","provinceCode":"13"},{"code":"130126","name":"灵寿县","cityCode":"1301","provinceCode":"13"},{"code":"130127","name":"高邑县","cityCode":"1301","provinceCode":"13"},{"code":"130128","name":"深泽县","cityCode":"1301","provinceCode":"13"},{"code":"130129","name":"赞皇县","cityCode":"1301","provinceCode":"13"},{"code":"130130","name":"无极县","cityCode":"1301","provinceCode":"13"},{"code":"130131","name":"平山县","cityCode":"1301","provinceCode":"13"},{"code":"130132","name":"元氏县","cityCode":"1301","provinceCode":"13"},{"code":"130133","name":"赵县","cityCode":"1301","provinceCode":"13"},{"code":"130183","name":"晋州市","cityCode":"1301","provinceCode":"13"},{"code":"130184","name":"新乐市","cityCode":"1301","provinceCode":"13"},{"code":"130202","name":"路南区","cityCode":"1302","provinceCode":"13"},{"code":"130203","name":"路北区","cityCode":"1302","provinceCode":"13"},{"code":"130204","name":"古冶区","cityCode":"1302","provinceCode":"13"},{"code":"130205","name":"开平区","cityCode":"1302","provinceCode":"13"},{"code":"130207","name":"丰南区","cityCode":"1302","provinceCode":"13"},{"code":"130208","name":"丰润区","cityCode":"1302","provinceCode":"13"},{"code":"130209","name":"曹妃甸区","cityCode":"1302","provinceCode":"13"},{"code":"130223","name":"滦县","cityCode":"1302","provinceCode":"13"},{"code":"130224","name":"滦南县","cityCode":"1302","provinceCode":"13"},{"code":"130225","name":"乐亭县","cityCode":"1302","provinceCode":"13"},{"code":"130227","name":"迁西县","cityCode":"1302","provinceCode":"13"},{"code":"130229","name":"玉田县","cityCode":"1302","provinceCode":"13"},{"code":"130281","name":"遵化市","cityCode":"1302","provinceCode":"13"},{"code":"130283","name":"迁安市","cityCode":"1302","provinceCode":"13"},{"code":"130302","name":"海港区","cityCode":"1303","provinceCode":"13"},{"code":"130303","name":"山海关区","cityCode":"1303","provinceCode":"13"},{"code":"130304","name":"北戴河区","cityCode":"1303","provinceCode":"13"},{"code":"130306","name":"抚宁区","cityCode":"1303","provinceCode":"13"},{"code":"130321","name":"青龙满族自治县","cityCode":"1303","provinceCode":"13"},{"code":"130322","name":"昌黎县","cityCode":"1303","provinceCode":"13"},{"code":"130324","name":"卢龙县","cityCode":"1303","provinceCode":"13"},{"code":"130402","name":"邯山区","cityCode":"1304","provinceCode":"13"},{"code":"130403","name":"丛台区","cityCode":"1304","provinceCode":"13"},{"code":"130404","name":"复兴区","cityCode":"1304","provinceCode":"13"},{"code":"130406","name":"峰峰矿区","cityCode":"1304","provinceCode":"13"},{"code":"130421","name":"邯郸县","cityCode":"1304","provinceCode":"13"},{"code":"130423","name":"临漳县","cityCode":"1304","provinceCode":"13"},{"code":"130424","name":"成安县","cityCode":"1304","provinceCode":"13"},{"code":"130425","name":"大名县","cityCode":"1304","provinceCode":"13"},{"code":"130426","name":"涉县","cityCode":"1304","provinceCode":"13"},{"code":"130427","name":"磁县","cityCode":"1304","provinceCode":"13"},{"code":"130428","name":"肥乡县","cityCode":"1304","provinceCode":"13"},{"code":"130429","name":"永年县","cityCode":"1304","provinceCode":"13"},{"code":"130430","name":"邱县","cityCode":"1304","provinceCode":"13"},{"code":"130431","name":"鸡泽县","cityCode":"1304","provinceCode":"13"},{"code":"130432","name":"广平县","cityCode":"1304","provinceCode":"13"},{"code":"130433","name":"馆陶县","cityCode":"1304","provinceCode":"13"},{"code":"130434","name":"魏县","cityCode":"1304","provinceCode":"13"},{"code":"130435","name":"曲周县","cityCode":"1304","provinceCode":"13"},{"code":"130481","name":"武安市","cityCode":"1304","provinceCode":"13"},{"code":"130502","name":"桥东区","cityCode":"1305","provinceCode":"13"},{"code":"130503","name":"桥西区","cityCode":"1305","provinceCode":"13"},{"code":"130521","name":"邢台县","cityCode":"1305","provinceCode":"13"},{"code":"130522","name":"临城县","cityCode":"1305","provinceCode":"13"},{"code":"130523","name":"内丘县","cityCode":"1305","provinceCode":"13"},{"code":"130524","name":"柏乡县","cityCode":"1305","provinceCode":"13"},{"code":"130525","name":"隆尧县","cityCode":"1305","provinceCode":"13"},{"code":"130526","name":"任县","cityCode":"1305","provinceCode":"13"},{"code":"130527","name":"南和县","cityCode":"1305","provinceCode":"13"},{"code":"130528","name":"宁晋县","cityCode":"1305","provinceCode":"13"},{"code":"130529","name":"巨鹿县","cityCode":"1305","provinceCode":"13"},{"code":"130530","name":"新河县","cityCode":"1305","provinceCode":"13"},{"code":"130531","name":"广宗县","cityCode":"1305","provinceCode":"13"},{"code":"130532","name":"平乡县","cityCode":"1305","provinceCode":"13"},{"code":"130533","name":"威县","cityCode":"1305","provinceCode":"13"},{"code":"130534","name":"清河县","cityCode":"1305","provinceCode":"13"},{"code":"130535","name":"临西县","cityCode":"1305","provinceCode":"13"},{"code":"130581","name":"南宫市","cityCode":"1305","provinceCode":"13"},{"code":"130582","name":"沙河市","cityCode":"1305","provinceCode":"13"},{"code":"130602","name":"竞秀区","cityCode":"1306","provinceCode":"13"},{"code":"130606","name":"莲池区","cityCode":"1306","provinceCode":"13"},{"code":"130607","name":"满城区","cityCode":"1306","provinceCode":"13"},{"code":"130608","name":"清苑区","cityCode":"1306","provinceCode":"13"},{"code":"130609","name":"徐水区","cityCode":"1306","provinceCode":"13"},{"code":"130623","name":"涞水县","cityCode":"1306","provinceCode":"13"},{"code":"130624","name":"阜平县","cityCode":"1306","provinceCode":"13"},{"code":"130626","name":"定兴县","cityCode":"1306","provinceCode":"13"},{"code":"130627","name":"唐县","cityCode":"1306","provinceCode":"13"},{"code":"130628","name":"高阳县","cityCode":"1306","provinceCode":"13"},{"code":"130629","name":"容城县","cityCode":"1306","provinceCode":"13"},{"code":"130630","name":"涞源县","cityCode":"1306","provinceCode":"13"},{"code":"130631","name":"望都县","cityCode":"1306","provinceCode":"13"},{"code":"130632","name":"安新县","cityCode":"1306","provinceCode":"13"},{"code":"130633","name":"易县","cityCode":"1306","provinceCode":"13"},{"code":"130634","name":"曲阳县","cityCode":"1306","provinceCode":"13"},{"code":"130635","name":"蠡县","cityCode":"1306","provinceCode":"13"},{"code":"130636","name":"顺平县","cityCode":"1306","provinceCode":"13"},{"code":"130637","name":"博野县","cityCode":"1306","provinceCode":"13"},{"code":"130638","name":"雄县","cityCode":"1306","provinceCode":"13"},{"code":"130681","name":"涿州市","cityCode":"1306","provinceCode":"13"},{"code":"130683","name":"安国市","cityCode":"1306","provinceCode":"13"},{"code":"130684","name":"高碑店市","cityCode":"1306","provinceCode":"13"},{"code":"130702","name":"桥东区","cityCode":"1307","provinceCode":"13"},{"code":"130703","name":"桥西区","cityCode":"1307","provinceCode":"13"},{"code":"130705","name":"宣化区","cityCode":"1307","provinceCode":"13"},{"code":"130706","name":"下花园区","cityCode":"1307","provinceCode":"13"},{"code":"130708","name":"万全区","cityCode":"1307","provinceCode":"13"},{"code":"130709","name":"崇礼区","cityCode":"1307","provinceCode":"13"},{"code":"130722","name":"张北县","cityCode":"1307","provinceCode":"13"},{"code":"130723","name":"康保县","cityCode":"1307","provinceCode":"13"},{"code":"130724","name":"沽源县","cityCode":"1307","provinceCode":"13"},{"code":"130725","name":"尚义县","cityCode":"1307","provinceCode":"13"},{"code":"130726","name":"蔚县","cityCode":"1307","provinceCode":"13"},{"code":"130727","name":"阳原县","cityCode":"1307","provinceCode":"13"},{"code":"130728","name":"怀安县","cityCode":"1307","provinceCode":"13"},{"code":"130730","name":"怀来县","cityCode":"1307","provinceCode":"13"},{"code":"130731","name":"涿鹿县","cityCode":"1307","provinceCode":"13"},{"code":"130732","name":"赤城县","cityCode":"1307","provinceCode":"13"},{"code":"130802","name":"双桥区","cityCode":"1308","provinceCode":"13"},{"code":"130803","name":"双滦区","cityCode":"1308","provinceCode":"13"},{"code":"130804","name":"鹰手营子矿区","cityCode":"1308","provinceCode":"13"},{"code":"130821","name":"承德县","cityCode":"1308","provinceCode":"13"},{"code":"130822","name":"兴隆县","cityCode":"1308","provinceCode":"13"},{"code":"130823","name":"平泉县","cityCode":"1308","provinceCode":"13"},{"code":"130824","name":"滦平县","cityCode":"1308","provinceCode":"13"},{"code":"130825","name":"隆化县","cityCode":"1308","provinceCode":"13"},{"code":"130826","name":"丰宁满族自治县","cityCode":"1308","provinceCode":"13"},{"code":"130827","name":"宽城满族自治县","cityCode":"1308","provinceCode":"13"},{"code":"130828","name":"围场满族蒙古族自治县","cityCode":"1308","provinceCode":"13"},{"code":"130902","name":"新华区","cityCode":"1309","provinceCode":"13"},{"code":"130903","name":"运河区","cityCode":"1309","provinceCode":"13"},{"code":"130921","name":"沧县","cityCode":"1309","provinceCode":"13"},{"code":"130922","name":"青县","cityCode":"1309","provinceCode":"13"},{"code":"130923","name":"东光县","cityCode":"1309","provinceCode":"13"},{"code":"130924","name":"海兴县","cityCode":"1309","provinceCode":"13"},{"code":"130925","name":"盐山县","cityCode":"1309","provinceCode":"13"},{"code":"130926","name":"肃宁县","cityCode":"1309","provinceCode":"13"},{"code":"130927","name":"南皮县","cityCode":"1309","provinceCode":"13"},{"code":"130928","name":"吴桥县","cityCode":"1309","provinceCode":"13"},{"code":"130929","name":"献县","cityCode":"1309","provinceCode":"13"},{"code":"130930","name":"孟村回族自治县","cityCode":"1309","provinceCode":"13"},{"code":"130981","name":"泊头市","cityCode":"1309","provinceCode":"13"},{"code":"130982","name":"任丘市","cityCode":"1309","provinceCode":"13"},{"code":"130983","name":"黄骅市","cityCode":"1309","provinceCode":"13"},{"code":"130984","name":"河间市","cityCode":"1309","provinceCode":"13"},{"code":"131002","name":"安次区","cityCode":"1310","provinceCode":"13"},{"code":"131003","name":"广阳区","cityCode":"1310","provinceCode":"13"},{"code":"131022","name":"固安县","cityCode":"1310","provinceCode":"13"},{"code":"131023","name":"永清县","cityCode":"1310","provinceCode":"13"},{"code":"131024","name":"香河县","cityCode":"1310","provinceCode":"13"},{"code":"131025","name":"大城县","cityCode":"1310","provinceCode":"13"},{"code":"131026","name":"文安县","cityCode":"1310","provinceCode":"13"},{"code":"131028","name":"大厂回族自治县","cityCode":"1310","provinceCode":"13"},{"code":"131081","name":"霸州市","cityCode":"1310","provinceCode":"13"},{"code":"131082","name":"三河市","cityCode":"1310","provinceCode":"13"},{"code":"131102","name":"桃城区","cityCode":"1311","provinceCode":"13"},{"code":"131103","name":"冀州区","cityCode":"1311","provinceCode":"13"},{"code":"131121","name":"枣强县","cityCode":"1311","provinceCode":"13"},{"code":"131122","name":"武邑县","cityCode":"1311","provinceCode":"13"},{"code":"131123","name":"武强县","cityCode":"1311","provinceCode":"13"},{"code":"131124","name":"饶阳县","cityCode":"1311","provinceCode":"13"},{"code":"131125","name":"安平县","cityCode":"1311","provinceCode":"13"},{"code":"131126","name":"故城县","cityCode":"1311","provinceCode":"13"},{"code":"131127","name":"景县","cityCode":"1311","provinceCode":"13"},{"code":"131128","name":"阜城县","cityCode":"1311","provinceCode":"13"},{"code":"131182","name":"深州市","cityCode":"1311","provinceCode":"13"},{"code":"139001","name":"定州市","cityCode":"1390","provinceCode":"13"},{"code":"139002","name":"辛集市","cityCode":"1390","provinceCode":"13"},{"code":"140105","name":"小店区","cityCode":"1401","provinceCode":"14"},{"code":"140106","name":"迎泽区","cityCode":"1401","provinceCode":"14"},{"code":"140107","name":"杏花岭区","cityCode":"1401","provinceCode":"14"},{"code":"140108","name":"尖草坪区","cityCode":"1401","provinceCode":"14"},{"code":"140109","name":"万柏林区","cityCode":"1401","provinceCode":"14"},{"code":"140110","name":"晋源区","cityCode":"1401","provinceCode":"14"},{"code":"140121","name":"清徐县","cityCode":"1401","provinceCode":"14"},{"code":"140122","name":"阳曲县","cityCode":"1401","provinceCode":"14"},{"code":"140123","name":"娄烦县","cityCode":"1401","provinceCode":"14"},{"code":"140181","name":"古交市","cityCode":"1401","provinceCode":"14"},{"code":"140202","name":"城区","cityCode":"1402","provinceCode":"14"},{"code":"140203","name":"矿区","cityCode":"1402","provinceCode":"14"},{"code":"140211","name":"南郊区","cityCode":"1402","provinceCode":"14"},{"code":"140212","name":"新荣区","cityCode":"1402","provinceCode":"14"},{"code":"140221","name":"阳高县","cityCode":"1402","provinceCode":"14"},{"code":"140222","name":"天镇县","cityCode":"1402","provinceCode":"14"},{"code":"140223","name":"广灵县","cityCode":"1402","provinceCode":"14"},{"code":"140224","name":"灵丘县","cityCode":"1402","provinceCode":"14"},{"code":"140225","name":"浑源县","cityCode":"1402","provinceCode":"14"},{"code":"140226","name":"左云县","cityCode":"1402","provinceCode":"14"},{"code":"140227","name":"大同县","cityCode":"1402","provinceCode":"14"},{"code":"140302","name":"城区","cityCode":"1403","provinceCode":"14"},{"code":"140303","name":"矿区","cityCode":"1403","provinceCode":"14"},{"code":"140311","name":"郊区","cityCode":"1403","provinceCode":"14"},{"code":"140321","name":"平定县","cityCode":"1403","provinceCode":"14"},{"code":"140322","name":"盂县","cityCode":"1403","provinceCode":"14"},{"code":"140402","name":"城区","cityCode":"1404","provinceCode":"14"},{"code":"140411","name":"郊区","cityCode":"1404","provinceCode":"14"},{"code":"140421","name":"长治县","cityCode":"1404","provinceCode":"14"},{"code":"140423","name":"襄垣县","cityCode":"1404","provinceCode":"14"},{"code":"140424","name":"屯留县","cityCode":"1404","provinceCode":"14"},{"code":"140425","name":"平顺县","cityCode":"1404","provinceCode":"14"},{"code":"140426","name":"黎城县","cityCode":"1404","provinceCode":"14"},{"code":"140427","name":"壶关县","cityCode":"1404","provinceCode":"14"},{"code":"140428","name":"长子县","cityCode":"1404","provinceCode":"14"},{"code":"140429","name":"武乡县","cityCode":"1404","provinceCode":"14"},{"code":"140430","name":"沁县","cityCode":"1404","provinceCode":"14"},{"code":"140431","name":"沁源县","cityCode":"1404","provinceCode":"14"},{"code":"140481","name":"潞城市","cityCode":"1404","provinceCode":"14"},{"code":"140502","name":"城区","cityCode":"1405","provinceCode":"14"},{"code":"140521","name":"沁水县","cityCode":"1405","provinceCode":"14"},{"code":"140522","name":"阳城县","cityCode":"1405","provinceCode":"14"},{"code":"140524","name":"陵川县","cityCode":"1405","provinceCode":"14"},{"code":"140525","name":"泽州县","cityCode":"1405","provinceCode":"14"},{"code":"140581","name":"高平市","cityCode":"1405","provinceCode":"14"},{"code":"140602","name":"朔城区","cityCode":"1406","provinceCode":"14"},{"code":"140603","name":"平鲁区","cityCode":"1406","provinceCode":"14"},{"code":"140621","name":"山阴县","cityCode":"1406","provinceCode":"14"},{"code":"140622","name":"应县","cityCode":"1406","provinceCode":"14"},{"code":"140623","name":"右玉县","cityCode":"1406","provinceCode":"14"},{"code":"140624","name":"怀仁县","cityCode":"1406","provinceCode":"14"},{"code":"140702","name":"榆次区","cityCode":"1407","provinceCode":"14"},{"code":"140721","name":"榆社县","cityCode":"1407","provinceCode":"14"},{"code":"140722","name":"左权县","cityCode":"1407","provinceCode":"14"},{"code":"140723","name":"和顺县","cityCode":"1407","provinceCode":"14"},{"code":"140724","name":"昔阳县","cityCode":"1407","provinceCode":"14"},{"code":"140725","name":"寿阳县","cityCode":"1407","provinceCode":"14"},{"code":"140726","name":"太谷县","cityCode":"1407","provinceCode":"14"},{"code":"140727","name":"祁县","cityCode":"1407","provinceCode":"14"},{"code":"140728","name":"平遥县","cityCode":"1407","provinceCode":"14"},{"code":"140729","name":"灵石县","cityCode":"1407","provinceCode":"14"},{"code":"140781","name":"介休市","cityCode":"1407","provinceCode":"14"},{"code":"140802","name":"盐湖区","cityCode":"1408","provinceCode":"14"},{"code":"140821","name":"临猗县","cityCode":"1408","provinceCode":"14"},{"code":"140822","name":"万荣县","cityCode":"1408","provinceCode":"14"},{"code":"140823","name":"闻喜县","cityCode":"1408","provinceCode":"14"},{"code":"140824","name":"稷山县","cityCode":"1408","provinceCode":"14"},{"code":"140825","name":"新绛县","cityCode":"1408","provinceCode":"14"},{"code":"140826","name":"绛县","cityCode":"1408","provinceCode":"14"},{"code":"140827","name":"垣曲县","cityCode":"1408","provinceCode":"14"},{"code":"140828","name":"夏县","cityCode":"1408","provinceCode":"14"},{"code":"140829","name":"平陆县","cityCode":"1408","provinceCode":"14"},{"code":"140830","name":"芮城县","cityCode":"1408","provinceCode":"14"},{"code":"140881","name":"永济市","cityCode":"1408","provinceCode":"14"},{"code":"140882","name":"河津市","cityCode":"1408","provinceCode":"14"},{"code":"140902","name":"忻府区","cityCode":"1409","provinceCode":"14"},{"code":"140921","name":"定襄县","cityCode":"1409","provinceCode":"14"},{"code":"140922","name":"五台县","cityCode":"1409","provinceCode":"14"},{"code":"140923","name":"代县","cityCode":"1409","provinceCode":"14"},{"code":"140924","name":"繁峙县","cityCode":"1409","provinceCode":"14"},{"code":"140925","name":"宁武县","cityCode":"1409","provinceCode":"14"},{"code":"140926","name":"静乐县","cityCode":"1409","provinceCode":"14"},{"code":"140927","name":"神池县","cityCode":"1409","provinceCode":"14"},{"code":"140928","name":"五寨县","cityCode":"1409","provinceCode":"14"},{"code":"140929","name":"岢岚县","cityCode":"1409","provinceCode":"14"},{"code":"140930","name":"河曲县","cityCode":"1409","provinceCode":"14"},{"code":"140931","name":"保德县","cityCode":"1409","provinceCode":"14"},{"code":"140932","name":"偏关县","cityCode":"1409","provinceCode":"14"},{"code":"140981","name":"原平市","cityCode":"1409","provinceCode":"14"},{"code":"141002","name":"尧都区","cityCode":"1410","provinceCode":"14"},{"code":"141021","name":"曲沃县","cityCode":"1410","provinceCode":"14"},{"code":"141022","name":"翼城县","cityCode":"1410","provinceCode":"14"},{"code":"141023","name":"襄汾县","cityCode":"1410","provinceCode":"14"},{"code":"141024","name":"洪洞县","cityCode":"1410","provinceCode":"14"},{"code":"141025","name":"古县","cityCode":"1410","provinceCode":"14"},{"code":"141026","name":"安泽县","cityCode":"1410","provinceCode":"14"},{"code":"141027","name":"浮山县","cityCode":"1410","provinceCode":"14"},{"code":"141028","name":"吉县","cityCode":"1410","provinceCode":"14"},{"code":"141029","name":"乡宁县","cityCode":"1410","provinceCode":"14"},{"code":"141030","name":"大宁县","cityCode":"1410","provinceCode":"14"},{"code":"141031","name":"隰县","cityCode":"1410","provinceCode":"14"},{"code":"141032","name":"永和县","cityCode":"1410","provinceCode":"14"},{"code":"141033","name":"蒲县","cityCode":"1410","provinceCode":"14"},{"code":"141034","name":"汾西县","cityCode":"1410","provinceCode":"14"},{"code":"141081","name":"侯马市","cityCode":"1410","provinceCode":"14"},{"code":"141082","name":"霍州市","cityCode":"1410","provinceCode":"14"},{"code":"141102","name":"离石区","cityCode":"1411","provinceCode":"14"},{"code":"141121","name":"文水县","cityCode":"1411","provinceCode":"14"},{"code":"141122","name":"交城县","cityCode":"1411","provinceCode":"14"},{"code":"141123","name":"兴县","cityCode":"1411","provinceCode":"14"},{"code":"141124","name":"临县","cityCode":"1411","provinceCode":"14"},{"code":"141125","name":"柳林县","cityCode":"1411","provinceCode":"14"},{"code":"141126","name":"石楼县","cityCode":"1411","provinceCode":"14"},{"code":"141127","name":"岚县","cityCode":"1411","provinceCode":"14"},{"code":"141128","name":"方山县","cityCode":"1411","provinceCode":"14"},{"code":"141129","name":"中阳县","cityCode":"1411","provinceCode":"14"},{"code":"141130","name":"交口县","cityCode":"1411","provinceCode":"14"},{"code":"141181","name":"孝义市","cityCode":"1411","provinceCode":"14"},{"code":"141182","name":"汾阳市","cityCode":"1411","provinceCode":"14"},{"code":"150102","name":"新城区","cityCode":"1501","provinceCode":"15"},{"code":"150103","name":"回民区","cityCode":"1501","provinceCode":"15"},{"code":"150104","name":"玉泉区","cityCode":"1501","provinceCode":"15"},{"code":"150105","name":"赛罕区","cityCode":"1501","provinceCode":"15"},{"code":"150121","name":"土默特左旗","cityCode":"1501","provinceCode":"15"},{"code":"150122","name":"托克托县","cityCode":"1501","provinceCode":"15"},{"code":"150123","name":"和林格尔县","cityCode":"1501","provinceCode":"15"},{"code":"150124","name":"清水河县","cityCode":"1501","provinceCode":"15"},{"code":"150125","name":"武川县","cityCode":"1501","provinceCode":"15"},{"code":"150202","name":"东河区","cityCode":"1502","provinceCode":"15"},{"code":"150203","name":"昆都仑区","cityCode":"1502","provinceCode":"15"},{"code":"150204","name":"青山区","cityCode":"1502","provinceCode":"15"},{"code":"150205","name":"石拐区","cityCode":"1502","provinceCode":"15"},{"code":"150206","name":"白云鄂博矿区","cityCode":"1502","provinceCode":"15"},{"code":"150207","name":"九原区","cityCode":"1502","provinceCode":"15"},{"code":"150221","name":"土默特右旗","cityCode":"1502","provinceCode":"15"},{"code":"150222","name":"固阳县","cityCode":"1502","provinceCode":"15"},{"code":"150223","name":"达尔罕茂明安联合旗","cityCode":"1502","provinceCode":"15"},{"code":"150302","name":"海勃湾区","cityCode":"1503","provinceCode":"15"},{"code":"150303","name":"海南区","cityCode":"1503","provinceCode":"15"},{"code":"150304","name":"乌达区","cityCode":"1503","provinceCode":"15"},{"code":"150402","name":"红山区","cityCode":"1504","provinceCode":"15"},{"code":"150403","name":"元宝山区","cityCode":"1504","provinceCode":"15"},{"code":"150404","name":"松山区","cityCode":"1504","provinceCode":"15"},{"code":"150421","name":"阿鲁科尔沁旗","cityCode":"1504","provinceCode":"15"},{"code":"150422","name":"巴林左旗","cityCode":"1504","provinceCode":"15"},{"code":"150423","name":"巴林右旗","cityCode":"1504","provinceCode":"15"},{"code":"150424","name":"林西县","cityCode":"1504","provinceCode":"15"},{"code":"150425","name":"克什克腾旗","cityCode":"1504","provinceCode":"15"},{"code":"150426","name":"翁牛特旗","cityCode":"1504","provinceCode":"15"},{"code":"150428","name":"喀喇沁旗","cityCode":"1504","provinceCode":"15"},{"code":"150429","name":"宁城县","cityCode":"1504","provinceCode":"15"},{"code":"150430","name":"敖汉旗","cityCode":"1504","provinceCode":"15"},{"code":"150502","name":"科尔沁区","cityCode":"1505","provinceCode":"15"},{"code":"150521","name":"科尔沁左翼中旗","cityCode":"1505","provinceCode":"15"},{"code":"150522","name":"科尔沁左翼后旗","cityCode":"1505","provinceCode":"15"},{"code":"150523","name":"开鲁县","cityCode":"1505","provinceCode":"15"},{"code":"150524","name":"库伦旗","cityCode":"1505","provinceCode":"15"},{"code":"150525","name":"奈曼旗","cityCode":"1505","provinceCode":"15"},{"code":"150526","name":"扎鲁特旗","cityCode":"1505","provinceCode":"15"},{"code":"150581","name":"霍林郭勒市","cityCode":"1505","provinceCode":"15"},{"code":"150602","name":"东胜区","cityCode":"1506","provinceCode":"15"},{"code":"150603","name":"康巴什区","cityCode":"1506","provinceCode":"15"},{"code":"150621","name":"达拉特旗","cityCode":"1506","provinceCode":"15"},{"code":"150622","name":"准格尔旗","cityCode":"1506","provinceCode":"15"},{"code":"150623","name":"鄂托克前旗","cityCode":"1506","provinceCode":"15"},{"code":"150624","name":"鄂托克旗","cityCode":"1506","provinceCode":"15"},{"code":"150625","name":"杭锦旗","cityCode":"1506","provinceCode":"15"},{"code":"150626","name":"乌审旗","cityCode":"1506","provinceCode":"15"},{"code":"150627","name":"伊金霍洛旗","cityCode":"1506","provinceCode":"15"},{"code":"150702","name":"海拉尔区","cityCode":"1507","provinceCode":"15"},{"code":"150703","name":"扎赉诺尔区","cityCode":"1507","provinceCode":"15"},{"code":"150721","name":"阿荣旗","cityCode":"1507","provinceCode":"15"},{"code":"150722","name":"莫力达瓦达斡尔族自治旗","cityCode":"1507","provinceCode":"15"},{"code":"150723","name":"鄂伦春自治旗","cityCode":"1507","provinceCode":"15"},{"code":"150724","name":"鄂温克族自治旗","cityCode":"1507","provinceCode":"15"},{"code":"150725","name":"陈巴尔虎旗","cityCode":"1507","provinceCode":"15"},{"code":"150726","name":"新巴尔虎左旗","cityCode":"1507","provinceCode":"15"},{"code":"150727","name":"新巴尔虎右旗","cityCode":"1507","provinceCode":"15"},{"code":"150781","name":"满洲里市","cityCode":"1507","provinceCode":"15"},{"code":"150782","name":"牙克石市","cityCode":"1507","provinceCode":"15"},{"code":"150783","name":"扎兰屯市","cityCode":"1507","provinceCode":"15"},{"code":"150784","name":"额尔古纳市","cityCode":"1507","provinceCode":"15"},{"code":"150785","name":"根河市","cityCode":"1507","provinceCode":"15"},{"code":"150802","name":"临河区","cityCode":"1508","provinceCode":"15"},{"code":"150821","name":"五原县","cityCode":"1508","provinceCode":"15"},{"code":"150822","name":"磴口县","cityCode":"1508","provinceCode":"15"},{"code":"150823","name":"乌拉特前旗","cityCode":"1508","provinceCode":"15"},{"code":"150824","name":"乌拉特中旗","cityCode":"1508","provinceCode":"15"},{"code":"150825","name":"乌拉特后旗","cityCode":"1508","provinceCode":"15"},{"code":"150826","name":"杭锦后旗","cityCode":"1508","provinceCode":"15"},{"code":"150902","name":"集宁区","cityCode":"1509","provinceCode":"15"},{"code":"150921","name":"卓资县","cityCode":"1509","provinceCode":"15"},{"code":"150922","name":"化德县","cityCode":"1509","provinceCode":"15"},{"code":"150923","name":"商都县","cityCode":"1509","provinceCode":"15"},{"code":"150924","name":"兴和县","cityCode":"1509","provinceCode":"15"},{"code":"150925","name":"凉城县","cityCode":"1509","provinceCode":"15"},{"code":"150926","name":"察哈尔右翼前旗","cityCode":"1509","provinceCode":"15"},{"code":"150927","name":"察哈尔右翼中旗","cityCode":"1509","provinceCode":"15"},{"code":"150928","name":"察哈尔右翼后旗","cityCode":"1509","provinceCode":"15"},{"code":"150929","name":"四子王旗","cityCode":"1509","provinceCode":"15"},{"code":"150981","name":"丰镇市","cityCode":"1509","provinceCode":"15"},{"code":"152201","name":"乌兰浩特市","cityCode":"1522","provinceCode":"15"},{"code":"152202","name":"阿尔山市","cityCode":"1522","provinceCode":"15"},{"code":"152221","name":"科尔沁右翼前旗","cityCode":"1522","provinceCode":"15"},{"code":"152222","name":"科尔沁右翼中旗","cityCode":"1522","provinceCode":"15"},{"code":"152223","name":"扎赉特旗","cityCode":"1522","provinceCode":"15"},{"code":"152224","name":"突泉县","cityCode":"1522","provinceCode":"15"},{"code":"152501","name":"二连浩特市","cityCode":"1525","provinceCode":"15"},{"code":"152502","name":"锡林浩特市","cityCode":"1525","provinceCode":"15"},{"code":"152522","name":"阿巴嘎旗","cityCode":"1525","provinceCode":"15"},{"code":"152523","name":"苏尼特左旗","cityCode":"1525","provinceCode":"15"},{"code":"152524","name":"苏尼特右旗","cityCode":"1525","provinceCode":"15"},{"code":"152525","name":"东乌珠穆沁旗","cityCode":"1525","provinceCode":"15"},{"code":"152526","name":"西乌珠穆沁旗","cityCode":"1525","provinceCode":"15"},{"code":"152527","name":"太仆寺旗","cityCode":"1525","provinceCode":"15"},{"code":"152528","name":"镶黄旗","cityCode":"1525","provinceCode":"15"},{"code":"152529","name":"正镶白旗","cityCode":"1525","provinceCode":"15"},{"code":"152530","name":"正蓝旗","cityCode":"1525","provinceCode":"15"},{"code":"152531","name":"多伦县","cityCode":"1525","provinceCode":"15"},{"code":"152921","name":"阿拉善左旗","cityCode":"1529","provinceCode":"15"},{"code":"152922","name":"阿拉善右旗","cityCode":"1529","provinceCode":"15"},{"code":"152923","name":"额济纳旗","cityCode":"1529","provinceCode":"15"},{"code":"210102","name":"和平区","cityCode":"2101","provinceCode":"21"},{"code":"210103","name":"沈河区","cityCode":"2101","provinceCode":"21"},{"code":"210104","name":"大东区","cityCode":"2101","provinceCode":"21"},{"code":"210105","name":"皇姑区","cityCode":"2101","provinceCode":"21"},{"code":"210106","name":"铁西区","cityCode":"2101","provinceCode":"21"},{"code":"210111","name":"苏家屯区","cityCode":"2101","provinceCode":"21"},{"code":"210112","name":"浑南区","cityCode":"2101","provinceCode":"21"},{"code":"210113","name":"沈北新区","cityCode":"2101","provinceCode":"21"},{"code":"210114","name":"于洪区","cityCode":"2101","provinceCode":"21"},{"code":"210115","name":"辽中区","cityCode":"2101","provinceCode":"21"},{"code":"210123","name":"康平县","cityCode":"2101","provinceCode":"21"},{"code":"210124","name":"法库县","cityCode":"2101","provinceCode":"21"},{"code":"210181","name":"新民市","cityCode":"2101","provinceCode":"21"},{"code":"210202","name":"中山区","cityCode":"2102","provinceCode":"21"},{"code":"210203","name":"西岗区","cityCode":"2102","provinceCode":"21"},{"code":"210204","name":"沙河口区","cityCode":"2102","provinceCode":"21"},{"code":"210211","name":"甘井子区","cityCode":"2102","provinceCode":"21"},{"code":"210212","name":"旅顺口区","cityCode":"2102","provinceCode":"21"},{"code":"210213","name":"金州区","cityCode":"2102","provinceCode":"21"},{"code":"210214","name":"普兰店区","cityCode":"2102","provinceCode":"21"},{"code":"210224","name":"长海县","cityCode":"2102","provinceCode":"21"},{"code":"210281","name":"瓦房店市","cityCode":"2102","provinceCode":"21"},{"code":"210283","name":"庄河市","cityCode":"2102","provinceCode":"21"},{"code":"210302","name":"铁东区","cityCode":"2103","provinceCode":"21"},{"code":"210303","name":"铁西区","cityCode":"2103","provinceCode":"21"},{"code":"210304","name":"立山区","cityCode":"2103","provinceCode":"21"},{"code":"210311","name":"千山区","cityCode":"2103","provinceCode":"21"},{"code":"210321","name":"台安县","cityCode":"2103","provinceCode":"21"},{"code":"210323","name":"岫岩满族自治县","cityCode":"2103","provinceCode":"21"},{"code":"210381","name":"海城市","cityCode":"2103","provinceCode":"21"},{"code":"210402","name":"新抚区","cityCode":"2104","provinceCode":"21"},{"code":"210403","name":"东洲区","cityCode":"2104","provinceCode":"21"},{"code":"210404","name":"望花区","cityCode":"2104","provinceCode":"21"},{"code":"210411","name":"顺城区","cityCode":"2104","provinceCode":"21"},{"code":"210421","name":"抚顺县","cityCode":"2104","provinceCode":"21"},{"code":"210422","name":"新宾满族自治县","cityCode":"2104","provinceCode":"21"},{"code":"210423","name":"清原满族自治县","cityCode":"2104","provinceCode":"21"},{"code":"210502","name":"平山区","cityCode":"2105","provinceCode":"21"},{"code":"210503","name":"溪湖区","cityCode":"2105","provinceCode":"21"},{"code":"210504","name":"明山区","cityCode":"2105","provinceCode":"21"},{"code":"210505","name":"南芬区","cityCode":"2105","provinceCode":"21"},{"code":"210521","name":"本溪满族自治县","cityCode":"2105","provinceCode":"21"},{"code":"210522","name":"桓仁满族自治县","cityCode":"2105","provinceCode":"21"},{"code":"210602","name":"元宝区","cityCode":"2106","provinceCode":"21"},{"code":"210603","name":"振兴区","cityCode":"2106","provinceCode":"21"},{"code":"210604","name":"振安区","cityCode":"2106","provinceCode":"21"},{"code":"210624","name":"宽甸满族自治县","cityCode":"2106","provinceCode":"21"},{"code":"210681","name":"东港市","cityCode":"2106","provinceCode":"21"},{"code":"210682","name":"凤城市","cityCode":"2106","provinceCode":"21"},{"code":"210702","name":"古塔区","cityCode":"2107","provinceCode":"21"},{"code":"210703","name":"凌河区","cityCode":"2107","provinceCode":"21"},{"code":"210711","name":"太和区","cityCode":"2107","provinceCode":"21"},{"code":"210726","name":"黑山县","cityCode":"2107","provinceCode":"21"},{"code":"210727","name":"义县","cityCode":"2107","provinceCode":"21"},{"code":"210781","name":"凌海市","cityCode":"2107","provinceCode":"21"},{"code":"210782","name":"北镇市","cityCode":"2107","provinceCode":"21"},{"code":"210802","name":"站前区","cityCode":"2108","provinceCode":"21"},{"code":"210803","name":"西市区","cityCode":"2108","provinceCode":"21"},{"code":"210804","name":"鲅鱼圈区","cityCode":"2108","provinceCode":"21"},{"code":"210811","name":"老边区","cityCode":"2108","provinceCode":"21"},{"code":"210881","name":"盖州市","cityCode":"2108","provinceCode":"21"},{"code":"210882","name":"大石桥市","cityCode":"2108","provinceCode":"21"},{"code":"210902","name":"海州区","cityCode":"2109","provinceCode":"21"},{"code":"210903","name":"新邱区","cityCode":"2109","provinceCode":"21"},{"code":"210904","name":"太平区","cityCode":"2109","provinceCode":"21"},{"code":"210905","name":"清河门区","cityCode":"2109","provinceCode":"21"},{"code":"210911","name":"细河区","cityCode":"2109","provinceCode":"21"},{"code":"210921","name":"阜新蒙古族自治县","cityCode":"2109","provinceCode":"21"},{"code":"210922","name":"彰武县","cityCode":"2109","provinceCode":"21"},{"code":"211002","name":"白塔区","cityCode":"2110","provinceCode":"21"},{"code":"211003","name":"文圣区","cityCode":"2110","provinceCode":"21"},{"code":"211004","name":"宏伟区","cityCode":"2110","provinceCode":"21"},{"code":"211005","name":"弓长岭区","cityCode":"2110","provinceCode":"21"},{"code":"211011","name":"太子河区","cityCode":"2110","provinceCode":"21"},{"code":"211021","name":"辽阳县","cityCode":"2110","provinceCode":"21"},{"code":"211081","name":"灯塔市","cityCode":"2110","provinceCode":"21"},{"code":"211102","name":"双台子区","cityCode":"2111","provinceCode":"21"},{"code":"211103","name":"兴隆台区","cityCode":"2111","provinceCode":"21"},{"code":"211104","name":"大洼区","cityCode":"2111","provinceCode":"21"},{"code":"211122","name":"盘山县","cityCode":"2111","provinceCode":"21"},{"code":"211202","name":"银州区","cityCode":"2112","provinceCode":"21"},{"code":"211204","name":"清河区","cityCode":"2112","provinceCode":"21"},{"code":"211221","name":"铁岭县","cityCode":"2112","provinceCode":"21"},{"code":"211223","name":"西丰县","cityCode":"2112","provinceCode":"21"},{"code":"211224","name":"昌图县","cityCode":"2112","provinceCode":"21"},{"code":"211281","name":"调兵山市","cityCode":"2112","provinceCode":"21"},{"code":"211282","name":"开原市","cityCode":"2112","provinceCode":"21"},{"code":"211302","name":"双塔区","cityCode":"2113","provinceCode":"21"},{"code":"211303","name":"龙城区","cityCode":"2113","provinceCode":"21"},{"code":"211321","name":"朝阳县","cityCode":"2113","provinceCode":"21"},{"code":"211322","name":"建平县","cityCode":"2113","provinceCode":"21"},{"code":"211324","name":"喀喇沁左翼蒙古族自治县","cityCode":"2113","provinceCode":"21"},{"code":"211381","name":"北票市","cityCode":"2113","provinceCode":"21"},{"code":"211382","name":"凌源市","cityCode":"2113","provinceCode":"21"},{"code":"211402","name":"连山区","cityCode":"2114","provinceCode":"21"},{"code":"211403","name":"龙港区","cityCode":"2114","provinceCode":"21"},{"code":"211404","name":"南票区","cityCode":"2114","provinceCode":"21"},{"code":"211421","name":"绥中县","cityCode":"2114","provinceCode":"21"},{"code":"211422","name":"建昌县","cityCode":"2114","provinceCode":"21"},{"code":"211481","name":"兴城市","cityCode":"2114","provinceCode":"21"},{"code":"220102","name":"南关区","cityCode":"2201","provinceCode":"22"},{"code":"220103","name":"宽城区","cityCode":"2201","provinceCode":"22"},{"code":"220104","name":"朝阳区","cityCode":"2201","provinceCode":"22"},{"code":"220105","name":"二道区","cityCode":"2201","provinceCode":"22"},{"code":"220106","name":"绿园区","cityCode":"2201","provinceCode":"22"},{"code":"220112","name":"双阳区","cityCode":"2201","provinceCode":"22"},{"code":"220113","name":"九台区","cityCode":"2201","provinceCode":"22"},{"code":"220122","name":"农安县","cityCode":"2201","provinceCode":"22"},{"code":"220182","name":"榆树市","cityCode":"2201","provinceCode":"22"},{"code":"220183","name":"德惠市","cityCode":"2201","provinceCode":"22"},{"code":"220202","name":"昌邑区","cityCode":"2202","provinceCode":"22"},{"code":"220203","name":"龙潭区","cityCode":"2202","provinceCode":"22"},{"code":"220204","name":"船营区","cityCode":"2202","provinceCode":"22"},{"code":"220211","name":"丰满区","cityCode":"2202","provinceCode":"22"},{"code":"220221","name":"永吉县","cityCode":"2202","provinceCode":"22"},{"code":"220281","name":"蛟河市","cityCode":"2202","provinceCode":"22"},{"code":"220282","name":"桦甸市","cityCode":"2202","provinceCode":"22"},{"code":"220283","name":"舒兰市","cityCode":"2202","provinceCode":"22"},{"code":"220284","name":"磐石市","cityCode":"2202","provinceCode":"22"},{"code":"220302","name":"铁西区","cityCode":"2203","provinceCode":"22"},{"code":"220303","name":"铁东区","cityCode":"2203","provinceCode":"22"},{"code":"220322","name":"梨树县","cityCode":"2203","provinceCode":"22"},{"code":"220323","name":"伊通满族自治县","cityCode":"2203","provinceCode":"22"},{"code":"220381","name":"公主岭市","cityCode":"2203","provinceCode":"22"},{"code":"220382","name":"双辽市","cityCode":"2203","provinceCode":"22"},{"code":"220402","name":"龙山区","cityCode":"2204","provinceCode":"22"},{"code":"220403","name":"西安区","cityCode":"2204","provinceCode":"22"},{"code":"220421","name":"东丰县","cityCode":"2204","provinceCode":"22"},{"code":"220422","name":"东辽县","cityCode":"2204","provinceCode":"22"},{"code":"220502","name":"东昌区","cityCode":"2205","provinceCode":"22"},{"code":"220503","name":"二道江区","cityCode":"2205","provinceCode":"22"},{"code":"220521","name":"通化县","cityCode":"2205","provinceCode":"22"},{"code":"220523","name":"辉南县","cityCode":"2205","provinceCode":"22"},{"code":"220524","name":"柳河县","cityCode":"2205","provinceCode":"22"},{"code":"220581","name":"梅河口市","cityCode":"2205","provinceCode":"22"},{"code":"220582","name":"集安市","cityCode":"2205","provinceCode":"22"},{"code":"220602","name":"浑江区","cityCode":"2206","provinceCode":"22"},{"code":"220605","name":"江源区","cityCode":"2206","provinceCode":"22"},{"code":"220621","name":"抚松县","cityCode":"2206","provinceCode":"22"},{"code":"220622","name":"靖宇县","cityCode":"2206","provinceCode":"22"},{"code":"220623","name":"长白朝鲜族自治县","cityCode":"2206","provinceCode":"22"},{"code":"220681","name":"临江市","cityCode":"2206","provinceCode":"22"},{"code":"220702","name":"宁江区","cityCode":"2207","provinceCode":"22"},{"code":"220721","name":"前郭尔罗斯蒙古族自治县","cityCode":"2207","provinceCode":"22"},{"code":"220722","name":"长岭县","cityCode":"2207","provinceCode":"22"},{"code":"220723","name":"乾安县","cityCode":"2207","provinceCode":"22"},{"code":"220781","name":"扶余市","cityCode":"2207","provinceCode":"22"},{"code":"220802","name":"洮北区","cityCode":"2208","provinceCode":"22"},{"code":"220821","name":"镇赉县","cityCode":"2208","provinceCode":"22"},{"code":"220822","name":"通榆县","cityCode":"2208","provinceCode":"22"},{"code":"220881","name":"洮南市","cityCode":"2208","provinceCode":"22"},{"code":"220882","name":"大安市","cityCode":"2208","provinceCode":"22"},{"code":"222401","name":"延吉市","cityCode":"2224","provinceCode":"22"},{"code":"222402","name":"图们市","cityCode":"2224","provinceCode":"22"},{"code":"222403","name":"敦化市","cityCode":"2224","provinceCode":"22"},{"code":"222404","name":"珲春市","cityCode":"2224","provinceCode":"22"},{"code":"222405","name":"龙井市","cityCode":"2224","provinceCode":"22"},{"code":"222406","name":"和龙市","cityCode":"2224","provinceCode":"22"},{"code":"222424","name":"汪清县","cityCode":"2224","provinceCode":"22"},{"code":"222426","name":"安图县","cityCode":"2224","provinceCode":"22"},{"code":"230102","name":"道里区","cityCode":"2301","provinceCode":"23"},{"code":"230103","name":"南岗区","cityCode":"2301","provinceCode":"23"},{"code":"230104","name":"道外区","cityCode":"2301","provinceCode":"23"},{"code":"230108","name":"平房区","cityCode":"2301","provinceCode":"23"},{"code":"230109","name":"松北区","cityCode":"2301","provinceCode":"23"},{"code":"230110","name":"香坊区","cityCode":"2301","provinceCode":"23"},{"code":"230111","name":"呼兰区","cityCode":"2301","provinceCode":"23"},{"code":"230112","name":"阿城区","cityCode":"2301","provinceCode":"23"},{"code":"230113","name":"双城区","cityCode":"2301","provinceCode":"23"},{"code":"230123","name":"依兰县","cityCode":"2301","provinceCode":"23"},{"code":"230124","name":"方正县","cityCode":"2301","provinceCode":"23"},{"code":"230125","name":"宾县","cityCode":"2301","provinceCode":"23"},{"code":"230126","name":"巴彦县","cityCode":"2301","provinceCode":"23"},{"code":"230127","name":"木兰县","cityCode":"2301","provinceCode":"23"},{"code":"230128","name":"通河县","cityCode":"2301","provinceCode":"23"},{"code":"230129","name":"延寿县","cityCode":"2301","provinceCode":"23"},{"code":"230183","name":"尚志市","cityCode":"2301","provinceCode":"23"},{"code":"230184","name":"五常市","cityCode":"2301","provinceCode":"23"},{"code":"230202","name":"龙沙区","cityCode":"2302","provinceCode":"23"},{"code":"230203","name":"建华区","cityCode":"2302","provinceCode":"23"},{"code":"230204","name":"铁锋区","cityCode":"2302","provinceCode":"23"},{"code":"230205","name":"昂昂溪区","cityCode":"2302","provinceCode":"23"},{"code":"230206","name":"富拉尔基区","cityCode":"2302","provinceCode":"23"},{"code":"230207","name":"碾子山区","cityCode":"2302","provinceCode":"23"},{"code":"230208","name":"梅里斯达斡尔族区","cityCode":"2302","provinceCode":"23"},{"code":"230221","name":"龙江县","cityCode":"2302","provinceCode":"23"},{"code":"230223","name":"依安县","cityCode":"2302","provinceCode":"23"},{"code":"230224","name":"泰来县","cityCode":"2302","provinceCode":"23"},{"code":"230225","name":"甘南县","cityCode":"2302","provinceCode":"23"},{"code":"230227","name":"富裕县","cityCode":"2302","provinceCode":"23"},{"code":"230229","name":"克山县","cityCode":"2302","provinceCode":"23"},{"code":"230230","name":"克东县","cityCode":"2302","provinceCode":"23"},{"code":"230231","name":"拜泉县","cityCode":"2302","provinceCode":"23"},{"code":"230281","name":"讷河市","cityCode":"2302","provinceCode":"23"},{"code":"230302","name":"鸡冠区","cityCode":"2303","provinceCode":"23"},{"code":"230303","name":"恒山区","cityCode":"2303","provinceCode":"23"},{"code":"230304","name":"滴道区","cityCode":"2303","provinceCode":"23"},{"code":"230305","name":"梨树区","cityCode":"2303","provinceCode":"23"},{"code":"230306","name":"城子河区","cityCode":"2303","provinceCode":"23"},{"code":"230307","name":"麻山区","cityCode":"2303","provinceCode":"23"},{"code":"230321","name":"鸡东县","cityCode":"2303","provinceCode":"23"},{"code":"230381","name":"虎林市","cityCode":"2303","provinceCode":"23"},{"code":"230382","name":"密山市","cityCode":"2303","provinceCode":"23"},{"code":"230402","name":"向阳区","cityCode":"2304","provinceCode":"23"},{"code":"230403","name":"工农区","cityCode":"2304","provinceCode":"23"},{"code":"230404","name":"南山区","cityCode":"2304","provinceCode":"23"},{"code":"230405","name":"兴安区","cityCode":"2304","provinceCode":"23"},{"code":"230406","name":"东山区","cityCode":"2304","provinceCode":"23"},{"code":"230407","name":"兴山区","cityCode":"2304","provinceCode":"23"},{"code":"230421","name":"萝北县","cityCode":"2304","provinceCode":"23"},{"code":"230422","name":"绥滨县","cityCode":"2304","provinceCode":"23"},{"code":"230502","name":"尖山区","cityCode":"2305","provinceCode":"23"},{"code":"230503","name":"岭东区","cityCode":"2305","provinceCode":"23"},{"code":"230505","name":"四方台区","cityCode":"2305","provinceCode":"23"},{"code":"230506","name":"宝山区","cityCode":"2305","provinceCode":"23"},{"code":"230521","name":"集贤县","cityCode":"2305","provinceCode":"23"},{"code":"230522","name":"友谊县","cityCode":"2305","provinceCode":"23"},{"code":"230523","name":"宝清县","cityCode":"2305","provinceCode":"23"},{"code":"230524","name":"饶河县","cityCode":"2305","provinceCode":"23"},{"code":"230602","name":"萨尔图区","cityCode":"2306","provinceCode":"23"},{"code":"230603","name":"龙凤区","cityCode":"2306","provinceCode":"23"},{"code":"230604","name":"让胡路区","cityCode":"2306","provinceCode":"23"},{"code":"230605","name":"红岗区","cityCode":"2306","provinceCode":"23"},{"code":"230606","name":"大同区","cityCode":"2306","provinceCode":"23"},{"code":"230621","name":"肇州县","cityCode":"2306","provinceCode":"23"},{"code":"230622","name":"肇源县","cityCode":"2306","provinceCode":"23"},{"code":"230623","name":"林甸县","cityCode":"2306","provinceCode":"23"},{"code":"230624","name":"杜尔伯特蒙古族自治县","cityCode":"2306","provinceCode":"23"},{"code":"230702","name":"伊春区","cityCode":"2307","provinceCode":"23"},{"code":"230703","name":"南岔区","cityCode":"2307","provinceCode":"23"},{"code":"230704","name":"友好区","cityCode":"2307","provinceCode":"23"},{"code":"230705","name":"西林区","cityCode":"2307","provinceCode":"23"},{"code":"230706","name":"翠峦区","cityCode":"2307","provinceCode":"23"},{"code":"230707","name":"新青区","cityCode":"2307","provinceCode":"23"},{"code":"230708","name":"美溪区","cityCode":"2307","provinceCode":"23"},{"code":"230709","name":"金山屯区","cityCode":"2307","provinceCode":"23"},{"code":"230710","name":"五营区","cityCode":"2307","provinceCode":"23"},{"code":"230711","name":"乌马河区","cityCode":"2307","provinceCode":"23"},{"code":"230712","name":"汤旺河区","cityCode":"2307","provinceCode":"23"},{"code":"230713","name":"带岭区","cityCode":"2307","provinceCode":"23"},{"code":"230714","name":"乌伊岭区","cityCode":"2307","provinceCode":"23"},{"code":"230715","name":"红星区","cityCode":"2307","provinceCode":"23"},{"code":"230716","name":"上甘岭区","cityCode":"2307","provinceCode":"23"},{"code":"230722","name":"嘉荫县","cityCode":"2307","provinceCode":"23"},{"code":"230781","name":"铁力市","cityCode":"2307","provinceCode":"23"},{"code":"230803","name":"向阳区","cityCode":"2308","provinceCode":"23"},{"code":"230804","name":"前进区","cityCode":"2308","provinceCode":"23"},{"code":"230805","name":"东风区","cityCode":"2308","provinceCode":"23"},{"code":"230811","name":"郊区","cityCode":"2308","provinceCode":"23"},{"code":"230822","name":"桦南县","cityCode":"2308","provinceCode":"23"},{"code":"230826","name":"桦川县","cityCode":"2308","provinceCode":"23"},{"code":"230828","name":"汤原县","cityCode":"2308","provinceCode":"23"},{"code":"230881","name":"同江市","cityCode":"2308","provinceCode":"23"},{"code":"230882","name":"富锦市","cityCode":"2308","provinceCode":"23"},{"code":"230883","name":"抚远市","cityCode":"2308","provinceCode":"23"},{"code":"230902","name":"新兴区","cityCode":"2309","provinceCode":"23"},{"code":"230903","name":"桃山区","cityCode":"2309","provinceCode":"23"},{"code":"230904","name":"茄子河区","cityCode":"2309","provinceCode":"23"},{"code":"230921","name":"勃利县","cityCode":"2309","provinceCode":"23"},{"code":"231002","name":"东安区","cityCode":"2310","provinceCode":"23"},{"code":"231003","name":"阳明区","cityCode":"2310","provinceCode":"23"},{"code":"231004","name":"爱民区","cityCode":"2310","provinceCode":"23"},{"code":"231005","name":"西安区","cityCode":"2310","provinceCode":"23"},{"code":"231025","name":"林口县","cityCode":"2310","provinceCode":"23"},{"code":"231081","name":"绥芬河市","cityCode":"2310","provinceCode":"23"},{"code":"231083","name":"海林市","cityCode":"2310","provinceCode":"23"},{"code":"231084","name":"宁安市","cityCode":"2310","provinceCode":"23"},{"code":"231085","name":"穆棱市","cityCode":"2310","provinceCode":"23"},{"code":"231086","name":"东宁市","cityCode":"2310","provinceCode":"23"},{"code":"231102","name":"爱辉区","cityCode":"2311","provinceCode":"23"},{"code":"231121","name":"嫩江县","cityCode":"2311","provinceCode":"23"},{"code":"231123","name":"逊克县","cityCode":"2311","provinceCode":"23"},{"code":"231124","name":"孙吴县","cityCode":"2311","provinceCode":"23"},{"code":"231181","name":"北安市","cityCode":"2311","provinceCode":"23"},{"code":"231182","name":"五大连池市","cityCode":"2311","provinceCode":"23"},{"code":"231202","name":"北林区","cityCode":"2312","provinceCode":"23"},{"code":"231221","name":"望奎县","cityCode":"2312","provinceCode":"23"},{"code":"231222","name":"兰西县","cityCode":"2312","provinceCode":"23"},{"code":"231223","name":"青冈县","cityCode":"2312","provinceCode":"23"},{"code":"231224","name":"庆安县","cityCode":"2312","provinceCode":"23"},{"code":"231225","name":"明水县","cityCode":"2312","provinceCode":"23"},{"code":"231226","name":"绥棱县","cityCode":"2312","provinceCode":"23"},{"code":"231281","name":"安达市","cityCode":"2312","provinceCode":"23"},{"code":"231282","name":"肇东市","cityCode":"2312","provinceCode":"23"},{"code":"231283","name":"海伦市","cityCode":"2312","provinceCode":"23"},{"code":"232721","name":"呼玛县","cityCode":"2327","provinceCode":"23"},{"code":"232722","name":"塔河县","cityCode":"2327","provinceCode":"23"},{"code":"232723","name":"漠河县","cityCode":"2327","provinceCode":"23"},{"code":"310101","name":"黄浦区","cityCode":"3101","provinceCode":"31"},{"code":"310104","name":"徐汇区","cityCode":"3101","provinceCode":"31"},{"code":"310105","name":"长宁区","cityCode":"3101","provinceCode":"31"},{"code":"310106","name":"静安区","cityCode":"3101","provinceCode":"31"},{"code":"310107","name":"普陀区","cityCode":"3101","provinceCode":"31"},{"code":"310109","name":"虹口区","cityCode":"3101","provinceCode":"31"},{"code":"310110","name":"杨浦区","cityCode":"3101","provinceCode":"31"},{"code":"310112","name":"闵行区","cityCode":"3101","provinceCode":"31"},{"code":"310113","name":"宝山区","cityCode":"3101","provinceCode":"31"},{"code":"310114","name":"嘉定区","cityCode":"3101","provinceCode":"31"},{"code":"310115","name":"浦东新区","cityCode":"3101","provinceCode":"31"},{"code":"310116","name":"金山区","cityCode":"3101","provinceCode":"31"},{"code":"310117","name":"松江区","cityCode":"3101","provinceCode":"31"},{"code":"310118","name":"青浦区","cityCode":"3101","provinceCode":"31"},{"code":"310120","name":"奉贤区","cityCode":"3101","provinceCode":"31"},{"code":"310151","name":"崇明区","cityCode":"3101","provinceCode":"31"},{"code":"320102","name":"玄武区","cityCode":"3201","provinceCode":"32"},{"code":"320104","name":"秦淮区","cityCode":"3201","provinceCode":"32"},{"code":"320105","name":"建邺区","cityCode":"3201","provinceCode":"32"},{"code":"320106","name":"鼓楼区","cityCode":"3201","provinceCode":"32"},{"code":"320111","name":"浦口区","cityCode":"3201","provinceCode":"32"},{"code":"320113","name":"栖霞区","cityCode":"3201","provinceCode":"32"},{"code":"320114","name":"雨花台区","cityCode":"3201","provinceCode":"32"},{"code":"320115","name":"江宁区","cityCode":"3201","provinceCode":"32"},{"code":"320116","name":"六合区","cityCode":"3201","provinceCode":"32"},{"code":"320117","name":"溧水区","cityCode":"3201","provinceCode":"32"},{"code":"320118","name":"高淳区","cityCode":"3201","provinceCode":"32"},{"code":"320205","name":"锡山区","cityCode":"3202","provinceCode":"32"},{"code":"320206","name":"惠山区","cityCode":"3202","provinceCode":"32"},{"code":"320211","name":"滨湖区","cityCode":"3202","provinceCode":"32"},{"code":"320213","name":"梁溪区","cityCode":"3202","provinceCode":"32"},{"code":"320214","name":"新吴区","cityCode":"3202","provinceCode":"32"},{"code":"320281","name":"江阴市","cityCode":"3202","provinceCode":"32"},{"code":"320282","name":"宜兴市","cityCode":"3202","provinceCode":"32"},{"code":"320302","name":"鼓楼区","cityCode":"3203","provinceCode":"32"},{"code":"320303","name":"云龙区","cityCode":"3203","provinceCode":"32"},{"code":"320305","name":"贾汪区","cityCode":"3203","provinceCode":"32"},{"code":"320311","name":"泉山区","cityCode":"3203","provinceCode":"32"},{"code":"320312","name":"铜山区","cityCode":"3203","provinceCode":"32"},{"code":"320321","name":"丰县","cityCode":"3203","provinceCode":"32"},{"code":"320322","name":"沛县","cityCode":"3203","provinceCode":"32"},{"code":"320324","name":"睢宁县","cityCode":"3203","provinceCode":"32"},{"code":"320381","name":"新沂市","cityCode":"3203","provinceCode":"32"},{"code":"320382","name":"邳州市","cityCode":"3203","provinceCode":"32"},{"code":"320402","name":"天宁区","cityCode":"3204","provinceCode":"32"},{"code":"320404","name":"钟楼区","cityCode":"3204","provinceCode":"32"},{"code":"320411","name":"新北区","cityCode":"3204","provinceCode":"32"},{"code":"320412","name":"武进区","cityCode":"3204","provinceCode":"32"},{"code":"320413","name":"金坛区","cityCode":"3204","provinceCode":"32"},{"code":"320481","name":"溧阳市","cityCode":"3204","provinceCode":"32"},{"code":"320505","name":"虎丘区","cityCode":"3205","provinceCode":"32"},{"code":"320506","name":"吴中区","cityCode":"3205","provinceCode":"32"},{"code":"320507","name":"相城区","cityCode":"3205","provinceCode":"32"},{"code":"320508","name":"姑苏区","cityCode":"3205","provinceCode":"32"},{"code":"320509","name":"吴江区","cityCode":"3205","provinceCode":"32"},{"code":"320581","name":"常熟市","cityCode":"3205","provinceCode":"32"},{"code":"320582","name":"张家港市","cityCode":"3205","provinceCode":"32"},{"code":"320583","name":"昆山市","cityCode":"3205","provinceCode":"32"},{"code":"320585","name":"太仓市","cityCode":"3205","provinceCode":"32"},{"code":"320602","name":"崇川区","cityCode":"3206","provinceCode":"32"},{"code":"320611","name":"港闸区","cityCode":"3206","provinceCode":"32"},{"code":"320612","name":"通州区","cityCode":"3206","provinceCode":"32"},{"code":"320621","name":"海安县","cityCode":"3206","provinceCode":"32"},{"code":"320623","name":"如东县","cityCode":"3206","provinceCode":"32"},{"code":"320681","name":"启东市","cityCode":"3206","provinceCode":"32"},{"code":"320682","name":"如皋市","cityCode":"3206","provinceCode":"32"},{"code":"320684","name":"海门市","cityCode":"3206","provinceCode":"32"},{"code":"320703","name":"连云区","cityCode":"3207","provinceCode":"32"},{"code":"320706","name":"海州区","cityCode":"3207","provinceCode":"32"},{"code":"320707","name":"赣榆区","cityCode":"3207","provinceCode":"32"},{"code":"320722","name":"东海县","cityCode":"3207","provinceCode":"32"},{"code":"320723","name":"灌云县","cityCode":"3207","provinceCode":"32"},{"code":"320724","name":"灌南县","cityCode":"3207","provinceCode":"32"},{"code":"320803","name":"淮安区","cityCode":"3208","provinceCode":"32"},{"code":"320804","name":"淮阴区","cityCode":"3208","provinceCode":"32"},{"code":"320812","name":"清江浦区","cityCode":"3208","provinceCode":"32"},{"code":"320813","name":"洪泽区","cityCode":"3208","provinceCode":"32"},{"code":"320826","name":"涟水县","cityCode":"3208","provinceCode":"32"},{"code":"320830","name":"盱眙县","cityCode":"3208","provinceCode":"32"},{"code":"320831","name":"金湖县","cityCode":"3208","provinceCode":"32"},{"code":"320902","name":"亭湖区","cityCode":"3209","provinceCode":"32"},{"code":"320903","name":"盐都区","cityCode":"3209","provinceCode":"32"},{"code":"320904","name":"大丰区","cityCode":"3209","provinceCode":"32"},{"code":"320921","name":"响水县","cityCode":"3209","provinceCode":"32"},{"code":"320922","name":"滨海县","cityCode":"3209","provinceCode":"32"},{"code":"320923","name":"阜宁县","cityCode":"3209","provinceCode":"32"},{"code":"320924","name":"射阳县","cityCode":"3209","provinceCode":"32"},{"code":"320925","name":"建湖县","cityCode":"3209","provinceCode":"32"},{"code":"320981","name":"东台市","cityCode":"3209","provinceCode":"32"},{"code":"321002","name":"广陵区","cityCode":"3210","provinceCode":"32"},{"code":"321003","name":"邗江区","cityCode":"3210","provinceCode":"32"},{"code":"321012","name":"江都区","cityCode":"3210","provinceCode":"32"},{"code":"321023","name":"宝应县","cityCode":"3210","provinceCode":"32"},{"code":"321081","name":"仪征市","cityCode":"3210","provinceCode":"32"},{"code":"321084","name":"高邮市","cityCode":"3210","provinceCode":"32"},{"code":"321102","name":"京口区","cityCode":"3211","provinceCode":"32"},{"code":"321111","name":"润州区","cityCode":"3211","provinceCode":"32"},{"code":"321112","name":"丹徒区","cityCode":"3211","provinceCode":"32"},{"code":"321181","name":"丹阳市","cityCode":"3211","provinceCode":"32"},{"code":"321182","name":"扬中市","cityCode":"3211","provinceCode":"32"},{"code":"321183","name":"句容市","cityCode":"3211","provinceCode":"32"},{"code":"321202","name":"海陵区","cityCode":"3212","provinceCode":"32"},{"code":"321203","name":"高港区","cityCode":"3212","provinceCode":"32"},{"code":"321204","name":"姜堰区","cityCode":"3212","provinceCode":"32"},{"code":"321281","name":"兴化市","cityCode":"3212","provinceCode":"32"},{"code":"321282","name":"靖江市","cityCode":"3212","provinceCode":"32"},{"code":"321283","name":"泰兴市","cityCode":"3212","provinceCode":"32"},{"code":"321302","name":"宿城区","cityCode":"3213","provinceCode":"32"},{"code":"321311","name":"宿豫区","cityCode":"3213","provinceCode":"32"},{"code":"321322","name":"沭阳县","cityCode":"3213","provinceCode":"32"},{"code":"321323","name":"泗阳县","cityCode":"3213","provinceCode":"32"},{"code":"321324","name":"泗洪县","cityCode":"3213","provinceCode":"32"},{"code":"330102","name":"上城区","cityCode":"3301","provinceCode":"33"},{"code":"330103","name":"下城区","cityCode":"3301","provinceCode":"33"},{"code":"330104","name":"江干区","cityCode":"3301","provinceCode":"33"},{"code":"330105","name":"拱墅区","cityCode":"3301","provinceCode":"33"},{"code":"330106","name":"西湖区","cityCode":"3301","provinceCode":"33"},{"code":"330108","name":"滨江区","cityCode":"3301","provinceCode":"33"},{"code":"330109","name":"萧山区","cityCode":"3301","provinceCode":"33"},{"code":"330110","name":"余杭区","cityCode":"3301","provinceCode":"33"},{"code":"330111","name":"富阳区","cityCode":"3301","provinceCode":"33"},{"code":"330122","name":"桐庐县","cityCode":"3301","provinceCode":"33"},{"code":"330127","name":"淳安县","cityCode":"3301","provinceCode":"33"},{"code":"330182","name":"建德市","cityCode":"3301","provinceCode":"33"},{"code":"330185","name":"临安市","cityCode":"3301","provinceCode":"33"},{"code":"330203","name":"海曙区","cityCode":"3302","provinceCode":"33"},{"code":"330204","name":"江东区","cityCode":"3302","provinceCode":"33"},{"code":"330205","name":"江北区","cityCode":"3302","provinceCode":"33"},{"code":"330206","name":"北仑区","cityCode":"3302","provinceCode":"33"},{"code":"330211","name":"镇海区","cityCode":"3302","provinceCode":"33"},{"code":"330212","name":"鄞州区","cityCode":"3302","provinceCode":"33"},{"code":"330225","name":"象山县","cityCode":"3302","provinceCode":"33"},{"code":"330226","name":"宁海县","cityCode":"3302","provinceCode":"33"},{"code":"330281","name":"余姚市","cityCode":"3302","provinceCode":"33"},{"code":"330282","name":"慈溪市","cityCode":"3302","provinceCode":"33"},{"code":"330283","name":"奉化市","cityCode":"3302","provinceCode":"33"},{"code":"330302","name":"鹿城区","cityCode":"3303","provinceCode":"33"},{"code":"330303","name":"龙湾区","cityCode":"3303","provinceCode":"33"},{"code":"330304","name":"瓯海区","cityCode":"3303","provinceCode":"33"},{"code":"330305","name":"洞头区","cityCode":"3303","provinceCode":"33"},{"code":"330324","name":"永嘉县","cityCode":"3303","provinceCode":"33"},{"code":"330326","name":"平阳县","cityCode":"3303","provinceCode":"33"},{"code":"330327","name":"苍南县","cityCode":"3303","provinceCode":"33"},{"code":"330328","name":"文成县","cityCode":"3303","provinceCode":"33"},{"code":"330329","name":"泰顺县","cityCode":"3303","provinceCode":"33"},{"code":"330381","name":"瑞安市","cityCode":"3303","provinceCode":"33"},{"code":"330382","name":"乐清市","cityCode":"3303","provinceCode":"33"},{"code":"330402","name":"南湖区","cityCode":"3304","provinceCode":"33"},{"code":"330411","name":"秀洲区","cityCode":"3304","provinceCode":"33"},{"code":"330421","name":"嘉善县","cityCode":"3304","provinceCode":"33"},{"code":"330424","name":"海盐县","cityCode":"3304","provinceCode":"33"},{"code":"330481","name":"海宁市","cityCode":"3304","provinceCode":"33"},{"code":"330482","name":"平湖市","cityCode":"3304","provinceCode":"33"},{"code":"330483","name":"桐乡市","cityCode":"3304","provinceCode":"33"},{"code":"330502","name":"吴兴区","cityCode":"3305","provinceCode":"33"},{"code":"330503","name":"南浔区","cityCode":"3305","provinceCode":"33"},{"code":"330521","name":"德清县","cityCode":"3305","provinceCode":"33"},{"code":"330522","name":"长兴县","cityCode":"3305","provinceCode":"33"},{"code":"330523","name":"安吉县","cityCode":"3305","provinceCode":"33"},{"code":"330602","name":"越城区","cityCode":"3306","provinceCode":"33"},{"code":"330603","name":"柯桥区","cityCode":"3306","provinceCode":"33"},{"code":"330604","name":"上虞区","cityCode":"3306","provinceCode":"33"},{"code":"330624","name":"新昌县","cityCode":"3306","provinceCode":"33"},{"code":"330681","name":"诸暨市","cityCode":"3306","provinceCode":"33"},{"code":"330683","name":"嵊州市","cityCode":"3306","provinceCode":"33"},{"code":"330702","name":"婺城区","cityCode":"3307","provinceCode":"33"},{"code":"330703","name":"金东区","cityCode":"3307","provinceCode":"33"},{"code":"330723","name":"武义县","cityCode":"3307","provinceCode":"33"},{"code":"330726","name":"浦江县","cityCode":"3307","provinceCode":"33"},{"code":"330727","name":"磐安县","cityCode":"3307","provinceCode":"33"},{"code":"330781","name":"兰溪市","cityCode":"3307","provinceCode":"33"},{"code":"330782","name":"义乌市","cityCode":"3307","provinceCode":"33"},{"code":"330783","name":"东阳市","cityCode":"3307","provinceCode":"33"},{"code":"330784","name":"永康市","cityCode":"3307","provinceCode":"33"},{"code":"330802","name":"柯城区","cityCode":"3308","provinceCode":"33"},{"code":"330803","name":"衢江区","cityCode":"3308","provinceCode":"33"},{"code":"330822","name":"常山县","cityCode":"3308","provinceCode":"33"},{"code":"330824","name":"开化县","cityCode":"3308","provinceCode":"33"},{"code":"330825","name":"龙游县","cityCode":"3308","provinceCode":"33"},{"code":"330881","name":"江山市","cityCode":"3308","provinceCode":"33"},{"code":"330902","name":"定海区","cityCode":"3309","provinceCode":"33"},{"code":"330903","name":"普陀区","cityCode":"3309","provinceCode":"33"},{"code":"330921","name":"岱山县","cityCode":"3309","provinceCode":"33"},{"code":"330922","name":"嵊泗县","cityCode":"3309","provinceCode":"33"},{"code":"331002","name":"椒江区","cityCode":"3310","provinceCode":"33"},{"code":"331003","name":"黄岩区","cityCode":"3310","provinceCode":"33"},{"code":"331004","name":"路桥区","cityCode":"3310","provinceCode":"33"},{"code":"331021","name":"玉环县","cityCode":"3310","provinceCode":"33"},{"code":"331022","name":"三门县","cityCode":"3310","provinceCode":"33"},{"code":"331023","name":"天台县","cityCode":"3310","provinceCode":"33"},{"code":"331024","name":"仙居县","cityCode":"3310","provinceCode":"33"},{"code":"331081","name":"温岭市","cityCode":"3310","provinceCode":"33"},{"code":"331082","name":"临海市","cityCode":"3310","provinceCode":"33"},{"code":"331102","name":"莲都区","cityCode":"3311","provinceCode":"33"},{"code":"331121","name":"青田县","cityCode":"3311","provinceCode":"33"},{"code":"331122","name":"缙云县","cityCode":"3311","provinceCode":"33"},{"code":"331123","name":"遂昌县","cityCode":"3311","provinceCode":"33"},{"code":"331124","name":"松阳县","cityCode":"3311","provinceCode":"33"},{"code":"331125","name":"云和县","cityCode":"3311","provinceCode":"33"},{"code":"331126","name":"庆元县","cityCode":"3311","provinceCode":"33"},{"code":"331127","name":"景宁畲族自治县","cityCode":"3311","provinceCode":"33"},{"code":"331181","name":"龙泉市","cityCode":"3311","provinceCode":"33"},{"code":"340102","name":"瑶海区","cityCode":"3401","provinceCode":"34"},{"code":"340103","name":"庐阳区","cityCode":"3401","provinceCode":"34"},{"code":"340104","name":"蜀山区","cityCode":"3401","provinceCode":"34"},{"code":"340111","name":"包河区","cityCode":"3401","provinceCode":"34"},{"code":"340121","name":"长丰县","cityCode":"3401","provinceCode":"34"},{"code":"340122","name":"肥东县","cityCode":"3401","provinceCode":"34"},{"code":"340123","name":"肥西县","cityCode":"3401","provinceCode":"34"},{"code":"340124","name":"庐江县","cityCode":"3401","provinceCode":"34"},{"code":"340181","name":"巢湖市","cityCode":"3401","provinceCode":"34"},{"code":"340202","name":"镜湖区","cityCode":"3402","provinceCode":"34"},{"code":"340203","name":"弋江区","cityCode":"3402","provinceCode":"34"},{"code":"340207","name":"鸠江区","cityCode":"3402","provinceCode":"34"},{"code":"340208","name":"三山区","cityCode":"3402","provinceCode":"34"},{"code":"340221","name":"芜湖县","cityCode":"3402","provinceCode":"34"},{"code":"340222","name":"繁昌县","cityCode":"3402","provinceCode":"34"},{"code":"340223","name":"南陵县","cityCode":"3402","provinceCode":"34"},{"code":"340225","name":"无为县","cityCode":"3402","provinceCode":"34"},{"code":"340302","name":"龙子湖区","cityCode":"3403","provinceCode":"34"},{"code":"340303","name":"蚌山区","cityCode":"3403","provinceCode":"34"},{"code":"340304","name":"禹会区","cityCode":"3403","provinceCode":"34"},{"code":"340311","name":"淮上区","cityCode":"3403","provinceCode":"34"},{"code":"340321","name":"怀远县","cityCode":"3403","provinceCode":"34"},{"code":"340322","name":"五河县","cityCode":"3403","provinceCode":"34"},{"code":"340323","name":"固镇县","cityCode":"3403","provinceCode":"34"},{"code":"340402","name":"大通区","cityCode":"3404","provinceCode":"34"},{"code":"340403","name":"田家庵区","cityCode":"3404","provinceCode":"34"},{"code":"340404","name":"谢家集区","cityCode":"3404","provinceCode":"34"},{"code":"340405","name":"八公山区","cityCode":"3404","provinceCode":"34"},{"code":"340406","name":"潘集区","cityCode":"3404","provinceCode":"34"},{"code":"340421","name":"凤台县","cityCode":"3404","provinceCode":"34"},{"code":"340422","name":"寿县","cityCode":"3404","provinceCode":"34"},{"code":"340503","name":"花山区","cityCode":"3405","provinceCode":"34"},{"code":"340504","name":"雨山区","cityCode":"3405","provinceCode":"34"},{"code":"340506","name":"博望区","cityCode":"3405","provinceCode":"34"},{"code":"340521","name":"当涂县","cityCode":"3405","provinceCode":"34"},{"code":"340522","name":"含山县","cityCode":"3405","provinceCode":"34"},{"code":"340523","name":"和县","cityCode":"3405","provinceCode":"34"},{"code":"340602","name":"杜集区","cityCode":"3406","provinceCode":"34"},{"code":"340603","name":"相山区","cityCode":"3406","provinceCode":"34"},{"code":"340604","name":"烈山区","cityCode":"3406","provinceCode":"34"},{"code":"340621","name":"濉溪县","cityCode":"3406","provinceCode":"34"},{"code":"340705","name":"铜官区","cityCode":"3407","provinceCode":"34"},{"code":"340706","name":"义安区","cityCode":"3407","provinceCode":"34"},{"code":"340711","name":"郊区","cityCode":"3407","provinceCode":"34"},{"code":"340722","name":"枞阳县","cityCode":"3407","provinceCode":"34"},{"code":"340802","name":"迎江区","cityCode":"3408","provinceCode":"34"},{"code":"340803","name":"大观区","cityCode":"3408","provinceCode":"34"},{"code":"340811","name":"宜秀区","cityCode":"3408","provinceCode":"34"},{"code":"340822","name":"怀宁县","cityCode":"3408","provinceCode":"34"},{"code":"340824","name":"潜山县","cityCode":"3408","provinceCode":"34"},{"code":"340825","name":"太湖县","cityCode":"3408","provinceCode":"34"},{"code":"340826","name":"宿松县","cityCode":"3408","provinceCode":"34"},{"code":"340827","name":"望江县","cityCode":"3408","provinceCode":"34"},{"code":"340828","name":"岳西县","cityCode":"3408","provinceCode":"34"},{"code":"340881","name":"桐城市","cityCode":"3408","provinceCode":"34"},{"code":"341002","name":"屯溪区","cityCode":"3410","provinceCode":"34"},{"code":"341003","name":"黄山区","cityCode":"3410","provinceCode":"34"},{"code":"341004","name":"徽州区","cityCode":"3410","provinceCode":"34"},{"code":"341021","name":"歙县","cityCode":"3410","provinceCode":"34"},{"code":"341022","name":"休宁县","cityCode":"3410","provinceCode":"34"},{"code":"341023","name":"黟县","cityCode":"3410","provinceCode":"34"},{"code":"341024","name":"祁门县","cityCode":"3410","provinceCode":"34"},{"code":"341102","name":"琅琊区","cityCode":"3411","provinceCode":"34"},{"code":"341103","name":"南谯区","cityCode":"3411","provinceCode":"34"},{"code":"341122","name":"来安县","cityCode":"3411","provinceCode":"34"},{"code":"341124","name":"全椒县","cityCode":"3411","provinceCode":"34"},{"code":"341125","name":"定远县","cityCode":"3411","provinceCode":"34"},{"code":"341126","name":"凤阳县","cityCode":"3411","provinceCode":"34"},{"code":"341181","name":"天长市","cityCode":"3411","provinceCode":"34"},{"code":"341182","name":"明光市","cityCode":"3411","provinceCode":"34"},{"code":"341202","name":"颍州区","cityCode":"3412","provinceCode":"34"},{"code":"341203","name":"颍东区","cityCode":"3412","provinceCode":"34"},{"code":"341204","name":"颍泉区","cityCode":"3412","provinceCode":"34"},{"code":"341221","name":"临泉县","cityCode":"3412","provinceCode":"34"},{"code":"341222","name":"太和县","cityCode":"3412","provinceCode":"34"},{"code":"341225","name":"阜南县","cityCode":"3412","provinceCode":"34"},{"code":"341226","name":"颍上县","cityCode":"3412","provinceCode":"34"},{"code":"341282","name":"界首市","cityCode":"3412","provinceCode":"34"},{"code":"341302","name":"埇桥区","cityCode":"3413","provinceCode":"34"},{"code":"341321","name":"砀山县","cityCode":"3413","provinceCode":"34"},{"code":"341322","name":"萧县","cityCode":"3413","provinceCode":"34"},{"code":"341323","name":"灵璧县","cityCode":"3413","provinceCode":"34"},{"code":"341324","name":"泗县","cityCode":"3413","provinceCode":"34"},{"code":"341502","name":"金安区","cityCode":"3415","provinceCode":"34"},{"code":"341503","name":"裕安区","cityCode":"3415","provinceCode":"34"},{"code":"341504","name":"叶集区","cityCode":"3415","provinceCode":"34"},{"code":"341522","name":"霍邱县","cityCode":"3415","provinceCode":"34"},{"code":"341523","name":"舒城县","cityCode":"3415","provinceCode":"34"},{"code":"341524","name":"金寨县","cityCode":"3415","provinceCode":"34"},{"code":"341525","name":"霍山县","cityCode":"3415","provinceCode":"34"},{"code":"341602","name":"谯城区","cityCode":"3416","provinceCode":"34"},{"code":"341621","name":"涡阳县","cityCode":"3416","provinceCode":"34"},{"code":"341622","name":"蒙城县","cityCode":"3416","provinceCode":"34"},{"code":"341623","name":"利辛县","cityCode":"3416","provinceCode":"34"},{"code":"341702","name":"贵池区","cityCode":"3417","provinceCode":"34"},{"code":"341721","name":"东至县","cityCode":"3417","provinceCode":"34"},{"code":"341722","name":"石台县","cityCode":"3417","provinceCode":"34"},{"code":"341723","name":"青阳县","cityCode":"3417","provinceCode":"34"},{"code":"341802","name":"宣州区","cityCode":"3418","provinceCode":"34"},{"code":"341821","name":"郎溪县","cityCode":"3418","provinceCode":"34"},{"code":"341822","name":"广德县","cityCode":"3418","provinceCode":"34"},{"code":"341823","name":"泾县","cityCode":"3418","provinceCode":"34"},{"code":"341824","name":"绩溪县","cityCode":"3418","provinceCode":"34"},{"code":"341825","name":"旌德县","cityCode":"3418","provinceCode":"34"},{"code":"341881","name":"宁国市","cityCode":"3418","provinceCode":"34"},{"code":"350102","name":"鼓楼区","cityCode":"3501","provinceCode":"35"},{"code":"350103","name":"台江区","cityCode":"3501","provinceCode":"35"},{"code":"350104","name":"仓山区","cityCode":"3501","provinceCode":"35"},{"code":"350105","name":"马尾区","cityCode":"3501","provinceCode":"35"},{"code":"350111","name":"晋安区","cityCode":"3501","provinceCode":"35"},{"code":"350121","name":"闽侯县","cityCode":"3501","provinceCode":"35"},{"code":"350122","name":"连江县","cityCode":"3501","provinceCode":"35"},{"code":"350123","name":"罗源县","cityCode":"3501","provinceCode":"35"},{"code":"350124","name":"闽清县","cityCode":"3501","provinceCode":"35"},{"code":"350125","name":"永泰县","cityCode":"3501","provinceCode":"35"},{"code":"350128","name":"平潭县","cityCode":"3501","provinceCode":"35"},{"code":"350181","name":"福清市","cityCode":"3501","provinceCode":"35"},{"code":"350182","name":"长乐市","cityCode":"3501","provinceCode":"35"},{"code":"350203","name":"思明区","cityCode":"3502","provinceCode":"35"},{"code":"350205","name":"海沧区","cityCode":"3502","provinceCode":"35"},{"code":"350206","name":"湖里区","cityCode":"3502","provinceCode":"35"},{"code":"350211","name":"集美区","cityCode":"3502","provinceCode":"35"},{"code":"350212","name":"同安区","cityCode":"3502","provinceCode":"35"},{"code":"350213","name":"翔安区","cityCode":"3502","provinceCode":"35"},{"code":"350302","name":"城厢区","cityCode":"3503","provinceCode":"35"},{"code":"350303","name":"涵江区","cityCode":"3503","provinceCode":"35"},{"code":"350304","name":"荔城区","cityCode":"3503","provinceCode":"35"},{"code":"350305","name":"秀屿区","cityCode":"3503","provinceCode":"35"},{"code":"350322","name":"仙游县","cityCode":"3503","provinceCode":"35"},{"code":"350402","name":"梅列区","cityCode":"3504","provinceCode":"35"},{"code":"350403","name":"三元区","cityCode":"3504","provinceCode":"35"},{"code":"350421","name":"明溪县","cityCode":"3504","provinceCode":"35"},{"code":"350423","name":"清流县","cityCode":"3504","provinceCode":"35"},{"code":"350424","name":"宁化县","cityCode":"3504","provinceCode":"35"},{"code":"350425","name":"大田县","cityCode":"3504","provinceCode":"35"},{"code":"350426","name":"尤溪县","cityCode":"3504","provinceCode":"35"},{"code":"350427","name":"沙县","cityCode":"3504","provinceCode":"35"},{"code":"350428","name":"将乐县","cityCode":"3504","provinceCode":"35"},{"code":"350429","name":"泰宁县","cityCode":"3504","provinceCode":"35"},{"code":"350430","name":"建宁县","cityCode":"3504","provinceCode":"35"},{"code":"350481","name":"永安市","cityCode":"3504","provinceCode":"35"},{"code":"350502","name":"鲤城区","cityCode":"3505","provinceCode":"35"},{"code":"350503","name":"丰泽区","cityCode":"3505","provinceCode":"35"},{"code":"350504","name":"洛江区","cityCode":"3505","provinceCode":"35"},{"code":"350505","name":"泉港区","cityCode":"3505","provinceCode":"35"},{"code":"350521","name":"惠安县","cityCode":"3505","provinceCode":"35"},{"code":"350524","name":"安溪县","cityCode":"3505","provinceCode":"35"},{"code":"350525","name":"永春县","cityCode":"3505","provinceCode":"35"},{"code":"350526","name":"德化县","cityCode":"3505","provinceCode":"35"},{"code":"350527","name":"金门县","cityCode":"3505","provinceCode":"35"},{"code":"350581","name":"石狮市","cityCode":"3505","provinceCode":"35"},{"code":"350582","name":"晋江市","cityCode":"3505","provinceCode":"35"},{"code":"350583","name":"南安市","cityCode":"3505","provinceCode":"35"},{"code":"350602","name":"芗城区","cityCode":"3506","provinceCode":"35"},{"code":"350603","name":"龙文区","cityCode":"3506","provinceCode":"35"},{"code":"350622","name":"云霄县","cityCode":"3506","provinceCode":"35"},{"code":"350623","name":"漳浦县","cityCode":"3506","provinceCode":"35"},{"code":"350624","name":"诏安县","cityCode":"3506","provinceCode":"35"},{"code":"350625","name":"长泰县","cityCode":"3506","provinceCode":"35"},{"code":"350626","name":"东山县","cityCode":"3506","provinceCode":"35"},{"code":"350627","name":"南靖县","cityCode":"3506","provinceCode":"35"},{"code":"350628","name":"平和县","cityCode":"3506","provinceCode":"35"},{"code":"350629","name":"华安县","cityCode":"3506","provinceCode":"35"},{"code":"350681","name":"龙海市","cityCode":"3506","provinceCode":"35"},{"code":"350702","name":"延平区","cityCode":"3507","provinceCode":"35"},{"code":"350703","name":"建阳区","cityCode":"3507","provinceCode":"35"},{"code":"350721","name":"顺昌县","cityCode":"3507","provinceCode":"35"},{"code":"350722","name":"浦城县","cityCode":"3507","provinceCode":"35"},{"code":"350723","name":"光泽县","cityCode":"3507","provinceCode":"35"},{"code":"350724","name":"松溪县","cityCode":"3507","provinceCode":"35"},{"code":"350725","name":"政和县","cityCode":"3507","provinceCode":"35"},{"code":"350781","name":"邵武市","cityCode":"3507","provinceCode":"35"},{"code":"350782","name":"武夷山市","cityCode":"3507","provinceCode":"35"},{"code":"350783","name":"建瓯市","cityCode":"3507","provinceCode":"35"},{"code":"350802","name":"新罗区","cityCode":"3508","provinceCode":"35"},{"code":"350803","name":"永定区","cityCode":"3508","provinceCode":"35"},{"code":"350821","name":"长汀县","cityCode":"3508","provinceCode":"35"},{"code":"350823","name":"上杭县","cityCode":"3508","provinceCode":"35"},{"code":"350824","name":"武平县","cityCode":"3508","provinceCode":"35"},{"code":"350825","name":"连城县","cityCode":"3508","provinceCode":"35"},{"code":"350881","name":"漳平市","cityCode":"3508","provinceCode":"35"},{"code":"350902","name":"蕉城区","cityCode":"3509","provinceCode":"35"},{"code":"350921","name":"霞浦县","cityCode":"3509","provinceCode":"35"},{"code":"350922","name":"古田县","cityCode":"3509","provinceCode":"35"},{"code":"350923","name":"屏南县","cityCode":"3509","provinceCode":"35"},{"code":"350924","name":"寿宁县","cityCode":"3509","provinceCode":"35"},{"code":"350925","name":"周宁县","cityCode":"3509","provinceCode":"35"},{"code":"350926","name":"柘荣县","cityCode":"3509","provinceCode":"35"},{"code":"350981","name":"福安市","cityCode":"3509","provinceCode":"35"},{"code":"350982","name":"福鼎市","cityCode":"3509","provinceCode":"35"},{"code":"360102","name":"东湖区","cityCode":"3601","provinceCode":"36"},{"code":"360103","name":"西湖区","cityCode":"3601","provinceCode":"36"},{"code":"360104","name":"青云谱区","cityCode":"3601","provinceCode":"36"},{"code":"360105","name":"湾里区","cityCode":"3601","provinceCode":"36"},{"code":"360111","name":"青山湖区","cityCode":"3601","provinceCode":"36"},{"code":"360112","name":"新建区","cityCode":"3601","provinceCode":"36"},{"code":"360121","name":"南昌县","cityCode":"3601","provinceCode":"36"},{"code":"360123","name":"安义县","cityCode":"3601","provinceCode":"36"},{"code":"360124","name":"进贤县","cityCode":"3601","provinceCode":"36"},{"code":"360202","name":"昌江区","cityCode":"3602","provinceCode":"36"},{"code":"360203","name":"珠山区","cityCode":"3602","provinceCode":"36"},{"code":"360222","name":"浮梁县","cityCode":"3602","provinceCode":"36"},{"code":"360281","name":"乐平市","cityCode":"3602","provinceCode":"36"},{"code":"360302","name":"安源区","cityCode":"3603","provinceCode":"36"},{"code":"360313","name":"湘东区","cityCode":"3603","provinceCode":"36"},{"code":"360321","name":"莲花县","cityCode":"3603","provinceCode":"36"},{"code":"360322","name":"上栗县","cityCode":"3603","provinceCode":"36"},{"code":"360323","name":"芦溪县","cityCode":"3603","provinceCode":"36"},{"code":"360402","name":"濂溪区","cityCode":"3604","provinceCode":"36"},{"code":"360403","name":"浔阳区","cityCode":"3604","provinceCode":"36"},{"code":"360421","name":"九江县","cityCode":"3604","provinceCode":"36"},{"code":"360423","name":"武宁县","cityCode":"3604","provinceCode":"36"},{"code":"360424","name":"修水县","cityCode":"3604","provinceCode":"36"},{"code":"360425","name":"永修县","cityCode":"3604","provinceCode":"36"},{"code":"360426","name":"德安县","cityCode":"3604","provinceCode":"36"},{"code":"360428","name":"都昌县","cityCode":"3604","provinceCode":"36"},{"code":"360429","name":"湖口县","cityCode":"3604","provinceCode":"36"},{"code":"360430","name":"彭泽县","cityCode":"3604","provinceCode":"36"},{"code":"360481","name":"瑞昌市","cityCode":"3604","provinceCode":"36"},{"code":"360482","name":"共青城市","cityCode":"3604","provinceCode":"36"},{"code":"360483","name":"庐山市","cityCode":"3604","provinceCode":"36"},{"code":"360502","name":"渝水区","cityCode":"3605","provinceCode":"36"},{"code":"360521","name":"分宜县","cityCode":"3605","provinceCode":"36"},{"code":"360602","name":"月湖区","cityCode":"3606","provinceCode":"36"},{"code":"360622","name":"余江县","cityCode":"3606","provinceCode":"36"},{"code":"360681","name":"贵溪市","cityCode":"3606","provinceCode":"36"},{"code":"360702","name":"章贡区","cityCode":"3607","provinceCode":"36"},{"code":"360703","name":"南康区","cityCode":"3607","provinceCode":"36"},{"code":"360721","name":"赣县","cityCode":"3607","provinceCode":"36"},{"code":"360722","name":"信丰县","cityCode":"3607","provinceCode":"36"},{"code":"360723","name":"大余县","cityCode":"3607","provinceCode":"36"},{"code":"360724","name":"上犹县","cityCode":"3607","provinceCode":"36"},{"code":"360725","name":"崇义县","cityCode":"3607","provinceCode":"36"},{"code":"360726","name":"安远县","cityCode":"3607","provinceCode":"36"},{"code":"360727","name":"龙南县","cityCode":"3607","provinceCode":"36"},{"code":"360728","name":"定南县","cityCode":"3607","provinceCode":"36"},{"code":"360729","name":"全南县","cityCode":"3607","provinceCode":"36"},{"code":"360730","name":"宁都县","cityCode":"3607","provinceCode":"36"},{"code":"360731","name":"于都县","cityCode":"3607","provinceCode":"36"},{"code":"360732","name":"兴国县","cityCode":"3607","provinceCode":"36"},{"code":"360733","name":"会昌县","cityCode":"3607","provinceCode":"36"},{"code":"360734","name":"寻乌县","cityCode":"3607","provinceCode":"36"},{"code":"360735","name":"石城县","cityCode":"3607","provinceCode":"36"},{"code":"360781","name":"瑞金市","cityCode":"3607","provinceCode":"36"},{"code":"360802","name":"吉州区","cityCode":"3608","provinceCode":"36"},{"code":"360803","name":"青原区","cityCode":"3608","provinceCode":"36"},{"code":"360821","name":"吉安县","cityCode":"3608","provinceCode":"36"},{"code":"360822","name":"吉水县","cityCode":"3608","provinceCode":"36"},{"code":"360823","name":"峡江县","cityCode":"3608","provinceCode":"36"},{"code":"360824","name":"新干县","cityCode":"3608","provinceCode":"36"},{"code":"360825","name":"永丰县","cityCode":"3608","provinceCode":"36"},{"code":"360826","name":"泰和县","cityCode":"3608","provinceCode":"36"},{"code":"360827","name":"遂川县","cityCode":"3608","provinceCode":"36"},{"code":"360828","name":"万安县","cityCode":"3608","provinceCode":"36"},{"code":"360829","name":"安福县","cityCode":"3608","provinceCode":"36"},{"code":"360830","name":"永新县","cityCode":"3608","provinceCode":"36"},{"code":"360881","name":"井冈山市","cityCode":"3608","provinceCode":"36"},{"code":"360902","name":"袁州区","cityCode":"3609","provinceCode":"36"},{"code":"360921","name":"奉新县","cityCode":"3609","provinceCode":"36"},{"code":"360922","name":"万载县","cityCode":"3609","provinceCode":"36"},{"code":"360923","name":"上高县","cityCode":"3609","provinceCode":"36"},{"code":"360924","name":"宜丰县","cityCode":"3609","provinceCode":"36"},{"code":"360925","name":"靖安县","cityCode":"3609","provinceCode":"36"},{"code":"360926","name":"铜鼓县","cityCode":"3609","provinceCode":"36"},{"code":"360981","name":"丰城市","cityCode":"3609","provinceCode":"36"},{"code":"360982","name":"樟树市","cityCode":"3609","provinceCode":"36"},{"code":"360983","name":"高安市","cityCode":"3609","provinceCode":"36"},{"code":"361002","name":"临川区","cityCode":"3610","provinceCode":"36"},{"code":"361021","name":"南城县","cityCode":"3610","provinceCode":"36"},{"code":"361022","name":"黎川县","cityCode":"3610","provinceCode":"36"},{"code":"361023","name":"南丰县","cityCode":"3610","provinceCode":"36"},{"code":"361024","name":"崇仁县","cityCode":"3610","provinceCode":"36"},{"code":"361025","name":"乐安县","cityCode":"3610","provinceCode":"36"},{"code":"361026","name":"宜黄县","cityCode":"3610","provinceCode":"36"},{"code":"361027","name":"金溪县","cityCode":"3610","provinceCode":"36"},{"code":"361028","name":"资溪县","cityCode":"3610","provinceCode":"36"},{"code":"361029","name":"东乡县","cityCode":"3610","provinceCode":"36"},{"code":"361030","name":"广昌县","cityCode":"3610","provinceCode":"36"},{"code":"361102","name":"信州区","cityCode":"3611","provinceCode":"36"},{"code":"361103","name":"广丰区","cityCode":"3611","provinceCode":"36"},{"code":"361121","name":"上饶县","cityCode":"3611","provinceCode":"36"},{"code":"361123","name":"玉山县","cityCode":"3611","provinceCode":"36"},{"code":"361124","name":"铅山县","cityCode":"3611","provinceCode":"36"},{"code":"361125","name":"横峰县","cityCode":"3611","provinceCode":"36"},{"code":"361126","name":"弋阳县","cityCode":"3611","provinceCode":"36"},{"code":"361127","name":"余干县","cityCode":"3611","provinceCode":"36"},{"code":"361128","name":"鄱阳县","cityCode":"3611","provinceCode":"36"},{"code":"361129","name":"万年县","cityCode":"3611","provinceCode":"36"},{"code":"361130","name":"婺源县","cityCode":"3611","provinceCode":"36"},{"code":"361181","name":"德兴市","cityCode":"3611","provinceCode":"36"},{"code":"370102","name":"历下区","cityCode":"3701","provinceCode":"37"},{"code":"370103","name":"市中区","cityCode":"3701","provinceCode":"37"},{"code":"370104","name":"槐荫区","cityCode":"3701","provinceCode":"37"},{"code":"370105","name":"天桥区","cityCode":"3701","provinceCode":"37"},{"code":"370112","name":"历城区","cityCode":"3701","provinceCode":"37"},{"code":"370113","name":"长清区","cityCode":"3701","provinceCode":"37"},{"code":"370124","name":"平阴县","cityCode":"3701","provinceCode":"37"},{"code":"370125","name":"济阳县","cityCode":"3701","provinceCode":"37"},{"code":"370126","name":"商河县","cityCode":"3701","provinceCode":"37"},{"code":"370181","name":"章丘市","cityCode":"3701","provinceCode":"37"},{"code":"370202","name":"市南区","cityCode":"3702","provinceCode":"37"},{"code":"370203","name":"市北区","cityCode":"3702","provinceCode":"37"},{"code":"370211","name":"黄岛区","cityCode":"3702","provinceCode":"37"},{"code":"370212","name":"崂山区","cityCode":"3702","provinceCode":"37"},{"code":"370213","name":"李沧区","cityCode":"3702","provinceCode":"37"},{"code":"370214","name":"城阳区","cityCode":"3702","provinceCode":"37"},{"code":"370281","name":"胶州市","cityCode":"3702","provinceCode":"37"},{"code":"370282","name":"即墨市","cityCode":"3702","provinceCode":"37"},{"code":"370283","name":"平度市","cityCode":"3702","provinceCode":"37"},{"code":"370285","name":"莱西市","cityCode":"3702","provinceCode":"37"},{"code":"370302","name":"淄川区","cityCode":"3703","provinceCode":"37"},{"code":"370303","name":"张店区","cityCode":"3703","provinceCode":"37"},{"code":"370304","name":"博山区","cityCode":"3703","provinceCode":"37"},{"code":"370305","name":"临淄区","cityCode":"3703","provinceCode":"37"},{"code":"370306","name":"周村区","cityCode":"3703","provinceCode":"37"},{"code":"370321","name":"桓台县","cityCode":"3703","provinceCode":"37"},{"code":"370322","name":"高青县","cityCode":"3703","provinceCode":"37"},{"code":"370323","name":"沂源县","cityCode":"3703","provinceCode":"37"},{"code":"370402","name":"市中区","cityCode":"3704","provinceCode":"37"},{"code":"370403","name":"薛城区","cityCode":"3704","provinceCode":"37"},{"code":"370404","name":"峄城区","cityCode":"3704","provinceCode":"37"},{"code":"370405","name":"台儿庄区","cityCode":"3704","provinceCode":"37"},{"code":"370406","name":"山亭区","cityCode":"3704","provinceCode":"37"},{"code":"370481","name":"滕州市","cityCode":"3704","provinceCode":"37"},{"code":"370502","name":"东营区","cityCode":"3705","provinceCode":"37"},{"code":"370503","name":"河口区","cityCode":"3705","provinceCode":"37"},{"code":"370505","name":"垦利区","cityCode":"3705","provinceCode":"37"},{"code":"370522","name":"利津县","cityCode":"3705","provinceCode":"37"},{"code":"370523","name":"广饶县","cityCode":"3705","provinceCode":"37"},{"code":"370602","name":"芝罘区","cityCode":"3706","provinceCode":"37"},{"code":"370611","name":"福山区","cityCode":"3706","provinceCode":"37"},{"code":"370612","name":"牟平区","cityCode":"3706","provinceCode":"37"},{"code":"370613","name":"莱山区","cityCode":"3706","provinceCode":"37"},{"code":"370634","name":"长岛县","cityCode":"3706","provinceCode":"37"},{"code":"370681","name":"龙口市","cityCode":"3706","provinceCode":"37"},{"code":"370682","name":"莱阳市","cityCode":"3706","provinceCode":"37"},{"code":"370683","name":"莱州市","cityCode":"3706","provinceCode":"37"},{"code":"370684","name":"蓬莱市","cityCode":"3706","provinceCode":"37"},{"code":"370685","name":"招远市","cityCode":"3706","provinceCode":"37"},{"code":"370686","name":"栖霞市","cityCode":"3706","provinceCode":"37"},{"code":"370687","name":"海阳市","cityCode":"3706","provinceCode":"37"},{"code":"370702","name":"潍城区","cityCode":"3707","provinceCode":"37"},{"code":"370703","name":"寒亭区","cityCode":"3707","provinceCode":"37"},{"code":"370704","name":"坊子区","cityCode":"3707","provinceCode":"37"},{"code":"370705","name":"奎文区","cityCode":"3707","provinceCode":"37"},{"code":"370724","name":"临朐县","cityCode":"3707","provinceCode":"37"},{"code":"370725","name":"昌乐县","cityCode":"3707","provinceCode":"37"},{"code":"370781","name":"青州市","cityCode":"3707","provinceCode":"37"},{"code":"370782","name":"诸城市","cityCode":"3707","provinceCode":"37"},{"code":"370783","name":"寿光市","cityCode":"3707","provinceCode":"37"},{"code":"370784","name":"安丘市","cityCode":"3707","provinceCode":"37"},{"code":"370785","name":"高密市","cityCode":"3707","provinceCode":"37"},{"code":"370786","name":"昌邑市","cityCode":"3707","provinceCode":"37"},{"code":"370811","name":"任城区","cityCode":"3708","provinceCode":"37"},{"code":"370812","name":"兖州区","cityCode":"3708","provinceCode":"37"},{"code":"370826","name":"微山县","cityCode":"3708","provinceCode":"37"},{"code":"370827","name":"鱼台县","cityCode":"3708","provinceCode":"37"},{"code":"370828","name":"金乡县","cityCode":"3708","provinceCode":"37"},{"code":"370829","name":"嘉祥县","cityCode":"3708","provinceCode":"37"},{"code":"370830","name":"汶上县","cityCode":"3708","provinceCode":"37"},{"code":"370831","name":"泗水县","cityCode":"3708","provinceCode":"37"},{"code":"370832","name":"梁山县","cityCode":"3708","provinceCode":"37"},{"code":"370881","name":"曲阜市","cityCode":"3708","provinceCode":"37"},{"code":"370883","name":"邹城市","cityCode":"3708","provinceCode":"37"},{"code":"370902","name":"泰山区","cityCode":"3709","provinceCode":"37"},{"code":"370911","name":"岱岳区","cityCode":"3709","provinceCode":"37"},{"code":"370921","name":"宁阳县","cityCode":"3709","provinceCode":"37"},{"code":"370923","name":"东平县","cityCode":"3709","provinceCode":"37"},{"code":"370982","name":"新泰市","cityCode":"3709","provinceCode":"37"},{"code":"370983","name":"肥城市","cityCode":"3709","provinceCode":"37"},{"code":"371002","name":"环翠区","cityCode":"3710","provinceCode":"37"},{"code":"371003","name":"文登区","cityCode":"3710","provinceCode":"37"},{"code":"371082","name":"荣成市","cityCode":"3710","provinceCode":"37"},{"code":"371083","name":"乳山市","cityCode":"3710","provinceCode":"37"},{"code":"371102","name":"东港区","cityCode":"3711","provinceCode":"37"},{"code":"371103","name":"岚山区","cityCode":"3711","provinceCode":"37"},{"code":"371121","name":"五莲县","cityCode":"3711","provinceCode":"37"},{"code":"371122","name":"莒县","cityCode":"3711","provinceCode":"37"},{"code":"371202","name":"莱城区","cityCode":"3712","provinceCode":"37"},{"code":"371203","name":"钢城区","cityCode":"3712","provinceCode":"37"},{"code":"371302","name":"兰山区","cityCode":"3713","provinceCode":"37"},{"code":"371311","name":"罗庄区","cityCode":"3713","provinceCode":"37"},{"code":"371312","name":"河东区","cityCode":"3713","provinceCode":"37"},{"code":"371321","name":"沂南县","cityCode":"3713","provinceCode":"37"},{"code":"371322","name":"郯城县","cityCode":"3713","provinceCode":"37"},{"code":"371323","name":"沂水县","cityCode":"3713","provinceCode":"37"},{"code":"371324","name":"兰陵县","cityCode":"3713","provinceCode":"37"},{"code":"371325","name":"费县","cityCode":"3713","provinceCode":"37"},{"code":"371326","name":"平邑县","cityCode":"3713","provinceCode":"37"},{"code":"371327","name":"莒南县","cityCode":"3713","provinceCode":"37"},{"code":"371328","name":"蒙阴县","cityCode":"3713","provinceCode":"37"},{"code":"371329","name":"临沭县","cityCode":"3713","provinceCode":"37"},{"code":"371402","name":"德城区","cityCode":"3714","provinceCode":"37"},{"code":"371403","name":"陵城区","cityCode":"3714","provinceCode":"37"},{"code":"371422","name":"宁津县","cityCode":"3714","provinceCode":"37"},{"code":"371423","name":"庆云县","cityCode":"3714","provinceCode":"37"},{"code":"371424","name":"临邑县","cityCode":"3714","provinceCode":"37"},{"code":"371425","name":"齐河县","cityCode":"3714","provinceCode":"37"},{"code":"371426","name":"平原县","cityCode":"3714","provinceCode":"37"},{"code":"371427","name":"夏津县","cityCode":"3714","provinceCode":"37"},{"code":"371428","name":"武城县","cityCode":"3714","provinceCode":"37"},{"code":"371481","name":"乐陵市","cityCode":"3714","provinceCode":"37"},{"code":"371482","name":"禹城市","cityCode":"3714","provinceCode":"37"},{"code":"371502","name":"东昌府区","cityCode":"3715","provinceCode":"37"},{"code":"371521","name":"阳谷县","cityCode":"3715","provinceCode":"37"},{"code":"371522","name":"莘县","cityCode":"3715","provinceCode":"37"},{"code":"371523","name":"茌平县","cityCode":"3715","provinceCode":"37"},{"code":"371524","name":"东阿县","cityCode":"3715","provinceCode":"37"},{"code":"371525","name":"冠县","cityCode":"3715","provinceCode":"37"},{"code":"371526","name":"高唐县","cityCode":"3715","provinceCode":"37"},{"code":"371581","name":"临清市","cityCode":"3715","provinceCode":"37"},{"code":"371602","name":"滨城区","cityCode":"3716","provinceCode":"37"},{"code":"371603","name":"沾化区","cityCode":"3716","provinceCode":"37"},{"code":"371621","name":"惠民县","cityCode":"3716","provinceCode":"37"},{"code":"371622","name":"阳信县","cityCode":"3716","provinceCode":"37"},{"code":"371623","name":"无棣县","cityCode":"3716","provinceCode":"37"},{"code":"371625","name":"博兴县","cityCode":"3716","provinceCode":"37"},{"code":"371626","name":"邹平县","cityCode":"3716","provinceCode":"37"},{"code":"371702","name":"牡丹区","cityCode":"3717","provinceCode":"37"},{"code":"371703","name":"定陶区","cityCode":"3717","provinceCode":"37"},{"code":"371721","name":"曹县","cityCode":"3717","provinceCode":"37"},{"code":"371722","name":"单县","cityCode":"3717","provinceCode":"37"},{"code":"371723","name":"成武县","cityCode":"3717","provinceCode":"37"},{"code":"371724","name":"巨野县","cityCode":"3717","provinceCode":"37"},{"code":"371725","name":"郓城县","cityCode":"3717","provinceCode":"37"},{"code":"371726","name":"鄄城县","cityCode":"3717","provinceCode":"37"},{"code":"371728","name":"东明县","cityCode":"3717","provinceCode":"37"},{"code":"410102","name":"中原区","cityCode":"4101","provinceCode":"41"},{"code":"410103","name":"二七区","cityCode":"4101","provinceCode":"41"},{"code":"410104","name":"管城回族区","cityCode":"4101","provinceCode":"41"},{"code":"410105","name":"金水区","cityCode":"4101","provinceCode":"41"},{"code":"410106","name":"上街区","cityCode":"4101","provinceCode":"41"},{"code":"410108","name":"惠济区","cityCode":"4101","provinceCode":"41"},{"code":"410122","name":"中牟县","cityCode":"4101","provinceCode":"41"},{"code":"410181","name":"巩义市","cityCode":"4101","provinceCode":"41"},{"code":"410182","name":"荥阳市","cityCode":"4101","provinceCode":"41"},{"code":"410183","name":"新密市","cityCode":"4101","provinceCode":"41"},{"code":"410184","name":"新郑市","cityCode":"4101","provinceCode":"41"},{"code":"410185","name":"登封市","cityCode":"4101","provinceCode":"41"},{"code":"410202","name":"龙亭区","cityCode":"4102","provinceCode":"41"},{"code":"410203","name":"顺河回族区","cityCode":"4102","provinceCode":"41"},{"code":"410204","name":"鼓楼区","cityCode":"4102","provinceCode":"41"},{"code":"410205","name":"禹王台区","cityCode":"4102","provinceCode":"41"},{"code":"410211","name":"金明区","cityCode":"4102","provinceCode":"41"},{"code":"410212","name":"祥符区","cityCode":"4102","provinceCode":"41"},{"code":"410221","name":"杞县","cityCode":"4102","provinceCode":"41"},{"code":"410222","name":"通许县","cityCode":"4102","provinceCode":"41"},{"code":"410223","name":"尉氏县","cityCode":"4102","provinceCode":"41"},{"code":"410225","name":"兰考县","cityCode":"4102","provinceCode":"41"},{"code":"410302","name":"老城区","cityCode":"4103","provinceCode":"41"},{"code":"410303","name":"西工区","cityCode":"4103","provinceCode":"41"},{"code":"410304","name":"瀍河回族区","cityCode":"4103","provinceCode":"41"},{"code":"410305","name":"涧西区","cityCode":"4103","provinceCode":"41"},{"code":"410306","name":"吉利区","cityCode":"4103","provinceCode":"41"},{"code":"410311","name":"洛龙区","cityCode":"4103","provinceCode":"41"},{"code":"410322","name":"孟津县","cityCode":"4103","provinceCode":"41"},{"code":"410323","name":"新安县","cityCode":"4103","provinceCode":"41"},{"code":"410324","name":"栾川县","cityCode":"4103","provinceCode":"41"},{"code":"410325","name":"嵩县","cityCode":"4103","provinceCode":"41"},{"code":"410326","name":"汝阳县","cityCode":"4103","provinceCode":"41"},{"code":"410327","name":"宜阳县","cityCode":"4103","provinceCode":"41"},{"code":"410328","name":"洛宁县","cityCode":"4103","provinceCode":"41"},{"code":"410329","name":"伊川县","cityCode":"4103","provinceCode":"41"},{"code":"410381","name":"偃师市","cityCode":"4103","provinceCode":"41"},{"code":"410402","name":"新华区","cityCode":"4104","provinceCode":"41"},{"code":"410403","name":"卫东区","cityCode":"4104","provinceCode":"41"},{"code":"410404","name":"石龙区","cityCode":"4104","provinceCode":"41"},{"code":"410411","name":"湛河区","cityCode":"4104","provinceCode":"41"},{"code":"410421","name":"宝丰县","cityCode":"4104","provinceCode":"41"},{"code":"410422","name":"叶县","cityCode":"4104","provinceCode":"41"},{"code":"410423","name":"鲁山县","cityCode":"4104","provinceCode":"41"},{"code":"410425","name":"郏县","cityCode":"4104","provinceCode":"41"},{"code":"410481","name":"舞钢市","cityCode":"4104","provinceCode":"41"},{"code":"410482","name":"汝州市","cityCode":"4104","provinceCode":"41"},{"code":"410502","name":"文峰区","cityCode":"4105","provinceCode":"41"},{"code":"410503","name":"北关区","cityCode":"4105","provinceCode":"41"},{"code":"410505","name":"殷都区","cityCode":"4105","provinceCode":"41"},{"code":"410506","name":"龙安区","cityCode":"4105","provinceCode":"41"},{"code":"410522","name":"安阳县","cityCode":"4105","provinceCode":"41"},{"code":"410523","name":"汤阴县","cityCode":"4105","provinceCode":"41"},{"code":"410526","name":"滑县","cityCode":"4105","provinceCode":"41"},{"code":"410527","name":"内黄县","cityCode":"4105","provinceCode":"41"},{"code":"410581","name":"林州市","cityCode":"4105","provinceCode":"41"},{"code":"410602","name":"鹤山区","cityCode":"4106","provinceCode":"41"},{"code":"410603","name":"山城区","cityCode":"4106","provinceCode":"41"},{"code":"410611","name":"淇滨区","cityCode":"4106","provinceCode":"41"},{"code":"410621","name":"浚县","cityCode":"4106","provinceCode":"41"},{"code":"410622","name":"淇县","cityCode":"4106","provinceCode":"41"},{"code":"410702","name":"红旗区","cityCode":"4107","provinceCode":"41"},{"code":"410703","name":"卫滨区","cityCode":"4107","provinceCode":"41"},{"code":"410704","name":"凤泉区","cityCode":"4107","provinceCode":"41"},{"code":"410711","name":"牧野区","cityCode":"4107","provinceCode":"41"},{"code":"410721","name":"新乡县","cityCode":"4107","provinceCode":"41"},{"code":"410724","name":"获嘉县","cityCode":"4107","provinceCode":"41"},{"code":"410725","name":"原阳县","cityCode":"4107","provinceCode":"41"},{"code":"410726","name":"延津县","cityCode":"4107","provinceCode":"41"},{"code":"410727","name":"封丘县","cityCode":"4107","provinceCode":"41"},{"code":"410728","name":"长垣县","cityCode":"4107","provinceCode":"41"},{"code":"410781","name":"卫辉市","cityCode":"4107","provinceCode":"41"},{"code":"410782","name":"辉县市","cityCode":"4107","provinceCode":"41"},{"code":"410802","name":"解放区","cityCode":"4108","provinceCode":"41"},{"code":"410803","name":"中站区","cityCode":"4108","provinceCode":"41"},{"code":"410804","name":"马村区","cityCode":"4108","provinceCode":"41"},{"code":"410811","name":"山阳区","cityCode":"4108","provinceCode":"41"},{"code":"410821","name":"修武县","cityCode":"4108","provinceCode":"41"},{"code":"410822","name":"博爱县","cityCode":"4108","provinceCode":"41"},{"code":"410823","name":"武陟县","cityCode":"4108","provinceCode":"41"},{"code":"410825","name":"温县","cityCode":"4108","provinceCode":"41"},{"code":"410882","name":"沁阳市","cityCode":"4108","provinceCode":"41"},{"code":"410883","name":"孟州市","cityCode":"4108","provinceCode":"41"},{"code":"410902","name":"华龙区","cityCode":"4109","provinceCode":"41"},{"code":"410922","name":"清丰县","cityCode":"4109","provinceCode":"41"},{"code":"410923","name":"南乐县","cityCode":"4109","provinceCode":"41"},{"code":"410926","name":"范县","cityCode":"4109","provinceCode":"41"},{"code":"410927","name":"台前县","cityCode":"4109","provinceCode":"41"},{"code":"410928","name":"濮阳县","cityCode":"4109","provinceCode":"41"},{"code":"411002","name":"魏都区","cityCode":"4110","provinceCode":"41"},{"code":"411023","name":"许昌县","cityCode":"4110","provinceCode":"41"},{"code":"411024","name":"鄢陵县","cityCode":"4110","provinceCode":"41"},{"code":"411025","name":"襄城县","cityCode":"4110","provinceCode":"41"},{"code":"411081","name":"禹州市","cityCode":"4110","provinceCode":"41"},{"code":"411082","name":"长葛市","cityCode":"4110","provinceCode":"41"},{"code":"411102","name":"源汇区","cityCode":"4111","provinceCode":"41"},{"code":"411103","name":"郾城区","cityCode":"4111","provinceCode":"41"},{"code":"411104","name":"召陵区","cityCode":"4111","provinceCode":"41"},{"code":"411121","name":"舞阳县","cityCode":"4111","provinceCode":"41"},{"code":"411122","name":"临颍县","cityCode":"4111","provinceCode":"41"},{"code":"411202","name":"湖滨区","cityCode":"4112","provinceCode":"41"},{"code":"411203","name":"陕州区","cityCode":"4112","provinceCode":"41"},{"code":"411221","name":"渑池县","cityCode":"4112","provinceCode":"41"},{"code":"411224","name":"卢氏县","cityCode":"4112","provinceCode":"41"},{"code":"411281","name":"义马市","cityCode":"4112","provinceCode":"41"},{"code":"411282","name":"灵宝市","cityCode":"4112","provinceCode":"41"},{"code":"411302","name":"宛城区","cityCode":"4113","provinceCode":"41"},{"code":"411303","name":"卧龙区","cityCode":"4113","provinceCode":"41"},{"code":"411321","name":"南召县","cityCode":"4113","provinceCode":"41"},{"code":"411322","name":"方城县","cityCode":"4113","provinceCode":"41"},{"code":"411323","name":"西峡县","cityCode":"4113","provinceCode":"41"},{"code":"411324","name":"镇平县","cityCode":"4113","provinceCode":"41"},{"code":"411325","name":"内乡县","cityCode":"4113","provinceCode":"41"},{"code":"411326","name":"淅川县","cityCode":"4113","provinceCode":"41"},{"code":"411327","name":"社旗县","cityCode":"4113","provinceCode":"41"},{"code":"411328","name":"唐河县","cityCode":"4113","provinceCode":"41"},{"code":"411329","name":"新野县","cityCode":"4113","provinceCode":"41"},{"code":"411330","name":"桐柏县","cityCode":"4113","provinceCode":"41"},{"code":"411381","name":"邓州市","cityCode":"4113","provinceCode":"41"},{"code":"411402","name":"梁园区","cityCode":"4114","provinceCode":"41"},{"code":"411403","name":"睢阳区","cityCode":"4114","provinceCode":"41"},{"code":"411421","name":"民权县","cityCode":"4114","provinceCode":"41"},{"code":"411422","name":"睢县","cityCode":"4114","provinceCode":"41"},{"code":"411423","name":"宁陵县","cityCode":"4114","provinceCode":"41"},{"code":"411424","name":"柘城县","cityCode":"4114","provinceCode":"41"},{"code":"411425","name":"虞城县","cityCode":"4114","provinceCode":"41"},{"code":"411426","name":"夏邑县","cityCode":"4114","provinceCode":"41"},{"code":"411481","name":"永城市","cityCode":"4114","provinceCode":"41"},{"code":"411502","name":"浉河区","cityCode":"4115","provinceCode":"41"},{"code":"411503","name":"平桥区","cityCode":"4115","provinceCode":"41"},{"code":"411521","name":"罗山县","cityCode":"4115","provinceCode":"41"},{"code":"411522","name":"光山县","cityCode":"4115","provinceCode":"41"},{"code":"411523","name":"新县","cityCode":"4115","provinceCode":"41"},{"code":"411524","name":"商城县","cityCode":"4115","provinceCode":"41"},{"code":"411525","name":"固始县","cityCode":"4115","provinceCode":"41"},{"code":"411526","name":"潢川县","cityCode":"4115","provinceCode":"41"},{"code":"411527","name":"淮滨县","cityCode":"4115","provinceCode":"41"},{"code":"411528","name":"息县","cityCode":"4115","provinceCode":"41"},{"code":"411602","name":"川汇区","cityCode":"4116","provinceCode":"41"},{"code":"411621","name":"扶沟县","cityCode":"4116","provinceCode":"41"},{"code":"411622","name":"西华县","cityCode":"4116","provinceCode":"41"},{"code":"411623","name":"商水县","cityCode":"4116","provinceCode":"41"},{"code":"411624","name":"沈丘县","cityCode":"4116","provinceCode":"41"},{"code":"411625","name":"郸城县","cityCode":"4116","provinceCode":"41"},{"code":"411626","name":"淮阳县","cityCode":"4116","provinceCode":"41"},{"code":"411627","name":"太康县","cityCode":"4116","provinceCode":"41"},{"code":"411628","name":"鹿邑县","cityCode":"4116","provinceCode":"41"},{"code":"411681","name":"项城市","cityCode":"4116","provinceCode":"41"},{"code":"411702","name":"驿城区","cityCode":"4117","provinceCode":"41"},{"code":"411721","name":"西平县","cityCode":"4117","provinceCode":"41"},{"code":"411722","name":"上蔡县","cityCode":"4117","provinceCode":"41"},{"code":"411723","name":"平舆县","cityCode":"4117","provinceCode":"41"},{"code":"411724","name":"正阳县","cityCode":"4117","provinceCode":"41"},{"code":"411725","name":"确山县","cityCode":"4117","provinceCode":"41"},{"code":"411726","name":"泌阳县","cityCode":"4117","provinceCode":"41"},{"code":"411727","name":"汝南县","cityCode":"4117","provinceCode":"41"},{"code":"411728","name":"遂平县","cityCode":"4117","provinceCode":"41"},{"code":"411729","name":"新蔡县","cityCode":"4117","provinceCode":"41"},{"code":"419001","name":"济源市","cityCode":"4190","provinceCode":"41"},{"code":"420102","name":"江岸区","cityCode":"4201","provinceCode":"42"},{"code":"420103","name":"江汉区","cityCode":"4201","provinceCode":"42"},{"code":"420104","name":"硚口区","cityCode":"4201","provinceCode":"42"},{"code":"420105","name":"汉阳区","cityCode":"4201","provinceCode":"42"},{"code":"420106","name":"武昌区","cityCode":"4201","provinceCode":"42"},{"code":"420107","name":"青山区","cityCode":"4201","provinceCode":"42"},{"code":"420111","name":"洪山区","cityCode":"4201","provinceCode":"42"},{"code":"420112","name":"东西湖区","cityCode":"4201","provinceCode":"42"},{"code":"420113","name":"汉南区","cityCode":"4201","provinceCode":"42"},{"code":"420114","name":"蔡甸区","cityCode":"4201","provinceCode":"42"},{"code":"420115","name":"江夏区","cityCode":"4201","provinceCode":"42"},{"code":"420116","name":"黄陂区","cityCode":"4201","provinceCode":"42"},{"code":"420117","name":"新洲区","cityCode":"4201","provinceCode":"42"},{"code":"420202","name":"黄石港区","cityCode":"4202","provinceCode":"42"},{"code":"420203","name":"西塞山区","cityCode":"4202","provinceCode":"42"},{"code":"420204","name":"下陆区","cityCode":"4202","provinceCode":"42"},{"code":"420205","name":"铁山区","cityCode":"4202","provinceCode":"42"},{"code":"420222","name":"阳新县","cityCode":"4202","provinceCode":"42"},{"code":"420281","name":"大冶市","cityCode":"4202","provinceCode":"42"},{"code":"420302","name":"茅箭区","cityCode":"4203","provinceCode":"42"},{"code":"420303","name":"张湾区","cityCode":"4203","provinceCode":"42"},{"code":"420304","name":"郧阳区","cityCode":"4203","provinceCode":"42"},{"code":"420322","name":"郧西县","cityCode":"4203","provinceCode":"42"},{"code":"420323","name":"竹山县","cityCode":"4203","provinceCode":"42"},{"code":"420324","name":"竹溪县","cityCode":"4203","provinceCode":"42"},{"code":"420325","name":"房县","cityCode":"4203","provinceCode":"42"},{"code":"420381","name":"丹江口市","cityCode":"4203","provinceCode":"42"},{"code":"420502","name":"西陵区","cityCode":"4205","provinceCode":"42"},{"code":"420503","name":"伍家岗区","cityCode":"4205","provinceCode":"42"},{"code":"420504","name":"点军区","cityCode":"4205","provinceCode":"42"},{"code":"420505","name":"猇亭区","cityCode":"4205","provinceCode":"42"},{"code":"420506","name":"夷陵区","cityCode":"4205","provinceCode":"42"},{"code":"420525","name":"远安县","cityCode":"4205","provinceCode":"42"},{"code":"420526","name":"兴山县","cityCode":"4205","provinceCode":"42"},{"code":"420527","name":"秭归县","cityCode":"4205","provinceCode":"42"},{"code":"420528","name":"长阳土家族自治县","cityCode":"4205","provinceCode":"42"},{"code":"420529","name":"五峰土家族自治县","cityCode":"4205","provinceCode":"42"},{"code":"420581","name":"宜都市","cityCode":"4205","provinceCode":"42"},{"code":"420582","name":"当阳市","cityCode":"4205","provinceCode":"42"},{"code":"420583","name":"枝江市","cityCode":"4205","provinceCode":"42"},{"code":"420602","name":"襄城区","cityCode":"4206","provinceCode":"42"},{"code":"420606","name":"樊城区","cityCode":"4206","provinceCode":"42"},{"code":"420607","name":"襄州区","cityCode":"4206","provinceCode":"42"},{"code":"420624","name":"南漳县","cityCode":"4206","provinceCode":"42"},{"code":"420625","name":"谷城县","cityCode":"4206","provinceCode":"42"},{"code":"420626","name":"保康县","cityCode":"4206","provinceCode":"42"},{"code":"420682","name":"老河口市","cityCode":"4206","provinceCode":"42"},{"code":"420683","name":"枣阳市","cityCode":"4206","provinceCode":"42"},{"code":"420684","name":"宜城市","cityCode":"4206","provinceCode":"42"},{"code":"420702","name":"梁子湖区","cityCode":"4207","provinceCode":"42"},{"code":"420703","name":"华容区","cityCode":"4207","provinceCode":"42"},{"code":"420704","name":"鄂城区","cityCode":"4207","provinceCode":"42"},{"code":"420802","name":"东宝区","cityCode":"4208","provinceCode":"42"},{"code":"420804","name":"掇刀区","cityCode":"4208","provinceCode":"42"},{"code":"420821","name":"京山县","cityCode":"4208","provinceCode":"42"},{"code":"420822","name":"沙洋县","cityCode":"4208","provinceCode":"42"},{"code":"420881","name":"钟祥市","cityCode":"4208","provinceCode":"42"},{"code":"420902","name":"孝南区","cityCode":"4209","provinceCode":"42"},{"code":"420921","name":"孝昌县","cityCode":"4209","provinceCode":"42"},{"code":"420922","name":"大悟县","cityCode":"4209","provinceCode":"42"},{"code":"420923","name":"云梦县","cityCode":"4209","provinceCode":"42"},{"code":"420981","name":"应城市","cityCode":"4209","provinceCode":"42"},{"code":"420982","name":"安陆市","cityCode":"4209","provinceCode":"42"},{"code":"420984","name":"汉川市","cityCode":"4209","provinceCode":"42"},{"code":"421002","name":"沙市区","cityCode":"4210","provinceCode":"42"},{"code":"421003","name":"荆州区","cityCode":"4210","provinceCode":"42"},{"code":"421022","name":"公安县","cityCode":"4210","provinceCode":"42"},{"code":"421023","name":"监利县","cityCode":"4210","provinceCode":"42"},{"code":"421024","name":"江陵县","cityCode":"4210","provinceCode":"42"},{"code":"421081","name":"石首市","cityCode":"4210","provinceCode":"42"},{"code":"421083","name":"洪湖市","cityCode":"4210","provinceCode":"42"},{"code":"421087","name":"松滋市","cityCode":"4210","provinceCode":"42"},{"code":"421102","name":"黄州区","cityCode":"4211","provinceCode":"42"},{"code":"421121","name":"团风县","cityCode":"4211","provinceCode":"42"},{"code":"421122","name":"红安县","cityCode":"4211","provinceCode":"42"},{"code":"421123","name":"罗田县","cityCode":"4211","provinceCode":"42"},{"code":"421124","name":"英山县","cityCode":"4211","provinceCode":"42"},{"code":"421125","name":"浠水县","cityCode":"4211","provinceCode":"42"},{"code":"421126","name":"蕲春县","cityCode":"4211","provinceCode":"42"},{"code":"421127","name":"黄梅县","cityCode":"4211","provinceCode":"42"},{"code":"421181","name":"麻城市","cityCode":"4211","provinceCode":"42"},{"code":"421182","name":"武穴市","cityCode":"4211","provinceCode":"42"},{"code":"421202","name":"咸安区","cityCode":"4212","provinceCode":"42"},{"code":"421221","name":"嘉鱼县","cityCode":"4212","provinceCode":"42"},{"code":"421222","name":"通城县","cityCode":"4212","provinceCode":"42"},{"code":"421223","name":"崇阳县","cityCode":"4212","provinceCode":"42"},{"code":"421224","name":"通山县","cityCode":"4212","provinceCode":"42"},{"code":"421281","name":"赤壁市","cityCode":"4212","provinceCode":"42"},{"code":"421303","name":"曾都区","cityCode":"4213","provinceCode":"42"},{"code":"421321","name":"随县","cityCode":"4213","provinceCode":"42"},{"code":"421381","name":"广水市","cityCode":"4213","provinceCode":"42"},{"code":"422801","name":"恩施市","cityCode":"4228","provinceCode":"42"},{"code":"422802","name":"利川市","cityCode":"4228","provinceCode":"42"},{"code":"422822","name":"建始县","cityCode":"4228","provinceCode":"42"},{"code":"422823","name":"巴东县","cityCode":"4228","provinceCode":"42"},{"code":"422825","name":"宣恩县","cityCode":"4228","provinceCode":"42"},{"code":"422826","name":"咸丰县","cityCode":"4228","provinceCode":"42"},{"code":"422827","name":"来凤县","cityCode":"4228","provinceCode":"42"},{"code":"422828","name":"鹤峰县","cityCode":"4228","provinceCode":"42"},{"code":"429004","name":"仙桃市","cityCode":"4290","provinceCode":"42"},{"code":"429005","name":"潜江市","cityCode":"4290","provinceCode":"42"},{"code":"429006","name":"天门市","cityCode":"4290","provinceCode":"42"},{"code":"429021","name":"神农架林区","cityCode":"4290","provinceCode":"42"},{"code":"430102","name":"芙蓉区","cityCode":"4301","provinceCode":"43"},{"code":"430103","name":"天心区","cityCode":"4301","provinceCode":"43"},{"code":"430104","name":"岳麓区","cityCode":"4301","provinceCode":"43"},{"code":"430105","name":"开福区","cityCode":"4301","provinceCode":"43"},{"code":"430111","name":"雨花区","cityCode":"4301","provinceCode":"43"},{"code":"430112","name":"望城区","cityCode":"4301","provinceCode":"43"},{"code":"430121","name":"长沙县","cityCode":"4301","provinceCode":"43"},{"code":"430124","name":"宁乡县","cityCode":"4301","provinceCode":"43"},{"code":"430181","name":"浏阳市","cityCode":"4301","provinceCode":"43"},{"code":"430202","name":"荷塘区","cityCode":"4302","provinceCode":"43"},{"code":"430203","name":"芦淞区","cityCode":"4302","provinceCode":"43"},{"code":"430204","name":"石峰区","cityCode":"4302","provinceCode":"43"},{"code":"430211","name":"天元区","cityCode":"4302","provinceCode":"43"},{"code":"430221","name":"株洲县","cityCode":"4302","provinceCode":"43"},{"code":"430223","name":"攸县","cityCode":"4302","provinceCode":"43"},{"code":"430224","name":"茶陵县","cityCode":"4302","provinceCode":"43"},{"code":"430225","name":"炎陵县","cityCode":"4302","provinceCode":"43"},{"code":"430281","name":"醴陵市","cityCode":"4302","provinceCode":"43"},{"code":"430302","name":"雨湖区","cityCode":"4303","provinceCode":"43"},{"code":"430304","name":"岳塘区","cityCode":"4303","provinceCode":"43"},{"code":"430321","name":"湘潭县","cityCode":"4303","provinceCode":"43"},{"code":"430381","name":"湘乡市","cityCode":"4303","provinceCode":"43"},{"code":"430382","name":"韶山市","cityCode":"4303","provinceCode":"43"},{"code":"430405","name":"珠晖区","cityCode":"4304","provinceCode":"43"},{"code":"430406","name":"雁峰区","cityCode":"4304","provinceCode":"43"},{"code":"430407","name":"石鼓区","cityCode":"4304","provinceCode":"43"},{"code":"430408","name":"蒸湘区","cityCode":"4304","provinceCode":"43"},{"code":"430412","name":"南岳区","cityCode":"4304","provinceCode":"43"},{"code":"430421","name":"衡阳县","cityCode":"4304","provinceCode":"43"},{"code":"430422","name":"衡南县","cityCode":"4304","provinceCode":"43"},{"code":"430423","name":"衡山县","cityCode":"4304","provinceCode":"43"},{"code":"430424","name":"衡东县","cityCode":"4304","provinceCode":"43"},{"code":"430426","name":"祁东县","cityCode":"4304","provinceCode":"43"},{"code":"430481","name":"耒阳市","cityCode":"4304","provinceCode":"43"},{"code":"430482","name":"常宁市","cityCode":"4304","provinceCode":"43"},{"code":"430502","name":"双清区","cityCode":"4305","provinceCode":"43"},{"code":"430503","name":"大祥区","cityCode":"4305","provinceCode":"43"},{"code":"430511","name":"北塔区","cityCode":"4305","provinceCode":"43"},{"code":"430521","name":"邵东县","cityCode":"4305","provinceCode":"43"},{"code":"430522","name":"新邵县","cityCode":"4305","provinceCode":"43"},{"code":"430523","name":"邵阳县","cityCode":"4305","provinceCode":"43"},{"code":"430524","name":"隆回县","cityCode":"4305","provinceCode":"43"},{"code":"430525","name":"洞口县","cityCode":"4305","provinceCode":"43"},{"code":"430527","name":"绥宁县","cityCode":"4305","provinceCode":"43"},{"code":"430528","name":"新宁县","cityCode":"4305","provinceCode":"43"},{"code":"430529","name":"城步苗族自治县","cityCode":"4305","provinceCode":"43"},{"code":"430581","name":"武冈市","cityCode":"4305","provinceCode":"43"},{"code":"430602","name":"岳阳楼区","cityCode":"4306","provinceCode":"43"},{"code":"430603","name":"云溪区","cityCode":"4306","provinceCode":"43"},{"code":"430611","name":"君山区","cityCode":"4306","provinceCode":"43"},{"code":"430621","name":"岳阳县","cityCode":"4306","provinceCode":"43"},{"code":"430623","name":"华容县","cityCode":"4306","provinceCode":"43"},{"code":"430624","name":"湘阴县","cityCode":"4306","provinceCode":"43"},{"code":"430626","name":"平江县","cityCode":"4306","provinceCode":"43"},{"code":"430681","name":"汨罗市","cityCode":"4306","provinceCode":"43"},{"code":"430682","name":"临湘市","cityCode":"4306","provinceCode":"43"},{"code":"430702","name":"武陵区","cityCode":"4307","provinceCode":"43"},{"code":"430703","name":"鼎城区","cityCode":"4307","provinceCode":"43"},{"code":"430721","name":"安乡县","cityCode":"4307","provinceCode":"43"},{"code":"430722","name":"汉寿县","cityCode":"4307","provinceCode":"43"},{"code":"430723","name":"澧县","cityCode":"4307","provinceCode":"43"},{"code":"430724","name":"临澧县","cityCode":"4307","provinceCode":"43"},{"code":"430725","name":"桃源县","cityCode":"4307","provinceCode":"43"},{"code":"430726","name":"石门县","cityCode":"4307","provinceCode":"43"},{"code":"430781","name":"津市市","cityCode":"4307","provinceCode":"43"},{"code":"430802","name":"永定区","cityCode":"4308","provinceCode":"43"},{"code":"430811","name":"武陵源区","cityCode":"4308","provinceCode":"43"},{"code":"430821","name":"慈利县","cityCode":"4308","provinceCode":"43"},{"code":"430822","name":"桑植县","cityCode":"4308","provinceCode":"43"},{"code":"430902","name":"资阳区","cityCode":"4309","provinceCode":"43"},{"code":"430903","name":"赫山区","cityCode":"4309","provinceCode":"43"},{"code":"430921","name":"南县","cityCode":"4309","provinceCode":"43"},{"code":"430922","name":"桃江县","cityCode":"4309","provinceCode":"43"},{"code":"430923","name":"安化县","cityCode":"4309","provinceCode":"43"},{"code":"430981","name":"沅江市","cityCode":"4309","provinceCode":"43"},{"code":"431002","name":"北湖区","cityCode":"4310","provinceCode":"43"},{"code":"431003","name":"苏仙区","cityCode":"4310","provinceCode":"43"},{"code":"431021","name":"桂阳县","cityCode":"4310","provinceCode":"43"},{"code":"431022","name":"宜章县","cityCode":"4310","provinceCode":"43"},{"code":"431023","name":"永兴县","cityCode":"4310","provinceCode":"43"},{"code":"431024","name":"嘉禾县","cityCode":"4310","provinceCode":"43"},{"code":"431025","name":"临武县","cityCode":"4310","provinceCode":"43"},{"code":"431026","name":"汝城县","cityCode":"4310","provinceCode":"43"},{"code":"431027","name":"桂东县","cityCode":"4310","provinceCode":"43"},{"code":"431028","name":"安仁县","cityCode":"4310","provinceCode":"43"},{"code":"431081","name":"资兴市","cityCode":"4310","provinceCode":"43"},{"code":"431102","name":"零陵区","cityCode":"4311","provinceCode":"43"},{"code":"431103","name":"冷水滩区","cityCode":"4311","provinceCode":"43"},{"code":"431121","name":"祁阳县","cityCode":"4311","provinceCode":"43"},{"code":"431122","name":"东安县","cityCode":"4311","provinceCode":"43"},{"code":"431123","name":"双牌县","cityCode":"4311","provinceCode":"43"},{"code":"431124","name":"道县","cityCode":"4311","provinceCode":"43"},{"code":"431125","name":"江永县","cityCode":"4311","provinceCode":"43"},{"code":"431126","name":"宁远县","cityCode":"4311","provinceCode":"43"},{"code":"431127","name":"蓝山县","cityCode":"4311","provinceCode":"43"},{"code":"431128","name":"新田县","cityCode":"4311","provinceCode":"43"},{"code":"431129","name":"江华瑶族自治县","cityCode":"4311","provinceCode":"43"},{"code":"431202","name":"鹤城区","cityCode":"4312","provinceCode":"43"},{"code":"431221","name":"中方县","cityCode":"4312","provinceCode":"43"},{"code":"431222","name":"沅陵县","cityCode":"4312","provinceCode":"43"},{"code":"431223","name":"辰溪县","cityCode":"4312","provinceCode":"43"},{"code":"431224","name":"溆浦县","cityCode":"4312","provinceCode":"43"},{"code":"431225","name":"会同县","cityCode":"4312","provinceCode":"43"},{"code":"431226","name":"麻阳苗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431227","name":"新晃侗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431228","name":"芷江侗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431229","name":"靖州苗族侗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431230","name":"通道侗族自治县","cityCode":"4312","provinceCode":"43"},{"code":"431281","name":"洪江市","cityCode":"4312","provinceCode":"43"},{"code":"431302","name":"娄星区","cityCode":"4313","provinceCode":"43"},{"code":"431321","name":"双峰县","cityCode":"4313","provinceCode":"43"},{"code":"431322","name":"新化县","cityCode":"4313","provinceCode":"43"},{"code":"431381","name":"冷水江市","cityCode":"4313","provinceCode":"43"},{"code":"431382","name":"涟源市","cityCode":"4313","provinceCode":"43"},{"code":"433101","name":"吉首市","cityCode":"4331","provinceCode":"43"},{"code":"433122","name":"泸溪县","cityCode":"4331","provinceCode":"43"},{"code":"433123","name":"凤凰县","cityCode":"4331","provinceCode":"43"},{"code":"433124","name":"花垣县","cityCode":"4331","provinceCode":"43"},{"code":"433125","name":"保靖县","cityCode":"4331","provinceCode":"43"},{"code":"433126","name":"古丈县","cityCode":"4331","provinceCode":"43"},{"code":"433127","name":"永顺县","cityCode":"4331","provinceCode":"43"},{"code":"433130","name":"龙山县","cityCode":"4331","provinceCode":"43"},{"code":"440103","name":"荔湾区","cityCode":"4401","provinceCode":"44"},{"code":"440104","name":"越秀区","cityCode":"4401","provinceCode":"44"},{"code":"440105","name":"海珠区","cityCode":"4401","provinceCode":"44"},{"code":"440106","name":"天河区","cityCode":"4401","provinceCode":"44"},{"code":"440111","name":"白云区","cityCode":"4401","provinceCode":"44"},{"code":"440112","name":"黄埔区","cityCode":"4401","provinceCode":"44"},{"code":"440113","name":"番禺区","cityCode":"4401","provinceCode":"44"},{"code":"440114","name":"花都区","cityCode":"4401","provinceCode":"44"},{"code":"440115","name":"南沙区","cityCode":"4401","provinceCode":"44"},{"code":"440117","name":"从化区","cityCode":"4401","provinceCode":"44"},{"code":"440118","name":"增城区","cityCode":"4401","provinceCode":"44"},{"code":"440203","name":"武江区","cityCode":"4402","provinceCode":"44"},{"code":"440204","name":"浈江区","cityCode":"4402","provinceCode":"44"},{"code":"440205","name":"曲江区","cityCode":"4402","provinceCode":"44"},{"code":"440222","name":"始兴县","cityCode":"4402","provinceCode":"44"},{"code":"440224","name":"仁化县","cityCode":"4402","provinceCode":"44"},{"code":"440229","name":"翁源县","cityCode":"4402","provinceCode":"44"},{"code":"440232","name":"乳源瑶族自治县","cityCode":"4402","provinceCode":"44"},{"code":"440233","name":"新丰县","cityCode":"4402","provinceCode":"44"},{"code":"440281","name":"乐昌市","cityCode":"4402","provinceCode":"44"},{"code":"440282","name":"南雄市","cityCode":"4402","provinceCode":"44"},{"code":"440303","name":"罗湖区","cityCode":"4403","provinceCode":"44"},{"code":"440304","name":"福田区","cityCode":"4403","provinceCode":"44"},{"code":"440305","name":"南山区","cityCode":"4403","provinceCode":"44"},{"code":"440306","name":"宝安区","cityCode":"4403","provinceCode":"44"},{"code":"440307","name":"龙岗区","cityCode":"4403","provinceCode":"44"},{"code":"440308","name":"盐田区","cityCode":"4403","provinceCode":"44"},{"code":"440402","name":"香洲区","cityCode":"4404","provinceCode":"44"},{"code":"440403","name":"斗门区","cityCode":"4404","provinceCode":"44"},{"code":"440404","name":"金湾区","cityCode":"4404","provinceCode":"44"},{"code":"440507","name":"龙湖区","cityCode":"4405","provinceCode":"44"},{"code":"440511","name":"金平区","cityCode":"4405","provinceCode":"44"},{"code":"440512","name":"濠江区","cityCode":"4405","provinceCode":"44"},{"code":"440513","name":"潮阳区","cityCode":"4405","provinceCode":"44"},{"code":"440514","name":"潮南区","cityCode":"4405","provinceCode":"44"},{"code":"440515","name":"澄海区","cityCode":"4405","provinceCode":"44"},{"code":"440523","name":"南澳县","cityCode":"4405","provinceCode":"44"},{"code":"440604","name":"禅城区","cityCode":"4406","provinceCode":"44"},{"code":"440605","name":"南海区","cityCode":"4406","provinceCode":"44"},{"code":"440606","name":"顺德区","cityCode":"4406","provinceCode":"44"},{"code":"440607","name":"三水区","cityCode":"4406","provinceCode":"44"},{"code":"440608","name":"高明区","cityCode":"4406","provinceCode":"44"},{"code":"440703","name":"蓬江区","cityCode":"4407","provinceCode":"44"},{"code":"440704","name":"江海区","cityCode":"4407","provinceCode":"44"},{"code":"440705","name":"新会区","cityCode":"4407","provinceCode":"44"},{"code":"440781","name":"台山市","cityCode":"4407","provinceCode":"44"},{"code":"440783","name":"开平市","cityCode":"4407","provinceCode":"44"},{"code":"440784","name":"鹤山市","cityCode":"4407","provinceCode":"44"},{"code":"440785","name":"恩平市","cityCode":"4407","provinceCode":"44"},{"code":"440802","name":"赤坎区","cityCode":"4408","provinceCode":"44"},{"code":"440803","name":"霞山区","cityCode":"4408","provinceCode":"44"},{"code":"440804","name":"坡头区","cityCode":"4408","provinceCode":"44"},{"code":"440811","name":"麻章区","cityCode":"4408","provinceCode":"44"},{"code":"440823","name":"遂溪县","cityCode":"4408","provinceCode":"44"},{"code":"440825","name":"徐闻县","cityCode":"4408","provinceCode":"44"},{"code":"440881","name":"廉江市","cityCode":"4408","provinceCode":"44"},{"code":"440882","name":"雷州市","cityCode":"4408","provinceCode":"44"},{"code":"440883","name":"吴川市","cityCode":"4408","provinceCode":"44"},{"code":"440902","name":"茂南区","cityCode":"4409","provinceCode":"44"},{"code":"440904","name":"电白区","cityCode":"4409","provinceCode":"44"},{"code":"440981","name":"高州市","cityCode":"4409","provinceCode":"44"},{"code":"440982","name":"化州市","cityCode":"4409","provinceCode":"44"},{"code":"440983","name":"信宜市","cityCode":"4409","provinceCode":"44"},{"code":"441202","name":"端州区","cityCode":"4412","provinceCode":"44"},{"code":"441203","name":"鼎湖区","cityCode":"4412","provinceCode":"44"},{"code":"441204","name":"高要区","cityCode":"4412","provinceCode":"44"},{"code":"441223","name":"广宁县","cityCode":"4412","provinceCode":"44"},{"code":"441224","name":"怀集县","cityCode":"4412","provinceCode":"44"},{"code":"441225","name":"封开县","cityCode":"4412","provinceCode":"44"},{"code":"441226","name":"德庆县","cityCode":"4412","provinceCode":"44"},{"code":"441284","name":"四会市","cityCode":"4412","provinceCode":"44"},{"code":"441302","name":"惠城区","cityCode":"4413","provinceCode":"44"},{"code":"441303","name":"惠阳区","cityCode":"4413","provinceCode":"44"},{"code":"441322","name":"博罗县","cityCode":"4413","provinceCode":"44"},{"code":"441323","name":"惠东县","cityCode":"4413","provinceCode":"44"},{"code":"441324","name":"龙门县","cityCode":"4413","provinceCode":"44"},{"code":"441402","name":"梅江区","cityCode":"4414","provinceCode":"44"},{"code":"441403","name":"梅县区","cityCode":"4414","provinceCode":"44"},{"code":"441422","name":"大埔县","cityCode":"4414","provinceCode":"44"},{"code":"441423","name":"丰顺县","cityCode":"4414","provinceCode":"44"},{"code":"441424","name":"五华县","cityCode":"4414","provinceCode":"44"},{"code":"441426","name":"平远县","cityCode":"4414","provinceCode":"44"},{"code":"441427","name":"蕉岭县","cityCode":"4414","provinceCode":"44"},{"code":"441481","name":"兴宁市","cityCode":"4414","provinceCode":"44"},{"code":"441502","name":"城区","cityCode":"4415","provinceCode":"44"},{"code":"441521","name":"海丰县","cityCode":"4415","provinceCode":"44"},{"code":"441523","name":"陆河县","cityCode":"4415","provinceCode":"44"},{"code":"441581","name":"陆丰市","cityCode":"4415","provinceCode":"44"},{"code":"441602","name":"源城区","cityCode":"4416","provinceCode":"44"},{"code":"441621","name":"紫金县","cityCode":"4416","provinceCode":"44"},{"code":"441622","name":"龙川县","cityCode":"4416","provinceCode":"44"},{"code":"441623","name":"连平县","cityCode":"4416","provinceCode":"44"},{"code":"441624","name":"和平县","cityCode":"4416","provinceCode":"44"},{"code":"441625","name":"东源县","cityCode":"4416","provinceCode":"44"},{"code":"441702","name":"江城区","cityCode":"4417","provinceCode":"44"},{"code":"441704","name":"阳东区","cityCode":"4417","provinceCode":"44"},{"code":"441721","name":"阳西县","cityCode":"4417","provinceCode":"44"},{"code":"441781","name":"阳春市","cityCode":"4417","provinceCode":"44"},{"code":"441802","name":"清城区","cityCode":"4418","provinceCode":"44"},{"code":"441803","name":"清新区","cityCode":"4418","provinceCode":"44"},{"code":"441821","name":"佛冈县","cityCode":"4418","provinceCode":"44"},{"code":"441823","name":"阳山县","cityCode":"4418","provinceCode":"44"},{"code":"441825","name":"连山壮族瑶族自治县","cityCode":"4418","provinceCode":"44"},{"code":"441826","name":"连南瑶族自治县","cityCode":"4418","provinceCode":"44"},{"code":"441881","name":"英德市","cityCode":"4418","provinceCode":"44"},{"code":"441882","name":"连州市","cityCode":"4418","provinceCode":"44"},{"code":"441900","name":"东莞市","cityCode":"4419","provinceCode":"44"},{"code":"442000","name":"中山市","cityCode":"4420","provinceCode":"44"},{"code":"445102","name":"湘桥区","cityCode":"4451","provinceCode":"44"},{"code":"445103","name":"潮安区","cityCode":"4451","provinceCode":"44"},{"code":"445122","name":"饶平县","cityCode":"4451","provinceCode":"44"},{"code":"445202","name":"榕城区","cityCode":"4452","provinceCode":"44"},{"code":"445203","name":"揭东区","cityCode":"4452","provinceCode":"44"},{"code":"445222","name":"揭西县","cityCode":"4452","provinceCode":"44"},{"code":"445224","name":"惠来县","cityCode":"4452","provinceCode":"44"},{"code":"445281","name":"普宁市","cityCode":"4452","provinceCode":"44"},{"code":"445302","name":"云城区","cityCode":"4453","provinceCode":"44"},{"code":"445303","name":"云安区","cityCode":"4453","provinceCode":"44"},{"code":"445321","name":"新兴县","cityCode":"4453","provinceCode":"44"},{"code":"445322","name":"郁南县","cityCode":"4453","provinceCode":"44"},{"code":"445381","name":"罗定市","cityCode":"4453","provinceCode":"44"},{"code":"450102","name":"兴宁区","cityCode":"4501","provinceCode":"45"},{"code":"450103","name":"青秀区","cityCode":"4501","provinceCode":"45"},{"code":"450105","name":"江南区","cityCode":"4501","provinceCode":"45"},{"code":"450107","name":"西乡塘区","cityCode":"4501","provinceCode":"45"},{"code":"450108","name":"良庆区","cityCode":"4501","provinceCode":"45"},{"code":"450109","name":"邕宁区","cityCode":"4501","provinceCode":"45"},{"code":"450110","name":"武鸣区","cityCode":"4501","provinceCode":"45"},{"code":"450123","name":"隆安县","cityCode":"4501","provinceCode":"45"},{"code":"450124","name":"马山县","cityCode":"4501","provinceCode":"45"},{"code":"450125","name":"上林县","cityCode":"4501","provinceCode":"45"},{"code":"450126","name":"宾阳县","cityCode":"4501","provinceCode":"45"},{"code":"450127","name":"横县","cityCode":"4501","provinceCode":"45"},{"code":"450202","name":"城中区","cityCode":"4502","provinceCode":"45"},{"code":"450203","name":"鱼峰区","cityCode":"4502","provinceCode":"45"},{"code":"450204","name":"柳南区","cityCode":"4502","provinceCode":"45"},{"code":"450205","name":"柳北区","cityCode":"4502","provinceCode":"45"},{"code":"450206","name":"柳江区","cityCode":"4502","provinceCode":"45"},{"code":"450222","name":"柳城县","cityCode":"4502","provinceCode":"45"},{"code":"450223","name":"鹿寨县","cityCode":"4502","provinceCode":"45"},{"code":"450224","name":"融安县","cityCode":"4502","provinceCode":"45"},{"code":"450225","name":"融水苗族自治县","cityCode":"4502","provinceCode":"45"},{"code":"450226","name":"三江侗族自治县","cityCode":"4502","provinceCode":"45"},{"code":"450302","name":"秀峰区","cityCode":"4503","provinceCode":"45"},{"code":"450303","name":"叠彩区","cityCode":"4503","provinceCode":"45"},{"code":"450304","name":"象山区","cityCode":"4503","provinceCode":"45"},{"code":"450305","name":"七星区","cityCode":"4503","provinceCode":"45"},{"code":"450311","name":"雁山区","cityCode":"4503","provinceCode":"45"},{"code":"450312","name":"临桂区","cityCode":"4503","provinceCode":"45"},{"code":"450321","name":"阳朔县","cityCode":"4503","provinceCode":"45"},{"code":"450323","name":"灵川县","cityCode":"4503","provinceCode":"45"},{"code":"450324","name":"全州县","cityCode":"4503","provinceCode":"45"},{"code":"450325","name":"兴安县","cityCode":"4503","provinceCode":"45"},{"code":"450326","name":"永福县","cityCode":"4503","provinceCode":"45"},{"code":"450327","name":"灌阳县","cityCode":"4503","provinceCode":"45"},{"code":"450328","name":"龙胜各族自治县","cityCode":"4503","provinceCode":"45"},{"code":"450329","name":"资源县","cityCode":"4503","provinceCode":"45"},{"code":"450330","name":"平乐县","cityCode":"4503","provinceCode":"45"},{"code":"450331","name":"荔浦县","cityCode":"4503","provinceCode":"45"},{"code":"450332","name":"恭城瑶族自治县","cityCode":"4503","provinceCode":"45"},{"code":"450403","name":"万秀区","cityCode":"4504","provinceCode":"45"},{"code":"450405","name":"长洲区","cityCode":"4504","provinceCode":"45"},{"code":"450406","name":"龙圩区","cityCode":"4504","provinceCode":"45"},{"code":"450421","name":"苍梧县","cityCode":"4504","provinceCode":"45"},{"code":"450422","name":"藤县","cityCode":"4504","provinceCode":"45"},{"code":"450423","name":"蒙山县","cityCode":"4504","provinceCode":"45"},{"code":"450481","name":"岑溪市","cityCode":"4504","provinceCode":"45"},{"code":"450502","name":"海城区","cityCode":"4505","provinceCode":"45"},{"code":"450503","name":"银海区","cityCode":"4505","provinceCode":"45"},{"code":"450512","name":"铁山港区","cityCode":"4505","provinceCode":"45"},{"code":"450521","name":"合浦县","cityCode":"4505","provinceCode":"45"},{"code":"450602","name":"港口区","cityCode":"4506","provinceCode":"45"},{"code":"450603","name":"防城区","cityCode":"4506","provinceCode":"45"},{"code":"450621","name":"上思县","cityCode":"4506","provinceCode":"45"},{"code":"450681","name":"东兴市","cityCode":"4506","provinceCode":"45"},{"code":"450702","name":"钦南区","cityCode":"4507","provinceCode":"45"},{"code":"450703","name":"钦北区","cityCode":"4507","provinceCode":"45"},{"code":"450721","name":"灵山县","cityCode":"4507","provinceCode":"45"},{"code":"450722","name":"浦北县","cityCode":"4507","provinceCode":"45"},{"code":"450802","name":"港北区","cityCode":"4508","provinceCode":"45"},{"code":"450803","name":"港南区","cityCode":"4508","provinceCode":"45"},{"code":"450804","name":"覃塘区","cityCode":"4508","provinceCode":"45"},{"code":"450821","name":"平南县","cityCode":"4508","provinceCode":"45"},{"code":"450881","name":"桂平市","cityCode":"4508","provinceCode":"45"},{"code":"450902","name":"玉州区","cityCode":"4509","provinceCode":"45"},{"code":"450903","name":"福绵区","cityCode":"4509","provinceCode":"45"},{"code":"450921","name":"容县","cityCode":"4509","provinceCode":"45"},{"code":"450922","name":"陆川县","cityCode":"4509","provinceCode":"45"},{"code":"450923","name":"博白县","cityCode":"4509","provinceCode":"45"},{"code":"450924","name":"兴业县","cityCode":"4509","provinceCode":"45"},{"code":"450981","name":"北流市","cityCode":"4509","provinceCode":"45"},{"code":"451002","name":"右江区","cityCode":"4510","provinceCode":"45"},{"code":"451021","name":"田阳县","cityCode":"4510","provinceCode":"45"},{"code":"451022","name":"田东县","cityCode":"4510","provinceCode":"45"},{"code":"451023","name":"平果县","cityCode":"4510","provinceCode":"45"},{"code":"451024","name":"德保县","cityCode":"4510","provinceCode":"45"},{"code":"451026","name":"那坡县","cityCode":"4510","provinceCode":"45"},{"code":"451027","name":"凌云县","cityCode":"4510","provinceCode":"45"},{"code":"451028","name":"乐业县","cityCode":"4510","provinceCode":"45"},{"code":"451029","name":"田林县","cityCode":"4510","provinceCode":"45"},{"code":"451030","name":"西林县","cityCode":"4510","provinceCode":"45"},{"code":"451031","name":"隆林各族自治县","cityCode":"4510","provinceCode":"45"},{"code":"451081","name":"靖西市","cityCode":"4510","provinceCode":"45"},{"code":"451102","name":"八步区","cityCode":"4511","provinceCode":"45"},{"code":"451103","name":"平桂区","cityCode":"4511","provinceCode":"45"},{"code":"451121","name":"昭平县","cityCode":"4511","provinceCode":"45"},{"code":"451122","name":"钟山县","cityCode":"4511","provinceCode":"45"},{"code":"451123","name":"富川瑶族自治县","cityCode":"4511","provinceCode":"45"},{"code":"451202","name":"金城江区","cityCode":"4512","provinceCode":"45"},{"code":"451221","name":"南丹县","cityCode":"4512","provinceCode":"45"},{"code":"451222","name":"天峨县","cityCode":"4512","provinceCode":"45"},{"code":"451223","name":"凤山县","cityCode":"4512","provinceCode":"45"},{"code":"451224","name":"东兰县","cityCode":"4512","provinceCode":"45"},{"code":"451225","name":"罗城仫佬族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451226","name":"环江毛南族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451227","name":"巴马瑶族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451228","name":"都安瑶族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451229","name":"大化瑶族自治县","cityCode":"4512","provinceCode":"45"},{"code":"451281","name":"宜州市","cityCode":"4512","provinceCode":"45"},{"code":"451302","name":"兴宾区","cityCode":"4513","provinceCode":"45"},{"code":"451321","name":"忻城县","cityCode":"4513","provinceCode":"45"},{"code":"451322","name":"象州县","cityCode":"4513","provinceCode":"45"},{"code":"451323","name":"武宣县","cityCode":"4513","provinceCode":"45"},{"code":"451324","name":"金秀瑶族自治县","cityCode":"4513","provinceCode":"45"},{"code":"451381","name":"合山市","cityCode":"4513","provinceCode":"45"},{"code":"451402","name":"江州区","cityCode":"4514","provinceCode":"45"},{"code":"451421","name":"扶绥县","cityCode":"4514","provinceCode":"45"},{"code":"451422","name":"宁明县","cityCode":"4514","provinceCode":"45"},{"code":"451423","name":"龙州县","cityCode":"4514","provinceCode":"45"},{"code":"451424","name":"大新县","cityCode":"4514","provinceCode":"45"},{"code":"451425","name":"天等县","cityCode":"4514","provinceCode":"45"},{"code":"451481","name":"凭祥市","cityCode":"4514","provinceCode":"45"},{"code":"460105","name":"秀英区","cityCode":"4601","provinceCode":"46"},{"code":"460106","name":"龙华区","cityCode":"4601","provinceCode":"46"},{"code":"460107","name":"琼山区","cityCode":"4601","provinceCode":"46"},{"code":"460108","name":"美兰区","cityCode":"4601","provinceCode":"46"},{"code":"460201","name":"市辖区","cityCode":"4602","provinceCode":"46"},{"code":"460202","name":"海棠区","cityCode":"4602","provinceCode":"46"},{"code":"460203","name":"吉阳区","cityCode":"4602","provinceCode":"46"},{"code":"460204","name":"天涯区","cityCode":"4602","provinceCode":"46"},{"code":"460205","name":"崖州区","cityCode":"4602","provinceCode":"46"},{"code":"460321","name":"西沙群岛","cityCode":"4603","provinceCode":"46"},{"code":"460322","name":"南沙群岛","cityCode":"4603","provinceCode":"46"},{"code":"460323","name":"中沙群岛的岛礁及其海域","cityCode":"4603","provinceCode":"46"},{"code":"460400","name":"儋州市","cityCode":"4604","provinceCode":"46"},{"code":"469001","name":"五指山市","cityCode":"4690","provinceCode":"46"},{"code":"469002","name":"琼海市","cityCode":"4690","provinceCode":"46"},{"code":"469005","name":"文昌市","cityCode":"4690","provinceCode":"46"},{"code":"469006","name":"万宁市","cityCode":"4690","provinceCode":"46"},{"code":"469007","name":"东方市","cityCode":"4690","provinceCode":"46"},{"code":"469021","name":"定安县","cityCode":"4690","provinceCode":"46"},{"code":"469022","name":"屯昌县","cityCode":"4690","provinceCode":"46"},{"code":"469023","name":"澄迈县","cityCode":"4690","provinceCode":"46"},{"code":"469024","name":"临高县","cityCode":"4690","provinceCode":"46"},{"code":"469025","name":"白沙黎族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469026","name":"昌江黎族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469027","name":"乐东黎族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469028","name":"陵水黎族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469029","name":"保亭黎族苗族自治县","cityCode":"4690","provinceCode":"46"},{"code":"469030","name":"琼中黎族苗族自治县","cityCode":"4690","provinceCode":"46"},{"code":"500101","name":"万州区","cityCode":"5001","provinceCode":"50"},{"code":"500102","name":"涪陵区","cityCode":"5001","provinceCode":"50"},{"code":"500103","name":"渝中区","cityCode":"5001","provinceCode":"50"},{"code":"500104","name":"大渡口区","cityCode":"5001","provinceCode":"50"},{"code":"500105","name":"江北区","cityCode":"5001","provinceCode":"50"},{"code":"500106","name":"沙坪坝区","cityCode":"5001","provinceCode":"50"},{"code":"500107","name":"九龙坡区","cityCode":"5001","provinceCode":"50"},{"code":"500108","name":"南岸区","cityCode":"5001","provinceCode":"50"},{"code":"500109","name":"北碚区","cityCode":"5001","provinceCode":"50"},{"code":"500110","name":"綦江区","cityCode":"5001","provinceCode":"50"},{"code":"500111","name":"大足区","cityCode":"5001","provinceCode":"50"},{"code":"500112","name":"渝北区","cityCode":"5001","provinceCode":"50"},{"code":"500113","name":"巴南区","cityCode":"5001","provinceCode":"50"},{"code":"500114","name":"黔江区","cityCode":"5001","provinceCode":"50"},{"code":"500115","name":"长寿区","cityCode":"5001","provinceCode":"50"},{"code":"500116","name":"江津区","cityCode":"5001","provinceCode":"50"},{"code":"500117","name":"合川区","cityCode":"5001","provinceCode":"50"},{"code":"500118","name":"永川区","cityCode":"5001","provinceCode":"50"},{"code":"500119","name":"南川区","cityCode":"5001","provinceCode":"50"},{"code":"500120","name":"璧山区","cityCode":"5001","provinceCode":"50"},{"code":"500151","name":"铜梁区","cityCode":"5001","provinceCode":"50"},{"code":"500152","name":"潼南区","cityCode":"5001","provinceCode":"50"},{"code":"500153","name":"荣昌区","cityCode":"5001","provinceCode":"50"},{"code":"500154","name":"开州区","cityCode":"5001","provinceCode":"50"},{"code":"500228","name":"梁平县","cityCode":"5002","provinceCode":"50"},{"code":"500229","name":"城口县","cityCode":"5002","provinceCode":"50"},{"code":"500230","name":"丰都县","cityCode":"5002","provinceCode":"50"},{"code":"500231","name":"垫江县","cityCode":"5002","provinceCode":"50"},{"code":"500232","name":"武隆县","cityCode":"5002","provinceCode":"50"},{"code":"500233","name":"忠县","cityCode":"5002","provinceCode":"50"},{"code":"500235","name":"云阳县","cityCode":"5002","provinceCode":"50"},{"code":"500236","name":"奉节县","cityCode":"5002","provinceCode":"50"},{"code":"500237","name":"巫山县","cityCode":"5002","provinceCode":"50"},{"code":"500238","name":"巫溪县","cityCode":"5002","provinceCode":"50"},{"code":"500240","name":"石柱土家族自治县","cityCode":"5002","provinceCode":"50"},{"code":"500241","name":"秀山土家族苗族自治县","cityCode":"5002","provinceCode":"50"},{"code":"500242","name":"酉阳土家族苗族自治县","cityCode":"5002","provinceCode":"50"},{"code":"500243","name":"彭水苗族土家族自治县","cityCode":"5002","provinceCode":"50"},{"code":"510104","name":"锦江区","cityCode":"5101","provinceCode":"51"},{"code":"510105","name":"青羊区","cityCode":"5101","provinceCode":"51"},{"code":"510106","name":"金牛区","cityCode":"5101","provinceCode":"51"},{"code":"510107","name":"武侯区","cityCode":"5101","provinceCode":"51"},{"code":"510108","name":"成华区","cityCode":"5101","provinceCode":"51"},{"code":"510112","name":"龙泉驿区","cityCode":"5101","provinceCode":"51"},{"code":"510113","name":"青白江区","cityCode":"5101","provinceCode":"51"},{"code":"510114","name":"新都区","cityCode":"5101","provinceCode":"51"},{"code":"510115","name":"温江区","cityCode":"5101","provinceCode":"51"},{"code":"510116","name":"双流区","cityCode":"5101","provinceCode":"51"},{"code":"510121","name":"金堂县","cityCode":"5101","provinceCode":"51"},{"code":"510124","name":"郫县","cityCode":"5101","provinceCode":"51"},{"code":"510129","name":"大邑县","cityCode":"5101","provinceCode":"51"},{"code":"510131","name":"蒲江县","cityCode":"5101","provinceCode":"51"},{"code":"510132","name":"新津县","cityCode":"5101","provinceCode":"51"},{"code":"510181","name":"都江堰市","cityCode":"5101","provinceCode":"51"},{"code":"510182","name":"彭州市","cityCode":"5101","provinceCode":"51"},{"code":"510183","name":"邛崃市","cityCode":"5101","provinceCode":"51"},{"code":"510184","name":"崇州市","cityCode":"5101","provinceCode":"51"},{"code":"510185","name":"简阳市","cityCode":"5101","provinceCode":"51"},{"code":"510302","name":"自流井区","cityCode":"5103","provinceCode":"51"},{"code":"510303","name":"贡井区","cityCode":"5103","provinceCode":"51"},{"code":"510304","name":"大安区","cityCode":"5103","provinceCode":"51"},{"code":"510311","name":"沿滩区","cityCode":"5103","provinceCode":"51"},{"code":"510321","name":"荣县","cityCode":"5103","provinceCode":"51"},{"code":"510322","name":"富顺县","cityCode":"5103","provinceCode":"51"},{"code":"510402","name":"东区","cityCode":"5104","provinceCode":"51"},{"code":"510403","name":"西区","cityCode":"5104","provinceCode":"51"},{"code":"510411","name":"仁和区","cityCode":"5104","provinceCode":"51"},{"code":"510421","name":"米易县","cityCode":"5104","provinceCode":"51"},{"code":"510422","name":"盐边县","cityCode":"5104","provinceCode":"51"},{"code":"510502","name":"江阳区","cityCode":"5105","provinceCode":"51"},{"code":"510503","name":"纳溪区","cityCode":"5105","provinceCode":"51"},{"code":"510504","name":"龙马潭区","cityCode":"5105","provinceCode":"51"},{"code":"510521","name":"泸县","cityCode":"5105","provinceCode":"51"},{"code":"510522","name":"合江县","cityCode":"5105","provinceCode":"51"},{"code":"510524","name":"叙永县","cityCode":"5105","provinceCode":"51"},{"code":"510525","name":"古蔺县","cityCode":"5105","provinceCode":"51"},{"code":"510603","name":"旌阳区","cityCode":"5106","provinceCode":"51"},{"code":"510623","name":"中江县","cityCode":"5106","provinceCode":"51"},{"code":"510626","name":"罗江县","cityCode":"5106","provinceCode":"51"},{"code":"510681","name":"广汉市","cityCode":"5106","provinceCode":"51"},{"code":"510682","name":"什邡市","cityCode":"5106","provinceCode":"51"},{"code":"510683","name":"绵竹市","cityCode":"5106","provinceCode":"51"},{"code":"510703","name":"涪城区","cityCode":"5107","provinceCode":"51"},{"code":"510704","name":"游仙区","cityCode":"5107","provinceCode":"51"},{"code":"510705","name":"安州区","cityCode":"5107","provinceCode":"51"},{"code":"510722","name":"三台县","cityCode":"5107","provinceCode":"51"},{"code":"510723","name":"盐亭县","cityCode":"5107","provinceCode":"51"},{"code":"510725","name":"梓潼县","cityCode":"5107","provinceCode":"51"},{"code":"510726","name":"北川羌族自治县","cityCode":"5107","provinceCode":"51"},{"code":"510727","name":"平武县","cityCode":"5107","provinceCode":"51"},{"code":"510781","name":"江油市","cityCode":"5107","provinceCode":"51"},{"code":"510802","name":"利州区","cityCode":"5108","provinceCode":"51"},{"code":"510811","name":"昭化区","cityCode":"5108","provinceCode":"51"},{"code":"510812","name":"朝天区","cityCode":"5108","provinceCode":"51"},{"code":"510821","name":"旺苍县","cityCode":"5108","provinceCode":"51"},{"code":"510822","name":"青川县","cityCode":"5108","provinceCode":"51"},{"code":"510823","name":"剑阁县","cityCode":"5108","provinceCode":"51"},{"code":"510824","name":"苍溪县","cityCode":"5108","provinceCode":"51"},{"code":"510903","name":"船山区","cityCode":"5109","provinceCode":"51"},{"code":"510904","name":"安居区","cityCode":"5109","provinceCode":"51"},{"code":"510921","name":"蓬溪县","cityCode":"5109","provinceCode":"51"},{"code":"510922","name":"射洪县","cityCode":"5109","provinceCode":"51"},{"code":"510923","name":"大英县","cityCode":"5109","provinceCode":"51"},{"code":"511002","name":"市中区","cityCode":"5110","provinceCode":"51"},{"code":"511011","name":"东兴区","cityCode":"5110","provinceCode":"51"},{"code":"511024","name":"威远县","cityCode":"5110","provinceCode":"51"},{"code":"511025","name":"资中县","cityCode":"5110","provinceCode":"51"},{"code":"511028","name":"隆昌县","cityCode":"5110","provinceCode":"51"},{"code":"511102","name":"市中区","cityCode":"5111","provinceCode":"51"},{"code":"511111","name":"沙湾区","cityCode":"5111","provinceCode":"51"},{"code":"511112","name":"五通桥区","cityCode":"5111","provinceCode":"51"},{"code":"511113","name":"金口河区","cityCode":"5111","provinceCode":"51"},{"code":"511123","name":"犍为县","cityCode":"5111","provinceCode":"51"},{"code":"511124","name":"井研县","cityCode":"5111","provinceCode":"51"},{"code":"511126","name":"夹江县","cityCode":"5111","provinceCode":"51"},{"code":"511129","name":"沐川县","cityCode":"5111","provinceCode":"51"},{"code":"511132","name":"峨边彝族自治县","cityCode":"5111","provinceCode":"51"},{"code":"511133","name":"马边彝族自治县","cityCode":"5111","provinceCode":"51"},{"code":"511181","name":"峨眉山市","cityCode":"5111","provinceCode":"51"},{"code":"511302","name":"顺庆区","cityCode":"5113","provinceCode":"51"},{"code":"511303","name":"高坪区","cityCode":"5113","provinceCode":"51"},{"code":"511304","name":"嘉陵区","cityCode":"5113","provinceCode":"51"},{"code":"511321","name":"南部县","cityCode":"5113","provinceCode":"51"},{"code":"511322","name":"营山县","cityCode":"5113","provinceCode":"51"},{"code":"511323","name":"蓬安县","cityCode":"5113","provinceCode":"51"},{"code":"511324","name":"仪陇县","cityCode":"5113","provinceCode":"51"},{"code":"511325","name":"西充县","cityCode":"5113","provinceCode":"51"},{"code":"511381","name":"阆中市","cityCode":"5113","provinceCode":"51"},{"code":"511402","name":"东坡区","cityCode":"5114","provinceCode":"51"},{"code":"511403","name":"彭山区","cityCode":"5114","provinceCode":"51"},{"code":"511421","name":"仁寿县","cityCode":"5114","provinceCode":"51"},{"code":"511423","name":"洪雅县","cityCode":"5114","provinceCode":"51"},{"code":"511424","name":"丹棱县","cityCode":"5114","provinceCode":"51"},{"code":"511425","name":"青神县","cityCode":"5114","provinceCode":"51"},{"code":"511502","name":"翠屏区","cityCode":"5115","provinceCode":"51"},{"code":"511503","name":"南溪区","cityCode":"5115","provinceCode":"51"},{"code":"511521","name":"宜宾县","cityCode":"5115","provinceCode":"51"},{"code":"511523","name":"江安县","cityCode":"5115","provinceCode":"51"},{"code":"511524","name":"长宁县","cityCode":"5115","provinceCode":"51"},{"code":"511525","name":"高县","cityCode":"5115","provinceCode":"51"},{"code":"511526","name":"珙县","cityCode":"5115","provinceCode":"51"},{"code":"511527","name":"筠连县","cityCode":"5115","provinceCode":"51"},{"code":"511528","name":"兴文县","cityCode":"5115","provinceCode":"51"},{"code":"511529","name":"屏山县","cityCode":"5115","provinceCode":"51"},{"code":"511602","name":"广安区","cityCode":"5116","provinceCode":"51"},{"code":"511603","name":"前锋区","cityCode":"5116","provinceCode":"51"},{"code":"511621","name":"岳池县","cityCode":"5116","provinceCode":"51"},{"code":"511622","name":"武胜县","cityCode":"5116","provinceCode":"51"},{"code":"511623","name":"邻水县","cityCode":"5116","provinceCode":"51"},{"code":"511681","name":"华蓥市","cityCode":"5116","provinceCode":"51"},{"code":"511702","name":"通川区","cityCode":"5117","provinceCode":"51"},{"code":"511703","name":"达川区","cityCode":"5117","provinceCode":"51"},{"code":"511722","name":"宣汉县","cityCode":"5117","provinceCode":"51"},{"code":"511723","name":"开江县","cityCode":"5117","provinceCode":"51"},{"code":"511724","name":"大竹县","cityCode":"5117","provinceCode":"51"},{"code":"511725","name":"渠县","cityCode":"5117","provinceCode":"51"},{"code":"511781","name":"万源市","cityCode":"5117","provinceCode":"51"},{"code":"511802","name":"雨城区","cityCode":"5118","provinceCode":"51"},{"code":"511803","name":"名山区","cityCode":"5118","provinceCode":"51"},{"code":"511822","name":"荥经县","cityCode":"5118","provinceCode":"51"},{"code":"511823","name":"汉源县","cityCode":"5118","provinceCode":"51"},{"code":"511824","name":"石棉县","cityCode":"5118","provinceCode":"51"},{"code":"511825","name":"天全县","cityCode":"5118","provinceCode":"51"},{"code":"511826","name":"芦山县","cityCode":"5118","provinceCode":"51"},{"code":"511827","name":"宝兴县","cityCode":"5118","provinceCode":"51"},{"code":"511902","name":"巴州区","cityCode":"5119","provinceCode":"51"},{"code":"511903","name":"恩阳区","cityCode":"5119","provinceCode":"51"},{"code":"511921","name":"通江县","cityCode":"5119","provinceCode":"51"},{"code":"511922","name":"南江县","cityCode":"5119","provinceCode":"51"},{"code":"511923","name":"平昌县","cityCode":"5119","provinceCode":"51"},{"code":"512002","name":"雁江区","cityCode":"5120","provinceCode":"51"},{"code":"512021","name":"安岳县","cityCode":"5120","provinceCode":"51"},{"code":"512022","name":"乐至县","cityCode":"5120","provinceCode":"51"},{"code":"513201","name":"马尔康市","cityCode":"5132","provinceCode":"51"},{"code":"513221","name":"汶川县","cityCode":"5132","provinceCode":"51"},{"code":"513222","name":"理县","cityCode":"5132","provinceCode":"51"},{"code":"513223","name":"茂县","cityCode":"5132","provinceCode":"51"},{"code":"513224","name":"松潘县","cityCode":"5132","provinceCode":"51"},{"code":"513225","name":"九寨沟县","cityCode":"5132","provinceCode":"51"},{"code":"513226","name":"金川县","cityCode":"5132","provinceCode":"51"},{"code":"513227","name":"小金县","cityCode":"5132","provinceCode":"51"},{"code":"513228","name":"黑水县","cityCode":"5132","provinceCode":"51"},{"code":"513230","name":"壤塘县","cityCode":"5132","provinceCode":"51"},{"code":"513231","name":"阿坝县","cityCode":"5132","provinceCode":"51"},{"code":"513232","name":"若尔盖县","cityCode":"5132","provinceCode":"51"},{"code":"513233","name":"红原县","cityCode":"5132","provinceCode":"51"},{"code":"513301","name":"康定市","cityCode":"5133","provinceCode":"51"},{"code":"513322","name":"泸定县","cityCode":"5133","provinceCode":"51"},{"code":"513323","name":"丹巴县","cityCode":"5133","provinceCode":"51"},{"code":"513324","name":"九龙县","cityCode":"5133","provinceCode":"51"},{"code":"513325","name":"雅江县","cityCode":"5133","provinceCode":"51"},{"code":"513326","name":"道孚县","cityCode":"5133","provinceCode":"51"},{"code":"513327","name":"炉霍县","cityCode":"5133","provinceCode":"51"},{"code":"513328","name":"甘孜县","cityCode":"5133","provinceCode":"51"},{"code":"513329","name":"新龙县","cityCode":"5133","provinceCode":"51"},{"code":"513330","name":"德格县","cityCode":"5133","provinceCode":"51"},{"code":"513331","name":"白玉县","cityCode":"5133","provinceCode":"51"},{"code":"513332","name":"石渠县","cityCode":"5133","provinceCode":"51"},{"code":"513333","name":"色达县","cityCode":"5133","provinceCode":"51"},{"code":"513334","name":"理塘县","cityCode":"5133","provinceCode":"51"},{"code":"513335","name":"巴塘县","cityCode":"5133","provinceCode":"51"},{"code":"513336","name":"乡城县","cityCode":"5133","provinceCode":"51"},{"code":"513337","name":"稻城县","cityCode":"5133","provinceCode":"51"},{"code":"513338","name":"得荣县","cityCode":"5133","provinceCode":"51"},{"code":"513401","name":"西昌市","cityCode":"5134","provinceCode":"51"},{"code":"513422","name":"木里藏族自治县","cityCode":"5134","provinceCode":"51"},{"code":"513423","name":"盐源县","cityCode":"5134","provinceCode":"51"},{"code":"513424","name":"德昌县","cityCode":"5134","provinceCode":"51"},{"code":"513425","name":"会理县","cityCode":"5134","provinceCode":"51"},{"code":"513426","name":"会东县","cityCode":"5134","provinceCode":"51"},{"code":"513427","name":"宁南县","cityCode":"5134","provinceCode":"51"},{"code":"513428","name":"普格县","cityCode":"5134","provinceCode":"51"},{"code":"513429","name":"布拖县","cityCode":"5134","provinceCode":"51"},{"code":"513430","name":"金阳县","cityCode":"5134","provinceCode":"51"},{"code":"513431","name":"昭觉县","cityCode":"5134","provinceCode":"51"},{"code":"513432","name":"喜德县","cityCode":"5134","provinceCode":"51"},{"code":"513433","name":"冕宁县","cityCode":"5134","provinceCode":"51"},{"code":"513434","name":"越西县","cityCode":"5134","provinceCode":"51"},{"code":"513435","name":"甘洛县","cityCode":"5134","provinceCode":"51"},{"code":"513436","name":"美姑县","cityCode":"5134","provinceCode":"51"},{"code":"513437","name":"雷波县","cityCode":"5134","provinceCode":"51"},{"code":"520102","name":"南明区","cityCode":"5201","provinceCode":"52"},{"code":"520103","name":"云岩区","cityCode":"5201","provinceCode":"52"},{"code":"520111","name":"花溪区","cityCode":"5201","provinceCode":"52"},{"code":"520112","name":"乌当区","cityCode":"5201","provinceCode":"52"},{"code":"520113","name":"白云区","cityCode":"5201","provinceCode":"52"},{"code":"520115","name":"观山湖区","cityCode":"5201","provinceCode":"52"},{"code":"520121","name":"开阳县","cityCode":"5201","provinceCode":"52"},{"code":"520122","name":"息烽县","cityCode":"5201","provinceCode":"52"},{"code":"520123","name":"修文县","cityCode":"5201","provinceCode":"52"},{"code":"520181","name":"清镇市","cityCode":"5201","provinceCode":"52"},{"code":"520201","name":"钟山区","cityCode":"5202","provinceCode":"52"},{"code":"520203","name":"六枝特区","cityCode":"5202","provinceCode":"52"},{"code":"520221","name":"水城县","cityCode":"5202","provinceCode":"52"},{"code":"520222","name":"盘县","cityCode":"5202","provinceCode":"52"},{"code":"520302","name":"红花岗区","cityCode":"5203","provinceCode":"52"},{"code":"520303","name":"汇川区","cityCode":"5203","provinceCode":"52"},{"code":"520304","name":"播州区","cityCode":"5203","provinceCode":"52"},{"code":"520322","name":"桐梓县","cityCode":"5203","provinceCode":"52"},{"code":"520323","name":"绥阳县","cityCode":"5203","provinceCode":"52"},{"code":"520324","name":"正安县","cityCode":"5203","provinceCode":"52"},{"code":"520325","name":"道真仡佬族苗族自治县","cityCode":"5203","provinceCode":"52"},{"code":"520326","name":"务川仡佬族苗族自治县","cityCode":"5203","provinceCode":"52"},{"code":"520327","name":"凤冈县","cityCode":"5203","provinceCode":"52"},{"code":"520328","name":"湄潭县","cityCode":"5203","provinceCode":"52"},{"code":"520329","name":"余庆县","cityCode":"5203","provinceCode":"52"},{"code":"520330","name":"习水县","cityCode":"5203","provinceCode":"52"},{"code":"520381","name":"赤水市","cityCode":"5203","provinceCode":"52"},{"code":"520382","name":"仁怀市","cityCode":"5203","provinceCode":"52"},{"code":"520402","name":"西秀区","cityCode":"5204","provinceCode":"52"},{"code":"520403","name":"平坝区","cityCode":"5204","provinceCode":"52"},{"code":"520422","name":"普定县","cityCode":"5204","provinceCode":"52"},{"code":"520423","name":"镇宁布依族苗族自治县","cityCode":"5204","provinceCode":"52"},{"code":"520424","name":"关岭布依族苗族自治县","cityCode":"5204","provinceCode":"52"},{"code":"520425","name":"紫云苗族布依族自治县","cityCode":"5204","provinceCode":"52"},{"code":"520502","name":"七星关区","cityCode":"5205","provinceCode":"52"},{"code":"520521","name":"大方县","cityCode":"5205","provinceCode":"52"},{"code":"520522","name":"黔西县","cityCode":"5205","provinceCode":"52"},{"code":"520523","name":"金沙县","cityCode":"5205","provinceCode":"52"},{"code":"520524","name":"织金县","cityCode":"5205","provinceCode":"52"},{"code":"520525","name":"纳雍县","cityCode":"5205","provinceCode":"52"},{"code":"520526","name":"威宁彝族回族苗族自治县","cityCode":"5205","provinceCode":"52"},{"code":"520527","name":"赫章县","cityCode":"5205","provinceCode":"52"},{"code":"520602","name":"碧江区","cityCode":"5206","provinceCode":"52"},{"code":"520603","name":"万山区","cityCode":"5206","provinceCode":"52"},{"code":"520621","name":"江口县","cityCode":"5206","provinceCode":"52"},{"code":"520622","name":"玉屏侗族自治县","cityCode":"5206","provinceCode":"52"},{"code":"520623","name":"石阡县","cityCode":"5206","provinceCode":"52"},{"code":"520624","name":"思南县","cityCode":"5206","provinceCode":"52"},{"code":"520625","name":"印江土家族苗族自治县","cityCode":"5206","provinceCode":"52"},{"code":"520626","name":"德江县","cityCode":"5206","provinceCode":"52"},{"code":"520627","name":"沿河土家族自治县","cityCode":"5206","provinceCode":"52"},{"code":"520628","name":"松桃苗族自治县","cityCode":"5206","provinceCode":"52"},{"code":"522301","name":"兴义市","cityCode":"5223","provinceCode":"52"},{"code":"522322","name":"兴仁县","cityCode":"5223","provinceCode":"52"},{"code":"522323","name":"普安县","cityCode":"5223","provinceCode":"52"},{"code":"522324","name":"晴隆县","cityCode":"5223","provinceCode":"52"},{"code":"522325","name":"贞丰县","cityCode":"5223","provinceCode":"52"},{"code":"522326","name":"望谟县","cityCode":"5223","provinceCode":"52"},{"code":"522327","name":"册亨县","cityCode":"5223","provinceCode":"52"},{"code":"522328","name":"安龙县","cityCode":"5223","provinceCode":"52"},{"code":"522601","name":"凯里市","cityCode":"5226","provinceCode":"52"},{"code":"522622","name":"黄平县","cityCode":"5226","provinceCode":"52"},{"code":"522623","name":"施秉县","cityCode":"5226","provinceCode":"52"},{"code":"522624","name":"三穗县","cityCode":"5226","provinceCode":"52"},{"code":"522625","name":"镇远县","cityCode":"5226","provinceCode":"52"},{"code":"522626","name":"岑巩县","cityCode":"5226","provinceCode":"52"},{"code":"522627","name":"天柱县","cityCode":"5226","provinceCode":"52"},{"code":"522628","name":"锦屏县","cityCode":"5226","provinceCode":"52"},{"code":"522629","name":"剑河县","cityCode":"5226","provinceCode":"52"},{"code":"522630","name":"台江县","cityCode":"5226","provinceCode":"52"},{"code":"522631","name":"黎平县","cityCode":"5226","provinceCode":"52"},{"code":"522632","name":"榕江县","cityCode":"5226","provinceCode":"52"},{"code":"522633","name":"从江县","cityCode":"5226","provinceCode":"52"},{"code":"522634","name":"雷山县","cityCode":"5226","provinceCode":"52"},{"code":"522635","name":"麻江县","cityCode":"5226","provinceCode":"52"},{"code":"522636","name":"丹寨县","cityCode":"5226","provinceCode":"52"},{"code":"522701","name":"都匀市","cityCode":"5227","provinceCode":"52"},{"code":"522702","name":"福泉市","cityCode":"5227","provinceCode":"52"},{"code":"522722","name":"荔波县","cityCode":"5227","provinceCode":"52"},{"code":"522723","name":"贵定县","cityCode":"5227","provinceCode":"52"},{"code":"522725","name":"瓮安县","cityCode":"5227","provinceCode":"52"},{"code":"522726","name":"独山县","cityCode":"5227","provinceCode":"52"},{"code":"522727","name":"平塘县","cityCode":"5227","provinceCode":"52"},{"code":"522728","name":"罗甸县","cityCode":"5227","provinceCode":"52"},{"code":"522729","name":"长顺县","cityCode":"5227","provinceCode":"52"},{"code":"522730","name":"龙里县","cityCode":"5227","provinceCode":"52"},{"code":"522731","name":"惠水县","cityCode":"5227","provinceCode":"52"},{"code":"522732","name":"三都水族自治县","cityCode":"5227","provinceCode":"52"},{"code":"530102","name":"五华区","cityCode":"5301","provinceCode":"53"},{"code":"530103","name":"盘龙区","cityCode":"5301","provinceCode":"53"},{"code":"530111","name":"官渡区","cityCode":"5301","provinceCode":"53"},{"code":"530112","name":"西山区","cityCode":"5301","provinceCode":"53"},{"code":"530113","name":"东川区","cityCode":"5301","provinceCode":"53"},{"code":"530114","name":"呈贡区","cityCode":"5301","provinceCode":"53"},{"code":"530122","name":"晋宁县","cityCode":"5301","provinceCode":"53"},{"code":"530124","name":"富民县","cityCode":"5301","provinceCode":"53"},{"code":"530125","name":"宜良县","cityCode":"5301","provinceCode":"53"},{"code":"530126","name":"石林彝族自治县","cityCode":"5301","provinceCode":"53"},{"code":"530127","name":"嵩明县","cityCode":"5301","provinceCode":"53"},{"code":"530128","name":"禄劝彝族苗族自治县","cityCode":"5301","provinceCode":"53"},{"code":"530129","name":"寻甸回族彝族自治县","cityCode":"5301","provinceCode":"53"},{"code":"530181","name":"安宁市","cityCode":"5301","provinceCode":"53"},{"code":"530302","name":"麒麟区","cityCode":"5303","provinceCode":"53"},{"code":"530303","name":"沾益区","cityCode":"5303","provinceCode":"53"},{"code":"530321","name":"马龙县","cityCode":"5303","provinceCode":"53"},{"code":"530322","name":"陆良县","cityCode":"5303","provinceCode":"53"},{"code":"530323","name":"师宗县","cityCode":"5303","provinceCode":"53"},{"code":"530324","name":"罗平县","cityCode":"5303","provinceCode":"53"},{"code":"530325","name":"富源县","cityCode":"5303","provinceCode":"53"},{"code":"530326","name":"会泽县","cityCode":"5303","provinceCode":"53"},{"code":"530381","name":"宣威市","cityCode":"5303","provinceCode":"53"},{"code":"530402","name":"红塔区","cityCode":"5304","provinceCode":"53"},{"code":"530403","name":"江川区","cityCode":"5304","provinceCode":"53"},{"code":"530422","name":"澄江县","cityCode":"5304","provinceCode":"53"},{"code":"530423","name":"通海县","cityCode":"5304","provinceCode":"53"},{"code":"530424","name":"华宁县","cityCode":"5304","provinceCode":"53"},{"code":"530425","name":"易门县","cityCode":"5304","provinceCode":"53"},{"code":"530426","name":"峨山彝族自治县","cityCode":"5304","provinceCode":"53"},{"code":"530427","name":"新平彝族傣族自治县","cityCode":"5304","provinceCode":"53"},{"code":"530428","name":"元江哈尼族彝族傣族自治县","cityCode":"5304","provinceCode":"53"},{"code":"530502","name":"隆阳区","cityCode":"5305","provinceCode":"53"},{"code":"530521","name":"施甸县","cityCode":"5305","provinceCode":"53"},{"code":"530523","name":"龙陵县","cityCode":"5305","provinceCode":"53"},{"code":"530524","name":"昌宁县","cityCode":"5305","provinceCode":"53"},{"code":"530581","name":"腾冲市","cityCode":"5305","provinceCode":"53"},{"code":"530602","name":"昭阳区","cityCode":"5306","provinceCode":"53"},{"code":"530621","name":"鲁甸县","cityCode":"5306","provinceCode":"53"},{"code":"530622","name":"巧家县","cityCode":"5306","provinceCode":"53"},{"code":"530623","name":"盐津县","cityCode":"5306","provinceCode":"53"},{"code":"530624","name":"大关县","cityCode":"5306","provinceCode":"53"},{"code":"530625","name":"永善县","cityCode":"5306","provinceCode":"53"},{"code":"530626","name":"绥江县","cityCode":"5306","provinceCode":"53"},{"code":"530627","name":"镇雄县","cityCode":"5306","provinceCode":"53"},{"code":"530628","name":"彝良县","cityCode":"5306","provinceCode":"53"},{"code":"530629","name":"威信县","cityCode":"5306","provinceCode":"53"},{"code":"530630","name":"水富县","cityCode":"5306","provinceCode":"53"},{"code":"530702","name":"古城区","cityCode":"5307","provinceCode":"53"},{"code":"530721","name":"玉龙纳西族自治县","cityCode":"5307","provinceCode":"53"},{"code":"530722","name":"永胜县","cityCode":"5307","provinceCode":"53"},{"code":"530723","name":"华坪县","cityCode":"5307","provinceCode":"53"},{"code":"530724","name":"宁蒗彝族自治县","cityCode":"5307","provinceCode":"53"},{"code":"530802","name":"思茅区","cityCode":"5308","provinceCode":"53"},{"code":"530821","name":"宁洱哈尼族彝族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530822","name":"墨江哈尼族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530823","name":"景东彝族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530824","name":"景谷傣族彝族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530825","name":"镇沅彝族哈尼族拉祜族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530826","name":"江城哈尼族彝族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530827","name":"孟连傣族拉祜族佤族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530828","name":"澜沧拉祜族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530829","name":"西盟佤族自治县","cityCode":"5308","provinceCode":"53"},{"code":"530902","name":"临翔区","cityCode":"5309","provinceCode":"53"},{"code":"530921","name":"凤庆县","cityCode":"5309","provinceCode":"53"},{"code":"530922","name":"云县","cityCode":"5309","provinceCode":"53"},{"code":"530923","name":"永德县","cityCode":"5309","provinceCode":"53"},{"code":"530924","name":"镇康县","cityCode":"5309","provinceCode":"53"},{"code":"530925","name":"双江拉祜族佤族布朗族傣族自治县","cityCode":"5309","provinceCode":"53"},{"code":"530926","name":"耿马傣族佤族自治县","cityCode":"5309","provinceCode":"53"},{"code":"530927","name":"沧源佤族自治县","cityCode":"5309","provinceCode":"53"},{"code":"532301","name":"楚雄市","cityCode":"5323","provinceCode":"53"},{"code":"532322","name":"双柏县","cityCode":"5323","provinceCode":"53"},{"code":"532323","name":"牟定县","cityCode":"5323","provinceCode":"53"},{"code":"532324","name":"南华县","cityCode":"5323","provinceCode":"53"},{"code":"532325","name":"姚安县","cityCode":"5323","provinceCode":"53"},{"code":"532326","name":"大姚县","cityCode":"5323","provinceCode":"53"},{"code":"532327","name":"永仁县","cityCode":"5323","provinceCode":"53"},{"code":"532328","name":"元谋县","cityCode":"5323","provinceCode":"53"},{"code":"532329","name":"武定县","cityCode":"5323","provinceCode":"53"},{"code":"532331","name":"禄丰县","cityCode":"5323","provinceCode":"53"},{"code":"532501","name":"个旧市","cityCode":"5325","provinceCode":"53"},{"code":"532502","name":"开远市","cityCode":"5325","provinceCode":"53"},{"code":"532503","name":"蒙自市","cityCode":"5325","provinceCode":"53"},{"code":"532504","name":"弥勒市","cityCode":"5325","provinceCode":"53"},{"code":"532523","name":"屏边苗族自治县","cityCode":"5325","provinceCode":"53"},{"code":"532524","name":"建水县","cityCode":"5325","provinceCode":"53"},{"code":"532525","name":"石屏县","cityCode":"5325","provinceCode":"53"},{"code":"532527","name":"泸西县","cityCode":"5325","provinceCode":"53"},{"code":"532528","name":"元阳县","cityCode":"5325","provinceCode":"53"},{"code":"532529","name":"红河县","cityCode":"5325","provinceCode":"53"},{"code":"532530","name":"金平苗族瑶族傣族自治县","cityCode":"5325","provinceCode":"53"},{"code":"532531","name":"绿春县","cityCode":"5325","provinceCode":"53"},{"code":"532532","name":"河口瑶族自治县","cityCode":"5325","provinceCode":"53"},{"code":"532601","name":"文山市","cityCode":"5326","provinceCode":"53"},{"code":"532622","name":"砚山县","cityCode":"5326","provinceCode":"53"},{"code":"532623","name":"西畴县","cityCode":"5326","provinceCode":"53"},{"code":"532624","name":"麻栗坡县","cityCode":"5326","provinceCode":"53"},{"code":"532625","name":"马关县","cityCode":"5326","provinceCode":"53"},{"code":"532626","name":"丘北县","cityCode":"5326","provinceCode":"53"},{"code":"532627","name":"广南县","cityCode":"5326","provinceCode":"53"},{"code":"532628","name":"富宁县","cityCode":"5326","provinceCode":"53"},{"code":"532801","name":"景洪市","cityCode":"5328","provinceCode":"53"},{"code":"532822","name":"勐海县","cityCode":"5328","provinceCode":"53"},{"code":"532823","name":"勐腊县","cityCode":"5328","provinceCode":"53"},{"code":"532901","name":"大理市","cityCode":"5329","provinceCode":"53"},{"code":"532922","name":"漾濞彝族自治县","cityCode":"5329","provinceCode":"53"},{"code":"532923","name":"祥云县","cityCode":"5329","provinceCode":"53"},{"code":"532924","name":"宾川县","cityCode":"5329","provinceCode":"53"},{"code":"532925","name":"弥渡县","cityCode":"5329","provinceCode":"53"},{"code":"532926","name":"南涧彝族自治县","cityCode":"5329","provinceCode":"53"},{"code":"532927","name":"巍山彝族回族自治县","cityCode":"5329","provinceCode":"53"},{"code":"532928","name":"永平县","cityCode":"5329","provinceCode":"53"},{"code":"532929","name":"云龙县","cityCode":"5329","provinceCode":"53"},{"code":"532930","name":"洱源县","cityCode":"5329","provinceCode":"53"},{"code":"532931","name":"剑川县","cityCode":"5329","provinceCode":"53"},{"code":"532932","name":"鹤庆县","cityCode":"5329","provinceCode":"53"},{"code":"533102","name":"瑞丽市","cityCode":"5331","provinceCode":"53"},{"code":"533103","name":"芒市","cityCode":"5331","provinceCode":"53"},{"code":"533122","name":"梁河县","cityCode":"5331","provinceCode":"53"},{"code":"533123","name":"盈江县","cityCode":"5331","provinceCode":"53"},{"code":"533124","name":"陇川县","cityCode":"5331","provinceCode":"53"},{"code":"533301","name":"泸水市","cityCode":"5333","provinceCode":"53"},{"code":"533323","name":"福贡县","cityCode":"5333","provinceCode":"53"},{"code":"533324","name":"贡山独龙族怒族自治县","cityCode":"5333","provinceCode":"53"},{"code":"533325","name":"兰坪白族普米族自治县","cityCode":"5333","provinceCode":"53"},{"code":"533401","name":"香格里拉市","cityCode":"5334","provinceCode":"53"},{"code":"533422","name":"德钦县","cityCode":"5334","provinceCode":"53"},{"code":"533423","name":"维西傈僳族自治县","cityCode":"5334","provinceCode":"53"},{"code":"540102","name":"城关区","cityCode":"5401","provinceCode":"54"},{"code":"540103","name":"堆龙德庆区","cityCode":"5401","provinceCode":"54"},{"code":"540121","name":"林周县","cityCode":"5401","provinceCode":"54"},{"code":"540122","name":"当雄县","cityCode":"5401","provinceCode":"54"},{"code":"540123","name":"尼木县","cityCode":"5401","provinceCode":"54"},{"code":"540124","name":"曲水县","cityCode":"5401","provinceCode":"54"},{"code":"540126","name":"达孜县","cityCode":"5401","provinceCode":"54"},{"code":"540127","name":"墨竹工卡县","cityCode":"5401","provinceCode":"54"},{"code":"540202","name":"桑珠孜区","cityCode":"5402","provinceCode":"54"},{"code":"540221","name":"南木林县","cityCode":"5402","provinceCode":"54"},{"code":"540222","name":"江孜县","cityCode":"5402","provinceCode":"54"},{"code":"540223","name":"定日县","cityCode":"5402","provinceCode":"54"},{"code":"540224","name":"萨迦县","cityCode":"5402","provinceCode":"54"},{"code":"540225","name":"拉孜县","cityCode":"5402","provinceCode":"54"},{"code":"540226","name":"昂仁县","cityCode":"5402","provinceCode":"54"},{"code":"540227","name":"谢通门县","cityCode":"5402","provinceCode":"54"},{"code":"540228","name":"白朗县","cityCode":"5402","provinceCode":"54"},{"code":"540229","name":"仁布县","cityCode":"5402","provinceCode":"54"},{"code":"540230","name":"康马县","cityCode":"5402","provinceCode":"54"},{"code":"540231","name":"定结县","cityCode":"5402","provinceCode":"54"},{"code":"540232","name":"仲巴县","cityCode":"5402","provinceCode":"54"},{"code":"540233","name":"亚东县","cityCode":"5402","provinceCode":"54"},{"code":"540234","name":"吉隆县","cityCode":"5402","provinceCode":"54"},{"code":"540235","name":"聂拉木县","cityCode":"5402","provinceCode":"54"},{"code":"540236","name":"萨嘎县","cityCode":"5402","provinceCode":"54"},{"code":"540237","name":"岗巴县","cityCode":"5402","provinceCode":"54"},{"code":"540302","name":"卡若区","cityCode":"5403","provinceCode":"54"},{"code":"540321","name":"江达县","cityCode":"5403","provinceCode":"54"},{"code":"540322","name":"贡觉县","cityCode":"5403","provinceCode":"54"},{"code":"540323","name":"类乌齐县","cityCode":"5403","provinceCode":"54"},{"code":"540324","name":"丁青县","cityCode":"5403","provinceCode":"54"},{"code":"540325","name":"察雅县","cityCode":"5403","provinceCode":"54"},{"code":"540326","name":"八宿县","cityCode":"5403","provinceCode":"54"},{"code":"540327","name":"左贡县","cityCode":"5403","provinceCode":"54"},{"code":"540328","name":"芒康县","cityCode":"5403","provinceCode":"54"},{"code":"540329","name":"洛隆县","cityCode":"5403","provinceCode":"54"},{"code":"540330","name":"边坝县","cityCode":"5403","provinceCode":"54"},{"code":"540402","name":"巴宜区","cityCode":"5404","provinceCode":"54"},{"code":"540421","name":"工布江达县","cityCode":"5404","provinceCode":"54"},{"code":"540422","name":"米林县","cityCode":"5404","provinceCode":"54"},{"code":"540423","name":"墨脱县","cityCode":"5404","provinceCode":"54"},{"code":"540424","name":"波密县","cityCode":"5404","provinceCode":"54"},{"code":"540425","name":"察隅县","cityCode":"5404","provinceCode":"54"},{"code":"540426","name":"朗县","cityCode":"5404","provinceCode":"54"},{"code":"540502","name":"乃东区","cityCode":"5405","provinceCode":"54"},{"code":"540521","name":"扎囊县","cityCode":"5405","provinceCode":"54"},{"code":"540522","name":"贡嘎县","cityCode":"5405","provinceCode":"54"},{"code":"540523","name":"桑日县","cityCode":"5405","provinceCode":"54"},{"code":"540524","name":"琼结县","cityCode":"5405","provinceCode":"54"},{"code":"540525","name":"曲松县","cityCode":"5405","provinceCode":"54"},{"code":"540526","name":"措美县","cityCode":"5405","provinceCode":"54"},{"code":"540527","name":"洛扎县","cityCode":"5405","provinceCode":"54"},{"code":"540528","name":"加查县","cityCode":"5405","provinceCode":"54"},{"code":"540529","name":"隆子县","cityCode":"5405","provinceCode":"54"},{"code":"540530","name":"错那县","cityCode":"5405","provinceCode":"54"},{"code":"540531","name":"浪卡子县","cityCode":"5405","provinceCode":"54"},{"code":"542421","name":"那曲县","cityCode":"5424","provinceCode":"54"},{"code":"542422","name":"嘉黎县","cityCode":"5424","provinceCode":"54"},{"code":"542423","name":"比如县","cityCode":"5424","provinceCode":"54"},{"code":"542424","name":"聂荣县","cityCode":"5424","provinceCode":"54"},{"code":"542425","name":"安多县","cityCode":"5424","provinceCode":"54"},{"code":"542426","name":"申扎县","cityCode":"5424","provinceCode":"54"},{"code":"542427","name":"索县","cityCode":"5424","provinceCode":"54"},{"code":"542428","name":"班戈县","cityCode":"5424","provinceCode":"54"},{"code":"542429","name":"巴青县","cityCode":"5424","provinceCode":"54"},{"code":"542430","name":"尼玛县","cityCode":"5424","provinceCode":"54"},{"code":"542431","name":"双湖县","cityCode":"5424","provinceCode":"54"},{"code":"542521","name":"普兰县","cityCode":"5425","provinceCode":"54"},{"code":"542522","name":"札达县","cityCode":"5425","provinceCode":"54"},{"code":"542523","name":"噶尔县","cityCode":"5425","provinceCode":"54"},{"code":"542524","name":"日土县","cityCode":"5425","provinceCode":"54"},{"code":"542525","name":"革吉县","cityCode":"5425","provinceCode":"54"},{"code":"542526","name":"改则县","cityCode":"5425","provinceCode":"54"},{"code":"542527","name":"措勤县","cityCode":"5425","provinceCode":"54"},{"code":"610102","name":"新城区","cityCode":"6101","provinceCode":"61"},{"code":"610103","name":"碑林区","cityCode":"6101","provinceCode":"61"},{"code":"610104","name":"莲湖区","cityCode":"6101","provinceCode":"61"},{"code":"610111","name":"灞桥区","cityCode":"6101","provinceCode":"61"},{"code":"610112","name":"未央区","cityCode":"6101","provinceCode":"61"},{"code":"610113","name":"雁塔区","cityCode":"6101","provinceCode":"61"},{"code":"610114","name":"阎良区","cityCode":"6101","provinceCode":"61"},{"code":"610115","name":"临潼区","cityCode":"6101","provinceCode":"61"},{"code":"610116","name":"长安区","cityCode":"6101","provinceCode":"61"},{"code":"610117","name":"高陵区","cityCode":"6101","provinceCode":"61"},{"code":"610122","name":"蓝田县","cityCode":"6101","provinceCode":"61"},{"code":"610124","name":"周至县","cityCode":"6101","provinceCode":"61"},{"code":"610125","name":"户县","cityCode":"6101","provinceCode":"61"},{"code":"610202","name":"王益区","cityCode":"6102","provinceCode":"61"},{"code":"610203","name":"印台区","cityCode":"6102","provinceCode":"61"},{"code":"610204","name":"耀州区","cityCode":"6102","provinceCode":"61"},{"code":"610222","name":"宜君县","cityCode":"6102","provinceCode":"61"},{"code":"610302","name":"渭滨区","cityCode":"6103","provinceCode":"61"},{"code":"610303","name":"金台区","cityCode":"6103","provinceCode":"61"},{"code":"610304","name":"陈仓区","cityCode":"6103","provinceCode":"61"},{"code":"610322","name":"凤翔县","cityCode":"6103","provinceCode":"61"},{"code":"610323","name":"岐山县","cityCode":"6103","provinceCode":"61"},{"code":"610324","name":"扶风县","cityCode":"6103","provinceCode":"61"},{"code":"610326","name":"眉县","cityCode":"6103","provinceCode":"61"},{"code":"610327","name":"陇县","cityCode":"6103","provinceCode":"61"},{"code":"610328","name":"千阳县","cityCode":"6103","provinceCode":"61"},{"code":"610329","name":"麟游县","cityCode":"6103","provinceCode":"61"},{"code":"610330","name":"凤县","cityCode":"6103","provinceCode":"61"},{"code":"610331","name":"太白县","cityCode":"6103","provinceCode":"61"},{"code":"610402","name":"秦都区","cityCode":"6104","provinceCode":"61"},{"code":"610403","name":"杨陵区","cityCode":"6104","provinceCode":"61"},{"code":"610404","name":"渭城区","cityCode":"6104","provinceCode":"61"},{"code":"610422","name":"三原县","cityCode":"6104","provinceCode":"61"},{"code":"610423","name":"泾阳县","cityCode":"6104","provinceCode":"61"},{"code":"610424","name":"乾县","cityCode":"6104","provinceCode":"61"},{"code":"610425","name":"礼泉县","cityCode":"6104","provinceCode":"61"},{"code":"610426","name":"永寿县","cityCode":"6104","provinceCode":"61"},{"code":"610427","name":"彬县","cityCode":"6104","provinceCode":"61"},{"code":"610428","name":"长武县","cityCode":"6104","provinceCode":"61"},{"code":"610429","name":"旬邑县","cityCode":"6104","provinceCode":"61"},{"code":"610430","name":"淳化县","cityCode":"6104","provinceCode":"61"},{"code":"610431","name":"武功县","cityCode":"6104","provinceCode":"61"},{"code":"610481","name":"兴平市","cityCode":"6104","provinceCode":"61"},{"code":"610502","name":"临渭区","cityCode":"6105","provinceCode":"61"},{"code":"610503","name":"华州区","cityCode":"6105","provinceCode":"61"},{"code":"610522","name":"潼关县","cityCode":"6105","provinceCode":"61"},{"code":"610523","name":"大荔县","cityCode":"6105","provinceCode":"61"},{"code":"610524","name":"合阳县","cityCode":"6105","provinceCode":"61"},{"code":"610525","name":"澄城县","cityCode":"6105","provinceCode":"61"},{"code":"610526","name":"蒲城县","cityCode":"6105","provinceCode":"61"},{"code":"610527","name":"白水县","cityCode":"6105","provinceCode":"61"},{"code":"610528","name":"富平县","cityCode":"6105","provinceCode":"61"},{"code":"610581","name":"韩城市","cityCode":"6105","provinceCode":"61"},{"code":"610582","name":"华阴市","cityCode":"6105","provinceCode":"61"},{"code":"610602","name":"宝塔区","cityCode":"6106","provinceCode":"61"},{"code":"610603","name":"安塞区","cityCode":"6106","provinceCode":"61"},{"code":"610621","name":"延长县","cityCode":"6106","provinceCode":"61"},{"code":"610622","name":"延川县","cityCode":"6106","provinceCode":"61"},{"code":"610623","name":"子长县","cityCode":"6106","provinceCode":"61"},{"code":"610625","name":"志丹县","cityCode":"6106","provinceCode":"61"},{"code":"610626","name":"吴起县","cityCode":"6106","provinceCode":"61"},{"code":"610627","name":"甘泉县","cityCode":"6106","provinceCode":"61"},{"code":"610628","name":"富县","cityCode":"6106","provinceCode":"61"},{"code":"610629","name":"洛川县","cityCode":"6106","provinceCode":"61"},{"code":"610630","name":"宜川县","cityCode":"6106","provinceCode":"61"},{"code":"610631","name":"黄龙县","cityCode":"6106","provinceCode":"61"},{"code":"610632","name":"黄陵县","cityCode":"6106","provinceCode":"61"},{"code":"610702","name":"汉台区","cityCode":"6107","provinceCode":"61"},{"code":"610721","name":"南郑县","cityCode":"6107","provinceCode":"61"},{"code":"610722","name":"城固县","cityCode":"6107","provinceCode":"61"},{"code":"610723","name":"洋县","cityCode":"6107","provinceCode":"61"},{"code":"610724","name":"西乡县","cityCode":"6107","provinceCode":"61"},{"code":"610725","name":"勉县","cityCode":"6107","provinceCode":"61"},{"code":"610726","name":"宁强县","cityCode":"6107","provinceCode":"61"},{"code":"610727","name":"略阳县","cityCode":"6107","provinceCode":"61"},{"code":"610728","name":"镇巴县","cityCode":"6107","provinceCode":"61"},{"code":"610729","name":"留坝县","cityCode":"6107","provinceCode":"61"},{"code":"610730","name":"佛坪县","cityCode":"6107","provinceCode":"61"},{"code":"610802","name":"榆阳区","cityCode":"6108","provinceCode":"61"},{"code":"610803","name":"横山区","cityCode":"6108","provinceCode":"61"},{"code":"610821","name":"神木县","cityCode":"6108","provinceCode":"61"},{"code":"610822","name":"府谷县","cityCode":"6108","provinceCode":"61"},{"code":"610824","name":"靖边县","cityCode":"6108","provinceCode":"61"},{"code":"610825","name":"定边县","cityCode":"6108","provinceCode":"61"},{"code":"610826","name":"绥德县","cityCode":"6108","provinceCode":"61"},{"code":"610827","name":"米脂县","cityCode":"6108","provinceCode":"61"},{"code":"610828","name":"佳县","cityCode":"6108","provinceCode":"61"},{"code":"610829","name":"吴堡县","cityCode":"6108","provinceCode":"61"},{"code":"610830","name":"清涧县","cityCode":"6108","provinceCode":"61"},{"code":"610831","name":"子洲县","cityCode":"6108","provinceCode":"61"},{"code":"610902","name":"汉滨区","cityCode":"6109","provinceCode":"61"},{"code":"610921","name":"汉阴县","cityCode":"6109","provinceCode":"61"},{"code":"610922","name":"石泉县","cityCode":"6109","provinceCode":"61"},{"code":"610923","name":"宁陕县","cityCode":"6109","provinceCode":"61"},{"code":"610924","name":"紫阳县","cityCode":"6109","provinceCode":"61"},{"code":"610925","name":"岚皋县","cityCode":"6109","provinceCode":"61"},{"code":"610926","name":"平利县","cityCode":"6109","provinceCode":"61"},{"code":"610927","name":"镇坪县","cityCode":"6109","provinceCode":"61"},{"code":"610928","name":"旬阳县","cityCode":"6109","provinceCode":"61"},{"code":"610929","name":"白河县","cityCode":"6109","provinceCode":"61"},{"code":"611002","name":"商州区","cityCode":"6110","provinceCode":"61"},{"code":"611021","name":"洛南县","cityCode":"6110","provinceCode":"61"},{"code":"611022","name":"丹凤县","cityCode":"6110","provinceCode":"61"},{"code":"611023","name":"商南县","cityCode":"6110","provinceCode":"61"},{"code":"611024","name":"山阳县","cityCode":"6110","provinceCode":"61"},{"code":"611025","name":"镇安县","cityCode":"6110","provinceCode":"61"},{"code":"611026","name":"柞水县","cityCode":"6110","provinceCode":"61"},{"code":"620102","name":"城关区","cityCode":"6201","provinceCode":"62"},{"code":"620103","name":"七里河区","cityCode":"6201","provinceCode":"62"},{"code":"620104","name":"西固区","cityCode":"6201","provinceCode":"62"},{"code":"620105","name":"安宁区","cityCode":"6201","provinceCode":"62"},{"code":"620111","name":"红古区","cityCode":"6201","provinceCode":"62"},{"code":"620121","name":"永登县","cityCode":"6201","provinceCode":"62"},{"code":"620122","name":"皋兰县","cityCode":"6201","provinceCode":"62"},{"code":"620123","name":"榆中县","cityCode":"6201","provinceCode":"62"},{"code":"620201","name":"嘉峪关市","cityCode":"6202","provinceCode":"62"},{"code":"620302","name":"金川区","cityCode":"6203","provinceCode":"62"},{"code":"620321","name":"永昌县","cityCode":"6203","provinceCode":"62"},{"code":"620402","name":"白银区","cityCode":"6204","provinceCode":"62"},{"code":"620403","name":"平川区","cityCode":"6204","provinceCode":"62"},{"code":"620421","name":"靖远县","cityCode":"6204","provinceCode":"62"},{"code":"620422","name":"会宁县","cityCode":"6204","provinceCode":"62"},{"code":"620423","name":"景泰县","cityCode":"6204","provinceCode":"62"},{"code":"620502","name":"秦州区","cityCode":"6205","provinceCode":"62"},{"code":"620503","name":"麦积区","cityCode":"6205","provinceCode":"62"},{"code":"620521","name":"清水县","cityCode":"6205","provinceCode":"62"},{"code":"620522","name":"秦安县","cityCode":"6205","provinceCode":"62"},{"code":"620523","name":"甘谷县","cityCode":"6205","provinceCode":"62"},{"code":"620524","name":"武山县","cityCode":"6205","provinceCode":"62"},{"code":"620525","name":"张家川回族自治县","cityCode":"6205","provinceCode":"62"},{"code":"620602","name":"凉州区","cityCode":"6206","provinceCode":"62"},{"code":"620621","name":"民勤县","cityCode":"6206","provinceCode":"62"},{"code":"620622","name":"古浪县","cityCode":"6206","provinceCode":"62"},{"code":"620623","name":"天祝藏族自治县","cityCode":"6206","provinceCode":"62"},{"code":"620702","name":"甘州区","cityCode":"6207","provinceCode":"62"},{"code":"620721","name":"肃南裕固族自治县","cityCode":"6207","provinceCode":"62"},{"code":"620722","name":"民乐县","cityCode":"6207","provinceCode":"62"},{"code":"620723","name":"临泽县","cityCode":"6207","provinceCode":"62"},{"code":"620724","name":"高台县","cityCode":"6207","provinceCode":"62"},{"code":"620725","name":"山丹县","cityCode":"6207","provinceCode":"62"},{"code":"620802","name":"崆峒区","cityCode":"6208","provinceCode":"62"},{"code":"620821","name":"泾川县","cityCode":"6208","provinceCode":"62"},{"code":"620822","name":"灵台县","cityCode":"6208","provinceCode":"62"},{"code":"620823","name":"崇信县","cityCode":"6208","provinceCode":"62"},{"code":"620824","name":"华亭县","cityCode":"6208","provinceCode":"62"},{"code":"620825","name":"庄浪县","cityCode":"6208","provinceCode":"62"},{"code":"620826","name":"静宁县","cityCode":"6208","provinceCode":"62"},{"code":"620902","name":"肃州区","cityCode":"6209","provinceCode":"62"},{"code":"620921","name":"金塔县","cityCode":"6209","provinceCode":"62"},{"code":"620922","name":"瓜州县","cityCode":"6209","provinceCode":"62"},{"code":"620923","name":"肃北蒙古族自治县","cityCode":"6209","provinceCode":"62"},{"code":"620924","name":"阿克塞哈萨克族自治县","cityCode":"6209","provinceCode":"62"},{"code":"620981","name":"玉门市","cityCode":"6209","provinceCode":"62"},{"code":"620982","name":"敦煌市","cityCode":"6209","provinceCode":"62"},{"code":"621002","name":"西峰区","cityCode":"6210","provinceCode":"62"},{"code":"621021","name":"庆城县","cityCode":"6210","provinceCode":"62"},{"code":"621022","name":"环县","cityCode":"6210","provinceCode":"62"},{"code":"621023","name":"华池县","cityCode":"6210","provinceCode":"62"},{"code":"621024","name":"合水县","cityCode":"6210","provinceCode":"62"},{"code":"621025","name":"正宁县","cityCode":"6210","provinceCode":"62"},{"code":"621026","name":"宁县","cityCode":"6210","provinceCode":"62"},{"code":"621027","name":"镇原县","cityCode":"6210","provinceCode":"62"},{"code":"621102","name":"安定区","cityCode":"6211","provinceCode":"62"},{"code":"621121","name":"通渭县","cityCode":"6211","provinceCode":"62"},{"code":"621122","name":"陇西县","cityCode":"6211","provinceCode":"62"},{"code":"621123","name":"渭源县","cityCode":"6211","provinceCode":"62"},{"code":"621124","name":"临洮县","cityCode":"6211","provinceCode":"62"},{"code":"621125","name":"漳县","cityCode":"6211","provinceCode":"62"},{"code":"621126","name":"岷县","cityCode":"6211","provinceCode":"62"},{"code":"621202","name":"武都区","cityCode":"6212","provinceCode":"62"},{"code":"621221","name":"成县","cityCode":"6212","provinceCode":"62"},{"code":"621222","name":"文县","cityCode":"6212","provinceCode":"62"},{"code":"621223","name":"宕昌县","cityCode":"6212","provinceCode":"62"},{"code":"621224","name":"康县","cityCode":"6212","provinceCode":"62"},{"code":"621225","name":"西和县","cityCode":"6212","provinceCode":"62"},{"code":"621226","name":"礼县","cityCode":"6212","provinceCode":"62"},{"code":"621227","name":"徽县","cityCode":"6212","provinceCode":"62"},{"code":"621228","name":"两当县","cityCode":"6212","provinceCode":"62"},{"code":"622901","name":"临夏市","cityCode":"6229","provinceCode":"62"},{"code":"622921","name":"临夏县","cityCode":"6229","provinceCode":"62"},{"code":"622922","name":"康乐县","cityCode":"6229","provinceCode":"62"},{"code":"622923","name":"永靖县","cityCode":"6229","provinceCode":"62"},{"code":"622924","name":"广河县","cityCode":"6229","provinceCode":"62"},{"code":"622925","name":"和政县","cityCode":"6229","provinceCode":"62"},{"code":"622926","name":"东乡族自治县","cityCode":"6229","provinceCode":"62"},{"code":"622927","name":"积石山保安族东乡族撒拉族自治县","cityCode":"6229","provinceCode":"62"},{"code":"623001","name":"合作市","cityCode":"6230","provinceCode":"62"},{"code":"623021","name":"临潭县","cityCode":"6230","provinceCode":"62"},{"code":"623022","name":"卓尼县","cityCode":"6230","provinceCode":"62"},{"code":"623023","name":"舟曲县","cityCode":"6230","provinceCode":"62"},{"code":"623024","name":"迭部县","cityCode":"6230","provinceCode":"62"},{"code":"623025","name":"玛曲县","cityCode":"6230","provinceCode":"62"},{"code":"623026","name":"碌曲县","cityCode":"6230","provinceCode":"62"},{"code":"623027","name":"夏河县","cityCode":"6230","provinceCode":"62"},{"code":"630102","name":"城东区","cityCode":"6301","provinceCode":"63"},{"code":"630103","name":"城中区","cityCode":"6301","provinceCode":"63"},{"code":"630104","name":"城西区","cityCode":"6301","provinceCode":"63"},{"code":"630105","name":"城北区","cityCode":"6301","provinceCode":"63"},{"code":"630121","name":"大通回族土族自治县","cityCode":"6301","provinceCode":"63"},{"code":"630122","name":"湟中县","cityCode":"6301","provinceCode":"63"},{"code":"630123","name":"湟源县","cityCode":"6301","provinceCode":"63"},{"code":"630202","name":"乐都区","cityCode":"6302","provinceCode":"63"},{"code":"630203","name":"平安区","cityCode":"6302","provinceCode":"63"},{"code":"630222","name":"民和回族土族自治县","cityCode":"6302","provinceCode":"63"},{"code":"630223","name":"互助土族自治县","cityCode":"6302","provinceCode":"63"},{"code":"630224","name":"化隆回族自治县","cityCode":"6302","provinceCode":"63"},{"code":"630225","name":"循化撒拉族自治县","cityCode":"6302","provinceCode":"63"},{"code":"632221","name":"门源回族自治县","cityCode":"6322","provinceCode":"63"},{"code":"632222","name":"祁连县","cityCode":"6322","provinceCode":"63"},{"code":"632223","name":"海晏县","cityCode":"6322","provinceCode":"63"},{"code":"632224","name":"刚察县","cityCode":"6322","provinceCode":"63"},{"code":"632321","name":"同仁县","cityCode":"6323","provinceCode":"63"},{"code":"632322","name":"尖扎县","cityCode":"6323","provinceCode":"63"},{"code":"632323","name":"泽库县","cityCode":"6323","provinceCode":"63"},{"code":"632324","name":"河南蒙古族自治县","cityCode":"6323","provinceCode":"63"},{"code":"632521","name":"共和县","cityCode":"6325","provinceCode":"63"},{"code":"632522","name":"同德县","cityCode":"6325","provinceCode":"63"},{"code":"632523","name":"贵德县","cityCode":"6325","provinceCode":"63"},{"code":"632524","name":"兴海县","cityCode":"6325","provinceCode":"63"},{"code":"632525","name":"贵南县","cityCode":"6325","provinceCode":"63"},{"code":"632621","name":"玛沁县","cityCode":"6326","provinceCode":"63"},{"code":"632622","name":"班玛县","cityCode":"6326","provinceCode":"63"},{"code":"632623","name":"甘德县","cityCode":"6326","provinceCode":"63"},{"code":"632624","name":"达日县","cityCode":"6326","provinceCode":"63"},{"code":"632625","name":"久治县","cityCode":"6326","provinceCode":"63"},{"code":"632626","name":"玛多县","cityCode":"6326","provinceCode":"63"},{"code":"632701","name":"玉树市","cityCode":"6327","provinceCode":"63"},{"code":"632722","name":"杂多县","cityCode":"6327","provinceCode":"63"},{"code":"632723","name":"称多县","cityCode":"6327","provinceCode":"63"},{"code":"632724","name":"治多县","cityCode":"6327","provinceCode":"63"},{"code":"632725","name":"囊谦县","cityCode":"6327","provinceCode":"63"},{"code":"632726","name":"曲麻莱县","cityCode":"6327","provinceCode":"63"},{"code":"632801","name":"格尔木市","cityCode":"6328","provinceCode":"63"},{"code":"632802","name":"德令哈市","cityCode":"6328","provinceCode":"63"},{"code":"632821","name":"乌兰县","cityCode":"6328","provinceCode":"63"},{"code":"632822","name":"都兰县","cityCode":"6328","provinceCode":"63"},{"code":"632823","name":"天峻县","cityCode":"6328","provinceCode":"63"},{"code":"640104","name":"兴庆区","cityCode":"6401","provinceCode":"64"},{"code":"640105","name":"西夏区","cityCode":"6401","provinceCode":"64"},{"code":"640106","name":"金凤区","cityCode":"6401","provinceCode":"64"},{"code":"640121","name":"永宁县","cityCode":"6401","provinceCode":"64"},{"code":"640122","name":"贺兰县","cityCode":"6401","provinceCode":"64"},{"code":"640181","name":"灵武市","cityCode":"6401","provinceCode":"64"},{"code":"640202","name":"大武口区","cityCode":"6402","provinceCode":"64"},{"code":"640205","name":"惠农区","cityCode":"6402","provinceCode":"64"},{"code":"640221","name":"平罗县","cityCode":"6402","provinceCode":"64"},{"code":"640302","name":"利通区","cityCode":"6403","provinceCode":"64"},{"code":"640303","name":"红寺堡区","cityCode":"6403","provinceCode":"64"},{"code":"640323","name":"盐池县","cityCode":"6403","provinceCode":"64"},{"code":"640324","name":"同心县","cityCode":"6403","provinceCode":"64"},{"code":"640381","name":"青铜峡市","cityCode":"6403","provinceCode":"64"},{"code":"640402","name":"原州区","cityCode":"6404","provinceCode":"64"},{"code":"640422","name":"西吉县","cityCode":"6404","provinceCode":"64"},{"code":"640423","name":"隆德县","cityCode":"6404","provinceCode":"64"},{"code":"640424","name":"泾源县","cityCode":"6404","provinceCode":"64"},{"code":"640425","name":"彭阳县","cityCode":"6404","provinceCode":"64"},{"code":"640502","name":"沙坡头区","cityCode":"6405","provinceCode":"64"},{"code":"640521","name":"中宁县","cityCode":"6405","provinceCode":"64"},{"code":"640522","name":"海原县","cityCode":"6405","provinceCode":"64"},{"code":"650102","name":"天山区","cityCode":"6501","provinceCode":"65"},{"code":"650103","name":"沙依巴克区","cityCode":"6501","provinceCode":"65"},{"code":"650104","name":"新市区","cityCode":"6501","provinceCode":"65"},{"code":"650105","name":"水磨沟区","cityCode":"6501","provinceCode":"65"},{"code":"650106","name":"头屯河区","cityCode":"6501","provinceCode":"65"},{"code":"650107","name":"达坂城区","cityCode":"6501","provinceCode":"65"},{"code":"650109","name":"米东区","cityCode":"6501","provinceCode":"65"},{"code":"650121","name":"乌鲁木齐县","cityCode":"6501","provinceCode":"65"},{"code":"650202","name":"独山子区","cityCode":"6502","provinceCode":"65"},{"code":"650203","name":"克拉玛依区","cityCode":"6502","provinceCode":"65"},{"code":"650204","name":"白碱滩区","cityCode":"6502","provinceCode":"65"},{"code":"650205","name":"乌尔禾区","cityCode":"6502","provinceCode":"65"},{"code":"650402","name":"高昌区","cityCode":"6504","provinceCode":"65"},{"code":"650421","name":"鄯善县","cityCode":"6504","provinceCode":"65"},{"code":"650422","name":"托克逊县","cityCode":"6504","provinceCode":"65"},{"code":"650502","name":"伊州区","cityCode":"6505","provinceCode":"65"},{"code":"650521","name":"巴里坤哈萨克自治县","cityCode":"6505","provinceCode":"65"},{"code":"650522","name":"伊吾县","cityCode":"6505","provinceCode":"65"},{"code":"652301","name":"昌吉市","cityCode":"6523","provinceCode":"65"},{"code":"652302","name":"阜康市","cityCode":"6523","provinceCode":"65"},{"code":"652323","name":"呼图壁县","cityCode":"6523","provinceCode":"65"},{"code":"652324","name":"玛纳斯县","cityCode":"6523","provinceCode":"65"},{"code":"652325","name":"奇台县","cityCode":"6523","provinceCode":"65"},{"code":"652327","name":"吉木萨尔县","cityCode":"6523","provinceCode":"65"},{"code":"652328","name":"木垒哈萨克自治县","cityCode":"6523","provinceCode":"65"},{"code":"652701","name":"博乐市","cityCode":"6527","provinceCode":"65"},{"code":"652702","name":"阿拉山口市","cityCode":"6527","provinceCode":"65"},{"code":"652722","name":"精河县","cityCode":"6527","provinceCode":"65"},{"code":"652723","name":"温泉县","cityCode":"6527","provinceCode":"65"},{"code":"652801","name":"库尔勒市","cityCode":"6528","provinceCode":"65"},{"code":"652822","name":"轮台县","cityCode":"6528","provinceCode":"65"},{"code":"652823","name":"尉犁县","cityCode":"6528","provinceCode":"65"},{"code":"652824","name":"若羌县","cityCode":"6528","provinceCode":"65"},{"code":"652825","name":"且末县","cityCode":"6528","provinceCode":"65"},{"code":"652826","name":"焉耆回族自治县","cityCode":"6528","provinceCode":"65"},{"code":"652827","name":"和静县","cityCode":"6528","provinceCode":"65"},{"code":"652828","name":"和硕县","cityCode":"6528","provinceCode":"65"},{"code":"652829","name":"博湖县","cityCode":"6528","provinceCode":"65"},{"code":"652901","name":"阿克苏市","cityCode":"6529","provinceCode":"65"},{"code":"652922","name":"温宿县","cityCode":"6529","provinceCode":"65"},{"code":"652923","name":"库车县","cityCode":"6529","provinceCode":"65"},{"code":"652924","name":"沙雅县","cityCode":"6529","provinceCode":"65"},{"code":"652925","name":"新和县","cityCode":"6529","provinceCode":"65"},{"code":"652926","name":"拜城县","cityCode":"6529","provinceCode":"65"},{"code":"652927","name":"乌什县","cityCode":"6529","provinceCode":"65"},{"code":"652928","name":"阿瓦提县","cityCode":"6529","provinceCode":"65"},{"code":"652929","name":"柯坪县","cityCode":"6529","provinceCode":"65"},{"code":"653001","name":"阿图什市","cityCode":"6530","provinceCode":"65"},{"code":"653022","name":"阿克陶县","cityCode":"6530","provinceCode":"65"},{"code":"653023","name":"阿合奇县","cityCode":"6530","provinceCode":"65"},{"code":"653024","name":"乌恰县","cityCode":"6530","provinceCode":"65"},{"code":"653101","name":"喀什市","cityCode":"6531","provinceCode":"65"},{"code":"653121","name":"疏附县","cityCode":"6531","provinceCode":"65"},{"code":"653122","name":"疏勒县","cityCode":"6531","provinceCode":"65"},{"code":"653123","name":"英吉沙县","cityCode":"6531","provinceCode":"65"},{"code":"653124","name":"泽普县","cityCode":"6531","provinceCode":"65"},{"code":"653125","name":"莎车县","cityCode":"6531","provinceCode":"65"},{"code":"653126","name":"叶城县","cityCode":"6531","provinceCode":"65"},{"code":"653127","name":"麦盖提县","cityCode":"6531","provinceCode":"65"},{"code":"653128","name":"岳普湖县","cityCode":"6531","provinceCode":"65"},{"code":"653129","name":"伽师县","cityCode":"6531","provinceCode":"65"},{"code":"653130","name":"巴楚县","cityCode":"6531","provinceCode":"65"},{"code":"653131","name":"塔什库尔干塔吉克自治县","cityCode":"6531","provinceCode":"65"},{"code":"653201","name":"和田市","cityCode":"6532","provinceCode":"65"},{"code":"653221","name":"和田县","cityCode":"6532","provinceCode":"65"},{"code":"653222","name":"墨玉县","cityCode":"6532","provinceCode":"65"},{"code":"653223","name":"皮山县","cityCode":"6532","provinceCode":"65"},{"code":"653224","name":"洛浦县","cityCode":"6532","provinceCode":"65"},{"code":"653225","name":"策勒县","cityCode":"6532","provinceCode":"65"},{"code":"653226","name":"于田县","cityCode":"6532","provinceCode":"65"},{"code":"653227","name":"民丰县","cityCode":"6532","provinceCode":"65"},{"code":"654002","name":"伊宁市","cityCode":"6540","provinceCode":"65"},{"code":"654003","name":"奎屯市","cityCode":"6540","provinceCode":"65"},{"code":"654004","name":"霍尔果斯市","cityCode":"6540","provinceCode":"65"},{"code":"654021","name":"伊宁县","cityCode":"6540","provinceCode":"65"},{"code":"654022","name":"察布查尔锡伯自治县","cityCode":"6540","provinceCode":"65"},{"code":"654023","name":"霍城县","cityCode":"6540","provinceCode":"65"},{"code":"654024","name":"巩留县","cityCode":"6540","provinceCode":"65"},{"code":"654025","name":"新源县","cityCode":"6540","provinceCode":"65"},{"code":"654026","name":"昭苏县","cityCode":"6540","provinceCode":"65"},{"code":"654027","name":"特克斯县","cityCode":"6540","provinceCode":"65"},{"code":"654028","name":"尼勒克县","cityCode":"6540","provinceCode":"65"},{"code":"654201","name":"塔城市","cityCode":"6542","provinceCode":"65"},{"code":"654202","name":"乌苏市","cityCode":"6542","provinceCode":"65"},{"code":"654221","name":"额敏县","cityCode":"6542","provinceCode":"65"},{"code":"654223","name":"沙湾县","cityCode":"6542","provinceCode":"65"},{"code":"654224","name":"托里县","cityCode":"6542","provinceCode":"65"},{"code":"654225","name":"裕民县","cityCode":"6542","provinceCode":"65"},{"code":"654226","name":"和布克赛尔蒙古自治县","cityCode":"6542","provinceCode":"65"},{"code":"654301","name":"阿勒泰市","cityCode":"6543","provinceCode":"65"},{"code":"654321","name":"布尔津县","cityCode":"6543","provinceCode":"65"},{"code":"654322","name":"富蕴县","cityCode":"6543","provinceCode":"65"},{"code":"654323","name":"福海县","cityCode":"6543","provinceCode":"65"},{"code":"654324","name":"哈巴河县","cityCode":"6543","provinceCode":"65"},{"code":"654325","name":"青河县","cityCode":"6543","provinceCode":"65"},{"code":"654326","name":"吉木乃县","cityCode":"6543","provinceCode":"65"},{"code":"659001","name":"石河子市","cityCode":"6590","provinceCode":"65"},{"code":"659002","name":"阿拉尔市","cityCode":"6590","provinceCode":"65"},{"code":"659003","name":"图木舒克市","cityCode":"6590","provinceCode":"65"},{"code":"659004","name":"五家渠市","cityCode":"6590","provinceCode":"65"},{"code":"659006","name":"铁门关市","cityCode":"6590","provinceCode":"65"}] \ No newline at end of file diff --git a/src/assets/btnComponentIcon/1.png b/src/assets/btnComponentIcon/1.png new file mode 100644 index 0000000..83f48ac Binary files /dev/null and b/src/assets/btnComponentIcon/1.png differ diff --git a/src/assets/btnComponentIcon/10.png b/src/assets/btnComponentIcon/10.png new file mode 100644 index 0000000..e1c893f Binary files /dev/null and b/src/assets/btnComponentIcon/10.png differ diff --git a/src/assets/btnComponentIcon/10_1.png b/src/assets/btnComponentIcon/10_1.png new file mode 100644 index 0000000..789d2b7 Binary files /dev/null and b/src/assets/btnComponentIcon/10_1.png differ diff --git a/src/assets/btnComponentIcon/11.png b/src/assets/btnComponentIcon/11.png new file mode 100644 index 0000000..623d69a Binary files /dev/null and b/src/assets/btnComponentIcon/11.png differ diff --git a/src/assets/btnComponentIcon/11_1.png b/src/assets/btnComponentIcon/11_1.png new file mode 100644 index 0000000..9a28142 Binary files /dev/null and b/src/assets/btnComponentIcon/11_1.png differ diff --git a/src/assets/btnComponentIcon/12.png b/src/assets/btnComponentIcon/12.png new file mode 100644 index 0000000..b534a3a Binary files /dev/null and b/src/assets/btnComponentIcon/12.png differ diff --git a/src/assets/btnComponentIcon/12_1.png b/src/assets/btnComponentIcon/12_1.png new file mode 100644 index 0000000..c45141a Binary files /dev/null and b/src/assets/btnComponentIcon/12_1.png differ diff --git a/src/assets/btnComponentIcon/13.png b/src/assets/btnComponentIcon/13.png new file mode 100644 index 0000000..131cc7f Binary files /dev/null and b/src/assets/btnComponentIcon/13.png differ diff --git a/src/assets/btnComponentIcon/13_1.png b/src/assets/btnComponentIcon/13_1.png new file mode 100644 index 0000000..827f3d4 Binary files /dev/null and b/src/assets/btnComponentIcon/13_1.png differ diff --git a/src/assets/btnComponentIcon/14.png b/src/assets/btnComponentIcon/14.png new file mode 100644 index 0000000..ae45851 Binary files /dev/null and b/src/assets/btnComponentIcon/14.png differ diff --git a/src/assets/btnComponentIcon/14_1.png b/src/assets/btnComponentIcon/14_1.png new file mode 100644 index 0000000..b229d83 Binary files /dev/null and b/src/assets/btnComponentIcon/14_1.png differ diff --git a/src/assets/btnComponentIcon/15.png b/src/assets/btnComponentIcon/15.png new file mode 100644 index 0000000..a3f763c Binary files /dev/null and b/src/assets/btnComponentIcon/15.png differ diff --git a/src/assets/btnComponentIcon/15_1.png b/src/assets/btnComponentIcon/15_1.png new file mode 100644 index 0000000..e0729f6 Binary files /dev/null and b/src/assets/btnComponentIcon/15_1.png differ diff --git a/src/assets/btnComponentIcon/16.png b/src/assets/btnComponentIcon/16.png new file mode 100644 index 0000000..761423a Binary files /dev/null and b/src/assets/btnComponentIcon/16.png differ diff --git a/src/assets/btnComponentIcon/16_1.png b/src/assets/btnComponentIcon/16_1.png new file mode 100644 index 0000000..70781c6 Binary files /dev/null and b/src/assets/btnComponentIcon/16_1.png differ diff --git a/src/assets/btnComponentIcon/17.png b/src/assets/btnComponentIcon/17.png new file mode 100644 index 0000000..9a3e4a4 Binary files /dev/null and b/src/assets/btnComponentIcon/17.png differ diff --git a/src/assets/btnComponentIcon/17_1.png b/src/assets/btnComponentIcon/17_1.png new file mode 100644 index 0000000..0bc45e0 Binary files /dev/null and b/src/assets/btnComponentIcon/17_1.png differ diff --git a/src/assets/btnComponentIcon/18.png b/src/assets/btnComponentIcon/18.png new file mode 100644 index 0000000..3ebba4d Binary files /dev/null and b/src/assets/btnComponentIcon/18.png differ diff --git a/src/assets/btnComponentIcon/18_1.png b/src/assets/btnComponentIcon/18_1.png new file mode 100644 index 0000000..adba3b5 Binary files /dev/null and b/src/assets/btnComponentIcon/18_1.png differ diff --git a/src/assets/btnComponentIcon/19.png b/src/assets/btnComponentIcon/19.png new file mode 100644 index 0000000..9940544 Binary files /dev/null and b/src/assets/btnComponentIcon/19.png differ diff --git a/src/assets/btnComponentIcon/19_1.png b/src/assets/btnComponentIcon/19_1.png new file mode 100644 index 0000000..c043a6c Binary files /dev/null and b/src/assets/btnComponentIcon/19_1.png differ diff --git a/src/assets/btnComponentIcon/1_1.png b/src/assets/btnComponentIcon/1_1.png new file mode 100644 index 0000000..75bb32a Binary files /dev/null and b/src/assets/btnComponentIcon/1_1.png differ diff --git a/src/assets/btnComponentIcon/2.png b/src/assets/btnComponentIcon/2.png new file mode 100644 index 0000000..ce7b454 Binary files /dev/null and b/src/assets/btnComponentIcon/2.png differ diff --git a/src/assets/btnComponentIcon/20.png b/src/assets/btnComponentIcon/20.png new file mode 100644 index 0000000..2e4bf90 Binary files /dev/null and b/src/assets/btnComponentIcon/20.png differ diff --git a/src/assets/btnComponentIcon/20_1.png b/src/assets/btnComponentIcon/20_1.png new file mode 100644 index 0000000..dc17cd8 Binary files /dev/null and b/src/assets/btnComponentIcon/20_1.png differ diff --git a/src/assets/btnComponentIcon/21.png b/src/assets/btnComponentIcon/21.png new file mode 100644 index 0000000..600722b Binary files /dev/null and b/src/assets/btnComponentIcon/21.png differ diff --git a/src/assets/btnComponentIcon/21_1.png b/src/assets/btnComponentIcon/21_1.png new file mode 100644 index 0000000..df5b91d Binary files /dev/null and b/src/assets/btnComponentIcon/21_1.png differ diff --git a/src/assets/btnComponentIcon/22.png b/src/assets/btnComponentIcon/22.png new file mode 100644 index 0000000..a85dc78 Binary files /dev/null and b/src/assets/btnComponentIcon/22.png differ diff --git a/src/assets/btnComponentIcon/22_1.png b/src/assets/btnComponentIcon/22_1.png new file mode 100644 index 0000000..5425b7b Binary files /dev/null and b/src/assets/btnComponentIcon/22_1.png differ diff --git a/src/assets/btnComponentIcon/23.png b/src/assets/btnComponentIcon/23.png new file mode 100644 index 0000000..0c8b84d Binary files /dev/null and b/src/assets/btnComponentIcon/23.png differ diff --git a/src/assets/btnComponentIcon/23_1.png b/src/assets/btnComponentIcon/23_1.png new file mode 100644 index 0000000..ffb5003 Binary files /dev/null and b/src/assets/btnComponentIcon/23_1.png differ diff --git a/src/assets/btnComponentIcon/24.png b/src/assets/btnComponentIcon/24.png new file mode 100644 index 0000000..9d38cd1 Binary files /dev/null and b/src/assets/btnComponentIcon/24.png differ diff --git a/src/assets/btnComponentIcon/24_1.png b/src/assets/btnComponentIcon/24_1.png new file mode 100644 index 0000000..b568f5b Binary files /dev/null and b/src/assets/btnComponentIcon/24_1.png differ diff --git a/src/assets/btnComponentIcon/2_1.png b/src/assets/btnComponentIcon/2_1.png new file mode 100644 index 0000000..b688ed9 Binary files /dev/null and b/src/assets/btnComponentIcon/2_1.png differ diff --git a/src/assets/btnComponentIcon/3.png b/src/assets/btnComponentIcon/3.png new file mode 100644 index 0000000..56942de Binary files /dev/null and b/src/assets/btnComponentIcon/3.png differ diff --git a/src/assets/btnComponentIcon/3_1.png b/src/assets/btnComponentIcon/3_1.png new file mode 100644 index 0000000..e5c925a Binary files /dev/null and b/src/assets/btnComponentIcon/3_1.png differ diff --git a/src/assets/btnComponentIcon/4.png b/src/assets/btnComponentIcon/4.png new file mode 100644 index 0000000..9486269 Binary files /dev/null and b/src/assets/btnComponentIcon/4.png differ diff --git a/src/assets/btnComponentIcon/4_1.png b/src/assets/btnComponentIcon/4_1.png new file mode 100644 index 0000000..d228ed9 Binary files /dev/null and b/src/assets/btnComponentIcon/4_1.png differ diff --git a/src/assets/btnComponentIcon/5.png b/src/assets/btnComponentIcon/5.png new file mode 100644 index 0000000..9d38cd1 Binary files /dev/null and b/src/assets/btnComponentIcon/5.png differ diff --git a/src/assets/btnComponentIcon/5_1.png b/src/assets/btnComponentIcon/5_1.png new file mode 100644 index 0000000..de55487 Binary files /dev/null and b/src/assets/btnComponentIcon/5_1.png differ diff --git a/src/assets/btnComponentIcon/6.png b/src/assets/btnComponentIcon/6.png new file mode 100644 index 0000000..2d82564 Binary files /dev/null and b/src/assets/btnComponentIcon/6.png differ diff --git a/src/assets/btnComponentIcon/6_1.png b/src/assets/btnComponentIcon/6_1.png new file mode 100644 index 0000000..69f7a3f Binary files /dev/null and b/src/assets/btnComponentIcon/6_1.png differ diff --git a/src/assets/btnComponentIcon/7.png b/src/assets/btnComponentIcon/7.png new file mode 100644 index 0000000..8c8f456 Binary files /dev/null and b/src/assets/btnComponentIcon/7.png differ diff --git a/src/assets/btnComponentIcon/7_1.png b/src/assets/btnComponentIcon/7_1.png new file mode 100644 index 0000000..2714d04 Binary files /dev/null and b/src/assets/btnComponentIcon/7_1.png differ diff --git a/src/assets/btnComponentIcon/8.png b/src/assets/btnComponentIcon/8.png new file mode 100644 index 0000000..ee86ac8 Binary files /dev/null and b/src/assets/btnComponentIcon/8.png differ diff --git a/src/assets/btnComponentIcon/8_1.png b/src/assets/btnComponentIcon/8_1.png new file mode 100644 index 0000000..2497b68 Binary files /dev/null and b/src/assets/btnComponentIcon/8_1.png differ diff --git a/src/assets/btnComponentIcon/9.png b/src/assets/btnComponentIcon/9.png new file mode 100644 index 0000000..2a737ef Binary files /dev/null and b/src/assets/btnComponentIcon/9.png differ diff --git a/src/assets/btnComponentIcon/9_1.png b/src/assets/btnComponentIcon/9_1.png new file mode 100644 index 0000000..5aef2cd Binary files /dev/null and b/src/assets/btnComponentIcon/9_1.png differ diff --git a/src/assets/cities.json b/src/assets/cities.json new file mode 100644 index 0000000..0fdc48c --- /dev/null +++ b/src/assets/cities.json @@ -0,0 +1 @@ +[{"code":"1101","name":"市辖区","provinceCode":"11"},{"code":"1201","name":"市辖区","provinceCode":"12"},{"code":"1301","name":"石家庄市","provinceCode":"13"},{"code":"1302","name":"唐山市","provinceCode":"13"},{"code":"1303","name":"秦皇岛市","provinceCode":"13"},{"code":"1304","name":"邯郸市","provinceCode":"13"},{"code":"1305","name":"邢台市","provinceCode":"13"},{"code":"1306","name":"保定市","provinceCode":"13"},{"code":"1307","name":"张家口市","provinceCode":"13"},{"code":"1308","name":"承德市","provinceCode":"13"},{"code":"1309","name":"沧州市","provinceCode":"13"},{"code":"1310","name":"廊坊市","provinceCode":"13"},{"code":"1311","name":"衡水市","provinceCode":"13"},{"code":"1390","name":"省直辖县级行政区划","provinceCode":"13"},{"code":"1401","name":"太原市","provinceCode":"14"},{"code":"1402","name":"大同市","provinceCode":"14"},{"code":"1403","name":"阳泉市","provinceCode":"14"},{"code":"1404","name":"长治市","provinceCode":"14"},{"code":"1405","name":"晋城市","provinceCode":"14"},{"code":"1406","name":"朔州市","provinceCode":"14"},{"code":"1407","name":"晋中市","provinceCode":"14"},{"code":"1408","name":"运城市","provinceCode":"14"},{"code":"1409","name":"忻州市","provinceCode":"14"},{"code":"1410","name":"临汾市","provinceCode":"14"},{"code":"1411","name":"吕梁市","provinceCode":"14"},{"code":"1501","name":"呼和浩特市","provinceCode":"15"},{"code":"1502","name":"包头市","provinceCode":"15"},{"code":"1503","name":"乌海市","provinceCode":"15"},{"code":"1504","name":"赤峰市","provinceCode":"15"},{"code":"1505","name":"通辽市","provinceCode":"15"},{"code":"1506","name":"鄂尔多斯市","provinceCode":"15"},{"code":"1507","name":"呼伦贝尔市","provinceCode":"15"},{"code":"1508","name":"巴彦淖尔市","provinceCode":"15"},{"code":"1509","name":"乌兰察布市","provinceCode":"15"},{"code":"1522","name":"兴安盟","provinceCode":"15"},{"code":"1525","name":"锡林郭勒盟","provinceCode":"15"},{"code":"1529","name":"阿拉善盟","provinceCode":"15"},{"code":"2101","name":"沈阳市","provinceCode":"21"},{"code":"2102","name":"大连市","provinceCode":"21"},{"code":"2103","name":"鞍山市","provinceCode":"21"},{"code":"2104","name":"抚顺市","provinceCode":"21"},{"code":"2105","name":"本溪市","provinceCode":"21"},{"code":"2106","name":"丹东市","provinceCode":"21"},{"code":"2107","name":"锦州市","provinceCode":"21"},{"code":"2108","name":"营口市","provinceCode":"21"},{"code":"2109","name":"阜新市","provinceCode":"21"},{"code":"2110","name":"辽阳市","provinceCode":"21"},{"code":"2111","name":"盘锦市","provinceCode":"21"},{"code":"2112","name":"铁岭市","provinceCode":"21"},{"code":"2113","name":"朝阳市","provinceCode":"21"},{"code":"2114","name":"葫芦岛市","provinceCode":"21"},{"code":"2201","name":"长春市","provinceCode":"22"},{"code":"2202","name":"吉林市","provinceCode":"22"},{"code":"2203","name":"四平市","provinceCode":"22"},{"code":"2204","name":"辽源市","provinceCode":"22"},{"code":"2205","name":"通化市","provinceCode":"22"},{"code":"2206","name":"白山市","provinceCode":"22"},{"code":"2207","name":"松原市","provinceCode":"22"},{"code":"2208","name":"白城市","provinceCode":"22"},{"code":"2224","name":"延边朝鲜族自治州","provinceCode":"22"},{"code":"2301","name":"哈尔滨市","provinceCode":"23"},{"code":"2302","name":"齐齐哈尔市","provinceCode":"23"},{"code":"2303","name":"鸡西市","provinceCode":"23"},{"code":"2304","name":"鹤岗市","provinceCode":"23"},{"code":"2305","name":"双鸭山市","provinceCode":"23"},{"code":"2306","name":"大庆市","provinceCode":"23"},{"code":"2307","name":"伊春市","provinceCode":"23"},{"code":"2308","name":"佳木斯市","provinceCode":"23"},{"code":"2309","name":"七台河市","provinceCode":"23"},{"code":"2310","name":"牡丹江市","provinceCode":"23"},{"code":"2311","name":"黑河市","provinceCode":"23"},{"code":"2312","name":"绥化市","provinceCode":"23"},{"code":"2327","name":"大兴安岭地区","provinceCode":"23"},{"code":"3101","name":"市辖区","provinceCode":"31"},{"code":"3201","name":"南京市","provinceCode":"32"},{"code":"3202","name":"无锡市","provinceCode":"32"},{"code":"3203","name":"徐州市","provinceCode":"32"},{"code":"3204","name":"常州市","provinceCode":"32"},{"code":"3205","name":"苏州市","provinceCode":"32"},{"code":"3206","name":"南通市","provinceCode":"32"},{"code":"3207","name":"连云港市","provinceCode":"32"},{"code":"3208","name":"淮安市","provinceCode":"32"},{"code":"3209","name":"盐城市","provinceCode":"32"},{"code":"3210","name":"扬州市","provinceCode":"32"},{"code":"3211","name":"镇江市","provinceCode":"32"},{"code":"3212","name":"泰州市","provinceCode":"32"},{"code":"3213","name":"宿迁市","provinceCode":"32"},{"code":"3301","name":"杭州市","provinceCode":"33"},{"code":"3302","name":"宁波市","provinceCode":"33"},{"code":"3303","name":"温州市","provinceCode":"33"},{"code":"3304","name":"嘉兴市","provinceCode":"33"},{"code":"3305","name":"湖州市","provinceCode":"33"},{"code":"3306","name":"绍兴市","provinceCode":"33"},{"code":"3307","name":"金华市","provinceCode":"33"},{"code":"3308","name":"衢州市","provinceCode":"33"},{"code":"3309","name":"舟山市","provinceCode":"33"},{"code":"3310","name":"台州市","provinceCode":"33"},{"code":"3311","name":"丽水市","provinceCode":"33"},{"code":"3401","name":"合肥市","provinceCode":"34"},{"code":"3402","name":"芜湖市","provinceCode":"34"},{"code":"3403","name":"蚌埠市","provinceCode":"34"},{"code":"3404","name":"淮南市","provinceCode":"34"},{"code":"3405","name":"马鞍山市","provinceCode":"34"},{"code":"3406","name":"淮北市","provinceCode":"34"},{"code":"3407","name":"铜陵市","provinceCode":"34"},{"code":"3408","name":"安庆市","provinceCode":"34"},{"code":"3410","name":"黄山市","provinceCode":"34"},{"code":"3411","name":"滁州市","provinceCode":"34"},{"code":"3412","name":"阜阳市","provinceCode":"34"},{"code":"3413","name":"宿州市","provinceCode":"34"},{"code":"3415","name":"六安市","provinceCode":"34"},{"code":"3416","name":"亳州市","provinceCode":"34"},{"code":"3417","name":"池州市","provinceCode":"34"},{"code":"3418","name":"宣城市","provinceCode":"34"},{"code":"3501","name":"福州市","provinceCode":"35"},{"code":"3502","name":"厦门市","provinceCode":"35"},{"code":"3503","name":"莆田市","provinceCode":"35"},{"code":"3504","name":"三明市","provinceCode":"35"},{"code":"3505","name":"泉州市","provinceCode":"35"},{"code":"3506","name":"漳州市","provinceCode":"35"},{"code":"3507","name":"南平市","provinceCode":"35"},{"code":"3508","name":"龙岩市","provinceCode":"35"},{"code":"3509","name":"宁德市","provinceCode":"35"},{"code":"3601","name":"南昌市","provinceCode":"36"},{"code":"3602","name":"景德镇市","provinceCode":"36"},{"code":"3603","name":"萍乡市","provinceCode":"36"},{"code":"3604","name":"九江市","provinceCode":"36"},{"code":"3605","name":"新余市","provinceCode":"36"},{"code":"3606","name":"鹰潭市","provinceCode":"36"},{"code":"3607","name":"赣州市","provinceCode":"36"},{"code":"3608","name":"吉安市","provinceCode":"36"},{"code":"3609","name":"宜春市","provinceCode":"36"},{"code":"3610","name":"抚州市","provinceCode":"36"},{"code":"3611","name":"上饶市","provinceCode":"36"},{"code":"3701","name":"济南市","provinceCode":"37"},{"code":"3702","name":"青岛市","provinceCode":"37"},{"code":"3703","name":"淄博市","provinceCode":"37"},{"code":"3704","name":"枣庄市","provinceCode":"37"},{"code":"3705","name":"东营市","provinceCode":"37"},{"code":"3706","name":"烟台市","provinceCode":"37"},{"code":"3707","name":"潍坊市","provinceCode":"37"},{"code":"3708","name":"济宁市","provinceCode":"37"},{"code":"3709","name":"泰安市","provinceCode":"37"},{"code":"3710","name":"威海市","provinceCode":"37"},{"code":"3711","name":"日照市","provinceCode":"37"},{"code":"3712","name":"莱芜市","provinceCode":"37"},{"code":"3713","name":"临沂市","provinceCode":"37"},{"code":"3714","name":"德州市","provinceCode":"37"},{"code":"3715","name":"聊城市","provinceCode":"37"},{"code":"3716","name":"滨州市","provinceCode":"37"},{"code":"3717","name":"菏泽市","provinceCode":"37"},{"code":"4101","name":"郑州市","provinceCode":"41"},{"code":"4102","name":"开封市","provinceCode":"41"},{"code":"4103","name":"洛阳市","provinceCode":"41"},{"code":"4104","name":"平顶山市","provinceCode":"41"},{"code":"4105","name":"安阳市","provinceCode":"41"},{"code":"4106","name":"鹤壁市","provinceCode":"41"},{"code":"4107","name":"新乡市","provinceCode":"41"},{"code":"4108","name":"焦作市","provinceCode":"41"},{"code":"4109","name":"濮阳市","provinceCode":"41"},{"code":"4110","name":"许昌市","provinceCode":"41"},{"code":"4111","name":"漯河市","provinceCode":"41"},{"code":"4112","name":"三门峡市","provinceCode":"41"},{"code":"4113","name":"南阳市","provinceCode":"41"},{"code":"4114","name":"商丘市","provinceCode":"41"},{"code":"4115","name":"信阳市","provinceCode":"41"},{"code":"4116","name":"周口市","provinceCode":"41"},{"code":"4117","name":"驻马店市","provinceCode":"41"},{"code":"4190","name":"省直辖县级行政区划","provinceCode":"41"},{"code":"4201","name":"武汉市","provinceCode":"42"},{"code":"4202","name":"黄石市","provinceCode":"42"},{"code":"4203","name":"十堰市","provinceCode":"42"},{"code":"4205","name":"宜昌市","provinceCode":"42"},{"code":"4206","name":"襄阳市","provinceCode":"42"},{"code":"4207","name":"鄂州市","provinceCode":"42"},{"code":"4208","name":"荆门市","provinceCode":"42"},{"code":"4209","name":"孝感市","provinceCode":"42"},{"code":"4210","name":"荆州市","provinceCode":"42"},{"code":"4211","name":"黄冈市","provinceCode":"42"},{"code":"4212","name":"咸宁市","provinceCode":"42"},{"code":"4213","name":"随州市","provinceCode":"42"},{"code":"4228","name":"恩施土家族苗族自治州","provinceCode":"42"},{"code":"4290","name":"省直辖县级行政区划","provinceCode":"42"},{"code":"4301","name":"长沙市","provinceCode":"43"},{"code":"4302","name":"株洲市","provinceCode":"43"},{"code":"4303","name":"湘潭市","provinceCode":"43"},{"code":"4304","name":"衡阳市","provinceCode":"43"},{"code":"4305","name":"邵阳市","provinceCode":"43"},{"code":"4306","name":"岳阳市","provinceCode":"43"},{"code":"4307","name":"常德市","provinceCode":"43"},{"code":"4308","name":"张家界市","provinceCode":"43"},{"code":"4309","name":"益阳市","provinceCode":"43"},{"code":"4310","name":"郴州市","provinceCode":"43"},{"code":"4311","name":"永州市","provinceCode":"43"},{"code":"4312","name":"怀化市","provinceCode":"43"},{"code":"4313","name":"娄底市","provinceCode":"43"},{"code":"4331","name":"湘西土家族苗族自治州","provinceCode":"43"},{"code":"4401","name":"广州市","provinceCode":"44"},{"code":"4402","name":"韶关市","provinceCode":"44"},{"code":"4403","name":"深圳市","provinceCode":"44"},{"code":"4404","name":"珠海市","provinceCode":"44"},{"code":"4405","name":"汕头市","provinceCode":"44"},{"code":"4406","name":"佛山市","provinceCode":"44"},{"code":"4407","name":"江门市","provinceCode":"44"},{"code":"4408","name":"湛江市","provinceCode":"44"},{"code":"4409","name":"茂名市","provinceCode":"44"},{"code":"4412","name":"肇庆市","provinceCode":"44"},{"code":"4413","name":"惠州市","provinceCode":"44"},{"code":"4414","name":"梅州市","provinceCode":"44"},{"code":"4415","name":"汕尾市","provinceCode":"44"},{"code":"4416","name":"河源市","provinceCode":"44"},{"code":"4417","name":"阳江市","provinceCode":"44"},{"code":"4418","name":"清远市","provinceCode":"44"},{"code":"4419","name":"东莞市","provinceCode":"44"},{"code":"4420","name":"中山市","provinceCode":"44"},{"code":"4451","name":"潮州市","provinceCode":"44"},{"code":"4452","name":"揭阳市","provinceCode":"44"},{"code":"4453","name":"云浮市","provinceCode":"44"},{"code":"4501","name":"南宁市","provinceCode":"45"},{"code":"4502","name":"柳州市","provinceCode":"45"},{"code":"4503","name":"桂林市","provinceCode":"45"},{"code":"4504","name":"梧州市","provinceCode":"45"},{"code":"4505","name":"北海市","provinceCode":"45"},{"code":"4506","name":"防城港市","provinceCode":"45"},{"code":"4507","name":"钦州市","provinceCode":"45"},{"code":"4508","name":"贵港市","provinceCode":"45"},{"code":"4509","name":"玉林市","provinceCode":"45"},{"code":"4510","name":"百色市","provinceCode":"45"},{"code":"4511","name":"贺州市","provinceCode":"45"},{"code":"4512","name":"河池市","provinceCode":"45"},{"code":"4513","name":"来宾市","provinceCode":"45"},{"code":"4514","name":"崇左市","provinceCode":"45"},{"code":"4601","name":"海口市","provinceCode":"46"},{"code":"4602","name":"三亚市","provinceCode":"46"},{"code":"4603","name":"三沙市","provinceCode":"46"},{"code":"4604","name":"儋州市","provinceCode":"46"},{"code":"4690","name":"省直辖县级行政区划","provinceCode":"46"},{"code":"5001","name":"市辖区","provinceCode":"50"},{"code":"5002","name":"县","provinceCode":"50"},{"code":"5101","name":"成都市","provinceCode":"51"},{"code":"5103","name":"自贡市","provinceCode":"51"},{"code":"5104","name":"攀枝花市","provinceCode":"51"},{"code":"5105","name":"泸州市","provinceCode":"51"},{"code":"5106","name":"德阳市","provinceCode":"51"},{"code":"5107","name":"绵阳市","provinceCode":"51"},{"code":"5108","name":"广元市","provinceCode":"51"},{"code":"5109","name":"遂宁市","provinceCode":"51"},{"code":"5110","name":"内江市","provinceCode":"51"},{"code":"5111","name":"乐山市","provinceCode":"51"},{"code":"5113","name":"南充市","provinceCode":"51"},{"code":"5114","name":"眉山市","provinceCode":"51"},{"code":"5115","name":"宜宾市","provinceCode":"51"},{"code":"5116","name":"广安市","provinceCode":"51"},{"code":"5117","name":"达州市","provinceCode":"51"},{"code":"5118","name":"雅安市","provinceCode":"51"},{"code":"5119","name":"巴中市","provinceCode":"51"},{"code":"5120","name":"资阳市","provinceCode":"51"},{"code":"5132","name":"阿坝藏族羌族自治州","provinceCode":"51"},{"code":"5133","name":"甘孜藏族自治州","provinceCode":"51"},{"code":"5134","name":"凉山彝族自治州","provinceCode":"51"},{"code":"5201","name":"贵阳市","provinceCode":"52"},{"code":"5202","name":"六盘水市","provinceCode":"52"},{"code":"5203","name":"遵义市","provinceCode":"52"},{"code":"5204","name":"安顺市","provinceCode":"52"},{"code":"5205","name":"毕节市","provinceCode":"52"},{"code":"5206","name":"铜仁市","provinceCode":"52"},{"code":"5223","name":"黔西南布依族苗族自治州","provinceCode":"52"},{"code":"5226","name":"黔东南苗族侗族自治州","provinceCode":"52"},{"code":"5227","name":"黔南布依族苗族自治州","provinceCode":"52"},{"code":"5301","name":"昆明市","provinceCode":"53"},{"code":"5303","name":"曲靖市","provinceCode":"53"},{"code":"5304","name":"玉溪市","provinceCode":"53"},{"code":"5305","name":"保山市","provinceCode":"53"},{"code":"5306","name":"昭通市","provinceCode":"53"},{"code":"5307","name":"丽江市","provinceCode":"53"},{"code":"5308","name":"普洱市","provinceCode":"53"},{"code":"5309","name":"临沧市","provinceCode":"53"},{"code":"5323","name":"楚雄彝族自治州","provinceCode":"53"},{"code":"5325","name":"红河哈尼族彝族自治州","provinceCode":"53"},{"code":"5326","name":"文山壮族苗族自治州","provinceCode":"53"},{"code":"5328","name":"西双版纳傣族自治州","provinceCode":"53"},{"code":"5329","name":"大理白族自治州","provinceCode":"53"},{"code":"5331","name":"德宏傣族景颇族自治州","provinceCode":"53"},{"code":"5333","name":"怒江傈僳族自治州","provinceCode":"53"},{"code":"5334","name":"迪庆藏族自治州","provinceCode":"53"},{"code":"5401","name":"拉萨市","provinceCode":"54"},{"code":"5402","name":"日喀则市","provinceCode":"54"},{"code":"5403","name":"昌都市","provinceCode":"54"},{"code":"5404","name":"林芝市","provinceCode":"54"},{"code":"5405","name":"山南市","provinceCode":"54"},{"code":"5424","name":"那曲地区","provinceCode":"54"},{"code":"5425","name":"阿里地区","provinceCode":"54"},{"code":"6101","name":"西安市","provinceCode":"61"},{"code":"6102","name":"铜川市","provinceCode":"61"},{"code":"6103","name":"宝鸡市","provinceCode":"61"},{"code":"6104","name":"咸阳市","provinceCode":"61"},{"code":"6105","name":"渭南市","provinceCode":"61"},{"code":"6106","name":"延安市","provinceCode":"61"},{"code":"6107","name":"汉中市","provinceCode":"61"},{"code":"6108","name":"榆林市","provinceCode":"61"},{"code":"6109","name":"安康市","provinceCode":"61"},{"code":"6110","name":"商洛市","provinceCode":"61"},{"code":"6201","name":"兰州市","provinceCode":"62"},{"code":"6202","name":"嘉峪关市","provinceCode":"62"},{"code":"6203","name":"金昌市","provinceCode":"62"},{"code":"6204","name":"白银市","provinceCode":"62"},{"code":"6205","name":"天水市","provinceCode":"62"},{"code":"6206","name":"武威市","provinceCode":"62"},{"code":"6207","name":"张掖市","provinceCode":"62"},{"code":"6208","name":"平凉市","provinceCode":"62"},{"code":"6209","name":"酒泉市","provinceCode":"62"},{"code":"6210","name":"庆阳市","provinceCode":"62"},{"code":"6211","name":"定西市","provinceCode":"62"},{"code":"6212","name":"陇南市","provinceCode":"62"},{"code":"6229","name":"临夏回族自治州","provinceCode":"62"},{"code":"6230","name":"甘南藏族自治州","provinceCode":"62"},{"code":"6301","name":"西宁市","provinceCode":"63"},{"code":"6302","name":"海东市","provinceCode":"63"},{"code":"6322","name":"海北藏族自治州","provinceCode":"63"},{"code":"6323","name":"黄南藏族自治州","provinceCode":"63"},{"code":"6325","name":"海南藏族自治州","provinceCode":"63"},{"code":"6326","name":"果洛藏族自治州","provinceCode":"63"},{"code":"6327","name":"玉树藏族自治州","provinceCode":"63"},{"code":"6328","name":"海西蒙古族藏族自治州","provinceCode":"63"},{"code":"6401","name":"银川市","provinceCode":"64"},{"code":"6402","name":"石嘴山市","provinceCode":"64"},{"code":"6403","name":"吴忠市","provinceCode":"64"},{"code":"6404","name":"固原市","provinceCode":"64"},{"code":"6405","name":"中卫市","provinceCode":"64"},{"code":"6501","name":"乌鲁木齐市","provinceCode":"65"},{"code":"6502","name":"克拉玛依市","provinceCode":"65"},{"code":"6504","name":"吐鲁番市","provinceCode":"65"},{"code":"6505","name":"哈密市","provinceCode":"65"},{"code":"6523","name":"昌吉回族自治州","provinceCode":"65"},{"code":"6527","name":"博尔塔拉蒙古自治州","provinceCode":"65"},{"code":"6528","name":"巴音郭楞蒙古自治州","provinceCode":"65"},{"code":"6529","name":"阿克苏地区","provinceCode":"65"},{"code":"6530","name":"克孜勒苏柯尔克孜自治州","provinceCode":"65"},{"code":"6531","name":"喀什地区","provinceCode":"65"},{"code":"6532","name":"和田地区","provinceCode":"65"},{"code":"6540","name":"伊犁哈萨克自治州","provinceCode":"65"},{"code":"6542","name":"塔城地区","provinceCode":"65"},{"code":"6543","name":"阿勒泰地区","provinceCode":"65"},{"code":"6590","name":"自治区直辖县级行政区划","provinceCode":"65"}] \ No newline at end of file diff --git a/src/assets/close.svg b/src/assets/close.svg new file mode 100644 index 0000000..4ffba32 --- /dev/null +++ b/src/assets/close.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/src/assets/copy.svg b/src/assets/copy.svg new file mode 100644 index 0000000..40956f8 --- /dev/null +++ b/src/assets/copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/copyall.svg b/src/assets/copyall.svg new file mode 100644 index 0000000..a7bc33a --- /dev/null +++ b/src/assets/copyall.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/default2.png b/src/assets/default2.png new file mode 100644 index 0000000..58f6bb5 Binary files /dev/null and b/src/assets/default2.png differ diff --git a/src/assets/delete.svg b/src/assets/delete.svg new file mode 100644 index 0000000..c4a82b5 --- /dev/null +++ b/src/assets/delete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/disableadd.svg b/src/assets/disableadd.svg new file mode 100644 index 0000000..a9ad4b1 --- /dev/null +++ b/src/assets/disableadd.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/disableaddChild.svg b/src/assets/disableaddChild.svg new file mode 100644 index 0000000..0535094 --- /dev/null +++ b/src/assets/disableaddChild.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/disablecopy.svg b/src/assets/disablecopy.svg new file mode 100644 index 0000000..bc89ea5 --- /dev/null +++ b/src/assets/disablecopy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/disablecopyall.svg b/src/assets/disablecopyall.svg new file mode 100644 index 0000000..937befa --- /dev/null +++ b/src/assets/disablecopyall.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/disabledelete.svg b/src/assets/disabledelete.svg new file mode 100644 index 0000000..8a3c1bc --- /dev/null +++ b/src/assets/disabledelete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/disablematerial.svg b/src/assets/disablematerial.svg new file mode 100644 index 0000000..cc789ef --- /dev/null +++ b/src/assets/disablematerial.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/disablematerialremark.svg b/src/assets/disablematerialremark.svg new file mode 100644 index 0000000..797f372 --- /dev/null +++ b/src/assets/disablematerialremark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/disableprocess.svg b/src/assets/disableprocess.svg new file mode 100644 index 0000000..61d28f9 --- /dev/null +++ b/src/assets/disableprocess.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/eject.svg b/src/assets/eject.svg new file mode 100644 index 0000000..8fcf985 --- /dev/null +++ b/src/assets/eject.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/ejectleft.svg b/src/assets/ejectleft.svg new file mode 100644 index 0000000..45f0554 --- /dev/null +++ b/src/assets/ejectleft.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/file.svg b/src/assets/file.svg new file mode 100644 index 0000000..9f1a6bc --- /dev/null +++ b/src/assets/file.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/file_single.svg b/src/assets/file_single.svg new file mode 100644 index 0000000..6031fb0 --- /dev/null +++ b/src/assets/file_single.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/foot_logo.png b/src/assets/foot_logo.png new file mode 100644 index 0000000..df876f3 Binary files /dev/null and b/src/assets/foot_logo.png differ diff --git a/src/assets/footer_logo.png b/src/assets/footer_logo.png new file mode 100644 index 0000000..29630af Binary files /dev/null and b/src/assets/footer_logo.png differ diff --git a/src/assets/hasChecked.svg b/src/assets/hasChecked.svg new file mode 100644 index 0000000..34823f7 --- /dev/null +++ b/src/assets/hasChecked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/haveCancel.png b/src/assets/haveCancel.png new file mode 100644 index 0000000..faa86d5 Binary files /dev/null and b/src/assets/haveCancel.png differ diff --git a/src/assets/haveChecked.png b/src/assets/haveChecked.png new file mode 100644 index 0000000..eef8840 Binary files /dev/null and b/src/assets/haveChecked.png differ diff --git a/src/assets/haveChecking.svg b/src/assets/haveChecking.svg new file mode 100644 index 0000000..bcd6981 --- /dev/null +++ b/src/assets/haveChecking.svg @@ -0,0 +1,12 @@ + + + Created with Pixso. + + + + + + + + + diff --git a/src/assets/icons/index.js b/src/assets/icons/index.js new file mode 100644 index 0000000..05f64dd --- /dev/null +++ b/src/assets/icons/index.js @@ -0,0 +1,3 @@ +const requireAll = requireContext => requireContext.keys().map(requireContext); +const svgs = require.context('./svg', false, /\.svg$/); +requireAll(svgs); diff --git a/src/assets/icons/svg/Frame 55.svg b/src/assets/icons/svg/Frame 55.svg new file mode 100644 index 0000000..ec50772 --- /dev/null +++ b/src/assets/icons/svg/Frame 55.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icons/svg/Frame 60.svg b/src/assets/icons/svg/Frame 60.svg new file mode 100644 index 0000000..ccc78af --- /dev/null +++ b/src/assets/icons/svg/Frame 60.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/svg/Frame 67.svg b/src/assets/icons/svg/Frame 67.svg new file mode 100644 index 0000000..b3aac83 --- /dev/null +++ b/src/assets/icons/svg/Frame 67.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/Frame 82.svg b/src/assets/icons/svg/Frame 82.svg new file mode 100644 index 0000000..84a3604 --- /dev/null +++ b/src/assets/icons/svg/Frame 82.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icons/svg/Frame 83.svg b/src/assets/icons/svg/Frame 83.svg new file mode 100644 index 0000000..6830190 --- /dev/null +++ b/src/assets/icons/svg/Frame 83.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/Frame 84.svg b/src/assets/icons/svg/Frame 84.svg new file mode 100644 index 0000000..98c7ffe --- /dev/null +++ b/src/assets/icons/svg/Frame 84.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/Frame 87.svg b/src/assets/icons/svg/Frame 87.svg new file mode 100644 index 0000000..dd20ade --- /dev/null +++ b/src/assets/icons/svg/Frame 87.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/Frame 88.svg b/src/assets/icons/svg/Frame 88.svg new file mode 100644 index 0000000..b681441 --- /dev/null +++ b/src/assets/icons/svg/Frame 88.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/Frame 89.svg b/src/assets/icons/svg/Frame 89.svg new file mode 100644 index 0000000..f5c6b02 --- /dev/null +++ b/src/assets/icons/svg/Frame 89.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/svg/Frame 90.svg b/src/assets/icons/svg/Frame 90.svg new file mode 100644 index 0000000..21e2e55 --- /dev/null +++ b/src/assets/icons/svg/Frame 90.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/Frame 91.svg b/src/assets/icons/svg/Frame 91.svg new file mode 100644 index 0000000..1ba0aac --- /dev/null +++ b/src/assets/icons/svg/Frame 91.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_account.svg b/src/assets/icons/svg/_account.svg new file mode 100644 index 0000000..54b547c --- /dev/null +++ b/src/assets/icons/svg/_account.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_add.svg b/src/assets/icons/svg/_add.svg new file mode 100644 index 0000000..c229691 --- /dev/null +++ b/src/assets/icons/svg/_add.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_bottom.svg b/src/assets/icons/svg/_bottom.svg new file mode 100644 index 0000000..2b4e9b4 --- /dev/null +++ b/src/assets/icons/svg/_bottom.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_calculator.svg b/src/assets/icons/svg/_calculator.svg new file mode 100644 index 0000000..4a1b94b --- /dev/null +++ b/src/assets/icons/svg/_calculator.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_card.svg b/src/assets/icons/svg/_card.svg new file mode 100644 index 0000000..1982d6f --- /dev/null +++ b/src/assets/icons/svg/_card.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_check.svg b/src/assets/icons/svg/_check.svg new file mode 100644 index 0000000..a9093ed --- /dev/null +++ b/src/assets/icons/svg/_check.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_close.svg b/src/assets/icons/svg/_close.svg new file mode 100644 index 0000000..7d40e2d --- /dev/null +++ b/src/assets/icons/svg/_close.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_copy.svg b/src/assets/icons/svg/_copy.svg new file mode 100644 index 0000000..011ccdb --- /dev/null +++ b/src/assets/icons/svg/_copy.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_copyall.svg b/src/assets/icons/svg/_copyall.svg new file mode 100644 index 0000000..4dbc2f4 --- /dev/null +++ b/src/assets/icons/svg/_copyall.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icons/svg/_custom.svg b/src/assets/icons/svg/_custom.svg new file mode 100644 index 0000000..fb2373e --- /dev/null +++ b/src/assets/icons/svg/_custom.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/svg/_delete.svg b/src/assets/icons/svg/_delete.svg new file mode 100644 index 0000000..7b6463f --- /dev/null +++ b/src/assets/icons/svg/_delete.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_edit.svg b/src/assets/icons/svg/_edit.svg new file mode 100644 index 0000000..1d3295f --- /dev/null +++ b/src/assets/icons/svg/_edit.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_export.svg b/src/assets/icons/svg/_export.svg new file mode 100644 index 0000000..d0a88e6 --- /dev/null +++ b/src/assets/icons/svg/_export.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_function.svg b/src/assets/icons/svg/_function.svg new file mode 100644 index 0000000..5e4b5da --- /dev/null +++ b/src/assets/icons/svg/_function.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/svg/_function2.svg b/src/assets/icons/svg/_function2.svg new file mode 100644 index 0000000..837a15c --- /dev/null +++ b/src/assets/icons/svg/_function2.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_gen.svg b/src/assets/icons/svg/_gen.svg new file mode 100644 index 0000000..a1e44db --- /dev/null +++ b/src/assets/icons/svg/_gen.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_material.svg b/src/assets/icons/svg/_material.svg new file mode 100644 index 0000000..0b1be88 --- /dev/null +++ b/src/assets/icons/svg/_material.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_next.svg b/src/assets/icons/svg/_next.svg new file mode 100644 index 0000000..efda033 --- /dev/null +++ b/src/assets/icons/svg/_next.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/svg/_nextpage.svg b/src/assets/icons/svg/_nextpage.svg new file mode 100644 index 0000000..b2abde4 --- /dev/null +++ b/src/assets/icons/svg/_nextpage.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_password.svg b/src/assets/icons/svg/_password.svg new file mode 100644 index 0000000..38d79e0 --- /dev/null +++ b/src/assets/icons/svg/_password.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_plus.svg b/src/assets/icons/svg/_plus.svg new file mode 100644 index 0000000..4558a95 --- /dev/null +++ b/src/assets/icons/svg/_plus.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_prevpage.svg b/src/assets/icons/svg/_prevpage.svg new file mode 100644 index 0000000..7599f14 --- /dev/null +++ b/src/assets/icons/svg/_prevpage.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_printer.svg b/src/assets/icons/svg/_printer.svg new file mode 100644 index 0000000..040a7e8 --- /dev/null +++ b/src/assets/icons/svg/_printer.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icons/svg/_process.svg b/src/assets/icons/svg/_process.svg new file mode 100644 index 0000000..6f728fa --- /dev/null +++ b/src/assets/icons/svg/_process.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_reload.svg b/src/assets/icons/svg/_reload.svg new file mode 100644 index 0000000..0dbe79f --- /dev/null +++ b/src/assets/icons/svg/_reload.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_rollback.svg b/src/assets/icons/svg/_rollback.svg new file mode 100644 index 0000000..7953996 --- /dev/null +++ b/src/assets/icons/svg/_rollback.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_save.svg b/src/assets/icons/svg/_save.svg new file mode 100644 index 0000000..cab7281 --- /dev/null +++ b/src/assets/icons/svg/_save.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_search.svg b/src/assets/icons/svg/_search.svg new file mode 100644 index 0000000..c532731 --- /dev/null +++ b/src/assets/icons/svg/_search.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_setting.svg b/src/assets/icons/svg/_setting.svg new file mode 100644 index 0000000..9d6907e --- /dev/null +++ b/src/assets/icons/svg/_setting.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/assets/icons/svg/_top.svg b/src/assets/icons/svg/_top.svg new file mode 100644 index 0000000..24f4500 --- /dev/null +++ b/src/assets/icons/svg/_top.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_tree.svg b/src/assets/icons/svg/_tree.svg new file mode 100644 index 0000000..3687307 --- /dev/null +++ b/src/assets/icons/svg/_tree.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/_upload.svg b/src/assets/icons/svg/_upload.svg new file mode 100644 index 0000000..5966528 --- /dev/null +++ b/src/assets/icons/svg/_upload.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/gongneng.svg b/src/assets/icons/svg/gongneng.svg new file mode 100644 index 0000000..76503bc --- /dev/null +++ b/src/assets/icons/svg/gongneng.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/assets/icons/svg/jiahao.svg b/src/assets/icons/svg/jiahao.svg new file mode 100644 index 0000000..9f80ad8 --- /dev/null +++ b/src/assets/icons/svg/jiahao.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/jiahao_1 1.svg b/src/assets/icons/svg/jiahao_1 1.svg new file mode 100644 index 0000000..e4bfe34 --- /dev/null +++ b/src/assets/icons/svg/jiahao_1 1.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/assets/icons/svg/quxiaoshenhe.svg b/src/assets/icons/svg/quxiaoshenhe.svg new file mode 100644 index 0000000..b112ce1 --- /dev/null +++ b/src/assets/icons/svg/quxiaoshenhe.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/shengchengshoukuandan.svg b/src/assets/icons/svg/shengchengshoukuandan.svg new file mode 100644 index 0000000..eb1a2ae --- /dev/null +++ b/src/assets/icons/svg/shengchengshoukuandan.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/svg/xiangmubujian 1.svg b/src/assets/icons/svg/xiangmubujian 1.svg new file mode 100644 index 0000000..d2a1344 --- /dev/null +++ b/src/assets/icons/svg/xiangmubujian 1.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..090bd6d Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/assets/logo_pic.png b/src/assets/logo_pic.png new file mode 100644 index 0000000..ce17ec5 Binary files /dev/null and b/src/assets/logo_pic.png differ diff --git a/src/assets/material.svg b/src/assets/material.svg new file mode 100644 index 0000000..b65db46 --- /dev/null +++ b/src/assets/material.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/materialremark.svg b/src/assets/materialremark.svg new file mode 100644 index 0000000..e66df29 --- /dev/null +++ b/src/assets/materialremark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/addFill.svg b/src/assets/oee/addFill.svg new file mode 100644 index 0000000..06f4851 --- /dev/null +++ b/src/assets/oee/addFill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/addState.svg b/src/assets/oee/addState.svg new file mode 100644 index 0000000..d0fbd2a --- /dev/null +++ b/src/assets/oee/addState.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/brint.svg b/src/assets/oee/brint.svg new file mode 100644 index 0000000..ccbceaf --- /dev/null +++ b/src/assets/oee/brint.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/changeWork.svg b/src/assets/oee/changeWork.svg new file mode 100644 index 0000000..8869c7a --- /dev/null +++ b/src/assets/oee/changeWork.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/close.svg b/src/assets/oee/close.svg new file mode 100644 index 0000000..52894e0 --- /dev/null +++ b/src/assets/oee/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/commonIcon.svg b/src/assets/oee/commonIcon.svg new file mode 100644 index 0000000..c8f307d --- /dev/null +++ b/src/assets/oee/commonIcon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/company.svg b/src/assets/oee/company.svg new file mode 100644 index 0000000..544173c --- /dev/null +++ b/src/assets/oee/company.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/currentState.svg b/src/assets/oee/currentState.svg new file mode 100644 index 0000000..e0bde54 --- /dev/null +++ b/src/assets/oee/currentState.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/del.png b/src/assets/oee/del.png new file mode 100644 index 0000000..95916bc Binary files /dev/null and b/src/assets/oee/del.png differ diff --git a/src/assets/oee/del0.png b/src/assets/oee/del0.png new file mode 100644 index 0000000..032e986 Binary files /dev/null and b/src/assets/oee/del0.png differ diff --git a/src/assets/oee/dete.svg b/src/assets/oee/dete.svg new file mode 100644 index 0000000..2785347 --- /dev/null +++ b/src/assets/oee/dete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/facereg.svg b/src/assets/oee/facereg.svg new file mode 100644 index 0000000..32056ac --- /dev/null +++ b/src/assets/oee/facereg.svg @@ -0,0 +1 @@ + diff --git a/src/assets/oee/facescan.svg b/src/assets/oee/facescan.svg new file mode 100644 index 0000000..a037978 --- /dev/null +++ b/src/assets/oee/facescan.svg @@ -0,0 +1 @@ + diff --git a/src/assets/oee/fileManage.svg b/src/assets/oee/fileManage.svg new file mode 100644 index 0000000..864c088 --- /dev/null +++ b/src/assets/oee/fileManage.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/firstTing.svg b/src/assets/oee/firstTing.svg new file mode 100644 index 0000000..4cf9a95 --- /dev/null +++ b/src/assets/oee/firstTing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/loginCompany.png b/src/assets/oee/loginCompany.png new file mode 100644 index 0000000..c8ea33f Binary files /dev/null and b/src/assets/oee/loginCompany.png differ diff --git a/src/assets/oee/logo.png b/src/assets/oee/logo.png new file mode 100644 index 0000000..bdc0729 Binary files /dev/null and b/src/assets/oee/logo.png differ diff --git a/src/assets/oee/panle.svg b/src/assets/oee/panle.svg new file mode 100644 index 0000000..a8b3db7 --- /dev/null +++ b/src/assets/oee/panle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/passWord.svg b/src/assets/oee/passWord.svg new file mode 100644 index 0000000..e20ee8c --- /dev/null +++ b/src/assets/oee/passWord.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/processRepoort.svg b/src/assets/oee/processRepoort.svg new file mode 100644 index 0000000..c99d9be --- /dev/null +++ b/src/assets/oee/processRepoort.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/productWork.svg b/src/assets/oee/productWork.svg new file mode 100644 index 0000000..8b2dd30 --- /dev/null +++ b/src/assets/oee/productWork.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/qr2.png b/src/assets/oee/qr2.png new file mode 100644 index 0000000..4851701 Binary files /dev/null and b/src/assets/oee/qr2.png differ diff --git a/src/assets/oee/refresh0.png b/src/assets/oee/refresh0.png new file mode 100644 index 0000000..ed47a90 Binary files /dev/null and b/src/assets/oee/refresh0.png differ diff --git a/src/assets/oee/right.svg b/src/assets/oee/right.svg new file mode 100644 index 0000000..2094bd9 --- /dev/null +++ b/src/assets/oee/right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/see.svg b/src/assets/oee/see.svg new file mode 100644 index 0000000..4a69601 --- /dev/null +++ b/src/assets/oee/see.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/setting.svg b/src/assets/oee/setting.svg new file mode 100644 index 0000000..2ab5cdc --- /dev/null +++ b/src/assets/oee/setting.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/team.svg b/src/assets/oee/team.svg new file mode 100644 index 0000000..dca36b1 --- /dev/null +++ b/src/assets/oee/team.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/oee/voice0.png b/src/assets/oee/voice0.png new file mode 100644 index 0000000..467aa3d Binary files /dev/null and b/src/assets/oee/voice0.png differ diff --git a/src/assets/oee/wages.svg b/src/assets/oee/wages.svg new file mode 100644 index 0000000..c0a63b2 --- /dev/null +++ b/src/assets/oee/wages.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/param.svg b/src/assets/param.svg new file mode 100644 index 0000000..cb9c99e --- /dev/null +++ b/src/assets/param.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/process.svg b/src/assets/process.svg new file mode 100644 index 0000000..24f45a9 --- /dev/null +++ b/src/assets/process.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/prompt.png b/src/assets/prompt.png new file mode 100644 index 0000000..7360527 Binary files /dev/null and b/src/assets/prompt.png differ diff --git a/src/assets/provinces.json b/src/assets/provinces.json new file mode 100644 index 0000000..8b14177 --- /dev/null +++ b/src/assets/provinces.json @@ -0,0 +1 @@ +[{"code":"11","name":"北京市"},{"code":"12","name":"天津市"},{"code":"13","name":"河北省"},{"code":"14","name":"山西省"},{"code":"15","name":"内蒙古自治区"},{"code":"21","name":"辽宁省"},{"code":"22","name":"吉林省"},{"code":"23","name":"黑龙江省"},{"code":"31","name":"上海市"},{"code":"32","name":"江苏省"},{"code":"33","name":"浙江省"},{"code":"34","name":"安徽省"},{"code":"35","name":"福建省"},{"code":"36","name":"江西省"},{"code":"37","name":"山东省"},{"code":"41","name":"河南省"},{"code":"42","name":"湖北省"},{"code":"43","name":"湖南省"},{"code":"44","name":"广东省"},{"code":"45","name":"广西壮族自治区"},{"code":"46","name":"海南省"},{"code":"50","name":"重庆市"},{"code":"51","name":"四川省"},{"code":"52","name":"贵州省"},{"code":"53","name":"云南省"},{"code":"54","name":"西藏自治区"},{"code":"61","name":"陕西省"},{"code":"62","name":"甘肃省"},{"code":"63","name":"青海省"},{"code":"64","name":"宁夏回族自治区"},{"code":"65","name":"新疆维吾尔自治区"}] \ No newline at end of file diff --git a/src/assets/quanping.svg b/src/assets/quanping.svg new file mode 100644 index 0000000..ab2bbb3 --- /dev/null +++ b/src/assets/quanping.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/treematerial.svg b/src/assets/treematerial.svg new file mode 100644 index 0000000..d4a1160 --- /dev/null +++ b/src/assets/treematerial.svg @@ -0,0 +1 @@ + diff --git a/src/assets/treeprocess.svg b/src/assets/treeprocess.svg new file mode 100644 index 0000000..4ea2535 --- /dev/null +++ b/src/assets/treeprocess.svg @@ -0,0 +1 @@ + diff --git a/src/components/Charts/Bar/index.js b/src/components/Charts/Bar/index.js new file mode 100644 index 0000000..700bb3c --- /dev/null +++ b/src/components/Charts/Bar/index.js @@ -0,0 +1,103 @@ +import React, { PureComponent } from 'react'; +import { Chart } from '@antv/g2'; +import Debounce from 'lodash-decorators/debounce'; +import Bind from 'lodash-decorators/bind'; +import equal from '../equal'; + +class Bar extends PureComponent { + componentDidMount() { + this.renderChart(this.props.data); + window.addEventListener('resize', this.resize); + } + + componentWillReceiveProps(nextProps) { + if (!equal(this.props, nextProps)) { + this.renderChart(nextProps.data); + } + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resize); + if (this.chart) { + this.chart.destroy(); + } + this.resize.cancel(); + } + + @Bind() + @Debounce(200) + resize() { + if (!this.node) { + return; + } + this.renderChart([]); + } + + handleRef = (n) => { + this.node = n; + }; + + renderChart(data) { + if (this.node.offsetWidth === 0) { + return; + } + const { + xUnit = '', yUnit = '', height, style, + } = this.props; + const textMyStyle = {}; + if (style !== undefined) { + if (style.color !== undefined) { + textMyStyle.fill = style.color; + } + } + if (!data || (data && data.length < 1)) return; + // clean + if (this.chart) { + this.chart.destroy(); + } + this.node.innerHTML = ''; + const chart = new Chart({ + container: this.node, + autoFit: true, /* 图标自适应 */ + height, + padding: 'auto', + }); + chart.axis('x', { + label: { + formatter: (val) => { + return `${val}${xUnit}`; + }, + textStyle: textMyStyle, + }, + }); + chart.axis('y', { + label: { + formatter: (val) => { + return `${val}${yUnit}`; + }, + textStyle: textMyStyle, + }, + }); + chart.data(data); + chart.tooltip({ + showTitle: false, + }); + chart.coord().transpose(); + chart.interval().position('y*x').tooltip('y*x', (name, value) => { + return { + name: `${name}${xUnit}`, + value: `${value}${yUnit}`, + }; + }); + chart.render(); + this.chart = chart; + } + + render() { + return ( +
+ ); + } +} + +export default Bar; diff --git a/src/components/Charts/BrokenLine/index.js b/src/components/Charts/BrokenLine/index.js new file mode 100644 index 0000000..3ed8069 --- /dev/null +++ b/src/components/Charts/BrokenLine/index.js @@ -0,0 +1,121 @@ +/* eslint-disable no-undef */ +import React, { PureComponent } from 'react'; +import { Chart } from '@antv/g2'; +import Debounce from 'lodash-decorators/debounce'; +import Bind from 'lodash-decorators/bind'; +import equal from '../equal'; + +class BrokenLine extends PureComponent { + componentDidMount() { + this.renderChart(this.props.data); + window.addEventListener('resize', this.resize); + } + + componentWillReceiveProps(nextProps) { + if (!equal(this.props, nextProps)) { + this.renderChart(nextProps.data); + } + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resize); + if (this.chart) { + this.chart.destroy(); + } + this.resize.cancel(); + } + + @Bind() + @Debounce(200) + resize() { + if (!this.node) { + return; + } + this.renderChart([]); + } + + handleRef = (n) => { + this.node = n; + }; + + renderChart(data) { + if (this.node.offsetWidth === 0) { + return; + } + const { + xUnit = '', yUnit = '', height, style, + } = this.props; + const textMyStyle = {}; + if (style !== undefined) { + if (style.color !== undefined) { + textMyStyle.fill = style.color; + } + } + if (!data || (data && data.length < 1)) return; + if (this.chart) { + this.chart.destroy(); + } + this.node.innerHTML = ''; + const chart = new Chart({ + container: this.node, + autoFit: true, /* 图标自适应 */ + height, + padding: 'auto', + }); + chart.axis('x', { + label: { + formatter: (val) => { + return `${val}${xUnit}`; + }, + textStyle: textMyStyle, + }, + }); + chart.axis('y', { + label: { + formatter: (val) => { + return `${val}${yUnit}`; + }, + textStyle: textMyStyle, + }, + }); + chart.option('slider', { + start: 0.9, + end: 1, + trendCfg: { + isArea: false, + }, + }); + chart.data(data); + chart.tooltip({ + showCrosshairs: true, + shared: true, + }); + chart.line().position('x*y').color('type').tooltip('x*y*type', (name, value, type) => { + return { + title: `${name}${xUnit}`, + name: type, + value: `${value}${yUnit}`, + }; + }); + chart + .point() + .position('x*y') + .color('type') + .size(4) + .shape('circle') + .style({ stroke: '#fff', lineWidth: 1 }); + chart.render(); + this.chart = chart; + } + + render() { + const { height } = this.props; + return ( +
+
+
+ ); + } +} + +export default BrokenLine; diff --git a/src/components/Charts/ColorBlock/index.js b/src/components/Charts/ColorBlock/index.js new file mode 100644 index 0000000..14e4945 --- /dev/null +++ b/src/components/Charts/ColorBlock/index.js @@ -0,0 +1,147 @@ +/* eslint-disable no-undef */ +import React, { PureComponent } from 'react'; + +// import G2 from '@antv/g2/build/g2'; +import { Chart } from '@antv/g2'; +import Debounce from 'lodash-decorators/debounce'; +import Bind from 'lodash-decorators/bind'; +import equal from '../equal'; + +class ColorBlock extends PureComponent { + componentDidMount() { + this.renderChart(this.props.data); + window.addEventListener('resize', this.resize); + } + + componentWillReceiveProps(nextProps) { + if (!equal(this.props, nextProps)) { + this.renderChart(nextProps.data); + } + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resize); + if (this.chart) { + this.chart.destroy(); + } + this.resize.cancel(); + } + + @Bind() + @Debounce(200) + resize() { + if (!this.node) { + return; + } + this.renderChart([]); + } + + handleRef = (n) => { + this.node = n; + }; + + renderChart(data) { + if (this.node.offsetWidth === 0) { + return; + } + if (this.chart) { + this.chart.destroy(); + } + + this.node.innerHTML = ''; + const { day, sMachines, height } = this.props; + + const source = data.map((arr) => { + return { + xValue: arr[0], + yValue: arr[1], + value: arr[2], + }; + }); + + const chart = new Chart({ + container: this.node, + autoFit: true, + height, + }); + + chart.data(source); + + chart.scale('xValue', { + type: 'cat', + values: day, + }); + chart.scale('yValue', { + type: 'cat', + values: sMachines, + }); + chart.scale('value', { + nice: true, + }); + + chart.axis('xValue', { + tickLine: null, + grid: { + alignTick: false, + line: { + style: { + lineWidth: 1, + lineDash: null, + stroke: '#f0f0f0', + }, + }, + }, + }); + + chart.axis('yValue', { + title: null, + grid: { + alignTick: false, + line: { + style: { + lineWidth: 1, + lineDash: null, + stroke: '#f0f0f0', + }, + }, + }, + }); + + chart.tooltip({ + showMarkers: false, + }); + + chart + .polygon() + .position('xValue*yValue') + .color('value', '#f6ffed-#389e0d-#135200') + .label('value', { + offset: -2, + style: { + fill: '#fff', + shadowBlur: 2, + shadowColor: 'rgba(0, 0, 0, .45)', + }, + }) + .style({ + lineWidth: 1, + stroke: '#fff', + }); + + chart.interaction('element-active'); + + chart.render(); + this.chart = chart; + } + + render() { + const { height } = this.props; + return ( +
+
+
+ ); + } +} + +export default ColorBlock; diff --git a/src/components/Charts/Columnar/index.js b/src/components/Charts/Columnar/index.js new file mode 100644 index 0000000..11edd81 --- /dev/null +++ b/src/components/Charts/Columnar/index.js @@ -0,0 +1,103 @@ +/* eslint-disable no-undef */ +import React, { PureComponent } from 'react'; +import { Chart } from '@antv/g2'; +import Debounce from 'lodash-decorators/debounce'; +import Bind from 'lodash-decorators/bind'; +import equal from '../equal'; + +class Columnar extends PureComponent { + componentDidMount() { + this.renderChart(this.props.data); + window.addEventListener('resize', this.resize); + } + + componentWillReceiveProps(nextProps) { + if (!equal(this.props, nextProps)) { + this.renderChart(nextProps.data); + } + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resize); + if (this.chart) { + this.chart.destroy(); + } + this.resize.cancel(); + } + + @Bind() + @Debounce(200) + resize() { + if (!this.node) { + return; + } + this.renderChart([]); + } + + handleRef = (n) => { + this.node = n; + }; + + renderChart(data) { + const { + xUnit = '', yUnit = '', height, style, + } = this.props; + const textMyStyle = {}; + if (style !== undefined) { + if (style.color !== undefined) { + textMyStyle.fill = style.color; + } + } + if (!data || (data && data.length < 1)) return; + // clean + if (this.chart) { + this.chart.destroy(); + } + this.node.innerHTML = ''; + const chart = new Chart({ + container: this.node, + autoFit: true, /* 图标自适应 */ + height, + padding: 'auto', + }); + chart.axis('x', { + label: { + formatter: (val) => { + return `${val}${xUnit}`; + }, + textStyle: textMyStyle, + }, + }); + chart.axis('y', { + label: { + formatter: (val) => { + return `${val}${yUnit}`; + }, + textStyle: textMyStyle, + }, + }); + chart.data(data); + chart.tooltip({ + showTitle: false, + }); + chart.interval().position('x*y').tooltip('x*y', (name, value) => { + return { + name: `${name}${xUnit}`, + value: `${value}${yUnit}`, + }; + }); + chart.render(); + this.chart = chart; + } + + render() { + const { height } = this.props; + return ( +
+
+
+ ); + } +} + +export default Columnar; diff --git a/src/components/Charts/ColumnarGroup/index.js b/src/components/Charts/ColumnarGroup/index.js new file mode 100644 index 0000000..859d306 --- /dev/null +++ b/src/components/Charts/ColumnarGroup/index.js @@ -0,0 +1,96 @@ +/* eslint-disable no-undef */ +import React, { PureComponent } from 'react'; +import { Chart } from '@antv/g2'; +import Debounce from 'lodash-decorators/debounce'; +import Bind from 'lodash-decorators/bind'; +import equal from '../equal'; + +class ColumnarGroup extends PureComponent { + componentDidMount() { + this.renderChart(this.props.data); + window.addEventListener('resize', this.resize); + } + + componentWillReceiveProps(nextProps) { + if (!equal(this.props, nextProps)) { + this.renderChart(nextProps.data); + } + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resize); + if (this.chart) { + this.chart.destroy(); + } + this.resize.cancel(); + } + + @Bind() + @Debounce(200) + resize() { + if (!this.node) { + return; + } + this.renderChart([]); + } + + handleRef = (n) => { + this.node = n; + }; + + renderChart(data) { + const { xUnit = '', yUnit = '', height } = this.props; + if (!data || (data && data.length < 1)) return; + // clean + if (this.chart) { + this.chart.destroy(); + } + this.node.innerHTML = ''; + const chart = new Chart({ + container: this.node, + autoFit: true, /* 图标自适应s */ + height, + padding: 'auto', + }); + chart.axis('x', { + label: { + formatter: (val) => { + return `${val}${xUnit}`; + }, + }, + }); + chart.axis('y', { + label: { + formatter: (val) => { + return `${val}${yUnit}`; + }, + }, + }); + chart.data(data); + chart + .interval() + .position('x*y') + .color('type') + .adjust([{ + type: 'dodge', + marginRatio: 1 / 32, + }]) + .tooltip('x*y*type', (name, value, type) => { + return { + title: `${name}${xUnit}`, + name: type, + value: `${value}${yUnit}`, + }; + }); + chart.render(); + this.chart = chart; + } + + render() { + return ( +
+ ); + } +} + +export default ColumnarGroup; diff --git a/src/components/Charts/ColumnarStack/index.js b/src/components/Charts/ColumnarStack/index.js new file mode 100644 index 0000000..fc454b5 --- /dev/null +++ b/src/components/Charts/ColumnarStack/index.js @@ -0,0 +1,98 @@ +import React, { PureComponent } from 'react'; +import { Chart } from '@antv/g2'; +import DataSet from '@antv/data-set'; +import Debounce from 'lodash-decorators/debounce'; +import Bind from 'lodash-decorators/bind'; +import equal from '../equal'; + +class ColumnarStack extends PureComponent { + componentDidMount() { + this.renderChart(this.props.data); + window.addEventListener('resize', this.resize); + } + + componentWillReceiveProps(nextProps) { + if (!equal(this.props, nextProps)) { + this.renderChart(nextProps.data); + } + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resize); + if (this.chart) { + this.chart.destroy(); + } + this.resize.cancel(); + } + + @Bind() + @Debounce(200) + resize() { + if (!this.node) { + return; + } + this.renderChart([]); + } + + handleRef = (n) => { + this.node = n; + }; + + renderChart(data) { + const { xUnit = '', yUnit = '', height } = this.props; + if (!data || (data && data.length < 1)) return; + // clean + if (this.chart) { + this.chart.destroy(); + } + this.node.innerHTML = ''; + const chart = new Chart({ + container: this.node, + autoFit: true, /* 图标自适应 */ + height, + padding: 'auto', + }); + // 计算每个柱子的占比 + const ds = new DataSet(); + const dv = ds.createView().source(data).transform({ + type: 'percent', + field: 'y', // 统计销量 + dimension: 'type', // 每年的占比 + groupBy: ['x'], // 以不同产品类别为分组 + as: 'percent', + }); + chart.data(dv.rows, { + percent: { + min: 0, + formatter: (val) => { + return `${(val * 100).toFixed(2)}${yUnit}`; + }, + }, + }); + chart.axis('x', { + label: { + formatter: (val) => { + return `${val}${xUnit}`; + }, + }, + }); + chart.interval().adjust('stack').position('x*percent').color('type') + .tooltip('x*y*type', (name, value, type) => { + return { + title: `${name}${xUnit}`, + name: type, + value: `${value}`, + }; + }); + chart.render(); + this.chart = chart; + } + + render() { + return ( +
+ ); + } +} + +export default ColumnarStack; diff --git a/src/components/Charts/EqualColumnarStack/index.js b/src/components/Charts/EqualColumnarStack/index.js new file mode 100644 index 0000000..7d722f0 --- /dev/null +++ b/src/components/Charts/EqualColumnarStack/index.js @@ -0,0 +1,95 @@ +import React, { PureComponent } from 'react'; +import { Chart } from '@antv/g2'; +import DataSet from '@antv/data-set'; +import Debounce from 'lodash-decorators/debounce'; +import Bind from 'lodash-decorators/bind'; +import equal from '../equal'; + +class EqualColumnarStack extends PureComponent { + componentDidMount() { + this.renderChart(this.props); + window.addEventListener('resize', this.resize); + } + + componentWillReceiveProps(nextProps) { + if (!equal(this.props, nextProps)) { + this.renderChart(nextProps); + } + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resize); + if (this.chart) { + this.chart.destroy(); + } + this.resize.cancel(); + } + + @Bind() + @Debounce(200) + resize() { + if (!this.node) { + return; + } + this.renderChart(this.props); + } + + handleRef = (n) => { + this.node = n; + }; + + renderChart(props) { + const { + fields, yName: value, xName: currkey, onChartClick, chartName, height, + } = props; + const ds = new DataSet(); + const dv = ds.createView().source(props.data); + dv.transform({ + type: 'fold', + fields, + key: currkey, + value, + }); + if (this.chart) { + this.chart.destroy(); + } + this.node.innerHTML = ''; + const chart = new Chart({ + container: this.node, + autoFit: true, + height, + }); + chart.data(dv.rows); + chart.axis(currkey, { + label: { + autoHide: false, // 关闭label默认的自动隐藏 + autoEllipsis: false, // 关闭lable自动省略 + autoRotate: true, // 关闭默认的label超长自动旋转 默认时右下45度旋转 + formatter: (val) => { + return `${val}`; + }, + }, + }); + chart.interval().adjust('stack') + .position(`${currkey}*${value}`) + .color('name'); + /* .active(true) + .tooltip(false); */ + chart.on('interval:dblclick', (ev) => { + const cdata = ev.data; + if (cdata) { + const { data } = cdata; + onChartClick(chartName, data); + } + }); + chart.render(); + this.chart = chart; + } + render() { + return ( +
+ ); + } +} + +export default EqualColumnarStack; diff --git a/src/components/Charts/Gantt/Gantt.css b/src/components/Charts/Gantt/Gantt.css new file mode 100644 index 0000000..3d991ce --- /dev/null +++ b/src/components/Charts/Gantt/Gantt.css @@ -0,0 +1,3 @@ +.gantt-container { + height: 100%; +} diff --git a/src/components/Charts/Gantt/MessageArea/Message.js b/src/components/Charts/Gantt/MessageArea/Message.js new file mode 100644 index 0000000..cc47bc7 --- /dev/null +++ b/src/components/Charts/Gantt/MessageArea/Message.js @@ -0,0 +1,24 @@ +import React, { Component } from 'react'; + +class MessageArea extends Component { + render() { + const messages = this.props.messages.map(({ message }) => { + return
  • {message}
  • ; + }); + + return ( +
    +

    Messages:

    +
      + {messages} +
    +
    + ); + } +} + +MessageArea.defaultProps = { + messages: [], +}; + +export default MessageArea; diff --git a/src/components/Charts/Gantt/MessageArea/MessageArea.css b/src/components/Charts/Gantt/MessageArea/MessageArea.css new file mode 100644 index 0000000..5afea0d --- /dev/null +++ b/src/components/Charts/Gantt/MessageArea/MessageArea.css @@ -0,0 +1,18 @@ +.message-area { + background: #ebebeb; + height: 200px; + overflow: auto; + padding: 10px; + box-sizing:border-box; +} + +.message-area ul{ + margin: 0; + padding: 0; + list-style: none; +} + +.message-area li:before { + content: "\003e"; + padding-right: 10px; +} diff --git a/src/components/Charts/Gantt/MessageArea/index.js b/src/components/Charts/Gantt/MessageArea/index.js new file mode 100644 index 0000000..34151e8 --- /dev/null +++ b/src/components/Charts/Gantt/MessageArea/index.js @@ -0,0 +1,4 @@ +import MessageArea from './MessageArea'; +import './MessageArea.css'; + +export default MessageArea; diff --git a/src/components/Charts/Gantt/index.js b/src/components/Charts/Gantt/index.js new file mode 100644 index 0000000..7aef89a --- /dev/null +++ b/src/components/Charts/Gantt/index.js @@ -0,0 +1,120 @@ +import React, { Component } from 'react'; +import { gantt } from 'dhtmlx-gantt'; +import 'dhtmlx-gantt/codebase/dhtmlxgantt.css'; +import './Gantt.css'; + + +class Gantt extends Component { + componentDidMount() { + gantt.plugins({ + tooltip: true, // 鼠标划过任务是否显示明细 + // auto_scheduling: true,//根据任务之间的关系自动安排任务 + // multiselect: true, //为任务激活多任务选择 + }); + gantt.config.xml_date = '%Y-%m-%d %H:%i'; /* 时间格式 年月日 时分 */ + gantt.config.reorder_grid_columns = true; /* 左侧列可拖动 */ + gantt.config.grid_elastic_columns = true; + // gantt.config.readonly = true;// 只读模式的甘特图 + const { tasks } = this.props; + gantt.init(this.ganttContainer); + this.initGanttDataProcessor(); + gantt.parse(tasks); + } + + + shouldComponentUpdate(nextProps) { + // const { tasks } = nextProps; + // return tasks !== undefined; + return this.props.zoom !== nextProps.zoom; + } + componentDidUpdate() { + gantt.clearAll(); + const { tasks } = this.props; + gantt.init(this.ganttContainer); + this.initGanttDataProcessor(); + gantt.parse(tasks); + } + componentWillUnmount() { + if (this.dataProcessor) { + this.dataProcessor.destructor(); + this.dataProcessor = null; + } + } + setZoom = (value) => { + const scale = value.scale !== undefined ? value.scale : 'Minutes'; + const step = value.step !== undefined ? value.step : 10; + switch (scale) { + case 'Minutes': + gantt.config.duration_unit = 'minute'; + gantt.config.scale_unit = 'day'; + gantt.config.date_scale = '%Y-%m-%d'; + gantt.setWorkTime({ hours: ['00:30-03:30'] }); + gantt.config.scale_height = 60; + gantt.config.min_column_width = 40; + gantt.config.subscales = [ + { unit: 'minute', step, date: '%H:%i' }, + ]; + break; + case 'Hours': + gantt.config.scale_unit = 'day'; + gantt.config.date_scale = '%d %M'; + + gantt.config.scale_height = 60; + gantt.config.min_column_width = 30; + gantt.config.subscales = [ + { unit: 'hour', step, date: '%H' }, + ]; + break; + case 'Days': + gantt.config.min_column_width = 70; + gantt.config.scale_unit = 'week'; + gantt.config.date_scale = '#%W'; + gantt.config.subscales = [ + { unit: 'day', step, date: '%d %M' }, + ]; + gantt.config.scale_height = 60; + break; + case 'Months': + gantt.config.min_column_width = 70; + gantt.config.scale_unit = 'month'; + gantt.config.date_scale = '%F'; + gantt.config.scale_height = 60; + gantt.config.subscales = [ + { unit: 'week', step, date: '#%W' }, + ]; + break; + default: + break; + } + } + initGanttDataProcessor =() => { + // eslint-disable-next-line prefer-destructuring + const onDataUpdated = this.props.onDataUpdated; + if (this.dataProcessor) { + this.dataProcessor.destructor(); + this.dataProcessor = null; + } + this.dataProcessor = gantt.createDataProcessor((type, action, item, id) => { + return new Promise((resolve) => { + if (onDataUpdated) { + onDataUpdated(type, action, item, id); + } + + // if onDataUpdated changes returns a permanent id of the created item, you can return it from here so dhtmlxGantt could apply it + // resolve({id: databaseId}); + return resolve(); + }); + }); + } + render() { + const { zoom } = this.props; + this.setZoom(zoom); + return ( +
    { this.ganttContainer = input; }} + style={{ width: '100%', height: '100%' }} + /> + ); + } +} +export default Gantt; diff --git a/src/components/Charts/Gauge/index.js b/src/components/Charts/Gauge/index.js new file mode 100644 index 0000000..259255d --- /dev/null +++ b/src/components/Charts/Gauge/index.js @@ -0,0 +1,235 @@ +import React, { PureComponent } from 'react'; +import G2 from 'g2'; +import Bind from 'lodash-decorators/bind'; +import Debounce from 'lodash-decorators/debounce'; +import equal from '../equal'; + +const { Shape } = G2; + +const primaryColor = '#2F9CFF'; +const backgroundColor = '#F0F2F5'; + +/* eslint no-underscore-dangle: 0 */ +class Gauge extends PureComponent { + componentDidMount() { + setTimeout(() => { + this.renderChart(); + }, 10); + window.addEventListener('resize', this.resize); + } + + componentWillReceiveProps(nextProps) { + if (!equal(this.props, nextProps)) { + setTimeout(() => { + this.renderChart(nextProps); + }, 10); + } + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resize); + // if (this.chart) { + // console.log('data', this.chart); + // this.chart.destroy(); + // } + this.resize.cancel(); + } + + @Bind() + @Debounce(200) + resize() { + if (!this.node) { + return; + } + this.renderChart([]); + } + + handleRef = (n) => { + this.node = n; + }; + + initChart(nextProps) { + const { xUnit, color = primaryColor } = nextProps || this.props; + + Shape.registShape('point', 'dashBoard', { + drawShape(cfg, group) { + const originPoint = cfg.points[0]; + const point = this.parsePoint({ x: originPoint.x, y: 0.4 }); + + const center = this.parsePoint({ + x: 0, + y: 0, + }); + + const shape = group.addShape('polygon', { + attrs: { + points: [ + [center.x, center.y], + [point.x + 8, point.y], + [point.x + 8, point.y - 2], + [center.x, center.y - 2], + ], + radius: 2, + lineWidth: 2, + arrow: false, + fill: color, + }, + }); + + group.addShape('Marker', { + attrs: { + symbol: 'circle', + lineWidth: 2, + fill: color, + radius: 8, + x: center.x, + y: center.y, + }, + }); + group.addShape('Marker', { + attrs: { + symbol: 'circle', + lineWidth: 2, + fill: '#fff', + radius: 5, + x: center.x, + y: center.y, + }, + }); + + const { origin } = cfg; + group.addShape('text', { + attrs: { + x: center.x, + y: center.y + 80, + text: `${origin._origin.value}%`, + textAlign: 'center', + fontSize: 24, + fill: 'rgba(0, 0, 0, 0.85)', + }, + }); + group.addShape('text', { + attrs: { + x: center.x, + y: center.y + 45, + text: xUnit, + textAlign: 'center', + fontSize: 14, + fill: 'rgba(0, 0, 0, 0.43)', + }, + }); + + return shape; + }, + }); + } + + renderChart(nextProps) { + if (this.node.offsetWidth === 0) { + return; + } + const { + height, color = primaryColor, bgColor = backgroundColor, xUnit, + } = nextProps || this.props; + const data = [{ name: xUnit, value: this.props.data }]; + + if (this.chart) { + this.chart.clear(); + } + if (this.chart) { + this.chart.destroy(); + } + if (this.node) { + this.node.innerHTML = ''; + } + + this.initChart(nextProps); + const chart = new G2.Chart({ + container: this.node, + forceFit: true, + height, + animate: false, + plotCfg: { + margin: [10, 10, 30, 10], + }, + }); + + chart.source(data); + + chart.tooltip(false); + + chart.coord('gauge', { + startAngle: -1.2 * Math.PI, + endAngle: 0.20 * Math.PI, + }); + chart.col('value', { + type: 'linear', + nice: true, + min: 0, + max: 100, + tickCount: 6, + }); + chart.axis('value', { + subTick: false, + tickLine: { + stroke: color, + lineWidth: 2, + value: -14, + }, + labelOffset: -12, + formatter: (val) => { + switch (parseInt(val, 10)) { + case 20: + return '差'; + case 40: + return '中'; + case 60: + return '良'; + case 80: + return '优'; + default: + return ''; + } + }, + }); + chart.point().position('value').shape('dashBoard'); + draw(data); + + /* eslint no-shadow: 0 */ + function draw(data) { + const val = data[0].value; + const lineWidth = 12; + chart.guide().clear(); + + chart.guide().arc(() => { + return [0, 0.95]; + }, () => { + return [val, 0.95]; + }, { + stroke: color, + lineWidth, + }); + + chart.guide().arc(() => { + return [val, 0.95]; + }, (arg) => { + return [arg.max, 0.95]; + }, { + stroke: bgColor, + lineWidth, + }); + + chart.changeData(data); + } + + this.chart = chart; + } + + render() { + return ( +
    + ); + } +} + +export default Gauge; diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js new file mode 100644 index 0000000..caed52c --- /dev/null +++ b/src/components/Charts/Pie/index.js @@ -0,0 +1,279 @@ +/* eslint-disable no-undef, jsx-a11y/no-noninteractive-element-interactions */ +import React, { Component } from 'react'; +import G2 from 'g2'; +import { Divider } from 'antd'; +import classNames from 'classnames'; +import ReactFitText from 'react-fittext'; +import Debounce from 'lodash-decorators/debounce'; +import Bind from 'lodash-decorators/bind'; +import equal from '../equal'; +import styles from './index.less'; +import Charts from '../index.js'; + +/* eslint react/no-danger:0 */ +class Pie extends Component { + constructor(props) { + super(props); + this.state = { + legendData: [], + legendBlock: true, + }; + } + + componentDidMount() { + this.renderChart(); + this.resize(); + window.addEventListener('resize', this.resize); + } + + componentWillReceiveProps(nextProps) { + if (!equal(this.props, nextProps)) { + this.renderChart(nextProps.data); + } + } + + componentWillUnmount() { + window.removeEventListener('resize', this.resize); + if (this.chart) { + this.chart.destroy(); + } + this.resize.cancel(); + } + + @Bind() + @Debounce(300) + resize() { + const { hasLegend } = this.props; + if (!hasLegend || !this.root) { + window.removeEventListener('resize', this.resize); + return; + } + if (this.root.parentNode.clientWidth <= 380) { + if (!this.state.legendBlock) { + this.setState({ + legendBlock: true, + }, () => { + this.renderChart(); + }); + } + } else if (this.state.legendBlock) { + this.setState({ + legendBlock: false, + }, () => { + this.renderChart(); + }); + } + } + + handleRef = (n) => { + this.node = n; + }; + + handleRoot = (n) => { + this.root = n; + }; + + handleLegendClick = (item, i) => { + const newItem = item; + newItem.checked = !newItem.checked; + + const { legendData } = this.state; + legendData[i] = newItem; + + if (this.chart) { + const filterItem = legendData.filter(l => l.checked).map(l => l.x); + this.chart.filter('x', filterItem); + this.chart.repaint(); + } + + this.setState({ + legendData, + }); + }; + + renderChart(d) { + if (this.node.offsetWidth === 0) { + return; + } + let data = d || this.props.data; + + const { + height = 0, + hasLegend, + fit = true, + margin = [12, 0, 12, 0], percent, color, + inner = 0.75, + animate = true, + colors, + lineWidth = 0, + } = this.props; + + const defaultColors = colors; + + let selected = this.props.selected || true; + let tooltip = this.props.tooltips || true; + + let formatColor; + if (percent) { + selected = false; + tooltip = false; + formatColor = (value) => { + if (value === '占比') { + return color || 'rgba(24, 144, 255, 0.85)'; + } else { + return '#F0F2F5'; + } + }; + + /* eslint no-param-reassign: */ + data = [ + { + x: '占比', + y: parseFloat(percent), + }, + { + x: '反比', + y: 100 - parseFloat(percent), + }, + ]; + } + + if (!data || (data && data.length < 1)) { + return; + } + + // clean + this.node.innerHTML = ''; + + const { Stat } = G2; + + const chart = new G2.Chart({ + container: this.node, + forceFit: fit, + height, + plotCfg: { + margin, + }, + animate, + }); + + if (!tooltip) { + chart.tooltip(false); + } else { + chart.tooltip({ + title: null, + }); + } + + chart.axis(false); + chart.legend(false); + chart.source(data, { + x: { + type: 'cat', + range: [0, 1], + }, + y: { + min: 0, + }, + }); + + chart.coord('theta', { + inner, + }); + // chart.changeSize(180, 216);// 设置图标的高度 + chart + .intervalStack() + .position(Stat.summary.percent('y')) + .style({ lineWidth, stroke: '#fff' }) + .color('x', percent ? formatColor : defaultColors) + .selected(selected); + + chart.render(); + + this.chart = chart; + + let legendData = []; + if (hasLegend) { + const geom = chart.getGeoms()[0]; // 获取所有的图形 + const items = geom.getData(); // 获取图形对应的数据 + legendData = items.map((item) => { + /* eslint no-underscore-dangle:0 */ + const origin = item._origin; + origin.color = item.color; + origin.checked = true; + return origin; + }); + } + + this.setState({ + legendData, + }); + } + + render() { + const { + valueFormat, subTitle, hasLegend, className, style, data = [], + } = this.props; + let { projectName } = this.props; /* 项目名称 */ + projectName = projectName === undefined || projectName === null ? '' : projectName; + const { yuan } = Charts; + // const total = hasLegend ? yuan(data.reduce((pre, now) => now.y + pre, 0)) : this.props.total; + const total = hasLegend ? data.reduce((pre, now) => now.y + pre, 0).toFixed(0) : this.props.total; /* 保留两位小数 */ + const { legendData, legendBlock } = this.state; + const pieClassName = classNames(styles.pie, className, { + [styles.hasLegend]: !!hasLegend, + [styles.legendBlock]: legendBlock, + }); + return ( +
    + +
    +
    + { + (subTitle || total) && ( +
    + {subTitle &&

    {subTitle}

    } + { + // eslint-disable-next-line + total &&
    + } +
    + ) + } +
    + + + { + hasLegend && ( +
      -1 ? styles.legendBigScreen : styles.legend} + style={location.pathname.indexOf('indexMobile') > -1 ? { width: 100 } : { width: 100 }} + > + { + legendData.map((item, i) => ( +
    • this.handleLegendClick(item, i)}> + + -1 ? styles.spanStyle : ''}`}>{item.x} + + {location.pathname.indexOf('indexMobile') > -1 ? '' : '' + // {`${(item['..percent'] * 100).toFixed(2)}%`} + } + +
    • + )) + } +
    + ) + } +
    + ); + } +} + +export default Pie; diff --git a/src/components/Charts/Pie/index.less b/src/components/Charts/Pie/index.less new file mode 100644 index 0000000..3013b17 --- /dev/null +++ b/src/components/Charts/Pie/index.less @@ -0,0 +1,129 @@ +@import "~antd/lib/style/themes/default.less"; + +.pie { + position: relative; + .chart { + position: relative; + } + &.hasLegend .chart { + width: ~"calc(100% - 110px)"!important; + } + .legend { + position: absolute!important; + right: 0; + min-width: 100px; + top: 50%; + transform: translateY(-50%)!important; + margin: 0 0 0 10px; + list-style: none; + padding: 0; + li { + width: 100%; + cursor: pointer; + margin-bottom: 0; + height: 16px; + line-height: 16px; + &:last-child { + margin-bottom: 0; + } + } + } + + .legendBigScreen { /* 大屏纵向排列 */ + position: relative!important; + right: 0; + min-width: 48%; + top: 50%; + transform: translateY(-50%)!important; + margin: 0; + list-style: none; + padding: 0; + li { + width: 100%; + cursor: pointer; + margin-bottom: 0; + height: 22px; + line-height: 22px; + &:last-child { + margin-bottom: 0; + } + } + } + .dot { + border-radius: 8px; + display: inline-block; + margin-right: 8px; + position: relative; + top: -1px; + height: 8px; + width: 8px; + } + .line { + background-color: @border-color-split; + display: inline-block; + margin-right: 8px; + width: 1px; + height: 16px; + } + .legendTitle { + color: @text-color; + } + .spanStyle{ + width: 50%; + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .percent { + color: @text-color-secondary; + } + .value { + position: absolute; + right: 0; + } + .title { + margin-bottom: 8px; + } + .total { + position: absolute; + left: 50%; + top: 50%; + text-align: center; + height: 62px; + transform: translate(-50%, -50%); + display: flex; + align-items: center; + justify-content: center; + & > div { + font-size: 24px; + } + & > h4 { + color: @text-color-secondary; + font-size: 14px; + line-height: 22px; + height: 22px; + margin-bottom: 8px; + font-weight: normal; + } + & > p { + color: @heading-color; + display: block; + font-size: 1.2em; + height: 32px; + line-height: 32px; + white-space: nowrap; + } + } +} + +.legendBlock { + &.hasLegend .chart { + width: 100%; + margin: 0 0 32px 0; + } + .legend { + position: relative; + transform: none; + } +} diff --git a/src/components/Charts/PieGroup/index.js b/src/components/Charts/PieGroup/index.js new file mode 100644 index 0000000..2d6cb73 --- /dev/null +++ b/src/components/Charts/PieGroup/index.js @@ -0,0 +1,31 @@ +import React, { Component } from 'react'; +import { Row, Col } from 'antd'; +import { getTheme } from '@antv/g2'; +import Pie from '../Pie'; + +class PieGroup extends Component { + render() { + const { data, height } = this.props; + const column = 24 / data.length; + const { colors10: colors } = getTheme(); + return ( + + { + data.map((child, i) => { + const { sId } = child; + child.height = height; + child.color = colors[i]; + return ( + + + + ); + }) + } + + ); + } +} + +export default PieGroup; + diff --git a/src/components/Charts/TimeLineGroup/index.js b/src/components/Charts/TimeLineGroup/index.js new file mode 100644 index 0000000..1f147b9 --- /dev/null +++ b/src/components/Charts/TimeLineGroup/index.js @@ -0,0 +1,81 @@ +/* eslint-disable object-curly-newline */ +import React, { Component } from 'react'; +import { Row, Col, Tabs } from 'antd'; +import TimeLineChart from '../TimelineChart'; +import NumberInfo from '../../NumberInfo'; +import Pie from '../Pie'; +import styles from '../index.less'; +import * as utils from '../../../utils/utils'; + +const { TabPane } = Tabs; + +class TimeLineGroup extends Component { + constructor(props) { + super(props); + this.state = { + offlineCard: styles.offlineCard, + tabGroup: styles.tabGroup, + currentTabKey: utils.isNotEmptyArr(props.data) ? props.data[0].x : '', + }; + } + + handleTabChange = (key) => { + this.setState({ + currentTabKey: key, + }); + }; + + render() { + const { offlineCard, currentTabKey, tabGroup } = this.state; + const { data, titleMap, subTitle, yUnit } = this.props; + const TabGroup = ({ tabData, currentTabKey: currentKey }) => ( + + + + + + + + + ); + return ( + + { + data.map(item => ( + } + key={item.x} + > + + )) + } + + ); + } +} + +export default TimeLineGroup; + diff --git a/src/components/Charts/TimelineChart/index.js b/src/components/Charts/TimelineChart/index.js new file mode 100644 index 0000000..5a0d3ea --- /dev/null +++ b/src/components/Charts/TimelineChart/index.js @@ -0,0 +1,139 @@ +import React, { Component } from 'react'; +import G2 from 'g2'; +import Slider from 'g2-plugin-slider'; +import styles from './index.less'; + +class TimelineChart extends Component { + componentDidMount() { + this.renderChart(this.props.data); + } + + componentWillReceiveProps(nextProps) { + if (nextProps.data !== this.props.data) { + this.renderChart(nextProps.data); + } + } + + componentWillUnmount() { + if (this.chart) { + this.chart.destroy(); + } + if (this.slider) { + this.slider.destroy(); + } + } + + sliderId = `timeline-chart-slider-${Math.random() * 1000}`; + handleRef = (n) => { + this.node = n; + }; + + renderChart(data) { + const { + height = 400, margin = [60, 20, 40, 70], titleMap, borderWidth = 2, yUnit = '', + } = this.props; + if (!data || (data && data.length < 1)) { + return; + } + + // clean + if (this.sliderId) { + // eslint-disable-next-line no-undef + document.getElementById(this.sliderId).innerHTML = ''; + } + if (this.chart) { + this.chart.destroy(); + } + if (this.slider) { + this.slider.destroy(); + } + this.node.innerHTML = ''; + const chart = new G2.Chart({ + container: this.node, + forceFit: true, + height, + plotCfg: { + margin, + }, + }); + + chart.axis('x', { + title: false, + }); + chart.axis('y1', { + title: false, + }); + chart.axis('y2', false); + + chart.legend({ + mode: false, + position: 'top', + marker: 'square', + }); + + let max; + if (data[0] && data[0].y1 && data[0].y2) { + max = Math.max( + data.sort((a, b) => b.y1 - a.y1)[0].y1, + data.sort((a, b) => b.y2 - a.y2)[0].y2, + ); + } + + chart.source(data, { + x: { + type: 'timeCat', + tickCount: 20, + mask: 'mm-dd', + range: [0, 1], + }, + y1: { + alias: titleMap.y1, + max, + min: 0, + formatter: (val) => { + return `${val}${yUnit}`; + }, + }, + y2: { + alias: titleMap.y2, + max, + min: 0, + formatter: (val) => { + return `${val}${yUnit}`; + }, + }, + }); + + chart.line().position('x*y1').color('#1890FF').size(borderWidth); + chart.line().position('x*y2').color('#2FC25B').size(borderWidth); + + this.chart = chart; + + /* eslint new-cap:0 */ + const slider = new Slider({ + domId: this.sliderId, + height: 26, + xDim: 'x', + yDim: 'y1', + charts: [chart], + }); + slider.render(); + + this.slider = slider; + } + + render() { + const { height, title } = this.props; + return ( +
    +
    + { title &&

    {title}

    } +
    +
    +
    +
    + ); + } +} + +export default TimelineChart; diff --git a/src/components/Charts/TimelineChart/index.less b/src/components/Charts/TimelineChart/index.less new file mode 100644 index 0000000..1751975 --- /dev/null +++ b/src/components/Charts/TimelineChart/index.less @@ -0,0 +1,3 @@ +.timelineChart { + background: #fff; +} diff --git a/src/components/Charts/WaterWave/index.js b/src/components/Charts/WaterWave/index.js new file mode 100644 index 0000000..56509f4 --- /dev/null +++ b/src/components/Charts/WaterWave/index.js @@ -0,0 +1,205 @@ +/* eslint-disable object-curly-newline,no-return-assign */ +import React, { PureComponent } from 'react'; +import styles from './index.less'; + +class WaterWave extends PureComponent { + constructor(props) { + super(props); + this.state = { + radio: 1, + waterWave: styles.waterWave, + waterWaveCanvasWrapper: styles.waterWaveCanvasWrapper, + text: styles.text, + }; + } + + componentDidMount() { + this.renderChart(); + this.resize(); + window.addEventListener('resize', this.resize); + } + + componentWillUnmount() { + cancelAnimationFrame(this.timer); + if (this.node) { + this.node.innerHTML = ''; + } + window.removeEventListener('resize', this.resize); + } + + resize = () => { + const { height } = this.props; + const { offsetWidth } = this.root.parentNode; + this.setState({ + radio: offsetWidth < height ? offsetWidth / height : 1, + }); + }; + + renderChart() { + const { color = '#1890FF' } = this.props; + const data = (this.props.data / 100); + // const self = this; + + if (!this.node || !data) { + return; + } + if (this.timer) { + cancelAnimationFrame(this.timer); + if (this.node) { + this.node.innerHTML = ''; + } + } + + const canvas = this.node; + const ctx = canvas.getContext('2d'); + + const canvasWidth = canvas.width; + const canvasHeight = canvas.height; + const radius = canvasWidth / 2; + const lineWidth = 2; + const cR = radius - (lineWidth); + + ctx.beginPath(); + ctx.lineWidth = lineWidth * 2; + + const axisLength = canvasWidth - (lineWidth); + const unit = axisLength / 8; + const range = 0.2; // 振幅 + let currRange = range; + const xOffset = lineWidth; + let sp = 0; // 周期偏移量 + let currData = 0; + const waveupsp = 0.005; // 水波上涨速度 + + let arcStack = []; + const bR = radius - (lineWidth); + const circleOffset = -(Math.PI / 2); + let circleLock = true; + + for (let i = circleOffset; i < circleOffset + (2 * Math.PI); i += 1 / (8 * Math.PI)) { + arcStack.push([ + radius + (bR * Math.cos(i)), + radius + (bR * Math.sin(i)), + ]); + } + + const cStartPoint = arcStack.shift(); + ctx.strokeStyle = color; + ctx.moveTo(cStartPoint[0], cStartPoint[1]); + + function drawSin() { + ctx.beginPath(); + ctx.save(); + + const sinStack = []; + for (let i = xOffset; i <= xOffset + axisLength; i += Math.ceil(20 / axisLength)) { + const x = sp + ((xOffset + i) / unit); + const y = Math.sin(x) * currRange; + const dx = i; + const dy = ((2 * cR * (1 - currData)) + (radius - cR)) - (unit * y); + ctx.lineTo(dx, dy); + sinStack.push([dx, dy]); + } + + const startPoint = sinStack.shift(); + + ctx.lineTo(xOffset + axisLength, canvasHeight); + ctx.lineTo(xOffset, canvasHeight); + ctx.lineTo(startPoint[0], startPoint[1]); + + const gradient = ctx.createLinearGradient(0, 0, 0, canvasHeight); + gradient.addColorStop(0, '#ffffff'); + gradient.addColorStop(1, '#1890FF'); + ctx.fillStyle = gradient; + ctx.fill(); + ctx.restore(); + } + + function render1() { + ctx.clearRect(0, 0, canvasWidth, canvasHeight); + if (circleLock) { + if (arcStack.length) { + const temp = arcStack.shift(); + ctx.lineTo(temp[0], temp[1]); + ctx.stroke(); + } else { + circleLock = false; + ctx.lineTo(cStartPoint[0], cStartPoint[1]); + ctx.stroke(); + arcStack = null; + + ctx.globalCompositeOperation = 'destination-over'; + ctx.beginPath(); + ctx.lineWidth = lineWidth; + ctx.arc(radius, radius, bR, 0, 2 * Math.PI, 1); + + ctx.beginPath(); + ctx.save(); + ctx.arc(radius, radius, radius - (3 * lineWidth), 0, 2 * Math.PI, 1); + + ctx.restore(); + ctx.clip(); + ctx.fillStyle = '#1890FF'; + } + } else { + if (data >= 0.85) { + if (currRange > range / 4) { + const t = range * 0.01; + currRange -= t; + } + } else if (data <= 0.1) { + if (currRange < range * 1.5) { + const t = range * 0.01; + currRange += t; + } + } else { + if (currRange <= range) { + const t = range * 0.01; + currRange += t; + } + if (currRange >= range) { + const t = range * 0.01; + currRange -= t; + } + } + if ((data - currData) > 0) { + currData += waveupsp; + } + if ((data - currData) < 0) { + currData -= waveupsp; + } + + sp += 0.07; + drawSin(); + } + // self.timer = requestAnimationFrame(render1); //此句直接导致死循环 + } + + render1(); + } + + render() { + const { radio, waterWave, waterWaveCanvasWrapper, text } = this.state; + const { data, xUnit, height } = this.props; + return ( +
    (this.root = n)} style={{ transform: `scale(${radio})` }}> +
    + (this.node = n)} + width={(height - 24) * 2} + height={(height - 24) * 2} + /> +
    +
    + { + xUnit && {xUnit} + } +

    {data}%

    +
    +
    + ); + } +} + +export default WaterWave; diff --git a/src/components/Charts/WaterWave/index.less b/src/components/Charts/WaterWave/index.less new file mode 100644 index 0000000..4ded14d --- /dev/null +++ b/src/components/Charts/WaterWave/index.less @@ -0,0 +1,29 @@ +@import "~antd/lib/style/themes/default.less"; + +.waterWave { + display: block; + position: relative; + transform-origin: left; + padding: 12px 0; + .text { + position: absolute; + left: 0; + top: 20%; + text-align: center; + width: 100%; + span { + color: @text-color-secondary; + font-size: 14px; + line-height: 22px; + } + h4 { + color: @heading-color; + line-height: 32px; + font-size: 24px; + } + } + .waterWaveCanvasWrapper { + transform: scale(.5); + transform-origin: 0 0; + } +} diff --git a/src/components/Charts/equal.js b/src/components/Charts/equal.js new file mode 100644 index 0000000..ff3a4c7 --- /dev/null +++ b/src/components/Charts/equal.js @@ -0,0 +1,17 @@ +/* eslint eqeqeq: 0 */ + +function equal(old, target) { + let r = true; + for (const prop in old) { + if (typeof old[prop] === 'function' && typeof target[prop] === 'function') { + if (old[prop].toString() != target[prop].toString()) { + r = false; + } + } else if (old[prop] != target[prop]) { + r = false; + } + } + return r; +} + +export default equal; diff --git a/src/components/Charts/index.js b/src/components/Charts/index.js new file mode 100644 index 0000000..8b483a3 --- /dev/null +++ b/src/components/Charts/index.js @@ -0,0 +1,33 @@ +import numeral from 'numeral'; +import Bar from './Bar'; +import Columnar from './Columnar'; +import ColumnarGroup from './ColumnarGroup'; +import BrokenLine from './BrokenLine'; +import WaterWave from './WaterWave'; +import Gauge from './Gauge'; +import ColumnarStack from './ColumnarStack'; +import PieGroup from './PieGroup'; +import Pie from './Pie'; +import TimeLineChart from './TimelineChart'; +import TimeLineGroup from './TimeLineGroup'; +import EqualColumnarStack from './EqualColumnarStack'; +import ColorBlock from './ColorBlock'; +/* update by zz 20201227 */ +// const yuan = val => `¥ ${numeral(val).format('0,0')}`; +const yuan = val => `${numeral(val).format('0,0')}`; +export default { + yuan, + Bar, + Columnar, + ColumnarGroup, + BrokenLine, + WaterWave, + Gauge, + ColumnarStack, + PieGroup, + Pie, + TimeLineChart, + TimeLineGroup, + EqualColumnarStack, + ColorBlock, +}; diff --git a/src/components/Charts/index.less b/src/components/Charts/index.less new file mode 100644 index 0000000..cc964cc --- /dev/null +++ b/src/components/Charts/index.less @@ -0,0 +1,72 @@ +@import "~antd/lib/style/themes/default.less"; +.char { + margin: 24px; +} + +.commonChar { + padding-top: 10px; + padding-bottom: 10px; + background: #888; + :global{ + .ant-col-18{ + padding-right: 24px; + } + .ant-card-body{ + overflow: hidden; + } + } + .commonCharContainer { + margin-bottom: 24px; + overflow: hidden; + canvas + div { + display: none; + } + :global { + .ant-card-extra { + padding: 12px 24px!important; + } + } + .commonRollChar{ + .xly-list > .ant-layout{ + margin: 0 !important; + } + } + } +} + +.commonCharPage{ + padding: 105px 20px 0 20px; + background: #888; +} + +.offlineCard { + :global { + .ant-tabs-ink-bar { + bottom: auto; + } + .ant-tabs-bar { + border-bottom: none; + } + .ant-tabs-nav-container-scrolling { + padding-left: 40px; + padding-right: 40px; + } + .ant-tabs-tab-prev-icon:before { + position: relative; + left: 6px; + } + .ant-tabs-tab-next-icon:before { + position: relative; + right: 6px; + } + .ant-tabs-tab-active h4 { + color: @primary-color; + } + } + .tabGroup { + width: 138px; + margin: 8px 0!important; + } +} + + diff --git a/src/components/Common/AntdDraggableDiv.js b/src/components/Common/AntdDraggableDiv.js new file mode 100644 index 0000000..03c2f2c --- /dev/null +++ b/src/components/Common/AntdDraggableDiv.js @@ -0,0 +1,56 @@ +import React, { Component } from 'react'; +import styles from '../../index.less'; + +export default class AntdDraggableDiv extends Component { + constructor(props) { + super(props); + this.state = { + translateX: 0, + translateY: 0, + }; + this.moving = false; + this.lastX = null; + this.lastY = null; + window.onmouseup = e => this.onMouseUp(e); + window.onmousemove = e => this.onMouseMove(e); + } + onMouseDown(e) { + e.stopPropagation(); + this.moving = true; + } + + onMouseUp() { + this.moving = false; + this.lastX = null; + this.lastY = null; + } + + onMouseMove(e) { + if (this.moving) { + this.onMove(e); + } + } + + onMove(e) { + if (this.lastX && this.lastY) { + const dx = e.clientX - this.lastX; + const dy = e.clientY - this.lastY; + this.setState({ translateX: this.state.translateX + dx, translateY: this.state.translateY + dy }); + } + this.lastX = e.clientX; + this.lastY = e.clientY; + } + render() { + const { children, draggableDivClassName } = this.props; + return ( +
    this.onMouseDown(e)} + style={{ transform: `translateX(${this.state.translateX}px)translateY(${this.state.translateY}px)` }} + > + {children} +
    +
    + ); + } +} diff --git a/src/components/Common/AntdDraggableModal.js b/src/components/Common/AntdDraggableModal.js new file mode 100644 index 0000000..b53856a --- /dev/null +++ b/src/components/Common/AntdDraggableModal.js @@ -0,0 +1,182 @@ +import React from 'react'; +import { Modal } from 'antd'; +import './AntdDraggableModal/antDraggle.less'; + + +class AntDraggableModal extends React.Component { + constructor(props) { + super(props); + this.simpleClass = Math.random().toString(36).substring(2); + this.state = { + isDrop: false, + // eslint-disable-next-line react/no-unused-state + offsetLeft: 0, + // eslint-disable-next-line react/no-unused-state + offsetTop: 0, + realizeHeight: 0, + modalHeight: 0, + }; + this.deltaX = 0; + this.deltaY = 0; + this.contain = {}; + this.antModal = {}; + } + + // eslint-disable-next-line react/sort-comp + handleMove = (event) => { + if (this.state.isDrop) { + this.antModal.style.margin = 0; + this.antModal.style.padding = 0; + const left = event.pageX - this.deltaX; + const top = event.pageY - this.deltaY; + // if (left < 0) { + // left = 0; + // } else if (left > (document.offsetWidth - this.antModal.offsetWidth)) { + // left = document.offsetWidth - this.antModal.offsetWidth; + // } + // if (top < 0) { + // top = 0; + // } else if (top > (document.offsetHeight - this.antModal.offsetHeight)) { + // top = document.offsetHeight - this.antModal.offsetHeight; + // } + this.antModal.style.left = `${left}px`; + this.antModal.style.top = `${top}px`; + } + }; + + addResizeListener = () => { + document.addEventListener('mousedown', this.handleResize); + } + + handleResize = (downEl) => { + const ableList = ['resize-s', 'resize-sw', 'resize-se']; + if (ableList.indexOf(downEl.target.className) === -1) { + return; + } + // const modalContent = document.getElementsByClassName('ant-modal-content')[0]; + const modalContent = downEl.target.parentNode.parentNode; + const modalContentHeight = modalContent.offsetHeight; + if (!this.state.modalHeight) { + this.setState({ + modalHeight: modalContentHeight, + }); + } + const modalContentWidth = modalContent.offsetWidth; + const modalContentLeft = modalContent.offsetLeft; + let resizedHeight = 0; + let resizeYPx = 0; + let resizeXPx = 0; + document.onmousemove = (moveEvent) => { + resizeYPx = moveEvent.pageY - downEl.pageY; + resizeXPx = moveEvent.pageX - downEl.pageX; + resizedHeight = this.state.modalHeight + this.state.realizeHeight + resizeYPx; + if (resizedHeight <= this.state.modalHeight) { + return false; + } + switch (downEl.target.className) { + case 'resize-s': + modalContent.style.height = `${resizedHeight}px`; + break; + case 'resize-sw': + modalContent.style.height = `${resizedHeight}px`; + modalContent.style.width = `${modalContentWidth - resizeXPx}px`; + modalContent.style.left = `${modalContentLeft + resizeXPx}px`; + break; + case 'resize-se': + modalContent.style.height = `${resizedHeight}px`; + modalContent.style.width = `${modalContentWidth + resizeXPx}px`; + break; + default: + break; + } + }; + document.onmouseup = () => { + document.onmousemove = null; + document.onmouseup = null; + if (this.state.realizeHeight + resizeYPx <= 0 && this.props.onSaveState) { + this.setState({ + realizeHeight: 0, + }); + this.props.onSaveState({ realizeHeight: this.state.realizeHeight }); + return; + } + if (this.props.onSaveState && resizeYPx !== 0) { + this.setState((prev) => { + return { + realizeHeight: prev.realizeHeight + resizeYPx, + }; + }); + this.props.onSaveState({ realizeHeight: this.state.realizeHeight }); + } + }; + } + + initialEvent = (visible) => { + const { title } = this.props; + if (title && visible) { + setTimeout(() => { + window.removeEventListener('mouseup', this.removeUp, false); + // eslint-disable-next-line prefer-destructuring + this.contain = document.getElementsByClassName(this.simpleClass)[0]; + // eslint-disable-next-line prefer-destructuring + this.header = this.contain.getElementsByClassName('ant-modal-header')[0]; + this.header.style.cursor = 'all-scroll'; + // eslint-disable-next-line prefer-destructuring + this.antModal = this.contain.getElementsByClassName('ant-modal')[0]; + this.header.onmousedown = (e) => { + const disx = e.pageX - this.antModal.offsetLeft; + const disy = e.pageY - this.antModal.offsetTop; + this.deltaX = disx; + this.deltaY = disy; + this.setState({ + isDrop: true, + }); + document.body.onselectstart = () => false; + window.addEventListener('mousemove', this.handleMove.bind(this), false); + }; + window.addEventListener('mouseup', this.removeUp, false); + this.addResizeListener(); + }, 0); + } + }; + + removeUp = () => { + this.setState({ isDrop: false }); + document.body.onselectstart = () => true; + }; + + componentDidMount() { + const { visible = false, open = false } = this.props; + this.initialEvent(open || visible); + } + + componentWillUnmount() { + window.removeEventListener('mousedown', this.handleResize, false); + window.removeEventListener('mouseup', this.removeUp, false); + if (this.props.onSaveState) { + this.props.onSaveState({ realizeHeight: 0 }); + } + } + + render() { + const { + children, wrapClassName, pageLoading, forbidResize, ...other + } = this.props; + + const wrapModalClassName = wrapClassName ? `${wrapClassName} ${this.simpleClass}` : `${this.simpleClass}`; + return ( + + {children} + {!forbidResize &&
    } + {!forbidResize &&
    } + {!forbidResize &&
    } + + ); + } +} +export default AntDraggableModal; diff --git a/src/components/Common/AntdDraggableModal/antDraggle.less b/src/components/Common/AntdDraggableModal/antDraggle.less new file mode 100644 index 0000000..54c933c --- /dev/null +++ b/src/components/Common/AntdDraggableModal/antDraggle.less @@ -0,0 +1,29 @@ +:global { + .ant-modal-content{ + .resize-s{ + width: 100%; + height: 5px; + position: absolute; + left: 0; + bottom: 0; + z-index: 10; + cursor: s-resize; + } + .resize-sw, .resize-se{ + width: 10px; + height: 10px; + position: absolute; + bottom: 0; + z-index: 10; + } + .resize-sw{ + left: 0; + cursor: sw-resize; + } + .resize-se{ + right: 0; + cursor: se-resize; + } + } +} + diff --git a/src/components/Common/ComFunc.js b/src/components/Common/ComFunc.js new file mode 100644 index 0000000..e328573 --- /dev/null +++ b/src/components/Common/ComFunc.js @@ -0,0 +1,658 @@ +/* eslint-disable array-callback-return,no-undef,guard-for-in,object-curly-newline,prefer-destructuring */ +/* 用于存放涉及逻辑的通用方法 */ +import React from 'react'; +import moment from 'moment'; +import ShowTableCell from './ShowTableCell'; +import * as utils from '../../utils/utils'; + +const masterPrefix = 'master.'; /* 主表前缀数据格式:字符串) */ +const slavePrefix = 'slave.'; /* 从表前缀数据格式:字符串) */ + +/** 把主表字段绑定要相应的控件上 */ +export function mapPropsToFields(masterData, Form) { + const result = {}; + Object.keys(masterData).forEach((child) => { + const firstKey = child.substring(0, 1); + if (firstKey !== 't') { + result[child] = Form.createFormField({ value: masterData[child] }); + } else { + const dateFormat = 'YYYY-MM-DD HH:mm:ss'; /* 日期控件显示格式 */ + const value = masterData[child] !== null ? moment(masterData[child], dateFormat) : null; + result[child] = Form.createFormField({ value }); + } + }); + return result; +} + +/** 把从表字段绑定要相应的控件上 */ +export function mapPropsToFieldsSlave(slaveData, Form) { + /* 待用数据声明 */ + const result = []; /* 返回值 */ + const dateFormat = 'YYYY-MM-DD HH:mm:ss'; /* 日期控件显示格式 */ + /* 执行条件 */ + if (utils.isNotEmptyArr(slaveData)) { + /* 遍历每一行从表数据 */ + for (const each of slaveData) { + /* 返回值的内部对象 */ + const resultObj = {}; + /* 遍历每一行从表对象的key */ + for (const key of Object.keys(each)) { + /* 获取key的首字母用于判断类型 */ + const firstKey = key.substring(0, 1); + /* 日期格式的稍作转换 */ + const value = firstKey === 't' ? utils.convertObjToMoment(each[key], dateFormat) : each[key]; + /* 返回值内部对象赋值 */ + resultObj[key] = Form.createFormField({ value }); + } + /* 返回值赋值 */ + result.push(resultObj); + } + } + /* 返回值 */ + return result; +} + +/** 系统参数日期格式化 */ +export function getDateFormat(systemData) { + if (utils.isUndefined(systemData)) { + return 'YYYY-MM-DD'; + } + const sCbxDateTime = systemData.filter(item => (item.sName === 'CbxDateTime')); + const [{ sValue }] = sCbxDateTime; + let dateFormat = 'YYYY-MM-DD'; + if (sValue !== undefined) { + if (sValue === '1') { + dateFormat = 'YYYY-MM-DD HH:mm:ss'; + } else if (sValue === '3') { + dateFormat = 'HH:mm:ss'; + } + } + return dateFormat; +} + + +/** 列表显示日期格式化 */ +export function getDate(props, data) { + const { systemData } = props.app; + const sCbxDateTime = systemData.filter(item => (item.sName === 'CbxDateTime')); + const [{ sValue }] = sCbxDateTime; + if (sValue !== undefined) { + const dataSplit = data.split(' '); + if (sValue === '2') { + data = dataSplit[0]; + } else if (sValue === '3') { + data = dataSplit[1]; + } + } + return data; +} + +/** 获取主表显示的控件集 */ +export function getMasterShowConfig(masterConfig, masterShowConfig) { + if (utils.isEmptyArr(masterShowConfig)) { + const masterConfigData = masterConfig.gdsconfigformslave; + masterShowConfig = masterConfigData.filter(item => item.sName !== '' && item.bVisible && item.showName !== ''); + } + return masterShowConfig; +} + +/** 获取主表默认值 */ +export function getDefaultMasterData(masterShowConfig) { + const masterData = {}; + masterShowConfig.forEach((childConfig) => { + const { sDefault, sName } = childConfig; + if (sDefault !== '') { + masterData[sName] = sDefault; + } + }); + return masterData; +} +/** 根据表配置获取表头 */ +export function getHeaderConfig(config, column) { + if (utils.isEmptyArr(column)) { + const tableConfig = config.gdsconfigformslave; + for (const child of tableConfig) { + if (child.sName !== '' && child.bVisible && child.showName !== '') { + column.push({ + title: child.showName, + dataIndex: child.sName, + width: child.iFitWidth, + }); + } + } + } + return column; +} + +export function getListHeader(config, column) { + if (utils.isEmptyArr(column)) { + const tableConfig = config.gdsconfigformslave; + for (const child of tableConfig) { + if (child.sName !== '' && child.bVisible && child.showName !== '') { + column.push({ + title: child.showName, + dataIndex: child.sName, + width: child.iFitWidth, + render: text => , + }); + } + } + } + return column; +} + + +/** 获取表格宽度 */ +export function getScrollX(columns) { + let scrollX = 37; + for (const each of columns) { + scrollX += each.width; + } + return scrollX; +} + + +/** 控制主表控件是否渲染 */ +export function setIsMasterRender(isMasterRender, renderArr) { + for (const item of Object.keys(isMasterRender)) { + isMasterRender[item] = renderArr.indexOf(item) >= 0; + } + return { ...isMasterRender }; +} + +/** 获取从表显示的控件集 */ +export function getSlaveShowConfig(slaveConifg, slaveShowConfig) { + if (utils.isEmptyArr(slaveShowConfig)) { + const slaveConfigData = slaveConifg.gdsconfigformslave; + slaveShowConfig = slaveConfigData.filter(item => item.sName !== '' && item.bVisible && item.showName !== ''); + } + return slaveShowConfig; +} + +/** 控制从表控件是否渲染(数据格式:{sSlaveId1:{sProductId:true,sProductUnit:false},sSlaveId2:{sProductId:false,sProductUnit:true}}) */ +export function setIsSlaveRender(props) { + const { slaveData, slaveColumn } = props; + let { showSlaveRender } = props; + showSlaveRender = utils.isUndefined(showSlaveRender) ? {} : showSlaveRender; + const isSlaveRender = []; + for (const eachSlave of slaveData) { + const renderEach = showSlaveRender[eachSlave.sId]; + const obj = {}; + for (const eachSlaveColumn of slaveColumn) { + obj[eachSlaveColumn.dataIndex] = (utils.isNotEmptyObject(renderEach) && utils.isNotUndefined(renderEach[eachSlaveColumn.dataIndex])); + } + isSlaveRender[eachSlave.sId] = obj; + } + props.isSlaveRender = { ...isSlaveRender }; + return props; +} + +/** 控制从表控件是否渲染(渲染整列) */ +export function setIsSlaveRenderArr(isSlaveRender, showSlaveRender) { + if (utils.isNotEmptyArr(isSlaveRender)) { + for (const key of Object.keys(isSlaveRender)) { + const row = isSlaveRender[key]; + for (const cell of Object.keys(row)) { + row[cell] = showSlaveRender.indexOf(cell) >= 0; + } + } + } + return isSlaveRender; +} + +/** 根据配置和权限,筛选出显示的按钮 */ +export function getShowBtn(props) { + const menuData = []; + const { masterConfig, gdsjurisdiction, btnData, report } = props; + const { gdsconfigformslave } = masterConfig; /* 获取权限集合 */ + /* 初始赋值数据值声明 */ + const btnShowData = [...btnData]; + /* 配置先过滤出按钮或则页签的集合 */ + const baseCondition = gdsconfigformslave.filter(item => item.sName === '' && item.showName !== ''); + + /** 根据权限,筛选出显示的按钮 */ + gdsjurisdiction.forEach((child) => { + const index = btnShowData.findIndex(item => item.sControlName === child.sAction); + if (index > -1) { + btnShowData.splice(index, 1); + } + }); + + /** 权限筛选后根据配置,筛选出显示的按钮 */ + baseCondition.forEach((child) => { + const index = btnShowData.findIndex(item => item.sControlName === child.sControlName && !child.bVisible); + if (index > -1) { + btnShowData.splice(index, 1); + } + }); + /* 筛选出一级菜单 */ + const parMenu = btnShowData.filter(item => !item.sControlName.includes('.')); + /* 初始值的二级菜单 */ + const childMenu = btnShowData.filter(item => item.sControlName.includes('.')); + + /** 配置后匹配二级菜单 */ + parMenu.forEach((childPar) => { + const { pIdentify, sControlName } = childPar; + childPar.child = []; + /** 匹配相应的子菜单 */ + const childData = childMenu.filter(item => item.sControlName.startsWith(`${sControlName}.`)); + if (utils.isNotEmptyArr(childData)) { + childPar.child.push(...childData); + } + + if (sControlName === 'BtnPrint') { + /* 打印的二级菜单集合 */ + const reportChild = []; + for (const each of report) { + reportChild.push({ + sControlName: `BtnPrint.${each.sReportName}`, + showName: each.sReportName, + disabled: false, + sId: each.sId, + }); + } + childPar.child.push(...reportChild); + } + + if (pIdentify !== '') { + /* 复制到、上查、下查、复制从的二级菜单集合 */ + const pIdentifyChild = baseCondition.filter(item => item.sControlName.startsWith(childPar.pIdentify) && item.bVisible); + const pIdentifyEachChild = []; + for (const each of pIdentifyChild) { + const slaveCopeTo = []; + const obj = {}; + if (pIdentify === 'BtnCopyTo_') { + const pIdentifyOfBtnCopyToChild = baseCondition.filter(item => item.sControlName.startsWith('BtnCopyTo_')); + for (const item of pIdentifyOfBtnCopyToChild) { + const { sAssignField } = item; + const splitArray = item.sControlName.split('_'); + if (splitArray.length === 2) { + /* 返回新对象——主表赋值 */ + obj.masterCopeTo = utils.returnObjValue(sAssignField); + } else { + /* 返回新对象 */ + const slaveChild = utils.returnObjValue(sAssignField); + slaveCopeTo.push(slaveChild); + } + } + if (utils.isNotEmptyArr(slaveCopeTo)) { + obj.slaveCopeTo = slaveCopeTo; + } + } + /* 将上查、下查的三级菜单数据存入 */ + if (pIdentify === 'BtnUpCheck.' || pIdentify === 'BtnDownCheck.') { + if (each.sControlName === props.toolBarSearchUpDownThirdMenuKey) { + obj.thirdMenu = props.toolBarSearchUpDownThirdMenuData; + } + } + pIdentifyEachChild.push({ + sControlName: each.sControlName, + showName: each.showName, + sId: each.sId, + disabled: false, + sActiveId: utils.strUndefinedToEmpty(each.sActiveId), + ...obj, + }); + } + childPar.child.push(...pIdentifyEachChild); + } + menuData.push(childPar); + }); + return menuData; +} + +/** 通用失败 */ +export function handleCommonFail(props, data) { + /* 待用数据声明 */ + const { dispatch } = props; + /* 错误处理 */ + dispatch({ type: 'app/throwError', payload: data }); + /* 返回值赋值 */ + props.pageLoading = false; + /* 返回值 */ + return props; +} + +// ----------------------------获取sqlCondition start---------------------------- // +/** 获取sqlCondition对象 */ +export function getSqlCondition(sSqlCondition, sSlaveId, slaveData, masterData) { + /* 返回值声明 */ + const obj = {}; + /* 执行条件 */ + if (utils.isNotEmptyStr(sSqlCondition)) { + /* 逗号分割sqlCondition为数组 */ + const arr = sSqlCondition.split(','); + /* 遍历sqlCondition数组 */ + for (let key of arr) { + /* 去掉空格 */ + key = key.trim(); + /* 获取sqlCondition对应key的value */ + const value = this.getSqlConditionData( + key, + sSlaveId, + slaveData, + masterData, + ); + /* 可用的value进行返回值赋值 */ + if (value) { + obj[key.replace(masterPrefix, '').replace(slavePrefix, '')] = value; + } + } + } + /* 返回值 */ + return obj; +} + +/* 获取sqlCondition数据 */ +export function getSqlConditionData(key, sSlaveId, slaveData, masterData) { + if (key.startsWith(masterPrefix)) { /* 从主表中获取数据 */ + return this.getSqlConditionByMaster(key.replace(masterPrefix, ''), masterData); + } else if (key.startsWith(slavePrefix)) { /* 从从表中获取数据 */ + return this.getSqlConditionBySlave( + key.replace(slavePrefix, ''), + slaveData, + sSlaveId, + ); + } else { /* 从主表和从表中一起获取数据 */ + return this.getSqlConditionByMasterSlave( + key, + masterData, + slaveData, + sSlaveId, + ); + } +} + +/* 从主表中获取sqlCondition数据 */ +export function getSqlConditionByMaster(key, masterData) { + return masterData[key]; +} + +/* 从从表中获取sqlCondition数据 */ +export function getSqlConditionBySlave(key, slaveData, sSlaveId) { + /* 获取从表的本条数据 */ + const slaveObj = slaveData.filter(item => item.sId === sSlaveId); + /* 返回值 */ + return utils.isNotEmptyArr(slaveObj) ? slaveObj[0][key] : null; +} + +/* 从主从表中获取sqlCondition数据 */ +export function getSqlConditionByMasterSlave(key, masterData, slaveData, sSlaveId) { + /* 先从主表中获取数据 */ + let value = this.getSqlConditionByMaster(key, masterData); + /* 再从从表中获取数据 */ + if (!value && utils.isNotEmptyStr(sSlaveId)) { + value = this.getSqlConditionBySlave(key, slaveData, sSlaveId); + } + /* 返回值 */ + return value; +} +// ----------------------------获取sqlCondition end ---------------------------- // + +// ----------------------------单据渲染start---------------------------- // +// -------------------------主表单据渲染start------------------------- // +/** 设置主表渲染 */ +export function setMasterRender(masterShowConfig, masterShowRender) { + /* 填充主表渲染容器(默认值都给false) */ + let isMasterRender = setMasterRenderTrueOrFalse(masterShowConfig, false); + /* 设置主表渲染容器值 */ + isMasterRender = setMasterRenderContainerValue(isMasterRender, masterShowRender); + /* 返回值 */ + return isMasterRender; +} + +/** 设置主表渲染(全是true或false) */ +export function setMasterRenderTrueOrFalse(masterShowConfig, value) { + /* 返回值声明 */ + const isMasterRender = {}; + /* 主表配置有值才进行容器赋值,否则就返回空对象了 */ + if (utils.isNotEmptyArr(masterShowConfig)) { + /* 遍历主表配置结构:[{},{},{}...] */ + for (const each of masterShowConfig) { + /* sName为key,初始值都是false */ + isMasterRender[each.sName] = value; + } + } + /* 返回值 */ + return isMasterRender; +} + +/** 设置主表渲染容器值 */ +export function setMasterRenderContainerValue(isMasterRender, masterShowRender) { + /* 如果没设置渲染数组就直接返回都是false的渲染容器即可 */ + if (utils.isNotEmptyArr(masterShowRender)) { + /* 渲染数组有值的话就遍历并把在渲染容器中对应的sName都变成true */ + for (const sName of masterShowRender) { + isMasterRender[sName] = true; + } + } + /* 返回值 */ + return isMasterRender; +} +// -------------------------主表单据渲染end ------------------------- // + +// -------------------------从表单据渲染start------------------------- // +/** 设置从表渲染 */ +export function setSlaveRender(slaveShowConfig, slaveData, slaveShowRender) { + /* 填充从表表渲染容器(默认值都给false) */ + let isSlaveRender = setSlaveRenderTrueOrFalse(slaveShowConfig, slaveData, false); + /* 设置从表渲染容器值 */ + isSlaveRender = setSlaveRenderContainerValue(isSlaveRender, slaveShowRender); + /* 返回值 */ + return isSlaveRender; +} + +/** 设置从表渲染(全是true或false) */ +export function setSlaveRenderTrueOrFalse(slaveShowConfig, slaveData, value) { + /* 返回值声明,数据结构{sSlaveId1:{sProductId:true,sProductQty:false},sSlaveId2:{sProductId:true,sProductQty:false},sSlaveId3:{sProductId:true,sProductQty:false}...} */ + const isSlaveRender = {}; + /* 从表配置和从表数据都必须有值才进行容器赋值,否则就返回空对象了 */ + if (utils.isNotEmptyArr(slaveShowConfig) && utils.isNotEmptyArr(slaveData)) { + /* 遍历从表数据:[{},{},{}...] */ + for (const eachSlaveData of slaveData) { + /* 声明容器内部对象 */ + const isSlaveRenderEach = {}; + /* 遍历从表配置:[{},{},{}...] */ + for (const eachSlaveShowConfig of slaveShowConfig) { + /* 给每一个从表配置内部对象赋默认值为false */ + isSlaveRenderEach[eachSlaveShowConfig.sName] = value; + } + /* 给渲染容器对象的row赋值 */ + isSlaveRender[eachSlaveData.sId] = isSlaveRenderEach; + } + } + /* 返回值 */ + return isSlaveRender; +} + +/** 设置从表渲染容器值 */ +export function setSlaveRenderContainerValue(isSlaveRender, slaveShowRender) { + /* 如果没设置渲染对象就直接返回都是false的渲染容器即可 */ + if (utils.isNotEmptyObject(slaveShowRender) && utils.isNotEmptyObject(isSlaveRender)) { + /* 渲染对象有值的话就遍历并把在渲染容器中对应的sName都变成true */ + for (const sSlaveId of Object.keys(slaveShowRender)) { + /* 获取渲染对象中的从表数据 */ + const valueArr = slaveShowRender[sSlaveId]; + /* 获取渲染容器中对应的从表row */ + const isSlaveRenderEach = isSlaveRender[sSlaveId]; + /* 如果如安然对象的从表数据有值,则把这个值付给渲染对象 */ + if (utils.isNotEmptyArr(valueArr)) { + /* 循环赋值 */ + for (const key of valueArr) { + isSlaveRenderEach[key] = true; + } + } + } + } + /* 返回值 */ + return isSlaveRender; +} + +/** 设置从表渲染(整列渲染) */ +export function setSlaveCellRender(slaveShowConfig, slaveData, slaveShowRender) { + /* 填充从表表渲染容器(默认值都给false) */ + let isSlaveRender = setSlaveRenderTrueOrFalse(slaveShowConfig, slaveData, false); + /* 设置从表渲染容器值 */ + isSlaveRender = setSlaveCellRenderContainerValue(isSlaveRender, slaveShowRender); + /* 返回值 */ + return isSlaveRender; +} + +/** 设置从表渲染容器值(整列渲染) */ +export function setSlaveCellRenderContainerValue(isSlaveRender, slaveShowRender) { + /* 如果没设置渲染数组就直接返回都是false的渲染容器即可 */ + if (utils.isNotEmptyArr(slaveShowRender)) { + /* 渲染对象有值的话就遍历并把在渲染容器中对应的sName都变成true */ + for (const key of Object.keys(isSlaveRender)) { + const isSlaveRenderEach = isSlaveRender[key]; + /* 循环赋值 */ + for (const sName of Object.keys(isSlaveRenderEach)) { + isSlaveRenderEach[sName] = slaveShowRender.indexOf(sName) >= 0; + } + } + } + /* 返回值 */ + return isSlaveRender; +} +// -------------------------从表单据渲染end ------------------------- // +// ----------------------------单据渲染end ---------------------------- // + +// ----------------------------合计列start---------------------------- // +/** 添加合计列数据 */ +export function addDataTotal(slaveShowConfig, dataTotal, slaveData, isNeed) { + /* 获取待合计字段 */ + const slaveTotal = []; + const dataTotalColumn = this.getDataTotalColumn(slaveShowConfig, dataTotal); + /* 从表配置,从表数据和待合计字段都不为空的时候才进行数据合计 */ + if (utils.isNotEmptyArr(slaveShowConfig) && utils.isNotEmptyObject(dataTotalColumn) && utils.isNotEmptyArr(slaveData)) { + /* 获取合计对象 */ + const totalObj = getTotalObj(slaveShowConfig, slaveData, dataTotalColumn, isNeed); + /* 添加合计对象 */ + slaveTotal.push(totalObj); + } + /* 返回值 */ + return slaveTotal; +} + +/** 获取合计列数据 */ +export function getDataTotalColumn(slaveShowConfig, dataTotal) { + /* 如果接口传了合计字段那就用接口的合计字段 */ + if (utils.isNotEmptyObject(dataTotal)) { + return dataTotal; + } + /* 返回值 */ + const dataTotalColumn = {}; + /* 如果存在从表配置 */ + if (utils.isNotEmptyArr(slaveShowConfig)) { + /* 遍历从表配置 */ + for (const each of slaveShowConfig) { + /* 将需要合计的sName存入合计列对象中 */ + if (each.bSum) { + dataTotalColumn[each.sName] = 0; + } + } + } + /* 返回值 */ + return dataTotalColumn; +} + +/** 获取合计对象 */ +export function getTotalObj(slaveShowConfig, slaveDataNoTotal, dataTotalColumn, isNeed) { + /* 待用数据声明 */ + const sId = utils.createSid(); /* 唯一标示 */ + const totalObj = { + dataTotal: true, + key: sId, + sId, + };/* 统计对象的必须数据 */ + /* 遍历表头 */ + for (const each of slaveShowConfig) { + /* 获取sName */ + const sName = each.sName; + /* 给合计对象添加属性和值 */ + totalObj[sName] = getStatisticsValue(sName, slaveDataNoTotal, dataTotalColumn, isNeed); + } + /* 返回值 */ + return totalObj; +} + +/** 获取统计值 */ +export function getStatisticsValue(sName, slaveDataNoTotal, dataTotalColumn, isNeed) { + /* 返回值声明 */ + let res = ''; + /* 过滤出需要统计的列 */ + if (utils.isNotUndefined(dataTotalColumn[sName])) { + /* 判断是否需要统计(需要统计的话要遍历从表,不需要的话就直接取dataTotal中的数据) */ + if (isNeed) { /* 把需要统计的列sum起来 */ + for (const each of slaveDataNoTotal) { + res = utils.convertStrToNumber0(res) + utils.convertStrToNumber0(each[sName]); + } + } else { /* 不需要的统计的话直接取dataTotal中的值 */ + res = dataTotalColumn[sName]; + } + } + /* 返回值 */ + return res; +} +// ----------------------------合计列end ---------------------------- // + +// ----------------------------复制到start---------------------------- // +/* 复制到主表赋值 */ +export function getCopyToMasterAssign(masterData, masterAssign) { + /* 返回值声明 */ + const masterAssignData = {}; + /* 两个集合都不为空才执行赋值,要不就直接返回空数组就好了 */ + if (utils.isNotEmptyObject(masterAssign) && utils.isNotEmptyObject(masterData)) { + /* 遍历赋值数据 */ + for (const targetKey of Object.keys(masterAssign)) { + /* 获取主表的数据key */ + const key = masterAssign[targetKey]; + /* 主表值 */ + const value = masterData[key]; + /* 给这个目标key赋值 */ + if (utils.isNotUndefined(value)) { + masterAssignData[targetKey] = value; + } + } + } + /* 返回值 */ + return masterAssignData; +} + +/* 复制到从表赋值 */ +export function getCopyToSlaveAssign(slaveData, slaveAssign, masterData) { + /* 返回值声明 */ + const slaveAssignData = []; + /* 两个集合都不为空才执行赋值,要不就直接返回空数组就好了 */ + if (utils.isNotEmptyArr(slaveAssign) && utils.isNotEmptyArr(slaveData)) { + /* 暂时先取从表的第一条,之后再调整为动态的 */ + const slaveAssignFirst = slaveAssign[0]; + /* 遍历从表数据 */ + for (const each of slaveData) { + /* 合计行不处理 */ + if (!each.dataTotal) { + /* 创建从表sId */ + const sId = utils.createSid(); + /* 每一行的容器对象声明 */ + const slaveAssignDataEach = { + sId, + key: sId, + }; + /* 遍历从表数据的每一个key */ + for (const key of Object.keys(each)) { + const targetKey = utils.getObjKeyByValue(slaveAssignFirst, key); + /* 如果该赋值字段存在,则给数据赋值 */ + if (utils.isNotUndefined(targetKey)) { + slaveAssignDataEach[targetKey] = targetKey.startsWith('#') && targetKey.endsWith('#') ? masterData[key] : each[key]; + } + } + /* 容器赋值 */ + slaveAssignData.push(slaveAssignDataEach); + } + } + } + /* 返回值 */ + return slaveAssignData; +} + +// ----------------------------复制到end ---------------------------- // diff --git a/src/components/Common/CommonBase.js b/src/components/Common/CommonBase.js new file mode 100644 index 0000000..311238d --- /dev/null +++ b/src/components/Common/CommonBase.js @@ -0,0 +1,2270 @@ +/* eslint-disable */ +/* eslint-disable prefer-destructuring */ +/** + * Created by mar105 on 2019-02-15. + */ + +import React, { Component } from 'react'; +import { message } from 'antd'; +import moment from 'moment'; +import * as commonConfig from '../../utils/config'; +import * as commonUtils from '../../utils/utils'; +import * as commonServices from '../../services/services'; +import * as commonFunc from './commonFunc'; +import * as commonBusiness from './commonBusiness'; /* 通用单据方法 */ + +export default (ChildComponent) => { + return class extends Component { + constructor(props) { + super(props); + this.state = { + pageLoading: true, + token: props.routing ? props.formRoute === '/indexOee' ? props.app.token : '' : props.app.token, // /indexOee为oee报产页面 + sTabId: this.handleConfigValue('key', props.formRoute), // type无论是indexoee和一般的都使用eles + sModelsId: props.routing ? props.sModelsId : (commonUtils.isNotEmptyStr(props.formRoute) && props.formRoute.indexOf('/indexOee') > -1) ? props.sModelsId : this.handleConfigValue('formId'), /* 获取配置数据用的modelId */ + formRoute: props.routing ? props.formRoute : (commonUtils.isNotEmptyStr(props.formRoute) && props.formRoute.indexOf('/indexOee') > -1) ? props.formRoute : this.handleConfigValue('route'), /* 组件名: 路由名称 */ + formSrcRoute: props.routing ? props.routing.pathname.replace('/', '') : commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase() === '/loginoee' ? '/commonAuto' : '', + sModelsType: this.handleConfigValue('sModelsType', props.formRoute), /* 组件名: 路由名称 */ + bFastOrderView: this.handleConfigValue('bFastOrderView'), /* 是否显示快速下单 */ + formData: [], /* 所有配置 */ + gdsformconst: [], /* 获取配置常量 */ + gdsjurisdiction: [], /* 获取配置权限 */ + currentId: (commonUtils.isNotEmptyStr(props.formRoute) && props.formRoute.indexOf('/indexOee') > -1) ? props.checkedId : props.app.currentPane.checkedId, /* 当前数据的Id */ + selectedRowKeys: [], /* 已选择的数据行(数据格式:数组) */ + clearArray: [], /* table清除数组 */ + calculated: false, // 工单是否经过计算 + iPageSize: commonConfig.pageSize, /* 默认config配置的pageSize */ + }; + this.sDateFormat = 'YYYY-MM-DD'; + window.addEventListener('beforeunload', this.beforeunload); + window.addEventListener('unload', this.unload); + } + + async componentWillMount() { + if (commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase() !== '/loginoee') { + if (this.props.app.webSocket === null || this.props.app.webSocket.readyState !== WebSocket.OPEN) { + this.props.dispatch({ type: 'app/createWebSocket', payload: { reStart: true, dispatch: this.props.dispatch } }); + } + } + /* 获取配置 */ + this.mounted = true; + const { token, sModelsId, formSrcRoute } = this.state; + let { iPageSize } = this.state; + const config = await commonUtils.getStoreDropDownData(sModelsId, '', ''); + if (commonUtils.isEmpty(config)) { + const configUrl = `${commonConfig.server_host}business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`; + const configReturn = (await commonServices.getService(token, configUrl)).data; + if (configReturn.code === 1) { + const [configData] = configReturn.dataset.rows; + const { formData } = configData; + if (commonUtils.isNotEmptyArr(formData)) { + if (commonUtils.isNotEmptyNumber(formData[0].iPageSize) && formData[0].iPageSize !== 0) { + iPageSize = formData[0].iPageSize;/* 后台设定页数 */ + } + } + if (this.mounted) { + commonUtils.setStoreDropDownData(sModelsId, '', '', configData); + this.setState({ ...configData, iPageSize }); + } + } else { + this.getServiceError(configReturn); + } + } else { + this.setState({ ...config }); + } + } + + componentDidMount() { + if (this.state.sTabId) { + this.props.dispatch({ type: 'app/changeDiffMap', payload: { sTabId: this.state.sTabId, changed: false } }); + } + if (this.state.formRoute && this.state.formRoute.indexOf('/indexOee') > -1 && this.state.sModelsId && this.state.formRoute) { + const sModelData = { + sModelsId: this.state.sModelsId, + formRoute: this.state.formRoute, + }; + localStorage.setItem('oeeModelData', JSON.stringify(sModelData)); + } + + /* 关闭浏览器前进行提示 */ + } + + shouldComponentUpdate1(nextProps, nextState) { + // // 修改或新增后的保存功能 + // if (nextState.enabled && !nextProps.app.diffMap.get(nextState.sTabId) && nextProps.app.diffMap.get(nextState.sTabId) !== undefined) { + // this.props.dispatch({ type: 'app/changeDiffMap', payload: { sTabId: nextState.sTabId, changed: true } }); + // } + // if (!nextState.enabled && nextProps.app.diffMap.get(nextState.sTabId) && nextProps.app.diffMap.get(nextState.sTabId) !== undefined) { + // this.props.dispatch({ type: 'app/changeDiffMap', payload: { sTabId: nextState.sTabId, changed: false } }); + // } + const currentKey = nextProps.app.currentPane.key; /* 当前页签key */ + const { formData } = nextState; + if (commonUtils.isNotEmptyObject(nextProps.formRoute) && nextProps.formRoute.indexOf('/indexOee') > -1) { + return (formData.length > 0); + } + /* 处理loginOee下拉框切换 重新渲染 */ + if (commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase() === '/loginoee') { + return true; + } + if (nextProps.app.unReadSid !== this.props.app.unReadSid) { + return false; + } + return (currentKey === nextState.sTabId && formData.length > 0) + || (nextState.fastOrderModalVisible !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.fastOrderModalVisible) + || (nextState.visibleStatement !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.visibleStatement) + || (nextState.visibleBatchPriceUpdate !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.visibleBatchPriceUpdate) + || (nextState.modalVisible !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.modalVisible) + || (nextState.visibleModal !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.visibleModal) + || (nextState.materialsChooseVisible !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.materialsChooseVisible) + || (nextState.processChooseVisible !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.processChooseVisible) + || (nextState.visibleFilfile !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.visibleFilfile) + || (nextState.contextMenuModalVisible !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.contextMenuModalVisible) + || (nextState.workScheduleVisible !== undefined && nextProps.app.currentPane.notCurrentPane === !nextState.workScheduleVisible); + } + + componentDidUpdate(nextProps, nextState) { + // 修改或新增后的保存功能 + if (nextProps.onRemovePane && nextState.enabled && !nextProps.app.diffMap.get(nextState.sTabId) && nextProps.app.diffMap.get(nextState.sTabId) !== undefined) { + this.props.dispatch({ type: 'app/changeDiffMap', payload: { sTabId: nextState.sTabId, changed: true } }); + } + if (nextProps.onRemovePane && !nextState.enabled && nextProps.app.diffMap.get(nextState.sTabId) && nextProps.app.diffMap.get(nextState.sTabId) !== undefined) { + this.props.dispatch({ type: 'app/changeDiffMap', payload: { sTabId: nextState.sTabId, changed: false } }); + } + } + + componentWillUnmount() { + const { + currentId, + } = this.state; + const { userinfo } = this.props.app; + window.removeEventListener('beforeunload', this.beforeunload); + window.removeEventListener('unload', this.unload); + if (commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase() !== '/loginoee') { + if (this.props.app.webSocket !== null && this.props.app.webSocket.readyState === WebSocket.OPEN) { + this.handleSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null); + } + } + } + + /* + componentWillUnmount() { + this.mounted = false; + const { sModelsId } = this.state; + const { app, currentId } = this.props; + const { webSocket, userinfo, currentPane } = app; + const { key } = currentPane; + commonUtils.clearFormStoreDropDownData(sModelsId); + const { copyTo } = app.currentPane; + if (commonUtils.isNotEmptyObject(copyTo)) { + const { slaveData } = copyTo; + const sIdArray = []; + slaveData.forEach((item) => { + const redisKey = item.sSlaveId; + sIdArray.push(redisKey); + }); + const sId = sIdArray.toString(); + commonFunc.sendWebSocketMessage(webSocket, key, 'copyfinish', 'noAction', userinfo.sId, null, sId, userinfo.sId, null); + } + if (!commonUtils.isEmpty(currentId)) { + commonFunc.sendWebSocketMessage(webSocket, key, 'release', 'noAction', userinfo.sId, null, currentId, userinfo.sId, null); + } + } */ + + /** sql条件 */ + getSqlCondition = (showConfig, name, record) => { + const conditonValues = {}; + if (commonUtils.isNotEmptyStr(showConfig.sSqlCondition)) { + const conditon = showConfig.sSqlCondition.split(','); + conditon.forEach((item) => { + if (item.indexOf('.') > -1) { + const tableName = item.split('.')[0]; + let fieldName = item.split('.')[1]; + let fieldNameFilter = item.split('.').length > 2 ? item.split('.')[2] : fieldName; + // master.sId 作为参数 master.sId.sId 作为filterDropdown过滤参数 + if (showConfig.sDropDownType === 'picArr') { + fieldNameFilter = item.split('.').length > 2 ? item.split('.')[2] : fieldName; + if (fieldName.indexOf('&Search') > -1) { + // 参数为&Search时认为是查找数据集中取数据 + const data = this.state[`${tableName}Data`]; + if (typeof data === 'object' && data.constructor === Object) { + Object.keys(data).forEach((dataItem) => { + if (`&Search${data[dataItem]}` === fieldName) { + let sTmpName = dataItem; + sTmpName = sTmpName.replace('First', 'Third'); + if (data[dataItem].substring(0, 1) === 't') { + fieldName = `p${sTmpName.substring(1, dataItem.length)}`; + } else if (data[dataItem].substring(0, 1) === 'm') { + fieldName = data[dataItem].substring(0, 1) + sTmpName.substring(1, sTmpName.length); + } else { + fieldName = data[dataItem].substring(0, 1) + sTmpName.substring(1, sTmpName.length); + } + } + }); + } + } else if (fieldName.indexOf('&') > -1) { + fieldNameFilter = item.split('.').length > 2 ? item.split('.')[2] : fieldName; + conditonValues[fieldNameFilter] = fieldName.replace('&', ''); + return; + } + } + if (fieldName !== '') { + if (name === tableName && !commonUtils.isEmpty(record)) { + const data = record; + conditonValues[fieldNameFilter] = data[fieldName]; + } else { + const data = this.state[`${tableName}Data`]; + const selectedRowKeys = this.state[`${tableName}SelectedRowKeys`]; + if (typeof data === 'object' && data.constructor === Object) { + conditonValues[fieldNameFilter] = data[fieldName]; + } else if (commonUtils.isNotEmptyArr(selectedRowKeys)) { + let iIndex = data.findIndex(itemData => itemData.sId === selectedRowKeys[0]); + iIndex = iIndex > -1 ? iIndex : data.findIndex(itemData => itemData.sSlaveId === selectedRowKeys[0]); + if (iIndex > -1) { + conditonValues[fieldNameFilter] = data[iIndex][fieldName]; + } + } else if (commonUtils.isNotEmptyArr(data)) { + conditonValues[fieldNameFilter] = data[0][fieldName]; + } + } + } + } + }); + } + return conditonValues; + }; + + /** 获取sql下拉数据 */ + getSqlDropDownData = async (formId, name, showConfig, record, sKeyUpFilterName, pageNum) => { + /* 地址 */ + const { formSrcRoute } = this.state; + if (commonUtils.isEmpty(showConfig.sFieldToContent)) { + if (commonUtils.isEmpty(showConfig.showDropDown)) { + return { + dropDownData: [], totalPageCount: 0, currentPageNo: 0, conditonValues: {}, + }; + } + const url = `${commonConfig.server_host}business/getSelectLimit/${showConfig.sId}?sModelsId=${this.state.sModelsId}&sName=${formSrcRoute}`; + /* 参数 */ + const conditonValues = this.getSqlCondition(showConfig, name, record); + const body = { + sSqlCondition: commonUtils.isEmptyObject(conditonValues) ? '' : conditonValues, /* 查询条件 */ + }; + if (!commonUtils.isEmpty(pageNum)) { + body.sKeyUpFilterName = sKeyUpFilterName; /* 边输入边过滤,暂时没用1 */ + body.pageNum = pageNum; + // 下拉数据改为无限 + body.pageSize = commonConfig.pageSize; + // body.pageSize = 9999; + } + /* 获取数据 */ + const json = await commonServices.postValueService(this.props.app.token, body, url); + /* code为1代表获取数据成功 */ + if (json.data.code === 1) { + /* 获取数据集 */ + const { rows, totalPageCount, currentPageNo } = json.data.dataset; + return { + dropDownData: rows, totalPageCount, currentPageNo, conditonValues, + }; + } else { + return { + dropDownData: [], totalPageCount: 0, currentPageNo: 0, conditonValues, + }; + } + } else { + const returnData = []; + if (showConfig.sFieldToContent === '1') { + if (name === 'master') { + const { [`${name}Data`]: data } = this.state; + const sName = `sParamDropDown${showConfig.sName.replace('sParamValue', '')}`; + returnData.push(...commonUtils.objectToArr(data[sName])); + } else { + const { [`${name}Data`]: data, [`${name}SelectedRowKeys`]: selectedRowKeys } = this.state; + const sName = `sParamDropDown${showConfig.sName.replace('sParamValue', '')}`; + if (commonUtils.isNotEmptyObject(record)) { + returnData.push(...commonUtils.objectToArr(record[sName])); + } else if (commonUtils.isNotEmptyArr(data) && commonUtils.isNotEmptyArr(selectedRowKeys)) { + const iIndex = data.findIndex(item => item.sId === selectedRowKeys.toString()); + if (iIndex > -1) { + returnData.push(...commonUtils.objectToArr(data[iIndex][sName])); + } + } + } + } else { + const unionCondition = showConfig.sFieldToContent.split('&&'); + unionCondition.forEach((unionItem) => { + const conditon = unionItem.split(','); + const tableNameContent = conditon[0].split('.')[0]; + let data = this.state[`${tableNameContent}Data`]; + if (commonUtils.isNotEmptyArr(data)) { + if (showConfig.sSqlCondition !== '') { + const sSqlCondition = showConfig.sSqlCondition; + const sqlConditon = sSqlCondition.split(','); + sqlConditon.forEach((item) => { + const tableName = item.split('.')[0]; + const fieldName = item.split('.')[1]; + const fieldNameFilter = item.split('.').length > 2 ? item.split('.')[2] : fieldName; + const dataCondition = this.state[`${tableName}Data`]; + const selectedRowKeys = this.state[`${tableName}SelectedRowKeys`]; + if (typeof dataCondition === 'object' && dataCondition.constructor === Object) { + // 对象不用filter + // data = data.filter(item => commonUtils.isNull(item[fieldNameFilter], '') === commonUtils.isNull(dataCondition[fieldName], '')); + } else if (commonUtils.isNotEmptyArr(selectedRowKeys)) { + let iIndex = dataCondition.findIndex(itemData => itemData.sId === selectedRowKeys[0]); + iIndex = iIndex > -1 ? iIndex : dataCondition.findIndex(itemData => itemData.sSlaveId === selectedRowKeys[0]); + if (iIndex > -1) { + data = data.filter(item => commonUtils.isNull(item[fieldNameFilter], '') === commonUtils.isNull(dataCondition[iIndex][fieldName], '')); + } + } else if (commonUtils.isNotEmptyArr(data)) { + data = data.filter(item => commonUtils.isNull(item[fieldNameFilter], '') === commonUtils.isNull(dataCondition[0][fieldName], '')); + } + }); + } + if (typeof data === 'object' && data.constructor === Object) { + const dataRow = {}; + conditon.forEach((item) => { + const fieldName = item.split('.')[1]; + const fieldNameFilter = item.split('.').length > 2 ? item.split('.')[2] : fieldName; + if (fieldName.indexOf('-') >= 0) { + fieldName.split('-').forEach((itemField) => { + const sFieldValue = commonUtils.isEmpty(data[itemField]) ? '' : data[itemField].toString(); + dataRow[fieldNameFilter] = commonUtils.isEmpty(dataRow[fieldNameFilter]) ? sFieldValue : `${dataRow[fieldNameFilter]}-${sFieldValue}`; + }); + } else { + dataRow[fieldNameFilter] = commonUtils.isEmpty(data[fieldName]) ? '' : data[fieldName].toString(); + } + }); + returnData.push(dataRow); + } else { + data.forEach((itemDataRow) => { + const dataRow = {}; + conditon.forEach((item) => { + const fieldName = item.split('.')[1]; + const fieldNameFilter = item.split('.').length > 2 ? item.split('.')[2] : fieldName; + if (fieldName.indexOf('-') >= 0) { + fieldName.split('-').forEach((itemField) => { + const sFieldValue = commonUtils.isEmpty(itemDataRow[itemField]) ? '' : itemDataRow[itemField].toString(); + dataRow[fieldNameFilter] = commonUtils.isEmpty(dataRow[fieldNameFilter]) ? sFieldValue : `${dataRow[fieldNameFilter]}-${sFieldValue}`; + }); + } else { + dataRow[fieldNameFilter] = commonUtils.isEmpty(itemDataRow[fieldName]) ? '' : itemDataRow[fieldName].toString(); + } + }); + returnData.push(dataRow); + }); + } + } + }); + } + return { dropDownData: returnData, totalPageCount: 0, currentPageNo: 0 }; + } + }; + /* 获取数字格式化规范 */ + getFloatNum = (sName) => { + if (sName.toLowerCase().endsWith('price')) { /* 价格 */ + return this.props.app.decimals.dNetPrice; + } else if (sName.toLowerCase().endsWith('money')) { /* 金额 */ + return this.props.app.decimals.dNetMoney; + } else { /* 其它 */ + return 6; + } + }; + + /** 获取sql下拉数据 */ + getServiceError = async (returnData) => { + if (location.pathname.indexOf('/indexOee/') > -1) { + this.props.dispatch({ type: 'app/throwErrorMes', payload: returnData }); + } else { + this.props.dispatch({ type: 'app/throwError', payload: returnData }); + } + }; + + /* 获取数字格式化规范 */ + getDateFormat = () => { + return this.props.app.dateFormat; + }; + + beforeunload = (e) => { + const confirmationMessage = '您确定要离开么?'; + if (e) { + e.returnValue = confirmationMessage; + } + return confirmationMessage; + } + + unload = () => { + // sessionStorage.clear(); + // const { + // currentId, sModelsId, + // } = this.state; + // const url = `${commonConfig.server_host}logout`; + // this.handleSendSocketMessage('release', 'noAction', currentId, this.props.app.userinfo.sId, null, null); + // this.handleSendSocketMessage('release', 'noAction', sModelsId, this.props.app.userinfo.sId, null, null); + // this.props.dispatch({ type: 'app/loginOut', payload: { url, sId: this.props.app.userinfo.sId, loginOutType: 'loginOut' } }); + } + + handleSendSocketMessage = (flag, showType, sId, sendTo, msgInfo, param) => { + const { token } = this.props.app; + const sendws = this.handleSendWebSocketMsg; + const { dispatch } = this.props; + if (commonUtils.isNotEmptyObject(token)) { + if (this.props.app.webSocket !== null && this.props.app.webSocket.readyState === WebSocket.OPEN) { + sendws(flag, showType, msgInfo, sId, sendTo, param); + } else { + this.props.dispatch({ type: 'app/createWebSocket', payload: { reStart: true, dispatch } }); + setTimeout(() => { + sendws(flag, showType, msgInfo, sId, sendTo, param); + }, 30000); + } + } + }; + handleSendWebSocketMsg = (flag, showType, msgInfo, sId, sendTo, param) => { + const { app } = this.props; + const { webSocket, userinfo, currentPane } = app; + const { key } = currentPane; + commonFunc.sendWebSocketMessage(webSocket, key, flag, showType, userinfo.sId, msgInfo, sId, sendTo, param); + } + /** sql下拉新增处理 */ + handleSqlDropDownNewRecord = async (showConfig, name) => { + const { + [`${name}SelectedRowKeys`]: tableSelectedRowKeys, [`${name}Data`]: tableNewData, masterData, formSrcRoute, + } = this.state; + /* 待用数据声明 */ + const sTabId = this.props.app.currentPane.key; /* 当前标签页TabId */ + /* 接口地址 */ + const sNameUrl = `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${showConfig.sActiveId}?sModelsId=${showConfig.sActiveId}&sName=${formSrcRoute}`; + const CallBackRecord = this.handleCallBackRecord;/* 字段名,主从表,字段名 */ + /* newRecord时,如果是新增产品,则要带客户过去 */ + const addStata = {}; + for (const each of this.props.app.panes) { + each.notCurrentPane = true; + } + if (commonUtils.isNotEmptyObject(showConfig) && showConfig.sName === 'sProductName') { + if (name !== 'master' && commonUtils.isNotEmptyObject(tableSelectedRowKeys)) { + const iIndex = tableNewData.findIndex(item => item.sId === tableSelectedRowKeys.toString()); + const newData = tableNewData[iIndex]; + addStata.sCustomerId = newData.sCustomerId; + addStata.sCustomerNo = newData.sCustomerNo; + addStata.sCustomerName = newData.sCustomerName; + if (commonUtils.isEmptyObject(addStata.sCustomerId)) { /* 新增产品时,看客户在从表还是主表。如果不在从表,那看是否在主表 */ + addStata.sCustomerId = masterData.sCustomerId; + addStata.sCustomerNo = masterData.sCustomerNo; + addStata.sCustomerName = masterData.sCustomerName; + } + } + } + /* 接口参数 */ + const payload = { + url: sNameUrl, + sParentId: sTabId, + classifyOption: 'add', + newRecordFlag: `NewRecord_${sTabId}`, /* newRecord当前字段 */ + newRecordRelation: addStata, /* newRecord 关联字段,如新增产品,带客户信息 */ + newRecordMethod: CallBackRecord.bind(this, showConfig.sName, name), /* newRecord当前字段 */ + }; + /* 调用接口 */ + this.props.dispatch({ type: 'content/onRouter', payload }); + }; + + /* 获取配置数据用的sTabId,formId,formRoute */ + handleConfigValue = (value, type) => { + if (commonUtils.isNotEmptyObject(type) && type.indexOf('/indexOee') > -1) { + return this.props[value]; + } else { + const { secondppopupPane, ppopupPane, currentPane } = this.props.app; + return commonUtils.isNotEmptyObject(secondppopupPane) + ? secondppopupPane[value] + : commonUtils.isNotEmptyObject(ppopupPane) + ? ppopupPane[value] : currentPane[value]; + } + }; + + /* 获取后台数据(单条) */ + handleGetDataOne = async (params) => { + const { token, sModelsId } = this.state; + const { + name, configData, condition, isWait, formSrcRoute, bEditClick, + } = params; + + const lockUrl = `${commonConfig.server_host}business/addSysLocking?sModelsId=${sModelsId}&sName=${formSrcRoute}`; + + const configDataId = configData.sId; + const dataUrl = `${commonConfig.server_host}business/getBusinessDataByFormcustomId/${configDataId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`; + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; + if (dataReturn.code === 1) { + const [returnData] = dataReturn.dataset.rows[0].dataSet; + if (commonUtils.isNotEmptyArr(returnData)) { + let addState = {}; + const value = { + tableName: configData.sTbName, + sId: [returnData.sId], + }; + if(bEditClick === 'update') { /* 只有点击修改时 调用addSysLocking */ + const { data } = await commonServices.postValueService(token, value, lockUrl); + if (data.code === 1) { /* 失败 */ + addState.sUseInfo = ''; + } else { /* 失败 */ + addState.sUseInfo = data.msg; + if (commonUtils.isNotEmptyObject(data.erroMsg)) { + message.error(data.erroMsg); + } + } + } + addState[`${name}Data`] = returnData; + addState.currentId = returnData.sId; + if(bEditClick === 'update') { + addState[`${name}Data`].enabled = true; + } + + /* 获取主表数据时表字段数据根据条件控制 本表或其他表格字段的显示与隐藏功能 */ + if (name === 'master' && commonUtils.isNotEmptyObject(configData)) { + const addStateChange = this.handelControlFieldVisible(name, configData, returnData); + if (commonUtils.isNotEmptyObject(addStateChange)) { + addState = { ...addState, ...addStateChange }; + } + } + + if (isWait) { + return addState; + } else if (this.mounted) { + this.setState({ ...addState }); + } + } + } else { + this.getServiceError(dataReturn); + } + }; + + /* 获取后台数据(数据集) */ + handleGetDataSet = async (params) => { + const { + name, condition, flag, isWait, configData, clearSelectData, + } = params; + const { + token, sModelsId, formRoute, [`${name}SelectedData`]: tableSelectedData, formSrcRoute, formData, [`${name}DelData`]: tableDelData, sModelsType, [`${name}PageSize`]: pageSize, + } = this.state; + let { + menuChildData, + [`${name}SelectedRowKeys`]: tableSelectedRowKeys, iPageSize, + } = this.state; + const masterConditionData = commonUtils.isNotEmptyObject(condition) ? condition.sSqlCondition : {}; + /* 根据后台主表配置bPagination判断 是否分页 */ + if (commonUtils.isNotEmptyObject(configData) && commonUtils.isNotEmptyObject(condition)) { + const { bPagination } = configData; + if (!bPagination || bPagination === undefined) { + condition.pageSize = 10000; /* 不分页 */ + } else { /* 分页 */ + // eslint-disable-next-line no-lonely-if + if (commonUtils.isNotEmptyArr(formData)) { + if (commonUtils.isNotEmptyNumber(formData[0].iPageSize) && formData[0].iPageSize !== 0) { + iPageSize = formData[0].iPageSize;/* 后台设定页数 */ + } + } + } + } + + const configDataId = configData.sId; + const dataUrl = `${commonConfig.server_host}business/getBusinessDataByFormcustomId/${configDataId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`; + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; + if (dataReturn.code === 1) { + if( commonUtils.isNotEmptyObject(dataReturn.dataset) && commonUtils.isNotEmptyArr(dataReturn.dataset.rows) ) { + let returnData = dataReturn.dataset.rows[0].dataSet; + if (this.props && this.props.app && this.props.app.currentPane && this.props.app.currentPane.route && dataReturn.dataset.rows[0].columnConfig) { + this.setState({ + customConfig: dataReturn.dataset.rows[0].columnConfig + }) + } + // const returnData = dataReturn.dataset.rows[0].dataSet; + if (commonUtils.isNotEmptyObject(returnData)) { + if (formRoute === '/indexPage/materialRequirementsPlanning') { + returnData.forEach((tableDataRow) => { + tableDataRow.sSlaveId = tableDataRow.sMaterialsId + tableDataRow.sMaterialsStyle; + tableDataRow.dAuxiliaryQtyAll = tableDataRow.dAuxiliaryQty; + tableDataRow.dMaterialsQtyAll = tableDataRow.dMaterialsQty; + }); + } + if ((sModelsType && sModelsType.includes('linkTree'))) { + returnData.forEach((tableDataRow) => { + tableDataRow.dAuxiliaryQtyAll = tableDataRow.dAuxiliaryQty; + tableDataRow.dMaterialsQtyAll = tableDataRow.dMaterialsQty; + }); + } + /* 若有sDivRow则数据行上面插入一行 */ + const returnFilterData = returnData.filter(item => commonUtils.isNotEmptyObject(item.sDivRow) && item.sDivRow !== ''); + if (commonUtils.isNotEmptyArr(returnFilterData)) { + returnFilterData.forEach((tableDataRow, index) => { + /* 找到白班与晚班区间的汇总条数与工时 */ + let startIndex = 0; /* 找到开始下标 */ + let endindex = 0; /* 找到结束下标 */ + let sliceData = []; + startIndex = returnData.findIndex(item => item.sId === returnFilterData[index].sId); + if (index + 1 < returnFilterData.length) { + endindex = returnData.findIndex(item => item.sId === returnFilterData[index + 1].sId); + } + if (index === returnFilterData.length - 1) { + endindex = returnData.length; + } + if (startIndex < endindex) { + sliceData = returnData.slice(startIndex, endindex); + } + let num = 0; + let dTime = 0; + let dPlateQty = 0; /* 付版 */ + let dProcessQty = 0; + const newRow = {}; + newRow.sId = 'sDivRow' + index; + newRow.sSlaveId = 'sDivRow' + commonUtils.createSid(); + if (commonUtils.isNotEmptyArr(sliceData)) { + num = sliceData.length; + sliceData.forEach((item) => { + if (commonUtils.isNotEmptyNumber(item.dHour1)) { + dTime += item.dHour1; + dPlateQty += commonUtils.isNotEmptyNumber(item.dPlateQty) ? item.dPlateQty : 0; + dProcessQty += commonUtils.isNotEmptyNumber(item.dProcessQty) ? item.dProcessQty : 0; + const iSrcIndex = returnData.findIndex(itemReturn => itemReturn.sSlaveId === item.sSlaveId); /* 汇总的每行上都加newRow的sSlaveId作为父级Id */ + if (iSrcIndex > -1) { + returnData[iSrcIndex] = {...returnData[iSrcIndex], sDivRowParentId: newRow.sSlaveId} + } + } + }); + } + newRow.sDivRowNew = tableDataRow.sDivRow; + newRow.bInsert = true; /* 新插入 */ + newRow.sState = null; + newRow.sProcessId = tableDataRow.sProcessId; + /* 取第一个配置 */ + const configArr = configData.gdsconfigformslave.filter(item => item.bVisible && item.sName !== ''); + if (commonUtils.isNotEmptyArr(configArr)) { + let firstName = ''; + if (configArr[0].sName === 'iOrder') { + firstName = configArr[1].sName; + } else { + firstName = configArr[1].sName; + } + if (commonUtils.isNotEmptyObject(firstName)) { + const firstDataIndex = firstName.substring(0, 1); + if (firstDataIndex !== 't' && firstDataIndex !== 'p') { + newRow[firstName] = tableDataRow.sDivRow; + if (num > 0) { + newRow[firstName] += 'F' + num + '单'; + } + if (dProcessQty > 0) { + newRow[firstName] += ' - ' + dProcessQty; + } + if (tableDataRow.sType === "1") { + newRow[firstName] += ' - ' + dPlateQty + '付版'; + } + if (dTime > 0) { + // newRow[firstName] += ' - ' + Math.floor(dTime/60) + ":" + (dTime%60) + '小时'; + newRow[firstName] += ' - ' + (dTime / 60).toFixed(2) + 'h'; + } + } + } + } + const iInsertIndex = returnData.findIndex(item => item.sSlaveId === tableDataRow.sSlaveId); + if (iInsertIndex > -1) { + returnData[iInsertIndex].sDivRow = ''; + returnData.splice(iInsertIndex, 0, newRow); /* 在目标位置前面增加一行 */ + } + }); + } + if (commonUtils.isEmptyArr(tableSelectedData)) { + if (formRoute !== '/indexPage/materialRequirementsPlanning' && formRoute !== '/indexPage/commonClassify') { + if (commonUtils.isNotEmptyStr(returnData[0].sSlaveId)) { + const keys = []; + keys.push(returnData[0].sSlaveId); + tableSelectedRowKeys = keys; + } else { + const keys = []; + keys.push(returnData[0].sId); + tableSelectedRowKeys = keys; + } + } + if (flag) { + tableSelectedRowKeys = []; + menuChildData = []; // 打印下拉置空 + } + } + } + if (clearSelectData) { + tableSelectedRowKeys = []; + menuChildData = []; // 打印下拉置空 + } + /** + * 修改日期:2021-03-30 + * 修改人:吕杰 + * 区域:以下 4 行 + * BUG:2185 + * 说明:右下角 增加单据个数显示 + * 原代码: + */ + let billNum = ''; + if (dataReturn.dataset.billNum) { + billNum = `共${dataReturn.dataset.billNum}个单据 `; + } + const iOeeBillPageSize = iPageSize < 100 ? 100 : iPageSize; + const returnPagination = { + total: dataReturn.dataset.totalCount, + current: dataReturn.dataset.currentPageNo, + pageSize: formRoute === '/indexPage/commonSubBill' ? iPageSize : location.pathname.includes('commonOeeBill') ? iOeeBillPageSize : dataReturn.dataset.pageSize, + showTotal: (total) => { + return ( + {`当前显示 ${billNum}共${total}条记录`} + ); + }, + }; + // 如果是commonNewBill,不取接口返回的分页数 + if (formRoute === '/indexPage/commonNewBill' && pageSize) { + returnPagination.pageSize = pageSize; + } + const sumSet1Default = [{ + "dProfit": '辊底重量:0.00', + "dTotalProfitMoney": '转入重量:0.00', + "dNetMargin": '分切重量:0.00', + "dTotalNetProfit": '边料重量:0.00', + "dMainBusinessMoney": '转出重量:0.00', + "dOperaMoney": '总重量:0.00', + "dFreight": '转入数量:0.00', + "dOtherbusinessCostMoney": '转出数量:0.00', + "dSellingExpenses": '总件数:0', + }]; + const { sumSet, sumSet1 = sumSet1Default } = dataReturn.dataset.rows[0]; + const totalData = sumSet !== undefined ? sumSet : []; + const totalData1 = sumSet1 !== undefined ? sumSet1 : []; + const filterCondition = commonUtils.isNotEmptyObject(condition) ? condition.bFilter : ''; + const orderBy = commonUtils.isNotEmptyObject(condition) ? condition.sFilterOrderBy : ''; + /* 去除树搜索filterCondition */ + const filterConditionNew = commonUtils.isNotEmptyObject(filterCondition) ? filterCondition.filter(item => item.bFilterType !== 'tree') : ''; + let addState = { + [`${name}Data`]: returnData, + [`${name}Pagination`]: returnPagination, + [`${name}FilterCondition`]: filterConditionNew, + [`${name}OrderBy`]: orderBy, + [`${name}SelectedRowKeys`]: tableSelectedRowKeys, + menuChildData, + /* + 修改日期:2021-03-17 + 修改人:吕杰 + 区域:以下一行 + 需求变更:fix 2135 搜索时添加loading动画 + */ + pageLoading: false, + iPageSize, + masterConditionData + }; + if (commonUtils.isNotEmptyArr(totalData1)) { + addState = { ...addState, [`${name}Total1`]: totalData1, [`${name}AllTotal`]: totalData1 }; + } + if (dataReturn.dataset.currentPageNo === 1) { + addState = { ...addState, [`${name}Total`]: totalData, [`${name}AllTotal`]: totalData }; + } + const slaveSelectedData = []; + if ((formRoute === '/indexPage/commonList' || formRoute === '/indexPage/materialRequirementsPlanning') && name === 'slave' && commonUtils.isNotEmptyArr(tableSelectedRowKeys) && !clearSelectData) { + tableSelectedRowKeys.forEach((item) => { + const iPageIndex = returnData.findIndex(pageItem => pageItem.sSlaveId === item); + if (iPageIndex > -1) { + slaveSelectedData.push(returnData[iPageIndex]); + } else if (commonUtils.isNotEmptyArr(tableSelectedData)) { + const iIndex = tableSelectedData.findIndex(pageItem => pageItem.sSlaveId === item); + if (iIndex > -1) { + slaveSelectedData.push(tableSelectedData[iIndex]); + } + } + }); + } else if (formRoute === '/indexPage/materialRequirementsPlanning' && clearSelectData) { /* 处理物料需求计划生成采购申请单,刷新时,数据重复问题 */ + addState.slaveInfoSelectedRowKeys = []; + addState.slaveInfoSelectedData = []; + } + addState[`${name}SelectedData`] = slaveSelectedData; + /* 如果获取数据集时候 删除数据集有数据 则清空 */ + if (commonUtils.isNotEmptyArr(tableDelData)) { + addState[`${name}DelData`] = []; + } + if (isWait) { + console.log(addState) + return addState; + } else if (this.mounted) { + this.setState(addState); + } + } else { + message.error(name +'表数据获取错误!'); + } + } else { + /* + 修改日期:2021-03-17 + 修改人:吕杰 + 区域:以下三行 + 需求变更:fix 2135 搜索时添加loading动画 + */ + if (!isWait && this.mounted) { + this.setState({ pageLoading: false }); + } + this.getServiceError(dataReturn); + } + }; + + /* 获取过滤树数据(数据集) */ + handleGetTreeDataSet = async (params, name) => { + const { + configData, condition, isWait, + } = params; + const { token, sModelsId, formSrcRoute } = this.state; + let treeData = []; + const expandedKeys = []; + const configDataId = configData.sParentId; + const dataUrl = `${commonConfig.server_host}filterTree/getFilterTree/${configDataId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`; + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; + if (dataReturn.code === 1) { + const returnData = dataReturn.dataset.rows; + if (commonUtils.isNotEmptyArr(returnData)) { + /* 拼装树结构 */ + treeData = returnData; + /* 默认展开第一个父节点 */ + if (treeData.length > 0) { + if (commonUtils.isNotEmptyObject(treeData[0].key)) { + expandedKeys.push(treeData[0].key); + } + } + } + let addState = { + expandedKeys, + }; + if (name) { + addState[`${name}TreeData`] = treeData; + } else { + addState.treeData = treeData; + } + addState = { ...addState }; + if (isWait) { + return addState; + } else if (this.mounted) { + this.setState(addState); + } + } else { + this.getServiceError(dataReturn); + } + }; + + /* 重新获取界面配置 */ + handleGetTableConfig = async (name, sModelsId, oldConfig) => { + const { token, formSrcRoute, formRoute } = this.state; + let tableConfig = {}; + const configUrl = `${commonConfig.server_host}business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`; + const configReturn = (await commonServices.getService(token, configUrl)).data; + if (configReturn.code === 1) { + const [configData] = configReturn.dataset.rows; + const { formData } = configData; + if (commonUtils.isNotEmptyArr(formData)) { + if (oldConfig) { + tableConfig = formData.find(item => item.sId === oldConfig.sId); + } else if(formRoute === '/indexPage/commonList') { + tableConfig = formData[0]; + } else if(formRoute === '/indexPage/commonNewBill') { + if (name === 'master') { + tableConfig = formData[0]; + } else if (name === 'slave') { + tableConfig = formData.length > 1 ? formData[1] : {}; + } else if (name === 'slave0') { + tableConfig = formData.length > 2 ? formData[2] : {}; + } else if (name === 'slave1') { + tableConfig = formData.length > 3 ? formData[3] : {}; + } else if (name === 'slave2') { + tableConfig = formData.length > 4 ? formData[4] : {}; + } + } else { + if (name === 'master') { + tableConfig = formData[0]; + } else if (name === 'slave') { + tableConfig = formData.length > 1 ? formData[1] : {}; + } else if (name === 'control') { + tableConfig = formData.length > 2 ? formData[2] : {}; + } else if (name === 'materials') { + tableConfig = formData.length > 3 ? formData[3] : {}; + } else if (name === 'process') { + tableConfig = formData.length > 4 ? formData[4] : {}; + } else if (name === 'slave0') { + tableConfig = formData.length > 2 ? formData[2] : {}; + } else if (name === 'slave1') { + tableConfig = formData.length > 3 ? formData[3] : {}; + } else if (name === 'slave2') { + tableConfig = formData.length > 4 ? formData[4] : {}; + } else if (name === 'slave3') { + tableConfig = formData.length > 5 ? formData[5] : {}; + } else if (name === 'slave4') { + tableConfig = formData.length > 6 ? formData[6] : {}; + } + } + } + } else { + this.getServiceError(configReturn); + } + return tableConfig; + } + /* + 修改日期:2021-03-18 + 修改人:吕杰 + 区域:以下handleSaveState函数 + 需求变更:添加回调 + 原代码: + handleSaveState = (values) => { + if (this.mounted) { + this.setState(values); + } + }; + */ + /* 数据保存到state */ + handleSaveState = (values, callback) => { + if (this.mounted) { + this.setState(values, typeof callback === 'function' ? callback : undefined); + } + }; + + /** 修改主表数据 */ + handleMasterChange = (name, sFieldName, changeValue, sId, dropDownData, isWait, masterDataNew) => { + const { masterData: masterDataOld } = this.state; + const { + sModelsId, masterConfig, slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config, slave5Config, + } = this.state; + const addState = {}; + let masterData = masterDataNew === undefined ? masterDataOld === undefined ? {} : masterDataOld : masterDataNew; + let { handleType } = masterData; + handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + if (sFieldName.substring(0, 1).toLowerCase() === 'c') { + const sAllField = sFieldName.substring(1, sFieldName.length); + const allField = sAllField.split('_'); + const value = changeValue[sFieldName]; + allField.forEach((item, iArr) => { + if (value.length > iArr) { + changeValue[item] = value[iArr]; + } + }); + } + const bClearSelectedRowKeys = location.pathname.includes('commonList') ? false : true; /* 是否清除从表选择行 */ + if (!commonUtils.isEmpty(masterConfig.gdsconfigformslave) && commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave) && !commonUtils.isEmpty(sFieldName)) { + masterConfig.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(sFieldName) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, name, item.sName, []); + }); + if (commonUtils.isNotEmptyObject(slaveConfig)) { + slaveConfig.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(`master.${sFieldName}`) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, 'slave', item.sName, []); + if (bClearSelectedRowKeys) { + addState.slaveSelectedRowKeys = []; + } + }); + } + if (commonUtils.isNotEmptyObject(slave0Config)) { + slave0Config.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(`master.${sFieldName}`) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, 'slave0', item.sName, []); + if (bClearSelectedRowKeys) { + addState.slave0SelectedRowKeys = []; + } + }); + } + if (commonUtils.isNotEmptyObject(slave1Config)) { + slave1Config.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(`master.${sFieldName}`) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, 'slave1', item.sName, []); + if (bClearSelectedRowKeys) { + addState.slave1SelectedRowKeys = []; + } + }); + } + if (commonUtils.isNotEmptyObject(slave2Config)) { + slave2Config.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(`master.${sFieldName}`) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, 'slave2', item.sName, []); + if (bClearSelectedRowKeys) { + addState.slave2SelectedRowKeys = []; + } + }); + } + if (commonUtils.isNotEmptyObject(slave3Config)) { + slave3Config.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(`master.${sFieldName}`) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, 'slave3', item.sName, []); + if (bClearSelectedRowKeys) { + addState.slave3SelectedRowKeys = []; + } + }); + } + if (commonUtils.isNotEmptyObject(slave4Config)) { + slave4Config.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(`master.${sFieldName}`) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, 'slave4', item.sName, []); + if (bClearSelectedRowKeys) { + addState.slave4SelectedRowKeys = []; + } + }); + } + if (commonUtils.isNotEmptyObject(slave5Config)) { + slave5Config.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(`master.${sFieldName}`) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, 'slave5', item.sName, []); + if (bClearSelectedRowKeys) { + addState.slave5SelectedRowKeys = []; + } + }); + } + /* 字段输入时 根据规则 控制其他字段的显示与隐藏 */ + const iConfigIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === sFieldName); + if (iConfigIndex > -1) { + const sFiledConfig = masterConfig.gdsconfigformslave[iConfigIndex]; + if (commonUtils.isNotEmptyObject(sFiledConfig)) { + const tableDataRow = { ...masterData, ...changeValue, handleType }; + const sRulesJson = sFiledConfig.sButtonEnabled; + if (commonUtils.isNotEmptyObject(sRulesJson) && commonUtils.isJSON(sRulesJson)) { + const sRulesObjArr = JSON.parse(sRulesJson); + if (commonUtils.isNotEmptyArr(sRulesObjArr)) { + console.log('sRulesObjArr:', sRulesObjArr); + sRulesObjArr.forEach((sRulesObj) => { + const { + showColumn, hideColumn, condition, tbName, sConfigName, + } = sRulesObj; + console.log('tbName:', tbName); + /* 主表单表字段根据条件控制 其他字段的显示与隐藏 */ + if (commonUtils.isEmptyObject(tbName)) { + if (commonUtils.isNotEmptyArr(condition)) { + let flag = false; + for (const item of condition) { + const { + bFilterName, bFilterCondition, bFilterValue, + } = item; + if (bFilterCondition === '>') { + if (tableDataRow[bFilterName] > bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '=') { + if (tableDataRow[bFilterName] === bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '<') { + if (tableDataRow[bFilterName] < bFilterValue) { + flag = true; + } + } + } + if (flag) { + if (commonUtils.isNotEmptyArr(showColumn)) { + for (const column of showColumn) { + const iShowIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iShowIndex > -1) { + const sFiledObj = masterConfig.gdsconfigformslave[iShowIndex]; + if (commonUtils.isNotEmptyObject(sFiledObj)) { + if (commonUtils.isNotEmptyObject(sConfigName) && sConfigName === 'bControl') { + masterConfig.gdsconfigformslave[iShowIndex].bControl = true; /* 控制字段bControl的显示与隐藏 */ + } else { + masterConfig.gdsconfigformslave[iShowIndex].bVisible = true; + } + } + } + } + } + if (commonUtils.isNotEmptyArr(hideColumn)) { + for (const column of hideColumn) { + const iHideIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iHideIndex > -1) { + if (commonUtils.isNotEmptyObject(sConfigName) && sConfigName === 'bControl') { + masterConfig.gdsconfigformslave[iHideIndex].bControl = true; /* 控制字段bControl的显示与隐藏 */ + } else { + masterConfig.gdsconfigformslave[iHideIndex].bVisible = false; + } + } + } + } + addState.masterConfig = masterConfig; + } + } + } else { /* 主表字段根据条件控制 其他表格字段的显示与隐藏 */ + const { [`${tbName}Config`]: tableConfig } = this.state; + // const { controlConfig: tableConfig } = this.state; + if (commonUtils.isNotEmptyObject(tableConfig)) { + if (commonUtils.isNotEmptyArr(condition)) { + let flag = false; + for (const item of condition) { + const { + bFilterName, bFilterCondition, bFilterValue, + } = item; + if (bFilterCondition === '>') { + if (tableDataRow[bFilterName] > bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '=') { + if (tableDataRow[bFilterName] === bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '<') { + if (tableDataRow[bFilterName] < bFilterValue) { + flag = true; + } + } + } + if (flag) { + if (commonUtils.isNotEmptyArr(showColumn)) { + for (const column of showColumn) { + const iShowIndex = tableConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iShowIndex > -1) { + const sFiledObj = tableConfig.gdsconfigformslave[iShowIndex]; + if (commonUtils.isNotEmptyObject(sFiledObj)) { + tableConfig.gdsconfigformslave[iShowIndex].bVisible = true; + } + } + } + } + if (commonUtils.isNotEmptyArr(hideColumn)) { + for (const column of hideColumn) { + const iHideIndex = tableConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iHideIndex > -1) { + const sFiledObj = tableConfig.gdsconfigformslave[iHideIndex]; + if (commonUtils.isNotEmptyObject(sFiledObj)) { + tableConfig.gdsconfigformslave[iHideIndex].bVisible = false; + } + } + } + } + if (commonUtils.isNotEmptyObject(tableConfig)) { + const tableColumn = commonFunc.getHeaderConfig(tableConfig); + // addState.masterConfig = masterConfig; + // addState.controlConfig = tableConfig; /* 表格配置塞到addState中 */ + // addState.controlColumn = tbColumn; + addState[`${tbName}Config`] = tableConfig; + addState[`${tbName}Column`] = tableColumn; + } + } + } + } + } + }); + } + } + } + } + } + masterData = { ...masterData, ...changeValue, handleType }; + if (isWait) { + return { masterData, ...addState }; // , sUseInfo: '' + } else if (this.mounted) { + this.setState({ masterData, ...addState }); // , sUseInfo: '' + return { masterData, ...addState }; + } + }; + + /** 表格数据更改 */ + // name 不写完整的state名称作用为了要用到total // (name, changeValue, sId, dropDownData) + handleTableChange = (name, sFieldName, changeValue, sId, dropDownData, isWait) => { + const { [`${name}Data`]: tableData, [`${name}Config`]: tableConfig, sModelsId } = this.state; + const iIndex = tableData.findIndex(item => item.sId === sId); + let { handleType } = tableData[iIndex]; + handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + if (sFieldName.substring(0, 1).toLowerCase() === 'c') { + const sAllField = sFieldName.substring(1, sFieldName.length); + const allField = sAllField.split('_'); + const value = changeValue[sFieldName]; + allField.forEach((item, iArr) => { + if (value.length > iArr) { + changeValue[item] = value[iArr]; + } + }); + } + + if (!commonUtils.isEmpty(tableConfig.gdsconfigformslave) && commonUtils.isNotEmptyArr(tableConfig.gdsconfigformslave) && !commonUtils.isEmpty(sFieldName)) { + tableConfig.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(`master.${sFieldName}`) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, 'slave', item.sName, []); + }); + // tableConfig.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && item.sSqlCondition.includes(sFieldName)).forEach((item) => { + // commonUtils.setStoreDropDownData(sModelsId, name, item.sName, []); + // }); + + /* 字段输入时 根据规则 控制其他字段的显示与隐藏 */ + const iConfigIndex = tableConfig.gdsconfigformslave.findIndex(item => item.sName === sFieldName); + if (iConfigIndex > -1) { + const sFiledConfig = tableConfig.gdsconfigformslave[iConfigIndex]; + if (commonUtils.isNotEmptyObject(sFiledConfig)) { + const tableDataRow = { ...tableData[iIndex], ...changeValue, handleType }; + const sRulesJson = sFiledConfig.sButtonEnabled; + if (commonUtils.isNotEmptyObject(sRulesJson) && commonUtils.isJSON(sRulesJson)) { + const sRulesObj = JSON.parse(sRulesJson); + if (commonUtils.isNotEmptyObject(sRulesObj)) { + const { showColumn, hideColumn, condition } = sRulesObj; + if (commonUtils.isNotEmptyArr(condition)) { + let flag = false; + for (const item of condition) { + const { + bFilterName, bFilterCondition, bFilterValue, + } = item; + if (bFilterCondition === '>') { + if (tableDataRow[bFilterName] > bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '=') { + if (tableDataRow[bFilterName] === bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '<') { + if (tableDataRow[bFilterName] < bFilterValue) { + flag = true; + } + } + } + if (flag) { + if (commonUtils.isNotEmptyArr(showColumn)) { + for (const column of showColumn) { + const iShowIndex = tableConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iShowIndex > -1) { + const sFiledObj = tableConfig.gdsconfigformslave[iShowIndex]; + if (commonUtils.isNotEmptyObject(sFiledObj)) { + tableConfig.gdsconfigformslave[iShowIndex].bVisible = true; + } + } + } + } + if (commonUtils.isNotEmptyArr(hideColumn)) { + for (const column of hideColumn) { + const iHideIndex = tableConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iHideIndex > -1) { + tableConfig.gdsconfigformslave[iHideIndex].bVisible = false; + } + } + } + + const tableColumn = commonFunc.getHeaderConfig(tableConfig); + this.setState({ [`${name}Config`]: tableConfig, [`${name}Column`]: tableColumn }); + } + } + } + } + } + } + const tableDataRowNew = { ...tableData[iIndex], ...changeValue, handleType }; + const tableDataAfter = commonBusiness.getKeyUpEvent(name, sFieldName, tableConfig, tableDataRowNew, tableDataRowNew, true); + if (commonUtils.isNotEmptyObject(tableDataAfter)) { + changeValue = { ...tableDataAfter }; + } + } + if (isWait) { + return { ...tableData[iIndex], ...changeValue, handleType }; + } else { + tableData[iIndex] = { ...tableData[iIndex], ...changeValue, handleType }; + if (this.mounted) { + this.setState({ [`${name}Data`]: tableData, sUseInfo: '' }); + } + } + }; + /** 添加表格空行 */ + handleTableAdd = (name, isWait) => { + /* 外置处理业务 */ + const { + [`${name}Config`]: tableConfig, masterData, slaveData, slaveSelectedRowKeys, + } = this.state; + let { [`${name}Data`]: tableData } = this.state; + tableData = commonUtils.isEmptyObject(tableData) ? [] : tableData; + const allTableData = {}; + allTableData.master = masterData; + if (commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { + const iSlaveIndex = slaveData.findIndex(item => item.sId === slaveSelectedRowKeys.toString()); + allTableData.slave = slaveData[iSlaveIndex]; + } + const iOrderArr = []; + tableData.forEach((item) => { + const iOrder = commonUtils.isNotEmptyNumber(item.iOrder) ? item.iOrder : 0; /* 获取tableData中iOrder最大值 */ + iOrderArr.push(iOrder); + }); + const iOrderMax = Math.max(...iOrderArr); + const tableDataRow = commonFunc.getDefaultData(tableConfig, allTableData); + tableDataRow.handleType = 'add'; + tableDataRow.sId = commonUtils.createSid(); + tableDataRow.sParentId = masterData && masterData.sId ? masterData.sId : null; + tableDataRow.key = tableDataRow.sId; + tableDataRow.bDefault = false; + tableDataRow.iOrder = commonUtils.isNotEmptyArr(tableData) ? iOrderMax + 1 : 1; + tableDataRow.defaultAdded = tableData.length === 0; + if (isWait) { + return tableDataRow; + } else { + // tableData.splice(index, 1, tableDataRow); /* 该处会导致新增时删除首行 */ + tableData.push(tableDataRow); + if (this.mounted) { + this.setState({ [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: [tableDataRow.sId] }); + } + } + }; + + // name 不写完整的state名称作用为了要用到total + /** 删除表格数据 */ + handleTableDel = (name, isWait, tableSelectedRowKeys) => { + const { app } = this.props; + const { [`${name}Data`]: tableData } = this.state; + let { [`${name}DelData`]: tableDelData, [`${name}Pagination`]: pagination = {} } = this.state; + tableDelData = commonUtils.isEmptyArr(tableDelData) ? [] : tableDelData; + if (commonUtils.isNotEmptyArr(tableSelectedRowKeys)) { + for (const sId of tableSelectedRowKeys) { + /* 看看删除集合和从表中是否都存在该条数据 */ + let tableDataIndex = tableData.findIndex(item => item.sId === sId); + while (tableDataIndex > -1) { + /* 删除从表中的数据并存入删除集合中 */ + const slaveDataFilter = tableData[tableDataIndex]; + tableData.splice(tableDataIndex, 1); + slaveDataFilter.handleType = 'del'; + tableDelData.push(slaveDataFilter); + tableDataIndex = tableData.findIndex(item => item.sId === sId); + } + } + + const addState = {}; + if (commonUtils.isNotEmptyObject(pagination)) { + addState[`${name}Pagination`] = { + ...pagination, + total: tableData.length, + } + } + + if (isWait) { + return { [`${name}Data`]: tableData, [`${name}DelData`]: tableDelData, [`${name}SelectedRowKeys`]: [], ...addState }; + } else { + if (this.mounted) { + this.setState({ + [`${name}Data`]: tableData, + [`${name}DelData`]: tableDelData, + [`${name}SelectedRowKeys`]: [], + ...addState, + }); + } + return true; + } + } else { + if (!isWait) { + message.warn(commonFunc.showMessage(app.commonConst, 'pleaseChooseDelData')); // 请选择删除数据 + } + return false; + } + }; + + /** 处理选择行发生改变 */ + handleTableSelectRowChange = (name, selectedRowKeys, isWait) => { + /* 外置处理业务 */ + const { + formRoute, slaveData, sModelsId, [`${name}Config`]: tableConfig, + } = this.state; + let { slaveSelectedData } = this.state; + const addState = {}; + addState[`${name}SelectedRowKeys`] = selectedRowKeys; + addState.searchUpDownData = {}; + if (name === 'slave' && (formRoute === '/indexPage/commonList' || formRoute === '/indexPage/commonListEdit' || formRoute === '/indexPage/commonListTree' || formRoute.indexOf('/indexOee') > -1)) { + const slavePageData = slaveData.filter(item => selectedRowKeys.includes(item.sSlaveId)); + slaveSelectedData = commonUtils.isEmpty(slaveSelectedData) ? [] : slaveSelectedData.filter(item => selectedRowKeys.toString().includes(item.sSlaveId)); + selectedRowKeys.forEach((item) => { + const iIndex = slaveSelectedData.findIndex(selectItem => selectItem.sSlaveId === item); + if (iIndex === -1) { + const iPageIndex = slavePageData.findIndex(pageItem => pageItem.sSlaveId === item); + if (iPageIndex > -1) { + slaveSelectedData.push(slavePageData[iPageIndex]); + } + } + }); + addState.slaveSelectedData = slaveSelectedData; + } + if (commonUtils.isNotEmptyObject(tableConfig)) { + tableConfig.gdsconfigformslave.forEach((configItem) => { + const sFieldName = configItem.sName; + if (!commonUtils.isEmpty(tableConfig.gdsconfigformslave) && commonUtils.isNotEmptyArr(tableConfig.gdsconfigformslave) && !commonUtils.isEmpty(sFieldName) && + (commonUtils.isEmptyArr(this.state[`${name}SelectedRowKeys`]) || selectedRowKeys.toString() !== this.state[`${name}SelectedRowKeys`].toString())) { + tableConfig.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && !commonUtils.isEmpty(item.sChineseDropDown) && + (item.sChineseDropDown.includes(`#${sFieldName}`) || item.sChineseDropDown.includes(`*${sFieldName}`)) && + (item.sSqlCondition.includes(`master.${sFieldName}`) || item.sSqlCondition.includes(sFieldName.replace('Name', 'Id')))).forEach((item) => { + commonUtils.setStoreDropDownData(sModelsId, 'slave', item.sName, []); + }); + // tableConfig.gdsconfigformslave.filter(item => !commonUtils.isEmpty(item.sSqlCondition) && item.sSqlCondition.includes(sFieldName)).forEach((item) => { + // commonUtils.setStoreDropDownData(sModelsId, name, item.sName, []); + // }); + } + }); + } + if (this.mounted) { + if (isWait) { + return addState; + } else { + this.setState(addState); + } + } + }; + + handleViewClick = (name, sName, record, index) => { + const { + [`${name}Config`]: slaveConfig, customConfig, [`${name}Data`]: slaveData, [`${name}Pagination`]: slavePagination, formSrcRoute, masterConfig, + } = this.state; + let { + [`${name}FilterCondition`]: slaveFilterCondition, + } = this.state; + let picArr = slaveConfig.gdsconfigformslave.filter(item => (item.sName === sName)); + if (commonUtils.isNotEmptyArr(customConfig)) { + picArr = customConfig.filter(item => item.sName === sName); + } + if (commonUtils.isNotEmptyObject(sName) && sName.includes('BtnEject')) { + picArr = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sControlName === sName); + } + if (picArr.length > 0) { + const tableDataRow = record; + const iIndex = index; + // let tableDataRow = {}; + // let iIndex = 0; + /* 判断slaveData是数组还是对象 */ + // if (commonUtils.isNotEmptyObject(slaveData) && slaveData.length > 0) { + // iIndex = slaveData.findIndex(item => item.sId === sId); + // tableDataRow = iIndex > -1 ? slaveData[iIndex] : {}; + // } else if (commonUtils.isNotEmptyObject(slaveData)) { + // tableDataRow = slaveData; + // } + const [{ sActiveId }] = picArr; + let [{ sActiveKey }] = picArr; + const sFormId = sActiveId === '1' ? commonUtils.isEmpty(tableDataRow.sFormId) ? tableDataRow.sSrcFormId : tableDataRow.sFormId : sActiveId; + if (commonUtils.isNotEmptyObject(sActiveKey) && sActiveKey.includes('.')) { /* 接口按钮跳转 如果有slave.对应字段 则需要取出对应字段 */ + const index = sActiveKey.lastIndexOf('.'); + sActiveKey = sActiveKey.substring(index + 1, sActiveKey.length); + } + const sNameUrl = `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sFormId}?sModelsId=${sFormId}&sName=${formSrcRoute}`; + const filterCondition = []; + const conditionValues = this.getSqlCondition(picArr[0], name, tableDataRow); + if (!commonUtils.isEmpty(conditionValues)) { + Object.keys(conditionValues).forEach((item) => { + if ((item === 'tStartDate_pro' || item.substring(0, 1) === 'p')) { + if (!commonUtils.isEmpty(conditionValues[item]) && conditionValues[item].length >= 2) { + const tStartDate = moment(conditionValues[item][0]).format(this.sDateFormat); + const tEndDate = moment(conditionValues[item][1]).add(1, 'days').format(this.sDateFormat); + filterCondition.push({ + bFilterName: item, + bFilterCondition: '=', + bFilterValue: `${tStartDate},${tEndDate}`, + }); + } + } else if ((item === 'mStartDate_pro' || item.substring(0, 1) === 'm')) { + if (!commonUtils.isEmpty(conditionValues[item])) { + const tStartDate = moment(conditionValues[item]).startOf('month').format(this.sDateFormat); + const tEndDate = moment(conditionValues[item]).endOf('month').add(1, 'days').format(this.sDateFormat); + filterCondition.push({ + bFilterName: `t${item.substring(1, item.length)}`, + bFilterCondition: '=', + bFilterValue: `${tStartDate},${tEndDate}`, + }); + } + } else if (item.substring(0, 1) === 't') { + filterCondition.push({ + bFilterName: item, + bFilterCondition: '=', + bFilterValue: moment(conditionValues[item]).format(this.sDateFormat), + }); + } else { + filterCondition.push({ + bFilterName: item, + bFilterCondition: '=', + bFilterValue: conditionValues[item], + }); + } + }); + } + let copyTo ={}; + let bLinkPlanTree = commonUtils.isNotEmptyObject(tableDataRow) && tableDataRow.bLinkPlanTree; + if(bLinkPlanTree) { + copyTo = { + treeKey : tableDataRow.sMachineId + tableDataRow.sWorkCenterId, + sWorkCenterName: tableDataRow.sWorkCenterName, + } + } + let payload = { + url: sNameUrl, + sTabId: commonUtils.createSid(), + sParentId: this.state.sTabId, + urlDataType: 'newPane', + checkedId: tableDataRow[sActiveKey], + bFilter: slaveFilterCondition, + pageSize: this.state.iPageSize, + pages: slavePagination, + currentData: [tableDataRow], + conditonValues: bLinkPlanTree ? undefined : conditionValues, + sListFormmasterId: slaveConfig.sId, + newKey: tableDataRow[sActiveKey], + currentIndex: iIndex, + filterCondition: bLinkPlanTree ? undefined : filterCondition, + copyTo: copyTo + } + this.props.dispatch({ + type: 'content/onRouter', + payload + }); + } + }; + /* 快捷键跳转 */ + handleQuickViewClick = (name, sName, record, index, myConfigArr) => { + const { + [`${name}Config`]: slaveConfig, customConfig, [`${name}FilterCondition`]: slaveFilterCondition, [`${name}Pagination`]: slavePagination, formSrcRoute, masterConfig, + } = this.state; + + let picArr = slaveConfig.gdsconfigformslave.filter(item => (item.sName === sName)); + + if (commonUtils.isNotEmptyArr(customConfig)) { + picArr = customConfig.filter(item => item.sName === sName); + } + if (commonUtils.isNotEmptyObject(sName) && sName.includes('BtnEject')) { + picArr = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sControlName === sName); + } + if (commonUtils.isNotEmptyArr(myConfigArr)) { + picArr = myConfigArr; + } + if (picArr.length > 0) { + const tableDataRow = record; + const iIndex = index; + // let tableDataRow = {}; + // let iIndex = 0; + /* 判断slaveData是数组还是对象 */ + // if (commonUtils.isNotEmptyObject(slaveData) && slaveData.length > 0) { + // iIndex = slaveData.findIndex(item => item.sId === sId); + // tableDataRow = iIndex > -1 ? slaveData[iIndex] : {}; + // } else if (commonUtils.isNotEmptyObject(slaveData)) { + // tableDataRow = slaveData; + // } + const [{ sActiveId }] = picArr; + let [{ sActiveKey }] = picArr; + const sFormId = sActiveId === '1' ? commonUtils.isEmpty(tableDataRow.sFormId) ? tableDataRow.sSrcFormId : tableDataRow.sFormId : sActiveId; + if (commonUtils.isNotEmptyObject(sActiveKey) && sActiveKey.includes('.')) { /* 接口按钮跳转 如果有slave.对应字段 则需要取出对应字段 */ + const index = sActiveKey.lastIndexOf('.'); + sActiveKey = sActiveKey.substring(index + 1, sActiveKey.length); + } + const sNameUrl = `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sFormId}?sModelsId=${sFormId}&sName=${formSrcRoute}`; + const filterCondition = []; + const conditionValues = this.getSqlCondition(picArr[0], name, tableDataRow); + if (!commonUtils.isEmpty(conditionValues)) { + Object.keys(conditionValues).forEach((item) => { + if ((item === 'tStartDate_pro' || item.substring(0, 1) === 'p')) { + if (!commonUtils.isEmpty(conditionValues[item]) && conditionValues[item].length >= 2) { + const tStartDate = moment(conditionValues[item][0]).format(this.sDateFormat); + const tEndDate = moment(conditionValues[item][1]).add(1, 'days').format(this.sDateFormat); + filterCondition.push({ + bFilterName: item, + bFilterCondition: '=', + bFilterValue: `${tStartDate},${tEndDate}`, + }); + } + } else if ((item === 'mStartDate_pro' || item.substring(0, 1) === 'm')) { + if (!commonUtils.isEmpty(conditionValues[item])) { + const tStartDate = moment(conditionValues[item]).startOf('month').format(this.sDateFormat); + const tEndDate = moment(conditionValues[item]).endOf('month').add(1, 'days').format(this.sDateFormat); + filterCondition.push({ + bFilterName: `t${item.substring(1, item.length)}`, + bFilterCondition: '=', + bFilterValue: `${tStartDate},${tEndDate}`, + }); + } + } else if (item.substring(0, 1) === 't') { + filterCondition.push({ + bFilterName: item, + bFilterCondition: '=', + bFilterValue: moment(conditionValues[item]).format(this.sDateFormat), + }); + } else { + filterCondition.push({ + bFilterName: item, + bFilterCondition: '=', + bFilterValue: conditionValues[item], + }); + } + }); + } + let copyTo = {}; + if (commonUtils.isNotEmptyObject(tableDataRow) && tableDataRow.bLinkPlanTree) { + copyTo = { + treeKey: tableDataRow.sMachineId + tableDataRow.sWorkCenterId, + sWorkCenterName: tableDataRow.sWorkCenterName, + }; + } + this.props.dispatch({ + type: 'content/onRouter', + payload: { + url: sNameUrl, + sTabId: commonUtils.createSid(), + sParentId: this.state.sTabId, + urlDataType: 'newPane', + checkedId: (commonUtils.isNotEmptyObject(tableDataRow[sActiveKey])) ? tableDataRow[sActiveKey] : myConfigArr[0].sId, + sName: myConfigArr[0].sName, + bFilter: slaveFilterCondition, + pageSize: this.state.iPageSize, + pages: slavePagination, + currentData: [tableDataRow], + conditonValues: conditionValues, + sListFormmasterId: slaveConfig.sId, + newKey: tableDataRow[sActiveKey], + currentIndex: iIndex, + filterCondition, + copyTo, + }, + }); + } + }; + handleRowMove = (addState) => { + this.setState(addState); + }; + handleFilterDropDownData = (dropDownData, showConfig, name, record) => { + if (!commonUtils.isEmptyArr(dropDownData)) { + const conditon = showConfig.sSqlCondition.split(','); + let orTableName; + let orFieldName; + let orFieldNameFilter; + let orValue; + conditon.forEach((item) => { + if (item.indexOf('.') > -1) { + const tableName = item.split('.')[0]; + const fieldName = item.split('.')[1]; + const fieldNameFilter = item.split('.')[2]; + if (tableName.indexOf('|') > -1) { + orTableName = tableName.replace('|', ''); + orFieldName = fieldName; + orFieldNameFilter = fieldNameFilter; + if (orFieldName.indexOf('&') > -1) { + orValue = orFieldName.replace('&', ''); + } else if (!commonUtils.isEmpty(orFieldNameFilter)) { + if (name === orTableName && !commonUtils.isEmpty(record)) { + const data = record; + orValue = data[orFieldName]; + } else { + const data = this.state[`${orTableName}Data`]; + const selectedRowKeys = this.state[`${orTableName}SelectedRowKeys`]; + if (typeof data === 'object' && data.constructor === Object) { + orValue = data[orFieldName]; + } else if (commonUtils.isNotEmptyArr(selectedRowKeys)) { + const iIndex = data.findIndex(itemData => itemData.sId === selectedRowKeys[0]); + if (iIndex > -1) { + orValue = data[iIndex][orFieldName]; + } + } else if (commonUtils.isNotEmptyArr(data)) { + orValue = data[0][orFieldName]; + } + } + } + orValue = orValue.toString(); + } else if (!commonUtils.isEmpty(orFieldName)) { + // master.sId 作为参数 control.sId.sControlId 作为filterDropdown过滤参数 + if (!commonUtils.isEmpty(fieldNameFilter)) { + if (name === tableName && !commonUtils.isEmpty(record)) { + const data = record; + dropDownData = dropDownData.filter(itemDrop => itemDrop[fieldNameFilter] === data[fieldName] || itemDrop[orFieldNameFilter] === orValue); + } else { + const data = this.state[`${tableName}Data`]; + const selectedRowKeys = this.state[`${tableName}SelectedRowKeys`]; + if (typeof data === 'object' && data.constructor === Object) { + dropDownData = dropDownData.filter(itemDrop => itemDrop[fieldNameFilter] === data[fieldName] || itemDrop[orFieldNameFilter] === orValue); + } else if (commonUtils.isNotEmptyArr(selectedRowKeys)) { + const iIndex = data.findIndex(itemData => itemData.sId === selectedRowKeys[0]); + if (iIndex > -1) { + dropDownData = dropDownData.filter(itemDrop => itemDrop[fieldNameFilter] === data[iIndex][fieldName] || itemDrop[orFieldNameFilter] === orValue); + } + } else if (commonUtils.isNotEmptyArr(data)) { + dropDownData = dropDownData.filter(itemDrop => itemDrop[fieldNameFilter] === data[0][fieldName] || itemDrop[orFieldNameFilter] === orValue); + } + } + } + } else if (!commonUtils.isEmpty(fieldNameFilter)) { + if (name === tableName && !commonUtils.isEmpty(record)) { + const data = record; + dropDownData = dropDownData.filter(itemDrop => itemDrop[fieldNameFilter] === data[fieldName]); + } else { + const data = this.state[`${tableName}Data`]; + const selectedRowKeys = this.state[`${tableName}SelectedRowKeys`]; + if (typeof data === 'object' && data.constructor === Object) { + dropDownData = dropDownData.filter(itemDrop => itemDrop[fieldNameFilter] === data[fieldName]); + } else if (commonUtils.isNotEmptyArr(selectedRowKeys)) { + const iIndex = data.findIndex(itemData => (commonUtils.isEmpty(itemData.sSlaveId) ? itemData.sId : itemData.sSlaveId) === selectedRowKeys[0]); + if (iIndex > -1) { + dropDownData = dropDownData.filter(itemDrop => itemDrop[fieldNameFilter] === data[iIndex][fieldName]); + } + } else if (commonUtils.isNotEmptyArr(data)) { + dropDownData = dropDownData.filter(itemDrop => itemDrop[fieldNameFilter] === data[0][fieldName]); + } + } + } + } + }); + } + + // let dropDownData = dropDownDataOld; + // const data = this.state[`${tableName}Data`]; + // const selectedRowKeys = this.state[`${tableName}SelectedRowKeys`]; + // if (commonUtils.isNotEmptyArr(selectedRowKeys)) { + // const SelectedData = data.filter(item => item.sId === selectedRowKeys[0]); + // if (SelectedData.length > 0 && commonUtils.isNotEmptyStr(SelectedData[0][fieldName])) { + // if (commonUtils.isNotEmptyArr(dropDownData)) { + // dropDownData = dropDownData.filter(item => item[fieldName] === SelectedData[0][fieldName]); + // } + // } + // } + return dropDownData; + }; + /* newRecord新纪录保存后,将数据回到到下拉框中 字段名,主从表名,赋值字段 */ + handleCallBackRecord = async (sName, name, sId) => { + const { + [`${name}SelectedRowKeys`]: tableSelectedRowKeys, sModelsId, [`${name}Data`]: tableNewData, slaveData, masterData, sModelsType, token, formRoute, + } = this.state; + const { app } = this.props; + /* 获取下拉的字段showConfig */ + const { [`${[name]}Config`]: nameConfig } = this.state; + const filedShowConfig = nameConfig.gdsconfigformslave.filter(item => (item.sName === sName)); + const AssignField = commonUtils.isNotEmptyArr(filedShowConfig) ? filedShowConfig[0].sAssignField : ''; + const sqlDropDownData = await this.getSqlDropDownData(sModelsId, name, filedShowConfig[0]); + /* 根据sName得到过滤数据 */ + const dropdownData = sqlDropDownData.dropDownData; + const filterDataIndex = dropdownData.findIndex(item => (item.sId === sId) || (commonUtils.isNotEmptyObject(item.sNId) && item.sNId === sId)); + if (filterDataIndex > -1) { + if (name !== 'master' && commonUtils.isNotEmptyObject(tableSelectedRowKeys)) { + const newCopyTo = {}; + const iIndex = tableNewData.findIndex(item => item.sId === tableSelectedRowKeys.toString()); + newCopyTo.master = masterData; + newCopyTo.slave = tableNewData[iIndex]; + let slaveRow = {}; + slaveRow = { ...tableNewData[iIndex], ...commonFunc.getAssignFieldValue(AssignField, dropdownData[filterDataIndex], newCopyTo) }; // 取赋值字段 + slaveRow.handleType = commonUtils.isEmpty(slaveRow.handleType) ? 'update' : slaveRow.handleType; + if (sName === 'sProductId' || sName === 'sProductName') { + slaveRow.sProductInfo = ''; + } + tableNewData[iIndex] = slaveRow; + + /* 套装工单、报价单、工艺卡的从表, 点击newRecord后 回带控制表合版数据 */ + const addState = {}; + if(formRoute && formRoute.includes('PackTableTree') && name === 'slave') { + const { controlData } = this.state;; + let { packData } = this.state; + if(commonUtils.isEmptyArr(packData)){ + packData =[]; + } + if(controlData.length ===1) { + const controlRow = controlData[0]; + const iIndex = packData.findIndex(item=> item.sControlId === controlRow.sId); + if(iIndex > -1){ + const packFilterData = packData.filter(item => item.sControlId === controlRow.sId); + if (commonUtils.isNotEmptyArr(packFilterData)) { + packFilterData.forEach((itemPack, index) => { + let packDataRow = itemPack; + const sControlId = controlRow.sControlId; + packDataRow.sControlId = controlRow.sId; + packDataRow.sSlaveId = slaveRow.sId; + packDataRow.sProductId = slaveRow.sProductId; /* 产品id */ + packDataRow.sCustomerId = slaveRow.sCustomerId; /* 客户id */ + packDataRow.sCustomerName = slaveRow.sCustomerName; /* 客户名称 */ + packDataRow.sProductName = slaveRow.sProductName; /* 产品名称 */ + packDataRow.sProductNo = slaveRow.sProductNo; /* 产品编号 */ + packDataRow.dCombineQty = 1; + packData[index] = { ...packData[index], ...packDataRow }; + if (commonUtils.isNotEmptyObject(packData[index])) { + const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty, sCombinePartsName } = packData[0]; + const tableCombineSelectedData = []; + const jsonObj = {}; + jsonObj.sId = sId; + jsonObj.sProductNo = sProductNo; /* 产品编号 */ + jsonObj.dCombineQty = commonUtils.isNotEmptyNumber(dCombineQty) ? dCombineQty : 0; /* 排版数 */ + jsonObj.dProductQty = commonUtils.isNotEmptyNumber(dProductQty) ? dProductQty : 0; /* 生产数 */ + jsonObj.dFactProductQty = commonUtils.isNotEmptyNumber(dFactProductQty) ? dFactProductQty : 0; /* 实际生产数 */ + jsonObj.sCombinePartsName = sCombinePartsName; /* 合版部件名称 */ + tableCombineSelectedData.push(jsonObj); + const sCombinedMemo = commonUtils.isNotEmptyArr(tableCombineSelectedData) ? JSON.stringify(tableCombineSelectedData) : ''; /* JSON对象转换为字符串存放到合版信息中 */ + controlRow.sCombinedMemo =commonUtils.isNotEmptyObject(sCombinedMemo)? sCombinedMemo: '合版信息'; + controlRow.handleType = commonUtils.isEmpty(controlRow.handleType) ? 'update' : controlRow.handleType; + controlData[0]={...controlData,...controlRow}; + } + }); + addState.packData = packData; + addState.controlData = controlData; + } + } + } + } + + this.setState({ [`${name}Data`]: tableNewData, ...addState }); + } else { /* 主表赋值 */ + const changeValue = commonFunc.getAssignFieldValue(AssignField, dropdownData[filterDataIndex]); + const masterNewData = { ...masterData, ...changeValue }; // 取赋值字段 + const sFieldName = sName; + const addState = {}; + if (sFieldName === 'sCustomerId' || sFieldName === 'sCustomerNo' || sFieldName === 'sCustomerName' || sFieldName === 'sSupplyId' || sFieldName === 'sSupplyNo' || sFieldName === 'sSupplyName' || sFieldName === 'sWareHouseId' || sFieldName === 'sWareHouseNo' || sFieldName === 'sWareHouseName' || sFieldName === 'tDeliverDate') { + const slaveDataNew = []; + for (const item of slaveData) { + let tableDataRow = ((sFieldName === 'sWareHouseId' || sFieldName === 'sWareHouseNo' || sFieldName === 'sWareHouseName') && (sModelsType.includes('materialsStock/productionmaterialsadjust'))) ? + { ...item } : { ...item, [sFieldName]: changeValue[sFieldName] }; + if (sFieldName === 'sCustomerId' || sFieldName === 'sCustomerNo' || sFieldName === 'sCustomerName' || sFieldName === 'sSupplyId' || sFieldName === 'sSupplyNo' || sFieldName === 'sSupplyName') { + tableDataRow.sTaxId = changeValue.sTaxId; + tableDataRow.sTaxNo = changeValue.sTaxNo; + tableDataRow.sTaxName = changeValue.sTaxName; + tableDataRow.dTaxRate = changeValue.dTaxRate; + tableDataRow.handleType = commonUtils.isEmpty(tableDataRow.handleType) ? 'update' : tableDataRow.handleType; + const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + + tableDataRow = commonBusiness.getCalculateAllMoney(app, models, 'sTaxId', masterData, tableDataRow); + let dMaterialsMoney = ''; + if (sModelsType.includes('outside/')) { /* 工序发外 */ + let sComputeId = ''; + const sSupplyId = changeValue.sSupplyId; + const sProcessId = tableDataRow.sProcessId; + /* 根据客户id,工序id获取公式ID */ + if (commonUtils.isNotEmptyObject(sSupplyId) && commonUtils.isNotEmptyObject(sProcessId)) { + sComputeId = await commonBusiness.getOutSideProcessFormula({ + token, sModelsId, sSupplyId, sProcessId, + }); + if (commonUtils.isNotEmptyObject(sComputeId)) { + dMaterialsMoney = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow, sComputeId, + }); + tableDataRow.dMaterialsMoney = dMaterialsMoney; + tableDataRow = commonBusiness.getCalculateMoney(app, masterData, tableDataRow, 'Materials'); + } + } + } + } + if ((sFieldName === 'sWareHouseId' || sFieldName === 'sWareHouseNo' || sFieldName === 'sWareHouseName') && (!sModelsType.includes('materialsStock/productionmaterialsadjust'))) { + tableDataRow.sWareHouseId = changeValue.sWareHouseId; + tableDataRow.sWareHouseNo = changeValue.sWareHouseNo; + tableDataRow.sWareHouseName = changeValue.sWareHouseName; + tableDataRow.sLocationId = changeValue.sLocationId; + tableDataRow.sLocationNo = changeValue.sLocationNo; + tableDataRow.sLocationName = changeValue.sLocationName; + tableDataRow.sWareHouseLocationId = changeValue.sWareHouseLocationId; + tableDataRow.sWareHouseLocationNo = changeValue.sWareHouseLocationNo; + tableDataRow.sWareHouseLocationName = changeValue.sWareHouseLocationName; + tableDataRow.handleType = commonUtils.isEmpty(tableDataRow.handleType) ? 'update' : tableDataRow.handleType; + } + slaveDataNew.push(tableDataRow); + } + addState.slaveData = slaveDataNew; + // this.props.onSaveState({ slaveData: slaveDataNew }); + } + this.setState({ [`${name}Data`]: masterNewData, ...addState }); + } + } + } + + /** 树选择 */ + handleTreeSelect = (name, selectedKeys, e) => { + const { treeNode } = e.node.props; + this.setState({ [`${name}SelectedKeys`]: selectedKeys, [`${name}TreeNode`]: treeNode }); + }; + /* 通用弹窗 选择数据带回窗体 */ + handleSelectCommonPopup = (currentPaneName, selectConfig, selectData, tbName) => { + const { + [`${tbName}SelectedRowKeys`]: tableSelectedRowKeys, masterData, + controlData, controlSelectedRowKeys, sModelsId, + } = this.state; + // 回弹字段直接设置单价 + async function setProductPrice(tableDataRowAdd, item, props) { + if (selectConfig.sName === 'sProductId' || selectConfig.sName === 'sProductName' || selectConfig.sName === 'sProductNo') { + const url = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const { sCustomerId } = masterData; /* 增加客户id参数 */ + const value = { + sProName: 'Sp_Cashier_GetProductPrice', + paramsMap: { + sProductGuid: item.sId, + sCustomerId, + }, + }; + const returnData = (await commonServices.postValueService(props.app.token, value, url)).data; + if (returnData.code === 1) { + tableDataRowAdd.dNProductPrice = returnData.dataset.rows[0].dataSet.outData[0].dPrice; /* 产品单价 */ + const dProofingMoney = commonUtils.convertToNum(tableDataRowAdd.dProofingMoney); /* 打样金额 */ + const dPlateMoney = commonUtils.convertToNum(tableDataRowAdd.dPlateMoney); /* 制版金额 */ + const dKnifeMouldMoney = commonUtils.convertToNum(tableDataRowAdd.dKnifeMouldMoney); /* 刀模金额 */ + const dProductQty = commonUtils.convertToNum(tableDataRowAdd.dProductQty); /* 数量 */ + const dCurrencyRate = commonUtils.convertIsNotNumToNumber1(masterData.dCurrencyRate); /* 汇率 */ + const { dNetPrice } = props.app.decimals; + if (dProductQty === 0 || (dProofingMoney === 0 && dPlateMoney === 0 && dKnifeMouldMoney === 0)) { + const dProductForeignPrice = returnData.dataset.rows[0].dataSet.outData[0].dPrice; + tableDataRowAdd.dProductForeignPrice = dProductForeignPrice; + tableDataRowAdd.dProductPrice = commonUtils.convertFixNum(dProductForeignPrice * dCurrencyRate, dNetPrice); + } + } + return tableDataRowAdd; + } else { + return tableDataRowAdd; + } + } + let { [`${tbName}Data`]: tableData, [`${tbName}Pagination`]: pagination = {} } = this.state; + if (commonUtils.isNotEmptyArr(tableData) && commonUtils.isNotEmptyArr(selectData)) { + const iIndex = commonUtils.isNotEmptyArr(tableSelectedRowKeys) && commonUtils.isNotEmptyObject(tableSelectedRowKeys[0]) ? tableData.findIndex(item => item.sId === tableSelectedRowKeys[0]) : -1; + const iControlIndex = commonUtils.isNotEmptyArr(controlSelectedRowKeys) ? controlData.findIndex(item => item.sId === controlSelectedRowKeys[0]) : -1; /* 控制表 */ + selectData.forEach(async (item, index) => { + const newCopyTo = {}; + newCopyTo.master = masterData; + const sName = selectConfig.sKeyUpFilter; /* 将后台配置筛选字段作为 列字段 */ + let sValue = ''; + if (iIndex > -1) { + newCopyTo.slave = tableData[iIndex]; + sValue = tableData[iIndex][sName]; + } + if (iControlIndex > -1) { + newCopyTo.control = controlData[iControlIndex]; + } + /* 第一条数据若字段值为空或者只有一条数据时 则添加到该行 否则新增一行 */ + if (selectData.length === 1 || (index === 0 && commonUtils.isEmptyObject(sValue))) { + let tableDataRow = {}; // 取默认值 + if (tbName === 'master') { + tableDataRow = { ...tableData, ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + tableData = tableDataRow; + tableData.handleType = commonUtils.isEmpty(tableData.handleType) ? 'update' : tableData.handleType; + } else { + tableDataRow = { ...tableData[iIndex], ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + tableData[iIndex] = tableDataRow; + tableData[iIndex].handleType = commonUtils.isEmpty(tableData[iIndex].handleType) ? 'update' : tableData[iIndex].handleType; + tableData[iIndex] = await setProductPrice(tableData[iIndex], item, this.props); + } + } else { + let tableDataRowAdd = this.handleTableAdd(tbName, true); + tableDataRowAdd = { ...tableDataRowAdd, ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + tableDataRowAdd = await setProductPrice(tableDataRowAdd, item, this.props); + tableData.push(tableDataRowAdd); + } + + pagination = { + ...pagination, + total: tableData.length, + } + + this.setState({ [`${tbName}Data`]: tableData, [`${tbName}Pagination`]: pagination }); + }); + } + }; + + /* 接口数据带入数据 */ + handleSelectDialog = (name, selectConfig, selectData, tbName) =>{ + const { + [`${tbName}SelectedRowKeys`]: tableSelectedRowKeys, masterData, sModelsId, + } = this.state; + let { [`${tbName}Data`]: tableData } = this.state; + if (commonUtils.isNotEmptyArr(tableData) && commonUtils.isNotEmptyArr(selectData)) { + const iIndex = commonUtils.isNotEmptyArr(tableSelectedRowKeys) && commonUtils.isNotEmptyObject(tableSelectedRowKeys[0]) ? tableData.findIndex(item => item.sId === tableSelectedRowKeys[0]) : -1; + selectData.forEach(async (item, index) => { + const newCopyTo = {}; + newCopyTo.master = masterData; + const sName = selectConfig.sKeyUpFilter; /* 将后台配置筛选字段作为 列字段 */ + let sValue = ''; + if (iIndex > -1) { + newCopyTo.slave = tableData[iIndex]; + sValue = tableData[iIndex][sName]; + } + /* 第一条数据若字段值为空或者只有一条数据时 则添加到该行 否则新增一行 */ + if (selectData.length === 1 || (index === 0 && commonUtils.isEmptyObject(sValue))) { + let tableDataRow = {}; // 取默认值 + if (tbName === 'master') { + tableDataRow = { ...tableData, ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + tableData = tableDataRow; + tableData.handleType = commonUtils.isEmpty(tableData.handleType) ? 'update' : tableData.handleType; + } else { + tableDataRow = { ...tableData[iIndex], ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + tableData[iIndex] = tableDataRow; + tableData[iIndex].handleType = commonUtils.isEmpty(tableData[iIndex].handleType) ? 'update' : tableData[iIndex].handleType; + } + } + this.setState({ [`${tbName}Data`]: tableData }); + }); + } + + } + + /* 自定义复制从窗体 选择数据带回窗体 */ + handleCopyFromSelect = (name, selectConfig, selectData) => { + const { sModelsType } = this.state; + let { masterData, slaveData } = this.state; + const addState = {}; + if (commonUtils.isNotEmptyArr(selectData)) { + const newCopyTo = {}; + newCopyTo.master = masterData; + selectData.forEach((item) => { + if (commonUtils.isNotEmptyObject(sModelsType) && sModelsType.includes('onlyMaster')) { /* 单主表调用复制从数据 */ + masterData = { ...masterData, ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType; + addState.masterData = masterData; + } else { /* 从表调用复制从数据 */ + if (commonUtils.isEmptyArr(slaveData)) { + slaveData = []; + } + let tableDataRowAdd = this.handleTableAdd('slave', true); + tableDataRowAdd = { ...tableDataRowAdd, ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + slaveData.push(tableDataRowAdd); + addState.slaveData = slaveData; + } + }); + } + addState.copyFromChooseVisible = false; + this.setState({ ...addState }); + }; + + + handelControlFieldVisible = (name, configData, tableData) => { + const addState = {}; + /* 获取主表数据时表字段数据根据条件控制 本表或其他表格字段的显示与隐藏功能 */ + if (name === 'master' && commonUtils.isNotEmptyObject(configData) && commonUtils.isNotEmptyObject(tableData)) { + const masterConfig = configData; + const iConfigIndex = masterConfig.gdsconfigformslave.findIndex(item => commonUtils.isNotEmptyObject(item.sButtonEnabled)); + if (iConfigIndex > -1) { + const sFiledConfig = masterConfig.gdsconfigformslave[iConfigIndex]; + if (commonUtils.isNotEmptyObject(sFiledConfig)) { + const tableDataRow = tableData; + const sRulesJson = sFiledConfig.sButtonEnabled; + if (commonUtils.isNotEmptyObject(sRulesJson) && commonUtils.isJSON(sRulesJson)) { + const sRulesObjArr = JSON.parse(sRulesJson); + if (Array.isArray(sRulesObjArr) && commonUtils.isNotEmptyArr(sRulesObjArr)) { + console.log('sRulesObjArr:', sRulesObjArr); + sRulesObjArr.forEach((sRulesObj) => { + const { + showColumn, hideColumn, condition, tbName, sConfigName, + } = sRulesObj; + /* 主表单表字段根据条件控制 其他字段的显示与隐藏 */ + if (commonUtils.isEmptyObject(tbName)) { + if (commonUtils.isNotEmptyArr(condition)) { + let flag = false; + for (const item of condition) { + const { + bFilterName, bFilterCondition, bFilterValue, + } = item; + if (bFilterCondition === '>') { + if (tableDataRow[bFilterName] > bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '=') { + if (tableDataRow[bFilterName] === bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '<') { + if (tableDataRow[bFilterName] < bFilterValue) { + flag = true; + } + } + } + if (flag) { + if (commonUtils.isNotEmptyArr(showColumn)) { + for (const column of showColumn) { + const iShowIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iShowIndex > -1) { + const sFiledObj = masterConfig.gdsconfigformslave[iShowIndex]; + if (commonUtils.isNotEmptyObject(sFiledObj)) { + if (commonUtils.isNotEmptyObject(sConfigName) && sConfigName === 'bControl') { + masterConfig.gdsconfigformslave[iShowIndex].bControl = true; /* 控制字段bControl的显示与隐藏 */ + } else { + masterConfig.gdsconfigformslave[iShowIndex].bVisible = true; + } + } + } + } + } + if (commonUtils.isNotEmptyArr(hideColumn)) { + for (const column of hideColumn) { + const iHideIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iHideIndex > -1) { + if (commonUtils.isNotEmptyObject(sConfigName) && sConfigName === 'bControl') { + masterConfig.gdsconfigformslave[iHideIndex].bControl = true; /* 控制字段bControl的显示与隐藏 */ + } else { + masterConfig.gdsconfigformslave[iHideIndex].bVisible = false; + } + } + } + } + addState.masterConfig = masterConfig; + } + } + } else { /* 主表字段根据条件控制 其他表格字段的显示与隐藏 */ + const { [`${tbName}Config`]: tableConfig } = this.state; + // const { controlConfig: tableConfig } = this.state; + if (commonUtils.isNotEmptyObject(tableConfig)) { + if (commonUtils.isNotEmptyArr(condition)) { + let flag = false; + for (const item of condition) { + const { + bFilterName, bFilterCondition, bFilterValue, + } = item; + if (bFilterCondition === '>') { + if (tableDataRow[bFilterName] > bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '=') { + if (tableDataRow[bFilterName] === bFilterValue) { + flag = true; + } + } else if (bFilterCondition === '<') { + if (tableDataRow[bFilterName] < bFilterValue) { + flag = true; + } + } + } + if (flag) { + if (commonUtils.isNotEmptyArr(showColumn)) { + for (const column of showColumn) { + const iShowIndex = tableConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iShowIndex > -1) { + const sFiledObj = tableConfig.gdsconfigformslave[iShowIndex]; + if (commonUtils.isNotEmptyObject(sFiledObj)) { + tableConfig.gdsconfigformslave[iShowIndex].bVisible = true; + } + } + } + } + if (commonUtils.isNotEmptyArr(hideColumn)) { + for (const column of hideColumn) { + const iHideIndex = tableConfig.gdsconfigformslave.findIndex(item => item.sName === column); + if (iHideIndex > -1) { + const sFiledObj = tableConfig.gdsconfigformslave[iHideIndex]; + if (commonUtils.isNotEmptyObject(sFiledObj)) { + tableConfig.gdsconfigformslave[iHideIndex].bVisible = false; + } + } + } + } + if (commonUtils.isNotEmptyObject(tableConfig)) { + const tableColumn = commonFunc.getHeaderConfig(tableConfig); + // addState.masterConfig = masterConfig; + // addState.controlConfig = tableConfig; /* 表格配置塞到addState中 */ + // addState.controlColumn = tbColumn; + addState[`${tbName}Config`] = tableConfig; + addState[`${tbName}Column`] = tableColumn; + } + } + } + } + } + }); + } + } + } + } + } + return addState; + } + + /* 下拉多选离开事件 */ + handleTableBlur = async (name, sFileName, record, tableConfig) => { + const { sModelsId, app } = this.props; + const { controlData, slaveConfig,[`${name}Data`]: tableData } = this.state; + let { slaveData: slaveDataOld, masterData, slaveDelData, } = this.state; + const addState = {}; + if(commonUtils.isEmptyArr(slaveDelData)) { + slaveDelData = []; + } + if (sFileName === 'sPartsNameNew') { + if(commonUtils.isNotEmptyArr(controlData)) { + /* 离开时 把sPartsNameNewId数据挂载到sControlParentId */ + let iIndex = controlData.findIndex(item => item.sId === record.sId); + if(iIndex === -1) { + if(record.sId && record.sId.split('-').length > 1) { + iIndex = controlData.findIndex(item => item.sId === record.sId.split('-')[0]); + } + } + if (iIndex > -1) { + addState.sControlParentId = controlData[iIndex].sPartsNameNewId; + if(commonUtils.isNotEmptyObject(controlData[iIndex].sPartsNameNewId)) { + controlData[iIndex] = {...controlData[iIndex], ...addState}; + this.props.onSaveState({ controlData: controlData }); + } + } + } + } else if (tableConfig.sDropDownType === 'movesql') { /* 通用字段离开调下拉事件 */ + let slaveRow = record; + const sqlDropDownData = await this.getSqlDropDownData(sModelsId, name, tableConfig, slaveRow); + const dDropDownData = sqlDropDownData.dropDownData; + const iIndex = tableData.findIndex(item => item.sId === record.sId); + if (commonUtils.isNotEmptyArr(dDropDownData) && iIndex > -1) { + slaveRow = { ...slaveRow, ...commonFunc.getAssignFieldValue(tableConfig.sAssignField, dDropDownData[0]) }; // 取赋值字段 + slaveRow.handleType = commonUtils.isEmpty(slaveRow.handleType) ? 'update' : slaveRow.handleType; + tableData[iIndex] = { ...tableData[iIndex] , ...slaveRow }; + this.setState({ ...addState }); + } + } else if(commonUtils.isNotEmptyObject(tableConfig) && commonUtils.isNotEmptyObject(tableConfig.sButtonParam)) { + let slaveNewData = []; + const allConfig = { slaveConfig }; + // console.log('sTmpInfoConfigArr', sTmpInfoConfigArr); + const sTmpInfoConfig = tableConfig; + const sButtonParam = tableConfig.sButtonParam; + const btn = JSON.parse(sButtonParam); + const sProName = btn.sproName; + if (commonUtils.isNotEmptyObject(sTmpInfoConfig)) { + const newCopyTo = {}; + newCopyTo.master = masterData; + // newCopyTo.slave = commonUtils.isEmpty(slaveData) ? [] : slaveData[0]; + // const sRowData = copyTo.slaveData; + const sRowData = masterData; + const value = { sProName, sProInParam: JSON.stringify({ params: sRowData }) }; + const url = `${commonConfig.server_host}procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`; + const dataReturn = (await commonServices.postValueService(app.token, value, url)).data; + console.log('dataReturn', dataReturn); + if (dataReturn.code === 1) { + if (commonUtils.isNotEmptyArr(slaveDataOld)) { + slaveDataOld.forEach((item) => { + item.handleType = 'del'; + slaveDelData.push(item); + }); + addState.slaveDelData = slaveDelData; + } + const returnData = dataReturn.dataset.rows[0]; + const slaveReturn = returnData.dataSet.proData; + if (commonUtils.isNotEmptyArr(slaveReturn)) { + slaveReturn.forEach((slaveItem) => { + newCopyTo.slave = slaveItem; + let slaveRow = commonFunc.getDefaultData(allConfig.slaveConfig, newCopyTo); // 取默认值 + // if (salveDetailAssignField) { + // slaveRow = {...slaveRow, ...commonFunc.getAssignFieldValue(salveDetailAssignField, copyTo.masterData, newCopyTo)}; + // } else if (salveAssignField) { + // slaveRow = {...slaveRow, ...commonFunc.getAssignFieldValue(salveAssignField, slaveItem, newCopyTo)}; // 取赋值字段 + // } + slaveRow = { ...slaveRow, ...slaveItem }; + slaveRow.handleType = 'add'; + slaveRow.sId = commonUtils.createSid(); + slaveRow.sParentId = masterData.sId; + slaveNewData.push(slaveRow); + }); + } + addState.slaveData = slaveNewData; + this.setState({ ...addState }); + } else { + this.getServiceError(dataReturn); + } + } + } + }; + + render() { + return ( + + ); + } + }; +}; diff --git a/src/components/Common/CommonBillEvent.js b/src/components/Common/CommonBillEvent.js new file mode 100644 index 0000000..1e8d9cc --- /dev/null +++ b/src/components/Common/CommonBillEvent.js @@ -0,0 +1,7464 @@ +/* eslint-disable */ +/* eslint-disable prefer-destructuring,no-await-in-loop,radix,,no-loop-func */ +import React, { Component } from 'react'; +import { Modal, message } from 'antd'; +import moment from 'moment'; +import * as commonUtils from '@/utils/utils'; /* 通用方法 */ +import * as commonBusiness from '@/components/Common/commonBusiness'; /* 单据业务功能 */ +import * as commonServices from '@/services/services'; /* 服务类 */ +import * as commonConfig from '@/utils/config'; +import * as commonFunc from '@/components/Common/commonFunc'; + +const { confirm } = Modal; + +export default (ChildComponent) => { + return class extends Component { + constructor(props) { + super(props); + // this.state = { + // masterConfig: {}, /* 主表配置 */ + // slaveConfig: {}, /* 从表配置 */ + // slaveColumn: [], /* 显示的从表表头 */ + // checkConfig: {}, /* 审核配置 */ + // checkColumn: [], /* 显示的审核表表头 */ + // + // billnosetting: {}, /* 是否自动审核 */ + // report: [], /* 打印模板 */ + // masterData: {}, /* 主表数据 */ + // slaveData: [], /* 从表数据 */ + // dataTotal: {}, /* 合计字段 */ + // checkData: [], /* 审核表数据 */ + // masterFlag: false, /* 是否获取主表数据 */ + // slaveFlag: false, /* 是否获取从表数据 */ + // checkFlag: false, /* 是否获取审核表数据 */ + // sId: '', /* 数据Id */ + // enabled: false, /* 页面是否可编辑 */ + // slaveSelectedRowKeys: [], /* 已选择的数据行(数据格式:数组) */ + // slaveDelData: [], /* 已删除的数据集合,保存的时候会与从表一并传给服务器(数据格式:数组) */ + // expand: false, /* 默认主表只显示2行 */ + // imgSrc: '', /* Avatar组件中的img中src的资源路径 */ + // currentIndexFlag: false, /* 默认不显示当前的数据在主表页的位置序号 */ + // }; + this.state = { + changleCustomerId: '', + dPackQtyChange: 0, + }; + this.form = {}; /* 表单对象 */ + const { sModelsId, sModelsType } = props; + if (sModelsType.includes('cashier/')) { + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sCustomerId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sCustomerNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sCustomerName', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sSupplyId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sSupplyNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sSupplyName', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sFamilyId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sFamilyNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sFamilyName', []); + } + commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sSrcNo', []); + } + async componentWillReceiveProps(nextProps) { + const { + formData, currentId, sModelsType, formRoute, slaveSelectedRowKeys, slaveData, + } = nextProps; + const { slaveSelectedRowKeys: currentSlaveSelectedRowKeys } = this.props; + const { + slaveConfig: slaveConfigOld, + masterConfig: masterConfigOld, + app, + employeeConfig: employeeConfigOld, + slaveInfoList: slaveInfoListOld, + } = nextProps; + if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (sModelsType !== 'cashier/financialTransfer' && sModelsType !== 'cashier/financialAdjustment' && sModelsType !== 'quality/accident' && sModelsType !== 'purchase/purchaseEnquiry' && sModelsType !== 'complaint/complaint' && sModelsType !== 'print/printLabel' && sModelsType !== 'commonBill/onlyMaster' && (formRoute.indexOf('indexOee') === -1 || formRoute === '/indexOee/commonOeeBill'))) { + const sId = currentId !== undefined ? currentId : ''; + /* 数据Id */ + const masterConfig = formData.filter(item => !item.bGrd)[0]; + const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; + const reportDesign = commonFunc.showMessage(app.commonConst, 'reportDesign');/* 报表设计 */ + const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? + commonFunc.showMessage(app.commonConst, 'sReason') : '报错原因';/* 导入报错原因 */ + if (commonUtils.isEmptyObject(BtnDesignFunctionConfig)) { + masterConfig.gdsconfigformslave.push({ + bCanInput: false, + bEntireLine: false, + bFilter: false, + bFind: false, + bFirstEmpty: false, + bIsOther: false, + bMultipleChoice: false, + bNewRecord: false, + bNotEmpty: false, + bNotRepeat: false, + bReadonly: false, + bSum: false, + bTree: false, + bVisible: true, + iColValue: 1, + iFitWidth: 120, + /* iIncrement: 26154, */ + iOrder: 1, + iTag: 0, + iVisCount: 0, + iconName: 'menu-unfold', + sActiveKey: '', + sAssignField: '', + sBig5: '', + sBig5DropDown: '', + sBrandsId: '1111111111', + sChinese: '报表设计', + sChineseDropDown: '', + sColor: '', + sColorTerms: '', + sControlName: 'BtnBsOperation.BtnDesignFunction', + sDateFormat: '', + sDefault: '', + sDropDownType: '', + sEnglish: '', + sEnglishDropDown: '', + sFilterSql: '', + /* sId: '19211681019715580740769130', */ + sKeyUpFilter: '', + sMaxValue: '', + sMinValue: '', + sName: '', + sNotRepeatColumn: '', + /* sParentId: '19211681019715428730724240', */ + sRelation: '', + sSelectRelation: '', + sSqlCondition: '', + sSubsidiaryId: '1111111111', + showDropDown: '', + showName: reportDesign, + }); + } + /* bGrd代表是否是表格 */ + let slaveConfig = formData.filter(item => item.bGrd && item.sTbName !== 'sysbillcheckresult')[0]; + let slaveColumn = commonFunc.getHeaderConfig(slaveConfig); + let checkConfig = {}; + if (formRoute === '/indexOee/commonOeeBill') { /* OEE单据没有审核表 */ + checkConfig = undefined; + } else { + checkConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysbillcheckresult')[0]; + } + let checkColumn = []; + if (commonUtils.isNotEmptyObject(checkConfig)) { + checkColumn = commonFunc.getHeaderConfig(checkConfig); + } + + /* 导入错误配置 */ + let importConfig = {}; + let importFilterData = formData.filter(item => item.bReportData && item.sGrd === 'importTemplate'); + if(commonUtils.isNotEmptyArr(importFilterData)) { + importConfig = formData.filter(item => item.bReportData && item.sGrd === 'importTemplate')[0]; + const iIndex = importConfig.gdsconfigformslave.findIndex(item => item.sName === 'sReason'); + if(iIndex === -1) { + importConfig.gdsconfigformslave.push({ + bCanInput: false, + bEntireLine: false, + bFilter: false, + bFind: false, + bFirstEmpty: false, + bIsOther: false, + bMultipleChoice: false, + bNewRecord: false, + bNotEmpty: false, + bNotRepeat: false, + bReadonly: false, + bSum: false, + bTree: false, + bVisible: true, + iColValue: 1, + iFitWidth: 200, + /* iIncrement: 26154, */ + iOrder: 1, + iTag: 0, + iVisCount: 0, + iconName: 'menu-unfold', + sActiveKey: '', + sAssignField: '', + sBig5: '', + sBig5DropDown: '', + sBrandsId: '1111111111', + sChinese: '报错原因', + sChineseDropDown: '', + sColor: '', + sColorTerms: '', + sControlName: '', + sDateFormat: '', + sDefault: '', + sDropDownType: '', + sEnglish: '', + sEnglishDropDown: '', + sFilterSql: '', + /* sId: '19211681019715580740769130', */ + sKeyUpFilter: '', + sMaxValue: '', + sMinValue: '', + sName: 'sReason', + sNotRepeatColumn: '', + /* sParentId: '19211681019715428730724240', */ + sRelation: '', + sSelectRelation: '', + sSqlCondition: '', + sSubsidiaryId: '1111111111', + showDropDown: '', + showName: sReasonTitle, + }); + } + + } + + let importColumn = []; + if (commonUtils.isNotEmptyObject(importConfig)) { + importColumn = commonFunc.getHeaderConfig(importConfig); + } + + + let addState = {}; + if (formRoute === '/indexPage/commonBill' && sModelsType === 'cost/cosexpenseshare') { + const { sModelsId } = this.props; + const { sId, sParentId } = slaveConfig; + let sAssignStandardConfig = {}; + const filterData = slaveConfig.gdsconfigformslave.filter(item => item.sName === 'sAssignStandard'); + if (commonUtils.isNotEmptyArr(filterData)) { + sAssignStandardConfig = filterData[0]; + } + const url = `${commonConfig.server_host}costCenter/getCostCenterConfig?sModelsId=${sModelsId}`; + const body = { + sId, + sParentId, + sAssignStandardConfig, + }; + const dataReturn = (await commonServices.postValueService(app.token, body, url)).data; + if (dataReturn.code === 1) { + /* 获取数据集 */ + const { rows } = dataReturn.dataset;/* 获取费用分摊单据配置 */ + if (commonUtils.isNotEmptyArr(rows) && rows.length > 0) { + slaveConfig = rows[0]; + slaveColumn = commonFunc.getHeaderConfig(slaveConfig); + } + } else { /* 失败s */ + this.props.getServiceError(dataReturn); + return []; + } + } + if (formRoute === '/indexPage/commonBill' || formRoute === '/indexPage/commonCheckBill' || formRoute === '/indexOee/commonOeeBill') { + if (sId === '') { + const config = {}; + let addState1 = {}; + if (sModelsType.includes('sales/salesOrder')) { + const controlConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesordercontrol'.toUpperCase())[0]; + const controlColumn = commonFunc.getHeaderConfig(controlConfig); + const materialsConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesordermaterials'.toUpperCase())[0]; + const materialsColumn = commonFunc.getHeaderConfig(materialsConfig); + const processConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesorderprocess'.toUpperCase())[0]; + const processColumn = commonFunc.getHeaderConfig(processConfig); + const colorConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesorderparam'.toUpperCase())[0]; + let colorColumn; + if (commonUtils.isNotEmptyObject(colorConfig)) { + colorColumn = commonFunc.getHeaderConfig(colorConfig); + } + const packConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesordercontrolcombine'.toUpperCase())[0]; + let packColumn; + if (commonUtils.isNotEmptyObject(packConfig)) { + packColumn = commonFunc.getHeaderConfig(packConfig); + } + config.controlConfig = controlConfig; + config.materialsConfig = materialsConfig; + config.processConfig = processConfig; + config.colorConfig = colorConfig; + config.packConfig = packConfig; + addState1 = { + controlConfig, + controlColumn, + materialsConfig, + materialsColumn, + processConfig, + processColumn, + colorConfig, + colorColumn, + packConfig, + packColumn, + }; + } else if (sModelsType === 'purchase/purchaseOrder') { + let orderDetailConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.sTbName.toUpperCase() === 'purpurchaseorderDetail'.toUpperCase())) ? + formData.filter(item => item.sTbName.toUpperCase() === 'purpurchaseorderDetail'.toUpperCase())[0] : {}; + if(commonUtils.isNotEmptyObject(orderDetailConfig)) { + const orderDetailColumn = commonFunc.getHeaderConfig(orderDetailConfig); + config.orderDetailConfig = orderDetailConfig; + this.handleGetOneMemoData('orderDetail', orderDetailConfig); + addState1 = { + orderDetailConfig, + orderDetailColumn, + }; + } + }else if (sModelsType === 'purchase/purchasecheck') { + let orderDetailConfig = {}; + let orderDetailColumn = []; + const filterData = formData.filter(item => item.sTbName.toUpperCase() === 'purpurchasecheckingDetail'.toUpperCase()); + if(commonUtils.isNotEmptyArr(filterData)) { + orderDetailConfig = filterData[0]; + } + if(commonUtils.isNotEmptyObject(orderDetailConfig)) { + orderDetailColumn = commonFunc.getHeaderConfig(orderDetailConfig); + config.orderDetailConfig = orderDetailConfig; + this.handleGetOneMemoData('orderDetail', orderDetailConfig); + addState1 = { + orderDetailConfig, + orderDetailColumn, + }; + } + } else if (sModelsType === 'purchase/purchaseApply') { + let orderDetailConfig = {}; + let orderDetailColumn = []; + const filterData = formData.filter(item => item.sTbName.toUpperCase().indexOf('DETAIL') !== -1); + if(commonUtils.isNotEmptyArr(filterData)) { + orderDetailConfig = filterData[0]; + } + if(commonUtils.isNotEmptyObject(orderDetailConfig)) { + orderDetailColumn = commonFunc.getHeaderConfig(orderDetailConfig); + config.orderDetailConfig = orderDetailConfig; + this.handleGetOneMemoData('orderDetail', orderDetailConfig); + addState1 = { + orderDetailConfig, + orderDetailColumn, + }; + } + } + config.masterConfig = masterConfig; + config.slaveConfig = slaveConfig; + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true); + addState = { ...addState, ...addState1 }; + // if (sModelsType.includes('sales/salesOrder') || sModelsType === 'purchase/purchaseOrder') { + // this.props.onSaveState(addState1); + // } + } else { + this.handleGetData(masterConfig, slaveConfig, checkConfig); + if (sModelsType.includes('sales/salesOrder')) { + const controlConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesordercontrol'.toUpperCase())[0]; + const controlColumn = commonFunc.getHeaderConfig(controlConfig); + const materialsConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesordermaterials'.toUpperCase())[0]; + const materialsColumn = commonFunc.getHeaderConfig(materialsConfig); + const processConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesorderprocess'.toUpperCase())[0]; + const processColumn = commonFunc.getHeaderConfig(processConfig); + const colorConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesorderparam'.toUpperCase())[0]; + let colorColumn; + if (commonUtils.isNotEmptyObject(colorConfig)) { + colorColumn = commonFunc.getHeaderConfig(colorConfig); + } + const packConfig = formData.filter(item => item.sTbName.toUpperCase() === 'salsalesordercontrolcombine'.toUpperCase())[0]; + let packColumn; + if (commonUtils.isNotEmptyObject(packConfig)) { + packColumn = commonFunc.getHeaderConfig(packConfig); + } + this.handleGetMemoData(controlConfig, materialsConfig, processConfig, colorConfig, packConfig); + this.props.onSaveState({ + controlConfig, + controlColumn, + materialsConfig, + materialsColumn, + processConfig, + processColumn, + colorConfig, + colorColumn, + packConfig, + packColumn, + }); + } else if (sModelsType === 'manufacture/workOrder3') { + const controlConfig = formData.filter(item => item.sTbName.toUpperCase() === 'mftproductcontrol'.toUpperCase())[0]; + const controlColumn = commonFunc.getHeaderConfig(controlConfig); + const materialsConfig = formData.filter(item => item.sTbName.toUpperCase() === 'mftproductmaterials'.toUpperCase())[0]; + const materialsColumn = commonFunc.getHeaderConfig(materialsConfig); + const processConfig = formData.filter(item => item.sTbName.toUpperCase() === 'mftproductprocess'.toUpperCase())[0]; + const processColumn = commonFunc.getHeaderConfig(processConfig); + this.handleGetMemoData(controlConfig, materialsConfig, processConfig); + this.props.onSaveState({ + controlConfig, + controlColumn, + materialsConfig, + materialsColumn, + processConfig, + processColumn, + }); + } else if (sModelsType === 'purchase/purchaseOrder') { + const orderDetailConfig = formData.filter(item => item.sTbName.toUpperCase() === 'purpurchaseorderDetail'.toUpperCase())[0]; + const orderDetailColumn = commonFunc.getHeaderConfig(orderDetailConfig); + this.handleGetOneMemoData('orderDetail', orderDetailConfig); + this.props.onSaveState({ + orderDetailConfig, + orderDetailColumn, + }); + }else if (sModelsType === 'purchase/purchasecheck') { + let orderDetailConfig = {}; + let orderDetailColumn = []; + const filterData = formData.filter(item => item.sTbName.toUpperCase() === 'purpurchasecheckingDetail'.toUpperCase()); + if(commonUtils.isNotEmptyArr(filterData)) { + orderDetailConfig = filterData[0]; + } + if(commonUtils.isNotEmptyObject(orderDetailConfig)) { + const orderDetailColumn = commonFunc.getHeaderConfig(orderDetailConfig); + this.handleGetOneMemoData('orderDetail', orderDetailConfig); + this.props.onSaveState({ + orderDetailConfig, + orderDetailColumn, + }); + } + } + } + } + this.props.onSaveState({ + masterConfig, slaveConfig, slaveColumn, checkConfig, checkColumn, importConfig, importColumn, sId, pageLoading: false, ...addState, + }); + } else if (commonUtils.isEmptyObject(masterConfigOld) && formData.length === 1 && (sModelsType === 'cashier/financialTransfer' || sModelsType === 'purchase/purchaseEnquiry' || sModelsType === 'cashier/financialAdjustment' || sModelsType === 'print/printLabel' || sModelsType === 'complaint/complaint' || sModelsType === 'commonBill/onlyMaster') && formRoute.indexOf('indexOee') === -1) { + const config = {}; + const sId = currentId !== undefined ? currentId : ''; + /* 数据Id */ + const masterConfig = formData.filter(item => !item.bGrd)[0]; + let addState = {}; + if (formRoute === '/indexPage/commonBill' || formRoute === '/indexPage/commonCheckBill') { + if (sId === '') { + const config = {}; + config.masterConfig = masterConfig; + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true); + } else { + this.handleGetData(masterConfig, undefined, undefined); + } + } + addState.onlyMaster = true; + if (formRoute === '/indexPage/printlabel') { + config.masterConfig = masterConfig; + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true); + } + this.props.onSaveState({ + masterConfig, sId, pageLoading: false, ...addState, + }); + } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { + const sId = currentId !== undefined ? currentId : ''; + /* 数据Id */ + const masterConfig = formData.filter(item => !item.bGrd)[0]; + const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; + const slaveColumn = commonFunc.getHeaderConfig(slaveConfig); + let addState = {}; + if (formRoute === '/indexPage/commonBill' || formRoute === '/indexPage/commonCheckBill') { + if (sId === '') { + const config = {}; + config.masterConfig = masterConfig; + config.slaveConfig = slaveConfig; + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true); + } else { + this.handleGetData(masterConfig, slaveConfig, undefined); + } + } + addState.onlyMaster = true; + addState.onlyMasterAndSlave = true; + this.props.onSaveState({ + masterConfig, sId, slaveConfig, slaveColumn, pageLoading: false, ...addState, + }); + } else if (formRoute.indexOf('indexOee') > -1 && commonUtils.isEmptyObject(employeeConfigOld) && commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0) { + // const employeeConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftmachineworkemployee')[0]; + // const employeeColumn = commonFunc.getHeaderConfig(employeeConfig); + // const masterConfig = formData.filter(item => item.bGrd && item.sTbName === 'MftMachineWork')[0]; + // const addState = (await this.props.handleGetDataOne({ + // name: 'master', configData: masterConfig, condition: {}, isWait: true, + // })); + // if (commonUtils.isNotEmptyObject(addState.masterData)) { + // addState.masterData.handleType = 'update'; + // } + // this.props.onSaveState({ + // employeeConfig, employeeColumn, masterConfig, ...addState, + // }); + if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ + const sId = currentId !== undefined ? currentId : ''; + /* 数据Id */ + const masterConfig = formData[0]; + const slaveConfig = formData[0]; + const slaveColumn = commonFunc.getHeaderConfig(slaveConfig); + // this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sSqlCondition: { sParentId: sId } } }); + this.handleGetOneMemoData('slave', slaveConfig); + this.props.onSaveState({ + masterConfig, sId, slaveConfig, slaveColumn, pageLoading: false, + }); + } + } else if (slaveInfoListOld === undefined && formRoute.indexOf('productionReport') !== -1 && commonUtils.isNotEmptyArr(slaveData)) { + if (commonUtils.isEmptyArr(formData) || commonUtils.isEmptyArr(formData)) { + return; + } + let addState = {}, slaveInfoList = []; + // const slaveFormData = formData.filter(item => item.bGrd); + const slaveFormData = formData.filter((item, index) => index >= 3); + slaveFormData.forEach((item, index) => { + addState[`slave${index}Config`] = item; + addState[`slave${index}Column`] = commonFunc.getHeaderConfig(item); + slaveInfoList.push(item.showName); + }); + if (slaveInfoList.length) { + addState = {...addState, ...await this.handleGetDataOne('slave0', addState.slave0Config, null, null, null, null, nextProps, true)}; + } + this.props.onSaveState({ + slaveInfoList, + ...addState, + }); + } else if (formRoute.indexOf('productionReport') !== -1 && commonUtils.isNotEmptyArr(slaveSelectedRowKeys) && JSON.stringify(slaveSelectedRowKeys) !== JSON.stringify(currentSlaveSelectedRowKeys)) { + const addState = await this.handleGetDataOne('slave0', nextProps.slave0Config, null, null, null, null, nextProps, true); + console.log(addState); + this.props.onSaveState({ + ...addState, + }); + } + } + + shouldComponentUpdate(nextProps) { + const { slaveColumn, masterConfig } = nextProps; + return commonUtils.isNotEmptyArr(slaveColumn) || commonUtils.isNotEmptyObject(masterConfig); + } + + /* + 修改日期:2021-03-18 + 修改人:吕杰 + 区域:以下onKeyDown函数 + 需求变更:为解决bug 2031添加 + */ + /** 键盘事件监听 */ + onKeyDown = (e, record, sName, name) => { + const { [`${name}Data`]: tableData, [`${name}Column`]: tableColumn } = this.props; + // 以下if条件为 为解决bug2031问题入口 需求:收款单里输入的收款金额,上下键操作把加减金额改为选择上下行(通过上下方向键切换行数) + const move = (keyCode, cursortPosition, columnIndex) => { + if (keyCode === 37 && columnIndex > 0 && cursortPosition < 1) { // 左移 则 列下标必须大于0, 且光标在最左侧 + const lastId = `${tableColumn[columnIndex - 1].dataIndex}${record.sId}`; + if (!commonUtils.focus(lastId)) move(keyCode, cursortPosition, columnIndex - 1); // 递归 + } + if (keyCode === 39 && columnIndex < tableColumn.length - 1) { // 右移 则 列下标必须小于列数量-1 + if (!record[sName] || cursortPosition >= record[sName].toString().length) { // 当前列为空 或 光标位置不小于当前值的长度 + const nextId = `${tableColumn[columnIndex + 1].dataIndex}${record.sId}`; + if (!commonUtils.focus(nextId)) move(keyCode, cursortPosition, columnIndex + 1); // 递归 + } + } + }; + if ([38, 40].includes(e.keyCode)) { // 上键、下键 + e.preventDefault(); + if (tableData.length > 1) { // 当从表行数大于一行时才有上下移动的意义 + const index = tableData.findIndex(item => item.sId === record.sId); // 获取当前编辑行的下标 + if (index > -1) { + if (e.keyCode === 38 && index > 0) { // 方向键上键 且 当前编辑行下标大于0时,为0时无法向上 + const lastSid = tableData[index - 1].sId; // 获取上一个id + this.props.onSaveState({ [`${name}SelectedRowKeys`]: [lastSid] }, () => commonUtils.focus(`${sName}${lastSid}`)); + } + if (e.keyCode === 40 && index < tableData.length - 1) { // 方向键下键 且 当前编辑行下标小于最大值时,为最大值时无法向下 + const nextSid = tableData[index + 1].sId; // 获取下一个id + this.props.onSaveState({ [`${name}SelectedRowKeys`]: [nextSid] }, () => commonUtils.focus(`${sName}${nextSid}`)); + } + } + } + } else if ([37, 39].includes(e.keyCode)) { // 左键、右键 + const currentElement = document.getElementById(`${sName}${record.sId}`); // 当前编辑框对象 + if (currentElement) { + const cursortPosition = commonUtils.getCursortPosition(currentElement); // 光标位置 + const columnIndex = tableColumn.findIndex(item => item.dataIndex === sName); // 当前列下标 + move(e.keyCode, cursortPosition, columnIndex); + } + } + } + + + /* 单击右键全部更新,弹出窗选择后,更新此列所有数据 (只更新非只读字段) */ + onContextMenu = (e, record, showConfig, tbName) => { + const contextMenuConfig = []; + const showConfigNew = JSON.parse(JSON.stringify(showConfig)); /* 深拷贝配置 */ + contextMenuConfig.push(showConfigNew); + this.props.onSaveState({ + contextMenuModalVisible: true, /* 右击全部更新弹窗 */ + contextMenuConfig, /* 右击字段配置 数组形式 */ + contextMenuRecord: record, /* 右击数据 */ + contextMenuName: showConfig.showName, /* 右击字段 */ + contextMenuTbName: tbName, /* 右击字段 */ + }); + } + + /** 获取应收账款 */ + getCustomerReceipt = async (masterData) => { + const { sModelsId } = this.props; + if (!commonUtils.isEmpty(masterData.sCustomerId)) { + const url = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const value = { sProName: 'Sp_Receivables_AR', paramsMap: { sStatistics: masterData.sCustomerId } }; + const dataReturn = (await commonServices.postValueService(this.props.app.token, value, url)).data; + if (dataReturn.code === 1) { + /* 数据查询成功 */ + const [returnData] = dataReturn.dataset.rows[0].dataSet.outData; + const masterDataNew = { + ...masterData, + dNoReceiptMoney: returnData.dNoReceiptMoney, + dDueReceiptMoney: returnData.dNoReceiptMoney, + }; + this.props.onSaveState({ masterData: masterDataNew }); + } else { /* 失败 */ + this.props.getServiceError(dataReturn); + } + } + }; + + /** 获取上查下查数据 */ + getSearchUpDownData = async (showConfig) => { + const { sModelsId } = this.props; + const url = `${commonConfig.server_host}searchupdown/getSearchUpDown/${showConfig.sId}?sModelsId=${sModelsId}`; + const conditonValues = this.props.getSqlCondition(showConfig); + if (commonUtils.isNotEmptyObject(conditonValues)) { + const iIndex = Object.keys(conditonValues).findIndex(item => commonUtils.isEmpty(conditonValues[item])); + if (iIndex === -1) { + /* 调用后台接口 */ + const body = { + sSqlCondition: commonUtils.isEmptyObject(conditonValues) ? '' : conditonValues, /* 查询条件 */ + }; + const dataReturn = (await commonServices.postValueService(this.props.app.token, body, url)).data; + if (dataReturn.code === 1) { + /* 数据查询成功 */ + return dataReturn.dataset.rows; + } else { /* 失败 */ + this.props.getServiceError(dataReturn); + return []; + } + } + } + }; + handlePackDataAdd= (item, index, sControlId) => { + const tableDataRow = {}; + tableDataRow.sId = commonUtils.createSid(); + tableDataRow.handleType = 'add'; + tableDataRow.sSlaveId = item.sId; + tableDataRow.sParentId = item.sParentId; + tableDataRow.sControlId = sControlId; + tableDataRow.iOrder = item.iOrder; + tableDataRow.sProductId = item.sProductId; /* 产品id */ + tableDataRow.sCustomerId = item.sCustomerId; /* 客户id */ + tableDataRow.sCustomerName = item.sCustomerName; /* 客户名称 */ + tableDataRow.sProductName = item.sProductName; /* 产品名称 */ + tableDataRow.sProductNo = item.sProductNo; /* 产品编号 */ + tableDataRow.dProductQty = commonUtils.isNull(item.dProductQty, 0) + commonUtils.isNull(item.dGiveQty, 0) + commonUtils.isNull(item.dStockupQty, 0); /* 生产数量 */ /* 生产数量 */ + tableDataRow.sProductUnit = item.sProductUnit; /* 单位 */ + tableDataRow.sProductStyle = item.sProductStyle; /* 产品规格 */ + return tableDataRow; + } + sortData = (tableData, processData) => { + processData.sort((g1, g2) => { + const iIndex1 = tableData.findIndex(item => item.sId === g1.sControlId) === -1 ? 999 : tableData.findIndex(item => item.sId === g1.sControlId); + let sPartOrder1 = `0000${iIndex1}`; + sPartOrder1 = sPartOrder1.substring(sPartOrder1.length - 3); + let sOrder1 = `000${g1.iOrder}`; + sOrder1 = sOrder1.substring(sOrder1.length - 3); + + const iIndex2 = tableData.findIndex(item => item.sId === g2.sControlId) === -1 ? 999 : tableData.findIndex(item => item.sId === g2.sControlId); + let sPartOrder2 = `0000${iIndex2}`; + sPartOrder2 = sPartOrder2.substring(sPartOrder2.length - 3); + let sOrder2 = `000${g2.iOrder}`; + sOrder2 = sOrder2.substring(sOrder2.length - 3); + return parseInt(sPartOrder1 + g1.sType + sOrder1, 10) - parseInt(sPartOrder2 + g2.sType + sOrder2, 10); + }); + return processData; + }; + + /** 获取主表、从表、审核表数据 */ + handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { + const { currentId } = this.props; /* 当前页签数据 */ + const sId = currentId !== undefined ? currentId : ''; + await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick }); + // commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sProductId', []); + // commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sProductNo', []); + // commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sProductName', []); + if (!commonUtils.isEmptyObject(slaveConfig)) { + const getData = await this.props.handleGetDataSet({ + name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, + }); + if (commonUtils.isNotEmptyObject(getData) && commonUtils.isNotEmptyArr(getData.slaveData)) { + getData.slaveData.forEach((item, iIndex) => { + if (commonUtils.isNotEmptyObject(item.sReportParam)) { + item = { ...item, ...commonUtils.convertStrToObj(item.sReportParam) }; + getData.slaveData[iIndex] = item; + } + }); + this.props.onSaveState({ ...getData }); + } + if (commonUtils.isNotEmptyStr(getData.slaveData)) { + const selectRowKey = getData.slaveData[0].sId; + const selectRowKeyArr = []; + selectRowKeyArr.push(selectRowKey); + this.handleTableSelectRowChange('slave', selectRowKeyArr); + } + } + + if (!commonUtils.isEmptyObject(checkConfig)) { + this.props.handleGetDataSet({ + name: 'check', configData: checkConfig, condition: { sSqlCondition: { sParentId: sId } }, + }); + } + }; + /* 获取表数据 */ + handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { + const { currentId, sModelsType } = this.props; /* 当前页签数据 */ + const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + const addStateControl = await this.props.handleGetDataSet({ + name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, + }); + const { controlData, controlSelectedRowKeys } = addStateControl; /* 同步树选中节点与部件选中节点 */ + let treeState = []; + if (sModelsType === 'sales/salesOrderPack') { + treeState = this.handleGetControlTreeData(controlData, true); + } + this.props.handleGetDataSet({ + name: 'materials', configData: materialsConfig, condition: { sSqlCondition: { sParentId: sId } }, + }); + const addStateProcess = await this.props.handleGetDataSet({ + name: 'process', configData: processConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, + }); + if (addStateProcess) { + if (Array.isArray(addStateProcess.processData)) { + // eslint-disable-next-line array-callback-return + addStateProcess.processData.map((itemProcess) => { + if (commonUtils.isNotEmptyObject(sModelsType.includes('quotation/') ? itemProcess.sProcessParam : sModelsType.includes('manufacture/') ? itemProcess.sWorkOrderParam : itemProcess.sProcessParam)) { + itemProcess.sProcessParamStr = ''; + // eslint-disable-next-line no-plusplus + for (let i = 1; i < 7; i++) { + const iIndex = processConfig.gdsconfigformslave.findIndex(item => item.sName === `sParamValue${i.toString()}`); + if (iIndex > -1 && !commonUtils.isEmpty(itemProcess[`sParam${i.toString()}`])) { + itemProcess.sProcessParamStr += `${itemProcess[`sParam${i.toString()}`]}:${itemProcess[`sParamValue${i.toString()}`]},`; + } + } + if (itemProcess.sProcessParamStr === '') { + itemProcess.sProcessParamStr = '工艺参数'; + } + } + }); + // addStateProcess.processData = this.sortData(addStateControl.controlData, addStateProcess.processData); + } + } + if (commonUtils.isNotEmptyObject(colorConfig)) { + this.props.handleGetDataSet({ + name: 'color', configData: colorConfig, condition: { sSqlCondition: { sParentId: sId } }, + }); + } + if (commonUtils.isNotEmptyObject(packConfig)) { + this.props.handleGetDataSet({ + name: 'pack', configData: packConfig, condition: { sSqlCondition: { sParentId: sId } }, + }); + } + // this.handleBtnPreviewPdf(false); + this.props.onSaveState({ + pageLoading: false, ...addStateControl, ...addStateProcess, ...treeState, treeSelectedKeys: controlSelectedRowKeys, + }); + }; + /* 获取单张表数据 */ + handleGetOneMemoData = (memoName, memoConfig) => { + const { currentId } = this.props; /* 当前页签数据 */ + const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ + this.props.handleGetDataSet({ + name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, + }); + } + }; + /** 获取部件树 */ + handleGetControlTreeDataBak= (controlDataOld, isWait, sSlaveId) => { + /* 生成部件树结构 */ + let treeData = []; + const expandedKeys = []; + let { treeSelectedKeys } = this.props; + let controlData = []; + if (commonUtils.isNotEmptyObject(sSlaveId)) { + controlData = controlDataOld.filter(item => item.sSlaveId === sSlaveId); + } else { + controlData = controlDataOld; + } + if (commonUtils.isNotEmptyArr(controlData)) { + const rootData = commonUtils.isNotEmptyArr(controlData) ? controlData.filter(item => commonUtils.isEmpty(item.sControlParentId)) : []; /* 找到所有一级树结构 */ + rootData.forEach((item) => { + const treeDataRow = {}; + const { sId, sPartsName } = item; + treeDataRow.key = sId; + treeDataRow.showName = sPartsName; + treeDataRow.sAllId = item.sAllId; + const children = this.handleGetControlTreeChildData(sId, controlData); + let sChildren = '1'; /* 树形结构最后一个节点设置为1 */ + if (commonUtils.isNotEmptyArr(children)) { + sChildren = '0'; /* 树形结构其他节点设置为0 */ + } + treeDataRow.sChildren = sChildren; + /* 添加sChildren,sAllId 值 */ + const iIndex = controlData.findIndex(item => item.sId === sId); + if (iIndex > -1) { + // controlData[iIndex].sAllId = sAllId; + controlData[iIndex].sChildren = sChildren; + } + treeDataRow.children = commonUtils.isNotEmptyArr(children) ? children : []; + treeData.push(treeDataRow); + }); + if (commonUtils.isEmptyArr(treeSelectedKeys) && commonUtils.isNotEmptyArr(treeData)) { + expandedKeys.push(treeData[treeData.length - 1].key); + } + } else { + treeSelectedKeys = []; + treeData = []; + } + if (isWait) { + return { treeData }; + } else { + this.props.onSaveState({ + treeData, + // expandedKeys, + }); + } + }; + + + handleGetControlTreeData = (controlDataOld, isWait, sSlaveId) => { + /* 生成部件树结构 */ + let treeData = []; + const expandedKeys = []; + let { treeSelectedKeys } = this.props; + let controlData = []; + const idName = 'sId'; + const pidName = 'sControlParentId'; + if (commonUtils.isNotEmptyObject(sSlaveId)) { + controlData = controlDataOld.filter(item => item.sSlaveId === sSlaveId); + } else { + controlData = controlDataOld; + } + if (commonUtils.isNotEmptyArr(controlData)) { + const tempArr = JSON.parse(JSON.stringify(controlData)); + const formatObj = tempArr.reduce((pre, cur) => { + return { ...pre, [cur[idName]]: cur }; + }, {}); + const formatArray = tempArr.reduce((pre, cur) => { + const pid = cur[pidName] !== '' ? cur[pidName] : ''; + const { sId, sPartsName } = cur; + cur.key = sId; + cur.showName = sPartsName; + cur.sAllId = cur.sAllId; + const parent = pid ? formatObj[pid] : false; + if (parent) { + if (parent.children) { + parent.children.push(cur); + } else { + parent.children = [cur]; + } + } else { + pre.push(cur); + } + return pre; + }, []); + treeData = formatArray; + if (commonUtils.isEmptyArr(treeSelectedKeys) && commonUtils.isNotEmptyArr(treeData)) { + expandedKeys.push(treeData[treeData.length - 1].key); + } + } else { + treeSelectedKeys = []; + treeData = []; + } + if (isWait) { + return { treeData }; + } else { + this.props.onSaveState({ + treeData, + // expandedKeys, + }); + } + }; + + /** 获取子节点数据 */ + handleGetControlTreeChildData= (sParentId, controlData) => { + if (commonUtils.isNotEmptyObject(sParentId) && commonUtils.isNotEmptyArr(controlData)) { + const childTree = commonUtils.isNotEmptyArr(controlData) ? controlData.filter(item => item.sControlParentId === sParentId) : []; + const children = []; + if (commonUtils.isNotEmptyArr(childTree)) { + childTree.forEach((child) => { + const { sId, sPartsName } = child; + const treeDataRow = {}; + treeDataRow.key = sId; + treeDataRow.showName = sPartsName; + treeDataRow.parentKey = sParentId; + treeDataRow.sAllId = child.sAllId; + const data = this.handleGetControlTreeChildData(sId, controlData); + let sChildren = '1'; /* 最后一个节点设置为1 */ + if (commonUtils.isNotEmptyArr(data)) { + sChildren = '0'; + } + treeDataRow.sChildren = sChildren; + /* 添加sChildren,sAllId 值 */ + const iIndex = controlData.findIndex(item => item.sId === sId); + if (iIndex > -1) { + // controlData[iIndex].sAllId = sAllId; + controlData[iIndex].sChildren = sChildren; + } + treeDataRow.children = commonUtils.isNotEmptyArr(data) ? data : []; + children.push(treeDataRow); + }); + } + return children; + } + }; + + handleGetTableConfig = async (name, sModelsId, oldConfig, configName) => { + if(commonUtils.isNotEmptyObject(sModelsId)) { + const newConfig = await this.props.onGetTableConfig(name, sModelsId, oldConfig); + if(commonUtils.isNotEmptyObject(newConfig)) { + const newColumn = commonFunc.getHeaderConfig(newConfig); + this.props.onSaveState({[`${[configName || name]}Config`]: newConfig, [`${[configName || name]}Column`]: newColumn }) + } + } + } + + /** 根据key查找树节点并改变属性 */ + handleSearchNodes= (key, data, showNameNew) => { + if (commonUtils.isNotEmptyObject(showNameNew)) { + data.forEach((item) => { + if (item.key === key) { + item.showName = showNameNew; + } else if (commonUtils.isNotEmptyArr(item.children)) { + this.handleSearchNodes(key, item.children, showNameNew); + } + }); + } + }; + + /** 点击新增按钮 */ + handleAdd = async (config, copyTo, isWait) => { + /* 外置处理业务 */ + const { + sModelsId, sModelsType, app, token, + } = this.props; + if (sModelsType.includes('cashier/')) { + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sCustomerId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sCustomerNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sCustomerName', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sSupplyId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sSupplyNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sSupplyName', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sFamilyId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sFamilyNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sFamilyName', []); + } + let masterConfig = commonUtils.isEmptyObject(config) ? {} : config.masterConfig; + if (!isWait) { + masterConfig = this.props.masterConfig; + } + let configNew = {}; + if (commonUtils.isEmptyObject(config)) { + const { slaveConfig } = this.props; + configNew.slaveConfig = slaveConfig; + } else { + configNew = config; + } + let masterData = commonFunc.getDefaultData(masterConfig); + masterData.handleType = 'add'; + masterData.sId = commonUtils.createSid(); + masterData.sFormId = sModelsId; + masterData.maxBillNo = 'sBillNo'; + let slaveData = []; + const controlData = []; + const materialsData = []; + const processData = []; + const orderDetailData = []; + const dailyData = []; + const packData = []; + const colorData = []; + // const slaveTotal = []; + // const tableDataTotal = {}; + if (commonUtils.isNotEmptyObject(copyTo)) { + const copyToMasterConfig = copyTo.config.filter(item => item.sControlName === copyTo.name); + const masterAssignField = commonUtils.isNotEmptyArr(copyToMasterConfig) ? copyToMasterConfig[0].sAssignField : ''; + const newCopyTo = {}; + newCopyTo.master = copyTo.masterData; + newCopyTo.slave = commonUtils.isEmpty(copyTo.slaveData) ? [] : copyTo.slaveData[0]; + masterData = { ...masterData, ...commonFunc.getAssignFieldValue(masterAssignField, copyTo.masterData, newCopyTo) }; + /* 识别系统模块同级CopyTo增加:sAllId=复制数据的父节点+本节点 */ + if (copyTo.name && copyTo.name.toLowerCase().includes('sameadd')) { + const sId = masterData.sId; /* 当前 */ + if (copyTo.masterData) { + const sParentIdOld = copyTo.masterData.sParentId; + masterData.sParentId = sParentIdOld; + const sAllOldId = copyTo.masterData.sAllId; + // const sAllId = `${sParentIdOld},${sId}`; + if (commonUtils.isNotEmptyObject(sAllOldId)) { + const sAllId = sAllOldId.replace(copyTo.masterData.sId, sId); + /* 找到同级父级sAllId */ + if (commonUtils.isEmptyObject(sAllId)) { + message.warn('sAllId生成错误 请检查'); + return; + } else { + masterData.sAllId = sAllId; + } + } + } + } + /* 识别系统模块子级CopyTo增加 sAllId=复制数据的完整节点sAllId +新生成sId */ + if (copyTo.name && copyTo.name.toLowerCase().includes('childrenadd')) { + const sId = masterData.sId; /* 当前 */ + if (copyTo.masterData) { + const sAllIdOld = copyTo.masterData.sAllId; /* 父级的sAllId */ + const sIdOld = copyTo.masterData.sId; /* 父级的sAllId */ + masterData.sParentId = sIdOld; + /* 找到同级父级sAllId */ + if (commonUtils.isNotEmptyObject(sAllIdOld)) { + const sAllId = `${sAllIdOld}-${sId}`; + masterData.sAllId = sAllId; + return; + } + } else { + message.warn('缺失sId赋值 请检查'); + } + } + if (commonBusiness.getGeyPayDate(masterData) !== undefined) { + masterData.tGetPayDate = commonBusiness.getGeyPayDate(masterData); + } + let sWareHouseNameDropDown; + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sWareHouseName'); + // 如果copyto主表数据带了sWareHouseId, 就不另外查询赋值了 + if (iIndex > -1 && commonUtils.isEmptyObject(masterData.sWareHouseId)) { + const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + let dataUrl; + let condition; + if (models === 'Product') { + dataUrl = `${commonConfig.server_host}eleProductStock/getProductWareHouse?sModelsId=${sModelsId}`; + condition = { sProductId: copyTo.slaveData[0].sProductId }; + } else { + dataUrl = `${commonConfig.server_host}eleMaterialsStock/getMaterialsWareHouse?sModelsId=${sModelsId}`; + condition = { sMaterialsId: copyTo.slaveData[0].sMaterialsId, sMaterialsStyle: copyTo.slaveData[0].sMaterialsStyle }; + } + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; + if (dataReturn.code === 1) { + const sWareHouseId = dataReturn.dataset.rows.length > 0 ? dataReturn.dataset.rows[0].sWareHouseId : ''; + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, 'master', masterConfig.gdsconfigformslave[iIndex]); + sWareHouseNameDropDown = sqlDropDownData.dropDownData; + if (commonUtils.isNotEmptyArr(sWareHouseNameDropDown) && !sModelsType.includes('materialsStock/productionmaterialsadjust')) { + const { sAssignField } = masterConfig.gdsconfigformslave[iIndex]; + const iWareHouseNameIndex = sWareHouseNameDropDown.findIndex(item => item.sId === sWareHouseId); + if (iWareHouseNameIndex > -1) { + masterData = { ...masterData, ...commonFunc.getAssignFieldValue(sAssignField, sWareHouseNameDropDown[iWareHouseNameIndex]) }; + } + } + } + } + + const copyToSlaveConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.slave`.toLowerCase()); + const slaveAssignField = commonUtils.isNotEmptyArr(copyToSlaveConfig) ? copyToSlaveConfig[0].sAssignField : ''; + if (slaveAssignField !== '') { + let iCount = 0; + let flagCopyTo = false; + if (commonUtils.isEmptyArr(copyTo.controlData)) { + flagCopyTo = true; + } + for (const slaveItem of copyTo.slaveData) { + const newCopyTo = {}; + newCopyTo.master = copyTo.masterData; + newCopyTo.slave = slaveItem; + let slaveRow = commonFunc.getDefaultData(config.slaveConfig, newCopyTo); // 取默认值 + slaveRow = { ...slaveRow, ...commonFunc.getAssignFieldValue(slaveAssignField, slaveItem, newCopyTo) }; // 取赋值字段 + if ((!commonUtils.isEmpty(slaveRow.dProductQty) && slaveRow.dProductQty !== slaveRow.dSrcQty) || + (!commonUtils.isEmpty(slaveRow.dAuxiliaryQty) && slaveRow.dAuxiliaryQty !== slaveRow.dSrcAuxiliaryQty)) { + let models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + let sFieldName = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'dProductQty' : 'dAuxiliaryQty'; + + /* 20210901标板问题 未清新增时,材料销售模块需要用换算数量进行业务计算 */ + if (sModelsType.includes('sales/materials') || sModelsType === 'sales/salesCheck') { /* 如果是材料销售模块/销售对账 如果是材料 则用换算数量*单价 算金额 */ + slaveRow.dAuxiliaryQty = slaveRow.dProductQty; + /* 材料逻辑计算 */ + if (commonUtils.isNotEmptyNumber('dMaterialsQty') && slaveRow.dMaterialsQty !== 0 && commonUtils.isNotEmptyObject(slaveRow.sMaterialsUnit)) { + let modelsNew = ''; + if (models === 'Product') { /* 计算前将Product替换为Materials */ + modelsNew = 'Materials'; + + const dCurrencyRate = commonUtils.convertIsNotNumToNumber1(masterData.dCurrencyRate); /* 汇率 */ + const { dNetPrice } = app.decimals; + const dForeignPrice = slaveRow[`d${models}ForeignPrice`]; + if (commonUtils.isNotEmptyNumber(dForeignPrice)) { + /* 只有外币单价情況下 要算本位币单价 */ + const dProductPrice = commonUtils.convertFixNum(dForeignPrice * dCurrencyRate, dNetPrice); + slaveRow[`d${models}Price`] = dProductPrice; + } + + slaveRow[`dN${modelsNew}Price`] = slaveRow[`d${models}ForeignPrice`]; + slaveRow[`d${modelsNew}ForeignPrice`] = slaveRow[`d${models}ForeignPrice`]; + slaveRow[`d${modelsNew}Price`] = slaveRow[`d${models}Price`]; + slaveRow[`dN${modelsNew}Money`] = slaveRow[`dN${models}Price`]; + slaveRow[`dN${modelsNew}Money`] = slaveRow[`d${models}ForeignMoney`]; + slaveRow[`d${modelsNew}ForeignMoney`] = slaveRow[`d${models}ForeignMoney`]; + slaveRow[`d${modelsNew}Money`] = slaveRow[`d${models}Money`]; + slaveRow.bSalesMaterials = true;/* 材料销售 销售对账 材料计算 */ + models = 'Materials'; + sFieldName = commonUtils.isNotEmptyObject(sFieldName) ? sFieldName.replace('Product', 'Materials') : sFieldName; + } + } + } + commonBusiness.getCalculateAllMoney(app, models, sFieldName, masterData, slaveRow); + } + if (commonUtils.isNotEmptyObject(slaveRow.sReportParam)) { + slaveRow = { ...slaveRow, ...commonUtils.convertStrToObj(slaveRow.sReportParam) }; + } + slaveRow.handleType = 'add'; + slaveRow.sId = commonUtils.createSid(); + slaveRow.sParentId = masterData.sId; + if (commonUtils.isEmptyObject(slaveRow.sWareHouseId)) { + slaveRow.sWareHouseId = masterData.sWareHouseId; + slaveRow.sWareHouseNo = masterData.sWareHouseNo; + slaveRow.sWareHouseName = masterData.sWareHouseName; + slaveRow.sLocationId = masterData.sLocationId; + slaveRow.sLocationNo = masterData.sLocationNo; + slaveRow.sLocationName = masterData.sLocationName; + slaveRow.sWareHouseLocationId = masterData.sWareHouseLocationId; + slaveRow.sWareHouseLocationNo = masterData.sWareHouseLocationNo; + slaveRow.sWareHouseLocationName = masterData.sWareHouseLocationName; + } + slaveRow.sOriginalId = commonUtils.isNotEmptyObject(slaveItem.sSlaveId) ? slaveItem.sSlaveId : slaveItem.sId;/* 翻单前的sId */ + /* 若复制到没有序号,则序号从1自增 */ + if (commonUtils.isEmptyNumber(slaveRow.iOrder)) { + iCount += 1; + slaveRow.iOrder = iCount; + } + if (sModelsType === 'purchase/purchaseInstore') { + let iIndex = app.systemData.findIndex(item => item.sName === 'CbxMaterialsDefine'); + if(commonUtils.isNotEmptyObject(masterData.sMinusSrcId) || commonUtils.isNotEmptyObject(masterData.sMinusUsed) ){ + console.log('红冲', masterData); + iIndex = -1; + } + if (iIndex > -1) { + const sCbxMaterialsDefine = app.systemData[iIndex].sValue; + if (sCbxMaterialsDefine === 'datenum') { + slaveRow.sDefineNo = moment(new Date()).format('YYYYMMDD'); + } else if (sCbxMaterialsDefine === 'datetimenum') { + slaveRow.sDefineNo = moment(new Date()).format('YYYYMMDDHHmm'); + } else if (sCbxMaterialsDefine === 'yearnum') { + slaveRow.sDefineNo = moment(new Date()).format('YYYY'); + } else if (sCbxMaterialsDefine === 'yearmonthnum') { + slaveRow.sDefineNo = moment(new Date()).format('YYYYMM'); + } else if (sCbxMaterialsDefine === 'worknum') { + slaveRow.sDefineNo = slaveRow.sWorkOrderNo; + } else if (sCbxMaterialsDefine === 'manuualno') { + slaveRow.sDefineNo = slaveRow.sManualNo; + } else if (sCbxMaterialsDefine === 'createnownum') { /* 批号根据生产日期+当前日期 */ + slaveRow.sDefineNo = moment(slaveRow.tProductionDate).format('YYYYMMDDHHmm') + moment(new Date()).format('YYYYMMDDHHmm'); + } + } + } else if (sModelsType === 'productStock/productInStore' || sModelsType === 'outside/outsideinstoreAll') { /* 成品入库、整单发外入库 */ + let iIndex = app.systemData.findIndex(item => item.sName === 'CbxProductDefine'); + if(commonUtils.isNotEmptyObject(masterData.sMinusSrcId) || commonUtils.isNotEmptyObject(masterData.sMinusUsed) ){ + console.log('红111冲', masterData); + iIndex = -1; + } + if (iIndex > -1) { + const sCbxProductDefine = app.systemData[iIndex].sValue; + if (sCbxProductDefine === 'datenum') { + slaveRow.sDefineNo = moment(new Date()).format('YYYYMMDD'); + } else if (sCbxProductDefine === 'datetimenum') { + slaveRow.sDefineNo = moment(new Date()).format('YYYYMMDDHHmm'); + } else if (sCbxProductDefine === 'yearnum') { + slaveRow.sDefineNo = moment(new Date()).format('YYYY'); + } else if (sCbxProductDefine === 'yearmonthnum') { + slaveRow.sDefineNo = moment(new Date()).format('YYYYMM'); + } else if (sCbxProductDefine === 'worknum') { + slaveRow.sDefineNo = slaveRow.sWorkOrderNo; + } else if (sCbxProductDefine === 'manuualno') { + slaveRow.sDefineNo = slaveRow.sManualNo; + } else if (sCbxProductDefine === 'worktimenum') { /* 批号根据工单号码+日期时间批号 */ + slaveRow.sDefineNo = slaveRow.sWorkOrderNo + moment(new Date()).format('YYYYMMDDHH'); + } else if (sCbxProductDefine === 'yearToDate') { /* 2259 批号根据工单制单日期年月日,年取两位 */ + slaveRow.sDefineNo = moment(copyTo.masterData.tCreateDate || new Date()).format('YYMMDD'); + } + } + } else if (sModelsType === 'sales/salesCheck') { + slaveRow.dSrcNoCheckMoney = slaveRow.dProductForeignMoney; + } else if (sModelsType === 'purchase/purchasecheck') { + slaveRow.dSrcNoCheckMoney = slaveRow.dMaterialsMoney; + } else if (sModelsType === 'purchase/purchaseOrder') { // bug 2171 修正 吕杰 2021-03-26 + const dProcurementCycle = commonUtils.isNull(slaveRow.dProcurementCycle, 0); + const tCreateDate = masterData && commonUtils.isNotEmptyObject(masterData.tCreateDate) ? masterData.tCreateDate : new Date(); + const tDeliverDate = moment(tCreateDate).add(dProcurementCycle, 'days').format(commonUtils.dateFormatA); + slaveRow.tDeliverDate = tDeliverDate; + slaveRow.dProcurementCycle = dProcurementCycle; + } + slaveData.push(slaveRow); + + if (sModelsType.includes('sales/salesOrder') && flagCopyTo && commonUtils.isNotEmptyArr(copyTo.slaveData)) { + const { token } = this.props; + const sSlaveId = commonUtils.isNotEmptyStr(slaveItem.sSlaveId) ? slaveItem.sSlaveId : slaveItem.sId; + const sParentId = commonUtils.isNotEmptyStr(slaveItem.sParentId) ? slaveItem.sParentId : slaveItem.sId; + let condition = {}; + if (sModelsType === 'sales/salesOrderPack') { + condition = { sParentId }; + } else { + condition = { sSlaveId }; + } + /* 通用报价单:101251240115016244276286330 */ + const dataUrl = slaveItem.sFormId === '19211681019715780306452560' || slaveItem.sFormId === '101251240115016076506222050' + || slaveItem.sFormId === '101251240115016036175782700' || slaveItem.sFormId === '101251240115016002356125200' || slaveItem.sFormId === '101251240115016244276286330' || + slaveItem.sFormId === '101251240115016197744514350' ? + `${commonConfig.server_host}salesorder/getQuotationPartsInfo?sModelsId=${sModelsId}` : + `${commonConfig.server_host}salesorder/getPartsInfo?sModelsId=${sModelsId}`; + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; + if (dataReturn.code === 1) { + const returnData = dataReturn.dataset.rows[0]; + slaveItem.sId = sSlaveId; + copyTo.controlData = returnData.controlData; + copyTo.materialsData = returnData.materialsData; + copyTo.processData = returnData.processData; + copyTo.packData = returnData.packData; + copyTo.colorData = returnData.colorData; + } else { + this.props.getServiceError(dataReturn); + } + } + + const copyToControlConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.control`.toLowerCase()); + const controlAssignField = commonUtils.isNotEmptyArr(copyToControlConfig) ? copyToControlConfig[0].sAssignField : ''; + if (controlAssignField !== '') { + if (commonUtils.isNotEmptyObject(copyTo.controlData)) { + const treeCopyNodes = new Map(); + let controlFilterData = []; + const srcFormRoute = copyTo.srcFormRoute; + if (srcFormRoute === '/indexPage/quotationPack' || (commonUtils.isNotEmptyObject(srcFormRoute) && srcFormRoute.includes('quotationPack')) || slaveItem.sFormId === '101251240115016076506222050') { + controlFilterData = copyTo.controlData; + } else { + controlFilterData = copyTo.controlData.filter(controlItem => controlItem.sSlaveId === slaveItem.sId); + } + await controlFilterData.forEach(async (controlItem) => { + const newCopyTo = {}; + newCopyTo.master = copyTo.masterData; + newCopyTo.control = controlItem; + let controlRow = commonFunc.getDefaultData(config.controlConfig, newCopyTo); // 取默认值 + controlRow = { ...controlRow, ...commonFunc.getAssignFieldValue(controlAssignField, controlItem, newCopyTo) }; // 取赋值字段 + if ((!commonUtils.isEmpty(controlRow.dProductQty) && controlRow.dProductQty !== controlRow.dSrcQty) || + (!commonUtils.isEmpty(controlRow.dAuxiliaryQty) && controlRow.dAuxiliaryQty !== controlRow.dSrcAuxiliaryQty)) { + const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + const sFieldName = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'dProductQty' : 'dAuxiliaryQty'; + commonBusiness.getCalculateAllMoney(app, models, sFieldName, masterData, controlRow); + } + controlRow.handleType = 'add'; + controlRow.sId = commonUtils.createSid(); + controlRow.sOriginalId = controlItem.sId; /* 复制前的部件表sId */ + controlRow.sParentId = masterData.sId; + controlRow.sSlaveId = slaveRow.sId; + if (sModelsType === 'sales/salesOrderPack') { + /* 如果有树形结构 则sAllId,sControlParentId赋值 */ + const sAllOldId = controlItem.sAllId; + let arr = []; + if (commonUtils.isNotEmptyObject(sAllOldId)) { + arr = sAllOldId.split(','); + } + const newId = controlRow.sId; + let sOldParentId = ''; + let sNewParentAllId = ''; + if (arr.length < 2) { /* 根节点复制 */ + controlRow.sAllId = newId; + sOldParentId = newId; + sNewParentAllId = newId; + } else { + sOldParentId = arr[arr.length - 2]; + if (treeCopyNodes.has(sOldParentId)) { + sNewParentAllId = treeCopyNodes.get(sOldParentId); + } else { + const obj = arr[arr.length - 1]; + sNewParentAllId = sAllOldId.replace((`,${obj}`), ''); + } + const sNewArr = sNewParentAllId.split(','); + controlRow.sControlParentId = sNewArr[sNewArr.length - 1]; + sNewParentAllId = `${sNewParentAllId},${newId}`; + controlRow.sAllId = sNewParentAllId; + } + treeCopyNodes.set(controlItem.sId, sNewParentAllId); + } + controlData.push(controlRow); + + const copyToMaterialsConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.materials`.toLowerCase()); + const materialsAssignField = commonUtils.isNotEmptyArr(copyToMaterialsConfig) ? copyToMaterialsConfig[0].sAssignField : ''; + if (materialsAssignField !== '') { + if (commonUtils.isNotEmptyObject(copyTo.materialsData)) { + let materialsFilterData = []; + const srcFormRoute = copyTo.srcFormRoute; + if (srcFormRoute === '/indexPage/quotationPack' || (commonUtils.isNotEmptyObject(srcFormRoute) && srcFormRoute.includes('quotationPack')) || slaveItem.sFormId === '101251240115016076506222050') { + materialsFilterData = copyTo.materialsData.filter(materialsItem => materialsItem.sControlId === controlItem.sId); + } else { + materialsFilterData = copyTo.materialsData.filter(materialsItem => materialsItem.sSlaveId === slaveItem.sId && materialsItem.sControlId === controlItem.sId); + } + await materialsFilterData.forEach(async (materialsItem) => { + const newCopyTo = {}; + newCopyTo.master = copyTo.masterData; + newCopyTo.materials = materialsItem; + let materialsRow = commonFunc.getDefaultData(config.materialsConfig, newCopyTo); // 取默认值 + materialsRow = { ...materialsRow, ...commonFunc.getAssignFieldValue(materialsAssignField, materialsItem, newCopyTo) }; // 取赋值字段 + if ((!commonUtils.isEmpty(materialsRow.dProductQty) && materialsRow.dProductQty !== materialsRow.dSrcQty) || + (!commonUtils.isEmpty(materialsRow.dAuxiliaryQty) && materialsRow.dAuxiliaryQty !== materialsRow.dSrcAuxiliaryQty)) { + const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + const sFieldName = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'dProductQty' : 'dAuxiliaryQty'; + commonBusiness.getCalculateAllMoney(app, models, sFieldName, masterData, materialsRow); + } + materialsRow.handleType = 'add'; + materialsRow.sId = commonUtils.createSid(); + materialsRow.sParentId = masterData.sId; + materialsRow.sControlId = controlRow.sId; + materialsRow.sPartsName = controlRow.sPartsName; + materialsRow.sSlaveId = slaveRow.sId; + // 材料对应工序的ID要变化 + if (commonUtils.isNotEmptyArr(copyTo.processData)) { + const iProcessIndex = processData.findIndex(item => item.sControlId === controlRow.sId && item.sSrcProcessTbId === materialsItem.sProcessTbId); + if (iProcessIndex > -1) { + materialsRow.sProcessTbId = processData[iProcessIndex].sId; + } + } + if (Object.keys(materialsRow).length > 0 && Object.keys(materialsRow).findIndex(item => item === 'dMaterialsStockAuxiliaryQty') > -1) { + const urlMaterialsStock = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const valueMaterialsStock = { + sProName: 'Sp_Inventory_MaterialsInventoryV56', + paramsMap: { + sMaterialsGuid: materialsRow.sMaterialsId, + sMaterialsStyle: materialsRow.sMaterialsStyle, + sWarehouseGuid: materialsRow.sWarehouseId, + sLocationalGuid: materialsRow.sLocationId, + sWarehouseLocationGuid: materialsRow.sWarehouseLocationId, + sDefine_no: materialsRow.sDefineNo, + sDefine_no2: materialsRow.sDefineNo2, + iGetQty: 1, + iHasZero: 1, + }, + }; + const returnDataMaterialsStock = (await commonServices.postValueService(app.token, valueMaterialsStock, urlMaterialsStock)).data; + if (returnDataMaterialsStock.code === 1) { + materialsRow.dMaterialsStockAuxiliaryQty = returnDataMaterialsStock.dataset.rows[0].dataSet.outData[0].dAuxiliaryQty; + } + } + if (Object.keys(materialsRow).length > 0 && Object.keys(materialsRow).findIndex(item => item === 'dMaterialsStockAvailableQty') > -1) { + const urlMaterialsAvailableQty = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const valueMaterialsAvailableQty = { + sProName: 'Sp_Inventory_MaterialsInventoryV56', + paramsMap: { + sMaterialsGuid: materialsRow.sMaterialsId, + sMaterialsStyle: materialsRow.sMaterialsStyle, + sWarehouseGuid: materialsRow.sWarehouseId, + sLocationalGuid: materialsRow.sLocationId, + sWarehouseLocationGuid: materialsRow.sWarehouseLocationId, + sDefine_no: materialsRow.sDefineNo, + sDefine_no2: materialsRow.sDefineNo2, + iGetQty: 2, + iHasZero: 1, + }, + }; + const returnDataMaterialsAvailableQty = (await commonServices.postValueService(app.token, valueMaterialsAvailableQty, urlMaterialsAvailableQty)).data; + if (returnDataMaterialsAvailableQty.code === 1) { + materialsRow.dMaterialsStockAvailableQty = returnDataMaterialsAvailableQty.dataset.rows[0].dataSet.outData[0].dAuxiliaryQty; + } + } + materialsData.push(materialsRow); + }); + } + } + const copyToProcessConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.process`.toLowerCase()); + const processAssignField = commonUtils.isNotEmptyArr(copyToProcessConfig) ? copyToProcessConfig[0].sAssignField : ''; + if (processAssignField !== '') { + if (commonUtils.isNotEmptyObject(copyTo.processData)) { + let processFilterData = []; + const srcFormRoute = copyTo.srcFormRoute; + if (srcFormRoute === '/indexPage/quotationPack' || (commonUtils.isNotEmptyObject(srcFormRoute) && srcFormRoute.includes('quotationPack')) || slaveItem.sFormId === '101251240115016076506222050') { + processFilterData = copyTo.processData.filter(processItem => processItem.sControlId === controlItem.sId); + } else { + processFilterData = copyTo.processData.filter(processItem => processItem.sSlaveId === slaveItem.sId && processItem.sControlId === controlItem.sId); + } + processFilterData.forEach((processItem) => { + const newCopyTo = {}; + newCopyTo.master = copyTo.masterData; + newCopyTo.process = processItem; + let processRow = commonFunc.getDefaultData(config.processConfig, newCopyTo); // 取默认值 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignField, processItem, newCopyTo) }; // 取赋值字段 + if ((!commonUtils.isEmpty(processRow.dProductQty) && processRow.dProductQty !== processRow.dSrcQty) || + (!commonUtils.isEmpty(processRow.dAuxiliaryQty) && processRow.dAuxiliaryQty !== processRow.dSrcAuxiliaryQty)) { + const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'Product' : 'process'; + const sFieldName = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'dProductQty' : 'dAuxiliaryQty'; + commonBusiness.getCalculateAllMoney(app, models, sFieldName, masterData, processRow); + } + processRow.handleType = 'add'; + processRow.sId = commonUtils.createSid(); + processRow.sParentId = masterData.sId; + processRow.sControlId = controlRow.sId; + processRow.sPartsName = controlRow.sPartsName; + processRow.sSlaveId = slaveRow.sId; + processData.push(processRow); + }); + } + } + /* 合版表复制到 */ + if (sModelsType === 'sales/salesOrderPack') { + const copyToPackConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.pack`.toLowerCase()); + const packAssignField = commonUtils.isNotEmptyArr(copyToPackConfig) ? copyToPackConfig[0].sAssignField : ''; + if (commonUtils.isNotEmptyObject(packAssignField)) { + /* 复制到时增加合版表 */ + if (commonUtils.isNotEmptyArr(copyTo.packData)) { + await copyTo.packData.filter(item => item.sControlId === controlItem.sId).forEach(async (packItem) => { + newCopyTo.pack = packItem; + let packRow = commonFunc.getDefaultData(config.packConfig, newCopyTo); // 取默认值 + packRow = { ...packRow, ...commonFunc.getAssignFieldValue(packAssignField, packItem, newCopyTo) }; // 取赋值字段 + /* sSlaveId赋值 */ + const packRowAdd = this.handlePackDataAdd(slaveRow, 0, controlRow.sId); + packRow = { ...packRow, ...packRowAdd }; + packRow.sOrderSlaveId = slaveRow.sId; + + /* 将控制表中的合版备注sId为新的sId */ + let JsonData = []; + const jsonStr = controlRow.sCombinedMemo; + if (commonUtils.isNotEmptyObject(jsonStr) && commonUtils.isJSON(jsonStr)) { + JsonData = JSON.parse(jsonStr); + if (commonUtils.isNotEmptyArr(JsonData)) { + let sCombinedMemoNew = ''; + JsonData.forEach((item, index) => { + if (item.sId === packItem.sId) { + JsonData[index].sId = packRow.sId; + } + }); + sCombinedMemoNew = JSON.stringify(JsonData); + controlRow.sCombinedMemo = sCombinedMemoNew; + const icontrolIndex = controlData.findIndex(item => item.sId === controlRow.sId); + if (icontrolIndex) { + controlData[icontrolIndex] = { ...controlData[icontrolIndex], sCombinedMemo: sCombinedMemoNew }; + } + } + } + + + packData.push(packRow); + }); + } + } + } + }); + } + + const copyToMaterialsConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.materials`.toLowerCase()); + const materialsAssignField = commonUtils.isNotEmptyArr(copyToMaterialsConfig) ? copyToMaterialsConfig[0].sAssignField : ''; + if (materialsAssignField !== '') { + if (commonUtils.isNotEmptyObject(copyTo.materialsData)) { + let materialsFilterData = []; + const srcFormRoute = copyTo.srcFormRoute; + if (srcFormRoute === '/indexPage/quotationPack' || (commonUtils.isNotEmptyObject(srcFormRoute) && srcFormRoute.includes('quotationPack')) || slaveItem.sFormId === '101251240115016076506222050') { + materialsFilterData = copyTo.materialsData.filter(item => item.sType === '2'); + } else { + materialsFilterData = copyTo.materialsData.filter(item => item.sSlaveId === slaveItem.sId && item.sType === '2'); + } + await materialsFilterData.forEach(async (materialsItem) => { + const newCopyTo = {}; + newCopyTo.master = copyTo.masterData; + newCopyTo.materials = materialsItem; + let materialsRow = commonFunc.getDefaultData(config.materialsConfig, newCopyTo); // 取默认值 + materialsRow = { ...materialsRow, ...commonFunc.getAssignFieldValue(materialsAssignField, materialsItem, newCopyTo) }; // 取赋值字段 + if ((!commonUtils.isEmpty(materialsRow.dProductQty) && materialsRow.dProductQty !== materialsRow.dSrcQty) || + (!commonUtils.isEmpty(materialsRow.dAuxiliaryQty) && materialsRow.dAuxiliaryQty !== materialsRow.dSrcAuxiliaryQty)) { + const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + const sFieldName = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'dProductQty' : 'dAuxiliaryQty'; + commonBusiness.getCalculateAllMoney(app, models, sFieldName, masterData, materialsRow); + } + materialsRow.handleType = 'add'; + materialsRow.sId = commonUtils.createSid(); + materialsRow.sParentId = masterData.sId; + materialsRow.sSlaveId = slaveRow.sId; + + /* 根据从表源sOriginalId找到新sId */ + let sNewIds = ''; + let sNewNames = ''; + const sOldIds = materialsItem.sCombinePartsName; + if (commonUtils.isNotEmptyObject(sOldIds)) { + const sOldArr = sOldIds.split(','); + for (const sId of sOldArr) { + const index = slaveData.findIndex(item => item.sOriginalId === sId); + if (index > -1) { + const tableDataRow = slaveData[index]; + sNewIds += `${tableDataRow.sId},`; + sNewNames += `${tableDataRow.sProductName},`; + } + } + sNewIds = commonUtils.isNotEmptyObject(sNewIds) ? sNewIds.substr(0, sNewIds.length - 1) : ''; + sNewNames = commonUtils.isNotEmptyObject(sNewNames) ? sNewNames.substr(0, sNewNames.length - 1) : ''; + } + materialsRow.sCombinePartsName = sNewIds; + materialsRow.sCombinePartsNameNew = sNewNames; + + if (Object.keys(materialsRow).length > 0 && Object.keys(materialsRow).findIndex(item => item === 'dMaterialsStockAuxiliaryQty') > -1) { + const urlMaterialsStock = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const valueMaterialsStock = { + sProName: 'Sp_Inventory_MaterialsInventoryV56', + paramsMap: { + sMaterialsGuid: materialsRow.sMaterialsId, + sMaterialsStyle: materialsRow.sMaterialsStyle, + sWarehouseGuid: materialsRow.sWarehouseId, + sLocationalGuid: materialsRow.sLocationId, + sWarehouseLocationGuid: materialsRow.sWarehouseLocationId, + sDefine_no: materialsRow.sDefineNo, + sDefine_no2: materialsRow.sDefineNo2, + iGetQty: 1, + iHasZero: 1, + }, + }; + const returnDataMaterialsStock = (await commonServices.postValueService(app.token, valueMaterialsStock, urlMaterialsStock)).data; + if (returnDataMaterialsStock.code === 1) { + materialsRow.dMaterialsStockAuxiliaryQty = returnDataMaterialsStock.dataset.rows[0].dataSet.outData[0].dAuxiliaryQty; + } + } + if (Object.keys(materialsRow).length > 0 && Object.keys(materialsRow).findIndex(item => item === 'dMaterialsStockAvailableQty') > -1) { + const urlMaterialsAvailableQty = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const valueMaterialsAvailableQty = { + sProName: 'Sp_Inventory_MaterialsInventoryV56', + paramsMap: { + sMaterialsGuid: materialsRow.sMaterialsId, + sMaterialsStyle: materialsRow.sMaterialsStyle, + sWarehouseGuid: materialsRow.sWarehouseId, + sLocationalGuid: materialsRow.sLocationId, + sWarehouseLocationGuid: materialsRow.sWarehouseLocationId, + sDefine_no: materialsRow.sDefineNo, + sDefine_no2: materialsRow.sDefineNo2, + iGetQty: 2, + iHasZero: 1, + }, + }; + const returnDataMaterialsAvailableQty = (await commonServices.postValueService(app.token, valueMaterialsAvailableQty, urlMaterialsAvailableQty)).data; + if (returnDataMaterialsAvailableQty.code === 1) { + materialsRow.dMaterialsStockAvailableQty = returnDataMaterialsAvailableQty.dataset.rows[0].dataSet.outData[0].dAuxiliaryQty; + } + } + materialsData.push(materialsRow); + }); + } + } + const copyToProcessConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.process`.toLowerCase()); + const processAssignField = commonUtils.isNotEmptyArr(copyToProcessConfig) ? copyToProcessConfig[0].sAssignField : ''; + if (processAssignField !== '') { + if (commonUtils.isNotEmptyObject(copyTo.processData)) { + let processFilterData = []; + const srcFormRoute = copyTo.srcFormRoute; + if (srcFormRoute === '/indexPage/quotationPack' || (commonUtils.isNotEmptyObject(srcFormRoute) && srcFormRoute.includes('quotationPack')) || slaveItem.sFormId === '101251240115016076506222050') { + processFilterData = copyTo.processData.filter(item => item.sType === '3'); + } else { + processFilterData = copyTo.processData.filter(item => item.sSlaveId === slaveItem.sId && item.sType === '3'); + } + processFilterData.forEach((processItem) => { + const newCopyTo = {}; + newCopyTo.master = copyTo.masterData; + newCopyTo.process = processItem; + let processRow = commonFunc.getDefaultData(config.processConfig, newCopyTo); // 取默认值 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignField, processItem, newCopyTo) }; // 取赋值字段 + if ((!commonUtils.isEmpty(processRow.dProductQty) && processRow.dProductQty !== processRow.dSrcQty) || + (!commonUtils.isEmpty(processRow.dAuxiliaryQty) && processRow.dAuxiliaryQty !== processRow.dSrcAuxiliaryQty)) { + const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'Product' : 'process'; + const sFieldName = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'dProductQty' : 'dAuxiliaryQty'; + commonBusiness.getCalculateAllMoney(app, models, sFieldName, masterData, processRow); + } + processRow.handleType = 'add'; + processRow.sId = commonUtils.createSid(); + processRow.sParentId = masterData.sId; + processRow.sSlaveId = slaveRow.sId; + /* 通用报价单的合版部件名称换成新生成的控制表sId */ + if (commonUtils.isNotEmptyObject(processRow.sCombinePartsName)) { + /* 新的sCombinePartsName赋值 */ + let sCombinePartsNameStr = ''; /* 新生成合版部件名称 */ + const sCombinePartsNameOldArr = processRow.sCombinePartsName.split(','); + if (commonUtils.isNotEmptyArr(sCombinePartsNameOldArr)) { + const controlFilterData = controlData.filter(item => sCombinePartsNameOldArr.includes(item.sOriginalId)); + if (commonUtils.isNotEmptyArr(controlFilterData)) { + controlFilterData.forEach((item) => { + sCombinePartsNameStr += `${item.sId},`; + }); + } + sCombinePartsNameStr = commonUtils.isNotEmptyObject(sCombinePartsNameStr) ? sCombinePartsNameStr.substr(0, sCombinePartsNameStr.length - 1) : ''; + processRow.sCombinePartsName = sCombinePartsNameStr; + } + } + processData.push(processRow); + }); + } + } + /* 颜色表 */ + const copyToColorConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.param`.toLowerCase()); + const colorAssignField = commonUtils.isNotEmptyArr(copyToColorConfig) ? copyToColorConfig[0].sAssignField : ''; + if (colorAssignField !== '') { + if (commonUtils.isNotEmptyArr(copyTo.colorData)) { + if (commonUtils.isNotEmptyObject(config.colorConfig)) { + copyTo.colorData.forEach((colorItem) => { + newCopyTo.color = colorItem; + let colorRow = commonFunc.getDefaultData(config.colorConfig, newCopyTo); // 取默认值 + colorRow = { ...colorRow, ...commonFunc.getAssignFieldValue(colorAssignField, colorItem, newCopyTo) }; // 取赋值字段 + colorRow.handleType = 'add'; + colorRow.sId = commonUtils.createSid(); + colorRow.sParentId = masterData.sId; + colorData.push(colorRow); + }); + } + } + } + } + } + } + if (!commonUtils.isEmpty(masterData.sTestStandardId)) { + const dataUrl = `${commonConfig.server_host}eleteamemployee/getObtainInspectionStandards?sModelsId=${sModelsId}&sParentId=${masterData.sTestStandardId}`; + const dataReturn = (await commonServices.getService(this.props.app.token, dataUrl)).data; + const slaveDelData = []; + if (dataReturn.code === 1) { + const returnSlaveData = dataReturn.dataset.rows; + slaveData.forEach((item) => { + item.handleType = 'del'; + slaveDelData.push(item); + }); + slaveData = []; + const newCopyTo = {}; + newCopyTo.master = masterData; + const iConfigIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'sTestStandardName'); + const slaveConfig = commonUtils.isEmptyObject(config) ? {} : config.slaveConfig; + if (!isWait) { + masterConfig = this.props.slaveConfig; + } + const iSqlIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === 'sActValue'); + returnSlaveData.forEach((item, iIndex) => { + let tableDataRow = commonFunc.getDefaultData(config.slaveConfig, {}); + tableDataRow.handleType = 'add'; + tableDataRow.sId = commonUtils.createSid(); + tableDataRow.sParentId = masterData && masterData.sId ? masterData.sId : null; + tableDataRow.key = tableDataRow.sId; + tableDataRow.iOrder = iIndex; + if (iConfigIndex > -1) { + tableDataRow = { ...tableDataRow, ...commonFunc.getAssignFieldValue(masterConfig.gdsconfigformslave[iConfigIndex].sAssignField, item, newCopyTo) }; // 取赋值字段 + const sTestReference = tableDataRow.sTestReference; + const sParamObj = {}; + if (commonUtils.isNotEmptyObject(sTestReference)) { + if (sTestReference.indexOf('|') >= 0) { + sTestReference.split('|').forEach((itemField) => { + sParamObj[itemField] = itemField; + }); + tableDataRow.sParamDropDownsActValue = sParamObj; + if (iSqlIndex > -1) { + slaveConfig.gdsconfigformslave[iSqlIndex].sDropDownType = 'sql'; + } else { + slaveConfig.gdsconfigformslave[iSqlIndex].sDropDownType = ''; + } + } + } + } + if(location.pathname && location.pathname.includes('commonOeeBill')) { + if(commonUtils.isNotEmptyObject(app) && app.currentPane && app.currentPane.copyTo){ + const masterCopyToData = app.currentPane.copyTo.masterData; + if(commonUtils.isNotEmptyObject(masterCopyToData)) { + tableDataRow.sReportPanel = masterCopyToData.sReportPanel; + tableDataRow.sReportParam = masterCopyToData.sReportParam; + tableDataRow.sProcessParam = masterCopyToData.sProcessParam; + tableDataRow.sProcessPanel = masterCopyToData.sProcessPanel; + tableDataRow.sSrcSlaveId = masterCopyToData.sSlaveId; + } + } + } + + slaveData.push(tableDataRow); + }); + } + } + } + if (!commonUtils.isEmpty(copyTo) && commonUtils.isNotEmptyArr(copyTo.copyOtherData)) { + const copyToDetailConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.detail`.toLowerCase()); + const detailAssignField = commonUtils.isNotEmptyArr(copyToDetailConfig) ? copyToDetailConfig[0].sAssignField : ''; + if (detailAssignField !== '') { + const copyDetail = copyTo.copyOtherData.filter(item => item.name === 'detail')[0]; + const detail = copyDetail.data; + if(commonUtils.isNotEmptyArr(detail)) { + detail.forEach((detailItem) => { + const newCopyTo = {}; + newCopyTo.master = copyTo.masterData; + newCopyTo.detail = detailItem; + let tempDetail = commonFunc.getDefaultData(config.orderDetailConfig, newCopyTo); // 取默认值 + tempDetail = { ...tempDetail, ...commonFunc.getAssignFieldValue(detailAssignField, detailItem, newCopyTo) }; // 取赋值字段 + const iIndex = slaveData.findIndex(slaveItem => slaveItem.sMaterialsId + slaveItem.sMaterialsStyle === detailItem.sMaterialsGS); + if (iIndex !== -1) { + slaveData[iIndex].sWorkOrderNo = commonUtils.isEmptyObject(slaveData[iIndex].sWorkOrderNo) ? detailItem.sWorkOrderNo : `${slaveData[iIndex].sWorkOrderNo},${detailItem.sWorkOrderNo}`; + } + tempDetail.handleType = 'add'; + tempDetail.sId = commonUtils.createSid(); + tempDetail.sParentId = masterData.sId; + orderDetailData.push(tempDetail); + }); + } + } + } + /* 剔除订单到收款单,费用分摊单据新增空行 */ + if (slaveData.length === 0 && commonUtils.isNotEmptyObject(configNew.slaveConfig) && this.props.sModelsType !== 'cashier/receipt' && this.props.sModelsType !== 'cashier/payment' && this.props.sModelsType !== 'cost/cosexpenseshare' + && sModelsType !== 'sales/salesInvoice' && sModelsType !== 'purchase/purchaseInvoice' && sModelsType !== 'purchase/outsideInvoice') { + const allTableData = {}; + allTableData.master = masterData; + allTableData.slave = slaveData; + const tableDataRowAdd = commonFunc.getDefaultData(configNew.slaveConfig, allTableData); + tableDataRowAdd.handleType = 'add'; + tableDataRowAdd.sId = commonUtils.createSid(); + tableDataRowAdd.sParentId = masterData && masterData.sId ? masterData.sId : null; + tableDataRowAdd.key = tableDataRowAdd.sId; + tableDataRowAdd.bDefault = false; + tableDataRowAdd.iOrder = 1; + /* 新增时生成采购批号 */ + if (sModelsType === 'purchase/purchaseInstore') { + let iIndex = app.systemData.findIndex(item => item.sName === 'CbxMaterialsDefine'); + if(commonUtils.isNotEmptyObject(masterData.sMinusSrcId) || commonUtils.isNotEmptyObject(masterData.sMinusUsed) ){ + console.log('红冲', masterData); + iIndex = -1; + } + if (iIndex > -1) { + const sCbxMaterialsDefine = app.systemData[iIndex].sValue; + if (sCbxMaterialsDefine === 'datenum') { + tableDataRowAdd.sDefineNo = moment(new Date()).format('YYYYMMDD'); + } else if (sCbxMaterialsDefine === 'datetimenum') { + tableDataRowAdd.sDefineNo = moment(new Date()).format('YYYYMMDDHHmm'); + } else if (sCbxMaterialsDefine === 'yearnum') { + tableDataRowAdd.sDefineNo = moment(new Date()).format('YYYY'); + } else if (sCbxMaterialsDefine === 'yearmonthnum') { + tableDataRowAdd.sDefineNo = moment(new Date()).format('YYYYMM'); + } else if (sCbxMaterialsDefine === 'worknum') { + tableDataRowAdd.sDefineNo = tableDataRowAdd.sWorkOrderNo; + } else if (sCbxMaterialsDefine === 'manuualno') { + tableDataRowAdd.sDefineNo = tableDataRowAdd.sManualNo; + } else if (sCbxMaterialsDefine === 'createnownum') { /* 批号根据生产日期+当前日期 */ + tableDataRowAdd.sDefineNo = moment(tableDataRowAdd.tProductionDate).format('YYYYMMDDHHmm') + moment(new Date()).format('YYYYMMDDHHmm'); + } + } + } else if (sModelsType === 'productStock/productInStore' || sModelsType === 'outside/outsideinstoreAll') { /* 成品入库、整单发外入库 */ + let iIndex = app.systemData.findIndex(item => item.sName === 'CbxProductDefine'); + if(commonUtils.isNotEmptyObject(masterData.sMinusSrcId) || commonUtils.isNotEmptyObject(masterData.sMinusUsed) ){ + console.log('红冲', masterData); + iIndex = -1; + } + if (iIndex > -1) { + const sCbxProductDefine = app.systemData[iIndex].sValue; + if (sCbxProductDefine === 'datenum') { + tableDataRowAdd.sDefineNo = moment(new Date()).format('YYYYMMDD'); + } else if (sCbxProductDefine === 'datetimenum') { + tableDataRowAdd.sDefineNo = moment(new Date()).format('YYYYMMDDHHmm'); + } else if (sCbxProductDefine === 'yearnum') { + tableDataRowAdd.sDefineNo = moment(new Date()).format('YYYY'); + } else if (sCbxProductDefine === 'yearmonthnum') { + tableDataRowAdd.sDefineNo = moment(new Date()).format('YYYYMM'); + } else if (sCbxProductDefine === 'worknum') { + tableDataRowAdd.sDefineNo = tableDataRowAdd.sWorkOrderNo; + } else if (sCbxProductDefine === 'manuualno') { + tableDataRowAdd.sDefineNo = tableDataRowAdd.sManualNo; + } else if (sCbxProductDefine === 'worktimenum') { /* 批号根据工单号码+日期时间批号 */ + tableDataRowAdd.sDefineNo = tableDataRowAdd.sWorkOrderNo + moment(new Date()).format('YYYYMMDDHH'); + } else if (sCbxProductDefine === 'yearToDate') { /* 2259 批号根据工单制单日期年月日,年取两位 */ + tableDataRowAdd.sDefineNo = moment(copyTo.masterData.tCreateDate || new Date()).format('YYMMDD'); + } + } + } + slaveData.push(tableDataRowAdd); + } + if (sModelsType === 'sales/salesSgoods') { /* 送货单中如果只有一个仓库,默认带这个仓库 */ + // const sWareHouseNameDropDown = commonUtils.getStoreDropDownData(sModelsId, 'master', 'sWareHouseName'); + let sWareHouseNameDropDown; + const masterIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sWareHouseName'); + if (masterIndex > -1) { + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, 'master', masterConfig.gdsconfigformslave[masterIndex]); + sWareHouseNameDropDown = sqlDropDownData.dropDownData; + } + if (commonUtils.isNotEmptyArr(sWareHouseNameDropDown) && sWareHouseNameDropDown.length === 1) { + const addStata = {}; + addStata.sWareHouseId = sWareHouseNameDropDown[0].sId; + addStata.sWareHouseNo = sWareHouseNameDropDown[0].sNo; + addStata.sWareHouseName = sWareHouseNameDropDown[0].sName; + addStata.sLocationId = sWareHouseNameDropDown[0].sLocationId; + addStata.sLocationNo = sWareHouseNameDropDown[0].sLocationNo; + addStata.sLocationName = sWareHouseNameDropDown[0].sLocationName; + addStata.sWareHouseLocationId = sWareHouseNameDropDown[0].sWareHouseLocationId; + addStata.sWareHouseLocationNo = sWareHouseNameDropDown[0].sWareHouseLocationNo; + addStata.sWareHouseLocationName = sWareHouseNameDropDown[0].sWareHouseLocationName; + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sWareHouseName'); + if (iIndex > -1) { + masterData = { ...masterData, ...addStata }; /* 主表赋默认仓库 */ + if (commonUtils.isNotEmptyArr(slaveData) && slaveData.length > 0) { /* 从表赋默认仓库 */ + slaveData.forEach((item, index) => { + slaveData[index] = { ...item, ...addStata }; + }); + } + } + } + } + // if (sModelsType === 'cost/cosexpenseshare') { /* 新建费用分摊单据,从表的数据自动获取 */ + // const { sModelsId } = this.props; + // const url = `${commonConfig.server_host}costCenter/getCostCenterData?sModelsId=${sModelsId}`; + // const dataReturn = (await commonServices.postValueService(app.token, {}, url)).data; + // if (dataReturn.code === 1) { + // /* 获取数据集 */ + // const { rows } = dataReturn.dataset; + // rows.forEach((row) => { + // const tableDataRowAdd = row; + // tableDataRowAdd.handleType = 'add'; + // tableDataRowAdd.sId = commonUtils.createSid(); + // tableDataRowAdd.sParentId = masterData && masterData.sId ? masterData.sId : null; + // tableDataRowAdd.key = tableDataRowAdd.sId; + // tableDataRowAdd.bDefault = false; + // slaveData.push(tableDataRowAdd); + // }); + // } else { /* 失败 */ + // this.props.getServiceError(dataReturn); + // return []; + // } + // } + const treeState = this.handleGetControlTreeData(controlData, true); /* 加载树形结构数据 */ + const state = { + masterData, + slaveData, + slaveTotal: [], + slaveSelectedRowKeys: [], + checkData: [], + checkSelectedRowKeys: [], + searchUpDownData: {}, + enabled: true, + controlData, + materialsData, + processData, + dailyData, + packData, + colorData, + orderDetailData, + ...treeState, + processSelectedRowKeys: [], + controlSelectedRowKeys: [], + materialsSelectedRowKeys: [], + calculated: false, + }; + state.sUseInfo = ''; + + /* 如果是红冲数据有值 则单据全部锁定 */ + if (commonUtils.isNotEmptyObject(masterData) && ((commonUtils.isNotEmptyObject(masterData.sMinusSrcId)) || commonUtils.isNotEmptyObject(masterData.sMinusUsed))) { + state.sUseInfo = 'bUsed'; + } + + if (isWait) { + return state; + } else { + this.props.onSaveState(state); + return true; + } + }; + /** 点击修改按钮操作 */ + handleEdit = async (cb) => { + const { + masterConfig, slaveConfig, checkConfig, currentId, app, masterData, dispatch, billnosetting, + } = this.props; + const { userinfo, systemData } = app; + const { sMakePerson } = masterData; /* 本单据制单人 */ + const { sUserName, sType } = userinfo;/* 登录用户 */ + // 判断是否全局都有配置 + const iIndex = systemData.findIndex(item => item.sName === 'CkxModifyBillNoMakePerson'); + let sValue = 0; + if (iIndex > -1) { + sValue = systemData[iIndex].sValue; // 全局配置的值; 1为开启:所有人都可以编辑,0是关闭; + } + const bModify = billnosetting.bModify; /* 勾选了可修改及代表普通用户非制单人可以修改单据 */ + if (!+sValue && !bModify && sType !== 'sysadmin' && sUserName !== sMakePerson) { + message.error(commonFunc.showMessage(app.commonConst, 'NoUpdateByNoMakePerson')); + this.props.onSaveState({ + loading: false + }); + return; + } + let timValue = 0; + if (this.props.app.webSocket === null || this.props.app.webSocket.readyState !== WebSocket.OPEN) { + this.props.dispatch({ type: 'app/createWebSocket', payload: { reStart: true, dispatch } }); + timValue = 3000; + } + const reset = (ws, config1) => { + clearTimeout(config1.timerServer); + clearTimeout(config1.serverTimer); + start(ws, config1); + }; + const start = (ws, config1) => { + config1.timerServer = setTimeout(() => { + const message = { sendFrom: this.props.app.userinfo.sId, connectTest: 'test' }; // param 存放其它参数 keyName 需要放入Redis的数据key,keyValue 需要放入Redis的数据key 的值 + ws.send(JSON.stringify(message)); + }, config1.timeoutServer); + }; + setTimeout(() => { + this.props.app.webSocket.onmessage = async (msg) => { + reset(this.props.app.webSocket, commonConfig); + const rtmsg = JSON.parse(msg.data); + if (rtmsg.action === 'showMsg') { + message.warning(rtmsg.msg); + this.props.onSaveState({ loading: false }); + } else if (rtmsg.action === 'loginOut') { + if (location.pathname.indexOf('/indexOee') > -1) { + dispatch({ type: 'app/throwErrorMes', payload: { code: -2, msg: rtmsg.msg } }); + } else if (location.pathname.indexOf('/indexMobile') > -1) { + dispatch({ type: 'app/throwErrorMobile', payload: { code: -2, msg: rtmsg.msg } }); + } else { + dispatch({ type: 'app/throwError', payload: { code: -2, msg: rtmsg.msg } }); + } + } else if (rtmsg.action === 'update') { + await this.handleGetData(masterConfig, slaveConfig, checkConfig,'update'); + if (cb && typeof cb === 'function') { + this.props.onSaveState({ enabled: false, calculated: false }, () => { cb(); }); + } else { + this.props.onSaveState({ enabled: true, calculated: false, loading: false }); + } + } else if (this.props.app.webSocket.homeAction) { + this.props.app.webSocket.homeAction(msg); + } + }; + this.props.handleSendSocketMessage('update', 'showMsg', currentId, userinfo.sId, null, null); + }, timValue); + }; + /** 表单回带 */ + handleForm = (form) => { + this.form = form; + }; + /** toolbar审核(消审) */ + handleAudit = async (flag) => { + /* 待用数据声明 */ + const { masterData, gdsformconst } = this.props; + if (!commonUtils.isEmpty(masterData)) { + /* 作废订单不能审核 */ + if (masterData.bInvalid) { + message.warning(gdsformconst.filter(item => (item.sName === 'sToVoid'))[0].showName); + return ''; + } + /** 数据审核 */ + await this.dataAudit(flag); + } else { + this.props.onSaveState({ + loading: false, + }); + } + }; + + /** 数据审核 */ + dataAudit = async (flag, tmpCheck, isWait) => { + message.destroy(); + /* 待用数据声明 */ + const { + sModelsId, masterData, app, masterConfig, slaveConfig, checkConfig, token, sModelsType, controlConfig, materialsConfig, processConfig, colorConfig, packConfig, slaveData, orderDetailConfig, + } = this.props; + const sSlaveIdArray = []; + if (commonUtils.isNotEmptyArr(slaveData)) { + slaveData.forEach((item) => { + sSlaveIdArray.push(commonUtils.isNotEmptyObject(item.sId) ? item.sId : item.sSlaveId); + }); + } + const slaveId = sSlaveIdArray.toString(); + /* 数据参数 */ + const value = { + sClientType: '1', + paramsMap: { + iFlag: flag, + iTmpCheck: commonUtils.isEmptyNumber(tmpCheck) ? 0 : tmpCheck, + sFormGuid: sModelsId, + sGuid: masterData.sId, + sSlaveId: slaveId, + sBillNo: commonUtils.isNotEmptyObject(masterData.sBillNo) ? masterData.sBillNo : '', + }, + }; + let clearFlag = false; + if (sModelsType.includes('sales/salesOrder') || sModelsType.includes('manufacture/workOrder')) { + if (commonUtils.isNotEmptyArr(slaveData)) { + for (const item of slaveData) { + if (commonUtils.isNotEmptyStr(item.sProductInfo)) { + clearFlag = true; + break; + } + } + } else { + this.props.onSaveState({ + loading: false, + }); + return; + } + } + /* 数据审核 */ + const url = `${commonConfig.server_host}business/doExamine?sModelsId=${sModelsId}`; + const returnData = (await commonServices.postValueService(app.token, value, url)).data; + if (isWait) { + return returnData; + } else { + /* 接收返回值 */ + const check = commonFunc.showMessage(app.commonConst, 'BtnExamine');/* 审核 */ + const BtnCancelExamine = commonFunc.showMessage(app.commonConst, 'BtnCancelExamine');/* 销审 */ + if (returnData.code === 1) { /* 成功 */ + this.props.onSaveState({ + loading: false, + }); + if (flag === 1) { + /* 审核 */ + if (clearFlag && (sModelsType.includes('sales/salesOrder') || sModelsType.includes('manufacture/workOrder'))) { + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sProductId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sProductNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sProductName', []); + } + let outData; + if (commonUtils.isNotEmptyObject(returnData.dataset)) { + outData = returnData.dataset.rows[0].dataSet.outData; + } + if (commonUtils.isNotEmptyStr(outData[0].sReturn)) { + const sReturnArray = outData[0].sReturn.split('|'); + if (outData[0].sReturn.split('-').length < 2) { + // 正常业务提示,非审核模板 + // if (this.props.app.currentPane.refresh !== undefined) { + // this.props.app.currentPane.refresh(); + // } + message.error(check + outData[0].sReturn); + return; + } + const checkConditions = []; + let checkPersonData = {}; + sReturnArray.forEach((item) => { + const checkCondition = item.split('-')[2]; + const iIndex = checkConditions.findIndex(itemCondition => itemCondition.condition === checkCondition); + if (iIndex <= -1) { + checkConditions.push({ + key: commonUtils.createSid(), + condition: checkCondition, + }); + } + }); + const sCheckModelId = sReturnArray[0].split('-')[1]; + if (commonUtils.isNotEmptyStr(sCheckModelId)) { + const urlCheck = `${commonConfig.server_host}checkModel/getUserListByModelId/${sCheckModelId}?sModelsId=${sModelsId}`; + const dataReturn = (await commonServices.getService(token, urlCheck)).data; + if (dataReturn.code === 1) { + checkPersonData = dataReturn.dataset.rows; + checkPersonData.forEach((item) => { + item.key = commonUtils.createSid(); + }); + this.props.onSaveState({ + checkConditions, checkPersonData, sCheckModelId, visible: true, + }); + return true; + } else { /* 失败 */ + this.props.getServiceError({ msg: check + dataReturn }); + } + } + } else { + message.success(check + returnData.msg); + } + } else { + /* 消审 */ + const { outData } = returnData.dataset.rows[0].dataSet; + if (commonUtils.isNotEmptyStr(outData[0].sReturn)) { + message.error(outData[0].sReturn); + } else { + // if (this.props.app.currentPane.refresh !== undefined) { + // this.props.app.currentPane.refresh(); + // } + message.success(BtnCancelExamine + returnData.msg); + } + } + await this.handleGetData(masterConfig, slaveConfig, checkConfig); + if ((sModelsType.includes('sales/salesOrder') || sModelsType.includes('manufacture/workOrder')) && !commonUtils.isEmpty(controlConfig)) { + await this.handleGetMemoData(controlConfig, materialsConfig, processConfig, colorConfig, packConfig); + } else if (commonUtils.isNotEmptyObject(orderDetailConfig)) { + await this.handleGetOneMemoData('orderDetail', orderDetailConfig); + } + if (this.props.app.currentPane.refresh !== undefined) { + this.props.app.currentPane.refresh(); + } + } else { /* 失败 */ + this.props.getServiceError(returnData); + this.props.onSaveState({ + loading: false, + }); + } + return true; + } + }; + + /** toolbar保存 */ + handleSaveData = async (params) => { + const { + token, sModelsId, currentId, masterData, masterConfig, slaveConfig, checkConfig, billnosetting, app, sModelsType, controlConfig, materialsConfig, processConfig, colorConfig, packConfig, orderDetailConfig, dispatch, + } = this.props; + const { userinfo } = app; + const { copyTo } = app.currentPane; + const onSendSocketMessage = this.props.handleSendSocketMessage; + const BtnSave = commonFunc.showMessage(app.commonConst, 'BtnSave');/* 保存 */ + params.optName = BtnSave; + const returnData = await commonBusiness.saveData({ token, value: params, sModelsId }); + if (commonUtils.isNotEmptyObject(returnData)) { + /* 防呆校验 */ + if (returnData.code === -7) { + // eslint-disable-next-line no-underscore-dangle + const _this = this; + confirm({ + title: '单据校验', /* 防呆校验 */ + content: returnData.msg, + onOk() { + params.iFlag = 1; + _this.handleSaveData(params); + }, + onCancel() { + }, + okText: '保存', + cancelText: '不保存', + }); + this.props.onSaveState({ + loading: false, + }); + return true; + } + if (commonUtils.isNotEmptyObject(copyTo) && commonUtils.isNotEmptyArr(copyTo.slaveData)) { + const { slaveData } = copyTo; + const sIdArray = []; + slaveData.forEach((item) => { + const redisKey = item.sSlaveId; + sIdArray.push(redisKey); + }); + /* 处理只有单主表解锁问题 */ + if (commonUtils.isNotEmptyObject(masterData) && commonUtils.isNotEmptyObject(masterData.sSrcSlaveId)) { + sIdArray.push(masterData.sSrcSlaveId); + } + const sId = sIdArray.toString(); + onSendSocketMessage('copyfinish', 'noAction', sId, userinfo.sId, null, null); + } + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null); + this.props.onSaveState({ + enabled: false, currentId: masterData.sId, + }); + // 保存后更新panes,currentPane的checkedId,防止浏览器刷新时重新又变成新增。 + if (location.pathname !== '/indexOee/commonOeeBill') { + const iPaneIndex = app.panes.findIndex(item => item.key === app.currentPane.key); + app.panes[iPaneIndex].checkedId = masterData.sId; + app.currentPane.checkedId = masterData.sId; + dispatch({ type: 'app/savePanesAndCurrentPane', payload: { panes: app.panes, currentPane: app.currentPane } }); + } + + if (billnosetting.bAutoCheck) { + await this.handleAudit(1); + } else { + await this.handleGetData(masterConfig, slaveConfig, checkConfig); + if ((sModelsType.includes('sales/salesOrder') || sModelsType.includes('manufacture/workOrder')) && !commonUtils.isEmpty(controlConfig)) { + console.log('23333', 222); + await this.handleGetMemoData(controlConfig, materialsConfig, processConfig, colorConfig, packConfig); + } else if (commonUtils.isNotEmptyObject(orderDetailConfig)) { + await this.handleGetOneMemoData('orderDetail', orderDetailConfig); + } + if (this.props.app.currentPane.refresh !== undefined) { + this.props.app.currentPane.refresh(); + } + } + this.props.onSaveState({ + loading: false, + }); + return true; + } else { + this.props.onSaveState({ + loading: false, + }); + return false; + } + }; + /** toolbar校验保存 */ + handleValidateSave = () => { + this.form.validateFields(async (err) => { + /* 验证通过与不通过走不同的流程 */ + if (err) { /* 验证失败 */ + /* 直接渲染显示错误提示 */ + for (const key of Object.keys(err)) { + message.error(err[key].errors[0].message); + } + this.props.onSaveState({ + loading: false, + }); + } else { /* 验证成功 */ + const { + masterConfig, slaveConfig, slaveData, app, sModelsType, controlConfig, controlData, controlDelData, materialsConfig, materialsData, materialsDelData, processConfig, processData, processDelData, colorConfig, colorData, colorDelData, packConfig, packData, packDelData, orderDetailConfig, orderDetailData, orderDetailDelData, + } = this.props; + let { slaveDelData } = this.props; + let { masterData } = this.props; + if (sModelsType !== 'commonBill/onlyMaster' && commonUtils.isEmptyArr(slaveData) && !sModelsType.includes('sales/salesInvoice') && !sModelsType.includes('purchase/purchaseInvoice') && !sModelsType.includes('purchase/outsideInvoice') && sModelsType !== 'cashier/financialTransfer' && sModelsType !== 'cashier/financialAdjustment' + && !sModelsType.includes('cashier/receipt') && !sModelsType.includes('cashier/payment') && !sModelsType.includes('purchase/purchaseEnquiry')) { + /* 如果有审核按钮 则校验从表是否为空 */ + let bCheck = false; + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'BtnCheck'); + if (iIndex > -1) { + bCheck = true; + } + if(bCheck) { + message.error(commonFunc.showMessage(app.commonConst, 'slaveNotNull')); // 从表不能为空! + this.props.onSaveState({ + loading: false, + }); + return; + } + } + // && sModelsType === 'materialsStock/productionmaterialsadjust' + if (commonUtils.isNotEmptyArr(slaveData)) { + let flag = true; + for (const item of slaveData) { + if (sModelsType === 'materialsStock/productionmaterialsadjust') { + if (commonUtils.isNotEmptyStr(item.sWareHouseId)) { + if (masterData.sWareHouseId === item.sWareHouseId && masterData.sWarehouseLocationId === item.sWarehouseLocationId && masterData.sLocationId === item.sLocationId) { + message.error(commonFunc.showMessage(app.commonConst, 'NotSameMateMaterialWarehouse'));/* 材料调拨原仓库与调入仓库不能一致 */ + flag = false; + break; + } + } + } + // {"paper":"纸张","finished":"成品","half_finished":"半成品","accessories":"辅料","corrugated":"瓦楞"} + if (commonUtils.isNotEmptyObject(item.sMaterialsType) && item.sMaterialsType === 'paper' && commonUtils.isEmptyObject(item.sMaterialsStyle)) { + if (sModelsType.includes('sales/')) { + message.error(item.sProductName + commonFunc.showMessage(app.commonConst, 'NoStyle'));/* 请填写"${item.sProductName}"的规格 */ + } else { + message.error(item.sMaterialsName + commonFunc.showMessage(app.commonConst, 'NoStyle'));/* 请填写"${item.sMaterialsName}"的规格 */ + } + flag = false; + break; + } + } + if (!flag) { + this.props.onSaveState({ + loading: false, + }); + return; + } + } + if (!commonBusiness.validateTable(slaveConfig, slaveData, this.props)) { + this.props.onSaveState({ + loading: false, + }); + return; + } + // if (commonUtils.isNotEmptyArr(slaveData) && sModelsType === 'materialsStock/productionmaterials') { + // let flag = true; + // const iIndex = app.systemData.findIndex(item => item.sName === 'CkxMaterialsStockLimit'); + // if (iIndex > -1) { + // const bCkxMaterialsStockLimit = app.systemData[iIndex].sValue; + // if (bCkxMaterialsStockLimit === '1') { + // flag = await this.handleEleMaterialsStoreCurrQty(slaveData); + // } + // } + // if (!flag) { + // this.props.onSaveState({ + // loading: false, + // }); + // return; + // } + // } + if (sModelsType === 'purchase/purchaseEnquiry') { + delete masterData.maxBillNo; + } + if (sModelsType === 'cashier/receipt' || sModelsType === 'cashier/payment') { + let flag = true; + if (masterData.sSettlementId === 'bank') { + if (commonUtils.isEmptyStr(masterData.sBankId) || commonUtils.isEmptyStr(masterData.sBankAccount)) { + message.error(commonFunc.showMessage(app.commonConst, 'requiredsBankAccount'));/* 收/付款条件为银行时,银行、银行账号为必填项 */ + flag = false; + } + } + if (masterData.sSettlementId === 'bill') { + if (commonUtils.isEmptyStr(masterData.sBankId) || commonUtils.isEmptyStr(masterData.sInvoiceNo)) { + message.error(commonFunc.showMessage(app.commonConst, 'requiredsInvoiceNo'));/* 收/付款条件为票据时,银行、票据号码为必填项 */ + flag = false; + } + } + let dslaveTotalMoney = 0; + let flagCheckSave = true; + if (commonUtils.isNotEmptyArr(slaveData) && slaveData.length > 0) { + for (const item of slaveData) { + if (item.handleType !== 'del') { + if (commonUtils.isNotEmptyNumber(item.dTotalMoney)) { + dslaveTotalMoney += item.dTotalMoney; + } + const dBalanceMoney = commonUtils.isNull(item.dBalanceMoney, 0); + const dTotalMoney = commonUtils.isNull(item.dTotalMoney, 0); + const dRoundingMoney = commonUtils.isNull(item.dRoundingMoney, 0); + const dCount = dRoundingMoney + dTotalMoney; + let bWarning = false; + if (dBalanceMoney > 0 || dBalanceMoney === 0) { + if (dCount > dBalanceMoney) { + bWarning = true; + } + } else if (dCount < dBalanceMoney) { + bWarning = true; + } + if (bWarning) { + if (sModelsType.includes('cashier/receipt')) { + message.error(commonFunc.showMessage(app.commonConst, 'NoOverBalanceMoneyReceipt'));/* 总金额不能超过未收/付款宽金额 */ + } else if (sModelsType.includes('cashier/payment')) { + message.error(commonFunc.showMessage(app.commonConst, 'NoOverBalanceMoneyPay'));/* 总金额不能超过未收/付款宽金额 */ + } + this.props.onSaveState({ + loading: false, + }); + return; + } + } + const flatDel = commonUtils.isNull(item.dTotalMoney, 0) !== 0 || commonUtils.isNull(item.dRoundingMoney, 0) !== 0; + if (!flatDel) { + if (item.handleType === 'add') { + item.handleType = undefined; /* 付款单和收款单,去掉收款和付款金额为0的记录 */ + } else if (item.handleType === 'update') { + item.handleType = 'del'; + item.bRollBack = true; /* 删除失败后 该条数据回滚到修改状态 */ + if (commonUtils.isEmptyArr(slaveDelData)) { + slaveDelData = []; + } + slaveDelData.push(item); + } + } else { + flagCheckSave = false; + } + } + } + if (commonUtils.isNotEmptyArr(slaveData) && slaveData.length > 0 && flagCheckSave) { + message.warning('表格内容不能为空![dTotalMoney或dRoundingMoney必须大于0]'); + this.props.onSaveState({ + loading: false, + }); + return; + } + const dPmoney = this.props.getFloatNum('dProductMoney'); + dslaveTotalMoney = commonUtils.convertFixNum(dslaveTotalMoney, dPmoney);/* 取系统设定小数位 */ + if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyNumber(masterData.dTotalMoney) && commonUtils.isNotEmptyNumber(masterData.dAdvanceMoney) && commonUtils.convertFixNum(masterData.dTotalMoney - masterData.dAdvanceMoney, dPmoney) !== dslaveTotalMoney) { + message.error(commonFunc.showMessage(app.commonConst, 'NotSameTotalMoney'));/* 主从表总金额不一致 */ + flag = false; + } + /* 收付款保存前,看到从表没数据,预收勾上时,自动调用一下分摊 */ + if (commonUtils.isEmptyArr(slaveData)) { + masterData = this.handleShare(); + } + if (!flag) { + this.props.onSaveState({ + loading: false, + }); + return; + } + } + /* 销售发票、采购发票、发外发票 ,去掉总金额+舍入为0的数据 */ + if (sModelsType === 'sales/salesInvoice' || sModelsType === 'purchase/purchaseInvoice' || sModelsType === 'purchase/outsideInvoice') { + let flagCheckSave = true; + if (commonUtils.isNotEmptyArr(slaveData) && slaveData.length > 0) { + for (const item of slaveData) { + const flatDel = commonUtils.isNull(item.dTotalMoney, 0) !== 0 || commonUtils.isNull(item.dRoundingMoney, 0) !== 0; + if (!flatDel) { + if (item.handleType === 'add') { + item.handleType = undefined; /* 付款单和收款单,去掉收款和付款金额为0的记录 */ + } else if (item.handleType === 'update') { + item.handleType = 'del'; + item.bRollBack = true; /* 删除失败后 该条数据回滚到修改状态 */ + if (commonUtils.isEmptyArr(slaveDelData)) { + slaveDelData = []; + } + slaveDelData.push(item); + } + } else { + flagCheckSave = false; + } + } + } + /* 收付款保存前,看到从表没数据,预收勾上时,自动调用一下分摊 */ + if (commonUtils.isEmptyArr(slaveData)) { + masterData = this.handleShare(); + } + if (commonUtils.isNotEmptyArr(slaveData) && slaveData.length > 0 && flagCheckSave) { + message.warning('表格内容不能为空![dTotalMoney或dRoundingMoney必须大于0]'); + this.props.onSaveState({ + loading: false, + }); + return; + } + } + const data = []; + data.push(commonBusiness.mergeData('master', masterConfig.sTbName, [masterData])); + if (sModelsType !== 'commonBill/onlyMaster' && sModelsType !== 'cashier/financialTransfer' && sModelsType !== 'cashier/financialAdjustment' && !sModelsType.includes('purchase/purchaseEnquiry')) { + data.push(commonBusiness.mergeData('slave', slaveConfig.sTbName, slaveData, slaveDelData)); + } + if (sModelsType.includes('sales/salesOrder') && !commonUtils.isEmpty(controlConfig)) { + if (commonUtils.isNotEmptyArr(materialsData)) { + const flag = true; + // for (const item of materialsData) { /* 销售订单中的物料规格不是必填项,只有工单里才要判断必填 */ + // if (commonUtils.isNotEmptyObject(item.sMaterialsType) && item.sMaterialsType === 'paper' && commonUtils.isEmptyObject(item.sMaterialsStyle)) { + // message.error(item.sMaterialsName + commonFunc.showMessage(app.commonConst, 'NoStyle'));/* 请填写规格 */ + // flag = false; + // break; + // } + // } + if (!flag) { + this.props.onSaveState({ + loading: false, + }); + return; + } + } + data.push(commonBusiness.mergeData('control', controlConfig.sTbName, controlData, controlDelData)); + data.push(commonBusiness.mergeData('materials', materialsConfig.sTbName, materialsData, materialsDelData)); + data.push(commonBusiness.mergeData('process', processConfig.sTbName, processData, processDelData)); + if (commonUtils.isNotEmptyObject(colorConfig)) { + data.push(commonBusiness.mergeData('color', colorConfig.sTbName, colorData, colorDelData)); + } + if (commonUtils.isNotEmptyObject(packConfig)) { + data.push(commonBusiness.mergeData('pack', packConfig.sTbName, packData, packDelData)); + } + } + if (!commonUtils.isEmpty(orderDetailConfig)) { + data.push(commonBusiness.mergeData('detail', orderDetailConfig.sTbName, orderDetailData, orderDetailDelData)); + } + this.handleSaveData({ data, sClientType: '1', sSysLogSrcId: masterData.sId }); + } + }); + }; + + /* 切换作废状态 */ + handleOkChangeInvaild = async (props) => { + const { + sModelsId, masterData, masterConfig, handleType, + } = props; + const value = { + sClientType: '1', + sId: [masterData.sId], + sTableName: masterConfig.sTbName, + handleType, + }; + const url = `${commonConfig.server_host}checkModel/updatebInvalid?sModelsId=${sModelsId}`; + const { data } = await commonServices.postValueService(props.app.token, value, url); + if (data.code === 1) { + message.success(data.msg); + masterData.bInvalid = handleType === 'toVoid'; /* 作废状态 */ + props.onSaveState({ masterData }); + /* 审核(消审)后刷新跳转路由数据(commonList)的数据 */ + if (props.app.currentPane.refresh !== undefined) { + props.app.currentPane.refresh(); + } + } else { + props.getServiceError(data); + } + }; + + /* 作废、取消作废的公用函数 */ + handleInvalid = (obj) => { + const props = { ...this.props, ...this.state, ...obj }; + const onOkInvaild = this.handleOkChangeInvaild; + confirm({ + title: obj.title, + onOk() { + onOkInvaild(props); + }, + onCancel() { + }, + }); + }; + + /* 单据页上查下查跳转页面 */ + handleSearchUpDown = async (sId, sActiveId) => { + /* 待用数据声明 */ + const { dispatch, sTabId } = this.props; + dispatch({ + type: 'content/onRouter', + payload: { + url: `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sActiveId}?sModelsId=${sActiveId}`, /* 接口地址 */ + sParentId: sTabId, /* 父页面编号 */ + checkedId: sId, + }, + }); + }; + + /* 上查下查三级菜单 在上一条下一条时必须清除searchUpDownData */ + handleSearchUpDownThird = async (upDownKey) => { + /* 待用数据声明 */ + const { masterConfig, searchUpDownData: searchUpDownDataOld } = this.props; + /** 获取sqlCondition参数:{sSqlCondition,sId} */ + const searchUpDownData = commonUtils.isEmptyObject(searchUpDownDataOld) ? {} : { ...searchUpDownDataOld }; + if (commonUtils.isNotEmptyObject(masterConfig)) { + const searchUpDownConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(`${upDownKey}`)); + for (const item of searchUpDownConfig) { + if (commonUtils.isEmptyArr(searchUpDownData[item.sControlName])) { + searchUpDownData[item.sControlName] = await this.getSearchUpDownData(item); + } + } + this.props.onSaveState({ searchUpDownData }); + } + }; + + /* 单据页复制到 */ + handleCopyTo = async (name, sActiveId) => { + /* 待用数据声明 */ + const { + masterConfig, + masterData, + slaveData, + controlData, + materialsData, + processData, + packData, + app, + token, + sModelsId, + formRoute, + } = this.props; + + // 从表有sCopyToCondition则不能复制,并提示 + if (commonUtils.isNotEmptyArr(slaveData) && name.includes('.')) { + const sCopyToConditionIndex = slaveData.findIndex(item => item.sCopyToCondition); + if (sCopyToConditionIndex !== -1) { + message.warning(slaveData[sCopyToConditionIndex].sCopyToCondition); + return; + } + } + + const copyTo = {}; + const copyToConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(name)); + copyTo.name = name; + copyTo.config = copyToConfig; + copyTo.masterData = masterData; + copyTo.slaveData = slaveData; + copyTo.controlData = controlData; + copyTo.materialsData = materialsData; + copyTo.processData = processData; + copyTo.packData = packData; + copyTo.srcFormRoute = formRoute; + const tbSuffix = ''; + let sId = ''; + if (!commonUtils.isEmpty(slaveData)) { + sId = slaveData[0].sId; + } + + const dataUrl = `${commonConfig.server_host}bill/billCopyToCheck/?sModelsId=${sModelsId}&sActiveId=${sActiveId}&tbSuffix=${tbSuffix}&sName=${formRoute}`; + const values = { sSlaveId: sId }; + const dataReturn = (await commonServices.postValueService(token, values, dataUrl)).data; + if (dataReturn.code === 1) { + // eslint-disable-next-line no-underscore-dangle + const _this = this; // 解决confirm中this指向问题; + if (dataReturn.dataset.rows.length > 0) { + confirm({ + title: commonFunc.showMessage(app.commonConst, 'beUsedToNew'), /* 单据已存在,是否填写新单据 */ + onOk() { + _this.handleDispatch(copyTo, sActiveId); + }, + onCancel() { + }, + }); + } else { + this.handleDispatch(copyTo, sActiveId); + } + } + }; + handleDispatch = (copyTo, sActiveId) => { + const { dispatch } = this.props; + dispatch({ + type: 'content/onRouter', + payload: { + url: `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sActiveId}?sModelsId=${sActiveId}`, /* 接口地址 */ + copyTo, + }, + }); + } + + /* 复制从产品工艺卡列表 */ + handleCopyFrom = async (obj) => { + /* 待用数据声明 */ + const { + slaveData, masterData, masterConfig, + } = this.props; + /* 根据sql条件进行判断 */ + const buttonConfig = masterConfig.gdsconfigformslave.filter(item => item.sName === '' && item.showName !== '' && item.sControlName === obj.copyFromKey); + if (commonUtils.isNotEmptyArr(buttonConfig) && commonUtils.isNotEmptyObject(buttonConfig[0].sSqlCondition) && buttonConfig[0].sSqlCondition.includes('slave.')) { + if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isEmptyStr(slaveData[0].sCustomerId) && commonUtils.isEmptyStr(masterData.sCustomerId)) { + message.error(commonFunc.showMessage(this.props.app.commonConst, 'pleaseInputCustomer'));/* 请填写客户 */ + return; + } + } + const { token } = this.props; + const url = `${commonConfig.server_host}/gdsmodule/getGdsmoduleById/${obj.copyFromSActiveId}?sModelsId=${obj.copyFromSActiveId}`; + const dataReturn = (await commonServices.getService(token, url)).data; + if (dataReturn.code === 1) { + const returnData = dataReturn.dataset.rows[0]; + if (obj.copyFromKey.includes('customizeFormInfo')) { /* 复制从自定义窗体 */ + this.props.onSaveState({ copyFromChooseVisible: true, copyFromChooseData: returnData, copyFromKey: obj.copyFromKey }); + } else { + this.props.onSaveState({ productProcessInfoChooseVisible: true, productProcessInfoChooseData: returnData, productProcessInfoCopyFromKey: obj.copyFromKey }); + } + } else { + this.props.getServiceError(dataReturn); + } + }; + + /* 上一条、下一条、首条、末条 */ + handleSearchData = async (handleType) => { + const { + sModelsId, app, currentIndexFlag, currentPageNo, + } = this.props; + const { currentPane, token } = app; + const { + pages, sFilterOrderBy, bFilter, sListFormmasterId, currentIndex, + } = currentPane; + let currentPosition = currentIndexFlag ? currentPageNo : commonUtils.isEmptyObject(pages) ? 1 : (((pages.current - 1) * commonConfig.pageSize) + Number.parseInt(currentIndex, 10)) + 1; + if (currentIndex === undefined) { + currentPosition = 1; + } + if (handleType === 'first') { + currentPosition = 1; + } else if (handleType === 'end') { + currentPosition = pages.total; + } + if (!commonUtils.isNum(currentPosition)) { // 如果是列表直接点增加,就跳到第一条去 + currentPosition = 1; + } + + const value = { + sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total, + }; + const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`; + /* 接收返回值 */ + const { data } = await commonServices.postValueService(token, value, url); + /* 接收返回值 */ + /* 成功的话刷新页面(同步主表和从表数据),不成功就弹出错误提示 */ + if (data.code === 1) { + /* 数据查询成功 */ + const returnData = data.dataset.rows[0]; + const { masterConfig, slaveConfig, checkConfig } = this.props; + this.props.onSaveState({ + currentIndexFlag: true, + currentPageNo: returnData.currentPosition, + currentId: returnData.sId, + searchUpDownData: {}, + slaveSelectedRowKeys: [], + }); + this.handleGetData(masterConfig, slaveConfig, checkConfig); + return true; + } else { /* 失败 */ + this.props.getServiceError(data); + return false; + } + }; + + /* 取消操作 */ + handleCancel = (obj) => { + /* 待用数据声明 */ + const that = this; + const { + currentId, masterConfig, slaveConfig, checkConfig, app, masterData, + } = this.props; + const { userinfo } = app; + const onSendSocketMessage = this.props.handleSendSocketMessage; + const onGetDataOk = this.handleGetData; + const onSaveStateOk = this.props.onSaveState; + const { copyTo } = app.currentPane; + confirm({ + title: obj.title, + onOk() { + // 解决新建页签sid为空的bug + if (!currentId) { + const { panes, currentPane } = that.props.app; + const currentPaneIndex = panes.findIndex(item => item.key === currentPane.key); + const newPanes = []; + if (currentPaneIndex > 0) { + panes.forEach((item, index) => { + if (index !== currentPaneIndex) { + newPanes.push(item); + } + }); + that.props.dispatch({ type: 'app/removePane', payload: { changePanes: newPanes, currentPane: panes[currentPaneIndex - 1] } });/* 关闭当前页签 */ + } + /* 复制到新增页签取消时 关闭页签 并清除操作记录 */ + if (commonUtils.isNotEmptyObject(copyTo)) { + const { slaveData, srcFormRoute, copyOtherData } = copyTo; + if (commonUtils.isNotEmptyObject(srcFormRoute) && srcFormRoute.includes('materialRequirementsPlanning')) { /* 物料需求计划用sWorkOrderMaterialId作为唯一键 */ + const sIdArray = []; + if (commonUtils.isNotEmptyArr(copyOtherData) && copyOtherData[0].name === 'detail' && commonUtils.isNotEmptyArr(copyOtherData[0].data)) { + const slaveDetailData = copyOtherData[0].data; + slaveDetailData.forEach((item) => { + const redisKey = item.sWorkOrderMaterialId; + sIdArray.push(redisKey); + }); + } else { /* 变更单、采购申请单 */ + slaveData.forEach((item) => { + const redisKey = item.sWorkOrderMaterialId; + sIdArray.push(redisKey); + }); + } + + const sId = sIdArray.toString(); + onSendSocketMessage('copyfinish', 'noAction', sId, userinfo.sId, null, null); + } else if (commonUtils.isNotEmptyArr(slaveData)) { + const sIdArray = []; + slaveData.forEach((item) => { + const redisKey = item.sSlaveId; + sIdArray.push(redisKey); + }); + /* 处理只有单主表解锁问题 */ + if (commonUtils.isNotEmptyObject(masterData) && commonUtils.isNotEmptyObject(masterData.sSrcSlaveId)) { + sIdArray.push(masterData.sSrcSlaveId); + } + const sId = sIdArray.toString(); + onSendSocketMessage('copyfinish', 'noAction', sId, userinfo.sId, null, null); + } else if (commonUtils.isNotEmptyObject(masterData) && commonUtils.isNotEmptyObject(masterData.sSrcSlaveId)) { + const sIdArray = []; + /* 处理只有单主表解锁问题 */ + sIdArray.push(masterData.sSrcSlaveId); + const sId = sIdArray.toString(); + onSendSocketMessage('copyfinish', 'noAction', sId, userinfo.sId, null, null); + } + } + + return; + } + // + onGetDataOk(masterConfig, slaveConfig, checkConfig); + onSaveStateOk({ enabled: false }); + if (commonUtils.isNotEmptyObject(copyTo)) { + const { slaveData } = copyTo; + const sIdArray = []; + slaveData.forEach((item) => { + const redisKey = item.sSlaveId; + sIdArray.push(redisKey); + }); + const sId = sIdArray.toString(); + onSendSocketMessage('copyfinish', 'noAction', sId, userinfo.sId, null, null); + } + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null); + }, + onCancel() { + }, + }); + }; + + /* 删除 */ + handleDel = (obj) => { + const props = { ...this.props, ...this.state }; + const onOkDel = this.handleOkDel; + confirm({ + title: obj.title, + onOk() { + onOkDel(props); + }, + onCancel() { + }, + }); + }; + + /* 确定要删除 */ + handleOkDel = async (props) => { + /* 数据参数 */ + const { + token, sModelsId, sModelsType, masterConfig, masterData, slaveConfig, checkConfig, orderDetailConfig, app, + } = props; + const { userinfo, systemData } = app; + const { sMakePerson } = masterData; /* 本单据制单人 */ + const { sUserName, sType } = userinfo;/* 登录用户 */ + const iIndex = systemData.findIndex(item => item.sName === 'CkxModifyBillNoMakePerson'); + if (iIndex > -1) { + const sValue = systemData[iIndex].sValue; + if (sValue === '0') { /* 系统未启用非制单人修改单据,普通用户非制单人不可以修改制单人的单据 */ + if (sType !== 'sysadmin' && sUserName !== sMakePerson) { + message.error(commonFunc.showMessage(app.commonConst, 'NoDelByNoMakePerson')); + return; + } + } + } + const value = { + sClientType: '1', + data: { + sMasterTable: masterConfig.sTbName, + sId: [masterData.sId], + }, + }; + const sSlaveTable = []; + if (commonUtils.isNotEmptyObject(slaveConfig)) { + sSlaveTable.push({ + tableName: slaveConfig.sTbName, + relationName: 'sParentId', + }); + } + if (commonUtils.isNotEmptyObject(checkConfig)) { + sSlaveTable.push({ + tableName: checkConfig.sTbName, + relationName: 'sParentId', + }); + } + if (sModelsType === 'purchase/purchaseOrder') { + sSlaveTable.push({ + tableName: orderDetailConfig.sTbName, + relationName: 'sParentId', + }); + } + value.sSlaveTable = sSlaveTable; + const url = `${commonConfig.server_host}business/delMasSlaBusinessData?sModelsId=${sModelsId}`; + /* 接收返回值 */ + const { data } = await commonServices.postValueService(token, value, url); + if (data.code === 1) { + /* 数据删除成功 */ + if (this.props.app.currentPane.refresh !== undefined) { + this.props.app.currentPane.refresh(); + } + if (sModelsType !== 'commonOeeBill') { + this.handleDelDataSuccess(props); + } else { + message.info('删除成功!'); + } + } else { /* 失败 */ + this.props.getServiceError(data); + } + }; + + /* 数据删除成功跳转到新路由即pane */ + handleDelDataSuccess = (props) => { + const { app } = props; + let { panes, currentPane } = app; + /* 删除单据后退出当前路由后,标签panes变化后的集合 */ + panes = panes.filter(pane => pane.key !== currentPane.key); + /* 跳转到panes集合的最后一个路由,因为panes集合一定含有主页路由所以panes的集合大于等于1 */ + currentPane = panes[panes.length - 1]; + this.props.onRemovePane(panes, currentPane); + }; + + /** 添加表格空行 */ + handleTableAdd = (name, isWait) => { + /* 从CommonBase获取默认参数 */ + const { + masterData, masterConfig, sModelsType, app, [`${name}Pagination`]: tablePagination, + } = this.props; + let { [`${name}Data`]: tableData } = this.props; + tableData = commonUtils.isEmptyObject(tableData) ? [] : tableData; + const tableDataRow = this.props.onDataRowAdd(name, true); + /* 添加行的业务处理拿出去 */ + if (sModelsType.includes('sales/')) { + if (commonUtils.isEmptyStr(masterData.sCustomerId)) { + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => ((item.sName === 'sCustomerId' || item.sName === 'sCustomerNo' || item.sName === 'sCustomerName') && item.bVisible)); + if (iIndex > -1) { + const { showName } = masterConfig.gdsconfigformslave[iIndex]; + message.warn(showName + commonFunc.showMessage(app.commonConst, 'isNotNull')); // 不能为空 + return; + } + } + } + tableDataRow.sWareHouseId = masterData.sWareHouseId; + tableDataRow.sWareHouseNo = masterData.sWareHouseNo; + tableDataRow.sWareHouseName = masterData.sWareHouseName; + tableDataRow.sLocationId = masterData.sLocationId; + tableDataRow.sLocationNo = masterData.sLocationNo; + tableDataRow.sLocationName = masterData.sLocationName; + tableDataRow.sWareHouseLocationId = masterData.sWareHouseLocationId; + tableDataRow.sWareHouseLocationNo = masterData.sWareHouseLocationNo; + tableDataRow.sWareHouseLocationName = masterData.sWareHouseLocationName; + if (isWait) { + return tableDataRow; + } else if (commonUtils.isNotEmptyObject(tableDataRow)) { + tableData.push(tableDataRow); + this.props.onSaveState({ [`${name}Data`]: tableData, [`${name}Pagination`]: { ...tablePagination, total: tableData.length, current: 9999 }, [`${name}SelectedRowKeys`]: [tableDataRow.sId] }); + } + }; + + /** 复制 */ + handleTableCopy = (name, isWait, isTree) => { + const { + [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, [`${name}Pagination`]: tablePagination, sModelsType, + } = this.props; + if (commonUtils.isEmptyArr(tableSelectedRowKeys)) { + message.warn(commonFunc.showMessage(this.props.app.commonConst, 'pleaseChooseCopyData'));/* 请选择复制数据 */ + } else { + if (sModelsType === 'sales/salesOrderPack' && isTree) { /* 树形 */ + const { + [`${name}SelectedRowKeys`]: treeSelectedKeys, + } = this.props; + const controlChildData = tableData.filter(item => item.sAllId.indexOf(treeSelectedKeys[0]) > -1 && item.sId !== treeSelectedKeys[0]); + if (commonUtils.isNotEmptyArr(tableData)) { + controlChildData.forEach((itemNew) => { + tableSelectedRowKeys.push(itemNew.sId); + }); + } + } + const treeCopyNodes = new Map(); + for (const sId of tableSelectedRowKeys) { + const tableDataIndex = tableData.findIndex(item => item.sId === sId); + if (tableDataIndex > -1) { + const tableDataRow = JSON.parse(JSON.stringify(tableData[tableDataIndex])); + tableDataRow.sId = commonUtils.createSid(); + tableDataRow.handleType = 'add'; + tableDataRow.key = tableDataRow.sId; + tableDataRow.sSrcSlaveId = ''; + tableDataRow.sSrcId = ''; + tableDataRow.dSrcQty = null; + tableDataRow.rowTag = null; + tableDataRow.sOrderdetailUsed = ''; + tableDataRow.sProductionUsed = ''; + tableDataRow.sWorkOrderUsed = ''; + tableDataRow.dWorkOrderQty = 0; + const iOrderArr = []; + tableData.forEach((item) => { + const iOrder = commonUtils.isNotEmptyNumber(item.iOrder) ? item.iOrder : 0; /* 获取tableData中iOrder最大值 */ + iOrderArr.push(iOrder); + }); + const iOrderMax = Math.max(...iOrderArr); + tableDataRow.iOrder = commonUtils.isNotEmptyArr(tableData) ? iOrderMax + 1 : 0; + + if (commonUtils.isNotEmptyObject(tableDataRow.sMaterialsMemo)) { + tableDataRow.sMaterialsMemo = ''; + } + if (commonUtils.isNotEmptyObject(tableDataRow.sProcessMemo)) { + tableDataRow.sProcessMemo = ''; + } + if (name === 'materials') { + tableDataRow.bPurchaseApplyComplete = 0; + tableDataRow.dPurchaseApplyAuxiliaryQty = 0; + tableDataRow.dPurchaseApplyQty = 0; + tableDataRow.bPurchaseComplete = 0; + tableDataRow.dPurchaseAuxiliaryQty = 0; + tableDataRow.dPurchaseQty = 0; + tableDataRow.dProductionAuxiliaryQty = 0; + tableDataRow.dProductionQty = 0; + tableDataRow.bProductionComplete = 0; + + tableDataRow.dProductionApplyAuxiliaryQty = 0; + tableDataRow.dProductionApplyQty = 0; + tableDataRow.bProductionApplyComplete = 0; + + tableDataRow.bComComplete = 0; + tableDataRow.dComAuxiliaryQty = 0; + tableDataRow.dComQty = 0; + } + if (sModelsType === 'sales/salesOrderPack' && isTree) { /* 树形 */ + const sAllOldId = tableData[tableDataIndex].sAllId; + const arr = sAllOldId.split(','); + const newId = commonUtils.createSid(); + tableDataRow.sId = newId; + let sOldParentId = ''; + let sNewParentAllId = ''; + if (arr.length < 2) { /* 根节点复制 */ + tableDataRow.sAllId = newId; + sOldParentId = newId; + sNewParentAllId = newId; + } else { + sOldParentId = arr[arr.length - 2]; + if (treeCopyNodes.has(sOldParentId)) { + sNewParentAllId = treeCopyNodes.get(sOldParentId); + } else { + const obj = arr[arr.length - 1]; + sNewParentAllId = sAllOldId.replace((`,${obj}`), ''); + } + const sNewArr = sNewParentAllId.split(','); + tableDataRow.sControlParentId = sNewArr[sNewArr.length - 1]; + sNewParentAllId = `${sNewParentAllId},${newId}`; + tableDataRow.sAllId = sNewParentAllId; + } + treeCopyNodes.set(sId, sNewParentAllId); + } + if (isWait) { + return tableDataRow; + } else if (commonUtils.isNotEmptyObject(tableDataRow)) { + tableData.push(tableDataRow); + let treeState = []; + if (sModelsType === 'sales/salesOrderPack') { + treeState = this.handleGetControlTreeData(tableData, true); + } + this.props.onSaveState({ [`${name}Data`]: tableData, [`${name}Pagination`]: { ...tablePagination, total: tableData.length, current: 9999 }, ...treeState }); + } + } + } + } + }; + + + /** 复制全部 */ + handleTableCopyAll = (name, isWait, isTree) => { + const { + slaveData, controlData, slaveSelectedRowKeys, materialsData, [`${name}Pagination`]: tablePagination, sModelsType, + } = this.props; + let { processData } = this.props; + if (name === 'slave') { + if (commonUtils.isEmptyArr(slaveSelectedRowKeys)) { + message.warn(commonFunc.showMessage(this.props.app.commonConst, 'pleaseChooseCopyData'));/* 请选择复制数据 */ + } else { + for (const sId of slaveSelectedRowKeys) { + const slaveDataIndex = slaveData.findIndex(item => item.sId === sId); + if (slaveDataIndex > -1) { + const slaveDataRow = JSON.parse(JSON.stringify(slaveData[slaveDataIndex])); + slaveDataRow.sId = commonUtils.createSid(); + slaveDataRow.handleType = 'add'; + slaveDataRow.key = slaveDataRow.sId; + const iOrderArr = []; + slaveData.forEach((item) => { + const iOrder = commonUtils.isNotEmptyNumber(item.iOrder) ? item.iOrder : 0; /* 获取tableData中iOrder最大值 */ + iOrderArr.push(iOrder); + }); + const iOrderMax = Math.max(...iOrderArr); + slaveDataRow.iOrder = commonUtils.isNotEmptyArr(slaveData) ? iOrderMax + 1 : 0; + slaveData.push(slaveDataRow); + if (sModelsType !== 'sales/salesOrderPack') { + if (commonUtils.isNotEmptyArr(controlData)) { + controlData.filter(itemControl => itemControl.sSlaveId === sId).forEach((itemControl) => { + const tableDataRow = JSON.parse(JSON.stringify(itemControl)); + tableDataRow.sId = commonUtils.createSid(); + tableDataRow.handleType = 'add'; + tableDataRow.key = tableDataRow.sId; + tableDataRow.sSlaveId = slaveDataRow.sId; + controlData.push(tableDataRow); + /* 部件表复制其材料表、工序表 */ + materialsData.filter(item => item.sControlId === itemControl.sId && item.sType !== '2').forEach((item) => { + const materialsRow = JSON.parse(JSON.stringify(item)); + materialsRow.sId = commonUtils.createSid(); + materialsRow.handleType = 'add'; + materialsRow.sControlId = tableDataRow.sId; + materialsRow.sPartsName = tableDataRow.sPartsName; + materialsRow.sSlaveId = tableDataRow.sSlaveId; + materialsData.push(materialsRow); + }); + processData.filter(item => item.sControlId === itemControl.sId && item.sType !== '3').forEach((item) => { + const processRow = JSON.parse(JSON.stringify(item)); + processRow.sId = commonUtils.createSid(); + processRow.handleType = 'add'; + processRow.sControlId = tableDataRow.sId; + processRow.sPartsName = tableDataRow.sPartsName; + processRow.sSlaveId = tableDataRow.sSlaveId; + processData.push(processRow); + }); + processData = this.sortData(controlData, processData); + }); + } + if (commonUtils.isNotEmptyArr(materialsData)) { /* 订单从表复制全部 复制成品材料 */ + materialsData.filter(item => item.sSlaveId === sId && item.sType === '2').forEach((materialsItem) => { + const materialsRow = JSON.parse(JSON.stringify(materialsItem)); + materialsRow.handleType = 'add'; + materialsRow.sId = commonUtils.createSid(); + materialsRow.sSlaveId = slaveDataRow.sId; + materialsData.push(materialsRow); + }); + } + + if (commonUtils.isNotEmptyArr(processData)) { /* 订单从表复制全部 复制成品工序 */ + processData.filter(item => item.sSlaveId === sId && item.sType === '3').forEach((processItem) => { + const processRow = JSON.parse(JSON.stringify(processItem)); + processRow.handleType = 'add'; + processRow.sId = commonUtils.createSid(); + processRow.sSlaveId = slaveDataRow.sId; + processData.push(processRow); + }); + } + } + } + this.props.onSaveState({ + slaveData, + [`${name}Pagination`]: { ...tablePagination, total: slaveData.length, current: 9999 }, + controlData, + materialsData, + processData, + }); + } + } + } else if (name === 'control') { + const { + [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, + } = this.props; + if (commonUtils.isEmptyArr(tableSelectedRowKeys)) { + message.warn(commonFunc.showMessage(this.props.app.commonConst, 'pleaseChooseCopyData'));/* 请选择复制数据 */ + } else { + /* 获取复制节点下的所有子节点 */ + if (sModelsType === 'sales/salesOrderPack' && isTree) { /* 树形 */ + const { + [`${name}SelectedRowKeys`]: treeSelectedKeys, + } = this.props; + const controlChildData = tableData.filter(item => item.sAllId.indexOf(treeSelectedKeys[0]) > -1 && item.sId !== treeSelectedKeys[0]); + if (commonUtils.isNotEmptyArr(tableData)) { + controlChildData.forEach((itemNew) => { + tableSelectedRowKeys.push(itemNew.sId); + }); + } + } + const treeCopyNodes = new Map(); + for (const sId of tableSelectedRowKeys) { + const tableDataIndex = tableData.findIndex(item => item.sId === sId); + if (tableDataIndex > -1) { + const tableDataRow = JSON.parse(JSON.stringify(tableData[tableDataIndex])); + tableDataRow.sId = commonUtils.createSid(); + tableDataRow.handleType = 'add'; + tableDataRow.key = tableDataRow.sId; + const iOrderArr = []; + tableData.forEach((item) => { + const iOrder = commonUtils.isNotEmptyNumber(item.iOrder) ? item.iOrder : 0; /* 获取tableData中iOrder最大值 */ + iOrderArr.push(iOrder); + }); + const iOrderMax = Math.max(...iOrderArr); + tableDataRow.iOrder = commonUtils.isNotEmptyArr(tableData) ? iOrderMax + 1 : 0; + if (sModelsType === 'sales/salesOrderPack' && isTree) { /* 树形 */ + const sAllOldId = tableData[tableDataIndex].sAllId; + const arr = sAllOldId.split(','); + const newId = commonUtils.createSid(); + tableDataRow.sId = newId; + let sOldParentId = ''; + let sNewParentAllId = ''; + if (arr.length < 2) { /* 根节点复制 */ + tableDataRow.sAllId = newId; + sOldParentId = newId; + sNewParentAllId = newId; + } else { + sOldParentId = arr[arr.length - 2]; + if (treeCopyNodes.has(sOldParentId)) { + sNewParentAllId = treeCopyNodes.get(sOldParentId); + } else { + const obj = arr[arr.length - 1]; + sNewParentAllId = sAllOldId.replace((`,${obj}`), ''); + } + const sNewArr = sNewParentAllId.split(','); + tableDataRow.sControlParentId = sNewArr[sNewArr.length - 1]; + sNewParentAllId = `${sNewParentAllId},${newId}`; + tableDataRow.sAllId = sNewParentAllId; + } + treeCopyNodes.set(sId, sNewParentAllId); + } + if (isWait) { + return tableDataRow; + } else if (commonUtils.isNotEmptyObject(tableDataRow)) { + tableData.push(tableDataRow); + let treeState = []; + if (sModelsType === 'sales/salesOrderPack') { + treeState = this.handleGetControlTreeData(tableData, true); + } + /* 部件表复制其材料表、工序表 */ + materialsData.filter(item => item.sControlId === sId && item.sType !== '2').forEach((item) => { + const materialsRow = JSON.parse(JSON.stringify(item)); + materialsRow.sId = commonUtils.createSid(); + materialsRow.handleType = 'add'; + materialsRow.sControlId = tableDataRow.sId; + materialsRow.sPartsName = tableDataRow.sPartsName; + materialsData.push(materialsRow); + }); + processData.filter(item => item.sControlId === sId && item.sType !== '3').forEach((item) => { + const processRow = JSON.parse(JSON.stringify(item)); + processRow.sId = commonUtils.createSid(); + processRow.handleType = 'add'; + processRow.sControlId = tableDataRow.sId; + processRow.sPartsName = tableDataRow.sPartsName; + processData.push(processRow); + }); + processData = this.sortData(tableData, processData); + this.props.onSaveState({ + [`${name}Data`]: tableData, + [`${name}Pagination`]: { ...tablePagination, total: tableData.length, current: 9999 }, + materialsData, + processData, + ...treeState, + }); + } + } + } + } + } + }; + + singlePQtyChange = (tableDataRow) => { + const bZfZf = tableDataRow.iPrintMode === 2; // 正反版 + const bSample = tableDataRow.dSumPQty >= 4; // 样本 + tableDataRow.iPrintModePo = tableDataRow.iPrintMode <= 2 ? 2 : tableDataRow.iPrintMode === 3 ? 0 : -1; + + if (bSample) { + if (tableDataRow.dSinglePQty > 0) { + tableDataRow.dPlateQty = Math.ceil(tableDataRow.dSumPQty / tableDataRow.dSinglePQty); + } + + if (bZfZf && (tableDataRow.iPrintModePo === 2)) { // 双面样本,正反 + if (tableDataRow.dPlateQty < 2) { // 不管建议放正自翻版了,点方式什么是什么 + tableDataRow.dPlateQty = 2; + tableDataRow.iStick = Math.ceil(commonUtils.isNull(tableDataRow.dPlateQty, 0) / 2); + tableDataRow.dSumPlateQty = tableDataRow.iStick * ( + commonUtils.isNull(tableDataRow.iPositiveColor, 0) + + commonUtils.isNull(tableDataRow.iPositiveSpecialColor, 0) + + commonUtils.isNull(tableDataRow.iOppositeColor, 0) + + commonUtils.isNull(tableDataRow.iOppositeSpecialColor, 0)); + } else { + if (tableDataRow.iPrintModePo !== 2) { // 单面样本 + tableDataRow.dPlateQty = (commonUtils.isNull(tableDataRow.dSumPQty, 0) * 0.5) / tableDataRow.dSinglePQty; + tableDataRow.iStick = Math.ceil(tableDataRow.dPlateQty); + tableDataRow.dSumPlateQty = tableDataRow.iStick * (commonUtils.isNull(tableDataRow.iPositiveColor, 0) + + commonUtils.isNull(tableDataRow.iPositiveSpecialColor, 0)); + } else { + tableDataRow.dPlateQty = commonUtils.isNull(tableDataRow.dSumPQty, 0) / commonUtils.isNull(commonUtils.nullIf(tableDataRow.dSinglePQty, 0), 1); + tableDataRow.iStick = Math.ceil(tableDataRow.dPlateQty / 2); + } + tableDataRow.dSumPlateQty = tableDataRow.iStick * ( + commonUtils.isNull(tableDataRow.iPositiveColor, 0) + + commonUtils.isNull(tableDataRow.iPositiveSpecialColor, 0) + + commonUtils.isNull(tableDataRow.iOppositeColor, 0) + + commonUtils.isNull(tableDataRow.iOppositeSpecialColor, 0)); + } + } else { + if (tableDataRow.iPrintModePo !== 2) { // 单面样本 + tableDataRow.dPlateQty = (commonUtils.isNull(tableDataRow.dSumPQty, 0) * 0.5) / tableDataRow.dSinglePQty; + } else { + tableDataRow.dPlateQty = commonUtils.isNull(tableDataRow.dSumPQty, 0) / commonUtils.isNull(commonUtils.nullIf(tableDataRow.dSinglePQty, 0), 1); + } + tableDataRow.iStick = Math.ceil(tableDataRow.dPlateQty); + tableDataRow.dSumPlateQty = tableDataRow.iStick * ( + commonUtils.isNull(tableDataRow.iPositiveColor, 0) + + commonUtils.isNull(tableDataRow.iPositiveSpecialColor, 0)); + } + if (tableDataRow.iStick > 0 && tableDataRow.dSinglePQty > 0) { + tableDataRow.dMachineQty = commonUtils.convertFixNum((commonUtils.isNull(tableDataRow.dPartsQty, 0) * commonUtils.isNull(tableDataRow.dSumPQty, 0) * 0.5) / tableDataRow.dSinglePQty / tableDataRow.iStick, 0); + tableDataRow.dSumMachineQty = tableDataRow.dMachineQty * tableDataRow.iStick; + } + } else { + tableDataRow.iStick = 1; + tableDataRow.dSumPlateQty = tableDataRow.iStick * ( + commonUtils.isNull(tableDataRow.iPositiveColor, 0) + + commonUtils.isNull(tableDataRow.iPositiveSpecialColor, 0) + + commonUtils.isNull(tableDataRow.iOppositeColor, 0) + + commonUtils.isNull(tableDataRow.iOppositeSpecialColor, 0)); + if (bZfZf && tableDataRow.iPrintModePo === 2) { + tableDataRow.dPlateQty = 2; + tableDataRow.dSumPlateQty = tableDataRow.iStick * (commonUtils.isNull(tableDataRow.iPositiveColor, 0) + + commonUtils.isNull(tableDataRow.iPositiveSpecialColor, 0) + commonUtils.isNull(tableDataRow.iOppositeColor, 0) + + commonUtils.isNull(tableDataRow.iOppositeSpecialColor, 0)); + } else { + tableDataRow.dPlateQty = 1; + tableDataRow.dSumPlateQty = tableDataRow.iStick * (commonUtils.isNull(tableDataRow.iPositiveColor, 0) + + commonUtils.isNull(tableDataRow.iPositiveSpecialColor, 0)); + } + + if (tableDataRow.dSinglePQty > 0) { + if (tableDataRow.iPage > 1) { // 笔记本 用 非样本 来做, 倍率是每页都一样才可以用 原先 /2 是指页数, 现在直接按张数 + tableDataRow.dMachineQty = commonUtils.convertFixNum((tableDataRow.dPartsQty * tableDataRow.iPage) / tableDataRow.dSinglePQty, 0); + } else { + tableDataRow.dMachineQty = commonUtils.convertFixNum(commonUtils.isNull(tableDataRow.dPartsQty, 0) / tableDataRow.dSinglePQty, 0); + tableDataRow.dSumMachineQty = tableDataRow.dMachineQty * tableDataRow.iStick; + } + } + } + return tableDataRow; + }; + + /** 表格数据更改 */ + // name 不写完整的state名称作用为了要用到total // (name, changeValue, sId, dropDownData) + handleTableChange = async (name, sFieldName, changeValue, sId, dropDownData, isWait) => { + /* 从CommonBase获取默认参数 */ + const { + [`${name}Data`]: tableData, sModelsType, sModelsId, token, app, slaveConfig, + } = this.props; + if (name === 'control' && sModelsType.includes('sales/salesOrder')) { + const { [`${name}Data`]: tableData, materialsData: materialsDataOld, processData: processDataOld } = this.props; + let tableDataRow = await this.props.onDataChange(name, sFieldName, changeValue, sId, dropDownData, true); + if (tableDataRow === undefined) return; + if (sFieldName === 'dSinglePQty' || sFieldName === 'dSumPQty' || sFieldName === 'iPrintModePo' || sFieldName === 'iPrintMode' || sFieldName === 'iPrintModePo' || sFieldName === 'iPositiveColor' || + sFieldName === 'iPositiveSpecialColor' || sFieldName === 'iOppositeColor' || sFieldName === 'iOppositeSpecialColor') { + if (sFieldName === 'iPrintModePo') { + if (tableDataRow.iPrintModePo === 0) { + tableDataRow.iPrintMode = 3; + if (tableDataRow.iPositiveColor === 0) { + tableDataRow.iPositiveColor = tableDataRow.iPositiveColor === 0 ? 4 : tableDataRow.iPositiveColor; + tableDataRow.iOppositeColor = 0; + tableDataRow.iOppositeSpecialColor = 0; + } else { + tableDataRow.iOppositeColor = 0; + tableDataRow.iOppositeSpecialColor = 0; + } + } else if (tableDataRow.iPrintModePo === 1) { + tableDataRow.iPrintMode = 3; + if (tableDataRow.iPositiveColor === 0) { + tableDataRow.iPositiveColor = 0; + tableDataRow.iPositiveSpecialColor = 0; + tableDataRow.iOppositeColor = tableDataRow.iOppositeColor === 0 ? 4 : tableDataRow.iOppositeColor; + } else { + tableDataRow.iPositiveColor = 0; + tableDataRow.iPositiveSpecialColor = 0; + } + } else { + tableDataRow.iPositiveColor = tableDataRow.iPositiveColor === 0 ? 4 : tableDataRow.iPositiveColor; + tableDataRow.iOppositeColor = tableDataRow.iOppositeColor === 0 ? tableDataRow.iPositiveColor : tableDataRow.iOppositeColor; + } + } else if (sFieldName === 'iPrintMode') { + if (tableDataRow.iPrintMode === 0 || tableDataRow.iPrintMode === 1) { + tableDataRow.iPositiveColor = commonUtils.isEmpty(tableDataRow.iPositiveColor) || tableDataRow.iPositiveColor === 0 ? 4 : tableDataRow.iPositiveColor; + tableDataRow.iOppositeColor = tableDataRow.iPositiveColor; + tableDataRow.iOppositeSpecialColor = tableDataRow.iPositiveSpecialColor; + } else if (tableDataRow.iPrintMode === 2) { + tableDataRow.iPositiveColor = tableDataRow.iPositiveColor === 0 ? 4 : tableDataRow.iPositiveColor; + tableDataRow.iOppositeColor = tableDataRow.iOppositeColor === 0 ? tableDataRow.iPositiveColor : tableDataRow.iOppositeColor; + } else if (tableDataRow.iPrintMode === 3) { + tableDataRow.iPositiveColor = tableDataRow.iPositiveColor === 0 ? 4 : tableDataRow.iPositiveColor; + tableDataRow.iOppositeColor = 0; + tableDataRow.iOppositeSpecialColor = 0; + } else if (tableDataRow.iPrintMode === 4) { + tableDataRow.iPositiveColor = 0; + tableDataRow.iPositiveSpecialColor = 0; + tableDataRow.iOppositeColor = 0; + tableDataRow.iOppositeSpecialColor = 0; + } + } else if (sFieldName === 'iPositiveColor' || sFieldName === 'iPositiveSpecialColor') { + if (tableDataRow.iPrintMode === 0 || tableDataRow.iPrintMode === 1) { + tableDataRow.iOppositeColor = tableDataRow.iPositiveColor; + tableDataRow.iOppositeSpecialColor = tableDataRow.iPositiveSpecialColor; + } + } + tableDataRow = this.singlePQtyChange(tableDataRow); + } + const materialsData = []; + const processData = []; + materialsDataOld.forEach((item) => { + const itemNew = { ...item }; + if (itemNew.sControlId === sId) { + itemNew.sPartsName = tableDataRow.sPartsName; + } + materialsData.push(itemNew); + }); + processDataOld.forEach((item) => { + const itemNew = { ...item }; + if (itemNew.sControlId === sId) { + itemNew.sPartsName = tableDataRow.sPartsName; + } + processData.push(itemNew); + }); + const materialsDataNew = this.sortData(tableData, materialsData); + const processDataNew = this.sortData(tableData, processData); + if (sModelsType === 'sales/salesOrderPack') { + if (sFieldName === 'sPartsName') { /* 部件名称与子部件同步 */ + const { sPartsName } = tableDataRow; + const { treeSelectedKeys, treeData } = this.props; + if (commonUtils.isNotEmptyArr(treeSelectedKeys)) { + this.handleSearchNodes(treeSelectedKeys[0], treeData, sPartsName); + } + } else if (sFieldName === 'dMachineQty') { /* 上机数量改变时,子级部件数量同步改变 */ + const { dMachineQty } = tableDataRow; + /* 查找该节的所有子节点,将上机数量改为部件数量 */ + tableData.forEach((item, index) => { + if (commonUtils.isNotEmptyObject(item.sAllId) && item.sAllId.indexOf(tableDataRow.sId) > -1 && item.sId !== tableDataRow.sId) { + const addstate = {}; + addstate.dPartsQty = dMachineQty; + tableData[index] = { ...tableData[index], ...addstate }; + } + }); + } + } + const iIndex = tableData.findIndex(item => item.sId === sId); + tableData[iIndex] = tableDataRow; + this.props.onSaveState({ + [`${name}Data`]: tableData, materialsData: materialsDataNew, processData: processDataNew, + }); + } else { + let { masterData } = this.props; + const iIndex = tableData.findIndex(item => item.sId === sId); + // if (sFieldName.substring(0, 1) === 'd' && commonUtils.convertToNum(tableData[iIndex][sFieldName]) === commonUtils.convertToNum(changeValue[sFieldName])) { + // if (!(tableData[iIndex][sFieldName] === undefined && commonUtils.convertToNum(changeValue[sFieldName]) === 0)) return; + // } + if (sFieldName === 'sProductName' && name === 'slave' && (sModelsType.includes('sales/salesOrder') || sModelsType.includes('manufacture/workOrder') || sModelsType.includes('quotation/quotation'))) { + if (commonUtils.isNotEmptyObject(changeValue) && Object.keys(changeValue).length === 1 && Object.keys(changeValue)[0] === sFieldName) { + changeValue.sProductId = changeValue.sProductName; + } + } + let tableDataRow = this.props.onDataChange(name, sFieldName, changeValue, sId, dropDownData, true); + /* 添加备货数自动计算 */ + if ((sFieldName === 'dProductQty' || sFieldName === 'dGiveQty') && name === 'slave' && (sModelsType.includes('sales/salesOrderPack') || sModelsType.includes('sales/salesOrder'))) { + if (commonUtils.isNotEmptyObject(changeValue) && Object.keys(changeValue).length === 1 && Object.keys(changeValue)[0] === sFieldName) { + const dProductQty = commonUtils.isEmptyNumber(tableDataRow.dProductQty) ? 0 : tableDataRow.dProductQty; + const dGiveQty = commonUtils.isEmptyNumber(tableDataRow.dGiveQty) ? 0 : tableDataRow.dGiveQty; + const dStockupRate = commonUtils.isEmptyNumber(masterData.dStockupRate) ? 0 : masterData.dStockupRate; + if (dStockupRate !== 0) { /* 备货率不为0时,按照备货率计算,否则按照手填的算 */ + tableDataRow.dStockupQty = Math.round((dProductQty + dGiveQty) * dStockupRate); + } + } + } + if ((sFieldName === 'sProductId' || sFieldName === 'sProductName' || sFieldName === 'sProductStyle' || sFieldName === 'sProductUnit' || sFieldName === 'sProductNo' + || sFieldName === 'sCustomerProductNo' || sFieldName === 'sProductClassifyId' || sFieldName === 'sProductClassifyName') && !commonUtils.isEmpty(tableDataRow.sProductId)) { + let productIdDropDown = []; + if (sFieldName === 'sProductStyle') { + const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === 'sProductName'); + if (iIndex > -1) { + if (this.inputSearch) { + clearTimeout(this.inputSearch); + } + this.inputSearch = setTimeout(async () => { + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, 'slave', slaveConfig.gdsconfigformslave[iIndex], tableDataRow, tableDataRow.sProductName, 1); + productIdDropDown = sqlDropDownData.dropDownData; + }, 500); + } + } else { + productIdDropDown = dropDownData; + } + const iProductIdIndex = commonUtils.isEmptyArr(productIdDropDown) ? -1 : productIdDropDown.findIndex(item => (item.sId === tableDataRow.sProductId || item.sNId === tableDataRow.sProductId) && item.sProductStyle === tableDataRow.sProductStyle); + if (iProductIdIndex === -1) { + tableDataRow.sProductInfo = JSON.stringify({ + sProductId: tableDataRow.sProductName, + sProductName: tableDataRow.sProductName, + sProductStyle: tableDataRow.sProductStyle, + sProductUnit: tableDataRow.sProductUnit, + sProductNo: tableDataRow.sProductNo, + sCustomerProductNo: tableDataRow.sCustomerProductNo, + sProductClassifyId: tableDataRow.sProductClassifyId, + sProductClassifyName: tableDataRow.sProductClassifyName, + }); + } else { + tableDataRow.sProductInfo = ''; + } + tableDataRow.sMaterialsStyle = tableDataRow.sProductStyle; + if ((sFieldName === 'sProductId' || sFieldName === 'sProductName' || sFieldName === 'sProductNo') && !commonUtils.isEmpty(changeValue.sProductId) && tableDataRow.sProductId !== tableDataRow.sProductName) { + const url = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const { sCustomerId } = masterData; /* 增加客户id参数 */ + const value = { + sProName: 'Sp_Cashier_GetProductPrice', + paramsMap: { + sProductGuid: changeValue.sProductId, + sCustomerId, + }, + }; + const returnData = (await commonServices.postValueService(app.token, value, url)).data; + if (returnData.code === 1) { + tableDataRow.dNProductPrice = returnData.dataset.rows[0].dataSet.outData[0].dPrice; /* 产品单价 */ + const dProofingMoney = commonUtils.convertToNum(tableDataRow.dProofingMoney); /* 打样金额 */ + const dPlateMoney = commonUtils.convertToNum(tableDataRow.dPlateMoney); /* 制版金额 */ + const dKnifeMouldMoney = commonUtils.convertToNum(tableDataRow.dKnifeMouldMoney); /* 刀模金额 */ + const dProductQty = commonUtils.convertToNum(tableDataRow.dProductQty); /* 数量 */ + const dCurrencyRate = commonUtils.convertIsNotNumToNumber1(masterData.dCurrencyRate); /* 汇率 */ + const { dNetPrice } = app.decimals; + if (dProductQty === 0 || (dProofingMoney === 0 && dPlateMoney === 0 && dKnifeMouldMoney === 0)) { + const dProductForeignPrice = returnData.dataset.rows[0].dataSet.outData[0].dPrice; + tableDataRow.dProductForeignPrice = dProductForeignPrice; + tableDataRow.dProductPrice = commonUtils.convertFixNum(dProductForeignPrice * dCurrencyRate, dNetPrice); + } + } + + const models = name === 'materials' ? 'Materials' : + sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('quotation/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + if (sModelsType.includes('purchase/') || sModelsType.includes('quotation/') || sModelsType.includes('manufacture/') || sModelsType.includes('materialsStock/') || sModelsType.includes('outside/')) { + tableDataRow = await this.handleMaterialsChange(tableDataRow, sModelsId, masterData, changeValue, 'dProductQty', app, token, models); + } + tableDataRow = commonBusiness.getCalculateAllMoney(app, models, 'dProductQty', masterData, tableDataRow); + // else { + // this.props.getServiceError(returnData); + // } + } + } else if (sModelsType.includes('sales/salesOrder') && (sFieldName === 'sProductClassifyId' || sFieldName === 'sProductClassifyName') && name === 'slave') { + const { controlData } = this.props; + if (controlData !== undefined && !commonUtils.isEmpty(tableData.sProductInfo)) { + const controlDataFilter = controlData.filter(item => item.sSlaveId === tableData[iIndex].sId); + const tableSelectedRowKeys = []; + controlDataFilter.forEach((item) => { + tableSelectedRowKeys.push(item.sId); + }); + const materialsReturnData = this.otherTableDel('materials', tableSelectedRowKeys); + const processReturnData = this.otherTableDel('process', tableSelectedRowKeys); + const controlReturnData = this.props.onDataRowDel('control', true, tableSelectedRowKeys); + this.props.onSaveState({ + ...materialsReturnData, + ...processReturnData, + ...controlReturnData, + }); + } + } else if ((sModelsType.includes('cashier/') || sModelsType.includes('sales/salesInvoice') || sModelsType.includes('purchase/purchaseInvoice') || sModelsType.includes('purchase/outsideInvoice')) && (sFieldName === 'dTotalMoney' || sFieldName === 'dRoundingMoney')) { /* 付款单、收款单,从表付款/收款金额改变,会自动汇总到主表付款金额中 */ + const addStata = {}; + let { handleType } = masterData; + handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + addStata.handleType = handleType; + const dCurrencyRate = commonUtils.convertIsNotNumToNumber1(masterData.dCurrencyRate); /* 汇率 */ + const { dNetMoney } = app.decimals; + if (sFieldName === 'dTotalMoney') { + addStata.dTotalMoney = 0; + if (iIndex > -1) { /* 选中行 */ + let dMoney = commonUtils.isNotEmptyNumber(tableDataRow.dTotalMoney) ? tableDataRow.dTotalMoney : 0; + dMoney = commonUtils.convertStrToNumber(dMoney); + addStata.dTotalMoney = dMoney + commonUtils.convertStrToNumber(addStata.dTotalMoney); + tableDataRow.dTotalForeignMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dMoney / dCurrencyRate : 0, dNetMoney); + } + // if (commonUtils.isNotEmptyNumber(tableDataRow.dBalanceMoney) && (tableDataRow.dTotalMoney > tableDataRow.dBalanceMoney)) { // 发外发票,采购发票,销售发票 付款单、收款单总金额不能大于余额 + // const dTotalMoneyName = slaveConfig.gdsconfigformslave.filter(item => item.sName === sFieldName)[0].showName; + // const dBalanceMoneyName = slaveConfig.gdsconfigformslave.filter(item => item.sName === 'dBalanceMoney')[0].showName; + // message.error(`${dTotalMoneyName}不能大于${dBalanceMoneyName}!`); + // tableDataRow = { ...tableDataRow, dTotalMoney: tableDataRow.dBalanceMoney }; + // // tableDataRow.dTotalMoney = commonUtils.convertStrToNumber(masterData.dTotalMoney); + // addStata.dTotalMoney = commonUtils.convertStrToNumber(masterData.dTotalMoney); + // } + tableData.forEach((item, index) => { /* 非选中行 */ + if (index !== iIndex) { + const dMoney = commonUtils.isNotEmptyNumber(item.dTotalMoney) ? item.dTotalMoney : 0; + addStata.dTotalMoney = commonUtils.convertFixNum(dMoney, 6) + commonUtils.convertFixNum(addStata.dTotalMoney, 6); + } + }); + /* 计算外币金额 */ + if (commonUtils.isNotEmptyNumber(addStata.dTotalMoney)) { + addStata.dProductForeignMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? addStata.dTotalMoney / dCurrencyRate : 0, dNetMoney); + } + } else if (sFieldName === 'dRoundingMoney') { + addStata.dRoundingMoney = 0; + if (iIndex > -1) { /* 选中行 */ + let dMoney = commonUtils.isNotEmptyNumber(tableDataRow.dRoundingMoney) ? tableDataRow.dRoundingMoney : 0; + dMoney = commonUtils.convertStrToNumber(dMoney); + addStata.dRoundingMoney = dMoney + commonUtils.convertStrToNumber(addStata.dRoundingMoney); + } + tableData.forEach((item, index) => { /* 非选中行 */ + if (index !== iIndex) { + const dMoney = commonUtils.isNotEmptyNumber(item.dRoundingMoney) ? item.dRoundingMoney : 0; + addStata.dRoundingMoney = commonUtils.convertFixNum(dMoney, 6) + commonUtils.convertFixNum(addStata.dRoundingMoney, 6); + } + }); + } + masterData = { ...masterData, ...addStata }; + this.props.onSaveState({ masterData }); + } else if (sModelsType === 'purchase/purchaseOrder' && sFieldName === 'dProcurementCycle') { + /* 交货周期改变时,交货时间等于制单时间 +交货周期 */ + const dProcurementCycle = commonUtils.isNull(tableDataRow.dProcurementCycle, 0); + const tCreateDate = commonUtils.isNotEmptyObject(tableDataRow.tCreateDate) ? tableDataRow.tCreateDate : new Date(); + const tDeliverDate = moment(tCreateDate).add(dProcurementCycle, 'days').format(commonUtils.dateFormatA); + tableDataRow.tDeliverDate = tDeliverDate; + } + // 取工艺卡数据 + if (sModelsType.includes('sales/salesOrder') && (sFieldName === 'sProductId' || sFieldName === 'sProductNo' || sFieldName === 'sProductName') && name === 'slave') { + const { + controlConfig, materialsConfig, processConfig, + } = this.props; + let { controlData, materialsData, processData } = this.props; + const sId = tableData[iIndex].sId; + let bCkxCopyFromTechnology = '1'; // app.systemData.filter(item => item.sName === 'CkxCopyFromTechnology')[0].sValue; + /* 若从表配置bNoCopyFromTechnology 则代表产品切换不调用工艺卡 */ + if (commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave)) { + const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'bNoCopyFromTechnology'); + if (iIndex > -1) { + bCkxCopyFromTechnology = 0; + } + } + // console.log('bCkxCopyFromTechnology', bCkxCopyFromTechnology); + if (bCkxCopyFromTechnology === '1' && tableDataRow.sProductId !== tableDataRow.sProductName) { + const controlSelectedData = controlData.filter(item => item.sSlaveId === sId); + if (commonUtils.isNotEmptyObject(controlSelectedData)) { + const controlSelectedRowKeys = []; + controlSelectedData.forEach((item) => { + controlSelectedRowKeys.push(item.sId); + }); + const materialsReturnData = this.otherTableDel('materials', controlSelectedRowKeys); + const processReturnData = this.otherTableDel('process', controlSelectedRowKeys); + const controlReturnData = this.props.onDataRowDel('control', true, controlSelectedRowKeys); + controlData = controlReturnData.controlData; + materialsData = materialsReturnData.materialsData; + processData = processReturnData.processData; + this.props.onSaveState({ + ...materialsReturnData, + ...processReturnData, + ...controlReturnData, + }); + } + const sCustomerId = masterData.sCustomerId; + const sProductId = changeValue.sProductId; + const sProductIdArray = []; + sProductIdArray.push(sProductId); + const sProductIds = sProductIdArray.toString(); + const condition = { sCustomerId, sProductIds }; + const dataUrl = `${commonConfig.server_host}salesorder/getProcessCardDataByCustomIdProductId/?sModelsId=${sModelsId}`; + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; + const config = this.props.masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes('BtnCopyFrom.ActProcessCard')); + if (dataReturn.code === 1) { + const returnData = dataReturn.dataset.rows[0]; + const copyToControlConfig = config.filter(item => item.sControlName.toLowerCase() === 'BtnCopyFrom.ActProcessCard.Control'.toLowerCase()); + const copyToMaterialsConfig = config.filter(item => item.sControlName.toLowerCase() === 'BtnCopyFrom.ActProcessCard.Materials'.toLowerCase()); + const copyToProcessConfig = config.filter(item => item.sControlName.toLowerCase() === 'BtnCopyFrom.ActProcessCard.Process'.toLowerCase()); + const controlAssignField = commonUtils.isNotEmptyArr(copyToControlConfig) ? copyToControlConfig[0].sAssignField : ''; + const materialsAssignField = commonUtils.isNotEmptyArr(copyToMaterialsConfig) ? copyToMaterialsConfig[0].sAssignField : ''; + const processAssignField = commonUtils.isNotEmptyArr(copyToProcessConfig) ? copyToProcessConfig[0].sAssignField : ''; + const newCopyTo = {}; + newCopyTo.master = masterData; + newCopyTo.slave = commonUtils.isEmptyArr(tableData) ? {} : tableData; + if (commonUtils.isNotEmptyArr(returnData.controlData)) { + const treeCopyNodes = new Map(); + // eslint-disable-next-line no-loop-func + returnData.controlData.forEach((controlItem) => { + newCopyTo.control = controlItem; + let controlRow = commonFunc.getDefaultData(controlConfig, newCopyTo); // 取默认值 + controlRow = { ...controlRow, ...commonFunc.getAssignFieldValue(controlAssignField, controlItem, newCopyTo) }; // 取赋值字段 + controlRow.handleType = 'add'; + controlRow.sId = commonUtils.createSid(); + controlRow.sSlaveId = tableDataRow.sId; + controlRow.sParentId = masterData.sId; + if (sModelsType === 'sales/salesOrderPack') { /* 树形 */ + /* CopyTo时sAllId,sControlParentId 设置 */ + const sAllOldId = controlItem.sAllId; + let arr = []; + if (commonUtils.isNotEmptyObject(sAllOldId)) { + arr = sAllOldId.split(','); + } + const newId = controlRow.sId; + let sOldParentId = ''; + let sNewParentAllId = ''; + if (arr.length < 2) { /* 根节点复制 */ + controlRow.sAllId = newId; + sOldParentId = newId; + sNewParentAllId = newId; + } else { + sOldParentId = arr[arr.length - 2]; + if (treeCopyNodes.has(sOldParentId)) { + sNewParentAllId = treeCopyNodes.get(sOldParentId); + } else { + const obj = arr[arr.length - 1]; + sNewParentAllId = sAllOldId.replace((`,${obj}`), ''); + } + const sNewArr = sNewParentAllId.split(','); + controlRow.sControlParentId = sNewArr[sNewArr.length - 1]; + sNewParentAllId = `${sNewParentAllId},${newId}`; + controlRow.sAllId = sNewParentAllId; + } + treeCopyNodes.set(controlItem.sId, sNewParentAllId); + } + controlData.push(controlRow); + + if (commonUtils.isNotEmptyArr(returnData.materialsData)) { + returnData.materialsData.filter(item => item.sControlId === controlItem.sId).forEach((materialsItem) => { + newCopyTo.materials = materialsItem; + let materialsRow = commonFunc.getDefaultData(materialsConfig, newCopyTo); // 取默认值 + materialsRow = { ...materialsRow, ...commonFunc.getAssignFieldValue(materialsAssignField, materialsItem, newCopyTo) }; // 取赋值字段 + materialsRow.handleType = 'add'; + materialsRow.sId = commonUtils.createSid(); + materialsRow.sSlaveId = tableDataRow.sId; + materialsRow.sParentId = masterData.sId; + materialsRow.sControlId = controlRow.sId; + materialsRow.sPartsName = controlRow.sPartsName; + + materialsData.push(materialsRow); + }); + } + + if (commonUtils.isNotEmptyArr(returnData.processData)) { + returnData.processData.filter(item => item.sControlId === controlItem.sId).forEach((processItem) => { + newCopyTo.process = processItem; + let processRow = commonFunc.getDefaultData(processConfig, newCopyTo); // 取默认值 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignField, processItem, newCopyTo) }; // 取赋值字段 + processRow.handleType = 'add'; + processRow.sId = commonUtils.createSid(); + processRow.sSlaveId = tableDataRow.sId; + processRow.sParentId = masterData.sId; + processRow.sControlId = controlRow.sId; + processRow.sPartsName = controlRow.sPartsName; + processData.push(processRow); + }); + } + }); + } + if (commonUtils.isNotEmptyArr(returnData.materialsData)) { + // eslint-disable-next-line no-loop-func + returnData.materialsData.filter(item => item.sType === '2').forEach((materialsItem) => { + newCopyTo.materials = materialsItem; + let materialsRow = commonFunc.getDefaultData(materialsConfig, newCopyTo); // 取默认值 + materialsRow = { ...materialsRow, ...commonFunc.getAssignFieldValue(materialsAssignField, materialsItem, newCopyTo) }; // 取赋值字段 + materialsRow.handleType = 'add'; + materialsRow.sId = commonUtils.createSid(); + materialsRow.sSlaveId = tableDataRow.sId; + materialsRow.sParentId = masterData.sId; + materialsData.push(materialsRow); + }); + } + if (commonUtils.isNotEmptyArr(returnData.processData)) { + // eslint-disable-next-line no-loop-func + returnData.processData.filter(item => item.sType === '3').forEach((processItem) => { + newCopyTo.process = processItem; + let processRow = commonFunc.getDefaultData(processConfig, newCopyTo); // 取默认值 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignField, processItem, newCopyTo) }; // 取赋值字段 + processRow.handleType = 'add'; + processRow.sId = commonUtils.createSid(); + processRow.sSlaveId = tableDataRow.sId; + processRow.sParentId = masterData.sId; + processData.push(processRow); + }); + } + /* 包装订单 生成树形 */ + let treeState = {}; + if (sModelsType === 'sales/salesOrderPack') { + treeState = this.handleGetControlTreeData(controlData, true); + } + this.props.onSaveState({ + controlData, materialsData, processData, ...treeState, + }); + } + } + } else if (sModelsType.includes('sales/salesOrder') && (sFieldName === 'dProductQty' || sFieldName === 'dGiveQty' || sFieldName === 'dStockupQty') && name === 'slave') { + const { + controlData, slaveSelectedRowKeys, + } = this.props; + const controlSelectedData = controlData.filter(item => item.sSlaveId === slaveSelectedRowKeys[0]); + for (const one of controlSelectedData) { + one.handleType = commonUtils.isEmpty(one.handleType) ? 'update' : one.handleType; + one.dPartsQty = commonUtils.isNull(tableDataRow.dProductQty, 0) + commonUtils.isNull(tableDataRow.dGiveQty, 0) + commonUtils.isNull(tableDataRow.dStockupQty, 0); + } + this.props.onSaveState({ controlData }); + } else if (sModelsType.includes('purchase/') && (sFieldName === 'sMaterialsId' || sFieldName === 'sMaterialsNo' || sFieldName === 'sMaterialsName') && name === 'slave') { + const url = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const value = { + sProName: 'Sp_Cashier_GetMaterialsPrice', + paramsMap: { + sMaterialsGuid: changeValue.sMaterialsId, + sSupplyGuid: masterData.sSupplyId, + }, + }; + const returnData = (await commonServices.postValueService(app.token, value, url)).data; + if (returnData.code === 1) { + tableDataRow.dMaterialsPrice = returnData.dataset.rows[0].dataSet.outData[0].dPrice; + } + const models = name === 'materials' ? 'Materials' : + sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('quotation/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + if (sModelsType.includes('purchase/') || sModelsType.includes('quotation/') || sModelsType.includes('manufacture/') || sModelsType.includes('materialsStock/') || sModelsType.includes('outside/')) { + tableDataRow = await this.handleMaterialsChange(tableDataRow, sModelsId, masterData, changeValue, 'dAuxiliaryQty', app, token, models); + } + tableDataRow = commonBusiness.getCalculateAllMoney(app, models, 'dAuxiliaryQty', masterData, tableDataRow); + + if (Object.keys(changeValue).length > 0 && Object.keys(changeValue).findIndex(item => item === 'dMaterialsStockAuxiliaryQty') > -1) { + const urlMaterialsStock = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const valueMaterialsStock = { + sProName: 'Sp_Inventory_MaterialsInventoryV56', + paramsMap: { + sMaterialsGuid: tableDataRow.sMaterialsId, + sMaterialsStyle: tableDataRow.sMaterialsStyle, + sWarehouseGuid: tableDataRow.sWarehouseId, + sLocationalGuid: tableDataRow.sLocationId, + sWarehouseLocationGuid: tableDataRow.sWarehouseLocationId, + sDefine_no: tableDataRow.sDefineNo, + sDefine_no2: tableDataRow.sDefineNo2, + iGetQty: 1, + iHasZero: 1, + }, + }; + const returnDataMaterialsStock = (await commonServices.postValueService(app.token, valueMaterialsStock, urlMaterialsStock)).data; + if (returnDataMaterialsStock.code === 1) { + tableDataRow.dMaterialsStockAuxiliaryQty = returnDataMaterialsStock.dataset.rows[0].dataSet.outData[0].dAuxiliaryQty; + } + } + if (Object.keys(changeValue).length > 0 && Object.keys(changeValue).findIndex(item => item === 'dMaterialsStockAvailableQty') > -1) { + const urlMaterialsAvailableQty = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const valueMaterialsAvailableQty = { + sProName: 'Sp_Inventory_MaterialsInventoryV56', + paramsMap: { + sMaterialsGuid: tableDataRow.sMaterialsId, + sMaterialsStyle: tableDataRow.sMaterialsStyle, + sWarehouseGuid: tableDataRow.sWarehouseId, + sLocationalGuid: tableDataRow.sLocationId, + sWarehouseLocationGuid: tableDataRow.sWarehouseLocationId, + sDefine_no: tableDataRow.sDefineNo, + sDefine_no2: tableDataRow.sDefineNo2, + iGetQty: 2, + iHasZero: 1, + }, + }; + const returnDataMaterialsAvailableQty = (await commonServices.postValueService(app.token, valueMaterialsAvailableQty, urlMaterialsAvailableQty)).data; + if (returnDataMaterialsAvailableQty.code === 1) { + tableDataRow.dMaterialsStockAvailableQty = returnDataMaterialsAvailableQty.dataset.rows[0].dataSet.outData[0].dAuxiliaryQty; + } + } + /* 选择材料后 交货周期改变 则交货时间等于制单时间+交货周期 */ + const dProcurementCycle = commonUtils.isNull(tableDataRow.dProcurementCycle, 0); + const tCreateDate = commonUtils.isNotEmptyObject(tableDataRow.tCreateDate) ? tableDataRow.tCreateDate : new Date(); + const tDeliverDate = moment(tCreateDate).add(dProcurementCycle, 'days').format(commonUtils.dateFormatA); + tableDataRow.tDeliverDate = tDeliverDate; + // else { + // this.props.getServiceError(returnData); + // } + } else if (sModelsType === 'sales/salesCheck' && sFieldName === 'dLossMoney' && name === 'slave') { + const dPmoney = this.props.getFloatNum('dProductMoney'); + const { dNetPrice } = app.decimals; + const dCurrencyRate = commonUtils.convertIsNotNumToNumber1(masterData.dCurrencyRate); /* 汇率 */ + const dTaxRate = commonUtils.convertToNum(tableDataRow.dTaxRate); /* 税率 */ + const dProductQty = commonUtils.convertToNum(tableDataRow.dProductQty); /* 数量 */ + if (commonUtils.isNotEmptyNumber(tableDataRow.dSrcNoCheckMoney) && commonUtils.isNotEmptyNumber(tableDataRow.dLossMoney)) { + const dProductForeignMoney = commonUtils.convertFixNum(tableDataRow.dSrcNoCheckMoney - tableDataRow.dLossMoney, dPmoney); + const dProductMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductForeignMoney * dCurrencyRate : 0, dPmoney); /* 本位币金额 */ + tableDataRow.dProductForeignMoney = dProductForeignMoney; + tableDataRow.dProductMoney = dProductMoney; + const dProductNoTaxMoney = commonUtils.convertFixNum(dProductMoney / (1 + (dTaxRate / 100)), dPmoney); /* 不含税金额 */ + const dProductNoTaxPrice = commonUtils.convertFixNum(dProductQty !== 0 ? dProductNoTaxMoney / dProductQty : 0, dPmoney); /* 不含税价 */ + const dProductTaxMoney = commonUtils.convertFixNum(dProductMoney - dProductNoTaxMoney, dPmoney); /* 税额 */ + const dProductTaxForeignMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductTaxMoney / dCurrencyRate : 0, dPmoney); /* 外币税额 */ + tableDataRow.dProductNoTaxMoney = dProductNoTaxMoney; /* 不含税金额 */ + tableDataRow.dProductNoTaxPrice = dProductNoTaxPrice; /* 不含税价 */ + tableDataRow.dProductTaxMoney = dProductTaxMoney; /* 税额 */ + tableDataRow.dProductTaxForeignMoney = dProductTaxForeignMoney; /* 外币税额 */ + /* 报损金额改变后 反算单价 */ + tableDataRow.dProductForeignPrice = tableDataRow.dProductQty !==0 ? commonUtils.convertFixNum( dProductForeignMoney/tableDataRow.dProductQty, dNetPrice) : 0; /* 外币税额 */ + tableDataRow.dProductPrice = tableDataRow.dProductQty !==0 ? commonUtils.convertFixNum( dProductMoney/tableDataRow.dProductQty, dNetPrice) : 0; /* 外币税额 */ + } else if (commonUtils.isNotEmptyNumber(tableDataRow.dSrcNoCheckMoney) && commonUtils.isEmptyNumber(tableDataRow.dLossMoney)) { + const dProductForeignMoney = commonUtils.isNull(tableDataRow.dSrcNoCheckMoney, 0); + const dProductMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductForeignMoney * dCurrencyRate : 0, dPmoney); /* 本位币金额 */ + tableDataRow.dProductForeignMoney = dProductForeignMoney; + tableDataRow.dProductMoney = dProductMoney; + tableDataRow.dLossMoney = 0; + const dProductNoTaxMoney = commonUtils.convertFixNum(dProductMoney / (1 + (dTaxRate / 100)), dPmoney); /* 不含税金额 */ + const dProductNoTaxPrice = commonUtils.convertFixNum(dProductQty !== 0 ? dProductNoTaxMoney / dProductQty : 0, dPmoney); /* 不含税价 */ + const dProductTaxMoney = commonUtils.convertFixNum(dProductMoney - dProductNoTaxMoney, dPmoney); /* 税额 */ + const dProductTaxForeignMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductTaxMoney / dCurrencyRate : 0, dPmoney); /* 外币税额 */ + tableDataRow.dProductNoTaxMoney = dProductNoTaxMoney; /* 不含税金额 */ + tableDataRow.dProductNoTaxPrice = dProductNoTaxPrice; /* 不含税价 */ + tableDataRow.dProductTaxMoney = dProductTaxMoney; /* 税额 */ + tableDataRow.dProductTaxForeignMoney = dProductTaxForeignMoney; /* 外币税额 */ + } + } else if (sModelsType && (sModelsType === 'purchase/purchasecheck' || sModelsType.includes('outside/outsideChecking') ) && sFieldName === 'dLossMoney' && name === 'slave') { + const dPmoney = this.props.getFloatNum('dMaterialsMoney'); + const { dNetPrice } = app.decimals; + const dTaxRate = commonUtils.convertToNum(tableDataRow.dTaxRate); /* 税率 */ + const type = 'Materials'; + const dProductQty = commonUtils.convertToNum(tableDataRow[`d${type}Qty`]); /* 数量 */ + if (commonUtils.isNotEmptyNumber(tableDataRow.dSrcNoCheckMoney) && commonUtils.isNotEmptyNumber(tableDataRow.dLossMoney)) { + const dMoney = commonUtils.convertFixNum(tableDataRow.dSrcNoCheckMoney - tableDataRow.dLossMoney, dPmoney); + tableDataRow[`d${type}Money`] = dMoney; + const dProductNoTaxMoney = commonUtils.convertFixNum(dMoney / (1 + (dTaxRate / 100)), dPmoney); /* 不含税金额 */ + const dProductNoTaxPrice = commonUtils.convertFixNum(dProductQty !== 0 ? dProductNoTaxMoney / dProductQty : 0, dPmoney); /* 不含税价 */ + const dProductTaxMoney = commonUtils.convertFixNum(dMoney - dProductNoTaxMoney, dPmoney); /* 税额 */ + tableDataRow[`d${type}NoTaxMoney`] = dProductNoTaxMoney; /* 不含税金额 */ + tableDataRow[`d${type}NoTaxPrice`] = dProductNoTaxPrice; /* 不含税价 */ + tableDataRow[`d${type}TaxMoney`] = dProductTaxMoney; /* 税额 */ + /* 报损金额改变后 反算单价 */ + tableDataRow[`d${type}Price`] = dProductQty !==0 ? commonUtils.convertFixNum( dMoney/dProductQty, dNetPrice) : 0; /* 外币税额 */ + } else if (commonUtils.isNotEmptyNumber(tableDataRow.dSrcNoCheckMoney) && commonUtils.isEmptyNumber(tableDataRow.dLossMoney)) { + tableDataRow.dMaterialsMoney = commonUtils.isNull(tableDataRow.dSrcNoCheckMoney, 0); + tableDataRow.dLossMoney = 0; + } + } else if (sModelsType === 'cost/cosexpenseshare') { /* 改变费用分摊单据从表成本中心金额,总金额随之改变 */ + if (sFieldName.indexOf('dCostCenter') > -1) { + const { slaveColumn, app } = this.props; + const { dNetMoney } = app.decimals; + let dAllMoney = 0; + slaveColumn.forEach((item) => { + const sName = item.dataIndex; + if (sName.indexOf('dCostCenter') > -1) { + dAllMoney += commonUtils.isNotEmptyNumber(tableDataRow[sName]) ? commonUtils.convertFixNum(tableDataRow[sName], dNetMoney) : 0; + } + }); + tableDataRow.dShareMoney = commonUtils.convertFixNum(dAllMoney, dNetMoney); + } + } else if (sModelsType === 'purchase/purchaseInstore' && name === 'slave') { /* 采购入库 材料批次=材料生产日期tSReserve1(此客户手输)+当前日期 */ + if (sFieldName === 'tProductionDate') { + tableDataRow.sDefineNo = moment(tableDataRow.tProductionDate).format('YYYYMMDDHHmm') + moment(new Date()).format('YYYYMMDDHHmm'); + } + } + /* 各种金额,税额,价格计算 */ + let models = name === 'materials' ? 'Materials' : + sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('quotation/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + if (sModelsType.includes('purchase/') || sModelsType.includes('quotation/') || sModelsType.includes('manufacture/') || sModelsType.includes('materialsStock/') + || sModelsType.includes('outside/') || sModelsType.includes('semigoodsStock/') || sModelsType.includes('sales/materials') || sModelsType === 'sales/salesCheck') { + if (sModelsType.includes('sales/materials') || sModelsType === 'sales/salesCheck') { + tableDataRow.dAuxiliaryQty = tableDataRow.dProductQty; + } + tableDataRow = await this.handleMaterialsChange(tableDataRow, sModelsId, masterData, changeValue, sFieldName, app, token, models); + + if (sModelsType.includes('sales/materials') || sModelsType === 'sales/salesCheck') { /* 如果是材料销售模块/销售对账 如果是材料 则用换算数量*单价 算金额 */ + /* 材料逻辑计算 */ + if (commonUtils.isNotEmptyNumber('dMaterialsQty') && tableDataRow.dMaterialsQty !== 0 && commonUtils.isNotEmptyObject(tableDataRow.sMaterialsUnit)) { + let modelsNew = ''; + if (models === 'Product') { /* 计算前将Product替换为Materials */ + modelsNew = 'Materials'; + + const dCurrencyRate = commonUtils.convertIsNotNumToNumber1(masterData.dCurrencyRate); /* 汇率 */ + const { dNetPrice } = app.decimals; + const dForeignPrice = tableDataRow[`d${models}ForeignPrice`]; + if (commonUtils.isNotEmptyNumber(dForeignPrice)) { + /* 只有外币单价情況下 要算本位币单价 */ + const dProductPrice = commonUtils.convertFixNum(dForeignPrice * dCurrencyRate, dNetPrice); + tableDataRow[`d${models}Price`] = dProductPrice; + } + + tableDataRow[`dN${modelsNew}Price`] = tableDataRow[`d${models}ForeignPrice`]; + tableDataRow[`d${modelsNew}ForeignPrice`] = tableDataRow[`d${models}ForeignPrice`]; + tableDataRow[`d${modelsNew}Price`] = tableDataRow[`d${models}Price`]; + tableDataRow[`dN${modelsNew}Money`] = tableDataRow[`dN${models}Price`]; + tableDataRow[`dN${modelsNew}Money`] = tableDataRow[`d${models}ForeignMoney`]; + tableDataRow[`d${modelsNew}ForeignMoney`] = tableDataRow[`d${models}ForeignMoney`]; + tableDataRow[`d${modelsNew}Money`] = tableDataRow[`d${models}Money`]; + tableDataRow.bSalesMaterials = true;/* 材料销售 销售对账 材料计算 */ + models = 'Materials'; + sFieldName = commonUtils.isNotEmptyObject(sFieldName) ? sFieldName.replace('Product', 'Materials') : sFieldName; + } + } + } + } + tableDataRow = commonBusiness.getCalculateAllMoney(app, models, sFieldName, masterData, tableDataRow); + let dMaterialsMoney = ''; + if (sModelsType.includes('outside/')) { /* 工序发外 && (sFieldName === 'sSupplyName' || sFieldName === 'sProcessName' || sFieldName === 'dAuxiliaryQty') */ + let sComputeId = {}; + const sSupplyId = masterData.sSupplyId; + const sProcessId = tableDataRow.sProcessId; + if (commonUtils.isNotEmptyObject(sProcessId)) { + /* 根据客户id,工序id获取公式ID */ + sComputeId = await commonBusiness.getOutSideProcessFormula({ + token, sModelsId, sSupplyId, sProcessId, + }); + if (!commonUtils.isEmpty(sComputeId)) { + dMaterialsMoney = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow, sComputeId, + }); + tableDataRow.dMaterialsMoney = dMaterialsMoney; + tableDataRow = commonBusiness.getCalculateMoney(app, masterData, tableDataRow, 'Materials'); + } + } + } + if (isWait) { + return tableDataRow; + } else { + tableData[iIndex] = tableDataRow; + if (name === 'report') { // 报表设计 + this.props.onSaveState({ reportPropsEnabled: true }); + } else { + this.props.onSaveState({ enabled: true }); + } + this.props.onSaveState({ [`${name}Data`]: tableData }); + } + } + }; + + /** 删除表格数据 */ + otherTableDel = (name, tableSelectedRowKeys) => { + const tableData = this.props[`${name}Data`]; + let tableDelData = this.props[`${name}DelData`]; + tableDelData = commonUtils.isEmptyArr(tableDelData) ? [] : tableDelData; + for (const sId of tableSelectedRowKeys) { + /* 看看删除集合和从表中是否都存在该条数据 */ + let tableDataIndex = tableData.findIndex(item => item.sControlId === sId); + while (tableDataIndex > -1) { + /* 删除从表中的数据并存入删除集合中 */ + const slaveDataFilter = tableData[tableDataIndex]; + tableData.splice(tableDataIndex, 1); + slaveDataFilter.handleType = 'del'; + tableDelData.push(slaveDataFilter); + tableDataIndex = tableData.findIndex(item => item.sControlId === sId); + } + } + return { [`${name}Data`]: tableData, [`${name}DelData`]: tableDelData, [`${name}SelectedRowKeys`]: [] }; + }; + + handleMaterialsChangeBak = async (tableDataRow, sModelsId, masterData, changeValue, sFieldName, app, token, models) => { + if (this.inputChange) { + clearTimeout(this.inputChange); + } + this.inputChange = setTimeout(async() => { + // /* 调用父组件的回带函数 */ + tableDataRow = await this.handleMaterialsChangeWait(tableDataRow, sModelsId, masterData, changeValue, sFieldName, app, token, models); + }, 10); + return tableDataRow; + } + + handleMaterialsChange = async (tableDataRow, sModelsId, masterData, changeValue, sFieldName, app, token, models) => { + const { sComputeId, sConversionComputeId, sReConversionComputeId } = tableDataRow; + const sFormulaIdType = tableDataRow.bInverse ? 'sReComputeId' : 'sComputeId'; /* 正算、反算类型 */ + if (sFieldName === 'sMaterialsNo' || sFieldName === 'sMaterialsName' || sFieldName === 'dAuxiliaryQty' || sFieldName === 'dReelAuxiliaryQty' || sFieldName === 'dConversionQty' || sFieldName === 'sMaterialsStyle' || sFieldName === 'dProductQty') { + if (sFieldName === 'dReelAuxiliaryQty') { + if (tableDataRow.sMaterialsUnit === '吨' && tableDataRow.bReel && tableDataRow.dGramWeight > 0) { + tableDataRow = commonBusiness.getMaterialsQty(app, { ...tableDataRow, sMaterialsStyle: tableDataRow.sReelMaterialsStyle }, 'dReelAuxiliaryQty', 'dMaterialsQty'); + tableDataRow.dAuxiliaryQty = tableDataRow.dMaterialsQty; + tableDataRow.sMaterialsStyle = tableDataRow.sMaterialsStyle !== undefined && tableDataRow.sMaterialsStyle.split('*').length > 1 ? tableDataRow.sMaterialsStyle.split('*')[0] : tableDataRow.sMaterialsStyle; + tableDataRow.sAuxiliaryUnit = tableDataRow.sMaterialsUnit; + } else if (tableDataRow.sMaterialsUnit.toUpper() === 'M2' && tableDataRow.bReel) { + tableDataRow = commonBusiness.getMaterialsQty(app, tableDataRow, 'dReelAuxiliaryQty', 'dMaterialsQty'); + tableDataRow.dAuxiliaryQty = tableDataRow.dReelAuxiliaryQty; + } else { + tableDataRow.dAuxiliaryQty = tableDataRow.dReelAuxiliaryQty; + } + } + if (commonUtils.isEmpty(sComputeId) && sFieldName !== 'dConversionQty') { + if (sFieldName === 'dProductQty') { + tableDataRow = commonBusiness.getMaterialsQty(app, tableDataRow, 'dProductQty', 'dMaterialsQty'); + } else if (app.currentPane.sModelsType && app.currentPane.sModelsType.includes('outside/')) { + tableDataRow = commonBusiness.getMaterialsQty(app, tableDataRow, 'dAuxiliaryQty', 'dMaterialsQty'); + } else { + tableDataRow.dMaterialsQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow, sComputeId, sFormulaIdType, + }); + } + } else if (!commonUtils.isEmpty(sComputeId)) { + tableDataRow.dMaterialsQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow, sComputeId, + }); + } + if (sFieldName !== 'dConversionQty' && !commonUtils.isEmpty(sConversionComputeId)) { + tableDataRow.dConversionQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow, sComputeId: sConversionComputeId, + }); + } + } else if (sFieldName === 'dMaterialsQty') { + const { sReComputeId } = tableDataRow; + if (commonUtils.isEmpty(sReComputeId) && tableDataRow.bInverse) { + if (app.currentPane.sModelsType && app.currentPane.sModelsType.includes('outside/')) { + tableDataRow = commonBusiness.getAuxiliaryQty(app, tableDataRow, sFieldName, 'dAuxiliaryQty'); + } else { + tableDataRow.dAuxiliaryQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow, sReComputeId, sFormulaIdType, + }); + } + } else if (tableDataRow.bInverse) { + tableDataRow.dAuxiliaryQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow, sComputeId: sReComputeId, + }); + if (commonUtils.isNotEmptyArr(tableDataRow.dAuxiliaryQty) && tableDataRow.dAuxiliaryQty !== 0) { + tableDataRow.dProductQty = tableDataRow.dAuxiliaryQty; + } + } + if (!commonUtils.isEmpty(sReConversionComputeId)) { + tableDataRow.dConversionQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow, sComputeId: sReConversionComputeId, + }); + } + } else if (sFieldName === 'dAuxiliaryLossQty') { + const tableDataRowNew ={ ...tableDataRow ,dAuxiliaryQty:tableDataRow.dAuxiliaryLossQty }; + if (commonUtils.isEmpty(sComputeId)) { + // tableDataRow = commonBusiness.getMaterialsQty(app, tableDataRow, sFieldName, 'dLossQty'); + tableDataRow.dLossQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow:tableDataRowNew, sComputeId, sFormulaIdType, + }); + } else { + tableDataRow.dLossQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow:tableDataRowNew, sComputeId, + }); + } + if (!commonUtils.isEmpty(tableDataRow.dSrcSurplusAuxiliaryQty)) { + tableDataRow.dAuxiliaryQty = tableDataRow.dSrcSurplusAuxiliaryQty - tableDataRow.dAuxiliaryLossQty; + tableDataRow.dMaterialsQty = commonUtils.convertFixNum(tableDataRow.dSrcSurplusQty - tableDataRow.dLossQty, 6); + } + } else if (sFieldName === 'dLossQty') { + const { sReComputeId } = tableDataRow; + const tableDataRowNew ={ ...tableDataRow ,dMaterialsQty:tableDataRow.dLossQty }; + if (commonUtils.isEmpty(sReComputeId) && tableDataRow.bInverse) { + // tableDataRow = commonBusiness.getAuxiliaryQty(app, tableDataRow, sFieldName, 'dAuxiliaryLossQty'); + tableDataRow.dAuxiliaryLossQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow:tableDataRowNew, sReComputeId, sFormulaIdType, + }); + } else { + tableDataRow.dAuxiliaryLossQty = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData, tableDataRow:tableDataRowNew, sComputeId: sReComputeId, + }); + } + if (!commonUtils.isEmpty(tableDataRow.dSrcSurplusAuxiliaryQty)) { + tableDataRow.dAuxiliaryQty = tableDataRow.dSrcSurplusAuxiliaryQty - tableDataRow.dAuxiliaryLossQty; + tableDataRow.dMaterialsQty = tableDataRow.dSrcSurplusQty - tableDataRow.dLossQty; + } + } else if (sFieldName === 'sProcessId' || sFieldName === 'sProcessNo' || sFieldName === 'sProcessName') { + const sProcessId = changeValue.sProcessId; + const url = `${commonConfig.server_host}process/outsideprocess?sModelsId=${sModelsId}&sProcessId=${sProcessId}`; + const dataReturn = (await commonServices.getService(token, url)).data; + if (dataReturn.code === 1) { + if (commonUtils.isNotEmptyArr(dataReturn.dataset.rows)) { + tableDataRow.dMaterialsPrice = dataReturn.dataset.rows[0].dMaterialsPrice; + } + tableDataRow = commonBusiness.getCalculateAllMoney(app, models, 'dMaterialsPrice', masterData, tableDataRow); + } + } + return tableDataRow; + } + + handleCustomerChange = (name, changeValue) => { + if (commonUtils.isNotEmptyObject(changeValue)) { + if (changeValue.sCustomerId !== this.state.changleCustomerId) { + const sCustomerId = []; + sCustomerId.push(changeValue.sCustomerId); + this.handleTableSelectRowChange(name, sCustomerId, changeValue); + } + } + this.setState({ changleCustomerId: changeValue.sCustomerId }); + } + handleMasterChange = async (name, sFieldName, changeValue, sId, dropDownData, isWait, masterDataNew) => { + this.handleCustomerChange(name, changeValue); + const { + sModelsId, sModelsType, masterData: masterDataOld, slaveData, app, masterConfig, slaveConfig, token, + } = this.props; + const addState = {}; + const masterData = masterDataNew === undefined ? masterDataOld === undefined ? {} : masterDataOld : masterDataNew; + let bNewSlaveData = false; + if (sFieldName === 'sCustomerId' || sFieldName === 'sCustomerNo' || sFieldName === 'sCustomerName') { + if (commonUtils.isNotEmptyArr(slaveData)) { + // 从表有数据,请删除后修改客户!不能去掉 + if (slaveData.length === 1 && commonUtils.isEmpty(slaveData[0].sProductId)) { + bNewSlaveData = true; + } else { + message.warn(commonFunc.showMessage(app.commonConst, 'slaveHasDataPleaseDel')); + return; + } + } + changeValue.tGetPayDate = commonBusiness.getGeyPayDate({ ...masterData, ...changeValue }); + // commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sProductId', []); + // commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sProductNo', []); + // commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sProductName', []); + // + // commonUtils.setStoreDropDownData(sModelsId, 'master', 'sProductId', []); + // commonUtils.setStoreDropDownData(sModelsId, 'master', 'sProductNo', []); + // commonUtils.setStoreDropDownData(sModelsId, 'master', 'sProductName', []); + } if (sFieldName === 'sSupplyId' || sFieldName === 'sSupplyNo' || sFieldName === 'sSupplyName') { + changeValue.tGetPayDate = commonBusiness.getGeyPayDate({ ...masterData, ...changeValue }); + } else if (sFieldName === 'sWareHouseId' || sFieldName === 'sWareHouseNo' || sFieldName === 'sWareHouseName') { + commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sMaterialsId', []); + commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sMaterialsNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'slave', 'sMaterialsName', []); + if (sModelsType === 'materialsStock/materialsCheck' || sModelsType === 'productStock/productCheck') { + let value = {}; + if (sModelsType === 'materialsStock/materialsCheck') { + value = { + sProName: 'Sp_System_AccountSquareCheck', + paramsMap: { + iType2: 1, + sWareHouseGuid: commonUtils.isNotEmptyObject(changeValue.sWareHouseId) ? changeValue.sWareHouseId : '', + }, + }; + } else if (sModelsType === 'productStock/productCheck') { + value = { + sProName: 'Sp_System_AccountSquareCheck', + paramsMap: { + iType2: 2, + sWareHouseGuid: commonUtils.isNotEmptyObject(changeValue.sWareHouseId) ? changeValue.sWareHouseId : '', + }, + }; + } + const url = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; + const returnData = (await commonServices.postValueService(app.token, value, url)).data; + if (returnData.code === 1) { + const outData = returnData.dataset.rows[0].dataSet.outData[0]; + if (outData.sCode === -1) { + message.error(outData.sReturn); + return; + } + } else { + this.props.getServiceError(returnData); + return; + } + } + } else if (sModelsType.includes('cashier/') && sFieldName === 'sBillType') { + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sCustomerId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sCustomerNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sCustomerName', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sSupplyId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sSupplyNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sSupplyName', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sFamilyId', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sFamilyNo', []); + commonUtils.setStoreDropDownData(sModelsId, 'master', 'sFamilyName', []); + changeValue.sCustomerId = ''; + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sCustomerId'); + if (iIndex > -1) { + masterConfig.gdsconfigformslave[iIndex].bReGetDropDown = true; + } + changeValue.sSupplyId = ''; + const iSupplyIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sSupplyId'); + if (iSupplyIndex > -1) { + masterConfig.gdsconfigformslave[iSupplyIndex].bReGetDropDown = true; + } + /* 财务调整中切换调整类型后,对象名称清空 */ + const sBillTypeIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sFamilyName'); + if (sBillTypeIndex > -1) { + masterData.sFamilyName = ''; + } + this.props.onSaveState({ masterConfig }); + } else if (sFieldName === 'sGetPayId' || sFieldName === 'sGetPayName') { + changeValue.tGetPayDate = commonBusiness.getGeyPayDate({ ...masterData, ...changeValue }); + } else if (sFieldName === 'tInvoiceDate') { + changeValue.tGetPayDate = commonBusiness.getGeyPayDate({ ...masterData, ...changeValue }); + } else if (sFieldName === 'sSettlementId') { + if (changeValue.sSettlementId === 'cash') { + const sBankAccountIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sBankAccount'); + if (sBankAccountIndex > -1) { + masterConfig.gdsconfigformslave[sBankAccountIndex].iTag = 1; + masterData.sBankAccount = ''; + } + const sInvoiceNoIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sInvoiceNo'); + if (sInvoiceNoIndex > -1) { + masterConfig.gdsconfigformslave[sInvoiceNoIndex].iTag = 1; + masterData.sInvoiceNo = ''; + } + const sBankIdIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sBankId' || item.sName === 'sBankName'); + if (sBankIdIndex > -1) { + masterConfig.gdsconfigformslave[sBankIdIndex].iTag = 1; + masterData.sBankId = ''; + masterData.sBankName = ''; + } + } + if (changeValue.sSettlementId === 'bank') { + const sInvoiceNoIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sInvoiceNo'); + if (sInvoiceNoIndex > -1) { + masterConfig.gdsconfigformslave[sInvoiceNoIndex].iTag = 1; + masterData.sInvoiceNo = ''; + } + const sBankAccountIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sBankAccount'); + if (sBankAccountIndex > -1) { + masterConfig.gdsconfigformslave[sBankAccountIndex].iTag = 0; + } + const sBankIdIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sBankId' || item.sName === 'sBankName'); + if (sBankIdIndex > -1) { + masterConfig.gdsconfigformslave[sBankIdIndex].iTag = 0; + } + } + if (changeValue.sSettlementId === 'bill') { + const sBankAccountIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sBankAccount'); + if (sBankAccountIndex > -1) { + masterConfig.gdsconfigformslave[sBankAccountIndex].iTag = 1; + masterData.sBankAccount = ''; + } + const sInvoiceNoIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sInvoiceNo'); + if (sInvoiceNoIndex > -1) { + masterConfig.gdsconfigformslave[sInvoiceNoIndex].iTag = 0; + } + const sBankIdIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sBankId'); + if (sBankIdIndex > -1) { + masterConfig.gdsconfigformslave[sBankIdIndex].iTag = 0; + } + const tDueDateIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'tDueDate'); + if (tDueDateIndex > -1) { + masterConfig.gdsconfigformslave[tDueDateIndex].iTag = 0; + } + } + } + let returnData = this.props.onChange(name, sFieldName, changeValue, sId, dropDownData, true, masterData); + const masterDataAfter = commonBusiness.getKeyUpEvent(name, sFieldName, masterConfig, returnData.masterData, {}, true); + if (commonUtils.isNotEmptyObject(masterDataAfter)) { + returnData.masterData = masterDataAfter; + } + if (sFieldName === 'sSupplyId' || sFieldName === 'sSupplyNo' || sFieldName === 'sSupplyName' || sFieldName === 'sWareHouseId' || sFieldName === 'sWareHouseNo' || sFieldName === 'sWareHouseName' || + sFieldName === 'sLocationId' || sFieldName === 'sLocationNo' || sFieldName === 'sLocationName' || + sFieldName === 'sWareHouseLocationId' || sFieldName === 'sWareHouseLocationNo' || sFieldName === 'sWareHouseLocationName' || sFieldName === 'tDeliverDate' || + sFieldName === 'sCurrency' || sFieldName === 'dCurrencyRate') { + const slaveDataNew = []; + const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + for (const item of slaveData) { + let tableDataRow = ((sFieldName === 'sWareHouseId' || sFieldName === 'sWareHouseNo' || sFieldName === 'sWareHouseName' || + sFieldName === 'sLocationId' || sFieldName === 'sLocationNo' || sFieldName === 'sLocationName' || + sFieldName === 'sWareHouseLocationId' || sFieldName === 'sWareHouseLocationNo' || sFieldName === 'sWareHouseLocationName') && (sModelsType.includes('materialsStock/productionmaterialsadjust'))) ? + { ...item } : { ...item, [sFieldName]: changeValue[sFieldName] }; + + if (sFieldName === 'sSupplyId' || sFieldName === 'sSupplyNo' || sFieldName === 'sSupplyName') { + tableDataRow.sTaxId = changeValue.sTaxId; + tableDataRow.sTaxNo = changeValue.sTaxNo; + tableDataRow.sTaxName = changeValue.sTaxName; + tableDataRow.dTaxRate = changeValue.dTaxRate; + tableDataRow.handleType = commonUtils.isEmpty(tableDataRow.handleType) ? 'update' : tableDataRow.handleType; + let dMaterialsMoney = ''; + if (sModelsType.includes('outside/')) { /* 工序发外 */ + let sComputeId = ''; + const sSupplyId = changeValue.sSupplyId; + const sProcessId = tableDataRow.sProcessId; + /* 根据客户id,工序id获取公式ID */ + if (commonUtils.isNotEmptyObject(sSupplyId) && commonUtils.isNotEmptyObject(sProcessId)) { + sComputeId = await commonBusiness.getOutSideProcessFormula({ + token, sModelsId, sSupplyId, sProcessId, + }); + if (commonUtils.isNotEmptyObject(sComputeId)) { + dMaterialsMoney = await commonBusiness.getFormulaValue({ + token, sModelsId, masterData: returnData.masterData, tableDataRow, sComputeId, + }); + tableDataRow.dMaterialsMoney = dMaterialsMoney; + tableDataRow = commonBusiness.getCalculateMoney(app, returnData.masterData, tableDataRow, 'Materials'); + } else { + tableDataRow = commonBusiness.getCalculateMoney(app, returnData.masterData, tableDataRow, 'Materials'); /* 没有发外公式情况下 进行计算 */ + } + } else { + tableDataRow = commonBusiness.getCalculateMoney(app, returnData.masterData, tableDataRow, 'Materials') + } + } else { + tableDataRow = commonBusiness.getCalculateAllMoney(app, models, 'sTaxId', returnData.masterData, tableDataRow); + } + } else if (sFieldName === 'sCurrency' || sFieldName === 'dCurrencyRate') { + tableDataRow = commonBusiness.getCalculateAllMoney(app, models, `dN${models}Money`, returnData.masterData, tableDataRow); + tableDataRow.handleType = commonUtils.isEmpty(tableDataRow.handleType) ? 'update' : tableDataRow.handleType; + } + if ((sFieldName === 'sWareHouseId' || sFieldName === 'sWareHouseNo' || sFieldName === 'sWareHouseName' || + sFieldName === 'sLocationId' || sFieldName === 'sLocationNo' || sFieldName === 'sLocationName' || + sFieldName === 'sWareHouseLocationId' || sFieldName === 'sWareHouseLocationNo' || sFieldName === 'sWareHouseLocationName') && (!sModelsType.includes('materialsStock/productionmaterialsadjust'))) { + if (sFieldName === 'sWareHouseId' || sFieldName === 'sWareHouseNo' || sFieldName === 'sWareHouseName') { + tableDataRow.sWareHouseId = changeValue.sWareHouseId; + tableDataRow.sWareHouseNo = changeValue.sWareHouseNo; + tableDataRow.sWareHouseName = changeValue.sWareHouseName; + } else if (sFieldName === 'sLocationId' || sFieldName === 'sLocationNo' || sFieldName === 'sLocationName') { + tableDataRow.sLocationId = changeValue.sLocationId; + tableDataRow.sLocationNo = changeValue.sLocationNo; + tableDataRow.sLocationName = changeValue.sLocationName; + } else if (sFieldName === 'sWareHouseLocationId' || sFieldName === 'sWareHouseLocationNo' || sFieldName === 'sWareHouseLocationName') { + tableDataRow.sWareHouseLocationId = changeValue.sWareHouseLocationId; + tableDataRow.sWareHouseLocationNo = changeValue.sWareHouseLocationNo; + tableDataRow.sWareHouseLocationName = changeValue.sWareHouseLocationName; + } + tableDataRow.handleType = commonUtils.isEmpty(tableDataRow.handleType) ? 'update' : tableDataRow.handleType; + } else if (sFieldName === 'tDeliverDate') { + tableDataRow.handleType = commonUtils.isEmpty(tableDataRow.handleType) ? 'update' : tableDataRow.handleType; + } + slaveDataNew.push(tableDataRow); + } + addState.slaveData = slaveDataNew; + // this.props.onSaveState({ slaveData: slaveDataNew }); + } else if ((sFieldName === 'sCustomerId' || sFieldName === 'sCustomerNo' || sFieldName === 'sCustomerName')) { + if (bNewSlaveData) { + const slaveDataNew = []; + const allTableData = {}; + allTableData.master = returnData.masterData; + const tableDataRowAdd = commonFunc.getDefaultData(slaveConfig, allTableData); + tableDataRowAdd.handleType = 'add'; + tableDataRowAdd.sId = commonUtils.createSid(); + tableDataRowAdd.sParentId = masterData && masterData.sId ? masterData.sId : null; + tableDataRowAdd.key = tableDataRowAdd.sId; + tableDataRowAdd.bDefault = false; + tableDataRowAdd.iOrder = 1; + slaveDataNew.push(tableDataRowAdd); + addState.slaveData = slaveDataNew; + // this.props.onSaveState({ slaveData: slaveDataNew }); + } else if (sModelsType.includes('sales/') || sModelsType.includes('cashier/') || sModelsType.includes('manufacture/')) { // 获取应收款 + if (commonUtils.isNotEmptyObject(masterData)) { + this.getCustomerReceipt({ masterData: returnData.masterData }); + } + } + } else if (sFieldName === 'sTestStandardId' || sFieldName === 'sTestStandardName') { + const { slaveDelData: slaveDelDataOld, slaveConfig, masterConfig } = this.props; + const dataUrl = `${commonConfig.server_host}eleteamemployee/getObtainInspectionStandards?sModelsId=${sModelsId}&sParentId=${returnData.masterData.sTestStandardId}`; + const dataReturn = (await commonServices.getService(this.props.app.token, dataUrl)).data; + const slaveDelData = commonUtils.isEmptyArr(slaveDelDataOld) ? [] : slaveDelDataOld; + if (dataReturn.code === 1) { + const returnSlaveData = dataReturn.dataset.rows; + if(commonUtils.isNotEmptyArr(slaveData)) { + slaveData.forEach((item) => { + item.handleType = 'del'; + slaveDelData.push(item); + }); + } + const slaveDataNew = []; + const newCopyTo = {}; + newCopyTo.master = masterData; + const iConfigIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'sTestStandardName'); + const iSqlIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === 'sActValue'); + returnSlaveData.forEach((item, iIndex) => { + let tableDataRow = commonFunc.getDefaultData(slaveConfig, {}); + tableDataRow.handleType = 'add'; + tableDataRow.sId = commonUtils.createSid(); + tableDataRow.sParentId = masterData && masterData.sId ? masterData.sId : null; + tableDataRow.key = tableDataRow.sId; + tableDataRow.iOrder = iIndex; + if (iConfigIndex > -1) { + tableDataRow = { ...tableDataRow, ...commonFunc.getAssignFieldValue(masterConfig.gdsconfigformslave[iConfigIndex].sAssignField, item, newCopyTo) }; // 取赋值字段 + // tableDataRow.sTestReference = '15S|20S'; + const sTestReference = tableDataRow.sTestReference; + const sParamObj = {}; + if (commonUtils.isNotEmptyObject(sTestReference)) { + if (sTestReference.indexOf('|') >= 0) { + sTestReference.split('|').forEach((itemField) => { + sParamObj[itemField] = itemField; + }); + tableDataRow.sParamDropDownsActValue = sParamObj; + if (iSqlIndex > -1) { + slaveConfig.gdsconfigformslave[iSqlIndex].sDropDownType = 'sql'; + } else { + slaveConfig.gdsconfigformslave[iSqlIndex].sDropDownType = ''; + } + } + } + } + slaveDataNew.push(tableDataRow); + }); + addState.slaveData = slaveDataNew; + } else { + this.props.getServiceError(dataReturn); + } + } else if (sFieldName === 'sPeriodID') { + const master = returnData.masterData; + let { handleType } = master; + handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + if (handleType === 'add') { /* 费用分摊单据新增时,选择不同月份,自动获取从表的数据 */ + const { sModelsId } = this.props; + let url = `${commonConfig.server_host}costCenter/getCostCenterData?sModelsId=${sModelsId}`; + const body = { + sPeriodId: changeValue.sPeriodID, + }; + /** + * 修改日期:2021-03-26 + * 修改人:吕杰 + * 区域:以下 4 行 + * BUG:2168 + * 说明:凭证导入表下主表月份切换从后台获取数据 + * 原代码: + */ + if (sModelsType === 'cashier/voucher') { + url = `${commonConfig.server_host}costCenter/getCosvoucherImportData?sModelsId=${sModelsId}`; + body.sWeek = masterDataOld.sWeek; + } + const dataReturn = (await commonServices.postValueService(app.token, body, url)).data; + if (dataReturn.code === 1) { + /* 获取数据集 */ + const { rows } = dataReturn.dataset; + const slaveDataNew = []; + rows.forEach((row) => { + /** + * 修改日期:2021-03-26 + * 修改人:吕杰 + * 区域:以下 13 行 + * BUG:2168 + * 说明:凭证导入表下主表月份切换从后台获取数据 + * 原代码: + */ + let tableDataRowAdd = row; + if (sModelsType === 'cashier/voucher') { + // 当主表中配置了转换信息时,对数据字段进行转换 + const index = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'Btnimport'); + if (index > -1) { + const newCopyTo = {}; + newCopyTo.master = masterData; + newCopyTo.slave = row; + const config = masterConfig.gdsconfigformslave[index]; + const slaveAssignField = config.sAssignField || ''; + tableDataRowAdd = { ...row, ...commonFunc.getAssignFieldValue(slaveAssignField, row, newCopyTo) }; + } + } + tableDataRowAdd.handleType = handleType; + tableDataRowAdd.sId = commonUtils.createSid(); + tableDataRowAdd.sParentId = masterData && masterData.sId ? masterData.sId : null; + tableDataRowAdd.key = tableDataRowAdd.sId; + tableDataRowAdd.bDefault = false; + slaveDataNew.push(tableDataRowAdd); + }); + addState.slaveData = slaveDataNew; + } else { /* 失败 */ + this.props.getServiceError(dataReturn); + return []; + } + } + } else if (sFieldName === 'sWeek' && sModelsType === 'cashier/voucher') { + /** + * 修改日期:2021-03-26 + * 修改人:吕杰 + * 区域:此if内 + * BUG:2168 + * 说明:凭证导入表下主表周期切换从后台获取数据 + * 原代码: + */ + const master = returnData.masterData; + let { handleType } = master; + handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + if (handleType === 'add') { /* 费用分摊单据新增时,选择不同月份,自动获取从表的数据 */ + const { sModelsId } = this.props; + const url = `${commonConfig.server_host}costCenter/getCosvoucherImportData?sModelsId=${sModelsId}`; + const body = { + sWeek: changeValue.sWeek, + sPeriodId: masterDataOld.sPeriodId, + }; + const dataReturn = (await commonServices.postValueService(app.token, body, url)).data; + if (dataReturn.code === 1) { + /* 获取数据集 */ + const { rows } = dataReturn.dataset; + const slaveDataNew = []; + rows.forEach((row) => { + let tableDataRowAdd = row; + // 当主表中配置了转换信息时,对数据字段进行转换 + const index = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'Btnimport'); + if (index > -1) { + const newCopyTo = {}; + newCopyTo.master = masterData; + newCopyTo.slave = row; + const config = masterConfig.gdsconfigformslave[index]; + const slaveAssignField = config.sAssignField || ''; + tableDataRowAdd = { ...row, ...commonFunc.getAssignFieldValue(slaveAssignField, row, newCopyTo) }; + } + tableDataRowAdd.handleType = handleType; + tableDataRowAdd.sId = commonUtils.createSid(); + tableDataRowAdd.sParentId = masterData && masterData.sId ? masterData.sId : null; + tableDataRowAdd.key = tableDataRowAdd.sId; + tableDataRowAdd.bDefault = false; + slaveDataNew.push(tableDataRowAdd); + }); + addState.slaveData = slaveDataNew; + } else { /* 失败 */ + this.props.getServiceError(dataReturn); + return []; + } + } + } + const models = name === 'materials' ? 'Materials' : + sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('print/') || sModelsType.includes('quotation/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + if (sModelsType.includes('purchase/') || sModelsType.includes('print/') || sModelsType.includes('quotation/') || sModelsType.includes('manufacture/') || sModelsType.includes('materialsStock/') || sModelsType.includes('outside/') || sModelsType.includes('quality/')) { + let masterData = await this.handleMaterialsChange(returnData.masterData, sModelsId, masterData, changeValue, sFieldName, app, token, models); + masterData = commonBusiness.getCalculateAllMoney(app, models, sFieldName, masterData, masterData); + if (sFieldName !== 'dPackQty') { + if (changeValue.dPackQty !== this.state.dPackQtyChange && changeValue.dPackQty !== undefined) { + masterData = commonBusiness.getCalculateAllMoney(app, models, 'dPackQty', masterData, masterData); + this.setState({ dPackQtyChange: changeValue.dPackQty }); + } + } + returnData = { ...returnData, masterData }; + } + if (isWait) { + return { ...returnData, ...addState, enabled: true }; + } else { + this.props.onSaveState({ ...returnData, ...addState, enabled: true }); + return returnData; + } + } + handleBtnPrint =async (sActiveId, checked, eKey) => { + const { + app, sModelsId, masterConfig, masterData, slaveConfig, sModelsType, reportData, menuChildData, formRoute, controlConfig, + } = this.props; + if (sModelsType.includes('manufacture/workOrder')) { + this.handleUpdateProduction(); + } + const { token } = app; + const queryFilter = {}; + queryFilter[masterConfig.sId] = { sId: masterData.sId }; + if (commonUtils.isNotEmptyObject(slaveConfig)) { + queryFilter[slaveConfig.sId] = { sSqlCondition: { sParentId: masterData.sId } }; + } + const queryFilterJson = JSON.stringify(queryFilter); + // const masterDataJson = JSON.stringify(masterData); + /* 拿到打印报表名称 */ + let printReportName = 'report'; + let printCustomerReportName = 'report'; + if (commonUtils.isNotEmptyArr(reportData)) { + const iIndex = reportData.findIndex(item => item.sId === sActiveId); + if (iIndex > -1) { + printReportName = reportData[iIndex].sReportName; + } + } + if (commonUtils.isNotEmptyArr(menuChildData)) { + const iIndex = menuChildData.findIndex(item => item.sId === sActiveId); + if (iIndex > -1) { + printCustomerReportName = menuChildData[iIndex].sReportName; + } + } + let urlPrint = ''; + if (formRoute === '/indexPage/printlabel') { + if (commonUtils.isNotEmptyObject(masterData) && masterData.dTrunkQty !== undefined && masterData.dFractionQty !== undefined && masterData.dPackQty !== undefined) { // masterData中必填的三个字段 + // const param = masterDataJson; + /* 把masterData放在数组中 */ + const ListData = []; + ListData.push(masterData); + const param = JSON.stringify(ListData); + if (eKey.indexOf('BtnPrint.') > -1) { + urlPrint = `${commonConfig.server_host}printReport/printPdf/${sActiveId}/${printReportName}.pdf?${checked ? 'fileType=.xlsx&' : ''}printType=noquery&sModelsId=${sModelsId}&token=${encodeURIComponent(token)}`; + } else if (eKey.indexOf('BtnPrintCus.') > -1) { + urlPrint = `${commonConfig.server_host}printReport/printPdf/${printCustomerReportName}?${checked ? 'fileType=.xlsx&' : ''}printType=noquery&sModelsId=${sModelsId}&token=${encodeURIComponent(token)}`; + } + /* Get提交地址栏参数过多,更改Get提交为Post提交 */ + this.handleOpenPost(urlPrint, param); + } else { + const dTrunkQtyName = masterConfig.gdsconfigformslave.filter(item => item.sName === 'dTrunkQty'); + const dFractionQtyName = masterConfig.gdsconfigformslave.filter(item => item.sName === 'dFractionQty'); + const dPackQtyName = masterConfig.gdsconfigformslave.filter(item => item.sName === 'dPackQty'); + if (masterData.dTrunkQty === undefined && commonUtils.isNotEmptyObject(dTrunkQtyName)) { + message.error(`${dTrunkQtyName[0].showName} 必填项!`); + } else if (masterData.dFractionQty === undefined && commonUtils.isNotEmptyObject(dFractionQtyName)) { + message.error(`${dFractionQtyName[0].showName} 必填项!`); + } else if (masterData.dPackQty === undefined && commonUtils.isNotEmptyObject(dPackQtyName)) { + message.error(`${dPackQtyName[0].showName} 必填项!`); + } + return; + } + } else if (eKey.indexOf('BtnPrint.') > -1) { + let { controlSelectedRowKeys } = this.props; + /* 不出现选择框,则打印全部;出现选择框,则打印勾选的 */ + let bisMutiSelect = false; + if (commonUtils.isNotEmptyObject(controlConfig) && commonUtils.isNotEmptyArr(controlConfig.gdsconfigformslave)) { + const filterData = controlConfig.gdsconfigformslave.filter(item => item.sControlName === 'bisMutiSelect'); + if (commonUtils.isNotEmptyArr(filterData)) { + bisMutiSelect = filterData[0].bVisible; + } + } + if (bisMutiSelect === false || bisMutiSelect === undefined) { + controlSelectedRowKeys = []; + } + urlPrint = `${commonConfig.server_host}printReport/printPdf/${sActiveId}/${printReportName}.pdf?${checked ? 'fileType=.xlsx&' : ''}sModelsId=${sModelsId}&sMaintableId=${masterConfig.sId}&sControlIds=${commonUtils.isNotEmptyArr(controlSelectedRowKeys) ? controlSelectedRowKeys : []}`; + } else if (eKey.indexOf('BtnPrintCus.') > -1) { + urlPrint = `${commonConfig.server_host}printReport/printPdf/${printCustomerReportName}?${checked ? 'fileType=.xlsx&' : ''}sModelsId=${sModelsId}&sMaintableId=${masterConfig.sId}`; + } + if (formRoute !== '/indexPage/printlabel') { + window.open(`${encodeURI(`${urlPrint}&queryFilter=${queryFilterJson}`)}&token=${encodeURIComponent(token)}`); + } + }; + handleOpenPost= (url, params) => { + const newWin = window.open(); + let formStr = ''; + formStr = `
    ` + + `` + + '
    '; + newWin.document.body.innerHTML = formStr; + newWin.document.forms[0].submit(); + return newWin; + } + + handleUpdateProduction = async () => { + const { sModelsId, masterData } = this.props; + const dataUrl = `${commonConfig.server_host}business/addUpdateDelBusinessData?sModelsId=${sModelsId}`; + const value = { + data: [{ + sTable: 'mftworkordermaster', + column: [{ handleType: 'update', sId: masterData.sId, bProduction: 1 }], + }], + sClientType: '1', + }; + const dataReturn = (await commonServices.postValueService(this.props.app.token, value, dataUrl)).data; + if (dataReturn.code === 1) { + message.success(dataReturn.msg); + } else { + this.props.getServiceError(dataReturn); + } + }; + + handleTitleChange = (slavePagination) => { + this.props.onSaveState({ slavePagination }); + }; + + handleTitleChange1 = (name, slavePagination, filters, sorter) => { + this.props.onSaveState({ [`${name}Pagination`]: slavePagination }); + const { + slaveConfig, slaveFilterCondition, sGroupByList,[`${name}Config`] : tableConfig, [`${name}FilterCondition`]: tableFilterCondition, + } = this.props; + let bGetData = true; + if (commonUtils.isNotEmptyObject(filters)) { + for (const key of Object.keys(filters)) { + if (commonUtils.isNotEmptyArr(filters[key])) { + bGetData = false; + break; + } + } + } + if (!bGetData) return; + const { treeFilterCondition } = this.props;/* 树过滤条件 */ + const sort = sorter.order === 'ascend' ? 'asc' : 'desc'; + const slaveOrderBy = Object.keys(sorter).length > 0 ? { [sorter.columnKey]: sort } : ''; // 后端未支持空对象, 先用空表示 + if (commonUtils.isNotEmptyArr(treeFilterCondition)) { /* 判断是否有树过滤条件 */ + this.handleGetData(slaveConfig, slaveFilterCondition, slavePagination.current, slavePagination.pageSize, slaveOrderBy, '', sGroupByList, '', treeFilterCondition); + } else { + this.handleGetDataOne(name, tableConfig, slaveFilterCondition, slavePagination.current, slavePagination.pageSize, slaveOrderBy); + // this.handleGetData(slaveConfig, slaveFilterCondition, slavePagination.current, slavePagination.pageSize, slaveOrderBy, '', sGroupByList, '', treeFilterCondition, + // slave0Config, slave1Config, slave2Config, slave3Config, slave4Config, slave5Config, slave6Config, slave7Config, slave8Config, slave9Config, slave10Config, + // slave11Config, slave12Config, slave13Config, slave14Config, slave15Config); + } + }; + + /* 工单、工艺卡、报价单控制表回带图片地址 */ + handleFilfileManageOk= async (controlFilfileData, controlFilfileDelData, sSrcSlaveId) => { + const { + controlData: tableData, app, sModelsId, token, controlConfig, + } = this.props; + if (commonUtils.isNotEmptyObject(sSrcSlaveId)) { + if (commonUtils.isNotEmptyArr(controlFilfileDelData)) { + const addState = {}; + const iIndex = tableData.findIndex(item => item.sId === sSrcSlaveId); + if (iIndex > -1) { + const tableDataNewRow = tableData[iIndex]; + const { sMaterialsPicturePath, sMachinePicturePath } = tableDataNewRow; + const controlsMaterialsPictureDelData = controlFilfileDelData.filter(item => item.sType === '3'); /* 开料 */ + if (commonUtils.isNotEmptyArr(controlsMaterialsPictureDelData)) { + controlsMaterialsPictureDelData.forEach((slaveItem) => { + if (slaveItem.sPicturePath === sMaterialsPicturePath) { + addState.sMaterialsPicturePath = ''; + } + }); + } + const sMachinePictureDelPath = controlFilfileDelData.filter(item => item.sType === '4'); /* 联版 */ + if (commonUtils.isNotEmptyArr(sMachinePictureDelPath)) { + sMachinePictureDelPath.forEach((slaveItem) => { + if (slaveItem.sPicturePath === sMachinePicturePath) { + addState.sMachinePicturePath = ''; + } + }); + } + if (commonUtils.isNotEmptyObject(addState) && (addState.sMachinePicturePath === '' || addState.sMaterialsPicturePath === '')) { + tableData[iIndex] = { ...tableDataNewRow, ...addState }; + const data = []; + const updataData = {}; + const updateWhere = {}; + const column = {}; + if (addState.sMaterialsPicturePath === '') { + column.sMaterialsPicturePath = addState.sMaterialsPicturePath; + } + if (addState.sMachinePicturePath === '') { + column.sMachinePicturePath = addState.sMachinePicturePath; + } + if (commonUtils.isNotEmptyObject(tableDataNewRow.sId) && commonUtils.isNotEmptyObject(column)) { + updateWhere.sId = tableDataNewRow.sId; + updataData.sTable = controlConfig.sTbName; + updataData.sWhere = updateWhere; + updataData.column = column; + data.push(updataData); + /* 调用接口将图片地址存入控制表 */ + const configUrl = `${commonConfig.server_host}business/updateBusinessData?sModelsId=${sModelsId}`; + const value = { + data, + sClientType: '1', + }; + const dataReturn = (await commonServices.postValueService(token, value, configUrl)).data; + if (dataReturn.code === 1) { + /* 刷新 */ + if (this.props.app.currentPane.refresh !== undefined) { + this.props.app.currentPane.refresh(); + } + } else { + this.getServiceError(dataReturn); + } + } + } + } + } + if (commonUtils.isNotEmptyArr(controlFilfileData)) { + const addState = {}; + const iIndex = tableData.findIndex(item => item.sId === sSrcSlaveId); + if (iIndex > -1) { + const tableDataNewRow = tableData[iIndex]; + const { sMaterialsPicturePath, sMachinePicturePath } = tableDataNewRow; + const controlsMaterialsPictureData = controlFilfileData.filter(item => item.sType === '3'); + if (commonUtils.isNotEmptyArr(controlsMaterialsPictureData)) { + addState.sMaterialsPicturePath = commonUtils.isNotEmptyObject(controlsMaterialsPictureData[0].sPicturePath) ? controlsMaterialsPictureData[0].sPicturePath : ''; /* 上机默认取上传图片的第一条 */ + } + const controlsMachinePictureData = controlFilfileData.filter(item => item.sType === '4'); + if (commonUtils.isNotEmptyArr(controlsMachinePictureData)) { + addState.sMachinePicturePath = commonUtils.isNotEmptyObject(controlsMachinePictureData[0].sPicturePath) ? controlsMachinePictureData[0].sPicturePath : ''; + } + if (commonUtils.isNotEmptyObject(addState)) { + tableData[iIndex] = { ...tableDataNewRow, ...addState }; + const data = []; + const updataData = {}; + const updateWhere = {}; + const column = {}; + if (commonUtils.isNotEmptyObject(addState.sMaterialsPicturePath) && addState.sMaterialsPicturePath !== sMaterialsPicturePath) { + column.sMaterialsPicturePath = addState.sMaterialsPicturePath; + } + if (commonUtils.isNotEmptyObject(addState.sMachinePicturePath) && addState.sMachinePicturePath !== sMachinePicturePath) { + column.sMachinePicturePath = addState.sMachinePicturePath; + } + if (commonUtils.isNotEmptyObject(tableDataNewRow.sId) && commonUtils.isNotEmptyObject(column)) { + updateWhere.sId = tableDataNewRow.sId; + updataData.sTable = controlConfig.sTbName; + updataData.sWhere = updateWhere; + updataData.column = column; + data.push(updataData); + /* 调用接口将图片地址存入控制表 */ + const configUrl = `${commonConfig.server_host}business/updateBusinessData?sModelsId=${sModelsId}`; + const value = { + data, + sClientType: '1', + }; + const dataReturn = (await commonServices.postValueService(token, value, configUrl)).data; + if (dataReturn.code === 1) { + this.props.onSaveState({ tableData }); + /* 刷新 */ + if (this.props.app.currentPane.refresh !== undefined) { + this.props.app.currentPane.refresh(); + } + } else { + this.getServiceError(dataReturn); + } + } + } + } + } + } else { + return message.warning(commonFunc.showMessage(app.commonConst, 'selectedRowKeysNo')); + } + } + // 收付款分摊 + handleShare = () => { + /* 分摊 */ + const { + sModelsType, masterData: masterDataOld, slaveData: slaveDataOld, app, + } = this.props; + if ((sModelsType.includes('cashier/receipt') && masterDataOld.sBillType !== 'customer') || + (sModelsType.includes('cashier/payment') && masterDataOld.sBillType !== 'supply')) { + return masterDataOld; + } + const { dNetMoney } = app.decimals; + const masterData = { ...masterDataOld }; + const slaveData = []; + if (commonUtils.isNotEmptyArr(slaveDataOld) && slaveDataOld.length > 0) { + slaveDataOld.forEach((item) => { + slaveData.push({ ...item }); + }); + } + + const dTotalMoney = masterData.dTotalMoney !== undefined ? masterData.dTotalMoney : 0; + let minusSum = 0; /* 负数求和 */ + let minusRoundingSum = 0; /* 负数舍入求和 */ + const minusData = []; /* 负数集 */ + let positiveSum = 0; /* 正数求和 */ + let positiveRoundingSum = 0; /* 正数舍入求和 */ + const positiveData = []; /* 正数集 */ + if (commonUtils.isNotEmptyArr(slaveData) && slaveData.length > 0) { + slaveData.forEach((child) => { + child.dTotalMoney = 0; + child.handleType = commonUtils.isEmpty(child.handleType) ? 'update' : child.handleType; + child.dRoundingMoney = commonUtils.isNum(child.dRoundingMoney) ? child.dRoundingMoney : 0; + child.dBalanceMoney = commonUtils.convertFixNum(child.dBalanceMoney, dNetMoney); /* 根据系统设定位数格式未付款金额*/ + if (child.dBalanceMoney < 0) { + minusSum -= Math.abs(child.dBalanceMoney); + minusRoundingSum -= Math.abs(child.dRoundingMoney); + minusData.push(child); + } else { + const positiveSumTemp = commonUtils.convertFixNum(child.dBalanceMoney, dNetMoney) + commonUtils.convertFixNum(positiveSum, dNetMoney); + positiveSum = commonUtils.convertFixNum(positiveSumTemp, dNetMoney); + const positiveRoundingSumTemp = commonUtils.convertFixNum(child.dRoundingMoney, dNetMoney) + commonUtils.convertFixNum(positiveRoundingSum, dNetMoney); + positiveRoundingSum = commonUtils.convertFixNum(positiveRoundingSumTemp, dNetMoney); + positiveData.push(child); + } + }); + } + if (commonUtils.convertFixNum(((minusSum - minusRoundingSum) + (positiveSum - positiveRoundingSum)) - dTotalMoney, dNetMoney) <= 0) { + /* 够扣 */ + positiveSum -= minusRoundingSum; + positiveSum -= positiveRoundingSum; + positiveSum -= dTotalMoney; /* 去除分摊金额 */ + if (positiveSum >= 0) { + for (let i = 0; i < minusData.length; i += 1) { + /* 负数遍历 */ + const dBalanceMoney = Math.abs(minusData[i].dBalanceMoney); /* 余额正数 */ + const dRoundingMoney = minusData[i].dRoundingMoney !== undefined + ? minusData[i].dRoundingMoney + : 0; + if (positiveSum <= dBalanceMoney) { + minusData[i].dTotalMoney = commonUtils.convertFixNum(-(positiveSum) - (dRoundingMoney * 1), dNetMoney); + if (minusData[i].handleType === undefined) { + minusData[i].handleType = commonUtils.isEmpty(minusData[i].handleType) ? 'update' : minusData[i].handleType; + } + break; + } else { + minusData[i].dTotalMoney = commonUtils.convertFixNum(-(dBalanceMoney * 1) - (dRoundingMoney * 1), dNetMoney); + positiveSum -= dBalanceMoney - (dRoundingMoney * 1); + if (minusData[i].handleType === undefined) { + minusData[i].handleType = commonUtils.isEmpty(minusData[i].handleType) ? 'update' : minusData[i].handleType; + } + } + } + for (let i = 0; i < positiveData.length; i += 1) { + /* 正数遍历 */ + const { dBalanceMoney } = positiveData[i]; /* 余额正数 */ + const dRoundingMoney = positiveData[i].dRoundingMoney !== undefined + ? positiveData[i].dRoundingMoney + : 0; + positiveData[i].dTotalMoney = commonUtils.convertFixNum((dBalanceMoney * 1) - (dRoundingMoney * 1), dNetMoney); + if (positiveData[i].handleType === undefined) { + positiveData[i].handleType = commonUtils.isEmpty(positiveData[i].handleType) ? 'update' : positiveData[i].handleType; + } + } + masterData.dAdvanceMoney = 0; + masterData.bAdvance = false; + } else { + /* 有预收 */ + for (let i = 0; i < positiveData.length; i += 1) { + /* 正数遍历 */ + const { dBalanceMoney } = positiveData[i]; /* 余额正数 */ + const dRoundingMoney = positiveData[i].dRoundingMoney !== undefined + ? positiveData[i].dRoundingMoney + : 0; + positiveData[i].dTotalMoney = commonUtils.convertFixNum((dBalanceMoney * 1) - (dRoundingMoney * 1), dNetMoney); + positiveData[i].handleType = commonUtils.isEmpty(positiveData[i].handleType) ? 'update' : positiveData[i].handleType; + } + for (let i = 0; i < minusData.length; i += 1) { + /* 负数遍历 */ + minusData[i].dRoundingMoney = 0; + minusData[i].handleType = commonUtils.isEmpty(minusData[i].handleType) ? 'update' : minusData[i].handleType; + } + masterData.dAdvanceMoney = commonUtils.convertFixNum(Math.abs(positiveSum), dNetMoney); + masterData.bAdvance = true; + } + const dCurrencyRate = commonUtils.convertIsNotNumToNumber1(masterData.dCurrencyRate); /* 汇率 */ + /* 分摊算外币金额 */ + if (commonUtils.isNotEmptyArr(slaveData) && slaveData.length > 0) { + slaveData.forEach((item, index) => { + slaveData[index].dTotalForeignMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? item.dTotalMoney / dCurrencyRate : 0, dNetMoney); + }); + } + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType; + if (commonUtils.isNotEmptyNumber(masterData.dTotalMoney)) { + masterData.dProductForeignMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? masterData.dTotalMoney / dCurrencyRate : 0, dNetMoney); + } + this.props.onSaveState({ masterData, slaveData }); + } else if (((minusSum - minusRoundingSum) + (positiveSum - positiveRoundingSum)) - dTotalMoney > 0) { + /* 不够扣情况 */ + minusSum -= minusRoundingSum; + minusSum -= positiveRoundingSum; + minusSum -= dTotalMoney; /* 去除分摊金额 */ + for (let i = 0; i < minusData.length; i += 1) { + /* 负数遍历 */ + const dBalanceMoney = Math.abs(minusData[i].dBalanceMoney); /* 余额正数 */ + const dRoundingMoney = minusData[i].dRoundingMoney !== undefined + ? minusData[i].dRoundingMoney + : 0; + minusData[i].dTotalMoney = commonUtils.convertFixNum(-(dBalanceMoney * 1) - (dRoundingMoney * 1), dNetMoney); + minusData[i].handleType = commonUtils.isEmpty(minusData[i].handleType) ? 'update' : minusData[i].handleType; + } + for (let i = 0; i < positiveData.length; i += 1) { + /* 正数遍历 */ + const { dBalanceMoney } = positiveData[i]; /* 余额正数 */ + const dRoundingMoney = positiveData[i].dRoundingMoney !== undefined + ? positiveData[i].dRoundingMoney + : 0; + if (Math.abs(minusSum) <= dBalanceMoney) { + positiveData[i].dTotalMoney = commonUtils.convertFixNum(Math.abs(minusSum) - (dRoundingMoney * 1), dNetMoney); + positiveData[i].handleType = commonUtils.isEmpty(positiveData[i].handleType) ? 'update' : positiveData[i].handleType; + break; + } else { + positiveData[i].dTotalMoney = commonUtils.convertFixNum((dBalanceMoney * 1) - (dRoundingMoney * 1), dNetMoney); + minusSum = -(Math.abs(minusSum) - (dBalanceMoney * 1)); // - (dRoundingMoney * 1) + positiveData[i].handleType = commonUtils.isEmpty(positiveData[i].handleType) ? 'update' : positiveData[i].handleType; + } + } + const dCurrencyRate = commonUtils.convertIsNotNumToNumber1(masterData.dCurrencyRate); /* 汇率 */ + /* 分摊算外币金额 */ + if (commonUtils.isNotEmptyArr(slaveData) && slaveData.length > 0) { + slaveData.forEach((item, index) => { + slaveData[index].dTotalForeignMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? item.dTotalMoney / dCurrencyRate : 0, dNetMoney); + }); + } + masterData.dAdvanceMoney = 0; + masterData.bAdvance = false; + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType; /* 主表分摊算外币金额 */ + if (commonUtils.isNotEmptyNumber(masterData.dTotalMoney)) { + masterData.dProductForeignMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? masterData.dTotalMoney / dCurrencyRate : 0, dNetMoney); + } + this.props.onSaveState({ masterData, slaveData }); + } + // let allTotalMoney = 0; + // let allRoundingMoney = 0; + // slaveData.forEach((child) => { + // if (child.dTotalMoney !== undefined) { + // allTotalMoney += child.dTotalMoney * 1; + // } + // if (child.dRoundingMoney !== undefined) { + // allRoundingMoney += child.dRoundingMoney * 1; + // } + // }); + // this.props.onSaveState({ allTotalMoney, allRoundingMoney }); + return masterData; + }; + + handleImport = async (num) => { + const { + sModelsId, sModelsType, masterConfig, masterData, slaveData, slaveDelData: slaveDelDataOld, app, + } = this.props; + if (commonUtils.isEmpty(masterData.sWareHouseId)) { + message.error(commonFunc.getConfigShowName(masterConfig, 'sWareHouseId') + commonFunc.showMessage(app.commonConst, 'isNotNull')); // 不能为空! + return; + } + let url; + if (sModelsType.includes('productStock/')) { + url = `${commonConfig.server_host}eleProductStock/getEleProductStock?sModelsId=${sModelsId}&sWareHouseId=${masterData.sWareHouseId}&num=${num}`; + } else { + url = `${commonConfig.server_host}eleMaterialsStock/getEleMaterialsStock?sModelsId=${sModelsId}&sWareHouseId=${masterData.sWareHouseId}&num=${num}`; + } + + const dataReturn = (await commonServices.getService(this.props.app.token, url)).data; + if (dataReturn.code === 1) { + const returnData = dataReturn.dataset.rows; + const slaveDelData = commonUtils.isEmptyArr(slaveDelDataOld) ? [] : slaveDelDataOld; + slaveData.forEach((item) => { + item.handleType = 'del'; + slaveDelData.push({ ...item }); + }); + returnData.forEach((item, index) => { + const tableDataRow = this.handleTableAdd('slave', true); + item.handleType = 'add'; + item.sParentId = masterData.sId; + item.iOrder = index + 1; + returnData[index] = { ...tableDataRow, ...item }; + }); + this.props.onSaveState({ slaveData: returnData, slaveDelData }); + } else { + this.props.getServiceError(dataReturn); + } + this.props.onSaveState({ isGetDataVisible: false }); + }; + + handleOutTemplate = async () => { + const { + token, formData, + } = this.props; + const slaveConfig = formData.filter(item => item.sGrd === 'importTemplate')[0]; + window.location.href = `${commonConfig.server_host}import/exportTemplet?gdsconfigformmasterId=${slaveConfig.sId}&token=${token}`; + }; + + /* 导出模版数据 */ + handleOutTemplateData = async () => { + const { + slaveConfig, formRoute, masterData, sortedInfo, + } = this.props; + const sort = commonUtils.isNotEmptyObject(sortedInfo) ? sortedInfo.order === 'ascend' ? 'asc' : 'desc' : ''; + const slaveOrderBy = commonUtils.isNotEmptyObject(sortedInfo) && Object.keys(sortedInfo).length > 0 ? { [sortedInfo.columnKey]: sort } : ''; // + const sId = commonUtils.isNotEmptyObject(masterData) ? masterData.sId : ''; + if (commonUtils.isNotEmptyObject(sId)) { + const sSqlCondition = { sParentId: sId }; + let url = `${commonConfig.server_host}excel/export/${slaveConfig.sId}?sModelsId=${slaveConfig.sParentId}&token=${this.props.app.token}&sName=${formRoute}`; + if (commonUtils.isNotEmptyObject(sSqlCondition)) { + url = `${url}&sSqlCondition=${encodeURIComponent(JSON.stringify(sSqlCondition))}`; + } + if (slaveOrderBy !== undefined && slaveOrderBy !== '' && Object.keys(slaveOrderBy).length > 0) { + url = `${url}&sFilterOrderBy=${encodeURIComponent(JSON.stringify(slaveOrderBy))}`; + } + window.open(url); + } else { + message.warn('没有主表数据!'); + } + }; + + + /* 导入未清数据 */ + handleImportFormData = () => { + const { masterData, sModelsType } = this.props; + if (commonUtils.isNotEmptyObject(masterData)) { + let bFilterProValue = ''; + let bFilterProName = ''; + if (sModelsType === 'cashier/payment') { /* 付款单 */ + const { sSupplyName, sSupplyId } = masterData; + if (commonUtils.isEmptyObject(sSupplyName)) { + message.error('供应商名称不能为空!'); + return; + } else { + bFilterProName = 'sSupplyGuid_pro'; + bFilterProValue = sSupplyId; + } + } else if (sModelsType === 'cashier/receipt') { /* 收款单 */ + const { sCustomerName, sCustomerId } = masterData; + if (commonUtils.isEmptyObject(sCustomerName)) { + message.error('客户名称不能为空!'); + return; + } else { + bFilterProName = 'sCustomerGuid_pro'; + bFilterProValue = sCustomerId; + } + } + this.props.onSaveState({ importFormDataVisible: true, bFilterProName, bFilterProValue }); + } + } + handleDesignFunction = () => { + this.props.onSaveState({ visibleStatement: true }); + }; + handleBatchPriceUpdate = () => { + const { slaveData, slaveSelectedRowKeys, app } = this.props; + if (slaveSelectedRowKeys === undefined || slaveSelectedRowKeys.length !== 1) { + return message.warning(commonFunc.showMessage(app.commonConst, 'selectedRowKeysNo'));/* 请选择一条数据进行操作 */ + } else { + const batchPriceUpdateData = slaveData.filter(item => item.sId === slaveSelectedRowKeys[0]); + this.props.onSaveState({ batchPriceUpdateData, visibleBatchPriceUpdate: true }); + } + }; + + /* 有外币时,配置BtnBatchNPriceUpdate, 会调用这个方法 */ + handleBatchNPriceUpdate = () => { + const { slaveData, slaveSelectedRowKeys, app } = this.props; + if (slaveSelectedRowKeys === undefined || slaveSelectedRowKeys.length !== 1) { + return message.warning(commonFunc.showMessage(app.commonConst, 'selectedRowKeysNo'));/* 请选择一条数据进行操作 */ + } else { + const batchNPriceUpdateData = slaveData.filter(item => item.sId === slaveSelectedRowKeys[0]); + this.props.onSaveState({ batchNPriceUpdateData, visibleBatchNPriceUpdate: true }); + } + }; + + /** 按钮操作事件 */ + handleButtonClick = async (name) => { + if (name === 'BtnDesignFunction') { + this.handleDesignFunction(); + } else if (name === 'BtnBatchPriceUpdate') { + this.handleBatchPriceUpdate(); + } else if (name === 'BtnBatchNPriceUpdate') { + this.handleBatchNPriceUpdate(); + } else if (name === 'BtnOutTemplate') { + this.handleOutTemplate(); + } else if (name === 'BtnOutTemplateData') { /* 导出模版数据 */ + this.handleOutTemplateData(); + }else if (name === 'BtnShowAll') { /* 显示全部部件 */ + this.handleTableCancelSelect('slave'); + } else if (name === 'BtnShowControl') { /* 显示部件层级 */ + const { controlData } = this.props; + const expandedRowKeys =[]; + if(commonUtils.isNotEmptyArr(controlData)) { /* 当显示全部时 展开所有部件层级 */ + controlData.forEach((item) => { + const { sId } = item; + expandedRowKeys.push(sId); + }); + } + this.props.onSaveState({ showAllTreeVisible: true, controlShowExpandedRowKeys: { expandedRowKeys: expandedRowKeys } }); + } else if (name === 'BtnRefresh') { + if (this.props.app.currentPane.refresh !== undefined) { + this.props.app.currentPane.refresh(); + } + const { masterConfig, slaveConfig, checkConfig } = this.props; + this.handleGetData(masterConfig, slaveConfig, checkConfig); + } else if(name && name.includes('BtnTempSql')) { /* 通过BtnTempSql按钮 自定义调用Sql 并将数据回填到界面上 */ + const { masterConfig, slaveConfig, sModelsId, token } = this.props; + let { masterData,slaveData } = this.props; + const slave0Data = []; + const slave1Data = []; + const slave2Data = []; + const slave3Data = []; + const slave4Data = []; + const copyTo ={}; + copyTo.name = name; + copyTo.slaveData = slaveData; + const buttonConfigArr = masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName && item.sControlName.includes('BtnTempSql')); + const allConfig = { + slaveConfig, masterConfig, + }; + if(commonUtils.isNotEmptyArr(buttonConfigArr)) { + copyTo.config = buttonConfigArr; + const sTmpInfoConfig = buttonConfigArr.filter(item => item.sControlName && item.sControlName.includes('BtnTempSql'))[0]; + const sControlName = sTmpInfoConfig.sControlName; + const dataUrl = `${commonConfig.server_host}salesorder/getTmpInfoBySql/?sModelsId=${sModelsId}`; + const sConfigformId = commonUtils.isEmpty(sTmpInfoConfig) ? '' : sTmpInfoConfig.sParentId; + if (commonUtils.isNotEmptyObject(sTmpInfoConfig)) { + const newCopyTo = {}; + newCopyTo.master = copyTo.masterData; + newCopyTo.slave = commonUtils.isEmpty(copyTo.slaveData) ? [] : copyTo.slaveData[0]; + // const sRowData = copyTo.slaveData; + const sRowData = [masterData]; + const condition = { sConfigformId, sControlName, sRowData }; + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; + if (dataReturn.code === 1) { + slaveData = []; + const returnData = dataReturn.dataset.rows[0]; + const copyToMasterDetailConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.masterdetail`.toLowerCase()); + const copyToSlaveConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.slave`.toLowerCase()); + const copyToSlaveDetailConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.slavedetail`.toLowerCase()); + const copyToSlave1Config = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.slave1`.toLowerCase()); + const copyToSlave0Config = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.slave0`.toLowerCase()); + const copyToSlave2Config = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.slave2`.toLowerCase()); + const copyToSlava3Config = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.slava3`.toLowerCase()); + const copyToSlava4Config = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.slava4`.toLowerCase()); + const masterDetailAssignField = commonUtils.isNotEmptyArr(copyToMasterDetailConfig) ? copyToMasterDetailConfig[0].sAssignField : ''; + const salveDetailAssignField = commonUtils.isNotEmptyArr(copyToSlaveDetailConfig) ? copyToSlaveDetailConfig[0].sAssignField : ''; + const salveAssignField = commonUtils.isNotEmptyArr(copyToSlaveConfig) ? copyToSlaveConfig[0].sAssignField : ''; + const slave1AssignField = commonUtils.isNotEmptyArr(copyToSlave1Config) ? copyToSlave1Config[0].sAssignField : ''; + const slave0AssignField = commonUtils.isNotEmptyArr(copyToSlave0Config) ? copyToSlave0Config[0].sAssignField : ''; + const slave2AssignField = commonUtils.isNotEmptyArr(copyToSlave2Config) ? copyToSlave2Config[0].sAssignField : ''; + const slave3AssignField = commonUtils.isNotEmptyArr(copyToSlava3Config) ? copyToSlava3Config[0].sAssignField : ''; + const slave4AssignField = commonUtils.isNotEmptyArr(copyToSlava4Config) ? copyToSlava4Config[0].sAssignField : ''; + if (commonUtils.isNotEmptyArr(returnData.master) && masterDetailAssignField) { + masterData = { ...masterData, ...commonFunc.getAssignFieldValue(masterDetailAssignField, returnData.master[0], newCopyTo) }; + } + if (commonUtils.isNotEmptyArr(returnData.slave)) { + returnData.slave.forEach((slaveItem) => { + newCopyTo.slave = slaveItem; + let slaveRow = commonFunc.getDefaultData(allConfig.slaveConfig, newCopyTo); // 取默认值 + if (salveDetailAssignField) { + slaveRow = { ...slaveRow, ...commonFunc.getAssignFieldValue(salveDetailAssignField, copyTo.masterData, newCopyTo) }; + } else if (salveAssignField) { + slaveRow = { ...slaveRow, ...commonFunc.getAssignFieldValue(salveAssignField, slaveItem, newCopyTo) }; // 取赋值字段 + } + slaveRow.handleType = 'add'; + slaveRow.sId = commonUtils.createSid(); + slaveRow.sParentId = masterData.sId; + slaveData.push(slaveRow); + }); + } + + if (commonUtils.isNotEmptyArr(returnData.slave0)) { + returnData.slave0.forEach((slave0Item) => { + newCopyTo.slave0 = slave0Item; + let slave0Row = commonFunc.getDefaultData(allConfig.slave0Config, newCopyTo); // 取默认值 + slave0Row = { ...slave0Row, ...commonFunc.getAssignFieldValue(slave0AssignField, slave0Item, newCopyTo) }; // 取赋值字段 + slave0Row.handleType = 'add'; + slave0Row.sId = commonUtils.createSid(); + slave0Row.sParentId = masterData.sId; + slave0Data.push(slave0Row); + }); + } + + if (commonUtils.isNotEmptyArr(returnData.slave1)) { + returnData.slave1.forEach((slave1Item) => { + newCopyTo.slave1 = slave1Item; + let slave1Row = commonFunc.getDefaultData(allConfig.slave1Config, newCopyTo); // 取默认值 + slave1Row = { ...slave1Row, ...commonFunc.getAssignFieldValue(slave1AssignField, slave1Item, newCopyTo) }; // 取赋值字段 + slave1Row.handleType = 'add'; + slave1Row.sId = commonUtils.createSid(); + slave1Row.sParentId = masterData.sId; + slave1Data.push(slave1Row); + }); + } + + if (commonUtils.isNotEmptyArr(returnData.slave2)) { + returnData.slave2.forEach((slave2Item) => { + newCopyTo.slave2 = slave2Item; + let slave2Row = commonFunc.getDefaultData(allConfig.slave2Config, newCopyTo); // 取默认值 + slave2Row = { ...slave2Row, ...commonFunc.getAssignFieldValue(slave2AssignField, slave2Item, newCopyTo) }; // 取赋值字段 + slave2Row.handleType = 'add'; + slave2Row.sId = commonUtils.createSid(); + slave2Row.sParentId = masterData.sId; + slave2Data.push(slave2Row); + }); + } + + if (commonUtils.isNotEmptyArr(returnData.slave3)) { + returnData.slave3.forEach((slave3Item) => { + newCopyTo.slave3 = slave3Item; + let slave3Row = commonFunc.getDefaultData(allConfig.slave3Config, newCopyTo); // 取默认值 + slave3Row = { ...slave3Row, ...commonFunc.getAssignFieldValue(slave3AssignField, slave3Item, newCopyTo) }; // 取赋值字段 + slave3Row.handleType = 'add'; + slave3Row.sId = commonUtils.createSid(); + slave3Row.sParentId = masterData.sId; + slave3Data.push(slave3Row); + }); + } + + if (commonUtils.isNotEmptyArr(returnData.slave4)) { + returnData.slave4.forEach((slave4Item) => { + newCopyTo.slave4 = slave4Item; + let slave4Row = commonFunc.getDefaultData(allConfig.slave4Config, newCopyTo); // 取默认值 + slave4Row = { ...slave4Row, ...commonFunc.getAssignFieldValue(slave4AssignField, slave4Item, newCopyTo) }; // 取赋值字段 + slave4Row.handleType = 'add'; + slave4Row.sId = commonUtils.createSid(); + slave4Row.sParentId = masterData.sId; + slave4Data.push(slave4Row); + }); + } + this.props.onSaveState({ slaveData, slave1Data, slave2Data, slave3Data, slave4Data}); + } else { + this.props.getServiceError(dataReturn); + } + } + } else { + message.error('请正确配置自定义按钮!'); + } + }else if (name && name.includes('BtnCalc')) { /* 实现通用计算功能 */ + const { masterConfig, masterData, sModelsId, } = this.props; + const btnConfig = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => (item.sControlName === name))) ? + masterConfig.gdsconfigformslave.filter(item => (item.sControlName === name))[0] : {};// sButtonEnabled sButtonParam + if(commonUtils.isNotEmptyObject(btnConfig)) { + /* 组装allTableData */ + const allTableMap ={}; + const allReturnMap ={}; + const slaveNameList = []; + /* 从props找到 所有的Config */ + if(commonUtils.isNotEmptyArr(this.props)) { + for (const key of Object.keys(this.props)) { + if(key.includes('Config') && !key.includes('onGet') && !key.includes('report')) { + const tablename = key.replace('Config', '').trim(); + slaveNameList.push(tablename); + } + } + } + + if (commonUtils.isNotEmptyArr(slaveNameList)) { + slaveNameList.forEach((name, index) => { + const tableConfig = this.props[name +'Config']; /* 动态配置 */ + const tableData = this.props[name +'Data']; /* 动态配置 */ + const tableSelectedRowKeys = this.props[name + 'SelectedRowKeys']; /* 选中Key */ + allTableMap[name +'.'+ tableConfig.sTbName] = tableData + }) + const masterTbName = masterConfig.sTbName; + allTableMap['master.'+ masterTbName] = masterData; + } + const sButtonParam = btnConfig.sButtonParam; + const btn = JSON.parse(sButtonParam); + const sProName = btn.sproName; + const url = `${commonConfig.server_host}calcprocedure/calc?sModelsId=${sModelsId}`; + const value = { + sProName, + sButtonParam, + allTableMap + }; + const dataReturn = (await commonServices.postValueService(this.props.app.token, value, url)).data; + if (dataReturn.code === 1) { + /* 数据操作 数据回传页面 */ + message.success('操作成功!'); + const returnData = dataReturn.dataset.rows[0]; + if (commonUtils.isNotEmptyArr(slaveNameList) && commonUtils.isNotEmptyObject(returnData)) { + slaveNameList.forEach((name, index) => { + const tableConfig = this.props[name +'Config']; /* 动态配置 */ + let tableData = []; + if(commonUtils.isNotEmptyObject(tableConfig)) { + console.log('666', name +'.'+ tableConfig.sTbName); + tableData = returnData[name +'.'+ tableConfig.sTbName]; /* 动态配置 */ + } + allReturnMap[name +'Data'] = tableData; + }); + const masterTbName = masterConfig.sTbName; + allReturnMap.master = returnData['master.'+ masterTbName]; + } + this.props.onSaveState({ ...allReturnMap }); + } else { /* 失败 */ + this.props.getServiceError(dataReturn); + } + + } + } + const { sModelsType } = this.props; + // 收付款分摊 + if (sModelsType.includes('cashier/') || sModelsType.includes('sales/') || sModelsType.includes('purchase/')) { + if (name === 'BtnShare') { + this.handleShare(); + } + if (sModelsType.includes('cashier/') && name === 'BtnImportFormData') { /* 导入未清数据 */ + this.handleImportFormData(name); + } + } else if (sModelsType.includes('materialsStock/') || sModelsType.includes('productStock/')) { + if (name === 'BtnImport') { + this.props.onSaveState({ isGetDataVisible: true }); + } + } + }; + + handleBtnChoose = async (name, sControlName, chooseConfig, recordIndex, tableName) => { + const { token } = this.props; + const url = `${commonConfig.server_host}/gdsmodule/getGdsmoduleById/${chooseConfig.sActiveId}?sModelsId=${chooseConfig.sActiveId}`; + const dataReturn = (await commonServices.getService(token, url)).data; + if (dataReturn.code === 1) { + const [returnData] = dataReturn.dataset.rows; + this.props.onSaveState({ + [`${name}ChooseVisible`]: true, [`${name}ChooseData`]: returnData, slaveSelectedIndex: recordIndex, tableName, + }); + } else { + this.props.getServiceError(dataReturn); + } + }; + + handleSelect = (name, selectConfig, selectData) => { + const { + [`${name}Data`]: tableData, [`${name}Config`]: tableConfig, masterData, slaveSelectedIndex, + } = this.props; + if (commonUtils.isNotEmptyArr(selectData)) { + selectData.forEach((item, index) => { + const newCopyTo = {}; + newCopyTo.master = masterData; + // newCopyTo.slave = item; + let tableDataRow = commonFunc.getDefaultData(tableConfig, newCopyTo); // 取默认值 + tableDataRow = { ...tableDataRow, ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + tableDataRow.handleType = 'add'; + tableDataRow.sId = commonUtils.createSid(); + tableDataRow.sParentId = masterData.sId; + if (name === 'slave' && selectConfig.sControlName === 'BtnChooseMaterials' && index === 0 && (commonUtils.isEmpty(tableData[slaveSelectedIndex].sProductName) || tableData[slaveSelectedIndex].sProductName === '')) { + tableData[slaveSelectedIndex] = { ...tableData[slaveSelectedIndex], ...tableDataRow }; + } else { + tableData.push(tableDataRow); + } + }); + } + this.props.onSaveState({ [`${name}Data`]: tableData, [`${name}ChooseVisible`]: false }); + }; + + handleSelectCancel = (name) => { + this.props.onSaveState({ [`${name}ChooseVisible`]: false }); + }; + /* 双击弹出Memo */ + // handleGetMemo = (name, sValue, sMemoFiled, sRecord) => { + // const { sCurrMemoProps } = this.props; + // let { [`${name}Data`]: tableData } = this.props; + // const addStata = { [`${sMemoFiled}`]: sValue }; + // if (name !== 'master') { + // const iIndex = tableData.findIndex(item => item.sId === sRecord.sId); + // let handleType = tableData[iIndex].handleType;/* 获取操作类型 */ + // handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + // addStata.handleType = handleType; + // tableData[iIndex] = { ...tableData[iIndex], ...addStata }; + // } else { + // let handleType = tableData.handleType;/* 获取操作类型 */ + // handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + // addStata.handleType = handleType; + // tableData = { ...tableData, ...addStata }; + // } + // sCurrMemoProps.bVisibleMemo = false; + // this.props.onSaveState({ ...sCurrMemoProps, [`${name}Data`]: tableData }); + // }; + // handleGetMemoCancel = () => { + // const { sCurrMemoProps } = this.props; + // sCurrMemoProps.bVisibleMemo = false; + // this.props.onSaveState({ ...sCurrMemoProps }); + // }; + // async await + handleEleMaterialsStoreCurrQty = async (slaveData) => { + const { sModelsId, app } = this.props; + let flag = true; + const InsufficientInventory = commonFunc.showMessage(app.commonConst, 'InsufficientInventory');/* 库存不足,不能领料 */ + const MateriaTransferQuantityVerificationFailed = commonFunc.showMessage(app.commonConst, 'MateriaTransferQuantityVerificationFailed');/* 材料调拨数量校验失败,请稍后操作 */ + const url = `${commonConfig.server_host}eleMaterialsStock/getEleMaterialsStoreCurrQty?sModelsId=${sModelsId}`; + for (const item of slaveData) { + const body = { + sMaterialsId: item.sMaterialsId, /* 查询条件 */ + sMaterialsStyle: item.sMaterialsStyle, + sWareHouseId: item.sWareHouseId, + }; + if (commonUtils.isNotEmptyStr(item.sLocationId)) { + body.sLocationId = item.sLocationId; + } + if (commonUtils.isNotEmptyStr(item.sWarehouseLocationId)) { + body.sWarehouseLocationId = item.sWarehouseLocationId; + } + if (commonUtils.isNotEmptyStr(item.sDefineNo)) { + body.sDefineNo = item.sDefineNo; + } + if (commonUtils.isNotEmptyStr(item.sDefineNo2)) { + body.sDefineNo2 = item.sDefineNo2; + } + const dataReturn = (await commonServices.postValueService(this.props.app.token, body, url)).data; + if (dataReturn.code === 1) { + if (commonUtils.isNotEmptyArr(dataReturn.dataset.rows)) { + const materials = dataReturn.dataset.rows[0]; + if (materials.dAuxiliaryQty < item.dAuxiliaryQty) { + const sMaterialsName = commonUtils.isEmpty(item.sMaterialsName) ? item.sMaterialsName1 : item.sMaterialsName; + message.error(`[${sMaterialsName}${item.sMaterialsStyle}], ${InsufficientInventory}`); + flag = false; + break; + } + } else { + const sMaterialsName = commonUtils.isEmpty(item.sMaterialsName) ? item.sMaterialsName1 : item.sMaterialsName; + message.error(`[${sMaterialsName}${item.sMaterialsStyle}], ${InsufficientInventory}`); + flag = false; + break; + } + } else { + message.error(MateriaTransferQuantityVerificationFailed); + flag = false; + break; + } + } + return flag; + } + handleTableSelectRowChange = async (name, selectedRowKeys, changeValue, isWait) => { + if (name === 'slave' || name === 'master') { + const { token, sModelsId, [`${name}Data`]: tableData } = this.props; + if (commonUtils.isNotEmptyArr(tableData) && commonUtils.isNotEmptyArr(selectedRowKeys)) { + let url = ''; + let sCustomerId = ''; + if (sModelsId === '192116810113315228246447250' || sModelsId === '101251240115015952245193980') { + if (name === 'master') { + sCustomerId = changeValue.sCustomerId; + } else if (name === 'slave') { + const sCustomerIdIndex = tableData.findIndex(item => item.sId === selectedRowKeys[0]); + if (sCustomerIdIndex > -1) { + sCustomerId = tableData[sCustomerIdIndex].sCustomerId; + } + } + if (commonUtils.isNotEmptyObject(sCustomerId)) { + url = `${commonConfig.server_host}printReport/getReportByCustomerId/${sCustomerId}?sModelsId=${sModelsId}`; + const values = {}; + const masterReturn = (await commonServices.postValueService(token, values, url)).data; + if (masterReturn.code === 1) { + const menuChildData = masterReturn.dataset.rows; + this.props.onSaveState({ menuChildData }); + } + } + } else { + let sProcessId = ''; + if (name === 'master') { + sProcessId = changeValue.sProcessClassifyId; + } else if (name === 'slave') { + const sProcessIdIndex = tableData.findIndex(item => item.sId === selectedRowKeys[0]); + if (sProcessIdIndex > -1) { + sProcessId = tableData[sProcessIdIndex].sProcessClassifyId; + } + } + if (commonUtils.isNotEmptyObject(sProcessId)) { + url = `${commonConfig.server_host}printReport/getReportByProcessId/${sProcessId}?sModelsId=${sModelsId}`; + const values = {}; + const masterReturn = (await commonServices.postValueService(token, values, url)).data; + if (masterReturn.code === 1) { + const menuChildData = masterReturn.dataset.rows; + this.props.onSaveState({ menuChildData }); + } + } + } + } + } else if (name === 'control') { + const { treeData, sModelsType } = this.props; /* 赋值给树组件节点 */ + if (sModelsType === 'sales/salesOrderPack') { + let { treeSelectedKeys } = this.props; /* 赋值给树组件节点 */ + if (treeData !== undefined) { + treeSelectedKeys = selectedRowKeys; /* 把树形选中节点赋值给表格部件选中节点 */ + this.props.onSaveState({ treeSelectedKeys }); + } + } + } else if (name === 'sParam' && commonUtils.isNotEmptyArr(selectedRowKeys)) { + /* 点击工艺参数列表 根据点击行动态加载配置 */ + const { sParamData, sParamConfig } = this.props; + /* 找到最后一个选中 */ + const lastSelectedKeys = selectedRowKeys[selectedRowKeys.length - 1]; + const iIndex = sParamData.findIndex(item => lastSelectedKeys === item.sId); + /* 选中数据时 塞入选中行的配置 */ + if (iIndex > -1) { + const sParamObj = sParamData[iIndex]; + const index = sParamConfig.gdsconfigformslave.findIndex(item => item.sName === 'sParamValue'); + if (index > -1) { + if (commonUtils.isNotEmptyObject(sParamObj.sDropDownData)) { + sParamConfig.gdsconfigformslave[index].sDropDownType = 'const'; + sParamConfig.gdsconfigformslave[index].showDropDown = JSON.stringify(sParamObj.sDropDownData); + } else { + sParamConfig.gdsconfigformslave[index].sDropDownType = ''; + sParamConfig.gdsconfigformslave[index].showDropDown = undefined; + } + } + /* 点击时 若没打钩 则选择框打钩 若已经打钩则取消打钩 */ + if (sParamData[iIndex].bSelfCbx) { + // sParamData[iIndex] = { ...sParamData[iIndex], bSelfCbx: false }; + } else { + sParamData[iIndex] = { ...sParamData[iIndex], bSelfCbx: true }; + } + this.props.onSaveState({ + sParamData, + }); + } + } + /* 点按钮删除时,会触发行点击事件 导致selectedRowKeys为删除行的sId */ + const { [`${name}Data`]: tableData } = this.props; + if (Array.isArray(tableData) && tableData.length > 0 && selectedRowKeys.length) { + const iIndex = tableData.findIndex(item => item.sId === selectedRowKeys[0]); + if (iIndex === -1) { + if (commonUtils.isNotEmptyArr(tableData) && tableData.length > 0) { + selectedRowKeys = commonUtils.isNotEmptyArr(tableData) ? [tableData[0].sId] : []; + } + } + } + if (isWait) { + return await this.props.onTableSelectRowChange(name, selectedRowKeys, isWait); + } else { + this.props.onTableSelectRowChange(name, selectedRowKeys); + } + } + + /* 取消表格行选中 */ + handleTableCancelSelect= (name) => { + const { [`${name}SelectedRowKeys`]: tableSelectedRowKeys } = this.props; + if (name === 'slave' && commonUtils.isNotEmptyArr(tableSelectedRowKeys)) { + this.props.onSaveState({ + [`${name}SelectedRowKeys`]: [], controlSelectedRowKeys :[], + }); + } + } + + // 获取重量 + handleGetWeight = async () => { + const { masterConfig, app } = this.props; + const url = app.rxtx.sUrl; + const returnData = (await commonServices.getService(app.token, url)).data; + if (returnData.code === 1) { + const iConfigIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'BtnGetWeight'); + const sAssignField = masterConfig.gdsconfigformslave[iConfigIndex].sAssignField; + const sAssignFieldStr = sAssignField.split(':')[0]; + const sAssignFieldName = sAssignFieldStr.split('.')[0]; + const sAssignFieldKey = sAssignFieldStr.split('.')[1]; + const dWeight = returnData.dataset.rows[0].dWeight; + if (commonUtils.isNotEmptyObject([`${sAssignFieldName}Data`])) { + const { [`${sAssignFieldName}Data`]: tableData } = this.props; + tableData[tableData.length - 1][sAssignFieldKey] = dWeight; + this.props.onSaveState({ tableData: [`${sAssignFieldName}Data`] }); + } + } else { + this.props.getServiceError(returnData); + } + } + handleViewClick = (name, sName, record, index, myConfig, configName) => { + if (name === 'process' && sName === 'sProcessParamStr') { // process sProcessParam + const { processConfig, enabled, sModelsType } = this.props; + const slaveSelectOneData = record; + let modalVisible = false; + const sProcessParamsSelects = []; + let paramType = ''; + if (commonUtils.isNotEmptyObject(slaveSelectOneData)) { + if (sModelsType.includes('manufacture/')) { + paramType = slaveSelectOneData.sWorkOrderParam; + } else if (sModelsType.includes('quotation/')) { + paramType = slaveSelectOneData.sProcessParam; + } + } + if (commonUtils.isNotEmptyObject(paramType) && enabled) { + const sProcessParam = JSON.parse(paramType); + modalVisible = true; + // eslint-disable-next-line no-plusplus + for (let i = 1; i < 11; i++) { + const iIndex = processConfig.gdsconfigformslave.findIndex(item => item.sName === `sParamValue${i.toString()}`); + if (iIndex > -1 && !commonUtils.isEmpty(sProcessParam[`sParam${i.toString()}`])) { + processConfig.gdsconfigformslave[iIndex].showName = sProcessParam[`sParam${i.toString()}`]; + if (!commonUtils.isEmpty(record[`sParamDropDown${i.toString()}`])) { + processConfig.gdsconfigformslave[iIndex].sDropDownType = 'sql'; + } else { + processConfig.gdsconfigformslave[iIndex].sDropDownType = ''; + } + // processConfig.gdsconfigformslave[iIndex].bVisible = !sProcessParam[`sParam${i.toString()}`].includes('参数值'); + record[`sParam${i.toString()}`] = sProcessParam[`sParam${i.toString()}`]; + sProcessParamsSelects.push(processConfig.gdsconfigformslave[iIndex]); + } else if (iIndex > -1) { + // processConfig.gdsconfigformslave[iIndex].showName = `sParamValue${i.toString()}`; + // processConfig.gdsconfigformslave[iIndex].bVisible = true; + } + } + } else { + modalVisible = false; + // eslint-disable-next-line no-plusplus + for (let i = 1; i < 11; i++) { + const iIndex = processConfig.gdsconfigformslave.findIndex(item => item.sName === `sParamValue${i.toString()}`); + if (iIndex > -1) { + // processConfig.gdsconfigformslave[iIndex].bVisible = true; + } + } + } + this.props.onSaveState({ + processRecord: record, + sProcessParamsSelects, + sProcessParamsModalVisible: modalVisible, + }); + } else if (name === 'process' && sName === 'sQuoParams') { // 产品工艺卡报价参数 + const { processConfig, enabled, sModelsType } = this.props; + const slaveSelectOneData = record; + let modalVisible = false; + const sProcessParamsSelects = []; + let sParamData = []; + let paramType = ''; + if (commonUtils.isNotEmptyObject(slaveSelectOneData)) { + paramType = slaveSelectOneData.sProcessParam; + } + if(commonUtils.isEmpty(paramType)) { + message.warn('无报价参数!'); + return; + } + /* 工序参数以表格形式展示 列 */ + const sParamConfig = { + bisMutiSelect: false, + bMutiSelect: false, + }; + const gdsconfigformslave = [{ + sId: commonUtils.createSid(), + sName: 'sId', + showName: '主键', + bVisible: false, + iFitWidth: 200, + }, { + sId: commonUtils.createSid(), + sName: 'bSelfCbx', + showName: '选择', + bVisible: true, + iFitWidth: 37, + }, { + sId: commonUtils.createSid(), + sName: 'sParamKey', + showName: '参数主键', + bVisible: false, + iFitWidth: 200, + }, { + sId: commonUtils.createSid(), + sName: 'sParamName', + showName: '参数名', + bVisible: true, + iFitWidth: 230, + }, { + sId: commonUtils.createSid(), + sName: 'sParamValue', + showName: '参数值', + bVisible: true, + }]; + sParamConfig.gdsconfigformslave = gdsconfigformslave; + const sParamColumn = commonFunc.getHeaderConfig(sParamConfig); + if (commonUtils.isNotEmptyObject(paramType)) { + /* 要把数据以表格的形式显示出来 */ + const sParamJsonObj = JSON.parse(paramType); + for (const key of Object.keys(sParamJsonObj)) { + if (key.includes('sParam') && !key.includes('DropDown') && !key.includes('Default')) { + const obj = {}; + obj.sId = commonUtils.createSid(); + obj.sParamKey = key; + obj.sParamName = sParamJsonObj[key]; + /* 找到数字 找到下拉数据源 */ + const num = key.replace(/[^\d]/g, '').trim(); + if (Number(num)) { + const number = Number(num); + const sParamDropDownKey = `sParamDropDown${number}`; + obj.sDropDownData = sParamJsonObj[sParamDropDownKey]; /* 下拉 */ + const sParamDefaultKey = `sParamDefault${number}`; + obj.sParamValue = sParamJsonObj[sParamDefaultKey]; /* 默认值 */ + } + sParamData.push(obj); + } + } + /* 将sParam1中的数据 还原到sParamData数据中 */ + if(commonUtils.isNotEmptyObject(record.sQuoParams)) { + const selectedData = JSON.parse(record.sQuoParams); + if(commonUtils.isNotEmptyArr(selectedData)) { + selectedData.forEach((itemS) => { + const iIndex = sParamData.findIndex(item => item.sParamName === itemS.sParamName); + if(iIndex > -1) { + const addState ={}; + addState.sParamValue = itemS.sParamValue; + addState.bSelfCbx = itemS.bSelfCbx; + sParamData[iIndex] ={...sParamData[iIndex], ...addState}; + } + }); + } + + /* 如果数据集有一个是非选中的则非选中状态 否则全选 */ + if(commonUtils.isNotEmptyArr(sParamColumn)) { + const iIndex = sParamColumn.findIndex(item => item.dataIndex ==='bSelfCbx'); + if(iIndex > -1) { + const filterData = sParamData.filter(item => !item.bSelfCbx); + if(commonUtils.isNotEmptyArr(filterData)) { + sParamColumn[iIndex] ={ ...sParamColumn[iIndex], bCheckAll:false}; + }else { + sParamColumn[iIndex] ={ ...sParamColumn[iIndex], bCheckAll:true}; + } + } + } + } + } + this.props.onSaveState({ + processRecord: record, + sProcessParamsSelects, + sParamsModalVisible: true, + sParamConfig, + sParamColumn, + sParamData, + sParamModalType:'sQuo' + }); + } else if (name === 'process' && sName === 'sParams') { // process sProcessParam + const { processConfig, enabled, sModelsType } = this.props; + const slaveSelectOneData = record; + let modalVisible = false; + const sProcessParamsSelects = []; + let sParamData = []; + let paramType = ''; + if (commonUtils.isNotEmptyObject(slaveSelectOneData)) { + paramType = slaveSelectOneData.sWorkOrderParam; + } + if(commonUtils.isEmpty(paramType)) { + message.warn('无工艺参数!'); + return; + } + /* 工序参数以表格形式展示 列 */ + const sParamConfig = { + bisMutiSelect: false, + bMutiSelect: false, + }; + const gdsconfigformslave = [{ + sId: commonUtils.createSid(), + sName: 'sId', + showName: '主键', + bVisible: false, + iFitWidth: 200, + }, { + sId: commonUtils.createSid(), + sName: 'bSelfCbx', + showName: '选择', + bVisible: true, + iFitWidth: 37, + }, { + sId: commonUtils.createSid(), + sName: 'sParamKey', + showName: '参数主键', + bVisible: false, + iFitWidth: 200, + }, { + sId: commonUtils.createSid(), + sName: 'sParamName', + showName: '参数名', + bVisible: true, + iFitWidth: 230, + }, { + sId: commonUtils.createSid(), + sName: 'sParamValue', + showName: '参数值', + bVisible: true, + }]; + sParamConfig.gdsconfigformslave = gdsconfigformslave; + const sParamColumn = commonFunc.getHeaderConfig(sParamConfig); + if (commonUtils.isNotEmptyObject(paramType)) { + /* 要把数据以表格的形式显示出来 */ + const sParamJsonObj = JSON.parse(paramType); + for (const key of Object.keys(sParamJsonObj)) { + if (key.includes('sParam') && !key.includes('DropDown') && !key.includes('Default')) { + const obj = {}; + obj.sId = commonUtils.createSid(); + obj.sParamKey = key; + obj.sParamName = sParamJsonObj[key]; + /* 找到数字 找到下拉数据源 */ + const num = key.replace(/[^\d]/g, '').trim(); + if (Number(num)) { + const number = Number(num); + const sParamDropDownKey = `sParamDropDown${number}`; + obj.sDropDownData = sParamJsonObj[sParamDropDownKey]; /* 下拉 */ + const sParamDefaultKey = `sParamDefault${number}`; + obj.sParamValue = sParamJsonObj[sParamDefaultKey]; /* 默认值 */ + } + sParamData.push(obj); + } + } + /* 将sParam1中的数据 还原到sParamData数据中 */ + if(commonUtils.isNotEmptyObject(record.sParams)) { + const selectedData = JSON.parse(record.sParams); + if(commonUtils.isNotEmptyArr(selectedData)) { + selectedData.forEach((itemS) => { + const iIndex = sParamData.findIndex(item => item.sParamName === itemS.sParamName); + if(iIndex > -1) { + const addState ={}; + addState.sParamValue = itemS.sParamValue; + addState.bSelfCbx = itemS.bSelfCbx; + sParamData[iIndex] ={...sParamData[iIndex], ...addState}; + } + }); + } + + /* 如果数据集有一个是非选中的则非选中状态 否则全选 */ + if(commonUtils.isNotEmptyArr(sParamColumn)) { + const iIndex = sParamColumn.findIndex(item => item.dataIndex ==='bSelfCbx'); + if(iIndex > -1) { + const filterData = sParamData.filter(item => !item.bSelfCbx); + if(commonUtils.isNotEmptyArr(filterData)) { + sParamColumn[iIndex] ={ ...sParamColumn[iIndex], bCheckAll:false}; + }else { + sParamColumn[iIndex] ={ ...sParamColumn[iIndex], bCheckAll:true}; + } + } + } + } + } + this.props.onSaveState({ + processRecord: record, + sProcessParamsSelects, + sParamsModalVisible: true, + sParamConfig, + sParamColumn, + sParamData, + sParamModalType:'sWork', + enabled, + }); + }else if ( name === 'control' && sName === 'dSinglePQty') { /* 控制表 查看开版图 */ + this.props.onSaveState({ + showSinglePQtyPictureVisible: true, /* 弹出查看开版图Modal*/ + }); + } else { + if(sName === 'myTableConfig') { + this.handleQuickViewClick(name, sName, record, index, myConfig, configName); + } else { + this.props.onViewClick(name, sName, record, index, myConfig ); + } + } + }; + + handleQuickViewClick = async (name, sName, record, index , myConfigArr, configName) => { + const { + slaveConfig, + slaveData, + dispatch, + slaveFilterCondition, + slavePagination, + slaveOrderBy, + sModelsType, + formRoute, + treeFilterCondition, + app, + iPageSize, + sModelsId, + // slaveSelectedData, + // masterData, + // employeeConfig, + } = this.props; + + let picArr = []; + if(commonUtils.isNotEmptyArr(myConfigArr)) { + picArr = myConfigArr; + } + + if (picArr.length > 0) { + const getConfig = this.handleGetTableConfig; + const tableDataRow = record; + const iIndex = index; + const [{ sActiveId }] = picArr; + let [{ sActiveKey }] = picArr; + const sFormId = sActiveId === '1' ? commonUtils.isEmpty(tableDataRow.sFormId) ? tableDataRow.sSrcFormId : tableDataRow.sFormId : sActiveId; + if (commonUtils.isNotEmptyObject(sActiveKey) && sActiveKey.includes('.')) { /* 接口按钮跳转 如果有slave.对应字段 则需要取出对应字段 */ + const index = sActiveKey.lastIndexOf('.'); + sActiveKey = sActiveKey.substring(index + 1, sActiveKey.length); + } + const sNameUrl = `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sFormId}?sModelsId=${sFormId}&sName=${formRoute}`; + const filterCondition = []; + const conditionValues = this.props.getSqlCondition(picArr[0], name, tableDataRow); + if (!commonUtils.isEmpty(conditionValues)) { + Object.keys(conditionValues).forEach((item) => { + if ((item === 'tStartDate_pro' || item.substring(0, 1) === 'p')) { + if (!commonUtils.isEmpty(conditionValues[item]) && conditionValues[item].length >= 2) { + const tStartDate = moment(conditionValues[item][0]).format(this.sDateFormat); + const tEndDate = moment(conditionValues[item][1]).add(1, 'days').format(this.sDateFormat); + filterCondition.push({ + bFilterName: item, + bFilterCondition: '=', + bFilterValue: `${tStartDate},${tEndDate}`, + }); + } + } else if ((item === 'mStartDate_pro' || item.substring(0, 1) === 'm')) { + if (!commonUtils.isEmpty(conditionValues[item])) { + const tStartDate = moment(conditionValues[item]).startOf('month').format(this.sDateFormat); + const tEndDate = moment(conditionValues[item]).endOf('month').add(1, 'days').format(this.sDateFormat); + filterCondition.push({ + bFilterName: `t${item.substring(1, item.length)}`, + bFilterCondition: '=', + bFilterValue: `${tStartDate},${tEndDate}`, + }); + } + } else if (item.substring(0, 1) === 't') { + filterCondition.push({ + bFilterName: item, + bFilterCondition: '=', + bFilterValue: moment(conditionValues[item]).format(this.sDateFormat), + }); + } else { + filterCondition.push({ + bFilterName: item, + bFilterCondition: '=', + bFilterValue: conditionValues[item], + }); + } + }); + } + this.props.dispatch({ + type: 'content/onRouter', + payload: { + url: sNameUrl, + refresh: getConfig.bind(this, name, sModelsId, myConfigArr[0], configName), /* 刷新方法 */ + sTabId: commonUtils.createSid(), + sParentId: this.state.sTabId, + urlDataType: 'newPane', + checkedId: myConfigArr[0].sId, + sName: myConfigArr[0].sName, + bFilter: slaveFilterCondition, + pageSize: commonConfig.pageSize, + pages: slavePagination, + currentData: slaveData, + conditonValues: conditionValues, + newKey: tableDataRow[sActiveKey], + currentIndex: iIndex, + filterCondition, + }, + }); + } + }; + + /* 选择基础颜色 */ + handleSelectSisColor = async (name, selectConfig, selectData) => { + const { + enabled, processData, processSelectedRowId, controlSelectedRowId, controlData, sisColorField, masterData, slaveSelectedRowKeys, slaveData,packData, + } = this.props; + if (enabled && commonUtils.isNotEmptyObject(processSelectedRowId)) { + let sColorSerialMemoStr = ''; + const jsonData = []; + if (commonUtils.isNotEmptyArr(selectData)) { + selectData.forEach((item) => { + const { + sId, sName, dColor, CreateDate, sMakePerson, + } = item; + const jsonObj = {}; + jsonObj.sId = sId; + jsonObj.sName = sName; /* 名称 */ + jsonObj.dColor = dColor; /* 色序 */ + jsonObj.CreateDate = CreateDate; + jsonObj.sMakePerson = sMakePerson; + sColorSerialMemoStr += `${sName}-${dColor},`; + jsonData.push(jsonObj); + }); + if (commonUtils.isNotEmptyObject(sColorSerialMemoStr)) { + sColorSerialMemoStr = commonUtils.isNotEmptyArr(jsonData) ? JSON.stringify(jsonData) : ''; /* JSON对象转换为字符串存放到合版信息中 */ + } + } + const iIndex = processData.findIndex(item => item.sId === processSelectedRowId); + if (iIndex > -1) { + const addState = {}; + let { handleType } = processData[iIndex]; + handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + addState.handleType = handleType; + addState.sColorSerialMemo = sColorSerialMemoStr; + processData[iIndex] = { ...processData[iIndex], ...addState }; + } + } else if (enabled && commonUtils.isNotEmptyObject(controlSelectedRowId)) { /* 控制表选择正面颜色、反面颜色 */ + let sColorSerialMemoStr = ''; + const jsonData = []; + const sFieldName = commonUtils.isNotEmptyObject(sisColorField) ? sisColorField : 'sPositiveColor'; + let trueColor = 0; /* 正色 */ + let trueSpecialColor = 0; /* 正专 */ + let falseColor = 0; /* 反色 */ + let falseSpecialColor = 0; /* 反专 */ + if (commonUtils.isNotEmptyArr(selectData)) { + selectData.forEach((item) => { + const { + sId, sName, dColor, CreateDate, sMakePerson, + } = item; + const jsonObj = {}; + jsonObj.sId = sId; + jsonObj.sName = sName; /* 名称 */ + jsonObj.dColor = dColor; /* 色序 */ + jsonObj.CreateDate = CreateDate; + jsonObj.sMakePerson = sMakePerson; + sColorSerialMemoStr += `${sName}-${dColor},`; + jsonData.push(jsonObj); + if (sFieldName === 'sPositiveColor') { + if (sName.toLowerCase().trim() === 'c' || sName.toLowerCase().trim() === 'm' || sName.toLowerCase().trim() === 'y' || sName.toLowerCase().trim() === 'k' || sName.toLowerCase().includes('c+m+y+k')) { + trueColor += dColor; + } else { + trueSpecialColor += dColor; + } + } else if (sFieldName === 'sOppositeColor') { + if (sName.toLowerCase().trim() === 'c' || sName.toLowerCase().trim() === 'm' || sName.toLowerCase().trim() === 'y' || sName.toLowerCase().trim() === 'k' || sName.toLowerCase().includes('c+m+y+k')) { + falseColor += dColor; + } else { + falseSpecialColor += dColor; + } + } + }); + if (commonUtils.isNotEmptyObject(sColorSerialMemoStr)) { + sColorSerialMemoStr = commonUtils.isNotEmptyArr(jsonData) ? JSON.stringify(jsonData) : ''; /* JSON对象转换为字符串存放到合版信息中 */ + } + } + const iIndex = controlData.findIndex(item => item.sId === controlSelectedRowId); + if (iIndex > -1) { + const addState = {}; + let { handleType } = controlData[iIndex]; + handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + addState.handleType = handleType; + addState[sFieldName] = sColorSerialMemoStr; + if (sFieldName === 'sPositiveColor') { + addState.iPositiveColor = trueColor; + addState.iPositiveSpecialColor = trueSpecialColor; + addState.sOppositeColor= controlData[iIndex].sOppositeColor; + } else if (sFieldName === 'sOppositeColor') { + addState.iOppositeColor = falseColor; + addState.iOppositeSpecialColor = falseSpecialColor; + addState.sPositiveColor= controlData[iIndex].sPositiveColor; + } + controlData[iIndex] = { ...controlData[iIndex], ...addState }; + } + } + this.props.onSaveState({ + sisColorChooseVisible: false, + }); + } + + handleViewChoose= (name, sName, record) => { + const { sId } = record; /* 控制表主键 */ + const { enabled } = this.props; + const sisColorSelectedRowKeys = []; + let jsonData = []; + if (name === 'process' && sName === 'sColorSerialMemo') { + const { [`${name}Data`]: tableData } = this.props; + const iIndex = tableData.findIndex(item => item.sId === sId); + if (iIndex > -1) { + const sColorSerialMemo = tableData[iIndex].sColorSerialMemo; + + if (commonUtils.isNotEmptyObject(sColorSerialMemo)) { + try { + jsonData = JSON.parse(sColorSerialMemo); + jsonData.forEach((item) => { + sisColorSelectedRowKeys.push(item.sId); + }); + } catch (ex) { + // console.log('ex', ex); + } + } + } + this.props.onSaveState({ + sisColorChooseVisible: true, + processSelectedRowId: sId, /* 工序表选中行sId */ + enabled, + sisColorSelectedRowKeys, + sisColorSelectedData: jsonData, + }); + }else if (sName === 'sParams' && location.pathname.includes('productionReport')) { // 产量上报 工艺参数 + const { enabled } = this.props; + const slaveSelectOneData = record; + const sProcessParamsSelects = []; + const sParamData = []; + let paramType = ''; + if (commonUtils.isNotEmptyObject(slaveSelectOneData)) { + paramType = slaveSelectOneData.sReportParam; /* 上报参数 */ + } + if (commonUtils.isEmpty(paramType)) { + message.warn('无工艺参数!'); + return; + } + /* 工序参数以表格形式展示 列 */ + const sParamConfig = { + bisMutiSelect: false, + bMutiSelect: false, + }; + const gdsconfigformslave = [{ + sId: commonUtils.createSid(), + sName: 'sId', + showName: '主键', + bVisible: false, + iFitWidth: 200, + }, { + sId: commonUtils.createSid(), + sName: 'bSelfCbx', + showName: '选择', + bVisible: true, + iFitWidth: 37, + }, { + sId: commonUtils.createSid(), + sName: 'sParamKey', + showName: '参数主键', + bVisible: false, + iFitWidth: 200, + }, { + sId: commonUtils.createSid(), + sName: 'sParamName', + showName: '参数名', + bVisible: true, + iFitWidth: 230, + }, { + sId: commonUtils.createSid(), + sName: 'sParamValue', + showName: '参数值', + bVisible: true, + iFitWidth: 230, + }]; + sParamConfig.gdsconfigformslave = gdsconfigformslave; + const sParamColumn = commonFunc.getHeaderConfig(sParamConfig); + if (commonUtils.isNotEmptyObject(paramType)) { + /* 要把数据以表格的形式显示出来 */ + const sParamJsonObj = JSON.parse(paramType); + console.log('aaa111', sParamJsonObj, sParamConfig); + for (const key of Object.keys(sParamJsonObj)) { + if (key.includes('sParam') && !key.includes('DropDown') && !key.includes('Default')) { + const obj = {}; + obj.sId = commonUtils.createSid(); + obj.sParamKey = key; + obj.sParamName = sParamJsonObj[key]; + /* 找到数字 找到下拉数据源 */ + const num = key.replace(/[^\d]/g, '').trim(); + if (Number(num)) { + const number = Number(num); + const sParamDropDownKey = `sParamDropDown${number}`; + obj.sDropDownData = sParamJsonObj[sParamDropDownKey]; /* 下拉 */ + const sParamDefaultKey = `sParamDefault${number}`; + obj.sParamValue = sParamJsonObj[sParamDefaultKey]; /* 默认值 */ + /* 如果sParamValue有值 则替换默认值 */ + const oldKey = `sParamValue${number}`; + const oldParamValue = slaveSelectOneData[oldKey]; /* 界面打开时,数据集中原始的sParamValue1,sParamValue2数据填充到数据上 */ + if (commonUtils.isNotEmptyObject(oldParamValue)) { + obj.sParamValue = oldParamValue; /* 默认值 */ + } + } + sParamData.push(obj); + } + } + /* 将sParam1中的数据 还原到sParamData数据中 */ + if (commonUtils.isNotEmptyObject(record.sParams)) { + const selectedData = JSON.parse(record.sParams); + if (commonUtils.isNotEmptyArr(selectedData)) { + selectedData.forEach((itemS) => { + const iIndex = sParamData.findIndex(item => item.sParamName === itemS.sParamName); + if (iIndex > -1) { + const addState = {}; + addState.sParamValue = itemS.sParamValue; + addState.bSelfCbx = itemS.bSelfCbx; + sParamData[iIndex] = { ...sParamData[iIndex], ...addState }; + } + }); + } + + /* 如果数据集有一个是非选中的则非选中状态 否则全选 */ + if (commonUtils.isNotEmptyArr(sParamColumn)) { + const iIndex = sParamColumn.findIndex(item => item.dataIndex === 'bSelfCbx'); + if (iIndex > -1) { + const filterData = sParamData.filter(item => !item.bSelfCbx); + if (commonUtils.isNotEmptyArr(filterData)) { + sParamColumn[iIndex] = { ...sParamColumn[iIndex], bCheckAll: false }; + } else { + sParamColumn[iIndex] = { ...sParamColumn[iIndex], bCheckAll: true }; + } + } + } + } + } + console.log('sParamData111', sParamData); + this.props.onSaveState({ + slaveRecord: record, + sProcessParamsSelects, + sParamsModalVisible: true, + sParamConfig, + sParamColumn, + sParamData, + sParamModalType: 'sReport', + enabled, + }); + }else if (enabled && name === 'control' && (sName === 'sPositiveColor' || sName === 'sOppositeColor')) { /* 控制表 选择正面颜色、反面颜色 */ + const { [`${name}Data`]: tableData } = this.props; + const iIndex = tableData.findIndex(item => item.sId === sId); + if (iIndex > -1) { + const sColorSerialMemo = tableData[iIndex][sName]; + + if (commonUtils.isNotEmptyObject(sColorSerialMemo)) { + try { + jsonData = JSON.parse(sColorSerialMemo); + jsonData.forEach((item) => { + sisColorSelectedRowKeys.push(item.sId); + }); + } catch (ex) { + // console.log('ex', ex); + } + } + } + this.props.onSaveState({ + sisColorChooseVisible: true, + controlSelectedRowId: sId, /* 控制表选中行sId */ + processSelectedRowId: '', /* 工序表选中行sId */ + enabled, + sisColorSelectedRowKeys, + sisColorSelectedData: jsonData, + sisColorField: sName, /* 弹出字段 */ + }); + } else if (enabled && name === 'control' && sName === 'dSinglePQty') { /* 控制表 查看开版图 */ + const { [`${name}Data`]: tableData } = this.props; + const iIndex = tableData.findIndex(item => item.sId === sId); + if (iIndex > -1) { + const tableDataRow = tableData[iIndex]; + const dProductLength = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dPartsWidth, 0)); /* 产品长 */ + const dProductWidth = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dPartsLength, 0)); /* 产品宽 */ + // const dMachineLength = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dMachineLength, 0)); /* 上机长 */ + // const dMachineWidth = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dMachineWidth, 0)); /* 上机宽 */ + + /* 算拼版数 */ + if (dProductLength !== 0 && dProductWidth !== 0) { + this.props.onSaveState({ + showSinglePQtyPictureVisible: true, /* 弹出查看开版图Modal111 */ + showSinglePQtyRow: tableDataRow, /* 弹出查看开版图行 */ + controlSelectedRowId: sId, /* 控制表选中行sId */ + processSelectedRowId: '', /* 工序表选中行sId */ + enabled, + sisColorSelectedRowKeys, + sisColorSelectedData: jsonData, + sisColorField: sName, /* 弹出字段 */ + }); + } + } + } + } + handleCancelModal = (modelVisible) => { + this.props.onSaveState({ + [modelVisible]: false, + }); + } + /* 根据不同条件 计算排版数 */ + //竖排(上机高、上机宽、部件高、部件宽、出血咬口) dPartsLength --》dMachineLength,dPartsWidth--》dMachineWidth + getSp = (dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth)=>{ + var dMachineWidth = dMachineWidth; + var dMachineLength = dMachineLength; + //计算合版数量 + var iTemp = Math.floor(dMachineWidth / dPartsWidth) * Math.floor(dMachineLength /dPartsLength ); + return iTemp; + } + //横排(上机高、上机宽、部件高、部件宽、出血咬口) dPartsLength --》dMachineWidth,dPartsWidth--》dMachineLength + getHp = (dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth) =>{ + var dMachineWidth = dMachineWidth; + var dMachineLength = dMachineLength; + //计算合版数量 + var iTemp = Math.floor(dMachineWidth / dPartsLength) * Math.floor(dMachineLength / dPartsWidth); + return iTemp; + } + //横竖取大 + getHSQD = (dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth) =>{ + var iTemp =this.getHp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + var iTemp2 =this.getSp(dMachineLength,dMachineWidth,dPartsLength,dPartsWidth); + if(iTemp2>iTemp){ + iTemp = iTemp2; + // tag= 2;//竖排 + } + return iTemp; + } + + /* 计算排版数 */ + handleResolveSinglePQty = (tableDataRow) => { + let dSingleQty = 0; /* 排版数 */ + const tag = 1;//1横排还是2竖排 + let dPartsWidth = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dPartsWidth, 0)); /* 产品长 */ + let dPartsLength = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dPartsLength, 0)); /* 产品宽 */ + let dMachineWidth = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dMachineWidth, 0)); /* 上机宽 */ + let dMachineLength = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dMachineLength, 0)); /* 上机长 */ + + const dBoold = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dBlood, 0)); /* 出血位 */ + const dBite = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.dBite, 0)); /* 咬口 */ + // console.log('dPartsWidth', dPartsWidth, dPartsLength); + var dMachineTmp = 0; + var dPartsTmp = 0; + var tagval = ""; + var xxfx = 3;//虚线方向 1:横虚线 2:树虚线;3:无需虚线 + var wlfx = 1;//竖纹 + //机器长宽转换 + if(dMachineWidth > dMachineLength){ + dMachineTmp = dMachineWidth;//上级高 + dMachineWidth = dMachineLength;//上级宽 + dMachineLength = dMachineTmp; + wlfx = 2; + } + //长宽转换(dLength 高度、dWidth 表示宽度,高度永远大于宽度) + if(dPartsWidth > dPartsLength){ + dPartsTmp = dPartsWidth;//上级高 + dPartsWidth = dPartsLength;//上级宽 + dPartsLength = dPartsTmp; + } + dMachineWidth = dMachineWidth-dBite; + + const sCutMethod = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.sCutMethod, 0)); /* 裁切方式 */ + const sSpineDirection = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.sSpineDirection, 0)); /* 书脊方向 */ + const sPrintingPlate = commonUtils.convertStrToNumber(commonUtils.isNull(tableDataRow.sPrintingPlate, 0)); /* 排版方式 */ + // console.log('sPrintingPlate', sPrintingPlate); + // console.log('sCutMethod', sCutMethod); + // console.log('sSpineDirection', sSpineDirection); + let tmpBl = 1;//排版数乘的数字,如果书类为2 默认是1 + let tmp = 0; + //三边裁切 + if( sCutMethod === 1){ + //长书(1,3,4) + if(sSpineDirection=== 1){ + dPartsLength = dPartsLength; + dPartsWidth = dPartsWidth*2; + }else{ + dPartsWidth = dPartsWidth + dPartsLength = dPartsLength*2; + } + tmpBl = 2; + dPartsWidth = dPartsWidth + 2*dBoold; + dPartsLength = dPartsLength + 2*dBoold; + if(sPrintingPlate === 1){ /* 横竖取大 */ + tmp = this.getHSQD(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + dSingleQty = tmp*2; + console.log('横竖取大排版数:', dSingleQty); + }else if(sPrintingPlate ===3){ /* 横排 */ + if(wlfx===1 && sSpineDirection===1){ + //长书脊 + tmp = this.getHp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + dSingleQty = tmp*2; + }else if(wlfx===2 && sSpineDirection===1){ + //长书脊 + tmp = this.getSp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,4,1); + dSingleQty = tmp*2; + }else if(wlfx===1 && sSpineDirection===2){ + //长书脊 + tmp = this.getSp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,4,1); + dSingleQty = tmp*2; + }else if(wlfx==2 && sSpineDirection==2){ + //长书脊 + tmp = this.getHp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,3,2); + dSingleQty = tmp*2; + } + }else if(sPrintingPlate===4) { /* 竖排 */ + //竖排 + if(wlfx===1 && sSpineDirection===1){ + //长书脊 + tmp = this.getSp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,4,1); + dSingleQty = tmp*2; + }else if(wlfx===2 && sSpineDirection===1){ + //长书脊 + tmp = this.getHp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,3,2); + dSingleQty = tmp*2; + }else if(wlfx===1 && sSpineDirection===2){ + //长书脊 + tmp = this.getHp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,3,2); + dSingleQty = tmp*2; + }else if(wlfx===2 && sSpineDirection===2){ + //长书脊 + tmp = this.getSp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,4,1); + dSingleQty = tmp*2; + } + }else if(sPrintingPlate===2){ /* 混排 */ + //混排 横排 多余部分 看看是否能够竖着排 如果竖排 看看能否再横着排(折页没有混排) + } + }else{ /* 四边裁 */ + dPartsWidth = dPartsWidth+2*dBoold; + dPartsLength = dPartsLength+2*dBoold; + if(sPrintingPlate===1){ + tmp = this.getHSQD(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + //1:横虚线 2:树虚线;3:无需虚线 + // if(tag==2){ + // //alert("横竖取大==版数:"+tmp); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,4,3); + // }else{ + // //alert("横竖取大==版数:"+tmp); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,3,3); + // } + console.log("四边裁-横竖取大:"+tmp); + dSingleQty = tmp; + }else if(sPrintingPlate===3){ + if(wlfx===1){ + //长书级 + tmp = this.getHp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + dSingleQty = tmp; + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,3,3); + }else{ + //长书级 + tmp = this.getSp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + dSingleQty = tmp; + // $("#dPlateQty").val(tmp); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,4,3); + } + // var tmp = getHp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + // alert("横排版数:"+tmp); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,3,2); + }else if(sPrintingPlate===4) { + //竖排 + if(wlfx===1){ + //长书级 + tmp = this.getSp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + console.log("竖排版数:"+tmp); + dSingleQty = tmp; + // $("#dPlateQty").val(tmp); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,4,3); + }else{ + //长书级 + tmp = this.getHp(dMachineLength,dMachineWidth ,dPartsLength ,dPartsWidth); + console.log("竖排版数:"+tmp); + dSingleQty = tmp; + // $("#dPlateQty").val(tmp); + // addHtml(dMachineLength,dMachineWidth ,dPartsLength,dPartsWidth,dBoold ,dBite,3,3); + } + }else if(sPrintingPlate===2){ + //混排 横排 多余部分 看看是否能够竖着排 如果竖排 看看能否再横着排(折页没有混排) + if( sCutMethod===1){ + message.warning("书没有混排"); + return; + } + //竖排+横排 + let htTmpTag = 0; + let tmp3 = 0; + tmp = this.getHHP(dMachineWidth,dMachineLength ,dPartsLength ,dPartsWidth); + tmp3 = this.getHHP(dMachineWidth,dMachineLength ,dPartsWidth,dPartsLength); + if(tmp { + const { slaveData, slaveSelectedRowKeys } = props || this.props; + if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyObject(slaveInfoConfig)) { + let record = slaveData[0]; /* 从表选中行 没有选中行时 取第一行 */ + if(commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { + const iIndex = slaveData.findIndex(item => item.sId === slaveSelectedRowKeys[0]); + if (iIndex > -1) { + record = slaveData[iIndex]; + } + } + let conditonValues = {}; + const sSqlCondition0 = slaveInfoConfig.sSqlCondition; + if (commonUtils.isNotEmptyObject(sSqlCondition0)) { + conditonValues = this.props.getSqlCondition(slaveInfoConfig, 'slave', record); + } + conditonValues = { sParentId: record.sId, ...conditonValues}; + const pageNum = commonUtils.isEmpty(page) ? 1 : page; + const pageTableSize = commonUtils.isNotEmptyNumber(pageSize) ? pageSize : commonConfig.pageSize; + let addState = await this.props.handleGetDataSet({ + name, + configData: slaveInfoConfig, + condition: { + pageNum, pageSize: pageTableSize, bFilter: [], sFilterOrderBy: slaveOrderBy, sSqlCondition: conditonValues, + }, + flag: true, + clearSelectData: true, + isWait:true, + }); + if(isWait) { + if(commonUtils.isEmptyObject(addState)) { + addState = {}; + } + addState.pageLoading = false; + return addState; + } else { + this.props.onSaveState({ pageLoading: false, ...addState }); + } + } + }; + + /* 根据上机长、上机宽,材料长,材料宽 计算自动排版数 */ + handleResolveMachineComposing = (productLength, productWidth, maxMachineLength, maxMachineWidth) => { + let result1 = {}; + const productLengthTemp = commonUtils.convertStrToNumber(commonUtils.isNull(productLength, 0)); /* 产品长 */ + const productWidthTemp = commonUtils.convertStrToNumber(commonUtils.isNull(productWidth, 0)); /* 产品宽 */ + const maxMachineLengthTemp = commonUtils.convertStrToNumber(commonUtils.isNull(maxMachineLength, 0)); /* 材料长 */ + const maxMachineWidthTemp = commonUtils.convertStrToNumber(commonUtils.isNull(maxMachineWidth, 0)); /* 材料宽 */ + if (isNaN(productLengthTemp) || productLengthTemp === 0 || isNaN(productWidthTemp) || productWidthTemp === 0 || isNaN(maxMachineLengthTemp) || maxMachineLengthTemp === 0 || isNaN(maxMachineWidthTemp) || maxMachineWidthTemp === 0) { + return result1; + } + const vh = this.handleDescVerticalComposing(productLength, productWidth, maxMachineLength, maxMachineWidth); + const hv = this.handleDescHorizonalComposing(productLength, productWidth, maxMachineLength, maxMachineWidth); + const totalNumVH = vh.totalNum; + const totalNumHV = hv.totalNum; + if (totalNumVH === totalNumHV) { + if (vh.remaining === 0) { + result1 = vh; + } else { + result1 = hv; + } + } else if (totalNumVH > totalNumHV) { + result1 = vh; + } else { + result1 = hv; + } + return result1; + }; + + handleDescHorizonalComposing = (productLength, productWidth, maxMachineLength, maxMachineWidth) => { + let horizonalWWNum = 0; + let horizonalLWNum = 0; + let verticalLLNum = 0; + let verticalLWNum = 0; + let totalNum = 0;// 总的排列数目 + let totalLength = 0;// 上机长,即最大排列占据的长度 + let totalWidth = 0;// 上机宽,即最大排列占据的宽度 + + let mLength = 0; + let mWidth = 0; + let horizonalRemaining = 0; + // let fTempmarginW = 0; + // let fTempmarginL = 0; + // const mTemp = 0; + const dmargin = 0; + + const result1 = {}; + + if (maxMachineLength > maxMachineWidth || maxMachineLength === maxMachineWidth) { + mLength = maxMachineLength; + } else { + mLength = maxMachineWidth; + } + + if (maxMachineLength < maxMachineWidth || maxMachineLength === maxMachineWidth) { + mWidth = maxMachineLength; + } else { + mWidth = maxMachineWidth; + } + maxMachineLength = mLength; + maxMachineWidth = mWidth; + + // 按机器优先横排--竖向横排数量,即上述竖向横排一共排几行 + verticalLLNum = Math.floor(maxMachineLength / this.handleZeroToOne(productWidth + commonUtils.convertFixNum(dmargin, 2))); + // 按机器优先横排--横向横排数量,即横向排列的时候,一行最多能排几个 + verticalLWNum = Math.floor(maxMachineWidth / this.handleZeroToOne(productLength + commonUtils.convertFixNum(dmargin, 2))); + + totalNum += verticalLLNum * verticalLWNum; + + // 画册类,不能混排,而且只能是偶数,如果是奇数,则首选在长方向去掉一列, + horizonalRemaining = 0; + // fTempmarginW = 0;// 宽方向 需减少的出血 + // fTempmarginL = 0;// 长方向 需减少的出血 + horizonalWWNum = 0; + horizonalLWNum = 0; + + if (totalNum > 0) { + // 上述横排完成之后,剩余的右边宽度,用于竖向排列 + horizonalRemaining = maxMachineWidth - (verticalLWNum * (productLength + commonUtils.convertFixNum(dmargin, 2))); + // 按机器优先长排--竖向横排一行能排的数量,即排完竖向之后,剩余的排横向的,看一行能排多少个 + + // / 剩余空间 横向 排数量 + horizonalWWNum = Math.floor(horizonalRemaining / (productWidth + commonUtils.convertFixNum(dmargin, 2))); + // 剩余空间 竖向 排数量 + horizonalLWNum = Math.floor(maxMachineLength / (productLength + commonUtils.convertFixNum(dmargin, 2))); + } + + if (horizonalWWNum * horizonalLWNum === 0) { + // 不是混排的情况 + totalLength = verticalLLNum * (productWidth + commonUtils.convertFixNum(dmargin, 2)); + totalWidth = verticalLWNum * (productLength + commonUtils.convertFixNum(dmargin, 2)); + } else { + totalNum += horizonalWWNum * horizonalLWNum; + // 有可能是左边横向排列占用的长度更长,也有可能是剩余右侧的竖向排列方式占用的长度更长,最终更长的那个作为上机尺寸 + if (verticalLLNum * (productWidth + dmargin) > horizonalLWNum * (productLength + commonUtils.convertFixNum(dmargin, 2))) { + totalLength = verticalLLNum * (productWidth + dmargin); + } else { + totalLength = horizonalLWNum * (productLength + dmargin); + } + // 最终宽度是所有左侧横向排列占据的宽度以及右侧剩余空间竖向排列占据的宽度之和 + totalWidth = (verticalLWNum * (productLength + dmargin)) + (horizonalWWNum * (productWidth + commonUtils.convertFixNum(dmargin, 2))); + } + + result1.remaining = horizonalLWNum * horizonalWWNum; + result1.iLengthComposing = verticalLLNum; + result1.iWidthComposing = verticalLWNum; + + + result1.sMethod = `W#${commonUtils.convertNumberToStr(verticalLLNum)}*${commonUtils.convertNumberToStr(verticalLWNum)}+L#${commonUtils.convertNumberToStr(horizonalWWNum)}*${commonUtils.convertNumberToStr(horizonalLWNum)}`; + result1.sMaterialMethod = `W#${commonUtils.convertNumberToStr(verticalLLNum)}*${commonUtils.convertNumberToStr(verticalLWNum)}+L#${commonUtils.convertNumberToStr(horizonalWWNum)}*${commonUtils.convertNumberToStr(horizonalLWNum)}`; + // 最终要保存排列之后的长和宽,按机器排的时候获取的是上机尺寸;按材料排的时候,就是最优材料排版 + if (totalLength > totalWidth) { + result1.totalLength = totalLength; + result1.totalWidth = totalWidth; + } else { + result1.totalLength = totalWidth; + result1.totalWidth = totalLength; + } + // 最终保存最大数目,以便比较最优排版数 + result1.totalNum = totalNum; + return result1; + }; + handleDescVerticalComposing = (productLength, productWidth, maxMachineLength, maxMachineWidth) => { + let horizonalWWNum = 0; + let horizonalLWNum = 0; + let verticalLLNum = 0; + let verticalLWNum = 0; + let mLength = 0; + let mWidth = 0; + let verticalRemaining = 0; + // eslint-disable-next-line no-unused-vars + let fTempmarginW = 0; + // eslint-disable-next-line no-unused-vars + let fTempmarginL = 0; + const result1 = {}; + // eslint-disable-next-line no-unused-vars + const TYHLLookupList = 0; + const dmargin = 0; + let totalNum = 0;// 总的排列数目 + let totalLength = 0;// 上机长,即最大排列占据的长度 + let totalWidth = 0; // 上机宽,即最大排列占据的宽度 + if (maxMachineLength >= maxMachineWidth) { + mLength = maxMachineLength; + } else { + mLength = maxMachineWidth; + } + + if (maxMachineLength <= maxMachineWidth) { + mWidth = maxMachineLength; + } else { + mWidth = maxMachineWidth; + } + maxMachineLength = mLength; + maxMachineWidth = mWidth; + // 画册类,不能混排,而且只能是偶数,如果是奇数,则首选在长方向去掉一列, + verticalRemaining = 0; + + fTempmarginW = 0;// 宽方向 需减少的出血 + fTempmarginL = 0;// 长方向 需减少的出血 + + horizonalWWNum = 0; + horizonalLWNum = 0; + + // 按机器优先长排--竖排竖方向排多少个 + verticalLLNum = Math.floor(maxMachineLength / this.handleZeroToOne(commonUtils.convertFixNum(productLength, 2) + commonUtils.convertFixNum(dmargin, 2))); + // 竖排横方向排多少个 + verticalLWNum = Math.floor(maxMachineWidth / this.handleZeroToOne(commonUtils.convertFixNum(productWidth, 2) + commonUtils.convertFixNum(dmargin, 2))); + totalNum += verticalLLNum * verticalLWNum; + + if (totalNum > 0) { + // 上述竖排完成之后,剩余的长度 + verticalRemaining = maxMachineLength - (verticalLLNum * (commonUtils.convertFixNum(productLength, 2) + commonUtils.convertFixNum(dmargin, 2))); + // 剩余下面 竖向 排数量 + horizonalLWNum = Math.floor(verticalRemaining / this.handleZeroToOne(productWidth + commonUtils.convertFixNum(dmargin, 2))); + // 剩余下面 横向 排数量 + horizonalWWNum = Math.floor(maxMachineWidth / this.handleZeroToOne(productLength + commonUtils.convertFixNum(dmargin, 2))); + } + + if (horizonalWWNum * horizonalLWNum === 0) { + totalLength = verticalLLNum * (productLength + commonUtils.convertFixNum(dmargin, 2)); + totalWidth = verticalLWNum * (productWidth + commonUtils.convertFixNum(dmargin, 2)); + } else { + totalNum += horizonalLWNum * horizonalWWNum; + totalLength = (verticalLLNum * (productLength + commonUtils.convertFixNum(dmargin, 2))) + ((productWidth + commonUtils.convertFixNum(dmargin, 2)) * horizonalLWNum); + // 最终宽度是所有左侧横向排列占据的宽度以及右侧剩余空间竖向排列占据的宽度之和 + if (verticalLWNum * (productWidth + dmargin) > horizonalWWNum * (productLength + commonUtils.convertFixNum(dmargin, 2))) { + totalWidth = verticalLWNum * (productWidth + commonUtils.convertFixNum(dmargin, 2)); + } else { + totalWidth = horizonalWWNum * (productLength + commonUtils.convertFixNum(dmargin, 2)); + } + } + result1.remaining = horizonalLWNum * horizonalWWNum; + result1.iLengthComposing = verticalLLNum; + result1.iWidthComposing = verticalLWNum; + result1.sMethod = `L#${commonUtils.convertNumberToStr(verticalLLNum)}*${commonUtils.convertNumberToStr(verticalLWNum)}+W#${commonUtils.convertNumberToStr(horizonalLWNum)}*${commonUtils.convertNumberToStr(horizonalWWNum)}`; + result1.sMaterialMethod = `L#${commonUtils.convertNumberToStr(verticalLLNum)}*${commonUtils.convertNumberToStr(verticalLWNum)}+W#${commonUtils.convertNumberToStr(horizonalWWNum)}*${commonUtils.convertNumberToStr(horizonalLWNum)}`; + // 最终要保存排列之后的长和宽,按机器排的时候获取的是上机尺寸;按材料排的时候,就是最优材料排版 + if (totalLength > totalWidth) { + result1.totalLength = totalLength; + result1.totalWidth = totalWidth; + } else { + result1.totalLength = totalWidth; + result1.totalWidth = totalLength; + } + // 最终保存最大数目,以便比较最优排版数 + result1.totalNum = Math.floor(totalNum); + return result1; + }; + handleZeroToOne = (num) => { + if (commonUtils.isEmptyNumber(num) && num === 0) { + num = 1; + } + return num; + }; + + /* 单据字段单击右键全部更新,弹出窗选择后,更新此列所有数据。(只更新非只读字段) */ + handleContextMenuOk=(contextMenuValue) => { + const { + contextMenuConfig, contextMenuTbName, [`${contextMenuTbName}Data`]: tableData, [`${contextMenuTbName}SelectedRowKeys`]: selectedRowKeys, + } = this.props; + if (commonUtils.isNotEmptyObject(contextMenuTbName) && commonUtils.isNotEmptyArr(tableData)) { + if (commonUtils.isNotEmptyArr(contextMenuConfig) && commonUtils.isNotEmptyObject(contextMenuConfig[0])) { + const tableConfig = contextMenuConfig[0]; + const tableFilterData = tableData.filter(item => selectedRowKeys.includes(item.sId)); + if (commonUtils.isNotEmptyArr(tableFilterData)) { + // const tableDataRow = tableFilterData[0]; + if (commonUtils.isNotEmptyObject(tableConfig.sName) && !commonUtils.isEmpty(contextMenuValue)) { + const sName = tableConfig.sName; + tableData.forEach((child, index) => { + const addState = {}; + addState[sName] = contextMenuValue; + addState.handleType = commonUtils.isEmpty(tableData[index].handleType) ? 'update' : tableData[index].handleType; + tableData[index] = { ...tableData[index], ...addState }; + const changeValue = {}; + changeValue[sName] = contextMenuValue; + /* 手动触发改变事件 */ + this.handleTableChange(contextMenuTbName, sName, changeValue, child.sId, [], false); + }); + } + } + } + } + this.props.onSaveState({ + [`${contextMenuTbName}Data`]: tableData, + contextMenuModalVisible: false, /* 右击全部更新弹窗 */ + }); + } + + + /* 选择工艺参数点击确定 */ + handleParamsOk = () => { // 工艺参数弹窗确定按钮 + const { + processData, + processRecord, + processConfig, + sParamData, + enabled, + sParamModalType + } = this.props; + if(enabled) { + if (commonUtils.isNotEmptyArr(processData) && commonUtils.isNotEmptyObject(processRecord)) { + const processSelectDataIndex = processData.findIndex(item => item.sId === processRecord.sId); + if (processSelectDataIndex > -1) { + if (commonUtils.isNotEmptyArr(sParamData)) { + let sParamJsonData = ''; + const sParamSeletedData = sParamData.filter(item => item.bSelfCbx); + if(commonUtils.isNotEmptyObject(sParamSeletedData)) { + sParamJsonData = JSON.stringify(sParamSeletedData); + } + let { handleType } = processData[processSelectDataIndex]; + handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + if(sParamModalType === 'sQuo') { /* 报价参数点击确定 */ + processData[processSelectDataIndex].sQuoParams = sParamJsonData; + } else { /* 工单参数点击确定 */ + processData[processSelectDataIndex].sParams = sParamJsonData; + } + processData[processSelectDataIndex].handleType = handleType; + } + } + } + this.props.onSaveState({ + processData, + sParamsModalVisible: false, + }); + } else { + this.props.onSaveState({ + sParamsModalVisible: false, + }); + } + } + + /* 选择上报参数点击确定 */ + handleReportParamsOk = () => { // 工艺参数弹窗确定按钮 + const { + slaveData, + slaveRecord, + sParamData, + // enabled, + sParamModalType, + } = this.props; + if (true) { + if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyObject(slaveRecord)) { + const processSelectDataIndex = slaveData.findIndex(item => item.sId === slaveRecord.sId); + if (processSelectDataIndex > -1) { + if (commonUtils.isNotEmptyArr(sParamData)) { + let sParamJsonData = ''; + const sParamSeletedData = sParamData.filter(item => item.bSelfCbx); + if (commonUtils.isNotEmptyObject(sParamSeletedData)) { + sParamJsonData = JSON.stringify(sParamSeletedData); + } + let { handleType } = slaveData[processSelectDataIndex]; + handleType = commonUtils.isEmpty(handleType) ? 'update' : handleType; + if (sParamModalType === 'sReport') { /* 报价参数点击确定 */ + slaveData[processSelectDataIndex].sParams = sParamJsonData; + } + slaveData[processSelectDataIndex].handleType = handleType; + } + } + } + console.log('gggg', slaveData); + this.props.onSaveState({ + slaveData, + sParamsModalVisible: false, + }); + } else { + this.props.onSaveState({ + sParamsModalVisible: false, + }); + } + } + + /* 动态参数标题选择框 全选/取消全选 */ + handleCheckParamChange = (name) => { + const { + processData, + processRecord, + processConfig, + sParamData, + sParamColumn, + enabled, + } = this.props; + /* 全选 取消全选功能 */ + if(commonUtils.isNotEmptyArr(sParamData)) { + /* 标题bSelfCbx加标识 */ + const iIndex = sParamColumn.findIndex(item=>item.dataIndex ==='bSelfCbx'); + if(iIndex > -1) { + let bSelfCbx = false; + if(sParamColumn[iIndex].bCheckAll) { + bSelfCbx = false; + } else { + bSelfCbx = true; + } + sParamColumn[iIndex] = {...sParamColumn[iIndex],bCheckAll:bSelfCbx} + sParamData.forEach((item, index) => { + sParamData[index] = { ...sParamData[index], bSelfCbx: bSelfCbx }; + }) + } + this.props.onSaveState({ + sParamData, + sParamColumn + }) + } + } + + /* 工单、工艺卡、报价单上移下移排序 */ + orderNum = (tableData, controlSelectedRowKeys) => { + /* 部件工序排序 */ + const tableFilterData = tableData.filter(item => controlSelectedRowKeys.includes(item.sControlId)); + if (commonUtils.isNotEmptyArr(tableFilterData)) { + tableFilterData.forEach((item, index) => { + item.iOrder = index + 1; + item.handleType = commonUtils.isEmpty(item.handleType) ? 'update' : item.handleType; + const index1 = tableData.findIndex(item1 => item1.sId === item.sId); + if (index1 > -1) { + tableData[index1] = { ...tableData[index1], ...item }; + } + }); + } + /* 成品工序 */ + const tableFilterCPData = tableData.filter(item => item.sType === '3'); + if (commonUtils.isNotEmptyArr(tableFilterCPData)) { + let num = 1001; + tableFilterCPData.forEach((item) => { + item.iOrder = num; + item.handleType = commonUtils.isEmpty(item.handleType) ? 'update' : item.handleType; + const index1 = tableData.findIndex(item1 => item1.sId === item.sId); + num += 1; + if (index1 > -1) { + tableData[index1] = { ...tableData[index1], ...item }; + } + }); + } + return tableData; + }; + + /* 单据预览PDF */ + handleBtnPreviewPdf = async (isWait) => { + const { + app, sModelsId, masterConfig, masterData, slaveConfig, reportData, formRoute, enabled, + } = this.props; + if (formRoute === '/indexPage/commonCheckBill' && commonUtils.isNotEmptyObject(masterData) && !enabled) { + const { token } = app; + const queryFilter = {}; + queryFilter[masterConfig.sId] = { sId: masterData.sId }; + if (commonUtils.isNotEmptyObject(slaveConfig)) { + queryFilter[slaveConfig.sId] = { sSqlCondition: { sParentId: masterData.sId } }; + } + let sActiveId = ''; + const queryFilterJson = JSON.stringify(queryFilter); + /* 拿到打印报表名称 */ + let printReportName = 'report'; + if (commonUtils.isNotEmptyArr(reportData)) { + const iIndex = 0; + if (iIndex > -1) { + printReportName = reportData[iIndex].sReportName; + sActiveId = reportData[iIndex].sId; + } + } else { + message.error('没有报表模块!'); + return; + } + + /* 调用POST接口拿到PDF地址 */ + const dataUrl = `${commonConfig.server_host}printReport/printPreviewPdf/${sActiveId}/${printReportName}.pdf?${false ? 'fileType=.xlsx&' : ''}sModelsId=${sModelsId}&sMaintableId=${masterConfig.sId}`; + const value = { + queryFilter: queryFilterJson, + }; + const dataReturn = (await commonServices.postValueService(token, value, dataUrl)).data; + if (dataReturn.code === 1) { + const url = dataReturn.dataset.rows[0]; + if (commonUtils.isNotEmptyObject(url)) { + const previewUrl = `${commonConfig.server_host}file/downloadPreviewPdf?savePathStr=${url}`; + if (isWait) { + console.log('previewUrl', previewUrl); + return previewUrl; + } else { + this.props.onSaveState({ previewUrl }); + } + } + } else { + this.props.getServiceError(dataReturn); + } + } + }; + + /* 未审核单据 只能预览 */ + handleBtnPreview = async (sActiveId, checked, eKey) => { + const { + app, sModelsId, masterConfig, masterData, slaveConfig, reportData, menuChildData, formRoute, controlConfig, + } = this.props; + const { token } = app; + const queryFilter = {}; + queryFilter[masterConfig.sId] = { sId: masterData.sId }; + if (commonUtils.isNotEmptyObject(slaveConfig)) { + queryFilter[slaveConfig.sId] = { sSqlCondition: { sParentId: masterData.sId } }; + } + const queryFilterJson = JSON.stringify(queryFilter); + // const masterDataJson = JSON.stringify(masterData); + /* 拿到打印报表名称 */ + let printReportName = 'report'; + let printCustomerReportName = 'report'; + if (commonUtils.isNotEmptyArr(reportData)) { + const iIndex = reportData.findIndex(item => item.sId === sActiveId); + if (iIndex > -1) { + printReportName = reportData[iIndex].sReportName; + } + } + if (commonUtils.isNotEmptyArr(menuChildData)) { + const iIndex = menuChildData.findIndex(item => item.sId === sActiveId); + if (iIndex > -1) { + printCustomerReportName = menuChildData[iIndex].sReportName; + } + } + let urlPrint = ''; + if (formRoute === '/indexPage/printlabel') { + if (commonUtils.isNotEmptyObject(masterData) && masterData.dTrunkQty !== undefined && masterData.dFractionQty !== undefined && masterData.dPackQty !== undefined) { // masterData中必填的三个字段 + // const param = masterDataJson; + /* 把masterData放在数组中 */ + const ListData = []; + ListData.push(masterData); + const param = JSON.stringify(ListData); + if (eKey.indexOf('BtnPrint.') > -1) { + urlPrint = `${commonConfig.server_host}printReport/printPdf/${sActiveId}/${printReportName}.pdf?${checked ? 'fileType=.xlsx&' : ''}printType=noquery&sModelsId=${sModelsId}&token=${encodeURIComponent(token)}`; + } else if (eKey.indexOf('BtnPrintCus.') > -1) { + urlPrint = `${commonConfig.server_host}printReport/printPdf/${printCustomerReportName}?${checked ? 'fileType=.xlsx&' : ''}printType=noquery&sModelsId=${sModelsId}&token=${encodeURIComponent(token)}`; + } + /* Get提交地址栏参数过多,更改Get提交为Post提交 */ + this.handleOpenPost(urlPrint, param); + } else { + const dTrunkQtyName = masterConfig.gdsconfigformslave.filter(item => item.sName === 'dTrunkQty'); + const dFractionQtyName = masterConfig.gdsconfigformslave.filter(item => item.sName === 'dFractionQty'); + const dPackQtyName = masterConfig.gdsconfigformslave.filter(item => item.sName === 'dPackQty'); + if (masterData.dTrunkQty === undefined && commonUtils.isNotEmptyObject(dTrunkQtyName)) { + message.error(`${dTrunkQtyName[0].showName} 必填项!`); + } else if (masterData.dFractionQty === undefined && commonUtils.isNotEmptyObject(dFractionQtyName)) { + message.error(`${dFractionQtyName[0].showName} 必填项!`); + } else if (masterData.dPackQty === undefined && commonUtils.isNotEmptyObject(dPackQtyName)) { + message.error(`${dPackQtyName[0].showName} 必填项!`); + } + return; + } + } else if (eKey.indexOf('BtnPrint.') > -1) { + let { controlSelectedRowKeys } = this.props; + /* 不出现选择框,则打印全部;出现选择框,则打印勾选的 */ + let bisMutiSelect = false; + if (commonUtils.isNotEmptyObject(controlConfig) && commonUtils.isNotEmptyArr(controlConfig.gdsconfigformslave)) { + const filterData = controlConfig.gdsconfigformslave.filter(item => item.sControlName === 'bisMutiSelect'); + if (commonUtils.isNotEmptyArr(filterData)) { + bisMutiSelect = filterData[0].bVisible; + } + } + if (bisMutiSelect === false || bisMutiSelect === undefined) { + controlSelectedRowKeys = []; + } + urlPrint = `${commonConfig.server_host}printReport/printPdf/${sActiveId}/${printReportName}.pdf?${checked ? 'fileType=.xlsx&' : ''}sModelsId=${sModelsId}&sMaintableId=${masterConfig.sId}&sControlIds=${commonUtils.isNotEmptyArr(controlSelectedRowKeys) ? controlSelectedRowKeys : []}`; + } else if (eKey.indexOf('BtnPrintCus.') > -1) { + urlPrint = `${commonConfig.server_host}printReport/printPdf/${printCustomerReportName}?${checked ? 'fileType=.xlsx&' : ''}sModelsId=${sModelsId}&sMaintableId=${masterConfig.sId}`; + } + if (formRoute !== '/indexPage/printlabel') { + /* 调用POST接口拿到PDF地址 */ + const dataUrl = `${commonConfig.server_host}printReport/printPreviewPdf/${sActiveId}/${printReportName}.pdf?${false ? 'fileType=.xlsx&' : ''}sModelsId=${sModelsId}&sMaintableId=${masterConfig.sId}`; + const value = { + queryFilter: queryFilterJson, + }; + const dataReturn = (await commonServices.postValueService(token, value, dataUrl)).data; + if (dataReturn.code === 1) { + const url = dataReturn.dataset.rows[0]; + if (commonUtils.isNotEmptyObject(url)) { + const previewUrl = `${commonConfig.server_host}file/downloadPreviewPdf?savePathStr=${url}`; + console.log('previewUrl:', previewUrl); + if (true) { + this.handleOpenPrintTab(previewUrl); + } + } + } else { + this.props.getServiceError(dataReturn); + } + } + }; + + handleOpenPrintTab = (url) => { + const { dispatch } = this.props; + const newsId = '01251240115015952245193980'; /* 表格行的sId */ + const newKey = new Date().getTime().toString(); + const route = '/indexPage/printPdf'; + const title = '预览PDF'; + const sModelsType = 'print/printPdf'; + const previewUrl = url; + const pane = { + title, route, formId: newsId, key: newKey, sModelsType, previewUrl, + }; + dispatch({ type: 'app/addPane', payload: { pane } }); + }; + /* 选择产品 调用工艺卡 选择数据带回窗体 */ + handleSelectCommonPopupProduct = (currentPaneName, selectConfig, selectData, tbName) => { + const { + [`${tbName}SelectedRowKeys`]: tableSelectedRowKeys, masterData, + controlData, controlSelectedRowKeys, sModelsId, sModelsType, token, + } = this.props; + const addState = {}; + let treeState = {}; /* 包装订单 生成树形 */ + + let { [`${tbName}Data`]: tableData } = this.props; + if (commonUtils.isNotEmptyArr(tableData) && commonUtils.isNotEmptyArr(selectData)) { + const iIndex = commonUtils.isNotEmptyArr(tableSelectedRowKeys) ? tableData.findIndex(item => item.sId === tableSelectedRowKeys[0]) : -1; + const iControlIndex = commonUtils.isNotEmptyArr(controlSelectedRowKeys) ? controlData.findIndex(item => item.sId === controlSelectedRowKeys[0]) : -1; /* 控制表 */ + selectData.forEach(async (item, index) => { + const newCopyTo = {}; + newCopyTo.master = masterData; + const sName = selectConfig.sKeyUpFilter; /* 将后台配置筛选字段作为 列字段 */ + let sValue = ''; + if (iIndex > -1) { + newCopyTo.slave = tableData[iIndex]; + sValue = tableData[iIndex][sName]; + } + if (iControlIndex > -1) { + newCopyTo.control = controlData[iControlIndex]; + } + /* 第一条数据若字段值为空或者只有一条数据时 则添加到该行 否则新增一行s */ + if (selectData.length === 1 || (index === 0 && commonUtils.isEmptyObject(sValue))) { + let tableDataRow = {}; // 取默认值 + if (tbName === 'master') { + tableDataRow = { ...tableData, ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + tableData = tableDataRow; + tableData.handleType = commonUtils.isEmpty(tableData.handleType) ? 'update' : tableData.handleType; + } else { + tableDataRow = { ...tableData[iIndex], ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + tableData[iIndex] = tableDataRow; + tableData[iIndex].handleType = commonUtils.isEmpty(tableData[iIndex].handleType) ? 'update' : tableData[iIndex].handleType; + + // 取工艺卡数据 + if (tbName === 'slave') { + const { + controlConfig, materialsConfig, processConfig, + } = this.props; + let { controlData, materialsData, processData } = this.props; + const sId = tableData[iIndex].sId; + const bCkxCopyFromTechnology = '1'; // app.systemData.filter(item => item.sName === 'CkxCopyFromTechnology')[0].sValue; + if (bCkxCopyFromTechnology === '1' && tableDataRow.sProductId !== tableDataRow.sProductName) { + const controlSelectedData = controlData.filter(item => item.sSlaveId === sId); + if (commonUtils.isNotEmptyObject(controlSelectedData)) { + const controlSelectedRowKeys = []; + controlSelectedData.forEach((item) => { + controlSelectedRowKeys.push(item.sId); + }); + const materialsReturnData = this.otherTableDel('materials', controlSelectedRowKeys); + const processReturnData = this.otherTableDel('process', controlSelectedRowKeys); + const controlReturnData = this.props.onDataRowDel('control', true, controlSelectedRowKeys); + controlData = controlReturnData.controlData; + materialsData = materialsReturnData.materialsData; + processData = processReturnData.processData; + this.props.onSaveState({ + ...materialsReturnData, + ...processReturnData, + ...controlReturnData, + }); + } + const sCustomerId = masterData.sCustomerId; + const sProductId = tableDataRow.sProductId; + const sProductIdArray = []; + sProductIdArray.push(sProductId); + const sProductIds = sProductIdArray.toString(); + const condition = { sCustomerId, sProductIds }; + const dataUrl = `${commonConfig.server_host}salesorder/getProcessCardDataByCustomIdProductId/?sModelsId=${sModelsId}`; + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; + const config = this.props.masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes('BtnCopyFrom.ActProcessCard')); + if (dataReturn.code === 1) { + const returnData = dataReturn.dataset.rows[0]; + const copyToControlConfig = config.filter(item => item.sControlName.toLowerCase() === 'BtnCopyFrom.ActProcessCard.Control'.toLowerCase()); + const copyToMaterialsConfig = config.filter(item => item.sControlName.toLowerCase() === 'BtnCopyFrom.ActProcessCard.Materials'.toLowerCase()); + const copyToProcessConfig = config.filter(item => item.sControlName.toLowerCase() === 'BtnCopyFrom.ActProcessCard.Process'.toLowerCase()); + const controlAssignField = commonUtils.isNotEmptyArr(copyToControlConfig) ? copyToControlConfig[0].sAssignField : ''; + const materialsAssignField = commonUtils.isNotEmptyArr(copyToMaterialsConfig) ? copyToMaterialsConfig[0].sAssignField : ''; + const processAssignField = commonUtils.isNotEmptyArr(copyToProcessConfig) ? copyToProcessConfig[0].sAssignField : ''; + const newCopyTo = {}; + newCopyTo.master = masterData; + newCopyTo.slave = commonUtils.isEmptyArr(tableData) ? {} : tableData; + if (commonUtils.isNotEmptyArr(returnData.controlData)) { + const treeCopyNodes = new Map(); + // eslint-disable-next-line no-loop-func + returnData.controlData.forEach((controlItem) => { + newCopyTo.control = controlItem; + let controlRow = commonFunc.getDefaultData(controlConfig, newCopyTo); // 取默认值 + controlRow = { ...controlRow, ...commonFunc.getAssignFieldValue(controlAssignField, controlItem, newCopyTo) }; // 取赋值字段 + controlRow.handleType = 'add'; + controlRow.sId = commonUtils.createSid(); + controlRow.sSlaveId = tableDataRow.sId; + controlRow.sParentId = masterData.sId; + if (sModelsType === 'sales/salesOrderPack') { /* 树形 */ + /* CopyTo时sAllId,sControlParentId 设置 */ + const sAllOldId = controlItem.sAllId; + let arr = []; + if (commonUtils.isNotEmptyObject(sAllOldId)) { + arr = sAllOldId.split(','); + } + const newId = controlRow.sId; + let sOldParentId = ''; + let sNewParentAllId = ''; + if (arr.length < 2) { /* 根节点复制 */ + controlRow.sAllId = newId; + sOldParentId = newId; + sNewParentAllId = newId; + } else { + sOldParentId = arr[arr.length - 2]; + if (treeCopyNodes.has(sOldParentId)) { + sNewParentAllId = treeCopyNodes.get(sOldParentId); + } else { + const obj = arr[arr.length - 1]; + sNewParentAllId = sAllOldId.replace((`,${obj}`), ''); + } + const sNewArr = sNewParentAllId.split(','); + controlRow.sControlParentId = sNewArr[sNewArr.length - 1]; + sNewParentAllId = `${sNewParentAllId},${newId}`; + controlRow.sAllId = sNewParentAllId; + } + treeCopyNodes.set(controlItem.sId, sNewParentAllId); + } + controlData.push(controlRow); + + if (commonUtils.isNotEmptyArr(returnData.materialsData)) { + returnData.materialsData.filter(item => item.sControlId === controlItem.sId).forEach((materialsItem) => { + newCopyTo.materials = materialsItem; + let materialsRow = commonFunc.getDefaultData(materialsConfig, newCopyTo); // 取默认值 + materialsRow = { ...materialsRow, ...commonFunc.getAssignFieldValue(materialsAssignField, materialsItem, newCopyTo) }; // 取赋值字段 + materialsRow.handleType = 'add'; + materialsRow.sId = commonUtils.createSid(); + materialsRow.sSlaveId = tableDataRow.sId; + materialsRow.sParentId = masterData.sId; + materialsRow.sControlId = controlRow.sId; + materialsRow.sPartsName = controlRow.sPartsName; + + materialsData.push(materialsRow); + }); + } + + if (commonUtils.isNotEmptyArr(returnData.processData)) { + returnData.processData.filter(item => item.sControlId === controlItem.sId).forEach((processItem) => { + newCopyTo.process = processItem; + let processRow = commonFunc.getDefaultData(processConfig, newCopyTo); // 取默认值 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignField, processItem, newCopyTo) }; // 取赋值字段 + processRow.handleType = 'add'; + processRow.sId = commonUtils.createSid(); + processRow.sSlaveId = tableDataRow.sId; + processRow.sParentId = masterData.sId; + processRow.sControlId = controlRow.sId; + processRow.sPartsName = controlRow.sPartsName; + processData.push(processRow); + }); + } + }); + } + if (commonUtils.isNotEmptyArr(returnData.materialsData)) { + // eslint-disable-next-line no-loop-func + returnData.materialsData.filter(item => item.sType === '2').forEach((materialsItem) => { + newCopyTo.materials = materialsItem; + let materialsRow = commonFunc.getDefaultData(materialsConfig, newCopyTo); // 取默认值 + materialsRow = { ...materialsRow, ...commonFunc.getAssignFieldValue(materialsAssignField, materialsItem, newCopyTo) }; // 取赋值字段 + materialsRow.handleType = 'add'; + materialsRow.sId = commonUtils.createSid(); + materialsRow.sSlaveId = tableDataRow.sId; + materialsRow.sParentId = masterData.sId; + materialsData.push(materialsRow); + }); + } + if (commonUtils.isNotEmptyArr(returnData.processData)) { + // eslint-disable-next-line no-loop-func + returnData.processData.filter(item => item.sType === '3').forEach((processItem) => { + newCopyTo.process = processItem; + let processRow = commonFunc.getDefaultData(processConfig, newCopyTo); // 取默认值 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignField, processItem, newCopyTo) }; // 取赋值字段 + processRow.handleType = 'add'; + processRow.sId = commonUtils.createSid(); + processRow.sSlaveId = tableDataRow.sId; + processRow.sParentId = masterData.sId; + processData.push(processRow); + }); + } + if (sModelsType === 'sales/salesOrderPack') { + treeState = this.handleGetControlTreeData(controlData, true); + } + addState.controlData = controlData; + addState.materialsData = materialsData; + addState.processData = processData; + addState.controlData = controlData; + // this.props.onSaveState({ + // controlData, materialsData, processData, ...treeState, + // }); + } + } + } + } + } else { + let tableDataRowAdd = this.handleTableAdd(tbName, true); + tableDataRowAdd = { ...tableDataRowAdd, ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 + // 取工艺卡数据 + if (tbName === 'slave') { + const { + controlConfig, materialsConfig, processConfig, + } = this.props; + let { controlData, materialsData, processData } = this.props; + const sId = tableData[iIndex].sId; + const bCkxCopyFromTechnology = '1'; // app.systemData.filter(item => item.sName === 'CkxCopyFromTechnology')[0].sValue; + if (bCkxCopyFromTechnology === '1' && tableDataRowAdd.sProductId !== tableDataRowAdd.sProductName) { + const controlSelectedData = controlData.filter(item => item.sSlaveId === sId); + if (commonUtils.isNotEmptyObject(controlSelectedData)) { + const controlSelectedRowKeys = []; + controlSelectedData.forEach((item) => { + controlSelectedRowKeys.push(item.sId); + }); + const materialsReturnData = this.otherTableDel('materials', controlSelectedRowKeys); + const processReturnData = this.otherTableDel('process', controlSelectedRowKeys); + const controlReturnData = this.props.onDataRowDel('control', true, controlSelectedRowKeys); + controlData = controlReturnData.controlData; + materialsData = materialsReturnData.materialsData; + processData = processReturnData.processData; + this.props.onSaveState({ + ...materialsReturnData, + ...processReturnData, + ...controlReturnData, + }); + } + const sCustomerId = masterData.sCustomerId; + const sProductId = tableDataRowAdd.sProductId; + const sProductIdArray = []; + sProductIdArray.push(sProductId); + const sProductIds = sProductIdArray.toString(); + const condition = { sCustomerId, sProductIds }; + const dataUrl = `${commonConfig.server_host}salesorder/getProcessCardDataByCustomIdProductId/?sModelsId=${sModelsId}`; + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; + const config = this.props.masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes('BtnCopyFrom.ActProcessCard')); + if (dataReturn.code === 1) { + const returnData = dataReturn.dataset.rows[0]; + const copyToControlConfig = config.filter(item => item.sControlName.toLowerCase() === 'BtnCopyFrom.ActProcessCard.Control'.toLowerCase()); + const copyToMaterialsConfig = config.filter(item => item.sControlName.toLowerCase() === 'BtnCopyFrom.ActProcessCard.Materials'.toLowerCase()); + const copyToProcessConfig = config.filter(item => item.sControlName.toLowerCase() === 'BtnCopyFrom.ActProcessCard.Process'.toLowerCase()); + const controlAssignField = commonUtils.isNotEmptyArr(copyToControlConfig) ? copyToControlConfig[0].sAssignField : ''; + const materialsAssignField = commonUtils.isNotEmptyArr(copyToMaterialsConfig) ? copyToMaterialsConfig[0].sAssignField : ''; + const processAssignField = commonUtils.isNotEmptyArr(copyToProcessConfig) ? copyToProcessConfig[0].sAssignField : ''; + const newCopyTo = {}; + newCopyTo.master = masterData; + newCopyTo.slave = commonUtils.isEmptyArr(tableData) ? {} : tableData; + if (commonUtils.isNotEmptyArr(returnData.controlData)) { + const treeCopyNodes = new Map(); + // eslint-disable-next-line no-loop-func + returnData.controlData.forEach((controlItem) => { + newCopyTo.control = controlItem; + let controlRow = commonFunc.getDefaultData(controlConfig, newCopyTo); // 取默认值 + controlRow = { ...controlRow, ...commonFunc.getAssignFieldValue(controlAssignField, controlItem, newCopyTo) }; // 取赋值字段 + controlRow.handleType = 'add'; + controlRow.sId = commonUtils.createSid(); + controlRow.sSlaveId = tableDataRowAdd.sId; + controlRow.sParentId = masterData.sId; + if (sModelsType === 'sales/salesOrderPack') { /* 树形 */ + /* CopyTo时sAllId,sControlParentId 设置 */ + const sAllOldId = controlItem.sAllId; + let arr = []; + if (commonUtils.isNotEmptyObject(sAllOldId)) { + arr = sAllOldId.split(','); + } + const newId = controlRow.sId; + let sOldParentId = ''; + let sNewParentAllId = ''; + if (arr.length < 2) { /* 根节点复制 */ + controlRow.sAllId = newId; + sOldParentId = newId; + sNewParentAllId = newId; + } else { + sOldParentId = arr[arr.length - 2]; + if (treeCopyNodes.has(sOldParentId)) { + sNewParentAllId = treeCopyNodes.get(sOldParentId); + } else { + const obj = arr[arr.length - 1]; + sNewParentAllId = sAllOldId.replace((`,${obj}`), ''); + } + const sNewArr = sNewParentAllId.split(','); + controlRow.sControlParentId = sNewArr[sNewArr.length - 1]; + sNewParentAllId = `${sNewParentAllId},${newId}`; + controlRow.sAllId = sNewParentAllId; + } + treeCopyNodes.set(controlItem.sId, sNewParentAllId); + } + controlData.push(controlRow); + + if (commonUtils.isNotEmptyArr(returnData.materialsData)) { + returnData.materialsData.filter(item => item.sControlId === controlItem.sId).forEach((materialsItem) => { + newCopyTo.materials = materialsItem; + let materialsRow = commonFunc.getDefaultData(materialsConfig, newCopyTo); // 取默认值 + materialsRow = { ...materialsRow, ...commonFunc.getAssignFieldValue(materialsAssignField, materialsItem, newCopyTo) }; // 取赋值字段 + materialsRow.handleType = 'add'; + materialsRow.sId = commonUtils.createSid(); + materialsRow.sSlaveId = tableDataRowAdd.sId; + materialsRow.sParentId = masterData.sId; + materialsRow.sControlId = controlRow.sId; + materialsRow.sPartsName = controlRow.sPartsName; + + materialsData.push(materialsRow); + }); + } + + if (commonUtils.isNotEmptyArr(returnData.processData)) { + returnData.processData.filter(item => item.sControlId === controlItem.sId).forEach((processItem) => { + newCopyTo.process = processItem; + let processRow = commonFunc.getDefaultData(processConfig, newCopyTo); // 取默认值 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignField, processItem, newCopyTo) }; // 取赋值字段 + processRow.handleType = 'add'; + processRow.sId = commonUtils.createSid(); + processRow.sSlaveId = tableDataRowAdd.sId; + processRow.sParentId = masterData.sId; + processRow.sControlId = controlRow.sId; + processRow.sPartsName = controlRow.sPartsName; + processData.push(processRow); + }); + } + }); + } + if (commonUtils.isNotEmptyArr(returnData.materialsData)) { + // eslint-disable-next-line no-loop-func + returnData.materialsData.filter(item => item.sType === '2').forEach((materialsItem) => { + newCopyTo.materials = materialsItem; + let materialsRow = commonFunc.getDefaultData(materialsConfig, newCopyTo); // 取默认值 + materialsRow = { ...materialsRow, ...commonFunc.getAssignFieldValue(materialsAssignField, materialsItem, newCopyTo) }; // 取赋值字段 + materialsRow.handleType = 'add'; + materialsRow.sId = commonUtils.createSid(); + materialsRow.sSlaveId = tableDataRowAdd.sId; + materialsRow.sParentId = masterData.sId; + materialsData.push(materialsRow); + }); + } + if (commonUtils.isNotEmptyArr(returnData.processData)) { + // eslint-disable-next-line no-loop-func + returnData.processData.filter(item => item.sType === '3').forEach((processItem) => { + newCopyTo.process = processItem; + let processRow = commonFunc.getDefaultData(processConfig, newCopyTo); // 取默认值 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignField, processItem, newCopyTo) }; // 取赋值字段 + processRow.handleType = 'add'; + processRow.sId = commonUtils.createSid(); + processRow.sSlaveId = tableDataRowAdd.sId; + processRow.sParentId = masterData.sId; + processData.push(processRow); + }); + } + if (sModelsType === 'sales/salesOrderPack') { + treeState = this.handleGetControlTreeData(controlData, true); + } + addState.controlData = controlData; + addState.materialsData = materialsData; + addState.processData = processData; + addState.controlData = controlData; + // this.props.onSaveState({ + // controlData, materialsData, processData, ...treeState, + // }); + } + } + } + tableData.push(tableDataRowAdd); + } + this.props.onSaveState({ [`${tbName}Data`]: tableData, ...addState, ...treeState }); + }); + } + }; + + handleTableBlur = async (name, sFieldName, record, tableConfig) => { + const { sModelsId, app, token, sModelsType, [`${name}Data`]: tableData, [`${name}Data`]: tableSelectedRowKeys, masterData } = this.props; + const models = name === 'materials' ? 'Materials' : + sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('print/') || sModelsType.includes('quotation/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; + let tableDataRow = {}; + if (sFieldName === 'sMaterialsNo' || sFieldName === 'sMaterialsName' || sFieldName === 'dAuxiliaryQty' || sFieldName === 'dReelAuxiliaryQty' || sFieldName === 'dConversionQty' || sFieldName === 'sMaterialsStyle') { + let iIndex = -1; + if(commonUtils.isEmptyArr(tableSelectedRowKeys)) { + iIndex = 0; + } else { + tableData.findIndex(item => item.sId === tableSelectedRowKeys.toString()) + } + tableDataRow = await this.handleMaterialsChange(record, sModelsId, masterData, {}, sFieldName, app, token, models); + if(iIndex > -1) { + tableData[iIndex] = tableDataRow; + } + this.props.onSaveState({ [`${name}Data`]: tableData}) + } else { + this.props.onDropDownBlur(name, sFieldName, record, tableConfig); + } + }; + + handleShowParam = (name, record, tableSelectedRowKeys) => { + let processSelectedData = []; + if(commonUtils.isNotEmptyObject(record)) { + processSelectedData = [record]; + } + this.props.onSaveState({ + commonParamVisible: true, + processSelectedData, + processSelectedRowKeys:tableSelectedRowKeys, + }); + } + + + render() { + const { masterData } = this.props; + const imgSrc = commonBusiness.handleAddIcon(masterData); + return ( + + ); + } + }; +}; diff --git a/src/components/Common/CommonComponent/index.js b/src/components/Common/CommonComponent/index.js new file mode 100644 index 0000000..e55b4cd --- /dev/null +++ b/src/components/Common/CommonComponent/index.js @@ -0,0 +1,3180 @@ +import moment from 'moment'; +import React, { Component, createRef } from 'react'; +import reactComponentDebounce from '@/components/Common/ReactDebounce'; +import '@ant-design/compatible/assets/index.css'; +import { + InputNumber, + Checkbox, + DatePicker, + TimePicker, + Input, + Cascader, + Select, + AutoComplete, + Spin, + message, + Form, + Upload, + Image, + Button, + Space, + Table, + Pagination, + Tooltip, +} from 'antd'; +import { + EyeOutlined, + FilePdfOutlined, + FileWordOutlined, + FileExcelOutlined, + FileOutlined, + InfoCircleFilled, + PlusOutlined, +} from '@ant-design/icons'; +import * as commonUtils from '@/utils/utils'; +import styles from '@/index.less'; +import Provinces from '@/assets/provinces.json'; +import Cities from '@/assets/cities.json'; +import Areas from '@/assets/areas.json'; +import * as commonConfig from '@/utils/config'; +import { VirtualKeyboard } from '@/oee/common/oeeKeyBoard';// 虚拟软键盘 +import 'braft-editor/dist/output.css'; +import TBTimeModalComponent from '../../../mes/common/tbTimeModalComponent'; +import InputMultiModalComponent from '../../../mes/common/inputMultiModalComponent'; + +const FormItem = Form.Item; +const { Option } = Select; +const { TextArea } = Input; +const { Search } = Input; +const InputNumberA = reactComponentDebounce(300)(InputNumber); +const InputA = reactComponentDebounce(300)(Input); +const AutoCompleteA = reactComponentDebounce(300)(AutoComplete); /* 处理快速选择产品后离开 产品无法赋值问题s */ +const TextAreaA = reactComponentDebounce(500)(TextArea); +// const InputNumberA = InputNumber; +// const InputA = Input; +// const AutoCompleteA = AutoComplete; +// const TextAreaA = TextArea; +const { RangePicker, MonthPicker } = DatePicker; + +export default class CommonComponent extends Component { + /** 构造函数 */ + constructor(props) { + super(props); + this.state = { + dataValue: props.dataValue, /* 本showType数据 */ + enabled: props.enabled, /* 是否是查看状态(数据格式:布尔) */ + dropDownData: [], /* 下拉数据集(如果不是下拉控件该值为空,数据格式:数组对象) */ + conditonValues: {}, + sFieldName: props.showConfig.sName, // 字段名 + bNotEmpty: props.showConfig.bNotEmpty, + mode: props.showConfig.bMultipleChoice ? 'multiple' : 'default', + bNewRecord: props.showConfig.bNewRecord, /* 是否有新纪录 */ + sActiveDisplay: true, + pageNum: 0, + totalPageCount: 1, + searchValue: '', + searchDropDownData: [], + searchTotalPageCount: 1, + searchPageNum: 0, + spinState: false, + currentPage: 1, + selectTableData: [], + buttonLoading: false, + }; + this.lastValue = props.dataValue; + this.firstDataIndex = props.showConfig.sDateFormat === "decimalPoint" ? "d" : props.showConfig.sName.substring(0, 1); /* 控件首字母(数据格式:字符串) */ + this.max = props.showConfig.sMaxValue; /* 最大值(数据格式:数字) */ + this.min = props.showConfig.sMinValue; /* 最小值(数据格式:数字) */ + // 重构修改 + this.getFieldDecorator = commonUtils.isUndefined(props.form) ? undefined : props.form.getFieldDecorator; /* 字段验证(数据格式:数字) */ + // this.getFieldDecorator = commonUtils.isUndefined(props.form) ? undefined : undefined; /* 字段验证(数据格式:数字) */ + this.floatNum = this.props.getFloatNum(props.showConfig.sName); /* 数字格式化规范转换(数据格式:数字) */ + this.floatPrice = this.getFloatPrice(this.floatNum); /* 价格格式化规范转换(数据格式:数字) */ + this.formItemLayout = commonUtils.isNotEmptyObject(props.formItemLayout) ? + props.formItemLayout : + location.pathname.toLowerCase().indexOf('oee') > -1 ? { labelCol: { span: 7, style: { color: 'rgba(0, 0, 0, 0.65)', backgroundColor: '#BFEFFF' } }, wrapperCol: { span: 15 } } : + { labelCol: { span: 7, style: { height: '27.82px', color: 'rgba(0, 0, 0, 0.65)', backgroundColor: '#BFEFFF' } }, wrapperCol: { span: 15 } }; /* 表格样式(主要是colspan和rowspan,数据格式:对象) */ + this.isDropdownFilter = false; + this.V = { value: props.dataValue }; + this.myRef = createRef(); + this.isReportInfo = this.props.showConfig?.sControlName?.startsWith('reportInfo'); + this.bTbTime = this.firstDataIndex === "t" && this.props.showConfig?.sControlName?.startsWith('tbTime'); + } + + /** 渲染前只执行一次 */ + componentWillMount() { + this.mounted = true; + if (this.props.showConfig.sDropDownType === 'const') { /* 常量下拉 */ + /* 常量下拉其实只取一次数据就可以啦,去过数据的会给state中的dropDownData赋值,所以dropDownData有值的情况就不需要再获取了 */ + const showDropDown = commonUtils.isNotEmptyArr(this.props.showConfig.dropDownData) ? this.props.showConfig.dropDownData : + (typeof this.props.showConfig.showDropDown === 'object') ? this.props.showConfig.showDropDown : commonUtils.objectToArr(commonUtils.convertStrToObj(this.props.showConfig.showDropDown)); + /* 给state赋值 */ + if (this.mounted) { + this.setState({ + dropDownData: showDropDown, + }); + } + } else if (this.props.showConfig.sDropDownType === 'sql' && !commonUtils.isEmptyArr(this.props.showConfig.dropDownData)) { + if (this.mounted) { + this.setState({ + dropDownData: this.props.showConfig.dropDownData, + }); + } + } + } + + componentDidMount() { + const currentNode = this.myRef.current; + const selectInputNode = currentNode.querySelector("input[class*='ant-select-selection-search-input']"); + if (selectInputNode) { + selectInputNode.addEventListener('compositionstart', () => { + this.chineseInputting = true; + }); + selectInputNode.addEventListener('compositionend', () => { + this.chineseInputting = false; + }); + } + + if (currentNode) { + if (['t', 'm', 'y'].includes(this.firstDataIndex)) { + const oInput = currentNode.querySelector(`#${this.props.showConfig.sName}`); + if (oInput) { + let { sDateFormat } = this.props.showConfig; + if (commonUtils.isEmptyStr(sDateFormat)) { + if (this.firstDataIndex === 'm') { + sDateFormat = 'YYYY-MM'; + } else if (this.firstDataIndex === 'y') { + sDateFormat = 'YYYY'; + } else { + sDateFormat = this.props.getDateFormat(); + } + } + oInput.oninput = (e) => { + const { value } = e.target; + const isValidDate = moment(value, sDateFormat, true).isValid(); + if (isValidDate) { + this.handleSelectOptionEvent(moment(this.state.dataValue), value); + } + }; + } + } + } + + if (this.bTbTime) { + const oInput = currentNode.querySelector('.ant-picker-input input'); + if (oInput) { + oInput.onfocus = () => { + this.setState({ + tbTimeModalVisible: true + }); + } + } + } + + if (currentNode && commonUtils.isNotEmptyObject(this.props.showConfig.sName) && this.props.showConfig.sDropDownType === 'popup') { + const oInput = currentNode.querySelector('input'); + const oBtn = currentNode.querySelector('.ant-input-group-addon button'); + if (oInput && oBtn) { + oInput.onfocus = () => { + oBtn.click(); + } + } + } + + // 默认获取下拉值 + if (this.props.getDefaultDropDownData && this.props.showConfig.sDropDownType === 'sql' && commonUtils.isEmptyArr(this.props.showConfig.dropDownData)) { + this.props.getSqlDropDownData(this.props.formId, this.props.name, this.props.showConfig, this.props.record, '', 1).then(result => { + this.props.getDefaultDropDownData(result); + }); + } + } + + /** props改变的时候触发 */ + componentWillReceiveProps(nextProps) { + /* 如果是下拉控件,则要获取数据(获取下拉数据前要先更新sqlCondition) */ + const { + dataValue, enabled, sFieldName, bNotEmpty, showName, sDropDownType, + } = this.state; + if (nextProps.showConfig === undefined || this.props.showConfig === undefined) return; + this.firstDataIndex = nextProps.showConfig.sDateFormat === "decimalPoint" ? "d" : nextProps.showConfig.sName.substring(0, 1); /* 控件首字母(数据格式:字符串) */ + + if (nextProps.showConfig.sDropDownType === 'const') { /* 常量下拉 */ + /* 常量下拉其实只取一次数据就可以啦,去过数据的会给state中的dropDownData赋值,所以dropDownData有值的情况就不需要再获取了 */ + const showDropDown = commonUtils.isNotEmptyArr(nextProps.showConfig.dropDownData) ? nextProps.showConfig.dropDownData : + (typeof nextProps.showConfig.showDropDown === 'object') ? nextProps.showConfig.showDropDown : commonUtils.objectToArr(commonUtils.convertStrToObj(nextProps.showConfig.showDropDown)); + // 对应工序单独处理 + // if (this.props.showConfig.showName === '对应工序') { + // showDropDown = nextProps.customDropData; + // } + /* 给state赋值 */ + if (this.mounted) { + this.setState({ + dropDownData: showDropDown, + }); + } + } else if (nextProps.showConfig.sDropDownType === 'sql' && !commonUtils.isEmptyArr(nextProps.showConfig.dropDownData)) { + if (this.mounted) { + this.setState({ + dropDownData: nextProps.showConfig.dropDownData, + }); + } + } + /* 把需要更新的数据setState */ + if (dataValue !== nextProps.dataValue || enabled !== nextProps.enabled || bNotEmpty !== nextProps.showConfig.bNotEmpty || sFieldName !== nextProps.showConfig.sName || (showName !== nextProps.showConfig.showName || !showName) || sDropDownType !== nextProps.showConfig.sDropDownType) { + if (this.mounted) { + if (nextProps.dataValue === undefined) { + this.lastValue = nextProps.dataValue; + } + this.setState({ + dataValue: nextProps.dataValue, + enabled: nextProps.enabled, + sFieldName: nextProps.showConfig.sName, + sDropDownType: nextProps.showConfig.sDropDownType, + bNotEmpty: nextProps.showConfig.bNotEmpty, + showName: nextProps.showConfig.showName, + numberChanged: this.numberChanged + }); + } + } + } + + shouldComponentUpdate(nextProps, nextState) { + const { + dataValue, enabled, dropDownData, searchValue, searchDropDownData, sFieldName, bNotEmpty, sActiveDisplay, sDropDownType, spinState, tbTimeModalVisible, inputMultiModalVisible + } = this.state; + + let iBigBoardNoFlag = false; + if ( + (nextProps.name === "salveWydm2" && nextProps?.showConfig?.sName === 'iBigBoardNo') || + (nextProps.name === "slaveWypj2" && nextProps?.showConfig?.sName === 'sReelNo') || + (nextProps.name === "slaveWypj2" && nextProps?.showConfig?.sName === 'sIndexNo') || + (nextProps.name === "salveWybz2" && nextProps?.showConfig?.sName?.endsWith('BigBoardNo')) || + (nextProps.name === "slaveWyrj2" && nextProps?.showConfig?.sName === 'sIndexNo') + ) { + iBigBoardNoFlag = JSON.stringify(nextProps.record) !== JSON.stringify(this.props.record); + } + + return nextProps.showConfig !== undefined && (dataValue !== nextState.dataValue || enabled !== nextState.enabled || + sFieldName !== nextState.sFieldName || sDropDownType !== nextState.sDropDownType || bNotEmpty !== nextState.bNotEmpty || JSON.stringify(dropDownData) !== JSON.stringify(nextState.dropDownData) || + searchValue !== nextState.searchValue || JSON.stringify(searchDropDownData) !== JSON.stringify(nextState.searchDropDownData) || + JSON.stringify(sActiveDisplay) !== JSON.stringify(nextState.sActiveDisplay) || nextProps.showTime !== this.props.showTime || + spinState !== nextState.spinState || JSON.stringify(nextState.selectTableData) !== JSON.stringify(this.state.selectTableData) || iBigBoardNoFlag || + tbTimeModalVisible !== nextState.tbTimeModalVisible || inputMultiModalVisible !== nextState.inputMultiModalVisible); + } + + componentWillUnmount() { + this.mounted = false; + } + + onFocus = () => { + if (['i', 'd', 'b', 's'].includes(this.firstDataIndex)) { + const { sOnChangeInstruct } = this.props.showConfig; + const sInstruct = commonUtils.convertStrToObj(sOnChangeInstruct, {}); + if (sInstruct.blur) { + this.props.app.globalFun.onSetMask(true); + } + } + clearTimeout(this.leaveTimer); + this.isDropdownFilter = false; + this.setState({ sActiveDisplay: false }); + }; + + onBlur = (event) => { + this.isDropdownFilter = false; + if (this.state.searchValue !== '' && this.props.showConfig.sDropDownType === 'sql' && commonUtils.isEmptyArr(this.props.showConfig.dropDownData)) { + if (!this.props.showConfig.bCanInput) { + this.handleSelectOptionEvent(''); + } + this.setState({ + searchPageNum: 1, + searchTotalPageCount: 1, + searchDropDownData: [], + searchValue: '', + spinState: false, + sActiveDisplay: true, + }); + } else { + this.setState({ + sActiveDisplay: true, + }); + } + /* 若下拉配置了movesql 则离开时 调用下拉sql数据 */ + if (this.props.showConfig && (this.props.showConfig.sDropDownType === 'movesql' || commonUtils.isNotEmptyObject(this.props.showConfig.sButtonParam))) { + this.props.onDropDownBlur(this.props.name, this.props.showConfig.sName, this.props.record, this.props.showConfig); + } + + this.onCheckFields(500); + this.onBlurText(event, 500); + }; + + onBlurText = (event, timeout = 0) => { + const currentValue = event?.target?.value; + if (currentValue == this.lastValue) { + this.props.app.globalFun?.onSetMask(false); + return; + } + if (this.onExecInstructSet('blur')) { + this.lastValue = currentValue; + return; + }; + setTimeout(() => { + const { + name, + record, + sBtnSendDialogConfigList, + onToolBarBtnClick, + } = this.props; + if (name !== 'master') return; + if (commonUtils.isEmptyArr(sBtnSendDialogConfigList)) return; + const { sName } = this.props.showConfig; + if (!record[sName]) return; + + const { sActiveKey, sControlName } = + sBtnSendDialogConfigList.find((item) => { + const { sActiveKey = '' } = item; + return sActiveKey.split(',').includes(`${name}.${sName}`); + }) + || {}; + if (!sActiveKey) return; + this.lastValue = currentValue; + onToolBarBtnClick({ key: sControlName }); + }, timeout); + } + + onExecInstructSet = (type) => { + const { showName, sOnChangeInstruct } = this.props.showConfig; + const sInstruct = commonUtils.convertStrToObj(sOnChangeInstruct, {}); + const { [type]: instructType } = sInstruct; + if (instructType) { + if (this.props.onExecInstructSet) { + this.props.onExecInstructSet({ + nextProps: { + [`${this.props.name}SelectedRowKeys`]: [this.props.record.sId] + }, + btnConfig: { + sInstruct: JSON.stringify(instructType), + showName: `${showName}-${type === 'blur' ? '离焦' : '变化'}`, + }, + callback: () => { + type === 'blur' && this.props.app.globalFun?.onSetMask(false); + } + }); + } else { + message.error('未定义调用指令集事件!'); + } + return true; + } + return false; + } + + onCheckFields = (timeout = 0) => { + // 手机号、邮箱校验等校验 + setTimeout(() => { + const sDateFormatTypeList = ['phone', 'mobile', 'mail', 'postcode']; + const { sName, showName, sDateFormat } = this.props.showConfig; + const { record } = this.props; + const value = record?.[sName]; + if ( + value !== undefined && value !== '' && sDateFormatTypeList.includes(sDateFormat) + ) { + let flag = false; + if (sDateFormat === 'phone') { + const reg = /^0\d{2,3}-\d{7,8}$/; + const reg1 = /^1[0-9]{10}$/; + if (!reg.test(value) && !reg1.test(value)) { + flag = true; + } + } else if (sDateFormat === 'mobile') { + const reg = /^0\d{2,3}-\d{7,8}$/; + const reg1 = /^1[0-9]{10}$/; + if (!reg.test(value) && !reg1.test(value)) { + flag = true; + } + } else if (sDateFormat === 'mail') { + const reg = /^[a-zA-Z0-9]{1,10}@[a-zA-Z0-9]{1,5}\.[a-zA-Z0-9]{1,5}$/; + if (!reg.test(value)) { + flag = true; + } + } else if (sDateFormat === 'postcode') { + const reg = /^[1-9][0-9]{5}$/; + if (!reg.test(value)) { + flag = true; + } + } + + if (flag) { + message.warning(`【${showName}】【${sName}】格式不正确!`); + } + } + }, timeout); + } + + /** 下拉时看是否要重新获取数据 */ + onDropdownVisibleChange = (open) => { + const { + dropDownData, bNewRecord, pageNum: pageNumOld, totalPageCount: totalPageCountOld, searchValue, conditonValues, + } = this.state; + + if (this.mounted && open) { + const conditonValuesNew = this.props.getSqlCondition(this.props.showConfig, this.props.name, this.props.record); + const pageNum = JSON.stringify(conditonValuesNew) !== JSON.stringify(conditonValues) ? 1 : pageNumOld === 0 ? 1 : pageNumOld; + const totalPageCount = conditonValuesNew !== conditonValues ? 1 : totalPageCountOld; + if (pageNum === 1 && this.props.showConfig.sDropDownType === 'sql' && commonUtils.isEmptyArr(this.props.showConfig.dropDownData)) { + this.setState({ spinState: true }); + this.getDropDownData(pageNum, totalPageCount, searchValue); + } + } else { + // if (searchValue !== '' && this.props.showConfig.sDropDownType === 'sql' && commonUtils.isEmptyArr(this.props.showConfig.dropDownData)) { + // this.setState({ + // searchPageNum: 1, searchTotalPageCount: 1, searchDropDownData: [], searchValue: '', spinState: false, + // }); + // } + this.isDropdownFilter = false; + } + if (this.props.onDropdownVisibleChange !== undefined) { + if (dropDownData.length === 0 && !bNewRecord) { + /* 如果没有值并且没有新纪录,则不展开 */ + open = false; + } + this.props.onDropdownVisibleChange(open); + } + } + + onDoubleClick = () => { + const sMemo = this.props.showConfig.sName; + const title = this.props.showConfig.showName; + const bSParamValue = sMemo === 'sParamValue'; + if ((commonUtils.isNotEmptyObject(sMemo) && sMemo.indexOf('Memo') > -1) || (bSParamValue && !this.props.record.sDropDownData)) { + const sCurrMemoProps = { + title, + name: this.props.name, + sValue: this.props.dataValue, + sMemoField: sMemo, + bVisibleMemo: true, + sRecord: this.props.record, + sMemoConfig: this.props.showConfig, + }; + if (this.props.bInSlaveMemo) { + this.props.onSaveState({ sCurrMemoProps1: sCurrMemoProps }); + } else if (this.props.onSaveState) { + this.props.onSaveState({ sCurrMemoProps }); + } + } else if (commonUtils.isNotEmptyObject(sMemo) && sMemo.indexOf('sValue') > -1) { /* 计算方案 变量设置双击弹出 */ + this.props.onFieldDoubleClick(this.props.record, this.state.dataValue, this.props.showConfig, this.props.name); + } else if (commonUtils.isNotEmptyObject(sMemo) && sMemo.indexOf('sAssignField') > -1) { /* 赋值字段 变量设置双击弹出 */ + this.props.onFieldDoubleClick(this.state.dataValue, this.props.showConfig, this.props.name); + } + } + + onEditorClick = () => { + // if (this.props.enabled) { + // + // } + const curEditorProps = { + title: this.props.showConfig.showName, + name: this.props.name, + value: this.props.dataValue, + sName: this.props.showConfig.sName, + visible: true, + record: this.props.record, + config: this.props.showConfig, + }; + this.props.onSaveState({ curEditorProps }); + } + + onKeyUp = (e) => { + if (this.props.onKeyUp) { + this.props.onKeyUp(e); + } + } + + onKeyDown = (e) => { + if (e.ctrlKey && e.keyCode === 82) { /* CTRL+ALT+R 代替右击事件 */ + this.onContextMenu(e); + } else if (e.key === 'F10') { + message.info(this.props.showConfig.sName); + } else if (e.ctrlKey && (e.altKey || e.metaKey) && e.keyCode === 71) { /* CTRL+ALT+G F7 设置界面 */ + if (commonUtils.isNotEmptyObject(this.props)) { + const { + name, tableConfig, record, configName, + } = this.props; + if (commonUtils.isNotEmptyObject(tableConfig)) { + const myTableConfig = JSON.parse(JSON.stringify(tableConfig)); + myTableConfig.sActiveId = '16411004790004762980820285096000'; + myTableConfig.sName = this.props.showConfig.sName; + const myTableConfigArr = []; + myTableConfigArr.push(myTableConfig); + if (this.props.name === 'master') { /* 主表 */ + this.props.onViewClick(name, 'myTableConfig', record, 0, myTableConfigArr, configName); + } else { /* 从表 */ + this.props.onViewClick(name, 'myTableConfig', record, 0, myTableConfigArr, configName); + } + } + } + } else if (this.props.onKeyDown) { + const { showConfig, record, name } = this.props; + this.props.onKeyDown(e, record, showConfig.sName, name); + } + } + + /* CommonList列表onkeydown-F10处理 */ + onKeyDownDiv = (e) => { + if (this.props.onKeyDown) { + this.props.onKeyDown(e); + } + if (e.key === 'F10') { + message.info(this.props.showConfig.sName); + } else if (e.ctrlKey && e.keyCode === 67) { + console.log('复制成功!'); + } else if (e.ctrlKey && e.keyCode === 65) { + console.log('全选成功!'); + } else { + e.preventDefault(); + return false; + } + } + + /* 单击右键全部更新,弹出窗选择后,更新此列所有数据 (只更新非只读字段) */ + onContextMenu = (e) => { + if (this.state.enabled && commonUtils.isNotEmptyObject(this.props) && this.props.name !== 'master' && commonUtils.isNotEmptyObject(this.props.showConfig)) { + const { showConfig, name } = this.props; + const { bReadonly } = showConfig; + if (bReadonly) { + return; + } + e.preventDefault(); /* 阻止浏览器本身的右击事件 */ + if (this.props.onContextMenu) { + const { showConfig, record } = this.props; + this.props.onContextMenu(e, record, showConfig, name); + } + } + } + + /* 字段选择弹窗 */ + onFieldPopupModal = (showConfig, name, open) => { + if (open) { + this.props.onFieldPopupModal(showConfig, name); + } + } + /** 获取selectprops对象 */ + getSelectProps = () => { + /* 返回值声明 */ + const obj = { + showSearch: true, /* 是否有查找功能 */ + // disabled: !this.state.enabled /* 修改的时候传过来的数据 */ + onChange: this.handleSelectOptionEvent, /* 选择触发事件 */ + filterOption: this.filterOption, /* 搜索时过滤对应的 option 属性 */ + onDropdownVisibleChange: this.onDropdownVisibleChange, + onPopupScroll: this.handlePopupScroll, + onSearch: this.handleSearch, + notFoundContent: this.state.spinState ? : '暂无数据', + // getPopupContainer: this.props.name === 'slave' || this.props.name === 'searchColumnShow' ? this.getPopupContainer : null,/*解决下拉框不随浏览器滚动问题 */ + onFocus: this.onFocus, + onBlur: this.onBlur, + mode: this.state.mode, + maxTagCount: 'responsive', + onPaste: (event) => { + if (this.props.showConfig.bMultipleChoice) { + const clipboardText = event.clipboardData.getData('text/plain').trim(); + if (clipboardText) { + const { dataValue = '' } = this.state; + let dataValueNew = dataValue; + if (dataValueNew === '') { + dataValueNew += clipboardText; + } else { + dataValueNew += `,${clipboardText}`; + } + this.handleSelectOptionEvent(dataValueNew, []); + document.activeElement.blur(); + } + } + }, + }; + if (this.props.showConfig.sDropDownType === 'sql') { + obj.optionLabelProp = 'title'; + } + if (this.props.readOnly) { + obj.readOnly = 'readOnly'; + } else { + obj.disabled = !this.state.enabled; + } + obj.placeholder = this.props.showConfig.placeholder; + /* 区分Oee设置字体与其他系统设置字体 */ + obj.dropdownStyle = commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('oee') > -1 ? { fontSize: '1.3rem' } : { fontSize: '12px' }; + obj.dropdownClassName = commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('oee') > -1 ? (location.pathname.toLowerCase().indexOf('loginoee') > -1 ? 'loginOeeDropDown' : 'oeeDropDown') : ''; + /* 主表时才赋值value */ + if (this.props.bTable) { + if (this.props.showConfig.bMultipleChoice) { + if (this.state.dataValue) { + obj.value = this.state.dataValue.split(','); + } else { + obj.value = []; + } + } else { + obj.value = this.state.dataValue; + } + !this.props.bNewForm && (obj.className = styles.editSelect); + } + if (this.props.showConfig.iDropWidth > 0) { + obj.dropdownMatchSelectWidth = false; /* true时 下拉菜单和选择器同宽。默认将设置 min-width,当值小于选择框宽度时会被忽略。 */ + obj.dropdownStyle.width = this.props.showConfig.iDropWidth; + } + obj.onInputKeyDown = this.onKeyDown; + obj.onKeyUp = this.onKeyUp; + + if (this.props.showConfig.sName === 'sLabelColor') { + if (obj.value === '红牌') { + obj.className = styles.colorRed; + } else if (obj.value === '黄牌') { + obj.className = styles.colorYellow; + } + } + + /* 返回值 */ + return obj; + }; + + getSelectTableProps = () => { + const { currentPage, tempCurrentPage, searchValue } = this.state; + const pageNum = searchValue === '' ? currentPage : tempCurrentPage; + + /* 返回值声明 */ + const obj = { + dropdownMatchSelectWidth: false, + filterOption: this.filterOption, /* 搜索时过滤对应的 option 属性 */ + onDropdownVisibleChange: (open) => { + this.onDropdownVisibleChange(open); + if (open === false) { + clearTimeout(this.blurtimer); + this.blurtimer = setTimeout(() => { + this.onBlur(); + }, 500); + } else { + clearTimeout(this.blurtimer); + this.onFocus(); + } + }, + onSearch: this.selectTableSearch, + showSearch: true, + // onFocus: this.onFocus, + // onBlur: this.onBlur, + }; + if (this.props.showConfig.sDropDownType === 'sql') { + obj.optionLabelProp = 'title'; + } + if (this.props.readOnly) { + obj.readOnly = 'readOnly'; + } else { + obj.disabled = !this.state.enabled; + } + obj.placeholder = this.props.showConfig.placeholder; + /* 区分Oee设置字体与其他系统设置字体 */ + obj.dropdownStyle = commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('oee') > -1 ? { fontSize: '1.3rem' } : { fontSize: '12px' }; + obj.dropdownClassName = commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('oee') > -1 ? (location.pathname.toLowerCase().indexOf('loginoee') > -1 ? 'loginOeeDropDown' : 'oeeDropDown') : ''; + /* 主表时才赋值value */ + if (this.props.bTable) { + obj.value = this.props.showConfig.bMultipleChoice && !commonUtils.isEmpty(this.state.dataValue) ? this.state.dataValue.split(',') : this.state.dataValue; /* 数据值 */ + obj.className = this.props.costomClassName === undefined ? styles.editSelect : this.props.costomClassName; + } + if (this.props.showConfig.iDropWidth > 0) { + obj.dropdownMatchSelectWidth = false; /* true时 下拉菜单和选择器同宽。默认将设置 min-width,当值小于选择框宽度时会被忽略。 */ + } + obj.onInputKeyDown = this.onKeyDown; + obj.onKeyUp = this.onKeyUp; + /* eslint-disable */ + obj.dropdownRender = (menu) => ( + <> + {/*
    + this.selectTableSearch(e)}/> +
    */} + {menu} +
    + this.selectTableChange(e)} showSizeChanger={false} current={pageNum} pageSize={20} size="large" total={this.state.totalCount} /> + + {this.props.showConfig.bFirstEmpty && ( + ) + } + {this.props.showConfig.bNewRecord && ( + ) + } + +
    + + ) + /* eslint-enable */ + /* 返回值 */ + return obj; + }; + + getSelectTableOption = () => { + const { selectTableData } = this.state; + const { showConfig } = this.props; + const { sTableTitleSql } = showConfig; + const tempColumnArr = sTableTitleSql.split(','); + let scrollX = 0; + const columns = tempColumnArr.map((item, index) => { + const tempArr = item.split(':'); + const [value, title, columnWidth] = tempArr; + let width; + if (!Number.isNaN(Number(columnWidth))) { // 如果配置了列宽 + width = Number(columnWidth); + } else { // 没有配置列宽,就根据字符数算宽度 + // 获取中文字数、非中文字数, 中文12px,其它8px + const titleStr = title; + const totalStringLen = titleStr.length; + const otherStrLen = titleStr.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line + const chineseStrLen = totalStringLen - otherStrLen; + const defaultWidth = (chineseStrLen * 20) + (otherStrLen * 12); + const maxStrLen = selectTableData.reduce((res, pre) => { + let tempValue = pre[value] !== undefined ? pre[value] : ''; + if (tempValue === '') { + return res; + } + tempValue = typeof tempValue === 'string' ? tempValue : JSON.stringify(tempValue); + const totalStringLen = tempValue.length; + const otherStrLen = tempValue.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line + const chineseStrLen = totalStringLen - otherStrLen; + const tempWidth = (chineseStrLen * 20) + (otherStrLen * 12); + return Math.max(tempWidth, res); + }, defaultWidth); + width = Math.min(maxStrLen + 8, 300); + } + + scrollX += width; + + return { + title, + dataIndex: value, + key: value, + width: index !== tempColumnArr.length - 1 ? width : undefined, + render: (text) => { + return ( +
    + {text} +
    +
    ); + }, + }; + }); + + return ( +