<template> <view class="specimenChecking"> <view class="title" @click="gotoDetail()">签到标本总数:{{num}}</view> <view class="page_item_wrap" v-for="item in list" :key="item.patientId" @click="gotoDetail(item)"> <view class="page_item"> <view class="page_item_top"> <view class="page_item_top-inner"> <view class="page_item_top_L"> <view class="L_text">{{item.patientName}}</view> </view> <view class="page_item_top_R"> <view class="L_iocn">{{item.count}}</view> </view> </view> </view> </view> </view> <view class="foot_btn2"> <view class="btn2" @click="checkComplete()">核对完成</view> <view class="btn2" @click="goBack()">返回</view> </view> </view> </template> <script> import { get, post, webHandle } from "../../http/http.js"; export default { data() { return { list: [], num: 0, msg: {}, //页面展示信息 // 修改标本数量弹窗model changeSpeModels: { disjunctor: false, }, speNumChange: 0, }; }, methods: { // 跳转到详情页 gotoDetail(item) { console.log(item); if(item){ uni.navigateTo({ url: `../../pages/specimenCheckingEndDetail/specimenCheckingEndDetail?gdId=${this.msg.id}&deptQrCode=${this.msg.deptCode}&patientId=${item.patientId}`, }); }else{ uni.navigateTo({ url: `../../pages/specimenCheckingEndDetail/specimenCheckingEndDetail?gdId=${this.msg.id}&deptQrCode=${this.msg.deptCode}`, }); } }, checkComplete(){ uni.showModal({ title: '提示', content: '是否核对完成?', success: (result) => { if (result.confirm) { console.log('用户点击确定'); uni.showLoading({ mask: true, title: '加载中' }) let postData = { gdId: this.msg.id, deptQrCode: this.msg.deptCode, }; //起点科室id,选择的科室ids post(`/api/addSpecimenRecordAndDept`, postData).then((res) => { uni.hideLoading(); if (res.status == 200) { uni.navigateTo({ url: `../scanning/scanning?type=${this.msg.type}&type1=${ this.msg.type1 }&id=${encodeURIComponent(JSON.stringify([this.msg.id]))}&deptCode=${ this.msg.deptCode }&dept=${this.msg.dept}&speNum=${this.msg.speNum}&content=${this.msg.content}`, }); } else { uni.showToast({ icon: "none", title: "请求失败!", }); } }); } else if (result.cancel) { console.log('用户点击取消'); } } }); }, // 获取列表 getList() { uni.showLoading({ mask: true, title: '加载中' }) let postData = { gdId: this.msg.id, deptQrCode: this.msg.deptCode, }; //起点科室id,选择的科室ids post(`/api/patientSpecimensNm`, postData).then((res) => { uni.hideLoading(); uni.stopPullDownRefresh(); if (res.status == 200) { this.num = res.num; this.list = res.data; } else { uni.showToast({ icon: "none", title: "请求失败!", }); } }); }, // 返回 goBack() { uni.navigateBack(); }, }, onLoad(options) { console.log(options); options.id = JSON.parse(options.id)[0] this.msg = options; this.getList(); // #ifdef APP-PLUS webHandle("no", "app"); // #endif // #ifdef H5 webHandle("no", "wx"); // #endif }, onPullDownRefresh() { this.getList(); }, }; </script> <style lang="less" scoped> .specimenChecking { padding-bottom: 100rpx; .title { font-size: 48rpx; margin-top: 24rpx; margin-bottom: 24rpx; text-align: center; } .page_item_wrap { width: 100%; height: auto; box-sizing: border-box; position: relative; margin-bottom: 16rpx; .page_item { margin-top: 16rpx; margin-bottom: 124rpx; background: #fff; border-radius: 8rpx; margin: 0 20rpx; border: 2rpx solid #e5e9ed; position: relative; overflow: hidden; padding: 0 16rpx; .L { width: 40rpx; height: 40rpx; border-radius: 50%; background: #f9fafb; position: absolute; left: -20rpx; top: 68rpx; border: 2rpx solid #e5e9ed; } .R { width: 40rpx; height: 40rpx; border-radius: 50%; background: #f9fafb; position: absolute; float: right; right: -20rpx; top: 68rpx; border: 2rpx solid #e5e9ed; } .starting { width: 50rpx; height: 50rpx; color: #fff; background: #49b856; display: inline-block; border-radius: 50%; text-align: center; line-height: 46rpx; font-size: 32rpx; margin-right: 6rpx; } .End { width: 50rpx; height: 50rpx; color: #fff; background: #39b199; display: inline-block; border-radius: 50%; text-align: center; line-height: 46rpx; font-size: 32rpx; margin-right: 6rpx; } .page_item_top { height: 88rpx; // border-bottom: 2rpx dashed #e5e9ed; padding: 0 16rpx; .page_item_top-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; .page_item_top_L { .emergencys { background: #ff3b53 !important; width: 124rpx !important; } .emergency { background: #ff3b53 !important; } .emergency1 { background: #49b856 !important; } .page_item_cont_start { text-align: center; height: 44rpx; width: 104rpx; line-height: 44rpx; border-radius: 8rpx; background: #49b856; color: #fff; display: inline-block; } .L_time { color: #6cc076; font-size: 32rpx; } .L_text { font-size: 32rpx; font-weight: 700; } } .page_item_top_R { font-size: 32rpx; .L_iocn { color: rgb(7, 134, 60); font-size: 36rpx; font-weight: 700; } } } } .page_item_cont { min-height: 90rpx; padding: 0 16rpx; text-align: left; position: relative; .text_big { font-size: 32rpx; font-weight: 700; margin-top: 10rpx; p { font-weight: 700; line-height: 1.5; } } .page_item_cont_T { padding-top: 28rpx; font-size: 28rpx; .page_item_cont_title { height: 100%; font-size: 32rpx; display: flex; justify-content: space-between; } } .page_item_cont_B { padding-top: 28rpx; margin-bottom: 28rpx; .page_item_cont_title { font-size: 32rpx; display: flex; justify-content: space-between; } .page_item_cont_title1 { height: 60rpx; line-height: 60rpx; font-size: 32rpx; padding-left: 64rpx; } } } .page_item_foot { border-top: 2rpx dashed #e5e9ed; border-bottom: 2rpx dashed #e5e9ed; padding: 28rpx 16rpx; text-align: left; .page_item_foot_text { font-size: 32rpx; margin-bottom: 20rpx; .text1 { color: rgb(102, 102, 102); } .text2 { float: right; font-weight: 700; } } } #infos { display: none; } .page_item_infos { padding-bottom: 20rpx; border-bottom: 2rpx dashed #e5e9ed; .page_item_info2 { text-align: left; line-height: 60rpx; font-size: 32rpx; padding-left: 16rpx; .page_item_foot_text { font-size: 32rpx; margin-bottom: 20rpx; .text1 { color: rgb(102, 102, 102); } .text2 { float: right; font-weight: 700; } } } } } .L-l { width: 2rpx; height: 40rpx; background: #f9fafb; position: absolute; left: 20rpx; top: 72rpx; } .R-l { width: 2rpx; height: 40rpx; background: #f9fafb; position: absolute; right: 20rpx; top: 72rpx; } } .foot_btn2 { position: fixed; bottom: 0; width: 100vw; padding: 0 20rpx; box-sizing: border-box; line-height: 66rpx; height: 100rpx; border-top: 2rpx solid #e5e9ed; background: #f9fafb; text-align: center; display: flex; justify-content: center; align-items: center; .btn2 { height: 66rpx; flex: 1; margin: 16rpx 16rpx 0; background-image: linear-gradient(to right, #72c172, #3bb197); color: #fff; border-radius: 8rpx; font-size: 32rpx; } } } </style>