更换测试环境接口地址,完善订单分析

This commit is contained in:
Double-_-Z 2025-08-21 10:59:56 +08:00
parent fc06113b16
commit 0b4b0802b2
5 changed files with 46 additions and 17 deletions

View File

@ -2,7 +2,7 @@ ENV = 'development'
# 接口地址 # 接口地址
# VUE_APP_BASE_API = 'http://localhost:8000' # VUE_APP_BASE_API = 'http://localhost:8000'
VUE_APP_BASE_API = 'http://8.138.171.103/aerocraftAdminApi' VUE_APP_BASE_API = 'http://8.130.155.168/aerocraftAdminApi'
# VUE_APP_BASE_API = 'https://webapi.aishangfeixing.com/aerocraftAdminApi/' # VUE_APP_BASE_API = 'https://webapi.aishangfeixing.com/aerocraftAdminApi/'
# VUE_APP_BASE_API = 'https://eladmin.vip' # VUE_APP_BASE_API = 'https://eladmin.vip'
# VUE_APP_WS_API = 'ws://localhost:8000' # VUE_APP_WS_API = 'ws://localhost:8000'

View File

@ -2,10 +2,10 @@ ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇Nginx 配置 # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http # 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http
VUE_APP_BASE_API = 'http://8.138.171.103/aerocraftAdminApi' VUE_APP_BASE_API = 'http://8.130.155.168/aerocraftAdminApi'
# VUE_APP_BASE_API = 'https://webapi.aishangfeixing.com/aerocraftAdminApi/' # VUE_APP_BASE_API = 'https://webapi.aishangfeixing.com/aerocraftAdminApi/'
# 运行基本路径 # 运行基本路径
VUE_APP_BASE_PATH = 'http://8.138.171.103/aerocraftAdmin' VUE_APP_BASE_PATH = 'http://8.130.155.168/aerocraftAdmin'
# VUE_APP_BASE_PATH = 'https://admin.aishangfeixing.com' # VUE_APP_BASE_PATH = 'https://admin.aishangfeixing.com'
# 如果接口是 http 形式, wss 需要改为 ws # 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'wss://eladmin.vip' VUE_APP_WS_API = 'wss://eladmin.vip'

View File

@ -9,6 +9,14 @@ export function get(params) {
}) })
} }
// 查询全部飞行器设备
export function allAircraft() {
return request({
url: 'api/dataDropdown/obtainDeviceList',
method: 'get',
})
}
// 删除飞行器设备 // 删除飞行器设备
export function del(id) { export function del(id) {
return request({ return request({
@ -95,4 +103,4 @@ export function editInsurance(data) {
}) })
} }
export default { get, del, add, edit, getMaintenanceRecords, getInsuranceRecords, addInsurance, getInsuranceDetail, deleteInsurance, editInsurance, getDeviceDetail } export default { get, allAircraft, del, add, edit, getMaintenanceRecords, getInsuranceRecords, addInsurance, getInsuranceDetail, deleteInsurance, editInsurance, getDeviceDetail }

View File

@ -572,8 +572,8 @@ export default {
const params = { const params = {
startDate: this.filter.startDate, startDate: this.filter.startDate,
endDate: this.filter.endDate, endDate: this.filter.endDate,
pageNum: this.pagination.currentPage, size: this.pagination.pageSize,
pageSize: this.pagination.pageSize, page: this.pagination.currentPage,
...(this.filter.sortField && { ...(this.filter.sortField && {
sortField: this.filter.sortField, sortField: this.filter.sortField,
sortOrder: this.filter.sortOrder sortOrder: this.filter.sortOrder

View File

@ -92,8 +92,12 @@
class="task-detail-table" class="task-detail-table"
v-loading="loading" v-loading="loading"
> >
<el-table-column prop="orderId" label="订单编号" min-width="150" /> <el-table-column sortable prop="orderNo" label="订单编号" min-width="150" />
<el-table-column prop="deviceId" label="设备名称" min-width="150" show-overflow-tooltip /> <el-table-column prop="deviceId" label="设备名称" min-width="150" show-overflow-tooltip>
<template #default="{row}">
{{ deviceMap[row.deviceId] || '-' }}
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="160" /> <el-table-column prop="createTime" label="创建时间" min-width="160" />
<el-table-column prop="operatorName" label="操作员" min-width="150" /> <el-table-column prop="operatorName" label="操作员" min-width="150" />
<el-table-column <el-table-column
@ -146,12 +150,14 @@ import {
getYearlyOrderAnalysis getYearlyOrderAnalysis
} from '@/api/analysis/taskAnalysis' } from '@/api/analysis/taskAnalysis'
import { getAllPilots } from '@/api/system/pilot' import { getAllPilots } from '@/api/system/pilot'
import { allAircraft } from "@/api/aircraft";
export default { export default {
name: 'taskAnalysis', name: 'taskAnalysis',
data() { data() {
return { return {
operatorsMap: {}, operatorsMap: {},
deviceMap: {},
pagination: { pagination: {
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
@ -211,9 +217,11 @@ export default {
// //
statusFilters() { statusFilters() {
return [ return [
{ text: '未开始', value: 0 }, { text: '未进行', value: 0 },
{ text: '进行中', value: 1 },
{ text: '已完成', value: 2 }, { text: '已完成', value: 2 },
{ text: '已失败', value: 3 } { text: '已取消', value: 3 },
{ text: '待确认', value: 4 },
] ]
}, },
datePickerType() { datePickerType() {
@ -242,6 +250,7 @@ export default {
this.initDefaultDateRange() this.initDefaultDateRange()
this.fetchData() this.fetchData()
this.initChart() this.initChart()
this.getAllAircraft();
window.addEventListener('resize', this.handleResize) window.addEventListener('resize', this.handleResize)
}, },
beforeDestroy() { beforeDestroy() {
@ -301,6 +310,13 @@ export default {
} }
}, },
getAllAircraft(){
//
allAircraft().then(res => {
this.deviceMap = res.reduce((obj, item) => ({...obj,[item.key]: item.value}), {})||{};
});
},
getOperatorName(operatorId) { getOperatorName(operatorId) {
if (operatorId === null || operatorId === undefined || operatorId === '') { if (operatorId === null || operatorId === undefined || operatorId === '') {
return '未分配' return '未分配'
@ -320,7 +336,7 @@ export default {
} }
} }
return operator && operator.name ? operator.name : `操作员(${operatorId})` return operator && operator.name ? operator.name : `-`
}, },
// //
@ -331,8 +347,10 @@ export default {
getStatusTagType(status) { getStatusTagType(status) {
const typeMap = { const typeMap = {
0: 'info', 0: 'info',
1: 'primary',
2: 'success', 2: 'success',
3: 'danger' 3: 'danger',
4: 'warning'
} }
return typeMap[status] || 'info' return typeMap[status] || 'info'
}, },
@ -340,10 +358,12 @@ export default {
getStatusText(status) { getStatusText(status) {
const textMap = { const textMap = {
0: '未开始', 0: '未开始',
1: '进行中',
2: '已完成', 2: '已完成',
3: '已失败' 3: '已取消',
4: '待确认'
} }
return textMap[status] || '未知状态' return textMap[status] || '-'
}, },
initDefaultDateRange() { initDefaultDateRange() {
@ -386,12 +406,13 @@ export default {
const analysisData = await this.getAnalysisData() const analysisData = await this.getAnalysisData()
this.orderDetailList = analysisData.orderDetailList || [] this.orderDetailList = analysisData.orderDetailList || []
const { pageNum, pageSize, total } = analysisData.pageInfo;
// //
this.pagination = { this.pagination = {
currentPage: Number(analysisData.currentPage) || Number(analysisData.pageNum) || 1, currentPage: pageNum || 1,
pageSize: Number(analysisData.pageSize) || Number(analysisData.size) || 10, pageSize: pageSize || 10,
total: Number(analysisData.total) || this.orderDetailList.length total: Number(total) || this.orderDetailList.length
} }
this.stats = { this.stats = {