|
|
@@ -1273,7 +1273,7 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
"detachedform.certificateEvidence"(newValue) {
|
|
|
- if (newValue === 1) {
|
|
|
+ if (newValue === 1&&this.detachedform.certificate==null&&this.detachedimgs.length==0) {
|
|
|
this.reqmsg = true;
|
|
|
}
|
|
|
if (newValue === 0) {
|
|
|
@@ -1281,7 +1281,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
"Bankform.certificateEvidence"(newValue) {
|
|
|
- if (newValue === 1) {
|
|
|
+ // console.log(this.Bankimgs.length,"this.imgs")
|
|
|
+ // console.log(this.Bankform.certificate,"Bankform.certificate")
|
|
|
+ if (newValue === 1&&this.Bankform.certificate==null&&this.Bankimgs.length==0) {
|
|
|
this.reqmsg = true;
|
|
|
}
|
|
|
if (newValue === 0) {
|
|
|
@@ -1289,7 +1291,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
"Businessform.certificateEvidence"(newValue) {
|
|
|
- if (newValue === 1) {
|
|
|
+ if (newValue === 1&&this.Businessform.certificate==null&&this.Businessimgs.length==0) {
|
|
|
this.reqmsg = true;
|
|
|
}
|
|
|
if (newValue === 0) {
|
|
|
@@ -1297,7 +1299,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
"orgform.certificateEvidence"(newValue) {
|
|
|
- if (newValue === 1) {
|
|
|
+ if (newValue === 1&&this.orgform.certificate==null&&this.orgimgs.length==0) {
|
|
|
this.reqmsg = true;
|
|
|
}
|
|
|
if (newValue === 0) {
|
|
|
@@ -1345,7 +1347,7 @@ export default {
|
|
|
// },
|
|
|
getImgUrl(img) {
|
|
|
this.imgs.push(img);
|
|
|
- console.log(this.imgs, "imgs");
|
|
|
+ // console.log(this.imgs, "imgs");
|
|
|
},
|
|
|
getAreaList() {
|
|
|
selectCityInfoVoList({}).then((response) => {
|
|
|
@@ -1365,15 +1367,19 @@ export default {
|
|
|
//证书上传
|
|
|
uploadBusinessSuccess(img) {
|
|
|
this.Businessimgs.push(img);
|
|
|
+ this.reqmsg = false;
|
|
|
},
|
|
|
uploadBankSuccess(img) {
|
|
|
this.Bankimgs.push(img);
|
|
|
+ this.reqmsg = false;
|
|
|
},
|
|
|
uploadorgSuccess(img) {
|
|
|
this.orgimgs.push(img);
|
|
|
+ this.reqmsg = false;
|
|
|
},
|
|
|
uploaddetachedSuccess(img) {
|
|
|
this.detachedimgs.push(img);
|
|
|
+ this.reqmsg = false;
|
|
|
},
|
|
|
|
|
|
handleInput() {
|
|
|
@@ -1545,7 +1551,7 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitBusinessForm() {
|
|
|
- if(this.Businessimgs.length>1){
|
|
|
+ if(this.Businessimgs.length>0){
|
|
|
this.Businessform.certificate= this.Businessimgs[this.Businessimgs.length - 1].toString(",");
|
|
|
}
|
|
|
|
|
|
@@ -1573,6 +1579,7 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
+ this.Businessimgs=[];
|
|
|
} else {
|
|
|
// 表单验证未通过,显示错误信息
|
|
|
}
|
|
|
@@ -1632,6 +1639,7 @@ export default {
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleBankAdd() {
|
|
|
+
|
|
|
this.Bankreset();
|
|
|
this.Bankopen = true;
|
|
|
this.Banktitle = "新增安全防范设施建设达标情况";
|
|
|
@@ -1648,7 +1656,7 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitBankForm() {
|
|
|
- if(this.Bankimgs.length>1){
|
|
|
+ if(this.Bankimgs.length>0){
|
|
|
this.Bankform.certificate= this.Bankimgs[this.Bankimgs.length - 1].toString(",");
|
|
|
}
|
|
|
|
|
|
@@ -1676,11 +1684,12 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
+ this.Bankimgs = [];
|
|
|
} else {
|
|
|
// 表单验证未通过,显示错误信息
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
// this.$refs["Bankform"].validate((valid) => {
|
|
|
// if (valid) {
|
|
|
|
|
|
@@ -1749,7 +1758,7 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitdetachedForm() {
|
|
|
- if(this.detachedimgs.length>1){
|
|
|
+ if(this.detachedimgs.length>0){
|
|
|
this.detachedform.certificate= this.detachedimgs[this.detachedimgs.length - 1].toString(",");
|
|
|
}
|
|
|
|
|
|
@@ -1768,6 +1777,7 @@ export default {
|
|
|
this.getdetachedPhysicalDefenseConstructionInfo();
|
|
|
}
|
|
|
);
|
|
|
+
|
|
|
} else {
|
|
|
addOrgPhysicalDefenseConstruction(this.detachedform).then(
|
|
|
(response) => {
|
|
|
@@ -1777,6 +1787,7 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
+ this.detachedimgs=[];
|
|
|
} else {
|
|
|
// 表单验证未通过,显示错误信息
|
|
|
}
|
|
|
@@ -1843,18 +1854,24 @@ export default {
|
|
|
this.orgreset();
|
|
|
const id = row.id || this.orgids;
|
|
|
getOrgPhysicalDefenseConstruction(id).then((response) => {
|
|
|
- // console.log(response)
|
|
|
+
|
|
|
this.orgform = response.data;
|
|
|
this.orgopen = true;
|
|
|
+ console.log(response.data.certificateEvidence,"response.data.certificateEvidence")
|
|
|
+ this.orgform.certificateEvidence=1;
|
|
|
+ console.log(this.orgform,"this.orgform")
|
|
|
this.orgtitle = "编辑安全防范设施建设达标情况";
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitOrgForm() {
|
|
|
- if(this.orgimgs.length>1){
|
|
|
+ // console.log(this.orgimgs,"this.orgimgs")
|
|
|
+ // console.log(this.orgform.certificate,"this.orgform.certificate")
|
|
|
+ if(this.orgimgs.length>0){
|
|
|
this.orgform.certificate= this.orgimgs[this.orgimgs.length - 1].toString(",");
|
|
|
}
|
|
|
-
|
|
|
+ // console.log(this.orgimgs,"this.orgimgs1")
|
|
|
+ // console.log(this.orgform.certificate,"this.orgform.certificate1")
|
|
|
this.$refs.orgform.validate((valid) => {
|
|
|
if (valid) {
|
|
|
// 表单验证通过,提交数据或执行其他操作
|
|
|
@@ -1876,6 +1893,7 @@ export default {
|
|
|
this.getOrgPhysicalDefenseConstructionInfo();
|
|
|
});
|
|
|
}
|
|
|
+ this.orgimgs=[];
|
|
|
} else {
|
|
|
// 表单验证未通过,显示错误信息
|
|
|
}
|
|
|
@@ -1931,17 +1949,20 @@ export default {
|
|
|
if (this.extendId) {
|
|
|
updateExtend(dat).then((res) => {
|
|
|
this.$modal.msgSuccess("保存成功");
|
|
|
- this.$router.go(-1);
|
|
|
+ // this.$router.go(-1);
|
|
|
+ this.$tab.closePageAndPushPrev();
|
|
|
});
|
|
|
} else {
|
|
|
addExtend(dat).then((res) => {
|
|
|
this.$modal.msgSuccess("保存成功");
|
|
|
- this.$router.go(-1);
|
|
|
+ // this.$router.go(-1);
|
|
|
+ this.$tab.closePageAndPushPrev();
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
nosaveExtend() {
|
|
|
- this.$router.go(-1);
|
|
|
+ // this.$router.go(-1);
|
|
|
+ this.$tab.closePageAndPushPrev();
|
|
|
},
|
|
|
triggerFileInput() {
|
|
|
this.$refs.fileInput.click();
|