Merge branch 'master' of https://gitea.igandanyiyuan.com/gdxz/uniapp-app
# Conflicts: # pages_app/patientMsg/patientMsg.vue
This commit is contained in:
commit
4a22470f38
23
pages.json
23
pages.json
@ -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": ""
|
||||
}
|
||||
]
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 = ()=> {
|
||||
|
||||
@ -625,7 +625,7 @@
|
||||
// 搜索患者
|
||||
const searchPatients = () => {
|
||||
navTo({
|
||||
url: `/pages_app/searchPatient/searchPatient`
|
||||
url: `/pages_app/searchPatient/searchPatient?from=patientMsg`
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
481
pages_app/patientMsg/patientMsg_BACKUP_876.vue
Normal file
481
pages_app/patientMsg/patientMsg_BACKUP_876.vue
Normal 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([]);
|
||||
// 列表高度(像素):窗口高度 - 顶部导航(rpx转px) - 底部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>
|
||||
1423
pages_app/patientMsg/patientMsg_BASE_876.vue
Normal file
1423
pages_app/patientMsg/patientMsg_BASE_876.vue
Normal file
File diff suppressed because it is too large
Load Diff
201
pages_app/patientMsg/patientMsg_LOCAL_876.vue
Normal file
201
pages_app/patientMsg/patientMsg_LOCAL_876.vue
Normal 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>
|
||||
1423
pages_app/patientMsg/patientMsg_REMOTE_876.vue
Normal file
1423
pages_app/patientMsg/patientMsg_REMOTE_876.vue
Normal file
File diff suppressed because it is too large
Load Diff
1423
pages_app/patientMsg/patientMsg___原生版.vue
Normal file
1423
pages_app/patientMsg/patientMsg___原生版.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -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(() => {
|
||||
|
||||
@ -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 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// 选择日期
|
||||
|
||||
@ -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; }
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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(() => {
|
||||
|
||||
@ -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";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user