修改消息列表

This commit is contained in:
闫晓茹 2023-11-09 15:07:35 +08:00
parent ac636bf3f0
commit e2bcae1545
6 changed files with 180 additions and 48 deletions

View File

@ -31,7 +31,7 @@ export function closeHealthConsultationOrder(data) {
//消息列表
export function consultationInfolist(data) {
return request({
url: `/nurseApplet/consultationInfo/list`,
url: '/nurseApplet/consultationInfo/list',
method: 'get',
data: data
})

View File

@ -8,7 +8,21 @@ export function sendMessage(data) {
data: data
})
}
export function consultationlnfo(id) {
return request({
url: '/nurseApplet/consultationInfo/'+id,
method: 'get',
})
}
// export function updateReadStatus(data) {
// return request({
// url: '/nurseApplet/chatRecord/updateReadStatus',
// method: 'put',
// data:data,
// })
// }
// 查询聊天记录
export function getChatRecord(data) {

View File

@ -47,7 +47,17 @@
{
"path": "pages/homepage/homepage",
"style": {
"navigationBarTitleText": "工单",
// "navigationBarTitleText": "工单",
"navigationStyle": "custom",
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
},
{
"path": "pages/quanyi/quanyi",
"style": {
// "navigationBarTitleText": "工单",
"navigationStyle": "custom",
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
@ -79,8 +89,25 @@
"navigationBarTitleText": "视频通话",
"enablePullDownRefresh": false
}
},
{
"path": "pages/seekadvicefrom/seekadvicefrom",
"style": {
"navigationBarTitleText": "消息",
"enablePullDownRefresh": false
}
},
{
"path": "pages/information/information",
"style": {
"navigationBarTitleText": "查看患者信息",
"enablePullDownRefresh": false
// "navigationStyle": "custom"
}
}
],
],
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",

View File

@ -1,8 +1,10 @@
<template>
<view class="app">
<u-tabs :list="tabslist" :is-scroll="false" :current="tabscurrent" @change="tabschange" inactive-color='#fff'
active-color='#fff'></u-tabs>
<view class="">
<!-- 泉医到家 -->
<view class="" v-if="status==2">
<uni-nav-bar title="工单" background-color="#18CBB3" color="white"></uni-nav-bar>
<u-tabs :list="tabslist" :is-scroll="false" :current="tabscurrent" @change="tabschange"
inactive-color='#fff' active-color='#fff'></u-tabs>
<view class="top" v-if="tabscurrent==0">
<u-dropdown active-color='#26A888'>
<u-dropdown-item v-model="optionindex" :title="optionname" :options="options"
@ -100,25 +102,14 @@
<u-empty text="暂无工单" mode="list" icon-size='240' font-size='32'></u-empty>
</view>
</view>
<!-- <view class="">
<view class="inputs" style="width: 90%;height: 60rpx;transform: none;margin: 20rpx auto;">
<i class="icon"></i>
<input type="text" name="" id="" class="input" placeholder="搜索" v-model="formdata.name">
</view>
<view class="lists" v-if="listinfo">
<view class="item" v-for="item in listinfo" @tap='goseekadvicefrom(item)'>
<image src="../../static/headsculpture.png" mode=""></image>
<view class="name">
{{item.patientName}}
</view>
<view class="text">
{{item.content}}
</view>
<view class="count" v-if="item.messageCount>0">
{{item.messageCount}}
</view>
</view>
</view>
<!-- 家医 -->
<view class="" v-if="status==1">
<protocol :Refresh="Refresh" :down="down">
</protocol>
</view>
<!-- 专病-->
<!-- view class="" v-if="status==3">
<image src="../../static/bg.png" mode=""></image>
</view> -->
<u-toast ref="uToast" />
</view>
@ -134,12 +125,19 @@
consultation,
} from '@/api/homepage/index.js'
import {
getSex
} from '@/utils/conversion.js'
import protocol from '../quanyi/quanyi.vue'
export default {
components: {
protocol,
},
data() {
return {
Refresh: 1,
down: 2,
tabslist: [{
name: '全部工单',
value: '',
@ -188,7 +186,12 @@
}
},
onShow() {
this.info();
if (this.status == 2) {
this.info();
}
this.status = uni.getStorageSync("status", )
// console.log(this.status, '555')
},
methods: {
//
@ -277,19 +280,29 @@
},
},
onReachBottom() { //
// if(this.status==2){
if (this.missionlist.length >= this.missiontotal) {} else {
// this.down++
this.query.pageNum++
getList(this.query).then(
res => {
console.log(res, '77')
res.rows.forEach(e => {
console.log(e, '787')
e.sex = getSex(e.cardNo)
this.missionlist.push(e)
})
})
}
// }
},
onPullDownRefresh() { //
this.info();
if (this.status == 2) {
this.info();
} else {
this.Refresh++
}
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
@ -309,6 +322,28 @@
background-color: #fff;
font-size: 24rpx;
.titlelist {
font-size: 20px;
text-align: center;
height: 80rpx;
border-bottom: 1rpx solid #f6f6f6;
padding-top: 100rpx;
position: fixed;
width: 100%;
background: #18CBB3;
z-index: 10;
color: #fff;
image {
width: 20rpx;
height: 30rpx;
transform: rotate(180deg);
position: absolute;
left: 40rpx;
bottom: 38rpx;
}
}
.lists {
width: 96%;
margin: 0 auto;

View File

@ -62,21 +62,32 @@
if (res.data.code == 200) {
uni.setStorageSync("id", res.data.data.id)
uni.setStorageSync("status", res.data.data.status)
if(res.data.data.status==3){
that.$refs.uToast.show({
title: '当前用户无权限',
type: 'error',
duration: '1500'
})
}else if(res.data.data.status==2||res.data.data.status==1){
that.$refs.uToast.show({
title: '登录成功',
type: 'success',
duration: '1500'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.reLaunch({
url: '/pages/homepage/homepage',
})
}, 1500)
}
// uni.setStorageSync("nursePersonName", res.data.nursePersonName)
// uni.setStorageSync("nurseStationId", res.data.nurseStationId)
that.$refs.uToast.show({
title: '登录成功',
type: 'success',
duration: '1500'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.reLaunch({
url: '/pages/homepage/homepage',
})
}, 1500)
} else {
that.$refs.uToast.show({
title: res.data.msg,

View File

@ -1,9 +1,10 @@
<template>
<view class="content">
<!-- <view class="title">
<!-- <view class="title">
<image src="../../static/huijiantou.png" @click="back"></image>
{{currentItem.senderName}}
</view> -->
<!-- 聊天渲染列表 -->
<!-- scroll-y scroll-into-view="placeholder" scroll-top="500" scroll-with-animation -->
<scroll-view scroll-y="true" :scroll-top='scrollTop' id="demo"
@ -24,10 +25,14 @@
</view>
<video v-if="item.video" :src="item.video"></video>
</view>
<view class="placeholder" id="placeholder" ></view>
</view>
</scroll-view>
<view class="placeholder" id="placeholder"></view>
</view>
</scroll-view>
<view class="background" @tap="information">
<image src="/static/huanzhe.png" mode=""></image>
</view>
<!-- 底部输入 -->
<view class="input-box" :class="{ 'input-box-mpInputMargin': mpInputMargin }">
<view class="input-box-flex">
@ -79,7 +84,8 @@
import {
sendMessage,
getChatRecord,
markRead
markRead,
} from '@/api/seekadvicefrom/seekadvicefrom.js';
import baseurl from '@/api/baseurl.js'
export default {
@ -143,6 +149,7 @@
],
scrollTop: 999999,
inputboxtop: undefined,
id: '',
};
},
onReady() { //
@ -151,9 +158,11 @@
});
},
onLoad(options) {
console.log(options, '888')
this.baseurl = baseurl;
// uni.closeSocket()
this.currentItem = JSON.parse(options.item)
this.id = this.currentItem.id
this.title = this.currentItem.patientName //
this.userName = this.currentItem.doctorName
this.SOCKETURL = this.SOCKETURL + this.currentItem.doctorId
@ -161,11 +170,26 @@
this.scoket()
},
mounted() {
// this.infolist()
// wx.pageScrollTo({
// scrollTop: 9999999
// })
},
methods: {
// infolist() {
// let objLIST = {
// consultationId: this.currentItem.id,
// recipientId: this.currentItem.doctorId,
// }
// updateReadStatus(this.objLIST).then(res => {
// console.log(res, '444')
// })
// },
information() {
uni.navigateTo({
url: `/pages/information/information?item=${this.id}`
})
},
getPageHistory() {
let obj = {
consultationId: this.currentItem.id,
@ -190,11 +214,14 @@
})
},
Read() {
console.log(this.currentItem.doctorId,'888888888')
let markReadData = {
consultationId: this.currentItem.id,
recipientId: this.currentItem.patientId,
recipientId: Number(this.currentItem.doctorId),
}
console.log(markReadData,'6')
markRead(markReadData)
},
//
sendconfirm(value) {
@ -509,6 +536,24 @@
</script>
<style lang="scss" scoped>
.background {
font-size: 24rpx;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #18CBB3;
line-height: 38rpx;
// background-color: red;
position: absolute;
left: 6%;
bottom: 8%;
image {
width: 277rpx;
height: 32rpx;
}
}
page {
background-color: #f3f3f3;
}
@ -755,4 +800,4 @@
bottom: 38rpx;
}
}
</style>
</style>