修改
This commit is contained in:
parent
35e3402db6
commit
e8f7eac178
@ -53,15 +53,6 @@
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/quanyi/quanyi",
|
||||
"style": {
|
||||
// "navigationBarTitleText": "消息列表",
|
||||
// "navigationStyle": "custom",
|
||||
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/taskDetails/taskDetails",
|
||||
"style": {
|
||||
|
||||
@ -1,116 +1,32 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<!-- 泉医到家 -->
|
||||
<view class="" v-if="status==2">
|
||||
<!-- <uni-nav-bar title="工单" background-color="#18CBB3" color="white"></uni-nav-bar> -->
|
||||
<!-- 家医 -->
|
||||
<view class="" v-if="status==1">
|
||||
<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"
|
||||
@change='dropitemchange'></u-dropdown-item>
|
||||
</u-dropdown>
|
||||
<view class="inputs"></view>
|
||||
<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="items" v-if="missionlist.length>0">
|
||||
<view class="item" v-for="(item,index) in missionlist" @click.stop='gotaskDetails(item)'>
|
||||
<view class="title" :style="tabscurrent==1?'border:none':''">
|
||||
<view class="text">
|
||||
专家咨询({{item.patientName}})
|
||||
</view>
|
||||
<view class="image">
|
||||
<image src="../../static/jinbi.png" mode=""></image>
|
||||
<span v-if="item.orderCommissionAmount&&item.orderCommissionAmount>=0">
|
||||
+ {{item.orderCommissionAmount}}
|
||||
</span>
|
||||
<span v-else>
|
||||
+ 0
|
||||
</span>
|
||||
</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="time" v-if="tabscurrent!=1">
|
||||
预约时间:
|
||||
<span>{{item.appointmentDate}}
|
||||
</span>
|
||||
<span
|
||||
v-if="item.appointmentStartTime && item.appointmentEndTime ">{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span>
|
||||
</span>
|
||||
<view class="text">
|
||||
{{Number(item.messageType)==2?'[图片]':item.content}}
|
||||
</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">
|
||||
预约时间:
|
||||
<span>{{item.appointmentDate}}{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span>
|
||||
</view>
|
||||
<view class="time" style="line-height: 40rpx;">
|
||||
问题简述:
|
||||
<span>{{item.problemDescription}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<view class="text" v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
|
||||
待接单
|
||||
</view>
|
||||
<view class="text" v-if="item.orderStatus=='RECEIVED_GOODS'">
|
||||
待服务
|
||||
</view>
|
||||
<view class="text" v-if="item.orderStatus=='COMPLETED'" style="color: #9D9D9D;">
|
||||
已完成
|
||||
</view>
|
||||
<view class="btnreturn" @click.stop='gotaskReturn(item)'
|
||||
v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
|
||||
退回
|
||||
</view>
|
||||
<view class="btnaccept" @click.stop='Receivingorders(item)'
|
||||
v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
|
||||
接单
|
||||
</view>
|
||||
<view class="btnreturn" @click.stop='goconfirmCompletion(item)'
|
||||
style="background-color:#18CBB3;color: #fff;" v-if="item.orderStatus=='RECEIVED_GOODS'">
|
||||
完成
|
||||
</view>
|
||||
<view class="btnaccept" @click.stop='govideo(item)' v-if="item.orderStatus=='RECEIVED_GOODS'">
|
||||
视频通话
|
||||
</view>
|
||||
<view class="count" v-if="item.messageCount>0">
|
||||
{{item.messageCount}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="" style="margin-top: 100rpx;">
|
||||
<u-empty text="暂无工单" mode="list" icon-size='240' font-size='32'></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 家医 -->
|
||||
<view class="" v-if="status==1">
|
||||
<protocol :Refresh="Refresh" :down="down">
|
||||
<view class="" v-if="status==2">
|
||||
<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>
|
||||
</template>
|
||||
@ -127,7 +43,8 @@
|
||||
import {
|
||||
getSex
|
||||
} from '@/utils/conversion.js'
|
||||
import protocol from '../quanyi/quanyi.vue'
|
||||
import protocol from '@/pages/workorder/workorder.vue'
|
||||
import socketurl from '@/api/socketurl.js'
|
||||
export default {
|
||||
components: {
|
||||
protocol,
|
||||
@ -135,46 +52,26 @@
|
||||
data() {
|
||||
return {
|
||||
Refresh: 1,
|
||||
down: 2,
|
||||
down: 1,
|
||||
tabslist: [{
|
||||
name: '全部工单',
|
||||
name: '全部',
|
||||
value: '',
|
||||
}, {
|
||||
name: '我的工单',
|
||||
value: 'RECEIVED_GOODS',
|
||||
name: '已解决',
|
||||
value: '2',
|
||||
}, {
|
||||
name: '已完成工单',
|
||||
value: 'COMPLETED',
|
||||
name: '未解决',
|
||||
value: '1',
|
||||
}],
|
||||
tabscurrent: 0,
|
||||
optionindex: 0,
|
||||
optionname: '全部',
|
||||
options: [{
|
||||
label: '全部',
|
||||
value: '',
|
||||
}, {
|
||||
label: '待接单',
|
||||
value: 'WAIT_RECEIVED_GOODS',
|
||||
}, {
|
||||
label: '待服务',
|
||||
value: 'RECEIVED_GOODS',
|
||||
}, {
|
||||
label: '已完成',
|
||||
value: 'COMPLETED',
|
||||
}],
|
||||
query: {
|
||||
hospitalPersonId: uni.getStorageSync("id"),
|
||||
orderStatus: '',
|
||||
orderType: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
missionlist: [],
|
||||
missiontotal: 0,
|
||||
remark: '',
|
||||
formdata: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 1000,
|
||||
doctorId: uni.getStorageSync("id"),
|
||||
consultationType: 'IMAGE_TEXT_CONSULTATION',
|
||||
status: '',
|
||||
@ -182,6 +79,11 @@
|
||||
listinfo: [],
|
||||
listtotal: 0,
|
||||
status: '',
|
||||
SOCKETURL: '',
|
||||
socketOpen: false,
|
||||
timeoutObj: null,
|
||||
status: '',
|
||||
title: '',
|
||||
}
|
||||
},
|
||||
onReady() { //更改导航栏文字
|
||||
@ -189,20 +91,94 @@
|
||||
title: this.title,
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
onLoad() {
|
||||
this.status = uni.getStorageSync("status")
|
||||
if (this.status == 2) {
|
||||
this.title = '工单'
|
||||
this.info();
|
||||
} else {
|
||||
this.title = '消息列表'
|
||||
this.SOCKETURL = socketurl + uni.getStorageSync("id")
|
||||
this.connectSocket();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.down = 1
|
||||
this.Refresh = 1
|
||||
if (this.status == 1) {
|
||||
this.info()
|
||||
this.socket();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
connectSocket() {
|
||||
let that = this
|
||||
console.log(that.SOCKETURL)
|
||||
try {
|
||||
uni.connectSocket({
|
||||
url: that.SOCKETURL
|
||||
})
|
||||
uni.onSocketOpen(res => {
|
||||
console.log('webScoket连接已打开', res);
|
||||
that.socketOpen = true
|
||||
that.reset()
|
||||
})
|
||||
uni.onSocketError(err => {
|
||||
console.log('webScoket连接打开失败', err);
|
||||
if (err && err.code != 1000) {
|
||||
setTimeout(() => {
|
||||
that.socketOpen = true
|
||||
uni.connectSocket({
|
||||
url: that.SOCKETURL
|
||||
})
|
||||
}, 3 * 1000)
|
||||
}
|
||||
})
|
||||
uni.onSocketClose(err => {
|
||||
console.log('webScoket连接关闭', err);
|
||||
if (err && err.code !== 1000) {
|
||||
setTimeout(() => {
|
||||
that.socketOpen = true
|
||||
uni.connectSocket({
|
||||
url: that.SOCKETURL
|
||||
})
|
||||
}, 3 * 1000)
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
socket() {
|
||||
let that = this
|
||||
uni.onSocketMessage(res => {
|
||||
console.log("webScoket监听收到的信息", res);
|
||||
that.info();
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
let that = this
|
||||
clearInterval(that.timeoutObj);
|
||||
that.timeoutObj = setInterval(() => {
|
||||
uni.sendSocketMessage({
|
||||
data: 'ping',
|
||||
success(res) {
|
||||
console.log('正在发送心跳');
|
||||
},
|
||||
fail(err) {
|
||||
console.log('心跳发送失败,重新连接...');
|
||||
that.socketOpen = true
|
||||
uni.connectSocket({
|
||||
url: that.SOCKETURL
|
||||
})
|
||||
}
|
||||
})
|
||||
}, 180000)
|
||||
},
|
||||
//前往聊天
|
||||
goseekadvicefrom(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/seekadvicefrom/seekadvicefrom?item=${JSON.stringify(item)}`
|
||||
// url: '/pages/seekadvicefrom/seekadvicefrom'
|
||||
})
|
||||
},
|
||||
//详情
|
||||
@ -253,83 +229,55 @@
|
||||
},
|
||||
// 视频通话
|
||||
govideo(item) {
|
||||
getUserSig(item.doctorId).then(res => {
|
||||
// 获取roomId
|
||||
consultation(item.goodsOrderId).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/Industrialbutler/video?roomId=${resp.msg}&userId=${item.doctorId}&userName=${item.doctorName}&userSig=${res.data}&remoteUserId=${item.patientId}`
|
||||
})
|
||||
// var urlStr = encodeURI(
|
||||
// `https://msg.xinyilu.cn?userId=${item.doctorId}&userName=${item.doctorName}&userSig=${res.data}&roomId=${resp.msg}`
|
||||
// )
|
||||
// console.log(urlStr)
|
||||
// plus.runtime.openURL(urlStr, function(res) {
|
||||
// console.log(res);
|
||||
// });
|
||||
// this.src =
|
||||
// `https://msg.xinyilu.cn?userId=${this.userId}&userName=${this.userName}&userSig=${res.data}&roomId=${resp.msg}`
|
||||
} else if (resp.code == 500) {
|
||||
this.$refs.uToast.show({
|
||||
title: resp.msg,
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: `/pages/Industrialbutler/Industrialbutler?item=${JSON.stringify(item)}`
|
||||
})
|
||||
},
|
||||
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
|
||||
this.formdata.pageNum = 1
|
||||
consultationInfolist(this.formdata).then(res => {
|
||||
this.listinfo = res.rows
|
||||
this.listtotal = res.total
|
||||
})
|
||||
// consultationInfolist(this.formdata).then(res => {
|
||||
// this.listinfo = res.rows
|
||||
// this.listtotal = res.rows
|
||||
// })
|
||||
},
|
||||
tabschange(index) {
|
||||
this.tabscurrent = index;
|
||||
this.query.orderStatus = this.tabslist[index].value
|
||||
this.optionname = '全部'
|
||||
this.formdata.status = this.tabslist[index].value
|
||||
// this.optionname = '全部'
|
||||
this.optionindex = 0
|
||||
this.info();
|
||||
},
|
||||
dropitemchange(e) {
|
||||
this.optionname = this.options.find(m => m.value === e).label
|
||||
this.query.orderStatus = this.options.find(m => m.value === e).value
|
||||
this.info();
|
||||
},
|
||||
// dropitemchange(e) {
|
||||
// this.optionname = this.options.find(m => m.value === e).label
|
||||
// this.query.orderStatus = this.options.find(m => m.value === e).value
|
||||
// this.info();
|
||||
// },
|
||||
},
|
||||
onReachBottom() { //下滑加载
|
||||
// if(this.status==2){
|
||||
if (this.missionlist.length >= this.missiontotal) {} else {
|
||||
// this.down++
|
||||
this.query.pageNum++
|
||||
getList(this.query).then(
|
||||
res => {
|
||||
if (this.status == 1) {
|
||||
if (this.listinfo.length >= this.listtotal) {} else {
|
||||
this.formdata.pageNum++
|
||||
consultationInfolist(this.formdata).then(res => {
|
||||
res.rows.forEach(e => {
|
||||
e.sex = getSex(e.cardNo)
|
||||
this.missionlist.push(e)
|
||||
this.listinfo.push(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.down++
|
||||
}
|
||||
// }
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
if (this.status == 2) {
|
||||
if (this.status == 1) {
|
||||
this.info();
|
||||
} else {
|
||||
this.Refresh++
|
||||
this.down = 1
|
||||
}
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 1000);
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -346,28 +294,6 @@
|
||||
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user