修改
This commit is contained in:
parent
e633e1a756
commit
131d230b4d
14
App.vue
14
App.vue
@ -1,8 +1,18 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
mapMutations
|
||||||
|
} from "vuex";
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {},
|
onLaunch: function() {},
|
||||||
|
methods: {
|
||||||
|
...mapMutations(['socketOpenfalse']),
|
||||||
|
},
|
||||||
onShow: function() {},
|
onShow: function() {},
|
||||||
onHide: function() {}
|
onHide: function() {
|
||||||
|
this.socketOpenfalse();
|
||||||
|
uni.closeSocket();
|
||||||
|
clearInterval(this.$store.state.timeoutObj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -20,4 +30,4 @@
|
|||||||
text-align: justify;
|
text-align: justify;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,45 +1,21 @@
|
|||||||
var request = function(config) {
|
import request from "@/api/request.js"
|
||||||
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)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//获取东营报告list
|
//获取东营报告list
|
||||||
// 东营驿站记录接口:http://218.58.213.15:8009/fd/sh05/record/{identity}
|
// 东营驿站记录接口:http://218.58.213.15:8009/fd/sh05/record/{identity}
|
||||||
// 东营获取驿站报告接口:http://218.58.213.15:8009/fd/sh05/report/view/{reportId}
|
// 东营获取驿站报告接口:http://218.58.213.15:8009/fd/sh05/report/view/{reportId}
|
||||||
export function dyrecord(identity) {
|
export function dyrecord(identity) {
|
||||||
return request({
|
return request({
|
||||||
url: `http://218.58.213.15:8009/fd/sh05/record/${identity}`,
|
url: `/fado/dy/sh05/record/${identity}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取德州报告list
|
|
||||||
|
|
||||||
|
//获取德州报告list
|
||||||
// 德州驿站记录接口: http: //112.6.122.71:8009/fd/sh05/record/{identity}
|
// 德州驿站记录接口: http: //112.6.122.71:8009/fd/sh05/record/{identity}
|
||||||
// 德州获取驿站报告接口: http: //112.6.122.71:8009/fd/sh05/report/view/{reportId}
|
// 德州获取驿站报告接口: http: //112.6.122.71:8009/fd/sh05/report/view/{reportId}
|
||||||
export function dzrecord(identity) {
|
export function dzrecord(identity) {
|
||||||
return request({
|
return request({
|
||||||
url: `http://112.6.122.71:8009/fd/sh05/record/${identity}`,
|
url: `/fado/dz/sh05/record/${identity}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -5,7 +5,8 @@
|
|||||||
{{item.date}}
|
{{item.date}}
|
||||||
</view>
|
</view>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
{{item.reportId}}
|
<!-- {{item.reportId}} -->
|
||||||
|
检测报告
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" v-if="item.existReport==1" @tap='lookReport(item)'>
|
<view class="btn" v-if="item.existReport==1" @tap='lookReport(item)'>
|
||||||
<span>查看报告</span>
|
<span>查看报告</span>
|
||||||
@ -24,14 +25,17 @@
|
|||||||
dyreport,
|
dyreport,
|
||||||
dzreport
|
dzreport
|
||||||
} from '@/api/pagesC/testreport/index.js'
|
} from '@/api/pagesC/testreport/index.js'
|
||||||
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
region: undefined,
|
region: undefined,
|
||||||
|
baseurl: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.baseurl = baseurl
|
||||||
this.region = uni.getStorageSync('region')
|
this.region = uni.getStorageSync('region')
|
||||||
if (this.region == 1) {
|
if (this.region == 1) {
|
||||||
dzrecord(uni.getStorageSync('userinfo').cardNo).then(res => {
|
dzrecord(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||||
@ -55,7 +59,7 @@
|
|||||||
lookReport(item) {
|
lookReport(item) {
|
||||||
if (this.region == 1) {
|
if (this.region == 1) {
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: `http://112.6.122.71:8009/fd/sh05/report/download/${item.reportId}`,
|
url: `${this.baseurl}/fado/dz/sh05/report/download/${item.reportId}`,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
var filePath = res.tempFilePath;
|
var filePath = res.tempFilePath;
|
||||||
@ -72,7 +76,7 @@
|
|||||||
});
|
});
|
||||||
} else if (this.region == 2) {
|
} else if (this.region == 2) {
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: `http://218.58.213.15:8009/fd/sh05/report/download/${item.reportId}`,
|
url: `${this.baseurl}/fado/dy/sh05/report/download/${item.reportId}`,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
var filePath = res.tempFilePath;
|
var filePath = res.tempFilePath;
|
||||||
@ -161,7 +165,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
margin: 20rpx 0 0 20rpx;
|
font-size: 40rpx;
|
||||||
|
margin: 40rpx 0 0 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
|
|||||||
@ -39,7 +39,7 @@ const store = new Vuex.Store({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 3000)
|
||||||
})
|
})
|
||||||
uni.onSocketError(err => {
|
uni.onSocketError(err => {
|
||||||
console.log('webScoket连接打开失败', err);
|
console.log('webScoket连接打开失败', err);
|
||||||
@ -49,7 +49,7 @@ const store = new Vuex.Store({
|
|||||||
uni.connectSocket({
|
uni.connectSocket({
|
||||||
url: state.SOCKETURL
|
url: state.SOCKETURL
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 3000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.onSocketClose(err => {
|
uni.onSocketClose(err => {
|
||||||
@ -60,13 +60,16 @@ const store = new Vuex.Store({
|
|||||||
uni.connectSocket({
|
uni.connectSocket({
|
||||||
url: state.SOCKETURL
|
url: state.SOCKETURL
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 3000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
socketOpenfalse(state) {
|
||||||
|
state.socketOpen = false
|
||||||
|
},
|
||||||
//相当于同步的操作
|
//相当于同步的操作
|
||||||
//点击确认
|
//点击确认
|
||||||
integralsubscribesuccess(state) {
|
integralsubscribesuccess(state) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user