@cniot/android-pda-components 0.2.21 → 0.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{index.b428d9a3.js → index.44dba996.js} +1 -1
- package/build/index.html +1 -1
- package/doc/index.jsx +0 -2
- package/es/index.cjs.js +7 -0
- package/es/index.es.js +2201 -0
- package/es/style.css +1 -0
- package/package.json +1 -1
- package/packages/AppList/doc.jsx +0 -138
- package/packages/AppList/index.jsx +0 -33
- package/packages/AppList/index.less +0 -52
- package/packages/BaseLayout/BarcodeScan.jsx +0 -88
- package/packages/BaseLayout/BaseLayoutContainer.jsx +0 -208
- package/packages/BaseLayout/RfidOnce.jsx +0 -106
- package/packages/BaseLayout/RfidScan.jsx +0 -118
- package/packages/BaseLayout/doc.jsx +0 -177
- package/packages/BaseLayout/index.jsx +0 -52
- package/packages/BaseLayout/index.less +0 -47
- package/packages/Button/doc.jsx +0 -62
- package/packages/Button/index.jsx +0 -27
- package/packages/Button/index.less +0 -62
- package/packages/Confirm/doc.jsx +0 -147
- package/packages/Confirm/index.jsx +0 -71
- package/packages/Confirm/index.less +0 -55
- package/packages/Header/doc.jsx +0 -171
- package/packages/Header/index.jsx +0 -191
- package/packages/Header/index.less +0 -71
- package/packages/InfoCard/doc.jsx +0 -244
- package/packages/InfoCard/index.jsx +0 -67
- package/packages/InfoCard/index.less +0 -111
- package/packages/List/doc.jsx +0 -89
- package/packages/List/index.jsx +0 -54
- package/packages/List/index.less +0 -43
- package/packages/Overlay/doc.jsx +0 -103
- package/packages/Overlay/index.jsx +0 -42
- package/packages/Overlay/index.less +0 -28
- package/packages/PdaActionSheet/doc.jsx +0 -193
- package/packages/PdaActionSheet/index.jsx +0 -44
- package/packages/PdaActionSheet/index.less +0 -65
- package/packages/PdaDistanceCard/doc.jsx +0 -62
- package/packages/PdaDistanceCard/index.jsx +0 -35
- package/packages/PdaDistanceCard/index.less +0 -42
- package/packages/PdaFinishCard/doc.jsx +0 -111
- package/packages/PdaFinishCard/index.jsx +0 -62
- package/packages/PdaFinishCard/index.less +0 -62
- package/packages/PdaInfiniteScroll/doc.jsx +0 -121
- package/packages/PdaInfiniteScroll/index.jsx +0 -114
- package/packages/PdaInfiniteScroll/index.less +0 -12
- package/packages/PdaInfiniteScroll/utils.jsx +0 -25
- package/packages/PdaSteps/PdaStep/index.jsx +0 -38
- package/packages/PdaSteps/PdaStep/index.less +0 -70
- package/packages/PdaSteps/PdaSteps/index.jsx +0 -33
- package/packages/PdaSteps/PdaSteps/index.less +0 -0
- package/packages/PdaSteps/doc.jsx +0 -131
- package/packages/PdaSteps/index.jsx +0 -5
- package/packages/PdaTitle/doc.jsx +0 -102
- package/packages/PdaTitle/index.jsx +0 -51
- package/packages/Presentation/doc.jsx +0 -72
- package/packages/Presentation/index.jsx +0 -25
- package/packages/Presentation/index.less +0 -31
- package/packages/SelectCard/doc.jsx +0 -57
- package/packages/SelectCard/index.jsx +0 -13
- package/packages/SelectCard/index.less +0 -30
- package/packages/SimpleCard/doc.jsx +0 -59
- package/packages/SimpleCard/index.jsx +0 -13
- package/packages/SimpleCard/index.less +0 -38
- package/packages/SimpleCardBlock/doc.jsx +0 -77
- package/packages/SimpleCardBlock/index.jsx +0 -43
- package/packages/SimpleCardBlock/index.less +0 -26
- package/packages/SubCard/doc.jsx +0 -63
- package/packages/SubCard/index.jsx +0 -28
- package/packages/SubCard/index.less +0 -64
- package/packages/Tag/doc.jsx +0 -47
- package/packages/Tag/index.jsx +0 -12
- package/packages/Tag/index.less +0 -22
- package/packages/TaskCard/doc.jsx +0 -151
- package/packages/TaskCard/index.jsx +0 -65
- package/packages/TaskCard/index.less +0 -101
- package/packages/Toast/doc.jsx +0 -112
- package/packages/Toast/index.jsx +0 -7
- package/packages/Toast/index.less +0 -23
- package/packages/Toast/methods.jsx +0 -77
- package/packages/Toast/toast.jsx +0 -96
- package/packages/WakeKeyborard/doc.jsx +0 -170
- package/packages/WakeKeyborard/index.jsx +0 -61
- package/packages/WakeKeyborard/index.less +0 -55
- package/packages/WakeKeyborard/keyborard.jsx +0 -61
- package/packages/doc.jsx +0 -19
- package/packages/global.less +0 -7
- package/packages/index.jsx +0 -60
- package/packages/index.less +0 -3
- package/packages/pageflow-system-pages/alert/doc.jsx +0 -70
- package/packages/pageflow-system-pages/alert/index.jsx +0 -22
- package/packages/pageflow-system-pages/confirm/doc.jsx +0 -118
- package/packages/pageflow-system-pages/confirm/index.jsx +0 -31
- package/packages/pageflow-system-pages/debug/index.jsx +0 -27
- package/packages/pageflow-system-pages/debug/index.less +0 -5
- package/packages/pageflow-system-pages/index.jsx +0 -38
- package/packages/pageflow-system-pages/loading/index.jsx +0 -37
- package/packages/pageflow-system-pages/not-found/index.jsx +0 -12
- package/packages/pageflow-system-pages/not-found/index.less +0 -26
- package/packages/pageflow-system-pages/prompt/doc.jsx +0 -95
- package/packages/pageflow-system-pages/prompt/index.jsx +0 -43
- package/packages/pageflow-system-pages/prompt/index.less +0 -44
- package/packages/pageflow-system-pages/start/index.jsx +0 -28
- package/packages/pageflow-system-pages/start/index.less +0 -12
- package/packages/pageflow-system-pages/toast/doc.jsx +0 -76
- package/packages/pageflow-system-pages/toast/index.jsx +0 -42
- package/packages/utils/index.js +0 -56
- package/packages/variable.less +0 -4
package/es/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*{margin:0;padding:0}div{box-sizing:border-box}.pda-header{background-color:#000;display:flex;flex-direction:row;align-items:center;color:#fff;height:84px}.pda-header .header-click-area{height:100%;display:flex;align-items:center;flex-direction:row}.pda-header .pda-goback{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01O46CYm1Gc4yvZtk7A_!!6000000000642-2-tps-36-64.png);width:18px;height:32px;background-size:100%;margin-left:28px;margin-right:8px}.pda-header .pda-header-icon{height:36px;width:36px;margin-left:16px;background-size:100%;background-repeat:no-repeat;background-position:center}.pda-header .pda-header-icon-scan{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png)}.pda-header .pda-header-icon-select{background-image:url(https://img.alicdn.com/imgextra/i2/O1CN0170QXc91udWriUp19S_!!6000000006060-2-tps-74-72.png)}.pda-header .pda-header-icon-read{background-image:url(https://img.alicdn.com/imgextra/i2/O1CN01EMphgH1ylYGXImCZn_!!6000000006619-2-tps-70-70.png)}.pda-header .pda-title-text{margin-left:16px;font-size:40px;flex:1}.pda-header .pda-header-more{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01dTdXds1p9gz4wKAve_!!6000000005318-2-tps-70-26.png)}.pda-header .pda-header-config{background-image:url(https://img.alicdn.com/imgextra/i3/O1CN01SKQH1k1p7rQYTBXdn_!!6000000005314-2-tps-56-60.png)}.pda-header .pda-menus{background-color:#fff;border-radius:8px 8px 0 0;width:100%;padding:24px;display:flex;flex-direction:column}.pda-header .pda-menus>*{margin-bottom:12px}.pda-button{display:block;box-sizing:border-box;padding-right:0;text-align:center;font-size:40px;height:90px;line-height:40px;color:#fff;background-color:#f3f4f8;border-radius:10px;width:100%;border-width:0;word-break:keep-all}.pda-button.pda-button-default{color:#000}.pda-button:active{background-color:#979797}.pda-button.pda-button-primary{background-color:#0091ea}.pda-button.pda-button-primary:active{background-color:#0074bb}.pda-button.pda-button-dark{background-color:#282828}.pda-button.pda-button-dark:active{background-color:#979797}.pda-button.pda-button-cutout{color:#0091ea;border-width:4px;border-color:#0091ea}.button-group{display:flex;flex-direction:row;padding:20px 24px;width:100%}.button-group .pda-button:not(:last-child){margin-right:16px}.pda-info-card{border-radius:16px;padding:16px;background-color:#fff;word-break:break-word}.pda-info-card .divda-info-card-title{font-size:32px;line-height:32px}.pda-info-card .pda-info-card-title-section{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.pda-info-card .pda-info-card-title-section .pda-info-card-title{font-size:32px;color:#666}.pda-info-card .pda-info-card-title-section .pda-info-card-tag{display:flex;align-items:center;justify-content:center;height:36px;padding:0 8px;background-color:#fc0;border-radius:8px}.pda-info-card .pda-info-card-highlight-section{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.pda-info-card .pda-info-card-highlight-section .pda-info-card-title{font-size:32px;color:#666;margin-top:20px}.pda-info-card .pda-info-card-highlight-section .pda-info-card-highlight{font-size:80px;line-height:64px;color:#0091ea;font-weight:bold;display:flex;flex-direction:row;align-items:flex-end}.pda-info-card .pda-info-card-highlight-section .pda-info-card-highlight .pda-info-card-highlight1CN{font-size:64px}.pda-info-card .pda-info-card-highlight-section .pda-info-card-highlight .pda-info-card-highlight2{font-size:50px;line-height:40px}.pda-info-card .pda-info-card-highlight-section .pda-info-card-highlight .pda-info-card-highlight2CN{font-size:40px;line-height:40px}.pda-info-card .pda-info-card-bold{font-weight:bold;font-size:40px;line-height:48px;color:#000;margin-top:16px}.pda-info-card .pda-info-card-list{margin-top:12px;color:#4a4a4a;font-size:32px;line-height:32px;word-break:break-all}.pda-info-card-progress{background-color:#f3f4f8;height:12px;border-radius:6px;margin-top:16px}.pda-info-card-progress .pda-info-card-progress-inside{background-color:#0091ea;height:12px;border-radius:6px}.pda-info-card.pda-info-card-dark{background-color:#000}.pda-info-card.pda-info-card-dark .pda-info-card-title{color:#999}.pda-info-card.pda-info-card-dark .pda-info-card-highlight{color:#fff}.pda-info-card.pda-info-card-dark .pda-info-card-bold{color:#fff}.pda-info-card.pda-info-card-dark .pda-info-card-list{color:#999}.pda-list-item{padding:24px 16px;border-radius:16px;position:relative}.pda-list-item div{margin:0}.pda-list-item>div{margin-bottom:12px}.pda-list-item>div:last-child{margin-bottom:0}.pda-list-item .pda-listitem-highlight{width:100%;font-size:40px;line-height:40px;font-weight:bold;color:#fff;display:flex;flex-direction:row;justify-content:space-between}.pda-list-item .pda-listitem-highlight div:first-child{flex:1;word-break:normal;white-space:normal;word-break:break-word}.pda-list-item .pda-listitem-header,.pda-list-item .pda-listitem-state-text,.pda-list-item .pda-listitem-subinfo{font-size:32px;line-height:32px;color:#999;word-break:break-all}.pda-list-item .pda-listitem-state-block{display:flex;flex-direction:row;flex-wrap:wrap;margin-bottom:0}.pda-list-item .pda-listitem-state-block>div{padding:6px 10px;border-radius:4px;background-color:#0091ea;margin-bottom:12px;margin-right:12px;font-size:24px;line-height:24px}.pda-list-item .pda-listitem-state-block>div.success{background-color:#0f0}.pda-list-item .pda-listitem-state-block>div.warning{background-color:#fc0}.pda-list-item .pda-listitem-state-block>div.error{background-color:red}.pda-list-item .pda-listitem-icon{position:absolute;top:0;right:0;width:60px;height:60px;background-color:#0091ea;border-radius:0 16px;display:flex;justify-content:center;align-items:center;opacity:.85}.pda-list-item .listitem-icon-container{background-size:100%;background-repeat:no-repeat;width:16px;height:24px}.pda-list-item .listitem-icon-next{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01FkZisA1tCg1sj3b6U_!!6000000005866-2-tps-40-58.png)}.confirm-wrap{background:#ffffff;border-radius:6px 6px 0 0;padding-top:24px;width:100%}.confirm-wrap .confirm-content{padding:0 24px}.confirm-wrap .confirm-title{font-size:2.4rem;font-weight:700}.confirm-wrap .confirm-message{font-size:2.2rem;margin-bottom:1rem}.confirm-wrap .confirm-sub-message{font-size:2.2rem;margin-bottom:1rem}.confirm-wrap .confirm-sub-block{display:flex;flex-direction:row}.confirm-wrap .confirm-sub-block .confirm-sub-label{white-space:nowrap}.confirm-wrap .confirm-sub-block .confirm-sub-content{margin-left:12px;word-wrap:break-word;word-break:break-all}.confirm-wrap .confirm-btns>*:not(:first-child){padding-top:0}.confirm-wrap.confirm-warning{background-color:red}.confirm-wrap.confirm-warning .pda-button{background-color:transparent;color:#000;border:2px solid black;border-radius:40px}.toast-wrap{background:#00FF00;border-radius:6px;padding:10px 15px;width:100%;box-sizing:border-box}.toast-wrap.warning{background-color:#ffcb00}.toast-wrap.error{background-color:red}.toast-wrap .toast-title{font-size:50px;font-weight:bold}.toast-wrap .toast-message{font-size:32px}.op-overlay{top:0;left:0;position:fixed;right:0;bottom:0;display:flex;justify-content:center;align-items:center;background-color:#0006;z-index:100}.op-overlay.center{align-items:center;justify-content:center}.op-overlay.top{align-items:flex-start;justify-content:center}.op-overlay.bottom{align-items:flex-end;justify-content:center}.prompt-dialog{background:#ffffff;border-radius:6px 6px 0 0;padding:10px;width:80%}.prompt-dialog .prompt-title{font-size:30px;margin:10px 0}.prompt-dialog .prompt-input{transition:all .1s linear;border:1px solid #dcdfe6;background-color:#fff;outline:0;margin:0;font-weight:400;vertical-align:middle;background-color:#0000;color:#1f2633;font-size:24px;box-sizing:border-box;width:100%;padding:.5em;border-radius:4px}.prompt-dialog .prompt-input:hover,.prompt-dialog .prompt-input:active,.prompt-dialog .prompt-input:focus{border-color:#03c1fd}.prompt-dialog .prompt-btns{display:flex;margin-top:10px}.prompt-dialog .prompt-btns .pda-button{margin-left:10px}.prompt-dialog .prompt-btns .pda-button:first-child{margin-left:0}.mini-app-start-page{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100vw;height:100vh}.mini-app-start-page button{padding:.3em 3em;border-radius:6px;border:none;font-size:36px;background-color:#00bdff;color:#fff;margin-top:20px}.mini-app-start-page button:active{transform:scale(.95)}.mini-app-start-page .desc{opacity:.3}.local-debug-side{position:absolute;right:0;bottom:0}.presentation-card{margin:12px;background-color:#fff;border-radius:6px;text-align:center;padding:20px 6px}.presentation-card img{width:70%;height:auto}.presentation-card.transparent{background-color:transparent;color:#fff;margin-top:80px}.presentation-card .text{margin-top:12px;font-weight:700;font-size:32px}.presentation-card .sub-text{margin-top:6px;font-weight:700;font-size:24px;line-height:24px;color:#999}.android-pda-list .default-item{background-color:#282828;font-size:36px;padding:10px;border-radius:6px;color:#fff;display:flex;justify-content:space-between;align-items:center;cursor:pointer;margin-bottom:10px}.android-pda-list .default-item:hover,.android-pda-list .default-item:active,.android-pda-list .default-item:focus{background-color:#686868}.android-pda-list .default-item .text{flex:1}.android-pda-list .default-item .sub-text{font-size:80%;opacity:.7}.android-pda-list .default-item .sub-tags{display:flex}.android-pda-list .default-item .sub-tags .sub-tag-item{background-color:#0f0;padding:2px;font-size:60%;margin-right:3px;border-radius:2px;color:#000;line-height:1em}.android-pda-list .default-item .sub-tags .sub-tag-item:first-child{margin-left:0}.android-pda-list .default-item .extra{font-size:80%;opacity:.7}.baselayout-wrapper{height:100%;min-height:100%;display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#000}.baselayout-wrapper .baselayout-container{padding:0 24px 16px;overflow-x:auto;flex:1}.baselayout-wrapper .baselayout-container>*{margin-top:16px}.baselayout-wrapper .baselayout-footer{padding:16px 0}.baselayout-wrapper .loading{position:absolute;top:0;left:0;right:0;bottom:0;color:#fff;background-color:#0006;background-image:url(https://img.alicdn.com/imgextra/i2/O1CN01PRSptR1YO1wOlBHCr_!!6000000003048-1-tps-240-240.gif);background-repeat:no-repeat;background-position:center;background-size:120px 120px}.wakekeyborard .wakekeyborard-icon{width:80px;height:80px;background-image:url(https://img.alicdn.com/imgextra/i3/O1CN01kxYh3U25Xzr9nAcYp_!!6000000007537-2-tps-240-240.png);background-size:100%;position:fixed;right:24px;bottom:24px}.wakekeyborard-overlay{position:fixed;top:0;right:0;left:0;bottom:0;background-color:#dedede33}.wakekeyborard-inputbox{width:100%;display:flex;flex-direction:row;height:85px;position:absolute;bottom:0;left:0;right:0}.wakekeyborard-inputbox input{width:100%;border-radius:16px 0 0;border:0;font-size:42px;background-color:#fff;padding-left:20px}.wakekeyborard-inputbox input:focus{outline:none}.wakekeyborard-inputbox input::-webkit-input-placeholder{color:#d1d1d6;font-size:32px}.wakekeyborard-inputbox button{width:150px;border:0;border-radius:0 16px 0 0;background-color:#fff}.pda-step-card{display:flex;flex-direction:row}.pda-step-card .pda-step-indictor{display:flex;flex-direction:column;align-items:center;margin-right:16px}.pda-step-card .pda-step-indictor .pda-step-indictor-top{width:1px;background-color:#bec0c6;flex:1}.pda-step-card .pda-step-indictor .pda-step-indictor-top-hidden{background-color:#fff0}.pda-step-card .pda-step-indictor .pda-step-indictor-center{height:24px;width:24px;border-radius:12px;background-color:#bec0c6}.pda-step-card .pda-step-indictor .pda-step-indictor-center-active{background-color:#0091ea}.pda-step-card .pda-step-indictor .pda-step-indictor-bottom{flex:1;width:1px;background-color:#bec0c6}.pda-step-card .pda-step-indictor .pda-step-indictor-bottom-hidden{background-color:#fff0}.pda-step{border-radius:16px;padding:24px 16px;background-color:#fff;margin-bottom:16px}.pda-step p{margin:0}.pda-step .pda-step-title{font-size:60px;color:#0091ea}.pda-step .pda-step-list{margin-top:8px;color:#4a4a4a;font-size:32px;line-height:32px}.pda-step.pda-step-dark{background-color:#000}.pda-step.pda-step-dark .pda-step-title{color:#fff}.pda-step.pda-step-dark .pda-step-list{color:#bec0c6}.pda-finish-card-top{display:flex;flex-direction:column;align-items:center;color:#fff}.pda-finish-card-top .pda-finish-card-img{width:100%;margin:50px auto 0}.pda-finish-card-top .pda-finish-card-title{font-size:50px;line-height:50px;color:#fff;font-weight:500;margin-bottom:16px;text-align:center}.pda-finish-card-top .pda-finish-card-list{margin-top:12px;color:#999;font-size:32px;line-height:30px;text-align:center}.pda-distance-card{border-radius:16px;padding:36px 16px;background-color:#fff}.pda-distance-card p{margin:0;font-size:28px;color:#738399}.pda-distance-card .pda-distance-card-highlight{font-size:60px;line-height:64px;color:#0091ea}.pda-distance-card .pda-distance-indictor{margin-top:36px;display:flex}.pda-distance-card .pda-distance-card-progress{background-color:#ebecf2;height:34px;border-radius:6px;border:4px solid #D9D9D9;margin-top:8px;position:relative}.pda-distance-card .pda-distance-card-progress .pda-distance-card-progress-indictor{position:absolute;bottom:0;left:5px}.pda-distance-card .pda-distance-card-progress .pda-distance-card-progress-inside{background-color:#0091ea;height:26px;border-radius:6px 0 0 6px}.pda-distance-card .pda-distance-label{display:flex;justify-content:space-between}.android-sub-card{background:#282828;border-radius:16px;padding:10px;color:#fff}.android-sub-card .android-sub-card-title-section{display:flex;justify-content:space-between}.android-sub-card .android-sub-card-title-section .android-sub-card-title{opacity:.6;font-size:21.312px}.android-sub-card .android-sub-card-title-section .android-sub-card-tag{margin-bottom:0}.android-sub-card .android-sub-card-title-section .android-sub-card-tag>div{padding:6px 10px;border-radius:4px;background-color:#0091ea;color:#fff;font-size:15.984px;line-height:15.984px}.android-sub-card .android-sub-card-title-section .android-sub-card-tag>div.success{background-color:#0f0}.android-sub-card .android-sub-card-title-section .android-sub-card-tag>div.warning{background-color:#fc0;color:#000}.android-sub-card .android-sub-card-title-section .android-sub-card-tag>div.error{background-color:red}.android-sub-card .android-sub-card-context{font-size:60px;line-height:60px;font-weight:bold;word-break:break-all;word-wrap:break-word;margin-top:16px}.android-sub-card .android-sub-card-name{font-size:40px;line-height:40px;font-weight:bold;margin-top:16px;margin-bottom:12px}.android-sub-card .android-sub-card-attrs{font-size:32px;line-height:32px;color:#999}.android-sub-card .android-sub-card-attrs>div{margin-top:12px}.select-card{padding-top:12px}.select-card p{color:#999;font-size:32px;line-height:40px;margin-bottom:12px;padding-left:16px}.select-card .select-card-content{background-color:#282828;padding:24px 24px 24px 16px;border-radius:16px;display:flex;flex-direction:row;justify-content:space-between;color:#fff;font-size:40px;line-height:40px}.select-card .select-icon{background-image:url(https://img.alicdn.com/imgextra/i1/O1CN01WnYl6Z1qBM3uInOvw_!!6000000005457-2-tps-40-68.png);background-size:100%;background-repeat:no-repeat;background-position:center;width:20px}.pda-app-list .pda-app-group{margin:25px}.pda-app-list .pda-app-group .group-name{line-height:1em;margin:0;font-size:32px;color:#fff;font-weight:400;opacity:.6}.pda-app-list .pda-app-group .group-apps{display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:25px}.pda-app-list .pda-app-group .group-apps .app-item{display:flex;flex-direction:column;justify-content:center;align-items:center;background-image:linear-gradient(138deg,#0091EA 0%,#095FFF 100%);border-radius:12px;font-size:32px;color:#fff;min-height:126px;flex:1;min-width:48%;max-width:48%;margin-bottom:25px;cursor:pointer}.pda-app-list .pda-app-group .group-apps .app-item:hover,.pda-app-list .pda-app-group .group-apps .app-item:active,.pda-app-list .pda-app-group .group-apps .app-item:focus{background-image:linear-gradient(45deg,#0091EA 0%,#095FFF 100%);box-shadow:0 0 1px 2px #fff}.pda-app-list .pda-app-group .group-apps .app-item .app-name{text-align:center}.pda-app-list .pda-app-group .group-apps .app-item .app-subname{font-size:50%}.pda-infinite-scroll{margin-top:10px}.pda-infinite-scroll span{color:#999}.pda-infinite-scroll .pda-infinite-scroll-view{display:flex;align-items:center;justify-content:center}.action-sheet{position:absolute;z-index:1000;width:100%;height:100%;background-color:#00000059;display:none}.action-sheet .action-sheet-container{position:absolute;background-color:#fff;z-index:1010;width:100%;bottom:0;left:0;max-height:80%;border-radius:9.9px 9.9px 0 0;padding-bottom:10.56px;display:flex;flex-direction:column}.action-sheet .action-sheet-container .action-sheet-body{flex:1;overflow-y:auto}.action-sheet .action-sheet-container .action-sheet-sticky-bottom{border-top:2px solid #F2F2F2}.action-sheet .action-sheet-container .action-sheet-item{margin:10.56px 15.84px 0;background-color:#f3f4f8;height:54px;display:flex;align-items:center;justify-content:center;font-size:24px;border-radius:9.9px}.action-sheet .action-sheet-container .action-sheet-sticky-bottom-row{display:flex}.action-sheet.show{display:block}.action-sheet.show .action-sheet-container{animation:slide-in .3s ease-out}@keyframes slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.pda-tag{display:inline-block;padding:6px 10px;border-radius:4px;background-color:#0091ea;margin-bottom:12px;margin-right:12px;font-size:24px;line-height:24px;word-break:keep-all}.pda-tag.pda-tag-success{background-color:#0f0}.pda-tag.pda-tag-warning{background-color:#fc0}.pda-tag.pda-tag-error{background-color:red}.simple-card{display:inline-block;padding:12px 0 12px 18px;border-radius:12px}.simple-card .simple-card-title{font-weight:bold;font-size:56px;line-height:40px;margin-top:12px}.simple-card .simple-card-content{font-size:28px;line-height:40px;margin-top:12px}.simple-card.simple-card-default{background-color:#f3f4f9}.simple-card.simple-card-default .simple-card-title{color:#0091ea}.simple-card.simple-card-default .simple-card-content{color:#000}.simple-card.simple-card-error{background-color:red}.simple-card.simple-card-error .simple-card-title{color:#fff}.simple-card.simple-card-error .simple-card-content{color:#ffafb1}.simple-card-block{background-color:#fff;padding:24px 12px;border-radius:12px}.simple-card-block .simple-card-block-header{display:flex;justify-content:space-between}.simple-card-block .simple-card-block-title{color:#666;font-size:32px;line-height:32px}.simple-card-block .simple-card-block-content{display:flex;flex-wrap:wrap}.simple-card-block .simple-card-block-content>div{min-width:190px;flex:1;margin-right:12px;margin-top:12px}
|
package/package.json
CHANGED
package/packages/AppList/doc.jsx
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import AppList from "./index";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const dataSource = [
|
|
6
|
-
{
|
|
7
|
-
groupName:"分组",
|
|
8
|
-
list: [
|
|
9
|
-
{
|
|
10
|
-
name:"拣选",
|
|
11
|
-
subname:"人工拣选"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
name:"复核",
|
|
15
|
-
subname:"复核打包"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name:"上架",
|
|
19
|
-
subname:"上架XXXX"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name:"拣选2",
|
|
23
|
-
subname:"人工拣选"
|
|
24
|
-
},
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
groupName:"分组2",
|
|
29
|
-
list:[
|
|
30
|
-
{
|
|
31
|
-
name:"复核1",
|
|
32
|
-
subname:"复核打包"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name:"上架1",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name:"拣选3",
|
|
39
|
-
subname:"人工拣选"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name:"复核2",
|
|
43
|
-
subname:"复核打包"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name:"拣选拣选拣选拣选",
|
|
47
|
-
subname:"上架XXXX"
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
export default function () {
|
|
54
|
-
return (
|
|
55
|
-
<div>
|
|
56
|
-
<h1>AppList</h1>
|
|
57
|
-
<p>一般用于展示AppList</p>
|
|
58
|
-
<h2>示例</h2>
|
|
59
|
-
<div className="light-block" style={{display: 'flex', flexDirection: 'row'}}>
|
|
60
|
-
<div style={{backgroundColor:"#000000", width:480}} >
|
|
61
|
-
<AppList dataSource={dataSource} onClickItem={console.log} />
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
<code className="code">{`
|
|
65
|
-
|
|
66
|
-
const dataSource = [
|
|
67
|
-
{
|
|
68
|
-
groupName:"分组",
|
|
69
|
-
list: [
|
|
70
|
-
{
|
|
71
|
-
name:"拣选",
|
|
72
|
-
subname:"人工拣选"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name:"复核",
|
|
76
|
-
subname:"复核打包"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
name:"上架",
|
|
80
|
-
subname:"上架XXXX"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name:"拣选2",
|
|
84
|
-
subname:"人工拣选"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name:"复核1",
|
|
88
|
-
subname:"复核打包"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name:"上架1",
|
|
92
|
-
subname:"上架XXXX"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name:"拣选3",
|
|
96
|
-
subname:"人工拣选"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name:"复核2",
|
|
100
|
-
subname:"复核打包"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name:"上架2",
|
|
104
|
-
subname:"上架XXXX"
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
];
|
|
109
|
-
<AppList dataSource={dataSource} onClickItem={console.log} />
|
|
110
|
-
`}</code>
|
|
111
|
-
<h2>参数</h2>
|
|
112
|
-
<table className="pure-table pure-table-bordered">
|
|
113
|
-
<thead>
|
|
114
|
-
<tr>
|
|
115
|
-
<th>属性</th>
|
|
116
|
-
<th>说明</th>
|
|
117
|
-
<th>类型</th>
|
|
118
|
-
<th>默认值</th>
|
|
119
|
-
</tr>
|
|
120
|
-
</thead>
|
|
121
|
-
<tbody>
|
|
122
|
-
<tr>
|
|
123
|
-
<td>dataSource</td>
|
|
124
|
-
<td>数据</td>
|
|
125
|
-
<td>{`Array(group<groupName, list<name,subname>)`}</td>
|
|
126
|
-
<td></td>
|
|
127
|
-
</tr>
|
|
128
|
-
<tr>
|
|
129
|
-
<td>onClickItem</td>
|
|
130
|
-
<td>点击Item</td>
|
|
131
|
-
<td>Function(item)</td>
|
|
132
|
-
<td>-</td>
|
|
133
|
-
</tr>
|
|
134
|
-
</tbody>
|
|
135
|
-
</table>
|
|
136
|
-
</div>
|
|
137
|
-
);
|
|
138
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function empty(){}
|
|
6
|
-
|
|
7
|
-
export default function(props){
|
|
8
|
-
const { dataSource = [], onClickItem=empty } = props;
|
|
9
|
-
let tabIndex = 1;
|
|
10
|
-
return <div className="pda-app-list">
|
|
11
|
-
{
|
|
12
|
-
dataSource.map((item)=>{
|
|
13
|
-
return (
|
|
14
|
-
<div className="pda-app-group" key={item.groupName}>
|
|
15
|
-
<h2 className="group-name">{item.groupName}</h2>
|
|
16
|
-
<div className="group-apps">
|
|
17
|
-
{
|
|
18
|
-
item.list.map((it)=>{
|
|
19
|
-
return (
|
|
20
|
-
<div className="app-item" key={it.name} autoFocus={tabIndex===1} tabIndex={tabIndex++} onClick={()=> onClickItem(it)} >
|
|
21
|
-
<span className="app-name">{it.name}</span>
|
|
22
|
-
<span className="app-subname">{it.subname}</span>
|
|
23
|
-
</div>
|
|
24
|
-
)
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
)
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
</div>
|
|
33
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
.pda-app-list{
|
|
2
|
-
// width:480px;
|
|
3
|
-
// background:#000000;
|
|
4
|
-
.pda-app-group{
|
|
5
|
-
margin:25px;
|
|
6
|
-
|
|
7
|
-
.group-name{
|
|
8
|
-
font-size:32px;
|
|
9
|
-
line-height:1em;
|
|
10
|
-
margin:0;
|
|
11
|
-
font-size: 32px;
|
|
12
|
-
color: #FFFFFF;
|
|
13
|
-
font-weight:400;
|
|
14
|
-
opacity:0.6;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.group-apps{
|
|
18
|
-
display:flex;
|
|
19
|
-
flex-wrap: wrap;
|
|
20
|
-
justify-content: space-between;
|
|
21
|
-
margin-top:25px;
|
|
22
|
-
.app-item{
|
|
23
|
-
display:flex;
|
|
24
|
-
flex-direction:column;
|
|
25
|
-
justify-content:center;
|
|
26
|
-
align-items:center;
|
|
27
|
-
background-image: linear-gradient(138deg, #0091EA 0%, #095FFF 100%);
|
|
28
|
-
border-radius: 12px;
|
|
29
|
-
font-size: 32px;
|
|
30
|
-
color: #FFFFFF;
|
|
31
|
-
min-height:126px;
|
|
32
|
-
flex:1;
|
|
33
|
-
min-width:48%;
|
|
34
|
-
max-width:48%;
|
|
35
|
-
margin-bottom:25px;
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
|
|
38
|
-
&:hover,&:active,&:focus{
|
|
39
|
-
background-image: linear-gradient(45deg, #0091EA 0%, #095FFF 100%);
|
|
40
|
-
box-shadow: 0 0 1px 2px #fff;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.app-name{
|
|
44
|
-
text-align: center;
|
|
45
|
-
}
|
|
46
|
-
.app-subname{
|
|
47
|
-
font-size:50%;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import BaseLayoutContainer from './BaseLayoutContainer'
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { playSound } from "../utils";
|
|
5
|
-
|
|
6
|
-
const blankFunc = () => { };
|
|
7
|
-
|
|
8
|
-
// onBarcodeScan 按下键才开始监听
|
|
9
|
-
// onScanBarcode 一直监听
|
|
10
|
-
export default class BarcodeScan extends React.Component {
|
|
11
|
-
constructor(props) {
|
|
12
|
-
super(props);
|
|
13
|
-
this._barcodeBeginScan = false;
|
|
14
|
-
this._handleBarcodeScan = e => {
|
|
15
|
-
const { onBarcodeScan } = this.props;
|
|
16
|
-
this._stopWork();
|
|
17
|
-
playSound('scan');
|
|
18
|
-
onBarcodeScan && onBarcodeScan(e.param);
|
|
19
|
-
}
|
|
20
|
-
this._startWork = e => {
|
|
21
|
-
document.addEventListener('BarcodeScan', this._handleBarcodeScan);
|
|
22
|
-
this._barcodeBeginScan = true;
|
|
23
|
-
}
|
|
24
|
-
this._stopWork = e => {
|
|
25
|
-
document.removeEventListener('BarcodeScan', this._handleBarcodeScan);
|
|
26
|
-
}
|
|
27
|
-
this._handleKeyDown = e => {
|
|
28
|
-
const { code, keyCode, key } = e; // code: F23/F24; keyCode: 0; key: uniden...
|
|
29
|
-
// console.log('keydown code: ', code, keyCode, key);
|
|
30
|
-
if (code === 'F22' || code === 'F23' || code === 'F24' || code === 'F9' || code ==='F16') {
|
|
31
|
-
if (!this._barcodeBeginScan) {
|
|
32
|
-
this._startWork();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
this._handleKeyUp = e => {
|
|
37
|
-
const { code, keyCode, key } = e; // code: F23/F24; keyCode: 0; key: uniden...
|
|
38
|
-
if (code === 'F22' || code === 'F23' || code === 'F24' || code === 'F9' || code ==='F16') {
|
|
39
|
-
this._stopWork();
|
|
40
|
-
this._barcodeBeginScan = false;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
this.onScanBarcode = this.onScanBarcode.bind(this);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
onScanBarcode(e){
|
|
48
|
-
this.props.onScanBarcode && this.props.onScanBarcode(e.param);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
componentDidMount() {
|
|
52
|
-
const {onBarcodeScan} = this.props;
|
|
53
|
-
if(onBarcodeScan){
|
|
54
|
-
document.addEventListener('keydown', this._handleKeyDown);
|
|
55
|
-
document.addEventListener('keyup', this._handleKeyUp);
|
|
56
|
-
}
|
|
57
|
-
document.addEventListener('BarcodeScan', this.onScanBarcode);
|
|
58
|
-
WindVane.call('WindvanePlugin', 'invoke', "{'domain': 'keyboard', 'method': 'changeScanMode', 'params': {'scanMode': 'barcode'}}", function (e) {
|
|
59
|
-
// alert('success ' + JSON.stringify(e));
|
|
60
|
-
}, function (e) {
|
|
61
|
-
// alert('failure ' + JSON.stringify(e));
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
componentWillUnmount() {
|
|
65
|
-
const {onBarcodeScan} = this.props;
|
|
66
|
-
if(onBarcodeScan){
|
|
67
|
-
document.removeEventListener('keydown', this._handleKeyDown);
|
|
68
|
-
document.removeEventListener('keyup', this._handleKeyUp);
|
|
69
|
-
}
|
|
70
|
-
document.removeEventListener('BarcodeScan', this.onScanBarcode)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
render() {
|
|
75
|
-
// console.log('onBarcode render');
|
|
76
|
-
|
|
77
|
-
const props = this.props;
|
|
78
|
-
const { onBarcodeScan = blankFunc, ...opts } = props;
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<BaseLayoutContainer
|
|
82
|
-
{...opts}
|
|
83
|
-
/>
|
|
84
|
-
)
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { WindVaneLog } from '../utils';
|
|
5
|
-
|
|
6
|
-
const blankFunc = () => { };
|
|
7
|
-
|
|
8
|
-
export default class BaseLayoutContainer extends React.Component {
|
|
9
|
-
constructor(props) {
|
|
10
|
-
super(props);
|
|
11
|
-
this.state = {
|
|
12
|
-
showLoading: false,
|
|
13
|
-
}
|
|
14
|
-
this._handleKeyUp = e => {
|
|
15
|
-
const { onScan = blankFunc, onEnter = blankFunc, onEsc = blankFunc, onDelete = blankFunc, scanMode = null } = this.props;
|
|
16
|
-
|
|
17
|
-
const { code, keyCode, key } = e; // code: F23/F24; keyCode: 0; key: uniden...
|
|
18
|
-
if (code === 'Enter') {
|
|
19
|
-
e.preventDefault();
|
|
20
|
-
onEnter(e);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (code === 'Delete') {
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
onDelete(e);
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (code === 'Esc') {
|
|
29
|
-
e.preventDefault();
|
|
30
|
-
onEsc(e);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
this._handleBeforeUnload = e => {
|
|
35
|
-
e.returnValue = ("确定离开当前页面吗?");
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
this._handleUnload = e => {
|
|
39
|
-
WindVane.call('WindvanePlugin', 'invoke', "{'domain': 'rfid', 'method': 'stopRfidScan', 'params':null}", function (e) {
|
|
40
|
-
// alert('success ' + JSON.stringify(e));
|
|
41
|
-
}, function (e) {
|
|
42
|
-
// alert('failure ' + JSON.stringify(e));
|
|
43
|
-
});
|
|
44
|
-
const stopParam = {
|
|
45
|
-
tag: 'stopRfid',
|
|
46
|
-
level: 'd',
|
|
47
|
-
message: 'stop rfid scan!!!'
|
|
48
|
-
};
|
|
49
|
-
WindVaneLog(stopParam);
|
|
50
|
-
|
|
51
|
-
const leaveParam = {
|
|
52
|
-
tag: 'leavePage',
|
|
53
|
-
level: 'd',
|
|
54
|
-
message: 'leave page: ' + window.location.href,
|
|
55
|
-
}
|
|
56
|
-
WindVaneLog(stopParam);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
componentDidMount() {
|
|
60
|
-
// console.log('这里增加监听');
|
|
61
|
-
// window.onbeforeunload = this._handleBeforeUnload;
|
|
62
|
-
window.onunload = this._handleUnload;
|
|
63
|
-
document.addEventListener('keyup', this._handleKeyUp);
|
|
64
|
-
}
|
|
65
|
-
componentWillUnmount() {
|
|
66
|
-
// console.log('这里关闭页面了');
|
|
67
|
-
window.onbeforeunload = null;
|
|
68
|
-
window.onunload = null;
|
|
69
|
-
document.removeEventListener('keyup', this._handleKeyUp)
|
|
70
|
-
}
|
|
71
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
72
|
-
if(nextProps.loading && !this.props.loading) {
|
|
73
|
-
this.setState({
|
|
74
|
-
showLoading: true,
|
|
75
|
-
})
|
|
76
|
-
if(nextProps.loadingTimeout) {
|
|
77
|
-
setTimeout(() => {
|
|
78
|
-
this.setState({
|
|
79
|
-
showLoading: false,
|
|
80
|
-
});
|
|
81
|
-
}, nextProps.loadingTimeout);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if(!nextProps.loading && this.state.showLoading) {
|
|
85
|
-
this.setState({
|
|
86
|
-
showLoading: false,
|
|
87
|
-
})
|
|
88
|
-
}
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
render() {
|
|
93
|
-
const props = this.props;
|
|
94
|
-
const { style = {}, header, footer, loading } = this.props;
|
|
95
|
-
|
|
96
|
-
return (
|
|
97
|
-
<div
|
|
98
|
-
className={classNames({ 'baselayout-wrapper': true, })} style={style}
|
|
99
|
-
>
|
|
100
|
-
{
|
|
101
|
-
header && <div className={classNames({ 'baselayout-header': true })}>
|
|
102
|
-
{header}
|
|
103
|
-
</div>
|
|
104
|
-
}
|
|
105
|
-
<div className={classNames({ 'baselayout-container': true })}>
|
|
106
|
-
{props.children}
|
|
107
|
-
</div>
|
|
108
|
-
{
|
|
109
|
-
footer && <div className={classNames({ 'baselayout-footer': true })}>
|
|
110
|
-
{footer}
|
|
111
|
-
</div>
|
|
112
|
-
}
|
|
113
|
-
{
|
|
114
|
-
this.state.showLoading ? (
|
|
115
|
-
<div className="loading">
|
|
116
|
-
{/* 加载中 */}
|
|
117
|
-
</div>
|
|
118
|
-
) : null
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
</div>
|
|
122
|
-
)
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// export default function BaseLayout(props) {
|
|
128
|
-
// console.log('render baseLayout:', props);
|
|
129
|
-
|
|
130
|
-
// const { style = {}, header, footer, continuousRfidScan = false, onRfidScan = blankFunc, onScan = blankFunc, onEnter = blankFunc, onEsc = blankFunc, onDelete = blankFunc } = props;
|
|
131
|
-
|
|
132
|
-
// // const [continuousRfidScanState, setContinuousRfidScanState] = useState(continuousRfidScan)
|
|
133
|
-
|
|
134
|
-
// // 监听按键事件
|
|
135
|
-
// useEffect(() => {
|
|
136
|
-
// const handleKeyUp = e => {
|
|
137
|
-
// // console.log(e);
|
|
138
|
-
// e.preventDefault();
|
|
139
|
-
// const { code, keyCode, key } = e; // code: F23/F24; keyCode: 0; key: uniden...
|
|
140
|
-
// if (code === 'F23' || code === 'F24') {
|
|
141
|
-
// // console.log('scan');
|
|
142
|
-
// onScan(e);
|
|
143
|
-
// return;
|
|
144
|
-
// }
|
|
145
|
-
// if (code === 'Enter') {
|
|
146
|
-
// onEnter(e);
|
|
147
|
-
// return;
|
|
148
|
-
// }
|
|
149
|
-
// if (code === 'Delete') {
|
|
150
|
-
// onDelete(e);
|
|
151
|
-
// return;
|
|
152
|
-
// }
|
|
153
|
-
// if (code === 'Esc') {
|
|
154
|
-
// onEsc(e);
|
|
155
|
-
// return;
|
|
156
|
-
// }
|
|
157
|
-
// }
|
|
158
|
-
// document.addEventListener('keyup', handleKeyUp);
|
|
159
|
-
// return () => {
|
|
160
|
-
// document.removeEventListener('keyup', handleKeyUp);
|
|
161
|
-
// }
|
|
162
|
-
// }, [])
|
|
163
|
-
|
|
164
|
-
// // 监听连扫
|
|
165
|
-
// useEffect(() => {
|
|
166
|
-
// const handleContinuousRfidScan = (ev) => {
|
|
167
|
-
// onRfidScan(ev.param);
|
|
168
|
-
// }
|
|
169
|
-
// if(continuousRfidScan) {
|
|
170
|
-
// document.addEventListener('ContinuousRfidScan', handleContinuousRfidScan, false);
|
|
171
|
-
// WindVane.call('WindvanePlugin', 'invoke', "{'domain': 'rfid', 'method': 'startScan', 'params': null}", function (e) {
|
|
172
|
-
// // console.log('start success ' + JSON.stringify(e));
|
|
173
|
-
// }, function (e) {
|
|
174
|
-
// console.log('failure-1 ' + JSON.stringify(e));
|
|
175
|
-
// });
|
|
176
|
-
// }
|
|
177
|
-
|
|
178
|
-
// return () => {
|
|
179
|
-
// WindVane.call('WindvanePlugin', 'invoke', "{'domain': 'rfid', 'method': 'stopScan', 'params':null}", function (e) {
|
|
180
|
-
// // console.log('stop success ' + JSON.stringify(e));
|
|
181
|
-
// }, function (e) {
|
|
182
|
-
// console.log('failure-2 ' + JSON.stringify(e));
|
|
183
|
-
// });
|
|
184
|
-
// document.removeEventListener('ContinuousRfidScan', handleContinuousRfidScan, false)
|
|
185
|
-
// }
|
|
186
|
-
// }, [])
|
|
187
|
-
|
|
188
|
-
// return (
|
|
189
|
-
// <div
|
|
190
|
-
// className={classNames({ 'baselayout-wrapper': true, })} style={style}
|
|
191
|
-
// >
|
|
192
|
-
// {
|
|
193
|
-
// header && <div className={classNames({ 'baselayout-header': true })}>
|
|
194
|
-
// {header}
|
|
195
|
-
// </div>
|
|
196
|
-
// }
|
|
197
|
-
// <div className={classNames({ 'baselayout-container': true })}>
|
|
198
|
-
// {props.children}
|
|
199
|
-
// </div>
|
|
200
|
-
// {
|
|
201
|
-
// footer && <div className={classNames({ 'baselayout-footer': true })}>
|
|
202
|
-
// {footer}
|
|
203
|
-
// </div>
|
|
204
|
-
// }
|
|
205
|
-
// {/* <div className="baselayout-paddingbottom"></div> */}
|
|
206
|
-
// </div>
|
|
207
|
-
// )
|
|
208
|
-
// }
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import BaseLayoutContainer from './BaseLayoutContainer'
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { playSound } from "../utils";
|
|
5
|
-
|
|
6
|
-
const blankFunc = () => { };
|
|
7
|
-
|
|
8
|
-
export default class RfidOnce extends React.Component {
|
|
9
|
-
constructor(props) {
|
|
10
|
-
super(props);
|
|
11
|
-
this._rfidBeginScan = false;
|
|
12
|
-
this._handleRfidScan = e => {
|
|
13
|
-
const { onRfidOnce, onRfidBoxOnce, onRfidPalletOnce } = this.props;
|
|
14
|
-
const data = e.param;
|
|
15
|
-
const isBox = data.rfidData.startsWith("0F006");
|
|
16
|
-
const isPallet = data.rfidData.startsWith("0F011");
|
|
17
|
-
|
|
18
|
-
playSound('single_recog');
|
|
19
|
-
|
|
20
|
-
if(isPallet) {
|
|
21
|
-
let rfidData = data.rfidData;
|
|
22
|
-
data.originData = rfidData;
|
|
23
|
-
data.rfidData = rfidData.substr(5, 12)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if(onRfidBoxOnce && isBox) {
|
|
27
|
-
this._stopWork();
|
|
28
|
-
onRfidBoxOnce(data);
|
|
29
|
-
} else if(onRfidPalletOnce && isPallet) {
|
|
30
|
-
this._stopWork();
|
|
31
|
-
onRfidPalletOnce(data);
|
|
32
|
-
}
|
|
33
|
-
if(onRfidOnce){
|
|
34
|
-
this._stopWork();
|
|
35
|
-
onRfidOnce(data);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
this._startWork = e => {
|
|
39
|
-
// console.log('start work');
|
|
40
|
-
document.addEventListener('ContinuousRfidScan', this._handleRfidScan);
|
|
41
|
-
WindVane.call('WindvanePlugin', 'invoke', "{'domain': 'rfid', 'method': 'startScan', 'params': null}", function(e) {
|
|
42
|
-
// alert('success ' + JSON.stringify(e));
|
|
43
|
-
}, function(e) {
|
|
44
|
-
// alert('failure ' + JSON.stringify(e));
|
|
45
|
-
});
|
|
46
|
-
this._rfidBeginScan = true;
|
|
47
|
-
}
|
|
48
|
-
this._stopWork = e => {
|
|
49
|
-
// console.log('stop work');
|
|
50
|
-
document.removeEventListener('ContinuousRfidScan', this._handleRfidScan);
|
|
51
|
-
WindVane.call('WindvanePlugin', 'invoke', "{'domain': 'rfid', 'method': 'stopRfidScan', 'params':null}", function(e) {
|
|
52
|
-
}, function(e) {
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
this._handleKeyDown = e => {
|
|
56
|
-
const { code, keyCode, key } = e; // code: F23/F24; keyCode: 0; key: uniden...
|
|
57
|
-
if (code === 'F22' || code === 'F23' || code === 'F24' || code === 'F9' || code ==='F16') {
|
|
58
|
-
// console.log('keydown', this._rfidBeginScan);
|
|
59
|
-
if (!this._rfidBeginScan) {
|
|
60
|
-
this._startWork();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
this._handleKeyUp = e => {
|
|
65
|
-
const { code, keyCode, key } = e; // code: F23/F24; keyCode: 0; key: uniden...
|
|
66
|
-
if (code === 'F22' || code === 'F23' || code === 'F24' || code === 'F9' || code ==='F16') {
|
|
67
|
-
// console.log('keyup stop');
|
|
68
|
-
this._stopWork();
|
|
69
|
-
this._rfidBeginScan = false;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
componentDidMount() {
|
|
75
|
-
document.addEventListener('keydown', this._handleKeyDown);
|
|
76
|
-
document.addEventListener('keyup', this._handleKeyUp);
|
|
77
|
-
// document.addEventListener('ContinuousRfidScan', function (data) {
|
|
78
|
-
// // console.log(JSON.stringify(data));
|
|
79
|
-
// // console.log(data);
|
|
80
|
-
// }, false);
|
|
81
|
-
|
|
82
|
-
WindVane.call('WindvanePlugin', 'invoke', "{'domain': 'keyboard', 'method': 'changeScanMode', 'params': {'scanMode': 'RFID'}}", function (e) {
|
|
83
|
-
// alert('success ' + JSON.stringify(e));
|
|
84
|
-
}, function (e) {
|
|
85
|
-
// alert('failure ' + JSON.stringify(e));
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
componentWillUnmount() {
|
|
89
|
-
document.removeEventListener('keydown', this._handleKeyDown);
|
|
90
|
-
document.removeEventListener('keyup', this._handleKeyUp);
|
|
91
|
-
this._stopWork();
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
render() {
|
|
95
|
-
// console.log('onRfidOnce render');
|
|
96
|
-
|
|
97
|
-
const props = this.props;
|
|
98
|
-
const { onRfidOnce = blankFunc, ...opts } = props;
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<BaseLayoutContainer
|
|
102
|
-
{...opts}
|
|
103
|
-
/>
|
|
104
|
-
)
|
|
105
|
-
}
|
|
106
|
-
}
|