From ec8aa046f4b40ffed65bcdead0901992ef705e6d Mon Sep 17 00:00:00 2001 From: rogersun Date: Mon, 15 Jun 2026 15:02:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=97=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai_show/index.vue | 46 ++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/src/views/ai_show/index.vue b/src/views/ai_show/index.vue index 8645b3c..f2012f9 100644 --- a/src/views/ai_show/index.vue +++ b/src/views/ai_show/index.vue @@ -4,8 +4,8 @@ import {get_ai_show_data} from "@/apis/ai_show.js"; // region 表格数据代码 const tableData = ref([]) -const hallData = ref({}) -const hallArray = ref(['']) +const hallData = ref([]) +const hallArray = ref([]) // 表格展示的数据 const showData = ref([]) @@ -22,6 +22,13 @@ const cinema_code = ref('11078801') // 通过异步请求获取影院列表数据 async function get_data() { + showData.value = [] + prompt.value = '' + tokens.value = 0 + takeTimes.value = 0 + realSales.value = '' + aiSales.value = '' + result.value = false await get_ai_show_data(cinema_code.value, show_date.value).then(res => { if (res.status === 'success') { result.value = false @@ -45,6 +52,7 @@ async function get_data() { // 处理表格数据 function formatTableData() { hallArray.value = [] + hallData.value = [] tableData.value = [] let temp = 0; showData.value.forEach((item, index) => { @@ -64,30 +72,39 @@ function formatTableData() { real_duration: item[15], }) if (hallArray.value.indexOf(item[0]) >= 0) { - hallData[temp] += 1 + hallData.value[temp] += 1 + hallData.value.push(0) } else { - temp = index hallArray.value.push(item[0]) - hallData[temp] = 1 + temp = index + hallData.value.push(1) } }) + console.log('hallArray.value', hallArray.value) + console.log('hallData.value', hallData.value) } // 处理表格合并 const objectSpanMethod = ({row, column, rowIndex, columnIndex}) => { - if (columnIndex === 0) { - if (!isNaN(hallData[rowIndex])) { + if (column.property === 'hall') { + const rowSpan = hallData.value[rowIndex] + if (hallData.value[rowIndex] === 0) { return { - rowspan: hallData[rowIndex], - colspan: 1, + rowspan: rowSpan, + colspan: 0, } } else { return { - rowspan: 0, - colspan: 0, + rowspan: rowSpan, + colspan: 1, } } + } else { + return { + rowspan: 1, + colspan: 1, + } } } @@ -128,7 +145,8 @@ onBeforeMount( /> - + 保利国际影城北京凯德大峡谷店 SFC上影(永华店) 宁波影都(东门口店) @@ -156,7 +174,9 @@ onBeforeMount( - 相关数据: + + 相关数据: + 智能排片预估销售额: