|
|
@ -569,7 +569,16 @@ const emit = defineEmits([ |
|
|
|
'buttonOperationClick', |
|
|
|
'inputStringBlur', |
|
|
|
'onChange', |
|
|
|
'inputNumberChange' |
|
|
|
'inputNumberChange', |
|
|
|
'onBlur', |
|
|
|
'onEnter', |
|
|
|
'inputNumberChange', |
|
|
|
'formFormDateChange', |
|
|
|
'footButtonClick', |
|
|
|
'clearSearchInput', |
|
|
|
'clearInput', |
|
|
|
'sumFormDataHandle', |
|
|
|
'visibleChange' |
|
|
|
]) |
|
|
|
//普通下拉改变事件 |
|
|
|
const formSelectChange = (field, val, row) => { |
|
|
@ -669,6 +678,42 @@ const buttonOperationClick = (row, label, index)=> { |
|
|
|
const inputStringBlur = (headerItem, row, index)=> { |
|
|
|
emit("inputStringBlur", headerItem, row, index); |
|
|
|
} |
|
|
|
let originFormModel = {} |
|
|
|
const updateOriginFormModel = (data) => { |
|
|
|
originFormModel = JSON.parse(JSON.stringify(data)) |
|
|
|
} |
|
|
|
const sumFormDataHandle1 = () => { |
|
|
|
emit( |
|
|
|
'sumFormDataHandle', |
|
|
|
formRef, |
|
|
|
unref(formRef)?.formModel, |
|
|
|
props.tableData, |
|
|
|
formType.value, |
|
|
|
originFormModel, |
|
|
|
updateOriginFormModel |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
watch( |
|
|
|
() => unref(formRef)?.formModel, |
|
|
|
async () => { |
|
|
|
if (props?.sumFormDataByForm && unref(formRef)?.formModel) { |
|
|
|
props?.sumFormDataByForm( |
|
|
|
formRef, |
|
|
|
unref(formRef)?.formModel, |
|
|
|
props.tableData, |
|
|
|
formType.value, |
|
|
|
originFormModel, |
|
|
|
updateOriginFormModel, |
|
|
|
sumFormDataHandle1 |
|
|
|
) |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
deep: true |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|