|
|
|
|
@ -1,12 +1,14 @@ |
|
|
|
|
<script setup> |
|
|
|
|
import {onBeforeMount, ref, reactive, computed} from 'vue'; |
|
|
|
|
import {ElMessage} from 'element-plus' |
|
|
|
|
import {get_ai_show_data, get_report_date} from "@/apis/ai_show.js"; |
|
|
|
|
import {get_ai_show_data, get_report_date, get_test_date_api} from "@/apis/ai_show.js"; |
|
|
|
|
|
|
|
|
|
// region 表格数据代码 |
|
|
|
|
const tableData = ref([]) |
|
|
|
|
const hallData = ref([]) |
|
|
|
|
const hallArray = ref([]) |
|
|
|
|
const test_date = ref() |
|
|
|
|
const test_date_option = ref([]) |
|
|
|
|
|
|
|
|
|
// 表格展示的数据 |
|
|
|
|
const showData = ref([]) |
|
|
|
|
@ -84,7 +86,11 @@ async function get_data() { |
|
|
|
|
think.value = '' |
|
|
|
|
aiModel.value = '' |
|
|
|
|
force.value = compareSwitch.value === 'new' |
|
|
|
|
await get_ai_show_data(cinema_code.value, show_date.value, force.value).then(res => { |
|
|
|
|
if (compareSwitch.value !== 'new') { |
|
|
|
|
test_date.value = '' |
|
|
|
|
} |
|
|
|
|
test_date_option.value = [] |
|
|
|
|
await get_ai_show_data(cinema_code.value, show_date.value, force.value, test_date.value).then(res => { |
|
|
|
|
if (res.status === 'success') { |
|
|
|
|
console.log(res) |
|
|
|
|
result.value = false |
|
|
|
|
@ -117,6 +123,7 @@ async function get_data() { |
|
|
|
|
console.log(showData.value, prompt.value, tokens.value, takeTimes.value, realSales.value, aiSales.value, showResult.value) |
|
|
|
|
formatTableData() |
|
|
|
|
loading.value = false |
|
|
|
|
get_test_date() |
|
|
|
|
} else { |
|
|
|
|
result.value = true |
|
|
|
|
show_alter() |
|
|
|
|
@ -165,6 +172,18 @@ function formatTableData() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 通过接口获取测试数据的下拉列表数据 |
|
|
|
|
const get_test_date = () => { |
|
|
|
|
get_test_date_api(cinema_code.value, show_date.value).then(res => { |
|
|
|
|
if (res.status === 'success') { |
|
|
|
|
res.date.forEach((item) => { |
|
|
|
|
test_date_option.value.push({'value': item, label: item}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理表格合并 |
|
|
|
|
const objectSpanMethod = ({row, column, rowIndex, columnIndex}) => { |
|
|
|
|
if (column.property === 'hall') { |
|
|
|
|
@ -278,8 +297,22 @@ onBeforeMount( |
|
|
|
|
<el-radio value="target" label="target">目标日期排片数据</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="4"> |
|
|
|
|
<el-text v-if="compareSwitch==='template'">模板日期:{{ templateDate }}</el-text> |
|
|
|
|
<el-col :span="4" v-if="compareSwitch==='template'"> |
|
|
|
|
<el-text>模板日期:{{ templateDate }}</el-text> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="3" v-if="compareSwitch==='new'" align="right"> |
|
|
|
|
<el-text>手动测试数据:</el-text> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="4" v-if="compareSwitch==='new'"> |
|
|
|
|
<el-select v-model="test_date" placeholder="请选择" v-if="compareSwitch==='new'" :clearable="true" |
|
|
|
|
@change="get_data" style="width: 240px"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in test_date_option" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
@ -363,7 +396,7 @@ onBeforeMount( |
|
|
|
|
<el-text>{{ aiTotal }}</el-text> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="9" align="left"> |
|
|
|
|
<el-text>{{ compareTotal}}</el-text> |
|
|
|
|
<el-text>{{ compareTotal }}</el-text> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row> |
|
|
|
|
|