|
@@ -281,12 +281,17 @@ export default {
|
|
|
this.$set(this.payForm, "minCourseNum", null);
|
|
|
},
|
|
|
async submit() {
|
|
|
- this.$refs.salaryInfo.$refs.salaryForm.validate((flag) => {
|
|
|
- if (flag) {
|
|
|
- this.baseForm.status = "PROGRESS";
|
|
|
- this.submitDataFormat("PROGRESS");
|
|
|
- }
|
|
|
- });
|
|
|
+ if (this.$refs?.salaryInfo?.$refs?.salaryForm) {
|
|
|
+ this.$refs.salaryInfo.$refs.salaryForm.validate((flag) => {
|
|
|
+ if (flag) {
|
|
|
+ this.baseForm.status = "PROGRESS";
|
|
|
+ this.submitDataFormat("PROGRESS");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.baseForm.status = "PROGRESS";
|
|
|
+ this.submitDataFormat("PROGRESS");
|
|
|
+ }
|
|
|
},
|
|
|
save() {
|
|
|
this.baseForm.status = "DRAFT";
|
|
@@ -364,15 +369,14 @@ export default {
|
|
|
if (status == "DRAFT") {
|
|
|
this.$message.success("恭喜你,保存草稿成功");
|
|
|
this.baseForm.id = res.data.id;
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.formatDetail(res.data);
|
|
|
- })
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.formatDetail(res.data);
|
|
|
+ });
|
|
|
this.$router.push({
|
|
|
query: merge(this.$route.query, {
|
|
|
id: res.data.id,
|
|
|
}),
|
|
|
});
|
|
|
-
|
|
|
} else {
|
|
|
this.$message.success("活动创建成功");
|
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
@@ -406,7 +410,6 @@ export default {
|
|
|
? data.applyToStudentType.split(",")
|
|
|
: [];
|
|
|
// 格式化 baseForm
|
|
|
- console.log(data.studentMaxUsedTimes);
|
|
|
this.$set(this, "baseForm", {
|
|
|
name: data.name,
|
|
|
description: data.description,
|