This commit is contained in:
2023-10-25 11:10:26 +08:00
parent 94dd0b2240
commit 5ae09f4407
3 changed files with 175 additions and 129 deletions

View File

@ -3,87 +3,77 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path" : "pages/taskReturn/taskReturn",
"style" :
{
"navigationBarTitleText": "退回原因",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/Completedwork/Completedwork",
"style" :
{
"navigationBarTitleText": "已完成工单",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/Changepassword/Changepassword",
"style" :
{
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/Modifyphonenumber/Modifyphonenumber",
"style" :
{
"navigationBarTitleText": "修改手机号",
"enablePullDownRefresh": false
}
},
{
"path": "pages/myinformation/myinformation",
"style": {
"navigationBarTitleText": "我的",
"enablePullDownRefresh": false
}
},
{
"path": "pages/login/login",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/taskReturn/taskReturn",
"style": {
"navigationBarTitleText": "退回原因",
"enablePullDownRefresh": false
}
},
{
"path": "pages/Completedwork/Completedwork",
"style": {
"navigationBarTitleText": "已完成工单",
"enablePullDownRefresh": false
}
},
{
"path": "pages/Changepassword/Changepassword",
"style": {
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
},
{
"path": "pages/Modifyphonenumber/Modifyphonenumber",
"style": {
"navigationBarTitleText": "修改手机号",
"enablePullDownRefresh": false
}
},
{
"path": "pages/myinformation/myinformation",
"style": {
"navigationBarTitleText": "我的",
"enablePullDownRefresh": false
}
},
{
"path": "pages/ServiceSchedule/ServiceSchedule",
"style": {
"navigationBarTitleText": "服务时间表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#4ac4ab"
"enablePullDownRefresh": false
}
},
},
{
"path": "pages/homepage/homepage",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "工单"
"navigationBarTitleText": "工单",
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
}
, {
},
{
"path": "pages/taskDetails/taskDetails",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "工单详情"
}
},
{
"path": "pages/Personalinfo/Personalinfo",
"style": {
"navigationBarTitleText": "个人信息",
"enablePullDownRefresh": false
}
}
],
],
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
@ -111,4 +101,4 @@
}
]
}
}
}

View File

@ -2,7 +2,7 @@
<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="">
<view class="top" v-if="tabscurrent==0">
<u-dropdown active-color='#26A888'>
<u-dropdown-item v-model="optionindex" :title="optionname" :options="options"
@ -12,7 +12,7 @@
</view>
<view class="items" v-if="missionlist.length>0">
<view class="item" v-for="(item,index) in missionlist" @click.stop='gotaskDetails(item)'>
<view class="title">
<view class="title" :style="tabscurrent==1?'border:none':''">
<view class="text">
专家咨询{{item.patientName}}
</view>
@ -26,14 +26,44 @@
</span>
</view>
</view>
<view class="time">
<view class="time" v-if="tabscurrent!=1">
预约时间:
<span>{{item.appointmentDate}}{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span>
</view>
<view class="time" style="line-height: 40rpx;">
<view class="time" style="line-height: 40rpx;" v-if="tabscurrent!=1">
问题简述:
<span>{{item.problemDescription}}</span>
</view>
<view class="tabscurrent" v-if="tabscurrent ==1">
<view class="time">
姓名:
<span>{{item.patientName}}</span>
</view>
<view class="time">
性别:
<span>{{item.sex}}</span>
</view>
<view class="time">
身份证号:
<span>{{item.cardNo}}</span>
</view>
<view class="time">
手机号码:
<span>{{item.phone}}</span>
</view>
<view class="time">
家庭住址:
<span>{{item.address}}</span>
</view>
<view class="time">
预约时间:
<span>{{item.appointmentDate}}{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span>
</view>
<view class="time" style="line-height: 40rpx;">
问题简述:
<span>{{item.problemDescription}}</span>
</view>
</view>
<view class="address" @click.stop='goMap(item)'>
<view class="text">
{{item.serviceAddress}}
@ -85,39 +115,27 @@
</view>
</view>
</u-popup>
</view> -->
<view class="">
</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="query.label">
<input type="text" name="" id="" class="input" placeholder="搜索" v-model="formdata.name">
</view>
<view class="lists">
<view class="item">
<image src="../../static/homepages.png" mode=""></image>
<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">
1
</view>
</view>
<view class="item">
<image src="../../static/homepages.png" mode=""></image>
<view class="name">
心如止水
</view>
<view class="text">
大夫我女儿吃了药后有点发烧怎么回事,您给看点好看说不定倒是波动的的的的
</view>
<view class="count">
1
<view class="count" v-if="item.messageCount>0">
{{item.messageCount}}
</view>
</view>
</view>
</view>
</view> -->
<u-toast ref="uToast" />
</view>
</template>
@ -129,31 +147,34 @@
closeHealthConsultationOrder,
consultationInfolist
} from '@/api/homepage/index.js'
import {
getSex
} from '@/utils/conversion.js'
export default {
data() {
return {
tabslist: [{
name: '全部',
name: '全部工单',
value: '',
}, {
name: '未解决',
name: '我的工单',
value: 'RECEIVED_GOODS',
}, {
name: '已解决',
name: '已完成工单',
value: 'COMPLETED',
}],
// {
// name: '',
// name: '',
// value: '',
// }, {
// name: '',
// value: 'RECEIVED_GOODS',
// name: '',
// value: '1',
// }, {
// name: '',
// value: 'COMPLETED',
// name: '',
// value: '2',
// }
tabscurrent: 0,
optionindex: 1,
optionindex: 0,
optionname: '全部',
options: [{
label: '全部',
@ -179,12 +200,27 @@
missiontotal: 0,
taskReturnshow: false,
remark: '',
formdata: {
pageNum: 1,
pageSize: 10,
doctorId: 1,
consultationType: 'IMAGE_TEXT_CONSULTATION',
status: '',
},
listinfo: [],
listtotal: 0,
}
},
onShow() {
// this.info();
this.info();
},
methods: {
//
goseekadvicefrom(item) {
uni.navigateTo({
url: `/pages/seekadvicefrom/seekadvicefrom?item=${JSON.stringify(item)}`
})
},
//
gotaskDetails(item) {
uni.navigateTo({
@ -249,9 +285,16 @@
info() {
this.query.pageNum = 1
getList(this.query).then(res => {
res.rows.forEach(e => {
e.sex = getSex(e.cardNo)
})
this.missionlist = res.rows
this.missiontotal = res.total
})
consultationInfolist(this.formdata).then(res => {
this.listinfo = res.rows
this.listtotal = res.rows
})
},
tabschange(index) {
console.log(index)
@ -263,6 +306,7 @@
}
this.query.orderStatus = this.tabslist[index].value
this.optionname = '全部'
this.optionindex = 0
this.info();
},
dropitemchange(e) {
@ -277,6 +321,7 @@
getList(this.query).then(
res => {
res.rows.forEach(e => {
e.sex = getSex(e.cardNo)
this.missionlist.push(e)
})
})
@ -452,6 +497,14 @@
font-size: 30rpx;
padding-bottom: 60rpx;
.tabscurrent {
width: 100%;
padding: 30rpx;
margin: 0 auto;
background: #F7F9F8;
border-radius: 14rpx;
}
.btns {
margin-top: 60rpx;
display: flex;
@ -616,4 +669,4 @@
::v-deep .u-cell-box {}
}
}
</style>
</style>

View File

@ -11,12 +11,12 @@
<view style="height: 85vh; padding-top: 200rpx;" @tap='touchend'>
<view class="snedItem" v-for="(item, index) in newsList" :key="index">
<view class="ifSend" v-if="item.senderName == userName">
<view class="sendBox" v-if="item.messageType=='1'">{{item.content}}</view>
<image v-if="item.messageType=='2'" :src="baseurl+item.content" class="snedItemimage" />
<image class="head" src="@/static/headsculpture.png"></image>
<view class="sendBox" v-if="item.messageType==1">{{item.content}}</view>
<image v-if="item.messageType==2" :src="baseurl+item.content" class="snedItemimage" />
<image class="head" src="@/static/docHead.png"></image>
</view>
<view class="doctorSend" v-else>
<image class="head" src="@/static/docHead.png"></image>
<image class="head" src="@/static/headsculpture.png"></image>
<view class="">
<text>{{item.senderName}}</text>
<view class="sendBox" v-if="item.content">{{item.content}}</view>
@ -24,7 +24,7 @@
</view>
<video v-if="item.video" :src="item.video"></video>
</view>
<!-- <view class="placeholder" id="placeholder" v-if="showFunBtn"></view> -->
<view class="placeholder" id="placeholder" ></view>
</view>
</scroll-view>
@ -87,7 +87,7 @@
return {
baseurl: '',
title: '',
SOCKETURL: 'ws://8.131.93.145:54088/webSocket/',
SOCKETURL: 'ws://192.168.16.212:8088/webSocket/',
socketOpen: false,
sendInfo: {},
currentItem: '',
@ -154,9 +154,9 @@
this.baseurl = baseurl;
// uni.closeSocket()
this.currentItem = JSON.parse(options.item)
this.title = this.currentItem.doctorName //
this.userName = this.currentItem.patientName
this.SOCKETURL = this.SOCKETURL + this.currentItem.patientId
this.title = this.currentItem.patientName //
this.userName = this.currentItem.doctorName
this.SOCKETURL = this.SOCKETURL + this.currentItem.doctorId
this.getPageHistory()
this.scoket()
},
@ -192,7 +192,7 @@
Read() {
let markReadData = {
consultationId: this.currentItem.id,
recipientId: this.currentItem.doctorId,
recipientId: this.currentItem.patientId,
}
markRead(markReadData)
},
@ -234,16 +234,17 @@
if (this.socketOpen == false) {
return
}
this.newsList.push({
senderName: this.userName,
content: this.formData.content
that.newsList.push({
senderName: that.currentItem.doctorName,
content: that.formData.content,
messageType: 1,
})
let obj = {
consultationId: that.currentItem.id,
senderId: that.currentItem.patientId,
senderName: that.currentItem.patientName,
recipientId: that.currentItem.doctorId,
recipientName: that.currentItem.doctorName,
recipientId: that.currentItem.patientId,
recipientName: that.currentItem.patientName,
senderId: that.currentItem.doctorId,
senderName: that.currentItem.doctorName,
messageType: 1,
sendTime: new Date(),
content: this.formData.content
@ -382,7 +383,8 @@
res.tempFilePaths.forEach(e => {
that.newsList.push({
imgurl: e,
senderName: that.userName,
messageType: 2,
senderName: that.currentItem.doctorName,
})
uni.uploadFile({
url: baseurl +
@ -395,10 +397,10 @@
var fileurls = JSON.parse(resp.data)
let obj = {
consultationId: that.currentItem.id,
senderId: that.currentItem.patientId,
senderName: that.currentItem.patientName,
recipientId: that.currentItem.doctorId,
recipientName: that.currentItem.doctorName,
recipientId: that.currentItem.patientId,
recipientName: that.currentItem.patientName,
senderId: that.currentItem.doctorId,
senderName: that.currentItem.doctorName,
messageType: 2,
sendTime: new Date(),
content: fileurls.fileUrl
@ -462,7 +464,8 @@
console.log("webScoket监听收到的信息", res);
that.newsList.push({
senderName: that.currentItem.patientName,
content: JSON.parse(res.data).message
content: JSON.parse(res.data).message,
messageType: JSON.parse(res.data).message
})
that.Read()
})
@ -752,4 +755,4 @@
bottom: 38rpx;
}
}
</style>
</style>