safecheck-client 3.0.33-73 → 3.0.33-75
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/.babelrc +5 -5
- package/.editorconfig +9 -9
- package/CHANGELOG.md +27 -27
- package/android.html +18 -18
- package/build/css-loaders.js +34 -34
- package/build/dev-android.js +151 -151
- package/build/dev-client.js +8 -8
- package/build/release.sh +28 -28
- package/build/utils.js +71 -71
- package/build/webpack.baseandroid.conf.js +83 -83
- package/build/webpack.devandroid.conf.js +33 -33
- package/build/webpack.example.conf.js +49 -49
- package/build/webpack.hanwei.conf.js +57 -57
- package/build/webpack.hwbase.conf.js +78 -78
- package/build/webpack.prodandroid.conf.js +60 -60
- package/build/webpack.test.conf.js +31 -31
- package/build.gradle +14 -14
- package/config/dev.env.js +6 -6
- package/config/index.js +38 -38
- package/config/prod.env.js +3 -3
- package/config/test.env.js +6 -6
- package/docs/AppBase.md +22 -22
- package/docs/Busy.md +14 -14
- package/docs/Criteria.md +47 -47
- package/docs/CriteriaPaged.md +47 -47
- package/docs/DataGrid.md +54 -54
- package/docs/DataModel.md +22 -22
- package/docs/Dynamic.md +42 -42
- package/docs/FormPrint.md +18 -18
- package/docs/GetParams.md +11 -11
- package/docs/GridTree.md +47 -47
- package/docs/HttpBusy.md +13 -13
- package/docs/HttpStore.md +29 -29
- package/docs/MessageBox.md +28 -28
- package/docs/PagedList.md +29 -29
- package/docs/Pager.md +21 -21
- package/docs/PrintFile.md +38 -38
- package/docs/Project.md +23 -23
- package/docs/Route.md +105 -105
- package/docs/SafetyCheck/AdjustPlan.md +13 -13
- package/docs/SafetyCheck/CheckerPlan.md +12 -12
- package/docs/Task.md +46 -46
- package/docs/TreeList.md +28 -28
- package/docs/TreeMixin.md +18 -18
- package/docs/all.md +10 -10
- package/docs/list.md +42 -42
- package/docs/partial.md +75 -75
- package/docs/selector.md +82 -82
- package/docs/tree.md +40 -40
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue-strap/345/217/230/346/233/264/350/256/260/345/275/225.md +7 -7
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue/345/217/230/346/233/264/350/256/260/345/275/225.md +13 -13
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243//345/274/200/345/217/221/347/216/257/345/242/203/350/256/276/347/275/256.md +77 -77
- package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
- package/examples/AddressList/App.vue +13 -13
- package/examples/AddressList/index.html +11 -11
- package/examples/AddressList/main.js +13 -13
- package/examples/ChangeConfig/index.html +17 -17
- package/examples/ChangeConfig/main.js +13 -13
- package/examples/CheckAdvise/comp.js +9 -9
- package/examples/CheckAdvise/index.html +18 -18
- package/examples/CheckAdvise/main.js +13 -13
- package/examples/CreatePlan/App.vue +13 -13
- package/examples/CreatePlan/index.html +11 -11
- package/examples/CreatePlan/main.js +13 -13
- package/examples/DispatchList/App.vue +10 -10
- package/examples/DispatchList/BaseTree.vue +13 -13
- package/examples/DispatchList/Init.vue +22 -22
- package/examples/DispatchList/Test.vue +20 -20
- package/examples/DispatchList/index.html +11 -11
- package/examples/DispatchList/main.js +18 -18
- package/examples/PhoneSafePlan/comp.js +33 -33
- package/examples/PhoneSafePlan/index.html +17 -17
- package/examples/PhoneSafePlan/main.js +13 -13
- package/examples/SafePlan/main.js +13 -13
- package/examples/SafePlan-aode/main.js +13 -13
- package/examples/SafePlanItem/index.html +17 -17
- package/examples/SafePlanItem/main.js +15 -15
- package/examples/Test/index.html +17 -17
- package/examples/Test/main.js +13 -13
- package/examples/Test//350/216/267/345/217/226/345/217/230/351/207/217 +2 -2
- package/examples/UserFiles/index.html +19 -19
- package/examples/UserFiles/main.js +13 -13
- package/home.html +16 -16
- package/oa.iml +8 -8
- package/package.json +1 -1
- package/publish.bat +7 -7
- package/release.bat +5 -5
- package/src/Widget.vue +13 -13
- package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
- package/src/android-bootstrap/less/.csscomb.json +304 -304
- package/src/android-bootstrap/less/.csslintrc +19 -19
- package/src/android-bootstrap/less/alerts.less +73 -73
- package/src/android-bootstrap/less/badges.less +66 -66
- package/src/android-bootstrap/less/bootstrap.less +56 -56
- package/src/android-bootstrap/less/breadcrumbs.less +26 -26
- package/src/android-bootstrap/less/button-groups.less +247 -247
- package/src/android-bootstrap/less/buttons.less +173 -173
- package/src/android-bootstrap/less/carousel.less +269 -269
- package/src/android-bootstrap/less/close.less +34 -34
- package/src/android-bootstrap/less/code.less +69 -69
- package/src/android-bootstrap/less/component-animations.less +33 -33
- package/src/android-bootstrap/less/dropdowns.less +216 -216
- package/src/android-bootstrap/less/forms.less +626 -626
- package/src/android-bootstrap/less/glyphicons.less +305 -305
- package/src/android-bootstrap/less/grid.less +84 -84
- package/src/android-bootstrap/less/input-groups.less +167 -167
- package/src/android-bootstrap/less/jumbotron.less +52 -52
- package/src/android-bootstrap/less/labels.less +64 -64
- package/src/android-bootstrap/less/list-group.less +141 -141
- package/src/android-bootstrap/less/media.less +66 -66
- package/src/android-bootstrap/less/mixins/alerts.less +14 -14
- package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
- package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
- package/src/android-bootstrap/less/mixins/buttons.less +69 -69
- package/src/android-bootstrap/less/mixins/center-block.less +7 -7
- package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
- package/src/android-bootstrap/less/mixins/forms.less +90 -90
- package/src/android-bootstrap/less/mixins/gradients.less +59 -59
- package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
- package/src/android-bootstrap/less/mixins/grid.less +122 -122
- package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
- package/src/android-bootstrap/less/mixins/image.less +33 -33
- package/src/android-bootstrap/less/mixins/labels.less +12 -12
- package/src/android-bootstrap/less/mixins/list-group.less +30 -30
- package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
- package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
- package/src/android-bootstrap/less/mixins/opacity.less +8 -8
- package/src/android-bootstrap/less/mixins/pagination.less +24 -24
- package/src/android-bootstrap/less/mixins/panels.less +24 -24
- package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
- package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
- package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
- package/src/android-bootstrap/less/mixins/resize.less +6 -6
- package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
- package/src/android-bootstrap/less/mixins/size.less +10 -10
- package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
- package/src/android-bootstrap/less/mixins/table-row.less +44 -44
- package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
- package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
- package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
- package/src/android-bootstrap/less/mixins.less +40 -40
- package/src/android-bootstrap/less/modals.less +151 -151
- package/src/android-bootstrap/less/navbar.less +660 -660
- package/src/android-bootstrap/less/navs.less +290 -290
- package/src/android-bootstrap/less/normalize.less +424 -424
- package/src/android-bootstrap/less/pager.less +76 -76
- package/src/android-bootstrap/less/pagination.less +89 -89
- package/src/android-bootstrap/less/panels.less +274 -274
- package/src/android-bootstrap/less/popovers.less +131 -131
- package/src/android-bootstrap/less/print.less +101 -101
- package/src/android-bootstrap/less/progress-bars.less +87 -87
- package/src/android-bootstrap/less/responsive-embed.less +35 -35
- package/src/android-bootstrap/less/responsive-utilities.less +194 -194
- package/src/android-bootstrap/less/scaffolding.less +161 -161
- package/src/android-bootstrap/less/tables.less +262 -262
- package/src/android-bootstrap/less/theme.less +291 -291
- package/src/android-bootstrap/less/thumbnails.less +36 -36
- package/src/android-bootstrap/less/tooltip.less +102 -102
- package/src/android-bootstrap/less/type.less +303 -303
- package/src/android-bootstrap/less/utilities.less +55 -55
- package/src/android-bootstrap/less/variables.less +896 -896
- package/src/android-bootstrap/less/wells.less +29 -29
- package/src/androidBase.js +177 -177
- package/src/androidTest.js +20 -20
- package/src/bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
- package/src/bootstrap/less/.csscomb.json +304 -304
- package/src/bootstrap/less/.csslintrc +19 -19
- package/src/bootstrap/less/alerts.less +73 -73
- package/src/bootstrap/less/aofeng/animate.min.css +10 -10
- package/src/bootstrap/less/aofeng/standard.less +2121 -2121
- package/src/bootstrap/less/aofeng/themeOne/BinaryTemplate.less +686 -686
- package/src/bootstrap/less/aofeng/themeOne/loginStyle.less +1586 -1586
- package/src/bootstrap/less/aofeng/themeOne/systemStyle.less +2650 -2650
- package/src/bootstrap/less/aofeng/themeOne.less +14 -14
- package/src/bootstrap/less/aofeng/themeTwo/newStyle1.less +415 -415
- package/src/bootstrap/less/aofeng/themeTwo.less +3 -3
- package/src/bootstrap/less/badges.less +66 -66
- package/src/bootstrap/less/breadcrumbs.less +26 -26
- package/src/bootstrap/less/button-groups.less +247 -247
- package/src/bootstrap/less/buttons.less +172 -172
- package/src/bootstrap/less/carousel.less +269 -269
- package/src/bootstrap/less/close.less +34 -34
- package/src/bootstrap/less/code.less +69 -69
- package/src/bootstrap/less/component-animations.less +33 -33
- package/src/bootstrap/less/dropdowns.less +216 -216
- package/src/bootstrap/less/forms.less +626 -626
- package/src/bootstrap/less/grid.less +84 -84
- package/src/bootstrap/less/input-groups.less +167 -167
- package/src/bootstrap/less/jumbotron.less +52 -52
- package/src/bootstrap/less/labels.less +64 -64
- package/src/bootstrap/less/list-group.less +141 -141
- package/src/bootstrap/less/manageStyle/manageChile.less +180 -180
- package/src/bootstrap/less/manageStyle/manageStyle.less +1102 -1102
- package/src/bootstrap/less/manageStyle/safeStyle.less +498 -498
- package/src/bootstrap/less/media.less +66 -66
- package/src/bootstrap/less/mixins/alerts.less +14 -14
- package/src/bootstrap/less/mixins/background-variant.less +9 -9
- package/src/bootstrap/less/mixins/border-radius.less +18 -18
- package/src/bootstrap/less/mixins/buttons.less +69 -69
- package/src/bootstrap/less/mixins/center-block.less +7 -7
- package/src/bootstrap/less/mixins/clearfix.less +22 -22
- package/src/bootstrap/less/mixins/forms.less +90 -90
- package/src/bootstrap/less/mixins/gradients.less +59 -59
- package/src/bootstrap/less/mixins/grid-framework.less +92 -92
- package/src/bootstrap/less/mixins/grid.less +122 -122
- package/src/bootstrap/less/mixins/hide-text.less +21 -21
- package/src/bootstrap/less/mixins/image.less +33 -33
- package/src/bootstrap/less/mixins/labels.less +12 -12
- package/src/bootstrap/less/mixins/list-group.less +30 -30
- package/src/bootstrap/less/mixins/nav-divider.less +10 -10
- package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
- package/src/bootstrap/less/mixins/opacity.less +8 -8
- package/src/bootstrap/less/mixins/pagination.less +24 -24
- package/src/bootstrap/less/mixins/panels.less +24 -24
- package/src/bootstrap/less/mixins/progress-bar.less +10 -10
- package/src/bootstrap/less/mixins/reset-filter.less +8 -8
- package/src/bootstrap/less/mixins/reset-text.less +18 -18
- package/src/bootstrap/less/mixins/resize.less +6 -6
- package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
- package/src/bootstrap/less/mixins/size.less +10 -10
- package/src/bootstrap/less/mixins/tab-focus.less +9 -9
- package/src/bootstrap/less/mixins/table-row.less +44 -44
- package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
- package/src/bootstrap/less/mixins/text-overflow.less +8 -8
- package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
- package/src/bootstrap/less/mixins.less +40 -40
- package/src/bootstrap/less/modals.less +151 -151
- package/src/bootstrap/less/navbar.less +660 -660
- package/src/bootstrap/less/navs.less +285 -285
- package/src/bootstrap/less/normalize.less +424 -424
- package/src/bootstrap/less/pager.less +76 -76
- package/src/bootstrap/less/pagination.less +89 -89
- package/src/bootstrap/less/panels.less +275 -275
- package/src/bootstrap/less/popovers.less +131 -131
- package/src/bootstrap/less/print.less +101 -101
- package/src/bootstrap/less/progress-bars.less +87 -87
- package/src/bootstrap/less/responsive-embed.less +35 -35
- package/src/bootstrap/less/responsive-utilities.less +194 -194
- package/src/bootstrap/less/scaffolding.less +161 -161
- package/src/bootstrap/less/standard.less +503 -503
- package/src/bootstrap/less/systemStyle.less +860 -860
- package/src/bootstrap/less/tables.less +262 -262
- package/src/bootstrap/less/theme.less +291 -291
- package/src/bootstrap/less/themeOne.less +36 -36
- package/src/bootstrap/less/themeTwo.less +29 -29
- package/src/bootstrap/less/thumbnails.less +36 -36
- package/src/bootstrap/less/tooltip.less +102 -102
- package/src/bootstrap/less/type.less +303 -303
- package/src/bootstrap/less/utilities.less +55 -55
- package/src/bootstrap/less/wells.less +29 -29
- package/src/components/AloneLoadParams.vue +25 -25
- package/src/components/FileUpload.vue +696 -696
- package/src/components/Hello.vue +39 -39
- package/src/components/LeftTree.vue +27 -27
- package/src/components/Main.vue +393 -393
- package/src/components/Util/ImgSelfSafePlus.vue +12 -10
- package/src/components/android/AddGas.vue +147 -147
- package/src/components/android/AddressList.vue +61 -61
- package/src/components/android/AdviseCommit.vue +59 -59
- package/src/components/android/AndroidCheckResult.vue +181 -181
- package/src/components/android/AttendanceTally.vue +116 -116
- package/src/components/android/Blank.vue +10 -10
- package/src/components/android/CheckUnplanPage.vue +56 -56
- package/src/components/android/Checker.vue +12 -12
- package/src/components/android/CheckerAnnual.vue +81 -81
- package/src/components/android/CheckerAvarta.vue +82 -82
- package/src/components/android/CheckerMonthly.vue +84 -84
- package/src/components/android/CurrentCreate.vue +1050 -1050
- package/src/components/android/DevicesNoncivil.vue +214 -214
- package/src/components/android/EquipmentInspection.vue +348 -348
- package/src/components/android/FootprintMap.vue +120 -120
- package/src/components/android/HiddentroubleInvestigation.vue +192 -192
- package/src/components/android/LcheckUnplan.vue +108 -108
- package/src/components/android/MasterMain.vue +77 -77
- package/src/components/android/Menu.vue +132 -132
- package/src/components/android/NavBottom.vue +157 -157
- package/src/components/android/PaperAlarm.vue +85 -85
- package/src/components/android/PaperDeviceNoncivil.vue +214 -214
- package/src/components/android/PhoneInfoTable.vue +40 -40
- package/src/components/android/PlumberAnnual.vue +83 -83
- package/src/components/android/PlumberAnnualDetail.vue +65 -65
- package/src/components/android/PlumberMonthly.vue +84 -84
- package/src/components/android/PostMap.vue +83 -83
- package/src/components/android/QueryCheckHistory.vue +122 -122
- package/src/components/android/QueryCheckHistoryItem.vue +62 -62
- package/src/components/android/RepairMain.vue +60 -60
- package/src/components/android/Repairman.vue +12 -12
- package/src/components/android/StationMaster.vue +12 -12
- package/src/components/android/wasm/comp.js +33 -33
- package/src/components/checkerphonestate/Checker.vue +32 -32
- package/src/components/checkerphonestate/CheckerState.vue +97 -97
- package/src/components/defects/AddDefectModal.vue +120 -120
- package/src/components/defects/AddDevice.vue +95 -95
- package/src/components/defects/DefectModal.vue +101 -101
- package/src/components/defects/DefectSeting.vue +98 -98
- package/src/components/defects/DefectsQuery.vue +190 -190
- package/src/components/defects/DevicesAndItem.vue +39 -39
- package/src/components/defects/DevicesSeting.vue +106 -106
- package/src/components/equipment/BoilerUsage.vue +105 -105
- package/src/components/equipment/CookerUsage.vue +105 -105
- package/src/components/equipment/DeviceUsage.vue +105 -105
- package/src/components/equipment/FurnaceUsage.vue +105 -105
- package/src/components/equipment/GasMeterUsage.vue +109 -109
- package/src/components/equipment/HeaterUsage.vue +105 -105
- package/src/components/gasusage/GasUsage.vue +126 -126
- package/src/components/issueplan/IssuePlanMain.vue +23 -23
- package/src/components/map/PersonTrack.vue +224 -224
- package/src/components/map/douglasPeuckerForAMap.js +88 -88
- package/src/components/metterfiles/AddUserfiles.vue +246 -246
- package/src/components/metterfiles/MetterFiles.vue +104 -104
- package/src/components/notice/NoticeForm.vue +100 -100
- package/src/components/notice/NoticeIssue.vue +20 -20
- package/src/components/notice/NoticeQuery.vue +76 -76
- package/src/components/paper/PicViewer.vue +18 -18
- package/src/components/paper/RepairVerify.vue +139 -139
- package/src/components/paper/RepairVerifyForm.vue +76 -76
- package/src/components/paper/VerifyForm.vue +107 -107
- package/src/components/phonestate/DailyTraffic.vue +57 -57
- package/src/components/phonestate/LastKnownState.vue +74 -74
- package/src/components/phonestate/MonthlyTraffic.vue +66 -66
- package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
- package/src/components/phonestate/PostMap.vue +82 -82
- package/src/components/planmanage/PlanManage.vue +834 -834
- package/src/components/planmanage/checkPlanList.vue +369 -369
- package/src/components/querycheckpaper/PaperItem.vue +59 -59
- package/src/components/querycheckpaper/PaperSearch.vue +126 -126
- package/src/components/report/HiddenSituation.vue +3 -3
- package/src/components/task/RepairAnnual.vue +79 -79
- package/src/components/task/RepairAnnualDetail.vue +49 -49
- package/src/components/task/RepairMonthly.vue +91 -91
- package/src/components/task/TaskAnnual.vue +77 -77
- package/src/components/task/TaskAnnualDetail.vue +47 -47
- package/src/components/task/TaskMonthly.vue +89 -89
- package/src/components/userfile/MeterFile.vue +145 -145
- package/src/components/userfile/MeterModify.vue +46 -46
- package/src/components/userfile/UserFile.vue +118 -118
- package/src/components/userfile/UserfileChange.vue +277 -277
- package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
- package/src/components/userfileaudit/UserFileaudit.vue +81 -81
- package/src/components/userfileaudit/UserfileChangeaudit.vue +239 -239
- package/src/expandcss.less +571 -571
- package/src/filiale/fugou/pc/DefectPaperNew.vue +4 -0
- package/src/filiale/fugou/pc/PaperDefectMain.vue +8 -0
- package/src/filiale/fugou/pc/PaperList.vue +8 -0
- package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1154 -1154
- package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1230 -0
- package/src/filiale/yangchunboneng/android.js +1 -0
- package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +552 -551
- package/src/filiale/yongzhou/pc/safeDetail.vue +534 -533
- package/src/main.js +33 -33
- package/src/plugins/GerJsonConfig.js +59 -59
- package/src/plugins/LoadData.js +10 -10
- package/src/plugins/LoadParams.js +24 -24
- package/src/stores/AppData.js +46 -46
- package/src/stores/wxconfig.js +10 -10
- package/src/utils/getNowDate.js +33 -33
- package/test/SearchList.test.js +14 -14
- package/test/e2e/custom-assertions/elementCount.js +26 -26
- package/test/e2e/nightwatch.conf.js +40 -40
- package/test/e2e/runner.js +30 -30
- package/test/e2e/specs/test.js +13 -13
- package/test/unit/.eslintrc +5 -5
- package/test/unit/TestUtil.js +62 -62
- package/test/unit/context.html +20 -20
- package/test/unit/index.js +13 -13
- package/test/unit/init.js +11 -11
- package/test/unit/karma.conf.js +53 -53
- package/test/unit/specs/Devices.spec.js +18 -18
- package/test/unit/specs/getArrobjconfig.spec.js +104 -104
- package/test/unit/specs/getobjconfig.spec.js +37 -37
- package/test/unit/specs/phonetest/phonesafecheck.spec.js +23 -23
- package/test/unit/specs/safePlanItem.spec.js +30 -30
- package/test/unit/specs/safecheck-android.spec.js +7 -7
- package/test/unit/specs/safecheck.spec.js +127 -127
- package/yarn-error.log +140 -140
@@ -1,224 +1,224 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="basic-main" style="height: 100%">
|
3
|
-
<div class="row">
|
4
|
-
<div class="col-sm-9 amap-main">
|
5
|
-
<div class="form-horizontal select-overspread container-fluid auto">
|
6
|
-
<div class="row">
|
7
|
-
<div class="col-sm-3 form-input-group" style="width: 20%">
|
8
|
-
<label class="control-label">公  司</label>
|
9
|
-
<right-tree-safe @re-res="getRes" >
|
10
|
-
</right-tree-safe>
|
11
|
-
</div>
|
12
|
-
<div class="col-sm-3 form-input-group" style="width: 20%">
|
13
|
-
<label class="control-label" >轨迹时间</label>
|
14
|
-
<datepicker placeholder="轨迹时间"
|
15
|
-
:value.sync="searchCondition.date"
|
16
|
-
v-model="searchCondition.date"
|
17
|
-
:format="'yyyy-MM-dd'">
|
18
|
-
</datepicker>
|
19
|
-
</div>
|
20
|
-
<div class="col-sm-3 form-input-group" style="width: 20%">
|
21
|
-
<label class="control-label">安检员</label>
|
22
|
-
<v-select :value.sync="searchCondition.userId" v-model='searchCondition.userId'
|
23
|
-
:value-single="true" clear-button search
|
24
|
-
:options='searchUserEndOption' placeholder='请选择'
|
25
|
-
></v-select>
|
26
|
-
</div>
|
27
|
-
<div class="col-sm-3 form-input-group" style="width: 20%">
|
28
|
-
<label class="control-label">班组</label>
|
29
|
-
<v-select :value.sync="searchCondition.departmentId" v-model='searchCondition.departmentId'
|
30
|
-
:value-single="true" clear-button search
|
31
|
-
:options='searchDepartmentOption' placeholder='请选择'
|
32
|
-
></v-select>
|
33
|
-
</div>
|
34
|
-
<div class="col-sm-3 form-input-group" style="width: 20%;float:right;">
|
35
|
-
<button class="btn btn-primary" @click="search">查询</button>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
<a-map-trajectory-new :outerlinedata.sync="outerlinedata" :pathnavigatorstyle="pathnavigatorstyle" :dom="dom"></a-map-trajectory-new>
|
40
|
-
</div>
|
41
|
-
<div class="col-sm-3">
|
42
|
-
<div id="zzz" class="basic-main" style="flex:1;margin-left: 0px;overflow: hidden">
|
43
|
-
<div class="flex">
|
44
|
-
<div class="panel panel-info" style="flex: 4;margin-top:0px;height: 50%">
|
45
|
-
<div class="panel-heading" style="height: auto">
|
46
|
-
<h3 class="panel-title">轨迹记录</h3>
|
47
|
-
</div>
|
48
|
-
<div class="panel-body" style="overflow: scroll; height: 700px">
|
49
|
-
<accordion :one-at-a-time="true" v-if="reponData.length>0">
|
50
|
-
<template v-for="row in reponData">
|
51
|
-
<panel is-open="false" type="primary" @click="chengeLocation(row)">
|
52
|
-
<strong slot="header">人员姓名:{{row.name}}</strong>
|
53
|
-
<!-- <div v-for="(idx,item) in row.result" @click="chengeLocation(item)" :class="{'alert alert-info':idx%2===0,'alert alert-success':idx%2!==0}">-->
|
54
|
-
<!-- 轨迹时间段:{{item.f_start_date}} ~ {{item.f_end_date}}-->
|
55
|
-
<!-- </div>-->
|
56
|
-
</panel>
|
57
|
-
</template>
|
58
|
-
</accordion>
|
59
|
-
<h4 class="panel-title" v-else>暂无相关数据</h4>
|
60
|
-
</div>
|
61
|
-
</div>
|
62
|
-
</div>
|
63
|
-
</div>
|
64
|
-
</div>
|
65
|
-
</div>
|
66
|
-
|
67
|
-
</div>
|
68
|
-
</template>
|
69
|
-
|
70
|
-
<script>
|
71
|
-
import * as Util from '../Util'
|
72
|
-
import {HttpResetClass} from 'vue-client'
|
73
|
-
import { douglasPeuckerForAMap } from './douglasPeuckerForAMap'
|
74
|
-
|
75
|
-
export default {
|
76
|
-
title: "安检员轨迹展示",
|
77
|
-
data() {
|
78
|
-
return {
|
79
|
-
showTaskPoints: [],
|
80
|
-
taskModel: {},
|
81
|
-
// 当前分公司下所有的用户id
|
82
|
-
toUserIds: '',
|
83
|
-
// 当前公司的所有安检员
|
84
|
-
searchUserEndOption: [],
|
85
|
-
searchDepartmentOption: [],
|
86
|
-
// 请求到的结果集合
|
87
|
-
reponData: [],
|
88
|
-
// 点集
|
89
|
-
outerlinedata: [],
|
90
|
-
pathnavigatorstyle: {
|
91
|
-
// 图标宽度
|
92
|
-
width: 16,
|
93
|
-
// 图标高度
|
94
|
-
height: 32,
|
95
|
-
// 图标地址(外链地址或者Base64)
|
96
|
-
iconBase64: 'https://webapi.amap.com/ui/1.1/ui/misc/PathSimplifier/examples/imgs/car.png'
|
97
|
-
},
|
98
|
-
// 分公司ids
|
99
|
-
f_filialeids: '',
|
100
|
-
path: [],
|
101
|
-
aMap: null,
|
102
|
-
map: null,
|
103
|
-
filialeOptions: [],
|
104
|
-
userid: null,
|
105
|
-
dom: 'amapIdLOCUS' + Math.round(Math.random() * 10) + Math.round(Math.random() * 10),
|
106
|
-
rootSubmenuKeys: ['1', '2'],
|
107
|
-
openKeys: ['1'],
|
108
|
-
searchCondition: {
|
109
|
-
condition: '1 = 1',
|
110
|
-
orderTime: 'ps.f_realtime asc',
|
111
|
-
date: '',
|
112
|
-
userId: undefined,
|
113
|
-
departmentId: undefined
|
114
|
-
}
|
115
|
-
}
|
116
|
-
},
|
117
|
-
methods: {
|
118
|
-
chengeLocation(row) {
|
119
|
-
const points = douglasPeuckerForAMap(row.points, 2, 'tm')
|
120
|
-
this.outerlinedata = [{ path: points, speed: Math.ceil(points.length / 2), name: `${this.searchCondition.date}的轨迹` }]
|
121
|
-
},
|
122
|
-
search() {
|
123
|
-
var condition = '1 = 1'
|
124
|
-
if (!this.f_filialeids) {
|
125
|
-
return this.$showMessage('请选择需要查询的分公司')
|
126
|
-
}
|
127
|
-
if (!this.searchCondition.date) {
|
128
|
-
return this.$showMessage('请选择需要查看的轨迹时间')
|
129
|
-
}
|
130
|
-
// if (!this.searchCondition.userId[0]) {
|
131
|
-
// return this.$showMessage('请选择需要查看的轨迹所属人员')
|
132
|
-
// }
|
133
|
-
|
134
|
-
if (typeof this.searchCondition.date !== 'string') {
|
135
|
-
this.searchCondition.date = this.searchCondition.date.format('YYYY-MM-DD')
|
136
|
-
}
|
137
|
-
condition += " and ps.f_realtime >= '" + this.searchCondition.date + " 00:00:00' and ps.f_realtime <= '" + this.searchCondition.date + " 23:59:59'"
|
138
|
-
if(this.searchCondition.userId){
|
139
|
-
condition += ` and ps.f_user_id = '${this.searchCondition.userId}'`
|
140
|
-
}
|
141
|
-
let condition2 = '1 = 1'
|
142
|
-
if(this.searchCondition.departmentId){
|
143
|
-
condition2 += ` and d.id = '${this.searchCondition.departmentId}'`
|
144
|
-
}
|
145
|
-
this.searchCondition.condition = condition
|
146
|
-
this.$resetpost('rs/logic/getPhoneState', { condition: this.searchCondition.condition, condition2, orderTime: this.searchCondition.orderTime }, {resolveMsg: "轨迹记录查询成功", rejectMsg: "轨迹记录查询失败"}).then((response)=>{
|
147
|
-
if (response.data.state === 'success') {
|
148
|
-
this.reponData = response.data.result
|
149
|
-
// const points = douglasPeuckerForAMap(response.data.result, 2, 'tm')
|
150
|
-
// this.outerlinedata = [{ path: points, speed: Math.ceil(points.length / 2), name: `${this.searchCondition.date}的轨迹` }]
|
151
|
-
} else {
|
152
|
-
this.$showMessage("该用户当日使用app时间较短或行程较少,不足够生成轨迹")
|
153
|
-
}
|
154
|
-
})
|
155
|
-
},
|
156
|
-
getRes(obj){
|
157
|
-
// this.model.f_filialeids = this.$login.convertToIn(obj.resids);
|
158
|
-
if (obj.res != undefined && obj.res.length > 0 && obj.res[0] != undefined) {
|
159
|
-
this.getNewData(obj.res[0])
|
160
|
-
}
|
161
|
-
this.f_filialeids = this.$login.convertToIn(obj.resids);
|
162
|
-
},
|
163
|
-
//获取定位人员类表
|
164
|
-
async getNewData(organization){
|
165
|
-
// let organization = '公司名称'
|
166
|
-
// let userRolestr = '需要定位人员'
|
167
|
-
let userRolestr = '安检员'
|
168
|
-
let res =await new HttpResetClass().load('POST', '/rs/search', {
|
169
|
-
// source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($需要定位人员$) != -1))',
|
170
|
-
source: "this.getParentByName($"+organization+"$).getAllChildrens().where(row.getAttributes().get($resourcetype$)==$user$).where(row.getAttributes().get($rolestr$)!=null).where(row.getAttributes().get($rolestr$).indexOf($"+userRolestr+"$)!=-1)",
|
171
|
-
userid: this.$login.f.id
|
172
|
-
}, {resolveMsg: null, rejectMsg: null})
|
173
|
-
let dataEnd = [{label:'全部',value:''}]
|
174
|
-
let idsEnd = []
|
175
|
-
res.data.forEach(res=>{
|
176
|
-
let h=true
|
177
|
-
dataEnd.forEach(per=>{
|
178
|
-
if(res.id==per.value){
|
179
|
-
h=false
|
180
|
-
}
|
181
|
-
})
|
182
|
-
if(h){
|
183
|
-
dataEnd.push({label:res.name,value:res.id})
|
184
|
-
idsEnd.push(res.id)
|
185
|
-
}
|
186
|
-
})
|
187
|
-
this.toUserIds = this.$login.convertToIn(idsEnd); //所有的员工ID
|
188
|
-
this.searchUserEndOption = dataEnd
|
189
|
-
|
190
|
-
let resp = await new HttpResetClass().load('POST', `/rs/sql/singleTable`, {
|
191
|
-
data: {
|
192
|
-
tablename: 't_department',
|
193
|
-
condition: `parentid = '${this.$login.f.orgid}' and f_dep_type = '部门'`,
|
194
|
-
}
|
195
|
-
}, {resolveMsg: null, rejectMsg: null})
|
196
|
-
//tag)
|
197
|
-
const departments = [{label: '全部', value: ''}]
|
198
|
-
for (const item of resp.data) {
|
199
|
-
departments.push({
|
200
|
-
label: item.name,
|
201
|
-
value: item.id
|
202
|
-
})
|
203
|
-
}
|
204
|
-
this.searchDepartmentOption = departments
|
205
|
-
},
|
206
|
-
toStandardDateString () {
|
207
|
-
const dt = new Date()
|
208
|
-
const month = dt.getMonth() + 1
|
209
|
-
const date = dt.getDate()
|
210
|
-
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
211
|
-
}
|
212
|
-
},
|
213
|
-
ready(){
|
214
|
-
this.searchCondition.date = this.toStandardDateString()
|
215
|
-
}
|
216
|
-
}
|
217
|
-
</script>
|
218
|
-
|
219
|
-
<style lang="less" scoped>
|
220
|
-
.amap-main {
|
221
|
-
height: 90%;
|
222
|
-
padding-right:10px;
|
223
|
-
}
|
224
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="basic-main" style="height: 100%">
|
3
|
+
<div class="row">
|
4
|
+
<div class="col-sm-9 amap-main">
|
5
|
+
<div class="form-horizontal select-overspread container-fluid auto">
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-sm-3 form-input-group" style="width: 20%">
|
8
|
+
<label class="control-label">公  司</label>
|
9
|
+
<right-tree-safe @re-res="getRes" >
|
10
|
+
</right-tree-safe>
|
11
|
+
</div>
|
12
|
+
<div class="col-sm-3 form-input-group" style="width: 20%">
|
13
|
+
<label class="control-label" >轨迹时间</label>
|
14
|
+
<datepicker placeholder="轨迹时间"
|
15
|
+
:value.sync="searchCondition.date"
|
16
|
+
v-model="searchCondition.date"
|
17
|
+
:format="'yyyy-MM-dd'">
|
18
|
+
</datepicker>
|
19
|
+
</div>
|
20
|
+
<div class="col-sm-3 form-input-group" style="width: 20%">
|
21
|
+
<label class="control-label">安检员</label>
|
22
|
+
<v-select :value.sync="searchCondition.userId" v-model='searchCondition.userId'
|
23
|
+
:value-single="true" clear-button search
|
24
|
+
:options='searchUserEndOption' placeholder='请选择'
|
25
|
+
></v-select>
|
26
|
+
</div>
|
27
|
+
<div class="col-sm-3 form-input-group" style="width: 20%">
|
28
|
+
<label class="control-label">班组</label>
|
29
|
+
<v-select :value.sync="searchCondition.departmentId" v-model='searchCondition.departmentId'
|
30
|
+
:value-single="true" clear-button search
|
31
|
+
:options='searchDepartmentOption' placeholder='请选择'
|
32
|
+
></v-select>
|
33
|
+
</div>
|
34
|
+
<div class="col-sm-3 form-input-group" style="width: 20%;float:right;">
|
35
|
+
<button class="btn btn-primary" @click="search">查询</button>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<a-map-trajectory-new :outerlinedata.sync="outerlinedata" :pathnavigatorstyle="pathnavigatorstyle" :dom="dom"></a-map-trajectory-new>
|
40
|
+
</div>
|
41
|
+
<div class="col-sm-3">
|
42
|
+
<div id="zzz" class="basic-main" style="flex:1;margin-left: 0px;overflow: hidden">
|
43
|
+
<div class="flex">
|
44
|
+
<div class="panel panel-info" style="flex: 4;margin-top:0px;height: 50%">
|
45
|
+
<div class="panel-heading" style="height: auto">
|
46
|
+
<h3 class="panel-title">轨迹记录</h3>
|
47
|
+
</div>
|
48
|
+
<div class="panel-body" style="overflow: scroll; height: 700px">
|
49
|
+
<accordion :one-at-a-time="true" v-if="reponData.length>0">
|
50
|
+
<template v-for="row in reponData">
|
51
|
+
<panel is-open="false" type="primary" @click="chengeLocation(row)">
|
52
|
+
<strong slot="header">人员姓名:{{row.name}}</strong>
|
53
|
+
<!-- <div v-for="(idx,item) in row.result" @click="chengeLocation(item)" :class="{'alert alert-info':idx%2===0,'alert alert-success':idx%2!==0}">-->
|
54
|
+
<!-- 轨迹时间段:{{item.f_start_date}} ~ {{item.f_end_date}}-->
|
55
|
+
<!-- </div>-->
|
56
|
+
</panel>
|
57
|
+
</template>
|
58
|
+
</accordion>
|
59
|
+
<h4 class="panel-title" v-else>暂无相关数据</h4>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
</div>
|
68
|
+
</template>
|
69
|
+
|
70
|
+
<script>
|
71
|
+
import * as Util from '../Util'
|
72
|
+
import {HttpResetClass} from 'vue-client'
|
73
|
+
import { douglasPeuckerForAMap } from './douglasPeuckerForAMap'
|
74
|
+
|
75
|
+
export default {
|
76
|
+
title: "安检员轨迹展示",
|
77
|
+
data() {
|
78
|
+
return {
|
79
|
+
showTaskPoints: [],
|
80
|
+
taskModel: {},
|
81
|
+
// 当前分公司下所有的用户id
|
82
|
+
toUserIds: '',
|
83
|
+
// 当前公司的所有安检员
|
84
|
+
searchUserEndOption: [],
|
85
|
+
searchDepartmentOption: [],
|
86
|
+
// 请求到的结果集合
|
87
|
+
reponData: [],
|
88
|
+
// 点集
|
89
|
+
outerlinedata: [],
|
90
|
+
pathnavigatorstyle: {
|
91
|
+
// 图标宽度
|
92
|
+
width: 16,
|
93
|
+
// 图标高度
|
94
|
+
height: 32,
|
95
|
+
// 图标地址(外链地址或者Base64)
|
96
|
+
iconBase64: 'https://webapi.amap.com/ui/1.1/ui/misc/PathSimplifier/examples/imgs/car.png'
|
97
|
+
},
|
98
|
+
// 分公司ids
|
99
|
+
f_filialeids: '',
|
100
|
+
path: [],
|
101
|
+
aMap: null,
|
102
|
+
map: null,
|
103
|
+
filialeOptions: [],
|
104
|
+
userid: null,
|
105
|
+
dom: 'amapIdLOCUS' + Math.round(Math.random() * 10) + Math.round(Math.random() * 10),
|
106
|
+
rootSubmenuKeys: ['1', '2'],
|
107
|
+
openKeys: ['1'],
|
108
|
+
searchCondition: {
|
109
|
+
condition: '1 = 1',
|
110
|
+
orderTime: 'ps.f_realtime asc',
|
111
|
+
date: '',
|
112
|
+
userId: undefined,
|
113
|
+
departmentId: undefined
|
114
|
+
}
|
115
|
+
}
|
116
|
+
},
|
117
|
+
methods: {
|
118
|
+
chengeLocation(row) {
|
119
|
+
const points = douglasPeuckerForAMap(row.points, 2, 'tm')
|
120
|
+
this.outerlinedata = [{ path: points, speed: Math.ceil(points.length / 2), name: `${this.searchCondition.date}的轨迹` }]
|
121
|
+
},
|
122
|
+
search() {
|
123
|
+
var condition = '1 = 1'
|
124
|
+
if (!this.f_filialeids) {
|
125
|
+
return this.$showMessage('请选择需要查询的分公司')
|
126
|
+
}
|
127
|
+
if (!this.searchCondition.date) {
|
128
|
+
return this.$showMessage('请选择需要查看的轨迹时间')
|
129
|
+
}
|
130
|
+
// if (!this.searchCondition.userId[0]) {
|
131
|
+
// return this.$showMessage('请选择需要查看的轨迹所属人员')
|
132
|
+
// }
|
133
|
+
|
134
|
+
if (typeof this.searchCondition.date !== 'string') {
|
135
|
+
this.searchCondition.date = this.searchCondition.date.format('YYYY-MM-DD')
|
136
|
+
}
|
137
|
+
condition += " and ps.f_realtime >= '" + this.searchCondition.date + " 00:00:00' and ps.f_realtime <= '" + this.searchCondition.date + " 23:59:59'"
|
138
|
+
if(this.searchCondition.userId){
|
139
|
+
condition += ` and ps.f_user_id = '${this.searchCondition.userId}'`
|
140
|
+
}
|
141
|
+
let condition2 = '1 = 1'
|
142
|
+
if(this.searchCondition.departmentId){
|
143
|
+
condition2 += ` and d.id = '${this.searchCondition.departmentId}'`
|
144
|
+
}
|
145
|
+
this.searchCondition.condition = condition
|
146
|
+
this.$resetpost('rs/logic/getPhoneState', { condition: this.searchCondition.condition, condition2, orderTime: this.searchCondition.orderTime }, {resolveMsg: "轨迹记录查询成功", rejectMsg: "轨迹记录查询失败"}).then((response)=>{
|
147
|
+
if (response.data.state === 'success') {
|
148
|
+
this.reponData = response.data.result
|
149
|
+
// const points = douglasPeuckerForAMap(response.data.result, 2, 'tm')
|
150
|
+
// this.outerlinedata = [{ path: points, speed: Math.ceil(points.length / 2), name: `${this.searchCondition.date}的轨迹` }]
|
151
|
+
} else {
|
152
|
+
this.$showMessage("该用户当日使用app时间较短或行程较少,不足够生成轨迹")
|
153
|
+
}
|
154
|
+
})
|
155
|
+
},
|
156
|
+
getRes(obj){
|
157
|
+
// this.model.f_filialeids = this.$login.convertToIn(obj.resids);
|
158
|
+
if (obj.res != undefined && obj.res.length > 0 && obj.res[0] != undefined) {
|
159
|
+
this.getNewData(obj.res[0])
|
160
|
+
}
|
161
|
+
this.f_filialeids = this.$login.convertToIn(obj.resids);
|
162
|
+
},
|
163
|
+
//获取定位人员类表
|
164
|
+
async getNewData(organization){
|
165
|
+
// let organization = '公司名称'
|
166
|
+
// let userRolestr = '需要定位人员'
|
167
|
+
let userRolestr = '安检员'
|
168
|
+
let res =await new HttpResetClass().load('POST', '/rs/search', {
|
169
|
+
// source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($需要定位人员$) != -1))',
|
170
|
+
source: "this.getParentByName($"+organization+"$).getAllChildrens().where(row.getAttributes().get($resourcetype$)==$user$).where(row.getAttributes().get($rolestr$)!=null).where(row.getAttributes().get($rolestr$).indexOf($"+userRolestr+"$)!=-1)",
|
171
|
+
userid: this.$login.f.id
|
172
|
+
}, {resolveMsg: null, rejectMsg: null})
|
173
|
+
let dataEnd = [{label:'全部',value:''}]
|
174
|
+
let idsEnd = []
|
175
|
+
res.data.forEach(res=>{
|
176
|
+
let h=true
|
177
|
+
dataEnd.forEach(per=>{
|
178
|
+
if(res.id==per.value){
|
179
|
+
h=false
|
180
|
+
}
|
181
|
+
})
|
182
|
+
if(h){
|
183
|
+
dataEnd.push({label:res.name,value:res.id})
|
184
|
+
idsEnd.push(res.id)
|
185
|
+
}
|
186
|
+
})
|
187
|
+
this.toUserIds = this.$login.convertToIn(idsEnd); //所有的员工ID
|
188
|
+
this.searchUserEndOption = dataEnd
|
189
|
+
|
190
|
+
let resp = await new HttpResetClass().load('POST', `/rs/sql/singleTable`, {
|
191
|
+
data: {
|
192
|
+
tablename: 't_department',
|
193
|
+
condition: `parentid = '${this.$login.f.orgid}' and f_dep_type = '部门'`,
|
194
|
+
}
|
195
|
+
}, {resolveMsg: null, rejectMsg: null})
|
196
|
+
//tag)
|
197
|
+
const departments = [{label: '全部', value: ''}]
|
198
|
+
for (const item of resp.data) {
|
199
|
+
departments.push({
|
200
|
+
label: item.name,
|
201
|
+
value: item.id
|
202
|
+
})
|
203
|
+
}
|
204
|
+
this.searchDepartmentOption = departments
|
205
|
+
},
|
206
|
+
toStandardDateString () {
|
207
|
+
const dt = new Date()
|
208
|
+
const month = dt.getMonth() + 1
|
209
|
+
const date = dt.getDate()
|
210
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
211
|
+
}
|
212
|
+
},
|
213
|
+
ready(){
|
214
|
+
this.searchCondition.date = this.toStandardDateString()
|
215
|
+
}
|
216
|
+
}
|
217
|
+
</script>
|
218
|
+
|
219
|
+
<style lang="less" scoped>
|
220
|
+
.amap-main {
|
221
|
+
height: 90%;
|
222
|
+
padding-right:10px;
|
223
|
+
}
|
224
|
+
</style>
|
@@ -1,88 +1,88 @@
|
|
1
|
-
function calculationDistance (point1, point2) {
|
2
|
-
const lat1 = point1[1]
|
3
|
-
const lat2 = point2[1]
|
4
|
-
const lng1 = point1[0]
|
5
|
-
const lng2 = point2[0]
|
6
|
-
const radLat1 = lat1 * Math.PI / 180.0
|
7
|
-
const radLat2 = lat2 * Math.PI / 180.0
|
8
|
-
const a = radLat1 - radLat2
|
9
|
-
const b = (lng1 * Math.PI / 180.0) - (lng2 * Math.PI / 180.0)
|
10
|
-
const s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)))
|
11
|
-
return s * 6370996.81
|
12
|
-
}
|
13
|
-
|
14
|
-
function distToSegment (start, end, center) {
|
15
|
-
const a = Math.abs(calculationDistance(start, end))
|
16
|
-
const b = Math.abs(calculationDistance(start, center))
|
17
|
-
const c = Math.abs(calculationDistance(end, center))
|
18
|
-
const p = (a + b + c) / 2.0
|
19
|
-
const s = Math.sqrt(Math.abs(p * (p - a) * (p - b) * (p - c)))
|
20
|
-
return s * 2.0 / a
|
21
|
-
}
|
22
|
-
|
23
|
-
function compressLine (coordinate, result, start, end, dMax) {
|
24
|
-
if (start < end) {
|
25
|
-
let maxDist = 0
|
26
|
-
let currentIndex = 0
|
27
|
-
const startPoint = coordinate[start]
|
28
|
-
const endPoint = coordinate[end]
|
29
|
-
for (let i = start + 1; i < end; i++) {
|
30
|
-
const currentDist = distToSegment(startPoint, endPoint, coordinate[i])
|
31
|
-
if (currentDist > maxDist) {
|
32
|
-
maxDist = currentDist
|
33
|
-
currentIndex = i
|
34
|
-
}
|
35
|
-
}
|
36
|
-
if (maxDist >= dMax) {
|
37
|
-
// 将当前点加入到过滤数组中
|
38
|
-
result.push(coordinate[currentIndex])
|
39
|
-
// 将原来的线段以当前点为中心拆成两段,分别进行递归处理
|
40
|
-
compressLine(coordinate, result, start, currentIndex, dMax)
|
41
|
-
compressLine(coordinate, result, currentIndex, end, dMax)
|
42
|
-
}
|
43
|
-
}
|
44
|
-
return result
|
45
|
-
}
|
46
|
-
|
47
|
-
// 调用此方法
|
48
|
-
// 第一个参数为GPS点位数组,格式为[[x:lng,y:lat,dateKey:xxx],[x:lng,y:lat,dateKey:xxx],[x:lng,y:lat,dateKey:xxx]...]
|
49
|
-
// 第二个参数为误差,大于多少m的误差就保留
|
50
|
-
// 第三个参数为时间的key
|
51
|
-
export function douglasPeuckerForAMap (originalArr, dMax, dateKey) {
|
52
|
-
const coordinate = []
|
53
|
-
|
54
|
-
for (let index = 0; index < originalArr.length; index++) {
|
55
|
-
const element = originalArr[index]
|
56
|
-
const x = Number(element.x)
|
57
|
-
const y = Number(element.y)
|
58
|
-
const tempArr = [x, y]
|
59
|
-
coordinate.push(tempArr)
|
60
|
-
}
|
61
|
-
|
62
|
-
if (!coordinate || !(coordinate.length > 2)) {
|
63
|
-
return null
|
64
|
-
}
|
65
|
-
coordinate.forEach((item, index) => {
|
66
|
-
item.key = index
|
67
|
-
})
|
68
|
-
|
69
|
-
const result = compressLine(coordinate, [], 0, coordinate.length - 1, dMax)
|
70
|
-
|
71
|
-
result.push(coordinate[0])
|
72
|
-
result.push(coordinate[coordinate.length - 1])
|
73
|
-
const resultLatLng = result.sort((a, b) => {
|
74
|
-
if (a.key < b.key) {
|
75
|
-
return -1
|
76
|
-
} else if (a.key > b.key) {
|
77
|
-
return 1
|
78
|
-
}
|
79
|
-
return 0
|
80
|
-
})
|
81
|
-
|
82
|
-
resultLatLng.forEach((item) => {
|
83
|
-
const originalDate = originalArr[item.key][dateKey]
|
84
|
-
item.push(originalDate)
|
85
|
-
})
|
86
|
-
|
87
|
-
return resultLatLng
|
88
|
-
}
|
1
|
+
function calculationDistance (point1, point2) {
|
2
|
+
const lat1 = point1[1]
|
3
|
+
const lat2 = point2[1]
|
4
|
+
const lng1 = point1[0]
|
5
|
+
const lng2 = point2[0]
|
6
|
+
const radLat1 = lat1 * Math.PI / 180.0
|
7
|
+
const radLat2 = lat2 * Math.PI / 180.0
|
8
|
+
const a = radLat1 - radLat2
|
9
|
+
const b = (lng1 * Math.PI / 180.0) - (lng2 * Math.PI / 180.0)
|
10
|
+
const s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)))
|
11
|
+
return s * 6370996.81
|
12
|
+
}
|
13
|
+
|
14
|
+
function distToSegment (start, end, center) {
|
15
|
+
const a = Math.abs(calculationDistance(start, end))
|
16
|
+
const b = Math.abs(calculationDistance(start, center))
|
17
|
+
const c = Math.abs(calculationDistance(end, center))
|
18
|
+
const p = (a + b + c) / 2.0
|
19
|
+
const s = Math.sqrt(Math.abs(p * (p - a) * (p - b) * (p - c)))
|
20
|
+
return s * 2.0 / a
|
21
|
+
}
|
22
|
+
|
23
|
+
function compressLine (coordinate, result, start, end, dMax) {
|
24
|
+
if (start < end) {
|
25
|
+
let maxDist = 0
|
26
|
+
let currentIndex = 0
|
27
|
+
const startPoint = coordinate[start]
|
28
|
+
const endPoint = coordinate[end]
|
29
|
+
for (let i = start + 1; i < end; i++) {
|
30
|
+
const currentDist = distToSegment(startPoint, endPoint, coordinate[i])
|
31
|
+
if (currentDist > maxDist) {
|
32
|
+
maxDist = currentDist
|
33
|
+
currentIndex = i
|
34
|
+
}
|
35
|
+
}
|
36
|
+
if (maxDist >= dMax) {
|
37
|
+
// 将当前点加入到过滤数组中
|
38
|
+
result.push(coordinate[currentIndex])
|
39
|
+
// 将原来的线段以当前点为中心拆成两段,分别进行递归处理
|
40
|
+
compressLine(coordinate, result, start, currentIndex, dMax)
|
41
|
+
compressLine(coordinate, result, currentIndex, end, dMax)
|
42
|
+
}
|
43
|
+
}
|
44
|
+
return result
|
45
|
+
}
|
46
|
+
|
47
|
+
// 调用此方法
|
48
|
+
// 第一个参数为GPS点位数组,格式为[[x:lng,y:lat,dateKey:xxx],[x:lng,y:lat,dateKey:xxx],[x:lng,y:lat,dateKey:xxx]...]
|
49
|
+
// 第二个参数为误差,大于多少m的误差就保留
|
50
|
+
// 第三个参数为时间的key
|
51
|
+
export function douglasPeuckerForAMap (originalArr, dMax, dateKey) {
|
52
|
+
const coordinate = []
|
53
|
+
|
54
|
+
for (let index = 0; index < originalArr.length; index++) {
|
55
|
+
const element = originalArr[index]
|
56
|
+
const x = Number(element.x)
|
57
|
+
const y = Number(element.y)
|
58
|
+
const tempArr = [x, y]
|
59
|
+
coordinate.push(tempArr)
|
60
|
+
}
|
61
|
+
|
62
|
+
if (!coordinate || !(coordinate.length > 2)) {
|
63
|
+
return null
|
64
|
+
}
|
65
|
+
coordinate.forEach((item, index) => {
|
66
|
+
item.key = index
|
67
|
+
})
|
68
|
+
|
69
|
+
const result = compressLine(coordinate, [], 0, coordinate.length - 1, dMax)
|
70
|
+
|
71
|
+
result.push(coordinate[0])
|
72
|
+
result.push(coordinate[coordinate.length - 1])
|
73
|
+
const resultLatLng = result.sort((a, b) => {
|
74
|
+
if (a.key < b.key) {
|
75
|
+
return -1
|
76
|
+
} else if (a.key > b.key) {
|
77
|
+
return 1
|
78
|
+
}
|
79
|
+
return 0
|
80
|
+
})
|
81
|
+
|
82
|
+
resultLatLng.forEach((item) => {
|
83
|
+
const originalDate = originalArr[item.key][dateKey]
|
84
|
+
item.push(originalDate)
|
85
|
+
})
|
86
|
+
|
87
|
+
return resultLatLng
|
88
|
+
}
|