| {{e.container_name}} |
{{ options1 | findByValue(e.site)}} |
+ {{ options02 | findByValue(e.roll)}} |
|
@@ -98,8 +118,11 @@
options2: [],
index2: '',
options1: [{value: '1', text: this.$t('select.uppershaft')}, {value: '2', text: this.$t('select.lowershaft')}],
+ options02: [{value: '1', text: this.$t('select.leftroll')}, {value: '2', text: this.$t('select.rightroll')}],
index1: '1',
+ index02: '1',
current: 0,
+ current02: 0,
val1: '',
dataList: [],
disabled: false
@@ -135,6 +158,9 @@
radioChange (e) {
this.index1 = e.detail.value
},
+ radioChange02 (e) {
+ this.index02 = e.detail.value
+ },
handleAdd () {
if (!this.val1.trim()) {
return
@@ -146,6 +172,17 @@
this.dataList.push({container_name: this.val1, site: this.index1})
this.val1 = ''
},
+ handleAdd02 () {
+ if (!this.val1.trim()) {
+ return
+ }
+ const index = this.dataList.findIndex(item => item === this.val1)
+ if (index !== -1) {
+ this.dataList.splice(index, 1)
+ }
+ this.dataList.push({container_name: this.val1, site: this.index1, roll: this.index02})
+ this.val1 = ''
+ },
handleDelete (index) {
this.dataList.splice(index, 1)
},