修改大屏嵌入路由

This commit is contained in:
GGJ
2024-02-27 16:21:27 +08:00
parent f51acd7623
commit 122c3e2198
6 changed files with 59 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
<template>
<el-select v-model="interval" style="min-width: 90px;width: 90px; margin-right: 10px" @change="timeChange">
<el-select v-model="interval" style="min-width: 90px; width: 90px; margin-right: 10px" @change="timeChange">
<el-option v-for="item in timeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-date-picker
@@ -22,7 +22,7 @@
<script lang="ts" setup>
import { DArrowLeft, VideoPause, DArrowRight } from '@element-plus/icons-vue'
import { ref, onMounted } from 'vue'
import { ref, onMounted, nextTick } from 'vue'
const interval = ref(3)
const timeFlag = ref(1)
@@ -31,13 +31,13 @@ const disabledPicker = ref(true)
const timeValue = ref()
const backDisabled = ref(false)
const preDisabled = ref(false)
const timeOptions = [
const timeOptions: any = ref([
{ label: '年份', value: 1 },
{ label: '季度', value: 2 },
{ label: '月份', value: 3 },
{ label: '周', value: 4 },
{ label: '自定义', value: 5 }
]
])
const shortcuts = [
{
text: '最近一周',
@@ -447,7 +447,11 @@ const NowgetEndTime = () => {
let endTime = year + sep + month + sep + date
return endTime
}
defineExpose({ timeValue, interval, timeFlag })
const setTimeOptions = (list: any) => {
timeOptions.value = list
}
defineExpose({ timeValue, interval, timeFlag, setTimeOptions })
</script>
<style scoped>