我的预约时间判断,爱山东中转接口联调

main
xuechunyuan 3 years ago
parent 8fcab7fed4
commit 3952549775
  1. 2
      src/utils/aisdapp.js
  2. 32
      src/views/Guidance.vue
  3. 69
      src/views/HomeView.vue
  4. 36
      src/views/myExam.vue

@ -5,7 +5,7 @@ export const appword = "aKd20dbGdFvmuwrt"
const appid = 'cgstjyyjzpzp';
const appMode = true;//是否开启爱山东中控台接口调用方式
const appMode = false;//是否开启爱山东中控台接口调用方式
export default {
appid,

@ -34,15 +34,29 @@ export default {
duration: 0,
})
try {
queryArticleDetail(id).then(res => {
this.$toast.clear();
if (JSON.stringify(res.data) != '{}') {
res.data.content = decodeURIComponent(res.data.content);
this.article = res.data;
}
}, err => {
this.$toast.clear();
})
if (this.GlobalConfig.appMode) {
vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdhqwzxq", JSON.stringify({ createDept: id }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => {
this.$toast.clear();
let retData = JSON.parse(value);
if (retData.code == 200 && JSON.stringify(retData.data) != '{}') {
retData.data.content = decodeURIComponent(retData.data.content);
this.article = retData.data;
}
}, err => {
this.$toast.clear();
})
}
else {
queryArticleDetail(id).then(res => {
this.$toast.clear();
if (JSON.stringify(res.data) != '{}') {
res.data.content = decodeURIComponent(res.data.content);
this.article = res.data;
}
}, err => {
this.$toast.clear();
})
}
} catch (error) {
this.$toast.clear();
}

@ -76,25 +76,26 @@ export default {
message: '加载中',
duration: 0,
})
if (this.GlobalConfig.appMode) {
vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdhqyylb", JSON.stringify({}), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => {
this.$toast.clear();
let retData = JSON.parse(value);
if (retData.code == 200) {
this.hospitalList = retData.data;
}
}, err => {
this.$toast.clear();
})
return;
}
try {
queryHosiptal().then(res => {
this.$toast.clear();
this.hospitalList = res.data;
}, err => {
this.$toast.clear();
})
if (this.GlobalConfig.appMode) {
vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdhqyylb", JSON.stringify({}), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => {
this.$toast.clear();
let retData = JSON.parse(value);
if (retData.code == 200) {
this.hospitalList = retData.data;
}
}, err => {
this.$toast.clear();
})
}
else {
queryHosiptal().then(res => {
this.$toast.clear();
this.hospitalList = res.data;
}, err => {
this.$toast.clear();
})
}
} catch (error) {
this.$toast.clear();
}
@ -118,14 +119,30 @@ export default {
// console.log(this.userInfo.papersnumber)
if (this.userInfo) {
// console.log(this.userInfo.papersnumber);
checkBacklist(this.userInfo.papersnumber).then(res => {
if (res.data) {
this.errMsg = res.data;
this.isShowError = true;
} else {
this.$router.push({ name: 'guidance', query: { deptId: id } })
}
})
if (this.GlobalConfig.appMode) {
vaildInterfacefn("cgstjyyjzpzp", "qdsgajjtjczdyhhmdyz", JSON.stringify({ cupCardNo: this.userInfo.papersnumber }), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => {
this.$toast.clear();
let retData = JSON.parse(value);
if (retData.code == 200 && retData.data) {
this.errMsg = retData.data;
this.isShowError = true;
} else {
this.$router.push({ name: 'guidance', query: { deptId: id } })
}
}, err => {
this.$toast.clear();
})
}
else {
checkBacklist(this.userInfo.papersnumber).then(res => {
if (res.data) {
this.errMsg = res.data;
this.isShowError = true;
} else {
this.$router.push({ name: 'guidance', query: { deptId: id } })
}
})
}
}
},
//

@ -30,7 +30,7 @@
</div>
<div class="pro_right">
<div class="cancel" @click="cancelRegisiter(item1)"
:class="[item1.apmStatus == 3 ? 'finish' : item1.apmStatus == 1 ? '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 ? '已完成' : '取消预约'
}}</div>
</div>
@ -101,13 +101,13 @@ export default {
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))
item.lastTime = Date.parse(new Date(latime))
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(item.limitCancelTime) //670422000
// console.log(latime,item.lastTime,lasCanTime,item.lastCanTime,item.limitCancelTime) //670422000
// this.$set(
// item,"limitTime",item.limitTime
// );
@ -243,21 +243,21 @@ export default {
},
//
cancelRegisiter(row) {
if (row.apmStatus !== 2) {
return;
}
if (row.limitCancelTime < 30 * 60 * 1000) {
lightAppJssdk.notification.alert({
message: "预约的时段前30分钟可取消",
title: "提示",//
buttonName: "收到",
success: function (data) {
},
fail: function (data) { //
}
});
if (row.apmStatus !== 2 || row.limitCancelTime < 30 * 60 * 1000) {
return;
}
// if (row.limitCancelTime < 30 * 60 * 1000) {
// lightAppJssdk.notification.alert({
// message: "30",
// title: "",//
// buttonName: "",
// success: function (data) {
// },
// fail: function (data) { //
// }
// });
// return;
// }
lightAppJssdk.notification.confirm({
message: "是否取消该体检项目",
title: "提示",//

Loading…
Cancel
Save