|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<div class="major-page">
|
|
|
- <evaluation-title class="mt10 box-card"
|
|
|
- navBackButton
|
|
|
- title="由专业选科目"
|
|
|
- :navAction="back"
|
|
|
- ></evaluation-title>
|
|
|
+ <evaluation-title class="mt10 box-card"
|
|
|
+ navBackButton
|
|
|
+ title="由专业选科目"
|
|
|
+ :navAction="back"
|
|
|
+ ></evaluation-title>
|
|
|
<div class="content-box">
|
|
|
<div class="xkcx-input-box">
|
|
|
<div>
|
|
@@ -47,7 +47,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <major-choice-dialog :isShowSchoolPopup="isShowSchoolPopup" v-on:onMajorChoiced="onMajorChoiced"></major-choice-dialog>
|
|
|
+ <major-choice-dialog :isShowSchoolPopup="isShowSchoolPopup" v-on:onMajorChoiced="onMajorChoiced"
|
|
|
+ ></major-choice-dialog>
|
|
|
|
|
|
<div class="popup-box major-box">
|
|
|
<div class="popup-select">
|
|
@@ -138,9 +139,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {xkcxYears, collectAdd, collectRemove, marjorsList, xkcxlistByMarjors} from "@/api/webApi/webQue";
|
|
|
+import { collectAdd, collectRemove, marjorsList, xkcxlistByMarjors, xkcxYears } from '@/api/webApi/webQue'
|
|
|
+
|
|
|
+import MajorChoiceDialog from '../components/MajorChoiceDialog.vue'
|
|
|
|
|
|
-import MajorChoiceDialog from "../components/MajorChoiceDialog.vue";
|
|
|
export default {
|
|
|
components: { MajorChoiceDialog },
|
|
|
data() {
|
|
@@ -148,53 +150,52 @@ export default {
|
|
|
selected: {
|
|
|
yearList: [],
|
|
|
selectNian: '',
|
|
|
- marjorsType: "本科",
|
|
|
+ marjorsType: '本科',
|
|
|
marjorsLevel: 1,
|
|
|
- marjorsCode: "",
|
|
|
+ marjorsCode: '',
|
|
|
marjorsList: {
|
|
|
one: [], two: [], three: []
|
|
|
},
|
|
|
curMarjors: {
|
|
|
- one: "", two: "", three: []
|
|
|
+ one: '', two: '', three: []
|
|
|
},
|
|
|
locations: [],
|
|
|
- ts: [],
|
|
|
+ features: [],
|
|
|
types: []
|
|
|
},
|
|
|
- dataList: [
|
|
|
- ],
|
|
|
+ dataList: [],
|
|
|
propDefines: {
|
|
|
universityName: {
|
|
|
- label: "院校名称",
|
|
|
+ label: '院校名称'
|
|
|
},
|
|
|
marjorName: {
|
|
|
- label: "专业(类)名称",
|
|
|
+ label: '专业(类)名称'
|
|
|
},
|
|
|
marjorBelongs: {
|
|
|
- label: "专业备注",
|
|
|
- align: "left",
|
|
|
+ label: '专业备注',
|
|
|
+ align: 'left'
|
|
|
},
|
|
|
level: {
|
|
|
- label: "专业层次",
|
|
|
+ label: '专业层次'
|
|
|
},
|
|
|
courseRemark0: {
|
|
|
- label: "首选科目范围",
|
|
|
- align: "left",
|
|
|
+ label: '首选科目范围',
|
|
|
+ align: 'left'
|
|
|
},
|
|
|
courseRemark1: {
|
|
|
- label: "再选科目范围",
|
|
|
- align: "left",
|
|
|
+ label: '再选科目范围',
|
|
|
+ align: 'left'
|
|
|
},
|
|
|
year: {
|
|
|
- label: "年份",
|
|
|
- align: "left",
|
|
|
+ label: '年份',
|
|
|
+ align: 'left'
|
|
|
},
|
|
|
collect: {
|
|
|
- label: "选择",
|
|
|
- align: "left",
|
|
|
- slot: "select",
|
|
|
- width: "100px",
|
|
|
- },
|
|
|
+ label: '选择',
|
|
|
+ align: 'left',
|
|
|
+ slot: 'select',
|
|
|
+ width: '100px'
|
|
|
+ }
|
|
|
},
|
|
|
selectIds: [],
|
|
|
pageNum: 1,
|
|
@@ -203,11 +204,11 @@ export default {
|
|
|
keyword: '',
|
|
|
isShowSchoolPopup: false,
|
|
|
isShowMajorPopup: false
|
|
|
- };
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.httpGetXkcxYears();
|
|
|
- this.httpGetMarjorsList();
|
|
|
+ this.httpGetXkcxYears()
|
|
|
+ this.httpGetMarjorsList()
|
|
|
},
|
|
|
methods: {
|
|
|
back() {
|
|
@@ -215,138 +216,138 @@ export default {
|
|
|
},
|
|
|
httpGetXkcxYears() {
|
|
|
xkcxYears().then((res) => {
|
|
|
- this.selected.yearList = res.data || [];
|
|
|
+ this.selected.yearList = res.data || []
|
|
|
this.selected.selectNian = this.selected.yearList[0]
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
onChangeYear(res) {
|
|
|
//切换学年时,取第1页
|
|
|
- this.pageNum = 1;
|
|
|
- this.httpGetMarjorsList();
|
|
|
+ this.pageNum = 1
|
|
|
+ this.httpGetMarjorsList()
|
|
|
},
|
|
|
onChangeSchoolPopup() {
|
|
|
- this.isShowSchoolPopup = !this.isShowSchoolPopup;
|
|
|
+ this.isShowSchoolPopup = !this.isShowSchoolPopup
|
|
|
},
|
|
|
onChangeMajorPopup() {
|
|
|
- this.isShowMajorPopup = !this.isShowMajorPopup;
|
|
|
+ this.isShowMajorPopup = !this.isShowMajorPopup
|
|
|
},
|
|
|
onMajorChoiced(choice) {
|
|
|
- console.log(choice);
|
|
|
- this.isShowSchoolPopup = false;
|
|
|
+ console.log(choice)
|
|
|
+ this.isShowSchoolPopup = false
|
|
|
|
|
|
- this.selected.locations = choice.locations;
|
|
|
- this.selected.ts = choice.ts;
|
|
|
- this.selected.types = choice.types;
|
|
|
+ this.selected.locations = choice.locations
|
|
|
+ this.selected.features = choice.features
|
|
|
+ this.selected.types = choice.types
|
|
|
|
|
|
- this.httpGetXkcxList();
|
|
|
+ this.httpGetXkcxList()
|
|
|
},
|
|
|
|
|
|
clickMarjorsType(type) {
|
|
|
- this.selected.marjorsType = type;
|
|
|
- this.selected.marjorsLevel = 1;
|
|
|
- this.selected.marjorsCode = "";
|
|
|
- this.httpGetMarjorsList();
|
|
|
+ this.selected.marjorsType = type
|
|
|
+ this.selected.marjorsLevel = 1
|
|
|
+ this.selected.marjorsCode = ''
|
|
|
+ this.httpGetMarjorsList()
|
|
|
},
|
|
|
onSelectMarjorsAll(res) {
|
|
|
if (res) {
|
|
|
- this.selected.curMarjors.three.push('全选');
|
|
|
- let len = this.selected.marjorsList.three.length;
|
|
|
+ this.selected.curMarjors.three.push('全选')
|
|
|
+ let len = this.selected.marjorsList.three.length
|
|
|
for (let i = 0; i < len; i++) {
|
|
|
- let name = this.selected.marjorsList.three[i]["name"];
|
|
|
- let index = this.selected.curMarjors.three.indexOf(name);
|
|
|
+ let name = this.selected.marjorsList.three[i]['name']
|
|
|
+ let index = this.selected.curMarjors.three.indexOf(name)
|
|
|
if (index < 0) {
|
|
|
- this.selected.curMarjors.three.push(name);
|
|
|
+ this.selected.curMarjors.three.push(name)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- this.selected.curMarjors.three = [];
|
|
|
+ this.selected.curMarjors.three = []
|
|
|
}
|
|
|
},
|
|
|
changeMajor(res) {
|
|
|
- this.selected.curMarjors.three = [];
|
|
|
+ this.selected.curMarjors.three = []
|
|
|
switch (res.level) {
|
|
|
case 1:
|
|
|
- this.selected.curMarjors.one = res;
|
|
|
- break;
|
|
|
+ this.selected.curMarjors.one = res
|
|
|
+ break
|
|
|
case 2:
|
|
|
- this.selected.curMarjors.two = res;
|
|
|
- break;
|
|
|
+ this.selected.curMarjors.two = res
|
|
|
+ break
|
|
|
}
|
|
|
- this.selected.marjorsCode = res.code;
|
|
|
- this.selected.marjorsLevel = res.level + 1;
|
|
|
- this.httpGetMarjorsList();
|
|
|
+ this.selected.marjorsCode = res.code
|
|
|
+ this.selected.marjorsLevel = res.level + 1
|
|
|
+ this.httpGetMarjorsList()
|
|
|
},
|
|
|
httpGetMarjorsList() {
|
|
|
marjorsList({
|
|
|
type: this.selected.marjorsType,
|
|
|
level: this.selected.marjorsLevel,
|
|
|
- code: this.selected.marjorsCode,
|
|
|
+ code: this.selected.marjorsCode
|
|
|
}).then((res) => {
|
|
|
switch (this.selected.marjorsLevel) {
|
|
|
case 2:
|
|
|
- this.selected.marjorsList.two = res.rows;
|
|
|
- this.changeMajor(res.rows[0]);
|
|
|
- break;
|
|
|
+ this.selected.marjorsList.two = res.rows
|
|
|
+ this.changeMajor(res.rows[0])
|
|
|
+ break
|
|
|
case 3:
|
|
|
- this.selected.marjorsList.three = res.rows;
|
|
|
- this.onSelectMarjorsAll(res.rows);
|
|
|
- this.httpGetXkcxList();
|
|
|
- break;
|
|
|
+ this.selected.marjorsList.three = res.rows
|
|
|
+ this.onSelectMarjorsAll(res.rows)
|
|
|
+ this.httpGetXkcxList()
|
|
|
+ break
|
|
|
default:
|
|
|
- this.selected.marjorsList.one = res.rows;
|
|
|
- this.changeMajor(res.rows[0]);
|
|
|
- break;
|
|
|
+ this.selected.marjorsList.one = res.rows
|
|
|
+ this.changeMajor(res.rows[0])
|
|
|
+ break
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
// 查询结果
|
|
|
httpGetXkcxList() {
|
|
|
- if (this.selected.curMarjors.three.length<1) return;
|
|
|
-
|
|
|
+ if (this.selected.curMarjors.three.length < 1) return
|
|
|
+ console.log(this.selected)
|
|
|
//console.log(this.selected);return;
|
|
|
xkcxlistByMarjors({
|
|
|
- level:this.selected.marjorsType.toString(),
|
|
|
+ level: this.selected.marjorsType.toString(),
|
|
|
keyword: this.keyword,
|
|
|
year: this.selected.selectNian.toString(),
|
|
|
- marjors: this.selected.curMarjors.one.name + "," + this.selected.curMarjors.two.name + "," + this.selected.curMarjors.three.join(","),
|
|
|
+ marjors: this.selected.curMarjors.one.name + ',' + this.selected.curMarjors.two.name + ',' + this.selected.curMarjors.three.join(','),
|
|
|
locations: this.selected.locations.toString(),
|
|
|
- ts: this.selected.ts.toString(),
|
|
|
+ features: this.selected.features.toString(),
|
|
|
types: this.selected.types.toString(),
|
|
|
pageNum: this.pageNum,
|
|
|
- pageSize: this.pageSize,
|
|
|
+ pageSize: this.pageSize
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- this.dataList = res.rows;
|
|
|
- this.total = res.total;
|
|
|
- this.isShowTable = true;
|
|
|
+ this.dataList = res.rows
|
|
|
+ this.total = res.total
|
|
|
+ this.isShowTable = true
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
- console.log("请求出错!");
|
|
|
- this.cleanSchoolSelect();
|
|
|
- });
|
|
|
+ console.log('请求出错!')
|
|
|
+ this.cleanSchoolSelect()
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
onChangePage(page) {
|
|
|
- this.pageSize = page.limit;
|
|
|
- this.pageNum = page.page;
|
|
|
- this.httpGetXkcxList();
|
|
|
+ this.pageSize = page.limit
|
|
|
+ this.pageNum = page.page
|
|
|
+ this.httpGetXkcxList()
|
|
|
},
|
|
|
// 收藏
|
|
|
httpCollectAdd(row) {
|
|
|
- row.collect = true;
|
|
|
+ row.collect = true
|
|
|
collectAdd({
|
|
|
- refId: row.id,
|
|
|
- });
|
|
|
+ refId: row.id
|
|
|
+ })
|
|
|
},
|
|
|
// 取消收藏
|
|
|
httpCollectRemove(row) {
|
|
|
- row.collect = false;
|
|
|
+ row.collect = false
|
|
|
collectRemove({
|
|
|
- refId: row.id,
|
|
|
- });
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
+ refId: row.id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
|
|
@@ -359,9 +360,11 @@ export default {
|
|
|
background-color: #fff;
|
|
|
box-shadow: 0 1px 2px 0 rgb(0 0 0);
|
|
|
}
|
|
|
+
|
|
|
.content-box {
|
|
|
padding: 10px 40px 10px 50px;
|
|
|
}
|
|
|
+
|
|
|
.major-list-title span {
|
|
|
color: #d28140;
|
|
|
}
|
|
@@ -369,9 +372,11 @@ export default {
|
|
|
el-button {
|
|
|
padding: 9px 20px;
|
|
|
}
|
|
|
+
|
|
|
.button-school {
|
|
|
margin: 0 10px;
|
|
|
}
|
|
|
+
|
|
|
.el-icon-my-button {
|
|
|
background: url(../../../assets/images/subject/icon_shaixuan.png) center no-repeat;
|
|
|
background-size: cover;
|
|
@@ -388,22 +393,27 @@ el-button {
|
|
|
display: flex;
|
|
|
margin-bottom: 30px;
|
|
|
}
|
|
|
+
|
|
|
.popup-select {
|
|
|
border-right: 1px solid #d7d7d7;
|
|
|
}
|
|
|
+
|
|
|
.popup-select-item {
|
|
|
cursor: pointer;
|
|
|
line-height: 30px;
|
|
|
width: 100px;
|
|
|
padding: 0 20px 0 30px;
|
|
|
}
|
|
|
+
|
|
|
.popup-select-item.active {
|
|
|
color: #47c6a2;
|
|
|
border-right: 2px solid #47c6a2;
|
|
|
}
|
|
|
+
|
|
|
.choice-box {
|
|
|
display: flex;
|
|
|
}
|
|
|
+
|
|
|
.choice-item {
|
|
|
margin: 0 10px;
|
|
|
min-width: 300px;
|
|
@@ -412,13 +422,16 @@ el-button {
|
|
|
overflow-x: hidden;
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
+
|
|
|
.choice-item-menv {
|
|
|
margin: 15px 20px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+
|
|
|
.choice-item-menv.active {
|
|
|
color: #47c6a2;
|
|
|
}
|
|
|
+
|
|
|
.choice-item-checkbox {
|
|
|
padding: 10px 20px;
|
|
|
width: 100%;
|
|
@@ -432,6 +445,7 @@ el-button {
|
|
|
margin-bottom: 20px;
|
|
|
border-bottom: 2px solid #47c6a2;
|
|
|
}
|
|
|
+
|
|
|
.search_header {
|
|
|
margin-left: auto;
|
|
|
display: flex;
|
|
@@ -441,12 +455,14 @@ el-button {
|
|
|
position: relative;
|
|
|
margin-right: 20px;
|
|
|
}
|
|
|
+
|
|
|
.search_header img {
|
|
|
position: absolute;
|
|
|
right: 20px;
|
|
|
cursor: pointer;
|
|
|
top: 6px;
|
|
|
}
|
|
|
+
|
|
|
.search_header input {
|
|
|
background: #f7f7ff;
|
|
|
border-radius: 20px;
|