From 1abb6a9ca01cc76f271542a063d1b19839448019 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 27 九月 2024 17:42:05 +0800 Subject: [PATCH] 1.新增评估结果批量导入功能(未完成) --- src/components/search-option/FYOptionTime.vue | 22 ++++++++++------------ 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/components/search-option/FYOptionTime.vue b/src/components/search-option/FYOptionTime.vue index 18ccb34..ac1292c 100644 --- a/src/components/search-option/FYOptionTime.vue +++ b/src/components/search-option/FYOptionTime.vue @@ -1,9 +1,9 @@ <template> <el-form-item label="鏃堕棿" :prop="prop"> <el-date-picker - :model-value="value" + v-model="date" @change="handleChange" - type="month" + :type="type" placeholder="閫夋嫨鏃堕棿" style="width: 150px" /> @@ -14,6 +14,7 @@ import dayjs from 'dayjs'; const MONTH = 'month'; +const DATE = 'date'; export default { props: { @@ -32,24 +33,21 @@ }, emits: ['update:value'], data() { - return {}; + return { + date: this.value + }; + }, + computed:{ }, methods: { handleChange(value) { this.$emit('update:value', value); }, - timeFormat() { - switch (this.type) { - case MONTH: - return 'YYYY-MM'; - default: - return 'YYYY-MM'; - } - } }, mounted() { if (this.initValue) { - this.handleChange(new Date()); + this.date = new Date() + this.handleChange(this.date); } } }; -- Gitblit v1.9.3