|
@@ -62,6 +62,46 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label=""
|
|
|
|
+ prop="majorId"
|
|
|
|
+ v-if="listData.businessId"
|
|
|
|
+ >
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="listData.majorId"
|
|
|
|
+ :disabled="listData.goodsList.length > 0"
|
|
|
|
+ placeholder="请选择专业">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item, index) in newMajorOption"
|
|
|
|
+ :key="index"
|
|
|
|
+ :label="item.categoryName"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label=""
|
|
|
|
+ prop="subjectIds"
|
|
|
|
+ v-if="listData.businessId"
|
|
|
|
+ >
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="listData.subjectIds"
|
|
|
|
+ :disabled="listData.goodsList.length > 0"
|
|
|
|
+ placeholder="请选择科目"
|
|
|
|
+ multiple
|
|
|
|
+ collapse-tags
|
|
|
|
+ @change="subjectChanges"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item, index) in newSubjectOption"
|
|
|
|
+ :key="index"
|
|
|
|
+ :label="item.subjectName"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<div v-if="listData.businessId" style="margin-bottom: 10px">
|
|
<div v-if="listData.businessId" style="margin-bottom: 10px">
|
|
<p class="p_sty">
|
|
<p class="p_sty">
|
|
<span style="color: red">注:推荐位最多显示15个商品</span>
|
|
<span style="color: red">注:推荐位最多显示15个商品</span>
|
|
@@ -198,6 +238,8 @@ export default {
|
|
disabledBtn: false,
|
|
disabledBtn: false,
|
|
listData: {
|
|
listData: {
|
|
businessId: "",
|
|
businessId: "",
|
|
|
|
+ majorId:"",
|
|
|
|
+ subjectIds:"",
|
|
goodsList: [],
|
|
goodsList: [],
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
@@ -244,6 +286,8 @@ export default {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
newBusinessLevel: [],
|
|
newBusinessLevel: [],
|
|
|
|
+ newMajorOption: [],
|
|
|
|
+ newSubjectOption: [],
|
|
activeNum: [], //已选商品ID
|
|
activeNum: [], //已选商品ID
|
|
newActiveNum: [],
|
|
newActiveNum: [],
|
|
goodsList: [], //商品列表
|
|
goodsList: [], //商品列表
|
|
@@ -261,6 +305,7 @@ export default {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.getInitBabelList(val);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -295,6 +340,32 @@ export default {
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.newBusinessLevel = res.rows;
|
|
this.newBusinessLevel = res.rows;
|
|
});
|
|
});
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * 根据条件获取院校、专业列表
|
|
|
|
+ */
|
|
|
|
+ getInitBabelList(val) {
|
|
|
|
+ /**
|
|
|
|
+ * 专业
|
|
|
|
+ */
|
|
|
|
+ this.$api
|
|
|
|
+ .inquireCourseMajor({ status: 1, businessId: val })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.newMajorOption = res.rows;
|
|
|
|
+ });
|
|
|
|
+ /**
|
|
|
|
+ * 科目
|
|
|
|
+ */
|
|
|
|
+ this.$api
|
|
|
|
+ .inquireCourseSubject({ status: 1, businessId: val })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.newSubjectOption = res.rows;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ subjectChanges() {
|
|
|
|
+ console.log(123)
|
|
|
|
+ this.$bus.$emit("sendBybus");
|
|
|
|
+ this.$bus.$emit("sendBybusBank");
|
|
},
|
|
},
|
|
loadingClose() {
|
|
loadingClose() {
|
|
this.disabledBtn = false;
|
|
this.disabledBtn = false;
|
|
@@ -381,6 +452,8 @@ export default {
|
|
this.$api
|
|
this.$api
|
|
.inquireGoods({
|
|
.inquireGoods({
|
|
businessId: this.listData.businessId,
|
|
businessId: this.listData.businessId,
|
|
|
|
+ majorId: this.listData.majorId,
|
|
|
|
+ subjectIdList: this.listData.subjectIds,
|
|
status: 1,
|
|
status: 1,
|
|
goodsType: this.$parent.activeName === "first" ? 1 : 2,
|
|
goodsType: this.$parent.activeName === "first" ? 1 : 2,
|
|
})
|
|
})
|