修改标准选择的回显

This commit is contained in:
qq787203167
2022-03-01 16:33:32 +08:00
parent 6cd41c8eb6
commit 54494bb399
2 changed files with 7 additions and 9 deletions
@@ -60,7 +60,7 @@
components: {
currencySearch
},
props: ['query', 'value', 'replace_standard_id'],
props: ['query', 'value', 'standard'],
computed: {
isDisabled() {
if (this.query.db_field_name === 'replaced_standard') {
@@ -110,7 +110,7 @@
standardClick() {
this.visible = true
this.queryParam = {}
this.replacePage(this.replace_standard_id)
this.replacePage()
},
replacePage() {
let query = {
@@ -125,9 +125,7 @@
if (res.success) {
this.dataList = res.result.records
this.total = res.result.total
if (this.replace_standard_id) {
this.selectedRowKeys = this.replace_standard_id.split(',')
}
this.selectedRowKeys = this.standard[this.query.db_field_name + '_id'] ? this.standard[this.query.db_field_name + '_id'].split(',') : []
} else {
this.dataList = []
}
@@ -144,7 +142,7 @@
replace_standard_id.push(res.id)
})
this.$emit('input', content.join(','))
this.$emit('change', replace_standard_id.join(','))
this.$emit('change',this.query.db_field_name,replace_standard_id.join(','))
this.visible = false
},
indexclick(event) {
@@ -158,7 +158,7 @@
<Standardselection :query="item"
@change="StandardselectionChange"
:disabled="disabled"
:replace_standard_id="formInline.replace_standard_id"
:standard="formInline"
v-model="formInline[item.db_field_name]"/>
</a-form-model-item>
</div>
@@ -486,8 +486,8 @@
this.type = 'add'
this.getForm()
},
StandardselectionChange(id) {
this.formInline.replace_standard_id = id
StandardselectionChange(value, id) {
this.formInline[value + '_id'] = id
}
}
}