|
|
|
@ -3,6 +3,8 @@ import { Form, FormSchema } from '@/components/Form'
|
|
|
|
|
import { useForm } from '@/hooks/web/useForm'
|
|
|
|
|
import { PropType, reactive, watch } from 'vue'
|
|
|
|
|
import { useValidator } from '@/hooks/web/useValidator'
|
|
|
|
|
import { ElButton, ElMessage, ElMessageBox } from 'element-plus';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { required } = useValidator()
|
|
|
|
|
|
|
|
|
@ -26,13 +28,6 @@ const formSchema = reactive<FormSchema[]>([
|
|
|
|
|
label: '编号',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
hidden: true
|
|
|
|
|
},{
|
|
|
|
|
field: 'tName',
|
|
|
|
|
label: '名称',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
componentProps: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tCategory',
|
|
|
|
@ -50,59 +45,65 @@ const formSchema = reactive<FormSchema[]>([
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'uploadUser',
|
|
|
|
|
label: '上传人',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
componentProps: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tStatus',
|
|
|
|
|
label: '状态',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
componentProps: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tVersion',
|
|
|
|
|
label: '版本',
|
|
|
|
|
label: '报告版本',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
componentProps: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'createTime',
|
|
|
|
|
label: '上传时间',
|
|
|
|
|
component: 'DatePicker',
|
|
|
|
|
componentProps: {
|
|
|
|
|
type: 'daterange'
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'updateTime',
|
|
|
|
|
label: '修改时间',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
field: 'tStatus',
|
|
|
|
|
label: '报告状态',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
componentProps: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tDescription',
|
|
|
|
|
label: '描述',
|
|
|
|
|
label: '报告描述',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
|
|
|
|
|
type: 'textarea'
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'organCode',
|
|
|
|
|
label: '所属机构',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
label: '报告模版',
|
|
|
|
|
component: 'Upload',
|
|
|
|
|
colProps: { span: 160 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
limit: 1,
|
|
|
|
|
drag:true,
|
|
|
|
|
accept:".doc,.docx",
|
|
|
|
|
action: 'https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15',
|
|
|
|
|
multiple: true,
|
|
|
|
|
onPreview: (uploadFile) => {
|
|
|
|
|
console.log(uploadFile)
|
|
|
|
|
},
|
|
|
|
|
onRemove: (file) => {
|
|
|
|
|
console.log(file)
|
|
|
|
|
},
|
|
|
|
|
beforeRemove: (uploadFile) => {
|
|
|
|
|
return ElMessageBox.confirm(`Cancel the transfer of ${uploadFile.name} ?`).then(
|
|
|
|
|
() => true,
|
|
|
|
|
() => false
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
onExceed: (files, uploadFiles) => {
|
|
|
|
|
ElMessage.warning(
|
|
|
|
|
`The limit is 1, you selected ${files.length} files this time, add up to ${
|
|
|
|
|
files.length + uploadFiles.length
|
|
|
|
|
} 总共`
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
slots: {
|
|
|
|
|
default: () =><div class="el-upload"><div class="el-upload__text">拖曳报告模版到这里或<em>上传报告模版</em></div></div>,
|
|
|
|
|
tip: () => <div class="el-upload__tip">doc,docx文件</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|