|
@@ -0,0 +1,1473 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="tabbox">
|
|
|
|
|
+ <div class="topbox">
|
|
|
|
|
+ <template>
|
|
|
|
|
+ <div class="topbox_area" v-if="boxType == 0">
|
|
|
|
|
+ <span>{{ activeinfo.name }}</span>
|
|
|
|
|
+ <span>学生列表</span>
|
|
|
|
|
+ <el-tooltip content="编辑" placement="top">
|
|
|
|
|
+ <img
|
|
|
|
|
+ src="../../../../assets/stuImg/edit.svg"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ @click="editCla(activeinfo)"
|
|
|
|
|
+ class="xk_img"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ <el-tooltip content="删除" placement="top">
|
|
|
|
|
+ <img
|
|
|
|
|
+ src="../../../../assets/stuImg/del.svg"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ @click="deleteCla(activeId)"
|
|
|
|
|
+ class="xk_img"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="topbox_area" v-if="boxType == 1">
|
|
|
|
|
+ <span>兴趣班列表</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="topbox_area" v-if="boxType == 2">
|
|
|
|
|
+ <span>学生列表</span>
|
|
|
|
|
+ <span>{{ total }}人</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 右边区域 -->
|
|
|
|
|
+ <div class="topbox_area">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ placeholder="搜索学生..."
|
|
|
|
|
+ v-model="inp"
|
|
|
|
|
+ @blur="refresh"
|
|
|
|
|
+ v-if="boxType == 0 || boxType == 2"
|
|
|
|
|
+ >
|
|
|
|
|
+ <i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ <div @click="refresh" v-if="!selectedData.length" class="action_btn">
|
|
|
|
|
+ <img
|
|
|
|
|
+ src="../../../../assets/stuImg/cz.svg"
|
|
|
|
|
+ alt="刷新"
|
|
|
|
|
+ class="action_img"
|
|
|
|
|
+ />
|
|
|
|
|
+ 刷新
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 处理学生相关操作 -->
|
|
|
|
|
+ <template v-if="boxType == 0">
|
|
|
|
|
+ <div @click="exportStudent" class="action_btn">
|
|
|
|
|
+ <img
|
|
|
|
|
+ src="../../../../assets/stuImg/share.svg"
|
|
|
|
|
+ alt="导出"
|
|
|
|
|
+ class="action_img"
|
|
|
|
|
+ />
|
|
|
|
|
+ 导出
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template v-if="selectedData.length">
|
|
|
|
|
+ <div class="action_btn action_btn2" @click="resetPassword">
|
|
|
|
|
+ <i class="el-icon-lock"></i>
|
|
|
|
|
+ 重置密码
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="action_btn action_btn2" @click="moveSelStu">
|
|
|
|
|
+ <i class="el-icon-rank"></i>
|
|
|
|
|
+ 移动
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="action_btn"
|
|
|
|
|
+ style="background: #ff4d4f; color: #fff"
|
|
|
|
|
+ @click="removeSelStu"
|
|
|
|
|
+ >
|
|
|
|
|
+ <i class="el-icon-remove-outline"></i>
|
|
|
|
|
+ 移除
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="addStudent"
|
|
|
|
|
+ v-if="!selectedData.length && (boxType == 0 || boxType == 2)"
|
|
|
|
|
+ class="action_btn"
|
|
|
|
|
+ >
|
|
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
|
|
+ 添加学生
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 处理兴趣班相关操作 -->
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="editInterestCla(0)"
|
|
|
|
|
+ v-if="boxType == 1"
|
|
|
|
|
+ class="action_btn"
|
|
|
|
|
+ >
|
|
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
|
|
+ 添加学生
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="tabList" v-loading="isLoading">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :data="tableData"
|
|
|
|
|
+ ref="tableData"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ :header-cell-style="{ background: '#E7EAF0' }"
|
|
|
|
|
+ :key="boxType"
|
|
|
|
|
+ height="100%"
|
|
|
|
|
+ class="tableList"
|
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column type="selection" v-if="boxType == 0" width="55px">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-for="(item, index) in tableColumns"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <div class="cla_box" v-if="item.label == '班级' && boxType == 0">
|
|
|
|
|
+ <span
|
|
|
|
|
+ class="cla_span"
|
|
|
|
|
+ v-for="(cla, ind) in scope.row.classname"
|
|
|
|
|
+ :key="ind + 'cla'"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ cla }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else-if="item.label == '账号' && boxType == 0">
|
|
|
|
|
+ <span>{{ scope.row.acc.split("@")[0] }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else>
|
|
|
|
|
+ <span>{{ scope.row[item.prop] }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 操作列 -->
|
|
|
|
|
+ <el-table-column width="100px" label="">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-popover
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ width="60"
|
|
|
|
|
+ trigger="hover"
|
|
|
|
|
+ popper-class="student-manage-action-popover"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="action_box">
|
|
|
|
|
+ <template v-if="boxType == 0 || boxType == 2">
|
|
|
|
|
+ <div @click="editStudent(scope.row)">编辑</div>
|
|
|
|
|
+ <div @click="deleteStudentL(scope.row, scope.row.state)">
|
|
|
|
|
+ 删除
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="boxType == 1">
|
|
|
|
|
+ <div @click="editInterestCla(1,scope.row)">编辑</div>
|
|
|
|
|
+ <div @click="deleteCla(scope.row.id)">删除</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <img
|
|
|
|
|
+ src="../../../../assets/stuImg/act.svg"
|
|
|
|
|
+ slot="reference"
|
|
|
|
|
+ alt="编辑"
|
|
|
|
|
+ class="action_img"
|
|
|
|
|
+ style="cursor: pointer"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-popover>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ <div class="page_box" v-if="boxType == 2 || boxType == 1">
|
|
|
|
|
+ <el-pagination
|
|
|
|
|
+ background
|
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
|
+ @current-change="handlePageChange"
|
|
|
|
|
+ :current-page.sync="page"
|
|
|
|
|
+ :page-sizes="[10, 15, 20, 25]"
|
|
|
|
|
+ :page-size="pageSize"
|
|
|
|
|
+ layout="sizes, prev, pager, next"
|
|
|
|
|
+ :total="total"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-pagination>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="page_box" v-if="boxType == 0 && selectedData.length">
|
|
|
|
|
+ <div class="page_box_area">
|
|
|
|
|
+ <div style="display: flex; align-items: center; gap: 10px;">
|
|
|
|
|
+ <el-checkbox @change="handleCheckedAllSelection" v-model="checkedAllSelection"></el-checkbox>
|
|
|
|
|
+ <div @click="cancelAllSelection" class="action_btn">取消全选</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="deleteSelectionStudent"
|
|
|
|
|
+ class="action_btn"
|
|
|
|
|
+ style="background: #ff4d4f; color: #fff"
|
|
|
|
|
+ >
|
|
|
|
|
+ 删除
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 编辑兴趣班弹框 -->
|
|
|
|
|
+ <el-dialog :visible.sync="InterestClaEditvisible" width="700px">
|
|
|
|
|
+ <template slot="title">
|
|
|
|
|
+ <div class="dia_title_box">
|
|
|
|
|
+ <span>{{ interIsAdd == 0 ? '添加学生' : '编辑兴趣班' }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div class="dia_box_item">
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="InterestClaEditvisible = false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="confirmInterestClaEdit">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <!-- 移动班级学生弹框 -->
|
|
|
|
|
+ <el-dialog :visible.sync="moveClaVisible" width="500px">
|
|
|
|
|
+ <template slot="title">
|
|
|
|
|
+ <div class="dia_title_box">
|
|
|
|
|
+ <span>移动班级学生</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-cascader
|
|
|
|
|
+ :options="cascaderData"
|
|
|
|
|
+ v-model="moveClaCascaderDataPath"
|
|
|
|
|
+ @change="handlemoveChangecascader"
|
|
|
|
|
+ popper-class="myCascader"
|
|
|
|
|
+ :props="{
|
|
|
|
|
+ label: 'name',
|
|
|
|
|
+ value: 'id',
|
|
|
|
|
+ children: 'children',
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="{ data, node }">
|
|
|
|
|
+ <!-- 一级选项(年级) -->
|
|
|
|
|
+ <span v-if="node.level === 1">{{ data.name }}</span>
|
|
|
|
|
+ <!-- 二级选项(班级)- 可以自定义显示 -->
|
|
|
|
|
+ <span v-else-if="node.level === 2" class="cascader-class-item">
|
|
|
|
|
+ <span>{{ data.name }}</span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <!-- 其他级别(兜底) -->
|
|
|
|
|
+ <span v-else>{{ data.name }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-cascader>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="moveClaVisible = false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="confirmMoveClaEdit">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <!-- 修改班级名称弹框 -->
|
|
|
|
|
+ <el-dialog :visible.sync="ClaEditvisible" width="500px">
|
|
|
|
|
+ <template slot="title">
|
|
|
|
|
+ <div class="dia_title_box">
|
|
|
|
|
+ <span>修改班级名称</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div class="dia_box_item">
|
|
|
|
|
+ <div class="addcla_box_item">
|
|
|
|
|
+ <span>班级名称:</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="ClaEditInfo.name"
|
|
|
|
|
+ placeholder="请输入班级名称"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="ClaEditvisible = false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="confirmClaEdit">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <!-- 编辑信息 -->
|
|
|
|
|
+ <el-dialog :visible.sync="stuEditvisible" width="500px">
|
|
|
|
|
+ <template slot="title">
|
|
|
|
|
+ <div class="dia_title_box">
|
|
|
|
|
+ <span>编辑信息</span>
|
|
|
|
|
+ <span @click="inPassword">重置密码</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <div class="dia_box_item">
|
|
|
|
|
+ <div class="addcla_box_item">
|
|
|
|
|
+ <span>姓名:</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="stuEditInfo.username"
|
|
|
|
|
+ placeholder="请输入姓名"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="addcla_box_item">
|
|
|
|
|
+ <span>账号:</span>
|
|
|
|
|
+ <div>{{ stuEditInfo.acc }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="addcla_box_item">
|
|
|
|
|
+ <span>班级:</span>
|
|
|
|
|
+ <el-cascader
|
|
|
|
|
+ :options="cascaderData"
|
|
|
|
|
+ v-model="cascaderDataPath"
|
|
|
|
|
+ @change="handleChangecascader"
|
|
|
|
|
+ popper-class="myCascader"
|
|
|
|
|
+ :props="{
|
|
|
|
|
+ label: 'name',
|
|
|
|
|
+ value: 'id',
|
|
|
|
|
+ children: 'children',
|
|
|
|
|
+ multiple: true,
|
|
|
|
|
+ }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="{ data, node }">
|
|
|
|
|
+ <!-- 一级选项(年级) -->
|
|
|
|
|
+ <span v-if="node.level === 1">{{ data.name }}</span>
|
|
|
|
|
+ <!-- 二级选项(班级)- 可以自定义显示 -->
|
|
|
|
|
+ <span v-else-if="node.level === 2" class="cascader-class-item">
|
|
|
|
|
+ <span>{{ data.name }}</span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <!-- 其他级别(兜底) -->
|
|
|
|
|
+ <span v-else>{{ data.name }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-cascader>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="closeEditStu">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="confirmEditStu">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+export default {
|
|
|
|
|
+ props: {
|
|
|
|
|
+ GrapTableData: {
|
|
|
|
|
+ type: Array,
|
|
|
|
|
+ default: () => [],
|
|
|
|
|
+ },
|
|
|
|
|
+ activeId: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: "",
|
|
|
|
|
+ },
|
|
|
|
|
+ activeinfo: {
|
|
|
|
|
+ type: Object,
|
|
|
|
|
+ default: () => {},
|
|
|
|
|
+ },
|
|
|
|
|
+ boxType: {
|
|
|
|
|
+ type: Number,
|
|
|
|
|
+ default: 0,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ userid: this.$route.query.userid,
|
|
|
|
|
+ org: this.$route.query.org,
|
|
|
|
|
+ oid: this.$route.query.oid,
|
|
|
|
|
+ role: this.$route.query.role,
|
|
|
|
|
+
|
|
|
|
|
+ cascaderData: [], // 班级级联数据
|
|
|
|
|
+ cascaderDataPath: [], // 班级级联选中数据路径
|
|
|
|
|
+
|
|
|
|
|
+ checkedAllSelection: false, // 全选
|
|
|
|
|
+
|
|
|
|
|
+ stuEditvisible: false,
|
|
|
|
|
+ stuEditInfo: {}, // 学生编辑信息
|
|
|
|
|
+ ClaEditvisible: false, // 班级编辑信息
|
|
|
|
|
+ ClaEditInfo: {}, // 班级编辑信息
|
|
|
|
|
+
|
|
|
|
|
+ moveClaVisible: false, // 移动班级学生弹框
|
|
|
|
|
+ moveClaInfo: {}, // 移动班级学生信息
|
|
|
|
|
+ moveClaCascaderDataPath: [], // 移动班级学生级联选中数据路径
|
|
|
|
|
+
|
|
|
|
|
+ InterestClaEditInfo: {}, // 兴趣班编辑信息
|
|
|
|
|
+ InterestClaEditvisible: false, // 兴趣班编辑信息
|
|
|
|
|
+ interIsAdd: 0, // 0 添加 1 编辑
|
|
|
|
|
+
|
|
|
|
|
+ tableData: [], //表格数据
|
|
|
|
|
+ selectedData: [], //选中数据
|
|
|
|
|
+
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ isLoading: false,
|
|
|
|
|
+ inp: "",
|
|
|
|
|
+
|
|
|
|
|
+ tableColumns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "学生信息",
|
|
|
|
|
+ prop: "username",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "账号",
|
|
|
|
|
+ prop: "acc",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "班级",
|
|
|
|
|
+ prop: "classname",
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ studentColumns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "学生信息",
|
|
|
|
|
+ prop: "username",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "账号",
|
|
|
|
|
+ prop: "acc",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "班级",
|
|
|
|
|
+ prop: "classname",
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ // 兴趣班表格列
|
|
|
|
|
+ tableInterestClaColumns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "班级信息",
|
|
|
|
|
+ prop: "name",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "学生人数",
|
|
|
|
|
+ prop: "pnum",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "创建时间",
|
|
|
|
|
+ prop: "create_at",
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ GrapTableData: {
|
|
|
|
|
+ handler(newVal) {
|
|
|
|
|
+ this.cascaderData = newVal;
|
|
|
|
|
+ // console.log(newVal);
|
|
|
|
|
+ },
|
|
|
|
|
+ immediate: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ activeId(newVal) {
|
|
|
|
|
+ this.inp = "";
|
|
|
|
|
+ this.refresh();
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ handleCheckedAllSelection(val) {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ // 全选所有表格数据
|
|
|
|
|
+ this.tableData.forEach(row => {
|
|
|
|
|
+ this.$refs.tableData.toggleRowSelection(row, true);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 取消全选
|
|
|
|
|
+ this.$refs.tableData.clearSelection();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ editInterestCla(type,row) {
|
|
|
|
|
+ this.InterestClaEditvisible = true;
|
|
|
|
|
+ this.InterestClaEditInfo = row;
|
|
|
|
|
+ this.interIsAdd = type;
|
|
|
|
|
+ },
|
|
|
|
|
+ // 编辑兴趣班确定
|
|
|
|
|
+ confirmInterestClaEdit() {
|
|
|
|
|
+ this.InterestClaEditvisible = false;
|
|
|
|
|
+ this.InterestClaEditInfo = {};
|
|
|
|
|
+ },
|
|
|
|
|
+ // 删除班级
|
|
|
|
|
+ deleteCla(cid) {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ id: cid,
|
|
|
|
|
+ };
|
|
|
|
|
+ if (this.time()) {
|
|
|
|
|
+ this.$confirm("此操作将删除该班级,及班级所有已产生的授课数据, 是否继续?", "", {
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ showClose: false,
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ customClass: "student-manage-delete-msgbox",
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .get(this.$store.state.api + "deleteClass", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "删除成功",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$emit("getGrade");
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ this.$message.error("删除失败");
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 移动班级学生
|
|
|
|
|
+ moveSelStu() {
|
|
|
|
|
+ console.log("this.selectedData", this.selectedData);
|
|
|
|
|
+ // 先移除班级
|
|
|
|
|
+ let box = this.cascaderData
|
|
|
|
|
+ .flatMap((item) => item.children)
|
|
|
|
|
+ .find((item) => item.id == this.activeId);
|
|
|
|
|
+ this.moveClaCascaderDataPath = [box.pid, this.activeId];
|
|
|
|
|
+ console.log(this.moveClaCascaderDataPath, "this.moveClaCascaderDataPath");
|
|
|
|
|
+ this.moveClaVisible = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ confirmMoveClaEdit() {
|
|
|
|
|
+ if (this.moveClaCascaderDataPath.length === 0) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "请选择班级",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$confirm("确定要移动该班级吗?", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ // 先移出班级
|
|
|
|
|
+ const promises = this.selectedData.map((item) => {
|
|
|
|
|
+ item.classid = item.classid
|
|
|
|
|
+ .split(",")
|
|
|
|
|
+ .filter((item) => item != this.activeId)
|
|
|
|
|
+ .join(",");
|
|
|
|
|
+ return this.deleteClassStudent(item.userid);
|
|
|
|
|
+ });
|
|
|
|
|
+ Promise.all(promises)
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ console.log("移除成功");
|
|
|
|
|
+
|
|
|
|
|
+ // 再移入班级
|
|
|
|
|
+ const promises2 = this.selectedData.map((item) => {
|
|
|
|
|
+ let box = [
|
|
|
|
|
+ ...item.classid.split(","),
|
|
|
|
|
+ this.moveClaCascaderDataPath[1],
|
|
|
|
|
+ ];
|
|
|
|
|
+ return this.moveClassStudentPromise(item, box.join(","));
|
|
|
|
|
+ });
|
|
|
|
|
+ Promise.all(promises2)
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "移动成功",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ this.moveClaVisible = false;
|
|
|
|
|
+ this.moveClaCascaderDataPath = [];
|
|
|
|
|
+ this.$emit("getGrade");
|
|
|
|
|
+ this.refresh();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "移动失败",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ // 移动班级学生级联选中数据路径改变
|
|
|
|
|
+ handlemoveChangecascader(val) {
|
|
|
|
|
+ console.log(val);
|
|
|
|
|
+ },
|
|
|
|
|
+ moveClassStudentPromise(item, cid) {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ let params = [
|
|
|
|
|
+ {
|
|
|
|
|
+ userid: item.userid,
|
|
|
|
|
+ username: item.acc,
|
|
|
|
|
+ alias: item.username,
|
|
|
|
|
+ ph: item.phonenumber,
|
|
|
|
|
+ sid: item.studentid,
|
|
|
|
|
+ cid: cid,
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+ console.log(params);
|
|
|
|
|
+
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .post(this.$store.state.api + "updateStudentInfo", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ resolve(res);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ reject(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 移除班级学生
|
|
|
|
|
+ removeSelStu() {
|
|
|
|
|
+ this.$confirm("确定要移除该班级吗?", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ const promises = this.selectedData.map((item) => {
|
|
|
|
|
+ return this.deleteClassStudent(item.userid);
|
|
|
|
|
+ });
|
|
|
|
|
+ Promise.all(promises)
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "移除成功",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ this.refresh();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "移除失败",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ this.refresh();
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ // 移除班级学生Promise
|
|
|
|
|
+ deleteClassStudent(id) {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ let params = [{ uid: id, cid: this.activeId }];
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .post(this.$store.state.api + "deleteClassStudent", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ console.log("res", res);
|
|
|
|
|
+ resolve(res);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ resolve(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 修改班级名称弹框
|
|
|
|
|
+ editCla(row) {
|
|
|
|
|
+ this.ClaEditvisible = true;
|
|
|
|
|
+ this.ClaEditInfo = row;
|
|
|
|
|
+ },
|
|
|
|
|
+ // 修改班级确定
|
|
|
|
|
+ confirmClaEdit() {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ id: this.ClaEditInfo.id,
|
|
|
|
|
+ n: this.ClaEditInfo.name,
|
|
|
|
|
+ oid: this.oid,
|
|
|
|
|
+ };
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .get(this.$store.state.api + "updateClass", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res.data[0] && res.data[0][0].classname == 1) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: this.lang.Cannotsameothercla,
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: this.lang.Editsuccessful,
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$emit("getGrade");
|
|
|
|
|
+ this.ClaEditvisible = false;
|
|
|
|
|
+ this.ClaEditInfo = {};
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: this.lang.Modificationfailed,
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 修改学生信息
|
|
|
|
|
+ confirmEditStu() {
|
|
|
|
|
+ // this.stuEditvisible = false;
|
|
|
|
|
+ console.log(this.cascaderDataPath);
|
|
|
|
|
+ if (this.stuEditInfo.username === "") {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "请输入姓名",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.cascaderDataPath.length === 0) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "请选择班级",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ let box = this.cascaderDataPath.map((item) => item[1]).join(",");
|
|
|
|
|
+ console.log(box);
|
|
|
|
|
+
|
|
|
|
|
+ console.log("this.stuEditInfo", this.stuEditInfo);
|
|
|
|
|
+
|
|
|
|
|
+ this.$confirm(
|
|
|
|
|
+ `确定要修改 ${this.stuEditInfo.username} 的学生信息吗?`,
|
|
|
|
|
+ "提示",
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.update_Student(box);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ return;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 修改学生信息
|
|
|
|
|
+ update_Student(cid) {
|
|
|
|
|
+ let params = [
|
|
|
|
|
+ {
|
|
|
|
|
+ userid: this.stuEditInfo.userid,
|
|
|
|
|
+ username: this.stuEditInfo.acc,
|
|
|
|
|
+ alias: this.stuEditInfo.username,
|
|
|
|
|
+ ph: this.stuEditInfo.phonenumber,
|
|
|
|
|
+ sid: this.stuEditInfo.studentid,
|
|
|
|
|
+ cid: cid,
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+ // return console.log(params);
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .post(this.$store.state.api + "updateStudentInfo", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: this.lang.Editsuccessful,
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ this.stuEditvisible = false;
|
|
|
|
|
+ this.refresh();
|
|
|
|
|
+ this.stuEditInfo = {};
|
|
|
|
|
+ this.cascaderDataPath = [];
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: this.lang.Modificationfailed,
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ editStudent(row) {
|
|
|
|
|
+ this.stuEditvisible = true;
|
|
|
|
|
+ this.stuEditInfo = { ...row };
|
|
|
|
|
+ // 根据 classid 找到对应的路径数组(多选模式需要二维数组)
|
|
|
|
|
+ this.cascaderDataPath = row.classid
|
|
|
|
|
+ ? this.findCascaderPath(row.classid, this.cascaderData)
|
|
|
|
|
+ : [];
|
|
|
|
|
+ },
|
|
|
|
|
+ handleChangecascader(val) {
|
|
|
|
|
+ console.log(val);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ findCascaderPath(classid, cascaderData) {
|
|
|
|
|
+ if (!classid || !cascaderData || cascaderData.length === 0) {
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log("666");
|
|
|
|
|
+
|
|
|
|
|
+ // 解析逗号分隔的 classid 字符串
|
|
|
|
|
+ const classIds = classid
|
|
|
|
|
+ .split(",")
|
|
|
|
|
+ .map((id) => id.trim())
|
|
|
|
|
+ .filter((id) => id);
|
|
|
|
|
+ const result = [];
|
|
|
|
|
+
|
|
|
|
|
+ // 递归查找每个 classid 的完整路径
|
|
|
|
|
+ const findPath = (targetId, options, path = []) => {
|
|
|
|
|
+ for (let option of options) {
|
|
|
|
|
+ const currentPath = [...path, option.id];
|
|
|
|
|
+ // 如果是二级选项(班级),检查是否匹配
|
|
|
|
|
+ if (option.children && option.children.length > 0) {
|
|
|
|
|
+ for (let child of option.children) {
|
|
|
|
|
+ if (child.id === targetId) {
|
|
|
|
|
+ return [...currentPath, child.id];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 递归查找子选项
|
|
|
|
|
+ const found = findPath(targetId, option.children, currentPath);
|
|
|
|
|
+ if (found) {
|
|
|
|
|
+ return found;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 为每个 classid 查找路径
|
|
|
|
|
+ classIds.forEach((classId) => {
|
|
|
|
|
+ const path = findPath(classId, cascaderData);
|
|
|
|
|
+ if (path) {
|
|
|
|
|
+ result.push(path);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return result;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 删除选中学生
|
|
|
|
|
+ deleteSelectionStudent() {
|
|
|
|
|
+ this.$confirm(
|
|
|
|
|
+ `确定要删除 ${this.selectedData.length} 个学生吗?`,
|
|
|
|
|
+ "提示",
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ const promises = this.selectedData.map((item) => {
|
|
|
|
|
+ return this.deleteStudentPromise(item.userid, item.state);
|
|
|
|
|
+ });
|
|
|
|
|
+ Promise.all(promises)
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.refresh();
|
|
|
|
|
+ this.cancelAllSelection();
|
|
|
|
|
+ this.$emit("getGrade");
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "删除成功",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "部分删除失败,请重试",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ // 删除学生Promise
|
|
|
|
|
+ deleteStudentPromise(id, state) {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ state = 0;
|
|
|
|
|
+ let params = [{ uid: id, state: state }];
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .post(this.$store.state.api + "deleteStudent", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ resolve(res);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ reject(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 删除学生
|
|
|
|
|
+ deleteStudentL(row, state) {
|
|
|
|
|
+ this.$confirm(`确定要删除 ${row.username} 吗?`, "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ state = 0;
|
|
|
|
|
+ let params = [{ uid: row.userid, state: state }];
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .post(this.$store.state.api + "deleteStudent", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.getAllStudent();
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "删除成功",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "删除失败",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ // 刷新
|
|
|
|
|
+ refresh() {
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.pageSize = 10;
|
|
|
|
|
+ this.total = 0;
|
|
|
|
|
+ this.tableData = [];
|
|
|
|
|
+ if (this.boxType == 0) {
|
|
|
|
|
+ // 清除选中数据
|
|
|
|
|
+ this.cancelAllSelection();
|
|
|
|
|
+ this.getStudent();
|
|
|
|
|
+ } else if (this.boxType == 1) {
|
|
|
|
|
+ this.getInterestClass();
|
|
|
|
|
+ } else if (this.boxType == 2) {
|
|
|
|
|
+ this.getAllStudent();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 重置密码
|
|
|
|
|
+ resetPassword() {
|
|
|
|
|
+ // return this.msgbox();
|
|
|
|
|
+ this.$confirm(
|
|
|
|
|
+ `确定要重置 ${this.selectedData.length} 个学生的密码吗?`,
|
|
|
|
|
+ "提示",
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ const promises = this.selectedData.map((item) => {
|
|
|
|
|
+ return this.doResetPassword(item.userid);
|
|
|
|
|
+ });
|
|
|
|
|
+ Promise.all(promises)
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.msgbox();
|
|
|
|
|
+ this.cancelAllSelection();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "部分密码重置失败,请重试",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ msgbox() {
|
|
|
|
|
+ const h = this.$createElement;
|
|
|
|
|
+ const password = "Coco1234";
|
|
|
|
|
+ const copyPassword = () => {
|
|
|
|
|
+ var textarea = document.createElement("textarea");
|
|
|
|
|
+ // 保存当前焦点元素
|
|
|
|
|
+ var currentFocus = document.activeElement;
|
|
|
|
|
+ // 将textarea添加到body中
|
|
|
|
|
+ document.body.appendChild(textarea);
|
|
|
|
|
+ // 设置textarea的值为传入的文本
|
|
|
|
|
+ textarea.value = "Coco1234";
|
|
|
|
|
+ // 让textarea获得焦点
|
|
|
|
|
+ textarea.focus();
|
|
|
|
|
+ // 为textarea设置选择范围,兼容性处理
|
|
|
|
|
+ if (textarea.setSelectionRange) {
|
|
|
|
|
+ textarea.setSelectionRange(0, textarea.value.length);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ textarea.select();
|
|
|
|
|
+ }
|
|
|
|
|
+ // 尝试执行复制命令
|
|
|
|
|
+ try {
|
|
|
|
|
+ var flag = document.execCommand("copy");
|
|
|
|
|
+ } catch (eo) {
|
|
|
|
|
+ var flag = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 移除textarea元素
|
|
|
|
|
+ document.body.removeChild(textarea);
|
|
|
|
|
+ // 将焦点返回之前的元素
|
|
|
|
|
+ currentFocus.focus();
|
|
|
|
|
+ // 返回复制是否成功
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "密码已复制到剪贴板",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ return flag;
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$msgbox({
|
|
|
|
|
+ title: "",
|
|
|
|
|
+ message: h("div", { style: "padding-left: 30px;" }, [
|
|
|
|
|
+ h(
|
|
|
|
|
+ "p",
|
|
|
|
|
+ { style: "margin-bottom: 2px;" },
|
|
|
|
|
+ `对${this.selectedData.length}个账户重置密码成功!`
|
|
|
|
|
+ ),
|
|
|
|
|
+ h("p", { style: "margin: 0; display: flex; align-items: center;" }, [
|
|
|
|
|
+ h("span", null, "默认密码为:"),
|
|
|
|
|
+ h(
|
|
|
|
|
+ "span",
|
|
|
|
|
+ { style: "color: teal; font-weight: bold; margin: 0 8px;" },
|
|
|
|
|
+ password
|
|
|
|
|
+ ),
|
|
|
|
|
+ h(
|
|
|
|
|
+ "button",
|
|
|
|
|
+ {
|
|
|
|
|
+ on: {
|
|
|
|
|
+ click: copyPassword,
|
|
|
|
|
+ },
|
|
|
|
|
+ style:
|
|
|
|
|
+ "padding: 4px 8px; background: #409EFF; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; gap: 4px;",
|
|
|
|
|
+ },
|
|
|
|
|
+ [h("i", { class: "el-icon-document-copy" })]
|
|
|
|
|
+ ),
|
|
|
|
|
+ ]),
|
|
|
|
|
+ ]),
|
|
|
|
|
+ showCancelButton: false,
|
|
|
|
|
+ showClose: false,
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ customClass: "student-manage-reset-password-msgbox",
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ // this.$message({
|
|
|
|
|
+ // type: 'info',
|
|
|
|
|
+ // message: 'action: ' + action
|
|
|
|
|
+ // });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ // 执行重置密码操作(返回Promise)
|
|
|
|
|
+ doResetPassword(id) {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ let params = [
|
|
|
|
|
+ {
|
|
|
|
|
+ uid: id,
|
|
|
|
|
+ pa: "Coco1234",
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .post(this.$store.state.api + "iniPassword", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ resolve(res);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ reject(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ inPassword() {
|
|
|
|
|
+ this.$confirm(
|
|
|
|
|
+ `确定要重置 ${this.stuEditInfo.username} 的密码吗?`,
|
|
|
|
|
+ "提示",
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ let params = [
|
|
|
|
|
+ {
|
|
|
|
|
+ uid: this.stuEditInfo.userid,
|
|
|
|
|
+ pa: "Coco1234",
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .post(this.$store.state.api + "iniPassword", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "密码重置成功",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "密码重置失败",
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ // 导出学生
|
|
|
|
|
+ exportStudent() {
|
|
|
|
|
+ var res = this.selectedData;
|
|
|
|
|
+ //如果value的json字段的key值和想要的headers值不一致时,可做如下更改
|
|
|
|
|
+ //将和下面的Object.fromEntries结合,将json字段的key值改变为要求的excel的header值
|
|
|
|
|
+ var array = [];
|
|
|
|
|
+ for (var i = 0; i < res.length; i++) {
|
|
|
|
|
+ var _json = {};
|
|
|
|
|
+ _json["学生信息"] = res[i].username;
|
|
|
|
|
+ _json["账号"] = res[i].acc;
|
|
|
|
|
+ _json["班级"] = res[i].classname;
|
|
|
|
|
+ array.push(_json);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var XLSX = require("xlsx");
|
|
|
|
|
+ const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
|
|
|
|
|
+ let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
|
|
|
|
|
+ ws["!cols"] = [
|
|
|
|
|
+ //设置每一列的宽度
|
|
|
|
|
+ { wch: 20 },
|
|
|
|
|
+ { wch: 20 },
|
|
|
|
|
+ { wch: 20 },
|
|
|
|
|
+ ];
|
|
|
|
|
+ XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
|
|
|
|
|
+ XLSX.writeFile(workbook, this.activeinfo.name + "学生列表.xlsx");
|
|
|
|
|
+ // const wopts = { bookType: "xlsx", bookSST: false, type: "array" };//写入的样式bookType:输出的文件类型,type:输出的数据类型,bookSST: 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性
|
|
|
|
|
+ // const wbout = XLSX.write(workbook, wopts);// 浏览器端和node共有的API,实际上node可以直接使用xlsx.writeFile来写入文件,但是浏览器没有该API
|
|
|
|
|
+ // FileSaver.saveAs(new Blob([wbout], { type: "application/octet-stream" }), `${title} demo.xlsx`);//保存文件
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "导出成功",
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ });
|
|
|
|
|
+ this.cancelAllSelection();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 全选
|
|
|
|
|
+ handleSelectionChange(val) {
|
|
|
|
|
+ this.selectedData = val;
|
|
|
|
|
+ // 同步全选复选框状态:当选中数量等于表格数据数量时,全选复选框应该被选中
|
|
|
|
|
+ this.checkedAllSelection = val.length > 0 && val.length === this.tableData.length;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ cancelAllSelection() {
|
|
|
|
|
+ this.$refs.tableData.clearSelection();
|
|
|
|
|
+ this.selectedData = [];
|
|
|
|
|
+ this.checkedAllSelection = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ addStudent() {
|
|
|
|
|
+ console.log("添加学生");
|
|
|
|
|
+ },
|
|
|
|
|
+ closeEditStu() {
|
|
|
|
|
+ this.stuEditvisible = false;
|
|
|
|
|
+ this.stuEditInfo = {};
|
|
|
|
|
+ },
|
|
|
|
|
+ handlePageChange(val) {
|
|
|
|
|
+ console.log(`当前页: ${val}`);
|
|
|
|
|
+ this.page = val;
|
|
|
|
|
+ this.refresh();
|
|
|
|
|
+ },
|
|
|
|
|
+ handleSizeChange(val) {
|
|
|
|
|
+ console.log(`每页条数: ${val}`);
|
|
|
|
|
+ this.pageSize = val;
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ if (this.boxType == 0) {
|
|
|
|
|
+ this.getStudent();
|
|
|
|
|
+ } else if (this.boxType == 1) {
|
|
|
|
|
+ this.getInterestClass();
|
|
|
|
|
+ } else if (this.boxType == 2) {
|
|
|
|
|
+ this.getAllStudent();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ getStudent() {
|
|
|
|
|
+ this.isLoading = true;
|
|
|
|
|
+ this.tableColumns = [];
|
|
|
|
|
+ this.tableColumns = this.studentColumns;
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ oid: this.oid,
|
|
|
|
|
+ claid: this.activeId,
|
|
|
|
|
+ inp: this.inp,
|
|
|
|
|
+ };
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .get(this.$store.state.api + "selectclaStu", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
|
|
+ let box1 = res.data[0];
|
|
|
|
|
+ box1.forEach((e) => {
|
|
|
|
|
+ // e.acc = e.acc.split("@")[0];
|
|
|
|
|
+ if (e.classname && e.classname != "null") {
|
|
|
|
|
+ e.classname = e.classname.split("/");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ e.classname = [];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ this.tableData = res.data[0];
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取兴趣班
|
|
|
|
|
+ getInterestClass() {
|
|
|
|
|
+ this.isLoading = true;
|
|
|
|
|
+ this.tableColumns = this.tableInterestClaColumns;
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ oid: this.oid,
|
|
|
|
|
+ inp: "",
|
|
|
|
|
+ page: this.page,
|
|
|
|
|
+ pageSize: this.pageSize,
|
|
|
|
|
+ };
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .get(this.$store.state.api + "selectInterestcla", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
|
|
+ this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
|
|
|
+ this.tableData = res.data[0];
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 学生管理全部学生
|
|
|
|
|
+ getAllStudent() {
|
|
|
|
|
+ this.isLoading = true;
|
|
|
|
|
+ this.cancelAllSelection();
|
|
|
|
|
+ this.tableColumns = this.studentColumns;
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ oid: this.oid,
|
|
|
|
|
+ cid: "",
|
|
|
|
|
+ inp: this.inp,
|
|
|
|
|
+ page: this.page,
|
|
|
|
|
+ num: this.pageSize,
|
|
|
|
|
+ };
|
|
|
|
|
+ this.ajax
|
|
|
|
|
+ .get(this.$store.state.api + "selectStudentManage", params)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
|
|
+ this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
|
|
|
+ let box1 = res.data[0];
|
|
|
|
|
+ box1.forEach((e) => {
|
|
|
|
|
+ if (e.classname && e.classname != "null") {
|
|
|
|
|
+ e.classname =
|
|
|
|
|
+ (e.gname !== null && e.gname !== undefined ? e.gname : "") +
|
|
|
|
|
+ e.classname;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ e.classname = "-";
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ this.tableData = res.data[0];
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ time() {
|
|
|
|
|
+ if (!this.now) {
|
|
|
|
|
+ this.now = new Date().getTime();
|
|
|
|
|
+ return true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ let time = new Date().getTime();
|
|
|
|
|
+ if (time - this.now > 3000) {
|
|
|
|
|
+ this.now = time;
|
|
|
|
|
+ return true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style>
|
|
|
|
|
+/* 学生管理表格操作弹窗样式 - 全局样式(Element UI popover 挂载到 body,需要全局样式) */
|
|
|
|
|
+.student-manage-action-popover {
|
|
|
|
|
+ width: 70px !important;
|
|
|
|
|
+ min-width: 60px !important;
|
|
|
|
|
+ padding: 0 !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.student-manage-action-popover .action_box > div {
|
|
|
|
|
+ padding: 8px 15px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+}
|
|
|
|
|
+.student-manage-action-popover .action_box > div:hover {
|
|
|
|
|
+ background: #e8f3ff;
|
|
|
|
|
+ color: #0052d9;
|
|
|
|
|
+}
|
|
|
|
|
+/* 学生管理重置密码消息框样式 - 全局样式(Element UI msgbox 挂载到 body,需要全局样式) */
|
|
|
|
|
+.student-manage-reset-password-msgbox .el-message-box__status {
|
|
|
|
|
+ top: 0 !important;
|
|
|
|
|
+ transform: none !important;
|
|
|
|
|
+ align-self: flex-start !important;
|
|
|
|
|
+}
|
|
|
|
|
+.student-manage-reset-password-msgbox .el-message-box__message {
|
|
|
|
|
+ padding-left: 0 !important;
|
|
|
|
|
+ display: flex !important;
|
|
|
|
|
+ align-items: flex-start !important;
|
|
|
|
|
+}
|
|
|
|
|
+.student-manage-reset-password-msgbox .el-message-box__message > p {
|
|
|
|
|
+ margin-top: 0 !important;
|
|
|
|
|
+}
|
|
|
|
|
+.student-manage-reset-password-msgbox .el-message-box__btns {
|
|
|
|
|
+ text-align: right !important;
|
|
|
|
|
+}
|
|
|
|
|
+.student-manage-reset-password-msgbox
|
|
|
|
|
+ .el-message-box__btns
|
|
|
|
|
+ .el-button--primary {
|
|
|
|
|
+ background-color: #409eff !important;
|
|
|
|
|
+ border-color: #409eff !important;
|
|
|
|
|
+ color: #fff !important;
|
|
|
|
|
+}
|
|
|
|
|
+.student-manage-reset-password-msgbox
|
|
|
|
|
+ .el-message-box__btns
|
|
|
|
|
+ .el-button--primary:hover {
|
|
|
|
|
+ background-color: #66b1ff !important;
|
|
|
|
|
+ border-color: #66b1ff !important;
|
|
|
|
|
+}
|
|
|
|
|
+/* 学生管理删除确认对话框样式 - 按钮右对齐 */
|
|
|
|
|
+.student-manage-delete-msgbox .el-message-box__btns {
|
|
|
|
|
+ text-align: right !important;
|
|
|
|
|
+}
|
|
|
|
|
+.myCascader
|
|
|
|
|
+ .el-cascader-panel
|
|
|
|
|
+ .el-cascader-menu:first-child
|
|
|
|
|
+ .el-scrollbar__wrap
|
|
|
|
|
+ ul
|
|
|
|
|
+ li
|
|
|
|
|
+ label,
|
|
|
|
|
+.myCascader
|
|
|
|
|
+ .el-cascader-panel
|
|
|
|
|
+ .el-cascader-menu:first-child
|
|
|
|
|
+ .el-scrollbar__wrap
|
|
|
|
|
+ ul
|
|
|
|
|
+ li
|
|
|
|
|
+ .el-checkbox {
|
|
|
|
|
+ display: none !important;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.tabbox {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+}
|
|
|
|
|
+.topbox {
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ height: 60px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ border-radius: 8px 8px 8px 8px;
|
|
|
|
|
+ padding: 5px 10px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+}
|
|
|
|
|
+.topbox_area {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+.xk_img {
|
|
|
|
|
+ width: 20px;
|
|
|
|
|
+ height: 20px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+}
|
|
|
|
|
+.topbox_area >>> .el-input {
|
|
|
|
|
+ width: 150px;
|
|
|
|
|
+}
|
|
|
|
|
+.topbox_area >>> .el-input__inner {
|
|
|
|
|
+ height: 30px;
|
|
|
|
|
+ line-height: 30px;
|
|
|
|
|
+ width: 150px;
|
|
|
|
|
+}
|
|
|
|
|
+.topbox_area >>> .el-input__icon {
|
|
|
|
|
+ line-height: 30px;
|
|
|
|
|
+}
|
|
|
|
|
+.tabList {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ border-radius: 0 0 8px 8px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+.tableList >>> .has-gutter .gutter {
|
|
|
|
|
+ background: #e7eaf0 !important;
|
|
|
|
|
+}
|
|
|
|
|
+.tableList >>> .el-table__header-wrapper .el-checkbox {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+}
|
|
|
|
|
+.cla_box {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+.cla_span {
|
|
|
|
|
+ background: #e8f3ff;
|
|
|
|
|
+ color: #0052d9;
|
|
|
|
|
+ padding: 0px 25px;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+}
|
|
|
|
|
+.action_btn {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ gap: 5px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ background: #f6f6f6;
|
|
|
|
|
+ padding: 7px 15px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+}
|
|
|
|
|
+.action_btn2 {
|
|
|
|
|
+ background: #0052d9;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+.page_box {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 10px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+}
|
|
|
|
|
+.page_box_area {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ /* padding: 0 10px; */
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+}
|
|
|
|
|
+.dia_box_item {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+.addcla_box_item {
|
|
|
|
|
+ min-height: 35px;
|
|
|
|
|
+ /* line-height: 30px; */
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+.addcla_box_item >>> .el-cascader {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+.addcla_box_item >>> .el-select {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+.addcla_box_item >>> .el-input__inner {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+.addcla_box_item >>> .el-input__icon {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+.addcla_box_item span {
|
|
|
|
|
+ width: 80px;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+}
|
|
|
|
|
+.tabbox >>> .el-dialog {
|
|
|
|
|
+ border-radius: 10px !important;
|
|
|
|
|
+}
|
|
|
|
|
+.dia_title_box {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+.dia_title_box span:nth-child(1) {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+}
|
|
|
|
|
+.dia_title_box span:nth-child(2) {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #689ce9;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-bottom: 1px solid #689ce9;
|
|
|
|
|
+}
|
|
|
|
|
+.cascader-class-item {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 5px;
|
|
|
|
|
+}
|
|
|
|
|
+.class-student-count {
|
|
|
|
|
+ color: #86909c;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+/* 隐藏一级选项(年级)的多选按钮 */
|
|
|
|
|
+.addcla_box_item
|
|
|
|
|
+ >>> .el-cascader-panel
|
|
|
|
|
+ .el-cascader-menu
|
|
|
|
|
+ .el-cascader-menu__wrap
|
|
|
|
|
+ .el-checkbox {
|
|
|
|
|
+ display: none !important;
|
|
|
|
|
+}
|
|
|
|
|
+.addcla_box_item >>> .el-cascader-menu:first-child .el-cascader-menu__item {
|
|
|
|
|
+ padding-left: 20px !important;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|