fix:修改体彩报告页面

This commit is contained in:
lz-ui 2025-10-21 14:38:02 +08:00
parent 938c737e60
commit 2e50fff323

View File

@ -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,6 +89,8 @@ function getDetail() {
data.value = res.data data.value = res.data
if (res.data.report) { if (res.data.report) {
try { try {
if(isCustom.value) {
//
const matchDateTime = timerToStr(res.data.matchInfo.matchDateTime, 'YYYY-MM-DD HH:mm') const matchDateTime = timerToStr(res.data.matchInfo.matchDateTime, 'YYYY-MM-DD HH:mm')
const matchCode = res.data.matchCode const matchCode = res.data.matchCode
const report = JSON.parse(res.data.report) const report = JSON.parse(res.data.report)
@ -143,6 +155,10 @@ function getDetail() {
"analysis": predictions.asian_handicap.analysis "analysis": predictions.asian_handicap.analysis
}, },
] ]
} else {
// md
}
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }