stuTestDetails.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. <template>
  2. <!-- 学生实验情况 -->
  3. <view class="user-full">
  4. <view class="box2 df ">
  5. <view class="box2-content">
  6. <view class="title df fdr aic">
  7. <view class="df">
  8. <img src="../../assets/user/pic_user_02.png"></img>
  9. </view>
  10. <view class="title-text">学生信息</view>
  11. </view>
  12. <view class="box2-table-box df fdr">
  13. <view class="m_right_container">
  14. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  15. <thead class="m-table-hander">
  16. <tr>
  17. <th>姓名</th>
  18. <th>班级</th>
  19. <th>学号</th>
  20. </tr>
  21. </thead>
  22. <tbody>
  23. <tr>
  24. <th style="color: #EA252C;">{{model.Name}}</th>
  25. <th>{{model.Class}}</th>
  26. <th>{{model.StudentID}}</th>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="box2 df ">
  35. <view class="box2-content">
  36. <view class="title df fdr aic">
  37. <view class="df">
  38. <img src="../../assets/user/pic_user_02.png"></img>
  39. </view>
  40. <view class="title-text">成绩分布</view>
  41. </view>
  42. <view class="box2-table-box df fdr">
  43. <!-- <radar class=""></radar> -->
  44. <!-- <canvas canvas-id="canvasRadar" id="canvasRadar" class="charts"></canvas> -->
  45. <web-view class='webview' :src="url" v-if="url.length"></web-view>
  46. <!-- 五维图暂缓 -->
  47. </view>
  48. </view>
  49. </view>
  50. <view class="box2 df ">
  51. <view class="box2-content">
  52. <view class="title df fdr aic">
  53. <view class="df">
  54. <img src="../../assets/user/pic_user_02.png"></img>
  55. </view>
  56. <view class="title-text">学习进度</view>
  57. </view>
  58. <view class="box2-table-box df fdc">
  59. <view class="progress-item df fdr aic">
  60. <view class="progress-box">
  61. <progress :percent=YLRZ_P activeColor="#e93f52" active stroke-width="8" />
  62. </view>
  63. <view class="progress-text">{{YLRZ_P}}%</view>
  64. </view>
  65. <view class="progress-item df fdr aic">
  66. <view class="progress-box">
  67. <progress :percent=SJKC_P activeColor="#d6ebbf" active stroke-width="8" />
  68. </view>
  69. <view class="progress-text">{{SJKC_P}}%</view>
  70. </view>
  71. <view class="progress-item df fdr aic">
  72. <view class="progress-box">
  73. <progress :percent=XNSY_P activeColor="#60b4f0" active stroke-width="8" />
  74. </view>
  75. <view class="progress-text">{{XNSY_P}}%</view>
  76. </view>
  77. <view class="xxjd-text">红色为原理认知,绿色为实景勘察,蓝色为虚拟实验</view>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="box3 df ">
  82. <view class="box2-content">
  83. <view class="title df fdr aic">
  84. <view class="df">
  85. <img src="../../assets/user/pic_user_02.png"></img>
  86. </view>
  87. <view class="title-text">测试成绩</view>
  88. </view>
  89. <view class="box2-table-box df fdr">
  90. <view class="m_right_container">
  91. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  92. <thead class="m-table-hander">
  93. <tr>
  94. <th>测试项目</th>
  95. <th>是否学习</th>
  96. <th>是否通过</th>
  97. <th>分值</th>
  98. </tr>
  99. </thead>
  100. <tbody>
  101. <tr>
  102. <th>原理认知</th>
  103. <th>{{model.Score_ylrz>0?'是':'否'}}</th>
  104. <th>{{model.Score_ylrz>=10?'是':'否'}}</th>
  105. <th>{{model.Score_ylrz>0?model.Score_ylrz:'0'}}</th>
  106. </tr>
  107. <tr>
  108. <th>实景勘察</th>
  109. <th>{{model.Score_sjkc>0?'是':'否'}}</th>
  110. <th>{{model.Score_sjkc>=10?'是':'否'}}</th>
  111. <th>{{model.Score_sjkc>0?model.Score_sjkc:'0'}}</th>
  112. </tr>
  113. <tr>
  114. <th>虚拟技术搭建</th>
  115. <th>{{model.Score_xnjsdj>0?'是':'否'}}</th>
  116. <th>{{model.Score_xnjsdj>=10?'是':'否'}}</th>
  117. <th>{{model.Score_xnjsdj>0?model.Score_xnjsdj:'0'}}</th>
  118. </tr>
  119. <tr>
  120. <th>虚拟艺术创作</th>
  121. <th>{{model.Score_xnyscz>0?'是':'否'}}</th>
  122. <th>{{model.Score_xnyscz>=10?'是':'否'}}</th>
  123. <th>{{model.Score_xnyscz>0?model.Score_xnyscz:'0'}}</th>
  124. </tr>
  125. </tbody>
  126. </table>
  127. </view>
  128. </view>
  129. <view class="btn-box df fdr aic jcc">
  130. <view class="btn-submit df aic jcc">成绩添加与修改</view>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. </template>
  136. <script>
  137. // import uCharts from '@/components/u-charts/u-charts.js';
  138. // var _self;
  139. // var canvaRadar=null;
  140. export default {
  141. components: {
  142. // uCharts
  143. },
  144. data() {
  145. return {
  146. url:'https://www.yuyekeji.cn/H5/radar.html',
  147. // cWidth:'',
  148. // cHeight:'',
  149. // pixelRatio:1,
  150. // textarea:'',
  151. //0添加1个人
  152. showIndex_userInfo: 1,
  153. sexIndex: 0,
  154. zjIndex: 0,
  155. mzIndex: 0,
  156. //学习进度
  157. YLRZ_P:0,
  158. SJKC_P:0,
  159. XNSY_P:0,
  160. model: {
  161. "Name": "", //姓名
  162. "Class": "", //班级
  163. "StudentID": '', //学号
  164. "Score_ylrz": null, //原理认知分数
  165. "Score_sjkc": null, //实景勘察分数
  166. "Score_xnjsdj": null, //虚拟技术搭建分数
  167. "Score_xnyscz": null, //虚拟艺术创作分数
  168. },
  169. array_sex: ['男', '女'],
  170. array_zj: ['身份证', '护照'],
  171. array_mz: ['汉族', '少数民族'],
  172. testResults:['原理认知', '实景勘察', '虚拟技术搭建', '虚拟艺术创作']
  173. }
  174. },
  175. // mounted() {
  176. // _self = this;
  177. // //#ifdef MP-ALIPAY
  178. // uni.getSystemInfo({
  179. // success: function (res) {
  180. // if(res.pixelRatio>1){
  181. // //正常这里给2就行,如果pixelRatio=3性能会降低一点
  182. // //_self.pixelRatio =res.pixelRatio;
  183. // _self.pixelRatio =2;
  184. // }
  185. // }
  186. // });
  187. // //#endif
  188. // this.cWidth=uni.upx2px(750);
  189. // this.cHeight=uni.upx2px(500);
  190. // this.getServerData();
  191. // },
  192. methods: {
  193. //点击添加个人信息
  194. onClick_p1_add() {
  195. this.showIndex_userInfo = 1;
  196. },
  197. bindPickerChange_sex: function(e) {
  198. console.log('picker发送选择改变,携带值为', e.target.value)
  199. this.sexIndex = e.target.value
  200. },
  201. bindPickerChange_zj: function(e) {
  202. this.zjIndex = e.target.value
  203. },
  204. bindPickerChange_mz: function(e) {
  205. this.mzIndex = e.target.value
  206. },
  207. updateInfo(data) {
  208. console.log('data=',data)
  209. this.model.Name = data.Name;
  210. this.model.Class = data.Class;
  211. this.model.StudentID = data.StudentID;
  212. userController.data_scores = data.UserScore;
  213. this.model.Score_ylrz=userController.getScore_ylrz();
  214. this.model.Score_sjkc=userController.getScore_sjck();
  215. this.model.Score_xnjsdj=userController.getScore_xnjsdj();
  216. this.model.Score_xnyscz=userController.getScore_xnyscz();
  217. },
  218. updateLearnProgress(data) {
  219. // console.log('data=',data)
  220. // data = [{Score: 6},
  221. // {Score: 4},
  222. // {Score: 1},
  223. // {Score: 1},
  224. // {Score: 1},
  225. // {Score: 2},
  226. // {Score: 1},
  227. // {Score: 5},
  228. // {Score: 1},
  229. // {Score: 1},
  230. // {Score: 1},
  231. // {Score: 1},
  232. // {Score: 1},
  233. // {Score: 1},
  234. // {Score: 1},
  235. // {Score: 1}];
  236. if( data[0].Score!=-1)
  237. {
  238. this.YLRZ_P = parseInt(data[0].Score/10*100);
  239. }
  240. if( data[1].Score!=-1)
  241. {
  242. this.SJKC_P = parseInt(data[1].Score/5*100);
  243. }
  244. let totalScore = 0;
  245. for(let i=2;i<16;i++)
  246. {
  247. if(data[i].Score!=-1)
  248. {
  249. totalScore++;
  250. }
  251. }
  252. this.XNSY_P = parseInt(totalScore/14*100);
  253. },
  254. // getServerData(){
  255. // let data = {"categories":["维度1","维度2","维度3","维度4","维度5","维度6"],"series":[{"name":"成交量1","data":[90,110,165,195,187,172]},{"name":"成交量2","data":[190,210,105,35,27,102]}]}
  256. // _self.showRadar("canvasRadar",data);
  257. // },
  258. // showRadar(canvasId,chartData){
  259. // canvaRadar=new uCharts({
  260. // $this:_self,
  261. // canvasId: canvasId,
  262. // type: 'radar',
  263. // fontSize:11,
  264. // padding:[15,15,0,15],
  265. // legend:{
  266. // show:true,
  267. // padding:5,
  268. // lineHeight:11,
  269. // margin:0,
  270. // },
  271. // background:'#FFFFFF',
  272. // pixelRatio:_self.pixelRatio,
  273. // animation: true,
  274. // dataLabel: true,
  275. // categories: chartData.categories,
  276. // series: chartData.series,
  277. // width: _self.cWidth*_self.pixelRatio,
  278. // height: _self.cHeight*_self.pixelRatio,
  279. // extra: {
  280. // radar: {
  281. // max: 200,//雷达数值的最大值
  282. // gridType:'radar'//radar或者circle可选,网格样式,默认radar
  283. // }
  284. // }
  285. // });
  286. // },
  287. }
  288. }
  289. </script>
  290. <style lang="scss">
  291. .user-full {
  292. width: 100%;
  293. height: 100%;
  294. }
  295. .user-right-box {
  296. // background: #FFFFFF;
  297. background: #F4F4F4;
  298. box-shadow: px2vw(3) 0px px2vw(6) 0px rgba(0, 0, 0, 0.1);
  299. flex: 1;
  300. margin-left: px2vw(10);
  301. }
  302. .user-right-01-tip {
  303. font-size: px2vw(22);
  304. color: #FF7373;
  305. line-height: px2vw(29);
  306. margin-top: px2vw(37);
  307. }
  308. .self-btn01 {
  309. width: px2vw(200);
  310. height: px2vw(58);
  311. background: #EA252C;
  312. border-radius: px2vw(8);
  313. font-size: px2vw(24);
  314. color: #FFFFFF;
  315. line-height: px2vw(31);
  316. margin-top: px2vw(94);
  317. }
  318. .user-right-self01 {
  319. background: #FFFFFF;
  320. }
  321. .box1 {
  322. height: px2vw(200);
  323. background: #FFFFFF;
  324. }
  325. .self-avatar {
  326. margin-left: px2vw(227);
  327. }
  328. .self-avatar img {
  329. width: px2vw(120);
  330. }
  331. .self-btn02 {
  332. width: px2vw(200);
  333. height: px2vw(58);
  334. background: #EA252C;
  335. border-radius: px2vw(8);
  336. font-size: px2vw(24);
  337. color: #FFFFFF;
  338. line-height: px2vw(31);
  339. margin-left: px2vw(57);
  340. }
  341. .box2 {
  342. // height: px2vw(553);
  343. background: #FFFFFF;
  344. margin-top: px2vw(10);
  345. }
  346. .box2-content {
  347. margin-left: px2vw(71);
  348. margin-top: px2vw(31);
  349. margin-bottom: px2vw(57);
  350. }
  351. .form-input {
  352. width: px2vw(355);
  353. height: px2vw(54);
  354. padding: px2vw(14) px2vw(20);
  355. font-size: px2vw(20);
  356. color: #070707;
  357. line-height: px2vw(26);
  358. background: #FFFFFF;
  359. border-radius: px2vw(4);
  360. border: 1px solid #B4B4B4;
  361. }
  362. .title-text {
  363. margin-left: px2vw(16);
  364. }
  365. .box2-table-box {
  366. // margin-top: px2vw(44);
  367. // margin-bottom: px2vw(44);
  368. width: px2vw(1377);
  369. }
  370. .box2-table-box-left {
  371. width: px2vw(500);
  372. }
  373. .box2-table-box-left-item {
  374. width: 100%;
  375. margin-top: px2vw(30);
  376. }
  377. .table-title {
  378. font-size: px2vw(22);
  379. color: #555555;
  380. line-height: px2vw(29);
  381. }
  382. .box2-table-box-right {
  383. width: px2vw(500);
  384. margin-left: px2vw(92);
  385. }
  386. .box3 {
  387. // height: px2vw(553);
  388. background: #FFFFFF;
  389. margin-top: px2vw(10);
  390. }
  391. .btn-box {
  392. // margin-top: px2vw(10);
  393. }
  394. .btn-submit {
  395. width: px2vw(353);
  396. height: px2vw(58);
  397. background: #EA252C;
  398. border-radius: px2vw(8);
  399. font-size: px2vw(24);
  400. color: #FFFFFF;
  401. line-height: px2vw(31);
  402. margin-top: px2vw(94);
  403. }
  404. .btn-cancel {
  405. width: px2vw(200);
  406. height: px2vw(58);
  407. background: #D8D8D8;
  408. border-radius: px2vw(8);
  409. font-size: px2vw(24);
  410. color: #FFFFFF;
  411. line-height: px2vw(31);
  412. margin-top: px2vw(94);
  413. margin-left: px2vw(30);
  414. }
  415. .m_right {
  416. width: 100%;
  417. height: 100%;
  418. margin-top: 5rpx;
  419. padding: 0 150rpx;
  420. background-color: #fff;
  421. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  422. .m_right_hander {
  423. text-align: right;
  424. height: 250rpx;
  425. position: relative;
  426. .m_btn_red {
  427. position: absolute;
  428. height: 80rpx;
  429. line-height: 80rpx;
  430. padding: 0 40rpx;
  431. right: 0;
  432. top: 50%;
  433. transform: translateY(-50%);
  434. background: #EA252C;
  435. color: #fff;
  436. }
  437. }
  438. }
  439. tbody tr {
  440. border-top: 2rpx solid #DDDDDD !important;
  441. }
  442. tbody tr th {
  443. font-weight: 400 !important;
  444. height: 140rpx;
  445. line-height: 140rpx;
  446. }
  447. tbody tr:hover {
  448. // color: #fff;
  449. background: #FDEBEC;
  450. // opacity: 0.08;
  451. }
  452. .m-table-hander {
  453. background-color: #FFF8F7;
  454. height: 140rpx;
  455. line-height: 140rpx;
  456. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  457. font-weight: bold;
  458. }
  459. .m_edit {
  460. position: absolute;
  461. top: 50%;
  462. left: 50%;
  463. transform: translate(-50%, -50%);
  464. background: rgb(67, 127, 250);
  465. color: rgb(255, 255, 255);
  466. min-width: 130rpx;
  467. }
  468. .m_delete {
  469. position: absolute;
  470. top: 50%;
  471. left: 50%;
  472. min-width: 130rpx;
  473. transform: translate(-50%, -50%);
  474. background: rgb(234, 37, 44);
  475. color: rgb(255, 255, 255);
  476. }
  477. .m_right_footer {
  478. margin-top: 80rpx;
  479. margin-bottom: 80rpx;
  480. }
  481. .m_paging {
  482. text-align: right;
  483. .m_paging_item {
  484. padding: 10rpx 18rpx;
  485. border: 1rpx solid #DDDDDD;
  486. border-radius: 8rpx;
  487. margin-right: 10rpx;
  488. }
  489. .p_act {
  490. background: #EA252C;
  491. color: #fff;
  492. border: inherit;
  493. }
  494. }
  495. .m_paging_item:hover {
  496. background: #EA252C;
  497. color: #fff;
  498. border: inherit;
  499. }
  500. .m_act1 {
  501. color: #FF0019;
  502. }
  503. .m_right_container {
  504. width: 100%;
  505. margin-top: px2vw(40);
  506. }
  507. .progress-item{
  508. margin-top: px2vw(40);
  509. }
  510. .progress-box {
  511. width: px2vw(700);
  512. // margin-top: px2vw(40);
  513. }
  514. .xxjd-text {
  515. margin-top: px2vw(40);
  516. }
  517. .progress-text {
  518. font-size: px2vw(24);
  519. color: #070707;
  520. line-height: px2vw(26);
  521. margin-left: px2vw(40);
  522. }
  523. .webview{
  524. height: 650upx;
  525. width: 500upx;
  526. }
  527. </style>