af-mobile-client-vue3 1.5.68 → 1.5.70
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/.env +11 -11
- package/package.json +121 -121
- package/src/api/map/trackApi.ts +94 -0
- package/src/api/user/index.ts +50 -50
- package/src/assets/img/map/start.png +0 -0
- package/src/assets/img/map/terminus.png +0 -0
- package/src/components/common/MateChat/apiService.ts +310 -310
- package/src/components/common/otherCharge/ChargePrintSelectorAndRemarks.vue +137 -137
- package/src/components/common/otherCharge/CodePayment.vue +357 -357
- package/src/components/common/otherCharge/FileUploader.vue +602 -602
- package/src/components/common/otherCharge/GridFileUploader.vue +846 -846
- package/src/components/common/otherCharge/PaymentMethodSelector.vue +202 -202
- package/src/components/common/otherCharge/PaymentMethodSelectorCard.vue +45 -45
- package/src/components/common/otherCharge/ReceiptModal.vue +273 -273
- package/src/components/common/otherCharge/index.ts +43 -43
- package/src/components/data/OtherCharge/OtherChargeItemModal.vue +547 -547
- package/src/components/data/XCellList/index.vue +10 -1
- package/src/components/data/XOlMap/index.vue +117 -1
- package/src/components/data/XOlMap/types.ts +26 -0
- package/src/components/data/step/index.vue +1975 -1975
- package/src/router/guards.ts +136 -136
- package/src/router/invoiceRoutes.ts +37 -37
- package/src/router/routes.ts +436 -436
- package/src/services/api/Login.ts +6 -6
- package/src/services/v3Api.ts +170 -170
- package/src/stores/modules/setting.ts +94 -94
- package/src/types/platform.ts +194 -194
- package/src/utils/login/loginVerify.ts +317 -317
- package/src/utils/map/track.ts +294 -0
- package/src/utils/map/trackUtils.ts +107 -0
- package/src/utils/platform-auth.ts +150 -150
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/views/component/XCellListView/index.vue +101 -101
- package/src/views/component/XFormGroupView/index.vue +11 -7
- package/src/views/component/XFormView/index.vue +20 -18
- package/src/views/component/XOlMapView/index.vue +10 -0
- package/src/views/external/index.vue +158 -158
- package/src/views/loading/AuthLoading.vue +406 -406
- package/src/views/user/register/index.vue +995 -995
- package/vite.config.ts +121 -121
- package/certs/127.0.0.1+2-key.pem +0 -28
- package/certs/127.0.0.1+2.pem +0 -27
- package/mock/modules/prose.mock.ts.timestamp-1758877157774.mjs +0 -53
- package/mock/modules/user.mock.ts.timestamp-1758877157774.mjs +0 -97
package/.env
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
VITE_APP_PUBLIC_PATH=/vue-client-app
|
|
2
|
-
VITE_APP_PREVIEW=true
|
|
3
|
-
VITE_APP_API_BASE_URL=/api
|
|
4
|
-
VITE_APP_OUT_DIR=dist_af-library-mobile-web
|
|
5
|
-
VITE_APP_VCONSOLE=false
|
|
6
|
-
# 自定义参数
|
|
7
|
-
VITE_APP_WEB_CONFIG_KEY=admin.webconfig
|
|
8
|
-
VITE_APP_SYSTEM_NAME=af-system
|
|
9
|
-
# 最低兼容性 V4(最新产品)V3(V3产品) OA(公司OA)
|
|
10
|
-
VITE_APP_COMPATIBLE=V4
|
|
11
|
-
VITE_RSA_PRIVATE_KEY=MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIRrmftLDHCQqREEJ132Onu+W3vmFbdF7QD751SrcDDGDTfzuz1zBuElvkHhuDBb7KZkXrCIe+MhvX2IvxcLObl3faX+evYlnfj2HRbF0hIpQLuIq22tL06ZcV5w7wqLxUZRpFElIFm8gZTkUvfKXVuHw89e4daDVhU5hK3GHNGTAgMBAAECgYABiINrFaE1E8pkBYx1JJA5yuhL73aUktfd2TeCU00vFg6kyrWCI85Sa2RKu/6CJNZWeOFgdubEUv7a22tRrNIZb3yUMaqtTwSso78mspIOJqjWXTkTH9WPElfTcdpdIse/lgZtPz6egxkuhadSvwrM9Y6NgusiW/5+x95Ct08iOQJBAN5aK+7uISURvGQj2EaRtgGEd8+d4oHl+BYvvTeG3qSgUikHQW3j0sp4gXPw2kxw6sjVgLFOc4FB6LGqwzOTzokCQQCYdYG8ty3Uo/ebUlNzeJFxHXjy/KvBSytAUzAXkRu3nZrkEaPQsi3dgOkZgk+F1fMDzfQ4EbDIU6xvqOoZXHg7AkATCW9XfoXR8anKfRMoP5Nwn9HOMbtR2cmaxK2TknV/bMZ8AsYETYwfj5+tuIJIJybC2RyykX/sIiN1CqS5xr7ZAkArj19rMRdaKyMi8MnBM1Cy9g3Jt2HHj5ejAGG8SgyWUOShh1y70z0BjcSMMkxQXAncK2s83ekZw7aADM4eQupjAkARRgTwwMOnn3IoKmQusKhZk0uxilZ4Zc2LH6Z4GiWnvteM0W8Zw4Z1lJUcjgQq3dGqL2RdmzeQZ+HgPIOXrZVK
|
|
1
|
+
VITE_APP_PUBLIC_PATH=/vue-client-app
|
|
2
|
+
VITE_APP_PREVIEW=true
|
|
3
|
+
VITE_APP_API_BASE_URL=/api
|
|
4
|
+
VITE_APP_OUT_DIR=dist_af-library-mobile-web
|
|
5
|
+
VITE_APP_VCONSOLE=false
|
|
6
|
+
# 自定义参数
|
|
7
|
+
VITE_APP_WEB_CONFIG_KEY=admin.webconfig
|
|
8
|
+
VITE_APP_SYSTEM_NAME=af-system
|
|
9
|
+
# 最低兼容性 V4(最新产品)V3(V3产品) OA(公司OA)
|
|
10
|
+
VITE_APP_COMPATIBLE=V4
|
|
11
|
+
VITE_RSA_PRIVATE_KEY=MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIRrmftLDHCQqREEJ132Onu+W3vmFbdF7QD751SrcDDGDTfzuz1zBuElvkHhuDBb7KZkXrCIe+MhvX2IvxcLObl3faX+evYlnfj2HRbF0hIpQLuIq22tL06ZcV5w7wqLxUZRpFElIFm8gZTkUvfKXVuHw89e4daDVhU5hK3GHNGTAgMBAAECgYABiINrFaE1E8pkBYx1JJA5yuhL73aUktfd2TeCU00vFg6kyrWCI85Sa2RKu/6CJNZWeOFgdubEUv7a22tRrNIZb3yUMaqtTwSso78mspIOJqjWXTkTH9WPElfTcdpdIse/lgZtPz6egxkuhadSvwrM9Y6NgusiW/5+x95Ct08iOQJBAN5aK+7uISURvGQj2EaRtgGEd8+d4oHl+BYvvTeG3qSgUikHQW3j0sp4gXPw2kxw6sjVgLFOc4FB6LGqwzOTzokCQQCYdYG8ty3Uo/ebUlNzeJFxHXjy/KvBSytAUzAXkRu3nZrkEaPQsi3dgOkZgk+F1fMDzfQ4EbDIU6xvqOoZXHg7AkATCW9XfoXR8anKfRMoP5Nwn9HOMbtR2cmaxK2TknV/bMZ8AsYETYwfj5+tuIJIJybC2RyykX/sIiN1CqS5xr7ZAkArj19rMRdaKyMi8MnBM1Cy9g3Jt2HHj5ejAGG8SgyWUOShh1y70z0BjcSMMkxQXAncK2s83ekZw7aADM4eQupjAkARRgTwwMOnn3IoKmQusKhZk0uxilZ4Zc2LH6Z4GiWnvteM0W8Zw4Z1lJUcjgQq3dGqL2RdmzeQZ+HgPIOXrZVK
|
package/package.json
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "af-mobile-client-vue3",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "1.5.
|
|
5
|
-
"packageManager": "pnpm@10.13.1",
|
|
6
|
-
"description": "Vue + Vite component lib",
|
|
7
|
-
"engines": {
|
|
8
|
-
"node": ">=20.19.0"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
|
12
|
-
"compress": "node ./compress.js",
|
|
13
|
-
"build:dev": "vue-tsc --noEmit && vite build --mode development && pnpm run compress",
|
|
14
|
-
"build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
|
|
15
|
-
"preview": "vite preview",
|
|
16
|
-
"lint": "eslint .",
|
|
17
|
-
"lint:fix": "eslint . --fix",
|
|
18
|
-
"release": "bumpp --commit --push --tag",
|
|
19
|
-
"typecheck": "vue-tsc --noEmit",
|
|
20
|
-
"commitlint": "commitlint --edit",
|
|
21
|
-
"prepare": "simple-git-hooks"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@iconify/vue": "4.3.0",
|
|
25
|
-
"@matechat/core": "^1.11.1",
|
|
26
|
-
"@micro-zoe/micro-app": "1.0.0-rc.26",
|
|
27
|
-
"@unhead/vue": "2.0.12",
|
|
28
|
-
"@vant/area-data": "^2.0.0",
|
|
29
|
-
"@vant/touch-emulator": "^1.4.0",
|
|
30
|
-
"@vant/use": "^1.6.0",
|
|
31
|
-
"@vueuse/core": "^13.5.0",
|
|
32
|
-
"mermaid": "11.12.2",
|
|
33
|
-
"axios": "^1.10.0",
|
|
34
|
-
"bcryptjs": "^2.4.3",
|
|
35
|
-
"crypto-js": "^4.2.0",
|
|
36
|
-
"moment": "^2.21.0",
|
|
37
|
-
"dayjs": "^1.11.13",
|
|
38
|
-
"echarts": "^5.6.0",
|
|
39
|
-
"jsencrypt": "^3.3.2",
|
|
40
|
-
"lodash-es": "^4.17.21",
|
|
41
|
-
"nprogress": "^0.2.0",
|
|
42
|
-
"ol": "^10.5.0",
|
|
43
|
-
"pinia": "^3.0.3",
|
|
44
|
-
"pinia-plugin-persistedstate": "^4.4.1",
|
|
45
|
-
"resize-detector": "^0.3.0",
|
|
46
|
-
"vant": "^4.9.21",
|
|
47
|
-
"vconsole": "^3.15.1",
|
|
48
|
-
"vue": "^3.5.17",
|
|
49
|
-
"vue-i18n": "^11.1.10",
|
|
50
|
-
"vue-router": "^4.5.1",
|
|
51
|
-
"vue3-hash-calendar": "^1.1.3",
|
|
52
|
-
"weixin-js-sdk": "^1.6.5",
|
|
53
|
-
"js-base64": "^3.7.8"
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@antfu/eslint-config": "4.17.0",
|
|
57
|
-
"@commitlint/cli": "^19.8.1",
|
|
58
|
-
"@commitlint/config-conventional": "^19.8.1",
|
|
59
|
-
"@commitlint/types": "^19.8.1",
|
|
60
|
-
"@iconify/json": "2.2.318",
|
|
61
|
-
"@iconify/utils": "^2.3.0",
|
|
62
|
-
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
63
|
-
"@types/crypto-js": "^4.2.2",
|
|
64
|
-
"@types/lodash-es": "^4.17.12",
|
|
65
|
-
"@types/node": "^24.0.14",
|
|
66
|
-
"@types/nprogress": "^0.2.3",
|
|
67
|
-
"@unocss/eslint-config": "66.3.3",
|
|
68
|
-
"@vitejs/plugin-legacy": "^7.0.1",
|
|
69
|
-
"@vitejs/plugin-vue": "^6.0.0",
|
|
70
|
-
"autoprefixer": "^10.4.21",
|
|
71
|
-
"bumpp": "^10.2.0",
|
|
72
|
-
"consola": "^3.4.2",
|
|
73
|
-
"cross-env": "^7.0.3",
|
|
74
|
-
"eslint": "^9.31.0",
|
|
75
|
-
"eslint-plugin-format": "^1.0.1",
|
|
76
|
-
"less": "^4.4.0",
|
|
77
|
-
"lint-staged": "^16.1.2",
|
|
78
|
-
"mockjs": "^1.1.0",
|
|
79
|
-
"postcss-mobile-forever": "^5.0.0",
|
|
80
|
-
"rollup": "^4.45.1",
|
|
81
|
-
"simple-git-hooks": "^2.13.0",
|
|
82
|
-
"tar": "^7.4.3",
|
|
83
|
-
"terser": "^5.43.1",
|
|
84
|
-
"typescript": "^5.8.3",
|
|
85
|
-
"unocss": "66.3.3",
|
|
86
|
-
"vite": "^7.0.5",
|
|
87
|
-
"vite-plugin-compression": "^0.5.1",
|
|
88
|
-
"vite-plugin-mock-dev-server": "^1.9.1",
|
|
89
|
-
"vite-plugin-pwa": "^1.0.1",
|
|
90
|
-
"vite-plugin-sitemap": "^0.8.2",
|
|
91
|
-
"vite-plugin-vconsole": "^2.1.1",
|
|
92
|
-
"vite-plugin-vue-devtools": "^7.7.7",
|
|
93
|
-
"vue-tsc": "^3.0.2"
|
|
94
|
-
},
|
|
95
|
-
"pnpm": {
|
|
96
|
-
"allowedDeprecatedVersions": {
|
|
97
|
-
"glob": "7.2.3",
|
|
98
|
-
"inflight": "1.0.6",
|
|
99
|
-
"sourcemap-codec": "1.4.8"
|
|
100
|
-
},
|
|
101
|
-
"peerDependencyRules": {
|
|
102
|
-
"allowedVersions": {}
|
|
103
|
-
},
|
|
104
|
-
"onlyBuiltDependencies": [
|
|
105
|
-
"core-js",
|
|
106
|
-
"esbuild",
|
|
107
|
-
"simple-git-hooks",
|
|
108
|
-
"unrs-resolver"
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
"resolutions": {
|
|
112
|
-
"vite": "^7.0.5"
|
|
113
|
-
},
|
|
114
|
-
"simple-git-hooks": {
|
|
115
|
-
"pre-commit": "pnpm lint-staged",
|
|
116
|
-
"commit-msg": "pnpm commitlint $1"
|
|
117
|
-
},
|
|
118
|
-
"lint-staged": {
|
|
119
|
-
"*": "eslint --fix"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "af-mobile-client-vue3",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.5.70",
|
|
5
|
+
"packageManager": "pnpm@10.13.1",
|
|
6
|
+
"description": "Vue + Vite component lib",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20.19.0"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
|
12
|
+
"compress": "node ./compress.js",
|
|
13
|
+
"build:dev": "vue-tsc --noEmit && vite build --mode development && pnpm run compress",
|
|
14
|
+
"build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
|
|
15
|
+
"preview": "vite preview",
|
|
16
|
+
"lint": "eslint .",
|
|
17
|
+
"lint:fix": "eslint . --fix",
|
|
18
|
+
"release": "bumpp --commit --push --tag",
|
|
19
|
+
"typecheck": "vue-tsc --noEmit",
|
|
20
|
+
"commitlint": "commitlint --edit",
|
|
21
|
+
"prepare": "simple-git-hooks"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@iconify/vue": "4.3.0",
|
|
25
|
+
"@matechat/core": "^1.11.1",
|
|
26
|
+
"@micro-zoe/micro-app": "1.0.0-rc.26",
|
|
27
|
+
"@unhead/vue": "2.0.12",
|
|
28
|
+
"@vant/area-data": "^2.0.0",
|
|
29
|
+
"@vant/touch-emulator": "^1.4.0",
|
|
30
|
+
"@vant/use": "^1.6.0",
|
|
31
|
+
"@vueuse/core": "^13.5.0",
|
|
32
|
+
"mermaid": "11.12.2",
|
|
33
|
+
"axios": "^1.10.0",
|
|
34
|
+
"bcryptjs": "^2.4.3",
|
|
35
|
+
"crypto-js": "^4.2.0",
|
|
36
|
+
"moment": "^2.21.0",
|
|
37
|
+
"dayjs": "^1.11.13",
|
|
38
|
+
"echarts": "^5.6.0",
|
|
39
|
+
"jsencrypt": "^3.3.2",
|
|
40
|
+
"lodash-es": "^4.17.21",
|
|
41
|
+
"nprogress": "^0.2.0",
|
|
42
|
+
"ol": "^10.5.0",
|
|
43
|
+
"pinia": "^3.0.3",
|
|
44
|
+
"pinia-plugin-persistedstate": "^4.4.1",
|
|
45
|
+
"resize-detector": "^0.3.0",
|
|
46
|
+
"vant": "^4.9.21",
|
|
47
|
+
"vconsole": "^3.15.1",
|
|
48
|
+
"vue": "^3.5.17",
|
|
49
|
+
"vue-i18n": "^11.1.10",
|
|
50
|
+
"vue-router": "^4.5.1",
|
|
51
|
+
"vue3-hash-calendar": "^1.1.3",
|
|
52
|
+
"weixin-js-sdk": "^1.6.5",
|
|
53
|
+
"js-base64": "^3.7.8"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@antfu/eslint-config": "4.17.0",
|
|
57
|
+
"@commitlint/cli": "^19.8.1",
|
|
58
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
59
|
+
"@commitlint/types": "^19.8.1",
|
|
60
|
+
"@iconify/json": "2.2.318",
|
|
61
|
+
"@iconify/utils": "^2.3.0",
|
|
62
|
+
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
63
|
+
"@types/crypto-js": "^4.2.2",
|
|
64
|
+
"@types/lodash-es": "^4.17.12",
|
|
65
|
+
"@types/node": "^24.0.14",
|
|
66
|
+
"@types/nprogress": "^0.2.3",
|
|
67
|
+
"@unocss/eslint-config": "66.3.3",
|
|
68
|
+
"@vitejs/plugin-legacy": "^7.0.1",
|
|
69
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
70
|
+
"autoprefixer": "^10.4.21",
|
|
71
|
+
"bumpp": "^10.2.0",
|
|
72
|
+
"consola": "^3.4.2",
|
|
73
|
+
"cross-env": "^7.0.3",
|
|
74
|
+
"eslint": "^9.31.0",
|
|
75
|
+
"eslint-plugin-format": "^1.0.1",
|
|
76
|
+
"less": "^4.4.0",
|
|
77
|
+
"lint-staged": "^16.1.2",
|
|
78
|
+
"mockjs": "^1.1.0",
|
|
79
|
+
"postcss-mobile-forever": "^5.0.0",
|
|
80
|
+
"rollup": "^4.45.1",
|
|
81
|
+
"simple-git-hooks": "^2.13.0",
|
|
82
|
+
"tar": "^7.4.3",
|
|
83
|
+
"terser": "^5.43.1",
|
|
84
|
+
"typescript": "^5.8.3",
|
|
85
|
+
"unocss": "66.3.3",
|
|
86
|
+
"vite": "^7.0.5",
|
|
87
|
+
"vite-plugin-compression": "^0.5.1",
|
|
88
|
+
"vite-plugin-mock-dev-server": "^1.9.1",
|
|
89
|
+
"vite-plugin-pwa": "^1.0.1",
|
|
90
|
+
"vite-plugin-sitemap": "^0.8.2",
|
|
91
|
+
"vite-plugin-vconsole": "^2.1.1",
|
|
92
|
+
"vite-plugin-vue-devtools": "^7.7.7",
|
|
93
|
+
"vue-tsc": "^3.0.2"
|
|
94
|
+
},
|
|
95
|
+
"pnpm": {
|
|
96
|
+
"allowedDeprecatedVersions": {
|
|
97
|
+
"glob": "7.2.3",
|
|
98
|
+
"inflight": "1.0.6",
|
|
99
|
+
"sourcemap-codec": "1.4.8"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencyRules": {
|
|
102
|
+
"allowedVersions": {}
|
|
103
|
+
},
|
|
104
|
+
"onlyBuiltDependencies": [
|
|
105
|
+
"core-js",
|
|
106
|
+
"esbuild",
|
|
107
|
+
"simple-git-hooks",
|
|
108
|
+
"unrs-resolver"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"resolutions": {
|
|
112
|
+
"vite": "^7.0.5"
|
|
113
|
+
},
|
|
114
|
+
"simple-git-hooks": {
|
|
115
|
+
"pre-commit": "pnpm lint-staged",
|
|
116
|
+
"commit-msg": "pnpm commitlint $1"
|
|
117
|
+
},
|
|
118
|
+
"lint-staged": {
|
|
119
|
+
"*": "eslint --fix"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { getConfigByNameAsync } from '@af-mobile-client-vue3/services/api/common'
|
|
2
|
+
import { post } from '@af-mobile-client-vue3/services/restTools'
|
|
3
|
+
import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
|
|
4
|
+
import { trajectoryThinning } from '@af-mobile-client-vue3/utils/map/track'
|
|
5
|
+
import { trajectoryGrouping } from '@af-mobile-client-vue3/utils/map/trackUtils'
|
|
6
|
+
import dayjs from 'dayjs/esm/index'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* trajectoryThinning 是否抽稀 默认 false
|
|
10
|
+
* trajectoryCorrection 是否高德纠偏 默认 false
|
|
11
|
+
* group 是否分组 默认 false 要进行高德纠偏必须分组
|
|
12
|
+
* AMAP_KEY 高德key 用来纠偏
|
|
13
|
+
* gapMs 分组时间间隔 毫秒 默认 30分钟
|
|
14
|
+
* rdpEpsilon RDP 精度(度) 默认 0.000001
|
|
15
|
+
* dbscanEpsilon DBSCAN聚类半径(km) 默认 0.01
|
|
16
|
+
* minPuts DBSCAN聚类 最小开始聚类点数 默认 20
|
|
17
|
+
* minDistance 分组数据进行高德纠偏起始纠偏数 默认 20 不能低于20 否则就会纠偏失败,失败也算次数
|
|
18
|
+
*/
|
|
19
|
+
export interface TrajectoryParams {
|
|
20
|
+
trajectoryThinning?: boolean
|
|
21
|
+
trajectoryCorrection?: boolean
|
|
22
|
+
group?: boolean
|
|
23
|
+
AMAP_KEY?: string
|
|
24
|
+
gapMs?: number
|
|
25
|
+
rdpEpsilon?: number
|
|
26
|
+
dbscanEpsilon?: number
|
|
27
|
+
minPuts?: number
|
|
28
|
+
minDistance?: number
|
|
29
|
+
orderTime?: string
|
|
30
|
+
serviceName?: string
|
|
31
|
+
}
|
|
32
|
+
export const defaultTrajectoryParams: Required<TrajectoryParams> = {
|
|
33
|
+
trajectoryThinning: false,
|
|
34
|
+
trajectoryCorrection: false,
|
|
35
|
+
group: false,
|
|
36
|
+
AMAP_KEY: '',
|
|
37
|
+
gapMs: 1800000,
|
|
38
|
+
rdpEpsilon: 0.000001,
|
|
39
|
+
dbscanEpsilon: 0.01,
|
|
40
|
+
minPuts: 20,
|
|
41
|
+
minDistance: 20,
|
|
42
|
+
orderTime: 'f_realtime asc',
|
|
43
|
+
serviceName: 'af-linepatrol',
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @param userId 查询的用户id
|
|
48
|
+
* @param dateStr 查询的轨迹日期
|
|
49
|
+
* @param trajectoryParams 后台轨迹纠偏参数
|
|
50
|
+
*/
|
|
51
|
+
export async function getDeviceState(
|
|
52
|
+
userId: string = useUserStore().getLogin().id,
|
|
53
|
+
dateStr: string = dayjs().format('YYYY-MM-DD'),
|
|
54
|
+
trajectoryParams: TrajectoryParams = defaultTrajectoryParams,
|
|
55
|
+
) {
|
|
56
|
+
const condition = `1 = 1 and f_user_id = ${userId} and (f_realtime between '${dateStr} 00:00:00' and '${dateStr} 23:59:59'`
|
|
57
|
+
const param = {
|
|
58
|
+
condition,
|
|
59
|
+
dateStr,
|
|
60
|
+
userId,
|
|
61
|
+
...trajectoryParams,
|
|
62
|
+
}
|
|
63
|
+
// 获取轨迹
|
|
64
|
+
const trackPoint = await post(`/api/${trajectoryParams.serviceName}/logic/getDeviceStateLogic`, param)
|
|
65
|
+
// 轨迹数据未处理,需要对原始数据进行 处理
|
|
66
|
+
if (trackPoint.state === 'error') {
|
|
67
|
+
// 轨迹抽稀
|
|
68
|
+
if (trackPoint.points.length >= 30) {
|
|
69
|
+
// 轨迹抽稀
|
|
70
|
+
let path = trajectoryThinning(trackPoint.points)
|
|
71
|
+
// 存储 path 数据供表格使用
|
|
72
|
+
const webConfig = await getConfigByNameAsync('webConfig')
|
|
73
|
+
if (webConfig?.setting?.lesseeName === 'jinbin') {
|
|
74
|
+
path = path.filter(item => item.sp !== '0.0')
|
|
75
|
+
}
|
|
76
|
+
// 轨迹分组
|
|
77
|
+
const trajectoryGroupingResult = trajectoryGrouping(path, {})
|
|
78
|
+
console.warn('>>>> trajectoryGroupingResult', trajectoryGroupingResult)
|
|
79
|
+
return trajectoryGroupingResult
|
|
80
|
+
|
|
81
|
+
// const graspRoadCorrectRes = await graspRoadCorrect(trajectoryGroupingResult)
|
|
82
|
+
// console.warn('>>>> graspRoadCorrect', graspRoadCorrectRes)
|
|
83
|
+
// console.warn('>>>> graspRoadCorrect', graspRoadCorrectRes.value)
|
|
84
|
+
// 返回数据
|
|
85
|
+
// return JSON.parse(graspRoadCorrectRes.value)
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
console.warn('当日使用app时间较短或行程较少,不足够生成轨迹')
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (trackPoint.state === 'success') {
|
|
92
|
+
return trackPoint.points
|
|
93
|
+
}
|
|
94
|
+
}
|
package/src/api/user/index.ts
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { loginApi } from '@af-mobile-client-vue3/services/api/Login'
|
|
2
|
-
|
|
3
|
-
import { get, post } from '@af-mobile-client-vue3/services/restTools'
|
|
4
|
-
import { http } from '@af-mobile-client-vue3/utils/http'
|
|
5
|
-
|
|
6
|
-
export interface BasicResponseModel<T = any> {
|
|
7
|
-
code: number
|
|
8
|
-
msg: string
|
|
9
|
-
data: T
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function login(data: any) {
|
|
13
|
-
return post(
|
|
14
|
-
loginApi.Login,
|
|
15
|
-
data,
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function OALogin(data: any) {
|
|
20
|
-
return get(`/af-system/user/${data.username}/${data.password}/智慧OA`)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @description: 获取用户信息
|
|
25
|
-
*/
|
|
26
|
-
export function getUserInfo(data: any) {
|
|
27
|
-
const params = {
|
|
28
|
-
resourceName: data.resourceName,
|
|
29
|
-
isMobile: true,
|
|
30
|
-
}
|
|
31
|
-
return get(
|
|
32
|
-
`/af-system/user/info/${data.username}`,
|
|
33
|
-
params,
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @description: 获取微信用户信息
|
|
38
|
-
*/
|
|
39
|
-
export function getPlatformUser(params: { platformUserId?: string, tenantName?: string }) {
|
|
40
|
-
return post(`/af-system/user/getPlatformUserInfo`, params)
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* @description: 用户登出
|
|
44
|
-
*/
|
|
45
|
-
export function doLogout() {
|
|
46
|
-
return http.request({
|
|
47
|
-
url: loginApi.Logout,
|
|
48
|
-
method: 'DELETE',
|
|
49
|
-
})
|
|
50
|
-
}
|
|
1
|
+
import { loginApi } from '@af-mobile-client-vue3/services/api/Login'
|
|
2
|
+
|
|
3
|
+
import { get, post } from '@af-mobile-client-vue3/services/restTools'
|
|
4
|
+
import { http } from '@af-mobile-client-vue3/utils/http'
|
|
5
|
+
|
|
6
|
+
export interface BasicResponseModel<T = any> {
|
|
7
|
+
code: number
|
|
8
|
+
msg: string
|
|
9
|
+
data: T
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function login(data: any) {
|
|
13
|
+
return post(
|
|
14
|
+
loginApi.Login,
|
|
15
|
+
data,
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function OALogin(data: any) {
|
|
20
|
+
return get(`/af-system/user/${data.username}/${data.password}/智慧OA`)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @description: 获取用户信息
|
|
25
|
+
*/
|
|
26
|
+
export function getUserInfo(data: any) {
|
|
27
|
+
const params = {
|
|
28
|
+
resourceName: data.resourceName,
|
|
29
|
+
isMobile: true,
|
|
30
|
+
}
|
|
31
|
+
return get(
|
|
32
|
+
`/af-system/user/info/${data.username}`,
|
|
33
|
+
params,
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @description: 获取微信用户信息
|
|
38
|
+
*/
|
|
39
|
+
export function getPlatformUser(params: { platformUserId?: string, tenantName?: string }) {
|
|
40
|
+
return post(`/af-system/user/getPlatformUserInfo`, params)
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @description: 用户登出
|
|
44
|
+
*/
|
|
45
|
+
export function doLogout() {
|
|
46
|
+
return http.request({
|
|
47
|
+
url: loginApi.Logout,
|
|
48
|
+
method: 'DELETE',
|
|
49
|
+
})
|
|
50
|
+
}
|
|
Binary file
|
|
Binary file
|