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.

131 lines
2.4 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const SystemInstallPackageRules = reactive({
installPackageName: [required],
installPackageVersion: [required],
installPackageUrl: [required],
isForcedUpdate: [required],
})
export const SystemInstallPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
1 year ago
isForm:false,
},
{
label: '安装包名称',
field: 'installPackageName',
sort: 'custom',
isSearch: true,
},
{
label: '安装包版本',
field: 'installPackageVersion',
sort: 'custom',
1 year ago
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
},
{
label: '安装路径',
field: 'installPackageUrl',
sort: 'custom',
form: {
componentProps: {
disabled: true
},
}
},
{
label: '是否强制更新',
field: 'isForcedUpdate',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 140
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '更新内容',
field: 'updateContent',
sort: 'custom',
},
{
label: '附件id',
field: 'fileId',
sort: 'custom',
1 year ago
isForm:false,
form: {
componentProps: {
disabled: true
},
value:'',
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '上传附件',
field: 'uploadFile',
sort: 'custom',
form: {
component: 'UploadFile',
componentProps: {
upData:{
tableId: '',
tableName: ''
},
limit:1,
fileType:['apk'],
fileSize:35
}
},
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
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: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))