af-mobile-client-vue3 1.3.8 → 1.3.9

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.3.8",
4
+ "version": "1.3.9",
5
5
  "packageManager": "pnpm@10.13.1",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
package/postcss.config.ts CHANGED
@@ -17,7 +17,7 @@ export default {
17
17
 
18
18
  // https://github.com/wswmsword/postcss-mobile-forever
19
19
  'postcss-mobile-forever': {
20
- appSelector: '#app',
20
+ appSelector: '#system-app',
21
21
  viewportWidth: 375,
22
22
  maxDisplayWidth: 800,
23
23
  border: true,
@@ -183,14 +183,17 @@ defineExpose({ init, removeRef, xFormListRef })
183
183
  </div>
184
184
  </VanTab>
185
185
  </VanTabs>
186
- <VanButton v-if="submitGroup" round block type="primary" @click="submit">
187
- 提交
188
- </VanButton>
186
+ <div class="form-footer-fixed">
187
+ <VanButton v-if="submitGroup" round block type="primary" @click="submit">
188
+ 提交
189
+ </VanButton>
190
+ </div>
189
191
  </div>
190
192
  </template>
191
193
 
192
194
  <style scoped lang="less">
193
195
  #x-form-group {
196
+ padding: 12px;
194
197
  display: flex;
195
198
  flex-direction: column;
196
199
  background-color: rgb(247, 248, 250);
@@ -206,6 +209,28 @@ defineExpose({ init, removeRef, xFormListRef })
206
209
  .x-form-group-item {
207
210
  margin-bottom: 20px;
208
211
  }
212
+ .form-footer-fixed {
213
+ position: fixed;
214
+ bottom: 0;
215
+ left: 0;
216
+ width: 100%;
217
+
218
+ padding: 12px;
219
+ box-sizing: border-box;
220
+
221
+ /* 阴影效果 - 向上投射 */
222
+ box-shadow:
223
+ 0 -4px 12px rgba(0, 0, 0, 0.1),
224
+ 0 -2px 4px rgba(0, 0, 0, 0.06);
225
+
226
+ /* 毛玻璃背景 (移动端高级效果) */
227
+ background-color: rgba(255, 255, 255, 0.85);
228
+ -webkit-backdrop-filter: blur(10px);
229
+ backdrop-filter: blur(10px);
230
+
231
+ /* 边框增强立体感 */
232
+ border-top: 1px solid rgba(0, 0, 0, 0.05);
233
+ }
209
234
  }
210
235
  .x-form-group-item.is-last {
211
236
  min-height: calc(100vh - var(--van-nav-bar-height) - 40px);
@@ -215,7 +240,7 @@ defineExpose({ init, removeRef, xFormListRef })
215
240
  align-items: center;
216
241
  padding-top: 12px;
217
242
  background: none;
218
- margin: 0 0 4px 4px;
243
+ margin: 0 0 16px 4px;
219
244
  }
220
245
  .form-group-bar {
221
246
  width: 4px;
@@ -138,14 +138,14 @@ const showItem = ref(true)
138
138
  const currInst = getCurrentInstance()
139
139
 
140
140
  // 配置中心->表单项变更触发函数
141
- const dataChangeFunc = debounce(async () => {
141
+ async function dataChangeFunc() {
142
142
  if (attr.dataChangeFunc) {
143
143
  await executeStrFunctionByContext(currInst, attr.dataChangeFunc, [props.form, (formData: any) => emits('setForm', formData), attr, null, mode])
144
144
  }
145
- }, 500)
146
-
145
+ }
146
+ const dataChangeFuncdebounce = debounce(dataChangeFunc, 300)
147
147
  // 配置中心->表单项展示函数
148
- const showFormItemFunc = debounce(async () => {
148
+ async function showFormItemFunc() {
149
149
  if (attr.showFormItemFunc) {
150
150
  const obj = await executeStrFunctionByContext(currInst, attr.showFormItemFunc, [form, attr, null, mode])
151
151
  // 判断是 bool 还是 obj 兼容
@@ -157,8 +157,8 @@ const showFormItemFunc = debounce(async () => {
157
157
  showItem.value = obj?.show
158
158
  }
159
159
  }
160
- }, 500)
161
-
160
+ }
161
+ const showFormItemFuncdebounce = debounce(showFormItemFunc, 300)
162
162
  /**
163
163
  * 检测是否传入了有效的值
164
164
  * @returns any
@@ -328,7 +328,7 @@ watch(
328
328
  debouncedUpdateOptions()
329
329
  }
330
330
  if (props.attr.showFormItemFunc) {
331
- showFormItemFunc()
331
+ showFormItemFuncdebounce()
332
332
  }
333
333
  },
334
334
  { deep: true },
@@ -340,7 +340,7 @@ watch(
340
340
  (newVal, oldVal) => {
341
341
  // 避免初始化时的调用
342
342
  if (newVal !== oldVal) {
343
- dataChangeFunc()
343
+ dataChangeFuncdebounce()
344
344
  }
345
345
  },
346
346
  { deep: true },
@@ -1,97 +1,97 @@
1
- <script setup lang="ts">
2
- import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
3
- import { runLogic } from '@af-mobile-client-vue3/services/api/common'
4
- import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
5
- import dayjs from 'dayjs/esm/index'
6
- import { showToast } from 'vant'
7
- import { onMounted, ref } from 'vue'
8
- import { useRoute } from 'vue-router'
9
-
10
- const configName = ref('appapplyuserinfoFormGroup')
11
- const serviceName = ref('af-apply')
12
- const route = useRoute()
13
- const userInfo = useUserStore().getUserInfo()
14
- const workflowId = ref('3045')
15
- const userinfoid = ref('93116')
16
- const model = ref('编辑')
17
- const groupFormData = ref({})
18
-
19
- function submit(res) {
20
- if (model.value === '新增') {
21
- res.t_userinfo.f_operate_date = dayjs().format('YYYY-MM-DD HH:mm:ss')
22
- res.t_userinfo.f_orgid = userInfo.f_orgid
23
- res.t_userinfo.f_orgname = userInfo.f_orgname
24
- res.t_userinfo.f_depid = userInfo.f_depid
25
- res.t_userinfo.f_depname = userInfo.f_depname
26
- res.t_userinfo.f_operatorid = userInfo.f_operatorid
27
- res.t_userinfo.f_operator = userInfo.f_operator
28
- res.t_userinfo.f_workflow_id = this.f_workflow_id
29
- res.t_userinfo.f_user_state = '预备'
30
-
31
- res.t_userfiles.f_operate_date = dayjs().format('YYYY-MM-DD HH:mm:ss')
32
- res.t_userfiles.f_orgid = userInfo.f_orgid
33
- res.t_userfiles.f_orgname = userInfo.f_orgname
34
- res.t_userfiles.f_depid = userInfo.f_depid
35
- res.t_userfiles.f_depname = userInfo.f_depname
36
- res.t_userfiles.f_operatorid = userInfo.f_operatorid
37
- res.t_userfiles.f_operator = userInfo.f_operator
38
- res.t_userfiles.f_workflow_id = this.f_workflow_id
39
- res.t_userfiles.f_table_state = '待开通'
40
- }
41
- let saveData = res
42
- if (saveData.t_userfiles.f_gasbrand_id.length > 0) {
43
- saveData.t_userfiles.f_gasbrand_id = saveData.t_userfiles.f_gasbrand_id[0]
44
- }
45
- if (saveData.t_userfiles.f_price_id.length > 0) {
46
- saveData.t_userfiles.f_price_id = saveData.t_userfiles.f_price_id[0]
47
- }
48
- if (model.value === '编辑') {
49
- saveData = Object.assign(saveData, {
50
- f_operator_record: userInfo.f_operator,
51
- f_operatorid_record: userInfo.f_operatorid,
52
- f_orgid_record: userInfo.f_orgid,
53
- f_orgname_record: userInfo.f_orgname,
54
- f_depid_record: userInfo.f_depid,
55
- f_depname_record: userInfo.f_depname,
56
- })
57
- }
58
- runLogic('userFIleSaveLogic', saveData, 'af-revenue').then((res) => {
59
- showToast('操作成功!')
60
- history.back()
61
- })
62
- }
63
- const isInit = ref(false)
64
- function init() {
65
- if (model.value === '编辑') {
66
- runLogic('getFileDetailForEdit', { f_userinfo_id: userinfoid.value }, 'af-revenue').then((res) => {
67
- // if (res.t_userfiles.f_gasmodel_id) {
68
- // res.t_userfiles.f_gasmodel_id = 76
69
- // }
70
- // if (res.t_userfiles.f_price_id) {
71
- // res.t_userfiles.f_price_id = [res.t_userfiles.f_price_id]
72
- // }
73
- console.log('1111111----,', res)
74
- groupFormData.value = res
75
- isInit.value = true
76
- })
77
- }
78
- }
79
- onMounted(() => {
80
- init()
81
- })
82
- </script>
83
-
84
- <template>
85
- <XFormGroup
86
- v-if="isInit"
87
- mode="修改"
88
- :config-name="configName"
89
- :service-name="serviceName"
90
- :group-form-data="groupFormData"
91
- @submit="submit"
92
- />
93
- </template>
94
-
95
- <style scoped lang="less">
96
-
97
- </style>
1
+ <script setup lang="ts">
2
+ import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
3
+ import { runLogic } from '@af-mobile-client-vue3/services/api/common'
4
+ import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
5
+ import dayjs from 'dayjs/esm/index'
6
+ import { showToast } from 'vant'
7
+ import { onMounted, ref } from 'vue'
8
+ import { useRoute } from 'vue-router'
9
+
10
+ const configName = ref('appapplyuserinfoFormGroup')
11
+ const serviceName = ref('af-apply')
12
+ const route = useRoute()
13
+ const userInfo = useUserStore().getUserInfo()
14
+ const workflowId = ref('3045')
15
+ const userinfoid = ref('93116')
16
+ const model = ref('编辑')
17
+ const groupFormData = ref({})
18
+
19
+ function submit(res) {
20
+ if (model.value === '新增') {
21
+ res.t_userinfo.f_operate_date = dayjs().format('YYYY-MM-DD HH:mm:ss')
22
+ res.t_userinfo.f_orgid = userInfo.f_orgid
23
+ res.t_userinfo.f_orgname = userInfo.f_orgname
24
+ res.t_userinfo.f_depid = userInfo.f_depid
25
+ res.t_userinfo.f_depname = userInfo.f_depname
26
+ res.t_userinfo.f_operatorid = userInfo.f_operatorid
27
+ res.t_userinfo.f_operator = userInfo.f_operator
28
+ res.t_userinfo.f_workflow_id = this.f_workflow_id
29
+ res.t_userinfo.f_user_state = '预备'
30
+
31
+ res.t_userfiles.f_operate_date = dayjs().format('YYYY-MM-DD HH:mm:ss')
32
+ res.t_userfiles.f_orgid = userInfo.f_orgid
33
+ res.t_userfiles.f_orgname = userInfo.f_orgname
34
+ res.t_userfiles.f_depid = userInfo.f_depid
35
+ res.t_userfiles.f_depname = userInfo.f_depname
36
+ res.t_userfiles.f_operatorid = userInfo.f_operatorid
37
+ res.t_userfiles.f_operator = userInfo.f_operator
38
+ res.t_userfiles.f_workflow_id = this.f_workflow_id
39
+ res.t_userfiles.f_table_state = '待开通'
40
+ }
41
+ let saveData = res
42
+ if (saveData.t_userfiles.f_gasbrand_id.length > 0) {
43
+ saveData.t_userfiles.f_gasbrand_id = saveData.t_userfiles.f_gasbrand_id[0]
44
+ }
45
+ if (saveData.t_userfiles.f_price_id.length > 0) {
46
+ saveData.t_userfiles.f_price_id = saveData.t_userfiles.f_price_id[0]
47
+ }
48
+ if (model.value === '编辑') {
49
+ saveData = Object.assign(saveData, {
50
+ f_operator_record: userInfo.f_operator,
51
+ f_operatorid_record: userInfo.f_operatorid,
52
+ f_orgid_record: userInfo.f_orgid,
53
+ f_orgname_record: userInfo.f_orgname,
54
+ f_depid_record: userInfo.f_depid,
55
+ f_depname_record: userInfo.f_depname,
56
+ })
57
+ }
58
+ runLogic('userFIleSaveLogic', saveData, 'af-revenue').then((res) => {
59
+ showToast('操作成功!')
60
+ history.back()
61
+ })
62
+ }
63
+ const isInit = ref(false)
64
+ function init() {
65
+ if (model.value === '编辑') {
66
+ runLogic('getFileDetailForEdit', { f_userinfo_id: userinfoid.value }, 'af-revenue').then((res) => {
67
+ // if (res.t_userfiles.f_gasmodel_id) {
68
+ // res.t_userfiles.f_gasmodel_id = 76
69
+ // }
70
+ // if (res.t_userfiles.f_price_id) {
71
+ // res.t_userfiles.f_price_id = [res.t_userfiles.f_price_id]
72
+ // }
73
+ console.log('1111111----,', res)
74
+ groupFormData.value = res
75
+ isInit.value = true
76
+ })
77
+ }
78
+ }
79
+ onMounted(() => {
80
+ init()
81
+ })
82
+ </script>
83
+
84
+ <template>
85
+ <XFormGroup
86
+ v-if="isInit"
87
+ mode="修改"
88
+ :config-name="configName"
89
+ :service-name="serviceName"
90
+ :group-form-data="groupFormData"
91
+ @submit="submit"
92
+ />
93
+ </template>
94
+
95
+ <style scoped lang="less">
96
+
97
+ </style>