|
@@ -63,20 +63,39 @@
|
|
list.forEach((item) => {
|
|
list.forEach((item) => {
|
|
codeData[item.split("=")[0]] = item.split("=")[1];
|
|
codeData[item.split("=")[0]] = item.split("=")[1];
|
|
})
|
|
})
|
|
- self.code = codeData.code;
|
|
|
|
- self.type = codeData.type;
|
|
|
|
- let joinHazardIds = [];
|
|
|
|
- if (this.form.hazardIds) {
|
|
|
|
- joinHazardIds = this.form.hazardIds.split(',')
|
|
|
|
- joinHazardIds.push(self.code)
|
|
|
|
- this.form.joinHazardIds = joinHazardIds
|
|
|
|
|
|
+ if (!codeData.type) {
|
|
|
|
+ if (codeData.type != 10) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请扫描设备二维码',
|
|
|
|
+ icon: "none",
|
|
|
|
+ mask: true,
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ self.code = codeData.code;
|
|
|
|
+ self.type = codeData.type;
|
|
|
|
+ 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.navigateTo({
|
|
|
|
+ url: '/pages_safetyExamine/views/examineManage/examineAddTow?form=' + encodeURIComponent(JSON
|
|
|
|
+ .stringify(
|
|
|
|
+ this.form)) + '&joinHazardIds=' + self.code
|
|
|
|
+ });
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- this.form.joinHazardIds = self.code
|
|
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请扫描正确的二维码',
|
|
|
|
+ icon: "none",
|
|
|
|
+ mask: true,
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages_safetyExamine/views/examineManage/examineAddTow?form=' + encodeURIComponent(JSON.stringify(
|
|
|
|
- this.form)) + '&joinHazardIds=' + self.code
|
|
|
|
- });
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|