|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<script setup> |
|
|
|
|
import {onBeforeMount, ref, reactive, computed} from 'vue'; |
|
|
|
|
import {ElMessage} from 'element-plus' |
|
|
|
|
import {get_ai_show_data} from "@/apis/ai_show.js"; |
|
|
|
|
import {get_ai_show_data, get_report_date} from "@/apis/ai_show.js"; |
|
|
|
|
|
|
|
|
|
// region 表格数据代码 |
|
|
|
|
const tableData = ref([]) |
|
|
|
|
@ -26,6 +26,10 @@ const loading = ref(false) |
|
|
|
|
const think = ref('') |
|
|
|
|
const aiModel = ref('') |
|
|
|
|
|
|
|
|
|
// 日期控件参数 |
|
|
|
|
const calendarStart = ref('') |
|
|
|
|
const calendarEnd = ref('') |
|
|
|
|
|
|
|
|
|
// 过滤条件数据 |
|
|
|
|
// 计算日期 |
|
|
|
|
const getDefaultDate = () => { |
|
|
|
|
@ -49,6 +53,17 @@ const show_alter = () => { |
|
|
|
|
ElMessage.error('没有查询到有效的智能排片数据,请调整日期和影院后再试!') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function get_calendar_date() { |
|
|
|
|
await get_report_date().then(res => { |
|
|
|
|
if (res.status === 'success') { |
|
|
|
|
calendarStart.value = res.start |
|
|
|
|
calendarEnd.value = res.end |
|
|
|
|
} |
|
|
|
|
}).catch(err => { |
|
|
|
|
console.log(err) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 通过异步请求获取影院列表数据 |
|
|
|
|
async function get_data() { |
|
|
|
|
showData.value = [] |
|
|
|
|
@ -168,10 +183,9 @@ const objectSpanMethod = ({row, column, rowIndex, columnIndex}) => { |
|
|
|
|
|
|
|
|
|
// 日历禁用日期 |
|
|
|
|
const disabledDate = (time) => { |
|
|
|
|
const start = new Date('2026-06-11T00:00:00Z') |
|
|
|
|
const today = new Date(); |
|
|
|
|
today.setDate(today.getDate() + 3) |
|
|
|
|
return time.getTime() < start || time.getTime() > today |
|
|
|
|
const start = new Date(calendarStart.value) |
|
|
|
|
const end = new Date(calendarEnd.value); |
|
|
|
|
return time.getTime() < start || time.getTime() > end |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const tableHeader = computed(() => { |
|
|
|
|
@ -188,6 +202,7 @@ const tableHeader = computed(() => { |
|
|
|
|
onBeforeMount( |
|
|
|
|
async () => { |
|
|
|
|
await get_data() |
|
|
|
|
await get_calendar_date() |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
@ -224,7 +239,7 @@ onBeforeMount( |
|
|
|
|
<el-text>智能排片生成时间:</el-text> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="3"> |
|
|
|
|
<el-text>{{createTime}}</el-text> |
|
|
|
|
<el-text>{{ createTime }}</el-text> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row style="margin: 10px 0 20px 14px" align="middle"> |
|
|
|
|
|