修改体检项目选中

main
jinna 3 years ago
parent b7ea5d94cd
commit 5cc4d19cd5
  1. 19
      src/views/examination.vue

@ -124,7 +124,7 @@ export default {
let lastDay = new Date(new Date().getFullYear(), new Date().getMonth() + 2, 0).getDate(); let lastDay = new Date(new Date().getFullYear(), new Date().getMonth() + 2, 0).getDate();
this.yesterDay = year + '-' + month + '-' + day this.yesterDay = year + '-' + month + '-' + day
let day1 = year + '-' + month + '-' + this.today let day1 = year + '-' + month + '-' + this.today
console.log(this.yesterDay) // console.log(this.yesterDay)
this.selectDate = year + '-' + month + '-' + (this.today < 10 ? '0' + this.today : this.today); this.selectDate = year + '-' + month + '-' + (this.today < 10 ? '0' + this.today : this.today);
// for (var i = WeekFirstDay.getDate(); i <= parseInt(WeekFirstDay.getDate()) + 6; i++) { // for (var i = WeekFirstDay.getDate(); i <= parseInt(WeekFirstDay.getDate()) + 6; i++) {
// i = i < 10 ? '0' + i : i // i = i < 10 ? '0' + i : i
@ -147,7 +147,7 @@ export default {
// //
calcTime(apmDay, item) { calcTime(apmDay, item) {
let lattime = apmDay.replace(/-/gi,'/') + ' ' + (item.period == '下午' ? 12 + parseInt(item.timeFrame.split('-')[1].split(':')[0]) : item.timeFrame.split('-')[1].split(':')[0]) + ':' + item.timeFrame.split('-')[1].split(':')[1] + ':00'; let lattime = apmDay.replace(/-/gi,'/') + ' ' + (item.period == '下午' ? 12 + parseInt(item.timeFrame.split('-')[1].split(':')[0]) : item.timeFrame.split('-')[1].split(':')[0]) + ':' + item.timeFrame.split('-')[1].split(':')[1] + ':00';
console.log('lattime22', lattime , this.systemTime); // console.log('lattime22', lattime , this.systemTime);
return lattime; return lattime;
}, },
querySystemTime() { querySystemTime() {
@ -202,7 +202,7 @@ export default {
} }
).then(res => { ).then(res => {
this.dayArr = res.data; this.dayArr = res.data;
console.log(this.dayArr) // console.log(this.dayArr)
for (let key in this.dayArr) { for (let key in this.dayArr) {
this.dayArr[key].map(item => { this.dayArr[key].map(item => {
this.numData.push({ this.numData.push({
@ -227,7 +227,7 @@ export default {
duration: 0, duration: 0,
}) })
if (this.GlobalConfig.appMode) { if (this.GlobalConfig.appMode) {
console.log('接口') // console.log('')
let val = { let val = {
createDept: this.hospitalId, createDept: this.hospitalId,
apmDay: this.selectDate, apmDay: this.selectDate,
@ -237,7 +237,7 @@ export default {
.then((value) => { .then((value) => {
this.$toast.clear(); this.$toast.clear();
let retData = JSON.parse(value) let retData = JSON.parse(value)
console.log(retData.data) // console.log(retData.data)
if(retData.code == 200) { if(retData.code == 200) {
this.examData = retData.data; this.examData = retData.data;
this.examData.map(item => { this.examData.map(item => {
@ -267,7 +267,7 @@ export default {
}) })
}) })
} }
console.log(this.examData) // console.log(this.examData)
}, err => { }, err => {
this.$toast.clear(); this.$toast.clear();
@ -325,7 +325,7 @@ export default {
// let month = new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + 1 // let month = new Date().getMonth() < 10 ? '0' + parseInt(new Date().getMonth() + 1) : new Date().getMonth() + 1
this.examData = []; this.examData = [];
this.selectDate = item; this.selectDate = item;
console.log(this.selectDate) // console.log(this.selectDate)
this.getList() this.getList()
this.isToday = item this.isToday = item
}, },
@ -342,14 +342,14 @@ export default {
if (item.project == val.project) { if (item.project == val.project) {
item.detailList.find(item1 => { item.detailList.find(item1 => {
if (item1.timeFrame == val1.timeFrame) { if (item1.timeFrame == val1.timeFrame) {
item1.isSelect = true item1.isSelect = !item1.isSelect
} else { } else {
item1.isSelect = false item1.isSelect = false
} }
}) })
} }
}) })
this.examData = arr this.examData = arr;
this.examData.map(item => { this.examData.map(item => {
item.detailList.map(item1 => { item.detailList.map(item1 => {
if (item1.isSelect) { if (item1.isSelect) {
@ -361,6 +361,7 @@ export default {
} }
}) })
}) })
console.log(this.selectArr)
}, },
onConfirm(date) { onConfirm(date) {
let year = date.getFullYear(); let year = date.getFullYear();

Loading…
Cancel
Save