diff --git a/jero-web/src/components/Standardselection/index.vue b/jero-web/src/components/Standardselection/index.vue index 951eccf69..7daf147bf 100644 --- a/jero-web/src/components/Standardselection/index.vue +++ b/jero-web/src/components/Standardselection/index.vue @@ -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) { diff --git a/jero-web/src/components/libraryAddForm/index.vue b/jero-web/src/components/libraryAddForm/index.vue index 2e8393dc5..e5e50e971 100644 --- a/jero-web/src/components/libraryAddForm/index.vue +++ b/jero-web/src/components/libraryAddForm/index.vue @@ -158,7 +158,7 @@ @@ -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 } } }