体检-体检报告

This commit is contained in:
binbin_pan 2024-09-05 15:05:17 +08:00
parent 7bf27993b3
commit c73e25f07d
10 changed files with 511 additions and 212 deletions

View File

@ -36,7 +36,9 @@ module.exports = {
uploadUrl: 'http://192.168.0.14:19999/exam-file/file/uploadBase64',
bmwUrl: 'http://192.168.0.14:19999/exam-bmw',
// 体检-基础路径
tjBaseUrl: 'http://192.168.0.14:20000/AppPeaManager',
// tjBaseUrl: 'http://192.168.0.14:20000/AppPeaManager',
tjBaseUrl: 'http://192.168.2.147:20000/AppPeaManager',
tjFile: 'http://112.29.103.165:1616/medicalDocumentation/statics/',
// 应用信息
appInfo: {
// 应用名称

View File

@ -213,13 +213,19 @@
{
"path": "pages/HealthExaminationApp/report/report",
"style": {
"navigationBarTitleText": "提交报告"
"navigationBarTitleText": "体检报告"
}
},
{
"path": "pages/HealthExaminationApp/report/pdfView",
"style": {
"navigationBarTitleText": "体检报告"
}
},
{
"path": "pages/HealthExaminationApp/myAppointment/myAppointment",
"style": {
"navigationBarTitleText": "我的预约"
"navigationStyle": "custom"
}
},
{

View File

@ -107,7 +107,7 @@
<div>联系方式: {{ hospitalInfo.telPhone }}</div>
</div>
<div style="margin: 30px 60px" v-if="hospital && checkType && healthTime">
<div style="margin: 30px 60px" v-if="hospital && checkType && healthTime && reservationNumber != 0">
<u-button type="primary" text="确定预约" shape="circle" size="small" @click="handleSave"></u-button>
</div>
</view>
@ -351,6 +351,7 @@ export default {
res = res.data
console.log('🚀 ~ handleSave ~ res:', res)
if (res.res == 1) {
uni.setStorageSync('appoint', true)
uni.showToast({
title: '预约成功',
icon: 'success'

View File

@ -72,6 +72,16 @@ export default {
},
//
handlePage(url) {
if (
(url == 'appointment' && uni.getStorageSync('appoint')) ||
(url == 'jobAppointment' && uni.getStorageSync('jobAppoint'))
) {
uni.showToast({
title: '您已经预约过,无法再次预约!',
icon: 'none'
})
return
}
uni.navigateTo({
url: `/pages/HealthExaminationApp/${url}/${url}?params=${JSON.stringify(this.userInfo)}`
})
@ -126,7 +136,6 @@ export default {
if (res.res === 1) {
this.userInfo = res.obj[0]
}
},
fail: err => {
console.log('🚀 ~ getapplogininfo ~ err:', err)

View File

@ -34,67 +34,6 @@
@confirm="confirmHospital"
></u-picker>
<!-- 检查类型 -->
<u-popup :show="showPropup" :round="10" mode="bottom" closeable @close="showPropup = false">
<div class="propup-content">
<h3>请选择套餐</h3>
<div class="title-wrapper">
<div class="title title-tip" v-if="!checkType">
<div>请选择</div>
<div class="line"></div>
</div>
<div v-else>
<div class="title">{{ checkType }}</div>
<div class="line"></div>
</div>
</div>
<div>
<div
class="list-item"
:class="{ active: active == index }"
v-for="(item, index) in checkTypeList"
:key="index"
@click="handleCheckType(item, index)"
>
<!-- {{ item.combName }} -->
</div>
</div>
<div class="cont-title" v-if="checkTypeContent">
<div class="cont">{{ checkTypeContent }}</div>
<div v-if="showIcon" class="cont-icon" @click="showIcon = false">
<div style="margin-right: 3px">展开</div>
<div>
<u-icon name="arrow-down" color="#1989fa" size="16" />
</div>
</div>
<div v-else class="cont-icon" @click="showIcon = true">
<div style="margin-right: 3px">收起</div>
<div>
<u-icon name="arrow-up" color="#1989fa" size="16" />
</div>
</div>
</div>
<div class="cont-line"></div>
<div v-show="!showIcon" class="contList-wrapper">
<div class="contList-item" v-for="(item, index) in checkTypeContentList" :key="index">
<div class="cont-title">{{ item.combinName }}</div>
<div>项目内容{{ item.combinContent }}</div>
<div>
项目价格
<span style="color: red">{{ item.combinPrice }}</span>
</div>
</div>
</div>
<div class="btn" v-if="checkType">
<u-button type="primary" text="确认套餐" size="small" @click="showPropup = false"></u-button>
</div>
</div>
</u-popup>
<!-- 体检时间 -->
<u-calendar :show="showTime" mode="single" @confirm="confirmTime" @close="showTime = false"></u-calendar>
@ -109,7 +48,7 @@
<div>联系方式: {{ hospitalInfo.telPhone }}</div>
</div>
<div style="margin: 30px 60px" v-if="hospital && checkType && healthTime">
<div style="margin: 30px 60px" v-if="hospital && checkType && healthTime && reservationNumber != 0">
<u-button type="primary" text="确定预约" shape="circle" size="small" @click="handleSave"></u-button>
</div>
</view>
@ -161,7 +100,7 @@ export default {
this.getCheckType()
},
methods: {
// app/getCareerHospital
//
getHospitalList() {
const params = {
token: this.token,
@ -169,7 +108,7 @@ export default {
}
console.log('🚀 ~ getHospitalList ~ params:', params)
uni.request({
url: config.tjBaseUrl + '/app/getCareerHospital',
url: config.tjBaseUrl + '/app/getOccupationHospital',
method: 'post',
data: params,
header: {
@ -230,43 +169,6 @@ export default {
if (this.hospitalInfo.id) this.isDisabled = false
this.show = false
},
//
handleCheckType(item, index) {
console.log('🚀 ~ handleCheckType ~ item:', item)
this.active = index
this.checkType = item.combName
this.getCheckTypeContent(item)
},
//
getCheckTypeContent(item) {
const params = {
token: this.token,
checkId: item.id,
combType: 2
}
console.log('🚀 ~ getCheckTypeContent ~ params:', params)
uni.request({
url: config.tjBaseUrl + '/app/getexamination',
method: 'post',
data: params,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
token: this.token
},
success: res => {
res = res.data
console.log('🚀 ~ getCheckTypeContent ~ res:', res)
if (res.res == 1) {
this.setMealId = res.obj.tibean[0].id
this.checkTypeContent = res.obj.tibean[0].combName
this.checkTypeContentList = res.obj.tibeanson
}
},
fail: err => {
console.log('🚀 ~ getCheckTypeContent ~ err:', err)
}
})
},
handleShowTime() {
if (this.isDisabled) {
uni.showToast({
@ -356,6 +258,7 @@ export default {
res = res.data
console.log('🚀 ~ handleSave ~ res:', res)
if (res.res == 1) {
uni.setStorageSync('jobAppoint', true)
uni.showToast({
title: '预约成功',
icon: 'success'

View File

@ -14,7 +14,7 @@
<div style="width: 240px">{{ item.mealName }}{{ item.mealContent }}</div>
<div style="color: red; margin-left: 15px">{{ item.mealPrice }} </div>
</div>
<u-line dashed style="margin-bottom: 10px;"></u-line>
<u-line dashed style="margin-bottom: 10px"></u-line>
</div>
<div class="title" style="color: red">体检总价{{ totalPrice }} </div>
@ -33,28 +33,11 @@ export default {
//
combName: '',
//
combItem: '项目1、项目2、项目3',
combItem: '',
//
combContent: [
{
mealName: '项目1',
mealContent:
'项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容',
mealPrice: '100'
},
{
mealName: '项目2',
mealContent: '项目2内容',
mealPrice: '200'
},
{
mealName: '项目3',
mealContent: '项目3内容',
mealPrice: '300'
}
],
//
totalPrice: 0
combContent: [],
//
totalPrice: 0
}
},
onLoad(opt) {
@ -65,14 +48,14 @@ export default {
this.token = uni.getStorageSync('tjToken')
},
mounted() {
// this.getDetail()
this.getDetail()
},
methods: {
//
getDetail() {
const params = {
token: this.token,
cancelId: this.cancelId
cancelId: String(this.cancelId),
token: this.token
}
console.log('🚀 ~ getDetail ~ params:', params)
uni.request({
@ -80,6 +63,7 @@ export default {
method: 'post',
data: params,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
token: this.token
},
success: res => {
@ -88,7 +72,7 @@ export default {
if (res.res == 1) {
this.combContent = res.obj
this.combItem = res.obj.map(item => item.mealName).join('、')
this.totalPrice = res.obj.reduce((total, item) => total + Number(item.mealPrice), 0)
this.totalPrice = res.obj.reduce((total, item) => total + Number(item.mealPrice), 0)
}
}
})
@ -117,7 +101,5 @@ export default {
margin-bottom: 10px;
word-break: break-all;
}
}
</style>

View File

@ -1,49 +1,52 @@
<template>
<div class="content">
<div class="item-wrapper">
<div class="item" @click="show = true">
<div v-if="!makeStatus">请选择体检状态</div>
<div v-else>{{ makeStatus }}</div>
<div><u-icon name="arrow-right"></u-icon></div>
</div>
<div class="btn">
<u-button type="primary" text="查询"></u-button>
</div>
</div>
<u-picker :show="show" :columns="columns" @close="show = false" @confirm="handleSearch"></u-picker>
<div class="tip">提示向左滑动取消预约</div>
<u-swipe-action class="swipe-wrapper">
<u-swipe-action-item
class="swipe-item"
:options="options"
v-for="(item, index) in makeList"
:key="index"
:disabled="item.ifCancel == 1 || item.ifCancel == 4"
@click="handleDelete(item)"
>
<div class="swipe-action" @click="handleOption(item)">
<div class="item-icon">
<u-icon
v-if="item.ifCancel == 1 || item.ifCancel == 4"
name="/static/images-tijian/isCanceled.png"
size="120"
></u-icon>
<u-icon v-else-if="item.ifCancel == 2" name="/static/images-tijian/readyExam.png" size="120"></u-icon>
<u-icon v-else name="/static/images-tijian/isExamed.png" size="120"></u-icon>
</div>
<div class="item-cont">
<div class="hospital-name">{{ item.hospitalName }}</div>
<div class="combName">
<div>{{ item.combName }}</div>
<div style="color: red">{{ item.setMealPrice || '0.0' }}</div>
</div>
<div>预约时间{{ item.phyAppontTime }}</div>
</div>
<div>
<u-navbar title="我的预约" @leftClick="leftClick" placeholder></u-navbar>
<div class="content">
<div class="item-wrapper">
<div class="item" @click="show = true">
<div v-if="!makeStatus">请选择体检状态</div>
<div v-else>{{ makeStatus }}</div>
<div><u-icon name="arrow-right"></u-icon></div>
</div>
</u-swipe-action-item>
</u-swipe-action>
<div class="btn">
<u-button type="primary" text="查询" @click="handleQuery"></u-button>
</div>
</div>
<u-picker :show="show" :columns="columns" keyName="label" @close="show = false" @confirm="handleSearch"></u-picker>
<div class="tip">提示向左滑动取消预约</div>
<u-swipe-action class="swipe-wrapper">
<u-swipe-action-item
class="swipe-item"
:options="options"
v-for="(item, index) in makeList"
:key="index"
:disabled="item.ifCancel != 2"
@click="handleDelete(item)"
>
<div class="swipe-action" @click="handleOption(item)">
<div class="item-icon">
<u-icon
v-if="item.ifCancel == 1 || item.ifCancel == 4"
name="/static/images-tijian/isCanceled.png"
size="120"
></u-icon>
<u-icon v-else-if="item.ifCancel == 2" name="/static/images-tijian/readyExam.png" size="120"></u-icon>
<u-icon v-else name="/static/images-tijian/isExamed.png" size="120"></u-icon>
</div>
<div class="item-cont">
<div class="hospital-name">{{ item.hospitalName }}</div>
<div class="combName">
<div>{{ item.combName }}</div>
<div style="color: red">{{ item.setMealPrice || '0.0' }}</div>
</div>
<div>预约时间{{ item.phyAppontTime }}</div>
</div>
</div>
</u-swipe-action-item>
</u-swipe-action>
</div>
</div>
</template>
@ -55,16 +58,31 @@ export default {
return {
token: '',
show: false,
columns: [['全部', '已取消', '待体检', '已体检']],
columns: [
[
{ label: '全部', value: 4 },
{ label: '已取消', value: 1 },
{ label: '待体检', value: 2 },
{ label: '已体检', value: 3 }
]
],
//
makeStatus: '',
makeStatusValue: 4,
//
makeList: [],
//
allList: [],
//
canceledList: [],
//
readyList: [],
//
examList: [],
isDisabled: false,
options: [
{
text: '删除',
// disabled: isDisabled,
text: '取消',
style: {
backgroundColor: '#f56c6c'
}
@ -81,9 +99,21 @@ export default {
methods: {
handleSearch(e) {
console.log('🚀 ~ handleSearch ~ e:', e)
this.makeStatus = e.value[0]
this.makeStatus = e.value[0].label
this.makeStatusValue = e.value[0].value
this.show = false
},
handleQuery(){
if (this.makeStatusValue == 4) {
this.makeList = this.allList
} else if (this.makeStatusValue == 1) {
this.makeList = this.canceledList
} else if (this.makeStatusValue == 2) {
this.makeList = this.readyList
} else if (this.makeStatusValue == 3) {
this.makeList = this.examList
}
},
// getpersonappointInfo
getList() {
console.log('🚀 ~ 列表 ~ this.token:', this.token)
@ -99,7 +129,10 @@ export default {
res = res.data
console.log('🚀 ~ 列表 ~ res:', res)
if (res.res == 1) {
this.makeList = res.obj
this.makeList = this.allList = res.obj
this.canceledList = res.obj.filter(item => item.ifCancel == 1)
this.readyList = res.obj.filter(item => item.ifCancel == 2)
this.examList = res.obj.filter(item => item.ifCancel == 3)
}
},
fail: err => {
@ -107,23 +140,72 @@ export default {
}
})
},
// -
handleDelete(item) {
console.log('🚀 ~ handleDelete ~ item:', item)
},
//
handleOption(item) {
console.log('🚀 ~ handleOption ~ item:', item)
const params = {
id: item.id,
combName: item.combName,
}
console.log('🚀 ~ handleOption ~ params:', params)
uni.navigateTo({
url: '/pages/HealthExaminationApp/myAppointment/healthExamDetails?params=' + JSON.stringify(params)
})
}
// - cancelpoint
handleDelete(item) {
console.log('🚀 ~ handleDelete ~ item:', item)
const params = {
cancelId: item.id,
mealType: item.setMealType,
token: this.token
}
//
uni.showModal({
title: '提示',
content: '确认取消预约吗?',
success: res => {
console.log('🚀 ~ handleDelete ~ res:', res)
if (res.confirm) {
uni.request({
url: config.tjBaseUrl + '/app/cancelpoint',
method: 'post',
data: params,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
token: this.token
},
success: res => {
res = res.data
console.log('🚀 ~ 取消预约 ~ res:', res)
if (res.res == 1) {
if (item.setMealType == '2') {
uni.removeStorageSync('appoint')
} else if (item.setMealType == '3') {
uni.removeStorageSync('jobAppoint')
}
// -
uni.redirectTo({
url: '/pages/HealthExaminationApp/myAppointment/myAppointment'
})
}
},
fail: err => {
console.log('🚀 ~ 列表 ~ err:', err)
}
})
}
},
fail: err => {
console.log('🚀 ~ handleDelete ~ err:', err)
}
})
},
//
handleOption(item) {
console.log('🚀 ~ handleOption ~ item:', item)
const params = {
id: item.id,
combName: item.combName
}
console.log('🚀 ~ handleOption ~ params:', params)
uni.navigateTo({
url: '/pages/HealthExaminationApp/myAppointment/healthExamDetails?params=' + JSON.stringify(params)
})
},
leftClick() {
uni.reLaunch({
url: '/pages/HealthExaminationApp/index/index'
})
}
}
}
</script>

View File

@ -0,0 +1,104 @@
<template>
<view class="content">
<web-view :src="url" @message="handlePostMessage"></web-view>
</view>
</template>
<script>
/* uni
* https://ask.dcloud.net.cn/article/35083
* 组件使用pdf.js源码修改了部分内容
* 只需要完成web-view监听页数并与uni通信即可
* @kklxx 2022/12/09修复组件通信
*/
import { computed } from 'vue'
export default {
// props: {
// path: {
// type: String,
// default: ''
// }
// },
data() {
return {
viewerUrl: '/hybrid/html/web/viewer.html', // html hybrid/html
fileUrl: '', // 访pdf
url: '', // web-view
currentPage: 1, //
totalPage: 0, //
currentReadPage: 0 //
}
},
onLoad(opt) {
console.log('页面信息:', opt)
this.fileUrl = opt.path
// /* */
// uni.setNavigationBarTitle({
// title: 'PDF'
// })
// /* */
// this.pageInt() //pdfs
},
mounted() {
console.log('mounted-pdfView', this.path)
/* H5页面通信方式 */
// #ifdef H5
window.addEventListener('message', this.ReceiveMessage)
// #endif
// this.fileUrl = this.path
/* 设置标题 */
uni.setNavigationBarTitle({
title: 'PDF预览'
})
/* 初始页面 */
this.pageInt() //pdfs
},
//
beforeDestroy() {
uni.removeStorage({
//pdfpdf
key: 'pdfjs.history',
success() {
// console.log("removeStorage", res)
}
})
},
methods: {
//
pageInt() {
this.url = `${this.viewerUrl}?file=${encodeURIComponent(this.fileUrl)}&page=` + this.currentPage
},
/*
* 做成监听滚动条判断更好
*
*/
//uni
handlePostMessage(data) {
let arr = data.detail.data.pop()
this.totalPage = arr[0].totalPage //
this.currentReadPage = arr[1].page //
console.log('app:', this.totalPage, this.currentReadPage)
},
//h5
ReceiveMessage(event) {
if (event.data && event.data.data && event.data.data.arg) {
this.totalPage = event.data.data.arg[0].totalPage
this.currentReadPage = event.data.data.arg[1].page + 1
}
console.log('app:', this.totalPage, this.currentReadPage)
},
//
addBrowseRecord() {
// console.log("",this.totalPage);
// console.log("",this.currentReadPage);
}
}
}
</script>
<style lang="scss" scoped></style>

View File

@ -1,19 +1,229 @@
<template>
<view>
提交报告
</view>
<view>
<div class="content">
<u-search
placeholder="查找报告"
v-model="keyword"
clearabled
:showAction="false"
@clickIcon="handleSearch"
></u-search>
<div class="cont-wrapper">
<div class="cont-title">请选择体检年度</div>
<div class="cont-item" @click="showData = true">
<div>{{ year }}</div>
<u-icon name="arrow-right" size="13"></u-icon>
</div>
<div class="cont-item" @click="showType = true">
<div v-if="type">{{ type }}</div>
<div v-else style="color: #999">体检类型</div>
<u-icon name="arrow-right" size="13"></u-icon>
</div>
</div>
<div class="cont-list" v-for="(item, index) in contList" :key="index">
<div class="list-type">{{ item.fixedValue }}</div>
<div class="center-cont">
<div class="title">{{ item.mealName }}</div>
<div>{{ item.createTime }}</div>
</div>
<div class="btn">
<u-button type="primary" shape="circle" text="查看报告" @click="handleSeeReport(item)"></u-button>
</div>
</div>
</div>
<u-picker :show="showData" :columns="dataColumns" @cancel="showData = false" @confirm="handleData"></u-picker>
<u-picker
:show="showType"
:columns="typeColumns"
keyName="label"
@cancel="showType = false"
@confirm="handleType"
></u-picker>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
import config from '@/config'
export default {
data() {
return {
isShow: true,
token: '',
keyword: '',
//
year: new Date().getFullYear(),
//
type: '',
typeValue: '',
showData: false,
showType: false,
dataColumns: [],
typeColumns: [
[
{ label: '全部', value: '' },
{ label: '普通体检', value: 0 },
{ label: '职业体检', value: 1 }
]
],
contList: [],
pdfPath: ''
}
},
mounted() {
this.token = uni.getStorageSync('tjToken')
this.year = new Date().getFullYear()
console.log('🚀 ~ mounted ~ year:', this.year)
let arr = []
for (let i = 0; i < 10; i++) {
arr.push(this.year - i)
}
this.dataColumns = [arr]
console.log('🚀 ~ mounted ~ this.dataColumns:', this.dataColumns)
this.getList()
},
methods: {
//
handleSearch() {
console.log('🚀 ~ handleSearch ~ this.keyword:', this.keyword)
this.getList()
},
//
handleData(e) {
console.log('🚀 ~ handleData ~ this.year:', e)
this.year = e.value[0]
this.getList()
this.showData = false
},
//
handleType(e) {
console.log('🚀 ~ handleType ~ this.type:', e)
this.type = e.value[0].label
this.typeValue = e.value[0].value
this.getList()
this.showType = false
},
//
getList() {
const params = {
name: this.keyword,
data: this.year,
type: this.typeValue,
token: this.token
}
console.log('🚀 ~ getList ~ params:', params)
uni.request({
url: config.tjBaseUrl + '/app/getpackageBid',
method: 'get',
data: params,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
token: this.token
},
success: res => {
res = res.data
console.log('🚀 ~ 列表 ~ res:', res)
if (res.res == 1) {
this.contList = res.obj
}
},
fail: err => {
console.log('🚀 ~ 列表 ~ err:', err)
}
})
},
//
handleSeeReport(item) {
console.log('🚀 ~ handleSeeReport ~ item:', item)
this.pdfPath = config.tjFile + item.physicalAddress
//
uni.navigateTo({
url: `/pages/HealthExaminationApp/report/pdfView?path=${this.pdfPath}`
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
margin: 10px;
padding: 10px;
.cont-wrapper {
display: flex;
justify-content: space-between;
align-content: center;
padding: 10px 0;
.cont-title {
height: 40px;
line-height: 40px;
font-size: 15px;
font-weight: bold;
text-align: center;
}
.cont-item {
padding: 0 5px;
width: 28%;
height: 40px;
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
border-radius: 40px;
}
}
.cont-list {
margin: 10px 0;
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
border-radius: 5px;
margin-top: 10px;
.list-type {
padding: 10px;
width: 20px;
text-align: center;
font-size: 14px;
font-weight: bold;
white-space: pre-wrap;
word-break: break-all;
background: #9bc5c6;
color: #fff;
border-radius: 5px 0 0 5px;
}
.center-cont {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 14px;
color: #666;
.title {
font-size: 15px;
font-weight: bold;
color: #333;
margin-bottom: 15px;
}
}
.btn {
margin-right: 10px;
width: 80px;
text-align: center;
}
}
}
</style>

View File

@ -197,7 +197,7 @@
jwtToken: uni.getStorageSync('App-Token')
}
const tjparams = {
username: '13708411772', // 15912575796
username: '17681010134', // 15912575796
password: 'YNsbd@123456'
}
console.log('🚀 ~ gotoYy ~ tjparams:', tjparams)
@ -262,7 +262,7 @@
}, 500)
} else {
uni.showToast({
title: req.message,
title: res.msg,
icon: 'none'
})
}