|
|
|
@ -3,26 +3,39 @@
|
|
|
|
|
<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.stage_name">-->
|
|
|
|
|
<!--{{ item.stage_name }}-->
|
|
|
|
|
<!--</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.createYearName">-->
|
|
|
|
|
<!--{{ item.createYearName }}-->
|
|
|
|
|
<!--</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,6 +148,12 @@
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
pageType: 0,//0 列表页面 1 新增页面
|
|
|
|
|
stageId: "",
|
|
|
|
|
stageList: [],
|
|
|
|
|
yearId: "",
|
|
|
|
|
defaultValue: [],//默认学段学年
|
|
|
|
|
classId: "",
|
|
|
|
|
classList: [{class_id: "", class_name: "请选择班级"}],
|
|
|
|
|
studentName: "",//学生姓名
|
|
|
|
|
tableColumn: tableColumn,
|
|
|
|
|
dataList: [],
|
|
|
|
@ -153,11 +172,12 @@
|
|
|
|
|
gradeNameValue: '',//年级名称
|
|
|
|
|
classNameList: [],//班级名称
|
|
|
|
|
classNameValue: '',//班级名称
|
|
|
|
|
testResultList: [],//测试结果
|
|
|
|
|
testResultValue: '',//测试结果
|
|
|
|
|
testResultList: ["请选择","合格","优秀","不及格"],//测试结果
|
|
|
|
|
testResultValue: '请选择',//测试结果
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getStageList();
|
|
|
|
|
this.getPhysicalList();
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -171,7 +191,7 @@
|
|
|
|
|
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,
|
|
|
|
@ -195,7 +215,6 @@
|
|
|
|
|
this.dataList = dataList;
|
|
|
|
|
this.totalNum = resData.data.total_row;
|
|
|
|
|
this.totalPage = resData.data.total_page;
|
|
|
|
|
console.log('dddddd', this.dataList)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -312,6 +331,101 @@
|
|
|
|
|
//学段名称
|
|
|
|
|
stageNameChange(value) {
|
|
|
|
|
this.stageValue = value
|
|
|
|
|
this.gradeNameList = [];//年级名称
|
|
|
|
|
this.gradeNameValue = '';//年级名称
|
|
|
|
|
if(value && value !== ""){
|
|
|
|
|
for(let i = 0,len = this.stageNameList.length;i < len;i ++){
|
|
|
|
|
if(this.stageNameList[i].stage_name === value){
|
|
|
|
|
this.gradeNameList.push(...this.stageNameList[i].create_year_list);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
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.getPhysicalList();
|
|
|
|
|
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.getPhysicalList();
|
|
|
|
|
},
|
|
|
|
|
//年级名称
|
|
|
|
|
gradeNameChange(value) {
|
|
|
|
@ -323,7 +437,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.getPhysicalList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|