examCommit.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. <template>
  2. <view class="report-content">
  3. <view class="topinfo">
  4. <image
  5. style="position: relative; left: 7%;"
  6. src="/static/img/ct.png"></image>
  7. </view>
  8. <!-- <view @click="userFormFlag = true" class="ehcarts-title">测评结果等级</view> -->
  9. <view style="margin-top: 250px;">
  10. <image
  11. style="width: 100%; height: 360upx; 30px"
  12. :src="'/static/img/E.png'"></image>
  13. <view class="min_title">
  14. 根据教育部《关于普通高中学业水平考试的实施意见》
  15. (教基二[2014]10号)所给的标准,以等级呈现成绩,
  16. 位次由高到低为A至E等级。其中A等级15%,B等级30%,C等级30%,D、E等级共25%,
  17. 智能提分系统参照此文件,在义务教育阶段同等适用。
  18. </view>
  19. </view>
  20. <uni-popup
  21. :show="userFormFlag"
  22. type="center"
  23. :custom="true" :mask-click="false">
  24. <view class="uni-tip">
  25. <view class="uni-tip-title">完善信息</view>
  26. <view class="uni-tip-content">
  27. <view class="form-container-box">
  28. <!-- 待用活动表单 -->
  29. <active-form
  30. :formDate="formDate"
  31. @sure-btn="sure" @input-val="inputVal">
  32. </active-form>
  33. <view style="margin: 10rpx; color: red;">
  34. 温馨提示: 请准确填写相关信息帮助系统对您或您的孩子生成精准学习分析报告和推荐的学习路径
  35. </view>
  36. </view>
  37. </view>
  38. <view class="uni-tip-group-button">
  39. <!-- <view @click="userFormFlag = false" class="uni-tip-button">取消</view> -->
  40. <button style="font-size: 16px;" type="primary" @click="submitForm">提交查看结果</button>
  41. <!-- <view @click="submitForm" class="uni-tip-button">确定</view> -->
  42. </view>
  43. </view>
  44. </uni-popup>
  45. </view>
  46. </template>
  47. <script>
  48. import { mapGetters } from 'vuex'
  49. import uniPopup from '@/components/uni-popup/uni-popup.vue'
  50. import activeForm from '@/components/userInfo/active_form.vue'
  51. export default {
  52. components: {uniPopup, activeForm},
  53. data() {
  54. return {
  55. userFormFlag: false,
  56. formDate: [
  57. {
  58. placeholder: "请输入姓名",
  59. label: "姓名",
  60. type: "text",
  61. rules: {
  62. name: "name",
  63. value: "",
  64. verify: "req",
  65. errMess: "请输入姓名"
  66. }
  67. },
  68. {
  69. placeholder: "请输入就读学校",
  70. label: "就读学校",
  71. type: "text",
  72. rules: {
  73. name: "from_school_name",
  74. value: "",
  75. verify: "req",
  76. errMess: "请输入就读学校"
  77. }
  78. },
  79. {
  80. placeholder: "请填写联系方式",
  81. label: "手机号",
  82. type: "number",
  83. rules: {
  84. name: "mobile",
  85. value: "",
  86. verify: "req|phone",
  87. errMess: "手机号填写不正确"
  88. }
  89. }]
  90. }
  91. },
  92. computed: {
  93. ...mapGetters({
  94. fromSchoolId: 'paper/getFromSchoolId',
  95. examParams: 'paper/getExamParams'
  96. })
  97. },
  98. onLoad(params) {
  99. setTimeout(() => {
  100. this.userFormFlag = true
  101. }, 100)
  102. },
  103. methods: {
  104. inputVal: function(data){
  105. var data=JSON.parse(data);
  106. if (String(data.val) != "" && String(data.index) != "") {
  107. this.formDate[data.index].rules.value = data.val;
  108. }
  109. },
  110. submitForm () {
  111. // 表单验证 可选项 otherPra:otherPra
  112. var otherPra = {
  113. reqEmptyVal: true,
  114. }
  115. if (this.$vervify({
  116. formDate: this.formDate,
  117. otherPra: otherPra
  118. })
  119. ) {
  120. let formArray = []
  121. this.formDate.forEach(item => {
  122. let itemValue = item.rules
  123. if (itemValue.name === 'sex') {
  124. if (itemValue.value === '男') {
  125. itemValue.value = 1
  126. } else if (itemValue.value === '女') {
  127. itemValue.value = 0
  128. }
  129. }
  130. formArray.push({
  131. name: itemValue.name,
  132. value: itemValue.value,
  133. })
  134. })
  135. uni.showLoading({
  136. title: '正在生成测试报告, 请稍后...'
  137. })
  138. this.$httpApi.post('/front/potentialStudentInfo', {formList: formArray, fromSchoolId: parseInt(this.fromSchoolId)})
  139. .then(response => {
  140. if (response.code === 1) {
  141. let studentId = response.data
  142. this.$store.commit('paper/updateStudentId', response.data)
  143. this.sendCommitQuestionHttp(studentId)
  144. } else {
  145. uni.hideLoading()
  146. setTimeout(() => {
  147. uni.showToast({
  148. title: response.message
  149. })
  150. }, 100)
  151. }
  152. })
  153. }
  154. },
  155. sendCommitQuestionHttp (studentId) {
  156. let form = this.examParams
  157. form.potentialStudentInfoId = studentId
  158. this.$httpApi.post('/front/aiCt/commitAiPaperQuestion', form)
  159. .then(response => {
  160. uni.hideLoading()
  161. if (response.code === 1) {
  162. uni.showToast({
  163. icon: 'none',
  164. title: '报告生成成功'
  165. })
  166. setTimeout(() => {
  167. // 跳转测评报告结果页
  168. uni.redirectTo({
  169. url: 'ctReport'
  170. })
  171. }, 100)
  172. } else {
  173. uni.showToast({
  174. icon: 'none',
  175. title: '报告生成失败'
  176. })
  177. }
  178. })
  179. },
  180. },
  181. filters: {
  182. }
  183. }
  184. </script>
  185. <style scoped>
  186. .uni-tag {
  187. width: 30%
  188. }
  189. @import "../../colorui/animation.css";
  190. @import "../../colorui/main.css";
  191. @import "../../colorui/icon.css";
  192. /*每个页面公共css */
  193. page {
  194. background-color: #FFFFFF;
  195. }
  196. uni-radio:before {
  197. content: ''
  198. }
  199. /* .questionInfo_content p {
  200. display: inline-block;
  201. } */
  202. uni-checkbox:before {
  203. content: ''
  204. }
  205. .line-green {
  206. background-color: #409eff !important;
  207. color: #F0F0F0;
  208. }
  209. .cu-form-group {
  210. justify-content: flex-start
  211. }
  212. .cu-form-group .title {
  213. padding-left: 30upx;
  214. padding-right: 0upx;
  215. }
  216. /* 提示窗口 */
  217. .uni-tip {
  218. padding: 15px;
  219. width: 320px;
  220. background: #fff;
  221. box-sizing: border-box;
  222. border-radius: 10px;
  223. }
  224. .uni-tip-title {
  225. text-align: center;
  226. font-weight: bold;
  227. font-size: 16px;
  228. color: #333;
  229. }
  230. .uni-tip-content {
  231. padding: 15px;
  232. font-size: 14px;
  233. color: #666;
  234. }
  235. .uni-tip-group-button {
  236. margin-top: 10px;
  237. display: flex;
  238. }
  239. .uni-tip-button {
  240. width: 100%;
  241. text-align: center;
  242. font-size: 14px;
  243. color: #3b4144;
  244. }
  245. .cu-form-group+.cu-form-group {
  246. border-top: none;
  247. }
  248. .cu-bar-title {
  249. min-height: 50upx;
  250. }
  251. .cu-list.menu>.cu-item-error{justify-content: flex-start;}
  252. </style>
  253. <style>
  254. .icons_item {
  255. font-size: 30upx;
  256. margin-top: 10upx;
  257. margin-left: 10upx;
  258. color: red;
  259. width: 265upx;
  260. float: left;
  261. display: inline-block;
  262. }
  263. .uni-text-small {
  264. font-size:24upx;
  265. }
  266. /* page */
  267. .uni-h5 {font-size: 28upx; color: #8f8f94;}
  268. /* 文本溢出隐藏 */
  269. .uni-ellipsis {
  270. overflow: hidden;
  271. white-space: nowrap;
  272. margin-top: 15upx;
  273. color: #999999;
  274. text-overflow: ellipsis;
  275. }
  276. .uni-page-head{
  277. padding:35upx;
  278. text-align: center;
  279. }
  280. .question_count_item {
  281. width: 30%;
  282. margin: 12upx;
  283. display: inline-block;
  284. }
  285. .uni-page-head-title {
  286. display: inline-block;
  287. padding: 0 40upx;
  288. font-size: 30upx;
  289. height: 88upx;
  290. line-height: 88upx;
  291. color: #BEBEBE;
  292. box-sizing: border-box;
  293. border-bottom: 2upx solid #D8D8D8;
  294. }
  295. .min_title {
  296. font-size: 14px;
  297. margin: 5px;
  298. color: #DADADA;
  299. }
  300. .uni-page-body {
  301. width: 100%;
  302. flex-grow: 1;
  303. overflow-x: hidden;
  304. }
  305. .uni-list-cell {
  306. position: relative;
  307. display: flex;
  308. flex-direction: row;
  309. justify-content: space-between;
  310. align-items: center;
  311. }
  312. .uni-list-cell-hover {
  313. background-color: #eee;
  314. }
  315. .uni-list-cell-pd {
  316. padding: 22upx 30upx;
  317. }
  318. .uni-list-cell-left {
  319. font-size:28upx;
  320. padding: 0 30upx;
  321. }
  322. .uni-list-cell-db,
  323. .uni-list-cell-right {
  324. flex: 1;
  325. }
  326. .uni-list-cell::after {
  327. position: absolute;
  328. z-index: 3;
  329. right: 0;
  330. bottom: 0;
  331. left: 30upx;
  332. height: 1px;
  333. content: '';
  334. -webkit-transform: scaleY(.5);
  335. transform: scaleY(.5);
  336. background-color: #c8c7cc;
  337. }
  338. .uni-list .uni-list-cell:last-child::after {
  339. height: 0upx;
  340. }
  341. .uni-list-cell-last.uni-list-cell::after {
  342. height: 0upx;
  343. }
  344. .uni-list-cell-divider {
  345. position: relative;
  346. display: flex;
  347. color: #999;
  348. background-color: #f7f7f7;
  349. padding:15upx 20upx;
  350. }
  351. .uni-list-cell-divider::before {
  352. position: absolute;
  353. right: 0;
  354. top: 0;
  355. left: 0;
  356. height: 1px;
  357. content: '';
  358. -webkit-transform: scaleY(.5);
  359. transform: scaleY(.5);
  360. background-color: #c8c7cc;
  361. }
  362. .tip {
  363. color: #9A9A9A;
  364. font-size: 26upx;
  365. margin-top: 2upx;
  366. width: 300upx;
  367. text-align: center;
  368. }
  369. .uni-list-cell-divider::after {
  370. position: absolute;
  371. right: 0;
  372. bottom: 0;
  373. left: 0upx;
  374. height: 1px;
  375. content: '';
  376. -webkit-transform: scaleY(.5);
  377. transform: scaleY(.5);
  378. background-color: #c8c7cc;
  379. }
  380. .uni-list-cell-navigate {
  381. font-size:30upx;
  382. padding: 22upx 30upx;
  383. line-height: 48upx;
  384. position: relative;
  385. display: flex;
  386. box-sizing: border-box;
  387. width: 100%;
  388. flex: 1;
  389. justify-content: space-between;
  390. align-items: center;
  391. }
  392. .uni-list-cell-navigate {
  393. padding-right: 36upx;
  394. }
  395. .uni-navigate-badge {
  396. padding-right: 50upx;
  397. }
  398. .uni-list-cell-navigate.uni-navigate-right:after {
  399. font-family: uniicons;
  400. content: '\e583';
  401. position: absolute;
  402. right: 24upx;
  403. top: 50%;
  404. color: #bbb;
  405. -webkit-transform: translateY(-50%);
  406. transform: translateY(-50%);
  407. }
  408. .uni-list-cell-navigate.uni-navigate-bottom:after {
  409. font-family: uniicons;
  410. content: '\e581';
  411. position: absolute;
  412. right: 24upx;
  413. top: 50%;
  414. color: #bbb;
  415. -webkit-transform: translateY(-50%);
  416. transform: translateY(-50%);
  417. }
  418. .uni-list-cell-navigate.uni-navigate-bottom.uni-active::after {
  419. font-family: uniicons;
  420. content: '\e580';
  421. position: absolute;
  422. right: 24upx;
  423. top: 50%;
  424. color: #bbb;
  425. -webkit-transform: translateY(-50%);
  426. transform: translateY(-50%);
  427. }
  428. .uni-collapse.uni-list-cell {
  429. flex-direction: column;
  430. }
  431. .uni-list-cell-navigate.uni-active {
  432. background: #eee;
  433. }
  434. .uni-list.uni-collapse {
  435. box-sizing: border-box;
  436. height: 0;
  437. overflow: hidden;
  438. }
  439. .uni-collapse .uni-list-cell {
  440. padding-left: 20upx;
  441. }
  442. .uni-collapse .uni-list-cell::after {
  443. left: 52upx;
  444. }
  445. .uni-list.uni-active {
  446. height: auto;
  447. }
  448. /* 三行列表 */
  449. .uni-triplex-row {
  450. display: flex;
  451. flex: 1;
  452. width: 100%;
  453. box-sizing: border-box;
  454. flex-direction: row;
  455. padding: 22upx 30upx;
  456. }
  457. .uni-triplex-right,
  458. .uni-triplex-left {
  459. display: flex;
  460. flex-direction: column;
  461. }
  462. .uni-triplex-left {
  463. width: 84%;
  464. }
  465. .uni-triplex-left .uni-title{
  466. padding:8upx 0;
  467. }
  468. .uni-text {
  469. display: inherit !important;
  470. }
  471. .uni-triplex-left .uni-text, .uni-triplex-left .uni-text-small{color:#999999;}
  472. .uni-triplex-right {
  473. width: 16%;
  474. text-align: right;
  475. }
  476. .count_item {
  477. display: inline-block;
  478. width: 50%;
  479. /* margin-left: 13%; */
  480. /* width: 40%;
  481. margin-left: 9%; */
  482. margin-top: 10px;
  483. }
  484. .topinfos {
  485. margin: 20px auto;
  486. padding: 10px 0 20px;
  487. display: flex;
  488. background-color: #ed2828;
  489. color: #fff;
  490. justify-content: center;
  491. align-items: center;
  492. flex-direction: column;
  493. }
  494. .report-content {
  495. width: 100%;
  496. height: 100%;
  497. }
  498. .mark {
  499. position: relative;
  500. right: 4%;
  501. text-align: center;
  502. font-size: 24px;
  503. font-weight: 700;
  504. }
  505. .ehcarts-title {
  506. display: flex;
  507. justify-content: space-between;
  508. align-items: center;
  509. font-size: 32upx;
  510. color: white;
  511. padding: 30upx 30upx 30upx 50upx;
  512. margin-top: 20upx;
  513. width: 100%;
  514. position: relative;
  515. background-color: #FF9966;
  516. border-bottom: 1px #FF9966 solid
  517. }
  518. .qiun-columns .item {
  519. /* width: 20upx; */
  520. display: inline-block;
  521. float: left;
  522. margin-top: 20upx;
  523. margin-bottom: 20upx;
  524. margin-left: 50upx;
  525. }
  526. page {
  527. background: #F2F2F2;
  528. width: 750upx;
  529. overflow-x: hidden;
  530. }
  531. .qiun-padding {
  532. padding: 2%;
  533. width: 96%;
  534. }
  535. .qiun-wrap {
  536. display: flex;
  537. flex-wrap: wrap;
  538. }
  539. .qiun-rows {
  540. display: flex;
  541. flex-direction: row !important;
  542. }
  543. .ai_btn {
  544. display: inline-block;
  545. line-height: 40px;
  546. position: relative;
  547. left: 8%;
  548. }
  549. .ai_btn_item {
  550. border-radius: 60upx;
  551. float: left;
  552. line-height: 50px;
  553. margin-left: 20px;
  554. margin-top: 20px;
  555. }
  556. .qiun-columns {
  557. display: flex;
  558. flex-direction: column !important;
  559. }
  560. .qiun-common-mt {
  561. margin-top: 10upx;
  562. }
  563. .qiun-bg-white {
  564. background: #FFFFFF;
  565. }
  566. .qiun-title-bar {
  567. width: 96%;
  568. padding: 10upx 2%;
  569. flex-wrap: nowrap;
  570. }
  571. .qiun-title-dot-light {
  572. border-left: 10upx solid #0ea391;
  573. padding-left: 10upx;
  574. font-size: 32upx;
  575. color: #000000
  576. }
  577. /* 通用样式 */
  578. .qiun-charts {
  579. width: 750upx;
  580. height: 500upx;
  581. background-color: #FFFFFF;
  582. }
  583. .charts {
  584. width: 750upx;
  585. height: 500upx;
  586. background-color: #FFFFFF;
  587. }
  588. /* 横屏样式 */
  589. .qiun-charts-rotate {
  590. width: 700upx;
  591. height: 1100upx;
  592. background-color: #FFFFFF;
  593. padding: 25upx;
  594. }
  595. .charts-rotate {
  596. width: 700upx;
  597. height: 1100upx;
  598. background-color: #FFFFFF;
  599. }
  600. /* 圆弧进度样式 */
  601. .qiun-charts3 {
  602. width: 750upx;
  603. height: 250upx;
  604. background-color: #FFFFFF;
  605. position: relative;
  606. }
  607. .charts3 {
  608. position: absolute;
  609. width: 250upx;
  610. height: 250upx;
  611. background-color: #FFFFFF;
  612. }
  613. .qiun-tip {
  614. display: block;
  615. width: auto;
  616. overflow: hidden;
  617. padding: 15upx;
  618. height: 30upx;
  619. line-height: 30upx;
  620. margin: 10upx;
  621. background: #ff9933;
  622. font-size: 30upx;
  623. border-radius: 8upx;
  624. justify-content: center;
  625. text-align: center;
  626. border: 1px solid #dc7004;
  627. color: #FFFFFF;
  628. }
  629. </style>