From 97e093b1117b68948d0f9adefacc5368014db380 Mon Sep 17 00:00:00 2001
From: Jack <jack.su@pollex.com.tw>
Date: 星期日, 14 十一月 2021 22:43:09 +0800
Subject: [PATCH] Merge branch 'master' of ssh://192.168.0.10:29418/pcalife/PAM

---
 PAMapp/components/phoneContactTimePicker.vue |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 52 insertions(+), 6 deletions(-)

diff --git a/PAMapp/components/phoneContactTimePicker.vue b/PAMapp/components/phoneContactTimePicker.vue
index 04578be..b0415f4 100644
--- a/PAMapp/components/phoneContactTimePicker.vue
+++ b/PAMapp/components/phoneContactTimePicker.vue
@@ -33,7 +33,6 @@
 
     <PopUpFrame class="pam-popUpFrame" 
       :isOpen.sync="isOpenByStep_1"
-      :model="isOpenByStep_1"
       :drawerSize="drawerSize"
       :dialogWidth="dialogWidth">
         <div class="pam-popUp-title">{{popUpTitle}}</div>
@@ -75,16 +74,62 @@
 <script lang="ts">
   import { Component,PropSync,Vue } from "nuxt-property-decorator";
   import * as _ from "lodash";
+import { OptionBtnDto } from "./singleSelectBtn.vue";
   @Component
   export default class PhoneContactTimePicker extends Vue {
     @PropSync('scheduleList',{type:Array,default:()=>[]}) syncScheduleList!:scheduleDto[];
     private weekOptions ={
       selectAll:'瘥予',
-      options:['蝳格��','蝳格���','蝳格���','蝳格���','蝳格���','蝳格�','蝳格�'],
+      options:[
+        {
+          title:'蝳格��',
+          label:'蝳格��'
+        },
+         {
+          title:'蝳格���',
+          label:'蝳格���'
+        },
+         {
+          title:'蝳格���',
+          label:'蝳格���'
+        },
+         {
+          title:'蝳格���',
+          label:'蝳格���'
+        },
+         {
+          title:'蝳格���',
+          label:'蝳格���'
+        }, {
+          title:'蝳格�',
+          label:'蝳格�'
+        },
+         {
+          title:'蝳格�',
+          label:'蝳格�'
+        },
+      ],
     };
     private timesOfDayOptions ={
       selectAll:'�憭�',
-      options:['9:00~12:00','12:00~14:00','14:00~18:00','18:00~21:00'],
+      options:[
+        {
+          title:'9:00~12:00',
+          label:'9:00~12:00',
+        },
+        {
+          title:'12:00~14:00',
+           label:'12:00~14:00',
+        },
+        {
+          title:'14:00~18:00',
+           label:'14:00~18:00',
+        },
+        {
+          title:'18:00~21:00',
+          label:'18:00~21:00',
+        }
+      ],
     };
     private drawerSize="40%";
     private dialogWidth="376px";
@@ -117,8 +162,9 @@
       this.selectedSchedule.selectWeekOptions = this.getOptionsBySort(this.weekOptions.options,this.initPickerControl.selectWeekOptions);
       this.selectedSchedule.selectTimesOptions = this.getOptionsBySort(this.timesOfDayOptions.options,this.initPickerControl.selectTimesOptions);
     }
-    getOptionsBySort(options:string[],selectedOptions:string[]):string[]{
-      return options.filter( o => _.includes(selectedOptions,o));
+    getOptionsBySort(options:OptionBtnDto[],selectedOptions:string[]):string[]{
+      return options.map( o => _.includes(selectedOptions,o.title) ? o.title :'').filter(String);
+      // return 
     }
     addNewSchedule():void{
       const newScheduleDto={
@@ -140,7 +186,7 @@
       const chineseNumber = ['銝�','鈭�','銝�','���','鈭�','�','銝�','�','銋�','���']
       return '��挾'+chineseNumber[index];
     }
-    optionsFormat(options:string[],needToCompareList:OptionDto):string{
+    optionsFormat(options:OptionBtnDto[],needToCompareList:OptionDto):string{
       return _.isEqual(options.length,needToCompareList.options.length) ? needToCompareList.selectAll: _.join(options,',');
     }
   }

--
Gitblit v1.8.0