master
rongweikang 2 years ago
parent f1105a54db
commit 91de12d009

@ -47,16 +47,7 @@ export default class PopupClock extends Component<any, any> {
onConfirm = () => {
let { type } = this.props;
switch (type) {
case "1": // 未注册
go("/pages/register/register");
break;
case "2": // 登录过期
go("/pages/login/login");
break;
case "3": // 前端提示-关注公众号
break;
}
this.props.confirm();
};

@ -1,10 +1,11 @@
import Taro from "@tarojs/taro";
import classNamenames from "classNamenames";
import classnames from "classnames";
import { Component, PropsWithChildren, useEffect, useState } from "react";
import { Progress } from '@antmjs/vantui'
import { Block, View, Text, Image, Input, Button } from "@tarojs/components";
import { date, getdates, previewImage } from "../../utils/util";
/** 自定义组件 **/
import Navbar from "../../components/navbar/navbar";
import PopupAlert from "../../components/popup/popup-alert";
@ -18,7 +19,9 @@ export default class Index extends Component<any, any> {
super(props);
this.state = {
name: "template模板页",
statistics: {},
recordList: [],
recordData: {}
};
}
@ -26,10 +29,60 @@ export default class Index extends Component<any, any> {
componentWillUnmount() { }
// 查询用户护理记录的当月统计信息
async getStatistics(id) {
let data = {}
if (id != null) {
data['instrumentId'] = id
}
let res = await InstrumentInfo.apiNursingLog.getStatistics(data)
if (res.data.code === 200) {
this.setState({ statistics: res.data.data })
}
}
async getRecord(id, recordId) {
let data = {}
if (id != null) {
data['instrumentId'] = id
}
let res = await InstrumentInfo.apiNursingLog.getRecord(data)
if (res.data.code === 200) {
res.data.rows.map(item => {
item.nursingTime = this.getTime(item.nursingTime)
item.createTime = getdates(item.createTime).replace(/-/g, '.')
if (item.id == recordId) {
this.setState({ recordData: item })
}
})
this.setState({ recordList: res.data.rows.filter(item => item.id != recordId) })
}
}
async onLoad() {
this.getClockStatistics()
getRouteId() {
const searchParams = new URLSearchParams(window.location.search);
const id = searchParams.get('id');
const recordId = searchParams.get('recordId');
this.getStatistics(id)
this.getRecord(id, recordId)
console.log(recordId);
}
getTime(time) {
const hour = time.slice(0, 2);
const minute = time.slice(3, 5);
const second = time.slice(6, 8);
if (hour > 0) {
return hour + '时' + minute + '分' + second + '秒'
} else {
return minute + '分' + second + '秒'
}
}
async onLoad() {
this.getRouteId()
}
componentDidShow() { }
@ -39,7 +92,7 @@ export default class Index extends Component<any, any> {
async initData() { }
render() {
let { name } = this.state;
let { name, statistics, recordList, recordData } = this.state;
return (
<Block>
<Navbar isBack titleSlot='护理报告'></Navbar>
@ -71,7 +124,7 @@ export default class Index extends Component<any, any> {
{/* <block wx:if="{{ reportData.instrument_type == 4 || reportData.instrument_type == 5 }}"> */}
<View className='statistic_item'>
<View className='statistic_title'>
<text>8</text>
<text>{statistics.nursingNum}</text>
<text className='num'></text>
</View>
<View className='statistic_desc'>
@ -79,7 +132,7 @@ export default class Index extends Component<any, any> {
</View>
</View>
<View className='statistic_item'>
<View className='statistic_title'>28:00</View>
<View className='statistic_title'>{statistics.nursingTime}</View>
<View className='statistic_desc'></View>
</View>
{/* </block> */}
@ -88,55 +141,63 @@ export default class Index extends Component<any, any> {
{/* <block wx:if="{{ reportData.instrument_type !== 4 && reportData.instrument_type !== 5 }}"> */}
<View className='products_item' style='border: none'>
<View className='products_top flex aitems'>
<View className='add_time'>2024.01.15</View>
<View className="{{reportData.nurseLog.online === 2 ? 'tag tag_active' : 'tag'}}">线</View>
<View className='add_time'>{recordData.createTime}</View>
<View className={classnames("tag", {
tag_active: recordData.online === 2,
})}
>{recordData.online == 1 ? '在线' : '离线'}</View>
</View>
<View className='products_middle flex'>
<Image className='cover' src={require('../../img/test/1706667011027.jpg')} mode='aspectFill'></Image>
<Image className='cover' src={recordData.modeImage} mode='aspectFill'></Image>
<View className='content'>
<View className='content_top'>
<View className='title'></View>
<View className='title'>{recordData.instrumentName}</View>
<View className='desc_box'>
<View className='desc'></View>
<View className='desc'>10:00</View>
<View className='desc'>{recordData.modeName}</View>
<View className='desc'>{recordData.nursingTime}</View>
</View>
</View>
<View className='progress'>
<Progress percentage='80' strokeWidth='12' pivotText='' color='linearGradient(to right, #eecda1, #ffe9c7) !important' />
<View className='percent'> 80%</View>
<Progress percentage={recordData.completionPercentage * 100} strokeWidth='12' color='linearGradient(to right, #eecda1, #ffe9c7) !important' />
<View className='percent'> {recordData.completionPercentage * 100}%</View>
</View>
</View>
</View>
</View>
<View className='main_title' ></View>
<View className='products_item'>
<View className='products_top flex aitems'>
<View className='add_time'>2024.01.01</View>
<View className="{{item.online === 2 ? 'tag tag_active' : 'tag'}}">线</View>
</View>
<View className='products_middle flex'>
<Image className='cover' src={require('../../img/test/1706667011027.jpg')} mode='aspectFill'></Image>
<View className='content'>
<View className='content_top'>
<View className='title'></View>
<View className='desc_box'>
<View className='desc'></View>
<View className='desc'>10:00</View>
{recordList.map(item => (
<View className='products_item' style='border: none' key={item.id}>
<View className='products_top flex aitems'>
<View className='add_time'>{item.createTime}</View>
<View className={classnames("tag", {
tag_active: item.online === 2,
})}
>{item.online == 1 ? '在线' : '离线'}</View>
</View>
<View className='products_middle flex'>
<Image className='cover' src={item.modeImage} mode='aspectFill'></Image>
<View className='content'>
<View className='content_top'>
<View className='title'>{item.instrumentName}</View>
<View className='desc_box'>
<View className='desc'>{item.modeName}</View>
<View className='desc'>{item.nursingTime}</View>
</View>
</View>
<View className='progress'>
<Progress percentage={item.completionPercentage * 100} strokeWidth='12' color='linearGradient(to right, #eecda1, #ffe9c7) !important' />
<View className='percent'> {item.completionPercentage * 100}%</View>
</View>
</View>
<View className='progress'>
<Progress percentage='80' strokeWidth='12' pivotText='' color='linearGradient(to right, #eecda1, #ffe9c7) !important' />
<View className='percent'> 80%</View>
</View>
</View>
</View>
))}
</View>
{/* </block> */}
{/* <block wx:if="{{ reportData.instrument_type == 4 || reportData.instrument_type == 5 }}"> */}
<View className='products_item' style='border: none'>
{/* <View className='products_item' style='border: none'>
<View className='products_top flex aitems'>
<View className='add_time'>2024.01.01</View>
<View className="{{reportData.online === 2 ? 'tag tag_active' : 'tag'}}">线</View>
@ -159,8 +220,8 @@ export default class Index extends Component<any, any> {
</View>
</View>
</View>
<View className='main_title' ></View>
</View> */}
{/* <View className='main_title' ></View>
<View className='products_item' >
<View className='products_top flex aitems'>
<View className='add_time'>2024.01.01</View>
@ -183,7 +244,7 @@ export default class Index extends Component<any, any> {
</View>
</View>
</View>
</View>
</View> */}
{/* </block> */}
</View>
@ -191,7 +252,7 @@ export default class Index extends Component<any, any> {
<View className='btn'></View>
<View className='text flex aitems'>
<View></View>
<Image src='/img/right.png' mode='aspectFill'></Image>
<Image src='../../img/right.png' mode='aspectFill'></Image>
</View>
</View>

@ -209,31 +209,29 @@ page {
.info1,
.info2 {
.block1 {
// width: 300rpx;
// height: 160rpx;
flex-direction: column;
display: inline-block;
height: 100%;
text-align: center;
.block1_1 {
height: 100%;
padding: 0 20rpx;
flex-direction: column;
width: 134rpx;
}
}
.info1_img {
width: 140rpx;
height: 140rpx;
margin-right: 10rpx;
border-radius: 20rpx;
overflow: hidden;
margin-left: 6rpx;
image {
width: 100%;
height: 100%;
}
}
.tip1 {
margin-top: 33rpx;
margin-top: 20rpx;
font-size: 26rpx;
font-weight: bold;
color: #000000;
@ -242,20 +240,20 @@ page {
font-size: 24rpx;
font-weight: 400;
color: #666666;
margin-top: 15rpx;
margin-top: 8rpx;
}
.quan1 {
border-radius: 50%;
border: 3rpx solid #f1f1f1;
width: 30rpx;
height: 30rpx;
margin-top: 21rpx;
margin-top: 15rpx;
&.is-select {
display: flex;
background-color: #fff;
border-color: #fff;
align-items: center;
justify-content: center;
justify-content: center;
}
.quan2 {
border-radius: 50%;
@ -270,6 +268,13 @@ page {
}
}
.modebox {
height: 160rpx;
border-radius: 30rpx;
padding: 10rpx;
box-sizing: border-box;
}
.popbox {
display: flex;
flex-direction: column;

@ -20,11 +20,13 @@ import PopupInstrumentUploadTips from "@/components/popup/popup-instrument-uploa
import { InstrumentInfo } from "@/utils/Interface";
import "./index.less";
import { contraction, getImgInfo } from "@/utils/compressImage";
import PopupAlert from "@/components/popup/popup-alert";
import { setStorageSync, getStorageSync, msg } from "@/utils/traoAPI";
import "./index.less";
export default class InstrumentClickInUpload extends Component<any, any> {
constructor(props) {
super(props);
@ -34,11 +36,11 @@ export default class InstrumentClickInUpload extends Component<any, any> {
month: String(new Date().getMonth() + 1).padStart(2, "0"),
day: String(new Date().getDate()).padStart(2, "0"),
zkmoshiindex: 0,
moshiindex: null,
buzhouindex: null,
autoplay: false,
modeIndex: null,
stepIndex: null,
autoPlay: false,
scrollleft: 0,
sysinfo: Taro.getSystemInfoSync(),
sysInfo: Taro.getSystemInfoSync(),
showVideoPlayBtn: true,
duration: 0,
@ -87,10 +89,13 @@ export default class InstrumentClickInUpload extends Component<any, any> {
this.setState({ instrumentDetail });
}
const searchParams = new URLSearchParams(window.location.search);
const id = searchParams.get('id');
setTimeout(() => {
this.firstNurseInfo();
this.getLatestClockRecord();
this.modeInfoList();
this.modeInfoList(id);
}, 10);
}
@ -121,7 +126,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
this.setState({ punchInInfo });
};
// 获取仪器模式列表
modeInfoList = async () => {
modeInfoList = async (id) => {
let res = await InstrumentInfo.modeInfoList({
instrumentId: "84",
});
@ -287,116 +292,124 @@ export default class InstrumentClickInUpload extends Component<any, any> {
nurseInfo,
isModeLock,
isSubmit,
year,
month,
day,
modeIndex,
stepIndex,
autoPlay,
sysInfo,
clockContent,
} = this.state;
return (
<Block>
<Navbar titleSlot="打卡上传" isBack={true} />
<Navbar titleSlot='打卡上传' isBack />
<Canvas
style="height: 0"
id="compressImage"
canvasId="compressImage"
type="2d"
style='height: 0'
id='compressImage'
canvasId='compressImage'
type='2d'
></Canvas>
<PopupAlert
isShow={isModeLock}
title="提示"
content="该模式即将上线,敬请期待"
confirmButtonText="知道了"
textAlgin="center"
title='提示'
content='该模式即将上线,敬请期待'
confirmButtonText='知道了'
textAlgin='center'
isClose={false}
close={this.onModeLockClose}
confirm={this.onModeLockClose}
/>
<PopupInstrumentUploadTips
isShow={isTipShow}
title="打卡介绍"
title='打卡介绍'
data={nurseInfo}
close={this.onTipShowClose}
confirm={this.onTipShowClose}
/>
<View className="infobox1 flex aitems jcenter">
<View className="img">
<View className='infobox1 flex aitems jcenter'>
<View className='img'>
<Video
src={currentInfo.modeVideo}
id="myVideo"
id='myVideo'
enableProgressGesture={false}
controls={true}
controls
// autoplay={false}
direction={0}
loop={false}
showMuteBtn={true}
referrerPolicy="origin"
showMuteBtn
referrerPolicy='origin'
onTimeUpdate={this.videoBindTimeUpdate}
onEnded={this.videoEnded}
onPause={this.videoPause}
onPlay={this.videoPlay}
showCenterPlayBtn={false}
onLoadedMetaData={this.videoLoadedMetaData}
style="width: 100%; height: 100%;border-radius: 30rpx;"
style='width: 100%; height: 100%;border-radius: 30rpx;'
/>
{showVideoPlayBtn && (
<View className="video-cover">
<View className='video-cover'>
<Image
className="video-cover-icon"
className='video-cover-icon'
src={require("../../img/fr200/play.png")}
onClick={this.onPlayTap}
></Image>
{duration && (
<View className="video-cover-time">{duration}</View>
<View className='video-cover-time'>{duration}</View>
)}
</View>
)}
</View>
</View>
<View className="infobox3">
<View className='infobox3'>
<ScrollView
style="white-space: nowrap; height: 100%;"
scroll-x={true}
style='white-space: nowrap; height: 100%;'
scroll-x
scroll-left={scrollleft}
>
{modeInfo.map((item, index) => {
return (
<View
className="info1"
className='info1'
onClick={this.bindMoshi.bind(this, index)}
key={index}
>
<View
className="flex aitems"
style="height: 100%; {{zkmoshiindex == index ? 'background: linear-gradient(90deg, #EFDCC2, #FFF2DF)': ''}}"
className='flex aitems modebox'
style={{height: '100%', background: zkmoshiindex == index ?'linear-gradient(90deg, #EFDCC2, #FFF2DF)': ''}}
>
<View className="block1">
<View className='block1'>
<View
className="block1_1 flex aitems "
style="min-width: 80rpx"
className='block1_1 flex aitems '
style='min-width: 80rpx'
>
<View className="tip1">{item.modeName}</View>
<View className="tip2">{item.modeDesc}</View>
<View className='tip1'>{item.modeName}</View>
<View className='tip2'>{item.modeDesc}</View>
{!item.lock && zkmoshiindex !== index && (
<View className="quan1"></View>
<View className='quan1'></View>
)}
{!item.lock && zkmoshiindex == index && (
<View className="quan1 is-select flex aitems jcenter">
<View className="quan2"></View>
<View className='quan1 is-select flex aitems jcenter'>
<View className='quan2'></View>
</View>
)}
{item.lock && (
<View className="icon">
<View className='icon'>
<Image
src="/img/fr200/suo.png"
mode="aspectFill"
src='/img/fr200/suo.png'
mode='aspectFill'
></Image>
</View>
)}
</View>
</View>
{item.modeBanner && (
<View className="info1_img">
<Image src={item.modeBanner} mode="aspectFill" />
{item.modeBanner && index == zkmoshiindex &&(
<View className='info1_img'>
<Image src={item.modeBanner} mode='aspectFill' />
</View>
)}
</View>
@ -406,32 +419,32 @@ export default class InstrumentClickInUpload extends Component<any, any> {
</ScrollView>
</View>
<View className="infobox2">
<View className="infobox2_info">
<View className="info4">
<View className="upload_header flex aitems sb">
<View className="upload_title"></View>
<View className="icon" onClick={this.onTipShowOpen}>
<View className='infobox2'>
<View className='infobox2_info'>
<View className='info4'>
<View className='upload_header flex aitems sb'>
<View className='upload_title'></View>
<View className='icon' onClick={this.onTipShowOpen}>
<Image
src={require("../../img/clock_in_upload/info.png")}
mode="aspectFill"
mode='aspectFill'
></Image>
</View>
</View>
<View className="imgbox flex aitems">
<View className='imgbox flex aitems'>
{punchInInfo.clockImageList.length > 0 &&
punchInInfo.clockImageList.map((item, index) => {
return (
<View className="img" key={"clickin_" + index}>
<View className='img' key={"clickin_" + index}>
<Image src={item}></Image>
<View
className="close flex aitems jcenter"
data-index="{{index}}"
className='close flex aitems jcenter'
data-index='{{index}}'
onClick={this.handleDeleteImage}
>
<Image
src={require("../../img/fr200/close_white.png")}
mode="widthFix"
mode='widthFix'
></Image>
</View>
</View>
@ -440,23 +453,23 @@ export default class InstrumentClickInUpload extends Component<any, any> {
{punchInInfo.clockImageList.length < 3 && (
<View
className="img2 flex aitems jcenter"
className='img2 flex aitems jcenter'
onClick={this.handleChooseImage}
>
<Image
src={require("../../img/fr200/add-Image.png")}
mode="aspectFill"
mode='aspectFill'
></Image>
</View>
)}
</View>
<View className="content">
<View className='content'>
<Textarea
placeholder-className="placeholder"
placeholder-className='placeholder'
maxlength={100}
onInput={this.handleTextareaInput}
value={punchInInfo.clockContent}
placeholder="请记录一下今天打卡的心得吧~"
placeholder='请记录一下今天打卡的心得吧~'
></Textarea>
{/* {tipshow && (
<View className="Textarea">
@ -465,7 +478,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
: "请记录一下今天打卡的心得吧~"}
</View>
)} */}
<View className="tips-num">
<View className='tips-num'>
{punchInInfo.clockContent.length}/100
</View>
</View>
@ -473,16 +486,16 @@ export default class InstrumentClickInUpload extends Component<any, any> {
</View>
</View>
<View style="height: 150rpx"></View>
<View style='height: 150rpx'></View>
{!isSubmit && (
<View className="confirm_btn flex aitems" onClick={this.handleSubmit}>
<View className="btn"></View>
<View className='confirm_btn flex aitems' onClick={this.handleSubmit}>
<View className='btn'></View>
</View>
)}
{isSubmit && (
<View className="confirm_btn flex aitems">
<View className="btn"></View>
<View className='confirm_btn flex aitems'>
<View className='btn'></View>
</View>
)}
</Block>

@ -18,7 +18,6 @@ page {
position: sticky;
top: 174rpx;
z-index: 9;
}
.tab {
@ -176,7 +175,6 @@ page {
color: #999;
}
// .instrument_item {
// margin-top: 20rpx;
// background: #ffffff;
@ -472,6 +470,28 @@ page {
border-radius: 45rpx;
}
.footer {
position: fixed;
z-index: 99;
bottom: 0;
width: 100%;
height: 153rpx;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
background: #ffffff;
}
.btn {
width: 690rpx;
height: 90rpx;
background: #000000;
border-radius: 45rpx;
color: #fff;
text-align: center;
line-height: 90rpx;
font-weight: bold;
font-size: 32rpx;
margin: 0 auto;
}
// .empty {
// display: flex;
// flex-direction: column;
@ -594,7 +614,7 @@ page {
font-weight: 500;
color: #999999;
}
.subtitle:last-child{
.subtitle:last-child {
margin-top: 10rpx;
}
}

@ -4,11 +4,11 @@ import { Component, PropsWithChildren, useEffect, useState } from "react";
import { Block, View, Text, Image, Input, Button, ScrollView, Picker } from "@tarojs/components";
import { go } from "@/utils/traoAPI";
import { Tab, Tabs } from "@antmjs/vantui";
import { Tab, Tabs, Dialog } from "@antmjs/vantui";
/** 自定义组件 **/
import Navbar from "../../components/navbar/navbar";
import PopupAlert from "../../components/popup/popup-alert";
import PopupClock from "../../components/popup/popup-clock";
/** 自定义组件 **/
import { InstrumentInfo } from '../../utils/Interface'
@ -27,15 +27,27 @@ export default class Recording extends Component<any, any> {
bindingInstrumentList: [],
curIndex: null,
clockStatistics: [],
statistics:[],
year:new Date().getFullYear(),
today: new Date()
statistics: [],
year: new Date().getFullYear(),
today: new Date(),
monthTime: [
{ month: 1, time: 0 },
{ month: 2, time: 0 },
{ month: 3, time: 0 },
{ month: 4, time: 0 },
{ month: 5, time: 0 },
{ month: 6, time: 0 },
{ month: 7, time: 0 },
{ month: 8, time: 0 },
{ month: 9, time: 0 },
{ month: 10, time: 0 },
{ month: 11, time: 0 },
{ month: 12, time: 0 },
],
show:true
};
}
componentDidMount() { }
componentWillUnmount() { }
@ -64,52 +76,93 @@ export default class Recording extends Component<any, any> {
if (id != null) {
data['instrumentId'] = id
}
let res = await InstrumentInfo.nursingLog.getRecord(data)
let res = await InstrumentInfo.apiNursingLog.getRecord(data)
if (res.data.code === 200) {
res.data.rows.map(item => {
item.nursingTime = this.getTime(item.nursingTime)
item.createTime = getdates(item.createTime).replace(/-/g, '.')
})
this.setState({ recordList: res.data.rows })
}
}
async addLog() {
let data = {
instrumentId: 57,
instrumentName: "0130验收FR100",
online: 1,
modeId: 100,
modeName: "护理记录测试",
nursingTime: "00:15:00"
}
let res = await InstrumentInfo.apiNursingLog.addLog(data)
if (res.data.code === 200) {
}
}
/**分页获取用户的打卡记录 page size*/
async getClockStatistics(year=this.state.year) {
let res = await InstrumentInfo.clock.getClockStatistics({year})
async getClockStatistics(year = this.state.year) {
let res = await InstrumentInfo.apiClock.getClockStatistics({ year })
if (res.data.code === 200) {
res.data.data.reverse()
res.data.data.map(item=>{
item.isMore = false
})
if (res.data.data.length > 0) {
res.data.data.map((item, index) => {
item.isMore = false
if (index === 0) {
item.isMore = true
}
this.state.monthTime.map(monthItem => {
if (monthItem.month == item.month) {
monthItem.time = item.clockNum
}
})
})
this.setState({ monthTime: this.state.monthTime })
} else {
let monthTime = [
{ month: 1, time: 0 },
{ month: 2, time: 0 },
{ month: 3, time: 0 },
{ month: 4, time: 0 },
{ month: 5, time: 0 },
{ month: 6, time: 0 },
{ month: 7, time: 0 },
{ month: 8, time: 0 },
{ month: 9, time: 0 },
{ month: 10, time: 0 },
{ month: 11, time: 0 },
{ month: 12, time: 0 },
]
this.setState({ monthTime })
}
this.setState({ clockStatistics: res.data.data })
}
}
// 查询用户护理记录的当月统计信息
async getStatistics(id) {
let data = {}
if (id != null) {
data['instrumentId'] = id
}
let res = await InstrumentInfo.nursingLog.getStatistics(data)
// if (res.data.code === 200) {
// this.setState({ statistics: res.data.rows })
// }
setShow(show: boolean){
this.setState({show})
}
closeAlert(){
this.setShow(false)
}
onChangeProduct(id) {
this.setState({ curIndex: id })
this.getRecord(id)
// this.addLog()
};
onChangeMore(id){
this.state.clockStatistics.map(item=>{
if(item.id === id){
onChangeMore(id) {
this.state.clockStatistics.map(item => {
if (item.id === id) {
item.isMore = !item.isMore
}
})
this.setState({ clockStatistics:this.state.clockStatistics})
this.setState({ clockStatistics: this.state.clockStatistics })
}
async onLoad() {
@ -124,9 +177,9 @@ export default class Recording extends Component<any, any> {
async initData() { }
onChangeYear(event) {
this.setState({ year: event.detail.value})
this.setState({ year: event.detail.value })
this.getClockStatistics(event.detail.value)
}
}
onTab = async (event) => {
const { current } = event.currentTarget.dataset;
@ -136,12 +189,12 @@ export default class Recording extends Component<any, any> {
}
};
toReport() {
go("/pages/face_report/face_report");
toReport(id, recordId) {
go("/pages/face_report/face_report?id=" + id + "&recordId=" + recordId);
}
render() {
let { current, array, name, recordList, bindingInstrumentList, curIndex, clockStatistics,statistics,year,today } = this.state;
let { current, array, name, recordList, bindingInstrumentList, curIndex, clockStatistics, statistics, year, today, monthTime,show } = this.state;
return (
<Block>
<Navbar isBack titleSlot='护理记录'></Navbar>
@ -235,11 +288,11 @@ export default class Recording extends Component<any, any> {
<View className='top-left'>
<View className='date'>{item.createTime}</View>
<View className={classnames("tip", {
tag_active: item.online === 0,
tag_active: item.online === 2,
})}
>{item.online ? '在线' : '离线'}</View>
</View>
<View className='top-right' onClick={this.toReport}>
<View className='top-right' onClick={this.toReport.bind(this, item.instrumentId, item.id)}>
<Image className='arrow_icon' src={require("../../img/index/right.png")} mode='aspectFill'></Image>
</View>
@ -283,60 +336,85 @@ export default class Recording extends Component<any, any> {
</Picker>
</View>
<View className='chart flex sb'>
<View className='flex fc aitems' >
<View className='buoy' >5</View>
<View className='column' style='height: calc(186/31*{{item.total}}rpx)'></View>
<View className='month'>1</View>
</View>
{
monthTime.map(item => (
<View className='flex fc aitems' key={item.month}>
{
item.time > 0 && <View className='buoy' >{item.time}</View>
}
<View className='column' style={{ height: `calc(186/31*${item.time}rpx)` }}></View>
<View className='month'>{item.month}</View>
</View>
))
}
</View>
</View>
<View style='padding-bottom: env(safe-area-inset-bottom)' >
<View className='month_box m-x-30'>
{clockStatistics.map(item => (
<View className='month_statistics' key={item.id}>
<View className='flex aitems sb'>
<View className='time'>{item.year}{item.month}</View>
<View className='more_box flex aitems' onClick={this.onChangeMore.bind(this,item.id)}>
<View className='more_text'> {!item.isMore ? '展开更多' : '收起更多'}</View>
<Image style={{transform: (item.isMore) ? 'rotate(180deg)':'rotate(0deg)'}} className='more_icon'
src={require("../../img/arrow-down.png")} mode='widthFix'
></Image>
</View>
<View className='month_statistics' key={item.id}>
<View className='flex aitems sb'>
<View className='time'>{item.year}{item.month}</View>
<View className='more_box flex aitems' onClick={this.onChangeMore.bind(this, item.id)}>
<View className='more_text'> {!item.isMore ? '展开更多' : '收起更多'}</View>
<Image style={{ transform: (item.isMore) ? 'rotate(180deg)' : 'rotate(0deg)' }} className='more_icon'
src={require("../../img/arrow-down.png")} mode='widthFix'
></Image>
</View>
<View style='height: 59rpx'></View>
<View className='statistic'>
<View className='statistic_item'>
<View className='statistic_num'>{item.clockNum}</View>
<View className='statistic_desc'></View>
</View>
<View className='statistic_item'>
<View className='statistic_num'>{item.percentage*100}%</View>
<View className='statistic_desc'></View>
</View>
<View className='border'></View>
</View>
<View style='height: 59rpx'></View>
<View className='statistic'>
<View className='statistic_item'>
<View className='statistic_num'>{item.clockNum}</View>
<View className='statistic_desc'></View>
</View>
<View className='statistic_item'>
<View className='statistic_num'>{item.percentage * 100}%</View>
<View className='statistic_desc'></View>
</View>
{ item.isMore&&
<View className='border'></View>
</View>
{item.isMore &&
<View>
<View style='height: 57rpx' ></View>
<View className='month_item'>
<View className='month_item_date'>2024.5.23</View>
<View className='month_image_box flex sb'>
<Image className='month_item_cover' src={require("../../img/test/1706667011027.jpg")} ></Image>
<View style='height: 57rpx' ></View>
<View className='month_item'>
<View className='month_item_date'>2024.5.23</View>
<View className='month_image_box flex sb'>
<Image className='month_item_cover' src={require("../../img/test/1706667011027.jpg")} ></Image>
</View>
<View className='month_item_date'>PRO </View>
<View className='month_item_note'></View>
</View>
<View className='month_item_date'>PRO </View>
<View className='month_item_note'></View>
</View>
</View>
}
</View>
))
}
</View>
))
}
</View>
</View>
</View>
)}
<View className='footer flex aitems' >
<View className='btn' onClick={this.setShow.bind(this,true)}></View>
</View>
<PopupClock
isShow={show}
isClose
title='今日打卡'
content='暂未授权注册,请点击注册'
confirmButtonText='确认提交'
textAlgin='center'
type='1'
close={this.closeAlert}
confirm={this.closeAlert}
/>
</Block>
);
}
}
}

Loading…
Cancel
Save