Compare commits

...

2 Commits

30 changed files with 1241 additions and 139 deletions

View File

@ -13,7 +13,7 @@
"type" : "uniCloud"
},
{
"playground" : "custom",
"playground" : "standard",
"type" : "uni-app:app-android"
}
]

View File

@ -60,12 +60,13 @@ module.exports = {
//实名制移动端-登录接口
realLoginUrl: 'http://192.168.0.14:1616/auth/',
realBaseUrl: 'http://192.168.0.14:1910/',
//实名制移动端-移动
realAppUrl: 'http://192.168.0.14:1913/app',
//实名制移动端-安培
realExamUrl: 'http://192.168.0.14:1616/system',
//实名制移动端-文件
realFileUrl: 'http://192.168.0.14:1909/file/',
realFileUrl: 'http://192.168.0.14:1616/file/',
//实名制移动端
realBmwUrl: 'http://192.168.0.14:1616/bmw',
//实名制移动端 -- 新

View File

@ -494,6 +494,13 @@
{
//-
"path": "pages/realName/workbench/exam/exam",
"style": {
"navigationStyle": "custom"
}
},
{
//-
"path": "pages/realName/workbench/exam/examDetail",
"style": {
"navigationStyle": "custom"
}

View File

@ -295,7 +295,7 @@ export default {
res = res.data;
if(res.code==200){
this.detailData=res.data;
this.faceImgUrl=config.realLoginUrl+res.data.facePhoto;
this.faceImgUrl=config.realBaseUrl+res.data.facePhoto;
}else{
uni.showToast({
title: res.msg,
@ -322,7 +322,7 @@ export default {
},
openContract(){
this.contractData = this.detailData.listContract[0]
this.contractImgUrl=config.realLoginUrl+this.contractData.witnessPath;
this.contractImgUrl=config.realBaseUrl+this.contractData.witnessPath;
this.showPopup3=true;
},
closePopup3(){

View File

@ -32,22 +32,35 @@
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
</view>
<view style="padding: 0 20rpx">
<scroll-view class="data-container" scroll-y="true">
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="index" @click="onViewWorkDetails(item)">
<view style="width: 100%;height: 70vh;display: flex;align-items: center;justify-content: center;" v-if="isLoading">
<u-loading-icon :show="true" mode="circle" text="加载中" :vertical="true"></u-loading-icon>
</view>
<view v-if="!isLoading&&companyInfoList.length==0" style="width: 96%;height: 60vh;display: flex;flex-direction: column;justify-content: center;align-items: center;" >
<image src="../../../../static/realName/noData.png" style="width: 100rpx;height: 120rpx;" mode=""></image>
<view>暂无数据</view>
</view>
<scroll-view class="data-container" v-if="!isLoading&&companyInfoList.length>0" scroll-y="true">
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="index">
<view class="item-1">
<view>{{ index + 1 }}</view>
<view>
<text>{{ item.name }}</text>(
<text>{{ item.name }}-</text>
<text v-if="item.sex=='1.0'"></text>
<text v-if="item.sex=='0.0'"></text>
<text>-{{ item.age }}</text>(
<text v-if="item.workerType==0">临时用工</text>
<text v-if="item.workerType==1">固定用工</text>
<text v-if="item.workerType==2">分包管理人员</text>)
<text v-if="item.isAtt!=null" style="color: #06E7A3;margin-left: 80rpx;font-weight: 600;">已考勤</text>
<text v-if="item.isAtt==null" style="color: #FF2F2F;margin-left: 80rpx;font-weight: 600;">未考勤</text>
</view>
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @catchtap="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }" style="position: absolute;right: 1%;"></uni-icons>
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @click="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }" style="position: absolute;right: 1%;"></uni-icons>
</view>
<view class="item-3">
<view class="item-3" @click="onViewWorkDetails(item)">
<view style="width: 40%;margin:0 20rpx;display: flex;align-items: center;">
<view>工种</view>
<view style="width: 100rpx;">工种</view>
<view style="font-weight: bold;margin-left: 40rpx;">{{item.postName}}</view>
</view>
<view style="width: 45%;margin:0 20rpx;display: flex;align-items: center;">
@ -55,24 +68,24 @@
<view style="color: #3f9dfd; font-weight: bold;margin-left: 40rpx;">{{item.phone}}</view>
</view>
</view>
<view class="item-3">
<view class="item-3" @click="onViewWorkDetails(item)">
<view style="width: 40%;margin:0 20rpx;display: flex;align-items: center;">
<view>是否为作业打卡</view>
<view style="width: 150rpx;">是否为作业打卡</view>
<view style="font-weight: bold;margin-left: 40rpx;">
<text style="color: green;" v-if="item.isPlanWorker==1"></text>
<text style="color: red;" v-if="item.isPlanWorker==0"></text>
<text style="color: #06E7A3;" v-if="item.isPlanWorker==1"></text>
<text style="color: #FF2F2F;" v-if="item.isPlanWorker==0"></text>
</view>
</view>
<view style="width: 45%;margin:0 20rpx;display: flex;align-items: center;">
<view>红绿灯状态</view>
<view style="width: 120rpx;">红绿灯状态</view>
<view style="font-weight: bold;margin-left: 40rpx;">
<text style="color: green;" v-if="item.lightStatus==2">绿灯</text>
<text style="color: #06E7A3;" v-if="item.lightStatus==2">绿灯</text>
<text style="color: yellow;" v-if="item.lightStatus==1">黄灯</text>
<text style="color: red;" v-if="item.lightStatus==0">红灯</text>
<text style="color: #FF2F2F;" v-if="item.lightStatus==0">红灯</text>
</view>
</view>
</view>
<view style="width: 100%;font-size: 24rpx;padding: 20rpx 0;border-bottom: 1px solid #eee;">
<view style="width: 100%;font-size: 24rpx;padding: 20rpx 0;border-bottom: 1px solid #eee;" @click="onViewWorkDetails(item)">
<view style="width:95%%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;">
<view style="width: 100rpx;">所在班组</view>
<view style="width: 83%;">
@ -80,7 +93,7 @@
</view>
</view>
</view>
<view style="width: 100%;font-size: 24rpx;padding: 20rpx 0;border-bottom: 1px solid #eee;">
<view style="width: 100%;font-size: 24rpx;padding: 20rpx 0;border-bottom: 1px solid #eee;" @click="onViewWorkDetails(item)">
<view style="width:95%%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;">
<view style="width: 100rpx;">所在分包</view>
<view style="width: 83%;">
@ -88,7 +101,7 @@
</view>
</view>
</view>
<view style="width: 100%;font-size: 24rpx;padding: 20rpx 0;border-bottom: 1px solid #eee;">
<view style="width: 100%;font-size: 24rpx;padding: 20rpx 0;border-bottom: 1px solid #eee;" @click="onViewWorkDetails(item)">
<view style="width:95%%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;">
<view style="width: 100rpx;">所在工程</view>
<view style="width: 83%;">
@ -155,7 +168,7 @@
<view
v-for="(item, index) in ageTypeList" :key="index"
:class="{ active: index === activeIndex4 }"
@tap="onSelectageType(index, item.id)"
@tap="onSelectAgeType(index, item.id)"
>
{{ item.name }}
</view>
@ -261,6 +274,7 @@ export default {
}
},
isLoading:false,
companyList: [{ name: '全部', id: '' }],
lightList: [{name:'全部', id:'-1' },{name:'绿灯', id:'2' },{name:'黄灯', id:'1' },{name:'红灯', id:'0' }],
workTypeList: [{name:'全部', id:'-1' },{name:'固定用工', id:'1,2' },{name:'临时用工', id:'0' }],
@ -374,6 +388,7 @@ export default {
this.queryParams.params.postName=this.keyWord
}
console.log(this.queryParams)
this.isLoading=true
uni.request({
url: config.realBmwUrl + '/homeSubPage/getAppWorkerMsg',
method: 'POST',
@ -386,8 +401,11 @@ export default {
console.log('res****', res)
this.recordsTotal = res.data.recordsTotal
this.companyInfoList = res.data.data
this.isLoading=false
},
fail: err => {}
fail: err => {
this.isLoading=false
}
})
},
/* 获取公司数据 */
@ -488,17 +506,15 @@ export default {
},
/* 收藏与取消收藏 */
onCollection(e, row) {
e.stopPropagation()
console.log(row)
const params = {
id: row.collectId,
userId: uni.getStorageSync('realNameUser').userId,
foreignId: row.proId,
type: 1
foreignId: row.idNumber,
type: 4
}
uni.request({
url: `${config.loginBaseUrl}${
row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
}`,
url: `${config.realAppUrl}${ row.isCollect == 0 ? '/offLine/insertCollect' : '/offLine/deleteCollect'}`,
method: 'POST',
data: JSON.stringify(params),
header: {

View File

@ -29,12 +29,19 @@
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
</view>
<view style="padding: 0 20rpx">
<view style="width: 100%;height: 70vh;display: flex;align-items: center;justify-content: center;" v-if="isLoading">
<u-loading-icon :show="true" mode="circle" text="加载中" :vertical="true"></u-loading-icon>
</view>
<view v-if="!isLoading&&companyInfoList.length==0" style="width: 96%;height: 60vh;display: flex;flex-direction: column;justify-content: center;align-items: center;" >
<image src="../../../../static/realName/noData.png" style="width: 100rpx;height: 120rpx;" mode=""></image>
<view>暂无数据</view>
</view>
<scroll-view class="data-container" scroll-y="true">
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="index">
<view class="item-1">
<view>{{ index + 1 }}</view>
<view>{{ item.proName }}</view>
<view style="width: 80%;">{{ item.proName }}</view>
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @click="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }" style="position: absolute;right: 1%;"></uni-icons>
</view>
@ -42,7 +49,7 @@
<view>{{ item.subComName }}</view>
<view>{{ item.voltageLevel }}</view>
<view>{{ item.proType }}</view>
<view>{{ item.proStatus }}</view>
<view>{{ item.proStatusName }}</view>
</view>
<view class="item-3">
<view
@ -216,6 +223,7 @@ export default {
proType: ''
}
},
isLoading:false,
companyList: [{ name: '全部', id: '' }],
proStatusList: [{ name: '全部', id: '' }],
levelList: [{ name: '全部', id: '' }],
@ -248,7 +256,7 @@ export default {
const survey = JSON.parse(option.survey)
const { currentIndex, name } = survey
this.activeIndex2 = currentIndex
this.queryParams.params.proStatus = this.proStatusList[currentIndex+ 1].id
this.queryParams.params.proStatus = this.proStatusList[currentIndex].id
this.getListData()
} else if(option.proStatus&&option.proStatus==0){//
this.activeIndex2=1
@ -264,6 +272,7 @@ export default {
/* 获取作业计划列表 */
async getListData() {
console.log('this.queryParams参数', this.queryParams)
this.isLoading=true
uni.request({
url: config.realBmwUrl + '/homeSubPage/getAppBuildPro',
method: 'POST',
@ -276,8 +285,14 @@ export default {
console.log('res****', res)
this.recordsTotal = res.data.recordsTotal
this.companyInfoList = res.data.data
this.companyInfoList.forEach(item=>{
console.log(item.proStatus)
let index = Number(item.proStatus)+1
item.proStatusName=this.proStatusList[index].name
})
this.isLoading=false
},
fail: err => {}
fail: err => {this.isLoading=false}
})
},
/* 获取公司数据 */
@ -377,7 +392,6 @@ export default {
uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}&lightStatus=${type}` })
},
goIndex() {
uni.navigateTo({ url: `/pages/realName/index/index` })
},
/* 收藏与取消收藏 */
@ -390,9 +404,7 @@ export default {
type: 1
}
uni.request({
url: `${config.loginBaseUrl}${
row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
}`,
url: `${config.realAppUrl}${ row.isCollect == 0 ? '/offLine/insertCollect' : '/offLine/deleteCollect'}`,
method: 'POST',
data: JSON.stringify(params),
header: {

View File

@ -29,15 +29,22 @@
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
</view>
<view style="padding: 0 20rpx">
<view style="width: 100%;height: 70vh;display: flex;align-items: center;justify-content: center;" v-if="isLoading">
<u-loading-icon :show="true" mode="circle" text="加载中" :vertical="true"></u-loading-icon>
</view>
<view v-if="!isLoading&&companyInfoList.length==0" style="width: 96%;height: 60vh;display: flex;flex-direction: column;justify-content: center;align-items: center;" >
<image src="../../../../static/realName/noData.png" style="width: 100rpx;height: 120rpx;" mode=""></image>
<view>暂无数据</view>
</view>
<scroll-view class="data-container" scroll-y="true">
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="index">
<view class="item-1">
<view>{{ index + 1 }}</view>
<view>{{ item.subName }}</view>
<view style="width: 80%;">{{ item.subName }}</view>
<uni-icons
:type="item.isCollect == 1 ? 'star-filled' : 'star'"
size="20"
@catchtap="onCollection($event, item)"
@click="onCollection($event, item)"
:style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"
style="position: absolute; right: 1%"
></uni-icons>
@ -218,6 +225,7 @@ export default {
subComName: ''
}
},
isLoading:false,
companyList: [{ name: '全部', id: '' }],
proStatusList: [
{ name: '全部', id: '' },
@ -260,6 +268,7 @@ export default {
/* 获取列表 */
async getListData() {
console.log(this.queryParams)
this.isLoading=true
uni.request({
url: config.realBmwUrl + '/homeSubPage/getAppActiveSub',
method: 'POST',
@ -272,8 +281,9 @@ export default {
console.log('res****', res)
this.recordsTotal = res.data.recordsTotal
this.companyInfoList = res.data.data
this.isLoading=false
},
fail: err => {}
fail: err => {this.isLoading=false}
})
},
/* 获取公司数据 */
@ -371,17 +381,15 @@ export default {
},
/* 收藏与取消收藏 */
onCollection(e, row) {
e.stopPropagation()
console.log(row)
const params = {
id: row.collectId,
userId: uni.getStorageSync('realNameUser').userId,
foreignId: row.proId,
type: 1
foreignId: row.subId,
type: 2
}
uni.request({
url: `${config.loginBaseUrl}${
row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
}`,
url: `${config.realAppUrl}${ row.isCollect == 0 ? '/offLine/insertCollect' : '/offLine/deleteCollect'}`,
method: 'POST',
data: JSON.stringify(params),
header: {

View File

@ -29,26 +29,37 @@
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
</view>
<view style="padding: 0 20rpx">
<view style="width: 100%;height: 70vh;display: flex;align-items: center;justify-content: center;" v-if="isLoading">
<u-loading-icon :show="true" mode="circle" text="加载中" :vertical="true"></u-loading-icon>
</view>
<view v-if="!isLoading&&companyInfoList.length==0" style="width: 96%;height: 60vh;display: flex;flex-direction: column;justify-content: center;align-items: center;" >
<image src="../../../../static/realName/noData.png" style="width: 100rpx;height: 120rpx;" mode=""></image>
<view>暂无数据</view>
</view>
<scroll-view class="data-container" scroll-y="true">
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="index">
<view class="item-1">
<view>{{ index + 1 }}</view>
<view>{{ item.teamName }}</view>
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @catchtap="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }" style="position: absolute;right: 1%;"></uni-icons>
<view style="width: 80%;">{{ item.teamName }}</view>
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @click="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }" style="position: absolute;right: 1%;"></uni-icons>
</view>
<view class="item-3">
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goAllPersonListPage(item)">
<view style="width: 20%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goAllPersonListPage(item)">
<view>在场</view>
<view style="color: #3f9dfd; font-weight: bold">{{item.einPersonNum}}</view>
</view>
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goWorkPersonListPage(item)">
<view style="width: 20%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goWorkPersonListPage(item)">
<view>固定</view>
<view style="color: #3f9dfd; font-weight: bold">{{item.formalPersonNum}}</view>
</view>
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goTempPersonListPage(item)">
<view style="width: 20%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goTempPersonListPage(item)">
<view>临时</view>
<view style="color: #3f9dfd; font-weight: bold">{{item.temporaryPersonNum}}</view>
</view>
<view style="width: 20%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goTempPersonListPage(item)">
<view>今日考勤</view>
<view style="color: #3f9dfd; font-weight: bold">{{item.attPersonNum}}</view>
</view>
</view>
<view class="item-3">
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goLightPersonListPage(item,2)">
@ -149,6 +160,7 @@ export default {
subComId:""
}
},
isLoading:false,
companyList: [{ name: '全部', id: '' }],
companyInfoList: []
}
@ -165,6 +177,7 @@ export default {
methods: {
/* 获取列表 */
async getListData() {
this.isLoading=true
uni.request({
url: config.realBmwUrl + '/homeSubPage/getAppActiveTeam',
method: 'POST',
@ -177,8 +190,9 @@ export default {
console.log('res****', res)
this.recordsTotal = res.data.recordsTotal
this.companyInfoList = res.data.data
this.isLoading=false
},
fail: err => {}
fail: err => {this.isLoading=false}
})
},
/* 获取公司数据 */
@ -236,17 +250,14 @@ export default {
},
/* 收藏与取消收藏 */
onCollection(e, row) {
e.stopPropagation()
const params = {
id: row.collectId,
userId: uni.getStorageSync('realNameUser').userId,
foreignId: row.proId,
type: 1
foreignId: row.teamId,
type: 3
}
uni.request({
url: `${config.loginBaseUrl}${
row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
}`,
url: `${config.realAppUrl}${ row.isCollect == 0 ? '/offLine/insertCollect' : '/offLine/deleteCollect'}`,
method: 'POST',
data: JSON.stringify(params),
header: {

View File

@ -52,8 +52,8 @@
<text>合同期限类型</text>
</view>
<u-form-item prop='laborContractType' style="width:96%;height: 100%;margin: 0 auto;" >
<u-radio-group v-model="entryContractBean.laborContractType" placement="row" style="border: 1rpx solid #ccc;padding:20rpx 10rpx;border-radius: 10rpx;">
<u-radio label="以完成一定工作为期限的合同" name="以完成一定工作为期限的合同" style="margin-right: 20rpx;transform:scale(0.8);"></u-radio>
<u-radio-group v-model="entryContractBean.laborContractType" placement="row" style="border: 1rpx solid #ccc;padding:20rpx 00rpx;border-radius: 10rpx;display: flex;">
<u-radio label="以完成一定工作为期限的合同" name="以完成一定工作为期限的合同" style="margin-right: 10rpx;transform:scale(0.8);"></u-radio>
<u-radio label="固定期限合同" name="固定期限合同" style="transform:scale(0.8);"></u-radio>
</u-radio-group>
</u-form-item>
@ -181,6 +181,7 @@ export default {
imgUrl:'',
faceData:{},
proName:"xxx工程",
proId:uni.getStorageSync('realNameUser').proId,
entryContractBean:{
"id":'',
"idNumber":"",
@ -195,8 +196,8 @@ export default {
// "contractPath": "",//
"role": "",//
"laborContractType": "固定期限合同",//
"contractValidDate": "",//
"contractInvalidDate": "",//
"contractValidDate": this.getCurrentDate(),//
"contractInvalidDate": this.getCurrentDate(),//
"contractType": "纸质合同",//
"wageApprovedWay": "天",//
"wageCriterion": "",//
@ -217,8 +218,35 @@ export default {
console.log('🚀 ~ mounted ~ mounted-index:')
},
onShow() {
this.getPro()
},
methods: {
//
getPro(){
let param={
id:this.proId,
subId:-1
}
uni.request({
url: config.realAppUrl + '/offLine/getPro',
method: 'post',
data: param,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: uni.getStorageSync('realNameToken')
},
success: res => {
res = res.data;
if(res.code==200){
console.log(res)
this.proName = res.data[0].abbreviation||"";
}
},
fail: err => {
console.log(err)
}
})
},
//
distinguish(){
console.log('人脸识别采集')
@ -250,7 +278,7 @@ export default {
if(this.faceData){
this.entryContractBean.idNumber = this.faceData.idNumber;
this.entryContractBean.proId = this.faceData.proId;
this.proName = this.faceData.proName;
// this.proName = this.faceData.proName;
let birthday = new Date(this.faceData.birthday).getTime();
let now = new Date().getTime();
let hours = (now-birthday)/3600000;
@ -426,6 +454,10 @@ export default {
uni.navigateBack({
delta: 1 //
});
},
getCurrentDate() {
const now = new Date();
return `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`;
},
timeFormat(dateTime = null, formatStr = 'yyyy-mm-dd') {
let date

View File

@ -1,6 +1,6 @@
<template>
<view class="page">
<u-navbar class="u-navbar" title="工资详情" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
<u-navbar class="u-navbar" title="个人准入信息查询" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
<scroll-view class="content" scroll-y="true">
<view class="view-box">
<view class="title-view">

View File

@ -2,8 +2,19 @@
<view class="page">
<u-navbar class="u-navbar" title="准入信息查询" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
<view style="width: 94%;height: 80rpx;margin: 20rpx auto;">
<u-search shape="square" placeholder="搜索" v-model="keyword" :showAction="true" actionText="搜索" :animation="false" @custom="searchList"></u-search>
<view style="width: 100%;height: 80rpx;">
<view class="search-content">
<view style="width: 100%;background-color: #fff;">
<uni-easyinput
suffixIcon="search"
v-model="keyword"
placeholder="请输入人员"
@iconClick="searchList"
></uni-easyinput>
</view>
<view class="search-icon" @click="distinguish"></view>
</view>
<!-- <u-search shape="square" placeholder="搜索" v-model="keyword" :showAction="true" actionText="搜索" :animation="false" @custom="searchList"></u-search> -->
</view>
<!-- 列表 -->
<view class="list-box">
@ -54,6 +65,7 @@
</template>
<script>
import { pathToBase64, base64ToPath } from 'image-tools';
import config from '@/config'
export default {
data() {
@ -73,7 +85,62 @@ export default {
},
methods: {
//
distinguish(){
console.log('人脸识别采集')
uni.chooseImage({
count: 1,
sizeType: ['compressed'],
sourceType: ['camera'],
success: res => {
console.log('🚀 ~ res-拍照:', res)
this.imgToBase64(res.tempFilePaths[0]).then(base64 => {
// console.log(base64)
uni.uploadFile({
url: config.realFileUrl+`file/getFaceRecognition`, //
fileType:"image",//ZFB,
filePath: res.tempFilePaths[0],//
formData: {
file:base64,
photoType:'face',
},
success: (uploadFileRes) => {
console.log(uploadFileRes)
if(uploadFileRes.statusCode==200){
uploadFileRes=JSON.parse(uploadFileRes.data)
console.log(uploadFileRes)
if(uploadFileRes.code==200){
if(uploadFileRes.data.face){
this.faceData=JSON.parse(uploadFileRes.data.personData)
console.log(this.faceData)
if(this.faceData){
this.keyword = this.faceData.name;
this.searchList()
}else{
uni.$u.toast('识别失败');
}
}else{
uni.$u.toast(uploadFileRes.msg);
}
}else{
uni.$u.toast(uploadFileRes.msg);
}
}else{
uni.$u.toast('识别失败');
}
},
fail: err => {
uni.$u.toast('识别失败');
console.log(err)
}
});
})
},
fail: err => {
console.log('🚀 ~ err:', err)
}
})
},
//
searchList(value){
this.listData=[]
@ -123,7 +190,19 @@ export default {
url: `/pages/realName/workbench/dayPlan/detail?idNumber=${item.idNumber}`
})
},
//
imgToBase64(data) {
return new Promise((resolve, reject) => {
pathToBase64(data)
.then(base64 => {
resolve(base64)
})
.catch(error => {
console.error(error)
reject(error)
})
})
},
//
leftClick() {
console.log('返回')
uni.navigateBack({
@ -142,6 +221,23 @@ export default {
background-color: #EFEFEF;
box-sizing: border-box;
// padding: 0 20px;
.search-content {
display: flex;
align-items: center;
margin-top: 20rpx;
margin-left: 40rpx;
margin-right: 40rpx;
.search-icon {
width: 70rpx;
height: 60rpx;
margin-right: 40rpx;
margin-left: 40rpx;
background: url('../../../../static/realName/face.png') no-repeat;
background-size: 100% 100%;
}
}
.list-box{
width: 90%;
height: auto;

View File

@ -252,7 +252,7 @@ export default {
"partAPhone": "",//
"partAAdress": "",//
"partB": "",//
"sex":"",//
"sex":"",//
"partBPhone": "",//
"partBIdCard":"",//
"partBAdress": "",//

View File

@ -5,7 +5,7 @@
<view style="margin: 20rpx;font-weight: bold;">
合同视频
</view>
<video :src="videoSrc" controls :autoplay="autoPlay" style="width: 100%;height: 600rpx;"></video>
<video :src="videoSrc" controls :autoplay="autoPlay" style="width: 100%;height: 600rpx;" v-if="!showPopup"></video>
<view style="margin: 20rpx;font-weight: bold;color: red;">
确认视频无误进行下一步签订
@ -60,7 +60,7 @@ export default {
},
onLoad() {
console.log('?? ~ mounted ~ mounted-index:')
// this.showPopup=true;
this.showPopup=true;
},
onShow() {
},

View File

@ -91,7 +91,7 @@ export default {
cost: "",
seconds: 7200,
costTime: 0,
pageTitle:'安全教育培训',
pageTitle:'安全培训考试',
filePathHeader:config.realFileUrl,
examInfo:{},
trainInfo:{},

View File

@ -0,0 +1,710 @@
<template>
<view class="page">
<u-navbar class="u-navbar" :title="pageTitle" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
<!-- <u-loading-page :loading="isloading"></u-loading-page> -->
<view class="exam-info">
<view style="font-weight: bold;">考试时长{{count}}</view>
<view style="font-weight: bold;"><text style="color: #06E7A3;">{{hIndex+1}}</text>/{{questionList.length}}</view>
</view>
<scroll-view class="scroll-view" scroll-x="true">
<view class="scroll-view-item" v-for="(item,index) in numList" :key="index" :class="hIndex == index ? 'active' : ''" @click="changeQuestion(index)">
{{item+1}}
</view>
</scroll-view>
<scroll-view class="content" scroll-y="true">
<view class="view-box">
<view class="title-view">
<text v-if="questionInfo.questionType==1">单选题<text style="color: #666;">(10)</text></text>
<text v-if="questionInfo.questionType==2">多选题<text style="color: #666;">(10)</text></text>
<text v-if="questionInfo.questionType==3">判断题<text style="color: #666;">(10)</text></text>
</view>
<view class="exam-view">
<view style="width: 100%;height: auto;font-size: 32rpx;">题目{{questionInfo.questionContent}}</view>
<view style="width: 100%;height: auto;margin-bottom: 20rpx;" v-if="questionInfo.questionPath">
<image :src="`${filePathHeader}${questionInfo.questionPath}`" mode="" style="width: 100%;height: 200rpx;"></image>
</view>
<view class="option-item" v-for="(oItem,oIndex) in questionInfo.optionList" :key="oIndex">
<view class="option-content">
<view style="display:flex;">
<view style="font-weight: bold;">选项{{changeNumtoLetter(oIndex)}}:</view>
<view style="margin-left: 20rpx;">{{oItem.optionContent}}</view>
</view>
<view v-if="oItem.isAnswer==1" style="margin-right:40rpx;">
<image src="../../../../static/realName/right_answer.png" mode="" style="width: 30rpx;height: 36rpx"></image>
</view>
</view>
<view class="option-img" v-if="oItem.optionPath">
<image :src="`${filePathHeader}${oItem.optionPath}`" mode="" style="width: 100%;height: 200rpx;"></image>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="submit-box">
<u-button type="primary" shape="surround" @click="up" class="submit-btn" v-if="hIndex>0" style="background:#ccc;border:0;">上一题</u-button>
<!-- <u-button type="primary" shape="surround" @click="sumbitExam" class="submit-btn" tyle="background:#5193FE" v-if="hIndex==numList.length-1" >提交</u-button> -->
<u-button type="primary" shape="surround" @click="next" class="submit-btn" tyle="background:#5193FE" v-if="hIndex<numList.length-1">下一题</u-button>
</view>
<!-- 弹窗 -->
<u-popup :show="showPopup" mode="center" @close="closePopup" :closeOnClickOverlay="false">
<view style="width:650rpx;height: 100%;position: relative;background-color: #fff;">
<view class="popup-content">
<view class="popup-header">
<view style="width: 85%;height: 80rpx;line-height: 80rpx;font-weight: bold;text-align: center;font-size: 32rpx;">
<text>考试结果</text>
<text v-if="examResult==1" style="color: #06E7A3;">(通过)</text>
<text v-else style="color: red;">(未通过)</text>
</view>
</view>
<view class="popup-view">
<view class="view-item">
<view class="label">考试得分</view>
<view >{{examScore}}</view>
</view>
<view class="view-item">
<view class="label">答对题数</view>
<view >{{trueNum}}</view>
</view>
<view class="view-item">
<view class="label">答题时长</view>
<view >{{cost}}</view>
</view>
</view>
</view>
<view class="popup-submit-box">
<u-button shape="square" class="submit-edit-1" @click="leftClick"> </u-button>
<u-button type="primary" shape="square" class="submit-edit-2" @click="reExam()">重新考试</u-button>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import config from '@/config'
export default {
data() {
return {
timme: "",
count: "",
cost: "",
seconds: 7200,
costTime: 0,
pageTitle:'安全培训考试',
filePathHeader:config.realFileUrl,
examInfo:{},
trainInfo:{},
types:'',
foreignId:'',
idNumber:uni.getStorageSync('realNameUser').idNumber,
userId:uni.getStorageSync('realNameUser').userId,
examStartTime:"",
hIndex:0,
questionList:[],
questionInfo:{},
numList:[],
selectedList:[],//
showMoreBtn:false,
showPopup:false,
trueNum:"",
examScore:"",
examResult:"",
}
},
onLoad(option) {
this.examInfo=JSON.parse(option.examInfo);
this.trainInfo=JSON.parse(option.trainInfo);
this.types=option.types;
this.foreignId=option.foreignId;
// console.log('🚀 ~ realNameUser:',this.trainInfo)
this.examStartTime=this.timeFormat(null,'yyyy-mm-dd hh:MM:ss');
this.getExamList()
this.seconds=Number(this.examInfo.examDuration);
this.costTime=0;
this.Time();
},
onShow() {
},
methods: {
//
countDown() {
// let time =uni.getStorageSync("times");
let time = this.seconds;
if (time != null && time >= 0) this.seconds = parseInt(time);
let h = parseInt((this.seconds / (60 * 60)) % 24);
h = h < 10 ? "0" + h : h;
let m = parseInt((this.seconds / 60) % 60);
m = m < 10 ? "0" + m : m;
let s = parseInt(this.seconds % 60);
s = s < 10 ? "0" + s : s;
this.count = h + ":" + m + ":" + s;
},
//
keepCostTime() {
// let time =uni.getStorageSync("costTime");
let time = this.costTime;
if (time != null && time >= 0) this.costTime = parseInt(time);
let h = parseInt((this.costTime / (60 * 60)) % 24);
h = h < 10 ? "0" + h : h;
let m = parseInt((this.costTime / 60) % 60);
m = m < 10 ? "0" + m : m;
let s = parseInt(this.costTime % 60);
s = s < 10 ? "0" + s : s;
this.cost = h + ":" + m + ":" + s;
},
Time() {
this.countDown();
this.timme = setInterval(() => {
this.seconds--;
this.costTime++;
// uni.setStorageSync("times", this.seconds)
// uni.setStorageSync("costTime", this.costTime)
this.countDown();
this.keepCostTime();
}, 1000);
},
//
getExamList(){
let param={
type:this.types,
completeId:this.examInfo.completeId,
examPaperId:this.examInfo.examPaperId,
}
console.log(param)
uni.request({
url: config.realExamUrl+'/exam/selectExamPagerById',
method: 'post',
data: param,
header: {
'Content-Type': 'application/json',
Authorization: uni.getStorageSync('realNameToken')
},
success: res => {
console.log(res)
res = res.data;
if(res.code==200){
this.questionList=res.data;
this.questionInfo=this.questionList[0];
this.hIndex=0;
this.numList = res.data.map((item,index)=>{
return index
})
this.selectedList=[]
}
},
fail: err => {
console.log(err)
}
})
},
//
changeQuestion(index){
console.log(this.selectedList)
this.showMoreBtn=false
this.hIndex=index;//
this.questionInfo = this.questionList[index];
},
up(){
this.changeQuestion(this.hIndex-1)
},
next(){
this.changeQuestion(this.hIndex+1)
},
//
chosenOption(item){
console.log(this.questionInfo)
console.log(item)
if(this.questionInfo.questionType==1||this.questionInfo.questionType==3){//·
//便
let obj={
"questionId": this.questionInfo.questionId,
"questionOptionId":item.questionOptionId,
"isAnswer":item.isAnswer,
}
var index = this.selectedList.findIndex(item => {return item.questionId == obj.questionId})
if (index != -1) {//
this.selectedList[index].questionOptionId=obj.questionOptionId;
this.selectedList[index].isAnswer=obj.isAnswer;
}else{//
this.selectedList.push(obj)
}
this.questionInfo.optionList.forEach(ite=>{
ite.isChecked=false;
if(ite.questionOptionId==obj.questionOptionId){
ite.isChecked=!ite.isChecked;
}
})
// this.sumbitAnswer()
}else{
console.log(this.questionInfo.optionList)
this.questionInfo.optionList.forEach(ite=>{
if(ite.questionOptionId==item.questionOptionId){
if(ite.isChecked){
ite.isChecked=!ite.isChecked;
}else{
ite.isChecked=true
}
}
})
this.showMoreBtn=true;
let obj={
"questionId": this.questionInfo.questionId,
"questionOptionId":item.questionOptionId,
"isAnswer":item.isAnswer
}
var index = this.selectedList.findIndex(item => {return item.questionId == obj.questionId})
if (index == -1) {//
this.selectedList.push(obj)
}else{//
var index2 = this.selectedList.findIndex(item => {return item.questionOptionId == obj.questionOptionId})
if (index2 == -1) {
this.selectedList.push(obj)
}else{
this.selectedList.splice(index2,1)
}
}
}
},
//
sumbitAnswer(){
var param={}
var index = this.selectedList.findIndex(item => {return item.questionId == this.questionInfo.questionId})
if(this.questionInfo.questionType==1||this.questionInfo.questionType==3){
param={
"questionId": this.selectedList[index].questionId,
"ownAnswer": this.selectedList[index].questionOptionId,
"isRight": this.selectedList[index].isAnswer
}
this.questionInfo.isSelect=param.ownAnswer;
}else{
if(index==-1){
uni.showToast({
title: "请选择选项!",
icon: 'none'
})
}else{
param={
"questionId": this.questionInfo.questionId,
"ownAnswer": this.selectedList[index].questionOptionId,
"isRight": "0"
}
var arr=[]
this.selectedList.forEach(item => {if(item.questionId==this.questionInfo.questionId){arr.push(item.questionOptionId)}})
param.ownAnswer=arr.join(",")
//便
this.questionInfo.isSelect=param.ownAnswer;
var arr2=[]
this.questionInfo.optionList.forEach(item => {if(item.isAnswer==1){arr2.push(item.questionOptionId)}})
if(this.equalsArray(arr,arr2)){
param.isRight="1"
}else{
param.isRight="0"
}
}
}
console.log(param)
uni.request({
url: config.realExamUrl+'/exam/uploadExamPaper',
method: 'post',
data: param,
header: {
'Content-Type': 'application/json',
Authorization: uni.getStorageSync('realNameToken')
},
success: res => {
console.log(res)
res = res.data;
if(res.code==200){
this.next()
}else{
uni.showToast({
title: "接口异常",
icon: 'none'
})
}
},
fail: err => {
uni.showToast({
title: "接口异常",
icon: 'none'
})
console.log(err)
}
})
},
//
sumbitExam(){
let sum=this.numList.length;//
let hasNum=0//
this.questionList.forEach(item=>{
if(item.isSelect){
hasNum=hasNum+1
}
})
let unNum=sum-hasNum;//
let param={
idNumber:this.idNumber,
type:this.types,
paperType:this.examInfo.paperType,
completeId:this.examInfo.completeId,
particularsId:this.examInfo.particularsId,
postId:this.trainInfo.postId,
proId:this.trainInfo.proId,
einTime:this.trainInfo.einTime,
examPaperId:this.examInfo.examPaperId,
examStartTime:this.examStartTime,
examEndTime:this.timeFormat(null,'yyyy-mm-dd hh:MM:ss'),
userId:this.userId,
}
console.log(param)
uni.showModal({
title: `已选择题目数:${hasNum},未选择题目数:${unNum},确认提交吗?`,
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
uni.request({
url: config.realExamUrl+'/exam/uploadCompleteExam',
method: 'post',
data: param,
header: {
'Content-Type': 'application/json',
Authorization: uni.getStorageSync('realNameToken')
},
success: res => {
console.log(res)
res = res.data;
if(res.code==200){
clearInterval(this.timme);
this.trueNum=res.data.trueNum;
this.examScore=res.data.examScore;
this.examResult=res.data.examResult;
this.showPopup=true;
}else{
uni.showToast({
title: "接口异常",
icon: 'none'
})
}
},
fail: err => {
uni.showToast({
title: "接口异常",
icon: 'none'
})
console.log(err)
}
})
}
}
});
},
closePopup(){
this.showPopup=false;
},
reExam(){
this.examStartTime=this.timeFormat(null,'yyyy-mm-dd hh:MM:ss');
this.getExamList()
this.seconds=Number(this.examInfo.examDuration);
this.costTime=0;
this.Time();
this.showPopup=false;
},
goStudy(item){
console.log(item)
uni.navigateTo({
url: `/pages/realName/workbench/exam/trainPdf?pdfInfo=${JSON.stringify(item)}&trainInfo=${JSON.stringify(this.trainInfo)}&types=${this.types}&foreignId=${this.foreignId}`
})
},
goExam(item){
console.log(item)
uni.navigateTo({
url: `/pages/realName/workbench/exam/examInfo?examInfo=${JSON.stringify(item)}`
})
},
//
leftClick() {
console.log('返回')
uni.navigateBack({
delta: 1 //
});
},
equalsArray(a, b) {
var m = new Map();
a.forEach(o => m.set(o, (m.get(o) || 0) + 1));
b.forEach(o => m.set(o, (m.get(o) || 0) - 1));
for (var value of m.values()) {
if (value !== 0) { return false }
}
return true
},
//
changeNumtoLetter(index){
let str="ABCDEFGHIJKLMGOPQISTUVWXYZ";
return str[index]
},
timeFormat(dateTime = null, formatStr = 'yyyy-mm-dd') {
let date
//
if (!dateTime) {
date = new Date()
}
// unix
else if (/^\d{10}$/.test(dateTime?.toString().trim())) {
date = new Date(dateTime * 1000)
}
// new Date
else if (typeof dateTime === 'string' && /^\d+$/.test(dateTime.trim())) {
date = new Date(Number(dateTime))
}
// Safari/Webkitnew Date/
// '2022-07-10 01:02:03' '2022-07-10T01:02:03'
else if (typeof dateTime === 'string' && dateTime.includes('-') && !dateTime.includes('T')) {
date = new Date(dateTime.replace(/-/g, '/'))
}
// RFC 2822
else {
date = new Date(dateTime)
}
const timeSource = {
'y': date.getFullYear().toString(), //
'm': (date.getMonth() + 1).toString().padStart(2, '0'), //
'd': date.getDate().toString().padStart(2, '0'), //
'h': date.getHours().toString().padStart(2, '0'), //
'M': date.getMinutes().toString().padStart(2, '0'), //
's': date.getSeconds().toString().padStart(2, '0') //
//
}
for (const key in timeSource) {
const [ret] = new RegExp(`${key}+`).exec(formatStr) || []
if (ret) {
//
const beginIndex = key === 'y' && ret.length === 2 ? 2 : 0
formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex))
}
}
return formatStr
},
},
onBackPress(options) {
console.log(options)
if (options.from === 'backbutton') {
//
console.log('手势返回');
this.leftClick()
// true
// false
return true;
}
// false
return false;
},
destroyed() {
clearInterval(this.timme);
}
}
</script>
<style lang="scss">
/deep/ .uni-stat__select {
width:420rpx !important;
.uni-select__input-text {
width: 420rpx !important;
}
}
/deep/ .u-navbar__content__right__text{
color: #FFF;
}
.scroll-view {
white-space: nowrap;
width: 100%;
background: #FFF;
.scroll-view-item {
display: inline-block;
width: 60rpx;
height: 60rpx;
margin: 10rpx 20rpx;
line-height: 60rpx;
text-align: center;
border: 1rpx solid #39A0FD;
.activeLine{
background: #00337A;
border-radius: 10upx;
width: 160rpx;
height: 6upx;
}
}
.active {
color: #FFF;
background: #39A0FD;
font-weight: bolder;
font-size: 32rpx;
}
}
.page {
width: 100vw;
height: 100vh;
background-color: #FFF;
box-sizing: border-box;
.exam-info{
width: 94%;
height: 48rpx;
margin: 20rpx auto;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 32rpx;
}
.content{
width: 100%;
height: 70vh;
margin-top: 20rpx;
padding-bottom: 20rpx;
background: #FFF;
.view-box{
width: 100%;
height: auto;
margin: 20rpx auto;
background-color: #FFF;
border-radius: 10rpx;
.title-view{
font-size: 32rpx;
font-weight: 600;
margin-left: 20rpx;
}
.exam-view{
width: 94%;
margin: 10rpx auto;
height: auto;
padding-bottom: 20rpx;
.exam-item{
width: 96%;
margin: 10rpx auto;
height: auto;
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
}
.option-item{
width: 94%;
margin: 30rpx auto;
height: auto;
white-space: normal;
background: #F4F9FF;
padding: 20rpx 10rpx;
border-radius: 10rpx;
.option-content{
width: 96%;
margin: 10rpx auto;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
}
.active{
background: #00337A;
color: #FFF;
}
}
}
}
.submit-box{
width: 94%;
height: auto;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
.submit-btn{
width: 45%;
}
}
.exam-button{
width: 40%;
height: 60rpx;
line-height: 60rpx;
text-align: center;
margin: 0 auto;
background-color:#F99F01;
color: #FFF;
padding:10rpx 10rpx;
border-radius: 20rpx;
}
.popup-header{
width: 100%;
height: 80rpx;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
}
.popup-content{
width: 100%;
height: 32vh;
background: url('../../../../static/realName/exam_result_bg.png') no-repeat;
background-size: 100% 100%;
}
.popup-view{
width: 94%;
margin: 20rpx auto;
border-radius: 10rpx;
padding-top: 20rpx;
}
.view-item{
width: 90%;
margin: 0rpx auto;
padding:20rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
font-weight: bold;
color: #FFF;
.label{
width: 160rpx;
color: #FFF;
}
}
.popup-submit-box {
width: 100%;
height: 100rpx;
position: absolute;
bottom: 0;
display: flex;
padding-bottom: 20rpx;
justify-content: space-between;
align-items: center;
background-color: #FFF;
.submit-edit-1{
width:45%;
margin: 0 auto;
height: 65rpx;
font-size: 26rpx;
background: #F5F5F5;
}
.submit-edit-2{
width: 45%;
margin: 0 auto;
height: 65rpx;
font-size: 26rpx;
background: #0052D9;
}
}
}
</style>

View File

@ -1,6 +1,10 @@
<template>
<view class="page">
<u-navbar class="u-navbar" title="安全教育培训" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
<u-navbar class="u-navbar" title="安全教育培训" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" rightIcon="list" @rightClick="rightClick" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }">
<view class="u-nav-slot" slot="right">
<image src="../../../../static/realName/safety_tips.png" style="width: 48rpx;height: 48rpx;" mode="" ></image>
</view>
</u-navbar>
<scroll-view class="content" scroll-y="true">
<view class="header-view">
<view class="face-view">
@ -86,6 +90,25 @@
</view>
</view>
</scroll-view>
<!-- 弹窗 -->
<u-popup :show="showPopup" mode="center" @close="closePopup">
<view style="width:650rpx;height: 100%;position: relative;background-color: #fff;">
<view class="popup-header">
<view style="width: 5%;height: 80rpx;"></view>
<view style="width: 85%;height: 80rpx;line-height: 80rpx;font-weight: bold;font-size: 32rpx;text-align: center;">提示</view>
<u-icon style="width: 10%;" name="close" color="#000" size="24" @click="closePopup"></u-icon>
</view>
<scroll-view class="popup-content" scroll-y="true">
<view>1.人员出场更换工程后需重新培训考试全部内容</view>
<view>2.培训考试结果有效期为1年</view>
<view>3.保命教育准军事化可以在在场的情况下长期培训考试更新数据</view>
<view>4.需要在系统先入场绑定工程后开始培训及考试</view>
</scroll-view>
</view>
</u-popup>
</view>
</template>
@ -101,7 +124,8 @@ export default {
userName:"",
postName:"",
proName:"",
trainInfo:{}
trainInfo:{},
showPopup:false
}
},
@ -148,6 +172,13 @@ export default {
url: `/pages/realName/workbench/exam/train?trainInfo=${JSON.stringify(this.trainInfo)}`
})
},
rightClick(){
this.showPopup=true;
},
closePopup(){
this.showPopup=false;
},
//
leftClick() {
console.log('返回')
@ -162,6 +193,22 @@ export default {
</script>
<style lang="scss">
.popup-header{
width: 100%;
height: 80rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #fff;
}
.popup-content{
width: 92%;
padding: 0 20rpx;
height: 16vh;
font-weight: 600;
background-color: #fff;
}
.page {
width: 100vw;
height: 100vh;

View File

@ -1,6 +1,11 @@
<template>
<view class="page">
<u-navbar class="u-navbar" :title="pageTitle" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
<u-navbar class="u-navbar" :title="pageTitle" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" rightIcon="list" @rightClick="rightClick" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }">
<view class="u-nav-slot" slot="right">
<image src="../../../../static/realName/safety_tips.png" style="width: 48rpx;height: 48rpx;" mode="" ></image>
</view>
</u-navbar>
<scroll-view class="scroll-view" scroll-x="true">
<view class="scroll-view-item" :class="hIndex == 1 ? 'active' : ''" @click="hIndex = 1">
安全规范
@ -62,7 +67,7 @@
</view>
</view>
<view style="width: 38%;display: flex;align-items: center;justify-content: end;">
<view class="exam-button">详情</view>
<view class="exam-button" v-if="examBean.examResult==0||examBean.examResult==1" @click="goExamDetail(examBean)">详情</view>
<view class="exam-button" v-if="!examBean.examResult" @click="goExam(examBean)">开始考试</view>
<view class="exam-button" v-if="examBean.examResult==0" @click="goExam(examBean)">重新考试</view>
<view class="exam-button" v-if="examBean.examResult==1" @click="goExam(examBean)">再次考试</view>
@ -73,7 +78,23 @@
</view>
</scroll-view>
<!-- 弹窗 -->
<u-popup :show="showPopup" mode="center" @close="closePopup">
<view style="width:650rpx;height: 100%;position: relative;background-color: #fff;">
<view class="popup-header">
<view style="width: 5%;height: 80rpx;"></view>
<view style="width: 85%;height: 80rpx;line-height: 80rpx;font-weight: bold;font-size: 32rpx;text-align: center;">提示</view>
<u-icon style="width: 10%;" name="close" color="#000" size="24" @click="closePopup"></u-icon>
</view>
<scroll-view class="popup-content" scroll-y="true">
<view>1.人员出场更换工程后需重新培训考试全部内容</view>
<view>2.培训考试结果有效期为1年</view>
<view>3.保命教育准军事化可以在在场的情况下长期培训考试更新数据</view>
<view>4.需要在系统先入场绑定工程后开始培训及考试</view>
</scroll-view>
</view>
</u-popup>
</view>
</template>
@ -90,7 +111,8 @@ export default {
types:"安全考试",
foreignId:"",
trainBean:[],
examBean:{}
examBean:{},
showPopup:false
}
},
watch: {
@ -177,6 +199,19 @@ export default {
url: `/pages/realName/workbench/exam/examInfo?examInfo=${JSON.stringify(item)}&trainInfo=${JSON.stringify(this.trainInfo)}&types=${this.types}&foreignId=${this.foreignId}`
})
},
goExamDetail(item){
console.log(item)
uni.navigateTo({
url: `/pages/realName/workbench/exam/examDetail?examInfo=${JSON.stringify(item)}&trainInfo=${JSON.stringify(this.trainInfo)}&types=${this.types}&foreignId=${this.foreignId}&isView=true`
})
},
rightClick(){
this.showPopup=true;
},
closePopup(){
this.showPopup=false;
},
//
leftClick() {
console.log('返回')
@ -222,6 +257,22 @@ export default {
font-weight: bolder;
font-size: 32rpx;
}
.popup-header{
width: 100%;
height: 80rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #fff;
}
.popup-content{
width: 92%;
padding: 0 20rpx;
height: 16vh;
font-weight: 600;
background-color: #fff;
}
.page {
width: 100vw;
height: 100vh;

View File

@ -40,7 +40,7 @@
<u--form class="addForm" :model="entryIdNumberBean" ref="vForm">
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>姓名</text>
<text>姓名</text><text style="color: red;">*</text>
</view>
<u-form-item prop='name' style="width:75%;height: 100%;" >
<u--input v-model="entryIdNumberBean.name" type="text" placeholder="请输入" maxlength="20" border="surround" clearable></u--input>
@ -48,7 +48,7 @@
</view>
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>身份证号</text>
<text>身份证号</text><text style="color: red;">*</text>
</view>
<u-form-item prop='idNumber' style="width:75%;height: 100%;" >
<u--input v-model="entryIdNumberBean.idNumber" type="text" placeholder="请输入" maxlength="18" border="surround" clearable @input="getBorth"></u--input>
@ -56,7 +56,7 @@
</view>
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>性别</text>
<text>性别</text><text style="color: red;">*</text>
</view>
<u-form-item prop='sex' style="width:75%;height: 100%;" >
<u--input
@ -65,7 +65,7 @@
</view>
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>出身日期</text>
<text>出身日期</text><text style="color: red;">*</text>
</view>
<u-form-item prop='birthday' style="width:75%;height: 100%;" >
<u--input v-model="entryIdNumberBean.birthday" readonly type="text" placeholder="自动计算带入" maxlength="20" border="surround" clearable></u--input>
@ -73,7 +73,7 @@
</view>
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>民族</text>
<text>民族</text><text style="color: red;">*</text>
</view>
<u-form-item prop='ethnic' style="width:75%;height: 100%;" >
<u--input v-model="entryIdNumberBean.ethnic" type="text" placeholder="请输入" maxlength="15" border="surround" clearable></u--input>
@ -81,7 +81,7 @@
</view>
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>住址</text>
<text>住址</text><text style="color: red;">*</text>
</view>
<u-form-item prop='address' style="width:75%;height: 100%;" >
<u--input v-model="entryIdNumberBean.address" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
@ -90,7 +90,7 @@
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>生效日期</text>
<text>生效日期</text><text style="color: red;">*</text>
</view>
<u-form-item prop='signDate' style="width:75%;height: 100%;" >
<uni-datetime-picker type="date" :clear-icon="false" format="yyyy-MM-dd" v-model="entryIdNumberBean.signDate"/>
@ -98,7 +98,7 @@
</view>
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>失效日期</text>
<text>失效日期</text><text style="color: red;">*</text>
</view>
<u-form-item prop='expiryDate' style="width:75%;height: 100%;" >
<uni-datetime-picker type="date" :clear-icon="false" format="yyyy-MM-dd" v-model="entryIdNumberBean.expiryDate"/>
@ -106,7 +106,7 @@
</view>
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>签发机关</text>
<text>签发机关</text><text style="color: red;">*</text>
</view>
<u-form-item prop='issuance' style="width:75%;height: 100%;" >
<u--input v-model="entryIdNumberBean.issuance" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
@ -136,7 +136,7 @@
</view> -->
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>工种</text>
<text>工种</text><text style="color: red;">*</text>
</view>
<u-form-item prop='postId' style="width:75%;height: 100%;" >
<uni-data-select v-model="entryCruxBean.postId" :localdata="postList" @change="changePost"></uni-data-select>
@ -144,7 +144,7 @@
</view>
<view class="form-input-box">
<view style="width:20%;height: 100%;">
<text>手机号码</text>
<text>手机号码</text><text style="color: red;">*</text>
</view>
<u-form-item prop='phone' style="width:75%;height: 100%;" >
<u--input v-model="entryCruxBean.phone" type="number" placeholder="请输入" maxlength="11" border="surround" clearable></u--input>
@ -152,7 +152,7 @@
</view>
<view class="form-input-box">
<view style="width:25%;height: 100%;margin-top: 20rpx;">
<text>人脸照片采集</text>
<text>人脸照片采集</text><text style="color: red;">*</text>
</view>
<view class="img-box">
<view class="img-item" v-if="faceImgUrl!=''">
@ -163,7 +163,7 @@
</view>
<view class="form-input-box">
<view style="width:25%;height: 100%;margin-top: 20rpx;">
<view>电子签名采集</view>
<view>电子签名采集</view><text style="color: red;">*</text>
</view>
<view class="img-box">
<view class="img-item" v-if="signImgUrl!=''">
@ -530,7 +530,7 @@
<text>银行名称</text>
</view>
<u-form-item prop='bankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -538,7 +538,7 @@
<text>银行卡号</text>
</view>
<u-form-item prop='bankCard' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="20" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -546,7 +546,7 @@
<text>银行支行名称</text>
</view>
<u-form-item prop='rollBankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.rollBankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.rollBankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view style="display: flex;flex-direction: column;padding: 20rpx;">
@ -653,7 +653,7 @@
<text>银行名称</text>
</view>
<u-form-item prop='bankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -661,7 +661,7 @@
<text>银行卡号</text>
</view>
<u-form-item prop='bankCard' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="20" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -1013,18 +1013,18 @@ export default {
if(res.data.entryIdNumberBean){ this.entryIdNumberBean=res.data.entryIdNumberBean;}
if(res.data.entryCruxBean){
this.entryCruxBean=res.data.entryCruxBean;
this.faceImgUrl=config.realLoginUrl+this.entryCruxBean.facePath;
this.signImgUrl=config.realLoginUrl+this.entryCruxBean.autoPath;
this.faceImgUrl=config.realBaseUrl+this.entryCruxBean.facePath;
this.signImgUrl=config.realBaseUrl+this.entryCruxBean.autoPath;
}
if(res.data.entryTrainBean){ this.entryTrainBean=res.data.entryTrainBean;}
if(res.data.entrySubTeamBean){ this.entrySubTeamBean=res.data.entrySubTeamBean;}
if(res.data.entryContractBean){
this.entryContractBean=res.data.entryContractBean;
this.contractImgUrl=config.realLoginUrl+this.entryContractBean.contractPath;
this.contractImgUrl=config.realBaseUrl+this.entryContractBean.contractPath;
}
if(res.data.entryBankBean){
this.entryBankBean=res.data.entryBankBean;
this.bankImgUrl=config.realLoginUrl+this.entryBankBean.bankPhoto;
this.bankImgUrl=config.realBaseUrl+this.entryBankBean.bankPhoto;
}
if(res.data.entryOtherBean){ this.entryOtherBean=res.data.entryOtherBean;}
}

View File

@ -78,6 +78,12 @@ export default {
this.loadList()
},
loadList(){
if(this.keyword==""){
uni.showToast({
title: "请先输入人名",
icon: 'none'
})
}else{
let param={
name:this.keyword
}
@ -112,6 +118,7 @@ export default {
this.isLoading=false
}
})
}
},
goEdit(item){
console.log(item)

View File

@ -544,7 +544,7 @@
<text>银行名称</text>
</view>
<u-form-item prop='bankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -552,7 +552,7 @@
<text>银行卡号</text>
</view>
<u-form-item prop='bankCard' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="20" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -560,7 +560,7 @@
<text>银行支行名称</text>
</view>
<u-form-item prop='rollBankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.rollBankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.rollBankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view style="display: flex;flex-direction: column;padding: 20rpx;">

View File

@ -129,7 +129,7 @@
<text>入场工程</text>
</view>
<u-form-item prop='proId' style="width:75%;height: 100%;" >
<uni-data-select v-model="entryCruxBean.proId" :localdata="proList" @change="changePro" disabled="true" :clear="false"></uni-data-select>
<uni-data-select v-model="entryCruxBean.proId" :localdata="proList" @change="changePro" disabled :clear="false"></uni-data-select>
</u-form-item>
</view>
<view class="form-input-box">
@ -545,7 +545,7 @@
<text>银行名称</text>
</view>
<u-form-item prop='bankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -553,7 +553,7 @@
<text>银行卡号</text>
</view>
<u-form-item prop='bankCard' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="20" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -561,7 +561,7 @@
<text>银行支行名称</text>
</view>
<u-form-item prop='rollBankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.rollBankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.rollBankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view style="display: flex;flex-direction: column;padding: 20rpx;">
@ -887,7 +887,6 @@ export default {
this.entryCruxBean.proName=item.text;
}
})
console.log(this.entryCruxBean.proName)
this.getSubList()
},
@ -1019,18 +1018,23 @@ export default {
if(res.data.entryIdNumberBean){ this.entryIdNumberBean=res.data.entryIdNumberBean;}
if(res.data.entryCruxBean){
this.entryCruxBean=res.data.entryCruxBean;
this.faceImgUrl=config.realLoginUrl+this.entryCruxBean.facePath;
this.signImgUrl=config.realLoginUrl+this.entryCruxBean.autoPath;
this.faceImgUrl=config.realBaseUrl+this.entryCruxBean.facePath;
this.signImgUrl=config.realBaseUrl+this.entryCruxBean.autoPath;
}
if(res.data.entryTrainBean){ this.entryTrainBean=res.data.entryTrainBean;}
if(res.data.entrySubTeamBean){ this.entrySubTeamBean=res.data.entrySubTeamBean;}
if(res.data.entrySubTeamBean){
this.getSubList()
this.getTeamList()
this.entrySubTeamBean=res.data.entrySubTeamBean;
}
if(res.data.entryContractBean){
this.entryContractBean=res.data.entryContractBean;
this.contractImgUrl=config.realLoginUrl+this.entryContractBean.contractPath;
this.contractImgUrl=config.realBaseUrl+this.entryContractBean.contractPath;
}
if(res.data.entryBankBean){
this.entryBankBean=res.data.entryBankBean;
this.bankImgUrl=config.realLoginUrl+this.entryBankBean.bankPhoto;
this.bankImgUrl=config.realBaseUrl+this.entryBankBean.bankPhoto;
}
if(res.data.entryOtherBean){ this.entryOtherBean=res.data.entryOtherBean;}
}

View File

@ -545,7 +545,7 @@
<text>银行名称</text>
</view>
<u-form-item prop='bankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -553,7 +553,7 @@
<text>银行卡号</text>
</view>
<u-form-item prop='bankCard' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="20" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -561,7 +561,7 @@
<text>银行支行名称</text>
</view>
<u-form-item prop='rollBankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.rollBankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.rollBankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view style="display: flex;flex-direction: column;padding: 20rpx;">
@ -1076,18 +1076,22 @@ export default {
if(res.data.entryIdNumberBean){ this.entryIdNumberBean=res.data.entryIdNumberBean;}
if(res.data.entryCruxBean){
this.entryCruxBean=res.data.entryCruxBean;
this.faceImgUrl=config.realLoginUrl+this.entryCruxBean.facePath;
this.signImgUrl=config.realLoginUrl+this.entryCruxBean.autoPath;
this.faceImgUrl=config.realBaseUrl+this.entryCruxBean.facePath;
this.signImgUrl=config.realBaseUrl+this.entryCruxBean.autoPath;
}
if(res.data.entryTrainBean){ this.entryTrainBean=res.data.entryTrainBean;}
if(res.data.entrySubTeamBean){ this.entrySubTeamBean=res.data.entrySubTeamBean;}
if(res.data.entrySubTeamBean){
this.getSubList()
this.getTeamList()
this.entrySubTeamBean=res.data.entrySubTeamBean;
}
if(res.data.entryContractBean){
this.entryContractBean=res.data.entryContractBean;
this.contractImgUrl=config.realLoginUrl+this.entryContractBean.contractPath;
this.contractImgUrl=config.realBaseUrl+this.entryContractBean.contractPath;
}
if(res.data.entryBankBean){
this.entryBankBean=res.data.entryBankBean;
this.bankImgUrl=config.realLoginUrl+this.entryBankBean.bankPhoto;
this.bankImgUrl=config.realBaseUrl+this.entryBankBean.bankPhoto;
}
if(res.data.entryOtherBean){ this.entryOtherBean=res.data.entryOtherBean;}
}

View File

@ -294,7 +294,7 @@ export default {
res = res.data;
if(res.code==200){
this.detailData=res.data;
this.faceImgUrl=config.realLoginUrl+res.data.facePhoto;
this.faceImgUrl=config.realBaseUrl+res.data.facePhoto;
}else{
uni.showToast({
title: res.msg,
@ -321,7 +321,7 @@ export default {
},
openContract(){
this.contractData = this.detailData.listContract[0]
this.contractImgUrl=config.realLoginUrl+this.contractData.witnessPath;
this.contractImgUrl=config.realBaseUrl+this.contractData.witnessPath;
this.showPopup3=true;
},
closePopup3(){

View File

@ -163,16 +163,16 @@ export default {
var imgList=res.data;
imgList.forEach(item=>{
if(item.type==1){
this.contractImgUrl=config.realLoginUrl+item.path;
this.contractImgUrl=config.realBaseUrl+item.path;
}
if(item.type==2){
this.attendanceImgUrl=config.realLoginUrl+item.path;
this.attendanceImgUrl=config.realBaseUrl+item.path;
}
if(item.type==3){
this.wageImgUrl=config.realLoginUrl+item.path;
this.wageImgUrl=config.realBaseUrl+item.path;
}
if(item.type==4){
this.otherImgUrl=config.realLoginUrl+item.path;
this.otherImgUrl=config.realBaseUrl+item.path;
}
})
}else{

View File

@ -39,7 +39,7 @@
<text>欠薪金额</text> <text style="color: red;">*</text>
</view>
<u-form-item prop='oweMoney' style="width:70%;height: 100%;" >
<u--input v-model="formData.oweMoney" type="number" placeholder="请输入" maxlength="10" border="surround" clearable></u--input>
<u--input v-model="formData.oweMoney" type="number" placeholder="请输入" maxlength="7" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -130,7 +130,11 @@
</view>
</view>
</view>
<view class="sumbit-btn" @click="sumbit"> </view>
<view style="padding-bottom: 50rpx;">
<view class="sumbit-btn" @click="sumbit"> </view>
</view>
</view>
<view class="view-box list-box" v-if="currentTabIndex == 1">
<view v-if="listData.length==0" style="width: 96%;height: 40vh;display: flex;flex-direction: column;justify-content: center;align-items: center;" >
@ -306,8 +310,12 @@ export default {
this.formData.representationTime = this.timeFormat(null,'yyyy-mm-dd hh:MM:ss');
this.formData.addTime = this.timeFormat(null,'yyyy-mm-dd hh:MM:ss');
this.formData.currentDay = this.timeFormat(null,'yyyy-mm-dd');
if(this.range.length==0){
var pattern = /^1[3-9]\d{9}$/;
if(!this.verifyidNumber(this.formData.idCard)){
uni.$u.toast('请填写正确身份证号');
}else if(!pattern.test(this.formData.phone)){
uni.$u.toast('请填写正确手机号码');
}else if(this.range.length==0){
uni.$u.toast('请选择欠薪时间');
}else if(this.contractPath==''){
uni.$u.toast('请上传合同照片图片');
@ -504,6 +512,31 @@ export default {
})
})
},
//
verifyidNumber(idNumber) {
//
if (idNumber.length !== 18) {
return false;
}
// 17
if (!/^\d{17}$/.test(idNumber.substr(0, 17))) {
return false;
}
//
var weightFactor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
var checkCodeList = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];
var checkSum = 0;
for (var i = 0; i < 17; i++) {
checkSum += parseInt(idNumber.charAt(i)) * weightFactor[i];
}
var checkCodeIndex = checkSum % 11;
if (idNumber.charAt(17).toUpperCase() !== checkCodeList[checkCodeIndex]) {
return false;
}
return true;
},
timeFormat(dateTime = null, formatStr = 'yyyy-mm-dd') {
let date
//
@ -699,7 +732,6 @@ export default {
width: 94%;
height: 80rpx;
margin: 0 auto;
margin-bottom: 100rpx;
display: flex;align-items: center;justify-content: center;
background: #00337A;
color: #FFF;

View File

@ -43,7 +43,7 @@
<text>银行卡号</text>
</view>
<u-form-item prop='bankCard' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="20" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -51,7 +51,7 @@
<text>银行名称</text>
</view>
<u-form-item prop='bankName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
<view class="form-input-box">
@ -59,7 +59,7 @@
<text>银行支行名称</text>
</view>
<u-form-item prop='bankRollName' style="width:70%;height: 100%;" >
<u--input v-model="entryBankBean.bankRollName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
<u--input v-model="entryBankBean.bankRollName" type="text" placeholder="请输入" maxlength="30" border="surround" clearable></u--input>
</u-form-item>
</view>
</u--form>
@ -81,6 +81,7 @@ export default {
data() {
return {
idNumber:uni.getStorageSync('realNameUser').idNumber,
proId:uni.getStorageSync('realNameUser').proId,
imgUrl:'',
faceData:{},
proName:"xxx工程",
@ -106,10 +107,36 @@ export default {
console.log('🚀 ~ mounted ~ mounted-index:');
},
onShow() {
this.getPro()
console.log(this.timeFormat(null,'yyyy-mm-dd'))
},
methods: {
//
getPro(){
let param={
id:this.proId,
subId:-1
}
uni.request({
url: config.realAppUrl + '/offLine/getPro',
method: 'post',
data: param,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: uni.getStorageSync('realNameToken')
},
success: res => {
res = res.data;
if(res.code==200){
console.log(res)
this.proName = res.data[0].abbreviation||"";
}
},
fail: err => {
console.log(err)
}
})
},
//
distinguish(){
console.log('人脸识别采集')
@ -141,7 +168,7 @@ export default {
if(this.faceData){
this.entryBankBean.idNumber = this.faceData.idNumber;
this.entryBankBean.proId = this.faceData.proId;
this.proName = this.faceData.proName;
// this.proName = this.faceData.proName;
let birthday = new Date(this.faceData.birthday).getTime();
let now = new Date().getTime();
let hours = (now-birthday)/3600000;

View File

@ -25,6 +25,9 @@
<web-view :src="webUrl3" v-if="hIndex==3" :fullscreen="false" :webview-styles="webviewStyles" style="overflow: auto;margin-top: 400rpx;"></web-view>
<web-view :src="webUrl4" v-if="hIndex==4" :fullscreen="false" :webview-styles="webviewStyles" style="overflow: auto;margin-top: 400rpx;"></web-view>
</view>
<view class="screen-btn" v-if="screenType==2" @click="lockOrientation('landscape')">横屏</view>
<view class="screen-btn" v-if="screenType==1" @click="lockOrientation('portrait')">竖屏</view>
</view>
</template>
@ -41,13 +44,14 @@ export default {
webUrl4:"/hybrid/html/planAndRealName/planAndRealNameFour.html",
webviewStyles: {
progress: false,
width:'96%',
width:'92%',
height:'220',
zIndex:'999',
top:'140',
left:'10',
right:'10',
},
screenType:2, //1-2-
}
},
watch: {
@ -71,10 +75,11 @@ export default {
//#endif
//
this.getScal()
},
onUnload() {
// #ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary');
plus.screen.lockOrientation('portrait-primary');
// #endif
},
methods: {
@ -86,6 +91,22 @@ export default {
// console.log(e)
this.hIndex=3
},
//
// this.lockOrientation('landscape')
//
//this.lockOrientation('portrait')
lockOrientation(orientation) {
if(orientation=='landscape'){
this.screenType=1
}else if(orientation=='portrait'){
this.screenType=2
}
if (typeof plus !== 'undefined' && typeof plus.screen !== 'undefined') {
plus.screen.lockOrientation(orientation)
}
},
getScal(){
// #ifdef APP-PLUS
const currentWebview = this.$scope.$getAppWebview() //webview
@ -138,6 +159,8 @@ export default {
height:100vh;
background-color: #EFEFEF;
box-sizing: border-box;
position: relative;
.content{
width: 100%;
height: 80vh;
@ -158,6 +181,20 @@ export default {
}
}
}
}
.screen-btn{
width: 100rpx;
height: 60rpx;
line-height: 60rpx;
background: #00337A;
color: #fff;
border-radius: 10rpx;
text-align: center;
position: fixed;
bottom: 20rpx;
right: 20rpx;
z-index: 999999;
}
}
</style>

BIN
static/realName/face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B