af-mobile-client-vue3 1.3.7 → 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/compress.js CHANGED
@@ -1,36 +1,36 @@
1
- import fs from 'node:fs'
2
- import path from 'node:path'
3
- import { fileURLToPath } from 'node:url'
4
- import * as tar from 'tar'
5
-
6
- // 当前文件所在目录
7
- const __filename = fileURLToPath(import.meta.url)
8
- const __dirname = path.dirname(__filename)
9
-
10
- // 压缩源目录名(即 build 后生成的目录名)
11
- const outputName = `dist_af-library-mobile-web`
12
-
13
- // 源目录路径
14
- const cwd = path.join(__dirname, 'dist', outputName)
15
-
16
- // 输出 tar.gz 文件路径
17
- const outputPath = path.join(__dirname, 'dist', `${outputName}.tar.gz`)
18
-
19
- if (!fs.existsSync(cwd)) {
20
- console.error('❌ 目录不存在:', cwd)
21
- // eslint-disable-next-line node/prefer-global/process
22
- process.exit(1)
23
- }
24
-
25
- tar.c(
26
- {
27
- gzip: true,
28
- file: outputPath,
29
- cwd,
30
- },
31
- ['.'],
32
- ).then(() => {
33
- console.log(`✅ 压缩完成: ${outputPath}`)
34
- }).catch((err) => {
35
- console.error('❌ 压缩失败:', err)
36
- })
1
+ import fs from 'node:fs'
2
+ import path from 'node:path'
3
+ import { fileURLToPath } from 'node:url'
4
+ import * as tar from 'tar'
5
+
6
+ // 当前文件所在目录
7
+ const __filename = fileURLToPath(import.meta.url)
8
+ const __dirname = path.dirname(__filename)
9
+
10
+ // 压缩源目录名(即 build 后生成的目录名)
11
+ const outputName = `dist_af-library-mobile-web`
12
+
13
+ // 源目录路径
14
+ const cwd = path.join(__dirname, 'dist', outputName)
15
+
16
+ // 输出 tar.gz 文件路径
17
+ const outputPath = path.join(__dirname, 'dist', `${outputName}.tar.gz`)
18
+
19
+ if (!fs.existsSync(cwd)) {
20
+ console.error('❌ 目录不存在:', cwd)
21
+ // eslint-disable-next-line node/prefer-global/process
22
+ process.exit(1)
23
+ }
24
+
25
+ tar.c(
26
+ {
27
+ gzip: true,
28
+ file: outputPath,
29
+ cwd,
30
+ },
31
+ ['.'],
32
+ ).then(() => {
33
+ console.log(`✅ 压缩完成: ${outputPath}`)
34
+ }).catch((err) => {
35
+ console.error('❌ 压缩失败:', err)
36
+ })
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.7",
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 },
@@ -1203,7 +1203,7 @@ function findOptionInTree(options, value) {
1203
1203
  :label-align="labelAlign"
1204
1204
  :input-align="attr.inputAlign ? attr.inputAlign : 'left'"
1205
1205
  :type="attr.type as FieldType"
1206
- :readonly="readonly || (attr.inputOnAfterName && attr.inputOnAfterFunc && !attr.inputOnAfterName.includes('|'))"
1206
+ :readonly="readonly"
1207
1207
  :disabled="attr.disabled"
1208
1208
  :placeholder="placeholder"
1209
1209
  :error-message="errorMessage"
@@ -1215,7 +1215,7 @@ function findOptionInTree(options, value) {
1215
1215
  <template #input>
1216
1216
  <input
1217
1217
  :value="modelData"
1218
- :readonly="readonly || (attr.inputOnAfterName && attr.inputOnAfterFunc && !attr.inputOnAfterName.includes('|'))"
1218
+ :readonly="readonly"
1219
1219
  class="van-field__control"
1220
1220
  :placeholder="placeholder"
1221
1221
  style="flex: 1; min-width: 0;"
@@ -10,6 +10,7 @@ import XCellDetailView from '@af-mobile-client-vue3/views/component/XCellDetailV
10
10
  import XCellListView from '@af-mobile-client-vue3/views/component/XCellListView/index.vue'
11
11
  import XFormAppraiseView from '@af-mobile-client-vue3/views/component/XFormAppraiseView/index.vue'
12
12
  import XFormGroupView from '@af-mobile-client-vue3/views/component/XFormGroupView/index.vue'
13
+ import xformgroup222 from '@af-mobile-client-vue3/views/component/XFormGroupView/xformgroup222.vue'
13
14
  import XFormView from '@af-mobile-client-vue3/views/component/XFormView/index.vue'
14
15
  import XOlMapView from '@af-mobile-client-vue3/views/component/XOlMapView/index.vue'
15
16
  import XLocationPicker from '@af-mobile-client-vue3/views/component/XOlMapView/XLocationPicker/index.vue'
@@ -66,6 +67,11 @@ const routes: Array<RouteRecordRaw> = [
66
67
  name: 'XCellDetailView',
67
68
  component: XCellDetailView,
68
69
  },
70
+ {
71
+ path: '/xformgroup222',
72
+ name: 'xformgroup222',
73
+ component: xformgroup222,
74
+ },
69
75
  {
70
76
  path: '/Component/XFormGroupView',
71
77
  name: 'XFormGroupView',
@@ -1,57 +1,57 @@
1
- /**
2
- * 根据类型获取日期区间字符串
3
- * @param type '当年' | 'curMonth' | '当日'
4
- * @param show 区分实际值还是显示值, true为实际值, false为显示值
5
- * @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
6
- */
7
- export function getRangeByType(type: string, show: boolean): [string, string] {
8
- const now = new Date()
9
- const year = now.getFullYear()
10
- const month = (now.getMonth() + 1).toString().padStart(2, '0')
11
- const day = now.getDate().toString().padStart(2, '0')
12
-
13
- if (!show) {
14
- if (type === 'curYear') {
15
- return [
16
- `${year}-01-01 00:00:00`,
17
- `${year}-12-31 23:59:59`,
18
- ]
19
- }
20
- if (type === 'curMonth') {
21
- const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
22
- return [
23
- `${year}-${month}-01 00:00:00`,
24
- `${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
25
- ]
26
- }
27
- if (type === 'curDay') {
28
- return [
29
- `${year}-${month}-${day} 00:00:00`,
30
- `${year}-${month}-${day} 23:59:59`,
31
- ]
32
- }
33
- }
34
- if (show) {
35
- if (type === 'curYear') {
36
- return [
37
- `${year}-01-01`,
38
- `${year}-12-31`,
39
- ]
40
- }
41
- if (type === 'curMonth') {
42
- const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
43
- return [
44
- `${year}-${month}-01`,
45
- `${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
46
- ]
47
- }
48
- if (type === 'curDay') {
49
- return [
50
- `${year}-${month}-${day}`,
51
- `${year}-${month}-${day}`,
52
- ]
53
- }
54
- }
55
- // 兜底返回空字符串数组
56
- return ['', '']
57
- }
1
+ /**
2
+ * 根据类型获取日期区间字符串
3
+ * @param type '当年' | 'curMonth' | '当日'
4
+ * @param show 区分实际值还是显示值, true为实际值, false为显示值
5
+ * @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
6
+ */
7
+ export function getRangeByType(type: string, show: boolean): [string, string] {
8
+ const now = new Date()
9
+ const year = now.getFullYear()
10
+ const month = (now.getMonth() + 1).toString().padStart(2, '0')
11
+ const day = now.getDate().toString().padStart(2, '0')
12
+
13
+ if (!show) {
14
+ if (type === 'curYear') {
15
+ return [
16
+ `${year}-01-01 00:00:00`,
17
+ `${year}-12-31 23:59:59`,
18
+ ]
19
+ }
20
+ if (type === 'curMonth') {
21
+ const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
22
+ return [
23
+ `${year}-${month}-01 00:00:00`,
24
+ `${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
25
+ ]
26
+ }
27
+ if (type === 'curDay') {
28
+ return [
29
+ `${year}-${month}-${day} 00:00:00`,
30
+ `${year}-${month}-${day} 23:59:59`,
31
+ ]
32
+ }
33
+ }
34
+ if (show) {
35
+ if (type === 'curYear') {
36
+ return [
37
+ `${year}-01-01`,
38
+ `${year}-12-31`,
39
+ ]
40
+ }
41
+ if (type === 'curMonth') {
42
+ const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
43
+ return [
44
+ `${year}-${month}-01`,
45
+ `${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
46
+ ]
47
+ }
48
+ if (type === 'curDay') {
49
+ return [
50
+ `${year}-${month}-${day}`,
51
+ `${year}-${month}-${day}`,
52
+ ]
53
+ }
54
+ }
55
+ // 兜底返回空字符串数组
56
+ return ['', '']
57
+ }
@@ -1,19 +1,26 @@
1
1
  <script setup lang="ts">
2
2
  import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
3
3
  import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
4
+ import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
4
5
  import { defineEmits, ref } from 'vue'
5
6
  import { useRouter } from 'vue-router'
6
7
 
7
8
  // 定义事件
8
9
  const emit = defineEmits(['deleteRow'])
10
+ const userInfo = useUserStore().getUserInfo()
9
11
  // 访问路由
10
12
  const router = useRouter()
11
13
  // 获取默认值
12
14
  const idKey = ref('o_id')
13
15
 
14
16
  // 简易crud表单测试
15
- const configName = ref('lngChargeAuditMobileCRUD')
17
+ // const configName = ref('orderCarInMobileCRUD')
18
+ // const serviceName = ref('af-gaslink')
19
+ // const configName = ref('lngPriceManageMobileCRUD')
20
+ const configName = ref('测试2')
16
21
  const serviceName = ref('af-gaslink')
22
+ // const configName = ref('mobile_liushuiQueryCRUD')
23
+ // const serviceName = ref('af-revenue')
17
24
 
18
25
  // 资源权限测试
19
26
  // const configName = ref('crud_sources_test')
@@ -48,12 +55,12 @@ const serviceName = ref('af-gaslink')
48
55
  // 跳转到表单——以表单组来渲染纯表单
49
56
  function toDetail(item) {
50
57
  router.push({
51
- name: 'XFormGroupView',
52
- query: {
53
- id: item[idKey.value],
54
- // id: item.rr_id,
55
- // o_id: item.o_id,
56
- },
58
+ name: 'xformgroup222',
59
+ // query: {
60
+ // id: item[idKey.value],
61
+ // id: item.rr_id,
62
+ // o_id: item.o_id,
63
+ // },
57
64
  })
58
65
  }
59
66
 
@@ -69,19 +76,36 @@ function toDetail(item) {
69
76
  // },
70
77
  // })
71
78
  // }
79
+ function addOption() {
80
+ console.log('用户----', userInfo)
81
+ router.push({
82
+ name: 'XFormGroupView',
83
+ // params: { id: totalCount.value },
84
+ // query: {
85
+ // configName: configName.value,
86
+ // serviceName: serviceName.value,
87
+ // mode: '新增',
88
+ // },
89
+ })
90
+ // 如果存在回调函数,调用它并传递true表示已处理
91
+ // if (typeof callback === 'function') {
92
+ // callback(true)
93
+ // }
94
+ }
72
95
 
73
96
  // 修改功能
74
- // function updateRow(result) {
75
- // router.push({
76
- // name: 'XFormView',
77
- // params: { id: result.o_id, openid: result.o_id },
78
- // query: {
79
- // configName: configName.value,
80
- // serviceName: serviceName.value,
81
- // mode: '修改',
82
- // },
83
- // })
84
- // }
97
+ function updateRow(result) {
98
+ console.log('用户----', userInfo)
99
+ router.push({
100
+ name: 'XFormView',
101
+ params: { id: 1, openid: 2 },
102
+ query: {
103
+ configName: configName.value,
104
+ serviceName: serviceName.value,
105
+ mode: '修改',
106
+ },
107
+ })
108
+ }
85
109
 
86
110
  // 删除功能
87
111
  function deleteRow(result) {
@@ -92,13 +116,38 @@ function deleteRow(result) {
92
116
  <template>
93
117
  <NormalDataLayout id="XCellListView" title="工作计划">
94
118
  <template #layout_content>
119
+ <!-- <XCellList -->
120
+ <!-- :config-name="configName" -->
121
+ <!-- :service-name="serviceName" -->
122
+ <!-- :custom-add="true" -->
123
+ <!-- :custom-edit="true" -->
124
+ <!-- :id-key="idKey" -->
125
+ <!-- @to-detail="toDetail" -->
126
+ <!-- @delete-row="deleteRow" -->
127
+ <!-- @update="updateRow" -->
128
+ <!-- @add="addOption" -->
129
+ <!-- /> -->
130
+
131
+ <!-- :fix-query-form="{ u_f_price_state: ['生效', '待生效'] }" -->
132
+
133
+ <!-- <XCellList -->
134
+ <!-- config-name="ApplyMobileSuperviseCRUD" -->
135
+ <!-- service-name="af-apply" -->
136
+ <!-- @to-detail="toDetail" -->
137
+ <!-- @delete-row="deleteRow" -->
138
+ <!-- /> -->
139
+
140
+ <!-- <XCellList -->
141
+ <!-- service-name="af-revenue" -->
142
+ <!-- config-name="userfiles_sel_address" -->
143
+ <!-- @to-detail="toDetail" -->
144
+ <!-- /> -->
95
145
  <XCellList
96
- :config-name="configName"
97
- :service-name="serviceName"
98
- :fix-query-form="{ o_f_oper_name: 'edu_test' }"
99
- :id-key="idKey"
146
+ service-name="af-apply"
147
+ config-name="ApplyMobileProcessCRUD"
148
+ :custom-add="true"
100
149
  @to-detail="toDetail"
101
- @delete-row="deleteRow"
150
+ @add="addOption"
102
151
  />
103
152
  </template>
104
153
  </NormalDataLayout>
@@ -5,16 +5,19 @@ 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
+
8
11
  // 纯表单
9
- const configName = ref('form_check_test')
10
- const serviceName = ref('af-system')
12
+ // const configName = ref('form_check_test')
13
+ // const serviceName = ref('af-system')
11
14
 
12
15
  // const configName = ref("计划下发Form")
13
16
  // const serviceName = ref("af-linepatrol")
14
17
 
15
18
  // 表单组
16
- // const configName = ref('lngChargeAuditMobileFormGroup')
17
- // const serviceName = ref('af-gaslink')
19
+ const configName = ref('lngChargeAuditMobileFormGroup')
20
+ const serviceName = ref('af-gaslink')
18
21
 
19
22
  const formData = ref({})
20
23
  const formGroup = ref(null)
@@ -22,7 +25,8 @@ const route = useRoute()
22
25
  const isInit = ref(false)
23
26
  function submit(_result) {
24
27
  showDialog({ message: '提交成功' }).then(() => {
25
- history.back()
28
+ console.log('12121')
29
+ // history.back()
26
30
  })
27
31
  }
28
32
 
@@ -63,8 +67,8 @@ function submit(_result) {
63
67
  <!-- v-if="isInit" -->
64
68
  <XFormGroup
65
69
  ref="formGroup"
66
- :config-name="configName"
67
- :service-name="serviceName"
70
+ config-name="ApplyAddContractFormGroup"
71
+ service-name="af-apply"
68
72
  :group-form-data="formData"
69
73
  mode="新增"
70
74
  @submit="submit"
@@ -0,0 +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>
@@ -3,8 +3,8 @@ 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
5
 
6
- const configName = ref('AddConstructionForm')
7
- const serviceName = ref('af-linepatrol')
6
+ const configName = ref('addappapplychargeForm')
7
+ const serviceName = ref('af-apply')
8
8
 
9
9
  const formGroupAddConstruction = ref(null)
10
10
  </script>