|
|
@ -41,6 +41,7 @@ export const getEditFormSchema: ( |
|
|
|
colProps: { |
|
|
|
span: 8, |
|
|
|
}, |
|
|
|
vIf: () => !isClient && isDetail, |
|
|
|
rules: [{ required: true, type: 'string' }], |
|
|
|
}, |
|
|
|
{ |
|
|
@ -272,7 +273,38 @@ export const getEditFormSchema: ( |
|
|
|
console.log('file: ', file); |
|
|
|
|
|
|
|
// 限制允许上传的文件类型
|
|
|
|
const allowedTypes = ['xlsx', 'xls', 'doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png']; |
|
|
|
// 添加视频和压缩包
|
|
|
|
const allowedTypes = [ |
|
|
|
// 文档
|
|
|
|
'xlsx', |
|
|
|
'xls', |
|
|
|
'doc', |
|
|
|
'docx', |
|
|
|
// 图片
|
|
|
|
'pdf', |
|
|
|
'jpg', |
|
|
|
'jpeg', |
|
|
|
'png', |
|
|
|
// 视频
|
|
|
|
'mp4', |
|
|
|
'avi', |
|
|
|
'mov', |
|
|
|
'wmv', |
|
|
|
'mkv', |
|
|
|
'flv', |
|
|
|
'webm', |
|
|
|
// 压缩包
|
|
|
|
'zip', |
|
|
|
'rar', |
|
|
|
'7z', |
|
|
|
'tar', |
|
|
|
'gz', |
|
|
|
'bz2', |
|
|
|
'tgz', |
|
|
|
'tbz2', |
|
|
|
// 其他
|
|
|
|
'htm', |
|
|
|
]; |
|
|
|
|
|
|
|
// 检查文件类型
|
|
|
|
const fileType = getFileExtension(file.name) || 'unknown'; |
|
|
@ -314,7 +346,10 @@ export const getEditFormSchema: ( |
|
|
|
] as any; |
|
|
|
}; |
|
|
|
|
|
|
|
export const getFlowFormSchema: (row?: Partial<TableListItem>) => FormSchema[] = (record = {}) => { |
|
|
|
export const getFlowFormSchema: (row?: Partial<TableListItem>, state?: any) => FormSchema[] = ( |
|
|
|
record = {}, |
|
|
|
state, |
|
|
|
) => { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
field: 'zentaoNos', |
|
|
@ -326,6 +361,19 @@ export const getFlowFormSchema: (row?: Partial<TableListItem>) => FormSchema[] = |
|
|
|
vIf: () => record.state === 0, |
|
|
|
// rules: [{ required: true, type: 'string' }],
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '问题属性', |
|
|
|
field: 'arrtibute', |
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
options: questionTypeList, |
|
|
|
}, |
|
|
|
colProps: { |
|
|
|
span: 24, |
|
|
|
}, |
|
|
|
vIf: () => state === 5, |
|
|
|
rules: [{ required: true, type: 'string' }], |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'remark', |
|
|
|
component: 'InputTextArea', |
|
|
|