examStart.vue 60 KB

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