master
lion 5 months ago
parent 90ca22d360
commit 490382bb7c

@ -120,6 +120,11 @@ export default {
showTitle: {
type: Boolean,
default: uni.$u.props.swiper.showTitle
},
// 视频全屏时的方向设置参考小程序video组件direction属性
videoDirection: {
type: [Number, String],
default: 0
}
}
}

@ -58,6 +58,7 @@
v-if="getItemType(item) === 'video'"
:id="`video-${index}`"
:enable-progress-gesture="false"
:direction="videoDirection"
:src="getSource(item)"
:poster="getPoster(item)"
:title="showTitle && $u.test.object(item) && item.title ? item.title : ''"

@ -1,4 +1,5 @@
<template>
<page-meta :page-style="'overflow:'+(showCodes?'hidden':'visible')"></page-meta>
<view class="containers">
<view class="db">
<view class="dblist">
@ -13,9 +14,13 @@
<view class="en-text">Visit Date: {{info.date}}{{ info.end_date?' to '+info.end_date:'' }}</view>
</view>
<view class="label-with-en-inline">
<view>访问时间{{info.time?info.time:''}}</view>
<view class="en-text">Visit Time: {{info.time?info.time:''}}</view>
</view>
<!-- <view class="label-with-en-inline">
<view>访问时间{{info.visit_time.start_time}}{{info.visit_time.end_time}}</view>
<view class="en-text">Visit Time: {{info.visit_time.start_time}} to {{info.visit_time.end_time}}</view>
</view>
</view> -->
</view>
<view v-if="info.type=='2'" class="label-with-en-inline">
<view>施工时段{{info.work_start_time}}{{info.work_end_time}}</view>
@ -162,7 +167,7 @@
</view>
</view>
</view>
<block v-if="info.visit_area.name=='生产区'">
<!-- <block v-if="info.visit_area.name=='生产区'">
<view class="dbtext label-with-en-inline">
<view>陪同人员</view>
<view class="en-text">Escort Personnel</view>
@ -179,7 +184,7 @@
</view>
</view>
</view>
</block>
</block> -->
<!-- <template v-if="info.accept_admin_sign">
<view class="dbtext">签字</view>
@ -228,20 +233,48 @@
<view class="en-text">{{checkTextEn}}</view>
</view>
<!-- 出示二维码按钮 -->
<view class="justify-between cancelcode" v-if="info.audit_status==1||info.audit_status==3">
<button :class="info.audit_status==3?'wd100 codebtn':'codebtn'" @click="createdCode"
type="primary" class="button-with-en">
<view>出示二维码/Show QR Code</view>
</button>
</view>
</view>
</view>
<!-- 二维码弹窗 -->
<u-popup class="codepop" :show="showCodes" mode="center" closeable="true" @close="closeshowCodes">
<view class="userBox" style="padding:0 120rpx 0rpx 120rpx;">
<view class="userInfoContent" style="padding: 40rpx;font-size: 28rpx;">
<view class="label-with-en-inline">
<text>核销码{{info.code}}</text>
<text class="en-text">Verification Code: {{info.code}}</text>
</view>
</view>
<view class="qrcode">
<canvas canvas-id='qrcode' style="width: 170px;height:170px;margin: 0 auto;">
</canvas>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import '@/static/css/bd.css'
import uQRCode from "@/utils/qrcode.js"
export default {
data() {
return {
id: "",
info: {},
showCodes: false,
checkText:'',
checkTextEn:'',
checkLevel:[{
@ -296,6 +329,28 @@
this.loadDetail()
},
methods: {
closeshowCodes() {
this.showCodes = false
},
createdCode(code) {
var id = "qrcode";
this.showCodes = true
uQRCode.make({
canvasId: id,
componentInstance: this,
text: this.info.code,
size: 170,
// margin: 10,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
success: res => {
}
})
},
checkSubmit() {
let that = this
console.log(that.checkForm)
@ -458,4 +513,36 @@
width: 140px;
min-width: 140px;
}
/deep/ .u-popup__content {
background: #fff;
}
.cancelcode {
margin: 60rpx 0;
background-color: #eceefe;
}
.cancelcode button {
width: 100%
}
.cancelcode button.codebtn {
background: #4f607e;
border: none;
color: #fff
}
.cancelcode button.wd100 {
width: 100%;
}
.userInfoContent .label-with-en-inline {
text-align: center;
}
.userInfoContent .label-with-en-inline .en-text {
font-size: 22rpx;
margin-top: 8rpx;
}
</style>

@ -70,9 +70,14 @@
<view class="en-text">Visit Date: {{item.date}}{{ item.end_date?' to '+item.end_date:'' }}</view>
</view>
<view class="label-with-en-inline">
<view>访问时间{{item.visit_time.start_time}}{{item.visit_time.end_time}}</view>
<view class="en-text">Visit Time: {{item.visit_time.start_time}} to {{item.visit_time.end_time}}</view>
<view>访问时间{{item.time?item.time:''}}</view>
<view class="en-text">Visit Time: {{item.time?item.time:''}}</view>
</view>
<!-- <view class="label-with-en-inline">
<view>访问时段{{item.visit_time.start_time}}{{item.visit_time.end_time}}</view>
<view class="en-text">Visit Time: {{item.visit_time.start_time}} to {{item.visit_time.end_time}}</view>
</view> -->
</view>
</view>
<view class="dbinfo justify-left">
@ -140,15 +145,15 @@
<view class="justify-between">
<button @click="toForm(1)" class="button-with-en">
<view>普通访客</view>
<view class="en-text">Regular Visitor</view>
<view class="en-text">General Visitor</view>
</button>
<button @click="toForm(2)" class="button-with-en">
<view>施工人员</view>
<view class="en-text">Construction Worker</view>
</button>
<button @click="toForm(3)" class="button-with-en">
<view>物流车辆</view>
<view class="en-text">Logistics Vehicle</view>
<view>物流司机</view>
<view class="en-text">Logistics Driver</view>
</button>
</view>
</view>

@ -25,9 +25,13 @@
<view class="en-text">Visit Date: {{item.date}}{{ item.end_date?' to '+item.end_date:'' }}</view>
</view>
<view class="label-with-en-inline">
<view>访问时间{{item.time?item.time:''}}</view>
<view class="en-text">Visit Time: {{item.time?item.time:''}}</view>
</view>
<!-- <view class="label-with-en-inline">
<view>访问时间{{item.visit_time.start_time}}{{item.visit_time.end_time}}</view>
<view class="en-text">Visit Time: {{item.visit_time.start_time}} to {{item.visit_time.end_time}}</view>
</view>
</view> -->
</view>
</view>
<view class="dbinfo justify-left">

@ -71,6 +71,14 @@
</view>
</view>
</view>
<!-- <view class="share-section">
<button open-type="share" class="share-button">
<view class="share-text">
<text class="chinese">分享给好友</text>
<text class="english">Share with Friends</text>
</view>
</button>
</view> -->
<view class="footer-text">
<text>迈柯唯医疗设备(苏州)有限公司 Maquet(Suzhou)Co.,Ltd</text>
</view>
@ -104,6 +112,20 @@
this.isBd = uni.getStorageSync("userInfo_BD_token").token
console.log("bd",this.isBd)
},
onShareAppMessage() {
return {
title: '迈柯唯访客系统 | 访客预约与学习',
path: '/pages/index/index',
// imageUrl: this.logoIndex
}
},
onShareTimeline() {
return {
title: '迈柯唯访客系统 | 访客预约与学习',
path: '/pages/index/index',
// imageUrl: this.logoIndex
}
},
methods: {
toUrl(type) {
let url = ""
@ -346,6 +368,39 @@
.sgry view {
margin-top: 40rpx
}
.share-section {
padding: 20rpx 0 0;
}
.share-button {
width: 100%;
border: none;
background: #4f607e;
color: #fff;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 24rpx 0;
}
.share-text {
display: flex;
flex-direction: column;
align-items: center;
line-height: 1.3;
}
.share-text .chinese {
font-size: 32rpx;
font-weight: bold;
}
.share-text .english {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.8);
}
.footer-text{
font-size: 24rpx;
color: #999999;

File diff suppressed because it is too large Load Diff

@ -14,9 +14,13 @@
<view class="en-text">Visit Date: {{info.date}}{{ info.end_date?' to '+info.end_date:'' }}</view>
</view>
<view class="label-with-en">
<view>访问时间{{info.time?info.time:''}}</view>
<view class="en-text">Visit Time: {{info.time?info.time:''}}</view>
</view>
<!-- <view class="label-with-en">
<view>访问时间{{info.visit_time.start_time}}{{info.visit_time.end_time}}</view>
<view class="en-text">Visit Time: {{info.visit_time.start_time}} to {{info.visit_time.end_time}}</view>
</view>
</view> -->
</view>
<view v-if="info.type=='2'" class="label-with-en">
<view>施工时段{{info.work_start_time}}{{info.work_end_time}}</view>
@ -136,7 +140,7 @@
<template v-if="info.type=='3'">
<view class="dbtext label-with-en">
<view>收货</view>
<view>被访</view>
<view class="en-text">Consignee</view>
</view>
<view class="dbitem sfyritem">
@ -168,7 +172,7 @@
</view>
</view>
</view>
<block v-if="info.visit_area.name=='生产区'">
<!-- <block v-if="info.visit_area.name=='生产区'">
<view class="dbtext label-with-en">
<view>陪同人员</view>
<view class="en-text">Accompanying Personnel</view>
@ -185,7 +189,7 @@
</view>
</view>
</view>
</block>
</block> -->
<!-- <template v-if="info.accept_admin_sign">
<view class="dbtext">签字</view>
<view class="dbitem sfyritem">

@ -15,16 +15,23 @@
</view>
</u-swiper>
</view>
<view v-if="videoList.length>0&&showSwiperFlag==1">
<u-swiper :list="videoList" @change="changeVideo" keyName="url"
:height="'360rpx'" :interval='4000' :duration='500' :autoplay='false' circular>
<view v-if="videoList.length>0&&showSwiperFlag==1" class="video-overlay">
<u-icon name="arrow-left" color="#fff" size="40" class="video-arrow"
@click.stop="slideVideo('prev')" v-if="videoList.length>1"></u-icon>
<view slot="indicator" class="indicator">
<view class="indicator__dot" v-for="(item, index) in videoList" :key="index"
:class="[index === videocurrent && 'indicator__dot--active']">
</view>
<view class="video-main" @click="openVideoPopup(videoList[videocurrent], videocurrent)">
<u-icon name="play-right-fill" color="#fff" size="60"></u-icon>
<!-- <view class="video-count">
<text>视频 {{videocurrent+1}} / {{videoList.length}}</text>
<text class="en-text">{{videocurrent+1}} / {{videoList.length}} Videos</text>
</view> -->
<!-- <view class="video-title" v-if="videoList[videocurrent] && (videoList[videocurrent].name || videoList[videocurrent].title)">
<text>{{videoList[videocurrent].name || videoList[videocurrent].title}}</text>
</view> -->
</view>
</u-swiper>
<u-icon name="arrow-right" color="#fff" size="40" class="video-arrow"
@click.stop="slideVideo('next')" v-if="videoList.length>1"></u-icon>
</view>
<view class="changePicVideo">
@ -39,6 +46,14 @@
</view>
</view>
<u-popup class="video-popup" :show="showVideoPlayer" mode="center" closeable="true" @close="closeVideoPopup">
<view class="video-wrapper">
<video id="studyVideo" class="study-video" :src="currentVideoUrl" controls
show-center-play-btn enable-play-gesture show-fullscreen-btn
@fullscreenchange="handleFullScreenChange">
</video>
</view>
</u-popup>
<view v-html="studyInfo.content" style="padding-bottom: 160rpx;">
</view>
</view>
@ -81,6 +96,11 @@
studyTime: "00:00", //
studyMin: -1, //
timer: null,
videoDirection: 90,
showVideoPlayer: false,
currentVideoUrl: '',
videoContext: null,
videoPoster: require('../../static/img/ptfk.png')
}
},
onLoad(options) {
@ -144,9 +164,6 @@
changeImg(e){
this.imgcurrent = e.current
},
changeImg(e){
this.videocurrent = e.current
},
changeSwiperImg(){
this.showSwiperFlag=0
this.imgcurrent=0
@ -154,6 +171,48 @@
changeSwiperVideo(){
this.showSwiperFlag=1
this.videocurrent=0
},
slideVideo(direction){
if(this.videoList.length<=1){
return
}
if(direction === 'prev'){
this.videocurrent = (this.videocurrent - 1 + this.videoList.length) % this.videoList.length
}else if(direction === 'next'){
this.videocurrent = (this.videocurrent + 1) % this.videoList.length
}
},
openVideoPopup(item, index){
if(!item || !item.url){
return
}
this.currentVideoUrl = item.url
this.showVideoPlayer = true
this.$nextTick(()=>{
setTimeout(()=>{
this.videoContext = uni.createVideoContext('studyVideo', this)
// #ifdef MP-WEIXIN
this.videoContext.requestFullScreen({
direction: this.videoDirection
})
// #endif
this.videoContext.play()
}, 200)
})
},
closeVideoPopup(){
if(this.videoContext){
this.videoContext.pause()
// #ifdef MP-WEIXIN
this.videoContext.exitFullScreen()
// #endif
}
this.showVideoPlayer = false
},
handleFullScreenChange(e){
if(!e.detail.fullScreen){
this.closeVideoPopup()
}
}
@ -215,6 +274,53 @@
height: 360rpx;
position: relative;
}
.video-overlay{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.75);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 20rpx;
color: #fff;
padding: 0 30rpx;
gap: 20rpx;
height: 100%;
}
.video-main{
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
height: 100%;
justify-content: center;
}
.video-count{
margin-top: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
font-size: 30rpx;
}
.video-count .en-text{
font-size: 22rpx;
margin-top: 8rpx;
color: rgba(255,255,255,0.85);
}
.video-title{
margin-top: 20rpx;
font-size: 26rpx;
color: rgba(255,255,255,0.9);
text-align: center;
padding: 0 20rpx;
}
.video-arrow{
padding: 20rpx;
}
.service-show .changePicVideo{
position: absolute;
right: 80rpx;
@ -249,4 +355,18 @@
.button-text > view:first-child {
font-size: 28rpx;
}
.video-popup /deep/ .u-popup__content{
background: transparent;
}
.video-wrapper{
width: 640rpx;
height: 360rpx;
background: #000;
border-radius: 20rpx;
overflow: hidden;
}
.study-video{
width: 100%;
height: 100%;
}
</style>

@ -66,6 +66,7 @@
},
data(){
return{
canStudy:true,
steps: [{
title: '填报\nRegistration'
}, {
@ -75,7 +76,7 @@
}],
stepActive: 0,
form:{
type:1,
type:2,
name:'',
idcard:'',
mobile:''
@ -114,13 +115,13 @@
},
typeList:[{
value:1,
text:'普通访客 / Regular Visitor'
text:'普通访客/General Visitor'
},{
value:2,
text:'施工人员 / Construction Worker'
text:'施工人员/Construction Worker'
},{
value:3,
text:'物流司机 / Logistics Driver'
text:'物流司机/Logistics Driver'
}]
}
},
@ -145,6 +146,10 @@
console.log('User rejected the privacy policy');
},
toUrl(){
if(!this.canStudy){
this.util.alert("目前您不需要参加培训 No training is required for you at this time")
return
}
this.$refs['formdata'].validate().then(res => {
uni.setStorageSync('studydata', this.form)
uni.navigateTo({
@ -157,6 +162,11 @@
changeType(e){
console.log(e)
this.form.type = e
if(e==1||e==3){
this.canStudy = false
return
}
this.canStudy = true
this.isStudy()
},
isStudy(){

@ -18,9 +18,13 @@
<view>访问日期{{item.date}}{{ item.end_date?'至'+item.end_date:'' }}</view>
<view class="en-text">Visit Date: {{item.date}}{{ item.end_date?' to '+item.end_date:'' }}</view>
</view>
<view class="label-with-en">
<!-- <view class="label-with-en">
<view>访问时间{{item.visit_time.start_time}}{{item.visit_time.end_time}}</view>
<view class="en-text">Visit Time: {{item.visit_time.start_time}} to {{item.visit_time.end_time}}</view>
</view> -->
<view class="label-with-en">
<view>访问时间{{info.time?info.time:''}}</view>
<view class="en-text">Visit Time: {{info.time?info.time:''}}</view>
</view>
</view>
</view>

Loading…
Cancel
Save