1
This commit is contained in:
@@ -49,12 +49,35 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-row v-if="current" :gutter="16" class="table-row">
|
||||||
|
<el-col :xs="24">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<div slot="header">分销类型(自有单 / 代下单 F-W·F-H / 代下单单)</div>
|
||||||
|
<el-table :data="current.byKind || []" stripe size="small">
|
||||||
|
<el-table-column prop="name" label="类型" min-width="100" />
|
||||||
|
<el-table-column prop="validOrderCount" label="有效单" width="80" />
|
||||||
|
<el-table-column prop="refundCount" label="退款" width="70" />
|
||||||
|
<el-table-column prop="totalProfit" label="利润" width="110">
|
||||||
|
<template slot-scope="scope">{{ money(scope.row.totalProfit) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="profitRatePct" label="利润率" width="90">
|
||||||
|
<template slot-scope="scope">{{ fmtNum(scope.row.profitRatePct) }}%</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="avgProfit" label="单均" width="100">
|
||||||
|
<template slot-scope="scope">{{ money(scope.row.avgProfit) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-row v-if="current" :gutter="16" class="table-row">
|
<el-row v-if="current" :gutter="16" class="table-row">
|
||||||
<el-col :xs="24" :lg="12">
|
<el-col :xs="24" :lg="12">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<div slot="header">分销标记</div>
|
<div slot="header">分销标记</div>
|
||||||
<el-table :data="current.byMark || []" stripe size="small" max-height="360">
|
<el-table :data="current.byMark || []" stripe size="small" max-height="360">
|
||||||
<el-table-column prop="name" label="标记" min-width="110" />
|
<el-table-column prop="name" label="标记" min-width="110" />
|
||||||
|
<el-table-column prop="kind" label="类型" width="90" />
|
||||||
<el-table-column prop="orderCount" label="单量" width="70" />
|
<el-table-column prop="orderCount" label="单量" width="70" />
|
||||||
<el-table-column prop="payment" label="付款" width="100">
|
<el-table-column prop="payment" label="付款" width="100">
|
||||||
<template slot-scope="scope">{{ money(scope.row.payment) }}</template>
|
<template slot-scope="scope">{{ money(scope.row.payment) }}</template>
|
||||||
@@ -143,7 +166,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-card v-if="stats" class="json-card" shadow="hover">
|
<el-card v-if="stats" class="json-card" shadow="hover">
|
||||||
<div slot="header">统计 JSON(发给模型的数据)</div>
|
<div slot="header">提交给模型 {{ llmChars }} 字符(无缩进列数组;框内换行只为方便看,上方卡片仍是完整对象)</div>
|
||||||
<el-input type="textarea" :value="statsJson" :autosize="{ minRows: 8, maxRows: 22 }" readonly />
|
<el-input type="textarea" :value="statsJson" :autosize="{ minRows: 8, maxRows: 22 }" readonly />
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@@ -171,7 +194,8 @@ export default {
|
|||||||
logsLoading: false,
|
logsLoading: false,
|
||||||
logDialogVisible: false,
|
logDialogVisible: false,
|
||||||
logDialogMeta: '',
|
logDialogMeta: '',
|
||||||
logDialogReport: ''
|
logDialogReport: '',
|
||||||
|
llmJson: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -199,6 +223,13 @@ export default {
|
|||||||
return this.stats && this.stats.compare ? this.stats.compare : {}
|
return this.stats && this.stats.compare ? this.stats.compare : {}
|
||||||
},
|
},
|
||||||
statsJson() {
|
statsJson() {
|
||||||
|
if (this.llmJson) {
|
||||||
|
try {
|
||||||
|
return JSON.stringify(JSON.parse(this.llmJson), null, 2)
|
||||||
|
} catch (e) {
|
||||||
|
return this.llmJson
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!this.stats) return ''
|
if (!this.stats) return ''
|
||||||
try {
|
try {
|
||||||
return JSON.stringify(this.stats, null, 2)
|
return JSON.stringify(this.stats, null, 2)
|
||||||
@@ -206,6 +237,11 @@ export default {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
llmChars() {
|
||||||
|
if (this.llmJson) return this.llmJson.length
|
||||||
|
const n = this.stats && this.stats.llmJsonChars
|
||||||
|
return n || 0
|
||||||
|
},
|
||||||
summaryItems() {
|
summaryItems() {
|
||||||
if (!this.current) return []
|
if (!this.current) return []
|
||||||
return [
|
return [
|
||||||
@@ -265,9 +301,11 @@ export default {
|
|||||||
if (!data) {
|
if (!data) {
|
||||||
this.stats = null
|
this.stats = null
|
||||||
this.report = ''
|
this.report = ''
|
||||||
|
this.llmJson = ''
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.stats = data.stats || data
|
this.stats = data.stats || data
|
||||||
|
this.llmJson = data.llmJson || (this.stats && this.stats.llmJson) || ''
|
||||||
this.periodLabel = data.periodLabel || (this.stats && this.stats.periodLabel) || ''
|
this.periodLabel = data.periodLabel || (this.stats && this.stats.periodLabel) || ''
|
||||||
this.report = data.report || ''
|
this.report = data.report || ''
|
||||||
this.aiError = data.aiError || ''
|
this.aiError = data.aiError || ''
|
||||||
|
|||||||
Reference in New Issue
Block a user