Commit 155a4121 authored by 盖献康's avatar 盖献康

feat: 创建/修改任务 - 样品信息不允许删除最后一个

parent 8c3e0824
...@@ -140,6 +140,15 @@ export default { ...@@ -140,6 +140,15 @@ export default {
}, },
removeCard(index) { removeCard(index) {
this.cards.splice(index, 1) this.cards.splice(index, 1)
if (index === 0) {
this.cards.push({
flag: 0,
sampleId: '', // 样品编号id
identificationCode: '',
sampleNumber: '',
sampleName: ''
})
}
}, },
emitChange() { emitChange() {
this.$emit('change', this.cards) this.$emit('change', this.cards)
......
...@@ -108,6 +108,14 @@ export default { ...@@ -108,6 +108,14 @@ export default {
}, },
removeCard(index) { removeCard(index) {
this.cards.splice(index, 1) this.cards.splice(index, 1)
if (index === 0) {
this.cards.push({
flag: 1,
sampleId: '', // 样品编号id
sampleNumber: '', // 样品编号
sampleName: '' // 样品名称
})
}
}, },
emitChange() { emitChange() {
this.$emit('change', this.cards) this.$emit('change', this.cards)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment