This commit is contained in:
2023-10-09 15:19:17 +08:00
parent 190bdc1370
commit 07e186c794
9 changed files with 256 additions and 24 deletions

View File

@ -0,0 +1,10 @@
import request from "@/api/request.js"
// 新增问诊
export function consultationInfo(data) {
return request({
url: `/nurseApplet/consultationInfo`,
method: 'post',
data: data
})
}

View File

@ -0,0 +1,10 @@
import request from "@/api/request.js"
// 聊天记录
export function consultationInfolist(data) {
return request({
url: `/nurseApplet/consultationInfo/list`,
method: 'get',
data: data
})
}

View File

@ -0,0 +1,29 @@
import request from "@/api/request.js"
// 发送即使消息
export function sendMessage(data) {
return request({
url: `/jn/fm/message/send`,
method: 'post',
data: data
})
}
// 查询聊天记录
export function getChatHistory(data) {
return request({
url: `/jn/fm/message/getChatList`,
method: 'get',
data: data
})
}
// 标记为已读
export function markRead(data) {
return request({
url: `/jn/fm/message/markRead`,
method: 'get',
data: data
})
}

View File

@ -95,7 +95,8 @@
"path": "imagetextConsultation/imagetextConsultation", "path": "imagetextConsultation/imagetextConsultation",
"style": { "style": {
"navigationBarTitleText": "图文问诊", "navigationBarTitleText": "图文问诊",
"enablePullDownRefresh": false "onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
} }
}, { }, {
"path": "createnewconsultation/createnewconsultation", "path": "createnewconsultation/createnewconsultation",

View File

@ -11,27 +11,33 @@
<view class="text"> <view class="text">
现住址所在区 现住址所在区
</view> </view>
<view class="input"> <view class="input" @tap='showPicker'>
<input class="uinput" placeholder="请选择所属地区" type="text" placeholder-class="phsy" /> <view class="inputtext"
:style="address=='请选择所属地区'?'font-size:22rpx;font-weight: 400;color: #8E8E8E !important;':''">
{{address}}
</view>
<image src="../../static/huijiantou.png" mode=""></image> <image src="../../static/huijiantou.png" mode=""></image>
</view> </view>
<view class="text"> <view class="text">
患者姓名 患者姓名
</view> </view>
<view class="input"> <view class="input">
<input class="uinput noimageuinput" placeholder="请输入患者姓名" type="text" placeholder-class="phsy" /> <input v-model="formdata.patientName" class="uinput noimageuinput" placeholder="请输入患者姓名" type="text"
placeholder-class="phsy" />
</view> </view>
<view class="text"> <view class="text">
患者身份证号 患者身份证号
</view> </view>
<view class="input"> <view class="input">
<input class="uinput noimageuinput" placeholder="请输入患者身份证号" type="text" placeholder-class="phsy" /> <input v-model="formdata.cardNo" class="uinput noimageuinput" placeholder="请输入患者身份证号" type="text"
placeholder-class="phsy" />
</view> </view>
<view class="text"> <view class="text">
患者联系电话 患者联系电话
</view> </view>
<view class="input"> <view class="input">
<input class="uinput noimageuinput" placeholder="请输入患者联系电话" type="text" placeholder-class="phsy" /> <input v-model="formdata.phone" class="uinput noimageuinput" placeholder="请输入患者联系电话" type="text"
placeholder-class="phsy" />
</view> </view>
</view> </view>
<view class="title"> <view class="title">
@ -46,25 +52,29 @@
问题简述 问题简述
</view> </view>
<view class="input"> <view class="input">
<input class="uinput noimageuinput" placeholder="不多于五个字" type="text" placeholder-class="phsy" /> <input v-model="formdata.problemDescription" class="uinput noimageuinput" placeholder="不多于五个字"
type="text" placeholder-class="phsy" />
</view> </view>
<view class="text"> <view class="text">
患者个体情况说明 患者个体情况说明
</view> </view>
<view class="input" style="height: 200rpx;overflow-Y: scroll;"> <view class="input" style="height: 200rpx;overflow-Y: scroll;">
<u-input class="uinput noimageuinput" placeholder=" " type="textarea" :maxlength="100" /> <u-input v-model="formdata.situationDescription" class="uinput noimageuinput" placeholder=" "
type="textarea" :maxlength="100" />
</view> </view>
<view class="text"> <view class="text">
问题描述 问题描述
</view> </view>
<view class="input" style="height: 200rpx;overflow-Y: scroll;"> <view class="input" style="height: 200rpx;overflow-Y: scroll;">
<u-input class="uinput noimageuinput" placeholder=" " type="textarea" :maxlength="500" /> <u-input v-model="formdata.problemStatement" class="uinput noimageuinput" placeholder=" "
type="textarea" :maxlength="500" />
</view> </view>
<view class="text"> <view class="text">
既往疾病史 既往疾病史
</view> </view>
<view class="input" style="height: 200rpx;overflow-Y: scroll;"> <view class="input" style="height: 200rpx;overflow-Y: scroll;">
<u-input class="uinput noimageuinput" placeholder=" " type="textarea" :maxlength="100" /> <u-input v-model="formdata.medicalRecord" class="uinput noimageuinput" placeholder=" " type="textarea"
:maxlength="100" />
</view> </view>
</view> </view>
<view class="title"> <view class="title">
@ -78,24 +88,140 @@
<view class="text"> <view class="text">
附件材料上传 附件材料上传
</view> </view>
<u-upload ref="uUpload" :max-count='9' :action="uoloadaction" :auto-upload="false" upload-text=' '
@on-choose-complete='onchoosecomplete' @on-success='onsuccess' @on-uploaded='onuploaded'></u-upload>
<view class="textarea">
<view class="">
最多支持9个文件
</view>
<view class="">
单个文件大小不允许超过10MB
</view>
<view class="">
只支持上传照片图片视频文件后缀类型为JPG.PNG.MP4
</view>
</view>
</view> </view>
<view class="btns"> <view class="btns">
<view class="btnleft"> <view class="btnleft">
返回 返回
</view> </view>
<view class="btnright"> <view class="btnright" @tap='updata'>
保存 保存
</view> </view>
</view> </view>
<view class="">
<m-city style='z-index: 10076;' :provinceData="list" headTitle="请选择所属地区" ref="cityPicker"
@funcValue="getpickerParentValue" pickerSize="4">
</m-city>
</view>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
import {
getSubordinateRegions,
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
import gkcity from "../../components/m-city/m-city.vue";
import baseurl from '@/api/baseurl.js'
import {
consultationInfo
} from '@/api/pagesB/createnewconsultation/createnewconsultation.js'
export default { export default {
components: {
"m-city": gkcity
},
data() { data() {
return { return {
//
uoloadaction: '',
list: [],
addresslength: null,
imglistlength: null,
address: '请选择所属地区', //
formdata: {
address: '请选择所属地区', //
patientId: 1,
patientName: '李广君',
cardNo: '370882199909092123',
phone: '17615455437',
address: '',
doctorId: 1,
doctorName: '李医生',
consultationType: 'IMAGE_TEXT_CONSULTATION',
problemDescription: '',
situationDescription: '',
problemStatement: '',
medicalRecord: '',
fileUrls: []
}
}; };
},
onLoad(options) {
this.uoloadaction = baseurl + '/nurseApplet/consultationInfo/uploadConsultationFile'
},
onShow() {
this.areaInfo();
},
methods: {
updata() {
if (this.imglistlength > 0) {
this.$refs.uUpload.upload()
} else {
this.info();
}
},
onchoosecomplete(lists, name) {
this.imglistlength = lists.length
},
onsuccess(data, index, lists, name) {
if (data.code == 200) {
this.formdata.fileUrls.push(data.fileUrl)
}
},
onuploaded() {
this.info();
},
info() {
consultationInfo(this.formdata).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '新建图文问诊成功',
type: 'success',
duration: '1500',
back: 1
})
}
})
},
//
showPicker() {
this.$refs.cityPicker.show();
},
//
areaInfo() {
getSubordinateRegions().then(res => {
this.list = res.data;
})
},
//
getpickerParentValue(e) {
e = e.filter(ele => ele.localName != '暂不选择')
e = e.filter(ele => ele.localName != '暂无需选择')
this.addresslength = e
this.formdata.address = ''
this.address = ''
if (e && e.length >= 1) {
e.forEach(el => {
this.formdata.address = this.formdata.address + el.localName
this.address = this.address + el.localName
})
} else {
this.formdata.address = ''
this.address = '请选择所属地区'
}
},
} }
} }
</script> </script>
@ -147,6 +273,14 @@
border-radius: 5rpx; border-radius: 5rpx;
padding-bottom: 50rpx; padding-bottom: 50rpx;
.textarea {
font-size: 18rpx;
font-weight: 400;
color: #8E8E8E;
line-height: 42rpx;
padding: 30rpx 0 0 40rpx;
}
.text { .text {
font-size: 30rpx; font-size: 30rpx;
font-weight: 400; font-weight: 400;
@ -154,6 +288,10 @@
padding: 30rpx 0 0 40rpx; padding: 30rpx 0 0 40rpx;
} }
::v-deep .u-upload {
padding: 30rpx 30rpx 0 30rpx;
}
.input { .input {
width: 90%; width: 90%;
height: 80rpx; height: 80rpx;
@ -186,6 +324,15 @@
color: #8E8E8E !important; color: #8E8E8E !important;
} }
.inputtext {
padding-left: 12rpx;
color: black;
font-size: 26rpx;
width: 90%;
height: 80rpx;
line-height: 80rpx;
}
.uinput { .uinput {
color: black; color: black;
font-size: 26rpx; font-size: 26rpx;

View File

@ -3,12 +3,12 @@
<image src="../../static/pagesB/xinjianwenzhen.png" mode="" @tap='gocreatenewconsultation'></image> <image src="../../static/pagesB/xinjianwenzhen.png" mode="" @tap='gocreatenewconsultation'></image>
<view class="title"> <view class="title">
<view class="text" v-for='(item,index) in titlelist' :key='index' <view class="text" v-for='(item,index) in titlelist' :key='index'
:class="titletext==item.text?'Selectedtext':''" @tap='selecttitltext(item)'> :class="formdata.status==item.status?'Selectedtext':''" @tap='selecttitltext(item)'>
{{item.text}} {{item.text}}
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="item"> <view class="item" v-for='item in listinfo' :key="item.id">
<view class="time"> <view class="time">
2023-12-12 12:12 2023-12-12 12:12
</view> </view>
@ -27,32 +27,48 @@
<script> <script>
import { import {
consultationInfolist consultationInfolist
} from '@/api/pagesB/imagetextConsultation.js' } from '@/api/pagesB/imagetextConsultation/imagetextConsultation.js'
export default { export default {
data() { data() {
return { return {
titletext: '本周全部',
titlelist: [{ titlelist: [{
text: '本周全部', text: '本周全部',
status: ''
}, },
{ {
text: '已解答', text: '已解答',
status: 2
}, },
{ {
text: '未解答', text: '未解答',
status: 1
}, },
], ],
formdata: {
pageNum: 1,
pageSize: 10,
patientId: 1,
consultationType: 'IMAGE_TEXT_CONSULTATION',
status: '',
},
listtotal: 0,
listinfo: [],
}; };
}, },
onShow(){ onShow() {
consultationInfolist().then(res=>{ this.info();
console.log(res)
})
}, },
methods: { methods: {
// //
selecttitltext(item) { selecttitltext(item) {
this.titletext = item.text this.formdata.status = item.status
this.info();
},
info() {
consultationInfolist(this.formdata).then(res => {
this.listinfo = res.rows
this.listtotal = res.rows
})
}, },
// //
gocreatenewconsultation() { gocreatenewconsultation() {
@ -60,7 +76,26 @@
url: "/pagesB/createnewconsultation/createnewconsultation" url: "/pagesB/createnewconsultation/createnewconsultation"
}) })
}, },
} },
onReachBottom() { //
if (this.listinfo.length >= this.listtotal) {} else {
this.formdata.pageNum++;
consultationInfolist(this.formdata).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.listinfo.push(e)
})
}
})
}
},
onPullDownRefresh() { //
this.formdata.pageNum = 1;
this.info();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
} }
</script> </script>

View File

@ -397,4 +397,4 @@
</script> </script>
<style lang="scss"> <style lang="scss">
@import './information.scss'; @import './information.scss';
</style> </style>

View File

@ -76,7 +76,7 @@
sendMessage, sendMessage,
getChatHistory, getChatHistory,
markRead markRead
} from '@/api/pagesC/seekadvicefrom.js'; } from '@/api/pagesC/seekadvicefrom/seekadvicefrom.js';
export default { export default {
data() { data() {
return { return {