|
|
@@ -91,25 +91,27 @@ export default { |
|
|
|
}, |
|
|
|
async mounted() { |
|
|
|
if (this.$route.query.id) { |
|
|
|
this.getParamsObj.id = this.$route.query.id |
|
|
|
this.getParamsObj.id = this.$route.query.id; |
|
|
|
} |
|
|
|
if (this.$route.query.week) { |
|
|
|
this.getParamsObj.week = this.$route.query.week |
|
|
|
this.getParamsObj.week = this.$route.query.week; |
|
|
|
} |
|
|
|
if (this.$route.query.pid) { |
|
|
|
this.getParamsObj.pid = this.$route.query.pid |
|
|
|
this.getParamsObj.pid = this.$route.query.pid; |
|
|
|
} |
|
|
|
if (this.$route.query.type) { |
|
|
|
this.getParamsObj.type = this.$route.query.type |
|
|
|
this.getParamsObj.type = this.$route.query.type; |
|
|
|
} |
|
|
|
|
|
|
|
if (this.getParamsObj.id != "" && this.getParamsObj.id != undefined) { |
|
|
|
let res = await this.$api.api.weekFindById({ id: this.getParamsObj.id }); |
|
|
|
console.log(res, 'sadjkasljdklas') |
|
|
|
console.log(res, "sadjkasljdklas"); |
|
|
|
this.ruleForm.suggest = res.data.suggest; |
|
|
|
this.id = res.data.id; |
|
|
|
this.defaultMSG = this.ruleForm.suggest; |
|
|
|
this.week = res.data.weekDate; |
|
|
|
if (res.data.weekDate) { |
|
|
|
this.week = res.data.weekDate; |
|
|
|
} |
|
|
|
this.pid = this.getParamsObj.pid; |
|
|
|
this.type = this.getParamsObj.type; |
|
|
|
} else { |
|
|
@@ -117,8 +119,8 @@ export default { |
|
|
|
weekDate: this.week, |
|
|
|
projectId: this.getParamsObj.pid, |
|
|
|
}); |
|
|
|
console.log(res, 'sadjkasljdklas') |
|
|
|
|
|
|
|
console.log(res, "sadjkasljdklas"); |
|
|
|
|
|
|
|
if (res.data != null) { |
|
|
|
this.ruleForm.suggest = res.data.suggest; |
|
|
|
this.defaultMSG = this.ruleForm.suggest; |
|
|
@@ -153,7 +155,7 @@ export default { |
|
|
|
this.$api.api.insertSelective(this.ruleForm).then((res) => { |
|
|
|
if (res.code == 10000) { |
|
|
|
this.$message.success("操作成功"); |
|
|
|
this.$router.go(-1) |
|
|
|
this.$router.go(-1); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|