提交代码
parent
366a897e54
commit
cab1ad2759
|
@ -21,7 +21,7 @@ export function startProcessInstance(data) {
|
|||
// 查询流程节点
|
||||
export function readDeployNotes(deployId) {
|
||||
return request({
|
||||
url: '/wxApi/flowTask/readNotes/'+deployId,
|
||||
url: '/wechat/flowTask/readDeployNotes/'+deployId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ export function myFinishedFlowTaskList(data) {
|
|||
// 根据条件查询所有流申请
|
||||
export function allInstanceList(data) {
|
||||
return request({
|
||||
url: '/wxApi/flowTask/allList',
|
||||
url: '/wechat/flowTask/allList',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
|
|
|
@ -33,3 +33,19 @@ export function loginOut() {
|
|||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询公众号消息授权
|
||||
export function findOpenUserMsgId(openId) {
|
||||
return request({
|
||||
'url': '/wechat/findOpenUserMsgId/'+openId,
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公众号消息授权
|
||||
export function delOpenUserMsgId(openId) {
|
||||
return request({
|
||||
'url': '/wechat/delOpenUserMsgId/'+openId,
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
|
@ -1380,6 +1380,7 @@ swiper-item video {
|
|||
|
||||
.color_green {
|
||||
color: #1ab400;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.color_blue {
|
||||
|
@ -1840,4 +1841,13 @@ swiper-item video {
|
|||
|
||||
.inspect_list_info_data_2 {
|
||||
width: 100%;
|
||||
}
|
||||
.van-steps{
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.van-step--horizontal .van-step__circle-container{
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.van-steps--horizontal{
|
||||
padding: 10px 20px !important;
|
||||
}
|
|
@ -8,6 +8,10 @@ component_1.VantComponent({
|
|||
icon: String,
|
||||
steps: Array,
|
||||
active: Number,
|
||||
rejectNode:{
|
||||
type: Number,
|
||||
value: 100,
|
||||
},
|
||||
direction: {
|
||||
type: String,
|
||||
value: 'horizontal',
|
||||
|
|
|
@ -2,53 +2,39 @@
|
|||
|
||||
<view class="custom-class {{ utils.bem('steps', [direction]) }}">
|
||||
<view class="van-step__wrapper">
|
||||
<view
|
||||
wx:for="{{ steps }}"
|
||||
wx:key="index"
|
||||
bindtap="onClick"
|
||||
data-index="{{ index }}"
|
||||
class="{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline"
|
||||
style="{{ status(index, active) === 'inactive' ? 'color: ' + inactiveColor: '' }}"
|
||||
>
|
||||
<view class="van-step__title" style="{{ index === active ? 'color: ' + activeColor : '' }}">
|
||||
<view>{{ item.text }}</view>
|
||||
<view wx:for="{{ steps }}" wx:key="index" bindtap="onClick" data-index="{{ index }}" class="{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline" style="{{ status(index, active) === 'inactive' ? 'color: ' + inactiveColor: '' }}">
|
||||
<view class="van-step__title" style="{{ index === active ? 'color: #45affb': (index === rejectNode? 'color: #fd6060;font-weight:800':'')}}">
|
||||
<view style="{{ index < active ? 'color: ' + activeColor : '' }}">{{ item.text }}</view>
|
||||
<view class="desc-class">{{ item.desc }}</view>
|
||||
</view>
|
||||
<view class="van-step__circle-container">
|
||||
<block wx:if="{{ index !== active }}">
|
||||
<van-icon
|
||||
wx:if="{{ item.inactiveIcon || inactiveIcon }}"
|
||||
color="{{ status(index, active) === 'inactive' ? inactiveColor: activeColor }}"
|
||||
name="{{ item.inactiveIcon || inactiveIcon }}"
|
||||
custom-class="van-step__icon"
|
||||
/>
|
||||
<view
|
||||
wx:else
|
||||
class="van-step__circle"
|
||||
style="{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}"
|
||||
/>
|
||||
<block wx:if="{{ index > active }}">
|
||||
<block wx:if="{{ index === rejectNode }}">
|
||||
<van-icon color="#fd6060" name="clear" custom-class="van-step__icon" />
|
||||
</block>
|
||||
<block wx:if="{{ index != rejectNode }}">
|
||||
<van-icon wx:if="{{ item.inactiveIcon || inactiveIcon }}" color="{{ status(index, active) === 'inactive' ? inactiveColor: activeColor }}" name="{{ item.inactiveIcon || inactiveIcon }}" custom-class="van-step__icon" />
|
||||
<view wx:else class="van-step__circle" style="{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}" />
|
||||
</block>
|
||||
</block>
|
||||
|
||||
<van-icon wx:else name="{{ item.activeIcon || activeIcon }}" color="{{ activeColor }}" custom-class="van-step__icon" />
|
||||
<van-icon wx:else name="{{ index < active ? 'checked': 'checked' }}" style="{{index < active ? 'color:#07c160':'color:#45affb;font-size:30rpx !important;'}}" custom-class="van-step__icon" />
|
||||
</view>
|
||||
<view
|
||||
wx:if="{{ index !== steps.length - 1 }}"
|
||||
class="van-step__line" style="{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}"
|
||||
/>
|
||||
<view wx:if="{{ index === rejectNode -1 }}" class="van-step__line" style="background-color:#fd6060" />
|
||||
<view wx:if="{{ (index !== steps.length - 1) && index != rejectNode -1 }}" class="van-step__line" style="{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<wxs module="status">
|
||||
function get(index, active) {
|
||||
if (index < active) {
|
||||
return 'finish';
|
||||
} else if (index === active) {
|
||||
return 'process';
|
||||
function get(index, active) {
|
||||
if (index < active) {
|
||||
return 'finish';
|
||||
} else if (index === active) {
|
||||
return 'process';
|
||||
}
|
||||
|
||||
return 'inactive';
|
||||
}
|
||||
|
||||
return 'inactive';
|
||||
}
|
||||
|
||||
module.exports = get;
|
||||
</wxs>
|
||||
module.exports = get;
|
||||
</wxs>
|
|
@ -1 +1 @@
|
|||
@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff;background-color:var(--steps-background-color,#fff)}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;font-size:var(--step-font-size,14px);color:#969799;color:var(--step-text-color,#969799)}.van-step--finish{color:#323233;color:var(--step-finish-text-color,#323233)}.van-step__circle{border-radius:50%;width:5px;width:var(--step-circle-size,5px);height:5px;height:var(--step-circle-size,5px);background-color:#969799;background-color:var(--step-circle-color,#969799)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0);background-color:#fff;background-color:var(--white,#fff);padding:0 8px;padding:0 var(--padding-xs,8px)}.van-step--horizontal .van-step__title{display:inline-block;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);font-size:12px;font-size:var(--step-horizontal-title-font-size,12px)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:1px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step--horizontal.van-step--process{color:#323233;color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical{padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;content:"";background-color:#fff;background-color:var(--white,#fff)}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__icon{line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}
|
||||
@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff;background-color:var(--steps-background-color,#fff)}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;font-size:var(--step-font-size,14px);color:#969799;color:var(--step-text-color,#969799)}.van-step--finish{color:#323233;color:var(--step-finish-text-color,#323233)}.van-step__circle{border-radius:50%;width:5px;width:var(--step-circle-size,5px);height:5px;height:var(--step-circle-size,5px);background-color:#969799;background-color:var(--step-circle-color,#969799)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0);background-color:#fff;background-color:var(--white,#fff);padding:0 8px;padding:0 var(--padding-xs,8px)}.van-step--horizontal .van-step__title{display:inline-block;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);font-size:12px;font-size:var(--step-horizontal-title-font-size,12px)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:2px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step--horizontal.van-step--process{color:#323233;color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;line-height:1;}.van-step--vertical{padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;content:"";background-color:#fff;background-color:var(--white,#fff)}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__icon{line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step__title{padding-bottom: 10rpx;}
|
|
@ -24,7 +24,9 @@ Page({
|
|||
witnessUserName:"",
|
||||
checkTime:"",
|
||||
laboratoryName:"",
|
||||
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}]
|
||||
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 0
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -18,7 +18,9 @@ Page({
|
|||
detectionResult:"1",
|
||||
detectionFileData:[],
|
||||
fileType:["pdf","png","jpg","jpeg"],
|
||||
request:app.globalData.reqUrl
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 2
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"usingComponents": {"van-overlay": "@vant/weapp/overlay/index"},
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="module_title module_title_padding">
|
||||
|
|
|
@ -34,7 +34,9 @@ Page({
|
|||
qualifiedFlagList:[{id:'Y',text:"是"},{id:'N',text:"否"}],
|
||||
detectionFileData:[],
|
||||
fileType:["pdf","png","jpg","jpeg"],
|
||||
request:app.globalData.reqUrl
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'检测报告'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 1
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
|
|
|
@ -2,119 +2,146 @@
|
|||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id:"",
|
||||
infoData:{},
|
||||
loadShow:false,
|
||||
loginName:"",
|
||||
showDel:false,
|
||||
detectionImageList:[],
|
||||
minDetectionFileImages:[],
|
||||
detectionFiles:[],
|
||||
fileUrls:[],
|
||||
activeName:"",
|
||||
flowRecordList:[],
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: "",
|
||||
infoData: {},
|
||||
loadShow: false,
|
||||
loginName: "",
|
||||
showDel: false,
|
||||
detectionImageList: [],
|
||||
minDetectionFileImages: [],
|
||||
detectionFiles: [],
|
||||
fileUrls: [],
|
||||
activeName: "",
|
||||
flowRecordList: [],
|
||||
request: app.globalData.reqUrl,
|
||||
flowNodes: [{
|
||||
text: '开始'
|
||||
}, {
|
||||
text: '提交申请'
|
||||
}, {
|
||||
text: '检测报告'
|
||||
}, {
|
||||
text: '监理审批'
|
||||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 100
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {id} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,
|
||||
loginName:res.data.loginName
|
||||
})
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectDetection/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let imageUrls = [];
|
||||
let minImageUrls = [];
|
||||
let fileUrls = [];
|
||||
let fileNames = [];
|
||||
//判断附件
|
||||
if(res.data.detectionFile){
|
||||
res.data.detectionFile.split(',').forEach(element => {
|
||||
let _file = element.split('.');
|
||||
_file = _file[_file.length-1].toLocaleUpperCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if(_file=="PNG"||_file=="JPG"||_file=="JPEG"){
|
||||
imageUrls.push(that.data.request+element);
|
||||
minImageUrls.push(that.data.request+element+'.min.jpg');
|
||||
}else{
|
||||
let it = element.split('/');
|
||||
fileNames.push(it[it.length-1]);
|
||||
fileUrls.push(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
that.setData({
|
||||
infoData:res.data,
|
||||
detectionImageList:imageUrls,
|
||||
minDetectionFileImages:minImageUrls,
|
||||
detectionFiles:fileNames,
|
||||
fileUrls,
|
||||
loadShow:false
|
||||
})
|
||||
//判断当前能否删除
|
||||
if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){
|
||||
that.setData({
|
||||
showDel:true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {
|
||||
id
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
id,
|
||||
loginName: res.data.loginName
|
||||
})
|
||||
},
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo(){
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method:"get",
|
||||
data:{
|
||||
fromType:"1",
|
||||
fromId:this.data.id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/info',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
let state = that.data.active;
|
||||
if (res.data.approveStatus == null) {
|
||||
state = 2;
|
||||
}else if (res.data.approveStatus == "1") {
|
||||
state = 3;
|
||||
} else if (res.data.approveStatus == "3") {
|
||||
state = 2;
|
||||
}
|
||||
that.setData({
|
||||
active: state
|
||||
})
|
||||
let imageUrls = [];
|
||||
let minImageUrls = [];
|
||||
let fileUrls = [];
|
||||
let fileNames = [];
|
||||
//判断附件
|
||||
if (res.data.detectionFile) {
|
||||
res.data.detectionFile.split(',').forEach(element => {
|
||||
let _file = element.split('.');
|
||||
_file = _file[_file.length - 1].toLocaleUpperCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if (_file == "PNG" || _file == "JPG" || _file == "JPEG") {
|
||||
imageUrls.push(that.data.request + element);
|
||||
minImageUrls.push(that.data.request + element + '.min.jpg');
|
||||
} else {
|
||||
let it = element.split('/');
|
||||
fileNames.push(it[it.length - 1]);
|
||||
fileUrls.push(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
that.setData({
|
||||
infoData: res.data,
|
||||
detectionImageList: imageUrls,
|
||||
minDetectionFileImages: minImageUrls,
|
||||
detectionFiles: fileNames,
|
||||
fileUrls,
|
||||
loadShow: false
|
||||
})
|
||||
//判断当前能否删除
|
||||
if (res.data.createBy == that.data.loginName && res.data.approveStatus != "4") {
|
||||
that.setData({
|
||||
flowRecordList:res.data
|
||||
showDel: true
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method: "get",
|
||||
data: {
|
||||
fromType: "1",
|
||||
fromId: this.data.id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
flowRecordList: res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 手风琴
|
||||
|
@ -124,44 +151,46 @@ Page({
|
|||
});
|
||||
},
|
||||
|
||||
onDelete(){
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData(){
|
||||
let {id} = this.data
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectDetection/remove',
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
method:"get",
|
||||
success(res){
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}
|
||||
onDelete() {
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectDetection/remove',
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
method: "get",
|
||||
success(res) {
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//跳转修改页面
|
||||
onUpdate:function(){
|
||||
onUpdate: function () {
|
||||
let id = this.data.id;
|
||||
wx.redirectTo({
|
||||
url: `../edit/index?id=${id}`,
|
||||
|
@ -169,88 +198,88 @@ Page({
|
|||
},
|
||||
|
||||
//展示图片
|
||||
showImg:function(e){
|
||||
var that=this;
|
||||
showImg: function (e) {
|
||||
var that = this;
|
||||
wx.previewImage({
|
||||
urls: that.data.detectionImageList,
|
||||
current: that.data.detectionImageList[e.currentTarget.dataset.index]
|
||||
urls: that.data.detectionImageList,
|
||||
current: that.data.detectionImageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
|
||||
downFile:function(e){
|
||||
downFile: function (e) {
|
||||
let that = this;
|
||||
wx.downloadFile({
|
||||
// 示例 url,并非真实存在
|
||||
url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[0],
|
||||
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + that.data.fileUrls[0],
|
||||
success: function (res) {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail:function(res) {
|
||||
console.log(res)
|
||||
}
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
|
||||
})
|
||||
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
},
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -31,7 +31,9 @@ Page({
|
|||
dataTypeLvl1List:[],
|
||||
dataTypeLvl2List:[],
|
||||
dataTypeLvl2AllList:[],
|
||||
list:[{id:1,text:"合格"},{id:2,text:"不合格"}]
|
||||
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 0
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -36,7 +36,9 @@ Page({
|
|||
dataTypeLvl2List:[],
|
||||
dataTypeLvl2AllList:[],
|
||||
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
|
||||
request:app.globalData.reqUrl
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 1
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"usingComponents": {
|
||||
"van-overlay": "@vant/weapp/overlay/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_info">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
|
|
|
@ -2,83 +2,106 @@
|
|||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id:"",
|
||||
infoData:{},
|
||||
imageList:[],
|
||||
minImageList:[],
|
||||
loadShow:false,
|
||||
loginName:"",
|
||||
showDel:false,
|
||||
activeName:"",
|
||||
flowRecordList:[],
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: "",
|
||||
infoData: {},
|
||||
imageList: [],
|
||||
minImageList: [],
|
||||
loadShow: false,
|
||||
loginName: "",
|
||||
showDel: false,
|
||||
activeName: "",
|
||||
flowRecordList: [],
|
||||
request: app.globalData.reqUrl,
|
||||
flowNodes: [{
|
||||
text: '开始'
|
||||
}, {
|
||||
text: '提交申请'
|
||||
}, {
|
||||
text: '监理审批'
|
||||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 100
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {id} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,
|
||||
loginName:res.data.loginName
|
||||
})
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectchecking/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if(res.data.imageUrls){
|
||||
res.data.imageUrls.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.createBy==that.data.loginName && res.data.approveStatus!="4"){
|
||||
that.setData({
|
||||
showDel:true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {
|
||||
id
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
id,
|
||||
loginName: res.data.loginName
|
||||
})
|
||||
},
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(){
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/info',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
let state = that.data.active;
|
||||
if (res.data.approveStatus == "1") {
|
||||
state = 2;
|
||||
} else if (res.data.approveStatus == "3") {
|
||||
state = 1;
|
||||
}
|
||||
that.setData({
|
||||
active: state
|
||||
})
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if (res.data.imageUrls) {
|
||||
res.data.imageUrls.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.createBy == that.data.loginName && res.data.approveStatus != "4") {
|
||||
that.setData({
|
||||
showDel: true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onDelete() {
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
|
@ -86,64 +109,66 @@ Page({
|
|||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData(){
|
||||
let {id} = this.data
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectchecking/remove',
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
method:"get",
|
||||
success(res){
|
||||
app.toast("删除成功!")
|
||||
wx.navigateTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectchecking/remove',
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
method: "get",
|
||||
success(res) {
|
||||
app.toast("删除成功!")
|
||||
wx.navigateTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//跳转修改页面
|
||||
onUpdate:function(){
|
||||
onUpdate: function () {
|
||||
let id = this.data.id;
|
||||
let dataTypeLvl1= this.data.infoData.dataTypeLvl1;
|
||||
let dataTypeLvl1 = this.data.infoData.dataTypeLvl1;
|
||||
wx.redirectTo({
|
||||
url: `../edit/index?id=${id}&dt1=${dataTypeLvl1}`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo(){
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method:"get",
|
||||
data:{
|
||||
fromType:"3",
|
||||
fromId:this.data.id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
that.setData({
|
||||
flowRecordList:res.data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method: "get",
|
||||
data: {
|
||||
fromType: "3",
|
||||
fromId: this.data.id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
flowRecordList: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 手风琴
|
||||
|
@ -153,68 +178,68 @@ Page({
|
|||
});
|
||||
},
|
||||
|
||||
//展示图片
|
||||
showImg:function(e){
|
||||
var that=this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
//展示图片
|
||||
showImg: function (e) {
|
||||
var that = this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.navigateTo({
|
||||
url: '../list/index',
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
|
@ -2,6 +2,7 @@
|
|||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -1,138 +1,148 @@
|
|||
<!--pageage/safetyManagement/problemRectification/index.wxml-->
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">举牌验收详情</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">举牌验收详情</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<van-collapse-item title="审批日志" name="2">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">
|
||||
<text wx:if="{{item.approveStatus==1}}">提交举牌验收</text>
|
||||
<text wx:if="{{item.approveStatus!=1}}">审批举牌验收</text>
|
||||
<text wx:if="{{item.approveStatus==4}}" class="timeline_for_state_1 color_green">合格</text>
|
||||
<text wx:if="{{item.approveStatus==3}}" class="timeline_for_state_2 color_purple">不合格</text>
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<van-collapse-item title="审批日志" name="2">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">
|
||||
<text wx:if="{{item.approveStatus==1}}">提交举牌验收</text>
|
||||
<text wx:if="{{item.approveStatus!=1}}">审批举牌验收</text>
|
||||
<text wx:if="{{item.approveStatus==4}}" class="timeline_for_state_1 color_green">合格</text>
|
||||
<text wx:if="{{item.approveStatus==3}}" class="timeline_for_state_2 color_purple">不合格</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.userName}}">
|
||||
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.deptName}}">
|
||||
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.comment}}">
|
||||
<image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.userName}}"><image src="/images/lw_3.png"></image>办理用户:<text>{{item.userName}}</text></view>
|
||||
<view wx:if="{{item.deptName}}"><image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text></view>
|
||||
<view><image src="/images/s_6.png"></image>办理时间:<text>{{item.createTime}}</text></view>
|
||||
<view wx:if="{{item.comment}}"><image src="/images/s_7.png"></image>审批意见:<text>{{item.comment}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
<view class="module_title module_title_padding">
|
||||
<view>{{infoData.projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">单位名称</text></van-col>
|
||||
<van-col span="18">{{infoData.deptName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收图片</text></van-col>
|
||||
<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>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
<view class="module_title module_title_padding">
|
||||
<view>{{infoData.projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">单位名称</text></van-col>
|
||||
<van-col span="18">{{infoData.deptName}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收图片</text></van-col>
|
||||
<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">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收类型</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl1Name}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">类型分类</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl2Name}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">质量专员</text></van-col>
|
||||
<van-col span="18">{{infoData.qualityUserName}} {{infoData.qualityUser}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">监理专员</text></van-col>
|
||||
<van-col span="18">{{infoData.superviseUserName}} {{infoData.superviseUser}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">工序部位</text></van-col>
|
||||
<van-col span="18">{{infoData.checkWorkingPosition}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收描述</text></van-col>
|
||||
<van-col span="18">{{infoData.intro}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收时间</text></van-col>
|
||||
<van-col span="18">{{infoData.checkingDate}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
|
||||
<van-col span="18">
|
||||
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审批</text>
|
||||
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收类型</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl1Name}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">类型分类</text></van-col>
|
||||
<van-col span="18" class="color_blue">{{infoData.dataTypeLvl2Name}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">质量专员</text></van-col>
|
||||
<van-col span="18">{{infoData.qualityUserName}} {{infoData.qualityUser}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">监理专员</text></van-col>
|
||||
<van-col span="18">{{infoData.superviseUserName}} {{infoData.superviseUser}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">工序部位</text></van-col>
|
||||
<van-col span="18">{{infoData.checkWorkingPosition}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收描述</text></van-col>
|
||||
<van-col span="18">{{infoData.intro}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收时间</text></van-col>
|
||||
<van-col span="18">{{infoData.checkingDate}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list" wx:if="{{infoData.approveStatus!=null}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">验收结果</text></van-col>
|
||||
<van-col span="18">
|
||||
<text wx:if="{{infoData.approveStatus==1}}" class="code_label_2 code_label_blueviolet" style="padding: 5rpx 50rpx;font-size: 25rpx;">待审批</text>
|
||||
<text wx:if="{{infoData.approveStatus==4}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">合格</text>
|
||||
<text wx:if="{{infoData.approveStatus==3}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">不合格</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交时间</text></van-col>
|
||||
<van-col span="18">{{infoData.createTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交用户</text></van-col>
|
||||
<van-col span="18">{{infoData.createBy}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交时间</text></van-col>
|
||||
<van-col span="18">{{infoData.createTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">提交用户</text></van-col>
|
||||
<van-col span="18">{{infoData.createBy}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to" wx:if="{{showDel}}">
|
||||
<view class="problem_submit_to_btn problem_submit_to_delete" bindtap="onDelete">删除</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onUpdate">修改</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to" wx:if="{{showDel}}">
|
||||
<view class="problem_submit_to_btn problem_submit_to_delete" bindtap="onDelete">删除</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onUpdate">修改</view>
|
||||
</view>
|
||||
</view>
|
|
@ -44,7 +44,8 @@
|
|||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -46,7 +46,7 @@ Page({
|
|||
let fileDepts = "";
|
||||
if(res.data.minRoleId>3){
|
||||
if(res.data.minRoleId==4){
|
||||
fileDepts += app.globalData.projectInfoList[0].projectInfoList[0].deptId;
|
||||
fileDepts += app.globalData.projectInfoList[0].deptId;
|
||||
}else{
|
||||
app.globalData.projectInfoList.forEach(pro =>{
|
||||
fileDepts += pro.projectInfoList[0].deptId;
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -24,7 +24,9 @@ Page({
|
|||
showBgd:false,
|
||||
rectifierData:[],
|
||||
witnessUser:"",
|
||||
witnessUserName:""
|
||||
witnessUserName:"",
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 0
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"van-picker": "@vant/weapp/picker/index",
|
||||
"van-area": "@vant/weapp/area/index",
|
||||
"mkl-multi-select": "/components/@mkl/multi-select/index",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -28,7 +28,9 @@ Page({
|
|||
activeName:"",
|
||||
flowRecordList:[],
|
||||
infoData:{},
|
||||
request:app.globalData.reqUrl
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 1
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"mkl-multi-select": "/components/@mkl/multi-select/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_info">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -67,7 +67,8 @@
|
|||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
|
|
|
@ -2,139 +2,162 @@
|
|||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id:"",
|
||||
infoData:{},
|
||||
imageList:[],
|
||||
minImageList:[],
|
||||
loadShow:false,
|
||||
loginName:"",
|
||||
showDel:false,
|
||||
signFileNames:[],
|
||||
minSignFileImages:[],
|
||||
signFileImages:[],
|
||||
alterationFileNames:[],
|
||||
minAlterationFileImages:[],
|
||||
alterationFileImages:[],
|
||||
fileUrls:[],
|
||||
fileUrls2:[],
|
||||
activeName:"",
|
||||
flowRecordList:[],
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: "",
|
||||
infoData: {},
|
||||
imageList: [],
|
||||
minImageList: [],
|
||||
loadShow: false,
|
||||
loginName: "",
|
||||
showDel: false,
|
||||
signFileNames: [],
|
||||
minSignFileImages: [],
|
||||
signFileImages: [],
|
||||
alterationFileNames: [],
|
||||
minAlterationFileImages: [],
|
||||
alterationFileImages: [],
|
||||
fileUrls: [],
|
||||
fileUrls2: [],
|
||||
activeName: "",
|
||||
flowRecordList: [],
|
||||
request: app.globalData.reqUrl,
|
||||
flowNodes: [{
|
||||
text: '开始'
|
||||
}, {
|
||||
text: '提交申请'
|
||||
}, {
|
||||
text: '监理审批'
|
||||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 100
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {id} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,
|
||||
loginName:res.data.loginName
|
||||
})
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectMaterialSeal/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if(res.data.imageUrls){
|
||||
res.data.imageUrls.split(',').forEach(element => {
|
||||
urls.push(that.data.request+element);
|
||||
minUrls.push(that.data.request+element+'.min.jpg');
|
||||
});
|
||||
}
|
||||
let fileNames = [];
|
||||
let minFileImages = [];
|
||||
let fileImages = [];
|
||||
let fileUrls = [];
|
||||
//判断附件
|
||||
if(res.data.signFiles){
|
||||
res.data.signFiles.split(',').forEach(element => {
|
||||
let _file = element.split('.');
|
||||
_file = _file[_file.length-1].toLocaleUpperCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if(_file=="PNG"||_file=="JPG"||_file=="JPEG"){
|
||||
fileImages.push(that.data.request+element);
|
||||
minFileImages.push(that.data.request+element+'.min.jpg');
|
||||
}else{
|
||||
let it = element.split('/');
|
||||
fileNames.push(it[it.length-1]);
|
||||
fileUrls.push(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
let fileNames2 = [];
|
||||
let minFileImages2 = [];
|
||||
let fileImages2 = [];
|
||||
let fileUrls2 = [];
|
||||
//判断附件
|
||||
if(res.data.alterationFiles){
|
||||
res.data.alterationFiles.split(',').forEach(element => {
|
||||
let _file = element.split('.');
|
||||
_file = _file[_file.length-1].toLocaleUpperCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if(_file=="PNG"||_file=="JPG"||_file=="JPEG"){
|
||||
fileImages2.push(that.data.request+element);
|
||||
minFileImages2.push(that.data.request+element+'.min.jpg');
|
||||
}else{
|
||||
let it = element.split('/');
|
||||
fileNames2.push(it[it.length-1]);
|
||||
fileUrls2.push(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
that.setData({
|
||||
fileUrls,
|
||||
fileUrls2,
|
||||
signFileNames:fileNames,
|
||||
minSignFileImages:minFileImages,
|
||||
signFileImages:fileImages,
|
||||
alterationFileNames:fileNames2,
|
||||
minAlterationFileImages:minFileImages2,
|
||||
alterationFileImages:fileImages2,
|
||||
infoData:res.data,
|
||||
imageList:urls,
|
||||
minImageList:minUrls,
|
||||
loadShow:false
|
||||
})
|
||||
//判断当前能否删除
|
||||
if(res.data.createBy==that.data.loginName && res.data.approveStatus!="4"){
|
||||
that.setData({
|
||||
showDel:true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {
|
||||
id
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
id,
|
||||
loginName: res.data.loginName
|
||||
})
|
||||
},
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(){
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectMaterialSeal/info',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
let state = that.data.active;
|
||||
if (res.data.approveStatus == "1") {
|
||||
state = 2;
|
||||
} else if (res.data.approveStatus == "3") {
|
||||
state = 1;
|
||||
}
|
||||
that.setData({
|
||||
active: state
|
||||
})
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if (res.data.imageUrls) {
|
||||
res.data.imageUrls.split(',').forEach(element => {
|
||||
urls.push(that.data.request + element);
|
||||
minUrls.push(that.data.request + element + '.min.jpg');
|
||||
});
|
||||
}
|
||||
let fileNames = [];
|
||||
let minFileImages = [];
|
||||
let fileImages = [];
|
||||
let fileUrls = [];
|
||||
//判断附件
|
||||
if (res.data.signFiles) {
|
||||
res.data.signFiles.split(',').forEach(element => {
|
||||
let _file = element.split('.');
|
||||
_file = _file[_file.length - 1].toLocaleUpperCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if (_file == "PNG" || _file == "JPG" || _file == "JPEG") {
|
||||
fileImages.push(that.data.request + element);
|
||||
minFileImages.push(that.data.request + element + '.min.jpg');
|
||||
} else {
|
||||
let it = element.split('/');
|
||||
fileNames.push(it[it.length - 1]);
|
||||
fileUrls.push(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
let fileNames2 = [];
|
||||
let minFileImages2 = [];
|
||||
let fileImages2 = [];
|
||||
let fileUrls2 = [];
|
||||
//判断附件
|
||||
if (res.data.alterationFiles) {
|
||||
res.data.alterationFiles.split(',').forEach(element => {
|
||||
let _file = element.split('.');
|
||||
_file = _file[_file.length - 1].toLocaleUpperCase();
|
||||
//判断附件类型,如果是图片直接展示,非图片则显示附件
|
||||
if (_file == "PNG" || _file == "JPG" || _file == "JPEG") {
|
||||
fileImages2.push(that.data.request + element);
|
||||
minFileImages2.push(that.data.request + element + '.min.jpg');
|
||||
} else {
|
||||
let it = element.split('/');
|
||||
fileNames2.push(it[it.length - 1]);
|
||||
fileUrls2.push(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
that.setData({
|
||||
fileUrls,
|
||||
fileUrls2,
|
||||
signFileNames: fileNames,
|
||||
minSignFileImages: minFileImages,
|
||||
signFileImages: fileImages,
|
||||
alterationFileNames: fileNames2,
|
||||
minAlterationFileImages: minFileImages2,
|
||||
alterationFileImages: fileImages2,
|
||||
infoData: res.data,
|
||||
imageList: urls,
|
||||
minImageList: minUrls,
|
||||
loadShow: false
|
||||
})
|
||||
//判断当前能否删除
|
||||
if (res.data.createBy == that.data.loginName && res.data.approveStatus != "4") {
|
||||
that.setData({
|
||||
showDel: true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onDelete() {
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
|
@ -142,37 +165,39 @@ Page({
|
|||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData(){
|
||||
let {id} = this.data
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+"/wechat/projectMaterialSeal/remove",
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
method:"get",
|
||||
success(res){
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + "/wechat/projectMaterialSeal/remove",
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
method: "get",
|
||||
success(res) {
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//跳转修改页面
|
||||
onUpdate:function(){
|
||||
onUpdate: function () {
|
||||
let id = this.data.id;
|
||||
wx.redirectTo({
|
||||
url: `../edit/index?id=${id}`,
|
||||
|
@ -180,26 +205,26 @@ Page({
|
|||
},
|
||||
|
||||
/**
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo(){
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method:"get",
|
||||
data:{
|
||||
fromType:"4",
|
||||
fromId:this.data.id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
that.setData({
|
||||
flowRecordList:res.data
|
||||
})
|
||||
}
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method: "get",
|
||||
data: {
|
||||
fromType: "4",
|
||||
fromId: this.data.id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
flowRecordList: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 手风琴
|
||||
|
@ -209,130 +234,130 @@ Page({
|
|||
});
|
||||
},
|
||||
|
||||
//展示图片
|
||||
showImg:function(e){
|
||||
var that=this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
//展示图片
|
||||
showImg: function (e) {
|
||||
var that = this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
|
||||
//展示图片
|
||||
showSignFileImg:function(e){
|
||||
var that=this;
|
||||
wx.previewImage({
|
||||
urls: that.data.signFileImages,
|
||||
current: that.data.signFileImages[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
//展示图片
|
||||
showSignFileImg: function (e) {
|
||||
var that = this;
|
||||
wx.previewImage({
|
||||
urls: that.data.signFileImages,
|
||||
current: that.data.signFileImages[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
|
||||
//展示图片
|
||||
showAlterationFileImg:function(e){
|
||||
var that=this;
|
||||
wx.previewImage({
|
||||
urls: that.data.alterationFileImages,
|
||||
current: that.data.alterationFileImages[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
//展示图片
|
||||
showAlterationFileImg: function (e) {
|
||||
var that = this;
|
||||
wx.previewImage({
|
||||
urls: that.data.alterationFileImages,
|
||||
current: that.data.alterationFileImages[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
|
||||
downFile:function(e){
|
||||
let idx = e.currentTarget.dataset['index'];
|
||||
let that = this;
|
||||
wx.downloadFile({
|
||||
// 示例 url,并非真实存在
|
||||
url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls[idx],
|
||||
success: function (res) {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail:function(res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
downFile: function (e) {
|
||||
let idx = e.currentTarget.dataset['index'];
|
||||
let that = this;
|
||||
wx.downloadFile({
|
||||
// 示例 url,并非真实存在
|
||||
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + that.data.fileUrls[idx],
|
||||
success: function (res) {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
|
||||
},
|
||||
},
|
||||
|
||||
downFile2:function(e){
|
||||
let idx = e.currentTarget.dataset['index'];
|
||||
let that = this;
|
||||
wx.downloadFile({
|
||||
// 示例 url,并非真实存在
|
||||
url: app.globalData.uploadUrl+'/common/download/resource?resource='+that.data.fileUrls2[idx],
|
||||
success: function (res) {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail:function(res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
downFile2: function (e) {
|
||||
let idx = e.currentTarget.dataset['index'];
|
||||
let that = this;
|
||||
wx.downloadFile({
|
||||
// 示例 url,并非真实存在
|
||||
url: app.globalData.uploadUrl + '/common/download/resource?resource=' + that.data.fileUrls2[idx],
|
||||
success: function (res) {
|
||||
const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
filePath: filePath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//app.toast("暂不支持下载!如需下载请前往后台管理系统!!")
|
||||
},
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index'
|
||||
url: '../list/index'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
|
@ -2,6 +2,7 @@
|
|||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -39,7 +39,9 @@ Page({
|
|||
id: 2,
|
||||
text: "不合格"
|
||||
}],
|
||||
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
|
||||
fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"],
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 0
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -27,6 +27,8 @@ Page({
|
|||
type: "",
|
||||
info: "",
|
||||
filesData: [],
|
||||
flowNodes:[{text:'开始'},{text:'提交申请'},{text:'监理审批'},{text:'结束'}],
|
||||
active: 1
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"usingComponents": {
|
||||
"van-overlay": "@vant/weapp/overlay/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
|
|
|
@ -2,141 +2,166 @@
|
|||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id:"",
|
||||
infoData:{},
|
||||
loadShow:false,
|
||||
loginName:"",
|
||||
showDel:false,
|
||||
imageList:[],
|
||||
minImageList:[],
|
||||
activeName:"",
|
||||
flowRecordList:[],
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: "",
|
||||
infoData: {},
|
||||
loadShow: false,
|
||||
loginName: "",
|
||||
showDel: false,
|
||||
imageList: [],
|
||||
minImageList: [],
|
||||
activeName: "",
|
||||
flowRecordList: [],
|
||||
request: app.globalData.reqUrl,
|
||||
flowNodes: [{
|
||||
text: '开始'
|
||||
}, {
|
||||
text: '提交申请'
|
||||
}, {
|
||||
text: '监理审批'
|
||||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 100
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {id} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,
|
||||
loginName:res.data.loginName
|
||||
})
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectMeasure/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if(res.data.imageUrls){
|
||||
res.data.imageUrls.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.createBy==that.data.loginName && res.data.approveStatus!="4"){
|
||||
that.setData({
|
||||
showDel:true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {
|
||||
id
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
id,
|
||||
loginName: res.data.loginName
|
||||
})
|
||||
},
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(){
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData(){
|
||||
let {id} = this.data
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectMeasure/remove',
|
||||
header: {
|
||||
"Username": that.data.loginName,
|
||||
},
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
method:"get",
|
||||
success(res){
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo(){
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method:"get",
|
||||
data:{
|
||||
fromType:"2",
|
||||
fromId:this.data.id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectMeasure/info',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
let state = that.data.active;
|
||||
if (res.data.approveStatus == "1") {
|
||||
state = 2;
|
||||
} else if (res.data.approveStatus == "3") {
|
||||
state = 1;
|
||||
}
|
||||
that.setData({
|
||||
active: state
|
||||
})
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if (res.data.imageUrls) {
|
||||
res.data.imageUrls.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.createBy == that.data.loginName && res.data.approveStatus != "4") {
|
||||
that.setData({
|
||||
flowRecordList:res.data
|
||||
showDel: true
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onDelete() {
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectMeasure/remove',
|
||||
header: {
|
||||
"Username": that.data.loginName,
|
||||
},
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
method: "get",
|
||||
success(res) {
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询流程日志
|
||||
*/
|
||||
getAuditinfo() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectAuditinfo/selectProjectAuditinfo',
|
||||
method: "get",
|
||||
data: {
|
||||
fromType: "2",
|
||||
fromId: this.data.id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
flowRecordList: res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 手风琴
|
||||
|
@ -147,75 +172,75 @@ Page({
|
|||
},
|
||||
|
||||
//跳转修改页面
|
||||
onUpdate:function(){
|
||||
onUpdate: function () {
|
||||
let id = this.data.id;
|
||||
wx.redirectTo({
|
||||
url: `../edit/index?id=${id}&measureType=${this.data.infoData.measureType}&measureInfo=${this.data.infoData.measureInfo}`,
|
||||
})
|
||||
},
|
||||
|
||||
//展示图片
|
||||
showImg:function(e){
|
||||
var that=this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
//展示图片
|
||||
showImg: function (e) {
|
||||
var that = this;
|
||||
wx.previewImage({
|
||||
urls: that.data.imageList,
|
||||
current: that.data.imageList[e.currentTarget.dataset.index]
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
},
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.approveStatus=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -6,157 +6,184 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
maxDate:new Date(2088,1,1).getTime(),
|
||||
minDate:new Date().getTime()+(3600*48*1000),
|
||||
projectId:"",
|
||||
projectName:"",
|
||||
loginName:"",
|
||||
userName:"",
|
||||
rectifierData:[],
|
||||
rectifierData2:[],
|
||||
rectifierData3:[],
|
||||
imageInfoData:[],
|
||||
maxDate: new Date(2088, 1, 1).getTime(),
|
||||
minDate: new Date().getTime() + (3600 * 48 * 1000),
|
||||
projectId: "",
|
||||
projectName: "",
|
||||
loginName: "",
|
||||
userName: "",
|
||||
rectifierData: [],
|
||||
rectifierData2: [],
|
||||
rectifierData3: [],
|
||||
imageInfoData: [],
|
||||
//验收时间
|
||||
nickedTime:'',
|
||||
loadShow:false,
|
||||
lordSent:"",
|
||||
lordSentUser:"",
|
||||
copySend:"",
|
||||
copySendUser:"",
|
||||
recheckSend:"",
|
||||
recheckSendUser:"",
|
||||
workParts:"",
|
||||
changeInfo:"",
|
||||
dangerType:"1",
|
||||
dangerTypeList:[],
|
||||
selectValue:"",
|
||||
selectIndex:"",
|
||||
problemType:"1",
|
||||
showHis:false,
|
||||
problemTypeList:[{id:"1",text:"常规检查"},{id:"2",text:"专项检查"}]
|
||||
nickedTime: '',
|
||||
loadShow: false,
|
||||
lordSent: "",
|
||||
lordSentUser: "",
|
||||
copySend: "",
|
||||
copySendUser: "",
|
||||
recheckSend: "",
|
||||
recheckSendUser: "",
|
||||
workParts: "",
|
||||
changeInfo: "",
|
||||
dangerType: "1",
|
||||
dangerTypeList: [],
|
||||
selectValue: "",
|
||||
selectIndex: "",
|
||||
problemType: "1",
|
||||
showHis: false,
|
||||
problemTypeList: [{
|
||||
id: "1",
|
||||
text: "常规检查"
|
||||
}, {
|
||||
id: "2",
|
||||
text: "专项检查"
|
||||
}],
|
||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||
active: 0
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {projectId,projectName} = options
|
||||
let {
|
||||
projectId,
|
||||
projectName
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
projectId:app.globalData.projectId,
|
||||
projectName:app.globalData.projectName,
|
||||
loginName:res.data.loginName,
|
||||
userName:res.data.nickName,
|
||||
recheckSend:res.data.nickName,
|
||||
recheckSendUser:res.data.loginName
|
||||
})
|
||||
this.getAllProjectUserData();
|
||||
this.getDangerTypeList();
|
||||
this.getHisInfo();
|
||||
}
|
||||
})
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
projectId: app.globalData.projectId,
|
||||
projectName: app.globalData.projectName,
|
||||
loginName: res.data.loginName,
|
||||
userName: res.data.nickName,
|
||||
recheckSend: res.data.nickName,
|
||||
recheckSendUser: res.data.loginName
|
||||
})
|
||||
this.getAllProjectUserData();
|
||||
this.getDangerTypeList();
|
||||
this.getHisInfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询项目人员数据
|
||||
getAllProjectUserData(){
|
||||
getAllProjectUserData() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/queryAllProjectUserByParams',
|
||||
method:"get",
|
||||
data:{
|
||||
projectId:that.data.projectId,
|
||||
loginName:that.data.loginName
|
||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/queryAllProjectUserByParams',
|
||||
method: "get",
|
||||
data: {
|
||||
projectId: that.data.projectId,
|
||||
loginName: that.data.loginName
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
that.setData({
|
||||
rectifierData:res.data,
|
||||
rectifierData3:res.data,
|
||||
rectifierData: res.data,
|
||||
rectifierData3: res.data,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectuserinfo/queryAllProjectUserByParams',
|
||||
method:"get",
|
||||
data:{
|
||||
projectId:that.data.projectId,
|
||||
loginName:that.data.loginName,
|
||||
selectMy:'Y'
|
||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/queryAllProjectUserByParams',
|
||||
method: "get",
|
||||
data: {
|
||||
projectId: that.data.projectId,
|
||||
loginName: that.data.loginName,
|
||||
selectMy: 'Y'
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
success(res) {
|
||||
res = res.data;
|
||||
if (res.code == 200) {
|
||||
let findMy = false;
|
||||
res.data.forEach(it => {
|
||||
if (it.userinfoList.length > 0) {
|
||||
it.userinfoList.forEach(u => {
|
||||
if (that.data.loginName == u.phonenumber) {
|
||||
findMy = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if(!findMy){
|
||||
res.data[0].userinfoList.push({state:false,nickName:that.data.userName,jobTypeName:'集团公司',phonenumber:that.data.loginName});
|
||||
}
|
||||
that.setData({
|
||||
rectifierData2:res.data,
|
||||
rectifierData2: res.data,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getHisInfo(){
|
||||
getHisInfo() {
|
||||
//这里查询当前登录人上次提交隐患,自动填充整改人,复检人,抄送人
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/findLastDataByParams',
|
||||
method:"get",
|
||||
data:{
|
||||
projectId:that.data.projectId,
|
||||
createUser:that.data.loginName,
|
||||
infoType:1
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/findLastDataByParams',
|
||||
method: "get",
|
||||
data: {
|
||||
projectId: that.data.projectId,
|
||||
createUser: that.data.loginName,
|
||||
infoType: 1
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200 && res.data){
|
||||
if (res.code == 200 && res.data) {
|
||||
that.setData({
|
||||
showHis:true,
|
||||
lordSent:res.data.lordSent,
|
||||
lordSentUser:res.data.lordSentUser,
|
||||
recheckSend:res.data.recheckSend,
|
||||
recheckSendUser:res.data.recheckSendUser,
|
||||
copySend:res.data.copySend,
|
||||
copySendUser:res.data.copySendUser
|
||||
showHis: true,
|
||||
lordSent: res.data.lordSent,
|
||||
lordSentUser: res.data.lordSentUser,
|
||||
recheckSend: res.data.recheckSend,
|
||||
recheckSendUser: res.data.recheckSendUser,
|
||||
copySend: res.data.copySend,
|
||||
copySendUser: res.data.copySendUser
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDangerTypeList(){
|
||||
getDangerTypeList() {
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/queryDangerType',
|
||||
method:"get",
|
||||
data:{
|
||||
type:'ssp_zlyhlx'
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryDangerType',
|
||||
method: "get",
|
||||
data: {
|
||||
type: 'ssp_zlyhlx'
|
||||
},
|
||||
header:{
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let list=[];
|
||||
res.data.forEach(it =>{
|
||||
list.push({"id":it.dictValue,"text":it.dictLabel});
|
||||
if (res.code == 200) {
|
||||
let list = [];
|
||||
res.data.forEach(it => {
|
||||
list.push({
|
||||
"id": it.dictValue,
|
||||
"text": it.dictLabel
|
||||
});
|
||||
})
|
||||
that.setData({
|
||||
dangerTypeList:list
|
||||
dangerTypeList: list
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -164,7 +191,7 @@ Page({
|
|||
},
|
||||
|
||||
//隐患描述
|
||||
onInputWorkParts(e){
|
||||
onInputWorkParts(e) {
|
||||
let workParts = e.detail.value
|
||||
this.setData({
|
||||
workParts
|
||||
|
@ -172,7 +199,7 @@ Page({
|
|||
},
|
||||
|
||||
//整改要求
|
||||
onInputChangeInfoValue(e){
|
||||
onInputChangeInfoValue(e) {
|
||||
let changeInfo = e.detail.value
|
||||
this.setData({
|
||||
changeInfo
|
||||
|
@ -180,7 +207,7 @@ Page({
|
|||
},
|
||||
|
||||
//验收时间
|
||||
onInputTime(e){
|
||||
onInputTime(e) {
|
||||
let nickedTime = e.detail
|
||||
this.setData({
|
||||
nickedTime
|
||||
|
@ -188,161 +215,178 @@ Page({
|
|||
},
|
||||
|
||||
// list 上传图片
|
||||
onImagesArr(e){
|
||||
onImagesArr(e) {
|
||||
var data = this.data.imageInfoData
|
||||
data = e.detail
|
||||
this.setData({
|
||||
imageInfoData:data
|
||||
imageInfoData: data
|
||||
})
|
||||
},
|
||||
|
||||
//添加整改人
|
||||
onAddLordSent(e){
|
||||
if(e.detail.length>0){
|
||||
onAddLordSent(e) {
|
||||
if (e.detail.length > 0) {
|
||||
this.setData({
|
||||
lordSent:e.detail[0].userName,
|
||||
lordSentUser:e.detail[0].phoneNumber
|
||||
lordSent: e.detail[0].userName,
|
||||
lordSentUser: e.detail[0].phoneNumber
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//添加抄送人
|
||||
onAddCopySend(e){
|
||||
if(e.detail.length>0){
|
||||
let phoneNumbers="";
|
||||
let userNames="";
|
||||
e.detail.forEach(it =>{
|
||||
phoneNumbers+=","+it.phoneNumber;
|
||||
userNames+=","+it.userName;
|
||||
onAddCopySend(e) {
|
||||
if (e.detail.length > 0) {
|
||||
let phoneNumbers = "";
|
||||
let userNames = "";
|
||||
e.detail.forEach(it => {
|
||||
phoneNumbers += "," + it.phoneNumber;
|
||||
userNames += "," + it.userName;
|
||||
});
|
||||
this.setData({
|
||||
copySend:userNames.substring(1),
|
||||
copySendUser:phoneNumbers.substring(1)
|
||||
copySend: userNames.substring(1),
|
||||
copySendUser: phoneNumbers.substring(1)
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.setData({
|
||||
copySend:"",
|
||||
copySendUser:""
|
||||
copySend: "",
|
||||
copySendUser: ""
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//添加复检人
|
||||
onAddRecheckSend(e){
|
||||
if(e.detail.length>0){
|
||||
onAddRecheckSend(e) {
|
||||
if (e.detail.length > 0) {
|
||||
this.setData({
|
||||
recheckSend:e.detail[0].userName,
|
||||
recheckSendUser:e.detail[0].phoneNumber
|
||||
recheckSend: e.detail[0].userName,
|
||||
recheckSendUser: e.detail[0].phoneNumber
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//取消页面
|
||||
cancelSaveView(){
|
||||
cancelSaveView() {
|
||||
this.returnToPage()
|
||||
},
|
||||
|
||||
//保存
|
||||
onProblemSubmitSave(){
|
||||
onProblemSubmitSave() {
|
||||
this.setData({
|
||||
loadShow:true
|
||||
loadShow: true
|
||||
})
|
||||
let that = this
|
||||
let {projectId,projectName,dangerType,lordSent,lordSentUser,copySend,copySendUser,workParts,changeInfo,nickedTime,recheckSend,recheckSendUser,imageInfoData,loginName,problemType,userName} = that.data;
|
||||
let {
|
||||
projectId,
|
||||
projectName,
|
||||
dangerType,
|
||||
lordSent,
|
||||
lordSentUser,
|
||||
copySend,
|
||||
copySendUser,
|
||||
workParts,
|
||||
changeInfo,
|
||||
nickedTime,
|
||||
recheckSend,
|
||||
recheckSendUser,
|
||||
imageInfoData,
|
||||
loginName,
|
||||
problemType,
|
||||
userName
|
||||
} = that.data;
|
||||
//数据效验
|
||||
if(projectId==""||loginName==""){
|
||||
if (projectId == "" || loginName == "") {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(imageInfoData.length==0){
|
||||
if (imageInfoData.length == 0) {
|
||||
app.toast("请上传隐患现场图片!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(problemType==""){
|
||||
if (problemType == "") {
|
||||
app.toast("请选择检查类型!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(dangerType==""){
|
||||
if (dangerType == "") {
|
||||
app.toast("请选择隐患类型!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(workParts==""){
|
||||
if (workParts == "") {
|
||||
app.toast("请填写隐患描述!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(changeInfo==""){
|
||||
if (changeInfo == "") {
|
||||
app.toast("请填写隐患整改要求!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(nickedTime==""){
|
||||
if (nickedTime == "") {
|
||||
app.toast("请选择整改截至时间!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(lordSent==""||lordSentUser==""){
|
||||
if (lordSent == "" || lordSentUser == "") {
|
||||
app.toast("请选择整改人!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(recheckSend==""||recheckSendUser==""){
|
||||
if (recheckSend == "" || recheckSendUser == "") {
|
||||
app.toast("请选择复检人!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(copySend==""||copySendUser==""){
|
||||
if (copySend == "" || copySendUser == "") {
|
||||
app.toast("请选择抄送人!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
let pos = copySend.split(",");
|
||||
pos.forEach(it =>{
|
||||
if(it==lordSent){
|
||||
pos.forEach(it => {
|
||||
if (it == lordSent) {
|
||||
app.toast("抄送人中不能包含整改人!")
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
});
|
||||
let fileUrls = [];
|
||||
imageInfoData.forEach(async (item)=>{
|
||||
let uploadUrl = app.globalData.uploadUrl+'/common/upload'
|
||||
let name = "file"
|
||||
imageInfoData.forEach(async (item) => {
|
||||
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
||||
let name = "file"
|
||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||
let obj = await that.syncUploadImage(uploadUrl,item,name);
|
||||
let obj = await that.syncUploadImage(uploadUrl, item, name);
|
||||
fileUrls.push(obj.data.fileName);
|
||||
//验证图片上传完毕
|
||||
if(fileUrls.length == imageInfoData.length){
|
||||
if (fileUrls.length == imageInfoData.length) {
|
||||
let params = {
|
||||
projectId,
|
||||
infoType:"1",
|
||||
problemArea:projectName,
|
||||
infoType: "1",
|
||||
problemArea: projectName,
|
||||
problemType,
|
||||
workParts,
|
||||
changeInfo,
|
||||
|
@ -350,95 +394,97 @@ Page({
|
|||
lordSentUser,
|
||||
copySend,
|
||||
copySendUser,
|
||||
checkState:0,
|
||||
nickedTime:nickedTime+" 23:59:59",
|
||||
smarkUrl:fileUrls.toString(),
|
||||
createUser:loginName,
|
||||
checkState: 0,
|
||||
nickedTime: nickedTime + " 23:59:59",
|
||||
smarkUrl: fileUrls.toString(),
|
||||
createUser: loginName,
|
||||
dangerType,
|
||||
recheckSend,
|
||||
recheckSendUser
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/addQuality',
|
||||
method:"POST",
|
||||
data:params,
|
||||
method: "POST",
|
||||
data: params,
|
||||
header: {
|
||||
"Username": loginName,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
success(res){
|
||||
success(res) {
|
||||
that.setData({
|
||||
loadShow:false
|
||||
loadShow: false
|
||||
})
|
||||
res =res.data
|
||||
if(res.code == 200){
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
app.toast("添加成功!")
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},200)
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 这里考虑上传图片异步问题,封装为同步
|
||||
*/
|
||||
syncUploadImage(url,uploadFile,name) {
|
||||
syncUploadImage(url, uploadFile, name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: { user: 'test' },
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
url, // 上传的服务器接口地址
|
||||
filePath: uploadFile,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
name, //上传的所需字段,后端提供
|
||||
formData: {
|
||||
user: 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
//选择检查类型
|
||||
onSelectProblemType(e){
|
||||
onSelectProblemType(e) {
|
||||
this.setData({
|
||||
problemType:e.detail.id
|
||||
problemType: e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
//选择隐患类型
|
||||
onSelectDangerType(e){
|
||||
this.setData({
|
||||
dangerType:e.detail.id
|
||||
})
|
||||
},
|
||||
onSelectDangerType(e) {
|
||||
this.setData({
|
||||
dangerType: e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -18,7 +18,9 @@ Page({
|
|||
minImageList:[],
|
||||
auditImageList:[],
|
||||
auditMinImageList:[],
|
||||
request:app.globalData.reqUrl
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||
active: 3
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -1,43 +1,98 @@
|
|||
<!--pageage/safetyManagement/problemRectification/index.wxml-->
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">质量隐患复检</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">质量隐患复检</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="module_title module_title_padding">
|
||||
<view>{{infoData.problemArea}}</view>
|
||||
</view>
|
||||
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<!-- <van-collapse-item title="申请流程" name="1">
|
||||
<view class="left_manage2" wx:for="{{flowNodes}}" wx:key="index">
|
||||
<text class="safety_issue_number {{item.state}}">{{item.name}}</text>
|
||||
</view>
|
||||
</van-collapse-item> -->
|
||||
<van-collapse-item title="审批日志" name="2">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">{{item.taskName}}{{item.commentResult}}
|
||||
<text wx:if="{{item.commentResult=='通过'}}" class="timeline_for_state_1 color_green">{{item.commentResult}}</text>
|
||||
<text wx:if="{{item.commentResult=='驳回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
|
||||
<text wx:if="{{item.commentResult=='退回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.assigneeName}}">
|
||||
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.assigneeName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.assigneeName}}">
|
||||
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.candidate}}">
|
||||
<image src="/images/s_2.png"></image>候选办理:<text>{{item.candidate}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.deleteReason}}">
|
||||
<image src="/images/s_18.png"></image>驳回节点:<text>{{item.deleteReason}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/images/s_6.png"></image>接收时间:<text>{{item.startTime}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.endTime}}">
|
||||
<image src="/images/lw_8.png"></image>处理时间:<text>{{item.endTime}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.duration}}">
|
||||
<image src="/images/img_11.png"></image>处理耗时:<text>{{item.duration}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.message}}">
|
||||
<image src="/images/s_7.png"></image>处理意见:<text>{{item.message}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">隐患图片</text></van-col>
|
||||
<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>
|
||||
<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">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">问题类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">问题类型</text></van-col>
|
||||
<van-col span="18">
|
||||
<text class="timeline_for_state_1" wx:if="{{infoData.problemType=='1'}}">常规检查</text>
|
||||
<text class="timeline_for_state_2" wx:if="{{infoData.problemType=='2'}}">专项检查</text>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">隐患类型</text></van-col>
|
||||
|
@ -103,56 +158,55 @@
|
|||
</view>
|
||||
|
||||
<view class="inspect_overview" wx:if="{{infoData.checkState==1 || infoData.checkState==4}}">
|
||||
<view class="module_title module_title_padding">
|
||||
<view>问题整改</view>
|
||||
<view class="module_title module_title_padding">
|
||||
<view>问题整改</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">整改说明</text></van-col>
|
||||
<van-col span="18">{{auditInfo.opinion}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">整改说明</text></van-col>
|
||||
<van-col span="18">{{auditInfo.opinion}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">整改后图片</text></van-col>
|
||||
<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}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">完成时间</text></van-col>
|
||||
<van-col span="18" class="color_green">{{infoData.nickedTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">整改后图片</text></van-col>
|
||||
<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}}">
|
||||
<van-row>
|
||||
<van-col span="6"><text class="color_purple">完成时间</text></van-col>
|
||||
<van-col span="18" class="color_green">{{infoData.nickedTime}}</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_overview" wx:if="true">
|
||||
<view class="module_title module_title_padding">
|
||||
<view>整改复检意见</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_info_list" >
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写整改复检意见"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputOpinion" maxlength="200"/>
|
||||
<view class="module_title module_title_padding">
|
||||
<view>整改复检意见</view>
|
||||
</view>
|
||||
<view class="inspect_overview_list_max">
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写整改复检意见" placeholder-style="color:#6777aa;" bindinput="onInputOpinion" maxlength="200" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="onRejectSave">整改驳回</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onPassSave">整改通过</view>
|
||||
</view>
|
||||
<view class="problem_submit_to_btn" bindtap="onRejectSave">整改驳回</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onPassSave">整改通过</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-overlay show="{{loadShow}}">
|
||||
<view class="gif">
|
||||
<image src="/../images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
||||
|
||||
<van-overlay show="{{loadShow}}">
|
||||
<view class="gif">
|
||||
<image src="/../images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
|
@ -22,6 +22,8 @@ Page({
|
|||
],
|
||||
lordSent:"",
|
||||
lordSentUser:"",
|
||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||
active: 0
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title_2 module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
@ -47,7 +48,7 @@
|
|||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">提交隐患</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">保存草稿</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
|
@ -2,221 +2,252 @@
|
|||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id:"",
|
||||
infoData:{},
|
||||
loadShow:false,
|
||||
auditInfo:{},
|
||||
loginName:"",
|
||||
showDel:false,
|
||||
imageList:[],
|
||||
minImageList:[],
|
||||
auditImageList:[],
|
||||
auditMinImageList:[],
|
||||
request:app.globalData.reqUrl
|
||||
},
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: "",
|
||||
infoData: {},
|
||||
loadShow: false,
|
||||
auditInfo: {},
|
||||
loginName: "",
|
||||
showDel: false,
|
||||
imageList: [],
|
||||
minImageList: [],
|
||||
auditImageList: [],
|
||||
auditMinImageList: [],
|
||||
request: app.globalData.reqUrl,
|
||||
flowNodes: [{
|
||||
text: '开始'
|
||||
}, {
|
||||
text: '提交隐患'
|
||||
}, {
|
||||
text: '隐患整改'
|
||||
}, {
|
||||
text: '隐患复检'
|
||||
}, {
|
||||
text: '结束'
|
||||
}],
|
||||
active: 100
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {id} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success:res=>{
|
||||
this.setData({
|
||||
id,
|
||||
loginName:res.data.loginName
|
||||
})
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo(){
|
||||
let {id} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/info',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if(res.data.smarkUrl){
|
||||
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({
|
||||
showDel:true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {
|
||||
id
|
||||
} = options
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: res => {
|
||||
this.setData({
|
||||
id,
|
||||
loginName: res.data.loginName
|
||||
})
|
||||
},
|
||||
this.getInfo();
|
||||
this.getAuditinfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getAuditinfo(){
|
||||
let {id} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/queryAuditInfo',
|
||||
method:"get",
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200 && res.data){
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if(res.data.fileUrls){
|
||||
res.data.fileUrls.split(',').forEach(element => {
|
||||
urls.push(that.data.request+element);
|
||||
minUrls.push(that.data.request+element+'.min.jpg');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全检查详情信息
|
||||
*
|
||||
*/
|
||||
getInfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/info',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
let state = that.data.active;
|
||||
if (res.data.checkState == "0") {
|
||||
state = 2;
|
||||
} else if (res.data.checkState == "1") {
|
||||
state = 3;
|
||||
} else if (res.data.checkState == "3") {
|
||||
state = 1;
|
||||
}
|
||||
that.setData({
|
||||
active: state
|
||||
})
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if (res.data.smarkUrl) {
|
||||
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({
|
||||
auditInfo:res.data,
|
||||
auditImageList:urls,
|
||||
auditMinImageList:minUrls
|
||||
showDel: true
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(){
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData(){
|
||||
let {id} = this.data
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl+'/wechat/projectProblemmodify/removeQuality',
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data:{
|
||||
id:id
|
||||
},
|
||||
method:"get",
|
||||
success(res){
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//展示图片
|
||||
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]
|
||||
})
|
||||
getAuditinfo() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
let that = this
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryAuditInfo',
|
||||
method: "get",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success(res) {
|
||||
res = res.data
|
||||
if (res.code == 200 && res.data) {
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if (res.data.fileUrls) {
|
||||
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,
|
||||
auditImageList: urls,
|
||||
auditMinImageList: minUrls
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
onDelete() {
|
||||
//弹出确认
|
||||
let that = this
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定删除此条数据?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
// 用户点击了确定 可以调用了
|
||||
that.deleteData();
|
||||
} else if (sm.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteData() {
|
||||
let {
|
||||
id
|
||||
} = this.data
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/removeQuality',
|
||||
header: {
|
||||
"Username": this.data.loginName,
|
||||
},
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
method: "get",
|
||||
success(res) {
|
||||
app.toast("删除成功!")
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
url: `../list/index`,
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
//展示图片
|
||||
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]
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
},
|
||||
|
||||
}
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,5 +1,9 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"usingComponents": {
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"navigationBarTitleText": "质量隐患详情"
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="module_title module_title_padding">
|
||||
|
|
|
@ -64,6 +64,76 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if (options && options.barProId) {
|
||||
//数据未加载完毕,从文件读取数据
|
||||
if (app.globalData.projectInfoList.length == 0) {
|
||||
wx.getStorage({
|
||||
key: 'projectInfoList',
|
||||
success: res => {
|
||||
app.globalData.projectInfoList = res.data;
|
||||
app.globalData.projectInfoList.forEach(item => {
|
||||
if (item.projectId == options.barProId) {
|
||||
app.globalData.projectId = item.projectId;
|
||||
app.globalData.projectName = item.projectName;
|
||||
}
|
||||
});
|
||||
//未查询到项目信息
|
||||
if (!app.globalData.projectId) {
|
||||
app.globalData.projectInfoList.push({
|
||||
projectId: options.barProId,
|
||||
projectId: options.barProName
|
||||
});
|
||||
app.globalData.projectId = options.barProId;
|
||||
app.globalData.projectName = options.barProName;
|
||||
}
|
||||
//从缓存读取项目信息
|
||||
this.setData({
|
||||
initData: {
|
||||
text: app.globalData.projectName,
|
||||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
wx.redirectTo({
|
||||
url: '../pages/login/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
app.globalData.projectInfoList.forEach(item => {
|
||||
if (item.projectId == options.barProId) {
|
||||
app.globalData.projectId = item.projectId;
|
||||
app.globalData.projectName = item.projectName;
|
||||
}
|
||||
});
|
||||
//未查询到项目信息
|
||||
if (!app.globalData.projectId) {
|
||||
app.globalData.projectInfoList.push({
|
||||
projectId: options.barProId,
|
||||
projectId: options.barProName
|
||||
});
|
||||
app.globalData.projectId = options.barProId;
|
||||
app.globalData.projectName = options.barProName;
|
||||
}
|
||||
//从缓存读取项目信息
|
||||
this.setData({
|
||||
initData: {
|
||||
text: app.globalData.projectName,
|
||||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
//从缓存读取项目信息
|
||||
this.setData({
|
||||
initData: {
|
||||
text: app.globalData.projectName,
|
||||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
|
|
|
@ -57,19 +57,19 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="../https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to_darft" bindtap="skipAddDarft">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="/../images/new_add.png"></image>
|
||||
<image src="/images/new_add.png"></image>
|
||||
<view>草稿</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to" bindtap="skipAdd">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="/../images/new_add.png"></image>
|
||||
<image src="/images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -17,7 +17,9 @@ Page({
|
|||
status:"0",
|
||||
imageList:[],
|
||||
minImageList:[],
|
||||
request:app.globalData.reqUrl
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||
active: 2
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="module_title module_title_padding">
|
||||
|
|
|
@ -34,7 +34,9 @@ Page({
|
|||
selectIndex:"",
|
||||
problemType:"1",
|
||||
showHis:false,
|
||||
problemTypeList:[{id:"1",text:"常规检查"},{id:"2",text:"专项检查"}]
|
||||
problemTypeList:[{id:"1",text:"常规检查"},{id:"2",text:"专项检查"}],
|
||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||
active: 0
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -100,6 +102,19 @@ Page({
|
|||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let findMy = false;
|
||||
res.data.forEach(it => {
|
||||
if (it.userinfoList.length > 0) {
|
||||
it.userinfoList.forEach(u => {
|
||||
if (that.data.loginName == u.phonenumber) {
|
||||
findMy = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if(!findMy){
|
||||
res.data[0].userinfoList.push({state:false,nickName:that.data.userName,jobTypeName:'集团公司',phonenumber:that.data.loginName});
|
||||
}
|
||||
that.setData({
|
||||
rectifierData2:res.data,
|
||||
});
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
|
|
@ -18,7 +18,9 @@ Page({
|
|||
minImageList:[],
|
||||
auditImageList:[],
|
||||
auditMinImageList:[],
|
||||
request:app.globalData.reqUrl
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||
active: 3
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="module_title module_title_padding">
|
||||
|
|
|
@ -22,6 +22,8 @@ Page({
|
|||
],
|
||||
lordSent:"",
|
||||
lordSentUser:"",
|
||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||
active: 0
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title_2 module_title_flex">
|
||||
<view>{{projectName}}</view>
|
||||
|
@ -47,7 +48,7 @@
|
|||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">提交隐患</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">保存草稿</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
|
@ -15,7 +15,9 @@ Page({
|
|||
minImageList:[],
|
||||
auditImageList:[],
|
||||
auditMinImageList:[],
|
||||
request:app.globalData.reqUrl
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||
active: 100
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -54,6 +56,17 @@ Page({
|
|||
success(res){
|
||||
res = res.data
|
||||
if(res.code == 200){
|
||||
let state = that.data.active;
|
||||
if (res.data.checkState == "0") {
|
||||
state = 2;
|
||||
} else if (res.data.checkState == "1") {
|
||||
state = 3;
|
||||
} else if (res.data.checkState == "3") {
|
||||
state = 1;
|
||||
}
|
||||
that.setData({
|
||||
active: state
|
||||
})
|
||||
let urls = [];
|
||||
let minUrls = [];
|
||||
if(res.data.smarkUrl){
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"usingComponents": {
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"navigationBarTitleText": "安全隐患详情"
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="module_title module_title_padding">
|
||||
|
|
|
@ -57,6 +57,76 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if (options && options.barProId) {
|
||||
//数据未加载完毕,从文件读取数据
|
||||
if (app.globalData.projectInfoList.length == 0) {
|
||||
wx.getStorage({
|
||||
key: 'projectInfoList',
|
||||
success: res => {
|
||||
app.globalData.projectInfoList = res.data;
|
||||
app.globalData.projectInfoList.forEach(item => {
|
||||
if (item.projectId == options.barProId) {
|
||||
app.globalData.projectId = item.projectId;
|
||||
app.globalData.projectName = item.projectName;
|
||||
}
|
||||
});
|
||||
//未查询到项目信息
|
||||
if (!app.globalData.projectId) {
|
||||
app.globalData.projectInfoList.push({
|
||||
projectId: options.barProId,
|
||||
projectId: options.barProName
|
||||
});
|
||||
app.globalData.projectId = options.barProId;
|
||||
app.globalData.projectName = options.barProName;
|
||||
}
|
||||
//从缓存读取项目信息
|
||||
this.setData({
|
||||
initData: {
|
||||
text: app.globalData.projectName,
|
||||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
//未获取用户信息时,重新登录
|
||||
wx.redirectTo({
|
||||
url: '../pages/login/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
app.globalData.projectInfoList.forEach(item => {
|
||||
if (item.projectId == options.barProId) {
|
||||
app.globalData.projectId = item.projectId;
|
||||
app.globalData.projectName = item.projectName;
|
||||
}
|
||||
});
|
||||
//未查询到项目信息
|
||||
if (!app.globalData.projectId) {
|
||||
app.globalData.projectInfoList.push({
|
||||
projectId: options.barProId,
|
||||
projectId: options.barProName
|
||||
});
|
||||
app.globalData.projectId = options.barProId;
|
||||
app.globalData.projectName = options.barProName;
|
||||
}
|
||||
//从缓存读取项目信息
|
||||
this.setData({
|
||||
initData: {
|
||||
text: app.globalData.projectName,
|
||||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
//从缓存读取项目信息
|
||||
this.setData({
|
||||
initData: {
|
||||
text: app.globalData.projectName,
|
||||
id: app.globalData.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
|
|
|
@ -56,19 +56,19 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="../https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="../https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to_darft" bindtap="skipAddDarft">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="/../images/new_add.png"></image>
|
||||
<image src="/images/new_add.png"></image>
|
||||
<view>草稿</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to" bindtap="skipAdd">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="/../images/new_add.png"></image>
|
||||
<image src="/images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -17,7 +17,9 @@ Page({
|
|||
status:"0",
|
||||
imageList:[],
|
||||
minImageList:[],
|
||||
request:app.globalData.reqUrl
|
||||
request:app.globalData.reqUrl,
|
||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||
active: 2
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" rejectNode="{{ active<100 && infoData.checkState=='3' ? active+1:0 }}" />
|
||||
<view class="inspect_overview_max">
|
||||
<view class="inspect_overview">
|
||||
<view class="module_title module_title_padding">
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
}
|
||||
.van-cell.van-cell--clickable{
|
||||
background-color: #2b345b;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-bottom: 5rpx;
|
||||
color: #fff;
|
||||
border-radius: 15rpx;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue