mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-08 08:05:07 +08:00
fix: print Params
This commit is contained in:
@ -52,13 +52,25 @@ export const useMessage = () => {
|
||||
ElNotification.warning(content)
|
||||
},
|
||||
// 确认窗体
|
||||
confirm(content: string, tip: string) {
|
||||
return ElMessageBox.confirm(content, tip, {
|
||||
confirm(content: string, tip?: string) {
|
||||
return ElMessageBox.confirm(content, tip ? tip : t('common.confirmTitle'), {
|
||||
confirmButtonText: t('common.ok'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
type: 'warning'
|
||||
})
|
||||
},
|
||||
// 删除窗体
|
||||
delConfirm(content?: string, tip?: string) {
|
||||
return ElMessageBox.confirm(
|
||||
content ? content : t('common.delMessage'),
|
||||
tip ? tip : t('common.confirmTitle'),
|
||||
{
|
||||
confirmButtonText: t('common.ok'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
},
|
||||
// 提交内容
|
||||
prompt(content: string, tip: string) {
|
||||
return ElMessageBox.prompt(content, tip, {
|
||||
|
@ -18,7 +18,7 @@ export type VxeCrudSchema = Omit<VxeTableColumn, 'children'> & {
|
||||
table?: CrudTableParams
|
||||
form?: CrudFormParams
|
||||
detail?: CrudDescriptionsParams
|
||||
print?: boolean
|
||||
print?: CrudPrintParams
|
||||
children?: VxeCrudSchema[]
|
||||
dictType?: string
|
||||
}
|
||||
@ -42,6 +42,11 @@ type CrudDescriptionsParams = {
|
||||
show?: boolean
|
||||
} & Omit<DescriptionsSchema, 'field'>
|
||||
|
||||
type CrudPrintParams = {
|
||||
// 是否显示表单项
|
||||
show?: boolean
|
||||
} & Omit<VxeTableDefines.ColumnInfo[], 'field'>
|
||||
|
||||
interface VxeAllSchemas {
|
||||
searchSchema: VxeFormItemProps[]
|
||||
tableSchema: VxeGridPropTypes.Columns
|
||||
@ -233,7 +238,7 @@ const filterPrintSchema = (crudSchema: VxeCrudSchema[]): any[] => {
|
||||
|
||||
eachTree(crudSchema, (schemaItem: VxeCrudSchema) => {
|
||||
// 判断是否显示
|
||||
if (schemaItem?.detail?.show !== false) {
|
||||
if (schemaItem?.print?.show !== false) {
|
||||
const printSchemaItem = {
|
||||
field: schemaItem.field
|
||||
}
|
||||
|
Reference in New Issue
Block a user