From beba5e0674a0b58ee1f79e7da49c70c4b0377d3e Mon Sep 17 00:00:00 2001
From: rjg <746338628@qq.com>
Date: Fri, 18 Apr 2025 09:51:36 +0800
Subject: [PATCH] 优化错误返回值
---
src/views/tickets/orderLog.vue | 10 +++++-----
src/api/system/dictbiz.js | 11 +++++++++++
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/api/system/dictbiz.js b/src/api/system/dictbiz.js
index 6c7ee7e..8b5561a 100644
--- a/src/api/system/dictbiz.js
+++ b/src/api/system/dictbiz.js
@@ -86,3 +86,14 @@
params,
});
};
+
+export const getDictionaryByCode = codes => {
+ return request({
+ url: '/blade-system/dict-biz/listByCodes',
+ method: 'get',
+ params: {
+ codes
+ },
+ });
+};
+
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 28d407a..de3735b 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -335,7 +335,7 @@
deleteOrderLog
} from '@/api/tickets/orderLog'
import { getTicketInfo } from '@/api/tickets/ticket'
-import { getDictionary } from '@/api/system/dictbiz'
+import { getDictionaryByCode } from '@/api/system/dictbiz'
import { getWaylineFileListByArea } from '@/api/resource/wayline'
import { export_json_to_excel } from '@/utils/exportExcel'
import { getFlyingNestBy } from '@/api/device/device'
@@ -452,10 +452,10 @@
}
},
async created() {
- var response = await getDictionary({ code: 'SF' })
- var word_order_typeResponse = await getDictionary({ code: 'WORK_ORDER_TYPE' })
- this.ai_types = response.data.data
- this.types = word_order_typeResponse.data.data
+ var response = await getDictionaryByCode('SF')
+ var word_order_typeResponse = await getDictionaryByCode('WORK_ORDER_TYPE' )
+ this.ai_types = response.data.data['SF']
+ this.types = word_order_typeResponse.data.data['WORK_ORDER_TYPE'];
//获取航线
this.asyncgetWaylineFileListByArea()
const response2 = await getTicketInfo()
--
Gitblit v1.9.3