File tree Expand file tree Collapse file tree 7 files changed +264
-320
lines changed Expand file tree Collapse file tree 7 files changed +264
-320
lines changed Original file line number Diff line number Diff line change 12
12
<div ref =" editor" v-if =" dialogVisible1" >
13
13
<XTextButton style =" float : right " :title =" t('common.copy')" @click =" copy(formValue)" />
14
14
<el-scrollbar height =" 580" >
15
- <pre >
16
- {{ formValue }}
17
- </pre >
15
+ <div v-highlight >
16
+ <code class =" hljs" >
17
+ {{ formValue }}
18
+ </code >
19
+ </div >
18
20
</el-scrollbar >
19
21
</div >
20
22
</Dialog >
Original file line number Diff line number Diff line change 146
146
style =" width : 100% "
147
147
>
148
148
<el-option
149
- v-for =" dict in getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY)"
150
- :key =" dict.value "
149
+ v-for =" ( dict, index) in getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY)"
150
+ :key =" index "
151
151
:label =" dict.label"
152
152
:value =" dict.value"
153
153
/>
@@ -434,9 +434,9 @@ const handleUpdate = async (rowId: number) => {
434
434
// 设置数据
435
435
saveForm .value = await ModelApi .getModelApi (rowId )
436
436
if (saveForm .value .category == null ) {
437
- saveForm .value .category = 1
437
+ saveForm .value .category = ' 1 '
438
438
} else {
439
- saveForm .value .category = Number ( saveForm .value .category )
439
+ saveForm .value .category = saveForm .value .category
440
440
}
441
441
}
442
442
Original file line number Diff line number Diff line change
1
+ import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
2
+ const { t } = useI18n ( ) // 国际化
3
+
4
+ // 表单校验
5
+ export const rules = reactive ( {
6
+ category : [ required ] ,
7
+ name : [ required ] ,
8
+ key : [ required ] ,
9
+ value : [ required ]
10
+ } )
11
+
12
+ // CrudSchema
13
+ const crudSchemas = reactive < VxeCrudSchema > ( {
14
+ primaryKey : 'id' ,
15
+ primaryType : null ,
16
+ action : true ,
17
+ columns : [
18
+ {
19
+ title : '参数分类' ,
20
+ field : 'category'
21
+ } ,
22
+ {
23
+ title : '参数名称' ,
24
+ field : 'name' ,
25
+ isSearch : true
26
+ } ,
27
+ {
28
+ title : '参数键名' ,
29
+ field : 'key' ,
30
+ isSearch : true
31
+ } ,
32
+ {
33
+ title : '参数键值' ,
34
+ field : 'value'
35
+ } ,
36
+ {
37
+ title : '系统内置' ,
38
+ field : 'type' ,
39
+ dictType : DICT_TYPE . INFRA_CONFIG_TYPE ,
40
+ dictClass : 'number' ,
41
+ isSearch : true
42
+ } ,
43
+ {
44
+ title : '是否可见' ,
45
+ field : 'visible' ,
46
+ table : {
47
+ slots : {
48
+ default : 'visible_default'
49
+ }
50
+ } ,
51
+ form : {
52
+ component : 'RadioButton' ,
53
+ componentProps : {
54
+ options : [
55
+ { label : '是' , value : true } ,
56
+ { label : '否' , value : false }
57
+ ]
58
+ }
59
+ }
60
+ } ,
61
+ {
62
+ title : t ( 'form.remark' ) ,
63
+ field : 'remark' ,
64
+ isTable : false ,
65
+ form : {
66
+ component : 'Input' ,
67
+ componentProps : {
68
+ type : 'textarea' ,
69
+ rows : 4
70
+ } ,
71
+ colProps : {
72
+ span : 24
73
+ }
74
+ }
75
+ } ,
76
+ {
77
+ title : t ( 'common.createTime' ) ,
78
+ field : 'createTime' ,
79
+ formatter : 'formatDate' ,
80
+ isForm : false ,
81
+ search : {
82
+ show : true ,
83
+ itemRender : {
84
+ name : 'XDataTimePicker'
85
+ }
86
+ }
87
+ }
88
+ ]
89
+ } )
90
+ export const { allSchemas } = useVxeCrudSchemas ( crudSchemas )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments