3 Commits

Author SHA1 Message Date
aixianling
7762eb6d24 fix(xumu): 修复死亡管理和出栏管理中的图片无法回显的问题
- 在 AppDeathManage 和 AppOutManage 组件中,将图片数据转换为 JSON 字符串后提交
- 修复了后端接口对图片数据的接收问题
2025-01-09 16:43:02 +08:00
aixianling
db1a323921 refactor(xumu): 移除表单照片的验证规则
移除了 AppDeathManage 和 AppOutManage 组件中照片上传的验证规则。这个改动统一了照片上传的规则,提高了代码的一致性和可维护性。

受影响的主要文件:
- project/xumu/AppDeathManage/add.vue
- project/xumu/AppOutManage/add.vue

具体改动:
- 删除了 formImages 数组中每个对象的 rules 属性
- 优化了部分代码格式,如空格和换行
2025-01-09 16:39:23 +08:00
aixianling
1a61475f57 fix(xumu): 修复耳标号查询接口的参数传递方式- 将参数从第三个参数移到第二个参数位置,以符合 Axios库的正确用法
-这个修改可以解决耳标号查询功能不工作的问题
2025-01-09 16:36:36 +08:00
3 changed files with 36 additions and 36 deletions

View File

@@ -3,10 +3,10 @@ import {mapState} from "vuex"
import AiEartagRemote from "@project/xumu/components/AiEartagRemote.vue"; import AiEartagRemote from "@project/xumu/components/AiEartagRemote.vue";
const formImages = [ const formImages = [
{label: "身长测量照片", prop: "heightPic", rules: {required: true, message: '请上传 身长测量照片'}}, {label: "身长测量照片", prop: "heightPic",},
{label: "生物芯片照片", prop: "biochipPic", rules: {required: true, message: '请上传 生物芯片照片'}}, {label: "生物芯片照片", prop: "biochipPic",},
{label: "防疫耳标照片", prop: "preventionPic", rules: {required: true, message: '请上传 防疫耳标照片'}}, {label: "防疫耳标照片", prop: "preventionPic",},
{label: "其他说明照片", prop: "otherPic", rules: {required: true, message: '请上传 其他说明照片'}}, {label: "其他说明照片", prop: "otherPic",},
] ]
export default { export default {
name: "deathAdd", name: "deathAdd",
@@ -55,7 +55,7 @@ export default {
this.$refs.detail.validate().then(() => { this.$refs.detail.validate().then(() => {
const {biochipEarNumber, id, deathTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail const {biochipEarNumber, id, deathTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail
this.instance.post("/api/breed/death/addOrEdit", { 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 => { }).then(res => {
if (res?.code == 0 && res?.data != 1) { if (res?.code == 0 && res?.data != 1) {
this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber)) this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber))

View File

@@ -3,10 +3,10 @@ import { mapState } from "vuex"
import AiEartagRemote from "@project/xumu/components/AiEartagRemote.vue"; import AiEartagRemote from "@project/xumu/components/AiEartagRemote.vue";
const formImages = [ const formImages = [
{ label: "身长测量照片", prop: "heightPic", rules: { required: true, message: '请上传 身长测量照片' } }, {label: "身长测量照片", prop: "heightPic",},
{ label: "生物芯片照片", prop: "biochipPic", rules: { required: true, message: '请上传 生物芯片照片' } }, {label: "生物芯片照片", prop: "biochipPic",},
{ label: "防疫耳标照片", prop: "preventionPic", rules: { required: true, message: '请上传 防疫耳标照片' } }, {label: "防疫耳标照片", prop: "preventionPic",},
{ label: "其他说明照片", prop: "otherPic", rules: { required: true, message: '请上传 其他说明照片' } }, {label: "其他说明照片", prop: "otherPic",},
] ]
export default { export default {
name: "outAdd", name: "outAdd",
@@ -56,7 +56,7 @@ export default {
this.$refs.detail.validate().then(() => { this.$refs.detail.validate().then(() => {
const {biochipEarNumber, id, outTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail const {biochipEarNumber, id, outTime, heightPic, biochipPic, preventionPic, otherPic, reason, remarks} = this.detail
this.instance.post("/api/breed/out/addOrEdit", { 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 => { }).then(res => {
if (res?.code == 0 && res?.data != 1) { if (res?.code == 0 && res?.data != 1) {
this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber)) this.$confirm("是否返回列表页?", "提交成功").then(() => this.back()).catch(() => this.getDetail(biochipEarNumber))

View File

@@ -14,7 +14,7 @@ export default {
methods: { methods: {
getText(biochipEarNumber) { getText(biochipEarNumber) {
this.info = {} this.info = {}
return this.instance.post("/api/breed/earTag/page", null, {params: {biochipEarNumber, pageSize: 10, pageNum: 1}}).then(res => { return this.instance.post("/api/breed/earTag/page", {params: {biochipEarNumber, pageSize: 10, pageNum: 1}}).then(res => {
if (res?.data?.records) { if (res?.data?.records) {
this.info = res.data.records[0] this.info = res.data.records[0]
this.$emit('enter', this.info) this.$emit('enter', this.info)