fix:修改体彩报告页面
This commit is contained in:
parent
938c737e60
commit
2e50fff323
@ -16,7 +16,7 @@
|
|||||||
<span>赛事分析 {{ data && data.matchCode }}</span>
|
<span>赛事分析 {{ data && data.matchCode }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="body">
|
<div class="body" v-if="isCustom">
|
||||||
<h3>1.比赛基础信息</h3>
|
<h3>1.比赛基础信息</h3>
|
||||||
<el-table v-loading="loading" :data="basicList" :show-header="false" border>
|
<el-table v-loading="loading" :data="basicList" :show-header="false" border>
|
||||||
<el-table-column label="比赛编号" prop="name" :show-overflow-tooltip="true" />
|
<el-table-column label="比赛编号" prop="name" :show-overflow-tooltip="true" />
|
||||||
@ -38,7 +38,14 @@
|
|||||||
<el-table-column label="预测结果" width="220" prop="prediction" :show-overflow-tooltip="true" />
|
<el-table-column label="预测结果" width="220" prop="prediction" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="分析依据" prop="analysis" :show-overflow-tooltip="true" />
|
<el-table-column label="分析依据" prop="analysis" :show-overflow-tooltip="true" />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div v-else class="body">
|
||||||
|
<MdPreview
|
||||||
|
ref="editorRef"
|
||||||
|
editorId="preview-only"
|
||||||
|
:modelValue="data.report"
|
||||||
|
class="maxkb-md"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -52,6 +59,7 @@
|
|||||||
|
|
||||||
<script setup name="EventAnalysisReportDetail">
|
<script setup name="EventAnalysisReportDetail">
|
||||||
import { detail } from '@/api/tc/eventAnalysisReport'
|
import { detail } from '@/api/tc/eventAnalysisReport'
|
||||||
|
import MdPreview from '@/components/Markdown/MdPreview'
|
||||||
import { timerToStr } from '@/utils/timer'
|
import { timerToStr } from '@/utils/timer'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@ -72,6 +80,8 @@ const loading = ref(false)
|
|||||||
const basicList = ref([])
|
const basicList = ref([])
|
||||||
const influencingList = ref([])
|
const influencingList = ref([])
|
||||||
const coreList = ref([])
|
const coreList = ref([])
|
||||||
|
const skipType = ['HONG_F', 'HONG_B'] // 红单专家md渲染,其他自定义表格渲染
|
||||||
|
const isCustom = computed(() => !skipType.includes(route.query.modelType)) // false: md渲染 true: 自定义表格渲染
|
||||||
|
|
||||||
function getDetail() {
|
function getDetail() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
@ -79,70 +89,76 @@ function getDetail() {
|
|||||||
data.value = res.data
|
data.value = res.data
|
||||||
if (res.data.report) {
|
if (res.data.report) {
|
||||||
try {
|
try {
|
||||||
const matchDateTime = timerToStr(res.data.matchInfo.matchDateTime, 'YYYY-MM-DD HH:mm')
|
if(isCustom.value) {
|
||||||
const matchCode = res.data.matchCode
|
// 自定义表格渲染
|
||||||
const report = JSON.parse(res.data.report)
|
const matchDateTime = timerToStr(res.data.matchInfo.matchDateTime, 'YYYY-MM-DD HH:mm')
|
||||||
const { keyFactors, matchInfo, predictions } = report
|
const matchCode = res.data.matchCode
|
||||||
// 1.比赛基础信息
|
const report = JSON.parse(res.data.report)
|
||||||
basicList.value = [
|
const { keyFactors, matchInfo, predictions } = report
|
||||||
{
|
// 1.比赛基础信息
|
||||||
name: "比赛编号",
|
basicList.value = [
|
||||||
value: matchCode
|
{
|
||||||
},
|
name: "比赛编号",
|
||||||
{
|
value: matchCode
|
||||||
name: "主队",
|
},
|
||||||
value: matchInfo.homeTeam
|
{
|
||||||
},
|
name: "主队",
|
||||||
{
|
value: matchInfo.homeTeam
|
||||||
name: "客队",
|
},
|
||||||
value: matchInfo.awayTeam
|
{
|
||||||
},
|
name: "客队",
|
||||||
{
|
value: matchInfo.awayTeam
|
||||||
name: "时间",
|
},
|
||||||
value: matchDateTime
|
{
|
||||||
}
|
name: "时间",
|
||||||
]
|
value: matchDateTime
|
||||||
// 2.关键影响因素
|
}
|
||||||
influencingList.value = keyFactors
|
]
|
||||||
// 3.核心预测结果
|
// 2.关键影响因素
|
||||||
coreList.value = [
|
influencingList.value = keyFactors
|
||||||
{
|
// 3.核心预测结果
|
||||||
"name": "最终赛果",
|
coreList.value = [
|
||||||
"key": "result_final",
|
{
|
||||||
"prediction": predictions.result_final.prediction,
|
"name": "最终赛果",
|
||||||
"analysis": predictions.result_final.analysis
|
"key": "result_final",
|
||||||
},
|
"prediction": predictions.result_final.prediction,
|
||||||
{
|
"analysis": predictions.result_final.analysis
|
||||||
"name": "让球结果",
|
},
|
||||||
"key": "result_handicap",
|
{
|
||||||
"prediction": predictions.result_handicap.prediction,
|
"name": "让球结果",
|
||||||
"analysis": predictions.result_handicap.analysis
|
"key": "result_handicap",
|
||||||
},
|
"prediction": predictions.result_handicap.prediction,
|
||||||
{
|
"analysis": predictions.result_handicap.analysis
|
||||||
"name": "比分预测",
|
},
|
||||||
"key": "score_prediction",
|
{
|
||||||
"prediction": predictions.score_prediction.prediction,
|
"name": "比分预测",
|
||||||
"analysis": predictions.score_prediction.analysis
|
"key": "score_prediction",
|
||||||
},
|
"prediction": predictions.score_prediction.prediction,
|
||||||
{
|
"analysis": predictions.score_prediction.analysis
|
||||||
"name": "总进球数",
|
},
|
||||||
"key": "total_goals",
|
{
|
||||||
"prediction": predictions.total_goals.prediction,
|
"name": "总进球数",
|
||||||
"analysis": predictions.total_goals.analysis
|
"key": "total_goals",
|
||||||
},
|
"prediction": predictions.total_goals.prediction,
|
||||||
{
|
"analysis": predictions.total_goals.analysis
|
||||||
"name": "半全场赛果",
|
},
|
||||||
"key": "half_full_time",
|
{
|
||||||
"prediction": predictions.half_full_time.prediction,
|
"name": "半全场赛果",
|
||||||
"analysis": predictions.half_full_time.analysis
|
"key": "half_full_time",
|
||||||
},
|
"prediction": predictions.half_full_time.prediction,
|
||||||
{
|
"analysis": predictions.half_full_time.analysis
|
||||||
"name": "亚洲盘口",
|
},
|
||||||
"key": "asian_handicap",
|
{
|
||||||
"prediction": predictions.asian_handicap.prediction,
|
"name": "亚洲盘口",
|
||||||
"analysis": predictions.asian_handicap.analysis
|
"key": "asian_handicap",
|
||||||
},
|
"prediction": predictions.asian_handicap.prediction,
|
||||||
]
|
"analysis": predictions.asian_handicap.analysis
|
||||||
|
},
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
// md渲染
|
||||||
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user