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

@ -6,83 +6,73 @@
{ {
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{ }, {
"path" : "pages/taskReturn/taskReturn", "path": "pages/taskReturn/taskReturn",
"style" : "style": {
{
"navigationBarTitleText": "退回原因", "navigationBarTitleText": "退回原因",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path" : "pages/Completedwork/Completedwork", "path": "pages/Completedwork/Completedwork",
"style" : "style": {
{
"navigationBarTitleText": "已完成工单", "navigationBarTitleText": "已完成工单",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path" : "pages/Changepassword/Changepassword", "path": "pages/Changepassword/Changepassword",
"style" : "style": {
{
"navigationBarTitleText": "修改密码", "navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path" : "pages/Modifyphonenumber/Modifyphonenumber", "path": "pages/Modifyphonenumber/Modifyphonenumber",
"style" : "style": {
{
"navigationBarTitleText": "修改手机号", "navigationBarTitleText": "修改手机号",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/myinformation/myinformation", "path": "pages/myinformation/myinformation",
"style": { "style": {
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/ServiceSchedule/ServiceSchedule", "path": "pages/ServiceSchedule/ServiceSchedule",
"style": { "style": {
"navigationBarTitleText": "服务时间表", "navigationBarTitleText": "服务时间表",
"enablePullDownRefresh": false, "enablePullDownRefresh": false
"navigationBarBackgroundColor": "#4ac4ab"
} }
}, },
{ {
"path": "pages/homepage/homepage", "path": "pages/homepage/homepage",
"style": {
"navigationBarTitleText": "工单",
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
"enablePullDownRefresh": true //设置参数为true
}
},
{
"path": "pages/taskDetails/taskDetails",
"style": { "style": {
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTitleText": "工单" "navigationBarTitleText": "工单详情"
} }
} },
, { {
"path": "pages/Personalinfo/Personalinfo", "path": "pages/Personalinfo/Personalinfo",
"style": { "style": {
"navigationBarTitleText": "个人信息", "navigationBarTitleText": "个人信息",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",

View File

@ -2,7 +2,7 @@
<view class="app"> <view class="app">
<u-tabs :list="tabslist" :is-scroll="false" :current="tabscurrent" @change="tabschange" inactive-color='#fff' <u-tabs :list="tabslist" :is-scroll="false" :current="tabscurrent" @change="tabschange" inactive-color='#fff'
active-color='#fff'></u-tabs> active-color='#fff'></u-tabs>
<!-- <view class=""> <view class="">
<view class="top" v-if="tabscurrent==0"> <view class="top" v-if="tabscurrent==0">
<u-dropdown active-color='#26A888'> <u-dropdown active-color='#26A888'>
<u-dropdown-item v-model="optionindex" :title="optionname" :options="options" <u-dropdown-item v-model="optionindex" :title="optionname" :options="options"
@ -12,7 +12,7 @@
</view> </view>
<view class="items" v-if="missionlist.length>0"> <view class="items" v-if="missionlist.length>0">
<view class="item" v-for="(item,index) in missionlist" @click.stop='gotaskDetails(item)'> <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"> <view class="text">
专家咨询({{item.patientName}}) 专家咨询({{item.patientName}})
</view> </view>
@ -26,6 +26,35 @@
</span> </span>
</view> </view>
</view> </view>
<view class="time" v-if="tabscurrent!=1">
预约时间:
<span>{{item.appointmentDate}}{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span>
</view>
<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"> <view class="time">
预约时间: 预约时间:
<span>{{item.appointmentDate}}{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span> <span>{{item.appointmentDate}}{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span>
@ -34,6 +63,7 @@
问题简述: 问题简述:
<span>{{item.problemDescription}}</span> <span>{{item.problemDescription}}</span>
</view> </view>
</view>
<view class="address" @click.stop='goMap(item)'> <view class="address" @click.stop='goMap(item)'>
<view class="text"> <view class="text">
{{item.serviceAddress}} {{item.serviceAddress}}
@ -85,39 +115,27 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
</view> --> </view>
<view class=""> <!-- <view class="">
<view class="inputs" style="width: 90%;height: 60rpx;transform: none;margin: 20rpx auto;"> <view class="inputs" style="width: 90%;height: 60rpx;transform: none;margin: 20rpx auto;">
<i class="icon"></i> <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>
<view class="lists"> <view class="lists" v-if="listinfo">
<view class="item"> <view class="item" v-for="item in listinfo" @tap='goseekadvicefrom(item)'>
<image src="../../static/homepages.png" mode=""></image> <image src="../../static/headsculpture.png" mode=""></image>
<view class="name"> <view class="name">
心如止水 {{item.patientName}}
</view> </view>
<view class="text"> <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> </view>
<view class="count" v-if="item.messageCount>0">
{{item.messageCount}}
</view> </view>
</view> </view>
</view> </view>
</view> -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -129,31 +147,34 @@
closeHealthConsultationOrder, closeHealthConsultationOrder,
consultationInfolist consultationInfolist
} from '@/api/homepage/index.js' } from '@/api/homepage/index.js'
import {
getSex
} from '@/utils/conversion.js'
export default { export default {
data() { data() {
return { return {
tabslist: [{ tabslist: [{
name: '全部', name: '全部工单',
value: '', value: '',
}, { }, {
name: '未解决', name: '我的工单',
value: 'RECEIVED_GOODS', value: 'RECEIVED_GOODS',
}, { }, {
name: '已解决', name: '已完成工单',
value: 'COMPLETED', value: 'COMPLETED',
}], }],
// { // {
// name: '全部工单', // name: '全部',
// value: '', // value: '',
// }, { // }, {
// name: '我的工单', // name: '未解决',
// value: 'RECEIVED_GOODS', // value: '1',
// }, { // }, {
// name: '已完成工单', // name: '已解决',
// value: 'COMPLETED', // value: '2',
// } // }
tabscurrent: 0, tabscurrent: 0,
optionindex: 1, optionindex: 0,
optionname: '全部', optionname: '全部',
options: [{ options: [{
label: '全部', label: '全部',
@ -179,12 +200,27 @@
missiontotal: 0, missiontotal: 0,
taskReturnshow: false, taskReturnshow: false,
remark: '', remark: '',
formdata: {
pageNum: 1,
pageSize: 10,
doctorId: 1,
consultationType: 'IMAGE_TEXT_CONSULTATION',
status: '',
},
listinfo: [],
listtotal: 0,
} }
}, },
onShow() { onShow() {
// this.info(); this.info();
}, },
methods: { methods: {
//前往聊天
goseekadvicefrom(item) {
uni.navigateTo({
url: `/pages/seekadvicefrom/seekadvicefrom?item=${JSON.stringify(item)}`
})
},
//详情 //详情
gotaskDetails(item) { gotaskDetails(item) {
uni.navigateTo({ uni.navigateTo({
@ -249,9 +285,16 @@
info() { info() {
this.query.pageNum = 1 this.query.pageNum = 1
getList(this.query).then(res => { getList(this.query).then(res => {
res.rows.forEach(e => {
e.sex = getSex(e.cardNo)
})
this.missionlist = res.rows this.missionlist = res.rows
this.missiontotal = res.total this.missiontotal = res.total
}) })
consultationInfolist(this.formdata).then(res => {
this.listinfo = res.rows
this.listtotal = res.rows
})
}, },
tabschange(index) { tabschange(index) {
console.log(index) console.log(index)
@ -263,6 +306,7 @@
} }
this.query.orderStatus = this.tabslist[index].value this.query.orderStatus = this.tabslist[index].value
this.optionname = '全部' this.optionname = '全部'
this.optionindex = 0
this.info(); this.info();
}, },
dropitemchange(e) { dropitemchange(e) {
@ -277,6 +321,7 @@
getList(this.query).then( getList(this.query).then(
res => { res => {
res.rows.forEach(e => { res.rows.forEach(e => {
e.sex = getSex(e.cardNo)
this.missionlist.push(e) this.missionlist.push(e)
}) })
}) })
@ -452,6 +497,14 @@
font-size: 30rpx; font-size: 30rpx;
padding-bottom: 60rpx; padding-bottom: 60rpx;
.tabscurrent {
width: 100%;
padding: 30rpx;
margin: 0 auto;
background: #F7F9F8;
border-radius: 14rpx;
}
.btns { .btns {
margin-top: 60rpx; margin-top: 60rpx;
display: flex; display: flex;

View File

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