You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
233 lines
4.6 KiB
233 lines
4.6 KiB
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
|
|
|
|
export const TemplateItemDetails = useCrudSchemas(reactive<CrudSchema[]>([
|
|
{
|
|
label: '模版id',
|
|
field: 'templateId',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isForm:false,
|
|
isTable:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
}
|
|
},
|
|
{
|
|
label: '序号',
|
|
field: 'orderNo',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value:0
|
|
}
|
|
},
|
|
{
|
|
label: '检测工具/方法',
|
|
field: 'methods',
|
|
sort: 'custom',
|
|
isSearch: false
|
|
},
|
|
{
|
|
label: '检测内容',
|
|
field: 'contents',
|
|
sort: 'custom',
|
|
isSearch: true
|
|
},
|
|
{
|
|
label: '数据类型',
|
|
field: 'type',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.DETECT_TYPE,
|
|
isSearch: false,
|
|
form: {
|
|
component: 'Select',
|
|
componentProps: {
|
|
// inactiveValue: 'DISABLE',
|
|
// activeValue: 'ENABLE',
|
|
}
|
|
},
|
|
},
|
|
// {
|
|
// label: '级别',
|
|
// field: 'ranks',
|
|
// sort: 'custom',
|
|
// dictType: DICT_TYPE.ITEMBASIC_RANK,
|
|
// isSearch: false,
|
|
// form: {
|
|
// component: 'Select',
|
|
// componentProps: {
|
|
// // inactiveValue: 'DISABLE',
|
|
// // activeValue: 'ENABLE',
|
|
// }
|
|
// },
|
|
// },
|
|
|
|
{
|
|
label: '上限',
|
|
field: 'upLimit',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
min: 0.00,
|
|
precision: 2
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '下限',
|
|
field: 'downLimit',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
min: 0.00,
|
|
precision: 2
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable:false
|
|
},
|
|
{
|
|
label: '工程图',
|
|
field: 'image1',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable:false,
|
|
form:{
|
|
component:'UploadFile',
|
|
componentProps:{
|
|
fileType:['image/jpeg', 'image/png', 'image/gif','video/mp4','video/webm'],
|
|
fileSize:20,
|
|
limit:1,
|
|
upData:{
|
|
tableId:0,tableName:"detection_template_item_details"
|
|
},
|
|
modelValue:[],
|
|
isShowFileList:false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '工具图',
|
|
field: 'image2',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable:false,
|
|
form:{
|
|
component:'UploadFile',
|
|
componentProps:{
|
|
fileType:['image/jpeg', 'image/png', 'image/gif','video/mp4','video/webm'],
|
|
fileSize:20,
|
|
limit:1,
|
|
upData:{
|
|
tableId:0,tableName:"detection_template_item_details"
|
|
},
|
|
isShowFileList:false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '操作指导书',
|
|
field: 'image3',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable:false,
|
|
form:{
|
|
component:'UploadFile',
|
|
componentProps:{
|
|
fileType:['image/jpeg', 'image/png', 'image/gif','video/mp4','video/webm'],
|
|
fileSize:20,
|
|
limit:1,
|
|
upData:{
|
|
tableId:0,tableName:"detection_template_item_details"
|
|
},
|
|
isShowFileList:false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
isSearch: false,
|
|
search: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
type: 'daterange',
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
|
|
}
|
|
},
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '删除时间',
|
|
field: 'deletionTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
isSearch: false,
|
|
isTable:false,
|
|
isForm:false,
|
|
search: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
type: 'daterange',
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
|
|
}
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
valueFormat: 'x'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '删除者ID',
|
|
field: 'deleterId',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable:false,
|
|
isForm:false,
|
|
},
|
|
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
isForm: false,
|
|
table: {
|
|
width: 150,
|
|
fixed: 'right'
|
|
}
|
|
}
|
|
]))
|
|
|
|
// 表单校验
|
|
export const TemplateItemDetailsRules = reactive({
|
|
orderNo: [
|
|
{ required: true, message: '请输入序号', trigger: 'blur' }
|
|
],
|
|
contents: [
|
|
{ required: true, message: '请输入检测内容', trigger: 'blur' }
|
|
],
|
|
type: [
|
|
{ required: true, message: '请选择物料类型', trigger: 'change' }
|
|
],
|
|
})
|
|
|
|
|