fix(xumu): 修复死亡管理和出栏管理中的图片无法回显的问题

- 在 AppDeathManage 和 AppOutManage 组件中,将图片数据转换为 JSON 字符串后提交
- 修复了后端接口对图片数据的接收问题
This commit is contained in:
aixianling
2025-01-09 16:43:02 +08:00
parent db1a323921
commit 7762eb6d24
2 changed files with 2 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ export default {
this.$refs.detail.validate().then(() => {
const {biochipEarNumber, id, deathTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail
this.instance.post("/api/breed/death/addOrEdit", {
biochipEarNumber, id, deathTime, picture: {heightPic, biochipPic, preventionPic, otherPic}, reason, remarks
biochipEarNumber, id, deathTime, picture: JSON.stringify({heightPic, biochipPic, preventionPic, otherPic}), reason, remarks
}).then(res => {
if (res?.code == 0 && res?.data != 1) {
this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber))

View File

@@ -56,7 +56,7 @@ export default {
this.$refs.detail.validate().then(() => {
const {biochipEarNumber, id, outTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail
this.instance.post("/api/breed/out/addOrEdit", {
biochipEarNumber, id, outTime, picture: {heightPic, biochipPic, preventionPic, otherPic}, reason, remarks
biochipEarNumber, id, deathTime, picture: JSON.stringify({heightPic, biochipPic, preventionPic, otherPic}), reason, remarks
}).then(res => {
if (res?.code == 0 && res?.data != 1) {
this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber))