|
@@ -22,7 +22,7 @@
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <!-- <el-select
|
|
|
+ <el-select
|
|
|
v-model="courType"
|
|
|
placeholder="请选择业务层次"
|
|
|
@change="changecourseType"
|
|
@@ -34,25 +34,6 @@
|
|
|
:value="item.id"
|
|
|
>
|
|
|
</el-option>
|
|
|
- </el-select> -->
|
|
|
- <el-select
|
|
|
- v-model="courType"
|
|
|
- placeholder="请选择业务层次"
|
|
|
- @change="changecourseType"
|
|
|
- >
|
|
|
- <el-option-group
|
|
|
- v-for="(item, index) in newCourTypeOptions"
|
|
|
- :key="index"
|
|
|
- :label="item.label"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(items, indexs) in item.options"
|
|
|
- :key="indexs"
|
|
|
- :label="items.projectName + ' - ' + items.businessName"
|
|
|
- :value="items.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-option-group>
|
|
|
</el-select>
|
|
|
<el-popover
|
|
|
ref="popovers"
|
|
@@ -341,10 +322,10 @@
|
|
|
<el-form-item>
|
|
|
<el-button @click="backPage">取消</el-button>
|
|
|
<el-button
|
|
|
- :loading="disabledBtn"
|
|
|
type="primary"
|
|
|
@click="submit('listData')"
|
|
|
:disabled="!noStudent"
|
|
|
+ :loading="disabledBtn"
|
|
|
>确定</el-button
|
|
|
>
|
|
|
</el-form-item>
|
|
@@ -462,7 +443,7 @@ export default {
|
|
|
//表单验证
|
|
|
rules: {
|
|
|
prefixName: [
|
|
|
- { required: false, message: "请输入标题前缀", trigger: "blur" },
|
|
|
+ { required: true, message: "请输入标题前缀", trigger: "blur" },
|
|
|
],
|
|
|
name: [{ required: true, message: "请输入节标题", trigger: "blur" }],
|
|
|
// liveDuration: [
|
|
@@ -879,9 +860,9 @@ export default {
|
|
|
},
|
|
|
businTys() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$methodsTools.concatList(true).then((res) => {
|
|
|
- this.courTypeOptions = res.value;
|
|
|
- this.newCourTypeOptions = res.options;
|
|
|
+ this.$api.inquirebusinessList({ status: 1 }).then((res) => {
|
|
|
+ this.courTypeOptions = res.rows;
|
|
|
+ this.newCourTypeOptions = res.rows;
|
|
|
resolve();
|
|
|
});
|
|
|
});
|
|
@@ -925,37 +906,38 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- changeEduType(v) {
|
|
|
- this.$methodsTools.concatList(false, v).then((res) => {
|
|
|
- this.newCourTypeOptions = res.options;
|
|
|
+ changeEduType() {
|
|
|
+ if (!(this.courType === undefined || this.courType === "")) {
|
|
|
+ this.courType = "";
|
|
|
+ }
|
|
|
+ var arrays = [];
|
|
|
+ this.courTypeOptions.map((item) => {
|
|
|
+ if (item.educationId === this.eduType) {
|
|
|
+ arrays.push(item);
|
|
|
+ }
|
|
|
});
|
|
|
- this.courType = "";
|
|
|
+ this.newCourTypeOptions = arrays;
|
|
|
},
|
|
|
- changecourseType(ids) {
|
|
|
- /**
|
|
|
- * 进入缓存方法
|
|
|
- */
|
|
|
- this.$methodsTools.cacheBusinessList(ids);
|
|
|
- /**
|
|
|
- * 查找选中的业务层次对应的教育类型ID 并筛选出对应业务层级列表
|
|
|
- */
|
|
|
- let idArr = this.courTypeOptions.find((item) => {
|
|
|
- return item.id == ids;
|
|
|
- });
|
|
|
- this.eduType = idArr.educationId;
|
|
|
- this.$methodsTools.concatList(false, idArr.educationId).then((res) => {
|
|
|
- this.newCourTypeOptions = res.options;
|
|
|
+ changecourseType() {
|
|
|
+ this.newCourTypeOptions.map((item, index) => {
|
|
|
+ if (item.id === this.courType) {
|
|
|
+ this.eduType = item.educationId;
|
|
|
+ var array = [];
|
|
|
+ this.sujectOption.map((items, indexs) => {
|
|
|
+ if (items.courseArrays.indexOf(item.projectId) !== -1) {
|
|
|
+ array.push(items);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.newSujectOption = array;
|
|
|
+ }
|
|
|
});
|
|
|
- /**
|
|
|
- * 筛选科目
|
|
|
- */
|
|
|
- var array = this.sujectOption.filter((items, indexs) => {
|
|
|
- return items.courseArrays.includes(idArr.projectId);
|
|
|
+ var arrays = [];
|
|
|
+ this.courTypeOptions.map((item) => {
|
|
|
+ if (item.educationId === this.eduType) {
|
|
|
+ arrays.push(item);
|
|
|
+ }
|
|
|
});
|
|
|
- this.newSujectOption = array;
|
|
|
- /**
|
|
|
- * 关闭科目弹窗
|
|
|
- */
|
|
|
+ this.newCourTypeOptions = arrays;
|
|
|
this.$refs.popovers.doClose();
|
|
|
},
|
|
|
submit(formName) {
|
|
@@ -1249,4 +1231,4 @@ export default {
|
|
|
color: #67c23a;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|