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.
85 lines
1.7 KiB
85 lines
1.7 KiB
1 year ago
|
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: '安装包名称',
|
||
|
field: 'installPackageName',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '安装包版本',
|
||
|
field: 'installPackageVersion',
|
||
|
sort: 'custom',
|
||
|
},
|
||
|
{
|
||
|
label: '安装路径',
|
||
|
field: 'installPackageUrl',
|
||
|
sort: 'custom',
|
||
|
},
|
||
|
{
|
||
|
label: '是否强制更新',
|
||
|
field: 'isForcedUpdate',
|
||
|
sort: 'custom',
|
||
|
dictType: DICT_TYPE.TRUE_FALSE,
|
||
|
dictClass: 'string',
|
||
|
isTable: true,
|
||
|
table: {
|
||
|
width: 120
|
||
|
},
|
||
|
form: {
|
||
|
component: 'Switch',
|
||
|
value: 'TRUE',
|
||
|
componentProps: {
|
||
|
inactiveValue: 'FALSE',
|
||
|
activeValue: 'TRUE'
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '更新内容',
|
||
|
field: 'updateContent',
|
||
|
sort: 'custom',
|
||
|
|
||
|
},
|
||
|
{
|
||
|
label: '备注',
|
||
|
field: 'remark',
|
||
|
sort: 'custom',
|
||
|
},
|
||
|
{
|
||
|
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'
|
||
|
}
|
||
|
}
|
||
|
]))
|