辅导员增加班级搜索

This commit is contained in:
2025-10-14 11:39:20 +08:00
parent cc242e4015
commit 5fbf5f1578
2 changed files with 97 additions and 73 deletions

View File

@@ -2,7 +2,15 @@
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px"> label-width="68px">
<el-form-item label="班级" prop="classId">
<el-cascader placeholder="请选择班级" v-model="classVlue1" :show-all-levels="false" :options="ClassNameList"
@change="handleChange1" clearable filterable>
<template slot-scope="{ node, data }">
<span>{{ data.label }}</span>
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
</template>
</el-cascader>
</el-form-item>
<el-form-item label="姓名" prop="xm"> <el-form-item label="姓名" prop="xm">
<el-input v-model="queryParams.xm" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.xm" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
@@ -162,7 +170,8 @@
</el-upload> --> </el-upload> -->
<el-form-item label="签名日期"> <el-form-item label="签名日期">
<el-col :span="11"> <el-col :span="11">
<el-date-picker type="date" value-format="yyyy年MM月dd日" placeholder="选择日期" v-model="form.fdyqmrq" style="width: 100%;"></el-date-picker> <el-date-picker type="date" value-format="yyyy年MM月dd日" placeholder="选择日期"
v-model="form.fdyqmrq" style="width: 100%;"></el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
</el-row> </el-row>
@@ -185,6 +194,7 @@
</template> </template>
<script> <script>
import { getClassName } from "@/api/stuCQS/basedata/student";
import { getUserProfile, updateSignature } from "@/api/system/user"; import { getUserProfile, updateSignature } from "@/api/system/user";
import { listApply, getApply, delApply, addApply, updateApply, listFdy, batchUpdateFdy } from "@/api/zxj/apply"; import { listApply, getApply, delApply, addApply, updateApply, listFdy, batchUpdateFdy } from "@/api/zxj/apply";
import ImportTable from '../tool/gen/importTable.vue'; import ImportTable from '../tool/gen/importTable.vue';
@@ -249,18 +259,22 @@ export default {
xsqm: null, xsqm: null,
xsqmrq: null, xsqmrq: null,
csdj: null, csdj: null,
zzdj: null zzdj: null,
classId:null
}, },
// 表单参数 // 表单参数
form: { status: '1' }, form: { status: '1' },
// 表单校验 // 表单校验
rules: { rules: {
} },
ClassNameList: [],//班级名称
classVlue1: []//班级搜索选择
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getClassNameList();
getUserProfile().then(response => { getUserProfile().then(response => {
this.form.fdyqm = response.data.signature; this.form.fdyqm = response.data.signature;
}); });
@@ -282,6 +296,17 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getClassNameList() {
getClassName().then(res => {
this.ClassNameList = res.data
})
},
//搜索班级选择
handleChange1(value) {
this.queryParams.classId = value[2];
//console.log(value);
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
@@ -320,7 +345,8 @@ export default {
xsqm: null, xsqm: null,
xsqmrq: null, xsqmrq: null,
csdj: null, csdj: null,
zzdj: null zzdj: null,
classId:null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@@ -333,6 +359,7 @@ export default {
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
this.classVlue1 = [];
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {

View File

@@ -60,16 +60,15 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
>新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
>修改</el-button> @click="handleUpdate">修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
>删除</el-button> @click="handleDelete">删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport"
@@ -128,10 +127,8 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
>修改</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
>删除</el-button>
<el-button size="mini" type="text" icon="el-icon-refresh" @click="doInitPwdOne(scope.row)">初始化密码</el-button> <el-button size="mini" type="text" icon="el-icon-refresh" @click="doInitPwdOne(scope.row)">初始化密码</el-button>
<el-button size="mini" type="text" icon="el-icon-view" @click="picVClick(scope.row)">查看画像</el-button> <el-button size="mini" type="text" icon="el-icon-view" @click="picVClick(scope.row)">查看画像</el-button>
</template> </template>
@@ -458,12 +455,12 @@ export default {
}, },
//搜索班级选择 //搜索班级选择
handleChange1(value) { handleChange1(value) {
this.queryParams.classId = value[2] this.queryParams.classId = value[2];
//console.log(value); //console.log(value);
}, },
//班级选择添加修改 //班级选择添加修改
handleChange2(value) { handleChange2(value) {
this.form.classId = value[2] this.form.classId = value[2];
//console.log(value); //console.log(value);
}, },
@@ -504,7 +501,7 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.classVlue1 = [], this.classVlue1 = [];
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据