体尺测量,体况评分,乳房评分缺失字段的添加,改品种页面展示原品种
This commit is contained in:
@@ -8,6 +8,20 @@
|
||||
<el-input v-model="queryParams.manageTags" placeholder="请输入耳号搜索" clearable @keyup.enter="handleQuery"
|
||||
style="max-width: 160px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="品种" prop="varietyId">
|
||||
<el-select v-model="queryParams.varietyId" placeholder="请选择品种" clearable style="min-width:150px">
|
||||
<el-option v-for="item in varietyOptions" :key="item.id" :label="item.variety" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="事件日期" style="width: 308px">
|
||||
<el-date-picker v-model="daterangeEventDate" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="羊舍" prop="sheepfoldId">
|
||||
<el-select v-model="queryParams.sheepfoldId" placeholder="请选择羊舍" style="min-width:150px" clearable>
|
||||
<el-option v-for="item in sheepfoldOptions" :key="item.id" :label="item.sheepfoldName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" style="width: 308px">
|
||||
<el-date-picker v-model="daterangeCreateTime" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||
@@ -23,10 +37,10 @@
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['breast_rating:breast_rating:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['breast_rating:breast_rating:edit']">修改</el-button>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['breast_rating:breast_rating:remove']">删除</el-button>
|
||||
@@ -42,25 +56,33 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="${comment}" align="center" prop="id" /> -->
|
||||
<!-- <el-table-column label="羊只id" align="center" prop="sheepId" /> -->
|
||||
<el-table-column label="管理耳号" align="center" prop="manageTags" />
|
||||
<el-table-column label="管理耳号" align="center" prop="manageTags" min-width="100px" fixed />
|
||||
<el-table-column label="品种" align="center" prop="varietyName" />
|
||||
<el-table-column label="事件类型" align="center" prop="eventType" />
|
||||
<el-table-column label="事件日期" align="center" prop="eventDate" min-width="120px">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.eventDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="羊舍" align="center" prop="sheepfoldName" min-width="120px" />
|
||||
<el-table-column label="乳房深度" align="center" prop="depth" />
|
||||
<el-table-column label="乳房长度" align="center" prop="length" />
|
||||
<el-table-column label="乳房位置" align="center" prop="position" />
|
||||
<el-table-column label="乳房附着" align="center" prop="adbere" />
|
||||
<el-table-column label="乳房间隔度" align="center" prop="spacing" />
|
||||
<el-table-column label="乳房间隔度" align="center" prop="spacing" min-width="120px" />
|
||||
<el-table-column label="乳房评分" align="center" prop="score" />
|
||||
<el-table-column label="备注" align="center" prop="comment" />
|
||||
<el-table-column label="技术员" align="center" prop="technician" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" min-width="150">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="120px">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="120px" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['breast_rating:breast_rating:edit']">修改</el-button>
|
||||
<!-- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['breast_rating:breast_rating:edit']">修改</el-button> -->
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['breast_rating:breast_rating:remove']">删除</el-button>
|
||||
</template>
|
||||
@@ -80,6 +102,11 @@
|
||||
<el-input v-model="form.manageTags" placeholder="请输入管理耳号" @blur="onManageTagsBlur" clearable
|
||||
:disabled="!isAdd" />
|
||||
</el-form-item>
|
||||
<el-form-item label="事件日期" prop="eventDate">
|
||||
<el-date-picker clearable v-model="form.eventDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择事件日期"
|
||||
:disabled="!isAdd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="乳房深度" prop="depth">
|
||||
<el-input v-model="form.depth" placeholder="请输入乳房深度" :disabled="!isAdd" />
|
||||
</el-form-item>
|
||||
@@ -117,7 +144,8 @@
|
||||
|
||||
<script setup name="Breast_rating">
|
||||
import { listBreast_rating, getBreast_rating, delBreast_rating, addBreast_rating, updateBreast_rating } from "@/api/produce/bodyManage/breast_rating"
|
||||
import { checkSheepByManageTags } from "@/api/produce/other/fixHoof"
|
||||
import { checkSheepByManageTags, getVarietyOptions } from "@/api/produce/other/fixHoof"
|
||||
import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management'
|
||||
import { getCurrentInstance, reactive, ref } from "vue"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
@@ -132,11 +160,13 @@ const multiple = ref(true)
|
||||
const total = ref(0)
|
||||
const title = ref("")
|
||||
const daterangeCreateTime = ref([])
|
||||
const daterangeEventDate = ref([]);
|
||||
const isAdd = ref(false)
|
||||
const data = reactive({
|
||||
form: {
|
||||
id: null,
|
||||
manageTags: null,
|
||||
eventDate: null,
|
||||
depth: null,
|
||||
length: null,
|
||||
position: null,
|
||||
@@ -170,6 +200,10 @@ const { queryParams, form, rules } = toRefs(data)
|
||||
function getList() {
|
||||
loading.value = true
|
||||
queryParams.value.params = {}
|
||||
if (daterangeEventDate.value.length) {
|
||||
queryParams.value.params["beginEventDate"] = daterangeEventDate.value[0]
|
||||
queryParams.value.params["endEventDate"] = daterangeEventDate.value[1]
|
||||
}
|
||||
if (daterangeCreateTime.value.length) {
|
||||
queryParams.value.params["beginCreateTime"] = daterangeCreateTime.value[0]
|
||||
queryParams.value.params["endCreateTime"] = daterangeCreateTime.value[1]
|
||||
@@ -241,6 +275,7 @@ function handleQuery() {
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
daterangeCreateTime.value = []
|
||||
daterangeEventDate.value = [];
|
||||
proxy.resetForm("queryRef")
|
||||
handleQuery()
|
||||
}
|
||||
@@ -315,5 +350,25 @@ function handleExport() {
|
||||
}, `breast_rating_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList()
|
||||
//加载羊舍数据
|
||||
const sheepfoldOptions = ref([])
|
||||
function getSheepfoldOptions() {
|
||||
listSheepfold({ pageNum: 1, pageSize: 9999 }).then(res => {
|
||||
sheepfoldOptions.value = res.rows
|
||||
})
|
||||
}
|
||||
|
||||
//加载品种数据
|
||||
const varietyOptions = ref([])
|
||||
function loadVarietyOptions() {
|
||||
getVarietyOptions({ pageNum: 1, pageSize: 9999 }).then(res => {
|
||||
varietyOptions.value = res.rows;
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadVarietyOptions()
|
||||
getSheepfoldOptions()
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user