|
|
|
@ -26,11 +26,15 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="pro_name">{{ item1.project }} </div> |
|
|
|
<div class="pro_name">{{ item1.project }} </div> |
|
|
|
<div class="pro_pos" :class="[item1.apmStatus === 2 ? 'tips' : item1.apmStatus == 1 ? 'cancel_tip' : '',]"> |
|
|
|
<div class="pro_pos" :class="[item1.apmStatus === 2 ? 'tips' : item1.apmStatus == 1 ? 'cancel_tip' : '',]"> |
|
|
|
{{ item1.apmStatus == 1 ? '您的体检项目已取消' : item1.apmStatus == 3 ? '体检项目已完成' : (item1.apmStatus == 2 && item1.lastExamTime == 0) ? '您的体检已过期' : item1.limitTime }}</div> |
|
|
|
{{ |
|
|
|
|
|
|
|
item1.apmStatus == 1 ? '您的体检项目已取消' : item1.apmStatus == 3 ? '体检项目已完成' : (item1.apmStatus == 2 && |
|
|
|
|
|
|
|
item1.lastExamTime == 0) ? '您的体检已过期' : item1.limitTime |
|
|
|
|
|
|
|
}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="pro_right"> |
|
|
|
<div class="pro_right"> |
|
|
|
<div class="cancel" @click="cancelRegisiter(item1)" |
|
|
|
<div class="cancel" @click="cancelRegisiter(item1)" |
|
|
|
:class="[item1.apmStatus == 3 ? 'finish' : item1.apmStatus == 1 || item1.limitCancelTime < 30 * 60 * 1000 ? 'cancel_item' : '',]">{{ |
|
|
|
:class="[item1.apmStatus == 3 ? 'finish' : item1.apmStatus == 1 || item1.limitCancelTime < 30 * 60 * 1000 ? 'cancel_item' : '',]"> |
|
|
|
|
|
|
|
{{ |
|
|
|
item1.apmStatus == 1 ? '已取消' : item1.apmStatus == 2 ? '取消预约' : item1.apmStatus == 3 ? '已完成' : '取消预约' |
|
|
|
item1.apmStatus == 1 ? '已取消' : item1.apmStatus == 2 ? '取消预约' : item1.apmStatus == 3 ? '已完成' : '取消预约' |
|
|
|
}}</div> |
|
|
|
}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -80,9 +84,20 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
//系统时间 |
|
|
|
//系统时间 |
|
|
|
querySystemTime() { |
|
|
|
querySystemTime() { |
|
|
|
|
|
|
|
if (this.GlobalConfig.appMode) { |
|
|
|
|
|
|
|
vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczhqxtsj", JSON.stringify({}), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { |
|
|
|
|
|
|
|
let retData = value; |
|
|
|
|
|
|
|
if (retData.code == 200) { |
|
|
|
|
|
|
|
this.systemTime = retData.data; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, err => { |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
getSystemTime().then(res => { |
|
|
|
getSystemTime().then(res => { |
|
|
|
this.systemTime = res.data; |
|
|
|
this.systemTime = res.data; |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
//我的预约列表 |
|
|
|
//我的预约列表 |
|
|
|
queryMyRecord() { |
|
|
|
queryMyRecord() { |
|
|
|
@ -91,6 +106,39 @@ export default { |
|
|
|
duration: 0, |
|
|
|
duration: 0, |
|
|
|
}) |
|
|
|
}) |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
if (this.GlobalConfig.appMode) { |
|
|
|
|
|
|
|
vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdckwdyy", JSON.stringify({ createDept: "", cupCardNo: this.userInfo.papersnumber, current: this.current, size: this.size }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { |
|
|
|
|
|
|
|
this.$toast.clear(); |
|
|
|
|
|
|
|
let retData = JSON.parse(value); |
|
|
|
|
|
|
|
// console.log(retData,'record') |
|
|
|
|
|
|
|
if (retData.code == 200) { |
|
|
|
|
|
|
|
this.examArr = retData.data.records; |
|
|
|
|
|
|
|
console.log(this.examArr) |
|
|
|
|
|
|
|
this.examArr.map(item1 => { |
|
|
|
|
|
|
|
item1.details.map(item => { |
|
|
|
|
|
|
|
console.log(item) |
|
|
|
|
|
|
|
let systemTime = Date.parse(new Date(this.systemTime)); |
|
|
|
|
|
|
|
item.starTime = systemTime |
|
|
|
|
|
|
|
let latime = item1.apmDay.substr(0, 10) + ' ' + item.timeFrame.split('-')[1] + ':00'; |
|
|
|
|
|
|
|
let lasCanTime = item1.apmDay.substr(0, 10) + ' ' + item.timeFrame.split('-')[0] + ':00'; |
|
|
|
|
|
|
|
item.lastCanTime = Date.parse(new Date(lasCanTime.replaceAll('-', '/'))) |
|
|
|
|
|
|
|
item.lastTime = Date.parse(new Date(latime.replaceAll('-', '/'))) |
|
|
|
|
|
|
|
item.limitTime = this.intervalTime(item.starTime, item.lastTime) |
|
|
|
|
|
|
|
item.lastExamTime = systemTime < item.lastTime ? item.lastTime - systemTime : 0 |
|
|
|
|
|
|
|
item.limitCancelTime = systemTime < item.lastCanTime ? item.lastCanTime - systemTime : 0;//距离取消预约剩余毫秒数 |
|
|
|
|
|
|
|
// console.log(latime,item.lastTime,lasCanTime,item.lastCanTime,item.limitCancelTime) //670422000 |
|
|
|
|
|
|
|
// this.$set( |
|
|
|
|
|
|
|
// item,"limitTime",item.limitTime |
|
|
|
|
|
|
|
// ); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.timeList() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, err => { |
|
|
|
|
|
|
|
this.$toast.clear(); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
myRecord("", this.userInfo.papersnumber, this.current, this.size).then(res => { |
|
|
|
myRecord("", this.userInfo.papersnumber, this.current, this.size).then(res => { |
|
|
|
this.$toast.clear(); |
|
|
|
this.$toast.clear(); |
|
|
|
this.examArr = res.data.records; |
|
|
|
this.examArr = res.data.records; |
|
|
|
@ -153,6 +201,7 @@ export default { |
|
|
|
}, err => { |
|
|
|
}, err => { |
|
|
|
this.$toast.clear(); |
|
|
|
this.$toast.clear(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
this.$toast.clear(); |
|
|
|
this.$toast.clear(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -265,7 +314,18 @@ export default { |
|
|
|
success: (data) => { |
|
|
|
success: (data) => { |
|
|
|
console.log(data) |
|
|
|
console.log(data) |
|
|
|
if (JSON.parse(data).buttonIndex == 1) { |
|
|
|
if (JSON.parse(data).buttonIndex == 1) { |
|
|
|
console.log('ces') |
|
|
|
// console.log('ces') |
|
|
|
|
|
|
|
if (this.GlobalConfig.appMode) { |
|
|
|
|
|
|
|
vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdqxtjyy", JSON.stringify({ id: row.id }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { |
|
|
|
|
|
|
|
let retData = JSON.parse(value); |
|
|
|
|
|
|
|
if (retData.code == 200) { |
|
|
|
|
|
|
|
this.$toast('操作成功'); |
|
|
|
|
|
|
|
this.queryMyRecord(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, err => { |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
recordCancel(row.id).then(res => { |
|
|
|
recordCancel(row.id).then(res => { |
|
|
|
console.log(res) |
|
|
|
console.log(res) |
|
|
|
if (res.code == 200) { |
|
|
|
if (res.code == 200) { |
|
|
|
@ -274,6 +334,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
fail: function (data) { //错误返回 |
|
|
|
fail: function (data) { //错误返回 |
|
|
|
} |
|
|
|
} |
|
|
|
|