修改
9
api/pagesC/integration/index.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from "../../request.js"
|
||||
|
||||
// 获取一体化照护方案记录
|
||||
export function getIntegrationList(data) {
|
||||
return request({
|
||||
url: `/nurseApp/chronic/careplan/schema/list?year=${data.year}&identity=${data.identity}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
16
api/pagesC/nurseRecord/index.js
Normal file
@ -0,0 +1,16 @@
|
||||
import request from "@/api/request.js"
|
||||
// 获取照护记录
|
||||
export function getNurseList(data) {
|
||||
return request({
|
||||
url: `/nurseApp/chronic/careplan/per/list?year=${data.year}&identity=${data.identity}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取照护记录详情
|
||||
export function getNurseListDetail(perRecordId) {
|
||||
return request({
|
||||
url: `/nurseApp/chronic/careplan/per/detail/${perRecordId}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
134
components/lauwen-select/lauwenSelect.vue
Normal file
@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="lauwen-select">
|
||||
<view class="lauwen-select-box">
|
||||
<view :style="{padding: padding+'rpx', fontSize:fontSize}" class="lauwen-select-input" @tap="lauwenSelect()">
|
||||
<view class="lauwen-select-input-text" :style="{height: height+'rpx', lineHeight: height+'rpx'}" :data-index="selected_index">{{ options[selected_index] || "全部" }}</view>
|
||||
<view class="lauwen-select-input-icon" :class="is_selecting ? 'lauwen-selecting-icon' : ''">
|
||||
<view class="lauwen-icon"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="lauwen-options" v-show="is_selecting">
|
||||
<view v-for="(item, index) in options"
|
||||
class="lauwen-option"
|
||||
:class="selected_index == index ? 'lauwen-option-active' : ''"
|
||||
:key="index"
|
||||
@tap="lauwenSelected(index)"
|
||||
:style="{height: (height + padding*2)+'rpx', lineHeight: height+'rpx', padding: padding+'rpx', fontSize:fontSize}">{{ item }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "lauwenSelect",
|
||||
props: {
|
||||
defaultIndex: {
|
||||
default: ""
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 45
|
||||
},
|
||||
padding: {
|
||||
type: Number,
|
||||
default: 15
|
||||
},
|
||||
fontSize: {
|
||||
type: String,
|
||||
default: "1rem"
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
is_selecting: false,
|
||||
selected_index: this.defaultIndex
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lauwenSelect() {
|
||||
let _this = this
|
||||
_this.is_selecting = !_this.is_selecting
|
||||
},
|
||||
lauwenSelected(index) {
|
||||
let _this = this
|
||||
|
||||
if (_this.selected_index === index) {
|
||||
_this.selected_index = ""
|
||||
}else{
|
||||
_this.selected_index = index
|
||||
_this.$emit("getValue", index)
|
||||
}
|
||||
|
||||
_this.is_selecting = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.lauwen-select{
|
||||
position: relative;
|
||||
}
|
||||
.lauwen-select-box {
|
||||
width: 100%;
|
||||
}
|
||||
.lauwen-select-input {
|
||||
width: 100%;
|
||||
border: 1px solid #515a6e;
|
||||
border-radius: 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
.lauwen-select-input-text {
|
||||
width: 80%;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.lauwen-select-input-icon {
|
||||
width: 50rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.lauwen-icon {
|
||||
content: " ";
|
||||
display: inline-block;
|
||||
-webkit-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
border-width: 3rpx 3rpx 0 0;
|
||||
border-color: #333;
|
||||
border-style: solid;
|
||||
}
|
||||
.lauwen-selecting-icon {
|
||||
-webkit-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.lauwen-options {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 77rpx;
|
||||
border: 1px solid #c5c8ce;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
.lauwen-option {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.lauwen-option-active {
|
||||
font-weight: 600;
|
||||
background-color: #007bff;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
20
pages.json
@ -452,6 +452,26 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "nurseRecord/nurseRecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "照护记录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "nurseRecordDetail/nurseRecordDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "照护详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "integration/integration",
|
||||
"style": {
|
||||
"navigationBarTitleText": "一体化照护方案",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "Filinginformation/Filinginformation",
|
||||
"style": {
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
.contentcenter {
|
||||
width: 96%;
|
||||
height: 446rpx;
|
||||
height: 630rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 5rpx;
|
||||
@ -62,15 +62,18 @@
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
padding: 38rpx 2% 8rpx 88rpx;
|
||||
padding-top: 40rpx;
|
||||
|
||||
.home {
|
||||
width: 32%;
|
||||
.name{
|
||||
margin: 10rpx 0 0 0;
|
||||
text-align: center;
|
||||
margin: 14rpx 0 0 0;
|
||||
}
|
||||
|
||||
image {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
}
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
家医签约
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="home" @tap="goHealthrecords">
|
||||
<image src="/static/pageC/health.png" mode=""></image>
|
||||
<!-- <view class="home" @tap="goHealthrecords">
|
||||
<image src="@/static/health.png" mode=""></image>
|
||||
<view class="name">
|
||||
健康档案
|
||||
</view>
|
||||
@ -47,11 +47,21 @@
|
||||
服务记录
|
||||
</view>
|
||||
</view>
|
||||
<view class="home">
|
||||
<!-- <image src="/static/pageC/health.png" mode=""></image>
|
||||
<view class="home" @tap='gointegration'>
|
||||
<image src="@/static/zhaohufangan.png" mode=""></image>
|
||||
<view class="name">
|
||||
健康档案
|
||||
</view> -->
|
||||
一体化照护方案
|
||||
</view>
|
||||
</view>
|
||||
<view class="home" @tap='gonurseRecord'>
|
||||
<image src="@/static/zhaohujilu.png" mode=""></image>
|
||||
<view class="name">
|
||||
照护记录
|
||||
</view>
|
||||
</view>
|
||||
<view class="home">
|
||||
</view>
|
||||
<view class="home">
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentbottom">
|
||||
@ -121,6 +131,26 @@
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
},
|
||||
//照护方案
|
||||
gointegration() {
|
||||
if (!this.userinfo) {
|
||||
this.gologin();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/integration/integration'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 照护记录
|
||||
gonurseRecord() {
|
||||
if (!this.userinfo) {
|
||||
this.gologin();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/nurseRecord/nurseRecord'
|
||||
})
|
||||
}
|
||||
},
|
||||
gologin() {
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
|
||||
@ -20,6 +20,9 @@
|
||||
import {
|
||||
createMobileToken
|
||||
} from '@/api/pages/login/index.js'
|
||||
import {
|
||||
mapMutations
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -27,6 +30,7 @@
|
||||
logincode: undefined,
|
||||
timer: undefined,
|
||||
cityCode: null,
|
||||
SOCKETURL: '',
|
||||
// scenenurseStationId: undefined,
|
||||
};
|
||||
},
|
||||
@ -46,6 +50,7 @@
|
||||
// this.scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['scoket']),
|
||||
//获取当前位置
|
||||
getAddress() {
|
||||
let that = this;
|
||||
@ -92,7 +97,6 @@
|
||||
getPhoneNumberp(val) {
|
||||
let that = this;
|
||||
if (val.detail.code) {
|
||||
|
||||
that.phonecode = val.detail.code
|
||||
that.login();
|
||||
}
|
||||
@ -127,7 +131,7 @@
|
||||
}, 1500)
|
||||
} else if (resp.data.code == '2') {
|
||||
that.$refs.uToast.show({
|
||||
title: '已被其他人注册, 不能再登录',
|
||||
title: '已被其他人注册',
|
||||
type: 'error',
|
||||
duration: '1500',
|
||||
})
|
||||
@ -137,6 +141,7 @@
|
||||
if (res.data) {
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
uni.setStorageSync('userinfo', res.data);
|
||||
that.scoket();
|
||||
}
|
||||
that.$refs.uToast.show({
|
||||
title: '登录成功',
|
||||
|
||||
@ -73,6 +73,9 @@
|
||||
import {
|
||||
getMegVoList
|
||||
} from '@/api/pages/message/index.js'
|
||||
import {
|
||||
mapMutations
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -83,9 +86,27 @@
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) {
|
||||
this.scoket();
|
||||
}
|
||||
this.info();
|
||||
if (uni.getStorageSync('patientId')) {
|
||||
this.messagescoket();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['scoket']),
|
||||
messagescoket() {
|
||||
const that = this
|
||||
try {
|
||||
uni.onSocketMessage(res => {
|
||||
that.info();
|
||||
console.log("webScoket监听收到的信息", res);
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
//gonotice
|
||||
gonotice(item, title) {
|
||||
uni.navigateTo({
|
||||
|
||||
@ -265,13 +265,15 @@
|
||||
content: '确认要退出此账号吗',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
// uni.clearStorageSync();、
|
||||
that.removes()
|
||||
that.$refs.uToast.show({
|
||||
title: '退出账号成功',
|
||||
type: 'success',
|
||||
duration: '1000'
|
||||
duration: '2000'
|
||||
})
|
||||
// uni.clearStorageSync();、
|
||||
that.removes()
|
||||
uni.closeSocket();
|
||||
clearInterval(that.$store.state.timeoutObj);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -307,6 +309,8 @@
|
||||
duration: '1000',
|
||||
})
|
||||
this.myInfo()
|
||||
clearInterval(this.$store.state.timeoutObj);
|
||||
uni.closeSocket();
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
@ -381,7 +385,6 @@
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/Serviceevaluation/Serviceevaluation'
|
||||
})
|
||||
|
||||
},
|
||||
// 签约信息
|
||||
// Signing() {
|
||||
@ -405,7 +408,6 @@
|
||||
duration: '3000',
|
||||
})
|
||||
},
|
||||
|
||||
// 签约信息
|
||||
Signing() {
|
||||
if (!this.appPersonallist) {
|
||||
|
||||
@ -54,7 +54,8 @@
|
||||
所属区域
|
||||
<view class="select" @tap='showPicker'>
|
||||
<text v-if="!address">请选择所属区域</text>
|
||||
<text v-else class="testitem" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{address}}</text>
|
||||
<text v-else class="testitem"
|
||||
style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{address}}</text>
|
||||
<!-- <image src="@/static/huijiantou.png" mode=""></image> -->
|
||||
</view>
|
||||
</view>
|
||||
@ -73,7 +74,8 @@
|
||||
所在位置
|
||||
<view class="selectdata" @tap='getAddress'>
|
||||
<text v-if="query.locationName ==''">请选择所在位置</text>
|
||||
<text class="testitem" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{query.locationName}}</text>
|
||||
<text class="testitem"
|
||||
style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{query.locationName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="name">
|
||||
@ -152,6 +154,9 @@
|
||||
import {
|
||||
registerdata
|
||||
} from '@/api/pages/register/register.js'
|
||||
import {
|
||||
mapMutations
|
||||
} from "vuex";
|
||||
export default {
|
||||
components: {
|
||||
contenttext,
|
||||
@ -164,6 +169,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
SOCKETURL: '',
|
||||
showNation: false, //户主关系
|
||||
actions: [{
|
||||
value: '1',
|
||||
@ -330,13 +336,13 @@
|
||||
}
|
||||
},
|
||||
// onload(){
|
||||
|
||||
// },
|
||||
// onUnload() {
|
||||
// // 移除监听事件
|
||||
// uni.$off('code');
|
||||
// },
|
||||
methods: {
|
||||
...mapMutations(['scoket']),
|
||||
// 与户主关系
|
||||
nationSelect(e) {
|
||||
console.log(e)
|
||||
@ -402,8 +408,10 @@
|
||||
if (res.code == 200) {
|
||||
getCurrentUser(that.query.openid).then(res => {
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
uni.setStorageSync('patientName', res.data.patientName);
|
||||
uni.setStorageSync('patientName', res.data
|
||||
.patientName);
|
||||
uni.setStorageSync("userinfo", res.data)
|
||||
that.scoket();
|
||||
that.$refs.uToast.show({
|
||||
title: '注册成功',
|
||||
type: 'success',
|
||||
@ -417,24 +425,17 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '所属区域应选择所在的区或街道,请重新选择!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
//切换
|
||||
// changeRadio() {
|
||||
// this.selected == 1 ? this.selected = 2 : this.selected = 1
|
||||
// },
|
||||
changeRadio() {
|
||||
if (this.selected == 1) {
|
||||
this.selected = 2;
|
||||
@ -456,7 +457,6 @@
|
||||
url: '/pages/facecollection/facecollection'
|
||||
})
|
||||
},
|
||||
|
||||
//性别
|
||||
sexchange(e) {
|
||||
if (e == '男') {
|
||||
@ -805,6 +805,7 @@
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.selectdata {
|
||||
width: 636rpx;
|
||||
height: 63rpx;
|
||||
|
||||
@ -38,6 +38,9 @@
|
||||
import {
|
||||
consultationInfolist
|
||||
} from '@/api/pagesB/imagetextConsultation/imagetextConsultation.js'
|
||||
import {
|
||||
mapMutations
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -66,10 +69,29 @@
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) {
|
||||
this.scoket();
|
||||
}
|
||||
this.formdata.pageNum = 1
|
||||
this.formdata.patientId = uni.getStorageSync('patientId')
|
||||
if (uni.getStorageSync('patientId')) {
|
||||
this.messagescoket();
|
||||
}
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['scoket']),
|
||||
messagescoket() {
|
||||
const that = this
|
||||
try {
|
||||
uni.onSocketMessage(res => {
|
||||
that.info();
|
||||
console.log("webScoket监听收到的信息", res);
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
//选择
|
||||
selecttitltext(item) {
|
||||
this.formdata.status = item.status
|
||||
|
||||
202
pagesC/integration/integration.vue
Normal file
@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="ythTimer">
|
||||
<!-- <view style="display: flex;align-items: center;"> -->
|
||||
<view>
|
||||
<view style="width: 30%;">
|
||||
<!-- <lauwen-select :options="options" :defaultIndex="lauwentext" :height="19" :padding="16" :fontSize="'28rpx'"
|
||||
@getValue="getValue"></lauwen-select> -->
|
||||
<uni-data-select v-model="yearValue" :localdata="range" @change="change"
|
||||
:clear="false"></uni-data-select>
|
||||
</view>
|
||||
<!-- <view style="margin-left: 10px;background: #DFEDF8;color: #1872f8;border: 1px solid #1872f8;display: flex;justify-content: center;align-items: center;border-radius: 5px;">
|
||||
<span style="padding: 6rpx 24rpx;font-size: 26rpx;">全部</span>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="conWidth">
|
||||
<view v-if="listData && listData.length != 0">
|
||||
<view class="conItem" v-for="(item,index) in listData" :key="index">
|
||||
<view class="conTitle">
|
||||
<view style="font-size: 36rpx;color: #333;">{{ item.projectName }}</view>
|
||||
<view v-if="item.schemaStatus == '0'"
|
||||
style="background: #feefef;border: 1px solid #bd4040;border-radius: 6px;display: flex;justify-content: center;align-items: center;">
|
||||
<span style="font-size:24rpx;color:#bd4040;padding: 3px 8px;">未完成</span>
|
||||
</view>
|
||||
<view v-if="item.schemaStatus == '1'"
|
||||
style="background: #f8f8f8;border: 1px solid #e9e9e9;border-radius: 6px;display: flex;justify-content: center;align-items: center;">
|
||||
<span style="font-size:24rpx;color:#959595;padding: 3px 8px;">已完成</span>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top: 8px;line-height: 20px;">
|
||||
<view style="font-size: 24rpx;color: #999;">
|
||||
计划时间:{{ item.scheduleTime }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #999;">
|
||||
有效时段:{{ item.minValidTime }} 至 {{ item.maxValidTime }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #999;" v-if="item.schemaStatus == '1'">
|
||||
完成医生:{{ item.doctorName }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #999;" v-if="item.schemaStatus == '1'">
|
||||
完成机构:{{ item.orgName }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #999;" v-if="item.schemaStatus == '1'">
|
||||
实际完成时间:{{ item.actualTime }}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="border-bottom: 1px solid #EEEEEE;margin: 8px 0;" v-if="item.schemaStatus == '1'"></view> -->
|
||||
<!-- <view style="text-align: center;" @click="goToDetail" v-if="item.schemaStatus == '1'">
|
||||
<span style="color: #1872f8;font-size: 26rpx;">查看详情</span>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" v-else>
|
||||
暂无记录
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import lauwenSelect from "@/components/lauwen-select/lauwenSelect.vue"
|
||||
import {
|
||||
getIntegrationList
|
||||
} from '@/api/pagesC/integration/index.js'
|
||||
export default {
|
||||
components: {
|
||||
lauwenSelect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
yearValue: '',
|
||||
lauwentext: 1,
|
||||
// options: [],
|
||||
range: [],
|
||||
listData: [],
|
||||
total: '',
|
||||
form: {
|
||||
pageNum: 1,
|
||||
pageSize: 15
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
let data = new Date()
|
||||
const getYear = (val) => {
|
||||
// 获取指定年份开始到现在年份的数组
|
||||
//获取到从那一年开始
|
||||
let timList = [];
|
||||
let smallYears = val;
|
||||
let date = new Date(); //获取当前时间
|
||||
let NowYears = date.getFullYear();
|
||||
var Years = NowYears - smallYears;
|
||||
let arrTim = [];
|
||||
for (let index = 0; index <= Years; index++) {
|
||||
arrTim.push(NowYears--);
|
||||
}
|
||||
arrTim.forEach((tim) => {
|
||||
timList.push(tim);
|
||||
});
|
||||
return timList
|
||||
}
|
||||
let arr = getYear(2022) //传入指定的开始年份
|
||||
// console.log(arr);
|
||||
// let Yearoption = [] //以一个Obj push到Array里面
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
this.yearValue = arr[i]
|
||||
this.range.push({
|
||||
text: arr[i],
|
||||
value: arr[i]
|
||||
})
|
||||
}
|
||||
uni.$showMsg = function(title = '数据加载失败!', duration = 1500) {
|
||||
uni.showToast({
|
||||
title,
|
||||
duration,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.listData = []
|
||||
this.yearValue = data.getFullYear()
|
||||
this.getYthList()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.form.pageNum * 15 >= this.total) {
|
||||
return uni.$showMsg('数据加载完毕!')
|
||||
} else {
|
||||
this.form.pageNum++
|
||||
this.getYthList() //调用函数
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change(e) {
|
||||
this.listData = []
|
||||
this.yearValue = e
|
||||
this.getYthList()
|
||||
},
|
||||
// 获取列表
|
||||
getYthList() {
|
||||
let that = this
|
||||
let userInfo = uni.getStorageSync('userinfo')
|
||||
let data = {
|
||||
// identity: userInfo.cardNo,
|
||||
identity: '370503195407100031',
|
||||
year: that.yearValue,
|
||||
pageNum: this.form.pageNum,
|
||||
pageSize: this.form.pageSize
|
||||
}
|
||||
getIntegrationList(data).then(res => {
|
||||
// console.log(res);
|
||||
for (var i = 0; i < res.data.list.length; i++) {
|
||||
that.listData.push(res.data.list[i])
|
||||
}
|
||||
that.total = res.data.total
|
||||
})
|
||||
},
|
||||
getValue(index) {
|
||||
this.showIndex = index
|
||||
},
|
||||
// 查看详情
|
||||
goToDetail() {
|
||||
uni.navigateTo({
|
||||
url: '../integrationDatail/integrationDatail'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.empty {
|
||||
text-align: center;
|
||||
padding: 50rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.ythTimer {
|
||||
width: 93%;
|
||||
margin: 0 auto;
|
||||
padding: 20rpx 0 50rpx;
|
||||
|
||||
.conWidth {
|
||||
margin-top: 24px;
|
||||
|
||||
.conItem {
|
||||
padding: 20rpx 30rpx;
|
||||
background-color: #f8f8f8;
|
||||
margin: 16px auto;
|
||||
|
||||
.conTitle {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
175
pagesC/nurseRecord/nurseRecord.vue
Normal file
@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="ythTimer">
|
||||
<view style="width: 30%;">
|
||||
<!-- <lauwen-select :options="options" :defaultIndex="lauwentext" :height="20" :padding="15" :fontSize="'28rpx'"
|
||||
@getValue="getValue"></lauwen-select> -->
|
||||
<uni-data-select v-model="yearValue" :localdata="range" @change="change"
|
||||
:clear="false"></uni-data-select>
|
||||
</view>
|
||||
<view class="conWidth">
|
||||
<view v-if="nurseData && nurseData.length != 0">
|
||||
<view class="conItem" v-for="(item,index) in nurseData" :key="index">
|
||||
<view class="conTitle">
|
||||
<view style="font-size: 36rpx;color: #333;">
|
||||
{{ item.schemaName ? item.schemaName : '计划外照护' }}
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top: 8px;line-height: 20px;">
|
||||
<view style="font-size: 24rpx;color: #999;">
|
||||
完成时间:{{ item.performanceDate }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #999;">
|
||||
完成医生:{{ item.doctorName }}
|
||||
</view>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #EEEEEE;margin: 8px 0;"></view>
|
||||
<view style="text-align: center;" @click="goToDetail(item)">
|
||||
<span style="color: #1872f8;font-size: 26rpx;">查看详情</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" v-else>
|
||||
暂无记录
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import lauwenSelect from "@/components/lauwen-select/lauwenSelect.vue"
|
||||
import {
|
||||
getNurseList
|
||||
} from '@/api/pagesC/nurseRecord/index.js'
|
||||
export default {
|
||||
components: {
|
||||
lauwenSelect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
yearValue: '',
|
||||
lauwentext: 1,
|
||||
range: [],
|
||||
form: {
|
||||
pageNum: 1,
|
||||
pageSize: 15
|
||||
},
|
||||
nurseData: '',
|
||||
total: ''
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
let data = new Date()
|
||||
const getYear = (val) => {
|
||||
// 获取指定年份开始到现在年份的数组
|
||||
//获取到从那一年开始
|
||||
let timList = [];
|
||||
let smallYears = val;
|
||||
let date = new Date(); //获取当前时间
|
||||
let NowYears = date.getFullYear();
|
||||
var Years = NowYears - smallYears;
|
||||
let arrTim = [];
|
||||
for (let index = 0; index <= Years; index++) {
|
||||
arrTim.push(NowYears--);
|
||||
}
|
||||
arrTim.forEach((tim) => {
|
||||
timList.push(tim);
|
||||
});
|
||||
return timList
|
||||
}
|
||||
let arr = getYear(2022) //传入指定的开始年份
|
||||
// let Yearoption = [] //以一个Obj push到Array里面
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
this.yearValue = arr[i]
|
||||
this.range.push({
|
||||
text: arr[i],
|
||||
value: arr[i]
|
||||
})
|
||||
}
|
||||
uni.$showMsg = function(title = '数据加载失败!', duration = 1500) {
|
||||
uni.showToast({
|
||||
title,
|
||||
duration,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.yearValue = data.getFullYear()
|
||||
this.nurseData = []
|
||||
this.getZhList()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.form.pageNum * 15 >= this.total) {
|
||||
return uni.$showMsg('数据加载完毕!')
|
||||
} else {
|
||||
this.form.pageNum++
|
||||
this.getZhList() //调用函数
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change(e) {
|
||||
this.nurseData = []
|
||||
this.yearValue = e
|
||||
this.getZhList()
|
||||
},
|
||||
// 获取列表
|
||||
getZhList() {
|
||||
let userInfo = uni.getStorageSync('userinfo')
|
||||
let data = {
|
||||
// identity: userInfo.cardNo,
|
||||
identity: '370503195407100031',
|
||||
year: this.yearValue,
|
||||
pageNum: this.form.pageNum,
|
||||
pageSize: this.form.pageSize
|
||||
}
|
||||
getNurseList(data).then(res => {
|
||||
// console.log(res);
|
||||
this.nurseData = res.data.list
|
||||
// for (var i = 0; i < res.data.data.list.length; i++) {
|
||||
// that.nurseData.push(res.data.data.list[i])
|
||||
// }
|
||||
this.total = res.data.total
|
||||
})
|
||||
},
|
||||
getValue(index) {
|
||||
this.showIndex = index
|
||||
},
|
||||
// 查看详情
|
||||
goToDetail(item) {
|
||||
console.log(item);
|
||||
uni.navigateTo({
|
||||
url: `../nurseRecordDetail/nurseRecordDetail?perRecordId=${item.perRecordId}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.empty {
|
||||
text-align: center;
|
||||
padding: 50rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.ythTimer {
|
||||
width: 93%;
|
||||
margin: 0 auto;
|
||||
padding: 20rpx 0 50rpx;
|
||||
|
||||
.conWidth {
|
||||
margin-top: 24px;
|
||||
|
||||
.conItem {
|
||||
padding: 20rpx 30rpx;
|
||||
background-color: #f8f8f8;
|
||||
margin: 16px auto;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
344
pagesC/nurseRecordDetail/nurseRecordDetail.vue
Normal file
@ -0,0 +1,344 @@
|
||||
<template>
|
||||
<view style="width: 96%;margin: 10px auto;">
|
||||
<view style=" display: flex;align-items: center;margin: 10rpx 0;">
|
||||
<view style="border-left: 4px solid #4192F4;height: 20px;margin-right: 10rpx;"></view>
|
||||
<view style="font-size: 32rpx;color: #4192F4;">干预目标</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="border: 1px solid #ccc;">
|
||||
<view class="tableTitle" style="display: flex;border-bottom: 1px solid #ccc;">
|
||||
<view class="tableHead">健康指标</view>
|
||||
<view class="tableHead" style="border-left: 1px solid #ccc;border-right: 1px solid #ccc;">本次测量值
|
||||
</view>
|
||||
<view class="tableHead">干预目标</view>
|
||||
</view>
|
||||
<view class="tableTr">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<view>血糖</view>
|
||||
<view>
|
||||
<view style="border-right: 1px solid #ccc;border-left: 1px solid #ccc;">空腹血糖</view>
|
||||
<view
|
||||
style="border-right: 1px solid #ccc;border-left: 1px solid #ccc;border-top: 1px solid #ccc;">
|
||||
HbA1c(%)</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #ccc;">
|
||||
<view style="border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;">
|
||||
{{ nurseDetailData.performanceRecord.fbg ? nurseDetailData.performanceRecord.fbg : '-'}}
|
||||
</view>
|
||||
<view style="border-right: 1px solid #ccc;">
|
||||
{{ nurseDetailData.performanceRecord.randomGlycoprotein ? nurseDetailData.performanceRecord.randomGlycoprotein : '-' }}
|
||||
</view>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #ccc;">
|
||||
<view style="border-bottom: 1px solid #ccc;">{{ domData }}</view>
|
||||
<view>{{ domData1 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tableTr">
|
||||
<view style="display: flex;align-items: center;border-top: 1px solid #ccc;">
|
||||
<view>血压</view>
|
||||
<view>
|
||||
<view
|
||||
style="border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;border-left: 1px solid #ccc;">
|
||||
舒张压
|
||||
</view>
|
||||
<view style="border-right: 1px solid #ccc;border-left: 1px solid #ccc;">收缩压</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #ccc;">
|
||||
<view style="border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;">
|
||||
{{ nurseDetailData.performanceRecord.dbp ? nurseDetailData.performanceRecord.dbp : '-' }}
|
||||
</view>
|
||||
<view style="border-right: 1px solid #ccc;">
|
||||
{{ nurseDetailData.performanceRecord.sbp ? nurseDetailData.performanceRecord.sbp : '-' }}
|
||||
</view>
|
||||
</view>
|
||||
<view style="border-bottom: 1px solid #ccc;">
|
||||
<view style="border-bottom: 1px solid #ccc;">{{ domData2 }}</view>
|
||||
<view>{{ domData3 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tableTr">
|
||||
<view
|
||||
style="display: flex;align-items: center;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc;">
|
||||
<view>血脂</view>
|
||||
<view>
|
||||
<view
|
||||
style="border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;">
|
||||
TC
|
||||
</view>
|
||||
<view
|
||||
style="border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;">
|
||||
TG
|
||||
</view>
|
||||
<view style="border-left: 1px solid #ccc;border-right: 1px solid #ccc;">HDL-C</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="border-bottom: 1px solid #ccc;border-right: 1px solid #ccc;">
|
||||
{{ nurseDetailData.performanceRecord.tc ? nurseDetailData.performanceRecord.tc : '-' }}
|
||||
</view>
|
||||
<view style="border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;">
|
||||
{{ nurseDetailData.performanceRecord.tg ? nurseDetailData.performanceRecord.tg : '-' }}
|
||||
</view>
|
||||
<view style="border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;">
|
||||
{{ nurseDetailData.performanceRecord.hdl ? nurseDetailData.performanceRecord.hdl : '-' }}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="border-bottom: 1px solid #ccc;">{{ domData4 }}</view>
|
||||
<view style="border-bottom: 1px solid #ccc;">{{ domData5 }}</view>
|
||||
<view style="border-bottom: 1px solid #ccc;">{{ domData6 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tableTr">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<view style="border-right: 1px solid #ccc;">体质指数</view>
|
||||
</view>
|
||||
<!-- <view style="border-right: 1px solid #ccc;">1</view> -->
|
||||
<view style="border-right: 1px solid #ccc;">
|
||||
{{ nurseDetailData.performanceRecord.bmi ? nurseDetailData.performanceRecord.bmi : '-' }}
|
||||
</view>
|
||||
<view>{{ domData7 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style=" display: flex;align-items: center;margin: 10rpx 0;">
|
||||
<view style="border-left: 4px solid #4192F4;height: 20px;margin-right: 10rpx;"></view>
|
||||
<view style="font-size: 32rpx;color: #4192F4;">用药指导</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="border: 1px solid #ccc;">
|
||||
<view class="tableTitle" style="display: flex;border-bottom: 1px solid #ccc;">
|
||||
<view class="tableHead" style="border-right:1px solid #ccc;">用药名称</view>
|
||||
<view class="tableHead" style="border-right:1px solid #ccc;">用药类型</view>
|
||||
<view class="tableHead" style="border-right:1px solid #ccc;">用药单位</view>
|
||||
<view class="tableHead" style="border-right:1px solid #ccc;">次剂量</view>
|
||||
<view class="tableHead">用药频次</view>
|
||||
</view>
|
||||
<view class="itemTr" style="display: flex;text-align: center;align-items: center;"
|
||||
v-for="(item,index) in nurseDetailData.drugProtocolList" :key="index">
|
||||
<view style="flex:1;border-right:1px solid #ccc;">{{ item.medicineName }}</view>
|
||||
<view style="flex:1;border-right:1px solid #ccc;">{{ item.medicineTypeName }}</view>
|
||||
<view style="flex:1;border-right:1px solid #ccc;">{{ item.usage }}</view>
|
||||
<view style="flex:1;border-right:1px solid #ccc;">{{ item.dosage }}</view>
|
||||
<view style="flex:1">{{ item.frequency }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style=" display: flex;align-items: center;margin: 10rpx 0;">
|
||||
<view style="border-left: 4px solid #4192F4;height: 20px;margin-right: 10rpx;"></view>
|
||||
<view style="font-size: 32rpx;color: #4192F4;">既往用药</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="border: 1px solid #ccc;">
|
||||
<view class="tableTitle" style="display: flex;border-bottom: 1px solid #ccc;">
|
||||
<view class="tableHead" style="border-right:1px solid #ccc;">用药名称</view>
|
||||
<view class="tableHead" style="border-right:1px solid #ccc;">用药单位</view>
|
||||
<view class="tableHead" style="border-right:1px solid #ccc;">用药次剂量</view>
|
||||
<view class="tableHead">用药频次</view>
|
||||
</view>
|
||||
<view class="itemTr" style="display: flex;text-align: center;align-items: center;"
|
||||
v-for="(item,index) in nurseDetailData.protocolList" :key="index">
|
||||
<view style="flex:1;border-right:1px solid #ccc;">{{ item.medicineName }}</view>
|
||||
<view style="flex:1;border-right:1px solid #ccc;">{{ item.usage }}</view>
|
||||
<view style="flex:1;border-right:1px solid #ccc;">{{ item.dosage }}</view>
|
||||
<view style="flex:1">{{ item.frequency }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style=" display: flex;align-items: center;margin: 10rpx 0;">
|
||||
<view style="border-left: 4px solid #4192F4;height: 20px;margin-right: 10rpx;"></view>
|
||||
<view style="font-size: 32rpx;color: #4192F4;">处方</view>
|
||||
</view>
|
||||
<view>
|
||||
<view><span style="color: #4192f4;">健康教育处方:</span>
|
||||
<view style="display: inline;"
|
||||
v-html="nurseDetailData.prescription.healthEducation ? nurseDetailData.prescription.healthEducation : '无' ">
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin: 6px 0;"><span style="color: #4192f4;">运动治疗处方:</span>
|
||||
<view style="display: inline;"
|
||||
v-html="nurseDetailData.prescription.exercise ? nurseDetailData.prescription.exercise : '无' ">
|
||||
</view>
|
||||
</view>
|
||||
<view><span style="color: #4192f4;">营养治疗处方:</span>
|
||||
<view style="display: inline;"
|
||||
v-html="nurseDetailData.prescription.nutritional ? nurseDetailData.prescription.nutritional : '无' ">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getNurseListDetail
|
||||
} from '@/api/pagesC/nurseRecord/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
perRecordId: '',
|
||||
nurseDetailData: '',
|
||||
// 干预目标接收渲染数据
|
||||
domData: "-",
|
||||
domData1: "-",
|
||||
domData2: "-",
|
||||
domData3: "-",
|
||||
domData4: "-",
|
||||
domData5: "-",
|
||||
domData6: "-",
|
||||
domData7: "-",
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e);
|
||||
this.perRecordId = e.perRecordId
|
||||
this.getNurseDetail()
|
||||
},
|
||||
methods: {
|
||||
getNurseDetail() {
|
||||
getNurseListDetail(this.perRecordId).then(res => {
|
||||
// console.log(res);
|
||||
this.nurseDetailData = res.data
|
||||
this.interveneTargetData = res.data.interveneTarget;
|
||||
for (let item in this.interveneTargetData) {
|
||||
let targetData = this.interveneTargetData[item].target;
|
||||
let targetItemData = this.interveneTargetData[item].targetItem;
|
||||
if (targetData == "血糖" && targetItemData == "空腹") {
|
||||
if (!this.interveneTargetData[item].targetValueMin) {
|
||||
this.domData = "<" + this.interveneTargetData[item].targetValueMax;
|
||||
} else if (!this.interveneTargetData[item].targetValueMax) {
|
||||
this.domData = ">" + this.interveneTargetData[item].targetValueMin;
|
||||
} else {
|
||||
this.domData =
|
||||
this.interveneTargetData[item].targetValueMin +
|
||||
"-" +
|
||||
this.interveneTargetData[item].targetValueMax;
|
||||
}
|
||||
}
|
||||
if (targetData == "血糖" && targetItemData == "HbA1c") {
|
||||
if (!this.interveneTargetData[item].targetValueMin) {
|
||||
this.domData1 = "<" + this.interveneTargetData[item].targetValueMax;
|
||||
} else if (!this.interveneTargetData[item].targetValueMax) {
|
||||
this.domData1 = ">" + this.interveneTargetData[item].targetValueMin;
|
||||
} else {
|
||||
this.domData1 =
|
||||
this.interveneTargetData[item].targetValueMin +
|
||||
"-" +
|
||||
this.interveneTargetData[item].targetValueMax;
|
||||
}
|
||||
}
|
||||
if (targetData == "血压" && targetItemData == "收缩压") {
|
||||
if (!this.interveneTargetData[item].targetValueMin) {
|
||||
this.domData2 = "<" + this.interveneTargetData[item].targetValueMax;
|
||||
} else if (!this.interveneTargetData[item].targetValueMax) {
|
||||
this.domData2 = ">" + this.interveneTargetData[item].targetValueMin;
|
||||
} else {
|
||||
this.domData2 =
|
||||
this.interveneTargetData[item].targetValueMin +
|
||||
"-" +
|
||||
this.interveneTargetData[item].targetValueMax;
|
||||
}
|
||||
}
|
||||
if (targetData == "血压" && targetItemData == "舒张压") {
|
||||
if (!this.interveneTargetData[item].targetValueMin) {
|
||||
this.domData3 = "<" + this.interveneTargetData[item].targetValueMax;
|
||||
} else if (!this.interveneTargetData[item].targetValueMax) {
|
||||
this.domData3 = ">" + this.interveneTargetData[item].targetValueMin;
|
||||
} else {
|
||||
this.domData3 =
|
||||
this.interveneTargetData[item].targetValueMin +
|
||||
"-" +
|
||||
this.interveneTargetData[item].targetValueMax;
|
||||
}
|
||||
}
|
||||
if (targetData == "血脂" && targetItemData == "TC") {
|
||||
if (!this.interveneTargetData[item].targetValueMin) {
|
||||
this.domData4 = "<" + this.interveneTargetData[item].targetValueMax;
|
||||
} else if (!this.interveneTargetData[item].targetValueMax) {
|
||||
this.domData4 = ">" + this.interveneTargetData[item].targetValueMin;
|
||||
} else {
|
||||
this.domData4 =
|
||||
this.interveneTargetData[item].targetValueMin +
|
||||
"-" +
|
||||
this.interveneTargetData[item].targetValueMax;
|
||||
}
|
||||
}
|
||||
if (targetData == "血脂" && targetItemData == "TG") {
|
||||
if (!this.interveneTargetData[item].targetValueMin) {
|
||||
this.domData5 = "<" + this.interveneTargetData[item].targetValueMax;
|
||||
} else if (!this.interveneTargetData[item].targetValueMax) {
|
||||
this.domData5 = ">" + this.interveneTargetData[item].targetValueMin;
|
||||
} else {
|
||||
this.domData5 =
|
||||
this.interveneTargetData[item].targetValueMin +
|
||||
"-" +
|
||||
this.interveneTargetData[item].targetValueMax;
|
||||
}
|
||||
}
|
||||
if (targetData == "血脂" && targetItemData == "HDL-C") {
|
||||
if (!this.interveneTargetData[item].targetValueMin) {
|
||||
this.domData6 = "<" + this.interveneTargetData[item].targetValueMax;
|
||||
} else if (!this.interveneTargetData[item].targetValueMax) {
|
||||
this.domData6 = ">" + this.interveneTargetData[item].targetValueMin;
|
||||
} else {
|
||||
this.domData6 =
|
||||
this.interveneTargetData[item].targetValueMin +
|
||||
"-" +
|
||||
this.interveneTargetData[item].targetValueMax;
|
||||
}
|
||||
}
|
||||
if (targetData == "体质指数" && targetItemData == "体质指数") {
|
||||
if (!this.interveneTargetData[item].targetValueMin) {
|
||||
this.domData7 = "<" + this.interveneTargetData[item].targetValueMax;
|
||||
} else if (!this.interveneTargetData[item].targetValueMax) {
|
||||
this.domData7 = ">" + this.interveneTargetData[item].targetValueMin;
|
||||
} else {
|
||||
this.domData7 =
|
||||
this.interveneTargetData[item].targetValueMin +
|
||||
"-" +
|
||||
this.interveneTargetData[item].targetValueMax;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.tableTitle {
|
||||
.tableHead {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
}
|
||||
|
||||
.itemTr {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.itemTr:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.tableTr {
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -168,14 +168,19 @@
|
||||
// });
|
||||
},
|
||||
onLoad(options) {
|
||||
if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) {
|
||||
this.scoket();
|
||||
}
|
||||
this.baseurl = baseurl;
|
||||
// uni.closeSocket()
|
||||
this.currentItem = JSON.parse(options.item)
|
||||
// this.scoket()
|
||||
this.title = this.currentItem.doctorName //导航栏标题
|
||||
this.userName = this.currentItem.patientName
|
||||
this.SOCKETURL = socketurl + this.currentItem.patientId
|
||||
if (uni.getStorageSync('patientId')) {
|
||||
this.messagescoket();
|
||||
}
|
||||
this.getPageHistory()
|
||||
this.scoket()
|
||||
},
|
||||
mounted() {
|
||||
// wx.pageScrollTo({
|
||||
@ -183,6 +188,69 @@
|
||||
// })
|
||||
},
|
||||
methods: {
|
||||
messagescoket() {
|
||||
const that = this
|
||||
// this.SOCKETURL = socketurl + this.currentItem.patientId
|
||||
// this.socketOpen = false
|
||||
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
|
||||
// })
|
||||
// }, 1000)
|
||||
// }
|
||||
// })
|
||||
// uni.onSocketClose(err => {
|
||||
// console.log('webScoket连接关闭', err);
|
||||
// if (err && err.code !== 1000) {
|
||||
// setTimeout(() => {
|
||||
// that.socketOpen = true
|
||||
// uni.connectSocket({
|
||||
// url: that.SOCKETURL
|
||||
// })
|
||||
// }, 1000)
|
||||
// }
|
||||
// })
|
||||
uni.onSocketMessage(res => {
|
||||
console.log("webScoket监听收到的信息", res);
|
||||
that.getPageHistory()
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
// 心跳响应
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
},
|
||||
lookimage(item) {
|
||||
uni.previewImage({
|
||||
urls: [item], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
|
||||
@ -310,7 +378,11 @@
|
||||
sendout() {
|
||||
const that = this
|
||||
var content = JSON.parse(JSON.stringify(that.formData.content))
|
||||
if (this.socketOpen == false) {
|
||||
if (this.$store.state.socketOpen == false) {
|
||||
this.$refs.uToast.show({
|
||||
title: '聊天连接异常',
|
||||
type: 'warning',
|
||||
})
|
||||
return
|
||||
}
|
||||
let obj = {
|
||||
@ -443,7 +515,11 @@
|
||||
//发送图片
|
||||
chooseImage(sourceType) {
|
||||
var that = this
|
||||
if (this.socketOpen == false) {
|
||||
if (this.$store.state.socketOpen == false) {
|
||||
this.$refs.uToast.show({
|
||||
title: '聊天连接异常',
|
||||
type: 'warning',
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.chooseImage({
|
||||
@ -519,95 +595,12 @@
|
||||
}).exec();
|
||||
}, 200)
|
||||
},
|
||||
scoket() {
|
||||
const that = this
|
||||
this.socketOpen = false
|
||||
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)
|
||||
}
|
||||
})
|
||||
uni.onSocketMessage(res => {
|
||||
console.log("webScoket监听收到的信息", res);
|
||||
that.newsList.push({
|
||||
senderName: that.currentItem.doctorName,
|
||||
content: JSON.parse(res.data).message,
|
||||
messageType: Number(JSON.parse(res.data).messageType)
|
||||
})
|
||||
setTimeout(() => {
|
||||
let query = uni.createSelectorQuery().in(this);
|
||||
//需要给黄色区域设置一个id标识,在这里是demo
|
||||
query.select('.input-box').boundingClientRect(data => {
|
||||
this.inputboxtop = data.height //赋值,待会要用
|
||||
setTimeout(e => {
|
||||
this.scrollTop = this.scrollTop + 1;
|
||||
}, 300)
|
||||
}).exec();
|
||||
}, 100)
|
||||
that.Read()
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
// 心跳响应
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
}, 5000)
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
clearInterval(this.timeoutObj);
|
||||
if (this.socketOpen == true) {
|
||||
uni.closeSocket();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 855 B |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
BIN
static/zhaohufangan.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
static/zhaohujilu.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
@ -1,11 +1,70 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import {
|
||||
socketurl
|
||||
} from '@/api/socketurl.js'
|
||||
Vue.use(Vuex)
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
//公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
|
||||
timeoutObj: null,
|
||||
socketOpen: false,
|
||||
SOCKETURL: '',
|
||||
},
|
||||
mutations: {
|
||||
scoket(state) {
|
||||
state.SOCKETURL = socketurl + uni.getStorageSync('patientId')
|
||||
state.socketOpen = false
|
||||
try {
|
||||
uni.connectSocket({
|
||||
url: state.SOCKETURL
|
||||
})
|
||||
uni.onSocketOpen(res => {
|
||||
console.log('webScoket连接已打开', res);
|
||||
state.socketOpen = true
|
||||
clearInterval(state.timeoutObj);
|
||||
state.timeoutObj = setInterval(() => {
|
||||
uni.sendSocketMessage({
|
||||
data: 'ping',
|
||||
success(res) {
|
||||
console.log('正在发送心跳');
|
||||
},
|
||||
fail(err) {
|
||||
console.log('心跳发送失败,重新连接...');
|
||||
state.socketOpen = true
|
||||
uni.connectSocket({
|
||||
url: state.SOCKETURL
|
||||
})
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
})
|
||||
uni.onSocketError(err => {
|
||||
console.log('webScoket连接打开失败', err);
|
||||
if (err && err.code != 1000) {
|
||||
setTimeout(() => {
|
||||
state.socketOpen = true
|
||||
uni.connectSocket({
|
||||
url: state.SOCKETURL
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
uni.onSocketClose(err => {
|
||||
console.log('webScoket连接关闭', err);
|
||||
if (err && err.code !== 1000) {
|
||||
setTimeout(() => {
|
||||
state.socketOpen = true
|
||||
uni.connectSocket({
|
||||
url: state.SOCKETURL
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
//相当于同步的操作
|
||||
//点击确认
|
||||
integralsubscribesuccess(state) {
|
||||
|
||||