修改标准选择的回显
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
components: {
|
components: {
|
||||||
currencySearch
|
currencySearch
|
||||||
},
|
},
|
||||||
props: ['query', 'value', 'replace_standard_id'],
|
props: ['query', 'value', 'standard'],
|
||||||
computed: {
|
computed: {
|
||||||
isDisabled() {
|
isDisabled() {
|
||||||
if (this.query.db_field_name === 'replaced_standard') {
|
if (this.query.db_field_name === 'replaced_standard') {
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
standardClick() {
|
standardClick() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
this.replacePage(this.replace_standard_id)
|
this.replacePage()
|
||||||
},
|
},
|
||||||
replacePage() {
|
replacePage() {
|
||||||
let query = {
|
let query = {
|
||||||
@@ -125,9 +125,7 @@
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataList = res.result.records
|
this.dataList = res.result.records
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
if (this.replace_standard_id) {
|
this.selectedRowKeys = this.standard[this.query.db_field_name + '_id'] ? this.standard[this.query.db_field_name + '_id'].split(',') : []
|
||||||
this.selectedRowKeys = this.replace_standard_id.split(',')
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
}
|
}
|
||||||
@@ -144,7 +142,7 @@
|
|||||||
replace_standard_id.push(res.id)
|
replace_standard_id.push(res.id)
|
||||||
})
|
})
|
||||||
this.$emit('input', content.join(','))
|
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
|
this.visible = false
|
||||||
},
|
},
|
||||||
indexclick(event) {
|
indexclick(event) {
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
<Standardselection :query="item"
|
<Standardselection :query="item"
|
||||||
@change="StandardselectionChange"
|
@change="StandardselectionChange"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:replace_standard_id="formInline.replace_standard_id"
|
:standard="formInline"
|
||||||
v-model="formInline[item.db_field_name]"/>
|
v-model="formInline[item.db_field_name]"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -486,8 +486,8 @@
|
|||||||
this.type = 'add'
|
this.type = 'add'
|
||||||
this.getForm()
|
this.getForm()
|
||||||
},
|
},
|
||||||
StandardselectionChange(id) {
|
StandardselectionChange(value, id) {
|
||||||
this.formInline.replace_standard_id = id
|
this.formInline[value + '_id'] = id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user