works.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235
  1. <template>
  2. <div
  3. class="pb_content"
  4. style="
  5. background: unset;
  6. overflow: auto;
  7. padding: 20px;
  8. margin: 0;
  9. box-sizing: border-box;
  10. "
  11. >
  12. <div
  13. style="
  14. position: absolute;
  15. width: 100%;
  16. top: 0;
  17. height: 100%;
  18. overflow: auto;
  19. left: 50%;
  20. transform: translateX(-50%);
  21. "
  22. >
  23. <div
  24. class="pb_content_body"
  25. style="
  26. background: #fff;
  27. padding: 0px 21px;
  28. box-sizing: border-box;
  29. border-radius: 5px;
  30. "
  31. >
  32. <div class="pb_head">
  33. <!-- <span>备注:教师可以根据课程、班级条件筛选学生并查看该学生信息</span> -->
  34. <span
  35. v-if="type == '2'"
  36. @click="
  37. goTo(
  38. '/tcStudent?userid=' + userid + '&oid=' + oid + '&org=' + org
  39. )
  40. "
  41. >学生管理</span
  42. >
  43. <span
  44. v-else
  45. @click="
  46. goTo(
  47. '/course?userid=' +
  48. userid +
  49. '&oid=' +
  50. oid +
  51. '&org=' +
  52. org +
  53. '&role=' +
  54. role
  55. )
  56. "
  57. >课程管理</span
  58. >
  59. <span class="sub_head">评价管理</span>
  60. <!-- <span
  61. @click="
  62. goTo(
  63. '/worksReport?userid=' + userid + '&oid=' + oid + '&org=' + org
  64. )
  65. "
  66. >数据报告</span
  67. > -->
  68. </div>
  69. <div class="student_head">
  70. <div class="cutTab" >
  71. <div @click="cutTabBtn(0)" :class="[ cutTabNum==0 ? 'cutTabTwo':'']">按课程查看</div>
  72. <div @click="cutTabBtn(1)" :class="[ cutTabNum==1 ? 'cutTabTwo':'']">按学生查看</div>
  73. </div>
  74. <div class="student_search" v-if="cutTabNum==0">
  75. <div>班级筛选</div>
  76. <el-select v-model="classChoose" @change="search">
  77. <el-option label="全部" value="">全部</el-option>
  78. <el-option
  79. v-for="(c, cIndex) in classJuri"
  80. :key="cIndex"
  81. :value="c.id"
  82. :label="c.name"
  83. ></el-option>
  84. </el-select>
  85. <!-- <div
  86. style="
  87. line-height: 35px;
  88. font-size: 14px;
  89. min-width: 60px;
  90. margin-left: 10px;
  91. "
  92. >
  93. 目标筛选
  94. </div> -->
  95. <!-- <el-select v-model="eChoose" @change="search" clear="mbCss">
  96. <el-option label="全部" value="">全部</el-option>
  97. <el-option
  98. v-for="(e, eIndex) in evaJuri"
  99. :key="eIndex"
  100. :value="e.id"
  101. :label="e.title"
  102. ></el-option>
  103. </el-select> -->
  104. <el-input
  105. v-model="cn"
  106. placeholder="筛选课程名称"
  107. @change="search"
  108. ></el-input>
  109. </div>
  110. <div class="student_search" v-if="cutTabNum==1">
  111. <div>学生筛选</div>
  112. <el-select v-model="classChoose" @change="search">
  113. <el-option label="所有班级" value="">所有班级</el-option>
  114. <el-option
  115. v-for="item in classJuri"
  116. :key="item.id"
  117. :label="item.name"
  118. :value="item.id"
  119. >
  120. </el-option>
  121. </el-select>
  122. <el-input
  123. v-model="cn"
  124. placeholder="筛选学生名称"
  125. @change="search"
  126. ></el-input>
  127. </div>
  128. <!-- <div
  129. style="
  130. margin-left: 10px;
  131. cursor: pointer;
  132. float: right;
  133. min-width: 100px;
  134. "
  135. @click="
  136. goTo(
  137. '/studentWorks?userid=' + userid + '&oid=' + oid + '&org=' + org
  138. )
  139. "
  140. >
  141. 学生评价管理
  142. </div> -->
  143. </div>
  144. </div>
  145. <div class="pb_content_body">
  146. <div class="student_table">
  147. <el-table
  148. ref="table"
  149. :data="tableData1"
  150. border
  151. :height="tableHeight"
  152. :fit="true"
  153. v-loading="isLoading"
  154. style="width: 100%"
  155. v-show="cutTabNum == 0"
  156. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
  157. :row-class-name="tableRowClassName"
  158. >
  159. <el-table-column
  160. prop="title"
  161. label="课程"
  162. min-width="30"
  163. align="center"
  164. ></el-table-column>
  165. <el-table-column label="班级" min-width="30" align="center">
  166. <template slot-scope="scope">
  167. {{
  168. tableData1[scope.$index].classJson.className
  169. ? tableData1[scope.$index].classJson.className
  170. : "-"
  171. }}
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. prop="uname"
  176. label="创建人"
  177. min-width="30"
  178. align="center"
  179. ></el-table-column>
  180. <!-- <el-table-column
  181. prop="evaTitle"
  182. label="目标名称"
  183. min-width="30"
  184. align="center"
  185. >
  186. <template slot-scope="scope">
  187. {{ scope.row.evaTitle ? scope.row.evaTitle : "-" }}
  188. </template>
  189. </el-table-column>
  190. <el-table-column
  191. prop="time"
  192. label="时间"
  193. min-width="20"
  194. align="center"
  195. ></el-table-column> -->
  196. <el-table-column align="center" min-width="30" label="操作" >
  197. <template slot-scope="scope">
  198. <!-- <el-button
  199. type="primary"
  200. size="small"
  201. @click="
  202. goTo(
  203. '/worksDetail?cid=' +
  204. scope.row.courseId +
  205. '&userid=' +
  206. userid +
  207. '&oid=' +
  208. oid
  209. )
  210. "
  211. >查看学生</el-button>-->
  212. <!-- <el-button type="primary" size="small" @click="getWorkData(scope.row)">生成报告</el-button> -->
  213. <el-button
  214. type="primary"
  215. size="small"
  216. @click="getWorkData(scope.row)"
  217. >查看作业</el-button
  218. >
  219. <el-button
  220. type="primary"
  221. size="small"
  222. @click="getStudnet(scope.row)"
  223. >查看报告</el-button
  224. >
  225. </template>
  226. </el-table-column>
  227. </el-table>
  228. <el-table
  229. v-if="cutTabNum == 1"
  230. ref="table"
  231. :data="tableData"
  232. border
  233. :height="tableHeight"
  234. :fit="true"
  235. v-loading="isLoading"
  236. style="width: 100%"
  237. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
  238. :row-class-name="tableRowClassName"
  239. >
  240. <el-table-column
  241. prop="name"
  242. label="学生名称"
  243. min-width="30"
  244. align="center"
  245. ></el-table-column>
  246. <el-table-column
  247. prop="className"
  248. label="班级"
  249. min-width="40"
  250. align="center"
  251. >
  252. <template slot-scope="scope">
  253. {{
  254. scope.row.className ? scope.row.className : "-"
  255. }}
  256. </template>
  257. </el-table-column>
  258. <el-table-column label="操作" align="center" min-width="30">
  259. <template slot-scope="scope">
  260. <el-button
  261. type="primary"
  262. size="small"
  263. @click="getStuWorkData(scope.row)"
  264. >查看课程</el-button
  265. >
  266. </template>
  267. </el-table-column>
  268. </el-table>
  269. </div>
  270. <div class="student_page">
  271. <el-pagination
  272. background
  273. layout="prev, pager, next"
  274. :page-size="10"
  275. :total="total"
  276. :current-page.sync="page"
  277. v-if="page"
  278. @current-change="handleCurrentChange"
  279. ></el-pagination>
  280. </div>
  281. </div>
  282. </div>
  283. <!-- <el-dialog
  284. title="查看报告"
  285. :visible.sync="dialogVisible"
  286. :append-to-body="true"
  287. width="750px"
  288. :before-close="handleClose"
  289. class="dialog_diy"
  290. >
  291. <div>
  292. <div class="a_addBox">
  293. <WorkDate :dataJson="dataJson"></WorkDate>
  294. </div>
  295. </div>
  296. <span slot="footer" class="dialog-footer">
  297. <el-button @click="dialogVisible = false">关 闭</el-button>
  298. </span>
  299. </el-dialog>-->
  300. <div class="sdetailBox" v-if="dialogVisibleS">
  301. <StudentWorksDetail
  302. :uid="dataJson.userid"
  303. :username="dataJson.name"
  304. :ooid="oid"
  305. :oorg="org"
  306. @StuCancel="StuCancel"
  307. :dialogVisibleS.sync="dialogVisibleS"
  308. ></StudentWorksDetail>
  309. </div>
  310. <WorkDate
  311. :dataJson="dataJson"
  312. :uid="userid"
  313. :cid="dataJson.courseId"
  314. :ooid="oid"
  315. @cancel="cancel"
  316. :dialogVisibleBao.sync="dialogVisibleBao"
  317. :dialogVisible.sync="dialogVisible"
  318. v-if="dialogVisible"
  319. class="workdates"
  320. ></WorkDate>
  321. <!-- 查看报告弹框新版全屏页面 -->
  322. <el-dialog
  323. :visible.sync="signDialog"
  324. width="500px"
  325. :before-close="handleClose"
  326. class="lookWorksDialogCSSExp"
  327. style="overflow: hidden;"
  328. :append-to-body="true"
  329. :fullscreen="true"
  330. >
  331. <div slot="title" class="header-title">
  332. <div style="color: #fff">查看报告</div>
  333. </div>
  334. <!-- <div style="display: flex;align-items: center;padding-bottom: 15px;font-size: 14px;color: rgba(0, 0, 0, 0.4);">
  335. <span @click="pageBack" style="height: 100%;cursor: pointer;">评价管理</span>
  336. <span style="margin: 0 5px;">
  337. <i class="el-icon-arrow-right"></i>
  338. </span>
  339. <span @click="pageBack" style="height: 100%;cursor: pointer;">查看课程</span>
  340. <span style="margin: 0 5px;">
  341. <i class="el-icon-arrow-right"></i>
  342. </span>
  343. <div style="font-weight: 600;color: rgba(0, 0, 0, 0.9);">{{ checkCourse.title }}-查看报告</div>
  344. </div>
  345. <div class="JsonTit">
  346. <div style="width:94%;margin: 0 auto;font-size: 26px;color: rgba(0, 0, 0, 0.9);">{{ checkCourse.title }}</div>
  347. <div class="JsonTitBtn">
  348. <el-button v-if="checkCourse.state == 5" @click="exportWorkPdf" type="primary" size="small"
  349. >一键导出</el-button
  350. >
  351. <el-button style="margin-left: 20px;" @click="pageBack" type="primary" size="small">返回</el-button>
  352. </div>
  353. </div>
  354. <div class="student_search" style="margin-bottom: 10px;justify-content: space-between;width: 94%;margin:30px auto;">
  355. <div style="display: flex;justify-content: space-between;">
  356. <div style="margin-right: 10px;">筛选</div>
  357. <div>
  358. <el-select
  359. class="r_select"
  360. v-model="uClass"
  361. placeholder="请选择班级"
  362. filterable
  363. @change="searchWork2"
  364. >
  365. <el-option label="所有班级" value></el-option>
  366. <el-option
  367. v-for="item in classAarray"
  368. :key="item.id"
  369. :label="item.name"
  370. :value="item.id"
  371. ></el-option>
  372. </el-select>
  373. </div>
  374. <el-select
  375. class="r_select"
  376. v-model="uname"
  377. placeholder="请选择学生"
  378. @change="searchWork2"
  379. >
  380. <el-option label="所有学生" value></el-option>
  381. <el-option
  382. v-for="item in userAarray"
  383. :key="item.userid"
  384. :label="item.sName"
  385. :value="item.userid"
  386. >
  387. </el-option>
  388. </el-select>
  389. <div class="typeCheck">
  390. <el-switch v-model="typeCheckN"></el-switch
  391. ><span style="font-size: 14px;">查看所有学生</span>
  392. </div>
  393. </div>
  394. </div>
  395. <div class="TableCss">
  396. <el-table
  397. v-loading="isLoading2"
  398. ref="multipleTable"
  399. :data="lookReportTab"
  400. border
  401. :fit="true"
  402. style="width: 100%"
  403. :row-class-name="tableRowClassName"
  404. :header-cell-style="{ background: 'rgb(238,238,238)' }"
  405. @selection-change="handleSelectionChange"
  406. >
  407. <el-table-column
  408. prop="sName"
  409. label="姓名"
  410. min-width="20"
  411. align="center"
  412. ></el-table-column>
  413. <el-table-column
  414. label="班级"
  415. min-width="20"
  416. show-overflow-tooltip
  417. align="center"
  418. >
  419. <template slot-scope="scope">
  420. <div class="ellipsis">{{ scope.row.class ? scope.row.class : '-' }}</div>
  421. </template>
  422. </el-table-column>
  423. <el-table-column align="center" label="操作" min-width="20">
  424. <template slot-scope="scope">
  425. <el-button
  426. v-if="checkCourse.state == 5"
  427. type="primary"
  428. size="small"
  429. @click="lookPdf(scope.row)"
  430. >查看报告</el-button
  431. >
  432. <el-button
  433. v-else
  434. type="primary"
  435. size="small"
  436. @click="getReport(scope.row)"
  437. >查看报告</el-button
  438. >
  439. <el-button
  440. v-if="checkCourse.state == 5"
  441. type="primary"
  442. size="small"
  443. @click="getPdf"
  444. >导出报告</el-button
  445. >
  446. </template>
  447. </el-table-column>
  448. </el-table>
  449. <div v-if="!typeCheckN" style="display: flex;justify-content: space-between; padding:15px 0">
  450. <el-pagination
  451. background
  452. layout="prev, pager, next"
  453. :page-size="10"
  454. :total="total2"
  455. @current-change="handleCurrentChange2"
  456. ></el-pagination>
  457. <div style="display: flex;" class="dialog-footer"> </div>
  458. </div>
  459. </div> -->
  460. <lookReport :oid="oid" @getReport="getReport" :key="signDialog" :signDialog.sync="signDialog" :checkCourse="checkCourse"></lookReport>
  461. </el-dialog>
  462. <div class="report_box" v-if="reportVisible">
  463. <studentReport
  464. :checkCourse="checkCourse.courseId"
  465. :checkStudent="checkStudent"
  466. @cancelR="cancelR"
  467. :oid="oid"
  468. ></studentReport>
  469. </div>
  470. <!-- <el-dialog
  471. :visible.sync="worksDialog"
  472. :before-close="handleClose"
  473. class="worksDialogCSSExp"
  474. style="overflow: hidden;"
  475. :append-to-body="true"
  476. :fullscreen="true"
  477. >
  478. <div slot="title" class="header-title">
  479. <div style="color: #fff">{{ this.digNum==2 ?'查看':'导出' }}报告</div>
  480. </div>
  481. <exportDataDialog
  482. :key="exportW"
  483. :digNum="digNum"
  484. :oid="oid"
  485. :multipleSelection="multipleSelection"
  486. :worksDialogCon="worksDialogCon"
  487. :worksDialog.sync="worksDialog"
  488. :cid="checkCourse.courseId">
  489. </exportDataDialog>
  490. </el-dialog> -->
  491. </div>
  492. </template>
  493. <script>
  494. import WorkDate from "./components/workData";
  495. import Report from "./components/report";
  496. import studentReport from "./components/studentReport";
  497. import "../../common/aws-sdk-2.235.1.min.js";
  498. import StudentWorksDetail from "./components/studentWorksDetail.vue";
  499. import exportDataDialog from "./components/exportDataDialog.vue";
  500. import lookReport from './components/lookReport'
  501. export default {
  502. components: {
  503. WorkDate,
  504. Report,
  505. studentReport,
  506. StudentWorksDetail,
  507. exportDataDialog,
  508. lookReport
  509. },
  510. data() {
  511. return {
  512. worksDialog:false,
  513. exportW:0,
  514. digNum:0,
  515. digCid:'',
  516. worksDialogCon:{},
  517. tableHeight: "500px",
  518. isLoading: false,
  519. formLabelWidth: "100px",
  520. tableData1: [],
  521. subject: "",
  522. sClass: "",
  523. subjectJuri: [],
  524. projectJuri: [],
  525. classJuri: [],
  526. evaJuri: [],
  527. grade: [],
  528. projectchoose: "",
  529. page: 1,
  530. total: 0,
  531. groupA: "0",
  532. classChoose: "",
  533. eChoose: "",
  534. cn: "",
  535. userid: this.$route.query.userid,
  536. org: this.$route.query.org,
  537. role: this.$route.query.role,
  538. oid: this.$route.query.oid,
  539. type: this.$route.query.type,
  540. dialogVisible: false,
  541. dialogVisibleBao: false,
  542. dataJson: {},
  543. signDialog: false,
  544. isLoading2: false,
  545. page2: 1,
  546. total2: 0,
  547. // 查看报告table数据
  548. lookReportTab: [],
  549. checkCourse: "",
  550. reportVisible: false,
  551. checkStudent: "",
  552. userAarray: [],
  553. classAarray:[],
  554. uname: "",
  555. uClass:'',
  556. cutTabNum:0,
  557. tableData:[],
  558. dialogVisibleS:false,
  559. multipleSelection: [],
  560. typeCheckN: false
  561. };
  562. },
  563. mounted() {
  564. this.$nextTick(function () {
  565. this.tableHeight =
  566. window.innerHeight - this.$refs.table.$el.offsetTop - 200;
  567. if (this.tableHeight <= 530) {
  568. this.tableHeight = 530;
  569. }
  570. // 监听窗口大小变化
  571. let self = this;
  572. window.onresize = function () {
  573. self.tableHeight =
  574. window.innerHeight - self.$refs.table.$el.offsetTop - 200;
  575. if (self.tableHeight <= 530) {
  576. self.tableHeight = 530;
  577. }
  578. };
  579. });
  580. },
  581. watch: {
  582. typeCheckN(newValue, oldValue) {
  583. this.getStudnet()
  584. },
  585. },
  586. methods: {
  587. handleSelectionChange(val) {
  588. if (val.length > 1) {
  589. this.$refs.multipleTable.clearSelection(); //清空列表的选中
  590. this.$refs.multipleTable.toggleRowSelection(val[val.length-1]); //只显示选中最后一个 这时val还是多选的列表(就是你选中的几个数据)
  591. } else if (val.length === 1) {
  592. this.multipleSelection=[]
  593. this.multipleSelection.push( val[val.length-1]);
  594. } else {
  595. this.multipleSelection = []; //this.multipleTable是选中行的最后一条数据
  596. }
  597. },
  598. goTo(path) {
  599. this.$router.push(path);
  600. },
  601. // 按学生查看所有学生
  602. getAllStudent() {
  603. this.isLoading = true;
  604. let params = {
  605. oid: this.oid,
  606. cn: this.cn,
  607. cid: this.classChoose,
  608. userid: this.userid,
  609. page: this.page,
  610. };
  611. this.ajax
  612. .get(this.$store.state.api + "selectAllStudentTeacher", params)
  613. .then((res) => {
  614. this.isLoading = false;
  615. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  616. this.tableData = res.data[0];
  617. this.classJuri = res.data[1];
  618. })
  619. .catch((err) => {
  620. this.isLoading = false;
  621. console.error(err);
  622. });
  623. },
  624. // 切换按学生查看,按课程查看
  625. cutTabBtn(val){
  626. this.page = 1
  627. this.cn=''
  628. this.classChoose=''
  629. this.cutTabNum = val;
  630. if (val == 0) {
  631. this.getProject()
  632. }else{
  633. this.getAllStudent()
  634. }
  635. },
  636. tableRowClassName({ row, rowIndex }) {
  637. if ((rowIndex + 1) % 2 === 0) {
  638. return "even_row";
  639. } else {
  640. return "";
  641. }
  642. },
  643. handleClose(done) {
  644. done();
  645. },
  646. handleCurrentChange(val) {
  647. this.page = val;
  648. if (this.cutTabNum == 0) {
  649. this.getProject()
  650. }else{
  651. this.getAllStudent()
  652. }
  653. },
  654. handleCurrentChange2(val) {
  655. this.page2 = val;
  656. this.getStudnet();
  657. },
  658. //获取班级列表
  659. // getClass() {
  660. // this.isLoading = true;
  661. // let params = {
  662. // cu: "",
  663. // cn: this.sClass,
  664. // page: this.page,
  665. // };
  666. // this.ajax
  667. // .get(this.$store.state.api + "selectClass", params)
  668. // .then((res) => {
  669. // this.isLoading = false;
  670. // this.grade = res.data[0];
  671. // })
  672. // .catch((err) => {
  673. // this.isLoading = false;
  674. // console.error(err);
  675. // });
  676. // },
  677. // 按课程查看所有数据
  678. getProject() {
  679. this.isLoading = true;
  680. let params = {
  681. uid: this.userid,
  682. cid: this.classChoose,
  683. eid: this.eChoose,
  684. cn: this.cn,
  685. page: this.page,
  686. };
  687. this.ajax
  688. .get(this.$store.state.api + "getProject1", params)
  689. .then((res) => {
  690. this.isLoading = false;
  691. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  692. this.tableData1 = res.data[0];
  693. this.classJuri = res.data[2];
  694. var cJuri = res.data[1];
  695. for (var j = 0; j < this.tableData1.length; j++) {
  696. this.tableData1[j].classJson = { className: "" };
  697. for (var i = 0; i < cJuri.length; i++) {
  698. if (this.tableData1[j].courseId == cJuri[i].courseId) {
  699. if (cJuri[i].cName != undefined && cJuri[i].cName != null) {
  700. if (this.tableData1[j].classJson.className == "") {
  701. this.tableData1[j].classJson.className += cJuri[i].cName;
  702. } else {
  703. this.tableData1[j].classJson.className +=
  704. "," + cJuri[i].cName;
  705. }
  706. }
  707. }
  708. }
  709. }
  710. })
  711. .catch((err) => {
  712. this.isLoading = false;
  713. console.error(err);
  714. });
  715. },
  716. search() {
  717. this.page = 1;
  718. // this.getProject();
  719. if (this.cutTabNum == 0) {
  720. this.getProject()
  721. }else{
  722. this.getAllStudent()
  723. }
  724. },
  725. getWorkData(res) {
  726. this.dataJson = res;
  727. this.dialogVisible = true;
  728. },
  729. getStuWorkData(row) {
  730. this.dataJson = row;
  731. this.dialogVisibleS = true;
  732. },
  733. cancel() {
  734. this.dataJson = "";
  735. this.dialogVisible = false;
  736. },
  737. StuCancel() {
  738. this.dataJson = [];
  739. this.dialogVisibleS = false;
  740. },
  741. cancelR() {
  742. this.checkStudent = "";
  743. this.reportVisible = false;
  744. // this.signDialog = true;
  745. },
  746. // 显示查看报告弹框
  747. getStudnet(row) {
  748. //获取作业
  749. this.signDialog = true;
  750. this.isLoading2 = true;
  751. this.checkCourse = row ? row : this.checkCourse;
  752. // this.getCourseDetail();
  753. },
  754. downloadFile(url){
  755. var credentials = {
  756. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  757. secretAccessKey: "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",
  758. }; //秘钥形式的登录上传
  759. window.AWS.config.update(credentials);
  760. window.AWS.config.region = "cn-northwest-1"; //设置区域
  761. let url2 = url;
  762. let _url2 = "";
  763. if (
  764. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  765. ) {
  766. _url2 = url2.split(
  767. "https://view.officeapps.live.com/op/view.aspx?src="
  768. )[1];
  769. } else {
  770. _url2 = url2;
  771. }
  772. let _this = this;
  773. _this.downLoading = true
  774. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  775. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  776. var params = {
  777. Bucket: "ccrb",
  778. Key: name
  779. };
  780. s3.getObject(params, function (err, data) {
  781. _this.downLoading = false
  782. if (err) console.log(err, err.stack); // an error occurred
  783. else {
  784. let url = window.URL.createObjectURL(new Blob([data.Body]));
  785. let a = document.createElement("a");
  786. a.name = 'student01-学生成长报告.pdf';
  787. a.href = url;
  788. a.download = 'student01-学生成长报告.pdf';
  789. a.click();
  790. console.log(data);
  791. } // sxuccessful response
  792. });
  793. },
  794. // 获取查看报告班级
  795. getCourseDetail() {
  796. let params = {
  797. cid: this.checkCourse.courseId,
  798. };
  799. this.ajax
  800. .get(this.$store.state.api + "getCourseReportClassList", params)
  801. .then((res) => {
  802. this.classAarray = res.data[0];
  803. })
  804. .catch((err) => {
  805. console.error(err);
  806. });
  807. },
  808. // 查看报告
  809. getReport(row) {
  810. this.checkStudent = row.userid;
  811. this.reportVisible = true;
  812. // this.signDialog = false;
  813. },
  814. getEva() {
  815. let params = {
  816. oid: this.oid,
  817. };
  818. this.ajax
  819. .get(this.$store.state.api + "selectAllEvaluation", params)
  820. .then((res) => {
  821. this.evaJuri = res.data[0];
  822. })
  823. .catch((err) => {
  824. console.error(err);
  825. });
  826. },
  827. // lookPdf(val){
  828. // this.worksDialogCon=val
  829. // this.worksDialog = true;
  830. // this.digNum = 2
  831. // this.exportW++
  832. // },
  833. // 查看报告筛选班级
  834. // searchWork2() {
  835. // this.page2 = 1
  836. // this.getStudnet();
  837. // },
  838. // clearSelection() {
  839. // this.$refs.multipleTable.clearSelection();
  840. // },
  841. // 导出pdf
  842. // exportPdfSetBtn(){
  843. // this.worksDialog = true;
  844. // this.digNum = 0
  845. // this.exportW++
  846. // },
  847. // getClass() {
  848. // let params = {
  849. // oid: this.oid,
  850. // };
  851. // this.ajax
  852. // .get(this.$store.state.api + "selectClassBySchool", params)
  853. // .then((res) => {
  854. // this.classJuri = res.data[0];
  855. // })
  856. // .catch((err) => {
  857. // console.error(err);
  858. // });
  859. // },
  860. // 一键导出pdf
  861. // exportPdfSetAllBtn(){
  862. // this.$confirm("是否导出全部学生报告?批量导出需要等待一会儿哦~ 。", "提示", {
  863. // confirmButtonText: "确定",
  864. // cancelButtonText: "取消",
  865. // type: "warning",
  866. // })
  867. // .then(() => {
  868. // this.worksDialog = true;
  869. // this.digNum = 1
  870. // this.exportW++
  871. // })
  872. // .catch(_ => {
  873. // this.$confirm.visible=false
  874. // })
  875. // },
  876. },
  877. created() {
  878. this.page = 1;
  879. // this.getClass();
  880. // this.getAllStudent()
  881. this.getEva();
  882. this.getProject();
  883. },
  884. };
  885. </script>
  886. <style scoped>
  887. .sub_head {
  888. position: relative;
  889. margin: 0 10px;
  890. }
  891. .sub_head::after {
  892. content: "";
  893. width: 100%;
  894. background: #5a9cea;
  895. height: 2px;
  896. position: absolute;
  897. left: 0;
  898. bottom: -12px;
  899. }
  900. .pb_head > span:nth-child(1),
  901. .pb_head > span:nth-child(3) {
  902. /* font-size: 16px; */
  903. font-size: 26px;
  904. cursor: pointer;
  905. /* color: #ab582f; */
  906. /* color: #409eff; */
  907. color: #999;
  908. }
  909. .pb_head > span:nth-child(1):hover,
  910. .pb_head > span:nth-child(3):hover {
  911. color: #000;
  912. }
  913. .pb_head {
  914. margin: 0 !important;
  915. width: 100% !important;
  916. }
  917. .student_page {
  918. margin-top: 10px;
  919. }
  920. .student_head {
  921. margin-top: 10px;
  922. padding-bottom: 15px;
  923. /* display: flex;
  924. justify-content: space-between; */
  925. }
  926. .student_search {
  927. display: flex;
  928. flex-direction: row;
  929. align-items: center;
  930. }
  931. .student_search > div:nth-child(1) {
  932. line-height: 35px;
  933. font-size: 14px;
  934. min-width: 60px;
  935. }
  936. .student_search > div:nth-child(4) {
  937. min-width: 100px;
  938. margin-left: 10px;
  939. cursor: pointer;
  940. }
  941. .student_search >>> .el-input__inner {
  942. width: 190px;
  943. height: 35px;
  944. margin-left: 10px;
  945. }
  946. .student_table >>> .el-table--border td {
  947. border-right: 0px !important;
  948. }
  949. .student_page {
  950. margin-top: 10px;
  951. }
  952. .student_table >>> .el-table,
  953. .student_table >>> .el-table__body-wrapper {
  954. height: auto !important;
  955. }
  956. .el-table >>> .even_row {
  957. background-color: #f1f1f1 !important;
  958. }
  959. .dialog_diy >>> .el-dialog__header {
  960. padding: 9px 20px 10px;
  961. background: #32455b !important;
  962. }
  963. .dialog_diy >>> .el-dialog__title {
  964. color: #fff;
  965. font-size: 15px;
  966. }
  967. .dialog_diy >>> .el-dialog__headerbtn {
  968. top: 14px;
  969. }
  970. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
  971. color: #fff;
  972. }
  973. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
  974. color: #fff;
  975. }
  976. .check_diy >>> .el-dialog__body {
  977. padding-bottom: 0;
  978. }
  979. .dialog_diy >>> .el-dialog__body,
  980. .dialog_diy >>> .el-dialog__footer {
  981. background: #fafafa;
  982. }
  983. .r_diy >>> .el-dialog__footer {
  984. padding: 0;
  985. }
  986. .a_addBox {
  987. height: 570px;
  988. overflow: auto;
  989. }
  990. .workdates {
  991. height: 100%;
  992. position: absolute;
  993. top: 0;
  994. background: #fff;
  995. overflow: auto;
  996. z-index: 1;
  997. width: 100%;
  998. left: 50%;
  999. transform: translateX(-50%);
  1000. padding: 20px;
  1001. box-sizing: border-box;
  1002. }
  1003. .cancelbox {
  1004. position: absolute;
  1005. z-index: 2;
  1006. /* left: 50%; */
  1007. right: 0;
  1008. /* width: 95%; */
  1009. transform: translateX(-50%);
  1010. display: flex;
  1011. justify-content: flex-end;
  1012. /* padding: 0 90px 0px 0px; */
  1013. box-sizing: border-box;
  1014. }
  1015. .report_box {
  1016. height: 100%;
  1017. position: absolute;
  1018. top: 0;
  1019. /* background: #fff; */
  1020. background: rgb(231, 242, 252);
  1021. overflow: auto;
  1022. z-index: 1;
  1023. width: 100%;
  1024. left: 50%;
  1025. transform: translateX(-50%);
  1026. padding: 20px;
  1027. box-sizing: border-box;
  1028. }
  1029. .mbCss >>> .el-input__inner {
  1030. margin: 0 !important;
  1031. }
  1032. .student_search >>> .el-input {
  1033. width: auto !important;
  1034. }
  1035. .cutTab{
  1036. width: 100%;
  1037. display: flex;
  1038. padding: 15px 0;
  1039. justify-content: flex-start;
  1040. font-size: 14px;
  1041. font-weight: 600;
  1042. }
  1043. .cutTab > div{
  1044. margin-right: 10px;
  1045. padding-bottom: 5px;
  1046. cursor: pointer;
  1047. position: relative;
  1048. }
  1049. .cutTabTwo{
  1050. color: #409EFF;
  1051. }
  1052. .cutTabTwo:after {
  1053. content: '';
  1054. position: absolute;
  1055. bottom: -6px;
  1056. right: 0;
  1057. height: 2px;
  1058. width: 30%;
  1059. background-color: #409EFF;
  1060. left: 50%;
  1061. transform: translateX(-50%);
  1062. }
  1063. .sdetailBox {
  1064. height: 100%;
  1065. position: absolute;
  1066. top: 0;
  1067. background: #fff;
  1068. overflow: auto;
  1069. z-index: 1;
  1070. width: 100%;
  1071. left: 50%;
  1072. -webkit-transform: translateX(-50%);
  1073. transform: translateX(-50%);
  1074. padding: 20px;
  1075. -webkit-box-sizing: border-box;
  1076. box-sizing: border-box;
  1077. }
  1078. .cancelbox {
  1079. position: absolute;
  1080. z-index: 2;
  1081. left: 50%;
  1082. top: 7%;
  1083. width: 95%;
  1084. transform: translateX(-50%);
  1085. display: flex;
  1086. justify-content: flex-end;
  1087. padding: 0 90px 0px 0px;
  1088. box-sizing: border-box;
  1089. }
  1090. .ellipsis{
  1091. overflow: hidden;
  1092. text-overflow: ellipsis;
  1093. white-space: nowrap;
  1094. }
  1095. .lookWorksDialogCSSExp >>> .el-dialog__header {
  1096. /* padding: 9px 20px 10px; */
  1097. background: #32455b !important;
  1098. color: #fff;
  1099. }
  1100. .lookWorksDialogCSSExp >>> .el-dialog__wrapper{
  1101. overflow: hidden !important;
  1102. }
  1103. .lookWorksDialogCSSExp >>> .el-dialog__body {
  1104. width: 100% !important;
  1105. height: calc(100% - 48px);
  1106. overflow: auto;
  1107. padding: 20px 45px;
  1108. box-sizing: border-box;
  1109. }
  1110. .lookWorksDialogCSSExp >>> .el-dialog.is-fullscreen {
  1111. overflow: hidden;
  1112. }
  1113. .worksDialogCSSExp>>> .el-dialog__header {
  1114. /* padding: 9px 20px 10px; */
  1115. background: #32455b !important;
  1116. }
  1117. .worksDialogCSSExp >>> .el-dialog__wrapper{
  1118. overflow: hidden !important;
  1119. }
  1120. .worksDialogCSSExp >>> .el-dialog__body {
  1121. width: 100% !important;
  1122. padding: 0 !important;
  1123. height: calc(100% - 48px);
  1124. overflow: auto;
  1125. }
  1126. .worksDialogCSSExp >>> .el-dialog.is-fullscreen {
  1127. overflow: hidden;
  1128. }
  1129. /* .TableCss >>> .el-table-column--selection .cell{
  1130. display: none;
  1131. }
  1132. .TableCs >>> .el-table--border > th > .cell {
  1133. visibility: hidden;
  1134. }
  1135. .TableCs >>> .cell {
  1136. visibility: hidden;
  1137. } */
  1138. .TableCss {
  1139. width: 94%;
  1140. margin: auto;
  1141. }
  1142. .TableCss >>> .el-table__header-wrapper .el-table__header .el-checkbox {
  1143. display: none;
  1144. }
  1145. .JsonTit{
  1146. width: 100%;
  1147. padding: 20px 0;
  1148. display: flex;
  1149. justify-content: space-between;
  1150. align-items: center;
  1151. }
  1152. .JsonTitBtn{
  1153. display: flex;
  1154. align-items: center;
  1155. }
  1156. .typeCheck {
  1157. display: flex;
  1158. align-items: center;
  1159. justify-content: flex-end;
  1160. margin-left: 10px;
  1161. /* margin-bottom: 20px; */
  1162. }
  1163. .typeCheck > span {
  1164. margin-left: 10px;
  1165. }
  1166. </style>