af-mobile-client-vue3 1.3.43 → 1.3.44

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.
@@ -5,19 +5,16 @@ import { showDialog } from 'vant'
5
5
  import { ref } from 'vue'
6
6
  import { useRoute } from 'vue-router'
7
7
 
8
- // const configName = ref('reviewFormGroup')
9
- // const serviceName = ref('af-revenue')
10
-
11
8
  // 纯表单
12
- // const configName = ref('form_check_test')
13
- // const serviceName = ref('af-system')
9
+ const configName = ref('form_check_test')
10
+ const serviceName = ref('af-system')
14
11
 
15
12
  // const configName = ref("计划下发Form")
16
13
  // const serviceName = ref("af-linepatrol")
17
14
 
18
15
  // 表单组
19
- const configName = ref('lngChargeAuditMobileFormGroup')
20
- const serviceName = ref('af-gaslink')
16
+ // const configName = ref('lngChargeAuditMobileFormGroup')
17
+ // const serviceName = ref('af-gaslink')
21
18
 
22
19
  const formData = ref({})
23
20
  const formGroup = ref(null)
@@ -25,8 +22,7 @@ const route = useRoute()
25
22
  const isInit = ref(false)
26
23
  function submit(_result) {
27
24
  showDialog({ message: '提交成功' }).then(() => {
28
- console.log('12121')
29
- // history.back()
25
+ history.back()
30
26
  })
31
27
  }
32
28
 
@@ -67,8 +63,8 @@ function submit(_result) {
67
63
  <!-- v-if="isInit" -->
68
64
  <XFormGroup
69
65
  ref="formGroup"
70
- config-name="ApplyAddContractFormGroup"
71
- service-name="af-apply"
66
+ :config-name="configName"
67
+ :service-name="serviceName"
72
68
  :group-form-data="formData"
73
69
  mode="新增"
74
70
  @submit="submit"
@@ -2,22 +2,11 @@
2
2
  import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
3
3
  import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
4
4
  import { ref } from 'vue'
5
- import {
6
- Button as VanButton,
7
- } from 'vant'
8
5
 
9
- const configName = ref('测试Form')
10
- const serviceName = ref('af-safecheck')
11
- const formGroupAddConstruction = ref()
6
+ const configName = ref('AddConstructionForm')
7
+ const serviceName = ref('af-linepatrol')
12
8
 
13
- // 提交测试
14
- function onSubmit(form) {
15
- console.log('事件触发提交表单----', form)
16
- }
17
- async function onAsyncSubmit() {
18
- const res = await formGroupAddConstruction.value.asyncSubmit()
19
- console.log('异步提交表单----', res)
20
- }
9
+ const formGroupAddConstruction = ref(null)
21
10
  </script>
22
11
 
23
12
  <template>
@@ -27,14 +16,10 @@ async function onAsyncSubmit() {
27
16
  ref="formGroupAddConstruction"
28
17
  mode="新增"
29
18
  :config-name="configName"
30
- :show-tab-header="false"
31
- service-name="af-safecheck"
32
- :is-group-form="true"
33
- @on-submit="onSubmit"
19
+ :service-name="serviceName"
34
20
  />
35
21
  </template>
36
22
  </NormalDataLayout>
37
- <van-button type="primary" @click="onAsyncSubmit">提交</van-button>
38
23
  </template>
39
24
 
40
25
  <style scoped lang="less">
@@ -62,7 +62,7 @@ async function handleExternalLogin(loginParams: any) {
62
62
  data = await userStore.loginExternal(Object.assign(loginParams, {
63
63
  isMobile: true,
64
64
  }))
65
- }
65
+ }
66
66
  else {
67
67
  data = await userStore.loginExternalMini(JSON.parse(loginParams.appData))
68
68
  }
@@ -313,7 +313,7 @@ async function submitRegistration(): Promise<void> {
313
313
  if (response.success) {
314
314
  showSuccess.value = true
315
315
  showSuccessToast('注册成功')
316
- }
316
+ }
317
317
  else {
318
318
  showSuccessToast(`注册失败,${response.msg}!`)
319
319
  }
package/vite.config.ts CHANGED
@@ -1,114 +1,114 @@
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://192.168.50.67:31567'
15
- const v3Server = 'http://192.168.50.67:31567'
16
- const OSSServerDev = 'http://192.168.50.67:30351'
17
- const geoserver = 'http://39.104.49.8:30372'
18
- const mockServer = 'http://127.0.0.1:8086'
19
- // const OSSServerProd = 'http://192.168.50.67:31351'
20
-
21
- return {
22
- base: env.VITE_APP_PUBLIC_PATH,
23
- plugins: createVitePlugins(mode),
24
-
25
- server: {
26
- host: true,
27
- port: 7190,
28
- allowedHosts: [
29
- 'www.aofengcloud.com',
30
- '.aofengcloud.com',
31
- ],
32
- proxy: Object.assign({
33
- '/api/af-system/user': {
34
- target: 'http://127.0.0.1:9002/',
35
- rewrite: (path: string) => path.replace(/^\/api\/af-system\//, '/'),
36
- ws: false,
37
- changeOrigin: true,
38
- },
39
- '/api/invoice': {
40
- target: 'http://219.153.176.6:8400/',
41
- rewrite: (path: string) => path.replace(/^\/api\//, '/'),
42
- ws: false,
43
- changeOrigin: true,
44
- },
45
- '/api/af-system/entity/t_files': {
46
- target: v3Server,
47
- ws: false,
48
- changeOrigin: true,
49
- },
50
- '/resource': {
51
- // pathRewrite: { '^/resource': '/' },
52
- target: v4Server,
53
- changeOrigin: true,
54
- },
55
- // '/api/af-auth/login': {
56
- // target: 'http://127.0.0.1:9200/',
57
- // rewrite: (path: string) => path.replace(/^\/api\/af-auth\//, '/'),
58
- // ws: false,
59
- // changeOrigin: true,
60
- // },
61
- // geoserver 转发
62
- '/linepatrol/geoserver': {
63
- target: geoserver,
64
- changeOrigin: true,
65
- rewrite: path => path.replace(/^\/linepatrol\/geoserver/, '/geoserver'),
66
- },
67
- '/api': {
68
- // v3用
69
- // rewrite: (path: string) => path.replace(/^\/api\/af-system\//, '/rs/'),
70
- target: v4Server,
71
- ws: false,
72
- changeOrigin: true,
73
- },
74
- '/oss': {
75
- target: OSSServerDev,
76
- rewrite: (path: string) => path.replace(/^\/oss\//, '/'),
77
- changeOrigin: true,
78
- },
79
- }, appProxys),
80
- },
81
-
82
- resolve: {
83
- alias: {
84
- '@': path.join(__dirname, './src'),
85
- '~': path.join(__dirname, './src/assets'),
86
- '~root': path.join(__dirname, '.'),
87
- '@af-mobile-client-vue3': path.join(__dirname, './src'),
88
- },
89
- },
90
-
91
- build: {
92
- cssCodeSplit: false,
93
- chunkSizeWarningLimit: 2048,
94
- outDir: `./dist/${env.VITE_APP_OUT_DIR}`,
95
- rollupOptions: {
96
- output: {
97
- // 打包时分割资源
98
- chunkFileNames: 'static/js/[name]-[hash].js',
99
- entryFileNames: 'static/js/[name]-[hash].js',
100
- assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
101
- manualChunks(id) {
102
- if (id.includes('node_modules'))
103
- return 'third' // 代码分割为第三方包
104
-
105
- if (id.includes('views'))
106
- return 'views' // 代码分割为业务视图
107
- },
108
- },
109
- },
110
- },
111
-
112
- optimizeDeps: { include, exclude },
113
- }
114
- }
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://192.168.50.67:31567'
15
+ const v3Server = 'http://192.168.50.67:31567'
16
+ const OSSServerDev = 'http://192.168.50.67:30351'
17
+ const geoserver = 'http://39.104.49.8:30372'
18
+ const mockServer = 'http://127.0.0.1:8086'
19
+ // const OSSServerProd = 'http://192.168.50.67:31351'
20
+
21
+ return {
22
+ base: env.VITE_APP_PUBLIC_PATH,
23
+ plugins: createVitePlugins(mode),
24
+
25
+ server: {
26
+ host: true,
27
+ port: 80,
28
+ allowedHosts: [
29
+ 'www.aofengcloud.com',
30
+ '.aofengcloud.com',
31
+ ],
32
+ proxy: Object.assign({
33
+ '/api/af-system/user': {
34
+ target: 'http://127.0.0.1:9002/',
35
+ rewrite: (path: string) => path.replace(/^\/api\/af-system\//, '/'),
36
+ ws: false,
37
+ changeOrigin: true,
38
+ },
39
+ '/api/invoice': {
40
+ target: 'http://219.153.176.6:8400/',
41
+ rewrite: (path: string) => path.replace(/^\/api\//, '/'),
42
+ ws: false,
43
+ changeOrigin: true,
44
+ },
45
+ '/api/af-system/entity/t_files': {
46
+ target: v3Server,
47
+ ws: false,
48
+ changeOrigin: true,
49
+ },
50
+ '/resource': {
51
+ // pathRewrite: { '^/resource': '/' },
52
+ target: v4Server,
53
+ changeOrigin: true,
54
+ },
55
+ // '/api/af-auth/login': {
56
+ // target: 'http://127.0.0.1:9200/',
57
+ // rewrite: (path: string) => path.replace(/^\/api\/af-auth\//, '/'),
58
+ // ws: false,
59
+ // changeOrigin: true,
60
+ // },
61
+ // geoserver 转发
62
+ '/linepatrol/geoserver': {
63
+ target: geoserver,
64
+ changeOrigin: true,
65
+ rewrite: path => path.replace(/^\/linepatrol\/geoserver/, '/geoserver'),
66
+ },
67
+ '/api': {
68
+ // v3用
69
+ // rewrite: (path: string) => path.replace(/^\/api\/af-system\//, '/rs/'),
70
+ target: v4Server,
71
+ ws: false,
72
+ changeOrigin: true,
73
+ },
74
+ '/oss': {
75
+ target: OSSServerDev,
76
+ rewrite: (path: string) => path.replace(/^\/oss\//, '/'),
77
+ changeOrigin: true,
78
+ },
79
+ }, appProxys),
80
+ },
81
+
82
+ resolve: {
83
+ alias: {
84
+ '@': path.join(__dirname, './src'),
85
+ '~': path.join(__dirname, './src/assets'),
86
+ '~root': path.join(__dirname, '.'),
87
+ '@af-mobile-client-vue3': path.join(__dirname, './src'),
88
+ },
89
+ },
90
+
91
+ build: {
92
+ cssCodeSplit: false,
93
+ chunkSizeWarningLimit: 2048,
94
+ outDir: `./dist/${env.VITE_APP_OUT_DIR}`,
95
+ rollupOptions: {
96
+ output: {
97
+ // 打包时分割资源
98
+ chunkFileNames: 'static/js/[name]-[hash].js',
99
+ entryFileNames: 'static/js/[name]-[hash].js',
100
+ assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
101
+ manualChunks(id) {
102
+ if (id.includes('node_modules'))
103
+ return 'third' // 代码分割为第三方包
104
+
105
+ if (id.includes('views'))
106
+ return 'views' // 代码分割为业务视图
107
+ },
108
+ },
109
+ },
110
+ },
111
+
112
+ optimizeDeps: { include, exclude },
113
+ }
114
+ }