|
@@ -6,9 +6,15 @@
|
|
|
<el-col :span="4">
|
|
|
<el-input v-model="search" placeholder="请输入"></el-input>
|
|
|
</el-col>
|
|
|
- <el-col :span="4">
|
|
|
+ <el-col :span="14">
|
|
|
<el-button type="primary" @click="getGradeAssessList">查找</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-button-group>
|
|
|
+ <el-button :type="gender==0?'primary':''" @click="shiftGender(0)">种母羊</el-button>
|
|
|
+ <el-button :type="gender==1?'primary':''" @click="shiftGender(1)">种公羊</el-button>
|
|
|
+ </el-button-group>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</header>
|
|
|
<section>
|
|
@@ -39,7 +45,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="150">
|
|
|
<template v-slot="scope">
|
|
|
- <el-button @click="goVirtualMating(scope.row)" type="text" size="small">虚拟配种</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="goVirtualMating(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ v-if="gender==0"
|
|
|
+ >虚拟配种</el-button>
|
|
|
<el-button @click="goClan(scope.row)" type="text" size="small">查看系谱</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -72,6 +83,7 @@ export default {
|
|
|
let _this = this;
|
|
|
return {
|
|
|
search: "",
|
|
|
+ gender: 0,
|
|
|
pageNum: 1,
|
|
|
tableData: [],
|
|
|
totalPages: 0,
|
|
@@ -108,7 +120,7 @@ export default {
|
|
|
reqGradeAssessList({
|
|
|
searchStr: this.search,
|
|
|
pageSize,
|
|
|
- // gender: 1,
|
|
|
+ gender: this.gender,
|
|
|
pageNum: this.pageNum
|
|
|
})
|
|
|
.then(res => {
|
|
@@ -119,19 +131,24 @@ export default {
|
|
|
console.log(err);
|
|
|
});
|
|
|
},
|
|
|
+ shiftGender(gender) {
|
|
|
+ this.gender = gender;
|
|
|
+ // 等级评定列表
|
|
|
+ this.getGradeAssessList();
|
|
|
+ },
|
|
|
goVirtualMating(row) {
|
|
|
- console.log(row)
|
|
|
+ console.log(row);
|
|
|
this.$router.push({
|
|
|
path: "virtualMating",
|
|
|
query: row
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
goClan(row) {
|
|
|
- console.log(row)
|
|
|
+ console.log(row);
|
|
|
this.$router.push({
|
|
|
path: "clan",
|
|
|
query: row
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
pageChange(p) {
|
|
|
console.log(p);
|