|
|
|
|
@ -34,8 +34,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
|
|
|
|
|
year: new Date().getFullYear(),
|
|
|
|
|
month: String(new Date().getMonth() + 1).padStart(2, "0"),
|
|
|
|
|
day: String(new Date().getDate()).padStart(2, "0"),
|
|
|
|
|
zkmoshiindex: 0,
|
|
|
|
|
modeIndex: null,
|
|
|
|
|
modeIndex: 0,
|
|
|
|
|
stepIndex: null,
|
|
|
|
|
autoPlay: false,
|
|
|
|
|
scrollleft: 0,
|
|
|
|
|
@ -154,7 +153,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
|
|
|
|
|
this.onModeLockOpen(); // 点击了锁定模式
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.setState({ zkmoshiindex: index, currentInfo });
|
|
|
|
|
this.setState({ modeIndex: index, currentInfo });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 选择图片上传
|
|
|
|
|
@ -300,7 +299,6 @@ export default class InstrumentClickInUpload extends Component<any, any> {
|
|
|
|
|
duration,
|
|
|
|
|
showVideoPlayBtn,
|
|
|
|
|
scrollleft,
|
|
|
|
|
zkmoshiindex,
|
|
|
|
|
punchInInfo,
|
|
|
|
|
isTipShow,
|
|
|
|
|
currentInfo,
|
|
|
|
|
@ -319,119 +317,119 @@ export default class InstrumentClickInUpload extends Component<any, any> {
|
|
|
|
|
} = this.state;
|
|
|
|
|
return (
|
|
|
|
|
<Block>
|
|
|
|
|
<Navbar titleSlot='打卡上传' isBack />
|
|
|
|
|
<Navbar titleSlot="打卡上传" isBack />
|
|
|
|
|
<Canvas
|
|
|
|
|
style='position: fixed;left:-10000px;'
|
|
|
|
|
id='compressImage'
|
|
|
|
|
canvasId='compressImage'
|
|
|
|
|
type='2d'
|
|
|
|
|
style="position: fixed;left:-10000px;"
|
|
|
|
|
id="compressImage"
|
|
|
|
|
canvasId="compressImage"
|
|
|
|
|
type="2d"
|
|
|
|
|
></Canvas>
|
|
|
|
|
|
|
|
|
|
<View catchMove>
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
<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
|
|
|
|
|
// autoplay={false}
|
|
|
|
|
direction={0}
|
|
|
|
|
loop={false}
|
|
|
|
|
showMuteBtn
|
|
|
|
|
referrerPolicy='origin'
|
|
|
|
|
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%;'
|
|
|
|
|
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 modebox'
|
|
|
|
|
className="flex aitems modebox"
|
|
|
|
|
style={{
|
|
|
|
|
height: "100%",
|
|
|
|
|
background:
|
|
|
|
|
zkmoshiindex == index
|
|
|
|
|
modeIndex == index
|
|
|
|
|
? "linear-gradient(90deg, #EFDCC2, #FFF2DF)"
|
|
|
|
|
: "",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<View className='block1'>
|
|
|
|
|
<View className='block1_1 flex aitems '>
|
|
|
|
|
<View className='tip1'>{item.modeName}</View>
|
|
|
|
|
<View className='tip2'>{item.modeDesc}</View>
|
|
|
|
|
<View className="block1">
|
|
|
|
|
<View className="block1_1 flex aitems ">
|
|
|
|
|
<View className="tip1">{item.modeName}</View>
|
|
|
|
|
<View className="tip2">{item.modeDesc}</View>
|
|
|
|
|
|
|
|
|
|
{!item.lock && zkmoshiindex !== index && (
|
|
|
|
|
<View className='quan1'></View>
|
|
|
|
|
{!item.lock && modeIndex !== index && (
|
|
|
|
|
<View className="quan1"></View>
|
|
|
|
|
)}
|
|
|
|
|
{!item.lock && zkmoshiindex == index && (
|
|
|
|
|
<View className='quan1 is-select flex aitems jcenter'>
|
|
|
|
|
<View className='quan2'></View>
|
|
|
|
|
{!item.lock && modeIndex == index && (
|
|
|
|
|
<View className="quan1 is-select flex aitems jcenter">
|
|
|
|
|
<View className="quan2"></View>
|
|
|
|
|
</View>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{item.lock && (
|
|
|
|
|
<View className='icon'>
|
|
|
|
|
<View className="icon">
|
|
|
|
|
<Image
|
|
|
|
|
src={require("@/img/fr200/suo.png")}
|
|
|
|
|
mode='aspectFill'
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
></Image>
|
|
|
|
|
</View>
|
|
|
|
|
)}
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
{item.modeBanner && index == zkmoshiindex && (
|
|
|
|
|
<View className='info1_img'>
|
|
|
|
|
<Image src={item.modeBanner} mode='aspectFill' />
|
|
|
|
|
{item.modeBanner && index == modeIndex && (
|
|
|
|
|
<View className="info1_img">
|
|
|
|
|
<Image src={item.modeBanner} mode="aspectFill" />
|
|
|
|
|
</View>
|
|
|
|
|
)}
|
|
|
|
|
</View>
|
|
|
|
|
@ -441,32 +439,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'
|
|
|
|
|
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>
|
|
|
|
|
@ -475,23 +473,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="placeh和给g'holder"
|
|
|
|
|
maxlength={100}
|
|
|
|
|
onInput={this.handleTextareaInput}
|
|
|
|
|
value={punchInInfo.clockContent}
|
|
|
|
|
placeholder='请记录一下今天打卡的心得吧~'
|
|
|
|
|
placeholder="请记录一下今天打卡的心得吧~"
|
|
|
|
|
></Textarea>
|
|
|
|
|
{/* {tipshow && (
|
|
|
|
|
<View className="Textarea">
|
|
|
|
|
@ -500,7 +498,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
|
|
|
|
|
: "请记录一下今天打卡的心得吧~"}
|
|
|
|
|
</View>
|
|
|
|
|
)} */}
|
|
|
|
|
<View className='tips-num'>
|
|
|
|
|
<View className="tips-num">
|
|
|
|
|
{punchInInfo.clockContent.length}/100
|
|
|
|
|
{/* {punchInInfo.clockContent.length}/100 */}
|
|
|
|
|
</View>
|
|
|
|
|
@ -509,16 +507,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>
|
|
|
|
|
|