洋浦学校八大中心 德育管理前端

init
gongdi 3 years ago
parent fb8bf676f6
commit a3ccf8d711

@ -395,7 +395,7 @@
background-color: white;
margin-bottom: 0.5rem;
display: flex;
justify-content: space-between;
justify-content: flex-end;
align-items: center;
padding: 0 0.5rem;
.ant-select {

@ -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>-->
<!--&lt;!&ndash;<a-input v-model="stageName"/>&ndash;&gt;-->
<!--<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>-->
<!--&lt;!&ndash;<a-input v-model="gradeName"/>&ndash;&gt;-->
<!--<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: {

@ -9,7 +9,7 @@
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>
<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>
@ -121,7 +121,7 @@
{level_id: 4, level_name: "其他"},
],
classId: "",
classList: [],
classList: [{class_id: "", class_name: "请选择班级"}],
rewardName: "",
tableColumn: tableColumn,
dataList: [],
@ -168,22 +168,28 @@
},
//
getGradeClassList: function () {
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) => {
if (result[0].data.code === 2000 && result[0].data.length != 0) {
let res = result[0].data
this.classList = res
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: "请选择班级"}];
}
},
search: function () {
this.getRewardList();
@ -231,8 +237,10 @@
this.stageId = "";
this.yearId = "";
}
this.classId = "";
this.classList = [{class_id: "", class_name: "请选择班级"}];
this.getRewardList();
this.getGradeClassList()
this.getGradeClassList();
},
classChange: function (value) {
this.classId = value;
@ -334,42 +342,45 @@
height: auto;
padding: 0.5rem;
.search-and-add-style {
width: 100%;
height: 3.5rem;
background-color: white;
margin-bottom: 0.5rem;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 0.5rem;
.search-and-add-style {
width: 100%;
height: 3.5rem;
background-color: white;
margin-bottom: 0.5rem;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 0.5rem;
.ant-select {
width: 100px;
}
.ant-select {
width: 100px;
}
.class-select-style{
width: 150px;
}
.ant-input {
width: 150px;
}
.ant-input {
width: 150px;
}
.add-button-style {
float: right;
}
.add-button-style {
float: right;
}
}
.ant-table-wrapper {
}
.ant-table-wrapper {
/deep/ .upload-container-style {
display: flex;
justify-content: center;
align-items: center;
}
/deep/ .upload-container-style {
display: flex;
justify-content: center;
align-items: center;
}
}
.ant-pagination {
margin-top: 0.5rem;
text-align: right;
}
}
.ant-pagination {
margin-top: 0.5rem;
text-align: right;
}
}
</style>

@ -52,19 +52,20 @@
dataIndex: 'excellent_name',
key: 'excellentName',
title: '评优名称',
align: "center"
align: "center",
},
{
dataIndex: 'teacher_names',
key: 'teacherNames',
title: '班主任姓名',
align: "center"
align: "center",
},
{
title: '操作',
key: 'action',
align: "center",
scopedSlots: {customRender: 'action'},
width: "150px",
}
]
export default{

Loading…
Cancel
Save