From c99a662edbd0c23e5c88e8a1531f9b10af6539d8 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期五, 21 一月 2022 16:47:03 +0800
Subject: [PATCH] Fixed#134576 修正 [ 顧問管理流程 ] 未聯絡預約單資訊明細 : 應只顯示「傳送約訪通知」按鈕,目前畫面顯示結案、約訪紀錄、系統通知紀錄編輯

---
 PAMapp/components/Ui/UiTimePicker.vue |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/PAMapp/components/Ui/UiTimePicker.vue b/PAMapp/components/Ui/UiTimePicker.vue
index 3a13512..6803eae 100644
--- a/PAMapp/components/Ui/UiTimePicker.vue
+++ b/PAMapp/components/Ui/UiTimePicker.vue
@@ -6,7 +6,7 @@
         :clearable="false"
         :picker-options="pickerOptions"
         placeholder="������"
-        prefix-icon="icon-down"
+        prefix-icon="icon-down down-icon"
         value-format="timestamp"
         @change="changeTime"
     >
@@ -14,7 +14,7 @@
 </template>
 
 <script lang="ts">
-import { Component, Emit, Vue } from "nuxt-property-decorator";
+import { Component, Emit, Prop, Vue, Watch } from "nuxt-property-decorator";
 
 @Component
 export default class UiTimePicker extends Vue {
@@ -25,9 +25,22 @@
         end: '21:00'
     }
 
+    @Prop()
+    defaultValue!: string;
+
     @Emit('changeTime')
     changeTime() {
         return this.timeValue;
     }
+
+    @Watch('defaultValue', {immediate: true})
+    updateDefault() {
+        if (this.defaultValue) {
+            const hours = new Date(this.defaultValue).getHours();
+            const minutes = new Date(this.defaultValue).getMinutes();
+            this.timeValue = `${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? '0' + minutes : minutes}`;
+            this.changeTime();
+        }
+    }
 }
 </script>
\ No newline at end of file

--
Gitblit v1.8.0