|
|
|
@ -3,26 +3,38 @@
|
|
|
|
|
<template v-if="pageType === 0">
|
|
|
|
|
<div class="search-and-add-style">
|
|
|
|
|
<div>
|
|
|
|
|
<span style="margin:0 0.5rem">学段名称</span>
|
|
|
|
|
<a-select :value="stageValue" @change="stageNameChange" allowClear>
|
|
|
|
|
<a-select-option v-for="(item,i) in stageNameList" :key="i" :value="item">
|
|
|
|
|
{{ item }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
<!--<a-input v-model="stageName"/>-->
|
|
|
|
|
<span style="margin:0 0.5rem">年级名称</span>
|
|
|
|
|
<a-select :value="gradeNameValue" @change="gradeNameChange" allowClear>
|
|
|
|
|
<a-select-option v-for="(item,i) in gradeNameList" :key="i" :value="item">
|
|
|
|
|
{{ item }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
<!--<a-input v-model="gradeName"/>-->
|
|
|
|
|
<span style="margin:0 0.5rem">班级名称</span>
|
|
|
|
|
<a-select :value="classNameValue" @change="classNameChange" allowClear>
|
|
|
|
|
<a-select-option v-for="(item,i) in classNameList" :key="i" :value="item">
|
|
|
|
|
{{ item }}
|
|
|
|
|
|
|
|
|
|
<a-cascader
|
|
|
|
|
allowClear
|
|
|
|
|
:field-names="{label:'createYearName',value:'createYear',children:'create_year_list'}"
|
|
|
|
|
v-model:value="defaultValue"
|
|
|
|
|
:options="stageList" @change="stageChange" placeholder="选择学段学年"></a-cascader>
|
|
|
|
|
<span style="margin:0 0.5rem">班级</span>
|
|
|
|
|
<a-select :value="classId" @change="classChange" allowClear class="class-select-style">
|
|
|
|
|
<a-select-option v-for="item in classList" :key="item.class_id" :value="item.class_id">
|
|
|
|
|
{{ item.class_name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
<!--<span style="margin:0 0.5rem">学段名称</span>-->
|
|
|
|
|
<!--<a-select :value="stageValue" @change="stageNameChange" allowClear>-->
|
|
|
|
|
<!--<a-select-option v-for="(item,i) in stageNameList" :key="i" :value="item">-->
|
|
|
|
|
<!--{{ item }}-->
|
|
|
|
|
<!--</a-select-option>-->
|
|
|
|
|
<!--</a-select>-->
|
|
|
|
|
<!--<!–<a-input v-model="stageName"/>–>-->
|
|
|
|
|
<!--<span style="margin:0 0.5rem">年级名称</span>-->
|
|
|
|
|
<!--<a-select :value="gradeNameValue" @change="gradeNameChange" allowClear>-->
|
|
|
|
|
<!--<a-select-option v-for="(item,i) in gradeNameList" :key="i" :value="item">-->
|
|
|
|
|
<!--{{ item }}-->
|
|
|
|
|
<!--</a-select-option>-->
|
|
|
|
|
<!--</a-select>-->
|
|
|
|
|
<!--<!–<a-input v-model="gradeName"/>–>-->
|
|
|
|
|
<!--<span style="margin:0 0.5rem">班级名称</span>-->
|
|
|
|
|
<!--<a-select :value="classNameValue" @change="classNameChange" allowClear>-->
|
|
|
|
|
<!--<a-select-option v-for="(item,i) in classNameList" :key="i" :value="item">-->
|
|
|
|
|
<!--{{ item }}-->
|
|
|
|
|
<!--</a-select-option>-->
|
|
|
|
|
<!--</a-select>-->
|
|
|
|
|
<!--<a-input v-model="className"/>-->
|
|
|
|
|
<span style="margin:0 0.5rem">学生姓名</span>
|
|
|
|
|
<a-input v-model="studentName"/>
|
|
|
|
@ -135,14 +147,21 @@
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
pageType: 0,//0 列表页面 1 新增页面
|
|
|
|
|
stageId: "",
|
|
|
|
|
stageList: [],
|
|
|
|
|
yearId: "",
|
|
|
|
|
defaultValue: [],//默认学段学年
|
|
|
|
|
classId: "",
|
|
|
|
|
classList: [{class_id: "", class_name: "请选择班级"}],
|
|
|
|
|
|
|
|
|
|
stageNameList: [],//学段名称
|
|
|
|
|
stageValue: '',//学段名称
|
|
|
|
|
gradeNameList: [],//年级名称
|
|
|
|
|
gradeNameValue: '',//年级名称
|
|
|
|
|
classNameList: [],//班级名称
|
|
|
|
|
classNameValue: '',//班级名称
|
|
|
|
|
testResultList: [],//测试结果
|
|
|
|
|
testResultValue: '',//测试结果
|
|
|
|
|
testResultList: ["请选择","合格","优秀","不及格"],//测试结果
|
|
|
|
|
testResultValue: '请选择',//测试结果
|
|
|
|
|
studentName: "",//学生姓名
|
|
|
|
|
tableColumn: tableColumn,
|
|
|
|
|
dataList: [],
|
|
|
|
@ -158,6 +177,7 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getStageList();
|
|
|
|
|
this.getVisionList();
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -167,11 +187,96 @@
|
|
|
|
|
search: function () {
|
|
|
|
|
this.getVisionList();
|
|
|
|
|
},
|
|
|
|
|
getStageList: function () {
|
|
|
|
|
let param = {
|
|
|
|
|
bureau_id: this.BaseConfig.person_info_my.bureau_id,
|
|
|
|
|
}
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: InterConfig.getSchoolStageList.url,
|
|
|
|
|
params: param,
|
|
|
|
|
method: InterConfig.getSchoolStageList.method,
|
|
|
|
|
isTestLogin: InterConfig.getSchoolStageList.isTestLogin,
|
|
|
|
|
}], (result) => {
|
|
|
|
|
let resData = result[0].data;
|
|
|
|
|
if (resData.code === 2000) {
|
|
|
|
|
let stageList = resData.data;
|
|
|
|
|
if (stageList && stageList.length > 0) {
|
|
|
|
|
for (let i = 0, len = stageList.length; i < len; i++) {
|
|
|
|
|
stageList[i].createYear = stageList[i].stage_id;
|
|
|
|
|
stageList[i].createYearName = stageList[i].stage_name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.stageList = stageList;
|
|
|
|
|
//this.buildDefaultValue();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//获取班级列表
|
|
|
|
|
getGradeClassList: function () {
|
|
|
|
|
if (this.stageId && this.stageId !== "") {
|
|
|
|
|
let param = {
|
|
|
|
|
bureau_id: this.BaseConfig.person_info_my.bureau_id,
|
|
|
|
|
stage_id: this.stageId,
|
|
|
|
|
create_year: this.yearId,
|
|
|
|
|
}
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: InterConfig.getGradeClassList.url,
|
|
|
|
|
params: param,
|
|
|
|
|
method: InterConfig.getGradeClassList.method,
|
|
|
|
|
isTestLogin: InterConfig.getGradeClassList.isTestLogin,
|
|
|
|
|
}], (result) => {
|
|
|
|
|
let resData = result[0].data;
|
|
|
|
|
if (resData.code === 2000 && resData.data.length > 0) {
|
|
|
|
|
let res = resData.data;
|
|
|
|
|
this.classList.push(...res);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.classId = "";
|
|
|
|
|
this.classList = [{class_id: "", class_name: "请选择班级"}];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
stageChange: function (value) {
|
|
|
|
|
if (value.length > 0) {
|
|
|
|
|
this.stageId = value[0];
|
|
|
|
|
for(let i = 0,len = this.stageList.length;i < len;i ++){
|
|
|
|
|
if(this.stageId === this.stageList[i].stage_id){
|
|
|
|
|
this.stageName = this.stageList[i].stage_name;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.yearId = value[1];
|
|
|
|
|
} else {
|
|
|
|
|
this.stageId = "";
|
|
|
|
|
this.stageName = "";
|
|
|
|
|
this.yearId = "";
|
|
|
|
|
}
|
|
|
|
|
this.classId = "";
|
|
|
|
|
this.className = "";
|
|
|
|
|
this.classList = [{class_id: "", class_name: "请选择班级"}];
|
|
|
|
|
this.getVisionList();
|
|
|
|
|
this.getGradeClassList();
|
|
|
|
|
},
|
|
|
|
|
classChange: function (value) {
|
|
|
|
|
if(value && value !== ""){
|
|
|
|
|
this.classId = value;
|
|
|
|
|
for(let i = 0,len = this.classList.length;i < len;i ++){
|
|
|
|
|
if(this.classId === this.classList[i].class_id){
|
|
|
|
|
this.className = this.classList[i].class_name;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
this.classId = "";
|
|
|
|
|
this.className = "";
|
|
|
|
|
}
|
|
|
|
|
this.getVisionList();
|
|
|
|
|
},
|
|
|
|
|
getVisionList: function () {
|
|
|
|
|
let param = {
|
|
|
|
|
bureau_id: this.BaseConfig.person_info_my.bureau_id,
|
|
|
|
|
stage_name: this.stageName,
|
|
|
|
|
grade_name: this.gradeName,
|
|
|
|
|
grade_name: this.yearId,
|
|
|
|
|
class_name: this.className,
|
|
|
|
|
student_name: this.studentName,
|
|
|
|
|
test_result: this.testResult,
|
|
|
|
@ -322,7 +427,18 @@
|
|
|
|
|
},
|
|
|
|
|
//测试结果
|
|
|
|
|
testResultChange(value) {
|
|
|
|
|
this.testResultValue = value
|
|
|
|
|
if(value && value !== ""){
|
|
|
|
|
this.testResultValue = value
|
|
|
|
|
if(value === "请选择"){
|
|
|
|
|
this.testResult = "";
|
|
|
|
|
}else {
|
|
|
|
|
this.testResult = value
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
this.testResultValue = "请选择"
|
|
|
|
|
this.testResult = "";
|
|
|
|
|
}
|
|
|
|
|
this.getVisionList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -336,7 +452,8 @@
|
|
|
|
|
AInput: Input,
|
|
|
|
|
APagination: Pagination,
|
|
|
|
|
VisionInfo,
|
|
|
|
|
ImportExcel
|
|
|
|
|
ImportExcel,
|
|
|
|
|
ACascader: Cascader
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|