From dbd51e7f2d5f9c1b086aa8d5acc7b7fe3c0fa39e Mon Sep 17 00:00:00 2001
From: xuechunyuan <17853500702@163.com>
Date: Wed, 22 Feb 2023 09:42:42 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E9=A2=84=E7=BA=A6=E5=BB=B6?=
=?UTF-8?q?=E8=BF=9F=E9=87=8D=E7=BD=AE=E9=87=8D=E6=96=B0=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/aisdapp.js | 2 +-
src/views/myExam.vue | 57 ++++++++++++++++++++++++--------------------
vue.config.js | 4 ++--
3 files changed, 34 insertions(+), 29 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/myExam.vue b/src/views/myExam.vue
index 9be14d2..a728c11 100644
--- a/src/views/myExam.vue
+++ b/src/views/myExam.vue
@@ -5,11 +5,7 @@
查询无结果
暂无您的预约项目,请选择医院后进行预约
-
+
{{ item.createDeptName }}
@@ -30,7 +26,8 @@
{{ item1.project }}
-
+
{{
item1.apmStatus == 1 ? '您的体检项目已取消' : item1.apmStatus == 3 ? '体检项目已完成' : (item1.apmStatus == 2 &&
item1.lastExamTime == 0) ? '您的体检已过期' : item1.limitTime
@@ -40,7 +37,7 @@
{{
- item1.apmStatus == 1 ? '已取消' : item1.apmStatus == 2 ? '取消预约' : item1.apmStatus == 3 ? '已完成' : '取消预约'
+ item1.apmStatus == 1 ? '已取消' : item1.apmStatus == 2 ? '取消预约' : item1.apmStatus == 3 ? '已完成' : '取消预约'
}}
@@ -58,7 +55,7 @@ export default {
return {
current: 1,
size: 10,
- finished:false,
+ finished: false,
examArr: [],
userInfo: null,
systemTime: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
@@ -89,7 +86,7 @@ export default {
}
},
methods: {
- onLoad(){
+ onLoad() {
this.current += 1;
this.queryMyRecord();
},
@@ -134,8 +131,8 @@ export default {
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.lastCanTime = Date.parse(new Date(lasCanTime.replace(/-/g,'/')))
- item.lastTime = Date.parse(new Date(latime.replace(/-/g,'/')))
+ item.lastCanTime = Date.parse(new Date(lasCanTime.replace(/-/g, '/')))
+ item.lastTime = Date.parse(new Date(latime.replace(/-/g, '/')))
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;//距离取消预约剩余毫秒数
@@ -152,15 +149,15 @@ export default {
// }else{
// this.examArr = retData.data.records;
// }
- this.examArr = [...this.examArr,...list];
+ this.examArr = [...this.examArr, ...list];
console.log(this.examArr)
- if(retData.data.total == this.examArr.length){
+ if (retData.data.total == this.examArr.length) {
this.finished = true
- }else{
+ } else {
this.current++
}
-
-
+
+
}
}, err => {
this.$toast.clear();
@@ -175,7 +172,7 @@ export default {
// }else{
// this.examArr = res.data.records;
// }
- list.map(item1 => {
+ list.map(item1 => {
item1.details.map(item => {
let systemTime = Date.parse(new Date(this.systemTime));
item.starTime = systemTime
@@ -183,9 +180,9 @@ export default {
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.lastCanTime = Date.parse(new Date(lasCanTime.replace(/-/g,'/')))
- item.lastTime = Date.parse(new Date(latime.replace(/-/g,'/')))
- console.log('las',item.lastTime)
+ item.lastCanTime = Date.parse(new Date(lasCanTime.replace(/-/g, '/')))
+ item.lastTime = Date.parse(new Date(latime.replace(/-/g, '/')))
+ console.log('las', item.lastTime)
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;//距离取消预约剩余毫秒数
@@ -198,13 +195,13 @@ export default {
})
this.timeList()
- this.examArr = [...this.examArr,...list];
- if(res.data.total == res.data.pages){
+ this.examArr = [...this.examArr, ...list];
+ if (res.data.total == res.data.pages) {
this.finished = true
- }else{
+ } else {
this.current++
}
-
+
// this.examArr.map(item => {
// let systemTime = Date.parse(new Date(this.systemTime));
// this.starTime = systemTime
@@ -363,7 +360,11 @@ export default {
let retData = JSON.parse(value);
if (retData.code == 200) {
this.$toast('操作成功');
- this.queryMyRecord();
+ setTimeout(() => {
+ this.current = 1;
+ this.examArr = []
+ this.queryMyRecord();
+ }, 500);
}
}, err => {
})
@@ -373,7 +374,11 @@ export default {
console.log(res)
if (res.code == 200) {
this.$toast('操作成功');
- this.queryMyRecord();
+ setTimeout(() => {
+ this.current = 1;
+ this.examArr = []
+ this.queryMyRecord();
+ }, 500);
}
})
}
diff --git a/vue.config.js b/vue.config.js
index 1c5f77f..f8eea76 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -8,8 +8,8 @@ module.exports = defineConfig({
proxy: {
"/api": {
//本地服务接口地址
- // target: "http://192.168.1.3:8088",
- target: "http://192.168.1.106",
+ target: "http://192.168.1.3:8080",
+ // target: "http://192.168.1.106",
//远程演示服务地址,可用于直接启动项目
// target: 'https://saber.bladex.vip/api',
ws: true,