|
@ -177,6 +177,7 @@ |
|
|
import { intersection } from "lodash"; |
|
|
import { intersection } from "lodash"; |
|
|
import { |
|
|
import { |
|
|
putInspectionProjectData, |
|
|
putInspectionProjectData, |
|
|
|
|
|
postInspectionProjectData, |
|
|
getCheckingDictTree, |
|
|
getCheckingDictTree, |
|
|
getInspectionProjectDetails, |
|
|
getInspectionProjectDetails, |
|
|
} from "@/api/dike"; |
|
|
} from "@/api/dike"; |
|
@ -288,14 +289,24 @@ export default { |
|
|
this.$message.error("请选择巡检类型"); |
|
|
this.$message.error("请选择巡检类型"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
this.formData.items = this.getCheckData(this.xcTreeData); |
|
|
|
|
|
|
|
|
if (this.$route.query.id) { |
|
|
if (this.$route.query.id) { |
|
|
this.formData.id = this.$route.query.id; |
|
|
this.formData.id = this.$route.query.id; |
|
|
} |
|
|
} |
|
|
this.formData.items = this.getCheckData(this.xcTreeData); |
|
|
|
|
|
putInspectionProjectData(this.formData).then(() => { |
|
|
if(this.formData.id){ |
|
|
|
|
|
putInspectionProjectData(this.formData).then((res) => { |
|
|
this.$message.success("保存成功"); |
|
|
this.$message.success("保存成功"); |
|
|
// this.$router.go(-1); |
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
} else{ |
|
|
|
|
|
postInspectionProjectData(this.formData).then((res) => { |
|
|
|
|
|
if (res.data?.id) { |
|
|
|
|
|
this.formData.id = res.data.id; |
|
|
|
|
|
} |
|
|
|
|
|
this.$message.success("保存成功"); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|