|
@@ -103,11 +103,15 @@
|
|
},
|
|
},
|
|
//显示title
|
|
//显示title
|
|
titleStr(date) {
|
|
titleStr(date) {
|
|
- var hasIndex = this.hasDayList.indexOf(date);
|
|
|
|
- if (hasIndex > -1) {
|
|
|
|
- return '用药' + this.monthList[hasIndex]['times'] + '次';
|
|
|
|
- } else if (inDateBetwen(date, this.monthList[0]['name'], this.monthList[this.monthList.length - 1]['name'])) {
|
|
|
|
- return '停药';
|
|
|
|
|
|
+ if (this.monthList.length) {
|
|
|
|
+ var hasIndex = this.hasDayList.indexOf(date);
|
|
|
|
+ if (hasIndex > -1) {
|
|
|
|
+ return '用药' + this.monthList[hasIndex]['times'] + '次';
|
|
|
|
+ } else if (inDateBetwen(date, this.monthList[0]['name'], this.monthList[this.monthList.length - 1]['name'])) {
|
|
|
|
+ return '停药';
|
|
|
|
+ } else {
|
|
|
|
+ return '';
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
return '';
|
|
return '';
|
|
}
|
|
}
|