diff --git a/src/views/examination.vue b/src/views/examination.vue
index 2568ef0..00a0e81 100644
--- a/src/views/examination.vue
+++ b/src/views/examination.vue
@@ -6,10 +6,10 @@
-
+
- {{item}}
-
+ {{item.slice(-2)}}
+
@@ -137,7 +137,8 @@ export default {
startTime:'',
endTime:'',
cupCardNo:'',
- dayArr:[]
+ dayArr:[],
+ yesterDay:''
}
},
created() {
@@ -151,12 +152,15 @@ export default {
let year = new Date().getFullYear();
let month = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1
let month1 = new Date().getMonth() + 2 < 10 ? '0' + (new Date().getMonth() + 2) : new Date().getMonth() + 2;
+ let day = new Date().getDate() < 10 ? '0' + parseInt(new Date().getDate() - 1) : new Date().getDate() - 1
let lastDay = new Date(new Date().getFullYear(),new Date().getMonth() + 2,0).getDate();
+ this.yesterDay = year + '-' + month + '-' + day
+ console.log(this.yesterDay)
this.selectDate = year + '-' + month + '-' + (this.today < 10 ? '0' + this.today : this.today);
for(var i = WeekFirstDay.getDate();i<= parseInt(WeekFirstDay.getDate()) + 6;i++){
- this.weekArr.push(i)
+ i = i < 10 ? '0' + i : i
+ this.weekArr.push(year + '-' + month + '-' + i)
}
- console.log(this.weekArr)
var todayWeek = new Date().getDay();
this.weekData.map((item,index) =>{
if(index + 1 == todayWeek){
@@ -259,17 +263,19 @@ export default {
console.log(retData.data)
if(retData.data.length == 0){
this.examData = retData.data
- lightAppJssdk.notification.alert({
- message: "当前时间无体检项目",
- title: "提示",//可传空
- buttonName: "收到",
- success: (data) => {
- this.$toast.clear();
- // console.log(this.examData)
- },
- fail: function (data) { //错误返回
- }
- })
+ this.$toast.clear();
+ // lightAppJssdk.notification.alert({
+ // message: "当前时间无体检项目",
+ // title: "提示",//可传空
+ // buttonName: "收到",
+ // success: (data) => {
+
+ // // console.log(this.examData)
+ // },
+ // fail: data => { //错误返回
+ // // this.$toast.clear();
+ // }
+ // })
}else{
this.examData = retData.data;
this.$toast.clear();
@@ -293,18 +299,20 @@ export default {
}
).then(res =>{
if(res.data.length == 0){
- this.examData = res.data
- lightAppJssdk.notification.alert({
- message: "当前时间无体检项目",
- title: "提示",//可传空
- buttonName: "收到",
- success: (data) => {
- this.$toast.clear();
- // console.log(this.examData)
- },
- fail: function (data) { //错误返回
- }
- })
+ this.examData = res.data;
+ this.$toast.clear();
+ // lightAppJssdk.notification.alert({
+ // message: "当前时间无体检项目",
+ // title: "提示",//可传空
+ // buttonName: "收到",
+ // success: (data) => {
+ // this.$toast.clear();
+ // // console.log(this.examData)
+ // },
+ // fail: function (data) { //错误返回
+ // console.log('data')
+ // }
+ // })
}else{
this.examData = res.data;
this.examData.map(item =>{
@@ -367,9 +375,9 @@ export default {
return day
},
changeDate(item){
- let year = new Date().getFullYear()
- let month = new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + 1
- this.selectDate = year + '-' + month + '-' + item;
+ // let year = new Date().getFullYear()
+ // let month = new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + 1
+ this.selectDate = item;
console.log(this.selectDate)
this.getList()
this.isToday = item
@@ -448,9 +456,9 @@ export default {
let m = date.getMonth() + 1
m < 10 ? m = '0' + m : m
let d = date.getDate()
- // d < 10 ? d = "0" + d : d
+ d < 10 ? d = "0" + d : d
// let datetime = y + '-' + m + '-' + d
- let datetime = d
+ let datetime = y + '-' + m + '-' + d
dates.push(datetime)
}
return dates