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