Skip to content

Commit c65a9d9

Browse files
YunaiVgitee-org
authored andcommitted
!71 测试所提bug修改
Merge pull request !71 from 周建/master
2 parents 8b9d2c7 + 0503b7d commit c65a9d9

File tree

14 files changed

+329
-325
lines changed

14 files changed

+329
-325
lines changed

src/api/infra/fileConfig/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface FileClientConfig {
1616
export interface FileConfigVO {
1717
id: number
1818
name: string
19-
storage: number
19+
storage: any
2020
master: boolean
2121
visible: boolean
2222
config: FileClientConfig

src/config/axios/request.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { service } from './service'
2+
3+
import { config } from './config'
4+
5+
const { default_headers } = config
6+
7+
const request = (option: any) => {
8+
const { url, method, params, data, headersType, responseType } = option
9+
return service({
10+
url: url,
11+
method,
12+
params,
13+
data,
14+
responseType: responseType,
15+
headers: {
16+
'Content-Type': headersType || default_headers
17+
}
18+
})
19+
}
20+
export default {
21+
get: async <T = any>(option: any) => {
22+
const res = await request({ method: 'GET', ...option })
23+
return res as unknown as T
24+
},
25+
post: async <T = any>(option: any) => {
26+
const res = await request({ method: 'POST', ...option })
27+
return res as unknown as T
28+
},
29+
delete: async <T = any>(option: any) => {
30+
const res = await request({ method: 'DELETE', ...option })
31+
return res as unknown as T
32+
},
33+
put: async <T = any>(option: any) => {
34+
const res = await request({ method: 'PUT', ...option })
35+
return res as unknown as T
36+
},
37+
patch: async <T = any>(option: any) => {
38+
const res = await request({ method: 'PATCH', ...option })
39+
return res as unknown as T
40+
},
41+
download: async <T = any>(option: any) => {
42+
const res = await request({ method: 'GET', responseType: 'blob', ...option })
43+
return res as unknown as Promise<T>
44+
},
45+
upload: async <T = any>(option: any) => {
46+
option.headersType = 'multipart/form-data'
47+
const res = await request({ method: 'POST', ...option })
48+
return res as unknown as Promise<T>
49+
}
50+
}

src/views/bpm/form/formEditor.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
<div ref="editor" v-if="dialogVisible1">
1313
<XTextButton style="float: right" :title="t('common.copy')" @click="copy(formValue)" />
1414
<el-scrollbar height="580">
15-
<pre>
16-
{{ formValue }}
17-
</pre>
15+
<div v-highlight>
16+
<code class="hljs">
17+
{{ formValue }}
18+
</code>
19+
</div>
1820
</el-scrollbar>
1921
</div>
2022
</Dialog>

src/views/bpm/model/index.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@
146146
style="width: 100%"
147147
>
148148
<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"
151151
:label="dict.label"
152152
:value="dict.value"
153153
/>
@@ -434,9 +434,9 @@ const handleUpdate = async (rowId: number) => {
434434
// 设置数据
435435
saveForm.value = await ModelApi.getModelApi(rowId)
436436
if (saveForm.value.category == null) {
437-
saveForm.value.category = 1
437+
saveForm.value.category = '1'
438438
} else {
439-
saveForm.value.category = Number(saveForm.value.category)
439+
saveForm.value.category = saveForm.value.category
440440
}
441441
}
442442

src/views/infra/config/config.data.ts

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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)

src/views/infra/config/form.vue

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)