examStart.vue 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831
  1. <template>
  2. <view class="container">
  3. <view>
  4. <!-- 提示信息弹窗 -->
  5. <uni-popup ref="message" type="message">
  6. <uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
  7. </uni-popup>
  8. </view>
  9. </view>
  10. <view style="font-family: '微软雅黑', serif;
  11. font-size: 40px;
  12. color: #7f7f44;height: 30px;text-align: center;padding:20px;padding-bottom: 0;">
  13. {{examObject.examTitle}}
  14. </view>
  15. <button type="primary"
  16. style="background-color: #f0eff0; position: fixed;top: 20px;right: 20px;width: 20px;height: 20px;line-height:1;color: #000000;"
  17. @click="reload">҉</button>
  18. <uni-row>
  19. <uni-col :span="4" style="margin-top: 30px">
  20. <uni-card style="height: 85vh;">
  21. <l-divider color="#00a60d">
  22. <view style="font-size: 2vmin;">考生信息</view>
  23. </l-divider>
  24. <view
  25. style="font-family: '微软雅黑' , serif;font-size: 2vmin;color: #8c8c8c;height: 30px;text-align: center;padding:1%;">
  26. 姓名:{{user.realname}}
  27. </view>
  28. <view
  29. style="font-family: '微软雅黑', serif;font-size: 2vmin;color: #8c8c8c;height: 30px;text-align: center;padding:1%;">
  30. 考号:{{user.username}}
  31. </view>
  32. <l-divider color="#00a60d">
  33. <view style="font-size: 2vmin;">试卷名称</view>
  34. </l-divider>
  35. <radio-group>
  36. <label v-for="(item, index) in examObject.examPapersList" :key="item.value">
  37. <view>
  38. <view class="paperCss"
  39. :style="'background-color: '+(item.state === 0?'#b5aa09;':(item.state === 9?'#ececec':'#00f545'))">
  40. <view style="color: #000000;"> <strong style="font-size: 2vmin;">{{item.title}}</strong>
  41. </view>
  42. </view>
  43. </view>
  44. </label>
  45. </radio-group>
  46. <l-divider color="#b3b3b3">
  47. </l-divider>
  48. <button type="primary" style="margin-top: 10px;font-size: 2vmin;" @click="subExam">交卷</button>
  49. </uni-card>
  50. </uni-col>
  51. <uni-col :span="16" style="margin-top: 30px">
  52. <uni-card style="height: 85vh;">
  53. <scroll-view scroll-y="true" scroll-x="true" class="scroll-Y">
  54. <uni-section :title="scantron.questionIndex+'、'+scantron.questionTypeName" type="line" padding>
  55. <view v-if="scantron.questionType!==7&&scantron.questionType!==8" id="scantronNodes"
  56. style="height: 45vh;">
  57. </view>
  58. <view v-if="scantron.questionType==7||scantron.questionType==8" id="scantronNodes"
  59. style="height: 5vh;">
  60. </view>
  61. <template v-if="scantron.questionType===1||scantron.questionType===3">
  62. <view>
  63. <l-divider color="#aaaa7f">
  64. </l-divider>
  65. </view>
  66. <view>
  67. <radio-group>
  68. <label v-for="(item, index) in scantron.question.answerList" :key="item">
  69. <view>
  70. <button @click="radioAdd(item,index,scantron)"
  71. :style="'margin-top: 15px;padding-left:15px;font-size: 20px;text-align: left;background-color: '+(item.isRight?'#f9ea0d;':'#f0eff0')"><strong
  72. style="color: #0072eb;">{{item.tag+"、"}}</strong>{{item.content}}</button>
  73. </view>
  74. </label>
  75. </radio-group>
  76. </view>
  77. </template>
  78. <template v-if="scantron.questionType===2">
  79. <view>
  80. <l-divider color="#aaaa7f">
  81. </l-divider>
  82. </view>
  83. <view>
  84. <radio-group>
  85. <label v-for="(item, index) in scantron.question.answerList" :key="item.value">
  86. <view>
  87. <button @click="item.isRight=!item.isRight;radioAdd(item,index,scantron);"
  88. :style="'margin-top: 15px;padding-left:15px;font-size: 20px;text-align: left;background-color: '+(item.isRight?'#f9ea0d;':'#f0eff0')"><strong
  89. style="color: #0072eb;">{{item.tag+"、"}}</strong>{{item.content}}</button>
  90. </view>
  91. </label>
  92. </radio-group>
  93. </view>
  94. </template>
  95. <template v-if="scantron.questionType===4">
  96. <view>
  97. <l-divider color="#aaaa7f">
  98. </l-divider>
  99. </view>
  100. <view>
  101. <view>
  102. <view class="uni-textarea"
  103. style="border: #8c8c8c solid 2px;border-radius: 5px;height: 20vh;">
  104. <textarea @blur="radioAdd(null,null,scantron)"
  105. v-model="scantron.question.subjectiveAnswer"
  106. placeholder-style="color:#c7c7c7" placeholder="请输入答案" />
  107. </view>
  108. </view>
  109. </view>
  110. </template>
  111. <template v-if="scantron.questionType===5">
  112. <view>
  113. <l-divider color="#aaaa7f">
  114. </l-divider>
  115. </view>
  116. <view>
  117. <label v-for="(item, index) in scantron.question.answerList" :key="item.value">
  118. <view class="allceter"
  119. style="background-color: #e7f4ff; text-align: left;padding: 10px;margin-bottom: 10px;border: #2a7eeb solid 1px;border-radius: 5px;">
  120. <view style="display: inline-block;padding-left: 10px;">
  121. <strong style="font-size: 20px;color: #0072eb;">{{item.tag}}</strong>
  122. </view>
  123. <input @blur="radioAdd(item.blankcontent,item.tag,scantron)" class="uni-input"
  124. style="display: inline-block;background-color: white;" type="text"
  125. v-model="item.blankcontent" :placeholder="item.tag" />
  126. </view>
  127. </label>
  128. </view>
  129. </template>
  130. <template v-if="scantron.questionType===6">
  131. <view>
  132. <l-divider color="#aaaa7f">
  133. </l-divider>
  134. </view>
  135. <view class="" v-for="(combinationItem,index) in scantron.subQuestionList">
  136. <uni-card>
  137. <strong>{{scantron.questionIndex+'.'+combinationItem.questionIndex+'、'+combinationItem.questionTypeName}}</strong>
  138. <view :id="'combinationItemNodes'+index" style="height: 45vh;">
  139. <!-- <rich-text :nodes="combinationItem.question.content"></rich-text> -->
  140. </view>
  141. <template v-if="combinationItem.questionType===1||combinationItem.questionType===3">
  142. <view>
  143. <l-divider color="#aaaa7f">
  144. </l-divider>
  145. </view>
  146. <view>
  147. <radio-group>
  148. <label v-for="(item, index0) in combinationItem.question.answerList"
  149. :key="item">
  150. <view>
  151. <button @click="radioAdd(item,index0,scantron,combinationItem)"
  152. :style="'margin-top: 15px;padding-left:15px;font-size: 20px;text-align: left;background-color: '+(item.isRight?'#f9ea0d;':'#f0eff0')"><strong
  153. style="color: #0072eb;">{{item.tag+"、"}}</strong>{{item.content}}</button>
  154. </view>
  155. </label>
  156. </radio-group>
  157. </view>
  158. </template>
  159. <template v-if="combinationItem.questionType===2">
  160. <view>
  161. <l-divider color="#aaaa7f">
  162. </l-divider>
  163. </view>
  164. <view>
  165. <radio-group>
  166. <label v-for="(item, index) in combinationItem.question.answerList"
  167. :key="item.value">
  168. <view>
  169. <button
  170. @click="item.isRight=!item.isRight;radioAdd(item,index0,scantron,combinationItem);"
  171. :style="'margin-top: 15px;padding-left:15px;font-size: 20px;text-align: left;background-color: '+(item.isRight?'#f9ea0d;':'#f0eff0')"><strong
  172. style="color: #0072eb;">{{item.tag+"、"}}</strong>{{item.content}}</button>
  173. </view>
  174. </label>
  175. </radio-group>
  176. </view>
  177. </template>
  178. <template v-if="combinationItem.questionType===4">
  179. <view>
  180. <l-divider color="#aaaa7f">
  181. </l-divider>
  182. </view>
  183. <view>
  184. <view>
  185. <view class="uni-textarea"
  186. style="border: #8c8c8c solid 2px;border-radius: 5px;height: 20vh;">
  187. <textarea v-model="combinationItem.question.subjectiveAnswer"
  188. placeholder-style="color:#c7c7c7" placeholder="请输入答案" />
  189. </view>
  190. </view>
  191. </view>
  192. </template>
  193. <template v-if="combinationItem.questionType===5">
  194. <view>
  195. <l-divider color="#aaaa7f">
  196. </l-divider>
  197. </view>
  198. <view>
  199. <label v-for="(item, index) in combinationItem.question.answerList"
  200. :key="item.value">
  201. <view class="allceter"
  202. style="background-color: #e7f4ff; text-align: left;padding: 10px;margin-bottom: 10px;border: #2a7eeb solid 1px;border-radius: 5px;">
  203. <view style="display: inline-block;padding-left: 10px;">
  204. <strong
  205. style="font-size: 20px;color: #0072eb;">{{item.tag}}</strong>
  206. </view>
  207. <input
  208. @blur="radioAdd(item.blankcontent,item.tag,scantron,combinationItem)"
  209. class="uni-input"
  210. style="display: inline-block;background-color: white;"
  211. type="text" v-model="item.blankcontent"
  212. :placeholder="item.tag" />
  213. </view>
  214. </label>
  215. </view>
  216. </template>
  217. </uni-card>
  218. </view>
  219. </template>
  220. <template v-if="scantron.questionType===7">
  221. <button @click="restart">重置</button>
  222. <view>
  223. <l-divider color="#aaaa7f">
  224. </l-divider>
  225. </view>
  226. <view style="height: 600px;width: 800;background-color: #ffffff;">
  227. <movable-area
  228. :style="`height: 500px;width: 700px;background-color: #8c8c8c;margin: auto;background-image: url('${drag[this.scantron.questionIndex].background.url}');background-size:${drag[this.scantron.questionIndex].background.width}px ${drag[this.scantron.questionIndex].background.height}px;background-repeat: no-repeat;`">
  229. <!-- <rich-text :nodes="scantron.question.content"></rich-text> -->
  230. <!-- <img v-if="drag.background.url!==''" :style="`width:${drag.background.width} px;height:${drag.background.height} px;`" :src="drag.background.url"/> -->
  231. <template v-for="item in drag[this.scantron.questionIndex].answer">
  232. <view
  233. :style="`position: absolute;width: ${item.width}px;height: ${item.height}px;border:solid 1px black;left:${item.x}px;top:${item.y}px;`">
  234. </view>
  235. </template>
  236. <template v-for="item in drag[this.scantron.questionIndex].option">
  237. <movable-view v-if="mbvShow" :id="item.id" :disabled="!disabledDrag"
  238. :style="'width: '+item.width+'px;height: '+item.height+'px;background-color: '+item.backgroundColor+';'"
  239. direction="all" :x="item.x" :y="item.y" @mousedown="onMousedown(item)"
  240. @change="onChange">
  241. </movable-view>
  242. <movable-view v-if="!mbvShow" :id="item.id" :disabled="!disabledDrag"
  243. :style="'width: '+item.width+'px;height: '+item.height+'px;background-color: '+item.backgroundColor+';'"
  244. direction="all" :x="item.x" :y="item.y" @mousedown="onMousedown(item)"
  245. @change="onChange">
  246. </movable-view>
  247. </template>
  248. </movable-area>
  249. </view>
  250. </template>
  251. <template v-if="scantron.questionType===8">
  252. <view style="height: 5vh;">
  253. </view>
  254. <view>
  255. <l-divider color="#aaaa7f">
  256. </l-divider>
  257. </view>
  258. <view>
  259. <view
  260. style="height: 600px;width: 800px;background-color: #8c8c8c;margin: auto;padding-top: 50px;">
  261. <movable-area
  262. style="height: 550px;width: 700px;background-color: #f6f6f6;margin: auto;">
  263. <canvas canvas-id="lineCanvas" style="width: 700px; height: 500px;">
  264. <template v-for="(item,index) in connectionHtml">
  265. <view
  266. style="display: inline-block;margin-top: 30px;margin-left: 30px;margin-right: 70px;">
  267. <!-- <rich-text :nodes="item.innerHTML"></rich-text> -->
  268. <view v-for="(item0,index0) in item.children" :key="index">
  269. <view :id="'option'+index+'-'+(index0+1)"
  270. style="width: 90px;height: 100px;padding: 10px;padding-bottom:0 ;margin-bottom: 10px;border-radius: 5px;border: #007aff solid 1px;background-color: #e0eef9;overflow: hidden;">
  271. </view>
  272. </view>
  273. </view>
  274. </template>
  275. </canvas>
  276. </movable-area>
  277. </view>
  278. </view>
  279. </template>
  280. </uni-section>
  281. </scroll-view>
  282. </uni-card>
  283. </uni-col>
  284. <uni-col :span="4" style="margin-top: 30px">
  285. <uni-card style="height: 85vh;">
  286. <l-divider color="#8f960c" style="margin-top: 2%;">
  287. <view style="font-size: 1vw;">当前试卷时间</view>
  288. </l-divider>
  289. <view style="font-family: '微软雅黑', serif;color: #f90005;height: 4vh;text-align: center;padding:2%;">
  290. <strong style="font-size: 3vmin;">{{paperTime}}</strong>
  291. </view>
  292. <!-- <l-divider color="#8f960c">
  293. <view style="font-size: 2vmin;">考试时间</view>
  294. </l-divider>
  295. <view
  296. style="font-family: '微软雅黑', serif;font-size: 2vmin;color: #00aaf9;height: 30px;text-align: center;padding:10px;">
  297. 剩余:{{examTime}}
  298. </view> -->
  299. <l-divider color="#251e75">
  300. <view style="font-size: 2vmin;">答题卡</view>
  301. </l-divider>
  302. <view>
  303. <scroll-view scroll-y="true" style="height: 50vh;">
  304. <label v-for="(item, index) in examObject.answerCardList2" :key="item">
  305. <uni-section class="mb-10" :title="item.questionTypeName" type="line">
  306. <template v-for="sort in item.indexList">
  307. <view style="display: inline-block;margin-left: 5px;"
  308. @mousedown="radioScantron(sort)">
  309. <view>
  310. <button type="radio"
  311. :style="'width: 30px;height: 30px;padding:0px;color:#FFFFFF;font-size: 12px;text-align: center;background-color: '+(sort === scantron.questionIndex?'#b5aa09;':(this.examObject.userExamQuestionList[sort-1].question.isAnswer?'#18da59':'#007aff'))">{{sort}}</button>
  312. </view>
  313. <view>
  314. {{item.questionTypeName.replace("题","")}}
  315. </view>
  316. </view>
  317. </template>
  318. </uni-section>
  319. </label>
  320. </scroll-view>
  321. </view>
  322. <l-divider color="#251e75" />
  323. <view>
  324. <button type="primary" style="margin-top: 10px;font-size: 2vmin;"
  325. @click="previousQuestion">上一题</button>
  326. <button type="primary" style="margin-top: 10px;font-size: 2vmin;" @click="nextQuestion">下一题</button>
  327. </view>
  328. </uni-card>
  329. </uni-col>
  330. </uni-row>
  331. <uni-popup ref="message" type="message">
  332. <uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
  333. </uni-popup>
  334. <uni-popup ref="inputDialog" type="dialog">
  335. <uni-popup-dialog ref="inputClose" title="提交试卷" @confirm="dialogInputConfirm">
  336. <view>
  337. <view>1、提交当前试卷后不可再次作答</view>
  338. <view>2、本试卷剩余时间不计入下一套</view>
  339. <view>3、最终试卷提交将结束考试</view>
  340. <view style="text-align: center;">确认提交?</view>
  341. </view>
  342. </uni-popup-dialog>
  343. </uni-popup>
  344. <uni-popup ref="cheat" type="dialog">
  345. <uni-popup-dialog style="width: 50vh;" ref="inputClose" title="作弊提醒">
  346. <view style="color: red;">
  347. <view>1、鼠标请勿点击窗口之外的地方</view>
  348. <view>2、如果不小心退出全屏,请按F11恢复到全屏</view>
  349. <view>3、鼠标多次点击窗口之外的地方将按作弊处理</view>
  350. </view>
  351. </uni-popup-dialog>
  352. </uni-popup>
  353. <uni-popup ref="answerFinal" type="dialog">
  354. <uni-popup-dialog style="width: 50vh;" ref="inputClose" title="当前已经到最后一题">
  355. <view style="color: #0b0ba5 ;">
  356. <view>请检查是否存在漏答题目,检查无误后,请点击“<strong style="font-size: 20px;color: #f00004 ;">交卷</strong>”</view>
  357. </view>
  358. </uni-popup-dialog>
  359. </uni-popup>
  360. </template>
  361. <script>
  362. import {
  363. exit,
  364. request,
  365. getExamDetail,
  366. cacheExamAnswer,
  367. getCacheAnswer,
  368. submitExamPaper,
  369. getExamQueryById
  370. } from '../../examJs/examRequest';
  371. import screenfull from "screenfull";
  372. import {
  373. redirectTo,
  374. toLogin
  375. } from '../../examJs/examRoute';
  376. import {
  377. windowState
  378. } from '../../util/examStartUtil';
  379. export default {
  380. name: "examStart",
  381. data() {
  382. return {
  383. // 所有方块============拖拽
  384. drag: [],
  385. // 拖拽元素刷新
  386. mbvShow: true,
  387. // 拖拽的方块信息
  388. dragItem: {},
  389. // 拖拽位置记录
  390. subDrag: [],
  391. // 拖拽后动作未完成禁用
  392. disabledDrag: true,
  393. // ==================================
  394. // 连线===============================
  395. // 连线题内容页面展示
  396. connectionHtml: [],
  397. // 连线题中间存储
  398. connectionInfo: [],
  399. // 连线题连线内容保存
  400. connectionContentALL: [],
  401. // 连线绘制
  402. ctx: null,
  403. // 点击过程颜色
  404. clickColor: '0px 0px 5px 2px rgba(80, 85, 83, 0.7)',
  405. // 点击结束颜色
  406. connectionColor: ['#ffaa00', '#00ff7f', '#6ca7ff', '#1d00ff', '#aa00ff', '#ffff00', '#550000', '#ff0000'],
  407. // ==============================
  408. // 所有试卷和试题
  409. examObject: {},
  410. // 当前题目
  411. examTopic: {},
  412. // 答题卡
  413. scantron: '',
  414. //选项
  415. answer: {},
  416. typeThree: '',
  417. userExamAnswers: [],
  418. user: {},
  419. // 拖动监听测试
  420. b: true,
  421. canvasWidth: 300,
  422. canvasHeight: 300,
  423. // 用户当前考试
  424. userExamPaper: {},
  425. // 倒计时实际时间
  426. examPaperTime: 0,
  427. // 除当前试卷的其他时间
  428. papersTime: 0,
  429. // 倒计时试卷显示时间
  430. paperTime: '',
  431. // 倒计时考试显示时间
  432. examTime: '',
  433. // 倒计时函数
  434. intervalId: null,
  435. // 切屏记录========================
  436. windowCheat: 0,
  437. // 切屏状态
  438. cheat: null,
  439. // 消息弹窗记录=================
  440. msgType: 'success',
  441. messageText: '这是一条成功提示',
  442. };
  443. },
  444. methods: {
  445. // 页面刷新
  446. reload() {
  447. cacheExamAnswer({
  448. 'examAnswers': this.userExamAnswers,
  449. 'userExamId': sessionStorage.getItem('examId'),
  450. 'leaveTime': this.windowCheat,
  451. 'paperId': this.userExamPaper.paperId,
  452. 'limitTime': this.userExamPaper.limitTime
  453. }).then(data => {
  454. console.log(data);
  455. window.location.reload()
  456. })
  457. },
  458. // 消息提示
  459. messageToggle(type, message) {
  460. this.msgType = type
  461. this.messageText = message
  462. this.$refs.message.open()
  463. },
  464. // 弹窗内容
  465. dialogInputConfirm(val) {
  466. this.submitExam()
  467. },
  468. // 提交试卷弹窗提示打开
  469. subExam() {
  470. this.$refs.inputDialog.open()
  471. },
  472. // 提交试卷
  473. submitExam(ins) {
  474. console.log(ins);
  475. submitExamPaper({
  476. 'examAnswers': this.userExamAnswers,
  477. 'userExamId': sessionStorage.getItem('examId'),
  478. 'paperId': this.userExamPaper.paperId,
  479. }).then(data => {
  480. if (data.data.result !== null && data.data.success) {
  481. if (ins !== 0 && ins !== 'cheat') {
  482. this.messageToggle('success', "本试卷提交成功,即将开始下一张试卷······")
  483. }
  484. this.userExamAnswers = []
  485. clearInterval(this.intervalId);
  486. this.examObject = data.data.result
  487. this.scantron = this.examObject.userExamQuestionList[0]
  488. this.userExamPaper = this.examObject.userExamPapersList[0]
  489. this.examPaperTime = this.addExamPaperTime(new Date(this.userExamPaper.systemTime),
  490. new Date(this
  491. .userExamPaper.limitTime))
  492. // 试卷计时
  493. this.papersTime = this.examPapersTime()
  494. this.intervalId = setInterval(this.updateCountDown, 1000);
  495. this.examTime = this.paperTime
  496. } else {
  497. if (ins === 'cheat') {
  498. this.messageToggle('error', "多次切屏,考试强行终止")
  499. } else if (ins !== 0) {
  500. this.messageToggle('success', "考试已结束,即将退出!")
  501. } else {
  502. this.messageToggle('warn', "时间已到,已为您自动交卷")
  503. }
  504. setTimeout(() => {
  505. screenfull.exit();
  506. window.removeEventListener('blur', this.handleBlur);
  507. window.removeEventListener('focus', this.handleFocus);
  508. exit()
  509. }, 2000)
  510. }
  511. if (data.data.result !== null && data.data.success && ins === 'cheat') {
  512. this.handleBlur(0)
  513. }
  514. })
  515. },
  516. // 重置
  517. restart() {
  518. this.disabledDrag = true
  519. this.drag[this.scantron.questionIndex].answer = []
  520. this.drag[this.scantron.questionIndex].option = []
  521. let content = this.stringToHTML(this.scantron.question.content)
  522. console.log(content);
  523. for (var i = 0; i < content.children.length; i++) {
  524. let thisTop = content.children[i].style.top.toString().replace("px", "")
  525. let thisLeft = content.children[i].style.left.toString().replace("px", "")
  526. let thisWidth = content.children[i].style.width.toString().replace("px", "")
  527. let thisHeight = content.children[i].style.height.toString().replace("px", "")
  528. let thisBackgroundColor = content.children[i].style.backgroundColor
  529. let thisInnerHTML = content.children[i].innerHTML
  530. if (content.children[i].id.includes("option")) {
  531. this.drag[this.scantron.questionIndex].option.push({
  532. id: content.children[i].id,
  533. x: Number(thisLeft),
  534. y: Number(thisTop),
  535. old: {
  536. x: 0,
  537. y: 0,
  538. ax: Number(thisLeft),
  539. by: Number(thisTop)
  540. },
  541. // 只添加一次拖拽监听
  542. b: true,
  543. width: thisWidth,
  544. height: thisHeight,
  545. backgroundColor: thisBackgroundColor,
  546. innerHTML: thisInnerHTML
  547. })
  548. }
  549. if (content.children[i].id.includes("answer")) {
  550. this.drag[this.scantron.questionIndex].answer.push({
  551. id: content.children[i].id,
  552. x: Number(thisLeft),
  553. y: Number(thisTop),
  554. old: {
  555. x: 0,
  556. y: 0
  557. },
  558. width: thisWidth,
  559. height: thisHeight,
  560. backgroundColor: thisBackgroundColor
  561. })
  562. }
  563. }
  564. },
  565. // 上一题目
  566. previousQuestion() {
  567. if (this.scantron.questionIndex > 1) {
  568. this.radioScantron(this.scantron.questionIndex - 1)
  569. }
  570. },
  571. // 下一题目
  572. nextQuestion() {
  573. if (this.scantron.questionIndex < this.examObject.userExamQuestionList.length) {
  574. // this.scantron = this.examObject.userExamQuestionList[this.scantron.questionIndex]
  575. this.radioScantron(this.scantron.questionIndex + 1)
  576. } else {
  577. this.$refs.answerFinal.open()
  578. }
  579. },
  580. // 答题卡单击题目
  581. radioScantron(value) {
  582. screenfull.request()
  583. this.scantron = this.examObject.userExamQuestionList[value - 1]
  584. if (this.scantron.questionType !== 7 && this.scantron.questionType !== 8) {
  585. document.getElementById('scantronNodes').innerHTML = this.scantron.question.content
  586. } else {
  587. console.log(this.scantron.question.content.split('%||||||||%')[0]);
  588. document.getElementById('scantronNodes').innerHTML = this.scantron.question.content.split(
  589. '%||||||||%')[0]
  590. }
  591. let combination = setInterval(() => {
  592. if (this.scantron.questionType == 6) {
  593. for (var i = 0; i < this.scantron.subQuestionList.length; i++) {
  594. if (document.getElementById('combinationItemNodes' + i) === null) {
  595. console.log("加载中");
  596. break;
  597. }
  598. document.getElementById('combinationItemNodes' + i).innerHTML = this.scantron
  599. .subQuestionList[i].question.content
  600. }
  601. clearInterval(combination);
  602. }
  603. }, 10)
  604. cacheExamAnswer({
  605. 'examAnswers': this.userExamAnswers,
  606. 'userExamId': sessionStorage.getItem('examId'),
  607. 'leaveTime': this.windowCheat,
  608. 'paperId': this.userExamPaper.paperId,
  609. 'limitTime': this.userExamPaper.limitTime
  610. })
  611. // 拖拽加载
  612. if (this.scantron.questionType == 7) {
  613. this.mbvShow = !this.mbvShow
  614. this.disabledDrag = true
  615. console.log(this.drag[8]);
  616. console.log(this.scantron.questionIndex);
  617. if (this.drag[Number(this.scantron.questionIndex)] !== undefined) {
  618. setTimeout(() => {
  619. for (var i = 0; i < this.drag[this.scantron.questionIndex].option.length; i++) {
  620. let drags = this.drag[this.scantron.questionIndex].option[i]
  621. console.log(document.getElementById(drags.id));
  622. document.getElementById(drags.id).innerHTML = drags.innerHTML
  623. }
  624. }, 10)
  625. return
  626. }
  627. this.drag[this.scantron.questionIndex] = {}
  628. this.drag[this.scantron.questionIndex].answer = []
  629. this.drag[this.scantron.questionIndex].option = []
  630. this.drag[this.scantron.questionIndex].background = {}
  631. let content = this.stringToHTML(this.scantron.question.content)
  632. for (var i = 0; i < content.children.length; i++) {
  633. let thisTop = content.children[i].style.top.toString().replace("px", "")
  634. let thisLeft = content.children[i].style.left.toString().replace("px", "")
  635. let thisWidth = content.children[i].style.width.toString().replace("px", "")
  636. let thisHeight = content.children[i].style.height.toString().replace("px", "")
  637. let thisBackgroundColor = content.children[i].style.backgroundColor
  638. let thisInnerHTML = content.children[i].innerHTML
  639. if (content.children[i].id.includes("option")) {
  640. this.drag[this.scantron.questionIndex].option.push({
  641. id: content.children[i].id,
  642. x: Number(thisLeft),
  643. y: Number(thisTop),
  644. old: {
  645. x: 0,
  646. y: 0,
  647. ax: Number(thisLeft),
  648. by: Number(thisTop)
  649. },
  650. // 只添加一次拖拽监听
  651. b: true,
  652. width: thisWidth,
  653. height: thisHeight,
  654. backgroundColor: thisBackgroundColor,
  655. innerHTML: thisInnerHTML
  656. })
  657. }
  658. if (content.children[i].id.includes("answer")) {
  659. this.drag[this.scantron.questionIndex].answer.push({
  660. id: content.children[i].id,
  661. x: Number(thisLeft),
  662. y: Number(thisTop),
  663. old: {
  664. x: 0,
  665. y: 0
  666. },
  667. width: thisWidth,
  668. height: thisHeight,
  669. backgroundColor: thisBackgroundColor
  670. })
  671. }
  672. if (content.children[i].tagName === 'IMG') {
  673. this.drag[this.scantron.questionIndex].background.url = content.children[i].src
  674. this.drag[this.scantron.questionIndex].background.width = content.children[i].style.width.toString()
  675. .replace("px", "")
  676. this.drag[this.scantron.questionIndex].background.height = content.children[i].style.height.toString()
  677. .replace("px", "")
  678. }
  679. }
  680. console.log(this.drag[this.scantron.questionIndex].option.length);
  681. setTimeout(() => {
  682. for (var i = 0; i < this.drag[this.scantron.questionIndex].option.length; i++) {
  683. let drags = this.drag[this.scantron.questionIndex].option[i]
  684. console.log(document.getElementById(drags.id));
  685. document.getElementById(drags.id).innerHTML = drags.innerHTML
  686. }
  687. }, 10)
  688. }
  689. // 连线题添加监听
  690. if (this.scantron.questionType == 8) {
  691. this.connectionHtml = []
  692. let content = this.stringToHTML(this.scantron.question.content)
  693. for (var i = 0; i < content.children.length; i++) {
  694. let child = content.children[i]
  695. for (var j = 0; j < child.children.length; j++) {
  696. if (child.children[j].id !== undefined && child.children[j].id.includes("option")) {
  697. this.connectionHtml.push(child.children[j])
  698. }
  699. }
  700. }
  701. if (this.connectionContentALL[value] === undefined) {
  702. this.connectionContentALL[value] = []
  703. }
  704. this.connectionInfo = []
  705. setTimeout(() => {
  706. // 画内容
  707. this.drawLineWriteContent()
  708. // 画缓存线
  709. this.drawLineWrite(value)
  710. }, 100)
  711. for (var i = 0; i < this.connectionHtml.length; i++) {
  712. let option = this.connectionHtml[i]
  713. for (var j = 0; j < option.children.length; j++) {
  714. let ids = "option" + i + "-" + (j + 1)
  715. if (document.getElementById(ids) === null) {
  716. setTimeout(() => {
  717. let optionCol = document.getElementById(ids)
  718. optionCol.addEventListener("mousedown", (event) => {
  719. console.log(event);
  720. let id = event.currentTarget.id
  721. console.log(id);
  722. let colId = Number(id.replace('option', '').split('-')[0])
  723. let rowId = Number(id.replace('option', '').split('-')[1])
  724. let left = event.target.offsetLeft
  725. let right = Number(event.target.offsetLeft + event.target
  726. .offsetWidth)
  727. let top = Number(event.target.offsetTop + event.target
  728. .offsetHeight / 2)
  729. if (this.connectionInfo.length === this.connectionHtml.length &&
  730. colId === 0) {
  731. this.connectionContentALL[this.scantron.questionIndex].push(this
  732. .connectionInfo)
  733. this.radioAdd(this.connectionInfo, this
  734. .connectionInfo[0].id.replace('option', '').split('-')[
  735. 1], this.scantron)
  736. this.connectionInfo = []
  737. }
  738. console.log(this.connectionContentALL);
  739. console.log(this.scantron.questionIndex);
  740. let arr = []
  741. for (var i = 0; i < this.connectionContentALL[this.scantron.questionIndex]
  742. .length; i++) {
  743. let all = this.connectionContentALL[this.scantron.questionIndex][i]
  744. if (all[0].id !== id) {
  745. arr.push(this.connectionContentALL[this.scantron.questionIndex][i])
  746. }
  747. }
  748. this.connectionContentALL[this.scantron.questionIndex] = arr
  749. let infoLength = this.connectionInfo.length
  750. if (infoLength <= this.connectionHtml.length) {
  751. if (infoLength !== 0) {
  752. if (!this.isLine(id, this.scantron.questionIndex)) {
  753. this.messageToggle('error', "这个已经连过了")
  754. this.drawLineWrite(this.scantron.questionIndex)
  755. return
  756. }
  757. let last = this.connectionInfo[infoLength -
  758. 1]
  759. let lastId = Number(last.id.replace('option', '').split(
  760. '-')[0])
  761. if (lastId + 1 === colId) {
  762. this.connectionInfo.push({
  763. 'id': id,
  764. 'left': left,
  765. 'right': right,
  766. 'top': top
  767. })
  768. }
  769. if (lastId === colId && colId !== this.connectionHtml
  770. .length - 1) {
  771. this.connectionInfo[infoLength - 1] = {
  772. 'id': id,
  773. 'left': left,
  774. 'right': right,
  775. 'top': top
  776. }
  777. document.getElementById(ids).style.boxShadow = this
  778. .clickColor
  779. if (Number(last.id.replace('option', '').split(
  780. '-')[1]) === rowId &&
  781. this.connectionInfo.length === this.connectionHtml
  782. .length) {
  783. this.connectionContentALL[this.scantron.questionIndex].push(
  784. this.connectionInfo)
  785. console.log(this.connectionContentALL[this.scantron.questionIndex]);
  786. this.radioAdd(this.connectionInfo, this
  787. .connectionInfo[0].id.replace('option', '')
  788. .split('-')[1], this.scantron)
  789. this.connectionInfo = []
  790. }
  791. } else if (colId === this.connectionHtml.length - 1) {
  792. this.connectionContentALL[this.scantron.questionIndex].push(
  793. this.connectionInfo)
  794. this.radioAdd(this.connectionInfo, this
  795. .connectionInfo[0].id.replace('option', '')
  796. .split('-')[1], this.scantron)
  797. this.connectionInfo = []
  798. }
  799. } else if (infoLength === 0) {
  800. if (colId === 0) {
  801. this.connectionInfo.push({
  802. 'id': id,
  803. 'left': left,
  804. 'right': right,
  805. 'top': top
  806. })
  807. console.log(document.getElementById(id + ''));
  808. document.getElementById(id + '').style.boxShadow = this
  809. .clickColor
  810. console.log(document.getElementById(id));
  811. }
  812. }
  813. }
  814. this.shadowClean()
  815. this.drawLineWrite(this.scantron.questionIndex)
  816. })
  817. }, 10)
  818. } else {
  819. setTimeout(() => {
  820. this.shadowClean()
  821. }, 10)
  822. }
  823. }
  824. }
  825. }
  826. },
  827. // 连线绘制
  828. drawLine(x1, y1, x2, y2, index) {
  829. this.ctx = uni.createCanvasContext('lineCanvas');
  830. this.ctx.beginPath();
  831. let color = this.connectionColor[index]
  832. if (index === -1) {
  833. color = '#000000'
  834. this.ctx.shadowColor = 'red';
  835. // 设置阴影的模糊级别
  836. this.ctx.setshadowBlur = 100;
  837. // 设置阴影的水平偏移
  838. this.ctx.shadowOffsetX = 1;
  839. // 设置阴影的垂直偏移
  840. this.ctx.shadowOffsetY = 1;
  841. } else {
  842. this.ctx.shadowColor = '#000000';
  843. this.ctx.setshadowBlur = 0;
  844. this.ctx.shadowOffsetX = 0;
  845. this.ctx.shadowOffsetY = 0;
  846. }
  847. this.ctx.setStrokeStyle(color)
  848. this.ctx.lineWidth = 3
  849. this.ctx.moveTo(x1, y1); // 开始点
  850. this.ctx.lineTo(x2, y2); // 结束点
  851. this.ctx.stroke(); // 绘制线条
  852. this.ctx.draw(true);
  853. },
  854. // 连线清理
  855. clearRect() {
  856. const canvas = uni.createCanvasContext('lineCanvas');
  857. // 使用clearRect方法清空整个画布
  858. canvas.clearRect(0, 0, 700, 500); // 这里的300x300是画布的宽高,应该与你的实际画布尺寸相匹配
  859. canvas.draw(true); // 调用draw方法将清空操作应用到画布上
  860. },
  861. // 阴影清理
  862. shadowClean() {
  863. for (var i = 0; i < this.connectionHtml.length; i++) {
  864. let option = this.connectionHtml[i]
  865. for (var j = 0; j < option.children.length; j++) {
  866. let ids = "option" + i + "-" + (j + 1)
  867. document.getElementById(ids).style.boxShadow = ''
  868. }
  869. }
  870. },
  871. isLine(id, value) {
  872. for (var i = 0; i < this.connectionContentALL[value].length; i++) {
  873. let option = this.connectionContentALL[value][i]
  874. for (var j = 0; j < option.length; j++) {
  875. let oldId = option[j].id
  876. if (oldId === id) {
  877. return false
  878. }
  879. }
  880. }
  881. return true
  882. },
  883. // 连线题画内容
  884. drawLineWriteContent() {
  885. for (var i = 0; i < this.connectionHtml.length; i++) {
  886. let option = this.connectionHtml[i]
  887. for (var j = 0; j < option.children.length; j++) {
  888. let ids = "option" + i + "-" + (j + 1)
  889. document.getElementById(ids).innerHTML = option.children[j].innerHTML
  890. }
  891. }
  892. }, // 连线画线
  893. drawLineWrite(value) {
  894. this.clearRect()
  895. if (this.connectionInfo.length >= 2) {
  896. for (var i = 0; i < this.connectionInfo.length - 1; i++) {
  897. let one = this.connectionInfo[i]
  898. let two = this.connectionInfo[i + 1]
  899. // box-shadow: ;
  900. document.getElementById(one.id).style.boxShadow = this.clickColor
  901. document.getElementById(two.id).style.boxShadow = this.clickColor
  902. this.drawLine(one.right, one.top, two.left, two.top, -1)
  903. }
  904. } else if (this.connectionInfo.length === 1) {
  905. document.getElementById(this.connectionInfo[0].id).style.boxShadow = this.clickColor
  906. }
  907. for (var i = 0; i < this.connectionContentALL[value].length; i++) {
  908. let option = this.connectionContentALL[value][i]
  909. for (var j = 0; j < option.length - 1; j++) {
  910. let one = option[j]
  911. let two = option[j + 1]
  912. document.getElementById(one.id).style.boxShadow = '0px 0px 5px 2px ' + this.connectionColor[i]
  913. document.getElementById(two.id).style.boxShadow = '0px 0px 5px 2px ' + this.connectionColor[i]
  914. this.drawLine(one.right, one.top, two.left, two.top, i)
  915. }
  916. }
  917. },
  918. // 字符转换html对象
  919. stringToHTML(str) {
  920. var dom = document.createElement('div');
  921. dom.innerHTML = str;
  922. return dom;
  923. },
  924. // 拖动位置固定
  925. tap(index, subX, subY) {
  926. let x = subX
  927. let y = subY
  928. this.drag[this.scantron.questionIndex].option[index].x = this.drag[this.scantron.questionIndex].option[index].old.x
  929. this.drag[this.scantron.questionIndex].option[index].y = this.drag[this.scantron.questionIndex].option[index].old.y
  930. this.$nextTick(function() {
  931. this.drag[this.scantron.questionIndex].option[index].x = x
  932. this.drag[this.scantron.questionIndex].option[index].y = y
  933. })
  934. },
  935. // 鼠标按下
  936. onMousedown(item) {
  937. console.log(this.drag[this.scantron.questionIndex].option.length);
  938. this.dragItem = item;
  939. },
  940. // 拖动监听
  941. onChange: function(e) {
  942. if (!this.disabledDrag) {
  943. return
  944. }
  945. let index = -1
  946. for (var j = 0; j < this.drag[this.scantron.questionIndex].option.length; j++) {
  947. let option = this.drag[this.scantron.questionIndex].option[j]
  948. if (option.id === this.dragItem.id) {
  949. index = j
  950. break;
  951. }
  952. }
  953. this.drag[this.scantron.questionIndex].option[index].old.x = e.detail.x
  954. this.drag[this.scantron.questionIndex].option[index].old.y = e.detail.y
  955. let asda = (event) => {
  956. document.removeEventListener('mouseup', asda)
  957. this.disabledDrag = false
  958. let dragOne;
  959. let bxs = true
  960. // 处理鼠标抬起事件
  961. for (var i = 0; i < this.drag[this.scantron.questionIndex].answer.length; i++) {
  962. let drag = this.drag[this.scantron.questionIndex].answer[i]
  963. let x = drag.x
  964. let y = drag.y
  965. if (
  966. (Number(this.drag[this.scantron.questionIndex].option[index].old.x) <= (Number(drag.x) + Number(
  967. drag
  968. .width))) &&
  969. (Number(this.drag[this.scantron.questionIndex].option[index].old.x) + Number(this.drag[this.scantron.questionIndex].option[index]
  970. .width)) >= drag.x &&
  971. (Number(this.drag[this.scantron.questionIndex].option[index].old.y) <= (Number(drag.y) + Number(
  972. drag
  973. .height))) &&
  974. (Number(this.drag[this.scantron.questionIndex].option[index].old.y) + Number(this.drag[this.scantron.questionIndex].option[index]
  975. .height)) >= drag.y
  976. ) {
  977. for (var p = 0; p < this.drag[this.scantron.questionIndex].answer.length; p++) {
  978. if (this.drag[this.scantron.questionIndex].answer[p].op !== undefined && this.drag[this.scantron.questionIndex].answer[p].op === index) {
  979. this.drag[this.scantron.questionIndex].answer[p].op = undefined
  980. }
  981. }
  982. if (this.drag[this.scantron.questionIndex].answer[i].op !== undefined) {
  983. this.tap(this.drag[this.scantron.questionIndex].answer[i].op, this.drag[this.scantron.questionIndex]
  984. .option[this.drag[this.scantron.questionIndex].answer[i].op].old.ax, this.drag[this.scantron.questionIndex]
  985. .option[this.drag[this.scantron.questionIndex].answer[i].op].old.by);
  986. this.drag[this.scantron.questionIndex].answer[i].op = index
  987. } else {
  988. this.drag[this.scantron.questionIndex].answer[i].op = index
  989. }
  990. this.tap(index, x, y);
  991. dragOne = drag
  992. bxs = false
  993. break;
  994. }
  995. }
  996. // console.log(this.drag[this.scantron.questionIndex].option[index]);
  997. if (bxs) {
  998. this.tap(index, this.drag[this.scantron.questionIndex].option[index].old.ax, this.drag[this.scantron.questionIndex].option[index].old.by);
  999. }
  1000. setTimeout(() => {
  1001. if (dragOne !== undefined) {
  1002. this.radioAdd(this.dragItem, dragOne.id.replace("answer", ""), this.scantron)
  1003. }
  1004. this.disabledDrag = true
  1005. }, 700)
  1006. }
  1007. // if (this.drag[this.scantron.questionIndex].option[index].b) {
  1008. // this.drag[this.scantron.questionIndex].option[index].b = false
  1009. document.addEventListener('mouseup', asda);
  1010. // }
  1011. },
  1012. //缓存答案读取
  1013. answerDisplay(data) {
  1014. this.windowCheat = Number(data.leaveTime)
  1015. this.userExamAnswers = data.examAnswers
  1016. let examAnswers = data.examAnswers
  1017. for (var i = 0; i < examAnswers.length; i++) {
  1018. let scantron = examAnswers[i]
  1019. let index = Number(scantron.index)
  1020. if (scantron.index.includes('.')) {
  1021. let parentIndex = Number(scantron.index.split('.')[0])
  1022. let childIndex = scantron.index.split('.')[1]
  1023. let childSubject = this.examObject.userExamQuestionList[parentIndex - 1].subQuestionList[
  1024. childIndex]
  1025. console.log(childSubject);
  1026. } else if (scantron.questionType === 1 || scantron.questionType === 3) {
  1027. console.log(this.examObject.userExamQuestionList[index - 1]);
  1028. this.examObject.userExamQuestionList[index - 1].question.isAnswer = true
  1029. this.examObject.userExamQuestionList[index - 1].question.answerList[Number(scantron.answerIndex[
  1030. 0])]
  1031. .isRight = true
  1032. } else if (scantron.questionType === 2) {
  1033. this.examObject.userExamQuestionList[index - 1].question.isAnswer = true
  1034. for (var j = 0; j < scantron.answerIndex.length; j++) {
  1035. this.examObject.userExamQuestionList[index - 1].question.answerList[Number(scantron
  1036. .answerIndex[j])].isRight = true
  1037. }
  1038. } else if (scantron.questionType === 4) {
  1039. this.examObject.userExamQuestionList[index - 1].question.isAnswer = true
  1040. this.examObject.userExamQuestionList[index - 1].question.subjectiveAnswer = scantron
  1041. .subjectiveAnswer
  1042. } else if (scantron.questionType === 5) {
  1043. this.examObject.userExamQuestionList[index - 1].question.isAnswer = true
  1044. let blankAnswer = JSON.parse(scantron.blankAnswer)
  1045. for (var k = 0; k < blankAnswer.length; k++) {
  1046. for (var j = 0; j < this.examObject.userExamQuestionList[index - 1].question.answerList
  1047. .length; j++) {
  1048. if (this.examObject.userExamQuestionList[index - 1].question.answerList[j].tag ===
  1049. blankAnswer[k].tag) {
  1050. this.examObject.userExamQuestionList[index - 1].question.answerList[j].blankcontent =
  1051. blankAnswer[k].content
  1052. }
  1053. }
  1054. }
  1055. } else if (scantron.questionType === 7) {
  1056. this.examObject.userExamQuestionList[index - 1].question.isAnswer = true
  1057. let blankAnswer = JSON.parse(scantron.blankAnswer)
  1058. for (var k = 0; k < blankAnswer.length; k++) {
  1059. for (var j = 0; j < this.examObject.userExamQuestionList[index - 1].question.answerList
  1060. .length; j++) {
  1061. if (this.examObject.userExamQuestionList[index - 1].question.answerList[j].tag ===
  1062. blankAnswer[k].tag) {
  1063. this.examObject.userExamQuestionList[index - 1].question.answerList[j].blankcontent =
  1064. blankAnswer[k].content
  1065. }
  1066. }
  1067. }
  1068. this.drag[index] = JSON.parse(scantron.coordinates)
  1069. } else if (scantron.questionType === 8) {
  1070. console.log(scantron);
  1071. this.examObject.userExamQuestionList[index - 1].question.isAnswer = true
  1072. let blankAnswer = JSON.parse(scantron.blankAnswer)
  1073. for (var k = 0; k < blankAnswer.length; k++) {
  1074. for (var j = 0; j < this.examObject.userExamQuestionList[index - 1].question.answerList
  1075. .length; j++) {
  1076. if (this.examObject.userExamQuestionList[index - 1].question.answerList[j].tag ===
  1077. blankAnswer[k].tag) {
  1078. this.examObject.userExamQuestionList[index - 1].question.answerList[j].blankcontent =
  1079. blankAnswer[k].content
  1080. }
  1081. }
  1082. }
  1083. this.connectionContentALL[index] = JSON.parse(scantron.coordinates)
  1084. }
  1085. }
  1086. },
  1087. // 题目做答
  1088. radioAdd(value, index, scantron, combinationItem) {
  1089. index = index + ''
  1090. let qIndex = scantron.questionIndex + ""
  1091. let arr = []
  1092. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer = true
  1093. if (scantron.questionType === 1 || scantron.questionType === 3) {
  1094. for (var i = 0; i < scantron.question.answerList.length; i++) {
  1095. scantron.question.answerList[i].isRight = false
  1096. }
  1097. scantron.question.answerList[index].isRight = true
  1098. for (var i = 0; i < this.userExamAnswers.length; i++) {
  1099. if (this.userExamAnswers[i].index !== qIndex) {
  1100. arr.push(this.userExamAnswers[i])
  1101. }
  1102. }
  1103. arr.push({
  1104. answerIndex: [index],
  1105. answers: [value.id],
  1106. index: qIndex,
  1107. questionType: scantron.questionType
  1108. })
  1109. } else if (scantron.questionType === 2) {
  1110. let b = true
  1111. for (var i = 0; i < this.userExamAnswers.length; i++) {
  1112. if (this.userExamAnswers[i].index !== qIndex) {
  1113. arr.push(this.userExamAnswers[i])
  1114. } else {
  1115. b = false
  1116. let bc = true
  1117. let arrAnswer = []
  1118. let arrAnswerId = []
  1119. let num = this.userExamAnswers[i].answers.length;
  1120. for (var j = 0; j < num; j++) {
  1121. if (this.userExamAnswers[i].answerIndex[j] !== index) {
  1122. arrAnswer.push(this.userExamAnswers[i].answerIndex[j])
  1123. arrAnswerId.push(this.userExamAnswers[i].answers[j])
  1124. } else {
  1125. if (!value.isRight) {
  1126. bc = false
  1127. }
  1128. }
  1129. }
  1130. if (bc) {
  1131. arrAnswer.push(index)
  1132. arrAnswerId.push(value.id)
  1133. }
  1134. if (arrAnswer.length !== 0) {
  1135. arr.push({
  1136. answerIndex: arrAnswer,
  1137. answers: arrAnswerId,
  1138. index: qIndex,
  1139. questionType: scantron.questionType
  1140. })
  1141. } else {
  1142. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer = false
  1143. }
  1144. }
  1145. }
  1146. if (b) {
  1147. arr.push({
  1148. answerIndex: [index],
  1149. answers: [value.id],
  1150. index: qIndex,
  1151. questionType: scantron.questionType
  1152. })
  1153. }
  1154. } else if (scantron.questionType === 4) {
  1155. for (var i = 0; i < this.userExamAnswers.length; i++) {
  1156. if (this.userExamAnswers[i].index !== qIndex) {
  1157. arr.push(this.userExamAnswers[i])
  1158. }
  1159. }
  1160. if (scantron.question.subjectiveAnswer === null || scantron.question.subjectiveAnswer === "") {
  1161. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer = false
  1162. }
  1163. arr.push({
  1164. subjectiveAnswer: scantron.question.subjectiveAnswer,
  1165. index: qIndex,
  1166. questionType: scantron.questionType
  1167. })
  1168. } else if (scantron.questionType === 5) {
  1169. if (value === undefined) {
  1170. return
  1171. }
  1172. let b = true
  1173. for (var i = 0; i < this.userExamAnswers.length; i++) {
  1174. if (this.userExamAnswers[i].index !== qIndex) {
  1175. arr.push(this.userExamAnswers[i])
  1176. } else {
  1177. b = false
  1178. let bc = true
  1179. let arrAnswer = []
  1180. let blankAnswer = JSON.parse(this.userExamAnswers[i].blankAnswer)
  1181. let num = blankAnswer.length;
  1182. for (var j = 0; j < num; j++) {
  1183. if (blankAnswer[j].tag !== index) {
  1184. arrAnswer.push({
  1185. tag: blankAnswer[j].tag,
  1186. content: blankAnswer[j].content
  1187. })
  1188. } else {
  1189. bc = false
  1190. }
  1191. }
  1192. if (bc) {
  1193. arrAnswer.push({
  1194. tag: index,
  1195. content: value
  1196. })
  1197. }
  1198. if (arrAnswer.length !== 0) {
  1199. arr.push({
  1200. blankAnswer: JSON.stringify(arrAnswer),
  1201. index: qIndex,
  1202. questionType: scantron.questionType
  1203. })
  1204. } else {
  1205. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer = false
  1206. }
  1207. }
  1208. }
  1209. if (b) {
  1210. if (value === null || value === "") {
  1211. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer = false
  1212. }
  1213. arr.push({
  1214. blankAnswer: JSON.stringify([{
  1215. tag: index,
  1216. content: value
  1217. }]),
  1218. index: qIndex,
  1219. questionType: scantron.questionType
  1220. })
  1221. }
  1222. } else if (scantron.questionType === 6) {
  1223. qIndex = qIndex + "." + combinationItem.sort
  1224. if (combinationItem.questionType === 1 || combinationItem.questionType ===
  1225. 3) {
  1226. for (var j = 0; j < combinationItem.question.answerList.length; j++) {
  1227. combinationItem.question.answerList[j].isRight = false
  1228. }
  1229. combinationItem.question.answerList[index].isRight = true
  1230. for (var j = 0; j < this.userExamAnswers.length; j++) {
  1231. if (this.userExamAnswers[j].index !== qIndex) {
  1232. arr.push(this.userExamAnswers[j])
  1233. }
  1234. }
  1235. arr.push({
  1236. answerIndex: [index],
  1237. answers: [value.id],
  1238. index: qIndex,
  1239. questionType: combinationItem.questionType
  1240. })
  1241. } else if (combinationItem.questionType === 2) {
  1242. let b = true
  1243. for (var j = 0; j < this.userExamAnswers.length; j++) {
  1244. if (this.userExamAnswers[j].index !== qIndex) {
  1245. arr.push(this.userExamAnswers[j])
  1246. } else {
  1247. b = false
  1248. let bca = true
  1249. let arrAnswer = []
  1250. let arrAnswerId = []
  1251. let num = this.userExamAnswers[j].answers.length;
  1252. for (var k = 0; k < num; k++) {
  1253. if (this.userExamAnswers[j].answerIndex[k] !== index) {
  1254. arrAnswer.push(this.userExamAnswers[j].answerIndex[k])
  1255. arrAnswerId.push(this.userExamAnswers[j].answers[k])
  1256. } else {
  1257. if (!value.isRight) {
  1258. bca = false
  1259. }
  1260. }
  1261. }
  1262. if (bca) {
  1263. arrAnswer.push(index)
  1264. arrAnswerId.push(value.id)
  1265. }
  1266. if (arrAnswer.length !== 0) {
  1267. arr.push({
  1268. answerIndex: arrAnswer,
  1269. answers: arrAnswerId,
  1270. index: qIndex,
  1271. questionType: combinationItem.questionType
  1272. })
  1273. } else {
  1274. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question
  1275. .isAnswer =
  1276. false
  1277. }
  1278. }
  1279. }
  1280. if (b) {
  1281. arr.push({
  1282. answerIndex: [index],
  1283. answers: [value.id],
  1284. index: qIndex,
  1285. questionType: combinationItem.questionType
  1286. })
  1287. }
  1288. } else if (combinationItem.questionType === 4) {
  1289. for (var j = 0; j < this.userExamAnswers.length; j++) {
  1290. if (this.userExamAnswers[j].index !== qIndex) {
  1291. arr.push(this.userExamAnswers[j])
  1292. }
  1293. }
  1294. if (combinationItem.question.subjectiveAnswer === null || scantron.subQuestionList[
  1295. i].question.subjectiveAnswer === "") {
  1296. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer = false
  1297. }
  1298. arr.push({
  1299. subjectiveAnswer: combinationItem.question.subjectiveAnswer,
  1300. index: qIndex,
  1301. questionType: combinationItem.questionType
  1302. })
  1303. } else if (combinationItem.questionType === 5) {
  1304. if (value === undefined) {
  1305. return
  1306. }
  1307. let b = true
  1308. for (var j = 0; j < this.userExamAnswers.length; j++) {
  1309. if (this.userExamAnswers[j].index !== qIndex) {
  1310. arr.push(this.userExamAnswers[j])
  1311. } else {
  1312. b = false
  1313. let bc = true
  1314. let arrAnswer = []
  1315. let blankAnswer = JSON.parse(this.userExamAnswers[j].blankAnswer)
  1316. let num = blankAnswer.length;
  1317. for (var q = 0; q < num; q++) {
  1318. if (blankAnswer[q].tag !== index) {
  1319. arrAnswer.push({
  1320. tag: blankAnswer[q].tag,
  1321. content: blankAnswer[q].content
  1322. })
  1323. } else {
  1324. bc = false
  1325. }
  1326. }
  1327. if (bc) {
  1328. arrAnswer.push({
  1329. tag: index,
  1330. content: value
  1331. })
  1332. }
  1333. if (arrAnswer.length !== 0) {
  1334. arr.push({
  1335. blankAnswer: JSON.stringify(arrAnswer),
  1336. index: qIndex,
  1337. questionType: scantron.subQuestionList[i].questionType
  1338. })
  1339. } else {
  1340. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question
  1341. .isAnswer = false
  1342. }
  1343. }
  1344. }
  1345. if (b) {
  1346. if (value === null || value === "") {
  1347. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer = false
  1348. }
  1349. console.log(qIndex);
  1350. console.log(scantron);
  1351. console.log(this.examObject.userExamQuestionList[scantron.questionIndex - 1].subQuestionList[
  1352. Number(combinationItem.sort)]);
  1353. arr.push({
  1354. blankAnswer: JSON.stringify([{
  1355. tag: index,
  1356. content: value
  1357. }]),
  1358. index: qIndex,
  1359. questionType: scantron.subQuestionList[i].questionType
  1360. })
  1361. }
  1362. }
  1363. } else if (scantron.questionType === 7) {
  1364. if (value === undefined) {
  1365. return
  1366. }
  1367. index = (Number(index) + 1) + ""
  1368. let b = true
  1369. for (var i = 0; i < this.userExamAnswers.length; i++) {
  1370. if (this.userExamAnswers[i].index !== qIndex) {
  1371. arr.push(this.userExamAnswers[i])
  1372. } else {
  1373. b = false
  1374. let bc = true
  1375. let arrAnswer = []
  1376. let blankAnswer = JSON.parse(this.userExamAnswers[i].blankAnswer)
  1377. let num = blankAnswer.length;
  1378. for (var j = 0; j < num; j++) {
  1379. if (blankAnswer[j].tag !== index) {
  1380. arrAnswer.push({
  1381. tag: blankAnswer[j].tag,
  1382. content: blankAnswer[j].content
  1383. })
  1384. } else {
  1385. arrAnswer.push({
  1386. tag: index,
  1387. content: value.id
  1388. })
  1389. bc = false
  1390. }
  1391. }
  1392. if (bc) {
  1393. arrAnswer.push({
  1394. tag: index,
  1395. content: value.id
  1396. })
  1397. }
  1398. if (arrAnswer.length !== 0) {
  1399. arr.push({
  1400. blankAnswer: JSON.stringify(arrAnswer),
  1401. coordinates: JSON.stringify(this.drag[qIndex]),
  1402. index: qIndex,
  1403. questionType: scantron.questionType
  1404. })
  1405. } else {
  1406. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer = false
  1407. }
  1408. }
  1409. }
  1410. if (b) {
  1411. if (value === null || value === "") {
  1412. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer = false
  1413. }
  1414. arr.push({
  1415. blankAnswer: JSON.stringify([{
  1416. tag: index,
  1417. content: value.id
  1418. }]),
  1419. coordinates: JSON.stringify(this.drag[qIndex]),
  1420. index: qIndex,
  1421. questionType: scantron.questionType
  1422. })
  1423. }
  1424. } else if (scantron.questionType === 8) {
  1425. console.log(this.connectionContentALL[qIndex]);
  1426. let info = value
  1427. value = ""
  1428. for (var i = 0; i < info.length; i++) {
  1429. console.log(info);
  1430. value += info[i].id.replace('option', '').split('-')[1]
  1431. }
  1432. // connectingCoordinates
  1433. if (value === undefined) {
  1434. return
  1435. }
  1436. let b = true
  1437. for (var j = 0; j < this.userExamAnswers.length; j++) {
  1438. if (this.userExamAnswers[j].index !== qIndex) {
  1439. arr.push(this.userExamAnswers[j])
  1440. } else {
  1441. b = false
  1442. let bc = true
  1443. let arrAnswer = []
  1444. let blankAnswer = JSON.parse(this.userExamAnswers[j].blankAnswer)
  1445. let num = blankAnswer.length;
  1446. for (var q = 0; q < num; q++) {
  1447. if (blankAnswer[q].tag !== index) {
  1448. arrAnswer.push({
  1449. tag: blankAnswer[q].tag,
  1450. content: blankAnswer[q].content
  1451. })
  1452. } else {
  1453. bc = false
  1454. }
  1455. }
  1456. if (bc) {
  1457. arrAnswer.push({
  1458. tag: index,
  1459. content: value
  1460. })
  1461. }
  1462. if (arrAnswer.length !== 0) {
  1463. arr.push({
  1464. blankAnswer: JSON.stringify(arrAnswer),
  1465. index: qIndex,
  1466. coordinates: JSON.stringify(this.connectionContentALL[qIndex]),
  1467. questionType: scantron.questionType
  1468. })
  1469. } else {
  1470. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question
  1471. .isAnswer =
  1472. false
  1473. }
  1474. }
  1475. }
  1476. if (b) {
  1477. if (value === null || value === "") {
  1478. this.examObject.userExamQuestionList[scantron.questionIndex - 1].question.isAnswer =
  1479. false
  1480. }
  1481. arr.push({
  1482. blankAnswer: JSON.stringify([{
  1483. tag: index,
  1484. content: value
  1485. }]),
  1486. coordinates: JSON.stringify(this.connectionContentALL[qIndex]),
  1487. index: qIndex,
  1488. questionType: scantron.questionType
  1489. })
  1490. }
  1491. }
  1492. this.userExamAnswers = arr
  1493. },
  1494. // 失去焦点时的处理函数
  1495. handleBlur(v) {
  1496. if (this.examObject.leaveOn) {
  1497. if (this.windowCheat < 2 && v !== 0) {
  1498. this.$refs.cheat.open()
  1499. }
  1500. let leaveCount = this.examObject.totalLeaveTimes
  1501. let leaveTime = this.examObject.leaveTime
  1502. this.cheat = setInterval(() => {
  1503. this.windowCheat++
  1504. cacheExamAnswer({
  1505. 'examAnswers': this.userExamAnswers,
  1506. 'userExamId': sessionStorage.getItem('examId'),
  1507. 'leaveTime': this.windowCheat,
  1508. 'paperId': this.userExamPaper.paperId,
  1509. 'limitTime': this.userExamPaper.limitTime
  1510. })
  1511. clearInterval(this.cheat)
  1512. }, leaveTime * 1000)
  1513. }
  1514. },
  1515. // 获得焦点时的处理函数
  1516. handleFocus() {
  1517. if (this.examObject.leaveOn) {
  1518. clearInterval(this.cheat)
  1519. if (this.windowCheat >= leaveCount) {
  1520. this.submitExam('cheat')
  1521. }
  1522. }
  1523. },
  1524. // 时间
  1525. addExamPaperTime(systemTime, endTime) {
  1526. return (endTime.getTime() - systemTime.getTime()) / 1000
  1527. },
  1528. // 更新倒计时函数
  1529. updateCountDown() {
  1530. var distance = this.examPaperTime;
  1531. this.examPaperTime = this.examPaperTime - 1
  1532. if (distance < 0) {
  1533. clearInterval(this.intervalId);
  1534. console.log(0);
  1535. this.messageToggle('warn', "时间已到,2秒后为您自动交卷")
  1536. setTimeout(() => {
  1537. this.submitExam(0)
  1538. }, 2000)
  1539. return;
  1540. }
  1541. // 计算时分秒
  1542. var seconds = Math.floor((distance % (60)));
  1543. var minutes = Math.floor((distance % (60 * 60)) / (60));
  1544. var hours = Math.floor(distance / (60 * 60));
  1545. if (hours != 0) {
  1546. this.paperTime = hours + ":" + (minutes.toString().length == 2 ? minutes : '0' + minutes) + ":" + (
  1547. seconds.toString().length == 2 ? seconds : '0' + seconds)
  1548. } else {
  1549. this.paperTime = (minutes.toString().length == 2 ? minutes : '0' + minutes) + ":" + (seconds.toString()
  1550. .length == 2 ? seconds : '0' + seconds)
  1551. }
  1552. let examTime = this.papersTime + distance
  1553. // 计算考試时分秒
  1554. var examTimeseconds = Math.floor((examTime % (60)));
  1555. var examTimeminutes = Math.floor((examTime % (60 * 60)) / (60));
  1556. var examTimehours = Math.floor(examTime / (60 * 60));
  1557. if (examTimehours != 0) {
  1558. this.examTime = examTimehours + ":" + (examTimeminutes.toString().length == 2 ? examTimeminutes : '0' +
  1559. examTimeminutes) + ":" + (
  1560. seconds.toString().length == 2 ? examTimeseconds : '0' + examTimeseconds)
  1561. } else {
  1562. this.examTime = (examTimeminutes.toString().length == 2 ? examTimeminutes : '0' + examTimeminutes) +
  1563. ":" + (examTimeseconds.toString()
  1564. .length == 2 ? examTimeseconds : '0' + examTimeseconds)
  1565. }
  1566. },
  1567. examPapersTime() {
  1568. let list = this.examObject.examPapersList
  1569. let time = 0
  1570. for (var i = 0; i < list.length; i++) {
  1571. if (list[i].paperId !== this.userExamPaper.paperId) {
  1572. if (list[i].state === 9) {
  1573. time += list[i].paperTime * 60
  1574. }
  1575. }
  1576. }
  1577. return time
  1578. }
  1579. },
  1580. mounted() {
  1581. window.addEventListener("unload", (e) => {
  1582. e.preventDefault();
  1583. setTimeout(() => {
  1584. cacheExamAnswer({
  1585. 'examAnswers': this.userExamAnswers,
  1586. 'userExamId': sessionStorage.getItem('examId'),
  1587. 'leaveTime': this.windowCheat,
  1588. 'paperId': this.userExamPaper.paperId,
  1589. 'limitTime': this.userExamPaper.limitTime
  1590. }).then(data => {
  1591. console.log(data);
  1592. })
  1593. }, 100)
  1594. });
  1595. this.user = JSON.parse(sessionStorage.getItem("user"))
  1596. let examId = sessionStorage.getItem('examId')
  1597. getExamDetail({
  1598. 'userExamId': examId,
  1599. 't': new Date().toString()
  1600. }).then(data => {
  1601. if (data.data.code !== 200) {
  1602. sessionStorage.removeItem('examId')
  1603. toLogin()
  1604. }
  1605. this.examObject = data.data.result
  1606. this.scantron = this.examObject.userExamQuestionList[0]
  1607. this.userExamPaper = this.examObject.userExamPapersList[0]
  1608. this.examPaperTime = this.addExamPaperTime(new Date(this.userExamPaper.systemTime), new Date(this
  1609. .userExamPaper.limitTime))
  1610. // 试卷计时
  1611. this.papersTime = this.examPapersTime()
  1612. this.intervalId = setInterval(this.updateCountDown, 1000);
  1613. this.examTime = this.paperTime
  1614. // 添加切屏事件监听
  1615. if (windowState) {
  1616. window.addEventListener('blur', this.handleBlur);
  1617. window.addEventListener('focus', this.handleFocus);
  1618. }
  1619. // 获取缓存答案
  1620. getCacheAnswer({
  1621. 'userExamId': examId
  1622. }).then(answerData => {
  1623. if (answerData.data.result !== null) {
  1624. this.answerDisplay(answerData.data.result)
  1625. }
  1626. })
  1627. })
  1628. }
  1629. }
  1630. </script>
  1631. <style scoped>
  1632. .svg-container {
  1633. width: 100%;
  1634. height: 100%;
  1635. overflow: hidden;
  1636. position: runiative;
  1637. }
  1638. svg {
  1639. display: block;
  1640. width: 100%;
  1641. height: 100%;
  1642. }
  1643. .scroll-Y {
  1644. height: 80vh;
  1645. }
  1646. .allceter {
  1647. display: flex;
  1648. align-items: center;
  1649. height: 50px;
  1650. }
  1651. .scroll-view_H {
  1652. white-space: nowrap;
  1653. width: 100%;
  1654. }
  1655. .scroll-view-item {
  1656. height: 300rpx;
  1657. line-height: 300rpx;
  1658. text-align: center;
  1659. font-size: 36rpx;
  1660. }
  1661. .scroll-view-item_H {
  1662. display: inline-block;
  1663. width: 100%;
  1664. height: 300rpx;
  1665. line-height: 300rpx;
  1666. text-align: center;
  1667. font-size: 36rpx;
  1668. }
  1669. div {
  1670. margin: 0;
  1671. padding: 0;
  1672. }
  1673. /* CSS 预设*/
  1674. * {
  1675. margin: 0;
  1676. padding: 0;
  1677. }
  1678. a {
  1679. text-decoration: none;
  1680. outline: none;
  1681. }
  1682. body a {
  1683. outline: none;
  1684. blr: expression(this.onFocus=this.blur());
  1685. }
  1686. .uni-input {
  1687. padding-left: 20px;
  1688. border: 1rpx solid #5bb4ee;
  1689. height: 96rpx;
  1690. margin-left: 10px;
  1691. color: #000000;
  1692. width: 90%;
  1693. display: flex;
  1694. justify-content: center;
  1695. align-items: center;
  1696. }
  1697. img {
  1698. border: none;
  1699. }
  1700. .dialog-text {
  1701. font-size: 14px;
  1702. color: #333;
  1703. }
  1704. .paperCss {
  1705. width: 85%;
  1706. border-radius: 5px;
  1707. padding: 15px;
  1708. margin-top: 15px;
  1709. font-size: 15px;
  1710. text-align: left;
  1711. }
  1712. </style>