af-mobile-client-vue3 1.2.17 → 1.2.19
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 +1 -1
- package/src/components/data/XCellList/index.vue +49 -11
- package/src/components/data/XCellListFilter/index.vue +87 -16
- package/src/components/data/XForm/index.vue +67 -28
- package/src/components/data/XFormItem/index.vue +281 -211
- package/src/components/data/XOlMap/index.vue +4 -3
- package/src/components/data/XOlMap/types.ts +2 -0
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/stores/modules/setting.ts +6 -2
- package/src/stores/modules/user.ts +4 -0
- package/src/styles/login.less +14 -0
- package/src/views/component/XCellListView/index.vue +127 -93
- package/src/views/user/login/LoginForm.vue +61 -3
- package/vite.config.ts +12 -2
|
@@ -12,7 +12,6 @@ import { post } from '@af-mobile-client-vue3/services/restTools'
|
|
|
12
12
|
import { searchToListOption, searchToOption } from '@af-mobile-client-vue3/services/v3Api'
|
|
13
13
|
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
14
14
|
import { getDict } from '@af-mobile-client-vue3/utils/dictUtil'
|
|
15
|
-
import { getRangeByType } from '@af-mobile-client-vue3/utils/queryFormDefaultRangePicker'
|
|
16
15
|
import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
|
|
17
16
|
import { areaList } from '@vant/area-data'
|
|
18
17
|
import dayjs from 'dayjs/esm/index'
|
|
@@ -20,6 +19,7 @@ import { debounce } from 'lodash-es'
|
|
|
20
19
|
import {
|
|
21
20
|
Area as VanArea,
|
|
22
21
|
Calendar as VanCalendar,
|
|
22
|
+
Cascader as VanCascader,
|
|
23
23
|
Checkbox as VanCheckbox,
|
|
24
24
|
CheckboxGroup as vanCheckboxGroup,
|
|
25
25
|
DatePicker as VanDatePicker,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
Switch as VanSwitch,
|
|
36
36
|
TimePicker as VanTimePicker,
|
|
37
37
|
} from 'vant'
|
|
38
|
-
import { computed, defineEmits,
|
|
38
|
+
import { computed, defineEmits, defineModel, getCurrentInstance, onBeforeMount, ref, watch } from 'vue'
|
|
39
39
|
|
|
40
40
|
const props = defineProps({
|
|
41
41
|
attr: {
|
|
@@ -73,6 +73,7 @@ const props = defineProps({
|
|
|
73
73
|
type: Object,
|
|
74
74
|
default: () => {},
|
|
75
75
|
},
|
|
76
|
+
// 用 defineModel 替代 modelValue/emit
|
|
76
77
|
modelValue: {
|
|
77
78
|
type: [String, Number, Boolean, Array, Object],
|
|
78
79
|
default: undefined,
|
|
@@ -91,7 +92,18 @@ const props = defineProps({
|
|
|
91
92
|
|
|
92
93
|
})
|
|
93
94
|
|
|
94
|
-
const emits = defineEmits(['
|
|
95
|
+
const emits = defineEmits(['setForm'])
|
|
96
|
+
|
|
97
|
+
// 用 defineModel 替代 modelValue/emit
|
|
98
|
+
const modelData = defineModel<string | number | boolean | any[] | Record<string, any>>()
|
|
99
|
+
|
|
100
|
+
// 获取字典
|
|
101
|
+
interface OptionItem {
|
|
102
|
+
label: string
|
|
103
|
+
value: any
|
|
104
|
+
children?: OptionItem[]
|
|
105
|
+
}
|
|
106
|
+
|
|
95
107
|
// 判断并初始化防抖函数
|
|
96
108
|
let debouncedUserLinkFunc: (() => void) | null = null
|
|
97
109
|
let debouncedDepLinkFunc: (() => void) | null = null
|
|
@@ -101,7 +113,6 @@ const { attr, form, mode, serviceName, getDataParams, columnsField } = props
|
|
|
101
113
|
const calendarShow = ref(false)
|
|
102
114
|
const option = ref([])
|
|
103
115
|
const pickerValue = ref(undefined)
|
|
104
|
-
const datePickerValue = ref(undefined)
|
|
105
116
|
const timePickerValue = ref(undefined)
|
|
106
117
|
const area = ref<any>(undefined)
|
|
107
118
|
const showPicker = ref(false)
|
|
@@ -109,16 +120,8 @@ const showDatePicker = ref(false)
|
|
|
109
120
|
const showTimePicker = ref(false)
|
|
110
121
|
const showArea = ref(false)
|
|
111
122
|
const errorMessage = ref('')
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// 输入-非查询
|
|
115
|
-
const formInputDefaultValue = ref('')
|
|
116
|
-
// 输入-查询
|
|
117
|
-
const queryInputDefaultValue = ref('')
|
|
118
|
-
// 选择-非查询
|
|
119
|
-
const formSelectDefaultValue = ref([])
|
|
120
|
-
// 选择-查询
|
|
121
|
-
const querySelectDefaultValue = ref([])
|
|
123
|
+
const showTreeSelect = ref(false)
|
|
124
|
+
const treeValue = ref('')
|
|
122
125
|
|
|
123
126
|
// 登录信息 (可以在配置的动态函数中使用 this.setupState 获取到当前组件内的全部函数和变量 例:this.setupState.userState)
|
|
124
127
|
const userState = useUserStore().getLogin()
|
|
@@ -136,9 +139,9 @@ const currInst = getCurrentInstance()
|
|
|
136
139
|
|
|
137
140
|
// 配置中心->表单项变更触发函数
|
|
138
141
|
const dataChangeFunc = debounce(async () => {
|
|
139
|
-
if (attr.dataChangeFunc)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
if (attr.dataChangeFunc) {
|
|
143
|
+
await executeStrFunctionByContext(currInst, attr.dataChangeFunc, [form, val => modelData.value = val, attr, null, mode])
|
|
144
|
+
}
|
|
142
145
|
}, 500)
|
|
143
146
|
|
|
144
147
|
// 配置中心->表单项展示函数
|
|
@@ -156,58 +159,120 @@ const showFormItemFunc = debounce(async () => {
|
|
|
156
159
|
}
|
|
157
160
|
}, 500)
|
|
158
161
|
|
|
159
|
-
//
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
case 'area':
|
|
178
|
-
case 'citySelect':
|
|
179
|
-
case 'calendar':
|
|
180
|
-
case 'textarea':
|
|
181
|
-
case 'intervalPicker':
|
|
182
|
-
case 'input':
|
|
183
|
-
case 'select':
|
|
184
|
-
if (mode === '查询')
|
|
185
|
-
return props.modelValue !== undefined ? props.modelValue : queryInputDefaultValue.value
|
|
186
|
-
else
|
|
187
|
-
return props.modelValue !== undefined ? props.modelValue : formInputDefaultValue.value
|
|
188
|
-
case 'stepper':
|
|
189
|
-
return props.modelValue !== undefined ? props.modelValue : 1
|
|
190
|
-
case 'rangePicker':
|
|
191
|
-
if (props.modelValue && Array.isArray(props.modelValue) && props.modelValue.length > 1)
|
|
192
|
-
return `${props.modelValue[0]} ~ ${props.modelValue[1]}`
|
|
162
|
+
// 监听 props.modelValue 的变化
|
|
163
|
+
// watch(() => props.modelValue, (newVal) => {
|
|
164
|
+
// console.log('props.modelValue===', props.modelValue)
|
|
165
|
+
// })
|
|
166
|
+
|
|
167
|
+
/* function getDeafultValue(){
|
|
168
|
+
console.log('attr===', attr)
|
|
169
|
+
if (attr.type === 'radio' || attr.type === 'rate' || attr.type === 'slider' || attr.type === 'area' || attr.type === 'citySelect' || attr.type === 'calendar' || attr.type === 'textarea' || attr.type === 'intervalPicker' || attr.type === 'input' || attr.type === 'select') {
|
|
170
|
+
if (attr.formDefault)
|
|
171
|
+
localValue.value = attr.formDefault
|
|
172
|
+
if (attr.queryFormDefault)
|
|
173
|
+
localValue.value = attr.queryFormDefault
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (attr.type === 'checkbox' || attr.type === 'uploader' || attr.type === 'file' || attr.type === 'image' || attr.type === 'datePicker' || attr.type === 'timePicker') {
|
|
177
|
+
if (attr.formDefault) {
|
|
178
|
+
if (attr.type === 'checkbox' || attr.type === 'image' || attr.type === 'file')
|
|
179
|
+
formSelectDefaultValue.value = attr.formDefault
|
|
193
180
|
else
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
181
|
+
formSelectDefaultValue.value.push(attr.formDefault)
|
|
182
|
+
}
|
|
183
|
+
if (attr.queryFormDefault) {
|
|
184
|
+
// console.log(querySelectDefaultValue.value)
|
|
185
|
+
querySelectDefaultValue.value.push(...attr.queryFormDefault)
|
|
186
|
+
// querySelectDefaultValue.value = attr.queryFormDefault
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (attr.type === 'rangePicker') {
|
|
191
|
+
if (attr.formDefault)
|
|
192
|
+
formSelectDefaultValue.value = attr.formDefault
|
|
193
|
+
if (attr.queryFormDefault) {
|
|
194
|
+
const dateArray = getRangeByType(attr.queryFormDefault, true)
|
|
195
|
+
pickerValue.value = `${dateArray[0]} ~ ${dateArray[1]}`
|
|
196
|
+
querySelectDefaultValue.value = pickerValue.value
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
} */
|
|
200
|
+
/**
|
|
201
|
+
* 检测是否传入了有效的值
|
|
202
|
+
* @returns any
|
|
203
|
+
*/
|
|
204
|
+
function checkModel(val = props.modelValue) {
|
|
205
|
+
if (val === null || val === undefined || val === '')
|
|
206
|
+
return false
|
|
207
|
+
if (Array.isArray(val))
|
|
208
|
+
return val.length > 0
|
|
209
|
+
return true
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* 获取表单项的默认值
|
|
213
|
+
* @returns any
|
|
214
|
+
*/
|
|
215
|
+
function getDefaultValue() {
|
|
216
|
+
const val = props.modelValue
|
|
217
|
+
|
|
218
|
+
// 如果有有效值,直接返回
|
|
219
|
+
if (checkModel(val)) {
|
|
220
|
+
return val
|
|
199
221
|
}
|
|
222
|
+
|
|
223
|
+
// 根据类型获取默认值
|
|
224
|
+
const getDefaultByType = () => {
|
|
225
|
+
const def = mode !== '查询' ? attr.formDefault : attr.queryFormDefault
|
|
226
|
+
|
|
227
|
+
// 数组类型默认值
|
|
228
|
+
const arrayTypes = ['uploader', 'checkbox', 'file', 'area', 'image', 'treeSelect']
|
|
229
|
+
if (arrayTypes.includes(attr.type)) {
|
|
230
|
+
return def !== undefined ? def : []
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// 特殊类型默认值
|
|
234
|
+
const specialDefaults = {
|
|
235
|
+
switch: false,
|
|
236
|
+
stepper: 1,
|
|
237
|
+
addressSearch: val,
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (specialDefaults[attr.type] !== undefined) {
|
|
241
|
+
return specialDefaults[attr.type]
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// 日期时间类型
|
|
245
|
+
const dateTypes = ['rangePicker', 'yearPicker', 'monthPicker', 'yearRangePicker', 'monthRangePicker', 'datePicker', 'timePicker']
|
|
246
|
+
if (dateTypes.includes(attr.type)) {
|
|
247
|
+
return getDateRange({
|
|
248
|
+
type: attr.type,
|
|
249
|
+
formDefault: attr.formDefault ?? '',
|
|
250
|
+
queryFormDefault: attr.queryFormDefault ?? '',
|
|
251
|
+
queryType: attr.queryType,
|
|
252
|
+
queryValueFormat: attr.queryValueFormat,
|
|
253
|
+
name: attr.name ?? '',
|
|
254
|
+
}) ?? []
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// 其他类型(字符串、数字等)
|
|
258
|
+
return def ?? ''
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return getDefaultByType()
|
|
200
262
|
}
|
|
201
263
|
|
|
264
|
+
// 初始化日期组件初始值,组件自定义格式显示值和实际值(日期相关初始化都在此函数中操作)
|
|
202
265
|
function getDateRange({
|
|
203
266
|
type,
|
|
204
267
|
formDefault: defaultValue,
|
|
268
|
+
queryFormDefault,
|
|
205
269
|
queryType,
|
|
206
270
|
queryValueFormat: defaultFormat,
|
|
207
271
|
name,
|
|
208
272
|
}: {
|
|
209
273
|
type: string
|
|
210
274
|
formDefault: string
|
|
275
|
+
queryFormDefault: string
|
|
211
276
|
queryType?: string
|
|
212
277
|
queryValueFormat?: string
|
|
213
278
|
name: string
|
|
@@ -220,91 +285,74 @@ function getDateRange({
|
|
|
220
285
|
datePicker: 'YYYY-MM-DD HH:mm:ss',
|
|
221
286
|
rangePicker: 'YYYY-MM-DD HH:mm:ss',
|
|
222
287
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
return undefined
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (['monthPicker', 'yearPicker', 'datePicker'].includes(type)) {
|
|
250
|
-
if (queryType === 'BETWEEN') {
|
|
251
|
-
return [start, end]
|
|
288
|
+
if (mode) {
|
|
289
|
+
const format = defaultFormat || formatMap[type]
|
|
290
|
+
const val = mode === '查询' ? queryFormDefault : defaultValue
|
|
291
|
+
let start: string, end: string
|
|
292
|
+
switch (val) {
|
|
293
|
+
case 'curYear':
|
|
294
|
+
start = dayjs().startOf('year').format(format)
|
|
295
|
+
end = dayjs().endOf('year').format(format)
|
|
296
|
+
break
|
|
297
|
+
case 'curMonth':
|
|
298
|
+
start = dayjs().startOf('month').format(format)
|
|
299
|
+
end = dayjs().endOf('month').format(format)
|
|
300
|
+
break
|
|
301
|
+
case 'curDay':
|
|
302
|
+
start = dayjs().startOf('day').format(format)
|
|
303
|
+
end = dayjs().endOf('day').format(format)
|
|
304
|
+
break
|
|
305
|
+
case 'curTime':
|
|
306
|
+
start = dayjs().format(format)
|
|
307
|
+
end = dayjs().format(format)
|
|
308
|
+
break
|
|
309
|
+
default:
|
|
310
|
+
return undefined
|
|
252
311
|
}
|
|
253
|
-
if (
|
|
254
|
-
|
|
312
|
+
if (['monthPicker', 'yearPicker', 'datePicker'].includes(type)) {
|
|
313
|
+
if (mode !== '查询') {
|
|
314
|
+
if (queryType === 'BETWEEN') {
|
|
315
|
+
return [start, end]
|
|
316
|
+
}
|
|
317
|
+
if (name.includes('开始') || name.includes('起始')) {
|
|
318
|
+
return start
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
return end
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
return start
|
|
326
|
+
}
|
|
255
327
|
}
|
|
256
|
-
|
|
257
|
-
|
|
328
|
+
// rangePicker组件表单显示的值
|
|
329
|
+
if (mode === '查询' && type === 'rangePicker') {
|
|
330
|
+
pickerValue.value = `${start} ~ ${end}`
|
|
258
331
|
}
|
|
332
|
+
return mode !== '查询' ? start : [start, end]
|
|
259
333
|
}
|
|
260
|
-
else
|
|
261
|
-
return
|
|
334
|
+
else {
|
|
335
|
+
return undefined
|
|
262
336
|
}
|
|
263
|
-
|
|
264
|
-
return [start, end]
|
|
265
337
|
}
|
|
266
338
|
|
|
267
|
-
//
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
else {
|
|
277
|
-
if (attr.type === 'rangePicker') {
|
|
278
|
-
console.log('newVal', newVal)
|
|
279
|
-
pickerValue.value = newVal !== undefined ? `${newVal[0]} ~ ${newVal[1]}` : getDefaultValue()
|
|
280
|
-
}
|
|
281
|
-
else if (['datePicker', 'rangePicker', 'yearPicker', 'monthPicker', 'yearRangePicker', 'monthRangePicker'].includes(attr.type)) {
|
|
282
|
-
localValue.value = getDateRange(attr)
|
|
339
|
+
// 删除 localValue 相关
|
|
340
|
+
// 监听 props.form 的变化
|
|
341
|
+
watch(
|
|
342
|
+
() => props.form,
|
|
343
|
+
(newVal, oldVal) => {
|
|
344
|
+
// 如果是从函数获取 options
|
|
345
|
+
if (props.attr.keyName && (props.attr.keyName.toString().includes('async ') || props.attr.keyName.toString().includes('function'))) {
|
|
346
|
+
debouncedUpdateOptions()
|
|
283
347
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
})
|
|
290
|
-
|
|
291
|
-
// 监听 localValue 的变化
|
|
292
|
-
watch(localValue, (newVal) => {
|
|
293
|
-
if (attr.type === 'image' || attr.type === 'file') {
|
|
294
|
-
// 确保上传组件的值始终是数组
|
|
295
|
-
const value = Array.isArray(newVal) ? newVal : []
|
|
296
|
-
emits('update:modelValue', value)
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
emits('update:modelValue', newVal)
|
|
300
|
-
}
|
|
301
|
-
dataChangeFunc()
|
|
302
|
-
})
|
|
348
|
+
},
|
|
349
|
+
{ deep: true },
|
|
350
|
+
)
|
|
303
351
|
|
|
304
352
|
function updateFile(files, _index) {
|
|
305
353
|
// 处理文件数据
|
|
306
354
|
// 更新本地值
|
|
307
|
-
|
|
355
|
+
modelData.value = files.map((file) => {
|
|
308
356
|
const newFile = { ...file }
|
|
309
357
|
if (newFile.content)
|
|
310
358
|
delete newFile.content
|
|
@@ -440,6 +488,7 @@ function formTypeCheck(attr, value) {
|
|
|
440
488
|
|
|
441
489
|
onBeforeMount(() => {
|
|
442
490
|
init()
|
|
491
|
+
modelData.value = getDefaultValue()
|
|
443
492
|
showFormItemFunc()
|
|
444
493
|
dataChangeFunc()
|
|
445
494
|
if (attr?.keyName?.toString()?.startsWith('search@根据表单项[') && attr?.keyName?.toString().endsWith(']联动人员'))
|
|
@@ -475,7 +524,7 @@ const placeholder = computed(() => {
|
|
|
475
524
|
const formatDate = date => `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
|
|
476
525
|
|
|
477
526
|
function onCalendarConfirm(values) {
|
|
478
|
-
|
|
527
|
+
modelData.value = [formatDate(values[0]), formatDate(values[1])]
|
|
479
528
|
pickerValue.value = `${formatDate(values[0])} ~ ${formatDate(values[1])}`
|
|
480
529
|
calendarShow.value = false
|
|
481
530
|
}
|
|
@@ -529,36 +578,6 @@ function init() {
|
|
|
529
578
|
initRadioValue()
|
|
530
579
|
}
|
|
531
580
|
}
|
|
532
|
-
if (attr.type === 'radio' || attr.type === 'rate' || attr.type === 'slider' || attr.type === 'area' || attr.type === 'citySelect' || attr.type === 'calendar' || attr.type === 'textarea' || attr.type === 'intervalPicker' || attr.type === 'input' || attr.type === 'select') {
|
|
533
|
-
if (attr.formDefault)
|
|
534
|
-
formInputDefaultValue.value = attr.formDefault
|
|
535
|
-
if (attr.queryFormDefault)
|
|
536
|
-
queryInputDefaultValue.value = attr.queryFormDefault
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
if (attr.type === 'checkbox' || attr.type === 'uploader' || attr.type === 'file' || attr.type === 'image' || attr.type === 'datePicker' || attr.type === 'timePicker') {
|
|
540
|
-
if (attr.formDefault) {
|
|
541
|
-
if (attr.type === 'checkbox' || attr.type === 'image' || attr.type === 'file')
|
|
542
|
-
formSelectDefaultValue.value = attr.formDefault
|
|
543
|
-
else
|
|
544
|
-
formSelectDefaultValue.value.push(attr.formDefault)
|
|
545
|
-
}
|
|
546
|
-
if (attr.queryFormDefault) {
|
|
547
|
-
// console.log(querySelectDefaultValue.value)
|
|
548
|
-
querySelectDefaultValue.value.push(...attr.queryFormDefault)
|
|
549
|
-
// querySelectDefaultValue.value = attr.queryFormDefault
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
if (attr.type === 'rangePicker') {
|
|
554
|
-
if (attr.formDefault)
|
|
555
|
-
formSelectDefaultValue.value = attr.formDefault
|
|
556
|
-
if (attr.queryFormDefault) {
|
|
557
|
-
const dateArray = getRangeByType(attr.queryFormDefault, true)
|
|
558
|
-
pickerValue.value = `${dateArray[0]} ~ ${dateArray[1]}`
|
|
559
|
-
querySelectDefaultValue.value = pickerValue.value
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
581
|
}
|
|
563
582
|
|
|
564
583
|
function getDataCallback(res) {
|
|
@@ -596,11 +615,11 @@ async function updateResOptions(type) {
|
|
|
596
615
|
}
|
|
597
616
|
|
|
598
617
|
function initRadioValue() {
|
|
599
|
-
if ((mode === '新增' || mode === '修改') && attr.type === 'radio' && !
|
|
618
|
+
if ((mode === '新增' || mode === '修改') && attr.type === 'radio' && !props.modelValue) {
|
|
600
619
|
if (attr.keys && attr.keys.length > 0)
|
|
601
|
-
|
|
620
|
+
modelData.value = attr.keys[0].value
|
|
602
621
|
else if (option.value && option.value.length > 0)
|
|
603
|
-
|
|
622
|
+
modelData.value = option.value[0].value
|
|
604
623
|
}
|
|
605
624
|
}
|
|
606
625
|
|
|
@@ -618,16 +637,16 @@ function getData(value, callback) {
|
|
|
618
637
|
}
|
|
619
638
|
}
|
|
620
639
|
|
|
640
|
+
// 已废弃 不进行维护
|
|
621
641
|
function onPickerConfirm({ selectedOptions }) {
|
|
622
642
|
showPicker.value = false
|
|
623
|
-
|
|
624
|
-
emits('update:modelValue', [selectedOptions[0].text])
|
|
643
|
+
modelData.value = selectedOptions[0].text
|
|
625
644
|
}
|
|
626
645
|
|
|
627
646
|
// 日期时间选择数据
|
|
628
|
-
const dateTimePickerValue = ref(
|
|
647
|
+
const dateTimePickerValue = ref<any>({})
|
|
629
648
|
function showDataTimePicker() {
|
|
630
|
-
if (props.modelValue
|
|
649
|
+
if (props.modelValue && typeof props.modelValue === 'string') {
|
|
631
650
|
// 拆分日期和时间
|
|
632
651
|
const [dateStr, timeStr] = props.modelValue.split(' ')
|
|
633
652
|
// 拆分日期部分
|
|
@@ -642,7 +661,7 @@ function showDataTimePicker() {
|
|
|
642
661
|
}
|
|
643
662
|
else {
|
|
644
663
|
dateTimePickerValue.value = {
|
|
645
|
-
date:
|
|
664
|
+
date: formatDate(new Date()).split('-'),
|
|
646
665
|
time: ['00', '00', '00'],
|
|
647
666
|
}
|
|
648
667
|
}
|
|
@@ -651,30 +670,32 @@ function showDataTimePicker() {
|
|
|
651
670
|
|
|
652
671
|
function onDatePickerConfirm({ selectedValues }) {
|
|
653
672
|
showDatePicker.value = false
|
|
654
|
-
|
|
673
|
+
modelData.value = selectedValues.join('-')
|
|
655
674
|
}
|
|
656
675
|
|
|
676
|
+
// 已废弃 不进行维护
|
|
657
677
|
function onTimePickerConfirm({ selectedValues }) {
|
|
658
678
|
showTimePicker.value = false
|
|
659
679
|
timePickerValue.value = selectedValues.join(':')
|
|
660
|
-
|
|
680
|
+
modelData.value = timePickerValue.value
|
|
661
681
|
}
|
|
662
682
|
|
|
683
|
+
// 没人用到本次先不动。后续需要看这个组件需要怎么使用
|
|
663
684
|
function onAreaConfirm({ selectedOptions }) {
|
|
664
685
|
area.value = `${selectedOptions[0].text}-${selectedOptions[1].text}-${selectedOptions[2].text}`
|
|
665
686
|
showArea.value = false
|
|
666
|
-
|
|
687
|
+
modelData.value = [{
|
|
667
688
|
province: selectedOptions[0].text,
|
|
668
689
|
city: selectedOptions[1].text,
|
|
669
690
|
district: selectedOptions[2].text,
|
|
670
|
-
}]
|
|
691
|
+
}]
|
|
671
692
|
}
|
|
672
693
|
|
|
673
694
|
function onDateTimePickerConfirm() {
|
|
674
695
|
showDatePicker.value = false
|
|
675
696
|
const dateStr = dateTimePickerValue.value.date.join('-')
|
|
676
697
|
const timeStr = dateTimePickerValue.value.time.join(':')
|
|
677
|
-
|
|
698
|
+
modelData.value = `${dateStr} ${timeStr}`
|
|
678
699
|
}
|
|
679
700
|
|
|
680
701
|
function onPickerCancel() {
|
|
@@ -704,10 +725,29 @@ function handleAddressConfirm(location) {
|
|
|
704
725
|
[attr.model]: location.address,
|
|
705
726
|
}
|
|
706
727
|
// 更新表单数据
|
|
707
|
-
|
|
708
|
-
emits('set-form', formData)
|
|
728
|
+
emits('setForm', formData)
|
|
709
729
|
showAddressPicker.value = false
|
|
710
730
|
}
|
|
731
|
+
|
|
732
|
+
// 重置方法,供父组件调用
|
|
733
|
+
function reset() {
|
|
734
|
+
modelData.value = null
|
|
735
|
+
errorMessage.value = ''
|
|
736
|
+
treeValue.value = null
|
|
737
|
+
area.value = null
|
|
738
|
+
pickerValue.value = null
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
defineExpose({
|
|
742
|
+
reset,
|
|
743
|
+
})
|
|
744
|
+
|
|
745
|
+
// 级联选择完成事件
|
|
746
|
+
function onTreeSelectFinish(value) {
|
|
747
|
+
treeValue.value = value.value
|
|
748
|
+
modelData.value = [value.value]
|
|
749
|
+
showTreeSelect.value = false
|
|
750
|
+
}
|
|
711
751
|
</script>
|
|
712
752
|
|
|
713
753
|
<template>
|
|
@@ -719,10 +759,10 @@ function handleAddressConfirm(location) {
|
|
|
719
759
|
:label="labelData"
|
|
720
760
|
:label-align="labelAlign"
|
|
721
761
|
:input-align="attr.inputAlign ? attr.inputAlign : 'right'"
|
|
722
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
762
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
723
763
|
>
|
|
724
764
|
<template #input>
|
|
725
|
-
<VanSwitch v-model="
|
|
765
|
+
<VanSwitch v-model="modelData" />
|
|
726
766
|
</template>
|
|
727
767
|
</VanField>
|
|
728
768
|
|
|
@@ -733,7 +773,7 @@ function handleAddressConfirm(location) {
|
|
|
733
773
|
:label="labelData"
|
|
734
774
|
>
|
|
735
775
|
<template #input>
|
|
736
|
-
<VanCheckbox v-model="
|
|
776
|
+
<VanCheckbox v-model="modelData" shape="square" />
|
|
737
777
|
</template>
|
|
738
778
|
</VanField> -->
|
|
739
779
|
|
|
@@ -749,7 +789,7 @@ function handleAddressConfirm(location) {
|
|
|
749
789
|
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
750
790
|
>
|
|
751
791
|
<template #input>
|
|
752
|
-
<van-checkbox-group v-model="
|
|
792
|
+
<van-checkbox-group v-model="modelData as any[]" direction="horizontal" shape="square" :disabled="readonly">
|
|
753
793
|
<VanCheckbox v-for="(item, index) in option" :key="index" style="padding: 2px" :name="item[columnsField.value]" :shape="rules?.[attr.model].shape" :value="item[columnsField.value]">
|
|
754
794
|
{{ item[columnsField.text] }}
|
|
755
795
|
</VanCheckbox>
|
|
@@ -766,7 +806,7 @@ function handleAddressConfirm(location) {
|
|
|
766
806
|
>
|
|
767
807
|
<template #input>
|
|
768
808
|
<XGridDropOption
|
|
769
|
-
v-model="(
|
|
809
|
+
v-model="(modelData as string[])"
|
|
770
810
|
:column-num="labelData ? 3 : 4"
|
|
771
811
|
:multiple="true"
|
|
772
812
|
:columns="option"
|
|
@@ -775,8 +815,8 @@ function handleAddressConfirm(location) {
|
|
|
775
815
|
</VanField>
|
|
776
816
|
<!-- 下拉 -->
|
|
777
817
|
<XMultiSelect
|
|
778
|
-
v-
|
|
779
|
-
v-model="
|
|
818
|
+
v-if="attr.showMode === 'select' && mode === '查询'"
|
|
819
|
+
v-model="modelData"
|
|
780
820
|
:label="labelData"
|
|
781
821
|
:readonly="readonly"
|
|
782
822
|
:placeholder="placeholder"
|
|
@@ -797,7 +837,7 @@ function handleAddressConfirm(location) {
|
|
|
797
837
|
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
798
838
|
>
|
|
799
839
|
<template #input>
|
|
800
|
-
<VanRadioGroup v-model="
|
|
840
|
+
<VanRadioGroup v-model="modelData" direction="horizontal" :disabled="readonly">
|
|
801
841
|
<VanRadio v-for="(item, index) in option" :key="index" style="padding: 2px" :name="item[columnsField.value]" :value="item[columnsField.value]">
|
|
802
842
|
{{ item[columnsField.text] }}
|
|
803
843
|
</VanRadio>
|
|
@@ -817,7 +857,7 @@ function handleAddressConfirm(location) {
|
|
|
817
857
|
>
|
|
818
858
|
<template #input>
|
|
819
859
|
<XGridDropOption
|
|
820
|
-
v-model="(
|
|
860
|
+
v-model="(modelData as string)"
|
|
821
861
|
:column-num="labelData ? 3 : 4"
|
|
822
862
|
:columns="option"
|
|
823
863
|
/>
|
|
@@ -831,10 +871,10 @@ function handleAddressConfirm(location) {
|
|
|
831
871
|
:label="labelData"
|
|
832
872
|
:label-align="labelAlign"
|
|
833
873
|
:input-align="attr.inputAlign ? attr.inputAlign : 'center'"
|
|
834
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
874
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
835
875
|
>
|
|
836
876
|
<template #input>
|
|
837
|
-
<VanStepper v-model="
|
|
877
|
+
<VanStepper v-model="modelData" :disabled="readonly" />
|
|
838
878
|
</template>
|
|
839
879
|
</VanField>
|
|
840
880
|
|
|
@@ -845,10 +885,10 @@ function handleAddressConfirm(location) {
|
|
|
845
885
|
:label="labelData"
|
|
846
886
|
:label-align="labelAlign"
|
|
847
887
|
:input-align="attr.inputAlign ? attr.inputAlign : 'center'"
|
|
848
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
888
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
849
889
|
>
|
|
850
890
|
<template #input>
|
|
851
|
-
<VanRate v-model="
|
|
891
|
+
<VanRate v-model="modelData as number" :size="25" :readonly="readonly" void-color="#eee" void-icon="star" color="#ffd21e" />
|
|
852
892
|
</template>
|
|
853
893
|
</VanField>
|
|
854
894
|
|
|
@@ -859,10 +899,10 @@ function handleAddressConfirm(location) {
|
|
|
859
899
|
:label="labelData"
|
|
860
900
|
:label-align="labelAlign"
|
|
861
901
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
862
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
902
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
863
903
|
>
|
|
864
904
|
<template #input>
|
|
865
|
-
<VanSlider v-model="
|
|
905
|
+
<VanSlider v-model="modelData as number" :readonly="readonly" />
|
|
866
906
|
</template>
|
|
867
907
|
</VanField>
|
|
868
908
|
|
|
@@ -873,13 +913,13 @@ function handleAddressConfirm(location) {
|
|
|
873
913
|
:label="labelData"
|
|
874
914
|
:label-align="labelAlign"
|
|
875
915
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
876
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
916
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
877
917
|
>
|
|
878
918
|
<template #input>
|
|
879
919
|
<!-- <van-uploader v-model="localValue" /> -->
|
|
880
920
|
<Uploader
|
|
881
921
|
upload-mode="server"
|
|
882
|
-
:image-list="(
|
|
922
|
+
:image-list="(modelData as any[])"
|
|
883
923
|
authority="admin"
|
|
884
924
|
@update-file-list="updateFile"
|
|
885
925
|
/>
|
|
@@ -893,12 +933,12 @@ function handleAddressConfirm(location) {
|
|
|
893
933
|
:label="labelData"
|
|
894
934
|
:label-align="labelAlign"
|
|
895
935
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
896
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
936
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
897
937
|
>
|
|
898
938
|
<template #input>
|
|
899
939
|
<ImageUploader
|
|
900
940
|
upload-mode="server"
|
|
901
|
-
:image-list="(
|
|
941
|
+
:image-list="(modelData as any[])"
|
|
902
942
|
authority="admin"
|
|
903
943
|
:attr="attr"
|
|
904
944
|
@update-file-list="updateFile"
|
|
@@ -906,7 +946,7 @@ function handleAddressConfirm(location) {
|
|
|
906
946
|
</template>
|
|
907
947
|
</VanField>
|
|
908
948
|
|
|
909
|
-
<!-- 选择器 -->
|
|
949
|
+
<!-- 选择器 琉璃中不存在,不进行维护后续将删除 -->
|
|
910
950
|
<VanField
|
|
911
951
|
v-if="attr.type === 'picker' && showItem"
|
|
912
952
|
v-model="pickerValue"
|
|
@@ -917,12 +957,12 @@ function handleAddressConfirm(location) {
|
|
|
917
957
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
918
958
|
readonly
|
|
919
959
|
is-link
|
|
920
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
960
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
921
961
|
@click="readonly ? null : showPicker = true"
|
|
922
962
|
/>
|
|
923
963
|
<VanPopup v-model:show="showPicker" round position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
924
964
|
<VanPicker
|
|
925
|
-
v-model="(
|
|
965
|
+
v-model="(modelData as Numeric[])"
|
|
926
966
|
:title="attr.name"
|
|
927
967
|
:columns="attr.selectKey"
|
|
928
968
|
:readonly="readonly"
|
|
@@ -945,7 +985,7 @@ function handleAddressConfirm(location) {
|
|
|
945
985
|
:label-align="labelAlign"
|
|
946
986
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
947
987
|
:placeholder="attr.placeholder ? attr.placeholder : `请选择${attr.name}`"
|
|
948
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
988
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
949
989
|
@click="calendarShow = true"
|
|
950
990
|
/>
|
|
951
991
|
<VanCalendar
|
|
@@ -961,7 +1001,7 @@ function handleAddressConfirm(location) {
|
|
|
961
1001
|
<!-- 日期选择-非查询 -->
|
|
962
1002
|
<VanField
|
|
963
1003
|
v-if="(attr.type === 'datePicker' || attr.type === 'rangePicker') && mode !== '查询' && showItem"
|
|
964
|
-
v-model="(
|
|
1004
|
+
v-model="(modelData as string | number)"
|
|
965
1005
|
name="datePicker"
|
|
966
1006
|
:label="labelData"
|
|
967
1007
|
:label-align="labelAlign"
|
|
@@ -969,7 +1009,7 @@ function handleAddressConfirm(location) {
|
|
|
969
1009
|
readonly
|
|
970
1010
|
:is-link="true"
|
|
971
1011
|
:placeholder="placeholder"
|
|
972
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
1012
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
973
1013
|
@click="readonly ? null : showDataTimePicker()"
|
|
974
1014
|
/>
|
|
975
1015
|
<VanPopup v-model:show="showDatePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
@@ -998,7 +1038,7 @@ function handleAddressConfirm(location) {
|
|
|
998
1038
|
<!-- 日期选择-查询 -->
|
|
999
1039
|
<VanField
|
|
1000
1040
|
v-if="attr.type === 'datePicker' && mode === '查询' && showItem"
|
|
1001
|
-
v-model="(
|
|
1041
|
+
v-model="(modelData as string | number)"
|
|
1002
1042
|
name="datePicker"
|
|
1003
1043
|
:label="labelData"
|
|
1004
1044
|
:label-align="labelAlign"
|
|
@@ -1006,7 +1046,7 @@ function handleAddressConfirm(location) {
|
|
|
1006
1046
|
readonly
|
|
1007
1047
|
:is-link="true"
|
|
1008
1048
|
:placeholder="attr.placeholder ? attr.placeholder : `请选择${attr.name}`"
|
|
1009
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
1049
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
1010
1050
|
@click="showDatePicker = true"
|
|
1011
1051
|
/>
|
|
1012
1052
|
<VanPopup v-model:show="showDatePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
@@ -1032,7 +1072,7 @@ function handleAddressConfirm(location) {
|
|
|
1032
1072
|
</VanPickerGroup>
|
|
1033
1073
|
</VanPopup>
|
|
1034
1074
|
|
|
1035
|
-
<!-- 时间选择 -->
|
|
1075
|
+
<!-- 时间选择 --该配置未在pc找到不进行维护 后续将删除 -->
|
|
1036
1076
|
<VanField
|
|
1037
1077
|
v-if="attr.type === 'timePicker' && showItem"
|
|
1038
1078
|
v-model="timePickerValue"
|
|
@@ -1048,7 +1088,7 @@ function handleAddressConfirm(location) {
|
|
|
1048
1088
|
/>
|
|
1049
1089
|
<VanPopup v-model:show="showTimePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
1050
1090
|
<VanTimePicker
|
|
1051
|
-
v-model="
|
|
1091
|
+
v-model="modelData as string[]"
|
|
1052
1092
|
:title="attr.name"
|
|
1053
1093
|
:columns-type="attr.columnsType ? attr.columnsType : ['hour', 'minute', 'second']"
|
|
1054
1094
|
:min-time="attr.minTime ? attr.minTime : '00:00:00'"
|
|
@@ -1075,7 +1115,7 @@ function handleAddressConfirm(location) {
|
|
|
1075
1115
|
/>
|
|
1076
1116
|
<VanPopup v-model:show="showArea" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
1077
1117
|
<VanArea
|
|
1078
|
-
v-model="
|
|
1118
|
+
v-model="modelData as string" :title="attr.name" :area-list="areaList"
|
|
1079
1119
|
@confirm="onAreaConfirm"
|
|
1080
1120
|
@cancel="showArea = false"
|
|
1081
1121
|
/>
|
|
@@ -1084,20 +1124,20 @@ function handleAddressConfirm(location) {
|
|
|
1084
1124
|
<!-- 单选下拉列表 -->
|
|
1085
1125
|
<XSelect
|
|
1086
1126
|
v-if="attr.type === 'select' && showItem"
|
|
1087
|
-
v-model="
|
|
1127
|
+
v-model="modelData"
|
|
1088
1128
|
:label="labelData"
|
|
1089
1129
|
:readonly="readonly"
|
|
1090
1130
|
clearable
|
|
1091
1131
|
:placeholder="placeholder"
|
|
1092
1132
|
:columns="option"
|
|
1093
1133
|
:option="attr.option ? attr.option : columnsField"
|
|
1094
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
1134
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
1095
1135
|
/>
|
|
1096
1136
|
|
|
1097
1137
|
<!-- 文本区域 -->
|
|
1098
1138
|
<VanField
|
|
1099
1139
|
v-if="attr.type === 'textarea' && showItem"
|
|
1100
|
-
v-model="(
|
|
1140
|
+
v-model="(modelData as string)"
|
|
1101
1141
|
rows="3"
|
|
1102
1142
|
autosize
|
|
1103
1143
|
:label="labelData"
|
|
@@ -1114,7 +1154,7 @@ function handleAddressConfirm(location) {
|
|
|
1114
1154
|
<!-- 文本输入框 -->
|
|
1115
1155
|
<VanField
|
|
1116
1156
|
v-if="(attr.type === 'input' || attr.type === 'intervalPicker') && showItem"
|
|
1117
|
-
v-model="
|
|
1157
|
+
v-model="modelData"
|
|
1118
1158
|
:label="labelData"
|
|
1119
1159
|
:label-align="labelAlign"
|
|
1120
1160
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
@@ -1125,13 +1165,13 @@ function handleAddressConfirm(location) {
|
|
|
1125
1165
|
:error-message="errorMessage"
|
|
1126
1166
|
:clearable="attr.clearable"
|
|
1127
1167
|
:rules="[{ required: attr.rule.required === 'true', message: `请填写${attr.name}` }]"
|
|
1128
|
-
@blur="() => formTypeCheck(attr,
|
|
1168
|
+
@blur="() => formTypeCheck(attr, modelData as string)"
|
|
1129
1169
|
/>
|
|
1130
1170
|
|
|
1131
1171
|
<!-- 地址选择器 -->
|
|
1132
1172
|
<VanField
|
|
1133
1173
|
v-if="attr.type === 'addressSearch' && showItem"
|
|
1134
|
-
v-model="
|
|
1174
|
+
v-model="modelData as string"
|
|
1135
1175
|
name="addressSearch"
|
|
1136
1176
|
:label="labelData"
|
|
1137
1177
|
:label-align="labelAlign"
|
|
@@ -1155,6 +1195,36 @@ function handleAddressConfirm(location) {
|
|
|
1155
1195
|
@confirm="handleAddressConfirm"
|
|
1156
1196
|
/>
|
|
1157
1197
|
</VanPopup>
|
|
1198
|
+
|
|
1199
|
+
<!-- pc的树形选择框————》 手机端采用 Cascader 级联选择 -->
|
|
1200
|
+
<VanField
|
|
1201
|
+
v-if="attr.type === 'treeSelect' && showItem"
|
|
1202
|
+
v-model="treeValue"
|
|
1203
|
+
name="treeSelect"
|
|
1204
|
+
:label="labelData"
|
|
1205
|
+
:label-align="labelAlign"
|
|
1206
|
+
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
1207
|
+
readonly
|
|
1208
|
+
is-link
|
|
1209
|
+
:placeholder="attr.placeholder ? attr.placeholder : `请选择${attr.name}`"
|
|
1210
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
1211
|
+
@click="readonly ? null : showTreeSelect = true"
|
|
1212
|
+
/>
|
|
1213
|
+
<VanPopup
|
|
1214
|
+
v-model:show="showTreeSelect"
|
|
1215
|
+
position="bottom"
|
|
1216
|
+
teleport="body"
|
|
1217
|
+
overlay-class="date-picker-overlay"
|
|
1218
|
+
>
|
|
1219
|
+
<VanCascader
|
|
1220
|
+
:options="option"
|
|
1221
|
+
:field-names="attr.customFieldName ? attr.customFieldName : { text: 'label', value: 'value', children: 'children' }"
|
|
1222
|
+
:title="attr.name"
|
|
1223
|
+
:closeable="true"
|
|
1224
|
+
@close="showTreeSelect = false"
|
|
1225
|
+
@finish="onTreeSelectFinish"
|
|
1226
|
+
/>
|
|
1227
|
+
</VanPopup>
|
|
1158
1228
|
</div>
|
|
1159
1229
|
</template>
|
|
1160
1230
|
|