index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. <template>
  2. <NavHeader/>
  3. <bread-crumb/>
  4. <div class="w-1200px m-auto">
  5. <div class="flex items-center">
  6. <el-date-picker
  7. v-model="exam_time"
  8. value-format="YYYY-MM-DD"
  9. type="date"
  10. placeholder="考试时间"
  11. size="large"
  12. />
  13. <el-select class="ml-10px" v-model="exam_form" placeholder="考试形式" size="large">
  14. <el-option label="全部" value="0"
  15. />
  16. <el-option
  17. v-for="item in form_list"
  18. :key="item.value"
  19. :label="item.label"
  20. :value="item.value"
  21. />
  22. </el-select>
  23. <el-select class="ml-20px" v-model="exam_form" placeholder="考试类型" size="large">
  24. <el-option label="全部" value="0"
  25. />
  26. <el-option
  27. v-for="item in type_list"
  28. :key="item.value"
  29. :label="item.label"
  30. :value="item.value"
  31. />
  32. </el-select>
  33. <el-input
  34. v-model="keyword"
  35. class="ml-20px"
  36. style="width: 200px;"
  37. size="large"
  38. clearable
  39. placeholder="请输入关键字"
  40. />
  41. <el-button color="#003eee" class="ml-20px" type="primary" size="large">搜索</el-button>
  42. </div>
  43. <div class="flex mt-20px justify-between">
  44. <button type="button" class="add-btn" @click="linkTo({name:'process-create'})">
  45. <el-icon class="inline-block align-middle">
  46. <Plus/>
  47. </el-icon>
  48. <span class="ml-5px inline-block align-middle">新建考试计划</span>
  49. </button>
  50. <button type="button" class="del-btn">批量删除</button>
  51. </div>
  52. <div class="mt-20px process-list-table">
  53. <div class="head">
  54. <div class="w-60px">
  55. <p class="set-check all">
  56. <input type="checkbox" id="chooseAll" @change="chooseAll" v-model="checked">
  57. <label for="chooseAll"></label>
  58. </p>
  59. </div>
  60. <div class="w-150px text-left">考试计划名称</div>
  61. <div class="w-250px">状态</div>
  62. <div class="w-130px">考试形式</div>
  63. <div class="w-130px">考试类型</div>
  64. <div class="w-180px">考试时间</div>
  65. <div class="w-300px">操作</div>
  66. </div>
  67. <div>
  68. <div class="line">
  69. <div class="up">
  70. <div class="w-60px">
  71. <p class="set-check single">
  72. <input type="checkbox" id="1" :value="1" v-model="chooseCheck">
  73. <label :for="1"></label>
  74. </p>
  75. </div>
  76. <div class="w-150px text-left">考试计划名称</div>
  77. <div class="w-250px">
  78. <span class="inline-block align-middle">进行中</span>
  79. <div class="inline-block align-middle ml-10px process-state">
  80. <h3 class="state-line">
  81. <span style="width: 11%;"></span>
  82. </h3>
  83. </div>
  84. <span class="ml-10px inline-block align-middle">11%</span>
  85. </div>
  86. <div class="w-130px text-left">线下考试</div>
  87. <div class="w-130px text-left">联考</div>
  88. <div class="w-180px text-left">2023.2.4~2023.2.17</div>
  89. <div class="w-300px">
  90. <button type="button" class="op-btn">编辑</button>
  91. <button type="button" class="op-btn ml-10px" @click="linkTo({name:'process-detail-id',params:{id:'1'}})">详情</button>
  92. <div class="ml-10px relative op-btn cursor-pointer">
  93. <span class="inline-block align-middle leading-28px">更多</span>
  94. <div class="more-list">
  95. <ul>
  96. <li>阅卷任务</li>
  97. <li>扫描批阅进度</li>
  98. <li>考试分析</li>
  99. <li>删除</li>
  100. </ul>
  101. </div>
  102. </div>
  103. <button type="button" class="ml-10px inline-block align-middle arrow-btn up"></button>
  104. </div>
  105. </div>
  106. <div class="down pt-15px pl-35px">
  107. <ul class="subject-list">
  108. <li>
  109. <div>
  110. <div class="w-140px h-195px m-auto">
  111. <img src="/images/yuwen.png" class="w-full" alt="">
  112. </div>
  113. <div class="mt-5px">
  114. <div class="inline-block align-middle process-state">
  115. <h3 class="state-line">
  116. <span style="width: 11%;"></span>
  117. </h3>
  118. </div>
  119. <span class="ml-10px text-14px inline-block align-middle">11%</span>
  120. </div>
  121. <div class="mt-5px text-center">
  122. <button type="button" class="op-btn">查看</button>
  123. </div>
  124. </div>
  125. </li>
  126. <li>
  127. <div>
  128. <div class="w-140px h-195px m-auto">
  129. <img src="/images/shuxue.png" class="w-full" alt="">
  130. </div>
  131. <div class="mt-5px">
  132. <div class="inline-block align-middle process-state">
  133. <h3 class="state-line">
  134. <span style="width: 11%;"></span>
  135. </h3>
  136. </div>
  137. <span class="ml-10px text-14px inline-block align-middle">11%</span>
  138. </div>
  139. <div class="mt-5px text-center">
  140. <button type="button" class="op-btn">查看</button>
  141. </div>
  142. </div>
  143. </li>
  144. <li>
  145. <div>
  146. <div class="w-140px h-195px m-auto">
  147. <img src="/images/yingyu.png" class="w-full" alt="">
  148. </div>
  149. <div class="mt-5px">
  150. <div class="inline-block align-middle process-state">
  151. <h3 class="state-line">
  152. <span style="width: 11%;"></span>
  153. </h3>
  154. </div>
  155. <span class="ml-10px text-14px inline-block align-middle">11%</span>
  156. </div>
  157. <div class="mt-5px text-center">
  158. <button type="button" class="op-btn">查看</button>
  159. </div>
  160. </div>
  161. </li>
  162. <li>
  163. <div>
  164. <div class="w-140px h-195px m-auto">
  165. <img src="/images/wuli.png" class="w-full" alt="">
  166. </div>
  167. <div class="mt-5px">
  168. <div class="inline-block align-middle process-state">
  169. <h3 class="state-line">
  170. <span style="width: 11%;"></span>
  171. </h3>
  172. </div>
  173. <span class="ml-10px text-14px inline-block align-middle">11%</span>
  174. </div>
  175. <div class="mt-5px text-center">
  176. <button type="button" class="op-btn">查看</button>
  177. </div>
  178. </div>
  179. </li>
  180. <li>
  181. <div>
  182. <div class="w-140px h-195px m-auto">
  183. <img src="/images/huaxue.png" class="w-full" alt="">
  184. </div>
  185. <div class="mt-5px">
  186. <div class="inline-block align-middle process-state">
  187. <h3 class="state-line">
  188. <span style="width: 11%;"></span>
  189. </h3>
  190. </div>
  191. <span class="ml-10px text-14px inline-block align-middle">11%</span>
  192. </div>
  193. <div class="mt-5px text-center">
  194. <button type="button" class="op-btn">查看</button>
  195. </div>
  196. </div>
  197. </li>
  198. <li>
  199. <div>
  200. <div class="w-140px h-195px m-auto">
  201. <img src="/images/shengwu.png" class="w-full" alt="">
  202. </div>
  203. <div class="mt-5px">
  204. <div class="inline-block align-middle process-state">
  205. <h3 class="state-line">
  206. <span style="width: 11%;"></span>
  207. </h3>
  208. </div>
  209. <span class="ml-10px text-14px inline-block align-middle">11%</span>
  210. </div>
  211. <div class="mt-5px text-center">
  212. <button type="button" class="op-btn">查看</button>
  213. </div>
  214. </div>
  215. </li>
  216. <li class="cursor-pointer" @click="dialogVisible = true">
  217. <div class="subject-add-btn"></div>
  218. </li>
  219. </ul>
  220. </div>
  221. </div>
  222. <div class="line">
  223. <div class="up">
  224. <div class="w-60px">
  225. <p class="set-check single">
  226. <input type="checkbox" id="1" :value="1" v-model="chooseCheck">
  227. <label :for="1"></label>
  228. </p>
  229. </div>
  230. <div class="w-150px text-left">考试计划名称</div>
  231. <div class="w-250px">
  232. <span class="inline-block align-middle">进行中</span>
  233. <div class="inline-block align-middle ml-10px process-state">
  234. <h3 class="state-line">
  235. <span style="width: 11%;"></span>
  236. </h3>
  237. </div>
  238. <span class="ml-10px inline-block align-middle">11%</span>
  239. </div>
  240. <div class="w-130px text-left">线下考试</div>
  241. <div class="w-130px text-left">联考</div>
  242. <div class="w-180px text-left">2023.2.4~2023.2.17</div>
  243. <div class="w-300px">
  244. <button type="button" class="op-btn">编辑</button>
  245. <button type="button" class="op-btn ml-10px">详情</button>
  246. <div class="ml-10px relative op-btn cursor-pointer">
  247. <span class="inline-block align-middle leading-28px">更多</span>
  248. <div class="more-list">
  249. <ul>
  250. <li>阅卷任务</li>
  251. <li>扫描批阅进度</li>
  252. <li>考试分析</li>
  253. <li>删除</li>
  254. </ul>
  255. </div>
  256. </div>
  257. <button type="button" class="ml-10px inline-block align-middle arrow-btn down"></button>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. <div class="mt-20px page-new flex justify-end">
  264. <el-pagination v-model:current-page="cur_page" v-model:page-size="limit" layout="total,prev, pager, next" :total="total" :background="true" @current-change="handleSelectionChange"></el-pagination>
  265. </div>
  266. </div>
  267. <el-dialog
  268. v-model="dialogVisible"
  269. title="增加考试学科"
  270. width="500px"
  271. center
  272. append-to-body
  273. >
  274. <div>
  275. <el-form label-width="120px" size="large">
  276. <el-form-item label="请选择学科">
  277. <el-select v-model="add_sub_id" placeholder="请选择学科">
  278. <el-option v-for="item in subject_list" :label="item.label" :value="item.value" />
  279. </el-select>
  280. </el-form-item>
  281. </el-form>
  282. </div>
  283. <template #footer>
  284. <span class="dialog-footer text-right">
  285. <el-button @click="dialogVisible = false" size="large">取消</el-button>
  286. <el-button size="large" color="#003eee" type="primary" @click="dialogVisible = false">
  287. 确定
  288. </el-button>
  289. </span>
  290. </template>
  291. </el-dialog>
  292. <commonFooter/>
  293. </template>
  294. <route lang="json">
  295. {
  296. "meta":{
  297. "title":"阅卷流程",
  298. "breadcrumb": true
  299. }
  300. }
  301. </route>
  302. <script setup>
  303. import {process_list} from "~/pages/process/api";
  304. import { useRouter } from "vue-router";
  305. const router = useRouter();
  306. console.log(router,87)
  307. const linkTo = (obj) => {
  308. router.push(obj);
  309. };
  310. let exam_time = $ref('')
  311. let exam_form = $ref('')
  312. let exam_type = $ref('')
  313. let keyword = $ref('')
  314. let form_list = [{
  315. value: '1',
  316. label: '线上考试'
  317. }, {
  318. value: '2',
  319. label: '线下考试'
  320. }]
  321. let type_list = [{
  322. value: '1',
  323. label: '周考'
  324. }, {
  325. value: '2',
  326. label: '月考'
  327. }, {
  328. value: '3',
  329. label: '期中'
  330. },{
  331. value: '4',
  332. label: '期末'
  333. }, {
  334. value: '5',
  335. label: '作业'
  336. }, {
  337. value: '6',
  338. label: '测试'
  339. }]
  340. let subject_list = [{
  341. value: '1',
  342. label: '语文'
  343. }, {
  344. value: '2',
  345. label: '数学'
  346. }, {
  347. value: '3',
  348. label: '英语'
  349. },{
  350. value: '4',
  351. label: '物理'
  352. }, {
  353. value: '5',
  354. label: '生物'
  355. }, {
  356. value: '6',
  357. label: '化学'
  358. }]
  359. let chooseCheck = $ref([]);
  360. let checked = $ref(false);
  361. let checkedIds = $ref([]);
  362. let noData = $ref(null);
  363. let limit = $ref(10);
  364. let total = $ref(0);
  365. let cur_page = $ref(1);
  366. let listData = $ref([]);
  367. let dialogVisible = $ref(false)
  368. let add_sub_id = $ref('')
  369. function chooseAll() {
  370. }
  371. function getListData() {
  372. let data = {
  373. page:cur_page,
  374. limit:limit,
  375. };
  376. process_list(data).then(res=>{
  377. if(res.code === '1') {
  378. listData = res.data.page_data;
  379. total = Number(res.data.total_rows);
  380. cur_page = Number(res.data.page_now);
  381. }
  382. })
  383. }
  384. getListData();
  385. </script>
  386. <style lang="scss" scoped>
  387. $color: #003eee;
  388. ::v-deep .el-pagination.is-background .btn-next.is-active,
  389. ::v-deep .el-pagination.is-background .btn-prev.is-active,
  390. ::v-deep .el-pagination.is-background .el-pager li.is-active{
  391. background-color: $color;
  392. }
  393. .add-btn {
  394. width: 129px;
  395. height: 36px;
  396. background: #ffffff;
  397. border: 1px solid $color;
  398. border-radius: 4px;
  399. font-size: 14px;
  400. color: $color;
  401. text-align: center;
  402. }
  403. .del-btn {
  404. width: 92px;
  405. height: 36px;
  406. background: #ff0000;
  407. border-radius: 4px;
  408. font-size: 14px;
  409. color: #fff;
  410. text-align: center;
  411. }
  412. .process-list-table {
  413. width: 100%;
  414. min-height: 600px;
  415. .head {
  416. height: 50px;
  417. display: flex;
  418. background: $color;
  419. border-radius: 6px 6px 0 0;
  420. font-size: 16px;
  421. line-height: 50px;
  422. color: #fff;
  423. }
  424. .line {
  425. width: 100%;
  426. &:nth-child(odd) {
  427. >.up {
  428. border-radius: 4px;
  429. background: rgba(112, 175, 253, 0.1);
  430. }
  431. }
  432. >.up {
  433. display: flex;
  434. align-items: center;
  435. padding: 15px 0;
  436. font-size: 15px;
  437. color: #404040;
  438. }
  439. }
  440. }
  441. .set-check {
  442. position: relative;
  443. z-index: 40;
  444. width: 20px;
  445. height: 20px;
  446. margin: 15px auto 0;
  447. label {
  448. position: absolute;
  449. left: 0;
  450. width: 20px;
  451. height: 20px;
  452. cursor: pointer;
  453. border-radius: 3px;
  454. }
  455. input[type=checkbox] {
  456. width: 20px;
  457. height: 20px;
  458. opacity: 0;
  459. &:checked + label:after {
  460. }
  461. }
  462. &.all {
  463. label {
  464. border: 1px solid #fff;
  465. }
  466. input[type=checkbox] {
  467. &:checked + label {
  468. border-color: #fff;
  469. }
  470. &:checked + label:after {
  471. content: '';
  472. width: 14px;
  473. height: 8px;
  474. position: absolute;
  475. top: 3px;
  476. left: 2px;
  477. border: 2px solid #fff;
  478. border-top: none;
  479. border-right: none;
  480. -moz-transform: rotate(-45deg);
  481. -ms-transform: rotate(-45deg);
  482. -webkit-transform: rotate(-45deg);
  483. transform: rotate(-45deg);
  484. }
  485. }
  486. }
  487. &.single {
  488. margin: 0 auto;
  489. label {
  490. border: 1px solid #aaa;
  491. }
  492. input[type=checkbox] {
  493. &:checked + label {
  494. border-color: #003eee;
  495. }
  496. &:checked + label:after {
  497. content: '';
  498. width: 14px;
  499. height: 8px;
  500. position: absolute;
  501. top: 3px;
  502. left: 2px;
  503. border: 2px solid #003eee;
  504. border-top: none;
  505. border-right: none;
  506. -moz-transform: rotate(-45deg);
  507. -ms-transform: rotate(-45deg);
  508. -webkit-transform: rotate(-45deg);
  509. transform: rotate(-45deg);
  510. }
  511. }
  512. }
  513. }
  514. .process-state {
  515. width: 140px;
  516. .state-line {
  517. width: 100%;
  518. height: 5px;
  519. background: #e2e2e2;
  520. border-radius: 3px;
  521. span {
  522. display: block;
  523. height: 5px;
  524. background: #003eee;
  525. border-radius: 3px;
  526. }
  527. }
  528. .state-info {
  529. position: absolute;
  530. top: 8px;
  531. left: 0;
  532. width: 100%;
  533. font-size: 13px;
  534. color: #003eee;
  535. text-align: center;
  536. }
  537. }
  538. .op-btn {
  539. display: inline-block;
  540. vertical-align: middle;
  541. padding: 0 15px;
  542. height: 30px;
  543. background: #fff;
  544. border: 1px solid #003eee;
  545. border-radius: 4px;
  546. font-size: 14px;
  547. color: #003eee;
  548. text-align: center;
  549. &:disabled {
  550. background: #ccc;
  551. border-color: #ccc;
  552. color: #fff;
  553. cursor: default;
  554. }
  555. .more-list {
  556. display: none;
  557. position: absolute;
  558. left: 50%;
  559. top: 30px;
  560. margin-left: -50px;
  561. z-index: 50;
  562. width: 100px;
  563. padding-top: 5px;
  564. ul {
  565. width: 100%;
  566. background: #fff;
  567. box-shadow: 0 0 5px rgba(0, 0, 0, .3);
  568. li {
  569. width: 100%;
  570. height: 30px;
  571. font-size: 14px;
  572. color: #003eee;
  573. text-align: center;
  574. line-height: 30px;
  575. cursor: pointer;
  576. &.disabled {
  577. background: #fff !important;
  578. color: #ccc !important;
  579. cursor: default !important;
  580. pointer-events: none;
  581. }
  582. &:hover {
  583. background: #F0F7FF;
  584. }
  585. }
  586. }
  587. }
  588. &:hover {
  589. .more-list {
  590. display: block;
  591. }
  592. }
  593. }
  594. .arrow-btn{
  595. width: 21px;
  596. height: 13px;
  597. &.up{
  598. background: url("/images/arrow-up.png") center no-repeat;
  599. }
  600. &.down{
  601. background: url("/images/arrow-down.png") center no-repeat;
  602. }
  603. }
  604. .subject-list{
  605. display: flex;
  606. flex-wrap: wrap;
  607. li{
  608. width: 205px;
  609. height: 280px;
  610. margin: 0 28px 23px 0;
  611. border: 2px solid $color;
  612. border-radius: 10px;
  613. display: flex;
  614. justify-content: center;
  615. align-items: center;
  616. }
  617. }
  618. .subject-add-btn{
  619. width: 57px;
  620. height: 57px;
  621. background: url("/images/icon-add.png") center no-repeat;
  622. }
  623. </style>