mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 20:15:06 +08:00
修复代码生成父菜单选择无效,前端代码缺少字段,格式错误
This commit is contained in:
@ -8,104 +8,104 @@ export const rules = reactive({
|
||||
#foreach ($column in $columns)
|
||||
#if (($column.createOperation || $column.updateOperation) && !$column.nullable && !${column.primaryKey})## 创建或者更新操作 && 要求非空 && 非主键
|
||||
#set($comment=$column.columnComment)
|
||||
$column.javaField: [{ required: true, message: "${comment}不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }],
|
||||
$column.javaField: [{ required: true, message: '${comment}不能为空', trigger: #if($column.htmlType == "select")'change'#else'blur'#end }],
|
||||
#end
|
||||
#end
|
||||
})
|
||||
// CrudSchema
|
||||
const crudSchemas = reactive<CrudSchema[]>([
|
||||
#foreach($column in $columns)
|
||||
#if ($column.listOperation || $column.listOperationResult || $column.createOperation || $column.updateOperation)
|
||||
#set ($dictType = $column.dictType)
|
||||
{
|
||||
label: '${column.columnComment}',
|
||||
field: '${column.javaField}',
|
||||
#if ("" != $dictType)## 有数据字典
|
||||
dictType: DICT_TYPE.$dictType.toUpperCase(),
|
||||
#end
|
||||
#if($column.primaryKey)
|
||||
type: 'index',
|
||||
form: {
|
||||
show: false
|
||||
},
|
||||
detail: {
|
||||
show: false
|
||||
#if ($column.listOperation || $column.listOperationResult || $column.createOperation || $column.updateOperation)
|
||||
#set ($dictType = $column.dictType)
|
||||
{
|
||||
label: '${column.columnComment}',
|
||||
field: '${column.javaField}',
|
||||
#if ("" != $dictType)## 有数据字典
|
||||
dictType: DICT_TYPE.$dictType.toUpperCase(),
|
||||
#end
|
||||
#if($column.primaryKey)
|
||||
type: 'index',
|
||||
form: {
|
||||
show: false
|
||||
},
|
||||
detail: {
|
||||
show: false
|
||||
}
|
||||
#else
|
||||
#if (!$column.createOperation && !$column.updateOperation)
|
||||
form: {
|
||||
show: false
|
||||
},
|
||||
#elseif(!("" != $column.dictType))
|
||||
form: {
|
||||
show: true,
|
||||
#if ($column.htmlType == "datetime")## 时间框
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
type: 'datetime',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
||||
}
|
||||
#else
|
||||
#if (!$column.createOperation && !$column.updateOperation)
|
||||
form: {
|
||||
false
|
||||
#elseif($column.htmlType == "editor")## 文本编辑器
|
||||
component: 'Editor',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
#elseif(!("" != $column.dictType))
|
||||
form: {
|
||||
show: true,
|
||||
#if ($column.htmlType == "datetime")## 时间框
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
type: 'datetime',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
||||
}
|
||||
#elseif($column.htmlType == "editor")## 文本编辑器
|
||||
component: 'Editor',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
componentProps: {
|
||||
valueHtml: ''
|
||||
}
|
||||
#elseif($column.htmlType == "textarea")## 文本框
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
type: 'textarea',
|
||||
rows: 4
|
||||
},
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
#end
|
||||
},
|
||||
#end
|
||||
#if ($column.listOperationResult)
|
||||
search: {
|
||||
#if($column.htmlType == "input")
|
||||
show: true
|
||||
#else
|
||||
#if($column.htmlType == "datetime")
|
||||
show: true,
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
type: 'datetimerange',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
||||
}
|
||||
#elseif($column.htmlType == "select" || $column.htmlType == "radio")
|
||||
#if ("" == $dictType)## 没有数据字典
|
||||
show: true,
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
option: [{'','请选择字典生成'}]
|
||||
}
|
||||
#else
|
||||
show: true
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
componentProps: {
|
||||
valueHtml: ''
|
||||
}
|
||||
#elseif($column.htmlType == "textarea")## 文本框
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
type: 'textarea',
|
||||
rows: 4
|
||||
},
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
#end
|
||||
#end
|
||||
},
|
||||
#end
|
||||
#end
|
||||
{
|
||||
label: t('table.action'),
|
||||
field: 'action',
|
||||
width: '240px',
|
||||
form: {
|
||||
show: false
|
||||
},
|
||||
detail: {
|
||||
show: false
|
||||
}
|
||||
#if ($column.listOperationResult)
|
||||
search: {
|
||||
#if($column.htmlType == "input")
|
||||
show: true
|
||||
#else
|
||||
#if($column.htmlType == "datetime")
|
||||
show: true,
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
type: 'datetimerange',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
||||
}
|
||||
#elseif($column.htmlType == "select" || $column.htmlType == "radio")
|
||||
#if ("" == $dictType)## 没有数据字典
|
||||
show: true,
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
option: [{'','请选择字典生成'}]
|
||||
}
|
||||
#else
|
||||
show: true
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
}
|
||||
#end
|
||||
#end
|
||||
},
|
||||
#end
|
||||
#end
|
||||
{
|
||||
label: t('table.action'),
|
||||
field: 'action',
|
||||
width: '240px',
|
||||
form: {
|
||||
show: false
|
||||
},
|
||||
detail: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
export const { allSchemas } = useCrudSchemas(crudSchemas)
|
Reference in New Issue
Block a user