PAMapp/components/phoneContactTimePicker.vue | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 | |
PAMapp/pages/agentInfo/edit/_agentNo.vue | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 | |
PAMapp/shared/services/message-box.service.ts | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 | |
PAMapp/shared/services/my-consultant.service.ts | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 |
PAMapp/components/phoneContactTimePicker.vue
@@ -74,18 +74,17 @@ import { dayTimeFrames } from "~/shared/const/day-time-frames"; import { OptionBtnDto, OptionDto } from "~/shared/models/optionBtnDto.model"; import { weekDays } from "~/shared/const/week-days"; import * as _ from "lodash"; @Component({ filters:{ titleFormatByIndex(index:number):string{ const chineseNumber = ['一','二','三','四','五','六','七','八','九','十']; return '時段'+chineseNumber[index]; }, optionsFormat(selectedOptions:string[]|[], compareOptions:OptionDto): string{ return _.isEqual(selectedOptions.length,compareOptions.options.length) optionsFormat(selectedOptions = [], compareOptions) { return selectedOptions.length === compareOptions.options.length ? compareOptions.selectAll : _.join(selectedOptions,','); }, : selectedOptions.join(','); } } }) export default class PhoneContactTimePicker extends Vue { @@ -110,7 +109,7 @@ ////////////////////////////////////////////////////////////////////// get isOpenByDayPopUp(): boolean{ return _.isEqual(this.popUpMode , TimePickerMode.SELECT_DAY) return this.popUpMode === TimePickerMode.SELECT_DAY; } set isOpenByDayPopUp(value:boolean){ @@ -118,7 +117,7 @@ } get isOpenByTimePopUp(): boolean{ return _.isEqual(this.popUpMode , TimePickerMode.SELECT_TIME); return this.popUpMode === TimePickerMode.SELECT_TIME; } set isOpenByTimePopUp(value:boolean){ @@ -128,7 +127,7 @@ ////////////////////////////////////////////////////////////////////// openPopUp(schedule:scheduleDto,index:number):void{ this.initPickerControl = _.cloneDeep(schedule); this.initPickerControl = JSON.parse(JSON.stringify(schedule)); this.popUpMode = TimePickerMode.SELECT_DAY; this.scheduleIndex = index; } @@ -144,8 +143,8 @@ } private initPickerFormatSort(initPickerControl:scheduleDto):scheduleDto{ _.keys(initPickerControl).forEach(keyName=>{ const options = _.isEqual(keyName,'selectWeekOptions') ? weekDays : dayTimeFrames; Object.keys(initPickerControl).forEach(keyName=>{ const options = keyName === 'selectWeekOptions' ? weekDays : dayTimeFrames; initPickerControl[keyName] = this.getOptionsBySort(initPickerControl[keyName],options); }) return initPickerControl; @@ -153,7 +152,7 @@ // 資料重新排序,回復一開始清單順序 private getOptionsBySort( selectedOptions:string[] , options:OptionBtnDto[]): string[] { return options.map( o => _.includes(selectedOptions , o.label) ? o.label as string : '').filter(String); return options.map( o => selectedOptions.includes(o.label as string) ? o.label as string : '').filter(String); } addNewSchedule(): void { PAMapp/pages/agentInfo/edit/_agentNo.vue
@@ -264,7 +264,6 @@ import { Context } from '@nuxt/types'; import { namespace } from 'nuxt-property-decorator'; import { Vue, Component, Prop } from 'vue-property-decorator'; import * as _ from "lodash"; import myConsultantService from '~/shared/services/my-consultant.service'; import accountSettingService from '~/shared/services/account-setting.service'; @@ -410,7 +409,7 @@ this.editInfoValue = { ...this.defaultAgentInfoSetting, expertise: _.cloneDeep(this.defaultAgentInfoSetting.expertise), expertise: JSON.parse(JSON.stringify(this.defaultAgentInfoSetting.expertise)), communicationStyle: this.defaultAgentInfoSetting.communicationStyle?.split('、') || [], }; } @@ -469,7 +468,7 @@ get phoneValid(): boolean { const rule = /^09[0-9]{8}$/; return this.editInfoValue.phoneNumber ? rule.test(this.editInfoValue.phoneNumber) && _.isEqual(this.editInfoValue.phoneNumber.length,10) ? rule.test(this.editInfoValue.phoneNumber) && this.editInfoValue.phoneNumber.length === 10 : true; } PAMapp/shared/services/message-box.service.ts
@@ -1,6 +1,5 @@ import { MessageBox } from 'element-ui'; import { MessageBoxData } from "element-ui/types/message-box"; import _ from "lodash"; class MessageBoxService { @@ -22,7 +21,7 @@ // 暫時用逗號去斷行 private breakTextByComma(errorMsg:string):string{ return _.split(errorMsg,",").join('<br>'); return errorMsg.split(",").join('<br>'); } } PAMapp/shared/services/my-consultant.service.ts
@@ -1,9 +1,8 @@ import _ from "lodash"; import { http } from "./httpClient"; import { AgentInfo } from '~/shared/models/agent-info.model'; import { Consultant } from "../models/consultant.model"; import { Appointment } from "../models/appointment.model"; import { Consultant } from "../models/consultant.model"; import { http } from "./httpClient"; class MyConsultantService { async getFavoriteConsultantList(): Promise<Consultant[]> { @@ -56,7 +55,7 @@ return http.get(`/consultant/avatar/${agentNo}`,{ responseType : 'arraybuffer' }) .then( response => { const toBase64 = window.btoa( _.reduce( new Uint8Array(response.data),(data,byte) => Array.from(new Uint8Array(response.data)).reduce((data, byte) => data + String.fromCharCode(byte),'') ); const imgSrc = `data:image/png;base64,${toBase64}`;