修改大屏嵌入路由
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -153,7 +153,12 @@ const onComSearch = async () => {
|
||||
const onResetForm = () => {
|
||||
tableStore.onTableAction('reset', {})
|
||||
}
|
||||
defineExpose({ onComSearch, areaRef })
|
||||
const setDatePicker = (list:any) => {
|
||||
datePickerRef.value.setTimeOptions(list)
|
||||
|
||||
}
|
||||
|
||||
defineExpose({ onComSearch, areaRef, setDatePicker })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user