9.24上午提交
This commit is contained in:
parent
70eeb19867
commit
bdd2ba278e
@ -550,6 +550,12 @@ const api = {
|
||||
delGroupSendMsg(data){
|
||||
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
|
||||
@ -127,17 +127,14 @@
|
||||
}
|
||||
|
||||
// 页面跳转
|
||||
uni.switchTab({
|
||||
uni.redirectTo({
|
||||
url: item.pagePath,
|
||||
fail: () => {
|
||||
// 如果页面不存在,使用navigateTo
|
||||
uni.navigateTo({
|
||||
url: item.pagePath,
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '页面开发中',
|
||||
icon: 'none'
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -480,14 +480,7 @@
|
||||
})
|
||||
};
|
||||
|
||||
// Tab切换事件
|
||||
const onTabChange = (data) => {
|
||||
console.log('Tab切换:', data);
|
||||
uni.showToast({
|
||||
title: `切换到${data.item.text}`,
|
||||
icon: 'none'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 切换实用指南标签页
|
||||
const switchGuideTab = (index) => {
|
||||
|
||||
@ -160,7 +160,7 @@
|
||||
return
|
||||
}
|
||||
api.groupUpdate({
|
||||
uuid: groupUuid.value,
|
||||
group_uuid: groupUuid.value,
|
||||
name: groupName.value,
|
||||
patient_uuid: members.value.map(m => m.uuid).join(','),
|
||||
}).then(res => {
|
||||
|
||||
@ -20,17 +20,21 @@
|
||||
|
||||
<!-- 头部信息卡片 -->
|
||||
<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="name-row">
|
||||
<text class="name">aa</text>
|
||||
<up-image :src="manImg" width="36rpx" height="36rpx" ></up-image>
|
||||
<text class="name">{{ patientInfo.realName || '未知' }}</text>
|
||||
<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 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">
|
||||
<text class="label">地区:</text>
|
||||
<text class="value">内蒙古自治区呼伦贝尔市莫力达瓦达斡尔族自治旗</text>
|
||||
<text class="value">{{ fullAddress }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -39,7 +43,7 @@
|
||||
<view class="cell" @click="openGroup" style="margin-top: 20rpx;">
|
||||
<text class="cell-label">分组</text>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
@ -53,15 +57,15 @@
|
||||
<view class="cell">
|
||||
<text class="cell-label">电话号码</text>
|
||||
<view class="cell-right">
|
||||
<text class="phone">18012345600</text>
|
||||
<text class="phone">{{ patientInfo.mobile || '未设置' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 患者病史 -->
|
||||
<view class="section-title">患者病史</view>
|
||||
<view class="card history-card">
|
||||
<text class="history-text" :class="{ fold: !showAllHistory }">{{ historyText }}</text>
|
||||
<text class="toggle" @click="toggleHistory">{{ showAllHistory ? '收起' : '展开全部' }}</text>
|
||||
<text class="history-text" :class="{ fold: !showAllHistory }">{{ patientDetail.medicalHistoryContent }}</text>
|
||||
<text class="toggle" @click="toggleHistory" v-if="patientDetail.patientHistoryText">{{ showAllHistory ? '收起' : '展开全部' }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作 -->
|
||||
@ -83,21 +87,105 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { ref, computed } from 'vue'
|
||||
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 planImg from "@/static/image_backgrond_red_big1.png"
|
||||
import recordImg from "@/static/image_backgrond_red_big.png"
|
||||
import manImg from "@/static/new_man_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 editPatient = ()=> uni.showToast({ title:'编辑资料', icon:'none' })
|
||||
const openGroup = ()=> 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 recordIllness = ()=> uni.showToast({ title:'记录病情', icon:'none' })
|
||||
const toggleHistory = ()=> showAllHistory.value = !showAllHistory.value
|
||||
@ -130,7 +218,7 @@
|
||||
.section-title { padding: 16rpx 30rpx; color:#8B2316; font-size: 30rpx; margin-top: 20rpx; }
|
||||
.history-card { position: relative; }
|
||||
.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; }
|
||||
|
||||
.actions { background:#ffffff; margin-top: 20rpx;}
|
||||
|
||||
@ -212,7 +212,13 @@ const translateMsg = (key: string): string => {
|
||||
tipMsgText: t('tipMsgText'),
|
||||
unknowMsgText: t('unknowMsgText'),
|
||||
}[key] || ''
|
||||
return `[${text}]`
|
||||
if(text=='自定义消息'){
|
||||
|
||||
return JSON.parse(props.lastMessage.attachment.raw).gdxz_type
|
||||
}else{
|
||||
return `[${text}]`
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -96,6 +96,7 @@
|
||||
<view class="group-section">
|
||||
<view class="patient-item" v-for="item in group.items" :key="item.uuid || item.id" >
|
||||
<template v-if="item.placeholder">
|
||||
|
||||
<view class="patient-avatar-placeholder">
|
||||
<uni-icons type="person" size="32" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
@ -194,14 +195,14 @@
|
||||
|
||||
<!-- 底部标签栏 -->
|
||||
<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>
|
||||
|
||||
</view>
|
||||
<view class="tab-item" @click="switchTab('list')">
|
||||
<view class="tab-item" :class="{active: activeTab === 'list'}" @click="switchTab('list')">
|
||||
<text class="tab-text">患者列表</text>
|
||||
</view>
|
||||
<view class="tab-item" @click="switchTab('plan')">
|
||||
<view class="tab-item" :class="{active: activeTab === 'plan'}" @click="switchTab('plan')">
|
||||
<text class="tab-text">随访计划</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -445,12 +445,14 @@ onShow(() => {
|
||||
//handleSendTextMsg('article', article);
|
||||
});
|
||||
uni.$on('videoItem', (video) => {
|
||||
console.log('video', video);
|
||||
videoInfo.value = video;
|
||||
senCustomMsg('video');
|
||||
//handleSendTextMsg('video', video);
|
||||
});
|
||||
uni.$on('quickReply', (reply) => {
|
||||
inputText.value= reply;
|
||||
uni.$emit(events.CLOSE_PANEL)
|
||||
});
|
||||
getListOutPatient();
|
||||
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\":\"\"}";
|
||||
const sendMallMsg = () => {
|
||||
showMallModal.value = false;
|
||||
handleSendTextMsg('mall');
|
||||
//handleSendTextMsg('mall');
|
||||
senCustomMsg('mall');
|
||||
|
||||
}
|
||||
|
||||
@ -644,7 +647,7 @@ const handleSendTextMsg = (type:string) => {
|
||||
//let serverExtension={"gdxz_nickName":"测试","gdxz_sessionType":"general"};
|
||||
if(props.isGroupSend){
|
||||
emits('send',{
|
||||
content:textMsg,
|
||||
content:text,
|
||||
msg_type:1,
|
||||
})
|
||||
inputText.value = ''
|
||||
@ -677,9 +680,9 @@ const handleSendTextMsg = (type:string) => {
|
||||
isReplyMsg.value = false
|
||||
replyMsg.value = undefined
|
||||
selectedAtMembers.value = [];
|
||||
if(type=='mall'){
|
||||
senCustomMsg('mall');
|
||||
}
|
||||
// if(type=='mall'){
|
||||
// senCustomMsg('mall');
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -43,6 +43,39 @@
|
||||
</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 class="card-footer">
|
||||
<view class="btn-outline" @click="onResend(item)">再发一条</view>
|
||||
@ -184,8 +217,18 @@ const onRefresh = async () => {
|
||||
uni.showToast({ title: '刷新成功', icon: 'none' });
|
||||
};
|
||||
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({
|
||||
url: `/pages_app/webview/webview?url=${encodeURIComponent(docUrl+JSON.parse(item.msg_content).path)}`,
|
||||
url: `/pages_app/webview/webview?url=${encodeURIComponent(path)}`,
|
||||
})
|
||||
}
|
||||
// 上拉加载更多
|
||||
|
||||
@ -251,7 +251,7 @@ $red: #d32f2f;
|
||||
|
||||
.card-header {
|
||||
position: relative;
|
||||
padding: 28rpx 28rpx 12rpx 28rpx;
|
||||
padding: 28rpx 28rpx 12rpx 0rpx;
|
||||
|
||||
.label {
|
||||
font-size: 32rpx;
|
||||
|
||||
@ -88,10 +88,10 @@
|
||||
// @ts-ignore
|
||||
popupRef.value && popupRef.value.open('center')
|
||||
}
|
||||
onShow(() => {Confirm
|
||||
onShow(() => {
|
||||
getQuickReplyList()
|
||||
})
|
||||
onload(() => {
|
||||
onLoad(() => {
|
||||
getQuickReplyList()
|
||||
})
|
||||
const onSelect = (text) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user