| | |
| | | <p>{{optionsFormat(scheduleDto.selectTimesOptions,timesOfDayOptions)}}</p> |
| | | </template> |
| | | <template v-else> |
| | | 請選擇 |
| | | 請選擇 |
| | | </template> |
| | | </div> |
| | | <div class="pam-contact-schedule__icon"> |
| | | <i v-if="checkFormHasDone(scheduleDto)" |
| | | class="icon-delet" |
| | | <i v-if="checkFormHasDone(scheduleDto)" |
| | | class="icon-delet" |
| | | :class="{'disable':syncScheduleList.length===1}" |
| | | @click.stop="deleteScheduleItem(index)"> |
| | | </i> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="pam-add-schedule cursor--pointer" |
| | | :class="{'disable':!checkFormHasDone(syncScheduleList[syncScheduleList.length-1])|| syncScheduleList.length ===7}" |
| | | :class="{'disable':!checkFormHasDone(syncScheduleList[syncScheduleList && syncScheduleList.length && syncScheduleList.length - 1])|| syncScheduleList.length ===7}" |
| | | @click="addNewSchedule"> |
| | | <i class="icon-add"></i> |
| | | 新增時段 |
| | | </div> |
| | | |
| | | <PopUpFrame class="pam-popUpFrame" |
| | | <PopUpFrame class="pam-popUpFrame" |
| | | :isOpen.sync="isOpenByStep_1" |
| | | :drawerSize="drawerSize" |
| | | :dialogWidth="dialogWidth"> |
| | | <div class="pam-popUp-title">{{popUpTitle}}</div> |
| | | <MultiSelectBtn class="mt-30" |
| | | :mutiSelect.sync="initPickerControl.selectWeekOptions" |
| | | :options="weekOptions.options" |
| | | <MultiSelectBtn class="mt-30" |
| | | :mutiSelect.sync="initPickerControl.selectWeekOptions" |
| | | :options="weekOptions.options" |
| | | :nameOfSelectAll="weekOptions.selectAll"> |
| | | </MultiSelectBtn> |
| | | <div class="pam-popUp-confirm-bolck pam-paragraph"> |
| | | <button class="pam-select-confirm" |
| | | :class="[initPickerControl.selectWeekOptions.length?'el-button--primary' :'is-disabled']" |
| | | <button class="pam-select-confirm" |
| | | :class="[initPickerControl.selectWeekOptions.length?'el-button--primary' :'is-disabled']" |
| | | @click="confirmByStep_1"> |
| | | 確定 |
| | | </button> |
| | | </div> |
| | | </PopUpFrame> |
| | | |
| | | <PopUpFrame class="pam-popUpFrame" |
| | | <PopUpFrame class="pam-popUpFrame" |
| | | :isOpen.sync="isOpenByStep_2" |
| | | :drawerSize="drawerSize" |
| | | :dialogWidth="dialogWidth"> |
| | | <div class="pam-popUp-title">{{popUpTitle}}</div> |
| | | <MultiSelectBtn class="mt-30" |
| | | :mutiSelect.sync="initPickerControl.selectTimesOptions" |
| | | :options="timesOfDayOptions.options" |
| | | <MultiSelectBtn class="mt-30" |
| | | :mutiSelect.sync="initPickerControl.selectTimesOptions" |
| | | :options="timesOfDayOptions.options" |
| | | :nameOfSelectAll="timesOfDayOptions.selectAll"> |
| | | </MultiSelectBtn> |
| | | <div class="pam-popUp-confirm-bolck pam-paragraph"> |
| | | <button class="pam-select-confirm" |
| | | :class="[initPickerControl.selectTimesOptions.length ?'el-button--primary' :'is-disabled']" |
| | | <button class="pam-select-confirm" |
| | | :class="[initPickerControl.selectTimesOptions.length ?'el-button--primary' :'is-disabled']" |
| | | @click="confirmByStep_2"> |
| | | 確定 |
| | | </button> |
| | |
| | | } |
| | | getOptionsBySort(options:OptionBtnDto[],selectedOptions:string[]):string[]{ |
| | | return options.map( o => _.includes(selectedOptions,o.title) ? o.title :'').filter(String); |
| | | // return |
| | | // return |
| | | } |
| | | addNewSchedule():void{ |
| | | const newScheduleDto={ |
| | |
| | | } |
| | | |
| | | checkFormHasDone(item:scheduleDto):boolean{ |
| | | return item.selectWeekOptions.length>0 && item.selectTimesOptions.length>0; |
| | | if (!item) return false; |
| | | return item.selectWeekOptions?.length>0 && item.selectTimesOptions?.length>0; |
| | | } |
| | | |
| | | titleFormatByIndex(index:number):string{ |