Scoring.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. <template>
  2. <div class="ev-scoring dark-iview-table">
  3. <vuescroll ref="score-main-warp">
  4. <SimpleAnalysis :examInfo="examInfo" v-show="!showTest" :overviewInfo="overviewInfo"></SimpleAnalysis>
  5. <div class="ev-target-box dark-iview-select">
  6. <span class="filter-label" v-if="examInfo.grades && examInfo.grades.length > 0">{{$t('learnActivity.score.gradeLabel')}}</span>
  7. <Select filterable v-model="chooseGrade" class="filter-select" size="small" v-if="examInfo.grades && examInfo.grades.length > 0" style="margin-right:5px" transfer>
  8. <Option v-for="(item,index) in examInfo.grades" :value="item.id" :key="index">{{ item.name }}</Option>
  9. </Select>
  10. <span>{{$t('learnActivity.score.classLabel')}}</span>
  11. <Select filterable v-model="chooseClass" class="filter-select" style="width:140px;" @on-change="getClassStudent" size="small" transfer>
  12. <Option v-for="(item,index) in classList" :value="item.id" :key="index">{{ item.name }}</Option>
  13. </Select>
  14. <span class="filter-label" v-show="examInfo.code == 'Exam-'+$store.state.userInfo.schoolCode">{{$t('learnActivity.score.subjectLabel')}}</span>
  15. <Select filterable v-model="chooseSubject" class="filter-select" size="small" @on-change="getCurPaper" v-show="examInfo.code == 'Exam-'+$store.state.userInfo.schoolCode" transfer>
  16. <Option v-for="(item,index) in examInfo.subjects" :value="item.id" :key="index">{{ item.name }}</Option>
  17. </Select>
  18. <span style="margin-left:5px" v-show="showTest">{{$t('learnActivity.score.stuLabel')}}</span>
  19. <Select filterable v-model="chooseStudent.id" label-in-value class="filter-select" style="width:140px;" size="small" clearable @on-change="setStuInfo" v-show="showTest" transfer>
  20. <Option v-for="(item,index) in students" :value="item.id" :key="index">
  21. <span class="select-status-tag" :style="{'background':item.status == 1 ? '#ed4014' : item.status == 2 ? '#ff9900' : '#19be6b'}"></span>
  22. {{ item.name }}
  23. </Option>
  24. </Select>
  25. <span v-show="showTest" class="common-icon-text" style=" float: right; margin-right: 25px;" @click="toggleScoreStatus" icon="md-apps">
  26. <Icon :custom="showTest ? 'iconfont icon-table':'iconfont icon-scoring'" style="margin-right:5px;" />
  27. {{showTest ? $t('learnActivity.score.scoreView'):$t('learnActivity.score.scoring')}}
  28. </span>
  29. </div>
  30. <div class="scoring-main-wrap">
  31. <Table v-show="!showTest" class="score-box" border :columns="tableColumn" :data="tableData" :loading="tableLoading" @on-sort-change="onSortChange" :no-data-text="$t('learnActivity.score.classNoStu')">
  32. <template slot-scope="{ row,index }" :slot="'qu'+qIndex" v-for="(item,qIndex) in quCount">
  33. <div :key="'qu'+qIndex" @click="getStuScore(row,qIndex)" style="cursor:pointer;">
  34. <span @click="noAnswer" v-if="row.data[qIndex] == -1 && row.status == 1">- -</span>
  35. <Icon size="20" type="ios-create-outline" color="#2db7f5" v-else-if="row.data[qIndex] == -1 && row.status !== 1" />
  36. <span style="color:#2db7f5;" v-else>{{row.data[qIndex]}}</span>
  37. </div>
  38. </template>
  39. <!-- <template slot-scope="{ row,index }" slot="total">
  40. <strong>{{getcount(studentScore[row._index].data)}}</strong>
  41. </template> -->
  42. <!-- 1: 未作答 2:未评分 3:已评分 -->
  43. <template slot-scope="{ row,index }" slot="status">
  44. <span class="stu-status-tag" @click="getStuScore(row,0)" :style="{'background':row.status == 1 ? '#c5c8ce' : row.status == 2 ? '#ff9900' : '#19be6b', 'cursor':row.status == 1 ? 'text':'pointer'}">
  45. {{row.status == 1 ? $t('learnActivity.score.status1') : row.status == 2 ? $t('learnActivity.score.status2') : $t('learnActivity.score.status3')}}
  46. </span>
  47. </template>
  48. <Loading slot="loading" :top="-50"></Loading>
  49. </Table>
  50. <!-- 分页 -->
  51. <div class="page-wrap dark-ivew-select" v-show="!showTest">
  52. <Page show-total size="small" :current="currentPage" :total="studentScore.length" :page-size="pageSize" :page-size-opts="pageSizeOpts" @on-change="pageChange" @on-page-size-change="pageSizeChange" show-sizer />
  53. </div>
  54. <div class="dark-iview-table scoring-handle-box" v-show="showTest">
  55. <PaperScore ref="paperScore" :defaultIndex="defaultIndex" :examId="examInfo.id" :examScope="examInfo.scope" :paper="paperInfo" :studentAnswer="chooseStudent" :subjectId="chooseSubject" @nextStu="getNextStu" style="color:#515a6e;"></PaperScore>
  56. <Loading :top="200" type="1" style="text-align:center" v-show="dataLoading"></Loading>
  57. </div>
  58. </div>
  59. </vuescroll>
  60. <!-- <div class="mark-viewer">
  61. <MarkView></MarkView>
  62. </div> -->
  63. </div>
  64. </template>
  65. <script>
  66. import PaperScore from "./PaperScore.vue";
  67. import MarkView from "./markpaper/MarkView.vue";
  68. import SimpleAnalysis from "./SimpleAnalysis.vue";
  69. export default {
  70. props: {
  71. examInfo: {
  72. type: Object,
  73. default: () => {
  74. return {}
  75. }
  76. }
  77. },
  78. components: {
  79. PaperScore, SimpleAnalysis, MarkView
  80. },
  81. data() {
  82. return {
  83. schoolClassList: [],
  84. originData: [],
  85. studentScore: [],
  86. tableData: [],
  87. currentPage: 1,
  88. pageSize: 10,
  89. pageSizeOpts: [5, 10, 20, 30, 40],
  90. overviewInfo: {
  91. total: 0,
  92. answered: 0,
  93. noAnswer: 0,
  94. scored: 0,
  95. noScore: 0
  96. },
  97. defaultIndex: 0,
  98. tableLoading: false,
  99. showTest: false, //是否评分
  100. studentData: [],
  101. dataLoading: false,
  102. chooseGrade: "",
  103. chooseClass: "",
  104. chooseSubject: "",
  105. chooseStudent: {
  106. id: "",
  107. name: "",
  108. scores: [],
  109. answers: []
  110. },
  111. scoreList: [
  112. {
  113. title: this.$t('learnActivity.score.column1'),
  114. key: "name",
  115. fixed: "left",
  116. align: "center",
  117. width: 150,
  118. },
  119. {
  120. title: this.$t('learnActivity.score.column2'),
  121. key: "total",
  122. align: "center",
  123. sortable: true,
  124. fixed: "right",
  125. width: 100
  126. },
  127. {
  128. title: this.$t('learnActivity.score.column3'),
  129. slot: "status",
  130. align: "center",
  131. fixed: "right",
  132. width: 130,
  133. }
  134. ],
  135. tableColumn: [],
  136. quCount: [],
  137. paperInfo: {},
  138. students: [],
  139. privStuList: undefined,
  140. routerScope: ''
  141. }
  142. },
  143. methods: {
  144. // 排序操作
  145. onSortChange(data) {
  146. let order = data.order // 当前排序方式 升序、降序、正常
  147. let key = data.key // 当前排序依据
  148. switch (order) {
  149. case 'asc':
  150. this.studentScore = this.originData.sort((a, b) => { return Number(a[key]) - Number(b[key]) })
  151. break
  152. case 'desc':
  153. this.studentScore = this.originData.sort((a, b) => { return Number(b[key]) - Number(a[key]) })
  154. break
  155. case 'normal':
  156. this.studentScore = this.students
  157. break
  158. default:
  159. break
  160. }
  161. this.pageChange(1)
  162. },
  163. // 页面size变化
  164. pageSizeChange(val) {
  165. this.pageSize = val
  166. this.pageChange(1)
  167. },
  168. // 分页页面变化
  169. pageChange(page) {
  170. let start = this.pageSize * (page - 1)
  171. let end = this.pageSize * page
  172. this.currentPage = page
  173. this.tableData = this.studentScore.slice(start, end)
  174. },
  175. toggleScoreStatus() {
  176. this.$refs['paperScore'].isComplete = false
  177. this.showTest = !this.showTest
  178. },
  179. getNextStu() {
  180. let flag = false
  181. for (let index in this.paperInfo[this.chooseClass].studentAns.studentScores) {
  182. if (this.paperInfo[this.chooseClass].studentAns.studentScores[index].indexOf(-1) >= 0) {
  183. if (this.paperInfo[this.chooseClass].studentAns.studentAnswers[index].length) {
  184. flag = true
  185. this.chooseStudent.id = this.paperInfo[this.chooseClass].studentAns.studentIds[index]
  186. let curStu = this.students.find(item => {
  187. return item.id == this.chooseStudent.id
  188. })
  189. if (curStu) this.chooseStudent.name = curStu.name
  190. this.chooseStudent.answers = this.paperInfo[this.chooseClass].studentAns.studentAnswers[index]
  191. this.chooseStudent.scores = this.paperInfo[this.chooseClass].studentAns.studentScores[index]
  192. this.chooseStudent.classId = this.chooseClass
  193. this.chooseStudent.status = false
  194. this.$refs['paperScore'].isComplete = false
  195. break
  196. }
  197. }
  198. }
  199. if (!flag) {
  200. this.showTest = false
  201. this.$Message.warning(this.$t('learnActivity.score.finishScore'))
  202. }
  203. },
  204. //学生未作答提示
  205. noAnswer() {
  206. this.$Message.warning(this.$t('learnActivity.score.unableScore'))
  207. },
  208. //获取当前学科的试卷信息
  209. getCurPaper() {
  210. let paperInfo = this.examInfo.papers.find((item) => {
  211. return item.subjectId == this.chooseSubject;
  212. })
  213. this.paperInfo = this._.cloneDeep(paperInfo)
  214. this.getClassStudent()
  215. },
  216. //点击学生题号前往评分页面
  217. getStuScore(data, qIndex) {
  218. if (data.status == 2 || data.status == 3) {
  219. this.$refs['paperScore'].isComplete = false
  220. this.showTest = true
  221. this.defaultIndex = qIndex
  222. this.chooseStudent.id = data.id
  223. this.chooseStudent.name = data.name
  224. this.chooseStudent.classId = this.chooseClass
  225. let answerIndex = this.paperInfo[this.chooseClass].studentAns.studentIds.indexOf(data.id)
  226. if (answerIndex >= 0) {
  227. this.chooseStudent["scores"] = this.paperInfo[this.chooseClass].studentAns.studentScores[answerIndex]
  228. this.chooseStudent["answers"] = this.paperInfo[this.chooseClass].studentAns.studentAnswers[answerIndex]
  229. this.chooseStudent["mark"] = this.paperInfo[this.chooseClass].studentAns.mark[answerIndex] || '' //批注
  230. this.chooseStudent["status"] = false
  231. }
  232. }
  233. },
  234. //获取当前学生信息
  235. setStuInfo(data) {
  236. if (data) {
  237. this.chooseStudent.name = data.label;
  238. this.chooseStudent.classId = this.chooseClass
  239. let answerIndex = this.paperInfo[this.chooseClass].studentAns.studentIds.indexOf(data.value);
  240. if (answerIndex >= 0) {
  241. this.chooseStudent["scores"] = this.paperInfo[this.chooseClass].studentAns.studentScores[answerIndex];
  242. this.chooseStudent["answers"] = this.paperInfo[this.chooseClass].studentAns.studentAnswers[answerIndex];
  243. this.chooseStudent["mark"] = this.paperInfo[this.chooseClass].studentAns.mark[answerIndex];
  244. this.chooseStudent["status"] = false;
  245. }
  246. }
  247. },
  248. //分数求和
  249. getcount(arr) {
  250. return arr.reduce((total, item) => {
  251. if (item !== -1) {
  252. return total + item;
  253. } else {
  254. return total;
  255. }
  256. }, 0);
  257. },
  258. // 获取班级名单
  259. getClassStudent() {
  260. this.tableData = []
  261. if (!this.chooseClass) return
  262. this.showTest = false
  263. this.tableLoading = true
  264. let requestData = {
  265. ids: [this.chooseClass],
  266. scope: this.examInfo.scope == 'private' ? 'private' : 'school',
  267. // school_code: this.examInfo.scope == 'private' ? this.$store.state.userInfo.TEAMModelId : this.$store.state.userInfo.schoolCode,
  268. school_code: this.$store.state.userInfo.schoolCode
  269. };
  270. this.$api.schoolSetting.getClassroomStudent(requestData).then((res) => {
  271. if (!res.error) {
  272. if (!this.paperInfo[this.chooseClass]) {
  273. this.paperInfo[this.chooseClass] = {}
  274. }
  275. let classStu = {
  276. students: res.stus.length ? res.stus[0] : [],
  277. id: this.chooseClass
  278. }
  279. this.$set(this.paperInfo[this.chooseClass], "students", classStu)
  280. this.students = []
  281. this.studentScore = []
  282. this.tableColumn = [...this.scoreList]
  283. let defSocre = []
  284. if (this.examInfo.progress == 'pending') {//如果评测未发布,没有学生数据,则直接渲染表格
  285. this.quCount = this.paperInfo.item ? this.paperInfo.item.length : 0
  286. for (let i = 0; i < this.quCount; i++) {
  287. let data = {
  288. title: "Q" + (i + 1),
  289. slot: "qu" + i,
  290. align: "center",
  291. minWidth: 65,
  292. }
  293. this.tableColumn.push(data)
  294. defSocre.push(-1)
  295. }
  296. let classStu = this.paperInfo[this.chooseClass].students.students
  297. for (let k = 0; k < classStu.length; k++) {
  298. let score = {}
  299. score.name = classStu[k].name
  300. score.id = classStu[k].id
  301. score.data = defSocre
  302. score.total = 0
  303. score.status = 1
  304. this.studentScore.push(score)
  305. }
  306. this.pageChange(1)
  307. this.tableLoading = false
  308. } else {//如果获取进行中或已结束则需要拉取学生数据
  309. this.getStudentAnswer()
  310. }
  311. } else {
  312. this.$Message.error("API ERROR!");
  313. }
  314. })
  315. },
  316. //计算总览数据
  317. calcOverView(data) {
  318. //计算已作答未作答
  319. this.overviewInfo.noAnswer = 0
  320. data.studentAnswers.forEach(item => {
  321. if (item.length == 0) {
  322. this.overviewInfo.noAnswer++
  323. }
  324. })
  325. this.overviewInfo.answered = data.studentAnswers.length - this.overviewInfo.noAnswer
  326. // 计算已评分未评分
  327. this.overviewInfo.noScore = 0
  328. data.studentScores.forEach(item => {
  329. let flag = item.find(item => {
  330. return item == -1
  331. })
  332. if (flag) {
  333. this.overviewInfo.noScore++
  334. }
  335. })
  336. this.overviewInfo.scored = data.studentScores.length - this.overviewInfo.noScore
  337. // 班级总人数
  338. this.overviewInfo.total = data.studentIds.length
  339. },
  340. getStudentAnswer() {
  341. this.dataLoading = true
  342. let requestData = {
  343. id: this.examInfo.id,
  344. code: this.examInfo.scope == 'school' ? this.$store.state.user.schoolCode : this.$store.state.userInfo.TEAMModelId,
  345. subjectId: this.chooseSubject,
  346. classId: this.chooseClass,
  347. };
  348. this.$api.learnActivity.FindAllStudent(requestData).then(
  349. (res) => {
  350. if (res.examClassResults) {
  351. this.paperInfo[this.chooseClass]["studentAns"] = res.examClassResults[0];
  352. this.setTableData();
  353. if (res.examClassResults[0]) {
  354. this.calcOverView(res.examClassResults[0])
  355. }
  356. }
  357. },
  358. (err) => {
  359. this.$Message.error("API ERROR!");
  360. }
  361. ).finally(() => {
  362. setTimeout(() => {
  363. this.dataLoading = false
  364. this.tableLoading = false
  365. }, 500);
  366. });
  367. },
  368. //初始化表单数据
  369. setTableData() {
  370. if (this.paperInfo[this.chooseClass] && this.paperInfo[this.chooseClass]["students"] && this.paperInfo[this.chooseClass]["studentAns"]) {
  371. let studentData = this.paperInfo[this.chooseClass]["students"]
  372. let studentAns = this.paperInfo[this.chooseClass]["studentAns"]
  373. this.studentScore = []
  374. this.tableColumn = [...this.scoreList]
  375. this.quCount = studentAns.studentScores[0] ? studentAns.studentScores[0].length : 0
  376. // this.quCount = this.paperInfo.item ? this.paperInfo.item.length : 0 //不用试卷信息计算题目
  377. for (let i = 0; i < this.quCount; i++) {
  378. let data = {
  379. title: "Q" + (i + 1),
  380. slot: "qu" + i,
  381. align: "center",
  382. minWidth: 65,
  383. }
  384. this.tableColumn.push(data);
  385. }
  386. let ans = []
  387. for (let i = 0; i < studentAns.studentIds.length; i++) {
  388. for (let k = 0; k < studentData.students.length; k++) {
  389. let score = {}
  390. if (studentAns.studentIds[i] == studentData.students[k].id) {
  391. score.name = studentData.students[k].name
  392. score.id = studentAns.studentIds[i]
  393. score.data = studentAns.studentScores[i]
  394. score.total = this.getcount(score.data)
  395. if (studentAns.studentAnswers[i].length == 0) {//学生未作答
  396. score.status = 1
  397. } else if (studentAns.studentScores[i].indexOf(-1) >= 0) {//已作答,未评分
  398. score.status = 2
  399. } else {//已批改
  400. score.status = 3
  401. }
  402. this.studentScore.push(score)
  403. }
  404. }
  405. }
  406. this.originData = this._.cloneDeep(this.studentScore)
  407. this.students = this._.cloneDeep(this.studentScore)
  408. this.pageChange(1)
  409. if (ans.length) {
  410. for (let k = 0; k < this.paperInfo.papers.item.length; k++) {
  411. this.$set(
  412. this.paperInfo.papers.item[k],
  413. "answerData",
  414. ans[k]
  415. );
  416. this.$set(
  417. this.paperInfo.papers.item[k],
  418. "stuScore",
  419. score[k]
  420. );
  421. }
  422. }
  423. }
  424. },
  425. getBack(data) {
  426. if (data == "1") {
  427. this.getClassStudent();
  428. }
  429. this.showTest = false;
  430. },
  431. //获取单个学生作答数据
  432. getStudentInfo(data, index) {
  433. this.dataLoading = true;
  434. if (this.studentInfo !== undefined) {
  435. let filData = "";
  436. filData = this.studentInfo.id;
  437. let ans = [];
  438. let score = [];
  439. for (let i = 0; i < this.classDatas.studentIds.length; i++) {
  440. if (this.classDatas.studentIds[i] == filData) {
  441. ans = this.classDatas.studentAnswers[i];
  442. score = this.classDatas.studentScores[i];
  443. }
  444. }
  445. if (ans.length) {
  446. for (let k = 0; k < this.paperInfo.papers.item.length; k++) {
  447. this.$set(this.paperInfo.papers.item[k], "answerData", ans[k]);
  448. this.$set(this.paperInfo.papers.item[k], "stuScore", score[k]);
  449. }
  450. }
  451. this.dataLoading = false;
  452. } else {
  453. this.dataLoading = false;
  454. this.$Message.warning(this.$t('learnActivity.score.stStuWarning'));
  455. }
  456. this.selectIndex = index;
  457. },
  458. getAnswer(data) {
  459. //处理学生作答信息
  460. let listArr = [];
  461. data.forEach(function (el, index) {
  462. for (var i = 0; i < listArr.length; i++) {
  463. if (listArr[i].group == el.group) {
  464. listArr[i].listInfo.push(el);
  465. return;
  466. }
  467. }
  468. listArr.push({
  469. group: el.group,
  470. listInfo: [el],
  471. });
  472. });
  473. return listArr;
  474. },
  475. },
  476. watch: {
  477. examInfo: {
  478. handler(n, o) {
  479. this.privStuList = undefined
  480. if (n.subjects && n.subjects.length) {
  481. this.chooseSubject = n.subjects[0].id;
  482. }
  483. if (n.grades && n.grades.length) {
  484. this.chooseGrade = n.grades[0].id;
  485. }
  486. if (n.papers && n.papers.length) {
  487. if (n.code == 'Exam' + this.$store.state.userInfo.schoolCode) { //**现在不能通过scope判断是校本还是个人发布的评测
  488. let res = n.papers.find((item) => {
  489. return item.subjectId == this.chooseSubject;
  490. });
  491. this.paperInfo = res ? this._.cloneDeep(res) : {};
  492. } else {
  493. this.paperInfo = n.papers[0]
  494. }
  495. } else {
  496. this.paperInfo = {};
  497. }
  498. },
  499. deep: true,
  500. },
  501. classList: {
  502. handler(n, o) {
  503. if (n && n.length) {
  504. this.chooseClass = n[0].id;
  505. this.getClassStudent();
  506. } else {
  507. this.chooseClass = undefined
  508. }
  509. },
  510. deep: true,
  511. },
  512. chooseStudent: {
  513. handler(n, o) {
  514. if (n.id) {
  515. let curStu = this.studentScore.find(item => {
  516. return item.id == n.id
  517. })
  518. if (curStu.status == 2) {
  519. let flag = n.scores.find(item => {
  520. return item == -1
  521. })
  522. if (!flag) {
  523. curStu.status = 3
  524. this.overviewInfo.noScore--
  525. this.overviewInfo.scored++
  526. }
  527. }
  528. }
  529. },
  530. deep: true
  531. }
  532. },
  533. computed: {
  534. classList() {
  535. if (this.examInfo && this.examInfo.classes) {
  536. //发布对象为校本名单
  537. if (this.examInfo.scope == 'school') {
  538. this.showTest = false
  539. let classes = this.schoolClassList.filter(item => {
  540. return this.examInfo.classes.indexOf(item.id) >= 0 && (item.gradeId == this.chooseGrade || !this.chooseGrade)
  541. })
  542. return classes
  543. }
  544. // 发布对象为个人创建的自定义名单
  545. else {
  546. //根据classes查询班级信息
  547. if (!this.privStuList) {
  548. // this.$api.schoolSetting.getClassByIds({
  549. // code: this.$store.state.userInfo.TEAMModelId,
  550. // ids: this.examInfo.classes
  551. // }).then(
  552. // res => {
  553. // if (res.className && res.className.length) this.chooseClass = res.className[0].id
  554. // this.privStuList = res.className
  555. // },
  556. // err => {
  557. // console.log(err)
  558. // }
  559. // )
  560. //查询当前老师所有stulist
  561. let params = {
  562. code: this.$store.state.userInfo.TEAMModelId,
  563. scope: 'private'
  564. }
  565. this.$api.courseMgmt.findStulist(params).then(
  566. res => {
  567. this.privStuList = res.stuList
  568. },
  569. err => {
  570. this.$Message.error('API error')
  571. }
  572. )
  573. return this.privStuList
  574. } else {
  575. //过滤当前评测对象
  576. let list = this.privStuList.filter(item => {
  577. return this.examInfo.classes.indexOf(item.id) >= 0
  578. })
  579. return list
  580. }
  581. }
  582. } else {
  583. return []
  584. }
  585. },
  586. },
  587. mounted() {
  588. },
  589. created() {
  590. this.$store.dispatch('user/getSchoolProfile').then(
  591. res => {
  592. this.schoolBase = res.school_base
  593. this.schoolClassList = res.school_classes
  594. }
  595. )
  596. if (this.$route.name == 'privateEvaluation') {
  597. this.routerScope = 'private'
  598. } else {
  599. this.routerScope = 'school'
  600. }
  601. }
  602. };
  603. </script>
  604. <style scoped lang="less">
  605. @import "./Scoring.less";
  606. </style>
  607. <style lang="less">
  608. .scoring-main-wrap .ivu-table-fixed-body {
  609. background: #353535;
  610. // background: #2b2b2e;
  611. // max-height: 653px;
  612. }
  613. .scoring-main-wrap .ivu-table-tip {
  614. position: relative;
  615. z-index: 9999;
  616. }
  617. .scoring-main-wrap .ivu-table-fixed-right::before,
  618. .scoring-main-wrap .ivu-table-fixed::before {
  619. display: none;
  620. }
  621. .scoring-main-wrap .ivu-table-fixed-header thead tr th {
  622. background: #353535;
  623. // background: #2b2b2e;
  624. border-color: #606060;
  625. color: white;
  626. }
  627. .scoring-main-wrap {
  628. .ivu-table-header thead tr th {
  629. // background: #353535;
  630. background: rgba(53, 53, 53, 0.5);
  631. }
  632. .ivu-table td {
  633. // background: #353535;
  634. background: rgba(53, 53, 53, 0.5);
  635. }
  636. }
  637. .page-wrap .ivu-page-item {
  638. background: rgba(40, 40, 40, 0.5);
  639. }
  640. .page-wrap .ivu-page-item:hover {
  641. border-color: #e4eadb;
  642. }
  643. .page-wrap .ivu-page-item-active {
  644. background: #bfbfb9;
  645. }
  646. .page-wrap .ivu-page-item a {
  647. color: #f1f1f1;
  648. }
  649. .page-wrap .ivu-page-next,
  650. .page-wrap .ivu-page-prev {
  651. background: rgba(0, 0, 0, 0);
  652. }
  653. .page-wrap .ivu-page-next a,
  654. .page-wrap .ivu-page-prev a {
  655. color: #e4eadb;
  656. }
  657. .page-wrap .ivu-page-next:hover,
  658. .page-wrap .ivu-page-prev:hover {
  659. border-color: #e4eadb;
  660. }
  661. .page-wrap .ivu-page-item-active,
  662. .page-wrap .ivu-page-item:hover a {
  663. border-color: #e4eadb;
  664. }
  665. .page-wrap .ivu-page-item-active a {
  666. color: #595959;
  667. }
  668. .page-wrap
  669. .ivu-select-small.ivu-select-single
  670. .ivu-select-selection
  671. .ivu-select-selected-value {
  672. height: 27px;
  673. line-height: 27px;
  674. font-size: 12px;
  675. }
  676. .page-wrap .ivu-select-single .ivu-select-selection {
  677. height: 30px;
  678. background: transparent;
  679. border: 1px solid #595959;
  680. box-shadow: none;
  681. color: #cecece;
  682. }
  683. .page-wrap .ivu-select-single .ivu-select-placeholder {
  684. height: 30px;
  685. line-height: 30px;
  686. font-size: 16px;
  687. }
  688. </style>