| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995 |
- <template>
- <div class="content-box">
- <div class="left">
- <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
- <span class="cameratxt">成绩管理</span>
- </div>
- <div class="scrollId">
- <div class="middle">
- <div class="filter">
- <div class="condition">
- <el-input
- :clearable="true"
- @blur="searchBtn"
- @clear="searchBtn"
- v-model.trim="searchInput.keyWord"
- class="sel"
- placeholder="请输入学生姓名或学号"
- />
- </div>
- <el-button
- color="rgba(0, 97, 255, 1)"
- type="primary"
- class="search"
- @click="searchBtn"
- >
- <!-- <el-icon>
- <Search />
- </el-icon> -->
- 查询</el-button
- >
- <div class="condition">
- <span class="title">学期 : </span>
- <el-select
- v-model="searchInput.semester"
- class="sel"
- placeholder="请选择学期"
- style="width: 250px"
- @change="searchBtn"
- :clearable="true"
- >
- <el-option
- :label="i.name"
- :value="i.name"
- v-for="i in semesterData"
- />
- </el-select>
- </div>
- <div class="condition">
- <span class="title">年级 : </span>
- <el-select
- v-model="searchInput.grade"
- placeholder="请选择年级"
- style="width: 160px"
- @change="searchBtn"
- :clearable="true"
- >
- <el-option
- v-for="i in gradeData"
- :label="i.name"
- :value="`${i.name}-${i.id}`"
- >
- </el-option>
- </el-select>
- </div>
- <div class="condition">
- <span class="title">班级 : </span>
- <el-tooltip
- class="box-item"
- effect="dark"
- content="请先选择年级"
- placement="top"
- >
- <el-select
- v-model="searchInput.class"
- placeholder="请选择班级"
- style="width: 160px"
- @change="searchBtn"
- :clearable="true"
- >
- <el-option
- v-for="i in classsData"
- :label="i.name"
- :value="i.name"
- />
- </el-select>
- </el-tooltip>
- </div>
- <div class="condition">
- <span class="title">学科 : </span>
- <el-tooltip
- class="box-item"
- effect="dark"
- content="请先选择年级"
- placement="top"
- >
- <el-select
- v-model="searchInput.subject"
- class="sel"
- placeholder="请选择学科"
- style="width: 160px"
- @change="searchBtn"
- :clearable="true"
- >
- <el-option
- v-for="i in subjectData"
- :label="i.name"
- :value="i.name"
- />
- </el-select>
- </el-tooltip>
- </div>
- <div class="condition">
- <span class="title">考试类型 : </span>
- <el-tooltip
- class="box-item"
- effect="dark"
- content="请先选择年级"
- placement="top"
- >
- <el-select
- v-model="searchInput.examType"
- class="sel"
- placeholder="请选择考试类型"
- style="width: 160px"
- @change="searchBtn"
- :clearable="true"
- >
- <el-option
- v-for="i in examTypeData"
- :label="i.name"
- :value="i.name"
- /> </el-select
- ></el-tooltip>
- </div>
- <div class="condition grade">
- <span class="title">成绩 : </span>
- <el-input
- @clear="searchBtn"
- v-model.trim="searchInput.gradeLow"
- class="grade_left"
- placeholder="最低成绩"
- style="width: 90px"
- @blur="gradeNumWatch"
- />
- <span class="line">-</span>
- <el-input
- :clearable="true"
- @clear="gradeClear"
- v-model.trim="searchInput.gradeHigh"
- class="grade_right"
- placeholder="最高成绩"
- style="width: 90px"
- @blur="gradeNumWatch"
- />
- </div>
- </div>
- <!-- 按钮列表 -->
- <div class="gongneng">
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- plain
- @click="importFile"
- >成绩导入</el-button
- >
- <el-tooltip
- class="box-item"
- effect="dark"
- content="根据上面的筛选条件导出内容"
- placement="top-start"
- >
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- plain
- @click="importExcel"
- >成绩导出</el-button
- >
- </el-tooltip>
- <el-button
- type="primary"
- color="rgba(0, 97, 255, 1)"
- plain
- @click="addClick"
- >新增成绩</el-button
- >
- <el-button type="danger" @click="delClick" plain>勾选删除</el-button>
- </div>
- </div>
- <div class="footer" v-loading="loading">
- <el-table
- :row-class-name="tableRowClassName"
- :data="tableData.list"
- @selection-change="handleSelectionChange"
- style="width: 100%"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <el-table-column align="center" type="selection" width="80" />
- <el-table-column
- align="center"
- prop="semester"
- width="200"
- label="学期"
- />
- <el-table-column align="center" prop="grade" label="年级" />
- <el-table-column align="center" prop="schoolClass" label="班级" />
- <el-table-column align="center" prop="subjectStr" label="学科" />
- <el-table-column align="center" prop="examTypeStr" label="考试类型" />
- <el-table-column align="center" prop="name" label="姓名" />
- <el-table-column align="center" prop="cardNo" label="学号" />
- <el-table-column align="center" prop="score" label="成绩" />
- <el-table-column align="center" prop="status" label="操作">
- <template #default="scope">
- <div class="look" @click="editClick(scope.row)">编辑</div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 分页组件 -->
- <div class="pageSize">
- <span></span>
- <el-pagination
- background
- :current-page="currentPage"
- :page-size="pageSize"
- layout="total, prev, pager, next, jumper, slot"
- :total="total"
- @update:current-page="handleCurrentChange"
- />
- </div>
- <!-- 编辑按钮 -->
- <el-dialog
- class="editDialog"
- v-model="editVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :title="titleDialog"
- align-center
- width="650"
- :before-close="cancelEdit"
- >
- <el-form
- ref="editRef"
- :model="editRuleForm"
- :rules="editRules"
- label-width="100px"
- class="demo-ruleForm"
- :size="formSize"
- label-position="right"
- status-icon
- >
- <el-form-item label="学期 :" prop="semester">
- <!-- <el-input
- v-model.trim="editRuleForm.semester"
- placeholder="请输入学期"
- style="width: 400px"
- /> -->
- <el-select
- v-model="editRuleForm.semester"
- filterable
- allow-create
- default-first-option
- :reserve-keyword="false"
- placeholder="请选择学期"
- style="width: 400px"
- >
- <el-option
- :label="i.name"
- :value="`${i.name}-${i.id}`"
- v-for="i in semesterData"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="姓名 :" prop="name">
- <el-select
- v-model="editRuleForm.name"
- popper-class="gradeSelect"
- filterable
- remote
- :remote-method="studentMethod"
- placeholder="请选择姓名"
- style="width: 400px"
- @change="changeName"
- clearable
- >
- <el-option
- v-for="item in studentData"
- :label="`${item.name}·${item.id}`"
- :value="`${item.name}·${item.id}`"
- :key="item.id"
- >
- <span style="float: left">{{ item.name }}</span>
- <span
- style="
- float: right;
- color: var(--el-text-color-secondary);
- font-size: 13px;
- "
- >{{ item.id }}</span
- >
- </el-option>
- <template #footer>
- <div class="addStudentMore">
- <el-button
- v-if="
- studentCurrentPage < studentTotalPage &&
- studentTotalPage != 0
- "
- @click="addStudentMore"
- >加载更多+</el-button
- >
- </div>
- </template>
- </el-select>
- </el-form-item>
- <el-form-item label="年级 :" prop="yearClass">
- <el-select
- v-model="editRuleForm.yearClass"
- placeholder="请选择年级"
- disabled
- style="width: 400px"
- @change="yearClassChange"
- >
- <el-option
- v-for="i in gradeData"
- :label="i.name"
- :value="`${i.name}-${i.id}`"
- >
- <!-- <span style="float: left">{{ i.name }}</span> -->
- <!-- <span
- style="color: var(--el-text-color-secondary); font-size: 13px"
- >{{ i.id }}</span
- > -->
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="班级 :" prop="class">
- <el-select
- v-model="editRuleForm.class"
- placeholder="请选择班级"
- disabled
- style="width: 400px"
- >
- <el-option
- v-for="i in classsData"
- :label="i.name"
- :value="`${i.name}-${i.id}`"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="学号 :" prop="schoolNum">
- <el-input
- disabled
- v-model.trim="editRuleForm.schoolNum"
- placeholder="请输入学号"
- style="width: 400px"
- />
- </el-form-item>
- <el-form-item label="学科 :" prop="subject">
- <el-select
- v-model="editRuleForm.subject"
- placeholder="请选择学科"
- style="width: 400px"
- >
- <el-option
- v-for="i in studentSubDatas"
- :label="i.name"
- :value="i.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="考试类型 :" prop="examType">
- <el-select
- v-model="editRuleForm.examType"
- placeholder="请选择考试类型"
- style="width: 400px"
- >
- <el-option
- v-for="i in studentExamTypeDatas"
- :label="i.name"
- :value="i.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="成绩 :" prop="grade">
- <el-input
- v-model.trim="editRuleForm.grade"
- placeholder="请输入成绩"
- style="width: 400px"
- />
- </el-form-item>
- <el-form-item class="options">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="confirmEdit(editRef)"
- >
- 确认
- </el-button>
- <el-button @click="cancelEdit(editRef)">取消</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- <!-- 勾选删除 -->
- <el-dialog
- class="closeAccount"
- v-model="selDelVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="勾选删除"
- align-center
- width="500"
- :before-close="cancelSelDel"
- >
- <div class="content">
- <img src="@/assets/images/warning.png" alt="" />
- <span>确定对选中的成绩进行删除吗?删除后将无法恢复。</span>
- </div>
- <div class="option">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="confirmSelDel"
- >
- 确认
- </el-button>
- <el-button @click="cancelSelDel">取消</el-button>
- </div>
- </el-dialog>
- <!-- 导入弹窗 -->
- <el-dialog
- class="importXlsx"
- v-model="importXlsx"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="导入文件"
- align-center
- width="409"
- :before-close="closeXlsx"
- >
- <div class="btn">
- <el-button
- color="rgba(0, 97, 255,1)"
- @click="importTemp"
- plain
- class="importTemp"
- >
- 模板下载</el-button
- >
- <el-upload
- class="avatar-uploader"
- action=""
- ref="upload"
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :on-change="handleChange"
- :http-request="handleUpload"
- :before-upload="beforeAvatarUpload"
- :auto-upload="false"
- :limit="1"
- :on-exceed="handleExceed"
- >
- <template #trigger>
- <el-button color="rgba(0, 97, 255, 1)" @click="updateImg" plain>
- 导入文件</el-button
- >
- </template>
- <!-- <template #tip>
- <div class="el-upload__tip">
- (注:图片大小不超过10M,建议按3:2比例)
- </div>
- </template> -->
- </el-upload>
- </div>
- <div class="options">
- <el-button
- color="rgba(0, 97, 255, 1)"
- class="queding"
- type="primary"
- @click="importSuc()"
- >
- 确定
- </el-button>
- <el-button class="congzhi" @click="closeXlsx()">取消</el-button>
- </div>
- </el-dialog>
- </div>
- <div class="bgImg" v-if="bgImg">
- <el-carousel
- @click="bgImg = false"
- ref="bgImgs"
- indicator-position
- arrow="always"
- :autoplay="false"
- trigger
- >
- <el-carousel-item v-for="item in bgImgList" :key="item.id">
- <img :src="item.url" alt="" />
- </el-carousel-item>
- </el-carousel>
- </div>
- </div>
- <div v-for="item in msgList">
- <div v-for="i in item.list">
- {{ i.name }}
- </div>
- </div>
- </template>
- <script setup>
- import {
- ref,
- reactive,
- watch,
- nextTick,
- onBeforeMount,
- onUnmounted,
- } from "vue";
- import { useRouter } from "vue-router";
- import { ElMessage, ElMessageBox } from "element-plus";
- import { Calendar } from "@element-plus/icons-vue";
- import vidiconsApi from "@/api/vidicons.js";
- import { dayjs } from "element-plus";
- import eds from "@/utils/eds.js";
- import lodash from "lodash";
- import axios from "axios";
- import { useStore } from "vuex";
- const store = useStore();
- const api = ref("");
- const router = useRouter();
- // 表格数据
- const loading = ref(false);
- const tableData = reactive({
- list: [
- {
- xq: "2019-2020秋季学期(下学期)",
- nj: "七年级",
- bj: "一班",
- xk: "语文",
- ks: "期中考试",
- xm: "张三",
- xh: "000001",
- cj: "85",
- },
- ],
- });
- const semesterData = ref(); //学期下拉数据
- const gradeData = ref(); //年级下拉数据
- const classsData = ref(); //班级下拉数据
- const subjectData = ref(); //学科下拉数据
- const examTypeData = ref(); //考试类型数据
- const searchInput = reactive({
- keyWord: "",
- semester: "", // 学期
- grade: "", // 年级
- class: "", // 班级
- subject: "", // 学科
- examType: "", // 考试类型
- gradeLow: "", // 最低成绩
- gradeHigh: "", // 最高成绩
- }); // 搜索按钮数据
- // 失去焦点时成绩最低和最高判定
- const gradeNumWatch = () => {
- let reg = /^[0-9]*[1-9][0-9]*$/;
- // 最低成绩和最高成绩判定
- if (searchInput.gradeLow != "" && searchInput.gradeHigh != "") {
- if (reg.test(searchInput.gradeLow) && reg.test(searchInput.gradeHigh)) {
- if (Number(searchInput.gradeLow) < Number(searchInput.gradeHigh)) {
- getList();
- } else {
- ElMessage({
- type: "warning",
- showClose: true,
- message: "最低成绩不能大于最高成绩",
- center: true,
- });
- }
- } else {
- ElMessage({
- type: "warning",
- showClose: true,
- message: "请输入正确的成绩",
- center: true,
- });
- }
- }
- };
- const currentPage = ref(1); // 当前页
- const pageSize = ref(8);
- const total = ref(5); // 当前总数
- const selectData = reactive({ list: [] }); // 表格勾选的数据
- // 新增成绩中的学生分页列表
- const studentData = ref();
- const studentCurrentPage = ref(1);
- const studentPageSize = ref(50);
- const studentTotalPage = ref(); // 学生分页总共多少页,判断滚动到底是否还要加载
- const studentInput = ref(); // 学生分页下拉框中的搜索字段
- const studentExamTypeDatas = ref(); // 编辑中的考试类型数据
- const studentSubDatas = ref(); // 编辑中的学科数据
- // 编辑功能
- const titleDialog = ref("");
- const editVisible = ref(false);
- const editRef = ref();
- const editRuleForm = reactive({
- semester: "", // 学期
- yearClass: "", // 年级
- class: "", // 班级
- name: "", // 姓名
- schoolNum: "", // 学号
- subject: "", // 学科
- examType: "", // 考试类型
- grade: "", // 成绩
- id: "",
- });
- // 成绩验证
- const validateGrade = (rule, value, callback) => {
- if (/^(?!0+(?:\.0+)?$)(?:[1-9]\d*|0)(?:\.\d{1,2})?$/.test(value)) {
- callback();
- } else {
- callback(new Error("请输入正确的成绩"));
- }
- };
- // 表单验证
- const editRules = reactive({
- semester: [{ required: true, message: "学期不能为空", trigger: "blur" }],
- yearClass: [
- {
- required: true,
- message: "年级不能为空",
- trigger: "blur",
- },
- ],
- class: [
- {
- required: true,
- message: "班级不能为空",
- trigger: "blur",
- },
- ],
- name: [
- {
- required: true,
- message: "姓名不能为空",
- trigger: "blur",
- },
- ],
- schoolNum: [
- {
- required: true,
- message: "学号不能为空",
- trigger: "blur",
- },
- ],
- subject: [
- {
- required: true,
- message: "学科不能为空",
- trigger: "blur",
- },
- ],
- examType: [
- {
- required: true,
- message: "考试类型不能为空",
- trigger: "blur",
- },
- ],
- grade: [
- {
- required: true,
- message: "成绩不能为空",
- trigger: "blur",
- },
- { validator: validateGrade, trigger: "blur" },
- ],
- });
- // 删除弹窗
- const selDelVisible = ref(false);
- // 导入按钮
- const upload = ref(); // 导入按钮ref
- const fileXlsx = ref(); // 导入的文件file
- const importXlsx = ref(false); // 导入弹窗
- // 获取学期下拉
- const semesterList = async () => {
- let semester = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySmartSemesters",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- // params: data,
- });
- console.log(
- semester,
- JSON.parse(eds.decryptDes(semester.data.data)),
- "学期下拉数据"
- );
- semesterData.value = JSON.parse(eds.decryptDes(semester.data.data));
- };
- // 年级数据下拉
- const classDataList = async () => {
- semesterList();
- let grade = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartGrade/querySmartGrades",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- // params: data,
- });
- console.log(
- grade,
- JSON.parse(eds.decryptDes(grade.data.data)),
- "年级下拉数据"
- );
- gradeData.value = JSON.parse(eds.decryptDes(grade.data.data));
- // classInfoList()// 班级下拉数据
- };
- // 改变年级选择
- const yearClassChange = async (value) => {
- console.log(value);
- editRuleForm.class = "";
- let arr = value.split("-");
- classInfoList(arr[1]);
- };
- // 班级数据下拉
- const classInfoList = async (value) => {
- let data = {
- gradeId: value,
- };
- let classs = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartClass/querySmartClasss",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- if (classs.data.code == 200) {
- console.log(
- classs,
- JSON.parse(eds.decryptDes(classs.data.data)),
- "班级下拉数据"
- );
- classsData.value = JSON.parse(eds.decryptDes(classs.data.data));
- } else {
- classsData.value = [];
- }
- };
- // 考试类型数据
- const examTypeList = async (value) => {
- if (searchInput.grade) {
- let examType = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/queryExamTypes",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: {
- gradeId: value,
- },
- });
- console.log(value);
- console.log(
- examType,
- JSON.parse(eds.decryptDes(examType.data.data)),
- "考试类型下拉数据"
- );
- if (examType.data.code == 200) {
- examTypeData.value = JSON.parse(eds.decryptDes(examType.data.data));
- }
- } else {
- examTypeData.value = [];
- }
- };
- // 学科数据
- const subjectList = async (value) => {
- if (searchInput.grade) {
- let subject = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySubjects",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: {
- gradeId: value,
- },
- });
- console.log(
- subject,
- JSON.parse(eds.decryptDes(subject.data.data)),
- "学科下拉数据"
- );
- subjectData.value = JSON.parse(eds.decryptDes(subject.data.data));
- } else {
- subjectData.value = [];
- }
- };
- // 获取成绩分页数据 (----------------------------------------------------------------)
- const getList = async () => {
- loading.value = true;
- if (searchInput.grade) {
- classInfoList(searchInput.grade.split("-")[1]);
- examTypeList(searchInput.grade.split("-")[1]);
- subjectList(searchInput.grade.split("-")[1]);
- } else {
- searchInput.class = "";
- searchInput.subject = "";
- searchInput.examType = "";
- subjectData.value = [];
- classsData.value = [];
- examTypeData.value = [];
- }
- let data = {
- currentPage: currentPage.value,
- pageCount: pageSize.value,
- name: searchInput.keyWord, // 用户名称
- semester: searchInput.semester,
- // grade: searchInput.grade,
- schoolClass: searchInput.class,
- subject: searchInput.subject,
- examType: searchInput.examType,
- MinScore: searchInput.gradeLow,
- MaxScore: searchInput.gradeHigh,
- };
- if (searchInput.grade) {
- data.grade = searchInput.grade.split("-")[0];
- }
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySmartScorePage",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "成绩分页数据");
- if (res.data.code == 200) {
- loading.value = false;
- tableData.list = JSON.parse(eds.decryptDes(res.data.data)).list;
- total.value = JSON.parse(eds.decryptDes(res.data.data)).totalCount;
- // ElMessage({
- // type: "success",
- // showClose: true,
- // message: res.data.message,
- // center: true,
- // });
- } else {
- loading.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 搜索功能
- const searchBtn = lodash.debounce(async () => {
- getList();
- }, 300);
- // 搜索 清除年级数据时
- const nianJiClear = () => {
- if (searchInput.grade) {
- classInfoList(searchInput.grade.split("-")[1]);
- examTypeList(searchInput.grade.split("-")[1]);
- subjectList(searchInput.grade.split("-")[1]);
- getList();
- } else {
- subjectData.value = [];
- classsData.value = [];
- examTypeData.value = [];
- }
- };
- // 成绩查询
- const gradeClear = () => {
- searchInput.gradeLow = "";
- searchInput.gradeHigh = "";
- getList();
- };
- // 添加按钮 (-------------------------------------------)
- const addClick = async () => {
- titleDialog.value = "新增成绩";
- editVisible.value = true;
- studentCurrentPage.value = 1;
- studentList();
- // studentListScroll();
- editRuleForm.semester = "";
- editRuleForm.yearClass = "";
- editRuleForm.class = "";
- editRuleForm.name = "";
- editRuleForm.schoolNum = "";
- editRuleForm.subject = "";
- editRuleForm.examType = "";
- editRuleForm.grade = "";
- editRuleForm.id = "";
- classsData.value = []; // 新增时将班级下拉数据置为空
- };
- // 获取学生分页列表
- const studentList = async () => {
- let data = {
- currentPage: studentCurrentPage.value,
- pageCount: studentPageSize.value,
- name: studentInput.value, // 用户名称
- };
- let student = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySmartSecordPage",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(
- student,
- JSON.parse(eds.decryptDes(student.data.data)),
- "学生分页数据"
- );
- studentData.value = JSON.parse(eds.decryptDes(student.data.data)).list;
- studentTotalPage.value = JSON.parse(
- eds.decryptDes(student.data.data)
- ).totalPage;
- };
- // 联系人下拉框搜索时加载
- const studentMethod = (query) => {
- console.log(query);
- studentInput.value = query;
- studentCurrentPage.value = 1;
- studentList(); // 调用学生分页接口
- };
- // 学生分页触底加载更多
- const studentListScroll = () => {
- nextTick(() => {
- const domElementNode = document.querySelector(
- ".gradeSelect .el-select-dropdown__wrap"
- );
- console.log(domElementNode);
- // 注册下拉滚动事件
- domElementNode.addEventListener("scroll", async () => {
- const isBottom =
- domElementNode.scrollHeight - domElementNode.scrollTop <=
- domElementNode.clientHeight;
- if (isBottom) {
- if (studentCurrentPage.value < studentTotalPage.value) {
- studentCurrentPage.value++;
- console.log(studentCurrentPage.value, "滚动里面");
- let data = {
- currentPage: studentCurrentPage.value,
- pageCount: studentPageSize.value,
- name: studentInput.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySmartSecordPage",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(
- res,
- JSON.parse(eds.decryptDes(res.data.data)),
- "联系人数据"
- );
- studentData.value = [
- ...studentData.value,
- ...JSON.parse(eds.decryptDes(res.data.data)).list,
- ];
- } else {
- console.log("数据全部加载完成");
- }
- }
- });
- });
- };
- // 学生列表点击 加载更多
- const addStudentMore = async () => {
- if (studentCurrentPage.value < studentTotalPage.value) {
- studentCurrentPage.value++;
- console.log(studentCurrentPage.value, "滚动里面");
- let data = {
- currentPage: studentCurrentPage.value,
- pageCount: studentPageSize.value,
- name: studentInput.value,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySmartSecordPage",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "联系人数据");
- studentData.value = [
- ...studentData.value,
- ...JSON.parse(eds.decryptDes(res.data.data)).list,
- ];
- }
- };
- //编辑按钮 (-------------------------------------------)
- const editClick = async (row) => {
- editVisible.value = true;
- console.log(row, "编辑信息");
- titleDialog.value = "编辑成绩";
- studentCurrentPage.value = 1;
- studentList(); // 学生分页
- // studentListScroll(); // 学生分页触底加载更多
- classInfoList(row.gradeId); // 班级下拉
- // 考试类型
- let examType = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/queryExamTypes",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: {
- gradeId: row.gradeId,
- },
- });
- if (examType.data.code == 200) {
- studentExamTypeDatas.value = JSON.parse(eds.decryptDes(examType.data.data));
- } else {
- studentExamTypeDatas.value = [];
- }
- // 学科数据
- let subject = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySubjects",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: {
- gradeId: row.gradeId,
- },
- });
- console.log(
- subject,
- JSON.parse(eds.decryptDes(subject.data.data)),
- "学科下拉数据"
- );
- if (subject.data.code == 200) {
- studentSubDatas.value = JSON.parse(eds.decryptDes(subject.data.data));
- } else {
- studentSubDatas.value = [];
- }
- editRuleForm.semester = `${row.semester}-${row.semesterId}`;
- editRuleForm.yearClass = `${row.grade}-${row.gradeId}`;
- editRuleForm.class = `${row.schoolClass}-${row.schoolClassId}`;
- editRuleForm.name = `${row.name}·${row.userId}`;
- editRuleForm.schoolNum = row.cardNo;
- editRuleForm.subject = row.subject;
- editRuleForm.examType = row.examType;
- editRuleForm.grade = row.score;
- editRuleForm.id = row.id;
- };
- // 取消编辑按钮
- const cancelEdit = () => {
- editVisible.value = false;
- editRef.value.resetFields();
- };
- // 编辑中选择了姓名学号 默认填写
- const changeName = async (value) => {
- console.log(value);
- editRuleForm.subject = "";
- editRuleForm.examType = "";
- editRuleForm.grade = "";
- editRuleForm.yearClass = "";
- editRuleForm.class = "";
- editRuleForm.schoolNum = "";
- if (value) {
- let data = { id: value.split("·")[1] };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartUser/queryUserData",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- });
- if (res.data.code == 200) {
- console.log(
- JSON.parse(eds.decryptDes(res.data.data)),
- "切换id获取学生信息"
- );
- let data = JSON.parse(eds.decryptDes(res.data.data));
- editRuleForm.yearClass = data.grade + "-" + data.gradeId;
- classInfoList(data.gradeId);
- editRuleForm.class = data.schoolClass + "-" + data.schoolClassId;
- editRuleForm.schoolNum = data.cardNo;
- }
- let examType = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/queryExamTypes",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: {
- gradeId: editRuleForm.yearClass.split("-")[1],
- },
- });
- if (examType.data.code == 200) {
- studentExamTypeDatas.value = JSON.parse(
- eds.decryptDes(examType.data.data)
- );
- } else {
- studentExamTypeDatas.value = [];
- }
- let subject = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/querySubjects",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: {
- gradeId: editRuleForm.yearClass.split("-")[1],
- },
- });
- console.log(
- subject,
- JSON.parse(eds.decryptDes(subject.data.data)),
- "学科下拉数据"
- );
- if (subject.data.code == 200) {
- studentSubDatas.value = JSON.parse(eds.decryptDes(subject.data.data));
- } else {
- studentSubDatas.value = [];
- }
- }
- };
- // 确定编辑
- const confirmEdit = (formEl) => {
- if (!formEl) return;
- formEl.validate(async (valid, fields) => {
- if (valid) {
- if (titleDialog.value == "新增成绩") {
- let data = {
- semester: editRuleForm.semester.split("-")[0], // 学期
- semesterId: editRuleForm.semester.split("-")[1], // 学期id
- grade: editRuleForm.yearClass.split("-")[0], // 年级
- gradeId: editRuleForm.yearClass.split("-")[1], // 年级
- schoolClass: editRuleForm.class.split("-")[0], // 班级
- schoolClassId: editRuleForm.class.split("-")[1], // 班级
- cardNo: editRuleForm.schoolNum, // 学号
- userId: editRuleForm.name.split("·")[1], // 用户ID
- subjectId: editRuleForm.subject, // 学科ID
- examType: editRuleForm.examType, // 考试类型
- score: editRuleForm.grade, // 成绩
- };
- let res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartScore/insertSmartScore",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "新增成绩");
- if (res.data.code == 200) {
- getList();
- semesterList();
- editVisible.value = false;
- editRef.value.resetFields();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- } else if (titleDialog.value == "编辑成绩") {
- let data = {
- semester: editRuleForm.semester.split("-")[0], // 学期
- semesterId: editRuleForm.semester.split("-")[1], // 学期id
- grade: editRuleForm.yearClass.split("-")[0], // 年级
- gradeId: editRuleForm.yearClass.split("-")[1], // 年级
- schoolClass: editRuleForm.class.split("-")[0], // 班级
- schoolClassId: editRuleForm.class.split("-")[1], // 班级
- cardNo: editRuleForm.schoolNum, // 学号
- userId: editRuleForm.name.split("·")[1], // 用户ID
- subjectId: editRuleForm.subject, // 学科ID
- examType: editRuleForm.examType, // 考试类型
- score: editRuleForm.grade, // 成绩
- id: editRuleForm.id,
- };
- let res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartScore/updateSmartScoreById",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "编辑成绩");
- if (res.data.code == 200) {
- getList();
- semesterList();
- editVisible.value = false;
- editRef.value.resetFields();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- }
- });
- };
- //删除按钮 (-------------------------------------------------------)
- const delClick = async () => {
- if (selectData.list.length >= 1) {
- selDelVisible.value = true;
- } else {
- ElMessage({
- type: "warning",
- showClose: true,
- message: "请先选定所需要删除的成绩!",
- center: true,
- });
- }
- };
- // 确定删除
- const confirmSelDel = async () => {
- let userId = [];
- selectData.list.forEach((i) => {
- userId.push(i.id);
- });
- let data = {
- ids: userId,
- };
- let res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartScore/deleteSmartScoreByIds",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "删除成功");
- if (res.data.code == 200) {
- selDelVisible.value = false;
- if (
- selectData.list.length == tableData.list.length &&
- currentPage.value != 1
- ) {
- currentPage.value = currentPage.value - 1;
- }
- getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- const cancelSelDel = () => {
- selDelVisible.value = false;
- };
- // 表格勾选删除成绩
- const handleSelectionChange = (val) => {
- console.log(val);
- selectData.list = val;
- };
- //导出功能 (-----------------------------------------------------------------)
- const importExcel = async () => {
- let data = {
- name: searchInput.keyWord,
- semester: searchInput.semester,
- grade: searchInput.grade,
- schoolClass: searchInput.class,
- subject: searchInput.subject,
- examType: searchInput.examType,
- MinScore: searchInput.gradeLow,
- MaxScore: searchInput.gradeHigh,
- };
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/smartUserExport",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: data,
- responseType: "blob",
- });
- console.log(res, "导出用户");
- if (res.status == 200) {
- let name = `成绩表信息`;
- var content = res.data;
- var datas = new Blob([content]);
- var downloadUrl = window.URL.createObjectURL(datas);
- var anchor = document.createElement("a");
- anchor.href = downloadUrl;
- anchor.download = name + ".xlsx";
- anchor.click();
- window.URL.revokeObjectURL(datas);
- ElMessage({
- type: "success",
- showClose: true,
- message: "导出成功",
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: "导出失败",
- center: true,
- });
- }
- };
- // 添导入文件功能 (--------------------------------------------------------------------)
- const importFile = () => {
- importXlsx.value = true;
- };
- const closeXlsx = () => {
- importXlsx.value = false;
- fileXlsx.value = "";
- upload.value.clearFiles();
- };
- // 导出模板
- const importTemp = async () => {
- let res = await axios({
- method: "get",
- url: api.value + "/wanzai/api/smartScore/downloadScoreExcel",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- },
- // responseType: "blob",
- });
- console.log(res, "导出模板");
- if (res.status == 200) {
- var downloadPath = JSON.parse(eds.decryptDes(res.data.data));
- window.location.href = downloadPath;
- var downloadLink = document.createElement("a");
- downloadLink.style.display = "none"; // 使其隐藏
- downloadLink.href = downloadPath;
- downloadLink.download = "";
- downloadLink.click();
- document.body.appendChild(downloadLink);
- document.body.removeChild(downloadLink);
- ElMessage({
- type: "success",
- showClose: true,
- message: "导出成功",
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: "导出失败",
- center: true,
- });
- }
- };
- // upload http-request
- const handleChange = (file, fileLists) => {
- console.log(file, "file11111");
- // let formData = new FormData(); //声明一个FormDate对象
- // formData.append("formFile", file.raw);
- // fileXlsx.value = formData;
- fileXlsx.value = file.raw;
- };
- // 可以获取文件参数(封面图上传图片)
- const handleUpload = (file) => {
- console.log(file, "file22222");
- };
- // 移出文件
- const handleRemove = (uploadFile, uploadFiles) => {
- console.log(uploadFile, uploadFiles);
- fileXlsx.value = "";
- };
- // 限制上传图片的大小类型
- const beforeAvatarUpload = (rawFile) => {
- console.log(rawFile.type);
- if (
- rawFile.type !==
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
- ) {
- ElMessage.error("文件必须为xlsx格式!");
- return false;
- }
- // else if (rawFile.size / 1024 / 1024 > 10) {
- // ElMessage.error("图片的大小不能超过10MB!");
- // return false;
- // }
- return true;
- };
- // 上传文件时多次上传会替换前一个文件
- const handleExceed = (files) => {
- console.log(files, "替换文件");
- upload.value.clearFiles();
- const file = files[0];
- upload.value.handleStart(file);
- // let formData = new FormData(); //声明一个FormDate对象
- // formData.append("formFile", files.raw);
- // fileXlsx.value = formData;
- fileXlsx.value = files.raw;
- };
- // 确定导入文件
- const importSuc = async () => {
- console.log("确定导入");
- let data = {
- file: fileXlsx.value,
- };
- let res = await axios({
- method: "post",
- url: api.value + "/wanzai/api/smartScore/importSmartScoreExcel",
- headers: {
- token: sessionStorage.getItem("token"),
- user_head: sessionStorage.getItem("userhead"),
- "Content-Type": "multipart/form-data;charset=UTF-8",
- },
- data: data,
- });
- console.log(res);
- if (res.data.code == 200) {
- importXlsx.value = false;
- upload.value.clearFiles();
- getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 表格斑马纹颜色修改
- const tableRowClassName = ({ row, rowIndex }) => {
- if (rowIndex % 2 === 0) {
- return "even";
- } else if (rowIndex % 2 !== 0) {
- return "odd";
- }
- return "";
- };
- // 分页
- const handleCurrentChange = (value) => {
- // console.log(value);
- currentPage.value = value;
- getList();
- };
- onBeforeMount(async () => {
- api.value = store.state.user.api;
- getList();
- classDataList();
- });
- onUnmounted(() => {
- // document.removeEventListener("keyup", Enters);
- });
- </script>
- <style scoped lang="scss">
- .content-box {
- min-width: 500px;
- width: calc(100vw - 260px);
- height: calc(100vh - 105px);
- margin: 20px auto;
- background-color: #fff;
- color: #fff;
- display: flex;
- flex-direction: column;
- box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- .left {
- // width: calc(100wh - 40px);
- display: flex;
- align-items: center;
- height: 60px;
- margin: 0 30px;
- border-bottom: 1px solid #ccc;
- color: rgb(0, 0, 0);
- font-size: 18px;
- font-weight: 600;
- span {
- height: 60px;
- display: block;
- line-height: 60px;
- margin-right: 20px;
- }
- .is_active {
- color: rgba(111, 182, 184, 1);
- }
- }
- .scrollId {
- overflow: auto;
- height: calc(100% - 61px);
- }
- .middle {
- width: 96%;
- margin: 0 auto;
- color: #000;
- // border-bottom: 1px solid rgb(231, 231, 231);
- .filter {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- margin: 10px 0 0 0;
- .search {
- color: #fff;
- }
- .condition {
- display: flex;
- align-items: center;
- margin: 10px 20px 10px 0;
- :deep(.el-input .el-input__inner) {
- font-size: 14px;
- }
- .title {
- padding: 0 25px 0 0;
- }
- }
- .grade {
- .el-input {
- :deep(.el-input__wrapper) {
- box-shadow: none;
- }
- }
- .grade_left {
- border-top: 1px solid #dcdfe6;
- border-bottom: 1px solid #dcdfe6;
- border-left: 1px solid #dcdfe6;
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
- }
- .line {
- display: block;
- height: 32px;
- line-height: 32px;
- padding: 0 8px;
- border-top: 1px solid #dcdfe6;
- border-bottom: 1px solid #dcdfe6;
- }
- .grade_right {
- border-top: 1px solid #dcdfe6;
- border-bottom: 1px solid #dcdfe6;
- border-right: 1px solid #dcdfe6;
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
- }
- }
- .search {
- margin-right: 20px;
- }
- }
- .gongneng {
- margin: 10px 0 20px 0;
- span {
- color: #fff;
- }
- .el-button {
- margin-right: 10px;
- }
- }
- :deep(.cont) {
- width: 60%;
- margin: 20px auto;
- }
- :deep(.download) {
- display: flex;
- align-items: center;
- margin: 10px;
- }
- :deep(.download span) {
- font-size: 16px;
- margin-left: 20px;
- }
- :deep(.cont .el-button) {
- margin-left: 60px;
- margin-bottom: 30px;
- }
- :deep(.cont .accomplish) {
- width: 100%;
- display: flex;
- justify-content: center;
- }
- :deep(.cont .accomplish .el-button) {
- width: 50%;
- margin: 0;
- }
- }
- .footer {
- width: 96%;
- height: calc(100% - 270px);
- min-height: 300px;
- margin: 10px auto 30px;
- .el-table--fit {
- height: 100%;
- :deep(.el-table__header-wrapper) {
- background-color: #000;
- font-size: 14px;
- tr {
- // color: #000;
- }
- }
- :deep(.el-table__row) {
- height: 50px;
- font-size: 14px;
- // color: #000;
- &:hover {
- td {
- background-color: rgba(223, 236, 254, 1);
- }
- }
- }
- :deep(.el-table__row td) {
- padding: 0;
- border: 0;
- .normal {
- background-color: rgba(139, 195, 74, 1);
- color: #fff;
- padding: 4px;
- }
- }
- .el-button--primary {
- margin-left: 5px;
- }
- :deep(.el-table__body .even) {
- background-color: #fff;
- }
- :deep(.el-table__body .odd) {
- background-color: rgba(240, 243, 247, 1);
- }
- :deep(.edit) {
- display: flex;
- align-items: center;
- justify-content: center;
- color: rgba(111, 182, 184, 1);
- }
- :deep(.look) {
- padding: 0 10px;
- cursor: pointer;
- color: rgba(30, 125, 251, 1);
- }
- .del {
- padding: 0 10px;
- color: rgba(212, 48, 48, 1);
- cursor: pointer;
- }
- // :deep(.look):hover {
- // color: red;
- // }
- // :deep(.del):hover {
- // color: red;
- // }
- }
- }
- // 编辑按钮
- :deep(.editDialog) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 30px 30px 10px 30px;
- .el-form-item__content {
- width: 200px;
- .el-input-group__append {
- background-color: rgba(222, 234, 252, 1);
- color: rgba(0, 97, 255, 1);
- cursor: pointer;
- user-select: none;
- }
- }
- .el-form {
- .typeTitle {
- display: block;
- color: red;
- margin: 0 0 6px 100px;
- }
- .account {
- display: flex;
- justify-content: space-between;
- .el-form-item {
- .el-form-item__content {
- width: 300px;
- }
- .el-input {
- width: 300px;
- }
- }
- }
- }
- .options {
- margin: 50px 20px 20px 0;
- width: 100%;
- .el-form-item__content {
- display: flex;
- flex-direction: row-reverse;
- }
- .queding {
- color: #fff;
- margin-left: 15px;
- }
- }
- }
- }
- // 删除成绩
- :deep(.closeAccount) {
- // height: 600px;
- overflow: hidden;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(245, 249, 255, 1);
- font-weight: 600;
- height: 60px;
- padding: 0 20px;
- line-height: 60px;
- margin: 0;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 0px 20px 20px 20px;
- // height: 200px;
- // display: flex;
- // flex-direction: column-reverse;
- .content {
- height: 80px;
- font-size: 16px;
- padding: 20px 30px;
- display: flex;
- img {
- width: 25px;
- height: 25px;
- margin: 0 8px 0 0;
- }
- }
- .option {
- display: flex;
- flex-direction: row-reverse;
- align-items: center;
- margin: 10px 0;
- .queding {
- margin-left: 20px;
- }
- }
- }
- }
- // 导入弹窗样式
- :deep(.importXlsx) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 20px 20px 10px 20px;
- .btn {
- display: flex;
- .importTemp {
- margin-right: 15px;
- }
- .avatar-uploader {
- flex: 1;
- }
- }
- .options {
- margin: 15px 0;
- .queding {
- margin-left: 20px;
- color: #fff;
- }
- display: flex;
- flex-direction: row-reverse;
- }
- }
- }
- .pageSize {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin: 0 30px;
- span {
- color: #000;
- }
- .el-pagination {
- // width: 1600px;
- :deep(.el-pagination__total) {
- color: #000;
- }
- :deep(.el-pagination__goto) {
- color: #000;
- }
- :deep(.el-pagination__classifier) {
- color: #000;
- }
- :deep(.el-input__wrapper) {
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- box-shadow: none;
- }
- :deep(.el-pager li) {
- margin: 0 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.el-pager li.is-active) {
- // background-color: rgba(0, 97, 255, 0.8);
- border: 1px solid rgba(0, 97, 255, 1);
- color: rgba(0, 97, 255, 1);
- }
- :deep(.btn-prev) {
- margin-right: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.btn-next) {
- margin-left: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- }
- }
- }
- .el-input {
- width: 192px;
- }
- </style>
- <style lang="scss">
- //添加成员 联系人下拉框样式
- .gradeSelect {
- // border: 1px solid red;
- .el-select-dropdown__wrap {
- height: 200px;
- // border: 1px solid red;
- }
- }
- .el-popper {
- .addStudentMore {
- text-align: center;
- }
- }
- </style>
|