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>
<div class="p-1 flex flex-col mp3">
<div v-for="item in files" :key="item.annexId">
<div v-if="item.annexFileName" class="text-12 mb-1 text-ellipsis">{{ item.annexFileName }}</div>
<div v-if="file.annexFileName" class="text-12 mb-1 text-ellipsis">{{ file.annexFileName }}</div>
<div class="flex items-center justify-between gap-x-2.5">
<div class="shrink-0 play-bt" @click="start(item)">
<div class="shrink-0 play-bt" @click="start(file)">
<doc-icon type="doc-play" />
</div>
<span class="shrink-0 time">{{timeFormat(player.duration)}}</span>
......@@ -15,7 +14,6 @@
<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>
</div>
</template>
......@@ -26,7 +24,7 @@ import { showToast } from 'vant'
export default {
props: {
files: { default: () => [] }
file: { default: () => ({}) }
},
data() {
return {
......
......@@ -7,10 +7,11 @@
<doc-icon type="doc-play" />
</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>
<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">
<source :src="activeVideo.annexUrl" type="video/mp4" />
播放失败!
......@@ -45,6 +46,7 @@ export default {
width: calc(50% - 5px);
.item {
background: url('@/assets/image/residentWX/video-default.png') no-repeat;
background-size: 100%;
height: .84rem;
display: flex;
align-items: center;
......
......@@ -8,10 +8,7 @@
</div>
<div class="px-4 py-3 flex shrink-0 base-info">
<div class="flex w-full">
<img src="@/assets/image/residentWX/avatar.png" alt="" class="shrink-0"
style="width: .56rem">
<div class="grow flex flex-col pl-3">
<div class="flex w-full flex-wrap">
<div class="item">
<span>指导单位:</span>
<span>{{ info.visitUnitName || '-' }}</span>
......@@ -26,46 +23,46 @@
</div>
</div>
</div>
</div>
<div class="p-3 grow cont-box">
<div class="p-3 h-full cont-inner">
<div class="flex justify-between collapse-head">
<span class="text-16">全部内容</span>
<span @click="toggleAll">
<!-- <span @click="toggleAll">
<span v-if="!collapseAll">展开全部</span>
<span v-else>展开收起</span>
<span :class="['ml-2 icon-down', { 'icon-down-expanded': collapseAll }]">
<doc-icon type="doc-down" />
</span>
</span>
</span> -->
</div>
<van-collapse v-model="activeCollapse" ref="collapse" class="doc-collapse"
@change="collapseChange">
<van-collapse-item v-for="collapse in collapseList" :key="collapse.name"
:title="collapse.title" :name="collapse.name">
<template #right-icon>
<doc-icon type="doc-down" />
</template>
<div>
<!-- <div style="color: #262626">指导内容</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 v-html="textHandle(item.templateContent)"></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 mt-2">
<Mp3 :files="mp3List"/>
<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>
<!-- <van-collapse v-model="activeCollapse" ref="collapse" class="doc-collapse"
@change="collapseChange">
<van-collapse-item v-for="collapse in collapseList" :key="collapse.name"
:title="collapse.title" :name="collapse.name">
<template #right-icon>
<doc-icon type="doc-down" />
</template>
</van-collapse-item>
</van-collapse>
</van-collapse> -->
</div>
</div>
</div>
......@@ -150,10 +147,6 @@ export default {
},
onBack() {
this.$router.back()
},
textHandle(str) {
if (!str) return ''
return str.replace(/\n/g, '<br>')
}
}
}
......@@ -165,7 +158,8 @@ export default {
.base-info {
background: linear-gradient(to bottom, #DFF5F4 , #fff 50%);
>div {
align-items: flex-start;
column-gap: 16px;
row-gap: 8px;
}
.item {
margin-bottom: 2px;
......
......@@ -12,7 +12,7 @@
<div class='grow overflow-y-auto' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable'
class="h-full">
style="min-height: 100%">
<van-list
v-model:loading='loading'
:finished='finished'
......@@ -35,8 +35,8 @@
<span class="label">筛查科室</span>
<span>{{ item.visitOfficeName }}</span>
</div>
<span class="tag tag-orange" v-show="item.visitWayRules == '2'">健康指导</span>
<span class="tag tag-green" v-show="item.visitWayRules == '3'">健康宣教</span>
<span class="tag tag-orange" v-show="item.visitWayRules.includes('2')">健康指导</span>
<span class="tag tag-green" v-show="item.visitWayRules.includes('3')">健康宣教</span>
</div>
</div>
</van-list>
......
......@@ -7,9 +7,6 @@
<div style="color: #8C8C8C;" class="py-2 px-3">以下为您提供慢病筛查的专家,可向其进行慢病咨询</div>
<div class="grow flex">
<div class="h-full list-l">
<div class="p-3 active">
咨询过的专家
</div>
<div v-for="item in orgList" :key="item.unitId"
:class="['p-3', { 'active': item.unitId === activeOrg.unitId }]"
@click="onOrgChange(item)">
......@@ -28,6 +25,10 @@
@click="toSession(item)">咨询医生</van-button>
</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>
......@@ -45,6 +46,8 @@ export default {
store: useStore(),
orgList: [],
doctorList: [],
// 沟通过的医生列表
recordList: [],
activeOrg: {}
}
},
......@@ -53,6 +56,9 @@ export default {
return this.store.userInfo
},
innerDoctorList() {
if (this.activeOrg.unitId === 'record') {
return this.recordList
}
return this.doctorList.filter(e => e.unitId === this.activeOrg.unitId)
}
},
......@@ -76,10 +82,11 @@ export default {
unitName: e.unitName
})
})
this.orgList = orgList
if (orgList.length) {
this.activeOrg = orgList[0]
}
this.orgList = [{
unitId: 'record',
unitName: '咨询过的专家'
}].concat(orgList)
this.activeOrg = this.orgList[0]
})
},
onOrgChange(item) {
......
......@@ -21,7 +21,7 @@
<img src="@/assets/image/residentWX/avatar-doctor.svg" alt="" v-show="item.from !== accountId">
</div>
<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"
@viewImage="viewImage"/>
</div>
......
......@@ -11,8 +11,7 @@
</van-tabs>
<div class='grow overflow-y-auto' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable'
class="h-full">
:disabled='isRefreshDisable' style="min-height: 100%">
<van-list
v-model:loading='loading'
:finished='finished'
......
......@@ -13,6 +13,7 @@
<van-pull-refresh v-model='loadingRefresh'
@refresh='onRefresh'
:disabled='isRefreshDisable'
style="min-height: 100%"
>
<van-list
v-model:loading='loading'
......
......@@ -177,8 +177,8 @@
<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 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>
</van-collapse-item>
......
......@@ -39,11 +39,11 @@ module.exports = defineConfig({
}
},
'/chronic-resident': {
target: 'http://192.168.1.187:8903',
// target: 'https://beta-tumour.zmnyjk.com',
// target: 'http://192.168.1.187:8903',
target: 'https://beta-tumour.zmnyjk.com',
changOrigin: true,
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