9.24上午提交

This commit is contained in:
zoujiandong 2025-09-24 11:37:39 +08:00
parent 70eeb19867
commit bdd2ba278e
11 changed files with 180 additions and 43 deletions

View File

@ -550,6 +550,12 @@ const api = {
delGroupSendMsg(data){ delGroupSendMsg(data){
return request('/expertAPI/delGroupSendMsg', data, 'post', false); return request('/expertAPI/delGroupSendMsg', data, 'post', false);
}, },
patientDetail(data){
return request('/expertAPI/patientDetail', data, 'post', false);
},
toAddNickname(data){
return request('/expertAPI/toAddNickname', data, 'post', false);
},
} }
export default api export default api

View File

@ -127,17 +127,14 @@
} }
// //
uni.switchTab({ uni.redirectTo({
url: item.pagePath, url: item.pagePath,
fail: () => { fail: () => {
// 使navigateTo // 使navigateTo
uni.navigateTo({ uni.navigateTo({
url: item.pagePath, url: item.pagePath,
fail: () => { fail: () => {
uni.showToast({
title: '页面开发中',
icon: 'none'
});
} }
}); });
} }

View File

@ -480,14 +480,7 @@
}) })
}; };
// Tab
const onTabChange = (data) => {
console.log('Tab切换:', data);
uni.showToast({
title: `切换到${data.item.text}`,
icon: 'none'
});
};
// //
const switchGuideTab = (index) => { const switchGuideTab = (index) => {

View File

@ -160,7 +160,7 @@
return return
} }
api.groupUpdate({ api.groupUpdate({
uuid: groupUuid.value, group_uuid: groupUuid.value,
name: groupName.value, name: groupName.value,
patient_uuid: members.value.map(m => m.uuid).join(','), patient_uuid: members.value.map(m => m.uuid).join(','),
}).then(res => { }).then(res => {

View File

@ -20,17 +20,21 @@
<!-- 头部信息卡片 --> <!-- 头部信息卡片 -->
<view class="card header-card"> <view class="card header-card">
<image class="avatar" src="/static/avatar-a.png" mode="aspectFill"></image> <image class="avatar" :src="docUrl+patientInfo.photo" mode="aspectFill"></image>
<view class="base-info"> <view class="base-info">
<view class="name-row"> <view class="name-row">
<text class="name">aa</text> <text class="name">{{ patientInfo.realName || '未知' }}</text>
<up-image :src="manImg" width="36rpx" height="36rpx" ></up-image> <up-image :src="genderIcon" width="36rpx" height="36rpx"></up-image>
</view>
<view class="line"><text class="label">昵称</text><text class="value">{{nickname }}</text></view>
<view class="line">
<text class="label">年龄</text><text class="value">{{ patientDetail.age || '未知' }}</text>
<text class="sep"></text>
<text class="label">民族</text><text class="value">{{ patientInfo.nationName || '未知' }}</text>
</view> </view>
<view class="line"><text class="label">昵称</text><text class="value">Android</text></view>
<view class="line"><text class="label">年龄</text><text class="value">23</text><text class="sep"></text><text class="label">民族</text><text class="value">未知</text></view>
<view class="line multi"> <view class="line multi">
<text class="label">地区</text> <text class="label">地区</text>
<text class="value">内蒙古自治区呼伦贝尔市莫力达瓦达斡尔族自治旗</text> <text class="value">{{ fullAddress }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -39,7 +43,7 @@
<view class="cell" @click="openGroup" style="margin-top: 20rpx;"> <view class="cell" @click="openGroup" style="margin-top: 20rpx;">
<text class="cell-label">分组</text> <text class="cell-label">分组</text>
<view class="cell-right"> <view class="cell-right">
<text class="hint">分组了分组2</text> <text class="hint">{{ group.name }}</text>
<uni-icons type="right" color="#999" size="18"></uni-icons> <uni-icons type="right" color="#999" size="18"></uni-icons>
</view> </view>
</view> </view>
@ -53,15 +57,15 @@
<view class="cell"> <view class="cell">
<text class="cell-label">电话号码</text> <text class="cell-label">电话号码</text>
<view class="cell-right"> <view class="cell-right">
<text class="phone">18012345600</text> <text class="phone">{{ patientInfo.mobile || '未设置' }}</text>
</view> </view>
</view> </view>
<!-- 患者病史 --> <!-- 患者病史 -->
<view class="section-title">患者病史</view> <view class="section-title">患者病史</view>
<view class="card history-card"> <view class="card history-card">
<text class="history-text" :class="{ fold: !showAllHistory }">{{ historyText }}</text> <text class="history-text" :class="{ fold: !showAllHistory }">{{ patientDetail.medicalHistoryContent }}</text>
<text class="toggle" @click="toggleHistory">{{ showAllHistory ? '收起' : '展开全部' }}</text> <text class="toggle" @click="toggleHistory" v-if="patientDetail.patientHistoryText">{{ showAllHistory ? '收起' : '展开全部' }}</text>
</view> </view>
<!-- 底部操作 --> <!-- 底部操作 -->
@ -83,21 +87,105 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref, computed } from 'vue'
import { onShow } from '@dcloudio/uni-app' import { onShow,onLoad } from '@dcloudio/uni-app'
import api from '@/api/api.js'
import docUrl from '@/utils/docUrl.js'
import navTo from '@/utils/navTo.js'
import msgImg from "@/static/icon_message_big.png" import msgImg from "@/static/icon_message_big.png"
import planImg from "@/static/image_backgrond_red_big1.png" import planImg from "@/static/image_backgrond_red_big1.png"
import recordImg from "@/static/image_backgrond_red_big.png" import recordImg from "@/static/image_backgrond_red_big.png"
import manImg from "@/static/new_man_big.png" import manImg from "@/static/new_man_big.png"
import womanImg from "@/static/new_woman_big.png" import womanImg from "@/static/new_woman_big.png"
const showAllHistory = ref(false)
const historyText = '2025年检查出戊型肝炎, 同时患有结核。有饮酒史、无吸烟史, 无输血或其他血液制品史, 使用过恩…'
const showAllHistory = ref(false);
const patientDetail = ref({});
const patient_uuid = ref('');
const note = ref('');
//
const patientInfo = computed(() => {
return patientDetail.value.patient || {};
});
//
const genderIcon = computed(() => {
return patientInfo.value.sex === 2 ? womanImg : manImg;
});
//
const fullAddress = computed(() => {
const { provName, cityName, countyName, detailed_address } = patientInfo.value;
const addressParts = [provName, cityName, countyName, detailed_address].filter(Boolean);
return addressParts.length > 0 ? addressParts.join('') : '未设置';
});
//
onLoad((options) => {
patient_uuid.value = options.uuid;
});
const goBack = ()=> uni.navigateBack() const goBack = ()=> uni.navigateBack()
const editPatient = ()=> uni.showToast({ title:'编辑资料', icon:'none' }) const editPatient = ()=> uni.showToast({ title:'编辑资料', icon:'none' })
const openGroup = ()=> uni.showToast({ title:'分组', icon:'none' }) const openGroup = ()=> uni.showToast({ title:'分组', icon:'none' })
const editDesc = ()=> uni.showToast({ title:'编辑描述', icon:'none' }) const editDesc = ()=> uni.showToast({ title:'编辑描述', icon:'none' })
const sendMessage = ()=> uni.showToast({ title:'发消息', icon:'none' }) const sendMessage = ()=>{
navTo({
url: '/pages_app/chat/chat?patient_uuid='+patient_uuid,
})
};
const nickname = ref('');
const group = ref({});
const getPatientCard = ()=>{
api.patientCard({
patient_uuid: patient_uuid.value,
}).then(res=>{
console.log(res)
if(res.code == 200){
group.value = res.group;
}
})
}
const getToAddNickname = ()=>{
let userInfo=uni.getStorageSync('userInfo');
api.toAddNickname({
patientUuid: patient_uuid.value,
expertUuid: userInfo.uuid,
}).then(res=>{
if(res.code == 200){
nickname.value = res.data.nickname;
note.value = res.data.note;
}
})
}
const getPatientDetail = ()=>{
api.patientDetail({
patientUuid: patient_uuid.value,
}).then(res=>{
if(res.code == 200){
patientDetail.value = res.data;
console.log('患者详情数据:', res.data);
} else {
uni.showToast({
title: res.msg || '获取患者详情失败',
icon: 'none'
});
}
}).catch(err => {
console.error('获取患者详情失败:', err);
uni.showToast({
title: '网络错误,请重试',
icon: 'none'
});
});
};
onShow(()=>{
getPatientDetail();
getToAddNickname();
getPatientCard();
});
const goMakePlan = ()=> uni.navigateTo({ url:'/pages_app/visit/visit' }) const goMakePlan = ()=> uni.navigateTo({ url:'/pages_app/visit/visit' })
const recordIllness = ()=> uni.showToast({ title:'记录病情', icon:'none' }) const recordIllness = ()=> uni.showToast({ title:'记录病情', icon:'none' })
const toggleHistory = ()=> showAllHistory.value = !showAllHistory.value const toggleHistory = ()=> showAllHistory.value = !showAllHistory.value
@ -130,7 +218,7 @@
.section-title { padding: 16rpx 30rpx; color:#8B2316; font-size: 30rpx; margin-top: 20rpx; } .section-title { padding: 16rpx 30rpx; color:#8B2316; font-size: 30rpx; margin-top: 20rpx; }
.history-card { position: relative; } .history-card { position: relative; }
.history-text { font-size: 28rpx; color:#666; line-height: 1.7; display:block; } .history-text { font-size: 28rpx; color:#666; line-height: 1.7; display:block; }
.history-text.fold { display:-webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .history-text.fold { display:-webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toggle { position:absolute; right: 20rpx; bottom: 16rpx; color:#b10000; font-size: 28rpx; } .toggle { position:absolute; right: 20rpx; bottom: 16rpx; color:#b10000; font-size: 28rpx; }
.actions { background:#ffffff; margin-top: 20rpx;} .actions { background:#ffffff; margin-top: 20rpx;}

View File

@ -212,7 +212,13 @@ const translateMsg = (key: string): string => {
tipMsgText: t('tipMsgText'), tipMsgText: t('tipMsgText'),
unknowMsgText: t('unknowMsgText'), unknowMsgText: t('unknowMsgText'),
}[key] || '' }[key] || ''
return `[${text}]` if(text=='自定义消息'){
return JSON.parse(props.lastMessage.attachment.raw).gdxz_type
}else{
return `[${text}]`
}
} }
</script> </script>

View File

@ -96,6 +96,7 @@
<view class="group-section"> <view class="group-section">
<view class="patient-item" v-for="item in group.items" :key="item.uuid || item.id" > <view class="patient-item" v-for="item in group.items" :key="item.uuid || item.id" >
<template v-if="item.placeholder"> <template v-if="item.placeholder">
<view class="patient-avatar-placeholder"> <view class="patient-avatar-placeholder">
<uni-icons type="person" size="32" color="#ffffff"></uni-icons> <uni-icons type="person" size="32" color="#ffffff"></uni-icons>
</view> </view>
@ -194,14 +195,14 @@
<!-- 底部标签栏 --> <!-- 底部标签栏 -->
<view class="tab-bar"> <view class="tab-bar">
<view class="tab-item active" @click="switchTab('message')"> <view class="tab-item" :class="{active: activeTab === 'message'}" @click="switchTab('message')">
<text class="tab-text">患者消息</text> <text class="tab-text">患者消息</text>
</view> </view>
<view class="tab-item" @click="switchTab('list')"> <view class="tab-item" :class="{active: activeTab === 'list'}" @click="switchTab('list')">
<text class="tab-text">患者列表</text> <text class="tab-text">患者列表</text>
</view> </view>
<view class="tab-item" @click="switchTab('plan')"> <view class="tab-item" :class="{active: activeTab === 'plan'}" @click="switchTab('plan')">
<text class="tab-text">随访计划</text> <text class="tab-text">随访计划</text>
</view> </view>
</view> </view>

View File

@ -445,12 +445,14 @@ onShow(() => {
//handleSendTextMsg('article', article); //handleSendTextMsg('article', article);
}); });
uni.$on('videoItem', (video) => { uni.$on('videoItem', (video) => {
console.log('video', video);
videoInfo.value = video; videoInfo.value = video;
senCustomMsg('video'); senCustomMsg('video');
//handleSendTextMsg('video', video); //handleSendTextMsg('video', video);
}); });
uni.$on('quickReply', (reply) => { uni.$on('quickReply', (reply) => {
inputText.value= reply; inputText.value= reply;
uni.$emit(events.CLOSE_PANEL)
}); });
getListOutPatient(); getListOutPatient();
getStopOutPatientList(); getStopOutPatientList();
@ -464,7 +466,8 @@ onUnload(() => {
let rawStr="{\"gdxz_content\":\"我已入驻肝胆相照互联网医院,复诊购药一站式服务,快来看看吧\",\"gdxz_ext_data\":\"[互联网医院]\",\"gdxz_id\":\"1681174885629431808\",\"gdxz_img\":\"https://img.applets.igandanyiyuan.com/applet/admin/avatar/2023071813261420200708181049.png\",\"gdxz_title\":\"肝胆相照互联网医院\",\"gdxz_type\":\"[互联网医院]\",\"gdxz_url\":\"\"}"; let rawStr="{\"gdxz_content\":\"我已入驻肝胆相照互联网医院,复诊购药一站式服务,快来看看吧\",\"gdxz_ext_data\":\"[互联网医院]\",\"gdxz_id\":\"1681174885629431808\",\"gdxz_img\":\"https://img.applets.igandanyiyuan.com/applet/admin/avatar/2023071813261420200708181049.png\",\"gdxz_title\":\"肝胆相照互联网医院\",\"gdxz_type\":\"[互联网医院]\",\"gdxz_url\":\"\"}";
const sendMallMsg = () => { const sendMallMsg = () => {
showMallModal.value = false; showMallModal.value = false;
handleSendTextMsg('mall'); //handleSendTextMsg('mall');
senCustomMsg('mall');
} }
@ -644,7 +647,7 @@ const handleSendTextMsg = (type:string) => {
//let serverExtension={"gdxz_nickName":"","gdxz_sessionType":"general"}; //let serverExtension={"gdxz_nickName":"","gdxz_sessionType":"general"};
if(props.isGroupSend){ if(props.isGroupSend){
emits('send',{ emits('send',{
content:textMsg, content:text,
msg_type:1, msg_type:1,
}) })
inputText.value = '' inputText.value = ''
@ -677,9 +680,9 @@ const handleSendTextMsg = (type:string) => {
isReplyMsg.value = false isReplyMsg.value = false
replyMsg.value = undefined replyMsg.value = undefined
selectedAtMembers.value = []; selectedAtMembers.value = [];
if(type=='mall'){ // if(type=='mall'){
senCustomMsg('mall'); // senCustomMsg('mall');
} // }
} }
} }

View File

@ -43,6 +43,39 @@
</view> </view>
</view> </view>
</view> </view>
<view class="line phone" v-else-if="item.msg_type==4" @click="onDetail(item)">
<view class="custom">
<view class="title">{{JSON.parse(item.msg_content).name }}</view>
<view class="row">
<view class="left">{{ docUrl+JSON.parse(item.msg_content).path }}</view>
<view class="right">
<image :src="docUrl+JSON.parse(item.msg_content).imgpath" ></image>
</view>
</view>
</view>
</view>
<view class="line phone" v-else-if="item.msg_type==5" @click="onDetail(item)">
<view class="custom">
<view class="title">{{JSON.parse(item.msg_content).topic }}</view>
<view class="row">
<view class="left">{{ docUrl+JSON.parse(item.msg_content).path }}</view>
<view class="right">
<image :src="JSON.parse(item.msg_content).imgPath" ></image>
</view>
</view>
</view>
</view>
<view class="line phone" v-else-if="item.msg_type==6" @click="onDetail(item)">
<view class="custom">
<view class="title">{{JSON.parse(item.msg_content).topic }}</view>
<view class="row">
<view class="left">{{JSON.parse(item.msg_content).path }}</view>
<view class="right">
<image :src="JSON.parse(item.msg_content).imgPath" ></image>
</view>
</view>
</view>
</view>
</view> </view>
<view class="card-footer"> <view class="card-footer">
<view class="btn-outline" @click="onResend(item)">再发一条</view> <view class="btn-outline" @click="onResend(item)">再发一条</view>
@ -184,8 +217,18 @@ const onRefresh = async () => {
uni.showToast({ title: '刷新成功', icon: 'none' }); uni.showToast({ title: '刷新成功', icon: 'none' });
}; };
const onDetail = (item) => { const onDetail = (item) => {
let path='';
if(item.msg_type==3){
path=docUrl+JSON.parse(item.msg_content).path;
}else if(item.msg_type==4){
path=docUrl+JSON.parse(item.msg_content).path;
}else if(item.msg_type==5){
path=JSON.parse(item.msg_content).path;
}else if(item.msg_type==6){
path=JSON.parse(item.msg_content).path;
}
navTo({ navTo({
url: `/pages_app/webview/webview?url=${encodeURIComponent(docUrl+JSON.parse(item.msg_content).path)}`, url: `/pages_app/webview/webview?url=${encodeURIComponent(path)}`,
}) })
} }
// //

View File

@ -251,7 +251,7 @@ $red: #d32f2f;
.card-header { .card-header {
position: relative; position: relative;
padding: 28rpx 28rpx 12rpx 28rpx; padding: 28rpx 28rpx 12rpx 0rpx;
.label { .label {
font-size: 32rpx; font-size: 32rpx;

View File

@ -88,10 +88,10 @@
// @ts-ignore // @ts-ignore
popupRef.value && popupRef.value.open('center') popupRef.value && popupRef.value.open('center')
} }
onShow(() => {Confirm onShow(() => {
getQuickReplyList() getQuickReplyList()
}) })
onload(() => { onLoad(() => {
getQuickReplyList() getQuickReplyList()
}) })
const onSelect = (text) => { const onSelect = (text) => {