From f5052fa7d4e73c0df5a02a6ad8987f35df42b8f8 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 07 十一月 2024 17:23:50 +0800
Subject: [PATCH] 1. 完成场景报告模块 2. 日报管理模块添加时间范围选择以及word报告生成

---
 src/components/search-option/FYOptionTime.vue |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/src/components/search-option/FYOptionTime.vue b/src/components/search-option/FYOptionTime.vue
index ac1292c..b745a32 100644
--- a/src/components/search-option/FYOptionTime.vue
+++ b/src/components/search-option/FYOptionTime.vue
@@ -1,11 +1,14 @@
 <template>
-  <el-form-item label="鏃堕棿" :prop="prop">
+  <el-form-item :label="label" :prop="prop">
     <el-date-picker
       v-model="date"
       @change="handleChange"
       :type="type"
       placeholder="閫夋嫨鏃堕棿"
+      start-placeholder="閫夋嫨寮�濮嬫椂闂�"
+      end-placeholder="閫夋嫨缁撴潫鏃堕棿"
       style="width: 150px"
+      v-bind="$attrs"
     />
   </el-form-item>
 </template>
@@ -15,6 +18,7 @@
 
 const MONTH = 'month';
 const DATE = 'date';
+const RANGE = 'datetimerange';
 
 export default {
   props: {
@@ -23,30 +27,37 @@
       default: MONTH
     },
     // 杩斿洖缁撴灉
-    value: Date,
+    value: Date || Array,
     // 鏄惁榛樿杩斿洖鍒濆閫夐」
     initValue: {
       type: Boolean,
       default: true
     },
-    prop: String
+    label: {
+      type: String,
+      default: '鏃堕棿'
+    },
+    prop: {
+      type: String,
+      default: 'time'
+    }
   },
-  emits: ['update:value'],
+  emits: ['update:value', 'change'],
   data() {
     return {
       date: this.value
     };
   },
-  computed:{
-  },
+  computed: {},
   methods: {
     handleChange(value) {
       this.$emit('update:value', value);
-    },
+      this.$emit('change', value);
+    }
   },
   mounted() {
     if (this.initValue) {
-      this.date = new Date()
+      this.date = new Date();
       this.handleChange(this.date);
     }
   }

--
Gitblit v1.9.3