teadTest.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204
  1. <template>
  2. <div class="i_body_box">
  3. <backPage tit="资料搜集"></backPage>
  4. <div class="check_nav">
  5. <!-- <div class="nav all" v-show="this.ExamineBase.length > 0" :class="{ active: type == '1' }" @click="checkType('1')">
  6. 年度考核
  7. </div> -->
  8. <div class="nav all" :class="{ active: checkTypeValue == typeListStr }"
  9. @click="changeShowType(typeListStr)">
  10. 全部
  11. </div>
  12. <div class="nav" v-for="item in typeList" :key="item.id" :class="{ active: checkTypeValue == item.id,all:['8bfa67ce-e82a-11ef-b508-005056924926','9d3289d2-e82a-11ef-b508-005056924926','a824c728-e82a-11ef-b508-005056924926','8085418b-e82a-11ef-b508-005056924926'].includes(item.id)}"
  13. @click="changeShowType(item.id,item)">{{ item.name }}</div>
  14. </div>
  15. <div class="check_box" v-loading="loading">
  16. <!-- <examine v-if="type==1"></examine> -->
  17. <div class="noneData" v-if="!worksArray.length && type!=1" style="text-align: center; margin-top: 20px;">
  18. 暂无数据
  19. </div>
  20. <template v-if="type!=1">
  21. <div class="test_panel" v-for="(item, index) in worksArray" :key="index">
  22. <div class="test_panel_title">
  23. <div class="title" :style="{paddingLeft: (item.array.length > 0 || item.carray.length > 0) ? '0' : '30px'}" @click="openWork(index)">
  24. <span class="open" :class="{active: item.open}" v-if="item.array.length > 0 || item.carray.length > 0"></span>
  25. <el-tooltip :content="item.title" placement="top" effect="dark">
  26. <span class="titleN">{{ item.title }}</span>
  27. </el-tooltip>
  28. </div>
  29. <div class="state">
  30. <span :class="{ is: item.array.length > 0, no: !item.array.length }">{{ item.array.length > 0 ? "已完成" : "未完成" }}</span>
  31. </div>
  32. <div class="time">
  33. <span v-if="item.overtime" :class="{isDead: isDeadlinePassed(item.overtime)}">截止时间:{{ item.overtime }}</span>
  34. <span v-else></span>
  35. </div>
  36. <div class="creator" :style="{paddingRight:(!item.carray.length > 0) ? '0' : '0px'}">
  37. <el-tooltip :content="item.username" placement="top" effect="dark">
  38. <span>创建者:{{ item.username }}</span>
  39. </el-tooltip>
  40. </div>
  41. <div class="editBtn2" :style="`${item.open?'display:flex':''}`" v-if="!item.carray.length > 0">
  42. <span v-if="item.array.length === 0">去填写</span>
  43. <span v-else>再填一份</span>
  44. </div>
  45. <div @click="doTest2(item.courseid)" class="editBtn" :style="`${item.open?'display:flex':''}`" v-if="!item.carray.length > 0">
  46. <span v-if="item.array.length === 0">去填写</span>
  47. <span v-else>再填一份</span>
  48. </div>
  49. </div>
  50. <div class="test_panel_box" v-if="item.open">
  51. <div class="test_add_box"
  52. v-if="item.array">
  53. <div class="test" v-for="(test, index) in item.array" :key="test.id">
  54. <div class="time">
  55. <span>提交记录{{item.array.length - index}}</span>
  56. </div>
  57. <!-- <img @click="deleteTest(test.id)" class="delete"
  58. src="../../../../assets/icon/test/delete.png" alt="" /> -->
  59. <div class="utime">
  60. <span>{{ test.utime }}</span>
  61. </div>
  62. <div class="mask">
  63. <div @click="doTest(test.courseid, test.id)">
  64. <span>编辑</span>
  65. </div>
  66. <div @click="deleteTest(test.id)" class="delete">
  67. <span>删除</span>
  68. </div>
  69. <!-- <div @click="checkTest(test.courseid, test.id)">
  70. <span></span><span>查看</span>
  71. </div>
  72. <div @click="copyTest(test.id)">
  73. <span></span><span>复制</span>
  74. </div> -->
  75. </div>
  76. </div>
  77. </div>
  78. <div class="test_add_box"
  79. v-else-if="item.carray" v-loading="!item.carray.length">
  80. <!-- <div class="courseLength" v-for="(course, index) in item.carray" :key="index" @click="doTest3(item, course)">
  81. <span class="finish" :class="{is: course.array.length}"></span>
  82. <span>{{ index+1 }}、</span>
  83. <span>{{ course.title }}</span>
  84. <span>{{ course.username }}</span>
  85. </div> -->
  86. <div class="test courseLength" v-for="(course, index) in item.carray" :key="index">
  87. <div class="time">
  88. <el-tooltip :content="course.title+'-'+course.username" placement="top" effect="dark">
  89. <span>{{ course.title }}-{{ course.username }}</span>
  90. </el-tooltip>
  91. </div>
  92. <div class="finishBox" :class="{is: course.array.length}">
  93. <span class="finish"></span>
  94. <span v-if="course.array.length">已评分</span>
  95. <span v-else>未评分</span>
  96. </div>
  97. <div class="utime" style="margin-left: 30px;">
  98. <span v-if="course.array.length">{{ course.array[0].utime }}</span>
  99. <span v-else></span>
  100. </div>
  101. <div class="mask">
  102. <div @click="doTest3(item, course)">
  103. <span>评分</span>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </template>
  111. </div>
  112. </div>
  113. </template>
  114. <script>
  115. import backPage from '../components/backPage.vue'
  116. export default {
  117. components:{
  118. backPage
  119. },
  120. data() {
  121. return {
  122. userid: this.$route.query.userid,
  123. oid: this.$route.query.oid,
  124. type: "",
  125. typeId:'e18d88b3-e828-11ef-b508-005056924926',
  126. typeList:[],
  127. ExamineBase: [],
  128. typeArray: [],
  129. typeArrayCheck: [],
  130. worksArray: [],
  131. org: this.$route.query.org,
  132. role: this.$route.query.role,
  133. loading: false,
  134. checkTypeValue:""
  135. };
  136. },
  137. computed: {
  138. getNum() {
  139. return function (array) {
  140. let _array = JSON.parse(array);
  141. let num = 0;
  142. _array.forEach(el => {
  143. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  144. el.array.forEach(item => {
  145. if (item.ttype == 2 && item.array.length > 0) {
  146. item.array.forEach(item2 => {
  147. if (item2.ttype == 1 && item2.json) {
  148. num++;
  149. }
  150. });
  151. } else if (item.ttype == 1 && item.json) {
  152. num++;
  153. }
  154. });
  155. } else if (el.ttype == 1 && el.json) {
  156. num++;
  157. }
  158. });
  159. return num;
  160. };
  161. },
  162. getScore() {
  163. return function (array) {
  164. // let _array = JSON.parse(array)
  165. let _score = 0;
  166. let scoreArray = [];
  167. for (var i = 0; i < array.length; i++) {
  168. let _array = JSON.parse(array[i].courseJson);
  169. let score = 0;
  170. for (var j = 0; j < _array.length; j++) {
  171. let el = _array[j];
  172. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  173. for (var k = 0; k < el.array.length; k++) {
  174. let item = el.array[k];
  175. if (item.ttype == 2 && item.array.length > 0) {
  176. for (var z = 0; z < item.array.length; z++) {
  177. let item2 = item.array[z];
  178. if (item2.ttype == 1 && item2.json && item2.json.score2) {
  179. score += parseInt(item2.json.score2);
  180. }
  181. }
  182. } else if (item.ttype == 1 && item.json && item.json.score2) {
  183. score += parseInt(item.json.score2);
  184. }
  185. }
  186. } else if (el.ttype == 1 && el.json && el.json.score2) {
  187. score += parseInt(el.json.score2);
  188. }
  189. }
  190. scoreArray.push(score);
  191. }
  192. scoreArray.forEach(el => {
  193. _score += el;
  194. });
  195. console.log(scoreArray);
  196. return _score ? _score / scoreArray.length : 0;
  197. };
  198. },
  199. getImg() {
  200. return function (array) {
  201. let _array = JSON.parse(array);
  202. let _img = "";
  203. s: for (var j = 0; j < _array.length; j++) {
  204. let el = _array[j];
  205. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  206. for (var k2 = 0; k2 < el.array.length; k2++) {
  207. let item = el.array[k2];
  208. console.log(k2);
  209. if (item.ttype == 2 && item.array.length > 0) {
  210. for (var z = 0; z < item.array.length; z++) {
  211. let item2 = item.array[z];
  212. if (
  213. item2.ttype == 1 &&
  214. item2.type == 5 &&
  215. item2.json &&
  216. item2.json.file &&
  217. item2.json.file.length > 0
  218. ) {
  219. for (var k4 = 0; k4 < item2.json.file.length; k4++) {
  220. let ik = item2.json.file[k4];
  221. if (ik.type == 3) {
  222. _img = ik.url;
  223. break s;
  224. }
  225. }
  226. }
  227. }
  228. } else if (
  229. item.ttype == 1 &&
  230. item.type == 5 &&
  231. item.json &&
  232. item.json.file &&
  233. item.json.file.length > 0
  234. ) {
  235. for (var k3 = 0; k3 < item.json.file.length; k3++) {
  236. let ik = item.json.file[k3];
  237. if (ik.type == 3) {
  238. _img = ik.url;
  239. break s;
  240. }
  241. }
  242. }
  243. }
  244. } else if (
  245. el.ttype == 1 &&
  246. el.type == 5 &&
  247. el.json &&
  248. el.json.file &&
  249. el.json.file.length > 0
  250. ) {
  251. for (var k = 0; k < el.json.file.length; k++) {
  252. let ik = el.json.file[k];
  253. if (ik.type == 3) {
  254. _img = ik.url;
  255. break s;
  256. }
  257. }
  258. }
  259. }
  260. return _img;
  261. };
  262. },
  263. typeListStr(){
  264. let _result = "";
  265. if(this.typeList.length){
  266. _result = this.typeList.map(i=>i.id)
  267. _result.push(this.typeId);
  268. _result = _result.join(',')
  269. }
  270. return _result;
  271. }
  272. },
  273. watch:{
  274. typeId(newValue){
  275. this.changeShowType(newValue)
  276. }
  277. },
  278. methods: {
  279. getNavType() {
  280. let params = {
  281. oid: "",//this.oid
  282. };
  283. this.ajax
  284. .get(this.$store.state.api + "selectTestType", params)
  285. .then(res => {
  286. let _data = res.data[0];
  287. console.log('_data',_data);
  288. // _data.fliter(e=>{
  289. // })
  290. this.typeList = _data.filter(function(item, index) {
  291. return item.pid == 'e18d88b3-e828-11ef-b508-005056924926';
  292. });
  293. this.changeShowType(this.typeListStr)
  294. // = _data.fliter(e =>{ return e.pid == 'e18d88b3-e828-11ef-b508-005056924926'})
  295. console.log('this.typeList',this.typeList);
  296. })
  297. .catch(err => {
  298. console.log(err);
  299. });
  300. },
  301. getPageBase(type = 1) {
  302. let params = {
  303. typ: type,
  304. org: this.org,
  305. oid: this.oid
  306. };
  307. this.ajax
  308. .get(this.$store.state.api + "selectTestExamineBase", params)
  309. .then(res => {
  310. this.ExamineBase = res.data[0];
  311. if(type == 1 && !res.data[0].length){
  312. this.getPageBase(2)
  313. }
  314. // console.log("selectTestExamineBase", res.data);
  315. })
  316. .catch(error => {
  317. console.log(error);
  318. });
  319. },
  320. isDeadlinePassed(deadline) {
  321. let _line = new Date(deadline)
  322. const currentDate = new Date();
  323. return currentDate > _line;
  324. },
  325. checkType(type) {
  326. this.type = type;
  327. this.getWorks();
  328. },
  329. selectTestType(type) {
  330. let params = {
  331. oid: this.oid
  332. };
  333. this.ajax
  334. .get(this.$store.state.api + "selectTestType", params)
  335. .then(res => {
  336. this.typeArray = res.data[0];
  337. if(type == 1){
  338. this.type = ''
  339. // if (this.typeArray.length) {
  340. // this.type = this.typeArray[0].id;
  341. // } else {
  342. // this.type = '0';
  343. // }
  344. }
  345. this.getWorks()
  346. })
  347. .catch(err => {
  348. console.error(err);
  349. });
  350. },
  351. getWorks() {
  352. this.loading = true;
  353. let params = {
  354. uid: this.userid,
  355. typeid: this.checkTypeValue
  356. };
  357. this.ajax
  358. .get(this.$store.state.api + "getTestWorksPerson_2type", params)
  359. .then(res => {
  360. let array = res.data[0];
  361. let array2 = res.data[1];
  362. // 用于存储归类后的数据的对象
  363. let worksArray = {};
  364. // 遍历原始数据,根据 parentId 进行分组
  365. array2.forEach(item => {
  366. // console.log(item.chapters);
  367. worksArray[item.courseId] = {
  368. id: item.id,
  369. courseid: item.courseId,
  370. title: item.title,
  371. time: item.time,
  372. utime: item.utime,
  373. overtime: item.overtime,
  374. username: item.username,
  375. chapters: item.chapters,
  376. brief: item.brief,
  377. typeid: item.typeid,
  378. array: item.typeid == 'dda9728e-5f11-469e-89ee-aca518daf123' ? 0 : [],
  379. carray: [],
  380. open: false
  381. };
  382. });
  383. worksArray = Object.values(worksArray);
  384. worksArray.forEach(async el => {
  385. if (el.typeid == 'dda9728e-5f11-469e-89ee-aca518daf123') {
  386. let courseJson = this.returnCourseJSON(el.chapters)
  387. if(courseJson && courseJson.courses.length){
  388. let courses = courseJson.courses.join(',')
  389. let _res = await this.getAllCourse(courses)
  390. console.log(_res);
  391. let _carray = []
  392. for(var i=0;i<_res.length;i++){
  393. _carray.push({
  394. courseid: _res[i].courseId,
  395. title: _res[i].title,
  396. username: _res[i].username,
  397. array: []
  398. })
  399. }
  400. el.carray = _carray
  401. }
  402. }
  403. array.forEach(el2 => {
  404. if (el.courseid == el2.courseid && el.typeid != 'dda9728e-5f11-469e-89ee-aca518daf123') {
  405. el.array.push(el2);
  406. }
  407. if(el.courseid == el2.courseid && el.typeid == 'dda9728e-5f11-469e-89ee-aca518daf123'){
  408. let courseid = this.returnCourseId(el2.courseJson)
  409. for(var c = 0; c<el.carray.length;c++){
  410. if(el.carray[c].courseid == courseid){
  411. el.carray[c].array.push(el2);
  412. break
  413. }
  414. }
  415. }
  416. });
  417. });
  418. // worksArray[item.courseid].array.push(item);
  419. this.worksArray = worksArray;
  420. this.loading = false;
  421. this.$forceUpdate();
  422. })
  423. .catch(err => {
  424. this.loading = false;
  425. console.error(err);
  426. });
  427. },
  428. openWork(index){
  429. if(this.worksArray[index].array.length === 0 && this.worksArray[index].carray.length === 0){
  430. return
  431. }
  432. this.worksArray[index].open = !this.worksArray[index].open
  433. this.$forceUpdate()
  434. },
  435. returnA() {
  436. this.$router.push(
  437. "/testStudent?userid=" +
  438. this.userid +
  439. "&oid=" +
  440. this.oid +
  441. "&org=" +
  442. this.org +
  443. "&role=" +
  444. this.role
  445. );
  446. },
  447. checkTest(cid, tid) {
  448. this.$router.push(
  449. "/checkTest?cid=" +
  450. cid +
  451. "&tid=" +
  452. tid +
  453. "&userid=" +
  454. this.userid +
  455. "&oid=" +
  456. this.oid +
  457. "&org=" +
  458. this.org +
  459. "&type=3" +
  460. "&role=" +
  461. this.role
  462. );
  463. },
  464. doTest(cid, tid) {
  465. this.$router.push(
  466. "/doTest?cid=" +
  467. cid +
  468. "&tid=" +
  469. tid +
  470. "&userid=" +
  471. this.userid +
  472. "&oid=" +
  473. this.oid +
  474. "&org=" +
  475. this.org +
  476. "&type=3" +
  477. "&role=" +
  478. this.role
  479. );
  480. },
  481. doTest2(cid) {
  482. this.$router.push(
  483. "/doTest?cid=" +
  484. cid +
  485. "&userid=" +
  486. this.userid +
  487. "&oid=" +
  488. this.oid +
  489. "&org=" +
  490. this.org +
  491. "&type=3" +
  492. "&role=" +
  493. this.role
  494. );
  495. },
  496. doTest3(item, course){
  497. if(course.array.length){
  498. this.$router.push(
  499. "/doTest?cid=" +
  500. item.courseid +
  501. "&tid=" +
  502. course.array[0].id +
  503. "&userid=" +
  504. this.userid +
  505. "&oid=" +
  506. this.oid +
  507. "&org=" +
  508. this.org +
  509. "&type=3" +
  510. "&role=" +
  511. this.role
  512. );
  513. }else{
  514. this.$router.push(
  515. "/doTest?cid=" +
  516. item.courseid +
  517. "&userid=" +
  518. this.userid +
  519. "&oid=" +
  520. this.oid +
  521. "&org=" +
  522. this.org +
  523. "&type=3" +
  524. "&courseid=" +
  525. course.courseid +
  526. "&role=" +
  527. this.role
  528. );
  529. }
  530. },
  531. copyTest(tid) {
  532. let params = [
  533. {
  534. tid: tid,
  535. uid: this.userid
  536. }
  537. ];
  538. this.ajax
  539. .post(this.$store.state.api + "copyTestWorks", params)
  540. .then(res => {
  541. this.$message.success("复制成功");
  542. this.getWorks();
  543. })
  544. .catch(err => {
  545. console.error(err);
  546. });
  547. },
  548. deleteTest(tid) {
  549. let _this = this;
  550. _this
  551. .$confirm("确定删除此填写的表单么?", "提示", {
  552. confirmButtonText: "确定",
  553. cancelButtonText: "取消",
  554. type: "warning"
  555. })
  556. .then(() => {
  557. let params = [
  558. {
  559. tid: tid
  560. }
  561. ];
  562. _this.ajax
  563. .post(_this.$store.state.api + "deleteTestCourseWorks", params)
  564. .then(res => {
  565. _this.$message.success("删除成功");
  566. _this.getWorks();
  567. })
  568. .catch(err => {
  569. console.error(err);
  570. });
  571. })
  572. .catch(() => {
  573. return;
  574. });
  575. },
  576. returnCourseJSON(array) {
  577. let _array = JSON.parse(array);
  578. let courseJson = '';
  579. s: for (var j = 0; j < _array.length; j++) {
  580. let el = _array[j];
  581. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  582. for (var k2 = 0; k2 < el.array.length; k2++) {
  583. let item = el.array[k2];
  584. console.log(k2);
  585. if (item.ttype == 2 && item.array.length > 0) {
  586. for (var z = 0; z < item.array.length; z++) {
  587. let item2 = item.array[z];
  588. if (
  589. item2.ttype == 1 &&
  590. item2.type == 6 &&
  591. item2.json
  592. ) {
  593. courseJson = item2.json
  594. break s;
  595. }
  596. }
  597. } else if (
  598. item.ttype == 1 &&
  599. item.type == 6 &&
  600. item.json
  601. ) {
  602. courseJson = item.json
  603. break s;
  604. }
  605. }
  606. } else if (
  607. el.ttype == 1 &&
  608. el.type == 6 &&
  609. el.json
  610. ) {
  611. courseJson = el.json
  612. break s;
  613. }
  614. }
  615. return courseJson;
  616. },
  617. returnCourseId(array) {
  618. let _array = JSON.parse(array);
  619. let courseJson = '';
  620. s: for (var j = 0; j < _array.length; j++) {
  621. let el = _array[j];
  622. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  623. for (var k2 = 0; k2 < el.array.length; k2++) {
  624. let item = el.array[k2];
  625. console.log(k2);
  626. if (item.ttype == 2 && item.array.length > 0) {
  627. for (var z = 0; z < item.array.length; z++) {
  628. let item2 = item.array[z];
  629. if (
  630. item2.ttype == 1 &&
  631. item2.type == 6 &&
  632. item2.json && item2.json.answer2
  633. ) {
  634. courseJson = item2.json.answer2
  635. break s;
  636. }
  637. }
  638. } else if (
  639. item.ttype == 1 &&
  640. item.type == 6 &&
  641. item.json && item.json.answer2
  642. ) {
  643. courseJson = item.json.answer2
  644. break s;
  645. }
  646. }
  647. } else if (
  648. el.ttype == 1 &&
  649. el.type == 6 &&
  650. el.json && el.json.answer2
  651. ) {
  652. courseJson = el.json.answer2
  653. break s;
  654. }
  655. }
  656. return courseJson;
  657. },
  658. async getAllCourse(id) {
  659. let params = {
  660. cid: id,
  661. };
  662. let res = await this.ajax.get(this.$store.state.api + "getCourseInfoTestAll", params)
  663. return res.data[0]
  664. },
  665. changeShowType(value){
  666. console.log('value',value);
  667. this.checkTypeValue = value;
  668. this.getWorks();
  669. }
  670. },
  671. mounted() {
  672. // this.selectTestType(1);
  673. // this.getPageBase()
  674. this.getNavType()
  675. console.log('this.typeListStr',this.typeListStr);
  676. // if(this.typeListStr){
  677. // this.changeShowType(this.typeListStr)
  678. // this.checkTypeValue = this.typeId
  679. // }
  680. },
  681. // activated(){
  682. // // this.selectTestType(2);
  683. // if(this.typeListStr){
  684. // this.changeShowType(this.typeListStr)
  685. // // this.checkTypeValue = this.typeId
  686. // }
  687. // },
  688. };
  689. </script>
  690. <style scoped>
  691. .i_body_box {
  692. /* height: calc(100% - 10px); */
  693. height: 100%;
  694. }
  695. .check_nav {
  696. display: flex;
  697. height: 50px;
  698. align-items: center;
  699. box-sizing: border-box;
  700. width: 100%;
  701. padding: 0 90px;
  702. box-sizing: border-box;
  703. overflow: auto;
  704. }
  705. .check_nav>.nav {
  706. width: 120px;
  707. height: 100%;
  708. display: flex;
  709. align-items: center;
  710. justify-content: center;
  711. color: rgb(167, 167, 167);
  712. /* background: #000000; */
  713. cursor: pointer;
  714. min-width: fit-content;
  715. margin-right: 10px;
  716. }
  717. .check_nav>.active {
  718. color: #3681fc;
  719. background: rgb(248, 250, 254);
  720. border-radius: 10px 10px 0 0;
  721. }
  722. .check_nav>.all::before,
  723. .check_nav>.gr::before,
  724. .check_nav>.md::before,
  725. .check_nav>.jy::before,
  726. .check_nav>.bj::before,
  727. .check_nav>.yy::before {
  728. content: "";
  729. display: block;
  730. width: 18px;
  731. height: 18px;
  732. background-size: 100% 100%;
  733. margin-right: 5px;
  734. }
  735. .check_nav>.all::before {
  736. background-image: url('../../../../assets/icon/test/all_icon.png');
  737. }
  738. .check_nav>.active.all::before {
  739. background-image: url('../../../../assets/icon/test/all_icon_active.png');
  740. }
  741. .check_nav>.gr::before {
  742. background-image: url('../../../../assets/icon/test/gr_icon.png');
  743. }
  744. .check_nav>.active.gr::before {
  745. background-image: url('../../../../assets/icon/test/gr_icon_active.png');
  746. }
  747. .check_nav>.md::before {
  748. background-image: url('../../../../assets/icon/test/md_icon.png');
  749. }
  750. .check_nav>.active.md::before {
  751. background-image: url('../../../../assets/icon/test/md_icon_active.png');
  752. }
  753. .check_nav>.jy::before {
  754. background-image: url('../../../../assets/icon/test/jy_icon.png');
  755. }
  756. .check_nav>.active.jy::before {
  757. background-image: url('../../../../assets/icon/test/jy_icon_active.png');
  758. }
  759. .check_nav>.yy::before {
  760. background-image: url('../../../../assets/icon/test/yy_icon.png');
  761. }
  762. .check_nav>.active.yy::before {
  763. background-image: url('../../../../assets/icon/test/yy_icon_active.png');
  764. }
  765. .check_nav>.bj::before {
  766. background-image: url('../../../../assets/icon/test/bj_icon.png');
  767. }
  768. .check_nav>.active.bj::before {
  769. background-image: url('../../../../assets/icon/test/bj_icon_active.png');
  770. }
  771. .check_box {
  772. height: calc(100% - 90px);
  773. overflow: auto;
  774. padding: 0 0px 20px;
  775. margin: 0 90px;
  776. box-sizing: border-box;
  777. background: rgb(248, 250, 254);
  778. }
  779. .test_panel {
  780. width: calc(100% - 40px);
  781. margin: 20px auto 0;
  782. background: #fff;
  783. border-radius: 10px;
  784. /* height: 300px; */
  785. overflow: hidden;
  786. box-shadow: 0 2px 5px 1px #0001;
  787. }
  788. .test_panel:hover{
  789. box-shadow: 0 0 2px 1px #3681FC;
  790. }
  791. .test_panel:hover>.test_panel_title>.title{
  792. color:#5996FD
  793. }
  794. .test_panel_title:hover>.editBtn{
  795. display: flex;
  796. }
  797. .test_panel_title:hover>.editBtn2{
  798. display: flex;
  799. }
  800. .test_panel+.test_panel {
  801. margin-top: 15px;
  802. }
  803. .test_panel_title {
  804. height: 50px;
  805. display: flex;
  806. align-items: center;
  807. width: 100%;
  808. position: relative;
  809. /* justify-content: space-between; */
  810. /* padding: 0 20px; */
  811. box-sizing: border-box;
  812. /* border-bottom: 2px solid #f0f0f0; */
  813. }
  814. .test_panel_title>.title {
  815. display: flex;
  816. align-items: center;
  817. width: 300px;
  818. margin-left: 20px;
  819. cursor: pointer;
  820. }
  821. .test_panel_title>.title>.open{
  822. width: 20px;
  823. height:20px;
  824. margin-right: 10px;
  825. background-image: url('../../../../assets/icon/test/chevron-right.png');
  826. background-size: 100% 100%;
  827. cursor:pointer;
  828. transition:all .3s;
  829. opacity: .5;
  830. }
  831. .test_panel_title>.title>.open.active{
  832. transform: rotate(90deg);
  833. opacity: 1;
  834. }
  835. .test_panel_title>.state{
  836. margin-left: auto;
  837. min-width: fit-content;
  838. }
  839. .test_panel_title>.state > span {
  840. font-size: 14px;
  841. padding: 5px 8px;
  842. border-radius: 5px;
  843. margin-right: 0;
  844. }
  845. .test_panel_title>.state>.is:nth-child(1) {
  846. color: #17C469;
  847. background: #EFFCF5;
  848. border: 1px solid #EFFCF5;
  849. }
  850. .test_panel_title>.state>.no:nth-child(1) {
  851. color: #3681FC;
  852. background: #E0EAFB;
  853. border: 1px solid #E0EAFB;
  854. }
  855. .test_panel_title>.title>.titleN {
  856. font-size: 18px;
  857. font-weight: 600;
  858. max-width: calc(100% - 20px - 10px);
  859. overflow: hidden;
  860. text-overflow: ellipsis;
  861. white-space: nowrap;
  862. }
  863. .test_panel_title>.time {
  864. font-size: 16px;
  865. color: #a1a1a1;
  866. min-width: 160px;
  867. margin: 0 30px;
  868. }
  869. .test_panel_title>.creator {
  870. font-size: 16px;
  871. color: #a1a1a1;
  872. max-width: 160px;
  873. min-width: 160px;
  874. overflow: hidden;
  875. text-overflow: ellipsis;
  876. white-space: nowrap;
  877. }
  878. .test_panel_title>.editBtn {
  879. font-size: 16px;
  880. color: #fff;
  881. background: #3681fc;
  882. height: 100%;
  883. display: none;
  884. align-items: center;
  885. padding: 0 15px;
  886. cursor: pointer;
  887. position: absolute;
  888. right: 0;
  889. }
  890. .test_panel_title>.editBtn2 {
  891. font-size: 16px;
  892. color: #fff;
  893. background: #3681fc;
  894. height: 100%;
  895. display: none;
  896. align-items: center;
  897. padding: 0 15px;
  898. cursor: pointer;
  899. }
  900. .test_panel_title>.time>span+span {
  901. margin-left: 10px;
  902. }
  903. .test_panel_box {
  904. border-top: 2px solid #f0f0f0;
  905. width: 100%;
  906. display: flex;
  907. align-items: center;
  908. padding: 5px 20px;
  909. box-sizing: border-box;
  910. }
  911. .test_panel_box>.detail {
  912. width: calc(100% - 350px - 20px);
  913. margin-right: 20px;
  914. color: #a1a1a1;
  915. font-size: 14px;
  916. line-height: 24px;
  917. word-break: break-all;
  918. display: -webkit-box;
  919. -webkit-line-clamp: 4;
  920. -webkit-box-orient: vertical;
  921. overflow: hidden;
  922. }
  923. .test_panel_box>.panel {
  924. display: flex;
  925. align-items: center;
  926. justify-content: space-between;
  927. width: 350px;
  928. min-width: 350px;
  929. }
  930. .test_panel_box>.panel>.score {
  931. height: 110px;
  932. display: flex;
  933. align-items: center;
  934. justify-content: center;
  935. flex-direction: column;
  936. border: 1px solid #dbdbdb;
  937. background: rgb(252, 252, 252);
  938. width: 120px;
  939. border-radius: 5px;
  940. }
  941. .test_panel_box>.panel>.score:nth-child(1) {
  942. display: flex;
  943. }
  944. .test_panel_box>.panel>.score>div:nth-child(1)>span:nth-child(1) {
  945. font-size: 30px;
  946. font-weight: 700;
  947. }
  948. .test_panel_box>.panel>.score>div:nth-child(1)>span:nth-child(2) {
  949. margin-left: 5px;
  950. }
  951. .test_panel_box>.panel>.score>div:nth-child(2) {
  952. font-size: 14px;
  953. margin-top: 10px;
  954. color: #a1a1a1;
  955. }
  956. .test_panel_box>.panel>.btn {
  957. height: 100px;
  958. display: flex;
  959. flex-direction: column;
  960. justify-content: space-between;
  961. }
  962. .test_panel_box>.panel>.btn>div {
  963. display: flex;
  964. color: rgb(69, 141, 255);
  965. align-items: center;
  966. cursor: pointer;
  967. font-size: 14px;
  968. }
  969. /* .test_panel_box > .panel >.btn > div + div{
  970. margin: 15px 0 0 0;
  971. } */
  972. .test_panel_box>.panel>.btn>div>span:nth-child(1) {
  973. display: block;
  974. width: 13px;
  975. height: 13px;
  976. background-size: 100% 100%;
  977. margin-right: 7px;
  978. }
  979. .test_panel_box>.panel>.btn>div:nth-child(1)>span:nth-child(1) {
  980. background-image: url('../../../../assets/icon/test/edit_icon.png');
  981. }
  982. .test_panel_box>.panel>.btn>div:nth-child(2)>span:nth-child(1) {
  983. background-image: url('../../../../assets/icon/test/check_icon.png');
  984. }
  985. .test_panel_box>.panel>.btn>div:nth-child(3)>span:nth-child(1) {
  986. background-image: url('../../../../assets/icon/test/paste_icon.png');
  987. }
  988. .test_add_box {
  989. width: 100%;
  990. box-sizing: border-box;
  991. }
  992. .test_add_box>.test {
  993. width: 100%;
  994. height: 40px;
  995. border-radius: 5px;
  996. display: flex;
  997. align-items: center;
  998. }
  999. .test_add_box>.test>img {
  1000. width: 100%;
  1001. height: 100%;
  1002. object-fit: cover;
  1003. border-radius: 5px;
  1004. }
  1005. .test_add_box>.test+.test {
  1006. /* margin-left: 10px; */
  1007. }
  1008. .test_add_box>.test>.time {
  1009. display: flex;
  1010. /* justify-content: center; */
  1011. align-items: center;
  1012. font-size: 14px;
  1013. width: 300px;
  1014. padding-left: 30px;
  1015. box-sizing: border-box;
  1016. }
  1017. .test_add_box>.test>.time>span {
  1018. /* margin-top: 5px; */
  1019. overflow: hidden;
  1020. text-overflow: ellipsis;
  1021. white-space: nowrap;
  1022. }
  1023. .test_add_box>.test>.utime {
  1024. font-size: 14px;
  1025. width: 160px;
  1026. min-width: 160px;
  1027. margin: 0 30px 0 auto;
  1028. }
  1029. .test_add_box>.test>.mask {
  1030. display: flex;
  1031. align-items: center;
  1032. padding-right: 58px;
  1033. max-width: 160px;
  1034. min-width: 160px;
  1035. }
  1036. .test_add_box>.test>.delete {
  1037. position: absolute;
  1038. width: 20px;
  1039. height: 20px;
  1040. right: -5px;
  1041. top: -5px;
  1042. cursor: pointer;
  1043. z-index: 2;
  1044. display: none;
  1045. }
  1046. .test_add_box>.test>.mask>div {
  1047. display: flex;
  1048. align-items: center;
  1049. cursor: pointer;
  1050. font-size: 14px;
  1051. color: #3681FC;
  1052. }
  1053. .test_add_box>.test>.mask>.delete {
  1054. color: #EE3E3E;
  1055. }
  1056. .test_add_box>.test>.mask>div+div {
  1057. /* margin: 10px 0 0 0; */
  1058. margin-left: 15px;
  1059. }
  1060. /*
  1061. .test_add_box>.test>.mask>div>span:nth-child(1) {
  1062. display: block;
  1063. width: 13px;
  1064. height: 13px;
  1065. background-size: 100% 100%;
  1066. margin-right: 7px;
  1067. }
  1068. .test_add_box>.test>.mask>div:nth-child(1)>span:nth-child(1) {
  1069. background-image: url('../../../../assets/icon/test/edit_icon.png');
  1070. }
  1071. .test_add_box>.test>.mask>div:nth-child(2)>span:nth-child(1) {
  1072. background-image: url('../../../../assets/icon/test/check_icon.png');
  1073. }
  1074. .test_add_box>.test>.mask>div:nth-child(3)>span:nth-child(1) {
  1075. background-image: url('../../../../assets/icon/test/paste_icon.png');
  1076. } */
  1077. .bgColor {
  1078. background: #466b99;
  1079. }
  1080. /* .courseLength{
  1081. width: 100%;
  1082. cursor: pointer;
  1083. margin-bottom: 10px;
  1084. display: flex;
  1085. align-items: center;
  1086. }
  1087. .courseLength > span + span{
  1088. margin-left: 10px;
  1089. } */
  1090. .courseLength > .finishBox {
  1091. display: flex;
  1092. color: #a1a1a1;
  1093. font-size: 14px;
  1094. margin-left: auto;
  1095. align-items: center;
  1096. }
  1097. .courseLength > .finishBox > .finish{
  1098. width: 15px;
  1099. height: 15px;
  1100. background-image: url('../../../../assets/icon/test/icon_course.png');
  1101. background-size: 100% 100%;
  1102. margin-right: 5px;
  1103. }
  1104. .courseLength > .finishBox.is > .finish{
  1105. background-image: url('../../../../assets/icon/test/icon_course_check.png');
  1106. }
  1107. .courseLength > .finishBox.is{
  1108. color: #000
  1109. }
  1110. .isDead{
  1111. color:#EE3E3E;
  1112. }
  1113. </style>