修改文档库传参

This commit is contained in:
qq787203167
2022-03-01 16:01:19 +08:00
parent 877d467713
commit 6cd41c8eb6
8 changed files with 85 additions and 43 deletions
@@ -268,6 +268,7 @@
validatorRules: {},
confirmLoading: false,
uploadName: '',
type: 'add',
headerText: [
{
text: this.$t('essentialInformation'),
@@ -329,7 +330,7 @@
}
},
mounted() {
this.getForm()
},
methods: {
sumber() {
@@ -447,16 +448,18 @@
this.isFormInline = true
this.confirmLoading = false
},
getForm() {
getForm(callBack) {
this.confirmLoading = true
let params = {
flag: this.flag
flag: this.flag,
type: this.type
}
getAction(this.url.getAddForm, params).then((res) => {
if (res.success) {
this.dataList = res.result
this.ruleList = res.result
this.IntegrateData()
callBack && callBack()
this.headerText.forEach((res) => {
res.content = []
this.dataList.forEach(val => {
@@ -469,18 +472,23 @@
})
},
edit(item) {
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
if (res.success) {
this.formInline = res.result[0]
}
this.type = 'edit'
this.getForm(() => {
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
if (res.success) {
this.formInline = res.result[0]
}
})
})
},
add() {
this.formInline = {}
this.type = 'add'
this.getForm()
},
StandardselectionChange(id){
StandardselectionChange(id) {
this.formInline.replace_standard_id = id
},
}
}
}
</script>