This commit is contained in:
zoujiandong 2026-03-16 14:35:45 +08:00
parent c6ce198c31
commit 45a9478790
14 changed files with 1613 additions and 50 deletions

View File

@ -792,6 +792,16 @@
}
}
},
{
"path": "searchPatient/searchPatient",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "visitPlan/visitPlan",
"style": {
@ -1127,16 +1137,7 @@
// }
// },
// {
// "path": "searchPatient/searchPatient",
// "style": {
// "navigationStyle": "custom",
// "navigationBarTitleText": "uni-app分页",
// "app": {
// "bounce": "none"
// }
// }
// },
// {
// "path": "qikan/qikan",
// "style": {

View File

@ -83,7 +83,7 @@ const loadAllGroups = async () => {
try {
const res = await api.groupList();
if (res.code === 200) {
const hiddenGroupNames = new Set(['待分组患者', '肝系医生非患教组', '肝系医生患教组']);
const hiddenGroupNames = new Set(['待分组患者', '肝系一生非患教组', '肝系一生患教组']);
const arr = (res.data || []).filter((item) => !hiddenGroupNames.has(String(item?.name || '').trim()));
allGroups.value = arr;
}

View File

@ -301,7 +301,7 @@ const onNextStep = async () => {
}
} catch (error) {
console.error('身份验证失败:', error);
uni.showToast({ title: res.message, icon: 'none' });
uni.showToast({ title: error.data.message || error.message, icon: 'none' });
isLoading.value = false;
}
} else if (currentStep.value === 2) {
@ -351,7 +351,9 @@ const onGetSmsCode = async () => {
}
}, 1000);
} else {
uni.showToast({ title: res.msg || '短信验证码发送失败', icon: 'none' });
uni.showToast({
title: res.msg || res.data.message, icon: 'none'
});
}
};

View File

@ -399,7 +399,8 @@ const onGetSmsCode = async () => {
} catch (error) {
console.error('发送短信验证码失败:', error)
uni.showToast({
title:error.message || error.msg,
title:error.data.message || error.message || error.data.msg || error.msg || '频繁发送短信,请稍后再试'
,
icon: 'none'
})
} finally {

View File

@ -42,7 +42,7 @@
</view>
<view class="history-content">
<view class="history-time">{{ formatDate2(item.create_date) }}</view>
<view class="nickname">昵称{{ item.nickname || item.patient_name }}</view>
<view class="nickname">昵称{{ item.patient_name || item.nickname }}</view>
<view class="history-text">{{ item.content}}</view>
<view class="status-info">
<up-image :src="goImg" width="30rpx" height="30rpx" v-if="item.status==2"></up-image>
@ -205,7 +205,7 @@ const getApplyList = async () => { // 申请列表
if(status == 2){
navTo({
url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}`
url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}&from=myPatient`
})
}
}

View File

@ -123,7 +123,7 @@
<script setup>
import { ref, computed } from 'vue'
import { onShow,onLoad } from '@dcloudio/uni-app'
import { onShow,onLoad,onBackPress} from '@dcloudio/uni-app'
import api from '@/api/api.js'
import docUrl from '@/utils/docUrl.js'
import navTo from '@/utils/navTo.js'
@ -141,6 +141,13 @@
const patient_uuid = ref('');
const note = ref('');
const avatarLoadError = ref(false);
const from = ref('');
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
const confirmDialog = ()=>{
showDialog.value = false;
uni.setClipboardData({
@ -179,9 +186,19 @@
//
onLoad((options) => {
console.log(options);
patient_uuid.value = options.uuid;
if(options.from){
from.value=options.from
}
});
const goBack = ()=> uni.navigateBack()
const goBack = ()=> {
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}
const openCase = (uuid)=>{
navTo({
url:'/pages_app/checkRecord/checkRecord?uuid='+uuid
@ -278,7 +295,7 @@
});
const goMakePlan = ()=> {
navTo({
url:'/pages_app/visitPlan/visitPlan'
url:'/pages_app/visitPlan/visitPlan?uuid='+patient_uuid.value+'&patient_name='+patientInfo.value.realName+'&type=patientDetail'
})
}
const recordIllness = ()=> {

View File

@ -625,7 +625,7 @@
//
const searchPatients = () => {
navTo({
url: `/pages_app/searchPatient/searchPatient`
url: `/pages_app/searchPatient/searchPatient?from=patientMsg`
})
};

View File

@ -324,13 +324,13 @@
const title = ref('患者消息');
const goPatientDetail = (uuid) => {
navTo({
url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}`
url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}&from=patientMsg`
})
}
const editPatient = (uuid) => {
console.log(uuid)
navTo({
url: `/pages_app/patientSetting/patientSetting?uuid=${uuid}`
url: `/pages_app/patientSetting/patientSetting?uuid=${uuid}?from=patientMsg`
})
}
const onPatientItemLongPress = (item) => {
@ -381,7 +381,7 @@
}
const goCode = () => {
navTo({
url: `/pages_app/myCode/myCode`
url: `/pages_app/myCode/myCode?from=patientMsg`
})
}
//
@ -706,7 +706,7 @@
//
const searchPatients = () => {
navTo({
url: `/pages_app/searchPatient/searchPatient`
url: `/pages_app/searchPatient/searchPatient?from=patientMsg`
})
};

File diff suppressed because it is too large Load Diff

View File

@ -66,7 +66,7 @@
<script setup>
import { ref } from 'vue'
import navTo from '@/utils/navTo.js'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { onLoad, onShow,onBackPress} from '@dcloudio/uni-app'
import navBar from '@/components/navBar/navBar.vue'
import api from '@/api/api.js'
import unidialog from '@/components/dialog/dialog.vue'
@ -76,8 +76,19 @@
const groupInfo = ref({})
const visible = ref(false)
const message = ref('')
const from = ref('');
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
const goBack = () => {
uni.navigateBack();
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}
const goRemark = () => {
navTo({ url: '/pages_app/patientRemark/patientRemark?uuid=' + patientUuid.value })
@ -88,6 +99,9 @@
}
onLoad((options) => {
patientUuid.value = options.uuid;
if(options.from){
from.value = options.from;
}
console.log(patientUuid.value)
})
onShow(() => {

View File

@ -30,7 +30,7 @@
</view>
<view class="section-content">
<text class="content-text">{{ selectedPatient || '请选择患者' }}</text>
<uni-icons type="right" class ="icon" size="20" color="#999"></uni-icons>
<uni-icons type="right" class ="icon" size="20" color="#999" v-if="type != 'patientDetail'"></uni-icons>
</view>
</view>
@ -105,7 +105,7 @@
<script setup>
import { ref, onMounted } from 'vue';
import { onShow } from "@dcloudio/uni-app";
import { onShow,onLoad } from "@dcloudio/uni-app";
import navTo from '@/utils/navTo.js';
import api from '@/api/api.js';
//
@ -124,6 +124,20 @@
const goBack = () => {
uni.navigateBack();
};
const patientName = ref('')
const type = ref('')
onLoad((options) => {
if(options.uuid){
patientUuid.value = options.uuid
}
if(options.patient_name){
selectedPatient.value = options.patient_name
}
if(options.type){
type.value = options.type
}
})
const addFollowUps=()=>{
api.addFollowUps({
patient_uuid: patientUuid.value,
@ -160,7 +174,10 @@
//
const selectPatient = () => {
navTo({
if(type.value == 'patientDetail'){
return
}else{
navTo({
url:'/pages_app/selectPatientSingle/selectPatientSingle',
events: {
onPatientsSelected: (data) => {
@ -169,6 +186,8 @@
}
}
})
}
};
//

View File

@ -1,7 +1,21 @@
<template>
<view class="select-page">
<navBar title="搜索患者" />
<view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
title="搜索患者"
@clickLeft="goBack"
color="#8B2316"
:border="false"
backgroundColor="#eee"
>
</uni-nav-bar>
</view>
<!-- 搜索框 -->
<view class="search-bar">
@ -19,6 +33,7 @@
<image class="avatar" :src="docUrl + (p.photo || '')" mode="aspectFill" />
<view class="name">{{ p.nickname || p.realName }}</view>
</view>
<empty v-if="availablePatientList.length == 0" :emptyDesc="'暂无搜索结果'"></empty>
</scroll-view>
</view>
</template>
@ -26,29 +41,38 @@
<script setup>
import { ref, computed } from 'vue'
import docUrl from '@/utils/docUrl.js'
import { onShow,onLoad} from "@dcloudio/uni-app";
import { onShow,onLoad,onBackPress} from "@dcloudio/uni-app";
import empty from "@/components/empty/empty.vue"
import api from '@/api/api.js'
import navTo from '@/utils/navTo.js'
import navBar from '@/components/navBar/navBar.vue'
const from = ref('');
const keyword = ref('')
const patientList = ref([])
const availablePatientList = ref([])
//
const availablePatientList = computed(() => {
return patientList.value
})
// const availablePatientList = computed(() => {
// return patientList.value
// })
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
const patientListByGBK = async () => {
const res = await api.patientListByGBK();
if(res.code == 1){
patientList.value = res.data;
availablePatientList.value = res.data;
}
};
onLoad((options) => {
if(options.from == 'chatMsg'){
from.value = 'chatMsg';
if(options.from){
from.value = options.from;
}
})
onShow(() => {
patientListByGBK();
@ -58,13 +82,19 @@
const goDetail = (uuid) => {
navTo({ url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}` })
navTo({ url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}&from=searchPatient`})
}
const onSearch = () => {
patientList.value = patientList.value.filter(p => p.realName.indexOf(keyword.value) !== -1 || (p.nickname && p.nickname.indexOf(keyword.value) !== -1) || p.mobile.indexOf(keyword.value) !== -1)
availablePatientList.value = patientList.value.filter(p => p.realName.indexOf(keyword.value) !== -1 || (p.nickname && p.nickname.indexOf(keyword.value) !== -1) || p.mobile.indexOf(keyword.value) !== -1)
}
const goBack = () => uni.navigateBack()
const goBack = () => {
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}
</script>
<style lang="scss" scoped>
@ -75,8 +105,12 @@ const goDetail = (uuid) => {
.confirm-btn{ background:#7f7f7f; padding: 10rpx 18rpx; border-radius: 26rpx; }
.confirm-btn.active{ background:#8B2316; }
.search-bar{
position: fixed;
left:30rpx;
right:30rpx;
top:calc(var(--status-bar-height) + 44px);
border: 2rpx solid #eee;
margin: 20rpx 30rpx; display:flex; align-items:center; gap: 16rpx;
margin: 20rpx 0rpx; display:flex; align-items:center; gap: 16rpx;
.input-wrap{ flex:1; background:#fff; border-radius: 12rpx; padding: 16rpx 20rpx; }
.search-input{ font-size: 28rpx; color:#333; }
.ph{ color:#bfbfbf; }
@ -87,7 +121,14 @@ const goDetail = (uuid) => {
width: 88rpx; height: 72rpx; background:#fff;
}
}
.list{ border-radius: 12rpx; }
.list{
border-radius: 12rpx;
position: fixed;
left: 0;
right: 0;
top: calc(var(--status-bar-height) + 44px + 115rpx);
bottom: 0rpx;
}
.item{background:#fff; display:flex; align-items:center;padding: 24rpx 30rpx; border-bottom: 2rpx solid #eee; }
.avatar{ width: 96rpx; height:96rpx; border-radius: 16rpx; background:#ffe; }
.name{ flex:1; margin-left: 20rpx; font-size: 32rpx; color:#333; }

View File

@ -106,10 +106,17 @@
const dealIndex=ref(0);
import api from '@/api/api.js'
const from = ref('');
const type = ref('');
onLoad((options) => {
console.log(options)
patientUuid.value = options.uuid;
patientName.value = options.patient_name;
from.value = options.from;
if(options.from){
from.value = options.from;
}
if(options.type){
type.value = options.type;
}
});
const selectedPatient = ref('');
const defaultContent = '请近日来医院复诊、复查';
@ -191,11 +198,13 @@
const goBack=()=>uni.navigateBack();
const submitPlan=()=>{
addFollowUps();
uni.showToast({ title: '已提交', icon: 'none' });
setTimeout(()=>uni.navigateBack(),1000);
//uni.showToast({ title: '', icon: 'none' });
//setTimeout(()=>uni.navigateBack(),1000);
};
const selectPatient=()=>{
if(from.value=='patientMsg'){
if(type.value == 'patientDetail'){
return false
}else if(from.value=='patientMsg'){
navTo({
url:'/pages_app/selectPatient/selectPatient',
events: {

View File

@ -84,14 +84,27 @@
<script setup>
import { ref, computed } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { onShow,onLoad } from '@dcloudio/uni-app'
import dayjs from 'dayjs'
import api from '@/api/api.js'
import navTo from '@/utils/navTo.js'
import dayImg from '@/static/visit_data11.png'
import planImg from '@/static/visitplan.png'
import lineImg from '@/static/item_visitplan_fg.png'
const patientUuid = ref('')
const patientName = ref('')
const type = ref('')
onLoad((options) => {
if(options.uuid){
patientUuid.value = options.uuid
}
if(options.patient_name){
patientName.value = options.patient_name
}
if(options.type){
type.value = options.type
}
})
const formatYearMonth = (input) => {
if (!input) return ''
const d = dayjs(input)
@ -162,8 +175,31 @@ const goBack = () => uni.navigateBack()
const showAddMenuFlag = ref(false)
const showAddMenu = () => { showAddMenuFlag.value = true }
const hideAddMenu = () => { showAddMenuFlag.value = false }
const addFollowUpPlan = () => { showAddMenuFlag.value = false; uni.navigateTo({ url: '/pages_app/visit/visit?from=visitPlan' }) }
const addSchedule = () => { showAddMenuFlag.value = false; uni.navigateTo({ url: '/pages_app/schedule/schedule' }) }
const addFollowUpPlan = () => {
showAddMenuFlag.value = false;
if(type.value == 'patientDetail'){
uni.navigateTo({
url: '/pages_app/visit/visit?uuid='+patientUuid.value+'&patient_name='+patientName.value+'&type=patientDetail'
})
}else{
uni.navigateTo({
url: '/pages_app/visit/visit?from=visitPlan'
})
}
}
const addSchedule = () => {
showAddMenuFlag.value = false;
if(type.value == 'patientDetail'){
uni.navigateTo({
url: '/pages_app/schedule/schedule?uuid='+patientUuid.value+'&patient_name='+patientName.value+'&type=patientDetail'
})
}else{
uni.navigateTo({
url: '/pages_app/schedule/schedule'
})
}
}
const goFollowDetail = (raw) => { if (!raw) return; navTo({ url: `/pages_app/followDetail/followDetail?followUpUuid=${encodeURIComponent(raw.uuid || '')}&patient_name=${raw.patientname}` }) }
onShow(() => {