From a7c3b22f87a3f05fa85805ab3e26403b7f3eabb2 Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 30 Dec 2024 18:01:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(xumu):=20=E6=96=B0=E5=A2=9E=E6=8A=95?= =?UTF-8?q?=E4=BF=9D=E7=94=B3=E8=AF=B7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加投保申请列表和新增页面 - 实现养殖场、承保公司、保险产品等选择功能 - 添加投保对象选择功能,支持耳标号选择 - 实现投保申请数据的查询、新增、编辑和删除 -优化表格组件,增加隐藏操作列的功能 - 更新耳标号选择组件,支持自定义请求地址 --- .../AppInsuranceApply/AppInsuranceApply.vue | 35 +++++ project/xumu/AppInsuranceApply/add.vue | 132 ++++++++++++++++++ project/xumu/AppInsuranceApply/list.vue | 119 ++++++++++++++++ project/xumu/components/AiEartagPicker.vue | 27 ++-- ui/packages/basic/AiTable.vue | 5 +- 5 files changed, 306 insertions(+), 12 deletions(-) create mode 100644 project/xumu/AppInsuranceApply/AppInsuranceApply.vue create mode 100644 project/xumu/AppInsuranceApply/add.vue create mode 100644 project/xumu/AppInsuranceApply/list.vue diff --git a/project/xumu/AppInsuranceApply/AppInsuranceApply.vue b/project/xumu/AppInsuranceApply/AppInsuranceApply.vue new file mode 100644 index 00000000..6374143d --- /dev/null +++ b/project/xumu/AppInsuranceApply/AppInsuranceApply.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/project/xumu/AppInsuranceApply/add.vue b/project/xumu/AppInsuranceApply/add.vue new file mode 100644 index 00000000..de51a9ad --- /dev/null +++ b/project/xumu/AppInsuranceApply/add.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/project/xumu/AppInsuranceApply/list.vue b/project/xumu/AppInsuranceApply/list.vue new file mode 100644 index 00000000..778b3bc4 --- /dev/null +++ b/project/xumu/AppInsuranceApply/list.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/project/xumu/components/AiEartagPicker.vue b/project/xumu/components/AiEartagPicker.vue index 1157eb30..3fea28e3 100644 --- a/project/xumu/components/AiEartagPicker.vue +++ b/project/xumu/components/AiEartagPicker.vue @@ -4,7 +4,8 @@ export default { props: { instance: Function, value: {default: () => []}, - penId: {default: "", required: true} + action: {default: "/api/breed/earTag/getEarTagByPenId"}, + penId: String }, model: { prop: "value", @@ -18,18 +19,20 @@ export default { } }, watch: { - penId: { + action: { immediate: true, - handler(v) { - this.getEartag(v) + handler() { + this.getEartag() } - } + }, }, methods: { - getEartag(penId) { - penId && this.instance.post("/api/breed/earTag/getEarTagByPenId", null, { - params: {penId} - }).then(res => { + getEartag() { + let url = this.action + if (this.penId) { + url += `?penId=${this.penId}` + } + this.instance.post(url).then(res => { if (res?.data) { this.list = res.data } @@ -38,6 +41,7 @@ export default { handleConfirm() { this.dialog = false this.$emit("input", this.selected) + this.$emit("select", this.list.filter(v => this.selected.includes(v.id))) } } } @@ -45,7 +49,10 @@ export default { - +