|
@@ -25,6 +25,7 @@
|
|
|
if(option.form){
|
|
|
this.form=JSON.parse(decodeURIComponent(option.form));
|
|
|
}
|
|
|
+ console.log(this.form)
|
|
|
},
|
|
|
onShow() {
|
|
|
this.donghua()
|
|
@@ -66,19 +67,32 @@
|
|
|
self.code = newList[1];
|
|
|
}else if(newList[0] == 'type'){
|
|
|
self.type = newList[1];
|
|
|
+ }else if(newList[0] == 'subId'){
|
|
|
+ self.subId = newList[1];
|
|
|
}
|
|
|
}
|
|
|
- let joinHazardIds=[];
|
|
|
- if(this.form.hazardIds){
|
|
|
- joinHazardIds=this.form.hazardIds.split(',')
|
|
|
- joinHazardIds.push(self.code)
|
|
|
- this.form.joinHazardIds=joinHazardIds
|
|
|
+
|
|
|
+ if(self.type=='10' && self.form.subIds==self.subId){//
|
|
|
+ let joinHazardIds=[];
|
|
|
+ if(this.form.hazardIds){
|
|
|
+ joinHazardIds=this.form.hazardIds.split(',')
|
|
|
+ joinHazardIds.push(self.code)
|
|
|
+ this.form.joinHazardIds=joinHazardIds
|
|
|
+ }else{
|
|
|
+ this.form.joinHazardIds=self.code
|
|
|
+ }
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))+'&joinHazardIds='+self.code
|
|
|
+ });
|
|
|
}else{
|
|
|
- this.form.joinHazardIds=self.code
|
|
|
+ uni.showToast({
|
|
|
+ title: '二维码不正确!',
|
|
|
+ icon:"none",
|
|
|
+ mask:true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
}
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))+'&joinHazardIds='+self.code
|
|
|
- });
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|