提交代码

main
姜玉琦 2023-08-25 00:03:39 +08:00
parent 10f55a9fee
commit 399e00422f
72 changed files with 650 additions and 5609 deletions

View File

@ -14,14 +14,10 @@
"pages/Information-review/index",
"pages/newAddPage/safetyManagement/index",
"pages/learn-page/index",
"pages/Personnel-information-binding/index",
"pages/winter-training/index",
"pages/saft-qr-view/index",
"pages/saft-education-user-bind/index",
"pages/temporaryToExamine/index",
"pages/tempRegistration/index",
"pages/newAddPage/safetyBriefingLearning/index",
"pages/newAddPage2/safetyBriefingLearning/index",
"pages/Highlight-photos/index",
"pages/newAddPage/letterCommitment/index",
"pages/newAddPage2/letterCommitment/index",
@ -59,7 +55,6 @@
"suishoupai/suishoupai",
"suishoupai-psh/suishoupai-psh",
"lw-index/lw-index",
"lw-baobiaochaxun/lw-baobiaochaxun",
"lw-gerenxinxi/lw-gerenxinxi",
"lw-jibenxinxi/lw-jibenxinxi",
"safetyManagement/securityCheckGR/index",
@ -69,7 +64,6 @@
"safetyManagement/securityCheckRectified/index",
"safetyManagement/addSafetyInspect/index",
"Security-control-echarts/index",
"dangerousProject/index",
"samplingRetesting/index",
"samplingRetestingDeliver/index",
"samplingRetestingUpload/index",

View File

@ -1,267 +1,66 @@
// pages/dangerousProject/index.js
const app = getApp()
// pageage/dangerousProject/index.js
Page({
/**
* 页面的初始数据
*/
data: {
stateNav:1,
timeline:[],
dangerNameList:[],
show: false,
loadShow:false,
loginName:'',
userName:'',
deptId:'',
projectName:'',
projectId:'',
allPoint:0,
outPoint:0,
comPoint:0,
fileList: [],
id:'',
/**
* 页面的初始数据
*/
data: {
initData:{}
},
},
//项目切换 返回值
onProjectSelect(e){
this.onClickShow();
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.projectId = projectId;
app.globalData.projectName = projectName;
this.setData({
projectId:projectId,
projectName:projectName,
dangerNameList:[],
dangerName:'',
timeline:[],
allPoint:0,
outPoint:0,
comPoint:0
})
this.onLoad();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
onImagesArr(e){
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({
//图片上传地址
url: app.globalData.reqUrl+'/weixin/security/fileUpload',
filePath: e.detail[0],
name: 'file',
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
formData: { user: 'test' },
success:res => {
// 上传完成需要更新 fileList
let data = JSON.parse(res.data);
let fileList = this.data.fileList
fileList.push({url: data.url});
this.setData({ fileList:fileList});
this.updateDanger(res.data,e.currentTarget.dataset.id)
},
});
},
showPopup() {
this.setData({ show: true });
},
},
onClose() {
this.setData({ show: false });
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
onClickShow() {
this.setData({ loadShow: true });
},
},
onClickHide() {
this.setData({ loadShow: false });
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
onSelectDangerName(e){
this.getProjectDanger(e.detail.id);
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
var that = this;
//加载蒙版
that.onClickShow();
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success:function(res){
that.setData({
loginName:res.data.loginName,
userName:res.data.userName,
deptId:res.data.deptId,
projectName: app.globalData.projectName,
projectId:app.globalData.projectId,
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
})
that.getProjectDangerPlan();
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
/**
* 危大工程计划
*/
getProjectDangerPlan(){
var that = this;
wx.request({
url: app.globalData.reqUrl+'/weixin/security/getProjectDangerPlan',
method: 'get',
data: {
deptId:this.data.deptId,
projectId:this.data.projectId
},
success: resData => {
this.onClickHide();
if(resData.data.code == 200){
let array = [];
for(let i = 0;i<resData.data.data.length;i++){
array.push({text:resData.data.data[i].danger_name,id:resData.data.data[i].id});
}
that.setData({
dangerNameList:array,
dangerName:array[0].text
})
that.getProjectDanger(resData.data.data[0].id);
}else{
that.setData({
dangerNameList:[],
dangerName:''
})
}
}
})
},
},
/**
* 危大工程列表
*/
getProjectDanger:function(danger_id){
wx.request({
url: app.globalData.reqUrl+'/weixin/security/getProjectDanger',
method: 'get',
data: {
deptId:this.data.deptId,
projectId:this.data.projectId,
danger_id:danger_id
},
success: resData => {
this.onClickHide();
if(resData.data.code == 200){
let timeline = resData.data.data.dangerList;
var flag = false;
timeline.map(x => {
if(x.fileUrl.length > 0){
x.type = 0;
}else{
if(!flag){
x.type = 1
flag = true;
}else{
x.type = 2;
}
}
let fileUrl = x.fileUrl;
for(let i = 0;i<fileUrl.length;i++){
if(fileUrl[i].url.substring(fileUrl[i].url.length-4,fileUrl[i].url.length) == '.pdf'){
fileUrl[i].suffix = "pdf";
}else{
fileUrl[i].suffix = "png";
}
}
})
this.setData({
timeline:timeline,
allPoint:resData.data.data.allPoint,
outPoint:resData.data.data.outPoint,
comPoint:resData.data.data.comPoint
})
}else{
this.setData({
timeline:[],
allPoint:0,
outPoint:0,
comPoint:0
})
}
}
})
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
/**
* 图片上传
*/
updateDanger:function(fileUrl,id){
wx.request({
header: {
'content-type': 'application/x-www-form-urlencoded'
},
url:app.globalData.reqUrl+'/weixin/security/updateDanger',
data:{
"deptId":this.data.deptId,
"projectId":this.data.projectId,
"id":id,
"fileUrl":fileUrl,
"subName":this.data.loginName,
},
method:"POST",
success:function(res){
console.log("======"+res.data.code);
}
})
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
/**
* 文件信息查看
* @param {*} e
*/
previewImg(e){
let suffix = e.currentTarget.dataset.suffix;
let url = e.currentTarget.dataset.url;
let images = [url];
if(suffix == 'pdf'){
wx.downloadFile({
url: url,
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
}
})
}
})
}else{
wx.previewImage({
current: url, //当前图片地址
urls: images, //所有要预览的图片的地址集合 数组形式
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
}
},
/**
* 返回到技术管理
*/
goGCLB:function(){
wx.redirectTo({
url: '../../pages/technical-management/index'
})
},
})

View File

@ -1,7 +0,0 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index" ,
"van-popup": "@vant/weapp/popup/index"
},
"navigationBarTitleText": "重大节点管理"
}

View File

@ -1,114 +1,2 @@
<!--pages/dangerousProject/index.wxml-->
<!-- <view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="3">
<view class="header_img" bindtap="showPopup"><image src="/images/core.png"></image></view>
</van-col>
<van-col span="4">
<view class="header_img" bindtap="goGCLB">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view>
</van-col>
<van-col span="10">
<view class="header_name">重大节点管理</view>
</van-col>
</van-row>
</view>
</view> -->
<!-- <van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onClose" >
<view class="left_max">
<van-row class="demo clearfix">
<van-col span="10">
<view class="left_head"><image src="http://fileimg.makalu.cc/szgl/9015e824c5004e629049c4f72967cfdc.png"></image></view>
</van-col>
<van-col span="14">
<view class="left_info">
<view class="left_info_name">{{userName}}</view>
<view class="left_info_name">{{loginName}}</view>
</view>
</van-col>
</van-row>
</view>
</van-popup> -->
<view class="max_new_content">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="add_max" style="margin-top: 30rpx;">
<voucher-select columns="{{dangerNameList}}" placeholder="{{dangerName}}" bindchange="onSelectDangerName"></voucher-select>
</view>
<view class="dangerous_node">
<view class="dangerous_node_min">
<view class="dangerous_node_number cyan">{{allPoint}}</view>
<view class="dangerous_node_title">
<image src="http://fileimg.makalu.cc/WEB_73AFC6D8953E4BE4B6DF0BD331FE4F2A.png"></image>
<text>总节点</text>
</view>
</view>
<view class="dangerous_node_min">
<view class="dangerous_node_number blue">{{comPoint}}</view>
<view class="dangerous_node_title">
<image src="http://fileimg.makalu.cc/WEB_0A0B35F80B944F2EB39D2226216C4820.png"></image>
<text>已提交</text>
</view>
</view>
<view class="dangerous_node_min">
<view class="dangerous_node_number orange">{{outPoint}}</view>
<view class="dangerous_node_title">
<image src="http://fileimg.makalu.cc/WEB_486045C8DBE9469B88BB2F09AC9B0EE6.png"></image>
<text>已逾期</text>
</view>
</view>
</view>
<view class="timeline_max">
<view class="timeline_for" wx:for-items="{{timeline}}" wx:key="index">
<view class="timeline_for_title">
<view wx:if="{{item.type != 0}}" class="timeline_for_dot dot_blue"></view>
<view wx:if="{{item.type == 0&&item.state == 0}}" class="timeline_for_dot dot_blue"></view>
<view wx:if="{{item.type == 0&&item.state == 1}}" class="timeline_for_dot dot_red"></view>
<view class="timeline_for_text">{{item.title}}</view>
</view>
<view class="timeline_for_list">
<view>预计提交时间:</view>
<view class="timeline_for_time">{{item.planTime}}</view>
</view>
<view class="timeline_for_list">
<view>实际提交时间:</view>
<view class="timeline_for_time">{{item.actualTima}}</view>
</view>
<view class="timeline_for_list">
<view>逾期状态:</view>
<view class="timeline_for_state">
<view class="timeline_for_state_1" wx:if="{{item.type == 0&&item.state == 0}}">正常完成</view>
<view class="timeline_for_state_2" wx:if="{{item.type == 0&&item.state == 1}}">逾期{{item.expectDays}}天</view>
</view>
</view>
<view class="timeline_for_file">
<view class="timeline_for_list_title" wx:if="{{item.type==1}}" >提交文件:</view>
<view class="timeline_for_list_file">
<image wx:if="{{item.type == 0}}" wx:for-items="{{item.fileUrl}}" wx:for-item="itemUrl" src="{{itemUrl.suffix !='pdf'?itemUrl.url:'http://fileimg.makalu.cc/WEB_3035C129EB234F80820521CAF815CB35.jpg'}}" data-url="{{itemUrl.url}}"
data-suffix="{{itemUrl.suffix}}" mode="aspectFill" bindtap="previewImg" style="width:90px;height:90px"></image>
<file-uploader wx:if="{{item.type == 1}}" bindimages="onImagesArr"></file-uploader>
</view>
</view>
</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="../../images/loding2.gif"></image>
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>
<!--pageage/dangerousProject/index.wxml-->
<text>pageage/dangerousProject/index.wxml</text>

View File

@ -1,5 +0,0 @@
/* pages/dangerousProject/index.wxss */
.van-uploader__preview-image{
width: 140rpx !important;
height: 140rpx !important;
}

View File

@ -1,149 +0,0 @@
// pages/lw-baobiaochaxun/lw-baobiaochaxun.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
projectName:'',
date: '',
today:'',
show: false,
minDate: new Date(2020, 0, 1).getTime(),
maxDate: new Date().getTime(),
tableList:[],
tableListNew:[],
loadShow:false,
pageNum:1,
//静态变量
type:false,
},
onClickShow() {
this.setData({ loadShow: true });
},
onClickHide() {
this.setData({ loadShow: false });
},
onDisplay() {
this.setData({ show: true });
},
onClose() {
this.setData({ show: false });
},
formatDate(date) {
date = new Date(date);
var dateYaer = date.getFullYear();
var dateMonth = date.getMonth() + 1;
var dateDay = date.getDate();
if(dateMonth < 10 ){
dateMonth = '0' + dateMonth;
}
if(dateDay < 10 ){
dateDay = '0' + dateDay;
}
return dateYaer+'-'+dateMonth+ '-'+dateDay;
},
onConfirm(event) {
this.onClickShow();
this.setData({
show: false,
date: this.formatDate(event.detail),
tableListNew:[],
pageNum:1
});
this.selectClockPunch(app.globalData.projectId,this.formatDate(event.detail),1,20);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.onClickShow();
var date = new Date();
var dateYaer = date.getFullYear();
var dateMonth = date.getMonth() + 1;
var dateDay = date.getDate();
if(dateMonth < 10 ){
dateMonth = '0' + dateMonth;
}
if(dateDay < 10 ){
dateDay = '0' + dateDay;
}
this.setData({
date: dateYaer+'-'+dateMonth+ '-'+dateDay,
});
this.setData({
today:dateYaer+'-'+dateMonth+ '-'+dateDay,
projectName:app.globalData.projectName,
tableListNew:[]
})
this.selectClockPunch(app.globalData.projectId,dateYaer+'-'+dateMonth+ '-'+dateDay,1,20);
},
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
//判断数组是否存在值
if(this.data.type){
this.setData({pageNum:this.data.pageNum+1});
this.selectClockPunch(app.globalData.projectId,this.data.date,this.data.pageNum,20);
}
  },
/**
* 获取项目打卡数据
* @param {*} projectId 项目id
* @param {*} date 日期
* @param {*} pageNum 页数(1开始)
* @param {*} size 每页条数
*/
selectClockPunch:function(projectId,date,pageNum,size){
var that = this;
wx.request({
url: app.globalData.reqUrl+'/weixin/labour/selectClockPunch',
data:{
"projectId":projectId,
"date":date,
"pageNum":pageNum,
"size":size
},
method:"GET",
success:function(res) {
that.onClickHide();
if(res.data.code == '200'){
//赋值
var tableListNew =that.data.tableListNew;
for(var i = 0;i<res.data.data.length;i++){
tableListNew.push(res.data.data[i]);
}
//判断查询到的数据是否有值
var type = true;
if(res.data.data.length < 20 ){ type = false; }
that.setData({
tableList:tableListNew,
type:type
})
}else{
app.toast(res.data.msg);
}
}
})
},
/**
* 返回劳务管控页面
*/
goBack:function(){
wx.redirectTo({
url: '../lw-index/lw-index',
})
}
})

View File

@ -1,9 +0,0 @@
{
"usingComponents": {
"van-row": "@vant/weapp/row",
"van-col": "@vant/weapp/col",
"van-calendar": "@vant/weapp/calendar/index",
"van-overlay": "@vant/weapp/overlay/index"
},
"navigationStyle":"custom"
}

View File

@ -1,84 +0,0 @@
<!--pages/lw-baobiaochaxun/lw-baobiaochaxun.wxml-->
<!--pages/lw-index/lw-index.wxml-->
<view class="header_title">
<view class="">
<van-row>
<van-col span="6" bindtap="goBack">
<view class="header_img"><image src="/images/left.png"></image></view>
</van-col>
<van-col span="12">
<view class="header_name">报表查询</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<view class="lw_max">
<view class="lw_min" bindtap="onDisplay">
<text value="{{ date }}">{{ date }}</text>
<image src="/images/lw_4.png" class="lw_img_right"></image>
</view>
</view>
<van-calendar show="{{ show }}" bind:close="onClose" default-date="{{today}}" show-confirm="{{ false }}" bind:confirm="onConfirm" min-date="{{ minDate }}" max-date="{{ maxDate }}" color="#07c160" />
<view class="lw_gdgq">
<van-row>
<van-col span="12">
项目名称:<text>{{projectName}}</text>
</van-col>
</van-row>
<view class="eharts_title">考勤列表</view>
<view class="lw_table_th">
<van-row>
<van-col span="4">
<view>姓名</view>
</van-col>
<van-col span="12">
<view>参建单位</view>
</van-col>
<van-col span="4">
<view>首次打卡</view>
</van-col>
<van-col span="4">
<view>末次打卡</view>
</van-col>
</van-row>
</view>
<view class="lw_table_tr">
<view class="lw_table_td" wx:for="{{tableList}}">
<van-row>
<van-col span="4">
<view>{{item.name}}</view>
</van-col>
<van-col span="12">
<view>{{item.enterprise_name}}</view>
</van-col>
<van-col span="4">
<view>{{item.scdk}}</view>
</van-col>
<van-col span="4">
<view>{{item.mcdk}}</view>
</van-col>
</van-row>
</view>
</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="../../images/loding2.gif"></image>
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>

View File

@ -1,77 +0,0 @@
/* pages/lw-baobiaochaxun/lw-baobiaochaxun.wxss */
.lw_max{
padding: 20rpx 30rpx;
}
.lw_min{
padding: 20rpx 30rpx;
background: #2b345b;
border-radius: 15rpx;
font-size: 30rpx;
}
.lw_img_right{
float: right;
width: 40rpx;
height: 40rpx;
}
.lw_gdgq{
padding: 30rpx;
font-size: 28rpx;
}
.lw_gdgq text{
padding: 0 20rpx;
color: #89a4eb;
}
.eharts_title{
height: 40rpx;
line-height: 40rpx;
padding: 40rpx;
font-size: 28rpx;
background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx;
}
.lw_table_th{
background: #222a41;
text-align: center;
padding: 20rpx 0;
font-size:24rpx;
}
.lw_table_tr{
padding: 10rpx 0;
}
.lw_table_td{
text-align: center;
padding: 20rpx 0;
font-size: 24rpx;
color: #8ba2ee;
}
.lw_table_td view{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 5rpx;
}
.van-calendar{
background-color: #232a44 !important;
}
.van-calendar__month-mark{
color:rgba(255,255,255,0.2) !important;
}
.van-popup{
background: none !important;
}
.van-calendar__day--disabled{
color:rgba(255,255,255,0.4) !important;
}
.van-calendar__header-subtitle{
display: none;
}
.van-button--block.van-button--round{
width: 100%;
}

View File

@ -1,5 +1,4 @@
// pageage/safetyManagement/addSafetyInspect/index.js
import api from '../../../utils/api'
const app = getApp()
Page({
@ -26,7 +25,8 @@ Page({
superviseUser:"",
superviseUserName:"",
checkWorkingPosition:"",
intro:""
intro:"",
list:[{id:1,text:"合格"},{id:2,text:"不合格"}]
},
/**
@ -76,12 +76,11 @@ Page({
},
//切换验收结果
onStateSelect(e){
let state = e.currentTarget.dataset.set;
onSelectType(e){
this.setData({
checkingResult:state,
});
},
checkingResult:e.detail.id
})
},
//工序部位
onInputCheckWorkingPositionValue(e){

View File

@ -44,9 +44,8 @@
</view>
<view class="inspect_info_list">
<view class="inspect_info_title">验收结果</view>
<view class="inspect_info_type">
<view class="{{checkingResult==2?'active':''}}" bindtap="onStateSelect" data-set="2">验收合格</view>
<view class="{{checkingResult==1?'active':''}}" bindtap="onStateSelect" data-set="1">验收不合格</view>
<view class="inspect_info_content">
<voucher-select columns="{{list}}" placeholder="请选择验收结果" bindchange="onSelectType" ></voucher-select>
</view>
</view>
</view>

View File

@ -5,3 +5,9 @@
.van-image__img{
border-radius: 10rpx !important;
}
.radio_custom_class{
padding: 10rpx 100rpx 10rpx 0;
}
.radio_label_class{
color: #ffffff !important;
}

View File

@ -8,12 +8,12 @@ Page({
data: {
id:"",
infoData:{},
imgs:[],
imageList:[],
minImageList:[],
loadShow:false,
imgShow:false,
preImgUrl:"",
loginName:"",
showDel:false,
request:app.globalData.reqUrl
},
/**
@ -51,13 +51,16 @@ Page({
success(res){
res = res.data
if(res.code == 200){
let urls = [];
let urls = [];
let minUrls = [];
res.data.imageUrls.split(',').forEach(element => {
urls.push(element+'.min.jpg');
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
infoData:res.data,
imgs:urls,
imageList:urls,
minImageList:minUrls,
loadShow:false
})
//判断当前能否删除
@ -71,20 +74,6 @@ Page({
})
},
//打开放大的图片
enlargeImage(e){
this.setData({
preImgUrl:e.currentTarget.dataset.url,
imgShow:true
})
},
//关闭放大的图片
closeImages(){
this.setData({
imgShow:false
})
},
onDelete(){
//弹出确认
let that = this
@ -104,7 +93,7 @@ Page({
deleteData(){
let {id} = this.data
wx.request({
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/removeSafety',
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/remove',
data:{
id:id
},
@ -117,7 +106,16 @@ Page({
}
})
},
//展示图片
showImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -15,8 +15,10 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">验收图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{imgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>

View File

@ -1 +1,23 @@
/* pageage/project_checking/info/index.wxss */
/* pageage/project_checking/info/index.wxss */
.in-img-max:after{
display:block;
clear:both;
content:"";
visibility:hidden;
height:0
}
.in-img-max{
width: auto;
zoom:1
}
.in-img-div{
position: relative;
margin: 0 8px 8px 0;
float: left;
}
.in-img-div image{
width: 180rpx;
height: 180rpx;
border-radius: 15rpx;
position: relative;
}

View File

@ -15,6 +15,7 @@ Page({
initData: {},
show:false,
listData:[],
request:app.globalData.reqUrl
},
onClose(){

View File

@ -18,7 +18,7 @@
<view class="inspect_list_info_img">
<view wx:if="{{item.checkResult==1}}" class="code_label code_label_green">合格</view>
<view wx:if="{{item.checkResult==2}}" class="code_label code_label_red">不合格</view>
<van-image width="120rpx" height="120rpx" fit="cover" src="{{item.mainImage+'.min.jpg'}}"/>
<van-image width="120rpx" height="120rpx" fit="cover" src="{{request+item.mainImage+'.min.jpg'}}"/>
</view>
<view class="inspect_list_info_data">
<view class="inspect_list_info_data_prop">质量专员:<text>{{item.qualityUserName}}</text></view>

View File

@ -7,15 +7,18 @@ Page({
*/
data: {
id:"",
infoData:{},
imgs:[],
infoData:{},
loadShow:false,
auditInfo:{},
auditImgs:[],
reject:false,
rejectOpinion:"",
loadShow:false,
loginName:""
loginName:"",
imageList:[],
minImageList:[],
auditImageList:[],
auditMinImageList:[],
request:app.globalData.reqUrl
},
/**
@ -54,15 +57,18 @@ Page({
success(res){
res = res.data
if(res.code == 200){
let urls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(element+'.min.jpg');
});
that.setData({
infoData:res.data,
imgs:urls,
loadShow:false
})
let urls = [];
let minUrls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
infoData:res.data,
imageList:urls,
minImageList:minUrls,
loadShow:false
})
}
}
})
@ -80,13 +86,16 @@ Page({
success(res){
res = res.data
if(res.code == 200 && res.data){
let urls = [];
let urls = [];
let minUrls = [];
res.data.fileUrls.split(',').forEach(element => {
urls.push(element+'.min.jpg');
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
auditInfo:res.data,
auditImgs:urls
auditInfo:res.data,
auditImageList:urls,
auditMinImageList:minUrls
})
}
}
@ -126,7 +135,7 @@ Page({
processState:status,
opinion:rejectOpinion,
createUser:loginName
}
}
wx.request({
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/modifyProblem',
method:"POST",
@ -204,6 +213,24 @@ Page({
})
},
//展示图片
showImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
})
},
//展示图片
showAuditinfoImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.auditImageList,
current: that.data.auditImageList[e.currentTarget.dataset.index]
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -9,9 +9,11 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">隐患图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{imgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
</view>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>
<view class="inspect_overview_list">
@ -92,9 +94,11 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">整改后图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{auditImgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
</view>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{auditMinImageList}}" wx:key="index">
<image bindtap='showAuditinfoImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.checkState==4}}">

View File

@ -1 +1,23 @@
/* pageage/project_checking/info/index.wxss */
/* pageage/project_checking/info/index.wxss */
.in-img-max:after{
display:block;
clear:both;
content:"";
visibility:hidden;
height:0
}
.in-img-max{
width: auto;
zoom:1
}
.in-img-div{
position: relative;
margin: 0 8px 8px 0;
float: left;
}
.in-img-div image{
width: 180rpx;
height: 180rpx;
border-radius: 15rpx;
position: relative;
}

View File

@ -7,13 +7,16 @@ Page({
*/
data: {
id:"",
infoData:{},
imgs:[],
infoData:{},
loadShow:false,
auditInfo:{},
auditImgs:[],
loginName:"",
showDel:false,
imageList:[],
minImageList:[],
auditImageList:[],
auditMinImageList:[],
request:app.globalData.reqUrl
},
/**
@ -52,15 +55,18 @@ Page({
success(res){
res = res.data
if(res.code == 200){
let urls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(element+'.min.jpg');
});
that.setData({
infoData:res.data,
imgs:urls,
loadShow:false
})
let urls = [];
let minUrls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
infoData:res.data,
imageList:urls,
minImageList:minUrls,
loadShow:false
})
//判断当前能否删除
if(res.data.checkState!=4 && res.data.createUser==that.data.loginName){
that.setData({
@ -84,14 +90,17 @@ Page({
success(res){
res = res.data
if(res.code == 200 && res.data){
let urls = [];
res.data.fileUrls.split(',').forEach(element => {
urls.push(element+'.min.jpg');
});
that.setData({
let urls = [];
let minUrls = [];
res.data.fileUrls.split(',').forEach(element => {
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
auditInfo:res.data,
auditImgs:urls
})
auditImageList:urls,
auditMinImageList:minUrls
})
}
}
})
@ -116,7 +125,7 @@ Page({
deleteData(){
let {id} = this.data
wx.request({
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/removeSafety',
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/removeQuality',
data:{
id:id
},
@ -130,20 +139,24 @@ Page({
})
},
//打开放大的图片
enlargeImage(e){
this.setData({
imgUrl:e.currentTarget.dataset.url,
imgShow:true
})
},
//关闭放大的图片
closeImages(){
this.setData({
imgShow:false
})
//展示图片
showImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
})
},
//展示图片
showAuditinfoImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.auditImageList,
current: that.data.auditImageList[e.currentTarget.dataset.index]
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -10,8 +10,10 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">隐患图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{imgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>
@ -92,8 +94,10 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">整改后图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{auditImgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{auditMinImageList}}" wx:key="index">
<image bindtap='showAuditinfoImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>

View File

@ -1 +1,23 @@
/* pageage/project_checking/info/index.wxss */
/* pageage/project_checking/info/index.wxss */
.in-img-max:after{
display:block;
clear:both;
content:"";
visibility:hidden;
height:0
}
.in-img-max{
width: auto;
zoom:1
}
.in-img-div{
position: relative;
margin: 0 8px 8px 0;
float: left;
}
.in-img-div image{
width: 180rpx;
height: 180rpx;
border-radius: 15rpx;
position: relative;
}

View File

@ -18,7 +18,8 @@ Page({
activeState:"dzg",
dzgCount:0,
yclCount:0,
zgcsCOunt:0
zgcsCOunt:0,
request:app.globalData.reqUrl
},
onClose(){

View File

@ -25,7 +25,7 @@
<view wx:if="{{item.checkState==1}}" class="code_label code_label_blueviolet">待复检</view>
<view wx:if="{{item.checkState==3}}" class="code_label code_label_red">复检驳回</view>
<view wx:if="{{item.checkState==4}}" class="code_label code_label_green">整改完成</view>
<van-image width="120rpx" height="120rpx" fit="cover" src="{{item.marksPicture+'.min.jpg'}}"/>
<van-image width="120rpx" height="120rpx" fit="cover" src="{{request+item.marksPicture+'.min.jpg'}}"/>
</view>
<view class="inspect_list_info_data">
<view class="inspect_list_info_data_prop">隐患类型:<text>{{item.dangerTypeName}}</text></view>

View File

@ -7,16 +7,17 @@ Page({
*/
data: {
id:"",
infoData:{},
imgs:[],
infoData:{},
loadShow:false,
auditInfo:{},
auditImgs:[],
opinion:"",
imageInfoData:[],
loadShow:false,
loginName:"",
status:"0"
status:"0",
imageList:[],
minImageList:[],
request:app.globalData.reqUrl
},
/**
@ -56,14 +57,17 @@ Page({
res = res.data
if(res.code == 200){
let urls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(element+'.min.jpg');
});
that.setData({
infoData:res.data,
imgs:urls,
loadShow:false
})
let minUrls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
infoData:res.data,
imageList:urls,
minImageList:minUrls,
loadShow:false
})
}
}
})
@ -206,6 +210,15 @@ Page({
})
},
//展示图片
showImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -10,8 +10,10 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">隐患图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{imgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>

View File

@ -1 +1,23 @@
/* pageage/project_checking/info/index.wxss */
/* pageage/project_checking/info/index.wxss */
.in-img-max:after{
display:block;
clear:both;
content:"";
visibility:hidden;
height:0
}
.in-img-max{
width: auto;
zoom:1
}
.in-img-div{
position: relative;
margin: 0 8px 8px 0;
float: left;
}
.in-img-div image{
width: 180rpx;
height: 180rpx;
border-radius: 15rpx;
position: relative;
}

View File

@ -8,14 +8,17 @@ Page({
data: {
id:"",
infoData:{},
imgs:[],
loadShow:false,
auditInfo:{},
auditImgs:[],
reject:false,
rejectOpinion:"",
loadShow:false,
loginName:""
loginName:"",
imageList:[],
minImageList:[],
auditImageList:[],
auditMinImageList:[],
request:app.globalData.reqUrl
},
/**
@ -54,15 +57,18 @@ Page({
success(res){
res = res.data
if(res.code == 200){
let urls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(element+'.min.jpg');
});
that.setData({
infoData:res.data,
imgs:urls,
loadShow:false
})
let urls = [];
let minUrls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
infoData:res.data,
imageList:urls,
minImageList:minUrls,
loadShow:false
})
}
}
})
@ -80,14 +86,17 @@ Page({
success(res){
res = res.data
if(res.code == 200 && res.data){
let urls = [];
res.data.fileUrls.split(',').forEach(element => {
urls.push(element+'.min.jpg');
});
that.setData({
let urls = [];
let minUrls = [];
res.data.fileUrls.split(',').forEach(element => {
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
auditInfo:res.data,
auditImgs:urls
})
auditImageList:urls,
auditMinImageList:minUrls
})
}
}
})
@ -204,6 +213,24 @@ Page({
})
},
//展示图片
showImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
})
},
//展示图片
showAuditinfoImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.auditImageList,
current: that.data.auditImageList[e.currentTarget.dataset.index]
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -9,9 +9,11 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">隐患图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{imgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
</view>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>
<view class="inspect_overview_list">
@ -92,9 +94,11 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">整改后图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{auditImgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
</view>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{auditMinImageList}}" wx:key="index">
<image bindtap='showAuditinfoImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{infoData.checkState==4}}">

View File

@ -1 +1,23 @@
/* pageage/project_checking/info/index.wxss */
/* pageage/project_checking/info/index.wxss */
.in-img-max:after{
display:block;
clear:both;
content:"";
visibility:hidden;
height:0
}
.in-img-max{
width: auto;
zoom:1
}
.in-img-div{
position: relative;
margin: 0 8px 8px 0;
float: left;
}
.in-img-div image{
width: 180rpx;
height: 180rpx;
border-radius: 15rpx;
position: relative;
}

View File

@ -7,12 +7,15 @@ Page({
*/
data: {
id:"",
infoData:{},
imgs:[],
infoData:{},
auditInfo:{},
auditImgs:[],
showDel:false,
loginName:""
loginName:"",
imageList:[],
minImageList:[],
auditImageList:[],
auditMinImageList:[],
request:app.globalData.reqUrl
},
/**
@ -51,14 +54,17 @@ Page({
success(res){
res = res.data
if(res.code == 200){
let urls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(element+'.min.jpg');
});
that.setData({
infoData:res.data,
imgs:urls,
})
let urls = [];
let minUrls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
infoData:res.data,
imageList:urls,
minImageList:minUrls
})
//判断当前能否删除
if(res.data.checkState!=4 && res.data.createUser==that.data.loginName){
that.setData({
@ -83,12 +89,15 @@ Page({
res = res.data
if(res.code == 200 && res.data){
let urls = [];
let minUrls = [];
res.data.fileUrls.split(',').forEach(element => {
urls.push(element+'.min.jpg');
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
auditInfo:res.data,
auditImgs:urls
auditInfo:res.data,
auditImageList:urls,
auditMinImageList:minUrls
})
}
}
@ -127,17 +136,21 @@ Page({
}
})
},
//打开放大的图片
enlargeImage(e){
this.setData({
imgUrl:e.currentTarget.dataset.url,
imgShow:true
})
//展示图片
showImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
})
},
//关闭放大的图片
closeImages(){
this.setData({
imgShow:false
//展示图片
showAuditinfoImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.auditImageList,
current: that.data.auditImageList[e.currentTarget.dataset.index]
})
},

View File

@ -10,8 +10,10 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">隐患图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{imgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>
@ -92,8 +94,10 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">整改后图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{auditImgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{auditMinImageList}}" wx:key="index">
<image bindtap='showAuditinfoImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>

View File

@ -1 +1,23 @@
/* pageage/project_checking/info/index.wxss */
/* pageage/project_checking/info/index.wxss */
.in-img-max:after{
display:block;
clear:both;
content:"";
visibility:hidden;
height:0
}
.in-img-max{
width: auto;
zoom:1
}
.in-img-div{
position: relative;
margin: 0 8px 8px 0;
float: left;
}
.in-img-div image{
width: 180rpx;
height: 180rpx;
border-radius: 15rpx;
position: relative;
}

View File

@ -18,7 +18,8 @@ Page({
activeState:"dzg",
dzgCount:0,
yclCount:0,
zgcsCOunt:0
zgcsCOunt:0,
request:app.globalData.reqUrl
},
onClose(){

View File

@ -26,7 +26,7 @@
<view wx:if="{{item.checkState==1}}" class="code_label code_label_blueviolet">待复检</view>
<view wx:if="{{item.checkState==3}}" class="code_label code_label_red">复检驳回</view>
<view wx:if="{{item.checkState==4}}" class="code_label code_label_green">整改完成</view>
<van-image width="120rpx" height="120rpx" fit="cover" src="{{item.marksPicture+'.min.jpg'}}"/>
<van-image width="120rpx" height="120rpx" fit="cover" src="{{request+item.marksPicture+'.min.jpg'}}"/>
</view>
<view class="inspect_list_info_data">
<view class="inspect_list_info_data_prop">隐患类型:<text>{{item.dangerTypeName}}</text></view>

View File

@ -7,16 +7,17 @@ Page({
*/
data: {
id:"",
infoData:{},
imgs:[],
infoData:{},
loadShow:false,
auditInfo:{},
auditImgs:[],
opinion:"",
imageInfoData:[],
loadShow:false,
loginName:"",
status:"0"
status:"0",
imageList:[],
minImageList:[],
request:app.globalData.reqUrl
},
/**
@ -56,12 +57,15 @@ Page({
res = res.data
if(res.code == 200){
let urls = [];
let minUrls = [];
res.data.smarkUrl.split(',').forEach(element => {
urls.push(element+'.min.jpg');
urls.push(that.data.request+element);
minUrls.push(that.data.request+element+'.min.jpg');
});
that.setData({
infoData:res.data,
imgs:urls,
imageList:urls,
minImageList:minUrls,
loadShow:false
})
}
@ -206,6 +210,15 @@ Page({
})
},
//展示图片
showImg:function(e){
var that=this;
wx.previewImage({
urls: that.data.imageList,
current: that.data.imageList[e.currentTarget.dataset.index]
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -9,8 +9,10 @@
<view class="inspect_overview_list">
<van-row>
<van-col span="6"><text class="color_purple">隐患图片</text></van-col>
<view class="problem_list_info_con">
<van-uploader file-list="{{imgs}}" show-upload="{{fales}}" deletable="{{fales}}"/>
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:for="{{minImageList}}" wx:key="index">
<image bindtap='showImg' data-index="{{index}}" src='{{item}}'></image>
</view>
</view>
</van-row>
</view>

View File

@ -1 +1,23 @@
/* pageage/project_checking/info/index.wxss */
/* pageage/project_checking/info/index.wxss */
.in-img-max:after{
display:block;
clear:both;
content:"";
visibility:hidden;
height:0
}
.in-img-max{
width: auto;
zoom:1
}
.in-img-div{
position: relative;
margin: 0 8px 8px 0;
float: left;
}
.in-img-div image{
width: 180rpx;
height: 180rpx;
border-radius: 15rpx;
position: relative;
}

View File

@ -1,87 +0,0 @@
// pages/Personnel-information-binding/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
//扫码学习
affirmLearn(){
wx.scanCode({
onlyFromCamera:false,
scanType:['qrCode'],
async success(res){
let {result} = res
//截取参数
let subStrUrl = result.substr(result.indexOf("?"),result.length-1)
wx.navigateTo({
url: '../saft-qr-view/index'+subStrUrl,
})
}
})
},
//退出
back(){
wx.redirectTo({
url: '../gengduogongneng/gengduogongneng'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,4 +0,0 @@
{
"usingComponents": {},
"navigationBarTitleText": "劳务人员信息绑定"
}

View File

@ -1,21 +0,0 @@
<!-- 人员信息绑定 -->
<view style="display: flex;flex-direction: column;align-items: center;">
<!-- 头部部分 -->
<view class="information-header">
<view style="width:100rpx;height: 100rpx;">
<image src="http://fileimg.makalu.cc/WEB_CC881597B56F4DDCBDF1FC92DD7C1B90.png" style="width: 100%;height: 100%;" mode=""/>
</view>
<view style="font-size: 36rpx;letter-spacing: 4rpx;width: 200rpx;height: 48rpx;margin-left: 40rpx;margin-top: -32rpx;">
绑定成功!
</view>
</view>
<!-- 底部部分 240+90-->
<view class="information-footer">
<view bindtap="affirmLearn" style="width: 408rpx;height: 88rpx;text-align: center;line-height: 88rpx;letter-spacing: 4rpx;border-radius: 80rpx;background-color: #523fa8;">
扫码确认安全学习
</view>
<view bindtap="back" style="font-size: 28rpx;letter-spacing: 4rpx;color: #848fce;">
退出
</view>
</view>
</view>

View File

@ -1,21 +0,0 @@
/* 人员信息绑定 */
/* 头部部分 */
.information-header{
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
width: 220rpx;
height: 220rpx;
margin-top:192rpx;
margin-bottom: 172rpx;
}
/* 底部部分 */
.information-footer{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
width: 480rpx;
height: 180rpx;
}

View File

@ -1,223 +1,20 @@
// pages/Standard-maintenance-room-monitoring/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
projectId:'',
startTime:"",
endTime:"",
startTime2:"",
endTime2:"",
deviceNo:"010840009F",
jianceList: [{ text: '010840009F', id: 0 }],
indexNum: 0,
value:'本月',
value1:'本月',
actions: [{ name: '本月',id:0 }, { name: '累计', id:1},],
actions1: [{ name: '本月',id:0 }, { name: '累计', id:1},],
biaoyangList: [
{ name: '温度趋势', biaoyangX: [], biaoyangY: [] },
{ name: '最小标准温度', biaoyangX: [], biaoyangY: [] },
{ name: '最大标准温度', biaoyangX: [], biaoyangY: [] }
],
indexNum2: 0,
biaoyangList2: [
{ name: '湿度趋势', biaoyangX: [], biaoyangY: [] },
{ name: '标准湿度', biaoyangX: [], biaoyangY: [] },
],
},
onClick(){
this.setData({
show1:true
})
},
onClick1(){
this.setData({
show2:true
})
},
onClose(){
this.setData({
show:false,
show1:false,
show2:false
})
},
showPopup() {
this.setData({ show: true });
},
goGCLB:function(){
wx.redirectTo({
url: '../../pages/Quality-Assurance/index'
})
},
// 点击进行超耗tab切换
onSelect(e) {
// console.log(e);
// console.log(e.detail.id);
if(e.detail.id ==0){
this.setData({
startTime:this.getDate(-6,1),
endTime:this.getDate(0,2),
})
}else{
this.setData({
startTime:this.getDate(-29,1),
endTime:this.getDate(0,2),
})
}
this.setData({
indexNum: e.detail.id,
})
this.runList();
},
onSelect1(e) {
if(e.detail.id ==0){
this.setData({
startTime2:this.getDate(-6,1),
endTime2:this.getDate(0,2),
})
}else{
this.setData({
startTime2:this.getDate(-29,1),
endTime2:this.getDate(0,2),
})
}
this.setData({
indexNum2: e.detail.id,
})
this.runList2();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success:res=>{
this.setData({
loginName:res.data.loginName,
userName:res.data.userName,
projectId:app.globalData.projectId,
projectNameArgs:app.globalData.projectName,
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
})
this.getProjectCorrespondence(app.globalData.projectId)
}
})
this.setData({
startTime:this.getDate(-6,1),
endTime:this.getDate(0,2),
startTime2:this.getDate(-6,1),
endTime2:this.getDate(0,2),
})
this.getProjectCorrespondence();
},
getDate(num,type){
var date = new Date(new Date().getTime()+num*24*60*60*1000);
var year = date.getFullYear();
var month = (date.getMonth()+1) > 9 ? (date.getMonth()+1):'0'+(date.getMonth()+1)
var day = date.getDate() > 9 ? date.getDate():'0'+date.getDate()
return year+"-"+month+"-"+day+(type==1?" 00:00:00":" 23:59:59");
},
/**
* 项目对应关系
*/
getProjectCorrespondence() {
var that = this;
wx.request({
url: app.globalData.reqUrl + '/weixin/training/getProjectCorrespondence',
data: {
"projectId": 3//app.globalData.projectId,
},
method: "get",
success: function (res) {
that.setData({
projectId :res.data.szh
})
that.runList();
that.runList2();
}
})
},
runList() {
var that = this;
console.log(that.data)
wx.request({
url: app.globalData.szhUrl + '/api/iot/markingroom/runList',
data: {
"projectId": that.data.projectId,
"startTime": that.data.startTime,
"endTime": that.data.endTime,
"deviceNo": that.data.deviceNo
},
method: "get",
success: function (res) {
console.log(res.data);
var data = {}
data.lineData = []
data.color = ['#008ffd', '#f6d023', '#5af9fd']
data.legend = ['温度趋势', '最小标准温度', '最大标准温度']
data.unit = '℃'
data.date = []
var data1 = []
var data2 = []
var data3 = []
var biaoyangList = that.data.biaoyangList;
for (let row of res.data.rows) {
data.date.push(row.createTime.substr(0, 14) + "00");
data1.push(18)
data2.push(row.temperature)
data3.push(22)
}
data.lineData.push(data1)
data.lineData.push(data2)
data.lineData.push(data3)
that.setData({
biaoyangList: data,
})
}
})
},
runList2() {
var that = this;
wx.request({
url: app.globalData.szhUrl + '/api/iot/markingroom/runList',
data: {
"projectId": that.data.projectId,
"startTime": that.data.startTime2,
"endTime": that.data.endTime2,
"deviceNo": that.data.deviceNo
},
method: "get",
success: function (res) {
var data = {}
data.lineData = []
data.color = ['#008ffd', '#f6d023']
data.legend = ['湿度趋势', '标准湿度']
data.unit = '%RH'
data.date = []
var data1 = []
var data2 = []
var biaoyangList2 = that.data.biaoyangList2;
for (let row of res.data.rows) {
data.date.push(row.createTime.substr(0, 14) + "00");
data1.push(row.humidity)
data2.push(95)
}
data.lineData.push(data1)
data.lineData.push(data2)
that.setData({
biaoyangList2: data
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -1,6 +0,0 @@
{
"usingComponents": {
"van-action-sheet": "@vant/weapp/action-sheet"
},
"navigationBarTitleText": "标养室监测"
}

View File

@ -1,91 +1,2 @@
<!--pages/Standard-maintenance-room-monitoring/index.wxml-->
<!-- 标养室监测 -->
<!-- <view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="3">
<view class="header_img" bindtap="showPopup"><image src="/images/core.png"></image></view>
</van-col>
<van-col span="4">
<view class="header_img" bindtap="goGCLB">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view>
</van-col>
<van-col span="10">
<view class="header_name">标养室监测</view>
</van-col>
</van-row>
</view>
</view> -->
<!-- <van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onClose" >
<view class="left_max">
<van-row class="demo clearfix">
<van-col span="10">
<view class="left_head"><image src="http://fileimg.makalu.cc/szgl/9015e824c5004e629049c4f72967cfdc.png"></image></view>
</van-col>
<van-col span="14">
<view class="left_info">
<view class="left_info_name">{{userName}}</view>
<view class="left_info_name">{{loginName}}</view>
</view>
</van-col>
</van-row>
</view>
</van-popup> -->
<view class="jiance" style="padding-top: 30rpx;">
<!-- nav头部分 -->
<view class="nav-jiance" style="margin-bottom: 60rpx;">
<voucher-select background="#2b345b" columns="{{jianceList}}" placeholder="010840009F"></voucher-select>
</view>
<!-- 监测内容 -->
<view class="jiance-content">
<!-- 头部 -->
<view class="header-cailiao">
<!-- 头部左边 -->
<view class="eharts_title">
温度趋势
</view>
<!-- 头部右边 -->
<!-- <view class="header-cailiao-right">
<view class="{{indexNum==0?'header-cailiao-right-left active':'header-cailiao-right-left'}}" data-set="{{0}}" bindtap="onClick">
近七天
</view>
<view class="{{indexNum==1?'header-cailiao-right-right active':'header-cailiao-right-right'}}" data-set="{{1}}" bindtap="onClick">
近30天
</view>
</view> -->
<text class="hj_float" bindtap="onClick" style="margin-left: 256rpx;">{{value}} </text>
<van-action-sheet show="{{ show1 }}" actions="{{ actions }}" bind:close="onClose" bind:select="onSelect" />
</view>
<!-- 数据图展示 -->
<view class="jiance-echarts">
<curve-echarts-copy chart-id="chartData" chart-data="{{biaoyangList}}" title="单位:℃"></curve-echarts-copy>
</view>
</view>
<!-- 监测内容 -->
<view class="jiance-content">
<!-- 头部 -->
<view class="header-cailiao">
<!-- 头部左边 -->
<view class="eharts_title">
湿度趋势
</view>
<!-- 头部右边 -->
<!-- <view class="header-cailiao-right">
<view class="{{indexNum2==0?'header-cailiao-right-left active':'header-cailiao-right-left'}}" data-set="{{0}}" bindtap="onClick1">
近七天
</view>
<view class="{{indexNum2==1?'header-cailiao-right-right active':'header-cailiao-right-right'}}" data-set="{{1}}" bindtap="onClick1">
近30天
</view>
</view> -->
<text class="hj_float" bindtap="onClick1" style="margin-left: 256rpx;">{{value1}} </text>
<van-action-sheet show="{{ show2 }}" actions="{{ actions1 }}" bind:close="onClose" bind:select="onSelect1" />
</view>
<!-- 数据图展示 -->
<view class="jiance-echarts">
<curve-echarts-copy chart-id="chartData" chart-data="{{biaoyangList2}}" title="单位:%RH"></curve-echarts-copy>
</view>
</view>
</view>
<text>pages/Standard-maintenance-room-monitoring/index.wxml</text>

View File

@ -1,89 +0,0 @@
/* pages/Standard-maintenance-room-monitoring/index.wxss */
/* 标养室监测 */
.jiance{
padding: 60rpx 40rpx 30rpx;
}
.hj_float{
float: right;
padding: 5rpx 50rpx 5rpx 20rpx;
background: #2e355f url("http://fileimg.makalu.cc/CORE_5F23F4664AAE44A0BD72BE4BB4C66083.png") no-repeat right/35rpx;
border-radius: 40rpx;
}
.hj_float:active{
background: #2e355f url("http://fileimg.makalu.cc/CORE_5F23F4664AAE44A0BD72BE4BB4C66083.png") no-repeat right/35rpx;
}
.van-popup--bottom.van-popup--round{
border-radius: 0 !important
}
.van-popup{
background-color: var(--popup-background-color,#232a44) !important
}
.van-action-sheet__cancel,.van-action-sheet__item{
background-color: var(--popup-background-color,#232a44) !important;
color: #0ad7ec;
}
/* 监测-nav */
.nav-jiance{
width: 100%;
height: 90rpx;
}
.jiance-content{
width: 100%;
border: 1px solid #1e2336;
background-color: #1e2336;
padding-top: 20rpx;
margin-bottom: 40rpx;
font-size: 26rpx;
}
.header-cailiao{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40rpx;
}
.eharts_title{
height: 40rpx;
line-height: 40rpx;
padding-left: 50rpx;
margin-left: 20rpx;
background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx;
}
.header-cailiao-right{
display: flex;
justify-content: center;
align-items: center;
width: 300rpx;
height: 80rpx;
font-size: 24rpx;
color: rgb(155, 154, 154);
}
.header-cailiao-right-left{
width: 120rpx;
height: 46rpx;
line-height: 46rpx;
text-align: center;
border-top-left-radius: 36rpx;
border-bottom-left-radius: 36rpx;
border: 1px solid #2e355f;
}
.header-cailiao-right-right{
width: 120rpx;
height: 46rpx;
line-height: 46rpx;
text-align: center;
border-top-right-radius: 36rpx;
border-bottom-right-radius: 36rpx;
border: 1px solid #2e355f;
}
.active{
color: #fff;
background-color: #2e355f;
}
/* 展示数据echarts图 */
.jiance-echarts{
width: 100%;
/* height: 600rpx; */
box-sizing: border-box;
padding: 30rpx;
}

View File

@ -1,50 +1,19 @@
// pages/newAddPage/letterCommitment/index.js
const app = getApp()
// pages/newAddPage2/letterCommitment/index.js
Page({
/**
* 页面的初始数据
*/
data: {
safetyQualityRich:'<p style="line-height: 1.5;"><br></p><h4 style="text-align: center; line-height: 1.5;"></h4><h4 style="text-align: center; line-height: 1.5;">安全质量承诺书</h4><p style="line-height: 1.5;"> </p><p style="text-indent: 2em; line-height: 1.5;">为了个人的安全健康,为了家庭的幸福美满,为了企业的稳定发展,本人在工作中,自愿签订并遵守以下承诺:</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">忠诚企业、恪尽职守、珍爱生命、铸造精品!</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">我坚决做到:遵守规章制度、遵守操作规程、遵守劳动纪律,不出事故、不出次品、不留隐患!我将以实际行动,确保企业生产安全、产品优质!”</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">对于以上承诺,本人自觉遵守,如有违反,本人愿承担责任。 </p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">本承诺书自签字日起生效。 </p><p style="text-indent: 36pt; line-height: 1.5;"><br></p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;承诺人(签字)</p><p style="line-height: 1.5;"><br></p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;岗 位(工种)</p><p style="line-height: 1.5;"><br></p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;日 &nbsp;期: &nbsp; &nbsp;年 &nbsp; &nbsp;月 &nbsp; &nbsp;日 </p><p><br></p>',
healthRich:'<p style="line-height: 1.5;"><br></p><h4 style="text-align: center; line-height: 1.5;">健康承诺书</h4><p style="line-height: 1.5;"> </p><p style="text-indent: 2em; line-height: 1.5;">本人:<u> &nbsp; &nbsp; &nbsp; &nbsp;</u>,性别:<u> &nbsp; &nbsp;</u>,年龄: <u> &nbsp; &nbsp;</u>岁、身份证号码:<u> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </u>,从事岗位:<u> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </u>,无 □ / 有 □ 高血压、心脏病等基础身体健康问题;无 □ / 有 □ 严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆,能够胜任本岗位相应工作,我向公司承诺以上所述信息无隐瞒、无虚报,如有隐瞒造成所有后果由本人承担,于项目无关。</p><p style="line-height: 1.5;"> </p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;承诺人(按手印):</p><p style="line-height: 1.5;"><br></p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;承诺日期: &nbsp; &nbsp;年 &nbsp; 月 &nbsp; 日</p><p style="line-height: 1.5;"><br></p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;日 &nbsp;期: &nbsp; &nbsp;年 &nbsp; &nbsp;月 &nbsp; &nbsp;日 </p><p><br></p>',
workerRich:'<p style="text-indent: 2em; line-height: 1.5;"><br></p><h1 style="text-indent: 2em; text-align: center; line-height: 1.5;"></h1><h4 style="text-align: center; line-height: 1.5;">作业工人安全生产责任书</h4><p style="line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">(一)作业工人对自己施工中的安全负责。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">(二)作业工人应严格执行劳动纪律和现场安全生产管理制度,严格执行安全操作规程和安全技术交底,做到“四不伤害”即:我不伤害自己,我不伤害别人,我不被别人伤害。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">(三)拒绝强令冒险作业。发现隐患及防护设施缺陷应及时向安全管理人员报告。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">(四)正确使用和穿戴安全防护用品,自觉维护现场安全防护设施,未经批准不得随意移动拆除防护设施。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">(五)发生事故应及时报告现场管理人员,并在项目负责人的指挥下积极配合施救。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">(六)严格遵守本单位的安全生产规章制度和操作规程,服从管理,正确佩戴和使用劳动防护用品。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">(七)接受安全生产教育和培训,掌握本职工作所需的安全生产知识,提高安全生产技能,增强事故预防和应急处理能力。从业人员发现事故隐患或者其他不安全因素,应当立即向现场安全生产管理人员或者本单位负责人报告;接到报告的人员应当及时予以处理。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;承诺人(按手印):</p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;承诺日期: &nbsp; &nbsp;年 &nbsp; 月 &nbsp; 日</p><p><br></p>',
protectiveEquipmentRich:'<p style="text-align: center; line-height: 1.5;"><br></p><h4 style="text-align: center; line-height: 1.5;"><strong>安全防护用品使用图解</strong></h4><h3 style="text-align: center; line-height: 1.5;"> </h3><p style="text-align: center; line-height: 1.5;">进入施工现场必须根据要求按照下图要求佩戴好相应安全防护用品。</p><p style="text-indent: 2em; text-align: center; line-height: 1.5;"><br></p><p style="text-align: center; line-height: 1.5;"><br></p><p style="text-align: center; line-height: 1.5;"><img src="http://fileimg.makalu.cc/WEB_33F25A7600DB4909A0B9B6098CB19054.png" style="width:90%;"/></p><p style="text-align: center; line-height: 1.5;"><br></p><p style="text-align: center; line-height: 1.5;">本人已经掌握安全防护用品佩戴方法,并严格遵守!</p><p style="text-align: center; line-height: 1.5;"><br></p><p style="text-align: left; line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;签字:</p><p style="text-align: left; line-height: 1.5;"><br></p><p style="text-align: left; line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;日期: &nbsp; &nbsp; &nbsp; 年 &nbsp; &nbsp; 月 &nbsp; &nbsp; &nbsp;日 &nbsp; &nbsp; &nbsp; </p><p style="text-align: left; line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; </p>',
workerPostRich:'<p style="text-indent: 2em; text-align: left; line-height: 1.5;"><br></p><p style="text-align: center; line-height: 1.5;"><strong>作业人员岗位告知书</strong></p><p style="text-indent: 2em; text-align: left; line-height: 1.5;"> </p><p style="text-indent: 2em; text-align: left; line-height: 1.5;"> &nbsp;你将从事的普工作业,存在着车辆伤害、机械伤害、坠落、物体打击、触电等岗位危险,予以告知。你在作业时务必遵守相关的规章制度、专项工程安全施工方案、安全技术措施,并熟记作业要点及其特性,掌握好相应的安全防范技能;进入作业场所后,要进行重新检查,发现异常情况和不安全因素必须及时采取有效措施排除;要正确使用和佩戴劳动保护用品,在做好自我防范的同时,还要认真贯彻联保互保。同时对以下针对性措施必须经常对照执行:</p><p style="text-indent: 2em; text-align: left; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">1、在道路上工作时密切注意来往车辆做到“一看二停三通过”不抢一分一秒保证自己不被车辆伤害。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">2、从事开挖作业时先观察好周边情况和环境在最坏的情况能够不伤及自身和他人的情况下再作业。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">3、从事搬运石块等工作时要严格注意身边的人在呼喊并应答、引起对方注意并退让到安全地带后才可以工作。同时要积极注意自身安全不搬运过重的石块经常检查铁锹、榔头、扁担等工具一有损坏立即更换或修复。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">4、在电力线底下、光缆附近施工时必须严格按照安全技术交底时刻提高警惕保护好电力电线、国防光缆。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">5、严禁在河流、池塘等地游泳、洗澡由此引发的后果由你承担。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">6、做好防火、防盗工作保护好自己的财物。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">7、工作时必须佩戴好劳动防护用品带好安全帽并系好下额带。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">8、密切注意工程施工机械在挖掘机、压路机、推土机等机械附近施工时必须面向机械并及时避让确保安全。严禁在压路机等机械下休息严禁在施工现场打闹、追逐。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="text-indent: 2em; line-height: 1.5;">9、工作时听从班组长统一指挥严格遵守劳动纪律、三级安全教育及安全交底内容。</p><p style="text-indent: 2em; line-height: 1.5;"><br></p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;被告知者签字(指印)</p><p style="line-height: 1.5;"><br></p><p style="line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 日期: &nbsp; &nbsp; &nbsp;年 &nbsp; &nbsp; &nbsp;月 &nbsp; &nbsp; &nbsp;日</p><p style="text-indent: 2em; text-align: left; line-height: 1.5;"> &nbsp; &nbsp; &nbsp; &nbsp; </p>',
show:true,
radio1:'',
radio2:'',
token: '',
main_id:''
},
onChange1(event) {
this.setData({
radio1: event.detail,
});
},
onChange2(event) {
this.setData({
radio2: event.detail,
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getQiniupToken();
},
/**
* 重置
*/
reset(){
this.setData({
radio1:'',
radio2:''
})
},
},
/**
* 生命周期函数--监听页面初次渲染完成
@ -93,118 +62,5 @@ Page({
*/
onShareAppMessage() {
},
/**
* 获取七牛云token
*/
getQiniupToken() {
var that = this
wx.request({
url: app.globalData.szhUrl+'/mkl/api/getToken',
method:"GET",
success:function(res){
that.setData({
token: res.data,
});
}
})
},
/**
* 提交签名信息并生成承诺书
*/
submit(){
var that = this
if(this.data.radio1 == ''){
app.toast("请选择是否有高血压、心脏病等基础身体健康问题");
return;
}
if(this.data.radio2 == ''){
app.toast("请选择是否有严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆");
return;
}
wx.showLoading({
title: '正在提交。。。',
mask: true,
})
var that = this
wx.request({
header: {
'content-type': 'application/x-www-form-urlencoded'
},
url:app.globalData.szhUrl+'/mkl/api/generateSafetyLetterOfCommitment2',
data:{
"openId": wx.getStorageSync('openId'),
"idCardNo": wx.getStorageSync('cardId'),
"radio1":this.data.radio1,
"radio2":this.data.radio2,
"mainId":wx.getStorageSync("options").id,
"signImgUrl":wx.getStorageSync('signUrl'),
"type":1
},
method:"POST",
success:function(res){
if(res.data.code == '200'){
that.setData({
show:false
})
wx.hideLoading({});
app.toast("提交成功!");
wx.request({
url:app.globalData.smzUrl+'/mkl/api/updatePersonInfo',
data:{
"openId": wx.getStorageSync('openId'),
"idCardNo": wx.getStorageSync('cardId'),
"signImgUrl":wx.getStorageSync('signUrl'),
"projectId":wx.getStorageSync('smzprojectId'),
"pdfUrl":res.data.data
},
method:"POST",
success:function(res){
setTimeout(()=>{
wx.navigateTo({
url: '../../winter-training/index?mainId='+wx.getStorageSync('options').id+'&szhprojectId='+wx.getStorageSync('options').projectId+'&cultivateType='+wx.getStorageSync('options').cultivateTypeId+'&cardId='+wx.getStorageSync('cardId')+"&userName="+wx.getStorageSync('answerName')+"&companyName="+wx.getStorageSync('companyName')+"&typeWordName="+wx.getStorageSync('typeWordName')+"&signUrl="+wx.getStorageSync('signUrl')
})
},2000)
return;
}
})
}else{
app.toast(res.data.msg);
return;
}
}
})
},
/**
* 上传图片
*/
uploadToQiniu(url) { //图片直接上传到七牛云,获取七牛云链接
var that = this;
wx.uploadFile({
url: 'https://upload.qiniup.com',
name: 'file',
filePath: url,
header: {
"Content-Type": "multipart/form-data"
},
formData: {
token: that.data.token,
},
success: function (res) {
let data = JSON.parse(res.data);
that.setData({
signImgUrl: 'https://fileimg.makalu.cc/' + data.key
})
},
fail: function (res) {
console.log(res)
}
});
},
}
})

View File

@ -1,4 +0,0 @@
{
"usingComponents": {},
"navigationBarTitleText": "承诺书签名"
}

View File

@ -1,251 +1,2 @@
<!--pages/newAddPage/letterCommitment/index.wxml-->
<view>
<view class="cns_rich_content">
<view class="cns_rich_text">
<rich-text nodes="{{safetyQualityRich}}" space="nbsp" user-select="true"></rich-text>
</view>
</view>
<view class="cns_rich_content">
<view class="cns_rich_text">
<rich-text nodes="{{healthRich}}" space="nbsp" user-select="true"></rich-text>
</view>
</view>
<view class="cns_rich_content">
<view class="cns_rich_text">
<rich-text nodes="{{workerRich}}" space="nbsp" user-select="true"></rich-text>
</view>
</view>
<view class="cns_rich_content">
<view class="cns_rich_text">
<rich-text nodes="{{protectiveEquipmentRich}}" space="nbsp" user-select="true"></rich-text>
</view>
</view>
<view class="cns_rich_content">
<view class="cns_rich_text">
<rich-text nodes="{{workerPostRich}}" space="nbsp" user-select="true"></rich-text>
</view>
</view>
<!-- 表格填充 -->
<view class="cns_rich_content" >
<view class="cns_rich_text">
<view style="text-align:center;">三级安全教育登记表</view>
<view style="text-align: left;">工程名称:</view>
<view style="border: 1px solid #fff;position: relative;" >
<!-- 身份证复印件 -->
<view class="identity">
身份证复印件粘贴处
</view>
<view class="oneBox-style">
<view class="tableStyle" >
<view class="leftBox">姓名</view>
<input type="text" class="rightBox"/>
</view>
<!-- <view class="tableStyle">
<view class="leftBox" >文化程度</view>
<input type="text" class="rightBox"/>
</view> -->
<!-- <view class="">身份证复印件粘贴处</view> -->
</view>
<view class="oneBox-style">
<!-- <view class="tableStyle" >
<view class="leftBox">姓名</view>
<input type="text" class="rightBox"/>
</view> -->
<view class="tableStyle">
<view class="leftBox" >文化程度</view>
<input type="text" class="rightBox"/>
</view>
<!-- <view class="">身份证复印件粘贴处</view> -->
</view>
<view class="oneBox-style">
<view class="tableStyle" >
<view class="leftBox">班组</view>
<input type="text" class="rightBox"/>
</view>
<!-- <view class="">身份证复印件粘贴处</view> -->
</view>
<view class="oneBox-style">
<view class="tableStyle" >
<view class="leftBox">入场日期</view>
<input type="text" class="rightBox"/>
</view>
<!-- <view class="">身份证复印件粘贴处</view> -->
</view>
<view class="oneBox-style">
<view class="tableStyle" >
<view class="leftBox">工作卡号</view>
<input type="text" class="rightBox"/>
</view>
<!-- <view class="">身份证复印件粘贴处</view> -->
</view>
<view class="oneBox-style">
<view class="tableStyle" >
<view class="leftBox" style="width:100%">三级安全教育内容</view>
</view>
<!-- <view class="">身份证复印件粘贴处</view> -->
</view>
<!-- 公司教育 -->
<view class="gongsi-action">
<view class="gongsi-jiaoyu">
公司教育
</view>
<view class="gongsi-content">
<view> 进行安全基本知识、法规、法制教育,主要内容是:</view>
<view>1、党和国家的安全生产方针、政策</view>
<view>2、安全生产法规、标准和安全知识</view>
<view>3、企业安全生产规章制度、安全纪律</view>
<view>4、安全生产形势及重大事故安全教训</view>
<view>5、安全生产事故后如何抢救伤员、排险、保护现场和及时进行报告</view>
</view>
<view class="jiaoyuBox">
<view class="top-jiaoyu">
<view class="top-jiaoyutext">
教育人签字:
</view>
<view class="top-jiaoyutext">
受教育人签名:
</view>
</view>
<view>
累计培训()小时
</view>
</view>
</view>
<!-- 项目部教育 -->
<view class="gongsi-action">
<view class="gongsi-jiaoyu">
公司教育
</view>
<view class="gongsi-content">
<view> 进行安全基本知识、法规、法制教育,主要内容是:</view>
<view>1、党和国家的安全生产方针、政策</view>
<view>2、安全生产法规、标准和安全知识</view>
<view>3、企业安全生产规章制度、安全纪律</view>
<view>4、安全生产形势及重大事故安全教训</view>
<view>5、安全生产事故后如何抢救伤员、排险、保护现场和及时进行报告</view>
</view>
<view class="jiaoyuBox">
<view class="top-jiaoyu">
<view class="top-jiaoyutext">
教育人签字:
</view>
<view class="top-jiaoyutext">
受教育人签名:
</view>
</view>
<view>
累计培训()小时
</view>
</view>
</view>
<!-- <view>
<view >
项目部教育
</view>
<view >
进行现场规章制度和遵章守纪教育,主要内容是:
1、本项目施工特点、可能存在的不安全因素及必须遵守的事项
2、本单位(包括施工、生产现场)安全生产制度、规定和安全注意事项
3、本工种的安全技术操作规程
4、高处作业、机械设备、电气安全基础知识
5、防火、防毒、防尘、防爆知识及紧急情况安全处置和安全疏散知
6、雨季防雷、防台、防汛及特殊气候的相关安全知
7、防护用品发放标准及防护用品、用具使用的基本知识
8、学习JGJ146-2004建筑施工现场环境与卫生标准
</view>
<view style="vertical-align: top;">
教育人签字:
</view>
<view style="vertical-align: top;">
受教育人签名:
</view>
</view>
<view>
<view rowspan="2" class="center">
<view>班组教育</view>
</view>
<view rowspan="2" colspan="3">
进行本工种岗位安全操作及安全制度、纪律教育,主要内容是:
1、本班组作业特点及安全操作规程
2、本班组安全活动制度及纪律
3、正确使用安全防护装置(设施)及个人劳动防护用品
4、本岗位易发生事故的不安全因素及其防范对策本工种事故案例剖析
5、本岗位的作业环境及使用的机械设备、工具的安全要求
</view>
<view style="vertical-align: top;">
教育人签字:
</view>
<view style="vertical-align: top;">
受教育人签名:
</view>
</view> -->
<view class="gongsi-action">
<view class="gongsi-jiaoyu">
公司教育
</view>
<view class="gongsi-content">
<view> 进行现场规章制度和遵章守纪教育,主要内容是:</view>
<view>1、党和国家的安全生产方针、政策</view>
<view>2、安全生产法规、标准和安全知识</view>
<view>3、企业安全生产规章制度、安全纪律</view>
<view>4、安全生产形势及重大事故安全教训</view>
<view>5、安全生产事故后如何抢救伤员、排险、保护现场和及时进行报告</view>
</view>
<view class="jiaoyuBox">
<view class="top-jiaoyu">
<view class="top-jiaoyutext">
教育人签字:
</view>
<view class="top-jiaoyutext">
受教育人签名:
</view>
</view>
<view>
累计培训()小时
</view>
</view>
</view>
</view>
</view>
</view>
<view class="cns_confirm">
<view class="cns_confirm_text">
<view class="cns_confirm_text_title">1、高血压、心脏病等基础身体健康问题。</view>
<view>
<van-radio-group value="{{ radio1 }}" bind:change="onChange1"
direction="{{horizontal}}" style="display: flex; padding:20rpx 0">
<van-radio name="1" shape="square" custom-class="radio_custom_class" label-class="radio_label_class">无</van-radio>
<van-radio name="2" shape="square" custom-class="radio_custom_class" label-class="radio_label_class">有</van-radio>
</van-radio-group>
</view>
</view>
<view class="cns_confirm_text">
<view class="cns_confirm_text_title">2、严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆。</view>
<view>
<van-radio-group value="{{ radio2 }}" bind:change="onChange2"
direction="{{horizontal}}" style="display: flex; padding:20rpx 0">
<van-radio name="1" shape="square" custom-class="radio_custom_class" label-class="radio_label_class">无</van-radio>
<van-radio name="2" shape="square" custom-class="radio_custom_class" label-class="radio_label_class">有</van-radio>
</van-radio-group>
</view>
</view>
<!-- <view class="cns_confirm_text">
<view class="cns_confirm_text_title">3、签名</view>
<view class="cns_confirm_sign">
<sign bind:returnData="sign" canvas-id="canvas"></sign>
</view>
</view> -->
<view class="switch_button" wx:if="{{show}}">
<button class="switch_button_up" bindtap="reset">重置</button>
<button class="switch_button_to" bindtap="submit">提交</button>
</view>
</view>
</view>
<!--pages/newAddPage2/letterCommitment/index.wxml-->
<text>pages/newAddPage2/letterCommitment/index.wxml</text>

View File

@ -1,71 +0,0 @@
/* pages/newAddPage/letterCommitment/index.wxss */
.radio_custom_class{
padding: 10rpx 100rpx 10rpx 0;
}
.radio_label_class{
color: #ffffff !important;
}
.tableStyle{
display: flex;
justify-content: space-between;
align-items: center;
width: 50%;
}
.leftBox{
padding: 12rpx 30rpx;
border: 1px solid #fff;
width: 184rpx;
text-align: center;
}
.rightBox{
width: 110rpx;
padding: 10rpx;
/* box-sizing: border-box; */
border: 1px solid #fff;
}
.oneBox-style{
display: flex;
}
.identity{
position: absolute;
top: 0px;
right: 0px;
width: 50%;
height: 408rpx;
line-height: 408rpx;
text-align: center;
border: 1px solid #fff;
}
.gongsi-action{
display: flex;
align-items: center;
border: 1px solid #fff;
font-size: 10px;
}
.gongsi-jiaoyu{
writing-mode: vertical-lr;
-webkit-writing-mode: vertical-lr;
-ms-writing-mode: vertical-lr;
font-size: 12px;
}
.gongsi-content{
width: 60%;
border-left: 1px solid #fff;
border-right: 1px solid #fff;
}
.top-jiaoyu{
width: 100%;
display: flex;
justify-content: space-between;
}
.top-jiaoyutext{
font-size: 6px;
}
.jiaoyuBox{
width: 208rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
height: 228rpx;
}

View File

@ -1,670 +0,0 @@
// pages/newAddPage/safetyBriefingLearning/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
//所有三级安全教育视频
allVideo:{},
// 声明一个数组,里面放着要展示的视频链接
videoList:[],
formatanswer:'',
second:0,
// second_state:true,
timer:'',
index:0,
answer:false,
up:false,
down:false,
to:false,
questionsData:[],
//单独视频url
videoUrl:'',
videoObj:{},
//学习时长
learnTime:1,
watchTimer:'',
openId:'',
activeState:1,
//答案提示
answerTip:'',
//考试分数
fullScore:'',
examPaperId:'',
signUrl:'',
//控制视频时长
companyTimer:'',
companyTime:0,
projectTimer:'',
projectTime:0,
groupTimer:'',
groupTime:0,
//试题显示标识
paperFlag:false
},
trainingTypeJump(e){
var that = this
// this.onClickShow();
let index = e.currentTarget.dataset.index;
var videoList = []
let titleName = '';
switch(index) {
case '1':
titleName = '公司级';
videoList = that.data.allVideo.companyList
break;
case '2':
if(that.data.companyTime < 30) {
app.toast("温馨提示:当前视频学习完成后,方可进行下一个视频学习。");
return;
} else {
if( that.data.projectTime <30) {
var projectTimer = setInterval(() => {
var projectTime = that.data.projectTime;
if(projectTime >= 0 && projectTime <= 29){
this.setData({
projectTime:parseInt(projectTime) + 1,
projectTimer:projectTimer
})
}else{
clearInterval(this.data.projectTimer);
}
}, 1000);
}
}
titleName = '项目级';
videoList = that.data.allVideo.projectList
break;
case '3':
if(that.data.companyTime < 30 || that.data.projectTime < 30) {
app.toast("温馨提示:当前视频学习完成后,方可进行下一个视频学习。");
return;
} else {
if(that.data.groupTime < 30) {
var groupTimer = setInterval(() => {
var groupTime = that.data.groupTime;
if(groupTime >= 0 && groupTime <= 29){
this.setData({
groupTime:parseInt(groupTime) + 1,
groupTimer:groupTimer
})
console.log(that.data.groupTime);
}else{
clearInterval(this.data.groupTimer);
that.setData({
paperFlag:true
})
}
}, 1000);
}
}
titleName = '班组级';
videoList = that.data.allVideo.groupList
break;
default:
videoList = []
break
}
this.setData({
titleName:titleName,
activeState:index,
videoList:videoList,
pageNo:1,
type:1,
trainingType:index,
startDate:'',
endDate:'',
collaborateRanksId:''
});
// this.getTrainingList();
// this.getTrainingNumberOfPeopleCount();
},
//打开视频
bindplay_click(){
var timer = setInterval(() => {
var second = this.data.second
if(second == parseInt(this.data.videoObj.effectiveDuration)) {
// this.addUserRecord()
}
if(second > 0){
this.setData({
second:second - 1,
timer:timer
})
}
else{
clearInterval(this.data.timer);
this.setData({
second_state:false,
})
}
}, 1000);
var watchTimer = setInterval(() => {
var learnTime = this.data.learnTime;
if(learnTime >= 0){
this.setData({
learnTime:parseInt(learnTime) + 1,
watchTimer:watchTimer
})
}else{
clearInterval(this.data.watchTimer);
}
}, 1000);
},
//暂停视频
bindpause_click(){
if(this.data.second > 0){
clearInterval(this.data.timer);
}
if(this.data.learnTime > 0) {
clearInterval(this.data.watchTimer);
}
},
// 点击查看详情
chakanBtn(e){
var data = this.data.questionsData
var i = this.data.index
data[i].type=true
var tempList = data[i].answer_list
var str = ''
for(var j =0;j <tempList.length;j++) {
if(data[i].correct_answer == tempList[j].letter) {
str = tempList[j].answer;
break;
}
}
this.setData({
questionsData:data,
answerTip:str
})
},
//选择答案
chooseAnswer(e){
var data = this.data.questionsData
var i = this.data.index
var j = e.currentTarget.dataset.j
var item =e.currentTarget.dataset.item
if(data[i].topic_state == false){
data[i].type = true
for(var z = 0;z<data[i].answer_list.length;z++){
data[i].answer_list[z].answer_state = false
}
data[i].answer_list[j].answer_state = true
if(data[i].correct_answer == item.letter){
data[i].topic_state = true
if(i < data.length-1){
this.setData({
index:i+1
})
}
if(data.length == 1){
this.setData({
to:true,
})
}
}
var tempList = data[i].answer_list
var str = ''
for(var j =0;j <tempList.length;j++) {
if(data[i].correct_answer == tempList[j].letter) {
str = tempList[j].answer;
break;
}
}
this.setData({
questionsData:data,
answerTip:str
})
if(this.data.index > 0 ){
this.setData({
up:true,
})
if(this.data.questionsData.length - 1 == this.data.index && this.data.questionsData[this.data.index].topic_state == true){
this.setData({
to:true,
})
}
}
}
},
//点击上一题
onClickUp(){
var that = this
this.setData({
index:this.data.index - 1
})
if(that.data.index == 0){
that.setData({
up:false,
down:true
})
}else{
if(that.data.questionsData[that.data.index].topic_state == false){
that.setData({
up:true,
down:false,
to:false
})
}else{
that.setData({
up:true,
down:true,
to:false
})
}
}
var data = this.data.questionsData
var i = this.data.index
var tempList = data[i].answer_list
var str = ''
for(var j =0;j <tempList.length;j++) {
if(data[i].correct_answer == tempList[j].letter) {
str = tempList[j].answer;
break;
}
}
this.setData({
answerTip:str
})
},
//点击下一题
onClickDown(){
this.setData({
index:this.data.index + 1
})
if(this.data.index == this.data.questionsData.length-1 ){
if(this.data.questionsData[this.data.index].topic_state == false){
this.setData({
up:true,
down:false,
to:false
})
}else{
this.setData({
up:true,
down:false,
to:true
})
}
}else{
if(this.data.questionsData[this.data.index].topic_state == false){
this.setData({
up:true,
down:false,
to:false
})
}else{
this.setData({
up:true,
down:true,
to:false
})
}
}
var data = this.data.questionsData
var i = this.data.index
var tempList = data[i].answer_list
var str = ''
for(var j =0;j <tempList.length;j++) {
if(data[i].correct_answer == tempList[j].letter) {
str = tempList[j].answer;
break;
}
}
this.setData({
answerTip:str
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
var that = this;
that.setData({
openId:wx.getStorageSync('openId')
})
//获取扫码用户信息
that.getUserInfo()
//获取视频链接
that.getVideoURL(options.projectId,options.firstWorkType,options.secondWorkType)
//获取在线答题题目信息
that.getOnlineExamList(1,options.projectId,options.firstWorkType,options.secondWorkType);
var companyTimer = setInterval(() => {
var companyTime = this.data.companyTime;
if(companyTime >= 0 && companyTime <= 29){
this.setData({
companyTime:parseInt(companyTime) + 1,
companyTimer:companyTimer
})
console.log(this.data.companyTime)
}else{
console.log("公司计时结束")
clearInterval(this.data.companyTimer);
}
}, 1000);
// 拿取video盒子的宽高
/**
* 生命周期函数--监听页面加载
*/
// var that = this;
// var query = wx.createSelectorQuery(); //创建节点选择器
// //#box需要与wxml里面的id保持一致
// query.select('#myVideo').boundingClientRect(function (rect) {
// console.log('00000',rect);
// that.setData({
// myVideo: rect
// });
// }).exec();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady(){
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
/**
* 获取在线答题题目信息
* @param {*} questionType 题目类型1安全,2施工技艺
*/
getOnlineExamList(questionType,projectId,firstWorkType,secondWorkType){
var that = this
wx.request({
url: app.globalData.szhUrl+'/mkl/api/getOnlineExamList',
data:{
"questionType":questionType,
"projectId":projectId,
"firstWorkType":firstWorkType,
"secondWorkType":secondWorkType
},
method:"GET",
success:function(res){
if(res.data.length == 0) {
that.setData({
to:true
})
}
that.setData({
questionsData:res.data,
examPaperId:res.data[0].examPaperId == undefined ?null:res.data[0].examPaperId,
fullScore:res.data[0].totalScore== undefined ?null:res.data[0].totalScore
})
}
})
},
/**
* 提交答题记录
*/
onClickTo(){
var that = this
wx.request({
url: app.globalData.szhUrl+'/mkl/api/addOnlineExamLog',
data:{
"openId": wx.getStorageSync('openId'),
"idCardNo": wx.getStorageSync('cardId'),
"score":that.data.fullScore,
"fullScore":that.data.fullScore,
"examPaperId":that.data.examPaperId
},
method:"GET",
success:function(res){
if(res.data.code == '200'){
that.setData({ up:false });
that.setData({ down:false });
that.setData({ to:false });
//提交学习记录
that.addRecord()
wx.redirectTo({
url: '../letterCommitment/index'
})
}else{
app.toast(res.data.msg);
}
}
})
},
/**
* 确认学习
*/
addRecord() {
var that = this;
wx.request({
url: app.globalData.szhUrl + "/api/wei/gainWeiSanInfo",
method: "POST",
data: {
dept_id: 131,
project_id: wx.getStorageSync('szhprojectId'),
smz_project_id: wx.getStorageSync('smzprojectId'),
main_id: wx.getStorageSync('options').id,
cultivate_type: wx.getStorageSync('options').cultivateTypeId,
user_name: wx.getStorageSync('answerName'),
resident_id: wx.getStorageSync('cardId'),
result_str: "已通过",
score:that.data.fullScore,
total_score:that.data.fullScore,
exam_paper_id:that.data.examPaperId,
type:'1',
sign_url:that.data.signUrl,
randomScore:Math.floor(Math.random()*10)
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res) {
if (res.data.code == 200) {
console.log("添加学习记录成功")
}
}
})
},
/**
* 获取视频链接
*/
getVideoURL(projectId,firstWorkType,secondWorkType) {
var that = this
wx.request({
url: app.globalData.szhUrl+'/mkl/api/getOnlineVideoList',
data:{
fileType: 1,//视频
projectId:projectId,
firstWorkType:firstWorkType,
secondWorkType:secondWorkType
},
method:"GET",
success:function(res){
if(res.data.code == 0) {
that.setData({
allVideo:res.data.data
})
}
var videoList = []
switch(that.data.activeState ) {
case 1:
videoList = that.data.allVideo.companyList
break;
case 2:
videoList = that.data.allVideo.projectList
break;
case 3:
videoList = that.data.allVideo.groupList
break;
default:
videoList = []
break
}
that.setData({
videoList:videoList
})
that.checkUserFinishedFlag()
}
})
},
/**
* 添加用户学习记录
*/
addUserRecord() {
var that = this
var completeFlag = parseInt(that.data.learnTime) >= parseInt(that.data.videoObj.effectiveDuration == ""?0: that.data.videoObj.effectiveDuration)?1:0
wx.request({
url:app.globalData.szhUrl+'/mkl/api/addEducationRecord',
data:{
initialId:that.data.videoObj.id,
userId:wx.getStorageSync('idCardNo'),
openId:wx.getStorageSync('userOpenId'),
learningDuration:that.data.learnTime,
completeFlag:completeFlag
},
method:"POST",
success:function(res){
if(res.data.code == 0){
console.log("添加学习记录成功!")
}else{
console.log("添加学习记录失败!")
}
}
})
},
/**
* 获取用户学习时长
*/
getUserLearnTime() {
// this.addUserRecord()
this.onClickTo()
},
/**
* 查询用户是否学习
*/
checkUserFinishedFlag() {
var that = this
wx.request({
url:app.globalData.szhUrl+'/mkl/api/getUserFinishList',
data:{
initialId:parseInt(that.data.videoObj.id),
userId:wx.getStorageSync('idCardNo')
},
method:"POST",
success:function(res){
if(res.data.code == 0){
if(res.data.data.length >0) {
var obj = res.data.data[0];
if(obj.completeFlag == "1") {
that.setData({
second_state:false
})
}
}
}
}
})
},
//查询用户信息
getUserInfo() {
var that = this;
let openId = wx.getStorageSync('openId') != null || wx.getStorageSync('openId') ? wx.getStorageSync('openId') : "123"
wx.request({
url: app.globalData.szhUrl + "/business/saftEducationOpenIdMap/list",
method: "post",
data: {
openId
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res) {
let data = res.data
if(data.code == '0' && data.rows.length > 0){
let result = data.rows
that.setData({
signUrl:data.rows[0].signUrl == undefined ? '':data.rows[0].signUrl
})
wx.setStorageSync('signUrl', data.rows[0].signUrl)
}
}
})
}
})

View File

@ -1,7 +0,0 @@
{
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index"
},
"navigationBarTitleText": "施工安全交底学习"
}

View File

@ -1,102 +0,0 @@
<!--pages/newAddPage/safetyBriefingLearning/index.wxml-->
<view class="study_max">
<view class="study_min">
<view class="module_title">安全视频</view>
</view>
<view class="study_video" >
<!-- 在此添加一个tab栏切换 -->
<view class="modify_video_nav" style="margin-top: 64rpx;background-color: #191d28;">
<view class="{{activeState==1?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>公司级</text></view>
<view class="{{activeState==2?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>项目级</text></view>
<view class="{{activeState==3?'active':''}}" bindtap="trainingTypeJump" data-index="3"><text>班组级</text></view>
</view>
<view class="whoBox">
<view class="outsideBox showBoxs">
<!-- 最外边展示盒子 -->
<view class="showBox">
<!-- 左按钮 -->
<!-- <view class="leftBtn">
<image src="http://fileimg.makalu.cc/WEB_1CFE1E31022543CB934B01E8777B5907.png" mode="" style="width:100%;height:100%;"/>
</view> -->
<!-- 右按钮 -->
<!-- <view class="rightBtn">
<image src="http://fileimg.makalu.cc/WEB_1CFE1E31022543CB934B01E8777B5907.png" mode="" style="width:100%;height:100%;"/>
</view> -->
<swiper style="height: 450rpx;" indicator-dots duration='500' indicator-active-color='#fff'>
<swiper-item wx:for="{{videoList}}" wx:key="index">
<video id="myVideo" src="{{item.videoUrl}}" binderror="videoErrorCallback" show-center-play-btn='{{true}}' show-play-btn="{{true}}" bindplay="bindplay_click" bindpause="bindpause_click" bindended="getUserLearnTime" controls></video>
</swiper-item>
</swiper>
</view>
<view class="study_video_tips">
温馨提示:请观看视频后进行答题
</view>
<view wx:if="{{paperFlag}}">
<view class="study_min">
<view class="module_title">安全考试</view>
</view>
<view class="study_examination_questions">
<view class="study_examination_questions_con" style="position: relative;">
<view class="study_examination_questions_topic">{{questionsData[index].topic}}</view>
<view class="study_examination_questions_radio">
<view class="{{item.answer_state? (questionsData[index].correct_answer==item.letter?'study_examination_questions_list active':'study_examination_questions_list error'):'study_examination_questions_list'}}" wx:for="{{questionsData[index].answer_list}}" wx:for-index="j" wx:key="j" bindtap="chooseAnswer" data-j="{{j}}" data-item="{{item}}">
<view class="study_radio">
<van-icon name="success" />
</view>
<view class="study_radio_subject">{{item.answer}}</view>
</view>
</view>
<!-- 查看按钮 -->
<view class="chakan" wx:if="{{questionsData.length > 0 }}" data-set="{{index}}" bindtap="chakanBtn">
查看详情
</view>
</view>
<view class="answer_result" wx:if="{{questionsData[index].type}}">
答案:{{answerTip}}
<!-- 答案:{{ questionsData[index].answer_list.filter(item=>item.letter==questionsData[index].correct_answer)}} -->
</view>
<view class="switch_button">
<button class="switch_button_up" wx:if="{{up}}" bindtap="onClickUp">上一题</button>
<button class="switch_button_down" wx:if="{{down}}" bindtap="onClickDown">下一题</button>
<button class="switch_button_to" wx:if="{{to}}" bindtap="onClickTo">确认提交</button>
</view>
</view>
</view>
</view>
</view>
<!-- <van-tabs active="a" >
<van-tab title="公司级" name="a"></van-tab>
<van-tab title="项目级" name="b"></van-tab>
<van-tab title="班组级" name="c"></van-tab>
</van-tabs> -->
</view>
</view>

View File

@ -1,68 +0,0 @@
/* pages/newAddPage/safetyBriefingLearning/index.wxss */
.chakan{
position: absolute;
right: 48rpx;
bottom: 20rpx;
color: orange;
}
/* vant-weapp样式 */
.van-tabs__nav {
background-color: #191d28;
}
.van-ellipsis{
color: #fff;
}
.van-tabs__line{
background-color: #fff !important;
}
/* .showBox{
position: relative;
width: 750rpx;
height: 462rpx;
border: 1px solid red;
box-sizing: border-box;
z-index: 999;
}
.showBox:hover .leftBtn{
display: block;
}
.showBox:hover .rightBtn{
display: block;
}
.leftBtn{
position: absolute;
left: 0;
top:50%;
transform: translate(0,-50%);
width: 48rpx;
height: 80rpx;
color: #000;
border: 1px solid #fff;
z-index: 999;
display: none;
}
.rightBtn{
position: absolute;
right: 0;
top:50%;
transform: translate(0,-50%);
width: 48rpx;
height: 80rpx;
color: #000;
border: 1px solid #fff;
z-index: 999;
display: none;
} */
.whoBox{
position: relative;
}
.outsideBox{
position: absolute;
top: 0;
left: 0;
width: 100%;
display: none;
}
.showBoxs{
display: block;
}

View File

@ -1,395 +1,18 @@
const app = getApp()
// pages/saft-education-user-bind/index.js
Page({
/**
* 页面的初始数据
*/
data: {
loadShow:false,
phoneNumber:"",
cardId:"",
companyName:"",
typeWordName:"",
userName:"",
companyId:"",
typeWord:"",
manageSign:"",
educationLevelList:[],
educationLevel:'',
emergencyName:'',
emergencyPhone:'',
szhprojectId:"",
smzProjectId:"",
cultureLevel:'',
specialFlag:'',
sex:'',
idCardFront:'',
//验证方式(1手机号2身份证)
authentication:"1",
authenticationList:[
{
"id":"1",
"text":'手机号'
},
{
"id":"2",
"text":'身份证'
}
]
},
/**
*
* @param {*} e
*/
onSelectAuthentication(e) {
if(e.detail.id == "1") {
this.setData({
authentication: e.detail.id,
cardId:"",
phoneNumber:'',
companyName:'',
userName:'',
emergencyName:'',
emergencyPhone:'',
manageSign:"",
educationLevel:1,
cultureLevel:'小学'
})
} else {
this.setData({
authentication: e.detail.id,
cardId:'',
phoneNumber:'',
companyName:'',
userName:'',
emergencyName:'',
emergencyPhone:'',
manageSign:"",
educationLevel:1,
cultureLevel:'小学'
})
}
console.log(this.data.educationLevel)
},
/**
* 电话号码失去焦点
*/
inputPhoneNumber(e){
let {value} = e.detail
if(value >= 11){
this.getUserInfo(value,'')
}
},
/**
* 身份证号失去焦点
*/
inputCardId(e){
let {value} = e.detail
if(value.length >= 18){
this.getUserInfo('',value)
}
},
/**
* 文化程度变化
*/
onSelectEducationLevel(e) {
console.log(e)
this.setData({
educationLevel: e.detail.id,
})
},
/**
* 紧急联系人
*/
onEmergencyName(e) {
this.setData({
emergencyName: e.detail.value
})
},
/**
* 紧急联系人联系方式
*/
onEmergencyPhone(e) {
this.setData({
emergencyPhone: e.detail.value
})
},
/**
* 获取用户信息
*/
getUserInfo(phoneNumber ='',cardId = ''){
let {smzProjectId} = this.data
//获取当前扫码用户的openId
let openId = wx.getStorageSync('openId')
let that = this
this.setData({
loadShow:true
})
//获取用户在实名制用户信息
wx.request({
url: app.globalData.smzUrl+"/mkl/api/searchUserInfoList",
method:"POST",
data:{
projectId:smzProjectId,
isWork:1,
idcardnum:cardId,
userphone:phoneNumber
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res){
that.setData({
loadShow:false
})
if(res.data.state != 'fails'){
let userInfo = res.data.data
if(!userInfo){
app.toast("实名制系统查无此人,请确认系统录入或人员进场")
return;
}
userInfo = userInfo[0]
wx.request({
url: app.globalData.szhUrl + "/business/saftEducationOpenIdMap/wxList",
method:"post",
data:{
openId:openId
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(signTemp){
let qrUrl = signTemp.data.rows.length <= 0 ? "":signTemp.data.rows[0].qrUrl
let {name,userphone,idcardnum,teamid,uninName,worktypeid,workType,cultureLevel,specialFlag,sex,idcardimg} = userInfo
that.setData({
phoneNumber:userphone,
cardId:idcardnum,
companyName:uninName,
typeWordName:workType,
userName:name,
companyId:teamid,
typeWord:worktypeid,
manageSign:qrUrl,
cultureLevel:cultureLevel,
specialFlag:specialFlag,
sex:sex,
idCardFront:idcardimg
})
}
})
}else{
app.toast('实名制系统查无此人,请确认系统录入或人员进场')
// setTimeout(()=>{
// wx.redirectTo({
// url: '../gengduogongneng/gengduogongneng'
// })
// },2000)
return;
}
}
})
},
bindInfo(){
let that = this
if(that.data.authentication == "1") {
if(that.data.phoneNumber.length <= 0 || (that.data.manageSign.length <= 0 && that.data.manageSign !='')){
app.toast("数据填写不完整");
return;
}
} else {
if((that.data.manageSign.length <= 0 && that.data.manageSign !='') || that.data.cardId.length <=0){
app.toast("数据填写不完整");
return;
}
}
this.setData({
loadShow:true
})
//获取当前扫码用户的openId
let openId = wx.getStorageSync('openId')
wx.uploadFile({
//图片上传地址
url: app.globalData.reqUrl+'/weixin/security/fileUpload',
filePath: this.data.manageSign,
name: 'file',
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
formData: { user: 'test' },
success:resTemp => {
wx.request({
url: app.globalData.szhUrl + "/business/saftEducationOpenIdMap/list",
method:"post",
data:{
openId
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res){
let dataFile = JSON.parse(resTemp.data);
let data = res.data
let {szhprojectId,phoneNumber,cardId,companyName,typeWordName,userName,companyId,typeWord,id,educationLevel,emergencyName,emergencyPhone,specialFlag,idCardFront,sex} = that.data
phoneNumber = !phoneNumber ?'':phoneNumber
//判断用户是否变绑定劳务公司
if(data.code == '0' && data.rows.length > 0){
wx.request({
url: app.globalData.szhUrl + '/business/saftEducationOpenIdMap/edit',
method:"post",
data:{
id,
projectId:szhprojectId,
openId,
phoneNumber,
cardId,
companyName,
typeWordName,
userName,
companyId,
typeWord,
signUrl:dataFile.url,
educationLevel,
emergencyName,
emergencyPhone,
specialFlag,
idCardFront,
sex
},
success(res){
that.setData({
loadShow:false
})
var firstWorkType = ''
if(res.data.code == '0'){
wx.navigateTo({
url: '../Personnel-information-binding/index'
})
}
}
})
}else{
wx.request({
url: app.globalData.szhUrl + '/business/saftEducationOpenIdMap/add',
method:"post",
data:{
projectId:szhprojectId,
openId,
phoneNumber ,
cardId,
companyName,
typeWordName,
userName,
companyId,
typeWord,
signUrl:dataFile.url,
educationLevel,
emergencyName,
emergencyPhone,
specialFlag,
idCardFront,
sex
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res){
that.setData({
loadShow:false
})
if(res.data.code == '0'){
wx.navigateTo({
url: '../Personnel-information-binding/index'
})
}
}
})
}
}
})
}
})
},
resest(){
this.setData({
phoneNumber:"",
cardId:"",
companyName:"",
typeWordName:"",
userName:"",
companyId:"",
typeWord:"",
manageSign:"",
educationLevel:'1',
emergencyName:'',
emergencyPhone:''
})
this.getEducatuinLevelList()
data: {
},
/**
* 获取人员文化程度
*/
getEducatuinLevelList() {
var that = this
wx.request({
url: app.globalData.szhUrl + '/system/dict/data/listData',
method:"post",
data:{
dictType:"education_level"
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res){
var list = []
if(res.data.code == 0) {
if(res.data.rows.length > 0) {
var data = res.data.rows;
data.forEach(item => {
var obj = {}
obj.id = item.dictValue
obj.text = item.dictLabel
list.push(obj)
});
that.setData({
educationLevelList:list
})
} else {
that.setData({
educationLevelList:[]
})
}
} else {
that.setData({
educationLevelList:[]
})
}
console.log(that.data.educationLevelList)
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let {szhprojectId,smzProjectId} = options
this.setData({
szhprojectId,
smzProjectId
})
this.getEducatuinLevelList()
},
/**
@ -433,36 +56,11 @@ Page({
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
goGCLB(){
wx.redirectTo({
url: '../gengduogongneng/gengduogongneng'
})
},
/**
* 签名
* @param {} e
*/
sign(e){
let tempFilePath = e.detail
this.data.manageSign = tempFilePath
  },
changePage(e){
if(e.detail){
this.setData({
overflow:'aotu'
})
}else{
this.setData({
overflow:'hidden'
})
}
},
}
})

View File

@ -1,8 +0,0 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index" ,
"mkl-sign":"../components/sign/sign",
"voucher-select ":"../components/voucher-select"
},
"navigationStyle":"custom"
}

View File

@ -1,88 +1,2 @@
<!--pages/voucherManagementAddto/index.wxml-->
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="15">
<view class="header_img" bindtap="goGCLB">
<image src="/images/left.png"></image>
<span class="header_name">劳务人员信息绑定</span>
</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<view class="add_max">
<view class="add_title">
<p style="color: red;">*</p>验证方式
</view>
<voucher-select columns="{{authenticationList}}" placeholder="请选择" bindchange="onSelectAuthentication" ></voucher-select>
</view>
<view class="add_max" wx:if="{{authentication == '1'}}">
<view class="add_title">
<p style="color: red;">*</p>手机号
</view>
<input bindblur="inputPhoneNumber" class="celect_frame_min voucher_select_max" value="{{phoneNumber}}" placeholder="请输入手机号码" placeholder-style="color:#6777aa;" />
</view>
<view class="add_max" wx:if="{{authentication == '2'}}">
<view class="add_title"> <p style="color: red;">*</p>身份证</view>
<input bindblur="inputCardId" class="celect_frame_min voucher_select_max" placeholder="请输入身份证" placeholder-style="color:#6777aa;" value="{{cardId}}" />
</view>
<view class="add_max">
<view class="add_title">归属劳务队伍</view>
<input class="celect_frame_min voucher_select_max" placeholder="请输入归属劳务队伍" placeholder-style="color:#6777aa;" value="{{companyName}}" disabled />
</view>
<view class="add_max">
<view class="add_title">姓名</view>
<input class="celect_frame_min voucher_select_max" placeholder="请输入姓名" placeholder-style="color:#6777aa;" value="{{userName}}" disabled />
</view>
<view class="add_max">
<view class="add_title">文化程度</view>
<voucher-select columns="{{educationLevelList}}" placeholder="请选择" bindchange="onSelectEducationLevel" value="{{cultureLevel}}"></voucher-select>
</view>
<view class="add_max">
<view class="add_title">紧急联系人</view>
<input class="celect_frame_min voucher_select_max" placeholder-style="color:#6777aa;" bindchange="onEmergencyName" value="{{emergencyName}}" placeholder="请填写紧急联系人" />
</view>
<view class="add_max">
<view class="add_title">紧急联系人电话</view>
<input class="celect_frame_min voucher_select_max" value="{{emergencyPhone}}" bindchange="onEmergencyPhone" placeholder-style="color:#6777aa;" placeholder="请填写紧急联系人电话" />
</view>
<view class="add_max">
<view class="add_title">
<p style="color: red;">*</p>电子签名
</view>
<mkl-sign bind:returnData="sign" bind:addto="changePage" canvas-id="canvas" image-url="{{manageSign}}"></mkl-sign>
</view>
<view class="add_btn">
<view class="add_btn_qx" bindtap="resest">重置</view>
<view class="add_btn_bc" bindtap="bindInfo">绑定</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="../../images/loding2.gif"></image>
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>
<!--pages/saft-education-user-bind/index.wxml-->
<text>pages/saft-education-user-bind/index.wxml</text>

View File

@ -1,31 +0,0 @@
/* pages/voucherManagementAddto/index.wxss */
.van-picker__mask {
background-image: none !important;
}
.van-hairline--top-bottom:after {
border-top: 1px solid #3a4c8b !important;
border-bottom: 1px solid #3a4c8b !important;
}
.voucher_select_max{
padding:0 25rpx;
display: flex;
align-items: center;
background: #212737;
height: 90rpx;
border-radius: 10rpx;
}
.voucher_select_max_sign{
padding:0 25rpx;
display: flex;
align-items: center;
background: #212737;
height: 180rpx;
border-radius: 10rpx;
}
.van-picker {
background: none !important;
}

View File

@ -1,178 +0,0 @@
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
app.getOPenId()
const {q} = options;
wx.setStorageSync('options', options)
       if (q) {
         let urlStr = decodeURIComponent(q);
let subStrUrl = urlStr.substr(urlStr.indexOf("?"),urlStr.length-1)
let params = this.getRequest(subStrUrl)
this.checkUserApprovalSkipView(params)
       }else{
this.checkUserApprovalSkipView(options)
}
},
/**
* 获取请求地址信息
*/
getRequest(url) {
var theRequest = new Object();
var strs;
if (url.indexOf("?") != -1) {
let str = url.substr(1);
strs = str.split("&");
for (let i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
},
/**
* 判断扫码用户是否有权限
*/
checkUserApprovalSkipView(params){
//获取当前扫码用户的openId
let openId = wx.getStorageSync('openId') != null || wx.getStorageSync('openId') ?wx.getStorageSync('openId'):"123"
wx.request({
url: app.globalData.szhUrl + "/business/saftEducationOpenIdMap/list",
method:"post",
data:{
openId
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res){
let data = res.data
if(data.code == '0' && data.rows.length > 0){
let result = data.rows
//获取用户在实名制用户信息
wx.request({
url: app.globalData.smzUrl+"/mkl/api/searchUserInfoList",
method:"POST",
data:{
projectId: params.smzProjectId,
isWork:1,
idcardnum:(!result[0].cardId || result[0].cardId == 'null')?'':result[0].cardId,
userphone:(!result[0].phoneNumber || result[0].phoneNumber == 'null')? '':result[0].phoneNumber
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res){
//获取二维码内容
let companyId = params.companyId.split(",")
let userInfo = res.data.data
if(!userInfo){
app.toast("实名制系统查无此人,请确认系统录入或人员进场")
setTimeout(()=>{
wx.redirectTo({
url: '../gengduogongneng/gengduogongneng'
})
},2000)
return;
}
if(userInfo.length > 0){
let companyIds = userInfo[0].uninName
if(companyId.indexOf(companyIds) >= 0){
//当前扫码用户绑定openId和对应劳务公司跳转学习页面
wx.navigateTo({
url: `../winter-training/index?szhprojectId=${params.projectId}&smzprojectId=${params.smzProjectId}&cultivateType=${params.cultivateTypeId}&mainId=${params.id}&userName=${result[0].userName}&typeWordName=${result[0].typeWordName}&companyName=${result[0].companyName}&signUrl=${result[0].signUrl}&cardId=${result[0].cardId}`,
})
}else{
//当前扫码用户绑定公司和对应参与公司不符
app.toast("无权限学习,用户在实名制绑定协作队伍不符")
setTimeout(()=>{
// wx.exitMiniProgram({success: (res) => {}})
wx.redirectTo({
url: '../gengduogongneng/gengduogongneng'
})
},2000)
}
}
}
})
}else{
//当前扫码用户没有绑定openId,跳转二维码绑定页面
wx.navigateTo({
url: `../learn-page/index?szhprojectId=${params.projectId}&smzProjectId=${params.smzProjectId}`,
})
}
},
fail(res) {
console.log(res)
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,3 +0,0 @@
{
"usingComponents": {}
}

View File

@ -1,2 +0,0 @@
<!--pages/saftQrView/index.wxml-->
<text></text>

View File

@ -1 +0,0 @@
/* pages/saft-qr-view/index.wxss */

View File

@ -1,860 +1,66 @@
// pages/tempRegistration/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
laborTeamIdList: [],
workTypeList: [],
//身份证正面信息
id_card_name: '',
id_card_no: '',
id_card_address: '',
birth: '',
sex: '',
nation: '',
//身份证反面信息
sign_of_origin: '',
sign_of_date: '',
end_of_date: '',
//身份证正面地址
id_card_front: '',
//身份证反面地址
id_card_back: '',
//考勤半身照
half_body_photo: '',
loadShow: false,
//用户openId
openId: '',
//归属劳务公司(实名制劳务公司)
laborCompanyName: '',
laborCompanyId: '',
//归属劳务公司实名制班组id
laborTeamName: '',
laborTeamId: '',
//归属工种
workTypeId: '',
workTypeName: '',
//预计干活多少天
expectedWorkDays: '',
//项目id
projectId: '',
//项目名称
projectName: '',
//project
projectObject:{},
//人员类型
personTypeList:[
{
id:"1",
text:"管理人员",
},
{
id:"2",
text:"劳务人员"
}
],
personType:'1',
firstLevelList:[],
firstLevel:'',
laborList:[
{
id:"8",
text:"特殊工种",
list:[
"电工","电焊工","架子工","建筑起重思索信号工","建筑起重机械司机","建筑起重机械安装拆卸工","高处作业吊篮安装拆卸工","建筑起重机械安装质量检测工","建筑施工现场内机动车司机","其他工种"
]
},
{
id:"9",
text:"普通工种",
list:[
"钢筋工","木工","混凝土工","泥瓦工","抹灰工","防水工","机修工","腻子工","水电工","安装工","装修工","普工","其他工种"
]
}
],
manageList:[
{
id:'1',
text:"管理人员",
list:[
"项目经理","常务副经理","项目副经理","项目书记","项目副书记","项目总工","安全总监","工会主席"
]
},
{
id:'2',
text:"工程部",
list:[
"项目经理","正部长","副部长","技术员","试验员","资料员","测量员","施工员"
]
},
{
id:'3',
text:"工经部",
list:[
"部长","预算员"
]
},
{
id:'4',
text:"物机部",
list:[
"正部长","副部长","材料员","机械员"
]
},
{
id:'5',
text:"财务部",
list:[
"部长","会计","出纳"
]
},
{
id:'6',
text:"办公室",
list:[
"办公室主任","劳务员","信息员"
]
},
{
id:'7',
text:"安质部",
list:[
"部长","安全员","质检员"
]
},
],
//管理单位
managementUnitList:[
{
id:'1',
text:"建设单位",
},
{
id:'2',
text:"监理单位",
},
{
id:'3',
text:"总承包单位",
},
],
managementUnit:'',
//文化程度
educationLevelList:[],
educationLevel:'',
//紧急联系人
emergencyName:'',
//紧急联系人电话
emergencyPhone:'',
//用工形式列表
employmentTypeList:[],
employmentType:''
},
//选择人员类型
onPersonType(e) {
this.setData({
personType:e.detail.id
})
if(e.detail.id == 1) {
this.setData({
firstLevelList:this.data.manageList,
firstLevel:this.data.manageList[0].id,
expectedWorkDays:'',
managementUnit:'1'
})
this.getWorkTypeId(this.data.manageList[0].list)
} else {
this.setData({
firstLevelList:this.data.laborList,
firstLevel:this.data.laborList[0].id
})
this.getWorkTypeId(this.data.laborList[0].list)
}
},
//管理单位
onManagementUnit(e) {
if(e.detail.id == 1) {
this.setData({
managementUnit:e.detail.id,
educationLevel:'',
emergencyName:'',
emergencyPhone:'',
expectedWorkDays:''
})
} else {
this.setData({
managementUnit:e.detail.id
})
}
},
//选择归属劳务公司班组id
onSelectLabourCompanyName(e) {
this.setData({
laborCompanyId: e.detail.id,
laborCompanyName: e.detail.text,
laborTeamIdList:e.detail.teamList,
laborTeamId:e.detail.teamList[0].id == undefined ?"":e.detail.teamList[0].id,
laborTeamName: e.detail.teamList[0].text == undefined ?"":e.detail.teamList[0].text
})
},
//选择归属劳务公司班组id
onSelectLabourTeamName(e) {
this.setData({
laborTeamId: e.detail.id,
laborTeamName: e.detail.text
})
},
onSelectFirstLevel(e) {
this.setData({
firstLevel:e.detail.id
})
var list = e.detail.list
//获取二级工种
this.getWorkTypeId(list)
},
//选择归属工种
onSelectworkType(e) {
this.setData({
workTypeId: e.detail.id,
workTypeName: e.detail.text
})
},
//预计干活天数
onExpectedWorkDays(e) {
this.setData({
expectedWorkDays: e.detail.value
})
},
onClickShow() {
this.setData({
loadShow: true
});
},
onClickHide() {
this.setData({
loadShow: false
});
},
/**
* 用工形式
*/
getEmploymentType() {
var that = this
wx.request({
url: app.globalData.szhUrl + '/system/dict/data/listData',
method: "post",
data: {
dictType: "employment_type"
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res) {
var list = []
if (res.data.code == 0) {
if (res.data.rows.length > 0) {
var data = res.data.rows;
data.forEach(item => {
var obj = {}
obj.id = item.dictValue
obj.text = item.dictLabel
list.push(obj)
});
that.setData({
employmentTypeList: list,
employmentType:list[0].id
})
} else {
that.setData({
employmentTypeList: [],
employmentType:''
})
}
} else {
that.setData({
employmentTypeList: [],
employmentType:''
})
}
}
})
},
onSelectEmploymentType(e) {
if(e.detail.id == 1) {
this.setData({
employmentType: e.detail.id,
})
} else {
this.setData({
employmentType: e.detail.id,
expectedWorkDays:3
})
}
},
/**
* 获取人员文化程度
*/
getEducatuinLevelList() {
var that = this
wx.request({
url: app.globalData.szhUrl + '/system/dict/data/listData',
method: "post",
data: {
dictType: "education_level"
},
header: {
'content-type': 'application/x-www-form-urlencoded' //修改此处即可
},
success(res) {
var list = []
if (res.data.code == 0) {
if (res.data.rows.length > 0) {
var data = res.data.rows;
data.forEach(item => {
var obj = {}
obj.id = item.dictValue
obj.text = item.dictLabel
list.push(obj)
});
that.setData({
educationLevelList: list,
educationLevel:list[0].id
})
} else {
that.setData({
educationLevelList: [],
educationLevel:''
})
}
} else {
that.setData({
educationLevelList: [],
educationLevel:''
})
}
}
})
},
/**
* 文化程度变化
/**
* 页面的初始数据
*/
onSelectEducationLevel(e) {
this.setData({
educationLevel: e.detail.id,
})
},
/**
* 紧急联系人
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onEmergencyName(e) {
this.setData({
emergencyName: e.detail.value
})
},
/**
* 紧急联系人联系方式
*/
onEmergencyPhone(e) {
this.setData({
emergencyPhone: e.detail.value
})
},
onLoad(options) {
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
app.getOPenId()
const {q} = options;
console.log(q)
if (q) {
let urlStr = decodeURIComponent(q);
let subStrUrl = urlStr.substr(urlStr.indexOf("?"), urlStr.length - 1)
let params = this.getRequest(subStrUrl)
this.setData({
projectId: params.projectId
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
// 获取当前项目对应劳务实名制的projectId
if(params.projectId != "" && params.projectId != undefined) {
this.getProjectInfo(params.projectId)
}
}
// this.setData({
// projectId: 147
// })
// this.getProjectInfo(147)
if(this.data.personType == 1) {
this.setData({
firstLevelList:this.data.manageList,
firstLevel:this.data.manageList[0].id,
managementUnit:'1'
})
this.getWorkTypeId(this.data.manageList[0].list)
} else {
this.setData({
firstLevel:this.data.laborList,
firstLevel:this.data.laborList[0].id,
managementUnit:'1'
})
this.getWorkTypeId(this.data.laborList[0].list)
}
this.getEducatuinLevelList()
this.getEmploymentType()
// this.getLaborCompanyId();
},
/**
* 获取当前项目对应关系
*/
getProjectInfo(projectId) {
var that = this;
wx.request({
url: app.globalData.szhUrl + '/system/registration/getProjectInfo',
data: {
"projectId": projectId
},
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
method: "POST",
success: (res) => {
if(res.data.code == 0) {
if(res.data.data.length > 0) {
var list = res.data.data;
that.setData({
projectObject:list[0],
projectName:list[0].projectName
})
that.onClickShow();
//获取用户openId
that.getUserOpenId();
//获取归属劳务公司列表
that.getLaborCompanyId();
}
}
}
})
},
/**
* 获取请求地址信息
*/
getRequest(url) {
var theRequest = new Object();
var strs;
if (url.indexOf("?") != -1) {
let str = url.substr(1);
strs = str.split("&");
for (let i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
},
/**
* 获取用户openId
*/
getUserOpenId() {
wx.login({
success: res => {
wx.request({
url: app.globalData.reqUrl + '/weixin/userLogin/getOpenId',
data: {
"code": res.code,
"appId": app.globalData.appId,
},
success: (res) => {
this.setData({
openId: res.data.openid,
})
}
})
this.onClickHide()
}
})
},
/**
* 获取工种类型
*/
getWorkTypeId: function (selectList) {
let list = [];
wx.request({
url: app.globalData.smzUrl + '/mkl/basic/getWorkTypeList?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&sign=E5153931BE2113A48EF2E759811F375E',
data: {},
method: "GET",
success: (res) => {
if (res.data.code == 0) {
if (res.data.data.length > 0) {
for (let i = 0; i < res.data.data.length; i++) {
if(selectList.includes(res.data.data[i].workType)) {
var obj = {};
obj.id = res.data.data[i].id;
obj.text = res.data.data[i].workType;
list.push(obj);
}
}
}
}
this.setData({
workTypeList: list,
workTypeId:list[0].id,
workTypeName:list[0].text
})
this.onClickHide();
}
})
},
/**
* 获取劳务公司类型
*/
getLaborCompanyId: function () {
var that = this
let list = [];
wx.request({
url:app.globalData.smzUrl + '/mkl/tools/getToken?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&projectId='+that.data.projectObject.smz,
//url:app.globalData.smzUrl + '/mkl/tools/getToken?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&projectId=169',
data:{},
method:"GET",
header:{
appsecret:'AB05BFC6CC7D406BA45B1E08219E41D1'
},
success:(res=>{
if(res.data.code == 0) {
var sign = res.data.sign
wx.request({
url: app.globalData.smzUrl + '/mkl/basic/getUnitList?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&sign='+sign+'&projectId=' + that.data.projectObject.smz,
// url: app.globalData.smzUrl + '/mkl/basic/getUnitList?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&sign='+sign+'&projectId=169' ,
data: {},
method: "GET",
success: (res) => {
if (res.statusCode == 200) {
if (res.data.data.length > 0) {
for (let i = 0; i < res.data.data.length; i++) {
var obj = {};
obj.id = res.data.data[i].unitTypeid;
obj.text = res.data.data[i].enterpriseName;
var tempList = []
if(res.data.data[i].teamList.length > 0) {
res.data.data[i].teamList.forEach(item=>{
var teamObj = {}
teamObj.id = item.id
teamObj.text = item.teamName
tempList.push(teamObj)
})
}
obj.teamList = tempList
list.push(obj);
}
}
}
console.log(list)
this.setData({
laborCompanyIdList: list,
laborCompanyId:list[0].id,
laborCompanyName:list[0].text,
laborTeamIdList:list[0].teamList,
laborTeamId:list[0].teamList[0].id,
laborTeamName:list[0].teamList[0].text
})
this.onClickHide();
}
})
}
})
})
},
/**
*
* 身份证正面上传
*
*/
onImagesIdCardFront(e) {
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({
//图片上传地址
url: app.globalData.reqUrl + '/weixin/security/fileUpload',
filePath: e.detail[0],
name: 'file',
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
formData: {
user: 'test'
},
success: res => {
let data = JSON.parse(res.data);
this.setData({
id_card_front: data.url
});
let that = this;
wx.request({
url: app.globalData.szhUrl + '/weixin/tempRegistration/ocrIdCard',
data: {
path: data.url,
type: 'front'
},
method: "POST",
success: function (res1) {
that.setData({
id_card_name: res1.data.words_result.姓名.words,
id_card_no: res1.data.words_result.公民身份号码.words,
id_card_address: res1.data.words_result.住址.words,
birth: res1.data.words_result.出生.words,
sex: res1.data.words_result.性别.words,
nation: res1.data.words_result.民族.words,
});
}
})
},
});
},
//身份证反面上传
onImagesArr(e) {
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({
//图片上传地址
url: app.globalData.reqUrl + '/weixin/security/fileUpload',
filePath: e.detail[0],
name: 'file',
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
formData: {
user: 'test'
},
success: res => {
let data = JSON.parse(res.data);
this.setData({
id_card_back: data.url
});
let that = this;
wx.request({
url: app.globalData.szhUrl + '/weixin/tempRegistration/ocrIdCard',
data: {
path: data.url,
type: 'back'
},
method: "POST",
success: function (res1) {
that.setData({
sign_of_origin: res1.data.words_result.签发机关.words,
sign_of_date: res1.data.words_result.签发日期.words,
end_of_date: res1.data.words_result.失效日期.words,
});
}
})
},
});
},
//考勤半身照上传
onHalfBodyImg(e) {
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({
//图片上传地址
url: app.globalData.reqUrl + '/weixin/security/fileUpload',
filePath: e.detail[0],
name: 'file',
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
formData: {
user: 'test'
},
success: res => {
let data = JSON.parse(res.data);
this.setData({
half_body_photo: data.url
});
},
});
},
add: function () {
if(this.data.personType == 1) {
//管理人员
if (this.data.managementUnit == '' || this.data.managementUnit == undefined) {
app.toast("请选择管理单位");
return;
}
}
//判断值是否为空
if (this.data.laborCompanyId == '' || this.data.laborCompanyId == undefined) {
app.toast("请选择归属劳务公司");
return;
} else if (this.data.laborTeamId == '' || this.data.laborTeamId == undefined) {
app.toast("请选择归属劳务班组");
return;
} else if (this.data.firstLevel == '' || this.data.firstLevel == undefined) {
app.toast("请选择一级工种");
return;
} else if (this.data.workTypeId == '' || this.data.workTypeId == undefined) {
app.toast("请选择二级工种");
return;
} else if (this.data.employmentType == '' || this.data.employmentType == undefined) {
app.toast("请选择用工形式");
return;
} else if (this.data.id_card_front == '' || this.data.id_card_front == undefined) {
app.toast("请上传身份证正面照片");
return;
} else if (this.data.id_card_back == '' || this.data.id_card_back == undefined) {
app.toast("请上传身份证反面照片");
return;
} else if (this.data.id_card_no == '' || this.data.id_card_no == undefined) {
app.toast("请填写身份证号码");
return;
} else if (this.data.half_body_photo == '' || this.data.half_body_photo == undefined) {
app.toast("请上传考勤半身照片");
return;
}
//身份证校验
wx.request({
header: {
'content-type': 'application/x-www-form-urlencoded'
},
url: app.globalData.szhUrl + '/system/registration/checkUser',
data: {
idCardNo: this.data.id_card_no,
projectId:this.data.projectId
},
method: "POST",
success: res => {
if (res.data.code == 0) {
wx.setStorageSync('userOpenId', this.data.openId)
wx.setStorageSync('idCardNo', this.data.id_card_no)
wx.request({
header: {
'content-type': 'application/x-www-form-urlencoded'
},
url: app.globalData.szhUrl + '/system/registration/add',
data: {
projectId:this.data.projectId,
openId: this.data.openId,
laborCompanyId:this.data.laborCompanyId,
laborCompanyName:this.data.laborCompanyName,
laborTeamId: this.data.laborTeamId,
laborTeamName: this.data.laborTeamName,
workTypeId: this.data.workTypeId,
workTypeName: this.data.workTypeName,
expectedWorkDays: this.data.expectedWorkDays,
idCardFront: this.data.id_card_front,
idCardBack: this.data.id_card_back,
idCardName: this.data.id_card_name,
idCardNo: this.data.id_card_no,
birth: this.data.birth,
sex: this.data.sex,
nation: this.data.nation,
halfBodyPhoto: this.data.half_body_photo,
idCardAddress: this.data.id_card_address,
signOfOrigin: this.data.sign_of_origin,
signOfDate: this.data.sign_of_date,
endOfDate: this.data.end_of_date,
personType:this.data.personType,
firstLevel:this.data.firstLevel,
educationLevel:this.data.educationLevel,
emergencyName:this.data.emergencyName,
emergencyPhone:this.data.emergencyPhone,
employmentType:this.data.employmentType
},
method: "POST",
success: res=> {
if (res.data.code == 0) {
app.toast("添加成功!")
if(this.data.personType == 1) {
//在需要退出小程序的地方调用添加下面代码即可(js文件中)
wx.exitMiniProgram({
success: (res) => {}
})
} else {
wx.redirectTo({
url: '../newAddPage/safetyBriefingLearning/index?projectId='+this.data.projectId+"&firstWorkType="+this.data.firstLevel+"&secondWorkType="+this.data.workTypeId
,complete:function(res){
console.log(res)
},fail: err => {
console.log(err)
}
});
}
} else {
app.toast("添加失败");
return;
}
}
})
} else {
if(res.data.code == 500 && res.data.msg == "人员信息已存在,无需重复录入!") {
var that = this
//人员二次进场,修改数据状态
wx.request({
header: {
'content-type': 'application/x-www-form-urlencoded'
},
url: app.globalData.szhUrl + '/mkl/api/changTempoaryPersonState',
data: {
projectId:that.data.projectId,
idCardNo: that.data.id_card_no,
auditState:0
},
method: "POST",
success: function (result) {
if (result.data.code == 0) {
app.toast("温馨提醒:人员信息已成功提交,审核通过后可通过人脸识别闸机进场!");
}
}
})
} else {
wx.redirectTo({
url: '../newAddPage/safetyBriefingLearning/index?projectId='+that.data.projectId
})
}
}
}
})
},
/**
* 重置
*/
resetForm() {
wx.reLaunch({
url: '../tempRegistration/index'
})
},
/**
* 身份证号码输入
*/
onidCardIdNo(e) {
if (e.detail.value != "") {
this.setData({
id_card_no: e.detail.value
})
}
}
})

View File

@ -1,6 +0,0 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index"
},
"navigationStyle":"custom"
}

View File

@ -1,136 +1,2 @@
<!--pages/tempRegistration/index.wxml-->
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="12">
<view class="header_img">
<!-- <image src="/images/left.png"></image> -->
<text class="header_fh">劳务人员信息注册</text>
</view>
</van-col>
<van-col span="10">
<view class="header_name"></view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<view class="add_max">
<view class="add_title">{{projectName}}</view>
</view>
<view class="add_max">
<view class="add_title"><p style="color: red;">*</p>人员类型</view>
<voucher-select columns="{{personTypeList}}" placeholder="请选择" bindchange="onPersonType"></voucher-select>
</view>
<view class="add_max" wx:if="{{personType == 1}}">
<view class="add_title"><p style="color: red;">*</p>管理单位</view>
<voucher-select columns="{{managementUnitList}}" placeholder="请选择" bindchange="onManagementUnit"></voucher-select>
</view>
<view class="add_max">
<view class="add_title"><p style="color: red;">*</p>归属单位</view>
<voucher-select columns="{{laborCompanyIdList}}" placeholder="请选择" bindchange="onSelectLabourCompanyName"></voucher-select>
</view>
<view class="add_max">
<view class="add_title"><p style="color: red;">*</p>归属劳务班组</view>
<voucher-select columns="{{laborTeamIdList}}" placeholder="请选择" bindchange="onSelectLabourTeamName"></voucher-select>
</view>
<view class="add_max">
<view class="add_title"><p style="color: red;">*</p>归属工种</view>
<voucher-select columns="{{firstLevelList}}" placeholder="请选择一级工种" bindchange="onSelectFirstLevel"></voucher-select>
</view>
<view class="add_max">
<voucher-select columns="{{workTypeList}}" placeholder="请选择二级工种" bindchange="onSelectworkType"></voucher-select>
</view>
<view class="add_max">
<view class="add_title"><p style="color: red;">*</p>用工形式</view>
<voucher-select columns="{{employmentTypeList}}" placeholder="请选择用工形式" bindchange="onSelectEmploymentType"></voucher-select>
</view>
<view class="add_max" wx:if="{{personType == 2}}">
<view class="add_title">文化程度</view>
<voucher-select columns="{{educationLevelList}}" placeholder="请选择文化程度" bindchange="onEducationLevel"></voucher-select>
</view>
<view class="add_max" wx:if="{{personType == 2}}">
<view class="add_title">紧急联系人</view>
<input class="weui-input" bindchange="onEmergencyName" placeholder="请填写紧急联系人"/>
</view>
<view class="add_max" wx:if="{{personType == 2}}">
<view class="add_title">紧急联系人电话</view>
<input class="weui-input" bindchange="onEmergencyPhone" placeholder="请填写紧急联系人电话"/>
</view>
<view class="add_max">
<!-- 标题 -->
<view class="add_title"><p style="color: red;">*</p>身份证照片上传</view>
<!-- 身份证证件 170+150-->
<view class="identity-prove">
<view class="identity-prove-box">
<view class="identity-prove-top">
<file-uploader-copy bindimages="onImagesIdCardFront" scr='http://fileimg.makalu.cc/WEB_01B17BD6D2C94CFD9CF9D65ECD2D6527.png'></file-uploader-copy>
</view>
<view class="identity-prove-bottom">
上传身份证正面
</view>
</view>
<view class="identity-prove-box">
<view class="identity-prove-tops">
<file-uploader-copy bindimages="onImagesArr" scr='http://fileimg.makalu.cc/WEB_D7680197451940F3AFDFCE8FA5D67869.png'>
</file-uploader-copy>
</view>
<view class="identity-prove-bottom">
上传身份证反面
</view>
</view>
</view>
<!-- <view class="add_title"><p style="color: red;">*</p>身份证上传(正面)</view>
<view class="add_title"><p style="color: red;">*</p>身份证上传(反面)</view>
-->
</view>
<view class="add_max">
<view class="add_title">姓名</view>
<input class="weui-input" placeholder="请填写" value="{{id_card_name}}"/>
</view>
<view class="add_max">
<view class="add_title"><p style="color: red;">*</p>身份证号码</view>
<input class="weui-input" placeholder="请填写" value="{{id_card_no}}" bindchange="onidCardIdNo"/>
</view>
<view class="add_max">
<view class="add_title"><p style="color: red;">*</p>上传考勤半身照</view>
<file-uploader-copy bindimages="onHalfBodyImg"></file-uploader-copy>
</view>
<view class="add_btn">
<view class="add_btn_qx" bindtap="resetForm">重置</view>
<view class="add_btn_bc" bindtap="add">保存</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="../../images/loding2.gif"></image>
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>
<text>pages/tempRegistration/index.wxml</text>

View File

@ -1,47 +0,0 @@
/* pages/tempRegistration/index.wxss */
.van-picker__mask {
background-image: none !important;
}
.van-hairline--top-bottom:after {
border-top: 1px solid #3a4c8b !important;
border-bottom: 1px solid #3a4c8b !important;
}
.van-picker {
background: none !important;
}
/* 身份证部分 */
.identity-prove{
display: flex;
justify-content: space-between;
align-items: center;
}
.identity-prove-box{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
width: 330rpx;
height: 260rpx;
border: 1px solid #212838;
}
.identity-prove-top{
position: relative;
width: 100%;
height: 196rpx;
}
.identity-prove-tops{
position: relative;
width: 100%;
height: 196rpx;
}
.identity-prove-bottom{
text-align: center;
width: 100%;
height: 60rpx;
line-height: 60rpx;
font-size: 28rpx;
color: #8ca0e7;
background-color: #30364e;
margin-top: 50rpx;
}

View File

@ -1,517 +1,66 @@
// pages/temporaryToExamine/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
activeState:1,
a:0,
b:0,
c:0,
projectName:'',
projectId:'',
loginName:'',
userName:'',
/**
* 页面的初始数据
*/
data: {
//筛选条件
startDate:'',
endDate:'',
//列表数据
environList:[],
//数据加载参数
show:false,
initData:{},
},
stateShow:false,
nav:0,
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
//当前选中数量
number:0,
//是否全选
allchecked:false,
},
//审核结果信息
id:'',//当前数据ID
auditState:0,//审核结果0待审核1通过2驳回
labelShow:true,
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
//数字化管控平台project
szhProjectId:'',
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
//项目切换 返回值
onProjectSelect(e){
this.onClickShow();
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.projectId = projectId;
app.globalData.projectName = projectName;
this.setData({
projectId:projectId,
projectName:projectName
})
// 获取当前项目对应劳务实名制的projectId
if(projectId != "" && projectId != undefined) {
this.getProjectInfo(projectId)
}
},
/**
* 获取当前项目对应关系
*/
getProjectInfo(projectId) {
var that = this;
wx.request({
url: app.globalData.reqUrl + '/weixin/training/getProjectCorrespondence',
data: {
"projectId": projectId
},
method: "get",
success: function (res) {
that.setData({
szhProjectId:res.data.szh
})
that.selectEnvironDayAndMonth(0);
}
})
},
showPopup() {
this.setData({ show: true });
},
/**
* 返回到更多功能页面
*/
goGCLB:function(){
wx.redirectTo({
url: '../../pages/gengduogongneng/gengduogongneng'
})
},
onClose() {
this.setData({ show: false });
},
onClickShow() {
this.setData({ show: true });
},
onClickHide() {
this.setData({ show: false });
},
//审核结果弹窗
onWarningInfo(e){
this.setData({
stateShow:true,
id:e.currentTarget.dataset.id,
})
},
//审核结果标签切换
onLabelNav(e){
this.setData({
nav:e.currentTarget.dataset.nav,
auditState:e.currentTarget.dataset.nav
})
},
// tab切换
trainingTypeJump(e){
var that = this
// this.onClickShow();
let index = e.currentTarget.dataset.index;
var videoList = []
let titleName = '';
switch(index) {
case '1':
titleName = '待审核';
this.selectEnvironDayAndMonth(0);
this.setData({labelShow:true});
break;
case '2':
titleName = '已通过';
this.selectEnvironDayAndMonth(1);
this.setData({labelShow:false})
break;
case '3':
titleName = '已驳回';
this.selectEnvironDayAndMonth(2);
this.setData({labelShow:false});
break;
default:
break
}
this.setData({
titleName:titleName,
activeState:index,
videoList:videoList,
pageNo:1,
type:1,
trainingType:index,
startDate:'',
endDate:'',
collaborateRanksId:''
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
//启动蒙版
that.onClickShow();
//获取缓存数据
wx.getStorage({
key: 'userinfo',
success:function(res){
that.setData({
loginName:res.data.loginName,
userName:res.data.userName,
projectName: app.globalData.projectName,
projectId:app.globalData.projectId,
initData:{text:app.globalData.projectName,id:app.globalData.projectId}
})
that.getProjectInfo(app.globalData.projectId)
}
});
},
/**
* 加载待审核已通过已驳回审核列表信息
*/
selectEnvironDayAndMonth(auditState){
var that = this;
wx.request({
url: app.globalData.szhUrl+'/mkl/api/getTemporaryPersonnelRegistrationList',
data:{
"auditState":auditState,
"startDate":this.data.startDate,
"endDate":this.data.endDate,
"projectId":this.data.szhProjectId
},
method:"GET",
success:function(res){
//关闭蒙版
that.onClickHide();
that.setData({
environList:res.data.data,
a:res.data.dsh_num,
b:res.data.ytg_num,
c:res.data.ybh_num
})
}
})
},
/**
* 审核提交
*/
submit:function(){
var that = this;
if(this.data.auditState == 0){
app.toast("请选择审核结果!");
return;
}
var ids = []
var list = this.data.environList
for(let i = 0;i<list.length;i++){
if(list[i].selected)ids.push(list[i].id)
}
if(ids.length == 0){
app.toast("请选择待审核用户!");
return;
}
wx.request({
header: {
'content-type': 'application/x-www-form-urlencoded'
},
url:app.globalData.szhUrl+'/mkl/api/submitTemporaryPersonnelRegistrationAuditState',
data:{
// id:this.data.id,
ids: ids,
auditState:this.data.auditState,
},
method:"POST",
success:function(res){
if(res.data.code == '200'){
that.setData({ stateShow:false });
that.selectEnvironDayAndMonth(0);
//审核通过,临时人员信息同步到劳务实名制系统
if(that.data.auditState == 1){
that.synchronousTemporaryPersonnel(res.data.list);
}
}else{
app.toast(res.data.msg);
return;
}
}
})
},
/**
* 临时人员信息同步到劳务实名制平台
* @param {*} user
*/
synchronousTemporaryPersonnel(list){
var that = this
if(list){
for(let i = 0;i<list.length;i++){
var data = list[i];
if(data.employment_type == 1) {
//长期工
wx.request({
url: app.globalData.smzUrl+'/mkl/api/personSync',
data:{
"projectId":data.smz,
"idcardnum": data.id_card_no,
"name": data.id_card_name,
"teamid": data.labor_team_id,
"userphone": '',
"userphoto": data.half_body_photo,
"enterdate": this.getNowDate(),
"worktypeid": data.work_type_id,
"sex": data.sex,
"nation": data.nation,
"birthday": data.birth,
"address": data.id_card_address,
"organization": data.sign_of_origin,
"useStarttime": data.sign_of_date,
"useEndtime": data.end_of_date,
"idcardimg": data.id_card_front,
"idcardimg2": data.id_card_back,
"information_path":data.letter_commitment_url,
"signature":data.sign_img_url,
"employmentType":data.employment_type
},
method:"POST",
success:function(res){
if(res.data.state == "NO" && res.data.message == "该人员信息已存在") {
that.resynchronousTemporaryPersonnel(data)
}
}
})
} else {
//短期工
wx.request({
url: app.globalData.smzUrl+'/mkl/api/personSyncTemp',
data:{
"projectId":data.smz,
"idcardnum": data.id_card_no,
"name": data.id_card_name,
"teamid": data.labor_team_id,
"userphone": '',
"userphoto": data.half_body_photo,
"enterdate": this.getNowDate(),
"worktypeid": data.work_type_id,
"sex": data.sex,
"nation": data.nation,
"birthday": data.birth,
"address": data.id_card_address,
"organization": data.sign_of_origin,
"useStarttime": data.sign_of_date,
"useEndtime": data.end_of_date,
"idcardimg": data.id_card_front,
"idcardimg2": data.id_card_back,
"information_path":data.letter_commitment_url,
"signature":data.sign_img_url,
"employmentType":data.employment_type
},
method:"POST",
success:function(res){
if(res.data.state == "NO" && res.data.message == "该人员信息已存在") {
that.resynchronousTemporaryPersonnel(data)
}
}
})
}
}
}
},
/**
* 关闭
*/
closeBox(){
this.setData({
stateShow:false
})
},
orderChange(e){
let name = e.detail.name;
if(name == 'a'){
this.selectEnvironDayAndMonth(0);
this.setData({labelShow:true});
}else if(name == 'b'){
this.selectEnvironDayAndMonth(1);
this.setData({labelShow:false});
}else if(name == 'c'){
this.selectEnvironDayAndMonth(2);
this.setData({labelShow:false});
}
},
/**
* 获取当前年月日
*/
getNowDate(){
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
month = (month > 9) ? month : ("0" + month);
day = (day < 10) ? ("0" + day) : day;
var today = year + "-" + month + "-" + day;
return today;
},
/**
* 打开附件
* @param {url} e
*/
openFile(e){
var url = e.currentTarget.dataset.url
wx.downloadFile({
// 示例 url并非真实存在
url: url,
success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
}
})
}
})
},
/**
* 全选
*/
checkAll(){
var selectAllStatus = this.data.allchecked;
selectAllStatus = !selectAllStatus;
var dataList = this.data.environList;
for (let i = 0; i < dataList .length; i++) {
dataList [i].selected = selectAllStatus;
}
this.setData({
allchecked: selectAllStatus,
environList: dataList,
});
//计算已选数量
this.countSelectNum();
},
/**
* 选择
*/
selectList(e){
var index = e.currentTarget.dataset.index
let dataArr = this.data.environList
let selected = dataArr[index].selected
dataArr[index].selected = !selected
this.setData({
environList: dataArr
});
//判断全选
for (var i = 0; i < this.data.environList.length; i++) {
if (this.data.allchecked){
if (!this.data.environList[i].selected){
this.setData({
allchecked: false
});
break;
}
}else{
if (this.data.environList[i].selected) {
this.setData({
allchecked: true
});
} else {
this.setData({
allchecked: false
});
break;
}
}
}
//计算已选数量
this.countSelectNum()
},
/**
* 计算已选数量
*/
countSelectNum(){
var number = 0;
let dataArr = this.data.environList
for(let i = 0;i < dataArr.length;i++){
if(dataArr[i].selected)number++
}
this.setData({
number: number
});
},
//筛选待审核列表
screenCondition1(e){
this.setData({
startDate:e.detail.startDate,
endDate:e.detail.endDate,
})
this.selectEnvironDayAndMonth(0);
},
//筛选已通过列表
screenCondition2(e){
this.setData({
startDate:e.detail.startDate,
endDate:e.detail.endDate,
})
this.selectEnvironDayAndMonth(1);
},
//筛选已驳回列表
screenCondition3(e){
this.setData({
startDate:e.detail.startDate,
endDate:e.detail.endDate,
})
this.selectEnvironDayAndMonth(2);
},
//再次人员入场
resynchronousTemporaryPersonnel(data) {
//1 进场 2退场
wx.request({
url: app.globalData.smzUrl+'/mkl/api/userInfoTempEnterAndOut',
data:{
"projectId":data.smz,
"idcardnum": data.id_card_no,
"isWork":1
},
method:"POST",
success:function(res){
app.toast("人员已再次入场");
console.log(res)
}
})
}
})

View File

@ -1,11 +0,0 @@
{
"usingComponents": {
"van-row": "@vant/weapp/row",
"van-col": "@vant/weapp/col",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-tag": "@vant/weapp/tag/index",
"van-overlay": "@vant/weapp/overlay/index"
},
"navigationBarTitleText": "临时人员审核"
}

View File

@ -1,402 +1,2 @@
<!--pages/temporaryToExamine/index.wxml-->
<!-- tab栏切换 -->
<view class="max_content_none" style="margin-top: -18rpx;" >
<!-- 新样式 -->
<view class="modify_video_nav" style="margin-top: 64rpx;background-color: #191d28;">
<view class="{{activeState==1?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>待审核({{a}})</text></view>
<view class="{{activeState==2?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>已通过({{b}})</text></view>
<view class="{{activeState==3?'active':''}}" bindtap="trainingTypeJump" data-index="3"><text>已驳回({{c}})</text></view>
</view>
<!-- <view class="max_new_content" style="border: 1px solid red;" > -->
<!-- <van-tabs active="a" bind:change="orderChange">
<van-tab title="待审核 ({{a}})" name="a">
<view class="new_con_info">
<view class="modify_echarts_max" style="margin: 30rpx 0;">
<view class="modify_echarts_title_min">
<view class="modify_eharts_title">待审核人员列表</view>
<pz-screen-training columns="{{DeviceGroupData}}" bindscreen="screenCondition1"></pz-screen-training>
</view>
</view>
<view class="boxInsideStyle">
<view class="new_con_info_min" wx:for="{{environList}}" wx:key="index" wx:if="{{index<150}}" data-id="{{item.id}}">
<view style="display: flex;">
<view style="border-bottom:1px solid #8862f8">
<radio value="" checked="{{item.selected}}" bindtap="selectList" data-index="{{index}}" style="transform: scale(0.7);" />
</view>
<view class="new_con_title" style="border-bottom: 2px solid #293063;">
{{item.labor_team_name}}
</view>
</view>
<view class="new_con_ds">
<van-row>
<van-col span="18">
<view class="new_con_td" style="display:flex;justify-content: space-between;">
<view style="display: flex;">
归属工种: <view style="color:#439bde">
{{item.work_type_name}}
</view>
</view>
<view style="display: flex;">
姓名: <view style="color:#439bde">
{{item.id_card_name}}
</view>
</view>
</view>
<view class="new_con_td">注册时间:{{item.create_time}}</view>
<view class="new_con_td">安全教育时间:{{item.safety_education_time}}</view>
<view class="new_con_td" style="display: flex;">安全教育成绩:
<view style="color: #439bde;display: flex;">{{item.score}}分
<view style="color: green;" wx:if="{{item.result == '0'}}">(合格)</view>
<view style="color: red;" wx:if="{{item.result == '1'}}">(不合格)</view>
</view>
</view>
<view class="new_con_td" style="white-space:nowrap;position: relative;">安全承诺书签订时间:{{item.sign_time}}
<view style="width:34rpx;height:34rpx;position: absolute;right: -80rpx;top: 8rpx;" data-url="{{item.letter_commitment_url}}" bindtap="openFile">
<image src="http://fileimg.makalu.cc/WEB_560F605B02BC49DA834A05D39BE4B051.png" mode="" style="width: 100%;height: 100%;" />
</view>
</view>
</van-col>
</van-row>
</view>
</view>
</view>
</view>
</van-tab>
<van-tab title="已通过 ({{b}})" name="b">
<view class="new_con_info" style="border: 1px solid red;">
<view class="modify_echarts_max" style="margin: 30rpx 0;">
<view class="modify_echarts_title_min">
<view class="modify_eharts_title">已通过人员列表</view>
<pz-screen-training columns="{{DeviceGroupData}}" bindscreen="screenCondition2"></pz-screen-training>
</view>
</view>
<view class="boxInsideStyle">
<view class="new_con_info_min" wx:for="{{environList}}" wx:key="index" wx:if="{{index<150}}" data-id="{{item.id}}" style="border: 1px solid green;">
<view style="display: flex;">
<view class="new_con_title" style="border-bottom: 2px solid #293063;">
{{item.labor_team_name}}
</view>
</view>
<view class="new_con_ds">
<van-row>
<van-col span="18">
<view class="new_con_td" style="display:flex;justify-content: space-between;">
<view style="display: flex;">
归属工种: <view style="color:#439bde">
{{item.work_type_name}}
</view>
</view>
<view style="display: flex;">
姓名: <view style="color:#439bde">
{{item.id_card_name}}
</view>
</view>
</view>
<view class="new_con_td">注册时间:{{item.create_time}}</view>
<view class="new_con_td">安全教育时间:{{item.safety_education_time}}</view>
<view class="new_con_td" style="display: flex;">安全教育成绩:
<view style="color: #439bde;display: flex;">{{item.score}}分
<view style="color: green;" wx:if="{{item.result == '0'}}">(合格)</view>
<view style="color: red;" wx:if="{{item.result == '1'}}">(不合格)</view>
</view>
</view>
<view class="new_con_td" style="white-space:nowrap;position: relative;">安全承诺书签订时间:{{item.sign_time}}
<view style="width:34rpx;height:34rpx;position: absolute;right: -80rpx;top: 8rpx;" data-url="{{item.letter_commitment_url}}" bindtap="openFile">
<image src="http://fileimg.makalu.cc/WEB_560F605B02BC49DA834A05D39BE4B051.png" mode="" style="width: 100%;height: 100%;" />
</view>
</view>
</van-col>
</van-row>
</view>
</view>
</view>
</view>
</van-tab>
<van-tab title="已驳回 ({{c}})" name="c" >
<view class="new_con_info" >
<view class="modify_echarts_max" style="margin: 30rpx 0;">
<view class="modify_echarts_title_min">
<view class="modify_eharts_title">已驳回人员列表</view>
<pz-screen-training columns="{{DeviceGroupData}}" bindscreen="screenCondition3"></pz-screen-training>
</view>
</view>
<view class="boxInsideStyle">
<view class="new_con_info_min" wx:for="{{environList}}" wx:key="index" wx:if="{{index<150}}" data-id="{{item.id}}">
<view style="display: flex;">
<view class="new_con_title" style="border-bottom: 2px solid #293063;">
{{item.labor_team_name}}
</view>
</view>
<view class="new_con_ds">
<van-row>
<van-col span="18">
<view class="new_con_td" style="display:flex;justify-content: space-between;">
<view style="display: flex;">
归属工种: <view style="color:#439bde">
{{item.work_type_name}}
</view>
</view>
<view style="display: flex;">
姓名: <view style="color:#439bde">
{{item.id_card_name}}
</view>
</view>
</view>
<view class="new_con_td">注册时间:{{item.create_time}}</view>
<view class="new_con_td">安全教育时间:{{item.safety_education_time}}</view>
<view class="new_con_td" style="display: flex;">安全教育成绩:
<view style="color: #439bde;display: flex;">{{item.score}}分
<view style="color: green;" wx:if="{{item.result == '0'}}">(合格)</view>
<view style="color: red;" wx:if="{{item.result == '1'}}">(不合格)</view>
</view>
</view>
<view class="new_con_td" style="white-space:nowrap;position: relative;">安全承诺书签订时间:{{item.sign_time}}
<view style="width:34rpx;height:34rpx;position: absolute;right: -80rpx;top: 8rpx;" data-url="{{item.letter_commitment_url}}" bindtap="openFile">
<image src="http://fileimg.makalu.cc/WEB_560F605B02BC49DA834A05D39BE4B051.png" mode="" style="width: 100%;height: 100%;" />
</view>
</view>
</van-col>
</van-row>
</view>
</view>
</view>
</view>
</van-tab>
</van-tabs> -->
<!-- </view> -->
<!-- tab栏对应数据 -->
<!--对应数据展示 -->
<view class="{{activeState==1?'whoBox showBoxs':'whoBox'}}" >
<view class="new_con_info">
<!-- 待审核 -->
<view class="modify_echarts_max" style="margin: 30rpx 0;">
<view class="modify_echarts_title_min">
<view class="modify_eharts_title" >待审核人员列表</view>
<pz-screen-training columns="{{DeviceGroupData}}" bindscreen="screenCondition1"></pz-screen-training>
</view>
</view>
<view class="boxInsideStyle">
<view class="new_con_info_min" wx:for="{{environList}}" wx:key="index" wx:if="{{index<150}}" data-id="{{item.id}}">
<view style="display: flex;">
<view style="border-bottom:1px solid #8862f8">
<radio value="" checked="{{item.selected}}" bindtap="selectList" data-index="{{index}}" style="transform: scale(0.7);" />
</view>
<view class="new_con_title" style="border-bottom: 2px solid #293063;">
{{item.labor_team_name}}
</view>
</view>
<view class="new_con_ds">
<van-row>
<van-col span="18">
<view class="new_con_td" style="display:flex;justify-content: space-between;">
<view style="display: flex;">
归属工种: <view style="color:#439bde">
{{item.work_type_name}}
</view>
</view>
<view style="display: flex;">
姓名: <view style="color:#439bde">
{{item.id_card_name}}
</view>
</view>
</view>
<view class="new_con_td">注册时间:{{item.create_time}}</view>
<view class="new_con_td">安全教育时间:{{item.safety_education_time}}</view>
<view class="new_con_td" style="display: flex;">安全教育成绩:
<view style="color: #439bde;display: flex;">{{item.score}}分
<view style="color: green;" wx:if="{{item.result == '0'}}">(合格)</view>
<view style="color: red;" wx:if="{{item.result == '1'}}">(不合格)</view>
</view>
</view>
<view class="new_con_td" style="white-space:nowrap;position: relative;">安全承诺书签订时间:{{item.sign_time}}
<view style="width:34rpx;height:34rpx;position: absolute;right: -80rpx;top: 8rpx;" data-url="{{item.letter_commitment_url}}" bindtap="openFile">
<image src="http://fileimg.makalu.cc/WEB_560F605B02BC49DA834A05D39BE4B051.png" mode="" style="width: 100%;height: 100%;" />
</view>
</view>
</van-col>
<!-- <van-col span="6">
<view class="new_zhong_clz">待审核</view>
</van-col> -->
</van-row>
</view>
</view>
</view>
</view>
</view>
<view class="{{activeState==2?'whoBox showBoxs':'whoBox'}}" >
<view class="new_con_info" >
<!-- 已通过 -->
<view class="modify_echarts_max" style="margin: 30rpx 0;">
<view class="modify_echarts_title_min">
<view class="modify_eharts_title">已通过人员列表</view>
<pz-screen-training columns="{{DeviceGroupData}}" bindscreen="screenCondition2"></pz-screen-training>
</view>
</view>
<view class="boxInsideStyle">
<view class="new_con_info_min" wx:for="{{environList}}" wx:key="index" wx:if="{{index<150}}" data-id="{{item.id}}" >
<view style="display: flex;">
<!-- <view style="border-bottom:1px solid #8862f8">
<radio value="" style="transform: scale(0.7);" />
</view> -->
<view class="new_con_title" style="border-bottom: 2px solid #293063;">
{{item.labor_team_name}}
</view>
</view>
<view class="new_con_ds">
<van-row>
<van-col span="18">
<view class="new_con_td" style="display:flex;justify-content: space-between;">
<view style="display: flex;">
归属工种: <view style="color:#439bde">
{{item.work_type_name}}
</view>
</view>
<view style="display: flex;">
姓名: <view style="color:#439bde">
{{item.id_card_name}}
</view>
</view>
</view>
<view class="new_con_td">注册时间:{{item.create_time}}</view>
<view class="new_con_td">安全教育时间:{{item.safety_education_time}}</view>
<view class="new_con_td" style="display: flex;">安全教育成绩:
<view style="color: #439bde;display: flex;">{{item.score}}分
<view style="color: green;" wx:if="{{item.result == '0'}}">(合格)</view>
<view style="color: red;" wx:if="{{item.result == '1'}}">(不合格)</view>
</view>
</view>
<view class="new_con_td" style="white-space:nowrap;position: relative;">安全承诺书签订时间:{{item.sign_time}}
<view style="width:34rpx;height:34rpx;position: absolute;right: -80rpx;top: 8rpx;" data-url="{{item.letter_commitment_url}}" bindtap="openFile">
<image src="http://fileimg.makalu.cc/WEB_560F605B02BC49DA834A05D39BE4B051.png" mode="" style="width: 100%;height: 100%;" />
</view>
</view>
</van-col>
<!-- <van-col span="6">
<view class="new_zhong_clz">待审核</view>
</van-col> -->
</van-row>
</view>
</view>
</view>
</view>
</view>
<view class="{{activeState==3?'whoBox showBoxs':'whoBox'}}" >
<view class="new_con_info" >
<!-- 已驳回 -->
<view class="modify_echarts_max" style="margin: 30rpx 0;">
<view class="modify_echarts_title_min">
<view class="modify_eharts_title">已驳回人员列表</view>
<pz-screen-training columns="{{DeviceGroupData}}" bindscreen="screenCondition3"></pz-screen-training>
</view>
</view>
<view class="boxInsideStyle">
<view class="new_con_info_min" wx:for="{{environList}}" wx:key="index" wx:if="{{index<150}}" data-id="{{item.id}}">
<view style="display: flex;">
<!-- <view style="border-bottom:1px solid #8862f8">
<radio value="" style="transform: scale(0.7);" />
</view> -->
<view class="new_con_title" style="border-bottom: 2px solid #293063;">
{{item.labor_team_name}}
</view>
</view>
<view class="new_con_ds">
<van-row>
<van-col span="18">
<view class="new_con_td" style="display:flex;justify-content: space-between;">
<view style="display: flex;">
归属工种: <view style="color:#439bde">
{{item.work_type_name}}
</view>
</view>
<view style="display: flex;">
姓名: <view style="color:#439bde">
{{item.id_card_name}}
</view>
</view>
</view>
<view class="new_con_td">注册时间:{{item.create_time}}</view>
<view class="new_con_td">安全教育时间:{{item.safety_education_time}}</view>
<view class="new_con_td" style="display: flex;">安全教育成绩:
<view style="color: #439bde;display: flex;">{{item.score}}分
<view style="color: green;" wx:if="{{item.result == '0'}}">(合格)</view>
<view style="color: red;" wx:if="{{item.result == '1'}}">(不合格)</view>
</view>
</view>
<view class="new_con_td" style="white-space:nowrap;position: relative;">安全承诺书签订时间:{{item.sign_time}}
<view style="width:34rpx;height:34rpx;position: absolute;right: -80rpx;top: 8rpx;" data-url="{{item.letter_commitment_url}}" bindtap="openFile">
<image src="http://fileimg.makalu.cc/WEB_560F605B02BC49DA834A05D39BE4B051.png" mode="" style="width: 100%;height: 100%;" />
</view>
</view>
</van-col>
<!-- <van-col span="6">
<view class="new_zhong_clz">待审核</view>
</van-col> -->
</van-row>
</view>
</view>
</view>
</view>
</view>
</view>
<van-overlay show="{{ stateShow }}">
<view class="state_wrapper">
<view class="state_content">
<view class="state_content_title">审核结果</view>
<view class="state_content_nav" wx:if="{{labelShow}}">
<view class="{{nav==1?'active':''}}" bindtap="onLabelNav" data-nav="1">通过</view>
<view class="{{nav==2?'active':''}}" bindtap="onLabelNav" data-nav="2">驳回</view>
</view>
<view class="state_content_remar_max">
<view class="state_content_btn">
<view bindtap="closeBox">关闭</view>
<view bindtap="submit">确定</view>
</view>
</view>
</view>
</view>
</van-overlay>
<van-overlay show="{{show}}">
<view class="gif">
<image src="../../images/loding2.gif"></image>
<view>数据加载中!请稍后...</view>
</view>
</van-overlay>
<view wx:if="{{labelShow}}" style="position: fixed;bottom: 0;left: 0;height: 80rpx;width: 100%;display: flex;justify-content: space-around;align-items: center;background-color: #212737;padding: 14rpx 0;">
<view style="display: flex;align-items: center;color: #6b81bb;" bindtap="checkAll">
<radio value="" checked="{{allchecked}}" />全选
</view>
<view style="display: flex;align-items: center;">
<view style="margin-right: 16rpx;">
已选 ({{number}})
</view>
<view style="width:200rpx;height:60rpx;border:1px solid #884df7;line-height: 60rpx;text-align: center;border-radius: 40rpx;background-color: #884df7;" bindtap="onWarningInfo">
去审核
</view>
</view>
</view>
<text>pages/temporaryToExamine/index.wxml</text>

View File

@ -1,167 +0,0 @@
/* pages/temporaryToExamine/index.wxss */
.van-ellipsis{
background: #191d28;
}
.van-tab--active{
color:#8aa2e8 !important;
}
.van-hairline--top-bottom:after{
border-width: 0 0 !important
}
.van-tabs__line{
background: #8aa2e8 !important;
font-weight: bold !important;
}
.van-tag--mark{
margin:0 10rpx ;
}
.van-tag--mark,.van-tag--mark:after {
border-radius: 15rpx 0 15rpx 0 !important;
}
/* 页面样式 */
.max_content_none{
padding: 0 0 50rpx;
}
.new_tips{
text-align: center;
font-size: 24rpx;
color:#8aa2e8 ;
padding: 20rpx 0;
}
.new_tips image{
width: 30rpx;
height: 30rpx;
}
.new_nav{
padding:200rpx 30rpx 30rpx 30rpx;
}
.new_con_info{
padding: 30rpx 0 0;
}
.new_con_info_min{
background:#232943 ;
border-radius: 20rpx;
padding:20rpx 30rpx;
margin-bottom: 30rpx;
}
.new_con_title{
font-weight: bold;
font-size: 30rpx;
}
.new_con_ds{
padding: 20rpx 0 0;
}
.new_con_td{
color:#8aa2e8 ;
font-size: 26rpx;
padding: 8rpx;
}
.new_zhong_clz{
font-size: 28rpx;
color: #9499ac;
text-align: center;
margin-top: 20rpx;
}
.new_zhong_wc{
background:linear-gradient(to right, #8b4bf7 , #7457ff);
font-size: 28rpx;
text-align: center;
margin-top: 20rpx;
padding: 10rpx 0;
border-radius: 50rpx;
}
.new_zhong_dcb{
font-size: 28rpx;
color: #f49829;
text-align: center;
margin-top: 20rpx;
}
.new_zhong_ycb{
background:#5c5e6b;
font-size: 28rpx;
text-align: center;
margin-top: 20rpx;
padding: 10rpx 0;
border-radius: 50rpx;
}
/* 弹窗 */
.state_wrapper{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.state_content{
width: 90%;
background: #1d212e;
border-radius: 10rpx;
}
.state_content_title{
padding: 30rpx;
}
.state_content_nav{
padding: 15rpx 30rpx;
display: flex;
align-items: center;
}
.state_content_nav view{
padding: 5rpx 30rpx;
border: 1px solid #444957;
color: #444957;
margin-right: 30rpx;
font-size: 26rpx;
border-radius: 30rpx;
}
.state_content_nav .active{
border: 1px solid #8aa2e8;
color: #8aa2e8;
}
.state_content_remar_max{
padding: 30rpx;
}
.state_content_remar{
background: #2c3346;
padding: 30rpx;
border-radius: 10rpx;
}
.state_content_remar textarea{
min-height: 150rpx;
width:100%;
background: #2c3346;
}
.state_content_btn{
padding: 30rpx 30rpx 0;
display: flex;
align-items: center;
justify-content:flex-end;
}
.state_content_btn view{
padding: 10rpx;
width: 130rpx;
border: 1px solid #252c3d;
background: #252c3d;
text-align: center;
color: #6a7faa;
margin-left: 20rpx;
}
/* 外盒子边框 */
.boxInsideStyle{
padding: 0rpx 30rpx;
}
.whoBox{
position: absolute;
top: 144rpx;
left: 0;
width: 100%;
display: none;
}
/* .outsideBox{
position: absolute;
top: 0;
left: 0;
} */
.showBoxs{
display: block;
}

View File

@ -1,40 +0,0 @@
function request (url, method, data, header = {}) {
wx.showLoading({
title: '加载中'
})
return new Promise((resolve, reject) => {
wx.request({
url: app.globalData.reqUrl+ url,
method: method,
data: data,
header: {
'content-type': 'application/json',
'Authorization': 'Bearer '+wx.getStorageSync('cookie').toString(),
...header
},
success: function (res) {
wx.hideLoading()
resolve(res.data)
},
fail: function (error) {
wx.hideLoading()
reject(error)
},
complete: function () {
wx.hideLoading()
}
})
})
}
function get (obj) {
return request(obj.url, 'GET', obj.data)
}
function post (obj) {
return request(obj.url, 'POST', obj.data)
}
export default {
request,
get,
post
}