# Conflicts:
#	pages_app/patientMsg/patientMsg.vue
This commit is contained in:
haomingming 2026-03-17 14:53:44 +08:00
commit 4a22470f38
18 changed files with 5146 additions and 47 deletions

View File

@ -822,6 +822,16 @@
}
}
},
{
"path": "searchPatient/searchPatient",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "visitPlan/visitPlan",
"style": {
@ -1157,16 +1167,7 @@
// }
// },
// {
// "path": "searchPatient/searchPatient",
// "style": {
// "navigationStyle": "custom",
// "navigationBarTitleText": "uni-app分页",
// "app": {
// "bounce": "none"
// }
// }
// },
// {
// "path": "qikan/qikan",
// "style": {
@ -1739,7 +1740,7 @@
"list": [
{
"name": "",
"path": "pages_app/patientMsg/patientMsg",
"path": "pages/patientClass/patientClass",
"query": ""
}
]

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

@ -0,0 +1,481 @@
<template>
<view class="content">
<view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
title="患者消息"
@clickLeft="goBack"
color="#8B2316"
:border="false"
backgroundColor="#eee"
>
<template #right>
<view class="nav-right">
<uni-icons type="search" size="24" color="#8B2316" @click="searchPatients"></uni-icons>
<uni-icons type="staff" size="24" color="#8B2316" @click="managePatients" style="margin-left: 30rpx;"></uni-icons>
</view>
</template>
</uni-nav-bar>
</view>
<scroll-view
class="message-list"
scroll-y="true"
refresher-enabled="true"
:refresher-triggered="isRefreshing"
@refresherrefresh="onRefresh"
>
<empty></empty>
</scroll-view>
<view class="tab-bar">
<view class="tab-item active">
<text class="tab-text">患者消息</text>
</view>
<view class="tab-item" @click="goListTab">
<text class="tab-text">患者列表</text>
<view class="tab-dot" v-if="hasNewPatient">
<uni-badge class="uni-badge-left-margin" :text="applyList.length" :offset="[-3, -3]" size="small"></uni-badge>
</view>
</view>
<view class="tab-item" @click="goPlanTab">
<text class="tab-text">随访计划</text>
</view>
</view>
</view>
</template>
<script setup>
<<<<<<< HEAD
import { computed, ref } from 'vue';
import { onBackPress, onLoad, onShow } from '@dcloudio/uni-app';
import api from '@/api/api.js';
import navTo from '@/utils/navTo.js';
=======
import { ref, getCurrentInstance, computed, nextTick, shallowRef } from 'vue';
import { onShow,onLoad,onBackPress,onHide} from "@dcloudio/uni-app";
import dayImg from "@/static/visit_data11.png"
import planImg from "@/static/visitplan.png"
import api from '@/api/api.js';
import navTo from '@/utils/navTo.js';
import docUrl from '@/utils/docUrl.js';
import unidialog from '@/components/dialog/dialog.vue'
import defaultImg from "@/static/default.png"
import newPatientImg from "@/static/new_patient.png"
import delImg from "@/static/iv_delete.png"
import editImg from "@/static/edit_patitent.png"
const patientList = ref([]);
const visible = ref(false)
const message = ref('')
const selectedPatientUuid = ref('')
const selectedPatientName = ref('')
const patientDataLoaded = ref(false);
const patientDataLoading = ref(false);
const firstLetterCache = new Map();
const showAlert = ref(false);
const navHeight = ref(40);
onBackPress(() => {
plus.runtime.quit();
return true;
});
onHide(() => {
patientDataLoaded.value = false;
});
import alertImg from "@/static/patientgif.png"
const getNavHeight = () => {
const systemInfo = uni.getSystemInfoSync();
console.log(2223);
console.log(systemInfo);
navHeight.value = systemInfo.statusBarHeight + 44;
console.log(navHeight.value);
}
import pinyin from 'pinyin';
import dayjs from 'dayjs'
import lineImg from "@/static/item_visitplan_fg.png"
const loadFinish = ref(false);
//import ConversationList from './conversation-list/index.vue'
const title = ref('患者消息');
const goPatientDetail = (uuid) => {
navTo({
url: `/pages_app/patientDetail/patientDetail?uuid=${uuid}&from=patientMsg`
})
}
const editPatient = (uuid) => {
console.log(uuid)
navTo({
url: `/pages_app/patientSetting/patientSetting?uuid=${uuid}?from=patientMsg`
})
}
const onPatientItemLongPress = (item) => {
if (!item || !item.uuid) return
selectedPatientUuid.value = item.uuid
selectedPatientName.value = item.nickname || item.realName
message.value = `确认解除[${selectedPatientName.value || '该患者'}]的随访关系?`
visible.value = true
}
const deleteFollowUpFromList = async () => {
if (!selectedPatientUuid.value) {
visible.value = false
return
}
const res = await api.cancelRes({
patientUuid: selectedPatientUuid.value
})
if (res.code == 1) {
uni.showToast({
title: '解除成功',
icon: 'none'
})
patientListByGBK()
}
visible.value = false
}
const avatarErrorMap = ref({});
const getAvatarKey = (item = {}) => String(item.uuid || item.id || item.realName || item.nickname || '');
const normalizeAvatarUrl = (photo) => {
const raw = String(photo || '').trim();
if (!raw) return defaultImg;
if (/^https?:\/\//i.test(raw)) return raw;
return `${docUrl}${raw}`;
};
const getPatientAvatar = (item = {}) => {
const key = getAvatarKey(item);
if (key && avatarErrorMap.value[key]) return defaultImg;
return item.avatarUrl || defaultImg;
};
const handlePatientAvatarError = (item) => {
if (!item) return;
const key = getAvatarKey(item);
if (!key) return;
avatarErrorMap.value = {
...avatarErrorMap.value,
[key]: true
};
}
const goCode = () => {
navTo({
url: `/pages_app/myCode/myCode?from=patientMsg`
})
}
//
const formatYMD = (input) => {
if (!input) return '';
const d = dayjs(input);
return d.isValid() ? d.format('YYYY-MM-DD') : '';
}
const formatYearMonth = (input) => {
if (!input) return '';
const d = dayjs(input);
return d.isValid() ? d.format('YYYY年MM月') : '';
}
// 03
const formatDay = (input) => {
if (!input) return '';
const d = dayjs(input);
return d.isValid() ? d.format('DD日') : '';
}
//
const messageList = ref([
{
id: 1,
patientName: '测试',
messagePreview: '[图片]',
time: '2025-08-11',
avatar: ''
}
]);
//
const activeTab = ref('message');
const activeLetter = ref('A');
const scrollIntoViewId = ref('');
//
const showAddMenuFlag = ref(false);
// selectorQuery
const { proxy } = getCurrentInstance();
const LETTER_ORDER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
const sortLetter = (a, b) => {
if (a === '#') return 1;
if (b === '#') return -1;
const ai = LETTER_ORDER.indexOf(a);
const bi = LETTER_ORDER.indexOf(b);
if (ai === -1 && bi === -1) return String(a).localeCompare(String(b));
if (ai === -1) return 1;
if (bi === -1) return -1;
return ai - bi;
};
// up-index-list 使
const indexList = ref([]);
// - (rpxpx) - tab(100rpx->px) - (200rpx->px)
const groupsListHeight = ref(0);
const rpxToPx = (rpx) => {
const { screenWidth } = uni.getSystemInfoSync();
return Math.round((screenWidth / 750) * rpx);
};
const computeListHeight = () => {
const { windowHeight } = uni.getSystemInfoSync();
const reserved = rpxToPx(240); // 140rpx(nav) + 100rpx(tab)
groupsListHeight.value = Math.max(0, windowHeight - reserved);
};
>>>>>>> cbc427e41ce2bf41f4bd01d9206215c015e257ae
const applyList = ref([]);
const isRefreshing = ref(false);
const hasNewPatient = computed(() => applyList.value.length > 0);
const getApplyList = async () => {
try {
const res = await api.applyList();
if (res && res.code === 200) {
applyList.value = res.data || [];
}
} catch (error) {}
};
const onRefresh = async () => {
isRefreshing.value = true;
try {
await getApplyList();
uni.showToast({
title: '刷新成功',
icon: 'none',
duration: 1200
});
<<<<<<< HEAD
} finally {
isRefreshing.value = false;
=======
};
// 访
const onFollowUpLoadMore = async () => {
if (!followUpHasMore.value || followUpLoading.value) return;
await getFollowUpList(false);
};
//
const searchPatients = () => {
navTo({
url: `/pages_app/searchPatient/searchPatient?from=patientMsg`
})
};
//
const managePatients = () => {
uni.showToast({
title: '患者管理',
icon: 'none'
});
};
//
const openMessage = (item) => {
uni.showToast({
title: `打开患者 ${item?.patientName || '未知'} 的消息`,
icon: 'none'
});
//
// uni.navigateTo({
// url: `/pages_app/messageDetail/messageDetail?id=${item?.id}`
// });
};
//
const switchTab = (tab) => {
activeTab.value = tab;
switch(tab) {
case 'message':
// -
uni.sendNativeEvent('goPatientMsg', {
msg: 'goPatientMsg'
},ret => {
console.log(ret);
})
// getApplyList();
// title.value = '';
break;
case 'list':
title.value = '患者列表';
if (patientDataLoaded.value) {
loadFinish.value = true;
break;
}
uni.showLoading({
title: '加载中...',
mask: true
});
patientListByGBK();
//
break;
case 'plan':
title.value = '随访计划';
// 访 - 访
if (followUpList.value.length === 0) {
getFollowUpList(true);
}
break;
}
};
//
const addNewPatient = () => {
navTo({
url: '/pages_app/myPatient/myPatient?from=patientMsg'
})
};
//
const managePatientGroups = () => {
navTo({
url: '/pages_app/patientGroup/patientGroup?from=patientMsg'
})
};
//
const openPatient = (patientName) => {
uni.showToast({
title: `打开患者: ${patientName}`,
icon: 'none'
});
};
// 访
const addFollowUpPlan = () => {
showAddMenuFlag.value = false;
uni.navigateTo({
url: '/pages_app/visit/visit?from=patientMsg'
});
};
const goBack = () => {
plus.runtime.quit();
>>>>>>> cbc427e41ce2bf41f4bd01d9206215c015e257ae
}
};
const searchPatients = () => {
navTo({
url: '/pages_app/searchPatient/searchPatient'
});
};
const managePatients = () => {
uni.showToast({
title: '患者管理',
icon: 'none'
});
};
const goListTab = () => {
navTo({
url: '/pages_app/patientMsg/patientList'
});
};
const goPlanTab = () => {
navTo({
url: '/pages_app/patientMsg/patientPlan'
});
};
const goBack = () => {
plus.runtime.quit();
};
const notifyNativePatientMsg = () => {
uni.sendNativeEvent('goPatientMsg', { msg: 'goPatientMsg' }, () => {});
};
onBackPress(() => {
plus.runtime.quit();
return true;
});
onLoad((options) => {
if (options.type === 'list') {
goListTab();
return;
}
if (options.type === 'plan') {
goPlanTab();
return;
}
getApplyList();
notifyNativePatientMsg();
});
onShow(() => {
getApplyList();
notifyNativePatientMsg();
});
</script>
<style lang="scss" scoped>
.content {
background-color: #f5f5f5;
height: 100vh;
overflow-y: hidden;
}
.nav-right {
display: flex;
align-items: center;
}
.message-list {
margin-top: calc(var(--status-bar-height) + 44px);
height: calc(100vh - var(--status-bar-height) - 44px - 103rpx);
background: #fff;
}
.tab-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 100rpx;
background-color: #f8f8f8;
display: flex;
align-items: center;
border-top: 1rpx solid #e0e0e0;
z-index: 999;
}
.tab-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
height: 100%;
}
.tab-item:nth-child(2) {
border: 2rpx solid #ccc;
border-top: none;
border-bottom: none;
}
.tab-text {
font-size: 32rpx;
color: #999;
}
.tab-item.active .tab-text {
color: #8B2316;
font-weight: 500;
}
.tab-dot {
position: absolute;
top: 18rpx;
right: 28rpx;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,201 @@
<template>
<view class="content">
<view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
title="患者消息"
@clickLeft="goBack"
color="#8B2316"
:border="false"
backgroundColor="#eee"
>
<template #right>
<view class="nav-right">
<uni-icons type="search" size="24" color="#8B2316" @click="searchPatients"></uni-icons>
<uni-icons type="staff" size="24" color="#8B2316" @click="managePatients" style="margin-left: 30rpx;"></uni-icons>
</view>
</template>
</uni-nav-bar>
</view>
<scroll-view
class="message-list"
scroll-y="true"
refresher-enabled="true"
:refresher-triggered="isRefreshing"
@refresherrefresh="onRefresh"
>
<empty></empty>
</scroll-view>
<view class="tab-bar">
<view class="tab-item active">
<text class="tab-text">患者消息</text>
</view>
<view class="tab-item" @click="goListTab">
<text class="tab-text">患者列表</text>
<view class="tab-dot" v-if="hasNewPatient">
<uni-badge class="uni-badge-left-margin" :text="applyList.length" :offset="[-3, -3]" size="small"></uni-badge>
</view>
</view>
<view class="tab-item" @click="goPlanTab">
<text class="tab-text">随访计划</text>
</view>
</view>
</view>
</template>
<script setup>
import { computed, ref } from 'vue';
import { onBackPress, onLoad, onShow } from '@dcloudio/uni-app';
import api from '@/api/api.js';
import navTo from '@/utils/navTo.js';
const applyList = ref([]);
const isRefreshing = ref(false);
const hasNewPatient = computed(() => applyList.value.length > 0);
const getApplyList = async () => {
try {
const res = await api.applyList();
if (res && res.code === 200) {
applyList.value = res.data || [];
}
} catch (error) {}
};
const onRefresh = async () => {
isRefreshing.value = true;
try {
await getApplyList();
uni.showToast({
title: '刷新成功',
icon: 'none',
duration: 1200
});
} finally {
isRefreshing.value = false;
}
};
const searchPatients = () => {
navTo({
url: '/pages_app/searchPatient/searchPatient'
});
};
const managePatients = () => {
uni.showToast({
title: '患者管理',
icon: 'none'
});
};
const goListTab = () => {
navTo({
url: '/pages_app/patientMsg/patientList'
});
};
const goPlanTab = () => {
navTo({
url: '/pages_app/patientMsg/patientPlan'
});
};
const goBack = () => {
plus.runtime.quit();
};
const notifyNativePatientMsg = () => {
uni.sendNativeEvent('goPatientMsg', { msg: 'goPatientMsg' }, () => {});
};
onBackPress(() => {
plus.runtime.quit();
return true;
});
onLoad((options) => {
if (options.type === 'list') {
goListTab();
return;
}
if (options.type === 'plan') {
goPlanTab();
return;
}
getApplyList();
notifyNativePatientMsg();
});
onShow(() => {
getApplyList();
notifyNativePatientMsg();
});
</script>
<style lang="scss" scoped>
.content {
background-color: #f5f5f5;
height: 100vh;
overflow-y: hidden;
}
.nav-right {
display: flex;
align-items: center;
}
.message-list {
margin-top: calc(var(--status-bar-height) + 44px);
height: calc(100vh - var(--status-bar-height) - 44px - 103rpx);
background: #fff;
}
.tab-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 100rpx;
background-color: #f8f8f8;
display: flex;
align-items: center;
border-top: 1rpx solid #e0e0e0;
z-index: 999;
}
.tab-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
height: 100%;
}
.tab-item:nth-child(2) {
border: 2rpx solid #ccc;
border-top: none;
border-bottom: none;
}
.tab-text {
font-size: 32rpx;
color: #999;
}
.tab-item.active .tab-text {
color: #8B2316;
font-weight: 500;
}
.tab-dot {
position: absolute;
top: 18rpx;
right: 28rpx;
}
</style>

File diff suppressed because it is too large Load Diff

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(() => {

View File

@ -98,6 +98,7 @@ import logoImg from "@/static/weiboShare.png";
import collectImg from "@/static/icon_book_collect_sel.png";
import discollectImg from "@/static/icon_book_collect_nor.png";
import readImg from "@/static/reading.png";
import docUrl from "@/utils/docUrl";
import likeImg from "@/static/argee_sure.png";
import dislikeImg from "@/static/argee_no.png";
import shareImgBottom from "@/static/icon_share.png";
@ -114,6 +115,7 @@ const shareImg = ref("");
const shareTitle = ref("");
const uuid = ref("");
const isCollection = ref(0);
const imgpath = ref("");
const readnum = ref(0);
const agreenum = ref(0);
const isAgree = ref(0);
@ -155,6 +157,11 @@ const getCollect = () => {
other_uuid: uuid.value,
user_uuid: user_uuid.value,
type: type.value=='huanjiao_news'?1:2,
title:shareTitle.value,
path:safeUrl.value.replace(docUrl,''),
readnum:readnum.value,
imgpath:imgpath.value.indexOf('http')>-1?imgpath.value:docUrl+imgpath.value,
public_name:shareTitle.value,
})
.then((res) => {
if (res.code == 200) {
@ -362,6 +369,7 @@ onLoad((query) => {
try {
safeUrl.value = decodeURIComponent(raw);
console.log( safeUrl.value);
imgpath.value = decodeURIComponent(query.imgPath);
// query.imgPath
// ? decodeURIComponent(query.imgPath)
// : "https://doc.igandan.com/app/html/img/2016/20160714132557.png";