works.vue 33 KB

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