修改禅道已知bug
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
/>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
rowKey="serial_number"
|
||||
:scroll="{x: 1500}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
@@ -132,7 +132,7 @@
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records
|
||||
this.total = res.result.total
|
||||
this.selectedRowKeys = this.standard[this.query.db_field_name + '_id'] ? this.standard[this.query.db_field_name + '_id'].split(',') : []
|
||||
this.selectedRowKeys = this.standard[this.query.db_field_name] ? this.standard[this.query.db_field_name].split(',') : []
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
@@ -143,15 +143,16 @@
|
||||
},
|
||||
handleSubmit() {
|
||||
let content = []
|
||||
let replace_standard_id = []
|
||||
if (this.content && this.content.length > 0) {
|
||||
this.content.forEach(res => {
|
||||
content.push(res.serial_number)
|
||||
replace_standard_id.push(res.id)
|
||||
})
|
||||
// let replace_standard_id = []
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let content = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
// this.content.forEach(res => {
|
||||
// content.push(res.serial_number)
|
||||
// replace_standard_id.push(res.id)
|
||||
// })
|
||||
this.$emit('input', content.join(','))
|
||||
this.$emit('change', this.query.db_field_name, replace_standard_id.join(','))
|
||||
this.$emit('changecontent', this.content)
|
||||
// this.$emit('change', this.query.db_field_name, replace_standard_id.join(','))
|
||||
// this.$emit('changecontent', this.content)
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
@@ -161,15 +162,16 @@
|
||||
this.$emit('input', event.target.value)
|
||||
},
|
||||
onSelectChange(value) {
|
||||
console.log(value)
|
||||
this.selectedRowKeys = value
|
||||
this.content = []
|
||||
value.forEach(val => {
|
||||
this.dataList.forEach((res) => {
|
||||
if (res.id === val) {
|
||||
this.content.push(res)
|
||||
}
|
||||
})
|
||||
})
|
||||
// this.content = []
|
||||
// value.forEach(val => {
|
||||
// this.dataList.forEach((res) => {
|
||||
// if (res.id === val) {
|
||||
// this.content.push(res)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
},
|
||||
searchQuery(queryParam) {
|
||||
let queryParamQuery = JSON.parse(JSON.stringify(queryParam))
|
||||
|
||||
Reference in New Issue
Block a user