questionBankContinue.vue 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083
  1. <template>
  2. <view class="questionBank">
  3. <uni-nav-bar @clickLeft="clickLeft" left-icon="back" :statusBar="true" :title="examData.examName"></uni-nav-bar>
  4. <swiper class="swiper" :current="current" @change="swiperChange" :interval="interval">
  5. <swiper-item v-for="(bank,bankIndex) in questionList" :key="bankIndex">
  6. <view class="pageContent">
  7. <view class="pad_8 titBox" >
  8. <view class="firstLetter">
  9. <view class="leftLetters">
  10. <view class="btnType">
  11. <text v-if="bank.type==1">单选</text>
  12. <text v-if="bank.type==2">多选</text>
  13. <text v-if="bank.type==3">判断</text>
  14. <text v-if="bank.type==4">案例</text>
  15. <text v-if="bank.type==5">简答</text>
  16. </view>
  17. <text>{{bankIndex+1}}/{{questionList.length}}</text>
  18. </view>
  19. <view style="color: #666;font-size: 28rpx;"></view>
  20. <view class="leftLetters"></view>
  21. </view>
  22. <view class="titles" @click="showPhoto(bank.content)">
  23. <rich-text :nodes="bank.content"></rich-text>
  24. </view>
  25. </view>
  26. <template v-if="bank.type == 1">
  27. <view class="pad_8 titBox no-margin">
  28. <view v-if="!bank.ques">
  29. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect(item.optionsId,bankIndex)">
  30. <view class="activeTI">{{ ast[index] }}</view>
  31. <view class="flex_auto">
  32. {{ item.content }}
  33. <view v-if="item.imgUrl">
  34. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view v-if="bank.ques">
  40. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  41. <text :class="{right:(item.optionsId == bank.ques) || (item.optionsId == bank.ans),wrong:(item.optionsId == bank.ques) && (bank.ques != bank.ans)}" class="activeTI">{{ ast[index] }}</text>
  42. <view class="flex_auto">
  43. {{ item.content }}
  44. <view v-if="item.imgUrl">
  45. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <view v-if="bank.ques">
  52. <view class="pad_8 answer">
  53. <view>正确答案:{{ast[bank.ans-1]}}</view>
  54. <view>我的答案:{{ast[bank.ques-1] || ''}}</view>
  55. </view>
  56. <view class="pad_8 answerInfos">
  57. <view class="answerTitle">答案解析</view>
  58. <view class="answerContent">
  59. <rich-text :nodes="bank.analysisContent"></rich-text>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <template v-if="bank.type == 2">
  65. <view class="pad_8 titBox no-margin">
  66. <view v-if="!bank.ques">
  67. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect(item.optionsId,bankIndex,index)">
  68. <view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
  69. <view class="flex_auto">
  70. {{ item.content }}
  71. <view v-if="item.imgUrl">
  72. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <view v-if="!bank.ques" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(bank.jsonStr)}" @click="checkboxSubmit(bankIndex)">
  78. 确认答案
  79. </view>
  80. <view v-if="bank.ques">
  81. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  82. <text :class="{right:(bank.ques.indexOf(item.optionsId) != -1 ) || (bank.ans.indexOf(item.optionsId) != -1),wrong:(bank.ques.indexOf(item.optionsId) != -1 ) && (bank.ans.indexOf(item.optionsId) == -1)}" class="activeTI">{{ ast[index] }}</text>
  83. <view class="flex_auto">
  84. {{ item.content }}
  85. <view v-if="item.imgUrl">
  86. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <view v-if="bank.ques">
  93. <view class="pad_8 answer">
  94. <view>正确答案:
  95. <text :key="ansItemIndex" v-for="(ansItem,ansItemIndex) in bank.ans">{{ast[ansItem-1]}}</text>
  96. </view>
  97. <view>我的答案:
  98. <text :key="quesItemIndex" v-for="(quesItem,quesItemIndex) in bank.ques">{{ast[quesItem-1]}}</text>
  99. </view>
  100. </view>
  101. <view class="pad_8 answerInfos">
  102. <view class="answerTitle">答案解析</view>
  103. <view class="answerContent">
  104. <rich-text :nodes="bank.analysisContent"></rich-text>
  105. </view>
  106. </view>
  107. </view>
  108. </template>
  109. <template v-if="bank.type == 3">
  110. <view class="pad_8 titBox no-margin">
  111. <view v-if="!bank.ques">
  112. <view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
  113. <view class="activeTI">{{ ast[index] }}</view>
  114. <view class="flex_auto">
  115. {{ item }}
  116. <view v-if="item.imgUrl">
  117. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. <view v-if="bank.ques">
  123. <view v-for="(item, index) in judge" :key="index" class="lisSty">
  124. <text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}" class="activeTI">{{ ast[index] }}</text>
  125. {{ item }}
  126. <view v-if="item.imgUrl">
  127. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. <view v-if="bank.ques">
  133. <view class="pad_8 answer">
  134. <view>正确答案:{{ast[bank.ans]}}</view>
  135. <view>我的答案:{{ast[bank.ques] || ''}}</view>
  136. </view>
  137. <view class="pad_8 answerInfos">
  138. <view class="answerTitle">答案解析</view>
  139. <view class="answerContent">
  140. <rich-text :nodes="bank.analysisContent"></rich-text>
  141. </view>
  142. </view>
  143. </view>
  144. </template>
  145. <!-- 简答题 -->
  146. <template v-if="bank.type == 5">
  147. <view class="pad_8 titBox">
  148. <view class="ans">
  149. <view class="ans_input" v-if="!bank.ques ||( !bank.ques.text && !bank.ques.imageList.length)">
  150. <view class="top flex">
  151. <image :data-index="bankIndex" class="icon" @click="chooseImg(bankIndex)" src="/static/camera.png" mode=""></image>
  152. <view class="progress">{{bank.ansText.imageList.length || '0'}}/4</view>
  153. <view class="submit" :class="{disabled:!bank.ansText.text && hasImgs(bank)}" @click="submitAns(bankIndex)" >确认答案</view>
  154. </view>
  155. <view class="textarea">
  156. <textarea v-model="bank.ansText.text" placeholder="在此输入答案"></textarea>
  157. </view>
  158. <view class="imgs" >
  159. <view class="img" v-for="(img,imgIndex) in bank.ansText.imageList" :key="imgIndex">
  160. <text @click="deleteImg(imgIndex,bankIndex)">x</text>
  161. <image :src="$method.splitImgHost(img, true)"></image>
  162. </view>
  163. </view>
  164. </view>
  165. <view class="ans_submit answerInfos" v-if="bank.ques && (bank.ques.text || bank.ques.imageList.length)">
  166. <view class="answerTitle">我的答案:</view>
  167. {{bank.ques.text || ''}}
  168. <view class="imgs">
  169. <image class="img" v-for="(ques,quesIndex) in bank.ques.imageList" :key="quesIndex" :src="$method.splitImgHost(ques,true)"></image>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. <view v-if="bank.ques.text || bank.ques.imageList.length">
  175. <view class="pad_8 answerInfos">
  176. <view class="answerTitle">答案解析:</view>
  177. <view class="answerContent">
  178. <rich-text :nodes="bank.analysisContent"></rich-text>
  179. </view>
  180. </view>
  181. </view>
  182. </template>
  183. <!-- 案例题 -->
  184. <template v-if="bank.type == 4">
  185. <view class="tabs">
  186. <view class="tab"
  187. :class="{current:tabIndex == bank.current}"
  188. :key="tabIndex" v-for="(tab,tabIndex) in bank.jsonStr"
  189. @click="tabSelect(tabIndex,bankIndex)"
  190. >
  191. 问题{{tabIndex+1}}
  192. </view>
  193. </view>
  194. <view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
  195. <template v-if="ansItem.type == 1">
  196. <view class="pad_8 titBox">
  197. <view class="leftLetters">
  198. <view class="btnType">
  199. <text>单选</text>
  200. </view>
  201. </view>
  202. <view class="titles">
  203. <rich-text :nodes="ansItem.content"></rich-text>
  204. </view>
  205. <view v-if="!bank.ques[ansIndex]">
  206. <view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
  207. <view class="activeTI">{{ ast[childIndex] }}</view>
  208. <view class="flex_auto">
  209. <rich-text class="textChild" :nodes="option.content"></rich-text>
  210. <view v-if="item.imgUrl">
  211. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  212. </view>
  213. </view>
  214. </view>
  215. </view>
  216. <view v-if="bank.ques[ansIndex]">
  217. <view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
  218. <text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}" class="activeTI">{{ ast[childIndex] }}</text>
  219. <view class="flex_auto">
  220. <rich-text :nodes="option.content"></rich-text>
  221. <view v-if="item.imgUrl">
  222. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  223. </view>
  224. </view>
  225. </view>
  226. </view>
  227. </view>
  228. <view v-if="bank.ques[ansIndex]">
  229. <view class="pad_8 answer">
  230. <view>正确答案:{{ast[bank.ans[ansIndex]-1]}}</view>
  231. <view>我的答案:{{ast[bank.ques[ansIndex]-1] || ''}}</view>
  232. </view>
  233. <view class="pad_8 answerInfos">
  234. <view class="answerTitle">答案解析</view>
  235. <view class="answerContent">
  236. <rich-text :nodes="option.analysisContent"></rich-text>
  237. </view>
  238. </view>
  239. </view>
  240. </template>
  241. <template v-if="ansItem.type == 2">
  242. <view class="pad_8 titBox">
  243. <view class="leftLetters">
  244. <view class="btnType">
  245. <text>多选</text>
  246. </view>
  247. </view>
  248. <view class="titles">
  249. <rich-text :nodes="ansItem.content"></rich-text>
  250. </view>
  251. <view v-if="!bank.ques[ansIndex]">
  252. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
  253. <view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
  254. <view class="flex_auto">
  255. <rich-text :nodes="option.content"></rich-text>
  256. <view v-if="item.imgUrl">
  257. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  258. </view>
  259. </view>
  260. </view>
  261. </view>
  262. <view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
  263. 确认答案
  264. </view>
  265. <view v-if="bank.ques && bank.ques[ansIndex]">
  266. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
  267. <text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}" class="activeTI">{{ ast[childindex] }}</text>
  268. <view class="flex_auto">
  269. <rich-text :nodes="option.content"></rich-text>
  270. <view v-if="item.imgUrl">
  271. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. </view>
  277. <view v-if="bank.ques[ansIndex]">
  278. <view class="pad_8 answer">
  279. <view>正确答案:
  280. <text :key="ansItemIndex1" v-for="(ansItem1,ansItemIndex1) in bank.ans[ansIndex]">{{ast[ansItem1-1]}}</text>
  281. </view>
  282. <view>我的答案:
  283. <text :key="quesItemIndex" v-for="(quesItem,quesItemIndex) in bank.ques[ansIndex]">{{ast[quesItem-1]}}</text>
  284. </view>
  285. </view>
  286. <view class="pad_8 answerInfos">
  287. <view class="answerTitle">答案解析</view>
  288. <view class="answerContent">
  289. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  290. </view>
  291. </view>
  292. </view>
  293. </template>
  294. <template v-if="ansItem.type == 3">
  295. <view class="pad_8 titBox">
  296. <view class="leftLetters">
  297. <view class="btnType">
  298. <text>判断</text>
  299. </view>
  300. </view>
  301. <view class="titles">
  302. <rich-text :nodes="ansItem.content"></rich-text>
  303. </view>
  304. <view v-if="!bank.ques[ansIndex]">
  305. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
  306. <view class="activeTI">{{ ast[childindex] }}</view>
  307. <view class="flex_auto">
  308. {{ option }}
  309. <view v-if="item.imgUrl">
  310. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  311. </view>
  312. </view>
  313. </view>
  314. </view>
  315. <view v-if="bank.ques[ansIndex]">
  316. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
  317. <text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}" class="activeTI">{{ ast[childindex] }}</text>
  318. <view class="flex_auto">
  319. {{ option }}
  320. <view v-if="item.imgUrl">
  321. <image style="width:600rpx" mode="widthFix" :src="$method.splitImgHost(item.imgUrl)"></image>
  322. </view>
  323. </view>
  324. </view>
  325. </view>
  326. </view>
  327. <view v-if="bank.ques[ansIndex]">
  328. <view class="pad_8 answer">
  329. <view>正确答案:{{ast[bank.ans[ansIndex]]}}</view>
  330. <view>我的答案:{{ast[bank.ques[ansIndex]] || ''}}</view>
  331. </view>
  332. <view class="pad_8 answerInfos">
  333. <view class="answerTitle">答案解析</view>
  334. <view class="answerContent">
  335. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  336. </view>
  337. </view>
  338. </view>
  339. </template>
  340. <!-- 简答题 -->
  341. <template v-if="ansItem.type == 5">
  342. <view class="pad_8 titBox_title">
  343. <view class="leftLetters">
  344. <view class="btnType">
  345. <text>简答</text>
  346. </view>
  347. </view>
  348. <view class="titles">
  349. <rich-text :nodes="ansItem.content"></rich-text>
  350. </view>
  351. </view>
  352. <view class="pad_8 titBox_title">
  353. <view class="ans">
  354. <view class="ans_input" v-if="!bank.ques[ansIndex] || (!bank.ques[ansIndex].text && !bank.ques[ansIndex].imageList.length)">
  355. <view class="top flex">
  356. <image class="icon" @click="chooseImgChild(bankIndex,ansIndex)" src="/static/08-10_032.jpg" mode=""></image>
  357. <view class="progress">{{ansItem.ansText.imageList.length || '0'}}/4</view>
  358. <view class="submit" :class="{disabled:!ansItem.ansText.text && hasImgs(ansItem)}" @click="submitAnsChild(bankIndex,ansIndex)">确认答案</view>
  359. </view>
  360. <view class="textarea">
  361. <textarea v-model="ansItem.ansText.text" placeholder="在此输入答案"></textarea>
  362. </view>
  363. <view class="imgs">
  364. <view class="img" v-for="(img,imgIndex) in ansItem.ansText.imageList" :key="imgIndex">
  365. <text @click="deleteImgChild(imgIndex,bankIndex,ansIndex)">x</text>
  366. <image :src="$method.splitImgHost(img, true)"></image>
  367. </view>
  368. </view>
  369. </view>
  370. <view class="ans_submit answerInfos" v-if="bank.ques[ansIndex] && (bank.ques[ansIndex].text || bank.ques[ansIndex].imageList.length)">
  371. <view class="answerTitle">我的答案</view>
  372. {{bank.ques[ansIndex].text || ''}}
  373. <view class="imgs" v-if="bank.ques[ansIndex] && bank.ques[ansIndex].imageList.length">
  374. <image class="img" :key="quesIndex" v-for="(ques,quesIndex) in bank.ques[ansIndex].imageList" :src="$method.splitImgHost(ques,true)"></image>
  375. </view>
  376. </view>
  377. </view>
  378. </view>
  379. <view v-if="bank.ques[ansIndex]">
  380. <view class="pad_8 answerInfos">
  381. <view class="answerTitle">答案解析</view>
  382. <view class="answerContent">
  383. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  384. </view>
  385. </view>
  386. </view>
  387. </template>
  388. </view>
  389. </template>
  390. <view class="footer_btn">
  391. <view class="collect show" @click="collect(collectList[bankIndex], bankIndex)">
  392. <view v-if="collectList[bankIndex]">
  393. <image src="/static/icon/collected.png" mode=""></image>
  394. <view>取消收藏</view>
  395. </view>
  396. <view v-if="!collectList[bankIndex]">
  397. <image src="/static/icon/collect.png" mode=""></image>
  398. <view>收藏</view>
  399. </view>
  400. </view>
  401. <view class="flex_center" @click="openFooterTab">
  402. <view class="up-icon">
  403. <image src="/static/up.png"></image>
  404. </view>
  405. 答题卡
  406. </view>
  407. <view class="collect show" @click="pdsubmit">
  408. <view>
  409. <image src="/static/jj.png" mode=""></image>
  410. <view>交卷</view>
  411. </view>
  412. </view>
  413. </view>
  414. </view>
  415. </swiper-item>
  416. </swiper>
  417. <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
  418. <view class="popupView">
  419. <view class="popupTops">
  420. <view class="topIcon"></view>
  421. 点击编号即可跳转至对应题目
  422. </view>
  423. <view class="popupContent">
  424. <scroll-view scroll-y="true" style="height: 506rpx;">
  425. <view class="boxSty">
  426. <view v-for="(item, index) in questionList" :key="index" @click="changeIndex(index)" :class="{isRight:isRight(item,index),isWrong:isWrong(item,index),isOver:isOver(item,index)}" class="liListSty">{{ index + 1 }}</view>
  427. </view>
  428. </scroll-view>
  429. </view>
  430. </view>
  431. </u-popup>
  432. <view class="dialog" v-if="showDialog">
  433. <view class="text">左右滑动切换上下题</view>
  434. <view class="btn" @click="hideDialog">我知道了</view>
  435. </view>
  436. <u-popup v-model="showpopups" mode="center" border-radius="24" height="439rpx" width="640rpx" :mask-close-able="false">
  437. <view class="popboxs">
  438. <view class="classTops">温馨提示</view>
  439. <view class="textStys">
  440. {{
  441. cgType === 7
  442. ? '您还未交卷,确定结束做题吗?'
  443. : cgType === 8
  444. ? `您还有${lastCount}道题未作答, 现在继续作答,还是下次继续?`
  445. : cgType === 6
  446. ? `您还有${lastCount}道题未作答, 您确定要交卷吗?`
  447. : cgType == 9
  448. ? `您已完成所有题目,快去交卷吧!`
  449. : ''
  450. }}
  451. </view>
  452. <view class="classFootsty" v-if="cgType === 6">
  453. <view class="btnsty btns1" @click="submit">立即交卷</view>
  454. <view class="btnsty btns2" @click="showpopups = false">继续做题</view>
  455. </view>
  456. <view class="classFootsty" v-if="cgType === 7">
  457. <view class="btnsty btns1" @click="backPages">下次继续</view>
  458. <view class="btnsty btns2" @click="submit">结束做题</view>
  459. </view>
  460. <view class="classFootsty" v-if="cgType === 8">
  461. <view class="btnsty btns1" @click="backPages()">下次继续</view>
  462. <view class="btnsty btns2" @click="showpopups = false">继续作答</view>
  463. </view>
  464. <view class="classFootsty" v-if="cgType === 9">
  465. <view class="btnsty btns1" @click="showpopups = false">暂不交卷</view>
  466. <view class="btnsty btns2" @click="submit">立即交卷</view>
  467. </view>
  468. </view>
  469. </u-popup>
  470. </view>
  471. </template>
  472. <script>
  473. export default {
  474. data() {
  475. return {
  476. id:'',
  477. current:0,
  478. showpopups:false,
  479. questionList:[],
  480. ast: ['A', 'B', 'C', 'D','E','F','G'],
  481. judge:['错误','正确'],
  482. show: false,
  483. showDialog:false,
  484. bankList: [],
  485. collectList:[],
  486. goodsId:'',
  487. recordId:'',
  488. isLastCount: false, //是否有未答题目
  489. lastCount: 0, //剩余没有回答的题目数
  490. chapterId:'',
  491. moduleId:'',
  492. isSubmit:false,
  493. examData:{},
  494. orderGoodsId:'',
  495. cgType: 0 //对应设计稿弹窗编码
  496. };
  497. },
  498. onLoad(option){
  499. this.orderGoodsId = option.orderGoodsId || ''
  500. this.id = option.id || '';
  501. this.goodsId = option.goodsid || '';
  502. this.chapterId = option.chapterId || '';
  503. this.moduleId = option.moduleId || '';
  504. this.recordId = option.recordId || '';
  505. let showDialog = uni.getStorageSync('showDialog');
  506. if(showDialog) {
  507. this.showDialog = false;
  508. } else {
  509. this.showDialog = true;
  510. uni.setStorageSync('showDialog','1');
  511. }
  512. this.goodsQuestionList();
  513. },
  514. onUnload() {
  515. if(this.isSubmit) {
  516. return
  517. }
  518. this.examRecordEdit();
  519. },
  520. methods: {
  521. /**
  522. * 是否有上传图片
  523. */
  524. hasImgs(bank) {
  525. return bank.ansText.imageList.length == 0;
  526. },
  527. /**
  528. * @param {Object} state
  529. * @param {Object} index
  530. * 收藏
  531. */
  532. collect(state, index) {
  533. if (!state) {
  534. this.$api
  535. .collectQuestion({
  536. examId: this.id,
  537. questionId: this.questionList[index].questionId,
  538. goodsId: this.goodsId || '',
  539. orderGoodsId:this.orderGoodsId
  540. })
  541. .then(res => {
  542. if (res.data.code == 200) {
  543. this.$set(this.collectList, index, true);
  544. uni.showToast({
  545. title: '收藏成功',
  546. duration: 2000,
  547. icon: 'none'
  548. });
  549. this.getCollectInfo(index)
  550. }
  551. });
  552. } else {
  553. this.$api.deleteCollectQuestion(this.collectList[index].collectQuestionId).then(res => {
  554. if (res.data.code == 200) {
  555. this.$set(this.collectList, index, false);
  556. uni.showToast({
  557. title: '取消收藏成功',
  558. duration: 2000,
  559. icon: 'none'
  560. });
  561. }
  562. });
  563. }
  564. return;
  565. },
  566. /**
  567. * 点击后退按钮
  568. */
  569. clickLeft() {
  570. let ansCount = this.questionOverNum(true); //已答题数
  571. this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
  572. //所有题目答完
  573. if (this.lastCount == 0) {
  574. // this.testOver = true;
  575. this.cgType = 7;
  576. //未答完
  577. } else {
  578. this.cgType = 8;
  579. // this.isLastCount = true;
  580. }
  581. this.showpopups = true;
  582. },
  583. /**
  584. * 获取已经回答的题目数
  585. * hasSpecail (是否包含简答和案例)
  586. */
  587. questionOverNum(hasSpecail) {
  588. let count = 0;
  589. this.questionList.forEach(item => {
  590. if (item.type == 1 || item.type == 2 || item.type == 3) {
  591. if (item.ques) {
  592. count++;
  593. }
  594. } else if (item.type == 4) {
  595. //案例题
  596. if(hasSpecail) {
  597. let isOver = item.jsonStr.every((jsonItem, indexs) => {
  598. if (jsonItem.type == 1 || jsonItem.type == 2 || jsonItem.type == 3) {
  599. if (item.ques[indexs]) {
  600. return true;
  601. } else {
  602. return false;
  603. }
  604. } else if (jsonItem.type == 5) {
  605. if (item.ques[indexs] && (item.ques[indexs].text.length || item.ques[indexs].imageList.length)) {
  606. return true;
  607. } else {
  608. return false;
  609. }
  610. }
  611. });
  612. if (isOver) {
  613. count++;
  614. console.log(item, 444);
  615. }
  616. }
  617. } else if (item.type == 5) {
  618. //简答题
  619. if(hasSpecail) {
  620. if (item.ques && (item.ques.text || item.ques.imageList.length)) {
  621. count++;
  622. }
  623. }
  624. }
  625. });
  626. return count;
  627. },
  628. /**
  629. * 返回上一页
  630. */
  631. backPages() {
  632. uni.navigateBack({
  633. delta: 1
  634. });
  635. },
  636. /**
  637. * 是否做完所有题目
  638. */
  639. isDoOver() {
  640. let questionOverNum = this.questionOverNum(true); //获取已经回答的题目数(包括简答和案例)
  641. if(this.questionList.length == questionOverNum) { //全部做完弹窗
  642. this.cgType = 9;
  643. this.showpopups = true;
  644. }
  645. },
  646. pdsubmit() {
  647. // if (this.bankType == 1) {
  648. let ansCount = this.questionOverNum(true); //已答题数
  649. this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
  650. //没有答完
  651. if (this.lastCount !== 0) {
  652. this.cgType = 6;
  653. this.showpopups = true;
  654. return;
  655. }
  656. // }
  657. this.submit();
  658. },
  659. goodsQuestionList() {
  660. //继续答题
  661. console.log("继续做题")
  662. this.$api.examReport(this.recordId).then(res => {
  663. let json = JSON.parse(res.data.data.historyExamJson)
  664. this.examData = res.data.data;
  665. this.questionList = json;
  666. })
  667. },
  668. /**
  669. * @param {Object} current
  670. * 获取收藏信息
  671. */
  672. getCollectInfo(current) {
  673. this.$api
  674. .getCollectInfo({
  675. examId: this.id,
  676. questionId: this.questionList[current].questionId,
  677. goodsId: this.goodsId,
  678. orderGoodsId:this.orderGoodsId
  679. })
  680. .then(res => {
  681. if (res.data.code == 500) {
  682. this.$set(this.collectList, current, false);
  683. } else if (res.data.code == 200) {
  684. this.$set(this.collectList, current, res.data.data);
  685. }
  686. });
  687. },
  688. /**
  689. * @param {Object} e单选点击
  690. */
  691. radioSelect(optionsId,bindex) {
  692. if(this.questionList[bindex].ques) return;
  693. this.$set(this.questionList[bindex],'ques',optionsId)
  694. this.isDoOver()
  695. },
  696. examRecordEdit() {
  697. if(!this.isSubmit) {
  698. let number = 0;
  699. let score = 0;
  700. let doQuestionNum = 0;
  701. let doQuestionIds = []; //做过的题目id
  702. this.questionList.length && this.questionList.forEach((item,index) => {
  703. if(item.type == 1) {
  704. if(item.ques == item.ans) {
  705. score += item.score;
  706. number++
  707. }
  708. if (item.ques) {
  709. doQuestionNum++;
  710. doQuestionIds.push(item.questionId)
  711. }
  712. } else if(item.type == 2) {
  713. let isRight = item.ques && item.ques.every((quesItem,quesIndex) => {
  714. return item.ques[quesIndex] == item.ans[quesIndex]
  715. })
  716. if(isRight) {
  717. score += item.score;
  718. number++
  719. }
  720. if (item.ques && item.ques.length) {
  721. doQuestionNum++;
  722. doQuestionIds.push(item.questionId)
  723. }
  724. } else if(item.type == 3) {
  725. if(item.ques == item.ans) {
  726. score += item.score;
  727. number++
  728. }
  729. if (item.ques) {
  730. doQuestionNum++;
  731. doQuestionIds.push(item.questionId)
  732. }
  733. } else if (item == 4) {
  734. if (item.ques.length) {
  735. doQuestionNum++;
  736. doQuestionIds.push(item.questionId)
  737. }
  738. } else if (item.type == 5) {
  739. if (item.ques && (item.ques.imageList.length || item.ques.text)) {
  740. doQuestionNum++;
  741. doQuestionIds.push(item.questionId)
  742. }
  743. }
  744. })
  745. this.$api.examRecordEdit({
  746. moduleExamId:this.moduleId || 0,
  747. chapterExamId:this.chapterId || 0,
  748. examId:this.id,
  749. doQuestionIds:doQuestionIds.join(''),
  750. goodsId:this.goodsId,
  751. orderGoodsId:this.orderGoodsId,
  752. recordId: this.recordId,
  753. rightQuestionNum:number,
  754. status:0,
  755. doQuestionNum: doQuestionNum,
  756. historyExamJson:JSON.stringify(this.questionList)
  757. }).then(res => {
  758. })
  759. }
  760. },
  761. /**
  762. * @param {Object} e单选点击
  763. */
  764. radioSelectChild(optionsId,ansIndex,bindex) {
  765. if(this.questionList[bindex].ques[ansIndex]) return;
  766. this.$set(this.questionList[bindex].ques,ansIndex,optionsId)
  767. this.isDoOver()
  768. },
  769. /**
  770. * @param {Object} 多选点击
  771. */
  772. checkboxSelect(optionsId,bindex,index) {
  773. this.$set(this.questionList[bindex].jsonStr[index],'checked',!this.questionList[bindex].jsonStr[index].checked)
  774. },
  775. /**
  776. * @param {Object} 多选点击
  777. */
  778. checkboxSelectChild(bindex,ansIndex,childIndex) {
  779. this.$set(this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],'checked',!this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex].checked)
  780. },
  781. /**
  782. * 提交数据
  783. */
  784. submit() {
  785. let score = 0; //计算总分
  786. let reportStatus = 0;
  787. let number = 0;
  788. let allScore = 0;
  789. let passScore = 0;
  790. let doQuestionNum = 0;
  791. let doWrongQuestionIds = []; //错题和未做题id(客观题)
  792. let doQuestionIds = []; //做过的题目id
  793. let rightQuestionIds = []; //做对的题目id
  794. this.questionList.forEach((item,index) => {
  795. passScore = item.passScore
  796. if(item.type == 1) {
  797. if(item.ques == item.ans) {
  798. score += item.score;
  799. number++
  800. rightQuestionIds.push(item.questionId)
  801. } else { //错误
  802. doWrongQuestionIds.push(item.questionId)
  803. }
  804. allScore += item.score
  805. if (item.ques) {
  806. doQuestionNum++;
  807. doQuestionIds.push(item.questionId)
  808. }
  809. } else if(item.type == 2) {
  810. let isRight = item.ans && item.ans.every((quesItem,quesIndex) => {
  811. if(item.ques) {
  812. return item.ques[quesIndex] == item.ans[quesIndex]
  813. } else {
  814. return false;
  815. }
  816. })
  817. if(isRight) {
  818. score += item.score;
  819. number++
  820. rightQuestionIds.push(item.questionId)
  821. } else {
  822. let checkboxScore = item.score; //获取单题总分数
  823. item.ques && item.ques.forEach((ques,quesIndex) => {
  824. //选错一个全扣
  825. if(item.ques) {
  826. if(item.ans.indexOf(item.ques[quesIndex]) == -1) {
  827. checkboxScore = 0;
  828. }
  829. } else {
  830. checkboxScore = 0;
  831. }
  832. })
  833. console.log(checkboxScore)
  834. //没选错
  835. if(checkboxScore) {
  836. checkboxScore = 0;
  837. item.ans.forEach((ans,quesIndex) => {
  838. //漏选扣一部分,对n题给n X partScore 分
  839. if(item.ques) {
  840. if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
  841. checkboxScore += item.partScore;
  842. }
  843. } else {
  844. checkboxScore = 0;
  845. }
  846. })
  847. }
  848. if(checkboxScore <= 0) { //0分
  849. item.scoreResult = 0;
  850. doWrongQuestionIds.push(item.questionId)
  851. } else { //部分分
  852. // number++;
  853. doWrongQuestionIds.push(item.questionId)
  854. item.scoreResult = checkboxScore;
  855. score += checkboxScore;
  856. // rightQuestionIds.push(item.questionId)
  857. }
  858. }
  859. allScore += item.score;
  860. if (item.ques && item.ques.length) {
  861. doQuestionNum++;
  862. doQuestionIds.push(item.questionId)
  863. }
  864. } else if(item.type == 3) {
  865. if(item.ques == item.ans) {
  866. score += item.score;
  867. number++
  868. rightQuestionIds.push(item.questionId)
  869. } else {
  870. doWrongQuestionIds.push(item.questionId)
  871. }
  872. allScore += item.score;
  873. if (item.ques) {
  874. doQuestionNum++;
  875. doQuestionIds.push(item.questionId)
  876. }
  877. } else if (item.type == 4) {
  878. allScore += item.score;
  879. if (item.ques && item.ques.length) {
  880. doQuestionNum++;
  881. doQuestionIds.push(item.questionId)
  882. }
  883. } else if (item.type == 5) {
  884. allScore += item.score;
  885. if (item.ques && (item.ques.imageList.length || item.ques.text)) {
  886. doQuestionNum++;
  887. doQuestionIds.push(item.questionId)
  888. }
  889. }
  890. })
  891. //大于及格
  892. if(score >= passScore) {
  893. reportStatus = 1
  894. } else {
  895. reportStatus = 0
  896. }
  897. this.$api.examRecordEdit({
  898. examId:this.id,
  899. goodsId:this.goodsId,
  900. orderGoodsId:this.orderGoodsId,
  901. reportStatus:reportStatus,
  902. totalScore:allScore,
  903. recordId: this.recordId,
  904. rightQuestionNum:number,
  905. status:1,
  906. moduleExamId:this.moduleId || 0,
  907. chapterExamId:this.chapterId || 0,
  908. doQuestionIds:doQuestionIds.join(','),
  909. rightQuestionIds:rightQuestionIds.join(','),
  910. doQuestionNum: doQuestionNum,
  911. performance: score,
  912. historyExamJson:JSON.stringify(this.questionList)
  913. }).then(res => {
  914. this.isSubmit = true;
  915. if(res.data.code == 200) {
  916. uni.showToast({
  917. title: '交卷成功',
  918. duration: 2000,
  919. icon:'none'
  920. });
  921. setTimeout(() => {
  922. uni.redirectTo({
  923. url:'/pages2/bank/question_report?orderGoodsId='+this.orderGoodsId+'&id='+this.recordId+'&examId='+this.id
  924. })
  925. },2000)
  926. }
  927. })
  928. //错题集id提交(客观题)
  929. this.$api.examWrongRecord({
  930. examId: this.id,
  931. goodsId: this.goodsId,
  932. questionIds: doWrongQuestionIds,
  933. recordId: this.recordId,
  934. orderGoodsId:this.orderGoodsId
  935. }).then(res => {
  936. });
  937. },
  938. isCheckboxChecked(arr) {
  939. return arr.some(item => {
  940. if (item.checked) {
  941. return true;
  942. }
  943. });
  944. },
  945. /**
  946. * @param {Object} 多选确认
  947. */
  948. checkboxSubmit(bindex) {
  949. if(this.questionList[bindex].ques) return;
  950. let arr = [];
  951. this.questionList[bindex].jsonStr.forEach(item => {
  952. if(item.checked) {
  953. arr.push(item.optionsId)
  954. }
  955. })
  956. if(!arr.length) {
  957. uni.showToast({
  958. title:'请选择答案',
  959. icon:'none'
  960. })
  961. return;
  962. }
  963. this.$set(this.questionList[bindex],'ques',arr)
  964. this.isDoOver()
  965. },
  966. /**
  967. * @param {Object} 多选确认
  968. */
  969. checkboxSubmitChild(bindex,ansIndex) {
  970. if(this.questionList[bindex].ques[ansIndex]) return;
  971. let arr = [];
  972. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(item => {
  973. if(item.checked) {
  974. arr.push(item.optionsId)
  975. }
  976. })
  977. if(!arr.length) {
  978. uni.showToast({
  979. title:'请选择答案',
  980. icon:'none'
  981. })
  982. return;
  983. }
  984. this.$set(this.questionList[bindex].ques,ansIndex,arr)
  985. this.isDoOver()
  986. },
  987. judgeSelect(index,bindex) {
  988. if(this.questionList[bindex].ques) return;
  989. this.$set(this.questionList[bindex],'ques',index+'')
  990. this.isDoOver()
  991. },
  992. judgeSelectChild(ansindex,childindex,bindex) {
  993. if(this.questionList[bindex].ques[ansindex]) return;
  994. this.$set(this.questionList[bindex].ques,ansindex,childindex+'')
  995. this.isDoOver()
  996. },
  997. /**
  998. * 立即离开并交卷
  999. */
  1000. leaveNow() {
  1001. this.needBack = false;
  1002. this.isSubmit = true;
  1003. uni.navigateBack({
  1004. delta: 1
  1005. });
  1006. let score = 0; //计算总分
  1007. let reportStatus = 0;
  1008. let number = 0; //做对的题目数量
  1009. let doQuestionNum = 0; //做过的题目数量
  1010. let allScore = 0; //总分
  1011. let passScore = 0;
  1012. let doWrongQuestionIds = []; //错题和未做题id(客观题)
  1013. let doQuestionIds = []; //做过的题目id
  1014. let rightQuestionIds = []; //做对的题目id
  1015. this.questionList.forEach((item, index) => {
  1016. // passScore = item.passScore
  1017. if (item.type == 1) {
  1018. //正确
  1019. if (item.ques == item.ans) {
  1020. item.scoreResult = item.score;
  1021. score += item.score;
  1022. number++;
  1023. rightQuestionIds.push(item.questionId)
  1024. } else { //错误
  1025. item.scoreResult = 0;
  1026. doWrongQuestionIds.push(item.questionId)
  1027. }
  1028. allScore += item.score;
  1029. if (item.ques) {
  1030. doQuestionNum++;
  1031. doQuestionIds.push(item.questionId)
  1032. }
  1033. } else if (item.type == 2) {
  1034. let isRight =
  1035. item.ans &&
  1036. item.ans.every((quesItem, quesIndex) => {
  1037. if(item.ques) {
  1038. return item.ques[quesIndex] == item.ans[quesIndex];
  1039. } else {
  1040. return false;
  1041. }
  1042. });
  1043. if (isRight) {
  1044. score += item.score;
  1045. number++;
  1046. item.scoreResult = item.score;
  1047. rightQuestionIds.push(item.questionId)
  1048. } else {
  1049. let checkboxScore = item.score; //获取单题总分数
  1050. item.ques && item.ques.forEach((ques,quesIndex) => {
  1051. //选错一个全扣
  1052. if(item.ques) {
  1053. if(item.ans.indexOf(item.ques[quesIndex]) == -1) {
  1054. checkboxScore = 0;
  1055. }
  1056. } else {
  1057. checkboxScore = 0;
  1058. }
  1059. })
  1060. console.log(checkboxScore)
  1061. //没选错
  1062. if(checkboxScore) {
  1063. checkboxScore = 0;
  1064. item.ans.forEach((ans,quesIndex) => {
  1065. //漏选扣一部分,对n题给n X partScore 分
  1066. if(item.ques) {
  1067. if(item.ques.indexOf(item.ans[quesIndex]) != -1) {
  1068. checkboxScore += item.partScore;
  1069. }
  1070. } else {
  1071. checkboxScore = 0;
  1072. }
  1073. })
  1074. }
  1075. if(checkboxScore <= 0) { //0分
  1076. item.scoreResult = 0;
  1077. doWrongQuestionIds.push(item.questionId)
  1078. } else { //部分分
  1079. // number++;
  1080. doWrongQuestionIds.push(item.questionId)
  1081. item.scoreResult = checkboxScore;
  1082. score += checkboxScore;
  1083. // rightQuestionIds.push(item.questionId)
  1084. }
  1085. }
  1086. allScore += item.score;
  1087. if (item.ques && item.ques.length) {
  1088. doQuestionNum++;
  1089. doQuestionIds.push(item.questionId)
  1090. }
  1091. } else if (item.type == 3) {
  1092. if (item.ques == item.ans) {
  1093. item.scoreResult = item.score;
  1094. score += item.score;
  1095. number++;
  1096. rightQuestionIds.push(item.questionId)
  1097. } else {
  1098. item.scoreResult = 0;
  1099. doWrongQuestionIds.push(item.questionId)
  1100. }
  1101. allScore += item.score;
  1102. if (item.ques) {
  1103. doQuestionNum++;
  1104. doQuestionIds.push(item.questionId)
  1105. }
  1106. } else if (item.type == 4) {
  1107. if (item.ques && item.ques.length) {
  1108. doQuestionNum++;
  1109. doQuestionIds.push(item.questionId)
  1110. }
  1111. } else if (item.type == 5) {
  1112. if (item.ques && (item.ques.imageList || item.ques.text)) {
  1113. doQuestionNum++;
  1114. doQuestionIds.push(item.questionId)
  1115. }
  1116. }
  1117. });
  1118. //大于60分及格
  1119. if(score >= 60) {
  1120. reportStatus = 1
  1121. } else {
  1122. reportStatus = 0
  1123. }
  1124. //交卷
  1125. this.$api
  1126. .examRecordEdit({
  1127. examId: this.id,
  1128. goodsId: this.goodsId,
  1129. orderGoodsId:this.orderGoodsId,
  1130. reportStatus:reportStatus,
  1131. recordId: this.recordId,
  1132. rightQuestionNum: number,
  1133. status: 1,
  1134. moduleExamId:this.moduleId || 0,
  1135. chapterExamId:this.chapterId || 0,
  1136. doQuestionIds:doQuestionIds.join(','),
  1137. rightQuestionIds:rightQuestionIds.join(','),
  1138. doQuestionNum: doQuestionNum,
  1139. performance: score,
  1140. totalScore: allScore,
  1141. examTime: parseInt(this.allTimes),
  1142. doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
  1143. historyExamJson: JSON.stringify(this.questionList)
  1144. })
  1145. .then(res => {
  1146. this.isSubmit = true;
  1147. if (res.data.code == 200) {
  1148. }
  1149. });
  1150. //错题集id提交(客观题)
  1151. this.$api.examWrongRecord({
  1152. moduleExamId:this.moduleId || 0,
  1153. chapterExamId:this.chapterId || 0,
  1154. examId: this.id,
  1155. goodsId: this.goodsId,
  1156. orderGoodsId:this.orderGoodsId,
  1157. questionIds: doWrongQuestionIds,
  1158. recordId: this.recordId
  1159. }).then(res => {
  1160. });
  1161. },
  1162. openFooterTab() {
  1163. this.show = true;
  1164. },
  1165. hideDialog() {
  1166. this.showDialog = false
  1167. },
  1168. changeIndex(index) {
  1169. this.current = index
  1170. },
  1171. swiperChange(e) {
  1172. this.current = e.detail.current;
  1173. },
  1174. deleteImg(imgIndex,bankIndex) {
  1175. this.questionList[bankIndex].ansText.imageList.splice(imgIndex,1)
  1176. },
  1177. deleteImgChild(imgIndex,bankIndex,ansIndex) {
  1178. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(imgIndex,1)
  1179. },
  1180. chooseImg(bankindex) {
  1181. uni.chooseImage({
  1182. count: 1, //默认9
  1183. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  1184. sourceType: ['album','camera'], //从相册选择
  1185. success: (res) => {
  1186. let self = this;
  1187. // console.log(JSON.stringify(res.tempFilePaths));
  1188. let img = res.tempFilePaths[0];
  1189. uni.getImageInfo({
  1190. src: img,
  1191. success: async res => {
  1192. let canvasWidth = res.width; //图片原始长宽
  1193. let canvasHeight = res.height;
  1194. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1195. uni.compressImage({
  1196. src: img,
  1197. quality: 75,
  1198. width: '50%',
  1199. height: '50%',
  1200. success: async rest => {
  1201. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1202. this.questionList[bankindex].ansText.imageList.push(dir)
  1203. }
  1204. });
  1205. } else {
  1206. const dir = await self.uploadFile(img, 0);
  1207. this.questionList[bankindex].ansText.imageList.push(dir)
  1208. }
  1209. }
  1210. });
  1211. }
  1212. })
  1213. },
  1214. chooseImgChild(bankindex,ansindex) {
  1215. uni.chooseImage({
  1216. count: 1, //默认9
  1217. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  1218. sourceType: ['album','camera'], //从相册选择
  1219. success: (res) => {
  1220. let self = this;
  1221. // console.log(JSON.stringify(res.tempFilePaths));
  1222. let img = res.tempFilePaths[0];
  1223. uni.getImageInfo({
  1224. src: img,
  1225. success: async res => {
  1226. let canvasWidth = res.width; //图片原始长宽
  1227. let canvasHeight = res.height;
  1228. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1229. uni.compressImage({
  1230. src: img,
  1231. quality: 75,
  1232. width: '50%',
  1233. height: '50%',
  1234. success: async rest => {
  1235. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1236. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  1237. }
  1238. });
  1239. } else {
  1240. const dir = await self.uploadFile(img, 0);
  1241. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  1242. }
  1243. }
  1244. });
  1245. }
  1246. })
  1247. },
  1248. uploadFile(options, int) {
  1249. var self = this;
  1250. return new Promise((resolve, reject) => {
  1251. var data = {
  1252. orderGoodsId:this.orderGoodsId,
  1253. imageStatus: int
  1254. };
  1255. self.$api.aliyunpolicy(data).then(res => {
  1256. console.log(res.data,6)
  1257. if(res.data.code!=200){
  1258. self.$method.showToast('签名错误'+JSON.stringify(res.data))
  1259. return
  1260. }
  1261. var ossToken = res.data.data.resultContent;
  1262. if(ossToken.host==null||ossToken.host==undefined){
  1263. self.$method.showToast('上传路径报错'+JSON.stringify(res.data))
  1264. return
  1265. }
  1266. uni.uploadFile({
  1267. url: ossToken.host,
  1268. name: 'file',
  1269. filePath: options,
  1270. fileType: 'image',
  1271. header: {
  1272. AuthorizationToken: 'WX ' + uni.getStorageSync('token')
  1273. },
  1274. formData: {
  1275. key: ossToken.dir,
  1276. OSSAccessKeyId: ossToken.accessid,
  1277. policy: ossToken.policy,
  1278. Signature: ossToken.signature,
  1279. callback: ossToken.callback,
  1280. success_action_status: 200
  1281. },
  1282. success: result => {
  1283. if (result.statusCode === 200) {
  1284. resolve(ossToken.dir);
  1285. } else {
  1286. uni.showToast({
  1287. title: '上传失败',
  1288. icon: 'none'
  1289. });
  1290. return;
  1291. }
  1292. },
  1293. fail: error => {
  1294. uni.showToast({
  1295. title: '上传接口报错'+error,
  1296. icon: 'none'
  1297. });
  1298. return;
  1299. }
  1300. });
  1301. });
  1302. });
  1303. },
  1304. submitAns(bankindex) {
  1305. console.log(this.questionList[bankindex])
  1306. if(!this.questionList[bankindex].ansText.text && !this.questionList[bankindex].ansText.imageList.length) {
  1307. uni.showToast({
  1308. title: '请输入内容或上传图片',
  1309. duration: 2000,
  1310. icon:'none'
  1311. });
  1312. return
  1313. }
  1314. this.$set(this.questionList[bankindex],'ques',{
  1315. imageList:this.questionList[bankindex].ansText.imageList,
  1316. text:this.questionList[bankindex].ansText.text,
  1317. })
  1318. this.isDoOver()
  1319. },
  1320. submitAnsChild(bankindex,ansindex) {
  1321. if(!this.questionList[bankindex].jsonStr[ansindex].ansText.text && !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length) {
  1322. uni.showToast({
  1323. title: '请输入内容或上传图片',
  1324. duration: 2000,
  1325. icon:'none'
  1326. });
  1327. return
  1328. }
  1329. this.$set(this.questionList[bankindex].ques,ansindex,{
  1330. imageList:this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
  1331. text:this.questionList[bankindex].jsonStr[ansindex].ansText.text,
  1332. })
  1333. this.isDoOver()
  1334. },
  1335. isRight(item,index) {
  1336. //单选
  1337. if(this.questionList[index].ques) {
  1338. if(item.type == 1) {
  1339. return this.questionList[index].ques == this.questionList[index].ans;
  1340. //多选
  1341. } else if(item.type == 2) {
  1342. //每一项都相等
  1343. return this.questionList[index].ans.every((item,i) => {
  1344. return item == this.questionList[index].ques[i];
  1345. })
  1346. //判断
  1347. } else if(item.type == 3) {
  1348. return this.questionList[index].ques == this.questionList[index].ans;
  1349. } else {
  1350. return false;
  1351. }
  1352. } else {
  1353. return false;
  1354. }
  1355. },
  1356. right(bankIndex,ansIndex,option) {
  1357. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  1358. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) || (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) != -1)) {
  1359. return true
  1360. } else {
  1361. return false;
  1362. }
  1363. } else {
  1364. return false;
  1365. }
  1366. },
  1367. wrong(bankIndex,ansIndex,option) {
  1368. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  1369. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) && (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) == -1)) {
  1370. return true;
  1371. } else {
  1372. return false;
  1373. }
  1374. } else {
  1375. return false;
  1376. }
  1377. },
  1378. isWrong(item,index) {
  1379. if(this.questionList[index].ques) {
  1380. //单选
  1381. if(item.type == 1) {
  1382. return this.questionList[index].ques != this.questionList[index].ans;
  1383. //多选
  1384. } else if(item.type == 2) {
  1385. //每一项都相等
  1386. return this.questionList[index].ques.some((item, i) => {
  1387. return this.questionList[index].ans.indexOf(item) == -1;
  1388. });
  1389. //判断
  1390. } else if(item.type == 3) {
  1391. return this.questionList[index].ques != this.questionList[index].ans;
  1392. } else {
  1393. return false;
  1394. }
  1395. } else {
  1396. return false;
  1397. }
  1398. },
  1399. isPart(item,index) {
  1400. if (this.questionList[index].ques) {
  1401. if(item.type == 2) {
  1402. let isWrong = this.questionList[index].ques.some((item, i) => {
  1403. return this.questionList[index].ans.indexOf(item) == -1;
  1404. });
  1405. let isRight = this.questionList[index].ans.every((item, i) => {
  1406. return item == this.questionList[index].ques[i];
  1407. });
  1408. if (!isRight && !isWrong) {
  1409. return true;
  1410. }
  1411. }
  1412. } else {
  1413. return false;
  1414. }
  1415. },
  1416. isOver(item,index) {
  1417. if(this.questionList[index].ques) {
  1418. if (item.type == 4) { //案例题
  1419. let isOver = item.jsonStr.every((jsonItem, indexs) => {
  1420. if (jsonItem.type == 1 || jsonItem.type == 2 || jsonItem.type == 3) {
  1421. if (item.ques[indexs]) {
  1422. return true;
  1423. } else {
  1424. return false;
  1425. }
  1426. } else if (jsonItem.type == 5) {
  1427. if (item.ques[indexs] && (item.ques[indexs].text || item.ques[indexs].imageList.length)) {
  1428. console.log('chil')
  1429. return true;
  1430. } else {
  1431. return false;
  1432. }
  1433. }
  1434. });
  1435. if (isOver) {
  1436. return true;
  1437. } else {
  1438. return false;
  1439. }
  1440. } else if (item.type == 5) { //简答题
  1441. //每一项都相等
  1442. if(item.ques && (item.ques.imageList.length || item.ques.text)) {
  1443. return true;
  1444. }
  1445. //判断
  1446. } else {
  1447. return false;
  1448. }
  1449. } else {
  1450. return false;
  1451. }
  1452. },
  1453. tabSelect(index,bankindex) {
  1454. this.$set(this.questionList[bankindex],'current',index)
  1455. },
  1456. showPhoto(contentStr) {
  1457. if(contentStr && typeof contentStr == 'string') {
  1458. let reg = /<img[^>]*src[=\'\"\s]+([^\'\"]*)[\'\"]?[^>]*>/gi;
  1459. let strArr = contentStr.match(reg);
  1460. strArr.forEach((str,index) => {
  1461. strArr[index] = str.replace(reg,'$1')
  1462. })
  1463. // 预览图片
  1464. uni.previewImage({
  1465. urls: strArr,
  1466. longPressActions: {
  1467. itemList: ['发送给朋友', '保存图片', '收藏'],
  1468. success: function(data) {
  1469. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  1470. },
  1471. fail: function(err) {
  1472. console.log(err.errMsg);
  1473. }
  1474. }
  1475. });
  1476. }
  1477. }
  1478. }
  1479. };
  1480. </script>
  1481. <style lang="scss" scoped>
  1482. .questionBank {
  1483. width:100%;
  1484. height:100vh;
  1485. display: flex;
  1486. flex-direction: column;
  1487. }
  1488. .swiper {
  1489. width:100%;
  1490. flex:1;
  1491. }
  1492. .lisSty {
  1493. margin-bottom: 16rpx;
  1494. display: flex;
  1495. align-items: center;
  1496. .flex_auto {
  1497. flex:1;
  1498. }
  1499. }
  1500. .activeTI {
  1501. vertical-align: middle;
  1502. display: inline-block;
  1503. border: 1rpx solid #eee;
  1504. border-radius: 50rpx;
  1505. height: 48rpx;
  1506. line-height: 46rpx;
  1507. text-align: center;
  1508. width: 48rpx;
  1509. margin-right: 15rpx;
  1510. color: #666;
  1511. font-size: 30rpx;
  1512. &.right {
  1513. color:#fff;
  1514. background:#36C75A;
  1515. }
  1516. &.wrong {
  1517. color:#fff;
  1518. background:#FF3B30;
  1519. }
  1520. &.checked {
  1521. color:#fff;
  1522. background:#007AFF;
  1523. }
  1524. }
  1525. .submit_checkbox {
  1526. position:fixed;
  1527. left:0;
  1528. right:0;
  1529. bottom:120rpx;
  1530. margin: 20rpx auto;
  1531. left:0;
  1532. right:0;
  1533. bottom:120rpx;
  1534. margin: 20rpx auto;
  1535. width: 526rpx;
  1536. height: 80rpx;
  1537. background: rgba(0, 122, 255, 1);
  1538. color:#fff;
  1539. text-align: center;
  1540. line-height: 80rpx;
  1541. font-size: 30rpx;
  1542. border-radius: 40rpx;
  1543. &.disabled {
  1544. opacity: 0.6;
  1545. }
  1546. }
  1547. .titles {
  1548. overflow: hidden;
  1549. margin-bottom: 24rpx;
  1550. }
  1551. .titBox {
  1552. padding: 41rpx 25rpx 24rpx 25rpx;
  1553. }
  1554. .titBox_title {
  1555. padding: 21rpx;
  1556. }
  1557. .tabs {
  1558. margin:10rpx;
  1559. display: flex;
  1560. .tab {
  1561. margin: 0 4rpx;
  1562. padding:10rpx 13rpx;
  1563. text-align: center;
  1564. color: #007aff;
  1565. font-size: 28rpx;
  1566. border-radius: 16rpx;
  1567. background:#fff;
  1568. &.current {
  1569. color:#fff;
  1570. background: #007AFF;
  1571. }
  1572. }
  1573. }
  1574. .ans {
  1575. margin:8rpx 8rpx 8rpx;
  1576. .ans_input {
  1577. border-radius: 16rpx;
  1578. background:#fff;
  1579. .top {
  1580. border-bottom:1rpx solid #EEEEEE;
  1581. padding: 16rpx;
  1582. display: flex;
  1583. align-items: center;
  1584. .icon {
  1585. margin-right:20rpx;
  1586. width: 40rpx;
  1587. height: 38rpx;
  1588. }
  1589. .progress {
  1590. flex:1;
  1591. }
  1592. .submit {
  1593. width: 168rpx;
  1594. height: 48rpx;
  1595. line-height: 48rpx;
  1596. text-align: center;
  1597. color:#fff;
  1598. font-size: 30rpx;
  1599. background: #007AFF;
  1600. border-radius: 24rpx;
  1601. &.disabled {
  1602. opacity: 0.6;
  1603. }
  1604. }
  1605. }
  1606. .textarea {
  1607. textarea {
  1608. width:100%;
  1609. height:287rpx;
  1610. padding:10rpx;
  1611. }
  1612. }
  1613. .imgs {
  1614. overflow: hidden;
  1615. display: flex;
  1616. width:100%;
  1617. .img {
  1618. width: 104rpx;
  1619. height: 104rpx;
  1620. border-radius: 8rpx;
  1621. position:relative;
  1622. margin:20rpx;
  1623. text {
  1624. position:absolute;
  1625. right:-15rpx;
  1626. top:-15rpx;
  1627. width:30rpx;
  1628. height:30rpx;
  1629. text-align: center;
  1630. line-height: 30rpx;
  1631. color:#fff;
  1632. background:#FF3B30;
  1633. border-radius:50%;
  1634. }
  1635. image {
  1636. width:100%;
  1637. height:100%;
  1638. }
  1639. }
  1640. }
  1641. }
  1642. .ans_submit {
  1643. padding:16rpx;
  1644. border-radius: 16rpx;
  1645. background:#fff;
  1646. .imgs {
  1647. overflow: hidden;
  1648. display: flex;
  1649. width:100%;
  1650. .img {
  1651. width: 104rpx;
  1652. height: 104rpx;
  1653. border-radius: 8rpx;
  1654. position:relative;
  1655. margin:20rpx;
  1656. image {
  1657. width:100%;
  1658. height:100%;
  1659. }
  1660. }
  1661. }
  1662. }
  1663. }
  1664. .leftLetters {
  1665. display: flex;
  1666. align-items: center;
  1667. width: 220rpx;
  1668. .btnType {
  1669. padding: 5rpx 10rpx;
  1670. border: 1rpx solid #007aff;
  1671. border-radius: 10rpx;
  1672. background-color: rgba(0, 122, 255, 0.1);
  1673. font-size: 28rpx;
  1674. color: #007aff;
  1675. margin-right: 15rpx;
  1676. }
  1677. }
  1678. .firstLetter {
  1679. display: flex;
  1680. justify-content: space-between;
  1681. align-items: center;
  1682. margin-bottom: 30rpx;
  1683. }
  1684. .popupView {
  1685. height: 100%;
  1686. padding-bottom: 100rpx;
  1687. .popupTops {
  1688. height: 77rpx;
  1689. border-bottom: 1rpx solid #eee;
  1690. text-align: center;
  1691. line-height: 77rpx;
  1692. font-size: 24rpx;
  1693. color: #999;
  1694. position: relative;
  1695. .topIcon {
  1696. position: absolute;
  1697. top: 10rpx;
  1698. left: 50%;
  1699. transform: translateX(-50%);
  1700. width: 80rpx;
  1701. height: 8rpx;
  1702. background-color: #999;
  1703. border-radius: 4rpx;
  1704. }
  1705. }
  1706. .popupContent {
  1707. }
  1708. }
  1709. .pageContent {
  1710. position:relative;
  1711. background-color: #eaeef1;
  1712. height: 100%;
  1713. overflow-y: scroll;
  1714. padding-top: 8rpx;
  1715. padding-bottom: 100rpx;
  1716. }
  1717. .pad_8 {
  1718. background-color: #fff;
  1719. margin: 0rpx 8rpx 8rpx;
  1720. border-radius: 16rpx;
  1721. &.no-margin {
  1722. margin-top:-16rpx;
  1723. border-radius: 0 0 16rpx 16rpx;
  1724. }
  1725. }
  1726. .answer {
  1727. height: 80rpx;
  1728. line-height: 80rpx;
  1729. padding: 0rpx 24rpx;
  1730. display: flex;
  1731. align-items: center;
  1732. justify-content: space-between;
  1733. color: #666;
  1734. font-size: 30rpx;
  1735. }
  1736. .footer_btn {
  1737. background-color: #fff;
  1738. z-index: 10078;
  1739. position: fixed;
  1740. bottom: 0rpx;
  1741. display: flex;
  1742. align-items: center;
  1743. justify-content: space-between;
  1744. width: 100%;
  1745. height: 98rpx;
  1746. padding: 0rpx 38rpx;
  1747. border-top: 1rpx solid #eee;
  1748. .flex_center {
  1749. flex:1;
  1750. display: flex;
  1751. justify-content: center;
  1752. align-items: center;
  1753. flex-direction: column;
  1754. margin:0 200rpx;
  1755. font-size: 24rpx;
  1756. color: #999999;
  1757. .up-icon {
  1758. margin-bottom:18rpx;
  1759. width:100%;
  1760. display: flex;
  1761. justify-content: center;
  1762. image {
  1763. width:58rpx;
  1764. height:21rpx;
  1765. }
  1766. }
  1767. }
  1768. .collect {
  1769. visibility: hidden;
  1770. width:100rpx;
  1771. &.show {
  1772. visibility: visible;
  1773. }
  1774. >view {
  1775. display: flex;
  1776. flex-direction: column;
  1777. align-items: center;
  1778. justify-content: center;
  1779. image {
  1780. width:32rpx;
  1781. height:32rpx;
  1782. margin-bottom:6rpx;
  1783. }
  1784. view {
  1785. font-size: 24rpx;
  1786. color: #999999;
  1787. }
  1788. }
  1789. }
  1790. }
  1791. .boxSty {
  1792. padding: 44rpx 41rpx 0rpx;
  1793. }
  1794. .liListSty {
  1795. border:1rpx solid #EEEEEE;
  1796. width: 88rpx;
  1797. height: 88rpx;
  1798. border-radius: 32rpx;
  1799. text-align: center;
  1800. line-height: 88rpx;
  1801. color: #333;
  1802. font-size: 32rpx;
  1803. float: left;
  1804. margin: 20rpx 23rpx;
  1805. &.isRight {
  1806. border:1rpx solid #EEEEEE;
  1807. color:#fff;
  1808. background: #36C75A;
  1809. }
  1810. &.isWrong {
  1811. border:1rpx solid #EEEEEE;
  1812. color:#fff;
  1813. background: #FF3B30;
  1814. }
  1815. &.isOver {
  1816. border: 1rpx solid #eeeeee;
  1817. color: #fff;
  1818. background: blue;
  1819. }
  1820. }
  1821. .answerInfos {
  1822. padding: 25rpx 25rpx 25rpx 23rpx;
  1823. }
  1824. .answerTitle {
  1825. margin-bottom: 28rpx;
  1826. color: #666;
  1827. font-size: 30rpx;
  1828. }
  1829. .answerContent {
  1830. font-size: 30rpx;
  1831. color: #666;
  1832. }
  1833. .textChild {
  1834. display: inline-block;
  1835. vertical-align: middle;
  1836. }
  1837. .dialog {
  1838. position: fixed;
  1839. left:0;
  1840. top:0;
  1841. width:100%;
  1842. height:100%;
  1843. background-color: rgba(0,0,0,0.8);
  1844. display: flex;
  1845. flex-direction: column;
  1846. align-items: center;
  1847. justify-content: center;
  1848. z-index: 20000;
  1849. .pointer {
  1850. width:338rpx;
  1851. height:240rpx;
  1852. }
  1853. .text {
  1854. font-size: 32rpx;
  1855. color: #FFFFFF;
  1856. text-align: center;
  1857. }
  1858. .btn {
  1859. width: 242rpx;
  1860. height: 82rpx;
  1861. border: 2rpx solid #FFFFFF;
  1862. border-radius: 16rpx;
  1863. text-align: center;
  1864. line-height: 82rpx;
  1865. margin:41rpx auto;
  1866. color:#fff;
  1867. font-size: 32rpx;
  1868. }
  1869. }
  1870. .popboxs {
  1871. width: 100%;
  1872. height: 100%;
  1873. display: flex;
  1874. flex-direction: column;
  1875. align-items: center;
  1876. }
  1877. .classTops {
  1878. flex-shrink: 0;
  1879. padding: 39rpx 0rpx 4rpx;
  1880. font-weight: bold;
  1881. color: #333;
  1882. font-size: 30rpx;
  1883. }
  1884. .textStys {
  1885. width: 100%;
  1886. flex: 1;
  1887. padding: 36rpx;
  1888. }
  1889. .classFootsty {
  1890. flex-shrink: 0;
  1891. display: flex;
  1892. align-items: center;
  1893. justify-content: center;
  1894. padding: 10rpx 0rpx 40rpx;
  1895. .btnsty {
  1896. width: 200rpx;
  1897. height: 80rpx;
  1898. border-radius: 40rpx;
  1899. font-weight: bold;
  1900. font-size: 30rpx;
  1901. text-align: center;
  1902. line-height: 80rpx;
  1903. }
  1904. .btns1 {
  1905. background-color: #f5f5f5;
  1906. color: #007aff;
  1907. }
  1908. .btns2 {
  1909. margin-left: 40rpx;
  1910. background-color: #007aff;
  1911. color: #ffffff;
  1912. }
  1913. }
  1914. </style>