🐛fix: 修复统一接口导致的返回问题

This commit is contained in:
yubaolee 2025-06-20 21:01:29 +08:00
parent 878acdacc0
commit 98dad768e5
3 changed files with 6 additions and 6 deletions

View File

@ -343,9 +343,9 @@ const createData = () => {
tempData = setDetails(tempData) tempData = setDetails(tempData)
tempData.OrgId = defaultorgid.value tempData.OrgId = defaultorgid.value
{FirstTableName}s.add(tempData).then(resp => { {FirstTableName}s.add(tempData).then(resp => {
if (resp.result != undefined) { if (resp.data != undefined) {
//如果服务器返回生成的ID //如果服务器返回生成的ID
firstTemp.id = resp.result firstTemp.id = resp.data
} }
mainList.value.unshift(firstTemp) mainList.value.unshift(firstTemp)
editModel.value = false editModel.value = false

View File

@ -332,9 +332,9 @@ const createData = () => {
tempData = setDetails(tempData) tempData = setDetails(tempData)
tempData.OrgId = defaultorgid.value tempData.OrgId = defaultorgid.value
{FirstTableName}s.add(tempData).then(resp => { {FirstTableName}s.add(tempData).then(resp => {
if (resp.result != undefined) { if (resp.data != undefined) {
//如果服务器返回生成的ID //如果服务器返回生成的ID
firstTemp.id = resp.result firstTemp.id = resp.data
} }
mainList.value.unshift(firstTemp) mainList.value.unshift(firstTemp)
editModel.value = false editModel.value = false

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com> * @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com>
* @Date: 2022-05-12 23:34:30 * @Date: 2022-05-12 23:34:30
* @LastEditTime: 2025-04-17 14:50:16 * @LastEditTime: 2025-06-20 20:59:32
* @Description: 2021-08-24 采用通用的列表和表单组件改造 * @Description: 2021-08-24 采用通用的列表和表单组件改造
* 2021-09-14 保持和订单界面一致 * 2021-09-14 保持和订单界面一致
* @Copyright (c) 2023 by yubaolee | ahfu~ , All Rights Reserved. * @Copyright (c) 2023 by yubaolee | ahfu~ , All Rights Reserved.
@ -363,7 +363,7 @@ export default {
let tempData = Object.assign({}, this.firstTemp) let tempData = Object.assign({}, this.firstTemp)
tempData.OrgId = this.defaultorgid tempData.OrgId = this.defaultorgid
builderTables.add(tempData).then((resp) => { builderTables.add(tempData).then((resp) => {
this.firstTemp.id = resp.result this.firstTemp.id = resp.data
this.mainList.unshift(this.firstTemp) this.mainList.unshift(this.firstTemp)
this.editModel = false this.editModel = false
this.rowClickFirstTable(this.firstTemp) this.rowClickFirstTable(this.firstTemp)