af-mobile-client-vue3 1.2.49 → 1.2.51
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 +2 -1
- package/src/components/core/BeautifulLoading/index.vue +10 -4
- package/src/components/core/SvgIcon/index.vue +1 -1
- package/src/components/data/XFormGroup/index.vue +0 -4
- package/src/main.ts +2 -0
- package/src/router/routes.ts +0 -6
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/views/component/XCellListView/index.vue +23 -71
- package/src/views/component/XFormGroupView/index.vue +7 -11
- package/src/views/component/XFormView/index.vue +2 -2
- package/src/views/component/XFormGroupView/xformgroup222.vue +0 -94
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "af-mobile-client-vue3",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.51",
|
|
5
5
|
"packageManager": "pnpm@10.12.3",
|
|
6
6
|
"description": "Vue + Vite component lib",
|
|
7
7
|
"engines": {
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"vite-plugin-mock-dev-server": "^1.9.1",
|
|
79
79
|
"vite-plugin-pwa": "^1.0.0",
|
|
80
80
|
"vite-plugin-sitemap": "^0.8.2",
|
|
81
|
+
"vite-plugin-svg-icons": "^2.0.1",
|
|
81
82
|
"vite-plugin-vconsole": "^2.1.1",
|
|
82
83
|
"vite-plugin-vue-devtools": "^7.7.7",
|
|
83
84
|
"vue-tsc": "^2.2.10"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import SvgIcon from '
|
|
2
|
+
import SvgIcon from '@af-mobile-client-vue3/components/core/SvgIcon/index.vue'
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<template>
|
|
@@ -40,8 +40,14 @@ import SvgIcon from './components/core/SvgIcon/index.vue'
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
@keyframes fade {
|
|
43
|
-
0% {
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
0% {
|
|
44
|
+
opacity: 1;
|
|
45
|
+
}
|
|
46
|
+
50% {
|
|
47
|
+
opacity: 0.3;
|
|
48
|
+
}
|
|
49
|
+
100% {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
46
52
|
}
|
|
47
53
|
</style>
|
|
@@ -47,7 +47,6 @@ const renderableGroupItems = computed(() => {
|
|
|
47
47
|
|
|
48
48
|
// 组件初始化函数
|
|
49
49
|
function init(params: Form) {
|
|
50
|
-
console.log('初始化数据------', { ...params })
|
|
51
50
|
initStatus.value = true
|
|
52
51
|
propsData.value = {
|
|
53
52
|
configName: props.configName,
|
|
@@ -56,7 +55,6 @@ function init(params: Form) {
|
|
|
56
55
|
mode: props.mode,
|
|
57
56
|
...params,
|
|
58
57
|
}
|
|
59
|
-
console.log('数据整合----', propsData.value)
|
|
60
58
|
formData.value = propsData.value.groupFormData
|
|
61
59
|
getConfigByName(propsData.value.configName, (result) => {
|
|
62
60
|
if (result?.groups) {
|
|
@@ -72,12 +70,10 @@ function init(params: Form) {
|
|
|
72
70
|
submitSimple.value = result?.showSubmitBtn
|
|
73
71
|
groupItems.value = [{ ...result }]
|
|
74
72
|
}
|
|
75
|
-
console.log('即将加载完成的数据--:', formData.value)
|
|
76
73
|
isInit.value = true
|
|
77
74
|
}, propsData.value.serviceName)
|
|
78
75
|
}
|
|
79
76
|
watch(() => props.groupFormData, (_val) => {
|
|
80
|
-
console.log('监听器-------', props.groupFormData)
|
|
81
77
|
formData.value = { ...formData.value, ...props.groupFormData }
|
|
82
78
|
})
|
|
83
79
|
onBeforeMount(() => {
|
package/src/main.ts
CHANGED
package/src/router/routes.ts
CHANGED
|
@@ -10,7 +10,6 @@ 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'
|
|
14
13
|
import XFormView from '@af-mobile-client-vue3/views/component/XFormView/index.vue'
|
|
15
14
|
import XOlMapView from '@af-mobile-client-vue3/views/component/XOlMapView/index.vue'
|
|
16
15
|
import XLocationPicker from '@af-mobile-client-vue3/views/component/XOlMapView/XLocationPicker/index.vue'
|
|
@@ -67,11 +66,6 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
67
66
|
name: 'XCellDetailView',
|
|
68
67
|
component: XCellDetailView,
|
|
69
68
|
},
|
|
70
|
-
{
|
|
71
|
-
path: '/xformgroup222',
|
|
72
|
-
name: 'xformgroup222',
|
|
73
|
-
component: xformgroup222,
|
|
74
|
-
},
|
|
75
69
|
{
|
|
76
70
|
path: '/Component/XFormGroupView',
|
|
77
71
|
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,26 +1,19 @@
|
|
|
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'
|
|
5
4
|
import { defineEmits, ref } from 'vue'
|
|
6
5
|
import { useRouter } from 'vue-router'
|
|
7
6
|
|
|
8
7
|
// 定义事件
|
|
9
8
|
const emit = defineEmits(['deleteRow'])
|
|
10
|
-
const userInfo = useUserStore().getUserInfo()
|
|
11
9
|
// 访问路由
|
|
12
10
|
const router = useRouter()
|
|
13
11
|
// 获取默认值
|
|
14
12
|
const idKey = ref('o_id')
|
|
15
13
|
|
|
16
14
|
// 简易crud表单测试
|
|
17
|
-
|
|
18
|
-
// const serviceName = ref('af-gaslink')
|
|
19
|
-
// const configName = ref('lngPriceManageMobileCRUD')
|
|
20
|
-
const configName = ref('测试2')
|
|
15
|
+
const configName = ref('lngChargeAuditMobileCRUD')
|
|
21
16
|
const serviceName = ref('af-gaslink')
|
|
22
|
-
// const configName = ref('mobile_liushuiQueryCRUD')
|
|
23
|
-
// const serviceName = ref('af-revenue')
|
|
24
17
|
|
|
25
18
|
// 资源权限测试
|
|
26
19
|
// const configName = ref('crud_sources_test')
|
|
@@ -55,12 +48,12 @@ const serviceName = ref('af-gaslink')
|
|
|
55
48
|
// 跳转到表单——以表单组来渲染纯表单
|
|
56
49
|
function toDetail(item) {
|
|
57
50
|
router.push({
|
|
58
|
-
name: '
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
name: 'XFormGroupView',
|
|
52
|
+
query: {
|
|
53
|
+
id: item[idKey.value],
|
|
54
|
+
// id: item.rr_id,
|
|
55
|
+
// o_id: item.o_id,
|
|
56
|
+
},
|
|
64
57
|
})
|
|
65
58
|
}
|
|
66
59
|
|
|
@@ -76,35 +69,19 @@ function toDetail(item) {
|
|
|
76
69
|
// },
|
|
77
70
|
// })
|
|
78
71
|
// }
|
|
79
|
-
function addOption() {
|
|
80
|
-
router.push({
|
|
81
|
-
name: 'XFormGroupView',
|
|
82
|
-
// params: { id: totalCount.value },
|
|
83
|
-
// query: {
|
|
84
|
-
// configName: configName.value,
|
|
85
|
-
// serviceName: serviceName.value,
|
|
86
|
-
// mode: '新增',
|
|
87
|
-
// },
|
|
88
|
-
})
|
|
89
|
-
// 如果存在回调函数,调用它并传递true表示已处理
|
|
90
|
-
// if (typeof callback === 'function') {
|
|
91
|
-
// callback(true)
|
|
92
|
-
// }
|
|
93
|
-
}
|
|
94
72
|
|
|
95
73
|
// 修改功能
|
|
96
|
-
function updateRow(result) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
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
|
+
// }
|
|
108
85
|
|
|
109
86
|
// 删除功能
|
|
110
87
|
function deleteRow(result) {
|
|
@@ -115,38 +92,13 @@ function deleteRow(result) {
|
|
|
115
92
|
<template>
|
|
116
93
|
<NormalDataLayout id="XCellListView" title="工作计划">
|
|
117
94
|
<template #layout_content>
|
|
118
|
-
<!-- <XCellList -->
|
|
119
|
-
<!-- :config-name="configName" -->
|
|
120
|
-
<!-- :service-name="serviceName" -->
|
|
121
|
-
<!-- :custom-add="true" -->
|
|
122
|
-
<!-- :custom-edit="true" -->
|
|
123
|
-
<!-- :id-key="idKey" -->
|
|
124
|
-
<!-- @to-detail="toDetail" -->
|
|
125
|
-
<!-- @delete-row="deleteRow" -->
|
|
126
|
-
<!-- @update="updateRow" -->
|
|
127
|
-
<!-- @add="addOption" -->
|
|
128
|
-
<!-- /> -->
|
|
129
|
-
|
|
130
|
-
<!-- :fix-query-form="{ u_f_price_state: ['生效', '待生效'] }" -->
|
|
131
|
-
|
|
132
|
-
<!-- <XCellList -->
|
|
133
|
-
<!-- config-name="ApplyMobileSuperviseCRUD" -->
|
|
134
|
-
<!-- service-name="af-apply" -->
|
|
135
|
-
<!-- @to-detail="toDetail" -->
|
|
136
|
-
<!-- @delete-row="deleteRow" -->
|
|
137
|
-
<!-- /> -->
|
|
138
|
-
|
|
139
|
-
<!-- <XCellList -->
|
|
140
|
-
<!-- service-name="af-revenue" -->
|
|
141
|
-
<!-- config-name="userfiles_sel_address" -->
|
|
142
|
-
<!-- @to-detail="toDetail" -->
|
|
143
|
-
<!-- /> -->
|
|
144
95
|
<XCellList
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
:
|
|
96
|
+
:config-name="configName"
|
|
97
|
+
:service-name="serviceName"
|
|
98
|
+
:fix-query-form="{ o_f_oper_name: 'edu_test' }"
|
|
99
|
+
:id-key="idKey"
|
|
148
100
|
@to-detail="toDetail"
|
|
149
|
-
@
|
|
101
|
+
@delete-row="deleteRow"
|
|
150
102
|
/>
|
|
151
103
|
</template>
|
|
152
104
|
</NormalDataLayout>
|
|
@@ -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
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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="
|
|
71
|
-
service-name="
|
|
66
|
+
:config-name="configName"
|
|
67
|
+
:service-name="serviceName"
|
|
72
68
|
:group-form-data="formData"
|
|
73
69
|
mode="新增"
|
|
74
70
|
@submit="submit"
|
|
@@ -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('
|
|
7
|
-
const serviceName = ref('af-
|
|
6
|
+
const configName = ref('AddConstructionForm')
|
|
7
|
+
const serviceName = ref('af-linepatrol')
|
|
8
8
|
|
|
9
9
|
const formGroupAddConstruction = ref(null)
|
|
10
10
|
</script>
|
|
@@ -1,94 +0,0 @@
|
|
|
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('2909')
|
|
15
|
-
const userinfoid = ref('93015')
|
|
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
|
-
function init() {
|
|
64
|
-
if (model.value === '编辑') {
|
|
65
|
-
runLogic('getFileDetailForEdit', { f_userinfo_id: userinfoid.value }, 'af-revenue').then((res) => {
|
|
66
|
-
if (res.t_userfiles.f_gasbrand_id) {
|
|
67
|
-
res.t_userfiles.f_gasbrand_id = [res.t_userfiles.f_gasbrand_id]
|
|
68
|
-
}
|
|
69
|
-
if (res.t_userfiles.f_price_id) {
|
|
70
|
-
res.t_userfiles.f_price_id = [res.t_userfiles.f_price_id]
|
|
71
|
-
}
|
|
72
|
-
console.log('1111111----,', res)
|
|
73
|
-
groupFormData.value = res
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
onMounted(() => {
|
|
78
|
-
init()
|
|
79
|
-
})
|
|
80
|
-
</script>
|
|
81
|
-
|
|
82
|
-
<template>
|
|
83
|
-
<XFormGroup
|
|
84
|
-
mode="修改"
|
|
85
|
-
:config-name="configName"
|
|
86
|
-
:service-name="serviceName"
|
|
87
|
-
:group-form-data="groupFormData"
|
|
88
|
-
@submit="submit"
|
|
89
|
-
/>
|
|
90
|
-
</template>
|
|
91
|
-
|
|
92
|
-
<style scoped lang="less">
|
|
93
|
-
|
|
94
|
-
</style>
|