群内调栏
This commit is contained in:
@@ -32,6 +32,15 @@
|
||||
<el-button size="small" type="primary" @click.stop="showAddPenDialog(batch)" :disabled="!batch.is_active">
|
||||
增加猪栏
|
||||
</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="success"
|
||||
@click.stop="emitTransferPigs(batch)"
|
||||
:disabled="!batch.is_active || !batch.pens || batch.pens.length < 2"
|
||||
title="将猪从一个猪栏转移到同一批次的另一个猪栏"
|
||||
>
|
||||
群内调栏
|
||||
</el-button>
|
||||
<el-button size="small" @click.stop="emitEditBatch(batch)">编辑</el-button>
|
||||
<el-button size="small" type="danger" @click.stop="emitDeleteBatch(batch)">删除</el-button>
|
||||
</div>
|
||||
@@ -100,7 +109,7 @@ export default {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
emits: ['edit-batch', 'delete-batch', 'add-pen', 'remove-pen', 'assign-pen-to-batch', 'reload-data'],
|
||||
emits: ['edit-batch', 'delete-batch', 'add-pen', 'remove-pen', 'assign-pen-to-batch', 'reload-data', 'transfer-pigs'],
|
||||
data() {
|
||||
return {
|
||||
addPenDialogVisible: false,
|
||||
@@ -181,6 +190,9 @@ export default {
|
||||
emitDeleteBatch(batch) {
|
||||
this.$emit('delete-batch', batch);
|
||||
},
|
||||
emitTransferPigs(batch) {
|
||||
this.$emit('transfer-pigs', batch);
|
||||
},
|
||||
// 猪栏操作
|
||||
emitRemovePen(pen) {
|
||||
this.$emit('remove-pen', pen);
|
||||
|
||||
Reference in New Issue
Block a user