diff --git a/src/api/system/orderProfitAnalysis.js b/src/api/system/orderProfitAnalysis.js
new file mode 100644
index 0000000..ebb64e6
--- /dev/null
+++ b/src/api/system/orderProfitAnalysis.js
@@ -0,0 +1,48 @@
+import request from '@/utils/request'
+
+/** 预览统计 JSON(不调用大模型) */
+export function previewOrderProfitStats(query) {
+ return request({
+ url: '/jarvis/order-profit-analysis/stats',
+ method: 'get',
+ params: query
+ })
+}
+
+/** 套固定提示词调用已配置大模型;push=true 时推企微 */
+export function analyzeOrderProfit(data) {
+ return request({
+ url: '/jarvis/order-profit-analysis/analyze',
+ method: 'post',
+ data,
+ timeout: 180000
+ })
+}
+
+/** 最近一次分析结果 */
+export function latestOrderProfitAnalysis(periodType) {
+ return request({
+ url: '/jarvis/order-profit-analysis/latest',
+ method: 'get',
+ params: { periodType }
+ })
+}
+
+/** 测试推送(分析当天/所选周期并推企微) */
+export function testOrderProfitPush(data) {
+ return request({
+ url: '/jarvis/order-profit-analysis/test',
+ method: 'post',
+ data,
+ timeout: 180000
+ })
+}
+
+/** 发送记录 */
+export function listOrderProfitSendLogs(limit) {
+ return request({
+ url: '/jarvis/order-profit-analysis/send-logs',
+ method: 'get',
+ params: { limit: limit || 30 }
+ })
+}
diff --git a/src/router/index.js b/src/router/index.js
index 9a1eec2..4e1d905 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -152,8 +152,9 @@ export const dynamicRoutes = [
{
path: '/sloworder',
component: Layout,
- redirect: 'noredirect',
+ redirect: '/sloworder/index',
name: 'SlowOrder',
+ alwaysShow: true,
meta: { title: '下好的慢单', icon: 'list' },
permissions: ['jdorder:sloworder:list'],
children: [
@@ -162,6 +163,12 @@ export const dynamicRoutes = [
component: () => import('@/views/system/jdorder/orderList'),
name: 'SlowOrderIndex',
meta: { title: '下好的慢单', icon: 'list' }
+ },
+ {
+ path: 'profit-analysis',
+ component: () => import('@/views/system/jdorder/profit-analysis'),
+ name: 'SlowOrderProfitAnalysis',
+ meta: { title: '利润AI分析', icon: 'chart' }
}
]
},
diff --git a/src/views/system/jdorder/profit-analysis.vue b/src/views/system/jdorder/profit-analysis.vue
new file mode 100644
index 0000000..281abb5
--- /dev/null
+++ b/src/views/system/jdorder/profit-analysis.vue
@@ -0,0 +1,495 @@
+
+ {{ report }}
+ {{ logDialogReport }}
+