Skip to content

Commit 03db8fe

Browse files
committed
Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into dev
� Conflicts: � src/views/bpm/form/formEditor.vue � src/views/bpm/model/index.vue � src/views/infra/config/form.vue � src/views/infra/config/index.vue � src/views/infra/fileConfig/index.vue � src/views/infra/fileList/index.vue � src/views/system/mail/log/log.data.ts � src/views/system/tenant/tenant.data.ts � src/views/system/user/index.vue � src/views/system/user/user.data.ts
2 parents ce936ed + c65a9d9 commit 03db8fe

File tree

4 files changed

+142
-2
lines changed

4 files changed

+142
-2
lines changed

src/api/infra/fileConfig/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface FileClientConfig {
1717
export interface FileConfigVO {
1818
id: number
1919
name: string
20-
storage: number
20+
storage: any
2121
master: boolean
2222
visible: boolean
2323
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/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/system/tenantPackage/tenantPackage.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
4343
{
4444
title: t('form.remark'),
4545
field: 'remark',
46-
isTable: false,
46+
isTable: true,
4747
isSearch: true,
4848
form: {
4949
component: 'Input',

0 commit comments

Comments
 (0)