index.vue 116 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;" v-loading="loading">
  3. <div class="pb_content_body" style="position: relative; margin: 0">
  4. <div class="right">
  5. <div class="courseTop">
  6. <div class="stepsNav">
  7. <el-breadcrumb separator-class="el-icon-arrow-right">
  8. <el-breadcrumb-item :to="{
  9. path:
  10. '/test?userid=' +
  11. userid +
  12. '&oid=' +
  13. oid +
  14. '&org=' +
  15. org +
  16. '&role=' +
  17. role,
  18. }">表单管理</el-breadcrumb-item>
  19. <el-breadcrumb-item>
  20. <span style="color: rgb(15, 126, 255)">查看表单</span>
  21. </el-breadcrumb-item>
  22. </el-breadcrumb>
  23. </div>
  24. <div v-if="!peopleId" class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  25. </div>
  26. <div class="step_box" ref="stepBox" v-loading="pdfLoading">
  27. <div class="test_title" :style="!isDesktop?'justify-content: center;':''">
  28. <div class="left">
  29. <div class="title">{{ testJson.title }}</div>
  30. <div class="info" v-if="isDesktop">
  31. <div class="info_box" v-if="testJson.typeN">
  32. <span>类型:</span>
  33. <span>{{ testJson.typeN }}</span>
  34. </div>
  35. <div class="info_box">
  36. <span>填写范围:</span>
  37. <span>{{ testJson.juriP ? testJson.juriP : '所有人' }}</span>
  38. </div>
  39. <div class="info_box" v-if="testJson.overtime">
  40. <span>截止时间:</span>
  41. <span>{{ testJson.overtime }}</span>
  42. </div>
  43. </div>
  44. </div>
  45. <div v-if="!peopleId">
  46. <div class="right" v-if="isDesktop">
  47. <div class="data_box">
  48. <span>提交数量</span>
  49. <span><span class="big">{{ works.length }}</span>份</span>
  50. </div>
  51. <div class="data_box" v-if="testJson.juriP">
  52. <span>表单完成率</span>
  53. <span><span class="big">{{ (iscount / pcount * 100).toFixed(0) }}</span>%</span>
  54. </div>
  55. <div class="data_box" v-if="testJson.juriP">
  56. <span>未完成人数</span>
  57. <span><span class="big">{{ pcount - iscount }}</span></span>
  58. </div>
  59. <div class="btn_box" @click="dialogVisibleShare = true">
  60. <span></span>
  61. <span>提醒</span>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <!-- pc端 查看切换 isDesktop-->
  67. <div class="search_nav" v-if="isDesktop">
  68. <div class="right">
  69. <span :class="{ active: stype == 1 }" @click="checkDataType(1)" v-if="!peopleId">按题目查看</span>
  70. <span :class="{ active: stype == 2 }" @click="checkDataType(2)">按人员查看</span>
  71. <span :class="{ active: stype == 3 }" @click="checkDataType(3)" v-show="false">按数量查看</span>
  72. </div>
  73. <div class="left" v-if="isDesktop">
  74. <!-- <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3"> -->
  75. <div style="margin-right: 10px;position: relative;">
  76. <el-select v-model="TeachingValue" @change="searchCourse" placeholder="按教研室">
  77. <el-option
  78. label="全部"
  79. value="">
  80. </el-option>
  81. <el-option
  82. v-for="item in TeachingOptions"
  83. :key="item.id"
  84. :label="item.name"
  85. :value="item.id">
  86. </el-option>
  87. </el-select>
  88. </div>
  89. <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3">
  90. <el-date-picker
  91. v-model="SubmitTime"
  92. type="date"
  93. @change="searchCourse"
  94. value-format="yyyy-MM-dd"
  95. placeholder="选择日期">
  96. </el-date-picker>
  97. <!-- <el-select v-model="SubmitTime" placeholder="按提交时间筛选">
  98. <el-option
  99. label="全部"
  100. value="">
  101. </el-option>
  102. <el-option
  103. v-for="item in SubmitTimeOptions"
  104. :key="item.id"
  105. :label="item.name"
  106. :value="item.id">
  107. </el-option>
  108. </el-select> -->
  109. </div>
  110. <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3">
  111. <el-input v-model="courseName" class="student_input" :disabled="!(!peopleId)" placeholder="请输入需要搜索的姓名"></el-input>
  112. <span class="serach_icon" @click="searchCourse" ></span>
  113. </div>
  114. <div class="btnA" v-if="stype == 1 && !pdfLoading" @click="exportPDF">导出PDF</div>
  115. <div class="btnA" v-if="stype == 2" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
  116. 导出数据
  117. <div v-show="btnDisplay" class="buttonBox">
  118. <div type="primary" @click="exportExcel">下载汇总表格</div>
  119. <div type="primary" @click="exportAllWord">导出人员数据</div>
  120. </div>
  121. </div>
  122. <div class="btnA" v-if="stype == 3" @click="exportAllWord2">导出人员数据</div>
  123. </div>
  124. </div>
  125. <!-- 手机端 查看切换 isDesktop-->
  126. <div class="search_nav" style="display:flex;justify-content:space-evenly;border: none;" v-if="!isDesktop">
  127. <div class="right">
  128. <span :class="{ active2: stype == 1 }" @click="checkDataType(1)">按题目查看</span>
  129. <span :class="{ active2: stype == 2 }" @click="checkDataType(2)">按人员查看</span>
  130. <span :class="{ active2: stype == 3 }" @click="checkDataType(3)" v-show="false">按数量查看</span>
  131. </div>
  132. </div>
  133. <!-- 按题目pc端 isDesktop-->
  134. <div class="title_content" v-if="stype == 1 && isDesktop" v-loading="isLoading">
  135. <div class="title_box" v-if="!testArray.length"
  136. style="display: flex;align-items: center;justify-content: center;height: 500px;">
  137. 暂无内容
  138. </div>
  139. <div class="title_box" v-for="(item, index) in testArray" :key="index">
  140. <div class="title">
  141. <el-tooltip :content="selectType(item)" placement="top" effect="dark">
  142. <span class="test_icon"
  143. :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6 || item.type == 11, test_eva_file: item.type == 7,test_icon_time: item.type == 8 }"></span>
  144. </el-tooltip>
  145. <span style="line-height: 25px;">{{ item.title }}</span>
  146. <el-button v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title,index)">批量下载附件</el-button>
  147. <div v-if="item.type==7" style="right:0;position: absolute;">平均分:{{ getAverageScore(index) }}</div>
  148. </div>
  149. <div class="detail" v-if="item.detail">{{ item.detail }}</div>
  150. <div class="content1" v-if="item.type == 1">
  151. <div class="left">
  152. <div class="title">
  153. <span>选项</span>
  154. <span>小计</span>
  155. <span>比例</span>
  156. </div>
  157. <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
  158. <span>
  159. <el-tooltip :content="data.name" placement="top" effect="dark">
  160. <!-- content to trigger tooltip here -->
  161. <span>{{ data.name }}</span>
  162. </el-tooltip>
  163. </span>
  164. <span>{{ data.count }}</span>
  165. <span>
  166. <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
  167. :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress>
  168. </span>
  169. </div>
  170. </div>
  171. <div class="right">
  172. <checkPie :dataJ="item.array"></checkPie>
  173. </div>
  174. </div>
  175. <div class="content2" v-if="item.type == 3">
  176. <div class="left">
  177. <div class="title">
  178. <span>序号</span>
  179. <span>词频</span>
  180. <span>答案文本</span>
  181. </div>
  182. <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
  183. <span>{{ index2 + 1 }}</span>
  184. <span>{{ data.count }}次</span>
  185. <el-tooltip :content="data.name" placement="top" effect="dark">
  186. <!-- content to trigger tooltip here -->
  187. <span>{{ data.name }}</span>
  188. </el-tooltip>
  189. </div>
  190. </div>
  191. <div class="right">
  192. <wordcloud :data="item.array" nameKey="name" valueKey="count" :showTooltip="false"
  193. :wordClick="wordClickHandler">
  194. </wordcloud>
  195. </div>
  196. </div>
  197. <div class="content3" :style="{'position': 'relative','overflow': (fileLoading[index].bool ? 'hidden':'auto')}" v-if="item.type == 5">
  198. <div class="file" v-for="(file, index2) in item.array" :key="index + '-' + index2"
  199. @click.stop="checkFile(file)">
  200. <img class="download" src="../../../../assets/icon/fileIcon/download.png"
  201. @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
  202. <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
  203. <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
  204. <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
  205. <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
  206. <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
  207. <div class="name">
  208. <el-tooltip :content="file.name" placement="top" effect="dark">
  209. <span>{{ file.name }}</span>
  210. </el-tooltip>
  211. </div>
  212. </div>
  213. <div v-if="
  214. fileLoading[index].bool
  215. " class="mask">
  216. <div class="progressBox">
  217. <div class="lbox">
  218. <img src="../../../../assets/loading.gif" />打包中,请稍后
  219. </div>
  220. <div style="margin-bottom: 10px">
  221. <span>{{
  222. fileLoading[index].load
  223. }}</span>
  224. /
  225. <span>{{
  226. fileLoading[index].count
  227. }}</span>
  228. </div>
  229. <el-progress :text-inside="true" :stroke-width="20" :percentage=" fileLoading[index].progress
  230. ? fileLoading[index].progress
  231. : 0
  232. " style="width: 80%"></el-progress>
  233. </div>
  234. </div>
  235. </div>
  236. <div class="content4" v-if="item.type == 6">
  237. <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
  238. <div class="tup">
  239. <img :src="item.cover != null && item.cover != ''
  240. ? JSON.parse(item.cover).length > 0
  241. ? JSON.parse(item.cover)[0].url
  242. : mr
  243. : mr
  244. " alt />
  245. <div class="bottom_box">
  246. <div>
  247. <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
  248. <span>{{ item.title }}</span>
  249. </el-tooltip>
  250. </div>
  251. <div class="kc_t">
  252. <span>{{ item.username }}</span>
  253. <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
  254. </div>
  255. <div class="kc_time">
  256. <span style="color: #717C8D">创建日期:</span>{{ item.time }}
  257. </div>
  258. <div class="kc_time">
  259. <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
  265. {{ courses }}
  266. </div> -->
  267. </div>
  268. <div class="content1" v-if="item.type == 7">
  269. <div class="left">
  270. <div class="title">
  271. <span>评分</span>
  272. <span>小计</span>
  273. <span>比例</span>
  274. </div>
  275. <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
  276. <span>
  277. <span>{{ data.name }}</span>
  278. </span>
  279. <span>{{ data.count }}</span>
  280. <span>
  281. <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
  282. :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress>
  283. </span>
  284. </div>
  285. </div>
  286. <div class="right">
  287. <checkPie :dataJ="item.array"></checkPie>
  288. </div>
  289. </div>
  290. <div class="content2" v-if="item.type == 8">
  291. <div class="left">
  292. <div class="title">
  293. <span>序号</span>
  294. <span>词频</span>
  295. <span>日期</span>
  296. </div>
  297. <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
  298. <span>{{ index2 + 1 }}</span>
  299. <span>{{ data.count }}次</span>
  300. <el-tooltip :content="data.name" placement="top" effect="dark">
  301. <!-- content to trigger tooltip here -->
  302. <span>{{ data.name }}</span>
  303. </el-tooltip>
  304. </div>
  305. </div>
  306. <div class="right">
  307. <wordcloud :data="item.array" nameKey="name" valueKey="count" :showTooltip="false"
  308. :wordClick="wordClickHandler">
  309. </wordcloud>
  310. </div>
  311. </div>
  312. <div class="content4" v-if="item.type == 11">
  313. <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
  314. <div class="tup">
  315. <img :src="item.cover != null && item.cover != ''
  316. ? JSON.parse(item.cover).length > 0
  317. ? JSON.parse(item.cover)[0].url
  318. : mr
  319. : mr
  320. " alt />
  321. <div class="bottom_box">
  322. <div>
  323. <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
  324. <span>{{ item.title }}</span>
  325. </el-tooltip>
  326. </div>
  327. <div class="kc_t">
  328. <span>{{ item.username }}</span>
  329. <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
  330. </div>
  331. <div class="kc_time">
  332. <span style="color: #717C8D">创建日期:</span>{{ item.time }}
  333. </div>
  334. <div class="kc_time">
  335. <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
  336. </div>
  337. </div>
  338. </div>
  339. </div>
  340. <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
  341. {{ courses }}
  342. </div> -->
  343. </div>
  344. </div>
  345. </div>
  346. <!-- 按题目手机端 !isDesktop-->
  347. <div class="title_content" v-if="stype == 1 && !isDesktop" v-loading="isLoading">
  348. <div class="title_box" v-if="!testArray.length"
  349. style="display: flex;align-items: center;justify-content: center;height: 500px;">
  350. 暂无内容
  351. </div>
  352. <div class="title_box" v-for="(item, index) in testArray" :key="index">
  353. <div class="title" style="font-size: 16px;display: flex;justify-content: space-between;align-items: center;">
  354. <!-- <el-tooltip :content="selectType(item)" placement="top" effect="dark">
  355. <span class="test_icon"
  356. :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6, test_eva_file: item.type == 7,test_icon_time: item.type == 8 }"></span>
  357. </el-tooltip> -->
  358. <div style="display: flex;">
  359. <div class="topicTitCss">第{{ index+1 }}题:</div>
  360. <el-tooltip :content="item.title" placement="top" effect="dark">
  361. <div style="width: 100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ item.title }}</div>
  362. </el-tooltip>
  363. </div>
  364. <div style="display: flex;">
  365. <!-- <div v-if="item.type==7" style="right:0;position: absolute;">平均分:{{ getAverageScore(index) }}</div> -->
  366. <div style="color: rgba(0, 0, 0, 0.4);display: flex;align-items: center;">[{{ selectType(item) }}]</div>
  367. <!-- <el-button style="padding: 5px;" v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title)">批量下载附件</el-button> -->
  368. </div>
  369. </div>
  370. <div class="detail" v-if="item.detail">{{ item.detail }}</div>
  371. <div class="content1" style="width:100%;display: block;" v-if="item.type == 1">
  372. <div class="left" style="width:100%" v-if="!item.cut">
  373. <div class="isDesktopTitle">
  374. <div>选项</div>
  375. <div>小计</div>
  376. <div>比例</div>
  377. </div>
  378. <div class="isDesktopTitle" v-for="(data, index2) in item.array" :key="index + '-' + index2">
  379. <!-- <span> -->
  380. <el-tooltip :content="data.name" placement="top" effect="dark">
  381. <!-- content to trigger tooltip here -->
  382. <div>{{ data.name }}</div>
  383. </el-tooltip>
  384. <!-- </span> -->
  385. <div>{{ data.count }}</div>
  386. <div>
  387. {{ data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0 }}
  388. <!-- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
  389. :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress> -->
  390. </div>
  391. </div>
  392. </div>
  393. <div class="right isDesktopRight" v-if="item.cut">
  394. <checkPie :dataJ="item.array"></checkPie>
  395. </div>
  396. <div class="cutBtnBlockCss">
  397. <div class="cutBtnCss" @click="item.cut=!item.cut">{{ item.cut?'查看详情':'查看视图' }}</div>
  398. </div>
  399. </div>
  400. <div class="content2" style="width:100%;display: block;" v-if="item.type == 3">
  401. <div class="left" style="width:100%" v-if="!item.cut">
  402. <div class="title">
  403. <span>序号</span>
  404. <span>词频</span>
  405. <span>答案文本</span>
  406. </div>
  407. <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
  408. <span>{{ index2 + 1 }}</span>
  409. <span>{{ data.count }}次</span>
  410. <el-tooltip :content="data.name" placement="top" effect="dark">
  411. <!-- content to trigger tooltip here -->
  412. <span>{{ data.name }}</span>
  413. </el-tooltip>
  414. </div>
  415. </div>
  416. <div class="right isDesktopRight" v-if="item.cut">
  417. <wordcloud :data="item.array" nameKey="name" valueKey="count" :showTooltip="false"
  418. :wordClick="wordClickHandler">
  419. </wordcloud>
  420. </div>
  421. <div class="cutBtnBlockCss">
  422. <div class="cutBtnCss" @click="item.cut=!item.cut">{{ item.cut?'查看详情':'查看视图' }}</div>
  423. </div>
  424. </div>
  425. <div class="content3" v-if="item.type == 5">
  426. <div class="file" v-for="(file, index2) in item.array" :key="index + '-' + index2"
  427. @click.stop="checkFile(file)">
  428. <img class="download" src="../../../../assets/icon/fileIcon/download.png"
  429. @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
  430. <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
  431. <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
  432. <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
  433. <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
  434. <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
  435. <div class="name">
  436. <el-tooltip :content="file.name" placement="top" effect="dark">
  437. <span>{{ file.name }}</span>
  438. </el-tooltip>
  439. </div>
  440. </div>
  441. </div>
  442. <div class="content4" v-if="item.type == 6">
  443. <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
  444. <div class="tup">
  445. <img :src="item.cover != null && item.cover != ''
  446. ? JSON.parse(item.cover).length > 0
  447. ? JSON.parse(item.cover)[0].url
  448. : mr
  449. : mr
  450. " alt />
  451. <div class="bottom_box">
  452. <div>
  453. <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
  454. <span>{{ item.title }}</span>
  455. </el-tooltip>
  456. </div>
  457. <div class="kc_t">
  458. <span>{{ item.username }}</span>
  459. <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
  460. </div>
  461. <div class="kc_time">
  462. <span style="color: #717C8D">创建日期:</span>{{ item.time }}
  463. </div>
  464. <div class="kc_time">
  465. <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
  466. </div>
  467. </div>
  468. </div>
  469. </div>
  470. <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
  471. {{ courses }}
  472. </div> -->
  473. </div>
  474. <div class="content1" style="width:100%;display: block;" v-if="item.type == 7">
  475. <div class="left" style="width:100%" v-if="!item.cut">
  476. <div class="isDesktopTitle">
  477. <div>评分</div>
  478. <div>小计</div>
  479. <div style="width: 120px;">比例</div>
  480. </div>
  481. <div class="isDesktopTitle" v-for="(data, index2) in item.array" :key="index + '-' + index2">
  482. <!-- <span> -->
  483. <div>{{ data.name }}</div>
  484. <!-- </span> -->
  485. <div>{{ data.count }}</div>
  486. <div style="width: 120px;">
  487. {{ data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0 }}
  488. <!-- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
  489. :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress> -->
  490. </div>
  491. </div>
  492. </div>
  493. <div class="right isDesktopRight" v-if="item.cut">
  494. <checkPie :dataJ="item.array"></checkPie>
  495. </div>
  496. <div class="cutBtnBlockCss">
  497. <div class="cutBtnCss" @click="item.cut=!item.cut">{{ item.cut?'查看详情':'查看视图' }}</div>
  498. </div>
  499. </div>
  500. <div class="content2" style="width:100%;display: block;" v-if="item.type == 8">
  501. <div class="left" style="width:100%" v-if="!item.cut">
  502. <div class="title">
  503. <span>序号</span>
  504. <span>词频</span>
  505. <span>日期</span>
  506. </div>
  507. <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
  508. <span>{{ index2 + 1 }}</span>
  509. <span>{{ data.count }}次</span>
  510. <el-tooltip :content="data.name" placement="top" effect="dark">
  511. <!-- content to trigger tooltip here -->
  512. <span>{{ data.name }}</span>
  513. </el-tooltip>
  514. </div>
  515. </div>
  516. <div class="right isDesktopRight" v-if="item.cut">
  517. <wordcloud :data="item.array" nameKey="name" valueKey="count" :showTooltip="false"
  518. :wordClick="wordClickHandler">
  519. </wordcloud>
  520. </div>
  521. <div class="cutBtnBlockCss">
  522. <div class="cutBtnCss" @click="item.cut=!item.cut">{{ item.cut?'查看详情':'查看视图' }}</div>
  523. </div>
  524. </div>
  525. <div class="content4" v-if="item.type == 11">
  526. <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
  527. <div class="tup">
  528. <img :src="item.cover != null && item.cover != ''
  529. ? JSON.parse(item.cover).length > 0
  530. ? JSON.parse(item.cover)[0].url
  531. : mr
  532. : mr
  533. " alt />
  534. <div class="bottom_box">
  535. <div>
  536. <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
  537. <span>{{ item.title }}</span>
  538. </el-tooltip>
  539. </div>
  540. <div class="kc_t">
  541. <span>{{ item.username }}</span>
  542. <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
  543. </div>
  544. <div class="kc_time">
  545. <span style="color: #717C8D">创建日期:</span>{{ item.time }}
  546. </div>
  547. <div class="kc_time">
  548. <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
  549. </div>
  550. </div>
  551. </div>
  552. </div>
  553. <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
  554. {{ courses }}
  555. </div> -->
  556. </div>
  557. </div>
  558. </div>
  559. <!-- 按人员pc端 isDesktop-->
  560. <div class="table_content" v-if="stype == 2 && isDesktop">
  561. <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
  562. style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
  563. @filter-change="handleFilterChange">
  564. <el-table-column fixed label="序号" width="80px" align="left">
  565. <template slot-scope="scope">
  566. {{ scope.$index + 1 }}
  567. </template>
  568. </el-table-column>
  569. <el-table-column fixed prop="name" label="提交人" width="120px" align="left">
  570. </el-table-column>
  571. <el-table-column prop="time" label="提交时间" width="170px" align="left">
  572. <template slot-scope="scope">
  573. <span :style="`${testJson.overtime&&new Date(testJson.overtime)<new Date(scope.row.time)?'color:#d12920':''}`">{{ scope.row.time }}</span>
  574. </template>
  575. </el-table-column>
  576. <el-table-column v-for="(item, index) in chapters" :key="index" :label="item.json.title"
  577. :min-width="item.type == 5 ? 200 : 150" align="left" :filters="item.type == 1 ? item.nameFilters : (item.type == 6 || item.type == 11)? item.nameFilters : null"
  578. :filter-method="item.type == 1 ? (value, row) => { return filterName(value, row, index) } : (item.type == 6 || item.type == 11)?(value, row) => { return filterCourse(value, row, index)}:null"
  579. :filter-placement="item.type == 1 || item.type ==6|| item.type ==11 ? filterPlacement : null">
  580. <template slot-scope="scope">
  581. <div v-if="scope.row.array[index].type == 1" style="display: flex; flex-wrap: wrap;">
  582. <span class="answer_type" v-for="(answer2, index2) in scope.row.array[index].json.answer2"
  583. :key="index + '-' + index2">{{ scope.row.array[index].json.array[answer2].option }}</span>
  584. </div>
  585. <div v-if="scope.row.array[index].type == 3 || scope.row.array[index].type == 8" style="display: flex; flex-wrap: wrap;">
  586. {{ scope.row.array[index].json.answer2 }}
  587. </div>
  588. <div v-if="scope.row.array[index].type == 5" style="display: flex; flex-wrap: wrap;"
  589. class="table_file">
  590. <div class="file" v-for="(file, index2) in scope.row.array[index].json.file"
  591. :key="index + '-' + index2" @click.stop="checkFile(file)">
  592. <img class="download" src="../../../../assets/icon/fileIcon/download.png"
  593. @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
  594. <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
  595. <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
  596. <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
  597. <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
  598. <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
  599. <div class="name">
  600. <el-tooltip :content="file.name" placement="top" effect="dark">
  601. <span>{{ file.name }}</span>
  602. </el-tooltip>
  603. </div>
  604. </div>
  605. </div>
  606. <div v-if="scope.row.array[index].type == 6" style="display: flex; flex-wrap: wrap;">
  607. {{ scope.row.array[index].json.answer2}}
  608. </div>
  609. <div v-if="scope.row.array[index].type == 7" style="display: flex; flex-wrap: wrap;">
  610. {{ getScore(scope.row.array[index].json) }}
  611. </div>
  612. <div v-if="scope.row.array[index].type == 11" style="display: flex; flex-wrap: wrap;">
  613. {{ scope.row.array[index].json.answer2}}
  614. </div>
  615. </template>
  616. </el-table-column>
  617. <el-table-column label="操作" width="300px" fixed="right" v-if="isN!=1">
  618. <template slot-scope="scope">
  619. <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
  620. <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
  621. <el-button @click="deleteTest(scope.row.id)" type="primary" size="small">删除</el-button>
  622. </template>
  623. </el-table-column>
  624. </el-table>
  625. </div>
  626. <!-- 按人员手机端 !isDesktop-->
  627. <div class="table_content" v-if="stype == 2 && !isDesktop">
  628. <div v-for="(i,index) in worksArray" :key="i.id" class="isDesktopTable_content">
  629. <div class="isDTitle CutCss">
  630. <div style="font-size: 16px;font-weight: 600;">{{ i.name }}</div>
  631. <div :style="'font-size: 14px',i.cut?'color:rgba(54, 129, 252, 1)':'color: rgba(0, 0, 0, 0.6);'">{{ i.time }}</div>
  632. <div @click="i.cut=!i.cut">
  633. <img v-if="!i.cut" src="../../../../assets/icon/fileIcon/downImg.png" alt="">
  634. <img v-else src="../../../../assets/icon/fileIcon/upImg.png" alt="">
  635. </div>
  636. </div>
  637. <div v-if="i.cut">
  638. <div class="isDBri">
  639. <div>序号:{{ i.time }}</div>
  640. <div>提交时间:{{ i.time }}</div>
  641. <div>评课人:{{ i.uteaName }}</div>
  642. </div>
  643. <div style="height: 1px;background-color: #717C8D;width: 100%;margin-bottom: 10px;"></div>
  644. <div>
  645. <div v-for="(k,kin) in chapters" :key="k.id" class="isCTiBlc">
  646. <div v-if="k.type == 1">
  647. <div class="isDTitle2">
  648. <div style="display: flex;justify-content: space-between;">
  649. <div style="display: flex;">
  650. <span class="topicTitCss">第{{kin+1}}题:</span>
  651. <div class="isDTitle2JsonTit">
  652. {{ k.json.title }}
  653. </div>
  654. </div>
  655. <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
  656. </div>
  657. <div class="IsDAnswer">
  658. <div v-for="(r, index2) in i.array[kin].json.answer2"
  659. :key="index + '-' + index2">
  660. {{ i.array[kin].json.array[r].option }}
  661. </div>
  662. </div>
  663. </div>
  664. </div>
  665. <div v-if="k.type == 3 || k.type == 8">
  666. <div class="isDTitle2">
  667. <div style="display: flex;justify-content: space-between;">
  668. <div style="display: flex;">
  669. <span class="topicTitCss">第{{kin+1}}题:</span>
  670. <div class="isDTitle2JsonTit">
  671. {{ k.json.title }}
  672. </div>
  673. </div>
  674. <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
  675. </div>
  676. <div class="IsDAnswer">
  677. {{ i.array[kin].json.answer2 }}
  678. </div>
  679. </div>
  680. </div>
  681. <div v-if="k.type == 5">
  682. <div class="isDTitle2">
  683. <div style="display: flex;justify-content: space-between;">
  684. <div style="display: flex;">
  685. <span class="topicTitCss">第{{kin+1}}题:</span>
  686. <div class="isDTitle2JsonTit">
  687. {{ k.json.title }}
  688. </div>
  689. </div>
  690. <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
  691. </div>
  692. <div class="IsDAnswer">
  693. <div class="IsDFile" v-for="(file, index2) in i.array[kin].json.file"
  694. :key="index + '-' + index2" @click.stop="checkFile(file)">
  695. <img class="IsDownload" src="../../../../assets/icon/fileIcon/download.png"
  696. @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
  697. <img class="IsDImg" :src="wordIcon" alt="" v-if="file.type == 1" />
  698. <img class="IsDImg" :src="videoIcon" alt="" v-if="file.type == 2" />
  699. <img class="IsDImg" :src="file.url" alt="" v-if="file.type == 3" />
  700. <img class="IsDImg" :src="wordIcon" alt="" v-if="file.type == 4" />
  701. <img class="IsDImg" :src="fileIcon" alt="" v-if="file.type == 5" />
  702. <div class="name" style="height: 30px;background-color: #f9f9f9;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  703. <!-- <el-tooltip :content="file.name" placement="top" effect="dark"> -->
  704. {{ file.name }}
  705. <!-- </el-tooltip> -->
  706. </div>
  707. </div>
  708. </div>
  709. </div>
  710. </div>
  711. <div v-if="k.type.type == 6">
  712. <div class="isDTitle2">
  713. <div style="display: flex;justify-content: space-between;">
  714. <div style="display: flex;">
  715. <span class="topicTitCss">第{{kin+1}}题:</span>
  716. <div class="isDTitle2JsonTit">
  717. {{ k.json.title }}
  718. </div>
  719. </div>
  720. <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
  721. </div>
  722. <div class="IsDAnswer">
  723. {{ i.array[kin].json.answer2 }}
  724. </div>
  725. </div>
  726. </div>
  727. <div v-if="k.type == 7">
  728. <div class="isDTitle2">
  729. <div style="display: flex;justify-content: space-between;">
  730. <div style="display: flex;">
  731. <span class="topicTitCss">第{{kin+1}}题:</span>
  732. <div class="isDTitle2JsonTit">
  733. {{ k.json.title }}
  734. </div>
  735. </div>
  736. <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
  737. </div>
  738. <div class="IsDAnswer">
  739. {{ getScore(i.array[index].json) }}
  740. </div>
  741. </div>
  742. </div>
  743. <div v-if="k.type.type == 11">
  744. <div class="isDTitle2">
  745. <div style="display: flex;justify-content: space-between;">
  746. <div style="display: flex;">
  747. <span class="topicTitCss">第{{kin+1}}题:</span>
  748. <div class="isDTitle2JsonTit">
  749. {{ k.json.title }}
  750. </div>
  751. </div>
  752. <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
  753. </div>
  754. <div class="IsDAnswer">
  755. {{ i.array[kin].json.answer2 }}
  756. </div>
  757. </div>
  758. </div>
  759. </div>
  760. </div>
  761. <div style="width: 100%;display: flex;justify-content: end;">
  762. <div @click="i.cut=!i.cut" style="display: flex;flex-direction: column;align-items: center">
  763. <img src="../../../../assets/icon/fileIcon/retractImg.png" alt="">
  764. <div style="color: rgba(0, 0, 0, 0.4);font-size: 16px;">收起</div>
  765. </div>
  766. </div>
  767. </div>
  768. <div style="height: 1px;background-color: #717C8D;width: 100%;margin-bottom: 10px;"></div>
  769. </div>
  770. <!-- <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
  771. style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
  772. @filter-change="handleFilterChange">
  773. <el-table-column fixed label="序号" width="80px" align="left">
  774. <template slot-scope="scope">
  775. {{ scope.$index + 1 }}
  776. </template>
  777. </el-table-column>
  778. <el-table-column fixed prop="name" label="提交人" width="120px" align="left">
  779. </el-table-column>
  780. <el-table-column prop="time" label="提交时间" width="170px" align="left">
  781. <template slot-scope="scope">
  782. <span :style="`${testJson.overtime&&new Date(testJson.overtime)<new Date(scope.row.time)?'color:#d12920':''}`">{{ scope.row.time }}</span>
  783. </template>
  784. </el-table-column>
  785. <el-table-column v-for="(item, index) in chapters" :key="index" :label="item.json.title"
  786. :min-width="item.type == 5 ? 200 : 150" align="left" :filters="item.type == 1 ? item.nameFilters : item.type == 6? item.nameFilters : null"
  787. :filter-method="item.type == 1 ? (value, row) => { return filterName(value, row, index) } : item.type == 6?(value, row) => { return filterCourse(value, row, index)}:null"
  788. :filter-placement="item.type == 1 || item.type ==6 ? filterPlacement : null">
  789. <template slot-scope="scope">
  790. <div v-if="scope.row.array[index].type == 1" style="display: flex; flex-wrap: wrap;">
  791. <span class="answer_type" v-for="(answer2, index2) in scope.row.array[index].json.answer2"
  792. :key="index + '-' + index2">{{ scope.row.array[index].json.array[answer2].option }}</span>
  793. </div>
  794. <div v-if="scope.row.array[index].type == 3 || scope.row.array[index].type == 8" style="display: flex; flex-wrap: wrap;">
  795. {{ scope.row.array[index].json.answer2 }}
  796. </div>
  797. <div v-if="scope.row.array[index].type == 5" style="display: flex; flex-wrap: wrap;"
  798. class="table_file">
  799. <div class="file" v-for="(file, index2) in scope.row.array[index].json.file"
  800. :key="index + '-' + index2" @click.stop="checkFile(file)">
  801. <img class="download" src="../../../../assets/icon/fileIcon/download.png"
  802. @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
  803. <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
  804. <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
  805. <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
  806. <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
  807. <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
  808. <div class="name">
  809. <el-tooltip :content="file.name" placement="top" effect="dark">
  810. <span>{{ file.name }}</span>
  811. </el-tooltip>
  812. </div>
  813. </div>
  814. </div>
  815. <div v-if="scope.row.array[index].type == 6" style="display: flex; flex-wrap: wrap;">
  816. {{ scope.row.array[index].json.answer2}}
  817. </div>
  818. <div v-if="scope.row.array[index].type == 7" style="display: flex; flex-wrap: wrap;">
  819. {{ getScore(scope.row.array[index].json) }}
  820. </div>
  821. </template>
  822. </el-table-column>
  823. <el-table-column label="操作" width="300px" fixed="right" v-if="isN!=1">
  824. <template slot-scope="scope">
  825. <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
  826. <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
  827. <el-button @click="deleteTest(scope.row.id)" type="primary" size="small">删除</el-button>
  828. </template>
  829. </el-table-column>
  830. </el-table> -->
  831. </div>
  832. <div class="table_content" v-if="stype == 3">
  833. <div class="student_table">
  834. <el-table ref="table" :data="tableData" border :fit="true" v-loading="isLoading" style="width: 100%"
  835. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  836. <el-table-column prop="username" label="提交人" min-width="15" align="center">
  837. </el-table-column>
  838. <el-table-column prop="time" label="提交时间" min-width="15" align="center">
  839. </el-table-column>
  840. <el-table-column label="是否批改" min-width="15" align="center">
  841. <template slot-scope="scope">
  842. <div>{{ scope.row.type == 3 ? '是' : '否' }}</div>
  843. </template>
  844. </el-table-column>
  845. <el-table-column label="操作" width="300px" v-if="isDesktop">
  846. <template slot-scope="scope" >
  847. <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
  848. <el-button @click="setWordHtml2(scope.row)" type="primary" size="small">导出答题信息</el-button>
  849. <el-button @click="deleteTest(scope.row.id)" type="primary" size="small">删除</el-button>
  850. </template>
  851. </el-table-column>
  852. </el-table>
  853. </div>
  854. <div class="student_page">
  855. <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total"
  856. @current-change="handleCurrentChange">
  857. </el-pagination>
  858. </div>
  859. </div>
  860. </div>
  861. </div>
  862. </div>
  863. <share-box :testJson="testJson" :TeachingValue="TeachingValue" :TeachName="TeachNameCpt" :dialogVisibleShare.sync="dialogVisibleShare"></share-box>
  864. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  865. <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
  866. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl"></wOffice>
  867. </div>
  868. </template>
  869. <script>
  870. import shareBox from '../shareBox/index.vue'
  871. import videoIcon from '../../../../assets/icon/fileIcon/isVideo.png'
  872. import wordIcon from '../../../../assets/icon/fileIcon/isWord.png'
  873. import fileIcon from '../../../../assets/icon/fileIcon/word2.png'
  874. import wVideo from "../file/wVideo.vue";
  875. import wpdf from "../file/wPdf2.vue";
  876. import wOffice from "../file/wOffice.vue";
  877. import wordcloud from 'vue-wordcloud';
  878. import checkPie from '../data/checkPie.vue';
  879. import { downloadPDF } from '../../../tools/pdf'
  880. import JSZip from "jszip";
  881. import FileSaver from "file-saver";
  882. import XLSX from "xlsx-js-style";
  883. const getFile = (url) => {
  884. return new Promise((resolve, reject) => {
  885. var credentials = {
  886. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  887. secretAccessKey: "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",
  888. }; //秘钥形式的登录上传
  889. window.AWS.config.update(credentials);
  890. window.AWS.config.region = "cn-northwest-1"; //设置区域
  891. let url2 = url;
  892. let _url2 = "";
  893. if (
  894. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  895. ) {
  896. _url2 = url2.split(
  897. "https://view.officeapps.live.com/op/view.aspx?src="
  898. )[1];
  899. } else {
  900. _url2 = url2;
  901. }
  902. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  903. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1].replace(/\+/g, ' '))
  904. var params = {
  905. Bucket: "ccrb",
  906. Key: name
  907. };
  908. s3.getObject(params, function (err, data) {
  909. if (err) {
  910. console.log(err, err.stack)
  911. resolve({ data: 1 });
  912. } else {
  913. resolve({ data: data.Body });
  914. console.log(data);
  915. } // sxuccessful response
  916. });
  917. // axios({
  918. });
  919. };
  920. export default {
  921. components: {
  922. shareBox,
  923. wVideo,
  924. wpdf,
  925. wOffice,
  926. checkPie,
  927. wordcloud
  928. },
  929. data() {
  930. return {
  931. userid: this.$route.query.userid,
  932. oid: this.$route.query.oid,
  933. org: this.$route.query.org,
  934. role: this.$route.query.role,
  935. cid: this.$route.query.cid,
  936. isN: this.$route.query.isN,
  937. peopleId: this.$route.query.peopleId,
  938. screenWidth: window.innerWidth,
  939. isDesktop: false,
  940. title: "",
  941. testType: [],
  942. see: false,
  943. cJson: [],
  944. loading: false,
  945. look: "",
  946. TeachingOptions:[],
  947. TeachingValue :'',
  948. SubmitTimeOptions: [],
  949. SubmitTime: '',
  950. tableHeight: 500,
  951. isLoading: false,
  952. pageSize: 10,
  953. total: 0,
  954. page: 1,
  955. tableData: [],
  956. testJson: {},
  957. works: [],
  958. iscount: 0,
  959. pcount: 0,
  960. stype: 1,
  961. courseName: "",
  962. dialogVisibleShare: false,
  963. worksArray: [],
  964. testArray: [],
  965. options2: {
  966. 1: "选择题",
  967. // 2: "问答题",
  968. 3: "问答题",
  969. 4: "添加文档",
  970. 5: "附件"
  971. },
  972. videoIcon: videoIcon,
  973. wordIcon: wordIcon,
  974. fileIcon: fileIcon,
  975. dialogVisiblePdf: false,
  976. dialogVisibleVideo: false,
  977. dialogVisibleOffice: false,
  978. wurl: "",
  979. chapters: [],
  980. filterPlacement: 'bottom-end',
  981. pdfLoading: false,
  982. btnDisplay: false,
  983. fileLoading: [],
  984. // fileLoadCount: [],
  985. // fileLoadNum: [],
  986. // infoprogress: [],
  987. };
  988. },
  989. watch: {},
  990. computed: {
  991. TeachNameCpt: function () {
  992. // `this` 指向 vm 实例
  993. return this.TeachingOptions.filter(i => {return i.id == this.TeachingValue})
  994. },
  995. // vcWords() {
  996. // return function (array) {
  997. // let _array = [];
  998. // if (array.length) {
  999. // for (var i = 0; i < array.length; i++) {
  1000. // _array.push(
  1001. // {
  1002. // text: array[i].name,
  1003. // weight: array[i].count,
  1004. // }
  1005. // )
  1006. // }
  1007. // }
  1008. // console.log(_array);
  1009. // return array.length ? _array : [];
  1010. // };
  1011. // },
  1012. getScore() {
  1013. return function (item) {
  1014. let array = []
  1015. for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
  1016. array.push(i)
  1017. }
  1018. return item.answer2 ? array[item.answer2] : ''
  1019. };
  1020. },
  1021. selectType() {
  1022. return function (item) {
  1023. if (item.type == 1 && item.atype == 2) {
  1024. return '多选题'
  1025. } else if (item.type == 1 && item.atype == 1) {
  1026. return '单选题'
  1027. } else if (item.type == 3) {
  1028. return '问答题'
  1029. } else if (item.type == 5) {
  1030. return '附件'
  1031. } else if (item.type == 6 || item.type == 11) {
  1032. return '课程'
  1033. } else if (item.type == 7) {
  1034. return '评分'
  1035. } else if (item.type == 8) {
  1036. return '日期'
  1037. }
  1038. };
  1039. },
  1040. selectType2() {
  1041. return function (val1,val2) {
  1042. if (val1 == 1 && val2 == 2) {
  1043. return '多选题'
  1044. } else if (val1 == 1 && val2 == 1) {
  1045. return '单选题'
  1046. } else if (val1 == 3) {
  1047. return '问答题'
  1048. } else if (val1 == 5) {
  1049. return '附件'
  1050. } else if (val1 == 6) {
  1051. return '课程'
  1052. } else if (val1 == 7) {
  1053. return '评分'
  1054. } else if (val1 == 8) {
  1055. return '日期'
  1056. }
  1057. };
  1058. },
  1059. // 获取评分的平均分
  1060. getAverageScore(){
  1061. return (_index)=>{
  1062. let _result = 0;
  1063. let _sum = 0;
  1064. this.worksArray.forEach(i1=>{
  1065. _result+=i1.array[_index].json.answer2
  1066. _sum+=1;
  1067. })
  1068. _result = _sum ? (_result/_sum).toFixed(2) : 0
  1069. return _result ? _result : 0;
  1070. }
  1071. }
  1072. },
  1073. methods: {
  1074. fileClose(done){
  1075. done()
  1076. },
  1077. //获取教研室列表
  1078. getClass2() {
  1079. let params = {
  1080. oid: this.oid,
  1081. };
  1082. this.ajax
  1083. .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
  1084. .then((res) => {
  1085. console.log('this.TeachingOptions',this.TeachingOptions);
  1086. console.log(res.data);
  1087. let data = res.data[0];
  1088. this.TeachingOptions.forEach(e=>{
  1089. data.forEach(i=>{
  1090. if (e.id == i.id) {
  1091. e.name = i.name
  1092. }
  1093. })
  1094. })
  1095. })
  1096. .catch((err) => {
  1097. this.isLoading = false;
  1098. console.error(err);
  1099. });
  1100. },
  1101. getClass3() {
  1102. let params = {
  1103. oid: this.oid,
  1104. };
  1105. this.ajax
  1106. .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
  1107. .then((res) => {
  1108. console.log(res.data);
  1109. this.TeachingOptions = res.data[0].filter(item=>{
  1110. return item.parentid == '6'
  1111. });
  1112. // console.log('this.TeachingOptions',this.TeachingOptions);
  1113. })
  1114. .catch((err) => {
  1115. this.isLoading = false;
  1116. console.error(err);
  1117. });
  1118. },
  1119. filterName(value, row, index) {
  1120. let name = []
  1121. for (var i = 0; i < row.array[index].json.answer2.length; i++) {
  1122. name.push(row.array[index].json.array[row.array[index].json.answer2[i]].option)
  1123. }
  1124. console.log(name.indexOf(value) != -1);
  1125. return name.indexOf(value) != -1;
  1126. },
  1127. // 筛选课程
  1128. filterCourse(value, row, index) {
  1129. return row.array[index].json.answer2.indexOf(value) != -1;
  1130. },
  1131. wordClickHandler(name, value) {
  1132. // this.$notify({
  1133. // title: name,
  1134. // message: "数量:"+value
  1135. // });
  1136. },
  1137. retrunCourse() {
  1138. this.goTo(
  1139. "/test?userid=" +
  1140. this.userid +
  1141. "&oid=" +
  1142. this.oid +
  1143. "&org=" +
  1144. this.org +
  1145. "&role=" +
  1146. this.role
  1147. );
  1148. },
  1149. goTo(path) {
  1150. this.$router.push(path);
  1151. },
  1152. tableRowClassName({ row, rowIndex }) {
  1153. if ((rowIndex + 1) % 2 === 0) {
  1154. return "even_row";
  1155. } else {
  1156. return "";
  1157. }
  1158. },
  1159. changeHeight() {
  1160. if (this.stype == 1) {
  1161. return
  1162. }
  1163. this.tableHeight = this.$refs.stepBox.offsetHeight - 120;
  1164. if (this.tableHeight <= 530) {
  1165. this.tableHeight = 530;
  1166. }
  1167. // 监听窗口大小变化
  1168. let self = this;
  1169. window.onresize = function () {
  1170. if (self.stype == 1) {
  1171. return
  1172. }
  1173. self.tableHeight = this.$refs.stepBox.offsetHeight - 120;
  1174. if (self.tableHeight <= 530) {
  1175. self.tableHeight = 530;
  1176. }
  1177. };
  1178. // this.$refs.table.$el.offsetTop:表格距离浏览器的高度 //200表示你想要调整的表格距离底部的高度(你可以自己随意调整),因为我们一般都有放分页组件的,所以需要给它留一个高度
  1179. },
  1180. handleCurrentChange(val) {
  1181. this.page = val;
  1182. this.getData2();
  1183. },
  1184. getTest(row) {
  1185. this.$router.push(
  1186. "/checkTest2?cid=" +
  1187. row.courseid +
  1188. "&userid=" +
  1189. this.userid +
  1190. "&userid2=" +
  1191. row.userid +
  1192. "&tid=" +
  1193. row.id +
  1194. "&oid=" +
  1195. this.oid +
  1196. "&org=" +
  1197. this.org +
  1198. "&type=2" +
  1199. "&role=" +
  1200. this.role
  1201. );
  1202. },
  1203. checkDataType(type) {
  1204. this.TeachingValue = ''
  1205. if (this.stype != type) {
  1206. this.stype = type
  1207. this.courseName = ''
  1208. if (type == 3) {
  1209. this.getData2();
  1210. } else {
  1211. this.getData();
  1212. }
  1213. this.changeHeight();
  1214. }
  1215. },
  1216. searchCourse() {
  1217. if (this.stype == 3) {
  1218. this.getData2()
  1219. } else {
  1220. this.getData()
  1221. }
  1222. },
  1223. getData() {
  1224. this.isLoading = true;
  1225. let params = {
  1226. cid: this.cid,
  1227. cn: this.courseName,
  1228. tim : !this.SubmitTime? '' : this.SubmitTime,
  1229. tea: this.TeachingValue
  1230. };
  1231. this.ajax
  1232. .get(this.$store.state.api + "getTestWorksNoPageCopy", params)
  1233. .then(async (res) => {
  1234. this.testJson = res.data[0][0]
  1235. console.log('this.testJson',JSON.parse(JSON.stringify(this.testJson)));
  1236. let a = ''
  1237. if(this.testJson.juriP){
  1238. a = this.testJson.juriP
  1239. }
  1240. if(this.testJson.juriP2){
  1241. if(a){
  1242. a = this.testJson.juriP+','+this.testJson.juriP2
  1243. }else {
  1244. a = this.testJson.juriP2
  1245. }
  1246. }
  1247. this.testJson.juriP = a
  1248. if (this.testJson.juriP) {
  1249. let ajuri2 = this.testJson.juri2.split (',');
  1250. this.TeachingOptions = ajuri2.map((key, index) => ({
  1251. id : key,
  1252. name: ''
  1253. }));
  1254. this.getClass2()
  1255. }else{
  1256. this.getClass3()
  1257. }
  1258. // console.log('dddd',this.TeachingOptions);
  1259. this.works = res.data[1]
  1260. this.iscount = res.data[2][0].count
  1261. this.pcount = res.data[3][0].count
  1262. let chapters = this.setJSON(this.setJson2(JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))))
  1263. this.chapters = this.setFilter(this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))))
  1264. let courseCount11 = []
  1265. let testArray = []
  1266. let array = []
  1267. for (let i = 0; i < this.works.length; i++) {
  1268. let cJson = this.setJSON(JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson))))
  1269. if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
  1270. let _json = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson))))
  1271. for (var ja = 0; ja < _json.length; ja++) {
  1272. let _json2 = _json[ja].json
  1273. if (_json[ja].type == 6) {
  1274. let _cjson = await this.getCourse(_json2.answer2)
  1275. _json[ja].json.answer2 = _cjson ? _cjson.title : ''
  1276. }
  1277. if(_json[ja].type == 11){
  1278. let _answer = _json2.answer2
  1279. _answer.length ? courseCount11 = courseCount11.concat(_answer) : ''
  1280. _json[ja].json.courseId = _answer ? _answer : [];
  1281. let params = {
  1282. cid:_answer.length ? _answer.join(",") : ''
  1283. }
  1284. let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
  1285. let result = data.data[0]
  1286. let _title = []
  1287. // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
  1288. result.forEach(i=>{
  1289. _title.push(i.title)
  1290. })
  1291. _json[ja].json.answer2 = _title.length ? _title.join(',') : '';
  1292. }
  1293. }
  1294. array.push({
  1295. courseid: this.works[i].courseid,
  1296. id: this.works[i].id,
  1297. userid: this.works[i].userid,
  1298. name: this.works[i].username ? this.works[i].username : '匿名',
  1299. time: this.works[i].time,
  1300. array: _json,
  1301. cut:0,
  1302. uteaName: this.works[i].uteaName,
  1303. courseJson: JSON.parse(this.works[i].courseJson),
  1304. })
  1305. }
  1306. }
  1307. for (var i = 0; i < this.chapters.length; i++) {
  1308. let el = this.chapters[i]
  1309. let topic = {
  1310. type: el.type,
  1311. cut: 0,
  1312. title: el.json ? el.json.title : '',
  1313. detail: el.json ? el.json.detail : '',
  1314. atype: el.json ? el.json.type : '',
  1315. choice: el.json ? el.json.array : '',
  1316. array: [],
  1317. answer: el.json ? el.json.answer : '',
  1318. count: 0,
  1319. courses: el.json ? el.json.courses : [],
  1320. small: el.json ? el.json.small : '',
  1321. big: el.json ? el.json.big : '',
  1322. }
  1323. if (topic.type == 1) {
  1324. for (var t = 0; t < topic.choice.length; t++) {
  1325. topic.array.push({
  1326. name: topic.choice[t].option,
  1327. count: 0
  1328. })
  1329. }
  1330. } else if (topic.type == 3) {
  1331. } else if (topic.type == 5) {
  1332. } else if (topic.type == 6) {
  1333. let _answer = topic.courses
  1334. topic.array = _answer
  1335. topic.courseArray = [];
  1336. let params = {
  1337. cid:topic.array ? topic.array.join(",") : ''
  1338. }
  1339. let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
  1340. let result = data.data[0]
  1341. // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
  1342. result.forEach(i=>{
  1343. if(this.chapters.find(f=>f.type==6).nameFilters.find(c=>c.value==i.title)==undefined){
  1344. this.chapters.find(i=>i.type==6).nameFilters.push({text:i.title,value:i.title})
  1345. }
  1346. })
  1347. // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.title}})
  1348. result.forEach(i=>i.update_at=new Date(i.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-'))
  1349. topic.courseArray = result;
  1350. // topic.array.forEach(async i => {
  1351. // let data = await this.getCourse(i)
  1352. // console.log(data.update_at)
  1353. // data.update_at = new Date(data.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-')
  1354. // topic.courseArray.push(data)
  1355. // })
  1356. } else if (topic.type == 7) {
  1357. for (var t = parseInt(topic.small); t <= parseInt(topic.big); t++) {
  1358. topic.array.push({
  1359. name: t,
  1360. count: 0
  1361. })
  1362. }
  1363. } else if (topic.type == 11) {
  1364. const uniqueArray = courseCount11.filter((item, index) => courseCount11.indexOf(item) === index);
  1365. let _answer = uniqueArray
  1366. topic.array = _answer
  1367. topic.courseArray = [];
  1368. let params = {
  1369. cid:topic.array ? topic.array.join(",") : ''
  1370. }
  1371. let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
  1372. let result = data.data[0]
  1373. // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
  1374. result.forEach(i=>{
  1375. if(this.chapters.find(f=>f.type==11).nameFilters.find(c=>c.value==i.title)==undefined){
  1376. this.chapters.find(i=>i.type==11).nameFilters.push({text:i.title,value:i.title})
  1377. console.log(this.chapters);
  1378. }
  1379. })
  1380. result.forEach(i=>i.update_at=new Date(i.update_at).toLocaleString('zh-CN', {year: 'numeric',month: '2-digit',day: '2-digit',hour: '2-digit',minute: '2-digit',second: '2-digit',hour12: false}).replace(/\//g,'-'))
  1381. topic.courseArray = result;
  1382. }
  1383. for (var j = 0; j < array.length; j++) {
  1384. let el2 = array[j]
  1385. if (topic.type == 1) {
  1386. let _answer = el2.array[i].json.answer2
  1387. for (var k = 0; k < _answer.length; k++) {
  1388. topic.array[_answer[k]].count++
  1389. topic.count++
  1390. }
  1391. } else if (topic.type == 3 || topic.type == 8) {
  1392. let type3 = 1
  1393. let _answer = el2.array[i].json.answer2
  1394. if (_answer) {
  1395. for (var k = 0; k < topic.array.length; k++) {
  1396. if (topic.array[k].name == _answer) {
  1397. topic.array[k].count++
  1398. type3 = 2
  1399. topic.count++
  1400. break;
  1401. }
  1402. }
  1403. if (type3 == 1) {
  1404. topic.array.push({
  1405. name: _answer,
  1406. count: 1
  1407. })
  1408. }
  1409. }
  1410. } else if (topic.type == 5) {
  1411. let _answer = el2.array[i].json.file ? el2.array[i].json.file : []
  1412. console.log(el2)
  1413. let _user = {userid:el2.userid,username:el2.name}
  1414. for (var k = 0; k < _answer.length; k++) {
  1415. topic.array.push({..._answer[k],..._user})
  1416. }
  1417. } else if (topic.type == 7) {
  1418. if(el2.array[i].json.answer2){
  1419. let _answer = el2.array[i].json.answer2
  1420. topic.array[_answer].count++
  1421. topic.count++
  1422. }
  1423. }
  1424. }
  1425. console.log('topictopictopictopic',topic)
  1426. testArray.push(topic)
  1427. this.fileLoading.push({bool:false,count:0,load:0,progress:0})
  1428. }
  1429. this.testArray = testArray
  1430. this.worksArray = array
  1431. this.isLoading = false;
  1432. })
  1433. .catch((err) => {
  1434. console.error(err);
  1435. });
  1436. },
  1437. getData2() {
  1438. this.isLoading = true;
  1439. let params = {
  1440. cid: this.cid,
  1441. page: this.page,
  1442. pageSize: this.pageSize,
  1443. cn: this.courseName
  1444. };
  1445. this.ajax
  1446. .get(this.$store.state.api + "getTestWorksPage3", params)
  1447. .then((res) => {
  1448. this.isLoading = false;
  1449. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  1450. this.tableData = res.data[0];
  1451. })
  1452. .catch((err) => {
  1453. console.error(err);
  1454. });
  1455. },
  1456. setJSON(json) {
  1457. return json.filter((item) => {
  1458. if (item.array) {
  1459. item.array = item.array.filter((item2) => {
  1460. if (item2.ttype == 1 && item2.json) {
  1461. delete item2.json.answer2
  1462. delete item2.json.score2
  1463. delete item2.json.file
  1464. }
  1465. if (item2.array) {
  1466. item2.array = item2.array.filter((item3) => {
  1467. if (item3.ttype == 1 && item3.json) {
  1468. delete item3.json.answer2
  1469. delete item3.json.score2
  1470. delete item3.json.file
  1471. }
  1472. return item3;
  1473. });
  1474. }
  1475. return item2;
  1476. });
  1477. } else if (item.ttype == 1 && item.json) {
  1478. delete item.json.answer2
  1479. delete item.json.score2
  1480. delete item.json.file
  1481. }
  1482. return item
  1483. console.log(item.array);
  1484. });
  1485. },
  1486. setJson2(json) {
  1487. let _json = json;
  1488. // this.type = _json[0].ttype;
  1489. let checkArray = _json.filter((item) => {
  1490. if (item.array) {
  1491. item.array = item.array.filter((item2) => {
  1492. if (item2.ttype == 1 && item2.json && !item2.json.answer2) {
  1493. item2.json.answer2 = [];
  1494. }
  1495. if (item2.array) {
  1496. item2.array = item2.array.filter((item3) => {
  1497. if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
  1498. item3.json.answer2 = [];
  1499. }
  1500. return item3;
  1501. });
  1502. }
  1503. return (
  1504. (item2.ttype != 1 && item2.array.length > 0) || item2.ttype == 1
  1505. );
  1506. });
  1507. }
  1508. if (item.ttype == 1 && item.json && !item.json.answer2) {
  1509. item.json.answer2 = [];
  1510. }
  1511. console.log(item.array);
  1512. return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
  1513. });
  1514. console.log(checkArray);
  1515. return checkArray;
  1516. },
  1517. JSONSetting(json) {
  1518. let _json = json
  1519. let array = []
  1520. _json.filter((item) => {
  1521. if (item.array) {
  1522. item.array = item.array.filter((item2) => {
  1523. if (item2.ttype == 1 && item2.json) {
  1524. array.push(item2)
  1525. }
  1526. if (item2.array) {
  1527. item2.array = item2.array.filter((item3) => {
  1528. if (item3.ttype == 1 && item3.json) {
  1529. array.push(item3)
  1530. }
  1531. return item3;
  1532. });
  1533. }
  1534. return item2;
  1535. });
  1536. }
  1537. if (item.ttype == 1 && item.json) {
  1538. array.push(item)
  1539. }
  1540. console.log(item.array);
  1541. return item;
  1542. });
  1543. console.log(array);
  1544. return array;
  1545. },
  1546. setFilter(json) {
  1547. let _json = json
  1548. let array = []
  1549. _json.filter((item) => {
  1550. item.nameFilters = [],
  1551. item.filterParams = {
  1552. name: [],
  1553. }
  1554. if (item.type == 1) {
  1555. for (var i = 0; i < item.json.array.length; i++) {
  1556. item.nameFilters.push({ text: item.json.array[i].option, value: item.json.array[i].option })
  1557. }
  1558. }
  1559. array.push(item)
  1560. return item;
  1561. });
  1562. return array
  1563. },
  1564. checkFile(item) {
  1565. if (item.type == 3) {
  1566. this.$hevueImgPreview(item.url);
  1567. } else if (item.type == 5) {
  1568. this.downloadFile(item);
  1569. } else if (item.type == 1) {
  1570. this.dialogVisibleOffice = true
  1571. this.wurl = item.url
  1572. } else if (item.type == 2) {
  1573. this.dialogVisibleVideo = true
  1574. this.wurl = item.url
  1575. } else if (item.type == 4) {
  1576. this.dialogVisiblePdf = true
  1577. this.wurl = item.url
  1578. }
  1579. },
  1580. downloadFile(f) {
  1581. var credentials = {
  1582. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  1583. secretAccessKey: "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",
  1584. }; //秘钥形式的登录上传
  1585. window.AWS.config.update(credentials);
  1586. window.AWS.config.region = "cn-northwest-1"; //设置区域
  1587. let url2 = f.url;
  1588. let _url2 = "";
  1589. if (
  1590. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  1591. ) {
  1592. _url2 = url2.split(
  1593. "https://view.officeapps.live.com/op/view.aspx?src="
  1594. )[1];
  1595. } else {
  1596. _url2 = url2;
  1597. }
  1598. let _this = this;
  1599. _this.downLoading = _url2
  1600. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  1601. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1].replace(/\+/g, ' '))
  1602. var params = {
  1603. Bucket: "ccrb",
  1604. Key: name
  1605. };
  1606. s3.getObject(params, function (err, data) {
  1607. _this.downLoading = ''
  1608. if (err) console.log(err, err.stack); // an error occurred
  1609. else {
  1610. let url = window.URL.createObjectURL(new Blob([data.Body]));
  1611. let a = document.createElement("a");
  1612. a.name = f.name;
  1613. a.href = url;
  1614. a.download = f.name;
  1615. a.click();
  1616. console.log(data);
  1617. } // sxuccessful response
  1618. });
  1619. },
  1620. deleteTest(tid) {
  1621. let _this = this
  1622. _this
  1623. .$confirm("确定删除此提交的表单么?", "提示", {
  1624. confirmButtonText: "确定",
  1625. cancelButtonText: "取消",
  1626. type: "warning",
  1627. })
  1628. .then(() => {
  1629. let params = [{
  1630. tid: tid,
  1631. }];
  1632. _this.ajax
  1633. .post(_this.$store.state.api + "deleteTestCourseWorks", params)
  1634. .then((res) => {
  1635. _this.$message.success("删除成功");
  1636. if (_this.stype == 3) {
  1637. _this.getData2();
  1638. } else {
  1639. _this.getData();
  1640. }
  1641. })
  1642. .catch((err) => {
  1643. console.error(err);
  1644. });
  1645. })
  1646. .catch(() => {
  1647. return;
  1648. });
  1649. },
  1650. exportPDF() {
  1651. this.pdfLoading = true
  1652. var a = document.getElementsByTagName("img")
  1653. for (var i = 0; i < a.length; i++) { a[i].crossOrigin = "*" }
  1654. downloadPDF(this.$refs.stepBox, this.testJson.title, () => {
  1655. var _a = document.getElementsByTagName("img")
  1656. for (var i = 0; i < _a.length; i++) {
  1657. _a[i].removeAttribute("crossorigin")
  1658. }
  1659. setTimeout(() => {
  1660. this.pdfLoading = false
  1661. }, 2000);
  1662. })
  1663. },
  1664. score(json) {
  1665. let score = 0
  1666. json.forEach(el => {
  1667. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  1668. el.array.forEach(item => {
  1669. if (item.ttype == 2 && item.array.length > 0) {
  1670. item.array.forEach(item2 => {
  1671. if (item2.ttype == 1 && item2.json) {
  1672. score += item2.json.score ? parseFloat(item2.json.score) : 0
  1673. }
  1674. })
  1675. } else if (item.ttype == 1 && item.json) {
  1676. score += item.json.score ? parseFloat(item.json.score) : 0
  1677. }
  1678. })
  1679. } else if (el.ttype == 1 && el.json) {
  1680. score += el.json.score ? parseFloat(el.json.score) : 0
  1681. }
  1682. })
  1683. return score > 0 ? score + '分' : ''
  1684. },
  1685. score2(json) {
  1686. let score = 0
  1687. // let type = 1
  1688. json.forEach(el => {
  1689. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  1690. el.array.forEach(item => {
  1691. if (item.ttype == 2 && item.array.length > 0) {
  1692. item.array.forEach(item2 => {
  1693. if (item2.ttype == 1 && item2.json) {
  1694. score += item2.json.score2 ? parseFloat(item2.json.score2) : 0
  1695. }
  1696. })
  1697. } else if (item.ttype == 1 && item.json) {
  1698. score += item.json.score2 ? parseFloat(item.json.score2) : 0
  1699. }
  1700. })
  1701. } else if (el.ttype == 1 && el.json) {
  1702. score += el.json.score2 ? parseFloat(el.json.score2) : 0
  1703. }
  1704. })
  1705. return score + '分'
  1706. },
  1707. setWordHtml(data) {
  1708. let _data = data
  1709. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  1710. let score = this.score(data.courseJson)
  1711. let isScore = this.score2(data.courseJson)
  1712. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
  1713. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.name}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
  1714. let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
  1715. let _test = `<div style='margin-top:40px;'>`
  1716. for (let i = 0; i < _data.array.length; i++) {
  1717. let item = _data.array[i]
  1718. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${item.json.title}</div>`
  1719. _test += _div
  1720. if (item.type == 1) {
  1721. for (let j = 0; j < item.json.array.length; j++) {
  1722. let check = item.json.array[j]
  1723. let _option = `<div style='margin:10px 0 0 40px;'>${(item.json.answer2 && item.json.answer2.indexOf(j) !== -1) ? '☑' : '☐'} ${check.option}</div>`
  1724. _test += _option
  1725. }
  1726. } else if (item.type == 3 && item.json.answer2) {
  1727. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
  1728. _test += _option
  1729. } else if (item.type == 5 && item.json.file) {
  1730. for (let j = 0; j < item.json.file.length; j++) {
  1731. let check = item.json.file[j]
  1732. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
  1733. _test += _option
  1734. }
  1735. } else if (item.type == 6 && item.json.answer2) {
  1736. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
  1737. _test += _option
  1738. } else if (item.type == 7 && item.json.answer2 ) {
  1739. let _score = this.getScore2(item.json)
  1740. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
  1741. _test += _option
  1742. } else if (item.type == 8 && item.json.answer2) {
  1743. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
  1744. _test += _option
  1745. } else if (item.type == 11 && item.json.answer2) {
  1746. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
  1747. _test += _option
  1748. }
  1749. }
  1750. _test += `</div>`
  1751. let _html = _title + _content + _detail + _test;
  1752. this.exportToWord(_data.name + '-' + _data.time, _html);
  1753. },
  1754. setWordHtml2(data) {
  1755. let _data = data
  1756. _data.array = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(data.courseJson))))
  1757. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  1758. let score = this.score(JSON.parse(data.courseJson))
  1759. let isScore = this.score2(JSON.parse(data.courseJson))
  1760. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
  1761. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.username ? _data.username : '匿名'}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
  1762. let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
  1763. let _test = `<div style='margin-top:40px;'>`
  1764. for (let i = 0; i < _data.array.length; i++) {
  1765. let item = _data.array[i]
  1766. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${item.json.title}</div>`
  1767. _test += _div
  1768. if (item.type == 1) {
  1769. for (let j = 0; j < item.json.array.length; j++) {
  1770. let check = item.json.array[j]
  1771. let _option = `<div style='margin:10px 0 0 40px;'>${(item.json.answer2 && item.json.answer2.indexOf(j) !== -1) ? '☑' : '☐'} ${check.option}</div>`
  1772. _test += _option
  1773. }
  1774. } else if (item.type == 3 && item.json.answer2) {
  1775. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
  1776. _test += _option
  1777. } else if (item.type == 5 && item.json.file) {
  1778. for (let j = 0; j < item.json.file.length; j++) {
  1779. let check = item.json.file[j]
  1780. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
  1781. _test += _option
  1782. }
  1783. } else if (item.type == 6 && item.json.answer2) {
  1784. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
  1785. _test += _option
  1786. } else if (item.type == 7 && item.json.answer2 ) {
  1787. let _score = this.getScore2(item.json)
  1788. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
  1789. _test += _option
  1790. } else if (item.type == 8 && item.json.answer2) {
  1791. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
  1792. _test += _option
  1793. } else if (item.type == 11 && item.json.answer2) {
  1794. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
  1795. _test += _option
  1796. }
  1797. }
  1798. _test += `</div>`
  1799. let _html = _title + _content + _detail + _test;
  1800. this.exportToWord(_data.username ? _data.username : '匿名' + '-' + _data.time, _html);
  1801. },
  1802. async exportToWord(a, html) {
  1803. // 将html文件中需要用到的数据挂载到store上
  1804. const content = `<!DOCTYPE html>
  1805. <html lang="en">
  1806. <head>
  1807. <meta charset="UTF-8">
  1808. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  1809. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  1810. <title>${a}</title>
  1811. <style>
  1812. </style>
  1813. </head>
  1814. <body>
  1815. ${html}
  1816. </body>
  1817. </html>`;
  1818. // debugger
  1819. // 生成报告
  1820. const link = document.createElement("a");
  1821. let dname = a + ".doc";
  1822. // link.download = "报告.html"; // 文件名
  1823. link.download = dname; // 文件名
  1824. link.style.display = "none";
  1825. // 创建文件流
  1826. // 创建bolb实例时,内容一定要放在[]中
  1827. const blob = new Blob([content], {
  1828. type: "text/plain;charset='utf-8'",
  1829. });
  1830. link.href = window.URL.createObjectURL(blob);
  1831. document.body.appendChild(link);
  1832. link.click();
  1833. document.body.removeChild(link);
  1834. },
  1835. setWordHtmlAll(data) {
  1836. let _data = data
  1837. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  1838. let score = this.score(data.courseJson)
  1839. let isScore = this.score2(data.courseJson)
  1840. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
  1841. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.name}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
  1842. let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
  1843. let _test = `<div style='margin-top:40px;'>`
  1844. for (let i = 0; i < _data.array.length; i++) {
  1845. let item = _data.array[i]
  1846. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${item.json.title}</div>`
  1847. _test += _div
  1848. if (item.type == 1) {
  1849. for (let j = 0; j < item.json.array.length; j++) {
  1850. let check = item.json.array[j]
  1851. let _option = `<div style='margin:10px 0 0 40px;'>${(item.json.answer2 && item.json.answer2.indexOf(j) !== -1) ? '☑' : '☐'} ${check.option}</div>`
  1852. _test += _option
  1853. }
  1854. } else if (item.type == 3 && item.json.answer2) {
  1855. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
  1856. _test += _option
  1857. } else if (item.type == 5 && item.json.file) {
  1858. for (let j = 0; j < item.json.file.length; j++) {
  1859. let check = item.json.file[j]
  1860. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
  1861. _test += _option
  1862. }
  1863. } else if (item.type == 6 && item.json.answer2) {
  1864. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
  1865. _test += _option
  1866. } else if (item.type == 7 && item.json.answer2 ) {
  1867. let _score = this.getScore2(item.json)
  1868. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
  1869. _test += _option
  1870. } else if (item.type == 8 && item.json.answer2) {
  1871. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
  1872. _test += _option
  1873. } else if (item.type == 11 && item.json.answer2) {
  1874. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
  1875. _test += _option
  1876. }
  1877. }
  1878. _test += `</div>`
  1879. let _html = _title + _content + _detail + _test;
  1880. return this.exportToWordAll(_data.name + '-' + _data.time, _html);
  1881. },
  1882. async setWordHtmlAll2(data) {
  1883. let _data = data
  1884. _data.array = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(data.courseJson))))
  1885. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  1886. let score = this.score(JSON.parse(data.courseJson))
  1887. let isScore = this.score2(JSON.parse(data.courseJson))
  1888. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
  1889. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${_data.username ? _data.username : '匿名'}</b>${scoreContent}(填写范围)${this.testJson.juriP ? this.testJson.juriP : '所有人'}(提交时间)${_data.time}</div>`
  1890. let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
  1891. let _test = `<div style='margin-top:40px;'>`
  1892. for (let i = 0; i < _data.array.length; i++) {
  1893. let item = _data.array[i]
  1894. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${item.json.title}</div>`
  1895. _test += _div
  1896. if (item.type == 1) {
  1897. for (let j = 0; j < item.json.array.length; j++) {
  1898. let check = item.json.array[j]
  1899. let _option = `<div style='margin:10px 0 0 40px;'>${(item.json.answer2 && item.json.answer2.indexOf(j) !== -1) ? '☑' : '☐'} ${check.option}</div>`
  1900. _test += _option
  1901. }
  1902. } else if (item.type == 3 && item.json.answer2) {
  1903. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
  1904. _test += _option
  1905. } else if (item.type == 5 && item.json.file) {
  1906. for (let j = 0; j < item.json.file.length; j++) {
  1907. let check = item.json.file[j]
  1908. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
  1909. _test += _option
  1910. }
  1911. } else if (item.type == 6 && item.json.answer2) {
  1912. let _cjson = await this.getCourse(item.json.answer2)
  1913. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${ _cjson ? _cjson.title : ''}</div>`
  1914. _test += _option
  1915. } else if (item.type == 7 && item.json.answer2 ) {
  1916. let _score = this.getScore2(item.json)
  1917. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
  1918. _test += _option
  1919. } else if (item.type == 8 && item.json.answer2) {
  1920. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
  1921. _test += _option
  1922. } else if (item.type == 11 && item.json.answer2 && item.json.answer2.length) {
  1923. let _answer = item.json.answer2
  1924. _answer.length ? courseCount11 = courseCount11.concat(_answer) : ''
  1925. _json[ja].json.courseId = _answer ? _answer : [];
  1926. let params = {
  1927. cid:_answer.length ? _answer.join(",") : ''
  1928. }
  1929. let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
  1930. let result = data.data[0]
  1931. let _title = []
  1932. // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
  1933. result.forEach(i=>{
  1934. _title.push(i.title)
  1935. })
  1936. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${ _title.length ? _title.join(',') : '' }</div>`
  1937. _test += _option
  1938. }
  1939. }
  1940. _test += `</div>`
  1941. let _html = _title + _content + _detail + _test;
  1942. return this.exportToWordAll(_data.username ? _data.username : '匿名' + '-' + _data.time, _html);
  1943. },
  1944. async exportToWordAll(a, html) {
  1945. // 将html文件中需要用到的数据挂载到store上
  1946. const content = `<!DOCTYPE html>
  1947. <html lang="en">
  1948. <head>
  1949. <meta charset="UTF-8">
  1950. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  1951. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  1952. <title>${a}</title>
  1953. <style>
  1954. </style>
  1955. </head>
  1956. <body>
  1957. ${html}
  1958. </body>
  1959. </html>`;
  1960. // debugger
  1961. // 生成报告
  1962. const link = document.createElement("a");
  1963. let dname = a + ".doc";
  1964. // link.download = "报告.html"; // 文件名
  1965. link.download = dname; // 文件名
  1966. link.style.display = "none";
  1967. // 创建文件流
  1968. // 创建bolb实例时,内容一定要放在[]中
  1969. const blob = new Blob([content], {
  1970. type: "text/plain;charset='utf-8'",
  1971. });
  1972. return blob;
  1973. },
  1974. exportAllWord() {
  1975. this.pdfLoading = true;
  1976. const _chapInfo = this.worksArray;
  1977. let url = [];
  1978. for (let i = 0; i < _chapInfo.length; i++) {
  1979. url.push({
  1980. name: _chapInfo[i].name + '-' + _chapInfo[i].time,
  1981. blob: this.setWordHtmlAll(_chapInfo[i]),
  1982. });
  1983. }
  1984. console.log(url);
  1985. this.downLoadAll(url);
  1986. },
  1987. exportAllWord2() {
  1988. this.pdfLoading = true;
  1989. let params = {
  1990. cid: this.cid,
  1991. page: 1,
  1992. pageSize: 999,
  1993. cn: this.courseName
  1994. };
  1995. this.ajax
  1996. .get(this.$store.state.api + "getTestWorksPage3", params)
  1997. .then((res) => {
  1998. const _chapInfo = res.data[0];
  1999. let url = [];
  2000. for (let i = 0; i < _chapInfo.length; i++) {
  2001. url.push({
  2002. name: _chapInfo[i].username + '-' + _chapInfo[i].time,
  2003. blob: this.setWordHtmlAll2(_chapInfo[i]),
  2004. });
  2005. }
  2006. console.log(url);
  2007. this.downLoadAll(url);
  2008. })
  2009. .catch((err) => {
  2010. console.error(err);
  2011. });
  2012. },
  2013. downLoadAll(url) {
  2014. const data = url; // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
  2015. const zip = new JSZip();
  2016. const cache = {};
  2017. data.forEach((item) => {
  2018. // 下载文件, 并存成ArrayBuffer对象
  2019. const file_name = item.name; // 获取文件名
  2020. zip.file(file_name + '.doc', item.blob, { binary: true }); // 逐个添加文件
  2021. cache[file_name] = item.blob;
  2022. });
  2023. zip.generateAsync({ type: "blob" }).then((content) => {
  2024. // 生成二进制流
  2025. FileSaver.saveAs(content, this.testJson.title + ".zip"); // 利用file-saver保存文件 自定义文件名
  2026. setTimeout(() => {
  2027. this.pdfLoading = false;
  2028. }, 2000);
  2029. });
  2030. },
  2031. handleFilterChange() {
  2032. console.log(this.$refs.table.store.states.data);
  2033. },
  2034. exportExcel() {
  2035. let res = this.$refs.table.store.states.data
  2036. if (!res.length) {
  2037. this.$message.error('无导出数据')
  2038. return
  2039. }
  2040. this.isLoading = true;
  2041. let chapters = this.chapters
  2042. var array = [];
  2043. for (var i = 0; i < res.length; i++) {
  2044. var _json = {};
  2045. _json["序号"] = i + 1;
  2046. _json["提交人"] = res[i].name ? res[i].name : '匿名';
  2047. _json["提交时间"] = res[i].time;
  2048. for (var j = 0; j < chapters.length; j++) {
  2049. _json[j + 1 + "." + chapters[j].json.title] = '';
  2050. if (res[i].array[j].type == 1 && res[i].array[j].json.answer2) {
  2051. let a = []
  2052. for (var answer2 = 0; answer2 < res[i].array[j].json.answer2.length; answer2++) {
  2053. a.push(res[i].array[j].json.array[res[i].array[j].json.answer2[answer2]].option)
  2054. }
  2055. _json[j + 1 + "." + chapters[j].json.title] = a.join('、')
  2056. } else if (res[i].array[j].type == 3 && res[i].array[j].json.answer2) {
  2057. _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
  2058. } else if (res[i].array[j].type == 5 && res[i].array[j].json.file) {
  2059. let files = []
  2060. for (let file = 0; file < res[i].array[j].json.file.length; file++) {
  2061. let check = res[i].array[j].json.file[file]
  2062. files.push(file + 1 + '.' + check.name + '----' + check.url)
  2063. }
  2064. _json[j + 1 + "." + chapters[j].json.title] = files.join('\n')
  2065. } else if (res[i].array[j].type == 6 && res[i].array[j].json.answer2) {
  2066. _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
  2067. } else if (res[i].array[j].type == 7 && res[i].array[j].json.answer2) {
  2068. let _score = this.getScore2(res[i].array[j].json)
  2069. _json[j + 1 + "." + chapters[j].json.title] = _score
  2070. } else if (res[i].array[j].type == 8 && res[i].array[j].json.answer2) {
  2071. _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
  2072. } else if (res[i].array[j].type == 11 && res[i].array[j].json.answer2) {
  2073. _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
  2074. }
  2075. }
  2076. array.push(_json);
  2077. }
  2078. let widthJson = []
  2079. let widthArray = Object.keys(array[0])
  2080. for (let i = 0; i < widthArray.length; i++) {
  2081. if (i == 0) {
  2082. widthJson.push({ wch: 5 })
  2083. } else {
  2084. widthJson.push({ wch: 30 })
  2085. }
  2086. }
  2087. const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
  2088. let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
  2089. ws["!cols"] = widthJson;
  2090. const styleObj = {
  2091. alignment: {
  2092. horizontal: "center",
  2093. vertical: "center" // 设置垂直居中
  2094. }
  2095. }; // 设置居中对齐和加粗样式
  2096. for (let cell in ws) {
  2097. if (!cell[0].startsWith("!")) {
  2098. ws[cell]["s"] = styleObj;
  2099. }
  2100. }
  2101. XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
  2102. XLSX.writeFile(workbook, this.testJson.title + ".xlsx");
  2103. this.isLoading = false;
  2104. this.$message({
  2105. message: "导出成功",
  2106. type: "success"
  2107. });
  2108. },
  2109. async getCourse(id) {
  2110. let params = {
  2111. cid: id,
  2112. };
  2113. let res = await this.ajax.get(this.$store.state.api + "getCourseInfoTest", params)
  2114. return res.data[0][0]
  2115. },
  2116. getScore2(item) {
  2117. let array = []
  2118. for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
  2119. array.push(i)
  2120. }
  2121. return item.answer2 ? array[item.answer2] : ''
  2122. },
  2123. checkScreenSize() {
  2124. this.screenWidth = window.innerWidth;
  2125. this.isDesktop = this.screenWidth > 750; // 你可以根据需要调整这个阈值
  2126. },
  2127. downloadFileType5(fileData,title="附件",index){
  2128. this.fileLoading[index].bool = true
  2129. this.fileLoading[index].count = 0
  2130. this.fileLoading[index].load = 0
  2131. this.fileLoading[index].progress = 0
  2132. let data = fileData;
  2133. const zip = new JSZip();
  2134. let downFileArray = [];
  2135. let uniqueArr = data.filter((v,i,a)=>a.map(mb=>mb.userid).indexOf(v.userid)==i);
  2136. uniqueArr.forEach(i=>{
  2137. downFileArray.push({userid:i.userid,username:i.username ? i.username : '匿名',urlList:data.filter(d=>d.userid==i.userid).map(m=>m)});
  2138. })
  2139. let promises = [];
  2140. console.log('downFileArray',downFileArray);
  2141. downFileArray.forEach(e=>{
  2142. this.fileLoading[index].count += e.urlList.length
  2143. })
  2144. if(downFileArray.length==1){//只有一位老师的情况
  2145. if(downFileArray[0].urlList.length>1){//多个文件的情况
  2146. const folder = zip.folder(`${downFileArray[0].username}`);
  2147. downFileArray[0].urlList.forEach(i=>{
  2148. const promise = getFile(i.url).then((data) => {
  2149. if (data.data != 1) {
  2150. // 下载文件, 并存成ArrayBuffer对象
  2151. const file_name = i.name; // 获取文件名
  2152. folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
  2153. }
  2154. this.fileLoading[index].load+=1
  2155. this.fileLoading[index].progress = parseInt((this.fileLoading[index].load / this.fileLoading[index].count) * 100);
  2156. if (this.fileLoading[index].load == this.fileLoading[index].count) {
  2157. this.fileLoading[index].bool=false
  2158. }
  2159. });
  2160. promises.push(promise)
  2161. })
  2162. }else{//只有一个文件的情况
  2163. promises.push(getFile(downFileArray[0].urlList[0].url).then((data) => {
  2164. if (data.data != 1) {
  2165. // 下载文件, 并存成ArrayBuffer对象
  2166. const file_name = `${downFileArray[0].username}-${downFileArray[0].urlList[0].name}`; // 获取文件名
  2167. zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
  2168. }
  2169. this.fileLoading[index].load+=1
  2170. this.fileLoading[index].progress = parseInt((this.fileLoading[index].load / this.fileLoading[index].count) * 100);
  2171. if (this.fileLoading[index].load == this.fileLoading[index].count) {
  2172. this.fileLoading[index].bool=false
  2173. }
  2174. }))
  2175. }
  2176. }else if(downFileArray.length>1){//有多位老师的情况
  2177. downFileArray.forEach(i=>{
  2178. if(i.urlList.length==1){//只有一个文件的情况
  2179. promises.push(getFile(i.urlList[0].url).then((data) => {
  2180. if (data.data != 1) {
  2181. // 下载文件, 并存成ArrayBuffer对象
  2182. const file_name = `${i.username ? i.username : '匿名'}-${i.urlList[0].name}`; // 获取文件名
  2183. zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
  2184. }
  2185. this.fileLoading[index].load+=1
  2186. this.fileLoading[index].progress = parseInt((this.fileLoading[index].load / this.fileLoading[index].count) * 100);
  2187. if (this.fileLoading[index].load == this.fileLoading[index].count) {
  2188. this.fileLoading[index].bool=false
  2189. }
  2190. }))
  2191. }else if(i.urlList.length>1){//有多个文件的
  2192. const folder = zip.folder(`${i.username ? i.username : '匿名'}`);
  2193. i.urlList.forEach(ui=>{
  2194. const promise = getFile(ui.url).then((data) => {
  2195. if (data.data != 1) {
  2196. // 下载文件, 并存成ArrayBuffer对象
  2197. const file_name = ui.name; // 获取文件名
  2198. folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
  2199. }
  2200. this.fileLoading[index].load+=1
  2201. this.fileLoading[index].progress = parseInt((this.fileLoading[index].load / this.fileLoading[index].count) * 100);
  2202. if (this.fileLoading[index].load == this.fileLoading[index].count) {
  2203. this.fileLoading[index].bool=false
  2204. }
  2205. })
  2206. promises.push(promise)
  2207. })
  2208. }
  2209. })
  2210. }
  2211. Promise.all(promises).then(() => {
  2212. zip.generateAsync({ type: "blob" }).then((content) => {
  2213. // 生成二进制流
  2214. FileSaver.saveAs(content, `${this.testJson.title}-${title}.zip`); // 利用file-saver保存文件 自定义文件名
  2215. });
  2216. });
  2217. },
  2218. getUserInfo() {
  2219. let params = {
  2220. uid: this.peopleId,
  2221. };
  2222. this.ajax
  2223. .get(this.$store.state.api + "selectTestUser", params)
  2224. .then((res) => {
  2225. console.log('111111111111111111111',res.data[0][0]);
  2226. // 用于存储归类后的数据的对象
  2227. // this.checkDataType(2)
  2228. this.stype = 2
  2229. this.courseName = res.data[0][0].name
  2230. this.searchCourse()
  2231. })
  2232. .catch((err) => {
  2233. console.error(err);
  2234. });
  2235. },
  2236. },
  2237. beforeDestroy() {
  2238. document.getElementsByTagName('html')[0].style.overflow = '';
  2239. window.removeEventListener("resize", this.checkScreenSize);
  2240. },
  2241. mounted() {
  2242. this.checkScreenSize();
  2243. window.addEventListener("resize", this.checkScreenSize);
  2244. document.getElementsByTagName('html')[0].scrollTop = 0
  2245. document.getElementsByTagName('html')[0].style.overflow = 'hidden'
  2246. this.$nextTick(function () {
  2247. if(this.peopleId){
  2248. this.getUserInfo();
  2249. }else{
  2250. this.getData();
  2251. }
  2252. // this.getClass2()
  2253. this.changeHeight()
  2254. });
  2255. },
  2256. };
  2257. </script>
  2258. <style scoped>
  2259. .pb_content {
  2260. height: 100% !important;
  2261. /* margin: 0 20px 0 20px; */
  2262. }
  2263. .cutBtnBlockCss{
  2264. width: 100%;display: flex;justify-content: end;
  2265. }
  2266. .cutBtnCss{
  2267. width: 68px;
  2268. height: 27px;
  2269. font-size: 14px;
  2270. border-radius: 5px;
  2271. display: flex;
  2272. color: rgba(54, 129, 252, 1);
  2273. justify-content: center;
  2274. align-items: center;
  2275. margin-top: 10px;
  2276. border: 1px rgba(54, 129, 252, 1) solid;
  2277. }
  2278. .isDesktopRight{
  2279. width:100% !important;
  2280. margin:0 !important;
  2281. height: 300px !important;
  2282. border: none !important;
  2283. }
  2284. .isDTitle2JsonTit{
  2285. width: 130px;
  2286. color: rgba(0, 0, 0, 0.9);
  2287. overflow: hidden;
  2288. white-space: nowrap;
  2289. text-overflow: ellipsis;
  2290. }
  2291. .IsDAnswer{
  2292. margin: 20px 0 30px;color: rgba(0, 0, 0, 0.6);
  2293. }
  2294. .CutCss{
  2295. height: 60px;
  2296. line-height: 60px;
  2297. }
  2298. .topicTitCss{
  2299. color: rgba(0, 0, 0, 0.9);
  2300. font-weight: 600;
  2301. margin-right: 5px;
  2302. }
  2303. .IsDFile{
  2304. width: 150px;
  2305. height: 120px;
  2306. border-radius: 10px;
  2307. position: relative;
  2308. display: flex;
  2309. flex-direction: column;
  2310. overflow: hidden;
  2311. margin-bottom: 5px;
  2312. }
  2313. .IsDownload{
  2314. position: absolute;
  2315. width: 30px;
  2316. top: 5px;
  2317. right: 5px;
  2318. }
  2319. .IsDImg{
  2320. width: 100%;
  2321. height: 70px;
  2322. flex: 1;
  2323. }
  2324. .pb_content_body {
  2325. width: 100% !important;
  2326. height: 100%;
  2327. }
  2328. .pb_content_body>.right {
  2329. height: 100%;
  2330. width: 100%;
  2331. display: flex;
  2332. overflow: hidden;
  2333. flex-direction: column;
  2334. }
  2335. .basic_box {
  2336. margin: 0 auto;
  2337. position: relative;
  2338. padding: 0 20px 0 20px;
  2339. }
  2340. .courseTop {
  2341. display: flex;
  2342. flex-direction: row;
  2343. justify-content: space-between;
  2344. align-items: center;
  2345. width: calc(100% - 40px);
  2346. margin: 0 auto;
  2347. padding: 10px 0;
  2348. }
  2349. .stepsNav {
  2350. display: flex;
  2351. flex-direction: row;
  2352. justify-content: flex-start;
  2353. align-items: center;
  2354. }
  2355. .step_box {
  2356. width: calc(100% - 40px);
  2357. margin: 0 auto;
  2358. height: calc(100% - 50px);
  2359. overflow: auto;
  2360. background: #ffff;
  2361. border-radius: 5px;
  2362. }
  2363. .el-table>>>.even_row {
  2364. background-color: #f1f1f1 !important;
  2365. }
  2366. .student_page {
  2367. margin-top: 10px;
  2368. }
  2369. .test_title {
  2370. display: flex;
  2371. padding: 15px 15px;
  2372. width: 100%;
  2373. box-sizing: border-box;
  2374. justify-content: space-between;
  2375. align-items: center;
  2376. flex-wrap: wrap;
  2377. margin-bottom: 10px;
  2378. }
  2379. .test_title .left {
  2380. max-width: 100%;
  2381. margin-top: 10px
  2382. }
  2383. .test_title .left .title {
  2384. width: 100%;
  2385. font-size: 24px;
  2386. font-weight: 700;
  2387. overflow: hidden;
  2388. text-overflow: ellipsis;
  2389. white-space: nowrap;
  2390. }
  2391. .test_title .left .info {
  2392. display: flex;
  2393. margin-top: 15px;
  2394. }
  2395. .test_title .left .info .info_box {
  2396. font-size: 14px;
  2397. }
  2398. .test_title .left .info .info_box+.info_box {
  2399. margin-left: 20px;
  2400. padding-left: 20px;
  2401. border-left: 1px solid #E7E7E7;
  2402. }
  2403. .test_title .left .info .info_box span:nth-child(1) {
  2404. color: #00000099;
  2405. }
  2406. .test_title .left .info .info_box span:nth-child(2) {}
  2407. .test_title .right {
  2408. display: flex;
  2409. align-items: center;
  2410. margin-top: 10px;
  2411. max-width: 100%;
  2412. }
  2413. .test_title .right .data_box {
  2414. margin-right: 15px;
  2415. width: 150px;
  2416. border: 1px solid #e7e7e7;
  2417. border-radius: 5px;
  2418. padding: 0 10px;
  2419. height: 57px;
  2420. font-size: 14px;
  2421. color: #00000099;
  2422. display: flex;
  2423. justify-content: space-between;
  2424. align-items: center;
  2425. }
  2426. .test_title .right .data_box span:nth-child(1) {}
  2427. .test_title .right .data_box span:nth-child(2) {}
  2428. .test_title .right .data_box span:nth-child(2) .big {
  2429. font-size: 22px;
  2430. }
  2431. .test_title .right .btn_box {
  2432. display: flex;
  2433. flex-direction: column;
  2434. width: 57px;
  2435. height: 57px;
  2436. background: #3681fc;
  2437. border-radius: 5px;
  2438. font-size: 14px;
  2439. cursor: pointer;
  2440. align-items: center;
  2441. justify-content: center;
  2442. color: #fff;
  2443. }
  2444. .test_title .right .btn_box span:nth-child(1) {
  2445. display: block;
  2446. width: 12px;
  2447. height: 14px;
  2448. margin-bottom: 5px;
  2449. background-image: url('../../../../assets/icon/test/icon_share.png');
  2450. background-size: 100% 100%;
  2451. }
  2452. .test_title .right .btn_box span:nth-child(2) {}
  2453. .search_nav {
  2454. border-bottom: 1px solid #E7E7E7;
  2455. width: 100%;
  2456. box-sizing: border-box;
  2457. padding: 0 15px 10px;
  2458. display: flex;
  2459. align-items: flex-end;
  2460. height: 50px;
  2461. }
  2462. .search_nav>.right {
  2463. display: flex;
  2464. align-items: center;
  2465. }
  2466. .search_nav>.right>span {
  2467. height: 24px;
  2468. font-size: 14px;
  2469. color: #000;
  2470. cursor: pointer;
  2471. position: relative;
  2472. }
  2473. .search_nav>.isDesktopRightCut{
  2474. display: flex;
  2475. justify-content: space-between;
  2476. width: 60%;
  2477. }
  2478. .search_nav>.right>span+span {
  2479. margin-left: 35px;
  2480. }
  2481. .search_nav>.right>span.active {
  2482. color: #3681FC;
  2483. font-weight: 600;
  2484. }
  2485. .search_nav>.right>span.active::before {
  2486. content: "";
  2487. position: absolute;
  2488. bottom: -10px;
  2489. width: 15px;
  2490. height: 3px;
  2491. background: #3681fc;
  2492. left: 50%;
  2493. transform: translateX(-50%);
  2494. }
  2495. .search_nav>.left {
  2496. display: flex;
  2497. align-items: center;
  2498. margin-left: auto;
  2499. }
  2500. .search_nav>.right>span.active2 {
  2501. color: #3681FC;
  2502. font-weight: 600;
  2503. }
  2504. .search_nav>.right>span.active2::before {
  2505. content: "";
  2506. position: absolute;
  2507. bottom: -10px;
  2508. width: 100%;
  2509. height: 3px;
  2510. background: #3681fc;
  2511. left: 50%;
  2512. transform: translateX(-50%);
  2513. }
  2514. .student_input>>>.el-input__inner {
  2515. height: 40px;
  2516. width: 190px;
  2517. font-size: 13px;
  2518. padding: 0 35px 0 10px;
  2519. }
  2520. .serach_icon {
  2521. position: absolute;
  2522. right: 12px;
  2523. top: 50%;
  2524. transform: translateY(-50%);
  2525. width: 13px;
  2526. height: 13px;
  2527. background: url("../../../../assets/icon/test/test_search.png") no-repeat;
  2528. background-size: 100% 100%;
  2529. cursor: pointer;
  2530. }
  2531. .title_content {
  2532. padding-bottom: 10px;
  2533. }
  2534. .title_content>.title_box {
  2535. width: calc(100% - 48px);
  2536. margin: 20px auto 0;
  2537. }
  2538. .title_content>.title_box>.title {
  2539. font-size: 18px;
  2540. display: flex;
  2541. min-height: 35px;
  2542. white-space: pre-line;
  2543. position: relative;
  2544. }
  2545. .title_content>.title_box>.title>.test_icon {
  2546. min-width: 20px;
  2547. height: 20px;
  2548. }
  2549. .title_content>.title_box>.detail {
  2550. font-size: 14px;
  2551. color: #00000099;
  2552. margin-top: 8px;
  2553. white-space: pre-line;
  2554. }
  2555. .title_content>.title_box>.content1 {
  2556. display: flex;
  2557. width: 100%;
  2558. margin-top: 10px;
  2559. }
  2560. .title_content>.title_box>.content1>>>.el-progress__text {
  2561. color: #3681FC;
  2562. min-width: 55px;
  2563. font-size: 16px !important;
  2564. }
  2565. .title_content>.title_box>.content1>.left {
  2566. width: calc(100% - 620px);
  2567. border: 1px solid #e7e7e7;
  2568. }
  2569. .title_content>.title_box>.content1>.left>div+div {
  2570. border-top: 1px solid #e7e7e7;
  2571. }
  2572. .title_content>.title_box>.content1>.left>.title,
  2573. .title_content>.title_box>.content1>.left>.data {
  2574. display: flex;
  2575. height: 40px;
  2576. align-items: center;
  2577. width: 100%;
  2578. padding: 0 15px;
  2579. box-sizing: border-box;
  2580. line-height: 16px;
  2581. }
  2582. .title_content>.title_box>.content1>.left>.title>span,
  2583. .title_content>.title_box>.content1>.left>.data>span {
  2584. overflow: hidden;
  2585. text-overflow: ellipsis;
  2586. white-space: nowrap;
  2587. }
  2588. .title_content>.title_box>.content1>.left>.title>span:nth-child(1),
  2589. .title_content>.title_box>.content1>.left>.data>span:nth-child(1) {
  2590. width: calc(100% - 320px - 110px);
  2591. }
  2592. .title_content>.title_box>.content1>.left>.title>span:nth-child(2),
  2593. .title_content>.title_box>.content1>.left>.data>span:nth-child(2) {
  2594. width: 110px;
  2595. }
  2596. .title_content>.title_box>.content1>.left>.title>span:nth-child(3),
  2597. .title_content>.title_box>.content1>.left>.data>span:nth-child(3) {
  2598. width: 320px;
  2599. }
  2600. .isDesktopTitle{
  2601. display: flex;
  2602. justify-content: space-around;
  2603. }
  2604. .isDesktopTitle >div {
  2605. width: 60px;
  2606. height: 30px;
  2607. line-height: 30px;
  2608. overflow: hidden;
  2609. white-space: nowrap;
  2610. text-overflow: ellipsis;
  2611. }
  2612. /* .isDesktopTitle:nth-child(1){
  2613. width: 60px;
  2614. }
  2615. .isDesktopTitle:nth-child(2){
  2616. width: 60px;
  2617. }
  2618. .isDesktopTitle:nth-child(3){
  2619. flex: 1;
  2620. } */
  2621. .title_content>.title_box>.content1>.left>.title {
  2622. font-weight: 700;
  2623. background: #F9FAFB;
  2624. }
  2625. .title_content>.title_box>.content1>.right {
  2626. width: 600px;
  2627. margin-left: 20px;
  2628. border: 1px solid #e7e7e7;
  2629. min-height: 300px;
  2630. }
  2631. .title_content>.title_box>.content2 {
  2632. display: flex;
  2633. width: 100%;
  2634. margin-top: 10px;
  2635. }
  2636. .title_content>.title_box>.content2>.left {
  2637. width: calc(100% - 620px);
  2638. border: 1px solid #e7e7e7;
  2639. }
  2640. .title_content>.title_box>.content2>.left>div+div {
  2641. border-top: 1px solid #e7e7e7;
  2642. }
  2643. .title_content>.title_box>.content2>.left>.title,
  2644. .title_content>.title_box>.content2>.left>.data {
  2645. display: flex;
  2646. height: 40px;
  2647. align-items: center;
  2648. width: 100%;
  2649. padding: 0 15px;
  2650. box-sizing: border-box;
  2651. line-height: 16px;
  2652. }
  2653. .title_content>.title_box>.content2>.left>.title>span,
  2654. .title_content>.title_box>.content2>.left>.data>span {
  2655. overflow: hidden;
  2656. text-overflow: ellipsis;
  2657. white-space: nowrap;
  2658. }
  2659. .title_content>.title_box>.content2>.left>.title>span:nth-child(1),
  2660. .title_content>.title_box>.content2>.left>.data>span:nth-child(1) {
  2661. width: 55px;
  2662. }
  2663. .title_content>.title_box>.content2>.left>.title>span:nth-child(2),
  2664. .title_content>.title_box>.content2>.left>.data>span:nth-child(2) {
  2665. width: 110px;
  2666. }
  2667. .title_content>.title_box>.content2>.left>.title>span:nth-child(3),
  2668. .title_content>.title_box>.content2>.left>.data>span:nth-child(3) {
  2669. max-width: calc(100% - 110px - 55px);
  2670. }
  2671. .title_content>.title_box>.content2>.left>.title {
  2672. font-weight: 700;
  2673. background: #F9FAFB;
  2674. }
  2675. .title_content>.title_box>.content2>.right {
  2676. width: 600px;
  2677. margin-left: 20px;
  2678. border: 1px solid #e7e7e7;
  2679. }
  2680. .title_content>.title_box>.content2>.right>>>.wordCloud {
  2681. height: auto;
  2682. min-height: 300px;
  2683. }
  2684. .title_content>.title_box>.content3 {
  2685. display: flex;
  2686. width: 100%;
  2687. overflow: auto;
  2688. }
  2689. .title_content>.title_box>.content3>.file {
  2690. min-width: 200px;
  2691. width: 200px;
  2692. height: 140px;
  2693. margin: 10px 10px 10px 0px;
  2694. border-radius: 15px;
  2695. box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
  2696. overflow: hidden;
  2697. margin-right: 15px;
  2698. position: relative;
  2699. display: flex;
  2700. flex-direction: column;
  2701. }
  2702. .title_content>.title_box>.content3>.file>.img {
  2703. width: 100%;
  2704. height: calc(100% - 35px);
  2705. object-fit: cover;
  2706. cursor: pointer;
  2707. }
  2708. .title_content>.title_box>.content3>.file>.del {
  2709. position: absolute;
  2710. width: 25px;
  2711. top: 10px;
  2712. right: 10px;
  2713. cursor: pointer;
  2714. }
  2715. .title_content>.title_box>.content3>.file>.download {
  2716. position: absolute;
  2717. width: 25px;
  2718. top: 10px;
  2719. right: 35px;
  2720. cursor: pointer;
  2721. opacity: .8;
  2722. }
  2723. .title_content>.title_box>.content3>.file>.name {
  2724. height: 35px;
  2725. width: 100%;
  2726. background: #f9f9f9;
  2727. display: flex;
  2728. align-items: center;
  2729. padding: 0 10px;
  2730. box-sizing: border-box;
  2731. }
  2732. .title_content>.title_box>.content3>.file>.name>span {
  2733. display: block;
  2734. text-overflow: ellipsis;
  2735. max-width: 100%;
  2736. white-space: nowrap;
  2737. overflow: hidden;
  2738. }
  2739. .table_content {
  2740. /* width: calc(100% - 48px);
  2741. margin: 20px auto 0; */
  2742. padding: 20px 24px;
  2743. width: 100%;
  2744. box-sizing: border-box;
  2745. }
  2746. .table_content>>>.el-table td {
  2747. padding: 5px 0;
  2748. }
  2749. .isDesktopTable_content{
  2750. width: 100%;
  2751. }
  2752. .isDTitle{
  2753. display: flex;
  2754. justify-content: space-between;
  2755. }
  2756. .isDBri{
  2757. display: flex;
  2758. padding: 15px 0;
  2759. font-size: 14px;
  2760. color: rgba(0, 0, 0, 0.4);
  2761. flex-direction: column;
  2762. height: 80px;
  2763. justify-content: space-between;
  2764. }
  2765. .answer_type {
  2766. background: #F0F2F5;
  2767. padding: 5px 10px;
  2768. display: block;
  2769. border-radius: 3px;
  2770. margin: 5px;
  2771. }
  2772. .table_file>.file {
  2773. min-width: 100px;
  2774. width: 100px;
  2775. height: 70px;
  2776. margin: 10px 10px 10px 0px;
  2777. border-radius: 5px;
  2778. box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
  2779. overflow: hidden;
  2780. margin-right: 15px;
  2781. position: relative;
  2782. display: flex;
  2783. flex-direction: column;
  2784. }
  2785. .table_file>.file>.img {
  2786. width: 100%;
  2787. height: calc(100% - 20px);
  2788. object-fit: cover;
  2789. cursor: pointer;
  2790. }
  2791. .table_file>.file>.del {
  2792. position: absolute;
  2793. width: 25px;
  2794. top: 10px;
  2795. right: 10px;
  2796. cursor: pointer;
  2797. }
  2798. .table_file>.file>.download {
  2799. position: absolute;
  2800. width: 25px;
  2801. top: 10px;
  2802. right: 35px;
  2803. cursor: pointer;
  2804. opacity: .8;
  2805. }
  2806. .table_file>.file>.name {
  2807. height: 20px;
  2808. width: 100%;
  2809. background: #f9f9f9;
  2810. display: flex;
  2811. align-items: center;
  2812. padding: 0 10px;
  2813. box-sizing: border-box;
  2814. font-size: 12px;
  2815. }
  2816. .table_file>.file>.name>span {
  2817. display: block;
  2818. text-overflow: ellipsis;
  2819. max-width: 100%;
  2820. white-space: nowrap;
  2821. overflow: hidden;
  2822. }
  2823. .btnA {
  2824. color: #fff;
  2825. background-color: #0061FF;
  2826. padding: 0 24px;
  2827. font-size: 14px;
  2828. min-width: 64px;
  2829. font-weight: 500;
  2830. border-radius: 4px;
  2831. box-sizing: border-box;
  2832. border: none;
  2833. cursor: pointer;
  2834. transition: all 0.2s ease-in-out;
  2835. height: 36px;
  2836. display: flex;
  2837. align-items: center;
  2838. justify-content: center;
  2839. line-height: 1;
  2840. margin-right: 10px;
  2841. position: relative;
  2842. }
  2843. .buttonBox {
  2844. position: absolute;
  2845. bottom: -0;
  2846. transform: translateY(100%);
  2847. background: #fff;
  2848. border-radius: 5px;
  2849. box-shadow: 0 0 3px 1px #e3e3e3;
  2850. width: 100%;
  2851. z-index: 999;
  2852. }
  2853. .buttonBox>div {
  2854. height: 40px;
  2855. line-height: 40px;
  2856. width: 100%;
  2857. text-align: center;
  2858. color: #000;
  2859. box-sizing: border-box;
  2860. }
  2861. .buttonBox>div+div {
  2862. border-top: 1px solid #e0e0e0;
  2863. }
  2864. .buttonBox>div:hover {
  2865. background: #f6f8ff;
  2866. }
  2867. .content4 {
  2868. width: 100%;
  2869. height: auto;
  2870. display: flex;
  2871. flex-wrap: nowrap;
  2872. overflow: auto;
  2873. }
  2874. .out_box {
  2875. display: flex;
  2876. flex-direction: column;
  2877. flex-wrap: nowrap;
  2878. /* width: 200px; */
  2879. min-width: 280px;
  2880. width: 280px;
  2881. background: #fff;
  2882. /* background-color: white; */
  2883. margin-right: 15px;
  2884. /* border: 1px solid #ccc; */
  2885. height: fit-content;
  2886. box-sizing: border-box;
  2887. border-radius: 0px 0px 5px 5px;
  2888. /* overflow: hidden; */
  2889. margin-bottom: 15px;
  2890. position: relative;
  2891. border-radius: 8px;
  2892. box-sizing: border-box;
  2893. overflow: hidden;
  2894. border: 1px solid #3682fc00;
  2895. cursor: pointer;
  2896. border: 1px solid #6a9ff5;
  2897. height: auto;
  2898. }
  2899. .out_boxActive {
  2900. box-sizing: border-box;
  2901. border: 3px solid #3681FC !important;
  2902. }
  2903. .out_box:hover {
  2904. border: 1px solid #3681FC;
  2905. }
  2906. .bottom_box {
  2907. width: 100%;
  2908. display: flex;
  2909. padding: 10px;
  2910. flex-direction: column;
  2911. box-sizing: border-box;
  2912. height: 121px;
  2913. flex-wrap: nowrap;
  2914. justify-content: space-evenly;
  2915. }
  2916. .bottom_box>div:nth-child(1) {
  2917. width: 100%;
  2918. /* overflow: hidden;
  2919. text-overflow: ellipsis;
  2920. white-space: nowrap;
  2921. font-weight: bold; */
  2922. display: flex;
  2923. align-items: center;
  2924. justify-content: space-between;
  2925. }
  2926. .bottom_box>div:nth-child(1)>span:nth-child(1) {
  2927. max-width: 100%;
  2928. overflow: hidden;
  2929. text-overflow: ellipsis;
  2930. white-space: nowrap;
  2931. font-weight: bold;
  2932. }
  2933. .bottom_box>div:nth-child(1)>span:nth-child(2) {
  2934. min-width: fit-content;
  2935. font-size: 14px;
  2936. color: #8c8c8c;
  2937. }
  2938. .tup {
  2939. width: 100%;
  2940. height: auto;
  2941. margin: 0 auto;
  2942. overflow: hidden;
  2943. display: flex;
  2944. flex-direction: column;
  2945. align-items: center;
  2946. padding: 10px;
  2947. box-sizing: border-box;
  2948. }
  2949. .tup>img {
  2950. width: 100%;
  2951. /* height: 100%; */
  2952. height: 150px;
  2953. /* object-fit: cover; */
  2954. object-fit: contain;
  2955. }
  2956. .kc_time {
  2957. margin-top: 8px;
  2958. font-size: 14px;
  2959. color: #717C8D;
  2960. }
  2961. .kc_time+.kc_time {
  2962. margin-top: 0;
  2963. }
  2964. .kc_t {
  2965. margin-top: 5px;
  2966. width: 100%;
  2967. white-space: nowrap;
  2968. overflow: hidden;
  2969. text-overflow: ellipsis;
  2970. display: flex;
  2971. align-items: center;
  2972. justify-content: space-between;
  2973. }
  2974. .kc_t>span:nth-child(1) {
  2975. max-width: 100%;
  2976. overflow: hidden;
  2977. text-overflow: ellipsis;
  2978. white-space: nowrap;
  2979. }
  2980. .kc_t>span:nth-child(2) {
  2981. min-width: fit-content;
  2982. font-size: 14px;
  2983. color: #8c8c8c;
  2984. }
  2985. .title_box>.title>.title_downBtn{
  2986. position: absolute;
  2987. right: 10px;
  2988. top: 0;
  2989. }
  2990. .fileLoadDiv >>> .el-dialog__header{
  2991. display: none;
  2992. }
  2993. .fileLoadDiv >>> .el-dialog__body{
  2994. display: flex;
  2995. justify-content: center;
  2996. }
  2997. .fileLoadDiv >>> .el-dialog{
  2998. margin-top: 60vh !important;
  2999. width: 200px !important;
  3000. height: 80px;
  3001. display: flex;
  3002. justify-content: center;
  3003. align-items: center;
  3004. border-radius: 15px;
  3005. }
  3006. .mask {
  3007. background-color: rgb(0 0 0 / 30%);
  3008. /* position: fixed; */
  3009. position: absolute;
  3010. top: 0;
  3011. left: 0;
  3012. width: 100%;
  3013. height: 100%;
  3014. z-index: 90;
  3015. display: flex;
  3016. align-items: center;
  3017. justify-content: center;
  3018. }
  3019. .progressBox {
  3020. width: 300px;
  3021. height: 150px;
  3022. background: #fff;
  3023. border-radius: 10px;
  3024. box-shadow: 0 0 6px 1px #bfbfbf;
  3025. display: flex;
  3026. align-items: center;
  3027. justify-content: center;
  3028. flex-direction: column;
  3029. position: relative;
  3030. color: #6c6c6c;
  3031. }
  3032. .progressBox>>>.el-progress-bar__outer {
  3033. background-color: #d1dfff !important;
  3034. }
  3035. .progressBox .lbox {
  3036. height: 50px;
  3037. font-size: 19px;
  3038. display: flex;
  3039. align-items: center;
  3040. color: #747474;
  3041. }
  3042. .progressBox .lbox img {
  3043. width: 40px;
  3044. margin-right: 20px;
  3045. }
  3046. </style>