Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
d499c9967f
40
api/pagesC/testreport/index.js
Normal file
40
api/pagesC/testreport/index.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
var request = function(config) {
|
||||||
|
return new Promise((resolve, rejected) => {
|
||||||
|
if (config.url != '/nurseApplet/chatRecord/updateReadStatus' && config.url !=
|
||||||
|
"/nurseApplet/chatRecord/sendMessage" && config.url !=
|
||||||
|
`/applet/sign/apply/checkSignApply/` + uni.getStorageSync('userinfo').cardNo) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
}
|
||||||
|
uni.request({
|
||||||
|
url: config.url,
|
||||||
|
data: config.data,
|
||||||
|
method: config.method,
|
||||||
|
timeout: 60000,
|
||||||
|
header: config.header,
|
||||||
|
success(res) {
|
||||||
|
uni.hideLoading();
|
||||||
|
resolve(res.data)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
uni.hideLoading();
|
||||||
|
rejected(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取dy报告list
|
||||||
|
export function dyrecord(identity) {
|
||||||
|
return request({
|
||||||
|
url: `http://8.131.93.145:54098/fd/sh05/record/${identity}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取dz报告list
|
||||||
|
export function dzrecord(identity) {
|
||||||
|
return request({
|
||||||
|
url: `http://112.6.122.71:8009/fd/sh05/record/${identity}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -94,8 +94,6 @@
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
timeindex: 0,
|
timeindex: 0,
|
||||||
socketOpen: false,
|
|
||||||
timer: null,
|
|
||||||
datalist: null,
|
datalist: null,
|
||||||
datalisttwo: null,
|
datalisttwo: null,
|
||||||
pie_opts: {
|
pie_opts: {
|
||||||
@ -156,12 +154,6 @@
|
|||||||
// }
|
// }
|
||||||
this.getServerData()
|
this.getServerData()
|
||||||
},
|
},
|
||||||
destroyed() {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
if (this.socketOpen == true) {
|
|
||||||
uni.closeSocket();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
echartData: {
|
echartData: {
|
||||||
handler() {
|
handler() {
|
||||||
@ -169,18 +161,6 @@
|
|||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
current(newValue, oldValue) {
|
|
||||||
if (newValue != 0) {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
if (this.socketOpen == true) {
|
|
||||||
uni.closeSocket();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.scoket()
|
|
||||||
}, 800)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
taptimeindex(index) {
|
taptimeindex(index) {
|
||||||
@ -233,78 +213,6 @@
|
|||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scoket() {
|
|
||||||
var SOCKETURL = 'ws://112.7.50.34:9002/webSocket/' + uni.getStorageSync('userinfo').cardNo
|
|
||||||
const that = this
|
|
||||||
uni.closeSocket()
|
|
||||||
this.socketOpen = false
|
|
||||||
try {
|
|
||||||
uni.connectSocket({
|
|
||||||
url: 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: SOCKETURL
|
|
||||||
})
|
|
||||||
}, 3 * 1000)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
uni.onSocketClose(err => {
|
|
||||||
console.log('webScoket连接关闭', err);
|
|
||||||
if (err && err.code !== 1000) {
|
|
||||||
setTimeout(() => {
|
|
||||||
that.socketOpen = true
|
|
||||||
uni.connectSocket({
|
|
||||||
url: SOCKETURL
|
|
||||||
})
|
|
||||||
}, 3 * 1000)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
uni.onSocketMessage(res => {
|
|
||||||
console.log("webScoket监听收到的信息", res);
|
|
||||||
// that.newsList.push({
|
|
||||||
// senderName: that.currentItem.senderName,
|
|
||||||
// content: JSON.parse(res.data).message
|
|
||||||
// })
|
|
||||||
this.$emit('websocket-message');
|
|
||||||
this.$forceUpdate()
|
|
||||||
})
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 心跳响应
|
|
||||||
reset() {
|
|
||||||
let that = this
|
|
||||||
var SOCKETURL = 'ws://112.7.50.34:9002/webSocket/' + uni.getStorageSync('userinfo').cardNo
|
|
||||||
clearInterval(that.timer);
|
|
||||||
that.timer = setInterval(() => {
|
|
||||||
uni.sendSocketMessage({
|
|
||||||
data: 'ping',
|
|
||||||
success(res) {
|
|
||||||
console.log('正在发送心跳');
|
|
||||||
},
|
|
||||||
fail(err) {
|
|
||||||
console.log('心跳发送失败,重新连接...');
|
|
||||||
_socketOpen = true
|
|
||||||
uni.connectSocket({
|
|
||||||
url: SOCKETURL
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}, 60000)
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -51,7 +51,6 @@
|
|||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin": {
|
"mp-weixin": {
|
||||||
"appid": "wxccb16a452ab5e4b4",
|
"appid": "wxccb16a452ab5e4b4",
|
||||||
"__usePrivacyCheck__": true,
|
|
||||||
"setting": {
|
"setting": {
|
||||||
"urlCheck": false,
|
"urlCheck": false,
|
||||||
"postcss": true,
|
"postcss": true,
|
||||||
|
|||||||
@ -621,6 +621,14 @@
|
|||||||
"navigationBarTitleText": "设备列表",
|
"navigationBarTitleText": "设备列表",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "testreport/testreport",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "检测报告",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
left: 10%;
|
left: 10%;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 68rpx;
|
height: 68rpx;
|
||||||
background-color: #55d0df;
|
background-color: #4AC4AB;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
|||||||
@ -461,6 +461,11 @@
|
|||||||
.paySign,
|
.paySign,
|
||||||
success: function(
|
success: function(
|
||||||
res) {
|
res) {
|
||||||
|
that.couponId =
|
||||||
|
null
|
||||||
|
that.Paidinprice =
|
||||||
|
null
|
||||||
|
that.coupon = null
|
||||||
that.goodsDetailsinfo(
|
that.goodsDetailsinfo(
|
||||||
that
|
that
|
||||||
.goodsInfoId,
|
.goodsInfoId,
|
||||||
@ -731,10 +736,10 @@
|
|||||||
if (list.length >= 1) {
|
if (list.length >= 1) {
|
||||||
this.updata.receiver = list[0].receiveName
|
this.updata.receiver = list[0].receiveName
|
||||||
var areaName
|
var areaName
|
||||||
if(res.data[0].areaName){
|
if (res.data[0].areaName) {
|
||||||
areaName=res.data[0].areaName
|
areaName = res.data[0].areaName
|
||||||
}else{
|
} else {
|
||||||
areaName=""
|
areaName = ""
|
||||||
}
|
}
|
||||||
this.updata.receiveAddress = list[0].areaName + list[0].receiveAddress
|
this.updata.receiveAddress = list[0].areaName + list[0].receiveAddress
|
||||||
this.updata.phone = list[0].receivePhone
|
this.updata.phone = list[0].receivePhone
|
||||||
@ -743,14 +748,14 @@
|
|||||||
|
|
||||||
this.updata.receiver = res.data[0].receiveName
|
this.updata.receiver = res.data[0].receiveName
|
||||||
var areaName
|
var areaName
|
||||||
if(res.data[0].areaName){
|
if (res.data[0].areaName) {
|
||||||
areaName=res.data[0].areaName
|
areaName = res.data[0].areaName
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
areaName=""
|
areaName = ""
|
||||||
|
|
||||||
}
|
}
|
||||||
this.updata.receiveAddress =areaName + res.data[0].receiveAddress
|
this.updata.receiveAddress = areaName + res.data[0].receiveAddress
|
||||||
this.updata.phone = res.data[0].receivePhone
|
this.updata.phone = res.data[0].receivePhone
|
||||||
this.userid = res.data[0].id
|
this.userid = res.data[0].id
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,9 +20,7 @@
|
|||||||
分类
|
分类
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="inputs">
|
<!-- <view class="inputs">
|
||||||
<i class="icon"></i>
|
<i class="icon"></i>
|
||||||
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入商品名称">
|
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入商品名称">
|
||||||
@ -375,7 +373,7 @@
|
|||||||
.productlist {
|
.productlist {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 20rpx 0 0 0;
|
padding: 100rpx 0 0 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
|||||||
@ -77,7 +77,7 @@
|
|||||||
已签到
|
已签到
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" style="background-color: #F44B2F;">
|
<!-- <view class="item" style="background-color: #F44B2F;">
|
||||||
<image src="../../static/pagesB/yaoqing.png" mode=""></image>
|
<image src="../../static/pagesB/yaoqing.png" mode=""></image>
|
||||||
<view class="titletext">
|
<view class="titletext">
|
||||||
每邀请
|
每邀请
|
||||||
@ -93,7 +93,7 @@
|
|||||||
<view class="btn" style="color: #F44B2F;" @tap='yaoqingshowtrue' v-if='list.inviteFriends>0'>
|
<view class="btn" style="color: #F44B2F;" @tap='yaoqingshowtrue' v-if='list.inviteFriends>0'>
|
||||||
去完成
|
去完成
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-mask>
|
</u-mask>
|
||||||
@ -352,34 +352,34 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 画文字
|
// 画文字
|
||||||
await this.$refs.rCanvas.drawText({
|
// await this.$refs.rCanvas.drawText({
|
||||||
// text: "智慧康养,医护关怀到家",
|
// text: "",
|
||||||
x: 150,
|
// x: 150,
|
||||||
y: 300,
|
// y: 300,
|
||||||
font_color: "#444444",
|
// font_color: "#444444",
|
||||||
font_size: 12,
|
// font_size: 12,
|
||||||
font_weight: 600,
|
// font_weight: 600,
|
||||||
text_align: 'center'
|
// text_align: 'center'
|
||||||
}).catch(err_msg => {
|
// }).catch(err_msg => {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: err_msg,
|
// title: err_msg,
|
||||||
icon: "none"
|
// icon: "none"
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
await this.$refs.rCanvas.drawText({
|
// await this.$refs.rCanvas.drawText({
|
||||||
// text: "超多福利,快来体验吧!",
|
// text: "",
|
||||||
x: 150,
|
// x: 150,
|
||||||
y: 320,
|
// y: 320,
|
||||||
font_color: "#444444",
|
// font_color: "#444444",
|
||||||
font_size: 12,
|
// font_size: 12,
|
||||||
font_weight: 600,
|
// font_weight: 600,
|
||||||
text_align: 'center'
|
// text_align: 'center'
|
||||||
}).catch(err_msg => {
|
// }).catch(err_msg => {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: err_msg,
|
// title: err_msg,
|
||||||
icon: "none"
|
// icon: "none"
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
await this.$refs.rCanvas.drawText({
|
await this.$refs.rCanvas.drawText({
|
||||||
text: "新医路健康服务平台",
|
text: "新医路健康服务平台",
|
||||||
x: 150,
|
x: 150,
|
||||||
|
|||||||
@ -76,7 +76,7 @@
|
|||||||
.Rescind {
|
.Rescind {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
color: #55d0df;
|
color: #4AC4AB;
|
||||||
border-left: 0.5rpx solid #f6f6f6;
|
border-left: 0.5rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,14 +9,9 @@
|
|||||||
<view style="color: #2968F1;" @click="goToScreeningRecord" v-show="type != '1'">筛查记录</view>
|
<view style="color: #2968F1;" @click="goToScreeningRecord" v-show="type != '1'">筛查记录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tabbarCon">
|
<view class="tabbarCon">
|
||||||
<view style="text-align: center;
|
<view
|
||||||
color: #26A888;
|
style="text-align: center;color: #26A888;border-bottom: 1rpx solid #26A888;padding-top: 17rpx;position: relative;left: 50%;transform: translate(-50%);display: inline-block;"
|
||||||
border-bottom: 1rpx solid #26A888;
|
v-if="screeningResultData.projectName">
|
||||||
padding-top: 17rpx;
|
|
||||||
position: relative;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%);
|
|
||||||
display: inline-block;" v-if="screeningResultData.projectName">
|
|
||||||
{{screeningResultData.projectName}}
|
{{screeningResultData.projectName}}
|
||||||
</view>
|
</view>
|
||||||
<uni-segmented-control :current="Inv" :values="items" @clickItem="onClickItem" styleType="text"
|
<uni-segmented-control :current="Inv" :values="items" @clickItem="onClickItem" styleType="text"
|
||||||
@ -48,7 +43,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-show="Inv == 1">
|
<view v-show="Inv == 1">
|
||||||
<view>
|
<view>
|
||||||
<view
|
<view
|
||||||
@ -175,7 +169,8 @@
|
|||||||
methods: {
|
methods: {
|
||||||
lookpath() {
|
lookpath() {
|
||||||
var that = this
|
var that = this
|
||||||
var url = that.baseurl + `/nurseApplet/screening/record/fileview?filePath=${that.screeningResultData.attachment}`
|
var url = that.baseurl +
|
||||||
|
`/nurseApplet/screening/record/fileview?filePath=${that.screeningResultData.attachment}`
|
||||||
console.log(url, '1')
|
console.log(url, '1')
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
绑定设备,关注健康
|
绑定设备,关注健康
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="device">
|
<view class="device" @tap='gotestreport'>
|
||||||
<image src="../../static/pageC/report.png" mode=""></image>
|
<image src="../../static/pageC/report.png" mode=""></image>
|
||||||
<span class="deviceitem">检测报告</span>
|
<span class="deviceitem">检测报告</span>
|
||||||
<view class="itemdata">
|
<view class="itemdata">
|
||||||
@ -366,8 +366,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
info() {
|
info() {
|
||||||
// userinfo.cardNo,
|
recordlast(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||||
recordlast('370882199909092123').then(res => {
|
|
||||||
res.data.forEach(e => {
|
res.data.forEach(e => {
|
||||||
e.type == '1' ? this.dataone = e : ''
|
e.type == '1' ? this.dataone = e : ''
|
||||||
e.type == '2' ? this.datatwo = e : ''
|
e.type == '2' ? this.datatwo = e : ''
|
||||||
@ -395,6 +394,11 @@
|
|||||||
url: `/pagesC/healthdata/healthdata?index=${index}`
|
url: `/pagesC/healthdata/healthdata?index=${index}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
gotestreport() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesC/testreport/testreport"
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -13,14 +13,12 @@
|
|||||||
筛查机构:
|
筛查机构:
|
||||||
<span>{{screeningResultData.hospitalName}}</span>
|
<span>{{screeningResultData.hospitalName}}</span>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item">
|
<view class="item">
|
||||||
筛查医生:
|
筛查医生:
|
||||||
<span>{{screeningResultData.doctorName}}</span>
|
<span>{{screeningResultData.doctorName}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemend">
|
<view class="itemend">
|
||||||
筛查结果:
|
筛查结果:
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<view style="text-align: center;">
|
<view style="text-align: center;">
|
||||||
@ -57,14 +55,11 @@
|
|||||||
<view class="imageitem">
|
<view class="imageitem">
|
||||||
<image src="../../static/pagesB/Behave.png" mode=""></image>
|
<image src="../../static/pagesB/Behave.png" mode=""></image>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="item">
|
<view class="item">
|
||||||
诊断结果:
|
诊断结果:
|
||||||
<span>{{screeningResultData.diagnosticResult}}</span>
|
<span>{{screeningResultData.diagnosticResult}}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -90,21 +85,15 @@
|
|||||||
this.projectId = e.projectId
|
this.projectId = e.projectId
|
||||||
this.getLastScreeningResult()
|
this.getLastScreeningResult()
|
||||||
console.log(e)
|
console.log(e)
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.baseurl = baseurl
|
this.baseurl = baseurl
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// 获取最新的筛查结果
|
// 获取最新的筛查结果
|
||||||
getLastScreeningResult() {
|
getLastScreeningResult() {
|
||||||
|
|
||||||
lastScreeningResult(this.patientld, this.projectId).then(res => {
|
lastScreeningResult(this.patientld, this.projectId).then(res => {
|
||||||
this.screeningResultData = res.data
|
this.screeningResultData = res.data
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 查看报告
|
// 查看报告
|
||||||
|
|||||||
@ -89,8 +89,7 @@
|
|||||||
bmi: (this.weight / ((this.height / 100) * (this.height / 100))).toFixed(2),
|
bmi: (this.weight / ((this.height / 100) * (this.height / 100))).toFixed(2),
|
||||||
height: this.height,
|
height: this.height,
|
||||||
weight: this.weight,
|
weight: this.weight,
|
||||||
// identity: uni.getStorageSync('userinfo').cardNo
|
identity: uni.getStorageSync('userinfo').cardNo,
|
||||||
identity: '370882199909092123',
|
|
||||||
measureTime: this.timetext,
|
measureTime: this.timetext,
|
||||||
}
|
}
|
||||||
savebmi(data).then(res => {
|
savebmi(data).then(res => {
|
||||||
@ -127,7 +126,7 @@
|
|||||||
width: 60%;
|
width: 60%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
margin: 60rpx auto;
|
margin: 60rpx auto;
|
||||||
background-color: #55d0df;
|
background-color: #4AC4AB;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
border: solid 0rpx #0c0c0c;
|
border: solid 0rpx #0c0c0c;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|||||||
@ -92,8 +92,7 @@
|
|||||||
ldl: this.ldl,
|
ldl: this.ldl,
|
||||||
tc: this.tc,
|
tc: this.tc,
|
||||||
tg: this.tg,
|
tg: this.tg,
|
||||||
// identity: uni.getStorageSync('userinfo').cardNo
|
identity: uni.getStorageSync('userinfo').cardNo,
|
||||||
identity: '370882199909092123',
|
|
||||||
measureTime: this.timetext,
|
measureTime: this.timetext,
|
||||||
}
|
}
|
||||||
savebf(data).then(res => {
|
savebf(data).then(res => {
|
||||||
@ -138,7 +137,7 @@
|
|||||||
width: 60%;
|
width: 60%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
margin: 60rpx auto;
|
margin: 60rpx auto;
|
||||||
background-color: #55d0df;
|
background-color: #4AC4AB;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
border: solid 0rpx #0c0c0c;
|
border: solid 0rpx #0c0c0c;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|||||||
@ -70,8 +70,7 @@
|
|||||||
let data = {
|
let data = {
|
||||||
pulse: this.pulse,
|
pulse: this.pulse,
|
||||||
spo2: this.spo2,
|
spo2: this.spo2,
|
||||||
// identity: uni.getStorageSync('userinfo').cardNo
|
identity: uni.getStorageSync('userinfo').cardNo,
|
||||||
identity: '370882199909092123',
|
|
||||||
measureTime: this.timetext,
|
measureTime: this.timetext,
|
||||||
}
|
}
|
||||||
savebo(data).then(res => {
|
savebo(data).then(res => {
|
||||||
@ -116,7 +115,7 @@
|
|||||||
width: 60%;
|
width: 60%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
margin: 60rpx auto;
|
margin: 60rpx auto;
|
||||||
background-color: #55d0df;
|
background-color: #4AC4AB;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
border: solid 0rpx #0c0c0c;
|
border: solid 0rpx #0c0c0c;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|||||||
@ -37,8 +37,24 @@
|
|||||||
hr: '',
|
hr: '',
|
||||||
timetext: this.formatDate(Date.now()),
|
timetext: this.formatDate(Date.now()),
|
||||||
measureTime: this.formatDate(Date.now()),
|
measureTime: this.formatDate(Date.now()),
|
||||||
|
uploadType: undefined,
|
||||||
|
timeoutObj: null,
|
||||||
|
socketOpen: false,
|
||||||
|
SOCKETURL: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.forEach(e => {
|
||||||
|
if (e.deviceType == 1) {
|
||||||
|
this.SOCKETURL = `ws://112.6.122.71:8009/fd/webSocket/${e.sn}`
|
||||||
|
this.scoket();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatDate(timestamp) {
|
formatDate(timestamp) {
|
||||||
const now = new Date(parseInt(timestamp))
|
const now = new Date(parseInt(timestamp))
|
||||||
@ -55,13 +71,79 @@
|
|||||||
timeconfirm(time) {
|
timeconfirm(time) {
|
||||||
this.timetext = time
|
this.timetext = time
|
||||||
},
|
},
|
||||||
|
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);
|
||||||
|
this.uploadType = 2
|
||||||
|
this.hr = JSON.parse(res.data).pulse
|
||||||
|
this.$forceUpdate()
|
||||||
|
})
|
||||||
|
} 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('心跳发送失败,重新连接...');
|
||||||
|
console.log(this.SOCKETURL)
|
||||||
|
that.socketOpen = true
|
||||||
|
uni.connectSocket({
|
||||||
|
url: this.SOCKETURL
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 60000)
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
if (this.hr) {
|
if (this.hr) {
|
||||||
let data = {
|
let data = {
|
||||||
hr: this.hr,
|
hr: this.hr,
|
||||||
uploadType: 1,
|
uploadType: this.uploadType ? this.uploadType : 1,
|
||||||
// identity: uni.getStorageSync('userinfo').cardNo
|
identity: uni.getStorageSync('userinfo').cardNo,
|
||||||
identity: '370882199909092123',
|
|
||||||
measureTime: this.timetext,
|
measureTime: this.timetext,
|
||||||
}
|
}
|
||||||
savehr(data).then(res => {
|
savehr(data).then(res => {
|
||||||
@ -92,7 +174,12 @@
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
onUnload() {
|
||||||
|
if (this.socketOpen) {
|
||||||
|
uni.closeSocket();
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -106,7 +193,7 @@
|
|||||||
width: 60%;
|
width: 60%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
margin: 60rpx auto;
|
margin: 60rpx auto;
|
||||||
background-color: #55d0df;
|
background-color: #4AC4AB;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
border: solid 0rpx #0c0c0c;
|
border: solid 0rpx #0c0c0c;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|||||||
@ -49,6 +49,9 @@
|
|||||||
import {
|
import {
|
||||||
savebp
|
savebp
|
||||||
} from '@/api/examinationapi/add.js'
|
} from '@/api/examinationapi/add.js'
|
||||||
|
import {
|
||||||
|
bound,
|
||||||
|
} from '@/api/examinationapi/add.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -57,8 +60,24 @@
|
|||||||
hr: '',
|
hr: '',
|
||||||
timetext: this.formatDate(Date.now()),
|
timetext: this.formatDate(Date.now()),
|
||||||
measureTime: this.formatDate(Date.now()),
|
measureTime: this.formatDate(Date.now()),
|
||||||
|
uploadType: undefined,
|
||||||
|
timeoutObj: null,
|
||||||
|
socketOpen: false,
|
||||||
|
SOCKETURL: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.forEach(e => {
|
||||||
|
if (e.deviceType == 1) {
|
||||||
|
this.SOCKETURL = `ws://112.6.122.71:8009/fd/webSocket/${e.sn}`
|
||||||
|
this.scoket();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatDate(timestamp) {
|
formatDate(timestamp) {
|
||||||
const now = new Date(parseInt(timestamp))
|
const now = new Date(parseInt(timestamp))
|
||||||
@ -75,16 +94,84 @@
|
|||||||
timeconfirm(time) {
|
timeconfirm(time) {
|
||||||
this.timetext = time
|
this.timetext = time
|
||||||
},
|
},
|
||||||
|
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);
|
||||||
|
this.uploadType = 2
|
||||||
|
this.dbp = JSON.parse(res.data).dbp
|
||||||
|
this.sbp = JSON.parse(res.data).sbp
|
||||||
|
this.hr = JSON.parse(res.data).pulse
|
||||||
|
this.$forceUpdate()
|
||||||
|
})
|
||||||
|
} 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('心跳发送失败,重新连接...');
|
||||||
|
console.log(this.SOCKETURL)
|
||||||
|
that.socketOpen = true
|
||||||
|
uni.connectSocket({
|
||||||
|
url: this.SOCKETURL
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 60000)
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
if (this.ruls(this.dbp) && this.ruls(this.sbp) && this.ruls(this.hr)) {
|
if (this.ruls(this.dbp) && this.ruls(this.sbp) && this.ruls(this.hr)) {
|
||||||
let data = {
|
let data = {
|
||||||
dbp: this.dbp,
|
dbp: this.dbp,
|
||||||
sbp: this.sbp,
|
sbp: this.sbp,
|
||||||
hr: this.hr,
|
hr: this.hr,
|
||||||
// identity: uni.getStorageSync('userinfo').cardNo
|
identity: uni.getStorageSync('userinfo').cardNo,
|
||||||
identity: '370882199909092123',
|
|
||||||
measureTime: this.timetext,
|
measureTime: this.timetext,
|
||||||
uploadType: 1,
|
uploadType: this.uploadType ? this.uploadType : 1,
|
||||||
}
|
}
|
||||||
savebp(data).then(res => {
|
savebp(data).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -113,8 +200,13 @@
|
|||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
if (this.socketOpen) {
|
||||||
|
uni.closeSocket();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -128,7 +220,7 @@
|
|||||||
width: 60%;
|
width: 60%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
margin: 60rpx auto;
|
margin: 60rpx auto;
|
||||||
background-color: #55d0df;
|
background-color: #4AC4AB;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
border: solid 0rpx #0c0c0c;
|
border: solid 0rpx #0c0c0c;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|||||||
@ -58,8 +58,7 @@
|
|||||||
submit() {
|
submit() {
|
||||||
if (this.timetext && this.temp) {
|
if (this.timetext && this.temp) {
|
||||||
let data = {
|
let data = {
|
||||||
// identity: uni.getStorageSync('userinfo').cardNo
|
identity: uni.getStorageSync('userinfo').cardNo,
|
||||||
identity: '370882199909092123',
|
|
||||||
measureTime: this.timetext,
|
measureTime: this.timetext,
|
||||||
temp: this.temp,
|
temp: this.temp,
|
||||||
}
|
}
|
||||||
@ -105,7 +104,7 @@
|
|||||||
width: 60%;
|
width: 60%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
margin: 60rpx auto;
|
margin: 60rpx auto;
|
||||||
background-color: #55d0df;
|
background-color: #4AC4AB;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
border: solid 0rpx #0c0c0c;
|
border: solid 0rpx #0c0c0c;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|||||||
@ -39,8 +39,7 @@
|
|||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
deviceType: undefined,
|
deviceType: undefined,
|
||||||
// identity: uni.getStorageSync('userinfo').cardNo,
|
identity: uni.getStorageSync('userinfo').cardNo,
|
||||||
identity: '370882199909092123',
|
|
||||||
sn: '',
|
sn: '',
|
||||||
bindTime: undefined, //绑定时间
|
bindTime: undefined, //绑定时间
|
||||||
state: 1,
|
state: 1,
|
||||||
@ -116,7 +115,7 @@
|
|||||||
width: 60%;
|
width: 60%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
margin: 60rpx auto;
|
margin: 60rpx auto;
|
||||||
background-color: #55d0df;
|
background-color: #4AC4AB;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
border: solid 0rpx #0c0c0c;
|
border: solid 0rpx #0c0c0c;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
@ -150,8 +149,8 @@
|
|||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
border: solid 1rpx #55d0df;
|
border: solid 1rpx #4AC4AB;
|
||||||
color: #55d0df;
|
color: #4AC4AB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +190,7 @@
|
|||||||
.left {
|
.left {
|
||||||
width: 8rpx;
|
width: 8rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
background-color: #55d0df;
|
background-color: #4AC4AB;
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,16 +45,36 @@
|
|||||||
import {
|
import {
|
||||||
savebg
|
savebg
|
||||||
} from '@/api/examinationapi/add.js'
|
} from '@/api/examinationapi/add.js'
|
||||||
|
import {
|
||||||
|
bound,
|
||||||
|
} from '@/api/examinationapi/add.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
uploadType: undefined,
|
||||||
number: '',
|
number: '',
|
||||||
timetext: this.formatDate(Date.now()),
|
timetext: this.formatDate(Date.now()),
|
||||||
measureTime: this.formatDate(Date.now()),
|
measureTime: this.formatDate(Date.now()),
|
||||||
bucketchoice: 1,
|
bucketchoice: 1,
|
||||||
|
timeoutObj: null,
|
||||||
|
socketOpen: false,
|
||||||
|
SOCKETURL: '',
|
||||||
|
// 德州的用:ws://112.6.122.71:8009/fd/webSocket/{sn}
|
||||||
|
// 东营的用:ws://218.58.213.15:8009/fd/webSocket/{sn}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {},
|
onLoad(options) {
|
||||||
|
bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.forEach(e => {
|
||||||
|
if (e.deviceType == 2) {
|
||||||
|
this.SOCKETURL = `ws://112.6.122.71:8009/fd/webSocket/${e.sn}`
|
||||||
|
this.scoket();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
timeconfirm(time) {
|
timeconfirm(time) {
|
||||||
this.timetext = time
|
this.timetext = time
|
||||||
@ -83,9 +103,8 @@
|
|||||||
bg: this.number,
|
bg: this.number,
|
||||||
bucket: this.bucketchoice,
|
bucket: this.bucketchoice,
|
||||||
measureTime: this.measureTime,
|
measureTime: this.measureTime,
|
||||||
uploadType: 1,
|
uploadType: this.uploadType ? this.uploadType : 1,
|
||||||
// identity: uni.getStorageSync('userinfo').cardNo
|
identity: uni.getStorageSync('userinfo').cardNo
|
||||||
identity: '370882199909092123'
|
|
||||||
}
|
}
|
||||||
savebg(data).then(res => {
|
savebg(data).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -100,8 +119,80 @@
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
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);
|
||||||
|
this.uploadType = 2
|
||||||
|
this.number = JSON.parse(res.data).fbg
|
||||||
|
this.$forceUpdate()
|
||||||
|
})
|
||||||
|
} 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('心跳发送失败,重新连接...');
|
||||||
|
console.log(this.SOCKETURL)
|
||||||
|
that.socketOpen = true
|
||||||
|
uni.connectSocket({
|
||||||
|
url: this.SOCKETURL
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 60000)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
if (this.socketOpen) {
|
||||||
|
uni.closeSocket();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -35,8 +35,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getbindDeviceList() {
|
getbindDeviceList() {
|
||||||
// uni.getStorageSync('userinfo').cardNo
|
bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||||
bound('370882199909092123').then(res => {
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.deviceList = res.data
|
this.deviceList = res.data
|
||||||
}
|
}
|
||||||
@ -53,8 +52,7 @@
|
|||||||
remark: e.remark,
|
remark: e.remark,
|
||||||
id: e.id,
|
id: e.id,
|
||||||
bindTime: e.bindTime,
|
bindTime: e.bindTime,
|
||||||
// identity: uni.getStorageSync('userinfo').cardNo,
|
identity: uni.getStorageSync('userinfo').cardNo,
|
||||||
identity: '370882199909092123',
|
|
||||||
sn: e.sn,
|
sn: e.sn,
|
||||||
unbindTime: that.timeFormat(),
|
unbindTime: that.timeFormat(),
|
||||||
state: 0,
|
state: 0,
|
||||||
|
|||||||
@ -93,8 +93,7 @@
|
|||||||
let userinfo = uni.getStorageSync('userinfo');
|
let userinfo = uni.getStorageSync('userinfo');
|
||||||
var obj = {
|
var obj = {
|
||||||
label: Number(this.tabindex) + 1,
|
label: Number(this.tabindex) + 1,
|
||||||
// identity: userinfo.cardNo,
|
identity: userinfo.cardNo,
|
||||||
identity: '370882199909092123',
|
|
||||||
type: this.type,
|
type: this.type,
|
||||||
}
|
}
|
||||||
record(obj).then(res => {
|
record(obj).then(res => {
|
||||||
|
|||||||
@ -701,7 +701,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sendBox {
|
.sendBox {
|
||||||
background-color: #55d0df7d;
|
background-color: #4AC4AB;
|
||||||
padding: 18rpx 20rpx;
|
padding: 18rpx 20rpx;
|
||||||
border-radius: 0 0 10rpx 10rpx;
|
border-radius: 0 0 10rpx 10rpx;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
|
|||||||
@ -684,7 +684,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sendBox {
|
.sendBox {
|
||||||
background-color: #55d0df7d;
|
background-color: #4AC4AB;
|
||||||
padding: 18rpx 20rpx;
|
padding: 18rpx 20rpx;
|
||||||
border-radius: 0 0 10rpx 10rpx;
|
border-radius: 0 0 10rpx 10rpx;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
|
|||||||
172
pagesC/testreport/testreport.vue
Normal file
172
pagesC/testreport/testreport.vue
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="item" v-for="item in list">
|
||||||
|
<view class="time">
|
||||||
|
{{item.date}}
|
||||||
|
</view>
|
||||||
|
<view class="name">
|
||||||
|
{{item.reportId}}
|
||||||
|
</view>
|
||||||
|
<view class="btn" v-if="item.existReport==1" @tap='lookReport(item)'>
|
||||||
|
<span>查看报告</span>
|
||||||
|
</view>
|
||||||
|
<view class="btn2" v-if="item.existReport==2">
|
||||||
|
<span>暂无报告</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
dyrecord,
|
||||||
|
dzrecord,
|
||||||
|
dyreport,
|
||||||
|
dzreport
|
||||||
|
} from '@/api/pagesC/testreport/index.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
region: undefined,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.region = uni.getStorageSync('region')
|
||||||
|
if (this.region == 1) {
|
||||||
|
dzrecord('370785199502153071').then(res => {
|
||||||
|
res.data.forEach(e => {
|
||||||
|
e.existReport = Number(e.existReport)
|
||||||
|
})
|
||||||
|
this.list = res.data
|
||||||
|
})
|
||||||
|
} else if (this.region == 2) {
|
||||||
|
dyrecord('370785199502153071').then(res => {
|
||||||
|
res.data.forEach(e => {
|
||||||
|
e.existReport = Number(e.existReport)
|
||||||
|
})
|
||||||
|
this.list = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 东营获取驿站报告接口:http://218.58.213.15:8009/fd/sh05/report/view/{reportId}
|
||||||
|
// 德州获取驿站报告接口:http://112.6.122.71:8009/fd/sh05/report/view/{reportId}
|
||||||
|
lookReport(item) {
|
||||||
|
if (this.region == 1) {
|
||||||
|
uni.downloadFile({
|
||||||
|
url: `http://112.6.122.71:8009/fd/sh05/report/download/${item.reportId}`,
|
||||||
|
success: function(res) {
|
||||||
|
console.log(res)
|
||||||
|
var filePath = res.tempFilePath;
|
||||||
|
uni.openDocument({
|
||||||
|
filePath: filePath,
|
||||||
|
showMenu: true,
|
||||||
|
fileType: 'pdf',
|
||||||
|
success: function(resp) {
|
||||||
|
console.log(resp)
|
||||||
|
console.log('打开文档成功');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (this.region == 2) {
|
||||||
|
uni.downloadFile({
|
||||||
|
url: `http://8.131.93.145:54098/fd/sh05/report/download/${item.reportId}`,
|
||||||
|
success: function(res) {
|
||||||
|
console.log(res)
|
||||||
|
var filePath = res.tempFilePath;
|
||||||
|
uni.openDocument({
|
||||||
|
filePath: filePath,
|
||||||
|
fileType: 'pdf',
|
||||||
|
showMenu: true,
|
||||||
|
success: function(resp) {
|
||||||
|
console.log(resp)
|
||||||
|
console.log('打开文档成功');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.app {
|
||||||
|
.item {
|
||||||
|
height: 200rpx;
|
||||||
|
width: 96%;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
margin: 20rpx auto 0;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.btn2 {
|
||||||
|
/* 左上角飘带 */
|
||||||
|
background-color: #A4A0A0;
|
||||||
|
/* 左上角飘带的背景颜色 */
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 文字不换行*/
|
||||||
|
position: absolute;
|
||||||
|
/* 绝对定位 */
|
||||||
|
right: -60rpx;
|
||||||
|
top: 20rpx;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
/* 旋转45°*/
|
||||||
|
box-shadow: 0 0 10rpx #888;
|
||||||
|
/* 飘带的阴影*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn2 span {
|
||||||
|
border: 1rpx solid #A4A0A0;
|
||||||
|
color: #fff;
|
||||||
|
display: block;
|
||||||
|
font: bold 100% 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
|
margin: 1rpx 0;
|
||||||
|
padding: 10rpx 50rpx;
|
||||||
|
text-align: center;
|
||||||
|
text-shadow: 0 0 5rpx #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
/* 左上角飘带 */
|
||||||
|
background-color: #FFA115;
|
||||||
|
/* 左上角飘带的背景颜色 */
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 文字不换行*/
|
||||||
|
position: absolute;
|
||||||
|
/* 绝对定位 */
|
||||||
|
right: -60rpx;
|
||||||
|
top: 20rpx;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
/* 旋转45°*/
|
||||||
|
box-shadow: 0 0 10rpx #888;
|
||||||
|
/* 飘带的阴影*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn span {
|
||||||
|
border: 1rpx solid #FFA115;
|
||||||
|
color: #fff;
|
||||||
|
display: block;
|
||||||
|
font: bold 100% 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
|
margin: 1rpx 0;
|
||||||
|
padding: 10rpx 50rpx;
|
||||||
|
text-align: center;
|
||||||
|
text-shadow: 0 0 5rpx #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
margin: 20rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
margin: 20rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user