3.11提交

This commit is contained in:
zoujiandong
2026-03-11 13:13:10 +08:00
parent 40f5ddf4a5
commit 08e3ba22c5
22 changed files with 2845 additions and 185 deletions
+76 -6
View File
@@ -177,6 +177,15 @@
</view>
</uni-popup>
</view>
<unidialog
:visible="noticeVisible"
:content="content"
@close="noticeCancel"
@confirm="noticeConfirm"
>
</unidialog>
</template>
<script setup>
@@ -190,13 +199,17 @@ import empty from '@/components/empty/empty.vue'
import sendImg from '@/static/send_feed.png'
import dateBg from '@/static/data_sign.png'
import editImg from '@/static/edit_icon.png'
import unidialog from '@/components/dialog/dialog.vue'
import deleteImg from '@/static/delete_icon.png'
import sinaImg from "@/static/share_sina.png"
import wxImg from "@/static/share_weixin.png"
import friendImg from "@/static/share_wxc.png"
import logoImg from "@/static/weiboShare.png"
const isEdit = ref(false);
const noticeVisible = ref(false);
const SHARE_TITLE = ref('医生门诊详情')
const SHARE_SUMMARY = '肝胆相照®肝胆病在线服务平台'
const content = ref('您的出/停诊信息有改动,是否通知您的患者?');
const page=ref(1);
const isRefreshing = ref(false)
const outPatientLoading = ref(false)
@@ -204,7 +217,7 @@ const hasMoreOutPatient = ref(true)
const addressList = ref([]);
const shareRef = ref()
const shareLink = ref('')
const patient_user_uuid = ref('');
// 响应式数据
const from = ref('');
const currentTab = ref('suspension')
@@ -214,6 +227,32 @@ const note = ref('')
const outpatientSchedules = ref([])
const outPatientList = ref([]);
const patientListByGBK=()=>{
api.patientListByGBK().then(res=>{
if(res.code==1){
console.log(res.data)
for(let i=0;i<res.data.length;i++){
if(patient_user_uuid.value){
patient_user_uuid.value += res.data[i].uuid+',';
}else{
patient_user_uuid.value += res.data[i].uuid;
}
}
}
})
}
const noticeConfirm = () => {
noticeVisible.value = false;
publishOutPatient();
}
const noticeCancel=()=>{
noticeVisible.value = false;
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}
onBackPress(() => {
if(!from.value){
plus.runtime.quit();
@@ -233,6 +272,7 @@ onLoad((options) => {
} catch (error) {
console.log(error)
}
patientListByGBK();
});
const getListOutPatient = async (reset = false) => {
if (outPatientLoading.value) return;
@@ -303,6 +343,18 @@ const goSite = () => {
url: '/pages_chat/addAddress/addAddress'
})
}
const publishOutPatient = async (uuid) => {
const res = await api.publishOutPatient({
msg_type:'5',
msg_content:'',
patient_user_uuid:patient_user_uuid.value
})
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}
const getStopReason = (type) => {
const reasonMap = {
1: '出差',
@@ -350,11 +402,15 @@ const getTypeText = (type) => {
}
// 方法
const goBack = () => {
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
if(isEdit.value){
noticeVisible.value = true;
}else{
if(!from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}
}
const shareToggle = () => {
@@ -496,9 +552,13 @@ const addNew = () => {
}
onShow(() => {
console.log('onShow')
getStopOutPatientList();
getListOutPatient(true);
fetchList();
uni.$on('updateOutPatient',()=>{
isEdit.value = true;
})
})
@@ -525,6 +585,11 @@ const deleteAnnouncement = async (uuid) => {
title: '删除成功',
icon: 'none'
});
if(stopOutPatientList.value.length-1>0){
isEdit.value=true;
}else{
isEdit.value=false;
}
getStopOutPatientList();
} else {
uni.showToast({
@@ -601,6 +666,11 @@ const deleteSchedule = async (uuid) => {
const deleteRes = await api.deleteOutPatient({ uuid });
if (deleteRes.code === 200) {
outPatientList.value = outPatientList.value.filter(item => item.uuid !== uuid);
if(outPatientList.value.length>0){
isEdit.value=true;
}else{
isEdit.value=false;
}
uni.showToast({
title: '删除成功',
icon: 'none'