forked from github/dataease
fix(查询组件): 时间粒度为年月,时间范围使用月为单位无法生成动态时间默认值
This commit is contained in:
parent
3b91fc4f38
commit
3c34800c7a
@ -49,7 +49,7 @@
|
||||
</configuration>
|
||||
</execution>-->
|
||||
<!--前端组件有更新需要放开-->
|
||||
<execution>
|
||||
<!--<execution>
|
||||
<id>npm install</id>
|
||||
<goals>
|
||||
<goal>npm</goal>
|
||||
@ -57,7 +57,7 @@
|
||||
<configuration>
|
||||
<arguments>install</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</execution>-->
|
||||
|
||||
<execution>
|
||||
<id>npm run build</id>
|
||||
|
@ -45,8 +45,6 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
const selectValue = ref<[Date, Date]>([new Date(), new Date()])
|
||||
const rendering = ref(true)
|
||||
|
||||
const { config } = toRefs(props)
|
||||
|
||||
const timeConfig = computed(() => {
|
||||
@ -81,11 +79,7 @@ const timeConfig = computed(() => {
|
||||
watch(
|
||||
() => timeConfig.value,
|
||||
() => {
|
||||
rendering.value = false
|
||||
nextTick(() => {
|
||||
init()
|
||||
rendering.value = true
|
||||
})
|
||||
init()
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
@ -103,11 +97,7 @@ watch(
|
||||
watch(
|
||||
() => config.value.id,
|
||||
() => {
|
||||
rendering.value = false
|
||||
nextTick(() => {
|
||||
init()
|
||||
rendering.value = true
|
||||
})
|
||||
init()
|
||||
}
|
||||
)
|
||||
|
||||
@ -164,7 +154,6 @@ const formatDate = computed(() => {
|
||||
<template>
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-if="rendering"
|
||||
v-model="selectValue"
|
||||
:type="config.timeGranularityMultiple"
|
||||
:prefix-icon="Calendar"
|
||||
|
@ -85,7 +85,7 @@ function getCustomTime(
|
||||
resultMonth = resultMonth % 12
|
||||
} else if (resultMonth < 0) {
|
||||
resultYear += parseInt(`${resultMonth / 12}`) - 1
|
||||
resultMonth = month + (resultMonth % 12)
|
||||
resultMonth = (resultMonth % 12) + 12
|
||||
} else if (resultMonth === 0) {
|
||||
resultYear += parseInt(`${resultMonth / 12}`) - 1
|
||||
resultMonth = 12
|
||||
|
@ -27,13 +27,6 @@ export const routes: AppRouteRecordRaw[] = [
|
||||
meta: {},
|
||||
component: () => import('@/views/login/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
hidden: true,
|
||||
meta: {},
|
||||
component: () => import('@/views/home/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/dvCanvas',
|
||||
name: 'dvCanvas',
|
||||
|
Loading…
Reference in New Issue
Block a user