123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <template>
- <view class="content">
- <view class="consu-list">
- <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
- <view v-for="(item,index) in dataList" :key="index" class="item" @click="showImg(item)">
- <view class="ordersn-box">
- <view class="num">处方单号:{{item.rpId}}</view>
- <view class="status-box">
- <text class="text info" v-if="item.status==0">待开方</text>
- <text class="text success" v-if="item.status==1">已开方</text>
- <text class="text black" v-if="item.status==2">已拒绝</text>
- </view>
- </view>
- <view class="drug-list" >
- <view class="drug-item" v-for="(subItme,index) in item.items" >
- <view class="drug-info" >
- <view class="name-box ellipsis2">
- <view class="tag">处方药</view>{{subItme.drugName}}
- </view>
- </view>
- </view>
- </view>
- <view class="ask-text" v-if="item.status==1">诊断结果:{{item.diagnose}}</view>
- <view class="ask-text" v-if="item.status==2">审核结果:{{item.auditReason}}</view>
- <view class="patient-text" v-if="item.status==1">医生:{{item.doctorName}} </view>
- <view class="patient-text">患者:{{item.patientName}} {{item.patientAge}}岁 {{item.patientGender==1?'男':'女'}} </view>
- <view class="ask-time" v-if="item.createTime!=null">提交时间:{{item.createTime}}</view>
- <view class="ask-time" v-if="item.rpCreateTime!=null">开方时间:{{item.rpCreateTime}}</view>
- </view>
- </mescroll-body>
- </view>
- </view>
- </template>
- <script>
- import {getMyPrescribeList} from '@/api/prescribe.js'
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin],
- data() {
- return {
- mescroll:null,
- // 上拉加载的配置
- upOption: {
- onScroll:true,
- use: true, // 是否启用上拉加载; 默认true
- page: {
- num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10 // 每页数据的数量,默认10
- },
- noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- empty: {
- icon:'/static/images/no_data.png',
- tip: '暂无数据'
- }
- },
- // 列表数据
- dataList: []
- }
- },
- onLoad() {
-
- },
- methods: {
-
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll()
- },
- upCallback(page) {
- //联网加载数据
- var that = this;
- var data = {
- page: page.num,
- pageSize: page.size
- };
- getMyPrescribeList(data).then(res => {
- if(res.code==200){
- //设置列表数据
- res.data.list.forEach(function(element) {
- element.items=JSON.parse(element.drugs);
- });
- if (page.num == 1) {
-
- that.dataList = res.data.list;
-
- } else {
- that.dataList = that.dataList.concat(res.data.list);
-
- }
-
- that.mescroll.endBySize(res.data.list.length, res.data.total);
-
- }else{
- uni.showToast({
- icon:'none',
- title: "请求失败",
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- showImg(item) {
- var imgArr = [];
- imgArr.push(item.rpUrl)
- //预览图片
- uni.previewImage({
- urls: imgArr,
- current: imgArr[0]
- });
- }
- }
- }
- </script>
- <style lang="scss">
- .content{
- padding: 20upx;
- .top-fixed{
- width: 100%;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 10;
- }
- .pub-tab-box{
- box-sizing: border-box;
- width: 100%;
- padding: 0 40upx;
- background-color: #FFFFFF;
- .tab-inner{
- height: 88upx;
- line-height: 88upx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- overflow-x: auto;
- }
- .item{
- font-size: 28upx;
- white-space: nowrap;
- line-height: 1;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- margin-right: 60upx;
- display: flex;
- align-items: center;
- justify-content: center;
- &:last-child{
- margin-right: 0;
- }
- &.active{
- font-weight: bold;
- color: #333333;
- }
- .text{
- position: relative;
- z-index: 1;
- }
- .tab-bg{
- width: 72upx;
- height: 28upx;
- position: absolute;
- top: 17upx;
- left: 50%;
- transform: translateX(-36upx);
- z-index: -1;
- }
- }
- }
- .consu-list{
- .item{
- background: #FFFFFF;
- border-radius: 16upx;
- padding: 40upx 30upx;
- position: relative;
- margin-bottom: 20upx;
- .ordersn-box{
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0upx 0 10upx;
- .num{
- font-size: 26upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 1;
- }
- .status-box{
- display: flex;
- align-items: center;
- .recom-box{
- width: 108upx;
- height: 30upx;
- line-height: 30upx;
- text-align: left;
- padding-left: 8upx;
- font-size: 22upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- background-image: url(../../static/images/recom.png);
- background-repeat: no-repeat;
- background-size: 100% 100%;
- margin-right: 8upx;
- }
- .text{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- line-height: 1;
- &.success{
- color: #018C39;
- }
- &.black{
- color: #111111;
- }
- &.info{
- color: #999999;
- }
- }
- }
- }
- .doctor-info{
- display: flex;
- align-items: center;
- .img-box{
- width: 80upx;
- height: 80upx;
- background: #E0FFF8;
- border-radius: 50%;
- overflow: hidden;
- margin-right: 20upx;
- image{
- width: 100%;
- height: 100%;
- }
- }
- .name{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 48upx;
- text{
- margin-right: 10upx;
- }
- }
- }
- .ask-text{
- margin: 24rpx 0rpx;
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 42upx;
- }
- .patient-text{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- margin-bottom: 15upx;
- }
- .ask-time{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- }
-
- }
- }
- }
- .drug-list{
- .drug-item{
- padding: 10upx 0;
- border-bottom: 1px soli #F0F0F0;
- display: flex;
- align-items: center;
- .drug-info{
- width: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .name-box{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 40upx;
- .tag{
- display: inline-block;
- padding: 0 6upx;
- height: 30upx;
- background: linear-gradient(90deg, #66b2ef 0%, #018C39 100%);
- border-radius: 4upx;
- margin-right: 10upx;
- font-size: 22upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- line-height: 30upx;
- float: left;
- margin-top: 7upx;
- }
- }
-
-
- }
- }
- }
- </style>
|