|
@@ -190,33 +190,62 @@ export default {
|
|
this.$route.params.educationId
|
|
this.$route.params.educationId
|
|
);
|
|
);
|
|
} else {
|
|
} else {
|
|
- this.formData.educationId = val[0].id;
|
|
|
|
|
|
+ this.moRenBus();
|
|
|
|
+ // this.formData.educationId = val[0].id;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
"formData.educationId"(val) {
|
|
"formData.educationId"(val) {
|
|
- this.formData.businessId = "";
|
|
|
|
|
|
+ if (!this.firstComeIn) {
|
|
|
|
+ this.formData.businessId = "";
|
|
|
|
+ }
|
|
this.getBusinessList(val);
|
|
this.getBusinessList(val);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: { ...mapGetters(["educationType"]) },
|
|
computed: { ...mapGetters(["educationType"]) },
|
|
mounted() {
|
|
mounted() {
|
|
if (this.$route.params.educationId) {
|
|
if (this.$route.params.educationId) {
|
|
- this.$set(
|
|
|
|
- this.formData,
|
|
|
|
- "educationId",
|
|
|
|
- this.$route.params.educationId
|
|
|
|
- );
|
|
|
|
|
|
+ this.$set(this.formData, "educationId", this.$route.params.educationId);
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
!this.formData.educationId &&
|
|
!this.formData.educationId &&
|
|
this.educationType &&
|
|
this.educationType &&
|
|
this.educationType.length
|
|
this.educationType.length
|
|
) {
|
|
) {
|
|
- this.formData.educationId = this.educationType[0].id;
|
|
|
|
|
|
+ this.moRenBus();
|
|
|
|
+ // this.formData.educationId = this.educationType[0].id;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ /**
|
|
|
|
+ * 默认选择继教二建业务层次
|
|
|
|
+ */
|
|
|
|
+ moRenBus() {
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
+ this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
|
|
|
|
+ for (let i = 0; i < res.rows.length; i++) {
|
|
|
|
+ if (res.rows[i].educationName === "继续教育") {
|
|
|
|
+ this.$api
|
|
|
|
+ .inquirebusinessList({ status: 1, educationId: res.rows[i].id })
|
|
|
|
+ .then((result) => {
|
|
|
|
+ for (let j = 0; j < result.rows.length; j++) {
|
|
|
|
+ if (
|
|
|
|
+ result.rows[j].projectName === "建造师" &&
|
|
|
|
+ result.rows[j].businessName === "二级"
|
|
|
|
+ ) {
|
|
|
|
+ this.$set(this.formData, "educationId", res.rows[i].id);
|
|
|
|
+ this.$set(this.formData, "businessId", result.rows[j].id);
|
|
|
|
+ resolve();
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
getBusinessList(v) {
|
|
getBusinessList(v) {
|
|
this.$api
|
|
this.$api
|
|
.inquirebusinessList({ status: 1, educationId: v })
|
|
.inquirebusinessList({ status: 1, educationId: v })
|
|
@@ -230,32 +259,31 @@ export default {
|
|
"businessId",
|
|
"businessId",
|
|
this.$route.params.businessId
|
|
this.$route.params.businessId
|
|
);
|
|
);
|
|
- } else {
|
|
|
|
- this.formData.businessId = res.rows[0].id;
|
|
|
|
}
|
|
}
|
|
this.search();
|
|
this.search();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
jumpClass(row) {
|
|
jumpClass(row) {
|
|
|
|
+ // 学员管理
|
|
const jump = () => {
|
|
const jump = () => {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- name: "ClassList",
|
|
|
|
- params: {
|
|
|
|
- educationId: this.formData.educationId,
|
|
|
|
- businessId: this.formData.businessId,
|
|
|
|
|
|
+ path: "studentMenu",
|
|
|
|
+ query: {
|
|
|
|
+ id: row.gradeId,
|
|
|
|
+ goodsId: row.goodsList[0].goodsId,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
};
|
|
};
|
|
const statusPage = this.$store.state.tagsView.visitedViews.some(
|
|
const statusPage = this.$store.state.tagsView.visitedViews.some(
|
|
(item) => {
|
|
(item) => {
|
|
- return item.name == "ClassList";
|
|
|
|
|
|
+ return item.name == "StudentMenu";
|
|
}
|
|
}
|
|
);
|
|
);
|
|
if (statusPage) {
|
|
if (statusPage) {
|
|
this.$store
|
|
this.$store
|
|
.dispatch("tagsView/delCachedView", {
|
|
.dispatch("tagsView/delCachedView", {
|
|
- name: "ClassList",
|
|
|
|
|
|
+ name: "StudentMenu",
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
jump();
|
|
jump();
|