fix: requirement 確認有值再執行 split(), 畫面上無值則顯示 '--'
| | |
| | | <p>性別:<span>{{gender}}</span></p> |
| | | <p>年齡:<span>{{client.age | toAgeLabel }}</span></p> |
| | | <p>職業:<span>{{client.job}}</span></p> |
| | | <p>需求:<span>{{client.requirement.split(',').join('、')}}</span></p> |
| | | <p>需求:<span>{{ client.requirement ? client.requirement.split(',').join('、') : '--' }}</span></p> |
| | | <p v-for="(item, index) in hopeContactTime" |
| | | :key="index" |
| | | >連絡時段{{index + 1 | formatNumber}}:<span>{{ item | formatHopeContactTime}}</span></p> |
| | |
| | | } |
| | | |
| | | get requirements() { |
| | | return this.client.requirement.split(','); |
| | | return this.client.requirement ? this.client.requirement.split(',') : []; |
| | | } |
| | | |
| | | get gender() { |
| | |
| | | <p>性別:{{gender}}</p> |
| | | <p>年齡:{{appointmentDetail.age | toAgeLabel }}</p> |
| | | <p>職業:{{appointmentDetail.job}}</p> |
| | | <p>需求:{{appointmentDetail.requirement.split(',').join('、')}}</p> |
| | | <p>需求:{{appointmentDetail.requirement ? appointmentDetail.requirement.split(',').join('、') : '--'}}</p> |
| | | <p |
| | | v-for="(item, index) in hopeContactTime" |
| | | :key="index" |
| | |
| | | <p>性別:{{gender}}</p> |
| | | <p>年齡:{{appointmentDetail.age | toAgeLabel }}</p> |
| | | <p>職業:{{appointmentDetail.job}}</p> |
| | | <p>需求:{{appointmentDetail.requirement.split(',').join('、')}}</p> |
| | | <p>需求:{{ appointmentDetail.requirement ? appointmentDetail.requirement.split(',').join('、') : '--'}}</p> |
| | | <p |
| | | v-for="(item, index) in hopeContactTime" |
| | | :key="index" |
| | |
| | | |
| | | reAppointment(): void { |
| | | appointmentService.cancelAppointment(this.appointmentDetail.id).then(() => { |
| | | const requirements = this.appointmentDetail.requirement.split(','); |
| | | const requirements = this.appointmentDetail && this.appointmentDetail.requirement |
| | | ? this.appointmentDetail.requirement.split(',') |
| | | : []; |
| | | this.storeConsultantList(); |
| | | this.storageStrickQueryItem({ requirements: requirements }); |
| | | this.storageClearNotContactAppointmentIdFromMsg(); |
| | |
| | | return { |
| | | ...appointmentInfo, |
| | | hopeContactTime: hopeContactTime, |
| | | requirement: appointmentInfo.requirement.split(',') |
| | | requirement: appointmentInfo.requirement |
| | | ? appointmentInfo.requirement.split(',') |
| | | : [] |
| | | } |
| | | } else { |
| | | return null; |