From 5ae09f4407e5f64807bb0eb80e067b10e13c6fed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com>
Date: Wed, 25 Oct 2023 11:10:26 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 124 +++++++++++------------
pages/homepage/homepage.vue | 129 +++++++++++++++++-------
pages/seekadvicefrom/seekadvicefrom.vue | 51 +++++-----
3 files changed, 175 insertions(+), 129 deletions(-)
diff --git a/pages.json b/pages.json
index 925fd37..edb4983 100644
--- a/pages.json
+++ b/pages.json
@@ -3,87 +3,77 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://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 @@
}
]
}
-}
+}
\ No newline at end of file
diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue
index 061c6ff..d88d85b 100644
--- a/pages/homepage/homepage.vue
+++ b/pages/homepage/homepage.vue
@@ -2,7 +2,7 @@
-
-
+
+
@@ -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 {}
}
}
-
\ No newline at end of file
+
diff --git a/pages/seekadvicefrom/seekadvicefrom.vue b/pages/seekadvicefrom/seekadvicefrom.vue
index c351dc7..b4d9982 100644
--- a/pages/seekadvicefrom/seekadvicefrom.vue
+++ b/pages/seekadvicefrom/seekadvicefrom.vue
@@ -11,12 +11,12 @@
- {{item.content}}
-
-
+ {{item.content}}
+
+
-
+
{{item.senderName}}
{{item.content}}
@@ -24,7 +24,7 @@
-
+
@@ -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;
}
}
-
\ No newline at end of file
+