|
@@ -9,18 +9,20 @@
|
|
<el-col :span="4">
|
|
<el-col :span="4">
|
|
<el-button type="primary" @click="getSeedSheepList">查找</el-button>
|
|
<el-button type="primary" @click="getSeedSheepList">查找</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="4">
|
|
|
|
|
|
+ <el-col :span="10">
|
|
<el-button type="primary" @click="add">新增档案</el-button>
|
|
<el-button type="primary" @click="add">新增档案</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="4">
|
|
|
|
+ <el-button-group>
|
|
|
|
+ <el-button :type="sheepType==0?'primary':''" @click="shiftSheepType(0)">种母羊</el-button>
|
|
|
|
+ <el-button :type="sheepType==1?'primary':''" @click="shiftSheepType(1)">种公羊</el-button>
|
|
|
|
+ </el-button-group>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</header>
|
|
</header>
|
|
<section>
|
|
<section>
|
|
<article class="table">
|
|
<article class="table">
|
|
- <el-table
|
|
|
|
- :data="tableData"
|
|
|
|
- tooltip-effect="dark"
|
|
|
|
- style="width: 100%"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table :data="tableData" tooltip-effect="dark" style="width: 100%">
|
|
<el-table-column prop="id" label="种母羊编码" width="100"></el-table-column>
|
|
<el-table-column prop="id" label="种母羊编码" width="100"></el-table-column>
|
|
<el-table-column label="入场时间" width="200">
|
|
<el-table-column label="入场时间" width="200">
|
|
<template v-slot="scope">
|
|
<template v-slot="scope">
|
|
@@ -48,7 +50,9 @@
|
|
<el-table-column prop="feederName" label="饲养员">
|
|
<el-table-column prop="feederName" label="饲养员">
|
|
<template v-slot="scope">
|
|
<template v-slot="scope">
|
|
<div v-for="item in $store.state['workerList']" :key="item.value">
|
|
<div v-for="item in $store.state['workerList']" :key="item.value">
|
|
- <span v-if="item.id == scope.row['feeder']">{{ `${item.name}(${item.position})` }}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ v-if="item.id == scope.row['feeder']"
|
|
|
|
+ >{{ `${item.name}(${item.position})` }}</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -174,6 +178,7 @@ export default {
|
|
return {
|
|
return {
|
|
page: 1,
|
|
page: 1,
|
|
searchStr: "",
|
|
searchStr: "",
|
|
|
|
+ sheepType: 0,
|
|
tableData: [],
|
|
tableData: [],
|
|
totalPages: 0,
|
|
totalPages: 0,
|
|
isShow: false,
|
|
isShow: false,
|
|
@@ -185,7 +190,7 @@ export default {
|
|
status: 1,
|
|
status: 1,
|
|
cost: 3000,
|
|
cost: 3000,
|
|
weight: 48,
|
|
weight: 48,
|
|
- feeder: this.$store.state['workerList'][0].id,
|
|
|
|
|
|
+ feeder: this.$store.state["workerList"][0].id,
|
|
level: 1
|
|
level: 1
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -218,6 +223,7 @@ export default {
|
|
reqSeedSheepList({
|
|
reqSeedSheepList({
|
|
pageNum: this.page,
|
|
pageNum: this.page,
|
|
pageSize,
|
|
pageSize,
|
|
|
|
+ gender: this.sheepType,
|
|
searchStr: this.searchStr
|
|
searchStr: this.searchStr
|
|
})
|
|
})
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -228,6 +234,12 @@ export default {
|
|
console.log(err);
|
|
console.log(err);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 羊类型切换
|
|
|
|
+ shiftSheepType(sheepType) {
|
|
|
|
+ if(sheepType == this.sheepType) return
|
|
|
|
+ this.sheepType = sheepType
|
|
|
|
+ this.getSeedSheepList()
|
|
|
|
+ },
|
|
|
|
|
|
add() {
|
|
add() {
|
|
this.isShow = true;
|
|
this.isShow = true;
|