diff --git a/project/xumu/AppInsuranceAudit/add.vue b/project/xumu/AppInsuranceAudit/add.vue index b90ef26a..6118ab8d 100644 --- a/project/xumu/AppInsuranceAudit/add.vue +++ b/project/xumu/AppInsuranceAudit/add.vue @@ -104,8 +104,10 @@ export default { userId && this.instance.post("/api/siteUser/querySiteByUserId", null, { params: { userId } }).then(res => { - if (res?.data) { - this.$set(this.detail, "farmId", res.data?.[0]?.id) + if (res?.data?.[0]) { + const { id } = res.data[0] + this.$set(this.detail, "farmId", id) + this.$set(this.detail, "targetUser", userId) } }) } @@ -126,7 +128,7 @@ export default { + :action="`/api/siteUser/querySiteByUserId?userId=${detail.targetUser}`" :prop="{ label: 'name' }" /> @@ -185,7 +187,7 @@ export default { - + diff --git a/project/xumu/components/AiEartagPicker.vue b/project/xumu/components/AiEartagPicker.vue index f1705d22..f26d096a 100644 --- a/project/xumu/components/AiEartagPicker.vue +++ b/project/xumu/components/AiEartagPicker.vue @@ -3,10 +3,10 @@ export default { name: "AiEartagPicker", props: { instance: Function, - value: {default: () => []}, - action: {default: "/api/breed/earTag/getEarTagByPenId"}, + value: { default: () => [] }, + action: { default: "/api/breed/earTag/getEarTagByPenId" }, penId: String, - valueKey: String + valueKey: { type: String, default: "biochipEarNumber" } }, model: { prop: "value", @@ -45,9 +45,9 @@ export default { this.origin = res.data ?? [] this.list = res.data?.map(v => { if (typeof v == 'string') { - return {key: v, label: v} + return { key: v, label: v } } else if (key) { - return {key: v[key], label: v[key]} + return { key: v[key], label: v[key] } } }) || [] } @@ -65,15 +65,15 @@ export default { @@ -95,7 +95,7 @@ export default { right: 0; z-index: 999; - & > div { + &>div { height: 100%; } }