12.4更新

This commit is contained in:
zoujiandong
2023-12-04 14:49:14 +08:00
parent 63d7cb402d
commit 1e9ea2a70f
36 changed files with 1873 additions and 58 deletions
+173
View File
@@ -0,0 +1,173 @@
// Pages/yishi/medince_list/index.js
import { API } from './../../../utils/network/api'
import debounce from "./../../../utils/debounce"
let api = new API()
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
navbarData: {
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '患者病例', //导航栏 中间的标题
},
page:1,
family_id:'',
currentSick:null,
isLoding:false,
list:[],
isLock:false,
per_page:10,
keyword:'',
},
goDetail:debounce(function(event){
console.log(event)
let id=event.currentTarget.dataset.id;
console.log(id);
app.go("/Pages/yishi/case/index?order_inquiry_id="+id);
}),
goDetailbefore:debounce(function(event){
let id=event.currentTarget.dataset.id;
app.go("/Pages/yishi/case/index?pathography_id="+id);
},600),
changeInput:debounce(function(event){
const { value }= event.detail;
this.setData({
isLock:false,
page:1,
list:[],
keyword:value
})
this.handleGetList();
},600),
goSearch(){
this.setData({
isLock:false,
list:[],
page:1
})
this.handleGetList();
},
confirmSearch(event){
const { value }= event.detail;
this.setData({
isLock:false,
list:[],
page:1,
keyword:value
})
this.handleGetList();
},
lower(){
console.log('===触底了!!===');
let {page,isLock}=this.data;
if(!isLock){
page++;
this.setData({
page:page
});
this.handleGetList();
}
},
/**
* 生命周期函数--监听页面加载
*/
handleGetCurrent(){
const {order_inquiry_id}=this.data;
api.getSimpleInquiry({
order_inquiry_id
}).then(data=>{
this.setData({
currentSick:data.data
})
console.log(data);
})
},
handleGetList(){
const {page,per_page,family_id,isLoding}=this.data;
if(isLoding)return false;
this.setData({
isLoding:true
})
api.getPathography({
page,
per_page,
family_id,
}).then(data=>{
this.setData({
isLoding:false
})
let result=data.data.data;
if(result.length==0){
this.setData({
isLock:true
});
return false;
}
this.setData({
list:this.data.list.concat(result)
});
}).catch(errors => {console.error(errors);})
},
onLoad(options) {
this.setData({
family_id:options.family_id,
order_inquiry_id:options.order_inquiry_id
})
this.handleGetCurrent();
this.handleGetList();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
+9
View File
@@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "/commpents/te_navbar",
"van-empty": "@vant/weapp/empty/index",
"van-icon": "@vant/weapp/icon/index",
"van-divider": "@vant/weapp/divider/index"
}
}
+49
View File
@@ -0,0 +1,49 @@
<!--Pages/yishi/patient_sick/index.wxml-->
<!--Pages/yishi/medince_list/index.wxml-->
<view class="page">
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container">
<!-- <view class="searchCon">
<view class="searchbox">
<input type="text" value="" class="searchIpt" placeholder="请输入药品名称" confirm-type="search" bindinput="changeInput" bindconfirm="confirmSearch"/>
<image src="../../../static/images/yishi/tabbar_icon/ss.png" mode="" class="searchImg" bindtap="goSearch"/>
</view>
</view> -->
<scroll-view scroll-y="true" class="scrollbox" bindscrolltolower="lower" wx:if="{{list.length>0 || currentSick}}" >
<view class="cell" bindtap="goDetail" data-id="{{order_inquiry_id}}">
<view class="titlebox">
<view class="title">
<view class="name">{{currentSick.patient_name}}</view>
<view class="age">{{currentSick.patient_sex==1?'男':'女'}}|{{currentSick.patient_age}}岁</view>
</view>
<van-icon name="arrow" class="icon" />
</view>
<view class="row">
<text class="desc">病情描述:</text>
<text class="descdetail"> {{currentSick.disease_desc}} </text>
</view>
<view class="date">您于{{currentSick.reception_time}}接诊</view>
<view class="mark">本次问诊</view>
</view>
<view class="cell" wx:for="{{list}}" wx:key="pathography_id" bindtap="goDetailbefore" data-id="{{item.pathography_id}}">
<view class="titlebox">
<view class="title">
<view class="name">{{item.name}}</view>
<view class="age">{{item.sex==1?'男':'女'}}|{{item.age}}岁</view>
</view>
<van-icon name="arrow" />
</view>
<view class="row">
<text class="desc">病情描述:</text>
<text class="descdetail"> {{item.disease_desc}} </text>
</view>
<view class="date">您与{{item.reception_time}}接诊</view>
</view>
<van-divider contentPosition="center" wx:if="{{list.length > 0 && isLock}}">到底了~</van-divider>
</scroll-view>
<van-empty description="暂无数据" wx:if="{{list.length == 0 && !currentSick}}" />
</view></view>
+160
View File
@@ -0,0 +1,160 @@
/* Pages/yishi/patient_sick/index.wxss *//* Pages/yishi/medince_list/index.wxss */
page{
height:100vh;
background-color: #F6F6F6;
}
.page{
height:100vh;
display: flex;
flex-direction: column;
}
.container{
/* height:calc(100vh - 135rpx); */
display: flex;
overflow: hidden;
/* overflow-y: scroll; */
/* -webkit-overflow-scrolling: touch; */
flex-direction: column;
}
.searchCon{
width:100%;
background:#fff;
}
.searchbox{
display: flex;
margin:32rpx;
align-items: center;
height: 80rpx;
background: #FFFFFF;
border-radius: 40rpx;
border: 2rpx solid #3CC7C0;
}
.searchIpt{
flex:1;
margin-left: 32px;
}
.searchImg{
width: 40rpx;
height:40rpx;
padding:30rpx;
}
.tips{
display: flex;
flex-direction: column;
justify-content: center;
position: absolute;
width: 200rpx;
height:200rpx;
font-size: 22rpx;
font-weight: 400;
color: #666666;
}
.desc{
text-align: center;
}
.medimgbox{
position: relative;
width: 200rpx;
height:200rpx;
margin-left: 30rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius:5rpx;
}
.medImg{
width:120rpx;
height:128rpx;
}
.titlebox{
display: flex;
justify-content: space-between;
align-items: center;
}
.cell{
position: relative;
padding:20rpx 0;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 16rpx 2rpx rgba(0,0,0,0.02);
border-radius: 12rpx;
margin:0 32rpx 20rpx;
}
.rightbox{
flex:1;
margin-left: 24rpx;
margin-right: 20rpx;
}
.scrollbox{
margin-top: 20rpx;
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.bottombox{
display: flex;
align-items: center;
justify-content: space-between;
}
.info .name{
word-break: break-all;
font-size: 32rpx;
font-weight: 600;
color: rgba(0,0,0,0.85);
}
.company{
margin-top: 5rpx;
font-size: 26rpx;
font-weight: 400;
color: rgba(0,0,0,0.45);
}
.cell .title{
display: flex;
font-size: 34rpx;
color: #333333;
}
.cell{
padding:20rpx;
}
.cell .name{
margin-right: 20rpx;
}
.row{
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2; /* 设置最大显示行数 */
-webkit-box-orient: vertical;
text-overflow: ellipsis;
word-break: break-all;
margin-top: 20rpx;
font-size: 30rpx;
line-height: 42rpx;
color: #666666;
}
.date{
margin-top: 20rpx;
font-size: 26rpx;
font-weight: 400;
color: #999999;
}
.mark{
position: absolute;
bottom:0;
display: flex;
align-items: center;
justify-content: center;
right:0px;
font-size: 24rpx;
font-weight: 400;
color: #3CC7C0;
width: 126rpx;
height: 54rpx;
background: #E9FFFE;
border-radius: 10rpx 0rpx 0rpx 10rpx;
}
.icon{
color:#c3c3c3;
}