Commit 0fa8e859 authored by gengchunlei's avatar gengchunlei

Merge branch 'chronic-master' of…

Merge branch 'chronic-master' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-master
parents d6d6d210 09a9ae13
<template> <template>
<div class="p-1 flex flex-col mp3"> <div class="p-1 flex flex-col mp3">
<div v-for="item in files" :key="item.annexId"> <div v-if="file.annexFileName" class="text-12 mb-1 text-ellipsis">{{ file.annexFileName }}</div>
<div v-if="item.annexFileName" class="text-12 mb-1 text-ellipsis">{{ item.annexFileName }}</div> <div class="flex items-center justify-between gap-x-2.5">
<div class="flex items-center justify-between gap-x-2.5"> <div class="shrink-0 play-bt" @click="start(file)">
<div class="shrink-0 play-bt" @click="start(item)"> <doc-icon type="doc-play" />
<doc-icon type="doc-play" />
</div>
<span class="shrink-0 time">{{timeFormat(player.duration)}}</span>
<div class="grow progress">
<van-slider v-model="player.currentTime" :max="sliderMax" :bar-height="6" :button-size="0"
@change="onProgress" />
<!-- <div :style="`width: ${progress}%`"></div> -->
</div>
<span class="shrink-0 time" :style="`opacity: ${player.currentTime ? 1 : 0}`">
{{ timeFormat(player.currentTime) }}</span>
</div> </div>
<span class="shrink-0 time">{{timeFormat(player.duration)}}</span>
<div class="grow progress">
<van-slider v-model="player.currentTime" :max="sliderMax" :bar-height="6" :button-size="0"
@change="onProgress" />
<!-- <div :style="`width: ${progress}%`"></div> -->
</div>
<span class="shrink-0 time" :style="`opacity: ${player.currentTime ? 1 : 0}`">
{{ timeFormat(player.currentTime) }}</span>
</div> </div>
<audio ref="audio" type="audio/mpeg" crossOrigin="anonymous" style="display: none"></audio> <audio ref="audio" type="audio/mpeg" crossOrigin="anonymous" style="display: none"></audio>
</div> </div>
...@@ -26,7 +24,7 @@ import { showToast } from 'vant' ...@@ -26,7 +24,7 @@ import { showToast } from 'vant'
export default { export default {
props: { props: {
files: { default: () => [] } file: { default: () => ({}) }
}, },
data() { data() {
return { return {
......
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
<doc-icon type="doc-play" /> <doc-icon type="doc-play" />
</div> </div>
</div> </div>
<div v-if="item.annexFileName" class="text-12 mb-1 text-ellipsis">{{ item.annexFileName }}</div> <div v-if="item.annexFileName" class="text-12 my-1 text-ellipsis">{{ item.annexFileName }}</div>
</div> </div>
</div> </div>
<van-popup v-model:show="visible" :close-on-click-overlay="false" closeable> <van-popup v-model:show="visible" :close-on-click-overlay="false" closeable
close-icon-position="top-right">
<video controls width="100%" v-if="visible"> <video controls width="100%" v-if="visible">
<source :src="activeVideo.annexUrl" type="video/mp4" /> <source :src="activeVideo.annexUrl" type="video/mp4" />
播放失败! 播放失败!
...@@ -45,6 +46,7 @@ export default { ...@@ -45,6 +46,7 @@ export default {
width: calc(50% - 5px); width: calc(50% - 5px);
.item { .item {
background: url('@/assets/image/residentWX/video-default.png') no-repeat; background: url('@/assets/image/residentWX/video-default.png') no-repeat;
background-size: 100%;
height: .84rem; height: .84rem;
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -8,22 +8,18 @@ ...@@ -8,22 +8,18 @@
</div> </div>
<div class="px-4 py-3 flex shrink-0 base-info"> <div class="px-4 py-3 flex shrink-0 base-info">
<div class="flex w-full"> <div class="flex w-full flex-wrap">
<img src="@/assets/image/residentWX/avatar.png" alt="" class="shrink-0" <div class="item">
style="width: .56rem"> <span>指导单位:</span>
<div class="grow flex flex-col pl-3"> <span>{{ info.visitUnitName || '-' }}</span>
<div class="item"> </div>
<span>指导单位:</span> <div class="item">
<span>{{ info.visitUnitName || '-' }}</span> <span>指导科室:</span>
</div> <span>{{ info.visitOfficeName || '-' }}</span>
<div class="item"> </div>
<span>指导科室:</span> <div class="item">
<span>{{ info.visitOfficeName || '-' }}</span> <span>指导日期:</span>
</div> <span>{{ info.visitDate || '-' }}</span>
<div class="item">
<span>指导日期:</span>
<span>{{ info.visitDate || '-' }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -31,41 +27,42 @@ ...@@ -31,41 +27,42 @@
<div class="p-3 h-full cont-inner"> <div class="p-3 h-full cont-inner">
<div class="flex justify-between collapse-head"> <div class="flex justify-between collapse-head">
<span class="text-16">全部内容</span> <span class="text-16">全部内容</span>
<span @click="toggleAll"> <!-- <span @click="toggleAll">
<span v-if="!collapseAll">展开全部</span> <span v-if="!collapseAll">展开全部</span>
<span v-else>展开收起</span> <span v-else>展开收起</span>
<span :class="['ml-2 icon-down', { 'icon-down-expanded': collapseAll }]"> <span :class="['ml-2 icon-down', { 'icon-down-expanded': collapseAll }]">
<doc-icon type="doc-down" /> <doc-icon type="doc-down" />
</span> </span>
</span> </span> -->
</div>
<div>
<div class="my-2" style="color: #262626">指导内容</div>
<div v-if="contentList.length" class="flex flex-col card">
<!-- 文本 -->
<div v-for="item in contentList" :key="item.templateMode" class="mb-1 flex"
:style="`order: ${item.templateMode}`">
<span class="shrink-0 mr-1" v-if="item.templateModeTrans != '无'">{{ item.templateModeTrans }} :</span>
<span style="white-space: pre-wrap;">{{item.templateContent}}</span>
</div>
</div>
<div v-if="mp4List.length" class="card mt-2">
<Mp4 :files="mp4List"/>
</div>
<div v-if="mp3List.length" class="card flex flex-col mt-2" style="row-gap: .06rem;">
<Mp3 :file="item" v-for="item in mp3List" :key="item.annexId"/>
</div>
</div> </div>
<van-collapse v-model="activeCollapse" ref="collapse" class="doc-collapse" <!-- <van-collapse v-model="activeCollapse" ref="collapse" class="doc-collapse"
@change="collapseChange"> @change="collapseChange">
<van-collapse-item v-for="collapse in collapseList" :key="collapse.name" <van-collapse-item v-for="collapse in collapseList" :key="collapse.name"
:title="collapse.title" :name="collapse.name"> :title="collapse.title" :name="collapse.name">
<template #right-icon> <template #right-icon>
<doc-icon type="doc-down" /> <doc-icon type="doc-down" />
</template> </template>
<div>
<!-- <div style="color: #262626">指导内容</div> -->
<div v-if="contentList.length" class="flex flex-col card">
<!-- 文本 -->
<div v-for="item in contentList" :key="item.templateMode" class="mb-1 flex"
:style="`order: ${item.templateMode}`">
<span class="shrink-0 mr-1" v-if="item.templateModeTrans != '无'">{{ item.templateModeTrans }} :</span>
<span v-html="textHandle(item.templateContent)"></span>
</div>
</div>
<div v-if="mp4List.length" class="card mt-2">
<Mp4 :files="mp4List"/>
</div>
<div v-if="mp3List.length" class="card mt-2">
<Mp3 :files="mp3List"/>
</div>
</div>
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -150,10 +147,6 @@ export default { ...@@ -150,10 +147,6 @@ export default {
}, },
onBack() { onBack() {
this.$router.back() this.$router.back()
},
textHandle(str) {
if (!str) return ''
return str.replace(/\n/g, '<br>')
} }
} }
} }
...@@ -165,7 +158,8 @@ export default { ...@@ -165,7 +158,8 @@ export default {
.base-info { .base-info {
background: linear-gradient(to bottom, #DFF5F4 , #fff 50%); background: linear-gradient(to bottom, #DFF5F4 , #fff 50%);
>div { >div {
align-items: flex-start; column-gap: 16px;
row-gap: 8px;
} }
.item { .item {
margin-bottom: 2px; margin-bottom: 2px;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class='grow overflow-y-auto' ref='list'> <div class='grow overflow-y-auto' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh' <van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' :disabled='isRefreshDisable'
class="h-full"> style="min-height: 100%">
<van-list <van-list
v-model:loading='loading' v-model:loading='loading'
:finished='finished' :finished='finished'
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
<span class="label">筛查科室</span> <span class="label">筛查科室</span>
<span>{{ item.visitOfficeName }}</span> <span>{{ item.visitOfficeName }}</span>
</div> </div>
<span class="tag tag-orange" v-show="item.visitWayRules == '2'">健康指导</span> <span class="tag tag-orange" v-show="item.visitWayRules.includes('2')">健康指导</span>
<span class="tag tag-green" v-show="item.visitWayRules == '3'">健康宣教</span> <span class="tag tag-green" v-show="item.visitWayRules.includes('3')">健康宣教</span>
</div> </div>
</div> </div>
</van-list> </van-list>
......
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
<div style="color: #8C8C8C;" class="py-2 px-3">以下为您提供慢病筛查的专家,可向其进行慢病咨询</div> <div style="color: #8C8C8C;" class="py-2 px-3">以下为您提供慢病筛查的专家,可向其进行慢病咨询</div>
<div class="grow flex"> <div class="grow flex">
<div class="h-full list-l"> <div class="h-full list-l">
<div class="p-3 active">
咨询过的专家
</div>
<div v-for="item in orgList" :key="item.unitId" <div v-for="item in orgList" :key="item.unitId"
:class="['p-3', { 'active': item.unitId === activeOrg.unitId }]" :class="['p-3', { 'active': item.unitId === activeOrg.unitId }]"
@click="onOrgChange(item)"> @click="onOrgChange(item)">
...@@ -28,6 +25,10 @@ ...@@ -28,6 +25,10 @@
@click="toSession(item)">咨询医生</van-button> @click="toSession(item)">咨询医生</van-button>
</div> </div>
</div> </div>
<div class='text-center shrink-0 empty' v-if='!innerDoctorList.length'>
<img src='@/assets/image/doctor/empty.png' alt='' style='width: 1.2rem;'>
<p>暂无数据</p>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -45,6 +46,8 @@ export default { ...@@ -45,6 +46,8 @@ export default {
store: useStore(), store: useStore(),
orgList: [], orgList: [],
doctorList: [], doctorList: [],
// 沟通过的医生列表
recordList: [],
activeOrg: {} activeOrg: {}
} }
}, },
...@@ -53,6 +56,9 @@ export default { ...@@ -53,6 +56,9 @@ export default {
return this.store.userInfo return this.store.userInfo
}, },
innerDoctorList() { innerDoctorList() {
if (this.activeOrg.unitId === 'record') {
return this.recordList
}
return this.doctorList.filter(e => e.unitId === this.activeOrg.unitId) return this.doctorList.filter(e => e.unitId === this.activeOrg.unitId)
} }
}, },
...@@ -76,10 +82,11 @@ export default { ...@@ -76,10 +82,11 @@ export default {
unitName: e.unitName unitName: e.unitName
}) })
}) })
this.orgList = orgList this.orgList = [{
if (orgList.length) { unitId: 'record',
this.activeOrg = orgList[0] unitName: '咨询过的专家'
} }].concat(orgList)
this.activeOrg = this.orgList[0]
}) })
}, },
onOrgChange(item) { onOrgChange(item) {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<img src="@/assets/image/residentWX/avatar-doctor.svg" alt="" v-show="item.from !== accountId"> <img src="@/assets/image/residentWX/avatar-doctor.svg" alt="" v-show="item.from !== accountId">
</div> </div>
<div class="msg-cont"> <div class="msg-cont">
<span v-if="item.type === 'text'">{{ item.text }}</span> <span v-if="item.type === 'text'" style="white-space: pre-wrap;">{{ item.text }}</span>
<FileView v-else-if="['image', 'file'].includes(item.type)" :file="item.file" <FileView v-else-if="['image', 'file'].includes(item.type)" :file="item.file"
@viewImage="viewImage"/> @viewImage="viewImage"/>
</div> </div>
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
</van-tabs> </van-tabs>
<div class='grow overflow-y-auto' ref='list'> <div class='grow overflow-y-auto' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh' <van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' :disabled='isRefreshDisable' style="min-height: 100%">
class="h-full">
<van-list <van-list
v-model:loading='loading' v-model:loading='loading'
:finished='finished' :finished='finished'
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<van-pull-refresh v-model='loadingRefresh' <van-pull-refresh v-model='loadingRefresh'
@refresh='onRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' :disabled='isRefreshDisable'
style="min-height: 100%"
> >
<van-list <van-list
v-model:loading='loading' v-model:loading='loading'
......
...@@ -177,8 +177,8 @@ ...@@ -177,8 +177,8 @@
<div v-if="mp4List.length" class="card mt-2"> <div v-if="mp4List.length" class="card mt-2">
<Mp4 :files="mp4List"/> <Mp4 :files="mp4List"/>
</div> </div>
<div v-if="mp3List.length" class="card mt-2"> <div v-if="mp3List.length" class="card flex flex-col mt-2" style="row-gap: .06rem;">
<Mp3 :files="mp3List"/> <Mp3 :file="item" v-for="item in mp3List" :key="item.annexId"/>
</div> </div>
</div> </div>
</van-collapse-item> </van-collapse-item>
......
...@@ -39,11 +39,11 @@ module.exports = defineConfig({ ...@@ -39,11 +39,11 @@ module.exports = defineConfig({
} }
}, },
'/chronic-resident': { '/chronic-resident': {
target: 'http://192.168.1.187:8903', // target: 'http://192.168.1.187:8903',
// target: 'https://beta-tumour.zmnyjk.com', target: 'https://beta-tumour.zmnyjk.com',
changOrigin: true, changOrigin: true,
pathRewrite: { pathRewrite: {
'^/chronic-resident': '/' '^/chronic-resident': '/chronic-resident'
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment