From d667fce729c223e885930bb8edb528ab501b8d6a Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期二, 26 十一月 2024 16:57:53 +0800 Subject: [PATCH] 1. 移动socket客户端类、新增socket/index.js文件(初始化) 2. socketMessage枚举类的完善(增加对每个类型的英文描述字段以及对类型筛选和判断是否为心跳消息的工具方法) 3. 在FYBgTaskCard.vue监听并处理如何刷后台任务状态逻辑 --- 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