Compare commits
3 Commits
perf/froze
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d5978214f4 | |||
|
|
cef7915037 | ||
| e06f4a1d89 |
@ -386,8 +386,15 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script setup name="Breeding_records">
|
||||
import {
|
||||
listBreeding_records,
|
||||
@ -447,11 +454,15 @@ const data = reactive({
|
||||
breedType: [
|
||||
{required: true, message: "配种方式不能为空", trigger: "change"}
|
||||
]
|
||||
}
|
||||
},
|
||||
submitting: false
|
||||
})
|
||||
|
||||
const {queryParams, form, rules} = toRefs(data)
|
||||
|
||||
|
||||
|
||||
|
||||
/** 获取配种方式文字显示 */
|
||||
function getBreedTypeText(breedType) {
|
||||
if (breedType === 1) return '同期发情'
|
||||
@ -489,6 +500,7 @@ function handleSortChange({column, prop, order}) {
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false
|
||||
submitting.value = false
|
||||
reset()
|
||||
}
|
||||
|
||||
@ -618,6 +630,28 @@ function getRamInfoByTags() {
|
||||
}
|
||||
}
|
||||
|
||||
// /** 提交按钮 */
|
||||
// function submitForm() {
|
||||
// proxy.$refs["Breeding_recordsRef"].validate(valid => {
|
||||
// if (valid) {
|
||||
// if (form.value.id != null) {
|
||||
// updateBreeding_records(form.value).then(response => {
|
||||
// proxy.$modal.msgSuccess("修改成功")
|
||||
// open.value = false
|
||||
// getList()
|
||||
// })
|
||||
// } else {
|
||||
// addBreeding_records(form.value).then(response => {
|
||||
// proxy.$modal.msgSuccess("新增成功")
|
||||
// open.value = false
|
||||
// getList()
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
/** 提交按钮 */
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["Breeding_recordsRef"].validate(valid => {
|
||||
@ -627,12 +661,18 @@ function submitForm() {
|
||||
proxy.$modal.msgSuccess("修改成功")
|
||||
open.value = false
|
||||
getList()
|
||||
}).catch(error => {
|
||||
console.error('修改失败:', error)
|
||||
proxy.$modal.msgError("修改失败,请查看控制台")
|
||||
})
|
||||
} else {
|
||||
addBreeding_records(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功")
|
||||
open.value = false
|
||||
getList()
|
||||
}).catch(error => {
|
||||
console.error('新增失败:', error)
|
||||
proxy.$modal.msgError("新增失败,请查看控制台")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -948,7 +948,7 @@
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
@ -961,7 +961,7 @@
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['sheep_file:sheep_file:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
||||
@ -176,10 +176,11 @@
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="执行部门" prop="department">
|
||||
<el-select v-model="form.department" placeholder="请选择" style="width: 100%">
|
||||
<input v-model="form.department" placeholder="请输入执行部门" />
|
||||
<!-- <el-select v-model="form.department" placeholder="请选择" style="width: 100%">
|
||||
<el-option label="免疫组" value="免疫组" />
|
||||
<el-option label="饲喂组" value="饲喂组" />
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -684,4 +685,4 @@ getList()
|
||||
min-height: 60px;
|
||||
line-height: 1.6
|
||||
}
|
||||
</style>
|
||||
</style>z
|
||||
Loading…
x
Reference in New Issue
Block a user