Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
闫晓茹 2024-02-05 17:06:44 +08:00
commit 4983323f45
8 changed files with 35 additions and 23 deletions

View File

@ -1,11 +1,12 @@
import request from "../../request.js" import request from "../../request.js"
// 获取项目 // 获取项目
export function projectTypedata(patientId) { export function getAppointProject(patientId,identity) {
return request({ return request({
url: `/nurseApplet/screening/project/list?patientId=${patientId}`, url: `/nurseApplet/screening/project/getAppointProject?patientId=${patientId}&identity=${identity}`,
method: 'GET', method: 'GET',
header: { header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
region: uni.getStorageSync('region'),
}, },
}) })
} }

View File

@ -1,11 +1,13 @@
import request from "../../request.js" import request from "../../request.js"
// 获取筛查结果列表 // 获取筛查结果列表
export function screeningResultList(patientId,pageNum,pageSize) { export function screeningResultList(patientId,identity,pageNum,pageSize) {
return request({ return request({
url: `/nurseApplet/screening/record/record?patientId=${patientId}&pageNum=${pageNum}&pageSize=${pageSize}`, url: `/nurseApplet/screening/record/record?patientId=${patientId}&identity=${identity}&pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'GET', method: 'GET',
header: { header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
region: uni.getStorageSync('region'),
}, },
}) })
} }

View File

@ -1,15 +1,21 @@
import request from "../../request.js" import request from "../../request.js"
// 获取最新的筛查结果 // 获取最新的筛查结果
export function lastScreeningResult(patientld,projectld) { export function lastScreeningResult(identity,projectld) {
return request({ return request({
url: `/nurseApplet/screening/record/last/${patientld}/${projectld}`, url: `/nurseApplet/screening/record/last/${identity}/${projectld}`,
method: 'GET' method: 'GET',
header: {
region: uni.getStorageSync('region'),
},
}) })
} }
// 获取筛查结果详情 // 获取筛查结果详情
export function screeningResultDetail(screeningId) { export function screeningResultDetail(screeningId) {
return request({ return request({
url: `/nurseApplet/screening/record/detail/${screeningId}`, url: `/nurseApplet/screening/record/detail/${screeningId}`,
method: 'GET' method: 'GET',
header: {
region: uni.getStorageSync('region'),
},
}) })
} }

View File

@ -16,7 +16,7 @@
<script> <script>
import { import {
projectTypedata getAppointProject
} from '@/api/pagesB/SelectItem/SelectItem.js' } from '@/api/pagesB/SelectItem/SelectItem.js'
export default { export default {
data() { data() {
@ -25,7 +25,7 @@
}; };
}, },
onShow() { onShow() {
projectTypedata(uni.getStorageSync('userinfo').id).then(res => { getAppointProject(uni.getStorageSync('userinfo').id,uni.getStorageSync('userinfo').cardNo).then(res => {
this.prejectlist = res.data this.prejectlist = res.data
}) })
}, },

View File

@ -39,7 +39,7 @@
methods: { methods: {
// //
getScreeningResultList() { getScreeningResultList() {
screeningResultList(this.registerId, this.pageNum, this.pageSize).then(res => { screeningResultList(this.registerId,uni.getStorageSync('userinfo').cardNo,this.pageNum, this.pageSize).then(res => {
this.screeningResultData = res.rows this.screeningResultData = res.rows
this.total = res.total this.total = res.total
}) })
@ -54,7 +54,7 @@
onReachBottom() { // onReachBottom() { //
if (this.screeningResultData.length >= this.total) {} else { if (this.screeningResultData.length >= this.total) {} else {
this.pageNum++; this.pageNum++;
screeningResultList(this.registerId, this.pageNum, this.pageSize).then(res => { screeningResultList(this.registerId,uni.getStorageSync('userinfo').cardNo, this.pageNum, this.pageSize).then(res => {
res.rows.forEach(e => { res.rows.forEach(e => {
this.screeningResultData.push(e) this.screeningResultData.push(e)
}) })

View File

@ -168,6 +168,9 @@
uni.downloadFile({ uni.downloadFile({
url: url, url: url,
responseType: 'blob', responseType: 'blob',
header: {
region: uni.getStorageSync('region'),
},
success: function(resp) { success: function(resp) {
var filePath = resp.tempFilePath; var filePath = resp.tempFilePath;
uni.openDocument({ uni.openDocument({
@ -220,7 +223,7 @@
}, },
// //
getLastScreeningResult() { getLastScreeningResult() {
lastScreeningResult(this.patientld, this.projectId).then(res => { lastScreeningResult(uni.getStorageSync('userinfo').cardNo, this.projectId).then(res => {
if (res.code == 200 && res.data.projectName) { if (res.code == 200 && res.data.projectName) {
this.items.push(res.data.projectName) this.items.push(res.data.projectName)
} }
@ -233,7 +236,6 @@
}, },
goToScreeningRecord() { goToScreeningRecord() {
uni.navigateTo({ uni.navigateTo({
// url: `../screeningRecord/screeningRecord?registerId=${this.registerId}`
url: `/pagesB/screeningRecord/screeningRecord?registerId=${this.patientld}` url: `/pagesB/screeningRecord/screeningRecord?registerId=${this.patientld}`
}) })
} }

View File

@ -11,11 +11,11 @@
</view> </view>
<view class="item"> <view class="item">
筛查机构 筛查机构
<span>{{screeningResultData.hospitalName}}</span> <span v-if="screeningResultData.hospitalName">{{screeningResultData.hospitalName}}</span>
</view> </view>
<view class="item"> <view class="item">
筛查医生 筛查医生
<span>{{screeningResultData.doctorName}}</span> <span v-if="screeningResultData.doctorName">{{screeningResultData.doctorName}}</span>
</view> </view>
<view class="itemend"> <view class="itemend">
筛查结果: 筛查结果:
@ -74,14 +74,14 @@
return { return {
screeningResultData: {}, screeningResultData: {},
projectId: '', projectId: '',
patientld: '', identity: '',
userinfo: {}, userinfo: {},
baseurl: '', baseurl: '',
}; };
}, },
onLoad(e) { onLoad(e) {
this.userinfo = uni.getStorageSync('userinfo'); this.userinfo = uni.getStorageSync('userinfo');
this.patientld = this.userinfo.id; this.identity = this.userinfo.cardNo;
this.projectId = e.projectId this.projectId = e.projectId
this.getLastScreeningResult() this.getLastScreeningResult()
console.log(e) console.log(e)
@ -92,7 +92,7 @@
methods: { methods: {
// //
getLastScreeningResult() { getLastScreeningResult() {
lastScreeningResult(this.patientld, this.projectId).then(res => { lastScreeningResult(this.identity, this.projectId).then(res => {
this.screeningResultData = res.data this.screeningResultData = res.data
}) })
}, },

View File

@ -18,7 +18,7 @@
<script> <script>
import { import {
projectTypedata getAppointProject
} from '@/api/pagesB/SelectItem/SelectItem.js' } from '@/api/pagesB/SelectItem/SelectItem.js'
export default { export default {
data() { data() {
@ -30,7 +30,8 @@
onShow() { onShow() {
this.userinfo=uni.getStorageSync('userinfo'); this.userinfo=uni.getStorageSync('userinfo');
var patientId=this.userinfo.id var patientId=this.userinfo.id
projectTypedata(patientId).then(res=>{ var identity=this.userinfo.cardNo
getAppointProject(patientId,identity).then(res=>{
this.prejectlist=res.data this.prejectlist=res.data