Browse Source

[SBBJ-837][上传文件公共组件迁移方法]

master
zengqinyuan 1 month ago
parent
commit
831927ac5f
  1. 47
      src/components/BasicForm/src/BasicForm.vue
  2. 2
      src/views/system/systemInstallPackage/index.vue
  3. 2
      src/views/system/systemInstallPackage/systemInstallPackage.data.ts

47
src/components/BasicForm/src/BasicForm.vue

@ -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>

2
src/views/system/systemInstallPackage/index.vue

@ -45,7 +45,7 @@
console.log(formModel)
const {uploadFile} = formModel
formRef.value.setValues({
installPackageUrl:uploadFile
installPackageUrl:uploadFile[0].url
})
}"
@success="formsSuccess"

2
src/views/system/systemInstallPackage/systemInstallPackage.data.ts

@ -41,7 +41,7 @@ export const SystemInstallPackage = useCrudSchemas(reactive<CrudSchema[]>([
form: {
value:'',
componentProps: {
// disabled: true
disabled: true
},
}
},

Loading…
Cancel
Save