From 83ecf6988b26bd6d9f4e4560190a547447265ce3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com>
Date: Thu, 9 Nov 2023 15:55:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 1 +
pages/medicalservice/medicalservice.vue | 113 +++++++++++++++---
.../consultationplatform.vue | 24 +++-
.../createnewconsultation.vue | 113 +++++++++++++-----
4 files changed, 203 insertions(+), 48 deletions(-)
diff --git a/pages.json b/pages.json
index 8f226a4..f162a12 100644
--- a/pages.json
+++ b/pages.json
@@ -17,6 +17,7 @@
"navigationStyle": "custom"
}
},
+
{
"path": "pages/myinformation/myinformation",
"style": {
diff --git a/pages/medicalservice/medicalservice.vue b/pages/medicalservice/medicalservice.vue
index e685a88..8a13b2c 100644
--- a/pages/medicalservice/medicalservice.vue
+++ b/pages/medicalservice/medicalservice.vue
@@ -37,6 +37,7 @@
+
@@ -74,6 +75,7 @@
methods: {
goAppointmentscreening() {
// 筛查预约
+
if (!this.userInfo) {
uni.showModal({
title: "提示",
@@ -90,7 +92,8 @@
}
},
})
- } else {
+ }
+ else {
getScreening(this.patientId).then(res => {
if (res.code == 200) {
let userinfo = JSON.stringify(this.userInfo)
@@ -115,9 +118,21 @@
},
//跳转健康常识item
gohealthitem(item) {
- uni.navigateTo({
- url: `/pagesB/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
- })
+ const value = uni.getStorageSync('openid');
+ const value2 = uni.getStorageSync('patientId');
+ if (value && value2) {
+ uni.navigateTo({
+ url: `/pagesB/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
+ })
+ } else {
+ this.$refs.uToast.show({
+ title: '您未登录,请先登录',
+ type: 'error',
+ duration: '1000',
+ url: '/pages/login/login'
+ })
+ }
+
},
// 健康常识
getHeathHousing() {
@@ -138,31 +153,79 @@
// this.$store.dispatch("openPopup");
// this.openPopup();
setTimeout(e => {
- uni.navigateTo({
- url: '/pagesB/materialbenefits/materialbenefits'
- })
+ const value = uni.getStorageSync('openid');
+ const value2 = uni.getStorageSync('patientId');
+ if (value && value2) {
+ uni.navigateTo({
+ url: '/pagesB/materialbenefits/materialbenefits'
+ })
+ } else {
+ this.$refs.uToast.show({
+ title: '您未登录,请先登录',
+ type: 'error',
+ duration: '1000',
+ url: '/pages/login/login'
+ })
+ }
+
}, 0)
},
//跳转护理站页面
gosite() {
// this.openPopup();
setTimeout(e => {
- uni.navigateTo({
- url: '/pagesB/site/site'
- })
+ const value = uni.getStorageSync('openid');
+ const value2 = uni.getStorageSync('patientId');
+ if (value && value2) {
+ uni.navigateTo({
+ url: '/pagesB/site/site'
+ })
+ } else {
+ this.$refs.uToast.show({
+ title: '您未登录,请先登录',
+ type: 'error',
+ duration: '1000',
+ url: '/pages/login/login'
+ })
+ }
+
}, 0)
},
//健康常识
gohealth() {
- uni.navigateTo({
- url: '/pagesB/Healthknowledge/Healthknowledge'
- })
+ const value = uni.getStorageSync('openid');
+ const value2 = uni.getStorageSync('patientId');
+ if (value && value2) {
+ uni.navigateTo({
+ url: '/pagesB/Healthknowledge/Healthknowledge'
+ })
+ } else {
+ this.$refs.uToast.show({
+ title: '您未登录,请先登录',
+ type: 'error',
+ duration: '1000',
+ url: '/pages/login/login'
+ })
+ }
+
},
// 筛查结果
result() {
- uni.navigateTo({
- url: '/pagesB/SelectItem/SelectItem'
- })
+ const value = uni.getStorageSync('openid');
+ const value2 = uni.getStorageSync('patientId');
+ if (value && value2) {
+ uni.navigateTo({
+ url: '/pagesB/SelectItem/SelectItem'
+ })
+ } else {
+ this.$refs.uToast.show({
+ title: '您未登录,请先登录',
+ type: 'error',
+ duration: '1000',
+ url: '/pages/login/login'
+ })
+ }
+
},
@@ -170,9 +233,21 @@
goshopping() {
// this.openPopup();
setTimeout(e => {
- uni.navigateTo({
- url: '/pagesB/shopping/shopping'
- })
+ const value = uni.getStorageSync('openid');
+ const value2 = uni.getStorageSync('patientId');
+ if (value && value2) {
+ uni.navigateTo({
+ url: '/pagesB/shopping/shopping'
+ })
+ } else {
+ this.$refs.uToast.show({
+ title: '您未登录,请先登录',
+ type: 'error',
+ duration: '1000',
+ url: '/pages/login/login'
+ })
+ }
+
}, 0)
},
//问诊平台
diff --git a/pagesB/consultationplatform/consultationplatform.vue b/pagesB/consultationplatform/consultationplatform.vue
index cd02d3d..ae637d4 100644
--- a/pagesB/consultationplatform/consultationplatform.vue
+++ b/pagesB/consultationplatform/consultationplatform.vue
@@ -59,6 +59,7 @@
data() {
return {
baseurl: '',
+ region: '',
tabcurrent: 0,
pageNum: 1,
pageSize: 10,
@@ -70,13 +71,32 @@
},
onLoad() {
this.baseurl = baseurl
+ this.info()
this.selectDepartmentinfo();
},
methods: {
+ info() {
+ this.region = uni.getStorageSync('region')
+ console.log(this.region, '859')
+ if (this.region == 3) {
+ this.$refs.uToast.show({
+ title: '当前地区不支持,请重新选择区域',
+ type: 'error',
+ duration: '2000',
+ // url:'/pages/homepage/homepage'
+ })
+ uni.navigateTo({
+ '/pages/homepage/homepage'
+ })
+ // uni.navigateBack({
+ // delta: 1
+ // })
+ }
+ },
//人员
selectHospitalPersonInfo() {
- var status='1'
- selectHospitalPerson(this.pageNum, this.pageSize, this.departmentId,status).then(res => {
+ var status = '1'
+ selectHospitalPerson(this.pageNum, this.pageSize, this.departmentId, status).then(res => {
this.HospitalPersonlist = res.rows
this.HospitalPersontotal = res.total
})
diff --git a/pagesB/createnewconsultation/createnewconsultation.vue b/pagesB/createnewconsultation/createnewconsultation.vue
index a1319dd..3b4f40e 100644
--- a/pagesB/createnewconsultation/createnewconsultation.vue
+++ b/pagesB/createnewconsultation/createnewconsultation.vue
@@ -172,12 +172,12 @@
},
doctorlist: [],
doctorName: '',
- doctorId:'',
+ doctorId: '',
};
},
onLoad(options) {
this.uoloadaction = baseurl + '/nurseApplet/consultationInfo/uploadConsultationFile'
-
+
},
onShow() {
this.areaInfo();
@@ -195,8 +195,8 @@
methods: {
updata() {
- this.formdata.doctorName=this.doctorName
- this.formdata.doctorId=this.doctorId
+ this.formdata.doctorName = this.doctorName
+ this.formdata.doctorId = this.doctorId
if (this.imglistlength > 0) {
this.$refs.uUpload.upload()
} else {
@@ -215,23 +215,82 @@
this.info();
},
info() {
- this.formdata.consultationType='IMAGE_TEXT_CONSULTATION'
- consultationInfo(this.formdata).then(res => {
- if (res.code == 200) {
- this.$refs.uToast.show({
- title: '新建图文问诊成功',
- type: 'success',
- duration: '1500',
- back: 1
- })
- }else if (res.code == 500){
- this.$refs.uToast.show({
- title: res.msg,
- type: 'error',
- duration: '1500',
- })
- }
- })
+ this.formdata.consultationType = 'IMAGE_TEXT_CONSULTATION'
+ if (!this.formdata.address) {
+ this.$refs.uToast.show({
+ title: '请选择地址',
+ type: 'error',
+ duration: '1500',
+ // url:'/pages/homepage/homepage'
+ })
+ } else if (!this.formdata.patientName) {
+ this.$refs.uToast.show({
+ title: '请选择姓名',
+ type: 'error',
+ duration: '1500',
+
+ })
+ } else if (!this.formdata.cardNo) {
+ this.$refs.uToast.show({
+ title: '请选择身份证号',
+ type: 'error',
+ duration: '1500',
+
+ })
+ } else if (!this.formdata.phone) {
+ this.$refs.uToast.show({
+ title: '请选择手机号',
+ type: 'error',
+ duration: '1500',
+
+ })
+ } else if (!this.formdata.doctorName) {
+ this.$refs.uToast.show({
+ title: '请选择医生',
+ type: 'error',
+ duration: '1500',
+
+ })
+ } else if (!this.formdata.problemDescription) {
+ this.$refs.uToast.show({
+ title: '请输入问题简述',
+ type: 'error',
+ duration: '1500',
+
+ })
+ } else if (!this.formdata.situationDescription) {
+ this.$refs.uToast.show({
+ title: '请输入患者个体说明',
+ type: 'error',
+ duration: '1500',
+
+ })
+ } else if (!this.formdata.medicalRecord) {
+ this.$refs.uToast.show({
+ title: '请输入既往疾病史',
+ type: 'error',
+ duration: '1500',
+
+ })
+ } else {
+ consultationInfo(this.formdata).then(res => {
+ if (res.code == 200) {
+ this.$refs.uToast.show({
+ title: '新建图文问诊成功',
+ type: 'success',
+ duration: '1500',
+ back: 1
+ })
+ } else if (res.code == 500) {
+ this.$refs.uToast.show({
+ title: res.msg,
+ type: 'error',
+ duration: '1500',
+ })
+ }
+ })
+ }
+
},
// 显示三级地址联动
showPicker() {
@@ -266,7 +325,7 @@
getHospitalPersonInfo(res.data.dutyDoctorNo, status).then(res => {
this.doctorName = res.data.personName
this.doctorId = res.data.id
- this.doctorlist=res.data
+ this.doctorlist = res.data
})
@@ -274,17 +333,17 @@
},
gochoosedoctor() {
- console.log(this.doctorlist,'44444')
+ console.log(this.doctorlist, '44444')
// detail(this.formdata.cardNo).then(res => {
// var status = '1'
// getHospitalPersonInfo(res.data.dutyDoctorNo, status).then(res => {
// console.log(res, '55')
// this.doctorlist = res.data
- uni.navigateTo({
- url: `/pagesC/choosedoctor/choosedoctor?item=${JSON.stringify(this.doctorlist)}`
- })
- // })
+ uni.navigateTo({
+ url: `/pagesC/choosedoctor/choosedoctor?item=${JSON.stringify(this.doctorlist)}`
+ })
+ // })
// })