af-mobile-client-vue3 1.2.13 → 1.2.15
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/certs/127.0.0.1+2-key.pem +28 -0
- package/certs/127.0.0.1+2.pem +27 -0
- package/package.json +113 -113
- package/src/api/user/index.ts +40 -40
- package/src/components/data/XCellList/index.vue +1000 -1000
- package/src/components/data/XForm/index.vue +138 -12
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/services/api/Login.ts +6 -6
- package/src/stores/modules/setting.ts +62 -58
- package/src/stores/modules/user.ts +235 -231
- package/src/styles/login.less +112 -95
- package/src/views/component/XCellListView/index.vue +91 -37
- package/src/views/user/login/LoginForm.vue +308 -250
- package/vite.config.ts +118 -108
package/vite.config.ts
CHANGED
|
@@ -1,108 +1,118 @@
|
|
|
1
|
-
import type { ConfigEnv, UserConfig } from 'vite'
|
|
2
|
-
import path from 'node:path'
|
|
3
|
-
import process from 'node:process'
|
|
4
|
-
import { loadEnv } from 'vite'
|
|
5
|
-
import { createVitePlugins } from './build/vite'
|
|
6
|
-
import { exclude, include } from './build/vite/optimize'
|
|
7
|
-
|
|
8
|
-
export default ({ mode }: ConfigEnv): UserConfig => {
|
|
9
|
-
const root = process.cwd()
|
|
10
|
-
const env = loadEnv(mode, root)
|
|
11
|
-
|
|
12
|
-
const appProxys = {}
|
|
13
|
-
|
|
14
|
-
const v4Server = 'http://
|
|
15
|
-
const v3Server = '
|
|
16
|
-
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
17
|
-
const geoserver = 'http://39.104.49.8:30372'
|
|
18
|
-
// const OSSServerProd = 'http://192.168.50.67:31351'
|
|
19
|
-
|
|
20
|
-
return {
|
|
21
|
-
base: env.VITE_APP_PUBLIC_PATH,
|
|
22
|
-
plugins: createVitePlugins(mode),
|
|
23
|
-
|
|
24
|
-
server: {
|
|
25
|
-
host: true,
|
|
26
|
-
port: 7190,
|
|
27
|
-
|
|
28
|
-
'
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
changeOrigin: true,
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
'/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
1
|
+
import type { ConfigEnv, UserConfig } from 'vite'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import process from 'node:process'
|
|
4
|
+
import { loadEnv } from 'vite'
|
|
5
|
+
import { createVitePlugins } from './build/vite'
|
|
6
|
+
import { exclude, include } from './build/vite/optimize'
|
|
7
|
+
|
|
8
|
+
export default ({ mode }: ConfigEnv): UserConfig => {
|
|
9
|
+
const root = process.cwd()
|
|
10
|
+
const env = loadEnv(mode, root)
|
|
11
|
+
|
|
12
|
+
const appProxys = {}
|
|
13
|
+
|
|
14
|
+
const v4Server = 'http://aote-office.8866.org:31567'
|
|
15
|
+
const v3Server = 'http://aote-office.8866.org:31567'
|
|
16
|
+
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
17
|
+
const geoserver = 'http://39.104.49.8:30372'
|
|
18
|
+
// const OSSServerProd = 'http://192.168.50.67:31351'
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
base: env.VITE_APP_PUBLIC_PATH,
|
|
22
|
+
plugins: createVitePlugins(mode),
|
|
23
|
+
|
|
24
|
+
server: {
|
|
25
|
+
host: true,
|
|
26
|
+
port: 7190,
|
|
27
|
+
allowedHosts: [
|
|
28
|
+
'www.aofengcloud.com',
|
|
29
|
+
'.aofengcloud.com'
|
|
30
|
+
],
|
|
31
|
+
proxy: Object.assign({
|
|
32
|
+
'/api/af-system/resource': {
|
|
33
|
+
target: v4Server,
|
|
34
|
+
ws: false,
|
|
35
|
+
changeOrigin: true,
|
|
36
|
+
},
|
|
37
|
+
'/api/af-system/user': {
|
|
38
|
+
target: 'http://127.0.0.1:9002/',
|
|
39
|
+
rewrite: (path: string) => path.replace(/^\/api\/af-system\//, '/'),
|
|
40
|
+
ws: false,
|
|
41
|
+
changeOrigin: true
|
|
42
|
+
},
|
|
43
|
+
'/api/invoice': {
|
|
44
|
+
target: 'http://219.153.176.6:8400/',
|
|
45
|
+
rewrite: (path: string) => path.replace(/^\/api\//, '/'),
|
|
46
|
+
ws: false,
|
|
47
|
+
changeOrigin: true,
|
|
48
|
+
},
|
|
49
|
+
'/api/af-system/entity/t_files': {
|
|
50
|
+
target: v3Server,
|
|
51
|
+
ws: false,
|
|
52
|
+
changeOrigin: true,
|
|
53
|
+
},
|
|
54
|
+
'/resource': {
|
|
55
|
+
// pathRewrite: { '^/resource': '/' },
|
|
56
|
+
target: v4Server,
|
|
57
|
+
changeOrigin: true,
|
|
58
|
+
},
|
|
59
|
+
// '/api/af-auth/login': {
|
|
60
|
+
// target: 'http://127.0.0.1:9200/',
|
|
61
|
+
// rewrite: (path: string) => path.replace(/^\/api\/af-auth\//, '/'),
|
|
62
|
+
// ws: false,
|
|
63
|
+
// changeOrigin: true,
|
|
64
|
+
// },
|
|
65
|
+
// geoserver 转发
|
|
66
|
+
'/linepatrol/geoserver': {
|
|
67
|
+
target: geoserver,
|
|
68
|
+
changeOrigin: true,
|
|
69
|
+
rewrite: path => path.replace(/^\/linepatrol\/geoserver/, '/geoserver'),
|
|
70
|
+
},
|
|
71
|
+
'/api': {
|
|
72
|
+
// v3用
|
|
73
|
+
// rewrite: (path: string) => path.replace(/^\/api\/af-system\//, '/rs/'),
|
|
74
|
+
target: v4Server,
|
|
75
|
+
ws: false,
|
|
76
|
+
changeOrigin: true,
|
|
77
|
+
},
|
|
78
|
+
'/oss': {
|
|
79
|
+
target: OSSServerDev,
|
|
80
|
+
rewrite: (path: string) => path.replace(/^\/oss\//, '/'),
|
|
81
|
+
changeOrigin: true,
|
|
82
|
+
},
|
|
83
|
+
}, appProxys),
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
resolve: {
|
|
87
|
+
alias: {
|
|
88
|
+
'@': path.join(__dirname, './src'),
|
|
89
|
+
'~': path.join(__dirname, './src/assets'),
|
|
90
|
+
'~root': path.join(__dirname, '.'),
|
|
91
|
+
'@af-mobile-client-vue3': path.join(__dirname, './src'),
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
build: {
|
|
96
|
+
cssCodeSplit: false,
|
|
97
|
+
chunkSizeWarningLimit: 2048,
|
|
98
|
+
outDir: env.VITE_APP_OUT_DIR || 'dist',
|
|
99
|
+
rollupOptions: {
|
|
100
|
+
output: {
|
|
101
|
+
// 打包时分割资源
|
|
102
|
+
chunkFileNames: 'static/js/[name]-[hash].js',
|
|
103
|
+
entryFileNames: 'static/js/[name]-[hash].js',
|
|
104
|
+
assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
|
|
105
|
+
manualChunks(id) {
|
|
106
|
+
if (id.includes('node_modules'))
|
|
107
|
+
return 'third' // 代码分割为第三方包
|
|
108
|
+
|
|
109
|
+
if (id.includes('views'))
|
|
110
|
+
return 'views' // 代码分割为业务视图
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
optimizeDeps: { include, exclude },
|
|
117
|
+
}
|
|
118
|
+
}
|