From 08e3ba22c5559ca079553a6eb9df46b6ccbb8c37 Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Wed, 11 Mar 2026 13:13:10 +0800 Subject: [PATCH] =?UTF-8?q?3.11=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.js | 9 +- pages.json | 35 +- pages_app/patientGroup/patientGroup.vue | 10 +- pages_app/patientMsg/patientMsg copy.vue | 1300 +++++++++++++++++ pages_app/patientMsg/patientMsg.vue | 151 +- pages_app/selectPatient/selectPatient.vue | 79 +- .../selectPatientSingle.vue | 16 +- pages_chat/article/article.vue | 31 +- pages_chat/chat/message/message-input.vue | 89 +- pages_chat/groupMessage/groupMessage.vue | 77 +- pages_chat/groupSend/groupSend.vue | 46 +- pages_chat/outManage/outManage.vue | 3 +- pages_chat/outPatient/outPatient.vue | 82 +- pages_chat/patientGroup/patientGroup.vue | 68 +- pages_chat/quickReply/quickReply.vue | 6 +- pages_chat/searchArticle/searchArticle.vue | 64 +- pages_chat/video/searchVideo.vue | 894 ++++++++++++ pages_chat/video/video.vue | 70 +- static/addIcon.png | Bin 0 -> 2002 bytes static/default.png | Bin 0 -> 2197 bytes static/huanjiao.png | Bin 0 -> 2154 bytes static/patientgif.png | Bin 0 -> 80434 bytes 22 files changed, 2845 insertions(+), 185 deletions(-) create mode 100644 pages_app/patientMsg/patientMsg copy.vue create mode 100644 pages_chat/video/searchVideo.vue create mode 100644 static/addIcon.png create mode 100644 static/default.png create mode 100644 static/huanjiao.png create mode 100644 static/patientgif.png diff --git a/api/api.js b/api/api.js index cc3eb64..e6abf11 100644 --- a/api/api.js +++ b/api/api.js @@ -713,7 +713,14 @@ const api = { }, getGanDanFileOrder(data){ return request('/expertPay/getGanDanFileOrder', data, 'post', false); - } + }, + publishOutPatient(data){ + return request('/expertAPI/addGroupSendMsg4YunXin', data, 'post', false); + }, + polularScienceArticleListIndexNew(data){ + return request('/expertAPI/polularScienceArticleListIndexNew', data, 'post', false); + }, + //https://dev-app.igandan.com/app/expertPay/getGanDanFileOrder } diff --git a/pages.json b/pages.json index 6071aa0..232a597 100644 --- a/pages.json +++ b/pages.json @@ -514,6 +514,17 @@ } } }, + // { + // "path": "search/search", + // "style": { + // "navigationStyle": "custom", + // "navigationBarRightButton":{ "hide": true}, + // "navigationBarTitleText": "uni-app分页", + // "app": { + // "bounce": "none" + // } + // } + // }, { "path": "myAnswer/myAnswer", "style": { @@ -1075,17 +1086,7 @@ // } // } // }, - // { - // "path": "search/search", - // "style": { - // "navigationStyle": "custom", - // "navigationBarRightButton":{ "hide": true}, - // "navigationBarTitleText": "uni-app分页", - // "app": { - // "bounce": "none" - // } - // } - // }, + // { // "path": "video/video", // "style": { @@ -1568,6 +1569,16 @@ "bounce": "none" } } + }, + { + "path": "video/searchVideo", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "uni-app分页", + "app": { + "bounce": "none" + } + } } ] } @@ -1698,7 +1709,7 @@ "list": [ { "name": "", - "path": "pages_chat/outPatient/outPatient", + "path": "pages_app/patientMsg/patientMsg", "query": "" } ] diff --git a/pages_app/patientGroup/patientGroup.vue b/pages_app/patientGroup/patientGroup.vue index 6177292..09ab2cd 100644 --- a/pages_app/patientGroup/patientGroup.vue +++ b/pages_app/patientGroup/patientGroup.vue @@ -84,7 +84,7 @@ - + {{ patient._displayName }} @@ -110,6 +110,7 @@ import api from '@/api/api.js'; import docUrl from '@/utils/docUrl' import dayjs from 'dayjs' import navTo from '@/utils/navTo.js' +import defaultImg from "@/static/default.png" const list_sort = ref(0); const group_sort = ref(0); const groupSortSelected = ref(false); @@ -196,7 +197,7 @@ const preprocessGroups = (rawGroups) => { list.forEach((patient) => { patient._formattedJoinDate = formatYMD(patient.join_date); patient._displayName = patient.realName || patient.nickname || '-'; - patient._photoUrl = `${docUrl}${patient.photo || ''}`; + patient._photoUrl = patient.photo ? `${docUrl}${patient.photo}` : defaultImg; }); return { ...group, @@ -205,6 +206,11 @@ const preprocessGroups = (rawGroups) => { }); }; +const handlePatientAvatarError = (patient) => { + if (!patient) return; + patient._avatarLoadError = true; +}; + const startProgressiveRender = (idx) => { const group = groups.value[idx]; if (!group) return; diff --git a/pages_app/patientMsg/patientMsg copy.vue b/pages_app/patientMsg/patientMsg copy.vue new file mode 100644 index 0000000..17c9580 --- /dev/null +++ b/pages_app/patientMsg/patientMsg copy.vue @@ -0,0 +1,1300 @@ + + + + + + \ No newline at end of file diff --git a/pages_app/patientMsg/patientMsg.vue b/pages_app/patientMsg/patientMsg.vue index aa08ff5..c4cc557 100644 --- a/pages_app/patientMsg/patientMsg.vue +++ b/pages_app/patientMsg/patientMsg.vue @@ -95,10 +95,73 @@ - + - - + + + + + + + + + + + + + + + @@ -122,42 +185,10 @@ - - - - - + - + { plus.runtime.quit(); return true; }); + import alertImg from "@/static/patientgif.png" const getNavHeight = () => { const systemInfo = uni.getSystemInfoSync(); console.log(2223); @@ -272,7 +305,6 @@ import pinyin from 'pinyin'; import dayjs from 'dayjs' import lineImg from "@/static/item_visitplan_fg.png" - import empty from '@/components/empty/empty.vue' const loadFinish = ref(false); //import ConversationList from './conversation-list/index.vue' const title = ref('患者消息'); @@ -287,6 +319,10 @@ url: `/pages_app/patientSetting/patientSetting?uuid=${uuid}` }) } + const handlePatientAvatarError = (item) => { + if (!item) return + item._avatarLoadError = true + } const goCode = () => { navTo({ url: `/pages_app/myCode/myCode` @@ -387,7 +423,7 @@ const p = source[i] || {}; const normalized = { ...p, - avatarUrl: p.photo ? `${docUrl}${p.photo}` : '', + avatarUrl: p.photo ? `${docUrl}${p.photo}` : defaultImg, joinDateYMD: formatYMD(p.join_date) }; const first = getFirstLetter(normalized.realName || ''); @@ -397,10 +433,8 @@ } const letters = Array.from(map.keys()).sort((a,b) => a.localeCompare(b)); patientGroups.value = letters.map(l => ({ letter: l, items: map.get(l) })); - console.log(patientGroups.value) rebuildIndexList(); - if(source.length === 0){ - console.log(111122) + if(patientList.value.length==0){ indexList.value=[] } nextTick(() => { @@ -485,6 +519,10 @@ }); } }; + const hideAlert = () => { + showAlert.value = false; + uni.setStorageSync('hasAlert', true); + } const patientListByGBK = async () => { if (patientDataLoading.value) return; patientDataLoading.value = true; @@ -495,6 +533,15 @@ patientList.value = res.data || []; buildGroupsFromPatients(); patientDataLoaded.value = true; + if(res.data.length > 1000){ + const hasAlert = uni.getStorageSync('hasAlert'); + if(!hasAlert){ + showAlert.value = true; + }else{ + showAlert.value = false; + } + //showAlert.value = true; + } } else { uni.hideLoading(); } @@ -619,15 +666,14 @@ break; case 'list': title.value = '患者列表'; - // if (patientDataLoaded.value) { - // loadFinish.value = true; - // break; - // } + if (patientDataLoaded.value) { + loadFinish.value = true; + break; + } uni.showLoading({ title: '加载中...', mask: true }); - getApplyList(); patientListByGBK(); // 显示患者列表 break; @@ -883,7 +929,7 @@ } .tab-text { - font-size: 32rpx; + font-size: 28rpx; color: #999999; transition: color 0.3s; } @@ -915,13 +961,12 @@ // 患者列表样式 .patient-list { + :deep(.u-index-list__letter){ + top:50%!important; + } :deep(.u-index-list__scroll-view){ height:calc(100vh - var(--status-bar-height) - 44px - 103rpx); } - :deep(.hide-index-bar .u-index-list__sidebar), - :deep(.hide-index-bar .u-index-list__index-box) { - display: none !important; - } // position: fixed; width: 100%; diff --git a/pages_app/selectPatient/selectPatient.vue b/pages_app/selectPatient/selectPatient.vue index 5f621b4..b31cdcd 100644 --- a/pages_app/selectPatient/selectPatient.vue +++ b/pages_app/selectPatient/selectPatient.vue @@ -31,13 +31,19 @@ - - {{ p.nickname || p.realName }} + + {{ p.realName || p.nickname}} + + + + {{ isAllSelected ? '全不选' : '全选' }} + + @@ -47,12 +53,17 @@ import { onShow,onLoad} from "@dcloudio/uni-app"; import api from '@/api/api.js' import navTo from '@/utils/navTo.js' + import defaultImg from "@/static/default.png" const from = ref(''); const keyword = ref('') const selectedIds = ref([]) const patientList = ref([]) const selectedDetail = ref([]) const availablePatientList = ref([]) + const isAllSelected = computed(() => { + const total = patientList.value.length + return total > 0 && selectedIds.value.length === total + }) // 计算属性:显示所有患者,但标记已选中的状态 // const availablePatientList = computed(() => { // return patientList.value @@ -126,6 +137,32 @@ selectedDetail.value.push({ uuid: id, realName: p?.realName || '', photo: p?.photo || '',nickName: p?.nickName || '' }) } } + + const getAvatarSrc = (patient) => { + if (patient?._avatarLoadError) return defaultImg + return patient?.photo ? (docUrl + patient.photo) : defaultImg + } + + const handleAvatarError = (patient) => { + if (!patient) return + patient._avatarLoadError = true + } + + const toggleSelectAll = () => { + if (!patientList.value.length) return + if (isAllSelected.value) { + selectedIds.value = [] + selectedDetail.value = [] + return + } + selectedIds.value = patientList.value.map(item => item.uuid) + selectedDetail.value = patientList.value.map(item => ({ + uuid: item.uuid, + realName: item?.realName || '', + photo: item?.photo || '', + nickName: item?.nickName || '' + })) + } const onSearch = () => { if(keyword.value.replace(/\s/g, "")){ @@ -137,6 +174,15 @@ } const goBack = () => uni.navigateBack() const confirmSelect = () => { + if(from.value == 'chatMsg'){ + if(selectedIds.value.length >200){ + uni.showToast({ + title: '选择人数不能超过200', + icon: 'none' + }) + return; + } + } const payload = { ids: selectedIds.value, list: selectedDetail.value } // 通过事件通道回传 try { @@ -185,7 +231,14 @@ 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) + 64px + 94rpx); + bottom: 130rpx; + } .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; } @@ -193,4 +246,24 @@ .circle{ width: 40rpx; height: 40rpx; border-radius: 50%; border: 2rpx solid #cfcfcf; } .circle.active{ background:#8B2316; border-color:#8B2316; position: relative; } .circle.active::after{ content:''; position:absolute; left: 14rpx; top: 6rpx; width: 10rpx; height: 18rpx; border: 4rpx solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg); } + .bottom-actions{ + position: fixed; + left: 0; + right: 0; + bottom: 0; + background: #fff; + border-top: 1rpx solid #f0f0f0; + padding: 20rpx 30rpx 20rpx; + } + .select-all-btn{ + height: 88rpx; + border-radius: 12rpx; + color: #8B2316; + background: #fff; + border: 2rpx solid #8B2316; + font-size: 30rpx; + display: flex; + align-items: center; + justify-content: center; + } diff --git a/pages_app/selectPatientSingle/selectPatientSingle.vue b/pages_app/selectPatientSingle/selectPatientSingle.vue index 4b10eda..9c07be8 100644 --- a/pages_app/selectPatientSingle/selectPatientSingle.vue +++ b/pages_app/selectPatientSingle/selectPatientSingle.vue @@ -31,8 +31,8 @@ - - {{ p.nickname || p.realName }} + + {{ p.realName || p.nickname }} @@ -46,7 +46,7 @@ import docUrl from '@/utils/docUrl.js' import { onShow,onLoad} from "@dcloudio/uni-app"; import api from '@/api/api.js' - + import defaultImg from "@/static/default.png" const keyword = ref('') const selectedIds = ref([]) const patientList = ref([]) @@ -128,6 +128,16 @@ uni.navigateBack() } } + + const getAvatarSrc = (patient) => { + if (patient?._avatarLoadError) return defaultImg + return patient?.photo ? (docUrl + patient.photo) : defaultImg + } + + const handleAvatarError = (patient) => { + if (!patient) return + patient._avatarLoadError = true + } const onSearch = () => { if(keyword.value.replace(/\s/g, "")){ diff --git a/pages_chat/article/article.vue b/pages_chat/article/article.vue index ab8a622..2aa5d19 100644 --- a/pages_chat/article/article.vue +++ b/pages_chat/article/article.vue @@ -99,6 +99,17 @@ + + + + + diff --git a/pages_chat/video/video.vue b/pages_chat/video/video.vue index d876fda..ceb3b54 100644 --- a/pages_chat/video/video.vue +++ b/pages_chat/video/video.vue @@ -1,6 +1,16 @@