|
|
@ -240,13 +240,18 @@ const props = defineProps({ |
|
|
|
required: false, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
// 窗体底部按钮:保存,关闭 |
|
|
|
isShowFooterButtton: { |
|
|
|
type: Boolean, |
|
|
|
required: false, |
|
|
|
default: true |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化 |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const dialogWidth = ref() |
|
|
|
if (props.basicFormWidth) { |
|
|
|
console.log('111111111111111') |
|
|
|
dialogWidth.value = props.basicFormWidth |
|
|
|
} else { |
|
|
|
dialogWidth.value = props.isBusiness ? '60%' : '40%' |
|
|
@ -263,19 +268,19 @@ const tableAllSchemas = ref(props.tableAllSchemas) |
|
|
|
const tableFormRules = ref(props.tableFormRules) |
|
|
|
|
|
|
|
// 列表-按钮 |
|
|
|
const buttondata = [ |
|
|
|
defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn(null) |
|
|
|
] |
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'edit') { |
|
|
|
// const buttondata = [ |
|
|
|
// defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn(null) |
|
|
|
// ] |
|
|
|
// // 列表-操作按钮事件 |
|
|
|
// const buttonTableClick = async (val, row) => { |
|
|
|
// if (val == 'edit') { |
|
|
|
|
|
|
|
} else if (val == 'delete') { |
|
|
|
// } else if (val == 'delete') { |
|
|
|
|
|
|
|
} else { |
|
|
|
} |
|
|
|
} |
|
|
|
// } else { |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
/** 弹层操作 */ |
|
|
|
// formField form表单中的字段 |
|
|
@ -392,10 +397,13 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading }) // 提供 open 方法,用于打开弹窗 |
|
|
|
|
|
|
|
/** 弹窗按钮 */ |
|
|
|
const Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
let Butttondata:any = [] |
|
|
|
if (props.isShowFooterButtton) { |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
/** 按钮事件 */ |
|
|
|
const buttonBaseClick = (val) => { |
|
|
@ -436,7 +444,6 @@ const submitForm = async () => { |
|
|
|
// 主子表——提交请求 |
|
|
|
try { |
|
|
|
const data = unref(formRef)?.formModel |
|
|
|
console.log('data',data) |
|
|
|
emit('submitForm', formType.value, data) |
|
|
|
} finally { |
|
|
|
} |
|
|
|