af-mobile-client-vue3 1.4.10 → 1.4.11

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.
@@ -6,8 +6,8 @@ import { ref } from 'vue'
6
6
  import { useRoute } from 'vue-router'
7
7
 
8
8
  // 纯表单
9
- const configName = ref('form_check_test')
10
- const serviceName = ref('af-system')
9
+ const configName = ref('appapplyuserinfoFormGroup')
10
+ const serviceName = ref('af-apply')
11
11
 
12
12
  // const configName = ref("计划下发Form")
13
13
  // const serviceName = ref("af-linepatrol")
@@ -16,16 +16,20 @@ const serviceName = ref('af-system')
16
16
  // const configName = ref('lngChargeAuditMobileFormGroup')
17
17
  // const serviceName = ref('af-gaslink')
18
18
 
19
- const formData = ref({})
19
+ const formData = ref({ t_userinfo: { f_user_name: 111 } })
20
20
  const formGroup = ref(null)
21
21
  const route = useRoute()
22
22
  const isInit = ref(false)
23
23
  function submit(_result) {
24
- showDialog({ message: '提交成功' }).then(() => {
25
- history.back()
26
- })
24
+ showDialog({ message: '提交成功' })
25
+ history.back()
26
+ }
27
+ const myXForm = ref([])
28
+ function setRef(value: any) {
29
+ console.log('myXForm', myXForm)
30
+ formGroup.value.setRef(myXForm.value)
31
+ console.log(formGroup)
27
32
  }
28
-
29
33
  // 表单组——数据
30
34
  // function initComponents () {
31
35
  // runLogic('getlngChargeAuditMobileFormGroupData', {id: 29}, 'af-gaslink').then((res) => {
@@ -55,11 +59,16 @@ function submit(_result) {
55
59
  // onBeforeMount(() => {
56
60
  // initComponents()
57
61
  // })
62
+ function a() {
63
+ }
58
64
  </script>
59
65
 
60
66
  <template>
61
67
  <NormalDataLayout id="XFormGroupView" title="纯表单">
62
68
  <template #layout_content>
69
+ <button @click="a">
70
+ 修改
71
+ </button>
63
72
  <!-- v-if="isInit" -->
64
73
  <XFormGroup
65
74
  ref="formGroup"
@@ -68,7 +77,11 @@ function submit(_result) {
68
77
  :group-form-data="formData"
69
78
  mode="新增"
70
79
  @submit="submit"
71
- />
80
+ >
81
+ <!-- <template #device="{ setRef, removeRef, item, formData }">
82
+ <XFormView :setRef="setRef" :formGroupName="'myXForm'"/>
83
+ </template> -->
84
+ </XFormGroup>
72
85
  </template>
73
86
  </NormalDataLayout>
74
87
  </template>
@@ -1,36 +1,56 @@
1
1
  <script setup lang="ts">
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
+ import { mobileUtil } from '@af-mobile-client-vue3/utils/mobileUtil'
4
5
  import { ref } from 'vue'
6
+ import {
7
+ showFailToast,
8
+ showSuccessToast,
9
+ Button as VanButton,
10
+ CellGroup as VanCellGroup,
11
+ Form as VanForm,
12
+ } from 'vant'
5
13
 
6
- const configName = ref('ceshiForm')
7
- const serviceName = ref('af-system')
8
-
9
- const formGroupAddConstruction = ref(null)
10
- const formData = ref({
11
- 'YYYY': '2025-09-08 16:03:22',
12
- 'YYYY-MM': '2025-09-08 16:03:22',
13
- 'YYYY-MM-DD': '2025-09-08 16:03:22',
14
- 'YYYY-MM-DDHH': '2025-09-08 16:03:22',
15
- 'YYYY-MM-DDHHMM': '2025-09-08 16:03:22',
16
- 'YYYY-MM-DDHHMMSS': '2025-09-08 16:03:22',
17
- })
18
-
19
- function onSubmit(data: any) {
20
- console.warn('提交表单', data)
14
+ const configName = ref('lngSecurityChecktestForm')
15
+ const serviceName = ref('af-safecheck')
16
+ function aaa() {
17
+ mobileUtil.execute({
18
+ funcName: 'startNfcScan',
19
+ param: { a: 1 },
20
+ callbackFunc: (result) => {
21
+ console.log('回调了test111', JSON.stringify(result))
22
+ return 222
23
+ },
24
+ })
21
25
  }
26
+ function bbb() {
27
+ mobileUtil.execute({
28
+ funcName: 'scanBarcode',
29
+ param: { a: 1 },
30
+ callbackFunc: (result) => {
31
+ console.log('回调了test111', JSON.stringify(result))
32
+ return 222
33
+ },
34
+ })
35
+ }
36
+ const formGroupAddConstruction = ref(null)
22
37
  </script>
23
38
 
24
39
  <template>
25
40
  <NormalDataLayout id="XFormGroupView" title="纯表单">
26
41
  <template #layout_content>
42
+ <VanButton @click="aaa">
43
+ 测试nfc
44
+ </VanButton>
45
+ <VanButton @click="bbb">
46
+ 扫码
47
+ </VanButton>
27
48
  <XForm
28
49
  ref="formGroupAddConstruction"
29
- mode="修改"
50
+ mode="新增"
30
51
  :config-name="configName"
31
52
  :service-name="serviceName"
32
- :form-data="formData"
33
- @on-submit="onSubmit"
53
+ :form-readonly="false"
34
54
  />
35
55
  </template>
36
56
  </NormalDataLayout>
@@ -10,6 +10,7 @@ import { UserType } from '@af-mobile-client-vue3/types/auth'
10
10
  import { isWechat } from '@af-mobile-client-vue3/utils/platform-auth'
11
11
  import { funcToRouter, loadRoutes } from '@af-mobile-client-vue3/utils/routerUtil'
12
12
  import { secureStorageBatchWrite, secureStorageRead } from '@af-mobile-client-vue3/utils/secureStorage'
13
+ import bcrypt from 'bcryptjs'
13
14
  import {
14
15
  closeToast,
15
16
  showDialog,
@@ -123,7 +124,7 @@ function handleSubmit() {
123
124
  console.warn(setting)
124
125
  const data: any = await userState.Login({
125
126
  username,
126
- password,
127
+ password: bcrypt.hashSync(password, 10),
127
128
  resourceName: setting.getSetting()?.routerName || '智慧手机',
128
129
  })
129
130
  login.f = data
package/vite.config.ts CHANGED
@@ -64,13 +64,6 @@ export default ({ mode }: ConfigEnv): UserConfig => {
64
64
  changeOrigin: true,
65
65
  rewrite: path => path.replace(/^\/linepatrol\/geoserver/, '/geoserver'),
66
66
  },
67
- // '/api/af-revenue': {
68
- // // target: v4Server,
69
- // rewrite: (path: string) => path.replace(/^\/api\/af-revenue\//, '/'),
70
- // target: 'http://127.0.0.1:9026',
71
- // ws: false,
72
- // changeOrigin: true,
73
- // },
74
67
  '/api': {
75
68
  // v3用
76
69
  // rewrite: (path: string) => path.replace(/^\/api\/af-system\//, '/rs/'),