3 Commits

Author SHA1 Message Date
aixianling
9aed740388 fix(AppDeathAudit): 修改导出接口地址
- 将导出接口地址从 "/api/breed/death/export" 修改为 "/api/breed/death/exportAudit"
- 该修改确保了正确的数据被导出,解决了错误导出的问题
2025-01-21 09:21:51 +08:00
aixianling
8a20db021a refactor(xumu): 优化获取详情数据接口及处理逻辑
- 修改请求接口地址:将 "/api/breed/death/page" 更改为 "/api/breed/death/getAuditPage"
- 优化数据处理逻辑:直接使用 res.data 代替 res.data.records[0]
2025-01-21 09:21:06 +08:00
aixianling
8daf15cf3f refactor(xumu): 修改 AppOutAudit 详情获取接口
- 将 getAuditInfo 接口更改为 getAuditPage 接口
- 更新接口 URL 以适应后端接口变更
2025-01-21 09:20:06 +08:00
3 changed files with 5 additions and 5 deletions

View File

@@ -34,9 +34,9 @@ export default {
}, },
getDetail() { getDetail() {
const {id} = this.$route.query const {id} = this.$route.query
return id && this.instance.post("/api/breed/death/page", null, {params: {id}}).then(res => { return id && this.instance.post("/api/breed/death/getAuditPage", null, {params: {id}}).then(res => {
if (res?.data?.records) { if (res?.data) {
const detail = res.data.records[0] || {} const detail = res.data || {}
if (detail.picture) { if (detail.picture) {
Object.entries(JSON.parse(detail.picture)).forEach(([key, value]) => { Object.entries(JSON.parse(detail.picture)).forEach(([key, value]) => {
detail[key] = value detail[key] = value

View File

@@ -82,7 +82,7 @@ export default {
</ai-search-bar> </ai-search-bar>
<ai-search-bar> <ai-search-bar>
<template #left> <template #left>
<ai-download :instance="instance" url="/api/breed/death/export" :params="{...search,...page}" :fileName="`${pageTitle}导出表-${Date.now()}`"/> <ai-download :instance="instance" url="/api/breed/death/exportAudit" :params="{...search,...page}" :fileName="`${pageTitle}导出表-${Date.now()}`"/>
</template> </template>
</ai-search-bar> </ai-search-bar>
<ai-table :tableData="tableData" :colConfigs="columns" :dict="dict" @getList="getTableData" <ai-table :tableData="tableData" :colConfigs="columns" :dict="dict" @getList="getTableData"

View File

@@ -41,7 +41,7 @@ export default {
}, },
getDetail() { getDetail() {
const {id} = this.$route.query const {id} = this.$route.query
return id && this.instance.post("/api/breed/out/getAuditInfo", null, {params: {id}}).then(res => { return id && this.instance.post("/api/breed/out/getAuditPage", null, {params: {id}}).then(res => {
if (res?.data) { if (res?.data) {
const detail = res.data const detail = res.data
return this.detail = {...detail} return this.detail = {...detail}