init version kelfy-mini for new gitea

This commit is contained in:
terry.wang
2025-11-13 13:38:59 +08:00
commit 493fa4f1e1
763 changed files with 55626 additions and 0 deletions

View File

@@ -0,0 +1,215 @@
// pages/historicalvisitrecords/historicalvisitrecords.js
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
patientData: [],
show: false,
list: [],
name: '',
painId: '',
relate: '',
card: '', //sfz
cardNum: '', //jzk
cardType: '',
loadingHidden: true,
},
showPop() {
this.setData({
show: true
});
},
onClose() {
this.setData({
show: false
});
},
async confirm(e) {
console.log(e.currentTarget.dataset.item)
let user = e.currentTarget.dataset.item
this.setData({
name: user.TRUE_NAME,
painId: user.PATIENT_ID,
relate: user.RELATE,
card: user.ID_CARD,
cardNum: user.MEDICAL_CARD,
cardType: user.CARD_TYPE,
show: false,
loadingHidden: false,
});
await this.getPatientList()
},
getPatientList() {
if (this.data.card && this.data.name) {
this.setData({
loadingHidden: false,
})
return new Promise((resolve, reject) => {
wx.request({
url: 'https://fy.btlsoln.com:8443/hisViewSearch/getHistoricalVisits',
method: 'GET',
data: {
patientName: this.data.name,
idCard: this.data.card,
},
success: (result) => {
console.log(result)
if (result.data.data == null) {
wx.showToast({
title: '未获取到信息',
icon: 'error'
})
this.setData({
patientData: [],
loadingHidden: true,
})
} else {
this.setData({
loadingHidden: true,
patientData: JSON.parse(result.data.data)
})
}
resolve("ok")
},
})
})
} else {
wx.showModal({
title: '',
content: '您还未绑定就诊人,请先绑定就诊人信息!',
cancelText: "否",
confirmText: '是',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/userMsgDel/userMsgDel?state=0',
})
} else {
wx.switchTab({
url: '/pages/index/index',
})
}
}
})
}
},
getPerList() {
return new Promise((resolve, reject) => {
wx.request({
url: 'https://fy.btlsoln.com:8443/getPatientByOpenid?openid',
method: "GET",
data: {
openid: app.globalData.openId
},
header: {
'content-type': 'application/json'
},
success: (res) => {
let data = res.data
console.log(data)
data.map((item, index) => {
if (item.TYPE == 0) {
this.setData({
name: item.TRUE_NAME,
painId: item.PATIENT_ID,
relate: item.RELATE,
cardNum: item.MEDICAL_CARD,
cardType: item.CARD_TYPE,
card: item.ID_CARD
})
}
})
if (res.data.length > 0) {
this.setData({
list: data
})
} else {
wx.showModal({
title: '',
content: '您还未绑定就诊人,请先绑定就诊人信息!',
cancelText: "否",
confirmText: '是',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/userMsgDel/userMsgDel?state=0',
})
} else {
wx.switchTab({
url: '/pages/index/index',
})
}
}
})
}
resolve("ok");
}
})
})
},
async getInitData() {
await this.getPerList()
await this.getPatientList()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getInitData()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
wx.setNavigationBarTitle({
title: '历史就诊记录'
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,69 @@
<view class="main">
<view class="content">
<!-- 历史就诊就记录模块 -->
<view class="item">
<view class="up">
<view class="name">{{name}}</view>
<view class="msg">
<view wx:if="{{relate == 0}}" class="t1">本人</view>
<view wx:elif="{{relate == 1}}" class="t1">子女</view>
<view wx:elif="{{relate == 2}}" class="t1">夫妻 </view>
<view wx:elif="{{relate == 3}}" class="t1">父母 </view>
<view wx:elif="{{relate == 4}}" class="t1">朋友 </view>
<view class="icon" bindlongtap="qiehuan" bindtap="showPop"></view>
</view>
</view>
<view class="down">
<view>{{cardNum}}</view>
<view>切换就诊人</view>
</view>
</view>
<loading hidden="{{loadingHidden}}">加载中...</loading>
<view wx:if="{{loadingHidden}}">
<view class="historicalvisitsingle" wx:for="{{patientData}}" wx:key="index">
<!-- 科室,医生,项目名称,项目时间 -->
<view class="historicalvisitcol">
<view class="historicalvisitcolheader">姓名:</view>
<view class="historicalvisitcolend">{{item.patientName}}</view>
</view>
<view class="historicalvisitcol">
<view class="historicalvisitcolheader">医生:</view>
<view class="historicalvisitcolend">{{item.doctorName}}</view>
</view>
<view class="historicalvisitcol">
<view class="historicalvisitcolheader">就诊科室:</view>
<view class="historicalvisitcolend">{{item.deptName}}</view>
</view>
<view class="historicalvisitcol">
<view class="historicalvisitcolheader">项目名称:</view>
<view class="historicalvisitcolend">{{item.icdName}}</view>
</view>
<view class="historicalvisitcol">
<view class="historicalvisitcolheader">项目时间:</view>
<view class="historicalvisitcolend">{{item.registerDate}}</view>
</view>
</view>
</view>
</view>
<van-popup show="{{ show }}" round closeable position="bottom" bind:close="onClose">
<view class="popWrap">
<view class="title1">选择就诊人</view>
<view class="userWrap">
<view class="userItem" wx:for="{{list}}" wx:key="item" data-item="{{item}}" bindtap="confirm">
<view class="msg1">
<view class="up1">
<view class="name1">{{item.TRUE_NAME}}</view>
<view wx:if="{{item.RELATE == 0}}" class="guanxi1">本人</view>
<view wx:elif="{{item.RELATE == 1}}" class="guanxi1">子女</view>
<view wx:elif="{{item.RELATE == 2}}" class="guanxi1">夫妻 </view>
<view wx:elif="{{item.RELATE == 3}}" class="guanxi1">父母 </view>
<view wx:elif="{{item.RELATE == 4}}" class="guanxi1">朋友 </view>
</view>
<view class="down1">{{item.MEDICAL_CARD}}</view>
</view>
<view class="icon1">></view>
</view>
</view>
</view>
</van-popup>
</view>

View File

@@ -0,0 +1,177 @@
.main{
margin: 30rpx 0;
width: 750rpx;
}
.content{
width: 90%;
margin: 0 auto;
}
.historicalvisitContainer {
width: 100vw;
/* height: 100vh; */
background-color: #f6f6f6;
}
.historicalvisitsingle {
width: 95vw;
background-color: #ffffff;
margin: 2vw 2vw 2vw 2vw;
padding: 5rpx 5rpx 5rpx 5rpx;
border-radius: 20rpx;
}
.historicalvisitcol {
display: flex;
width: 100vw;
/* justify-content: center; */
align-items: center;
}
.historicalvisitcolheader {
width: 48vw;
height: 5vh;
font-size: small;
}
.historicalvisitcolend {
width: 48vw;
height: 5vh;
font-size: small;
}
.item{
height: 200rpx;
width: 100%;
border-radius: 5rpx;
margin: 40rpx auto;
box-shadow:0px 0px 5rpx #e2e2e2;
background: rgba(245,249,255);
padding: 30rpx;
box-sizing: border-box;
}
.up{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.name{
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
color: #333;
}
.t1{
height: 50rpx;
width: 130rpx;
text-align: center;
line-height: 50rpx;
font-size:33rpx;
border-radius: 25rpx;
color: rgba(45,135,255);
background: rgba(226,237,254);
}
.msg{
flex: 1;
height: 70rpx;
line-height: 80rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.icon{
height: 50rpx;
width: 50rpx;
padding: 10rpx;
box-sizing: border-box;
margin-right: 50rpx;
border-radius: 50%;
background-color: rgba(0,110,255);
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAZpJREFUaEPtV7tKBEEQrIoEf8Bc/AFzES8yEMFEEMFEBD9AMFVjwdhEzBTMhItMVMz9ATH3BwSzkoWLltu9me7hZlZnk022uuvRM80SA384cP6oAnInWBOoCTgdqCPkNNAN/98JSNoCsEfywG2lsYA5AUnrAF4nfa9Inhg5uGAmAZJWAby3Ol+QPHexMYCjBUhaAfBRAvmGQ5QASUsAvkohHyVA0iKA75LIBwuQtADgp0X+xTCyZgjJ0TTwzBGStAzg09w5EZDkVK69AiStAXhLxMFVJlqApF0AD66uCcFRAiRtTJ03cq5zH6J/5hkIKZLzmyogp/vBeyA3yb7+f3eEJKkg509JXkZt4oIEHJK87TKzc4QKEbBNcmw6A5Ke5zxC7eU5YsDizH6IJTV/cWctszZJPoUYmFVAB/kdko8h5LPugQ7y+yTvQ8lnE9BB/ojkTQz5bAKaxpKuARxPCPdelaZbKNYJy/eS7gCMSTZv05P1EJsYt0BVQAoXPTVqAh73UmBrAilc9NSoCXjcS4GtCaRw0VNj8An8AqTHZDFDvpKtAAAAAElFTkSuQmCC);
background-size:100%;
background-repeat: no-repeat;
}
.down{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
line-height: 80rpx;
font-size: 30rpx;
color: #666;
}
.popWrap{
height: 100%;
width: 100%;
padding: 10rpx;
box-sizing: border-box;
}
.title1{
height: 100rpx;
width: 100%;
line-height: 100rpx;
text-align: center;
font-size: 33rpx;
color: #333;
}
.userWrap{
height: 100%;
width: 95%;
margin: 0 auto;
}
.userWrap :last-child{
border-bottom: none;
}
.userItem{
height: 160rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #f8f8f8;
}
.msg1{
height: 160rpx;
width: 500rpx;
}
.up1{
height: 80rpx;
width: 100%;
display: flex;
align-items: center
}
.name1{
font-size: 33rpx;
height: 80rpx;
color: #333;
line-height: 80rpx;
}
.guanxi1{
height: 60rpx;
width: 120rpx;
margin-left: 20rpx;
background: rgba(228,240,255);
border-radius: 30rpx;
text-align: center;
line-height: 80rpx;
color: rgba(0,110,255);
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.down1{
height: 80rpx;
width: 100%;
font-size: 33rpx;
color: rgb(158, 154, 154);
line-height: 80rpx;
}
.icon1{
color: rgb(180, 179, 179);
padding-right:15rpx ;
}