af-mobile-client-vue3 1.0.98 → 1.1.2
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/mock/modules/demo.mock.ts +20 -0
- package/package.json +1 -1
- package/src/components/data/XOlMap/README.md +220 -0
- package/src/components/data/XOlMap/demo.vue +179 -58
- package/src/components/data/XOlMap/index.vue +414 -140
- package/src/components/data/XOlMap/utils/wgs84ToGcj02.js +154 -0
- package/src/router/routes.ts +6 -0
- package/src/services/api/common.ts +1 -1
- package/src/services/api/search.ts +16 -0
- package/src/services/restTools.ts +13 -9
- package/src/utils/http/index.ts +5 -4
- package/src/views/component/XRequestView/index.vue +185 -0
- package/src/views/component/index.vue +13 -1
- package/src/views/user/login/LoginForm.vue +22 -5
- package/vite.config.ts +130 -123
package/vite.config.ts
CHANGED
|
@@ -1,123 +1,130 @@
|
|
|
1
|
-
import type { ConfigEnv, UserConfig } from 'vite'
|
|
2
|
-
import path from 'node:path'
|
|
3
|
-
import process from 'node:process'
|
|
4
|
-
import autoprefixer from 'autoprefixer'
|
|
5
|
-
import viewport from 'postcss-mobile-forever'
|
|
6
|
-
import { loadEnv } from 'vite'
|
|
7
|
-
import { createVitePlugins } from './build/vite'
|
|
8
|
-
|
|
9
|
-
// import fs from 'fs'
|
|
10
|
-
export default ({ mode }: ConfigEnv): UserConfig => {
|
|
11
|
-
const root = process.cwd()
|
|
12
|
-
const env = loadEnv(mode, root)
|
|
13
|
-
|
|
14
|
-
const appProxys = {}
|
|
15
|
-
|
|
16
|
-
const v4Server = 'http://aote-office.8866.org:31567'
|
|
17
|
-
const v3Server = 'http://aote-office.8866.org:31567'
|
|
18
|
-
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
target:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
'/
|
|
70
|
-
|
|
71
|
-
rewrite: (path: string) => path.replace(/^\/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
1
|
+
import type { ConfigEnv, UserConfig } from 'vite'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import process from 'node:process'
|
|
4
|
+
import autoprefixer from 'autoprefixer'
|
|
5
|
+
import viewport from 'postcss-mobile-forever'
|
|
6
|
+
import { loadEnv } from 'vite'
|
|
7
|
+
import { createVitePlugins } from './build/vite'
|
|
8
|
+
|
|
9
|
+
// import fs from 'fs'
|
|
10
|
+
export default ({ mode }: ConfigEnv): UserConfig => {
|
|
11
|
+
const root = process.cwd()
|
|
12
|
+
const env = loadEnv(mode, root)
|
|
13
|
+
|
|
14
|
+
const appProxys = {}
|
|
15
|
+
|
|
16
|
+
const v4Server = 'http://aote-office.8866.org:31567'
|
|
17
|
+
const v3Server = 'http://aote-office.8866.org:31567'
|
|
18
|
+
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
19
|
+
const geoserver = 'http://39.104.49.8:30372'
|
|
20
|
+
// const OSSServerProd = 'http://192.168.50.67:31351'
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
base: env.VITE_APP_PUBLIC_PATH,
|
|
24
|
+
plugins: [
|
|
25
|
+
createVitePlugins(),
|
|
26
|
+
],
|
|
27
|
+
|
|
28
|
+
server: {
|
|
29
|
+
host: true,
|
|
30
|
+
port: 7190,
|
|
31
|
+
// https: {
|
|
32
|
+
// key: fs.readFileSync('certs/127.0.0.1+2-key.pem'),
|
|
33
|
+
// cert: fs.readFileSync('certs/127.0.0.1+2.pem')
|
|
34
|
+
// },
|
|
35
|
+
proxy: Object.assign({
|
|
36
|
+
'/api/af-system/resource': {
|
|
37
|
+
target: v4Server,
|
|
38
|
+
ws: false,
|
|
39
|
+
changeOrigin: true,
|
|
40
|
+
},
|
|
41
|
+
'/api/invoice': {
|
|
42
|
+
target: 'http://219.153.176.6:8400/',
|
|
43
|
+
rewrite: (path: string) => path.replace(/^\/api\//, '/'),
|
|
44
|
+
ws: false,
|
|
45
|
+
changeOrigin: true,
|
|
46
|
+
},
|
|
47
|
+
'/api/af-system/entity/t_files': {
|
|
48
|
+
target: v3Server,
|
|
49
|
+
ws: false,
|
|
50
|
+
changeOrigin: true,
|
|
51
|
+
},
|
|
52
|
+
'/resource': {
|
|
53
|
+
// pathRewrite: { '^/resource': '/' },
|
|
54
|
+
target: v4Server,
|
|
55
|
+
changeOrigin: true,
|
|
56
|
+
},
|
|
57
|
+
// '/api/af-auth/login': {
|
|
58
|
+
// target: 'http://127.0.0.1:9200/',
|
|
59
|
+
// rewrite: (path: string) => path.replace(/^\/api\/af-auth\//, '/'),
|
|
60
|
+
// ws: false,
|
|
61
|
+
// changeOrigin: true,
|
|
62
|
+
// },
|
|
63
|
+
// geoserver 转发
|
|
64
|
+
'/linepatrol/geoserver': {
|
|
65
|
+
target: geoserver,
|
|
66
|
+
changeOrigin: true,
|
|
67
|
+
rewrite: path => path.replace(/^\/linepatrol\/geoserver/, '/geoserver'),
|
|
68
|
+
},
|
|
69
|
+
'/api': {
|
|
70
|
+
// v3用
|
|
71
|
+
// rewrite: (path: string) => path.replace(/^\/api\/af-system\//, '/rs/'),
|
|
72
|
+
target: v4Server,
|
|
73
|
+
ws: false,
|
|
74
|
+
changeOrigin: true,
|
|
75
|
+
},
|
|
76
|
+
'/oss': {
|
|
77
|
+
target: OSSServerDev,
|
|
78
|
+
rewrite: (path: string) => path.replace(/^\/oss\//, '/'),
|
|
79
|
+
changeOrigin: true,
|
|
80
|
+
},
|
|
81
|
+
}, appProxys),
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
resolve: {
|
|
85
|
+
alias: {
|
|
86
|
+
'~@': path.join(__dirname, './src'),
|
|
87
|
+
'@': path.join(__dirname, './src'),
|
|
88
|
+
'~': path.join(__dirname, './src/assets'),
|
|
89
|
+
'@af-mobile-client-vue3': path.join(__dirname, './src'),
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
css: {
|
|
94
|
+
// postcss 官网:www.postcss.com.cn/
|
|
95
|
+
postcss: {
|
|
96
|
+
plugins: [
|
|
97
|
+
// 自动获取浏览器的流行度和能够支持的属性,并为 CSS 规则添加前缀
|
|
98
|
+
autoprefixer(),
|
|
99
|
+
viewport({
|
|
100
|
+
appSelector: '#system-app',
|
|
101
|
+
viewportWidth: 375,
|
|
102
|
+
maxDisplayWidth: 800,
|
|
103
|
+
appContainingBlock: 'auto',
|
|
104
|
+
necessarySelectorWhenAuto: '.app-wrapper',
|
|
105
|
+
rootContainingBlockSelectorList: ['van-tabbar', 'van-popup'],
|
|
106
|
+
}),
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
build: {
|
|
112
|
+
chunkSizeWarningLimit: 2048,
|
|
113
|
+
rollupOptions: {
|
|
114
|
+
output: {
|
|
115
|
+
// 打包时分割资源
|
|
116
|
+
chunkFileNames: 'static/js/[name]-[hash].js',
|
|
117
|
+
entryFileNames: 'static/js/[name]-[hash].js',
|
|
118
|
+
assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
|
|
119
|
+
manualChunks(id) {
|
|
120
|
+
if (id.includes('node_modules'))
|
|
121
|
+
return 'third' // 代码分割为第三方包
|
|
122
|
+
|
|
123
|
+
if (id.includes('views'))
|
|
124
|
+
return 'views' // 代码分割为业务视图
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
}
|