test.vue 38 KB

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