|
@@ -48,7 +48,7 @@
|
|
|
<el-option
|
|
|
v-for="(items, indexs) in item.options"
|
|
|
:key="indexs"
|
|
|
- :label="items.projectName + '-' + items.businessName"
|
|
|
+ :label="items.projectName + ' - ' + items.businessName"
|
|
|
:value="items.id"
|
|
|
>
|
|
|
</el-option>
|
|
@@ -118,6 +118,12 @@
|
|
|
v-if="newSujectApis.length > 1"
|
|
|
@click="changeType"
|
|
|
>{{ changeHeight ? "展开" : "关闭" }}</el-button
|
|
|
+ ><el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ v-if="newSujectApis.length > 0"
|
|
|
+ @click="sujectApis = []"
|
|
|
+ >清空</el-button
|
|
|
>
|
|
|
<!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
|
|
|
</el-form-item>
|
|
@@ -797,75 +803,15 @@ export default {
|
|
|
this.handleCheckedCitiesChange();
|
|
|
},
|
|
|
hideHandle() {},
|
|
|
- /**
|
|
|
- *
|
|
|
- * @param {Bool} status true 全部 false 筛选
|
|
|
- * @param {Number} id 筛选情况下 教育类型ID
|
|
|
- */
|
|
|
- concatList(status, id) {
|
|
|
- let options = [
|
|
|
- {
|
|
|
- label: "最近选择",
|
|
|
- options: [],
|
|
|
- },
|
|
|
- {
|
|
|
- label: "业务层级",
|
|
|
- options: [],
|
|
|
- },
|
|
|
- ];
|
|
|
- if (status) {
|
|
|
- this.$api.inquirebusinessList({ status: 1 }).then((res) => {
|
|
|
- this.courTypeOptions = res.rows;
|
|
|
- if (this.$methodsTools.getBusinessList().length) {
|
|
|
- let arrlist = this.$methodsTools.getBusinessList();
|
|
|
- res.rows.forEach((item) => {
|
|
|
- if (arrlist.includes(item.id)) {
|
|
|
- options[0].options.push(item);
|
|
|
- } else {
|
|
|
- options[1].options.push(item);
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- options[1].options = res.rows;
|
|
|
- }
|
|
|
- // let arrs = options.filter((item) => {
|
|
|
- // if (item.options.length) {
|
|
|
- // return item;
|
|
|
- // }
|
|
|
- // });
|
|
|
- this.newCourTypeOptions = options;
|
|
|
- });
|
|
|
- } else {
|
|
|
- let arr = [];
|
|
|
- if (this.$methodsTools.getBusinessList().length) {
|
|
|
- let arrlist = this.$methodsTools.getBusinessList();
|
|
|
- this.courTypeOptions.forEach((item) => {
|
|
|
- if (arrlist.includes(item.id)) {
|
|
|
- options[0].options.push(item);
|
|
|
- }
|
|
|
- });
|
|
|
- arr = this.courTypeOptions.filter((item) => {
|
|
|
- return item.educationId == id && !arrlist.includes(item.id);
|
|
|
- });
|
|
|
- } else {
|
|
|
- arr = this.courTypeOptions.filter((item) => {
|
|
|
- return item.educationId == id;
|
|
|
- });
|
|
|
- }
|
|
|
- options[1].options = arr;
|
|
|
- // let arrs = options.filter((item) => {
|
|
|
- // if (item.options.length) {
|
|
|
- // return item;
|
|
|
- // }
|
|
|
- // });
|
|
|
- this.newCourTypeOptions = options;
|
|
|
- }
|
|
|
- },
|
|
|
getDict() {
|
|
|
this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
|
|
|
this.eduTypeOptions = res.rows;
|
|
|
});
|
|
|
- this.concatList(true);
|
|
|
+ this.$methodsTools.concatList(true).then((res) => {
|
|
|
+ this.courTypeOptions = res.value;
|
|
|
+ this.newCourTypeOptions = res.options;
|
|
|
+ });
|
|
|
+
|
|
|
this.$api.inquireCourseSubject({ status: 1 }).then((res) => {
|
|
|
res.rows.map((item, index) => {
|
|
|
var array = [];
|
|
@@ -897,40 +843,36 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
changeEduType(v) {
|
|
|
- this.concatList(false, v);
|
|
|
- return;
|
|
|
- if (!(this.courType === undefined || this.courType === "")) {
|
|
|
- this.courType = "";
|
|
|
- }
|
|
|
- var arrays = [];
|
|
|
- this.courTypeOptions.map((item) => {
|
|
|
- if (item.educationId === this.eduType) {
|
|
|
- arrays.push(item);
|
|
|
- }
|
|
|
+ this.$methodsTools.concatList(false, v).then((res) => {
|
|
|
+ this.newCourTypeOptions = res.options;
|
|
|
});
|
|
|
- this.newCourTypeOptions = arrays;
|
|
|
+ this.courType = "";
|
|
|
},
|
|
|
changecourseType(ids) {
|
|
|
+ /**
|
|
|
+ * 进入缓存方法
|
|
|
+ */
|
|
|
this.$methodsTools.cacheBusinessList(ids);
|
|
|
- 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;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查找选中的业务层次对应的教育类型ID 并筛选出对应业务层级列表
|
|
|
+ */
|
|
|
+ let idArr = this.courTypeOptions.find((item) => {
|
|
|
+ return item.id == ids;
|
|
|
});
|
|
|
- var arrays = [];
|
|
|
- this.courTypeOptions.map((item) => {
|
|
|
- if (item.educationId === this.eduType) {
|
|
|
- arrays.push(item);
|
|
|
- }
|
|
|
+ this.eduType = idArr.educationId;
|
|
|
+ this.$methodsTools.concatList(false, idArr.educationId).then((res) => {
|
|
|
+ this.newCourTypeOptions = res.options;
|
|
|
});
|
|
|
- this.newCourTypeOptions = arrays;
|
|
|
+ /**
|
|
|
+ * 筛选科目
|
|
|
+ */
|
|
|
+ var array = this.sujectOption.filter((items, indexs) => {
|
|
|
+ return items.courseArrays.includes(idArr.projectId);
|
|
|
+ });
|
|
|
+ this.newSujectOption = array;
|
|
|
+ /**
|
|
|
+ * 关闭科目弹窗
|
|
|
+ */
|
|
|
this.$refs.popovers.doClose();
|
|
|
},
|
|
|
submit(formName) {
|