From 3952549775758a587ae9890e5f19c5c7be21cbdd Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Fri, 17 Feb 2023 17:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E9=A2=84=E7=BA=A6=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=88=A4=E6=96=AD=EF=BC=8C=E7=88=B1=E5=B1=B1=E4=B8=9C?= =?UTF-8?q?=E4=B8=AD=E8=BD=AC=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/aisdapp.js | 2 +- src/views/Guidance.vue | 32 ++++++++++++++------ src/views/HomeView.vue | 69 ++++++++++++++++++++++++++---------------- src/views/myExam.vue | 36 +++++++++++----------- 4 files changed, 85 insertions(+), 54 deletions(-) diff --git a/src/utils/aisdapp.js b/src/utils/aisdapp.js index 9158f9e..c5dff29 100644 --- a/src/utils/aisdapp.js +++ b/src/utils/aisdapp.js @@ -5,7 +5,7 @@ export const appword = "aKd20dbGdFvmuwrt" const appid = 'cgstjyyjzpzp'; -const appMode = true;//是否开启爱山东中控台接口调用方式 +const appMode = false;//是否开启爱山东中控台接口调用方式 export default { appid, diff --git a/src/views/Guidance.vue b/src/views/Guidance.vue index d89dc5a..35ea5ae 100644 --- a/src/views/Guidance.vue +++ b/src/views/Guidance.vue @@ -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(); } diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 8a20fd9..f0e5fbb 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -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 } }) + } + }) + } } }, //登陆 diff --git a/src/views/myExam.vue b/src/views/myExam.vue index aaffd52..2a9c91e 100644 --- a/src/views/myExam.vue +++ b/src/views/myExam.vue @@ -30,7 +30,7 @@
{{ + :class="[item1.apmStatus == 3 ? 'finish' : item1.apmStatus == 1 || item1.limitCancelTime < 30 * 60 * 1000 ? 'cancel_item' : '',]">{{ item1.apmStatus == 1 ? '已取消' : item1.apmStatus == 2 ? '取消预约' : item1.apmStatus == 3 ? '已完成' : '取消预约' }}
@@ -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: "提示",//可传空