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", "path": "visitPlan/visitPlan",
"style": { "style": {
@ -1127,16 +1137,7 @@
// } // }
// }, // },
// {
// "path": "searchPatient/searchPatient",
// "style": {
// "navigationStyle": "custom",
// "navigationBarTitleText": "uni-app分页",
// "app": {
// "bounce": "none"
// }
// }
// },
// { // {
// "path": "qikan/qikan", // "path": "qikan/qikan",
// "style": { // "style": {

View File

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

View File

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

View File

@ -42,7 +42,7 @@
</view> </view>
<view class="history-content"> <view class="history-content">
<view class="history-time">{{ formatDate2(item.create_date) }}</view> <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="history-text">{{ item.content}}</view>
<view class="status-info"> <view class="status-info">
<up-image :src="goImg" width="30rpx" height="30rpx" v-if="item.status==2"></up-image> <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){ if(status == 2){
navTo({ 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> <script setup>
import { ref, computed } from 'vue' 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 api from '@/api/api.js'
import docUrl from '@/utils/docUrl.js' import docUrl from '@/utils/docUrl.js'
import navTo from '@/utils/navTo.js' import navTo from '@/utils/navTo.js'
@ -141,6 +141,13 @@
const patient_uuid = ref(''); const patient_uuid = ref('');
const note = ref(''); const note = ref('');
const avatarLoadError = ref(false); const avatarLoadError = ref(false);
const from = ref('');
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
const confirmDialog = ()=>{ const confirmDialog = ()=>{
showDialog.value = false; showDialog.value = false;
uni.setClipboardData({ uni.setClipboardData({
@ -179,9 +186,19 @@
// //
onLoad((options) => { onLoad((options) => {
console.log(options);
patient_uuid.value = options.uuid; 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)=>{ const openCase = (uuid)=>{
navTo({ navTo({
url:'/pages_app/checkRecord/checkRecord?uuid='+uuid url:'/pages_app/checkRecord/checkRecord?uuid='+uuid
@ -278,7 +295,7 @@
}); });
const goMakePlan = ()=> { const goMakePlan = ()=> {
navTo({ navTo({
url:'/pages_app/visitPlan/visitPlan' url:'/pages_app/visitPlan/visitPlan?uuid='+patient_uuid.value+'&patient_name='+patientInfo.value.realName+'&type=patientDetail'
}) })
} }
const recordIllness = ()=> { const recordIllness = ()=> {

View File

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

View File

@ -324,13 +324,13 @@
const title = ref('患者消息'); const title = ref('患者消息');
const goPatientDetail = (uuid) => { const goPatientDetail = (uuid) => {
navTo({ navTo({
url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}` url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}&from=patientMsg`
}) })
} }
const editPatient = (uuid) => { const editPatient = (uuid) => {
console.log(uuid) console.log(uuid)
navTo({ navTo({
url: `/pages_app/patientSetting/patientSetting?uuid=${uuid}` url: `/pages_app/patientSetting/patientSetting?uuid=${uuid}?from=patientMsg`
}) })
} }
const onPatientItemLongPress = (item) => { const onPatientItemLongPress = (item) => {
@ -381,7 +381,7 @@
} }
const goCode = () => { const goCode = () => {
navTo({ navTo({
url: `/pages_app/myCode/myCode` url: `/pages_app/myCode/myCode?from=patientMsg`
}) })
} }
// //
@ -706,7 +706,7 @@
// //
const searchPatients = () => { const searchPatients = () => {
navTo({ 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> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import navTo from '@/utils/navTo.js' 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 navBar from '@/components/navBar/navBar.vue'
import api from '@/api/api.js' import api from '@/api/api.js'
import unidialog from '@/components/dialog/dialog.vue' import unidialog from '@/components/dialog/dialog.vue'
@ -76,9 +76,20 @@
const groupInfo = ref({}) const groupInfo = ref({})
const visible = ref(false) const visible = ref(false)
const message = ref('') const message = ref('')
const from = ref('');
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
return true;
}
});
const goBack = () => { const goBack = () => {
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack(); uni.navigateBack();
} }
}
const goRemark = () => { const goRemark = () => {
navTo({ url: '/pages_app/patientRemark/patientRemark?uuid=' + patientUuid.value }) navTo({ url: '/pages_app/patientRemark/patientRemark?uuid=' + patientUuid.value })
} }
@ -88,6 +99,9 @@
} }
onLoad((options) => { onLoad((options) => {
patientUuid.value = options.uuid; patientUuid.value = options.uuid;
if(options.from){
from.value = options.from;
}
console.log(patientUuid.value) console.log(patientUuid.value)
}) })
onShow(() => { onShow(() => {

View File

@ -30,7 +30,7 @@
</view> </view>
<view class="section-content"> <view class="section-content">
<text class="content-text">{{ selectedPatient || '请选择患者' }}</text> <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>
</view> </view>
@ -105,7 +105,7 @@
<script setup> <script setup>
import { ref, onMounted } from 'vue'; 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 navTo from '@/utils/navTo.js';
import api from '@/api/api.js'; import api from '@/api/api.js';
// //
@ -124,6 +124,20 @@
const goBack = () => { const goBack = () => {
uni.navigateBack(); 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=()=>{ const addFollowUps=()=>{
api.addFollowUps({ api.addFollowUps({
patient_uuid: patientUuid.value, patient_uuid: patientUuid.value,
@ -160,6 +174,9 @@
// //
const selectPatient = () => { const selectPatient = () => {
if(type.value == 'patientDetail'){
return
}else{
navTo({ navTo({
url:'/pages_app/selectPatientSingle/selectPatientSingle', url:'/pages_app/selectPatientSingle/selectPatientSingle',
events: { events: {
@ -169,6 +186,8 @@
} }
} }
}) })
}
}; };
// //

View File

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

View File

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

View File

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