12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894 |
- <template>
- <div class="pb_content" style="background: #f0f2f5;" v-loading="loading">
- <div class="pb_content_body" style="position: relative; margin: 0">
- <div class="right">
- <div class="courseTop">
- <div class="stepsNav">
- <el-breadcrumb separator-class="el-icon-arrow-right">
- <el-breadcrumb-item :to="{
- path:
- '/test?userid=' +
- userid +
- '&oid=' +
- oid +
- '&org=' +
- org +
- '&role=' +
- role,
- }">表单管理</el-breadcrumb-item>
- <el-breadcrumb-item>
- <span style="color: rgb(15, 126, 255)">查看表单</span>
- </el-breadcrumb-item>
- </el-breadcrumb>
- </div>
- <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
- </div>
- <div class="step_box" ref="stepBox" v-loading="pdfLoading">
- <div class="test_title" :style="!isDesktop?'justify-content: center;':''">
- <div class="left">
- <div class="title">{{ testJson.title }}</div>
- <div class="info" v-if="isDesktop">
- <div class="info_box" v-if="testJson.typeN">
- <span>类型:</span>
- <span>{{ testJson.typeN }}</span>
- </div>
- <div class="info_box">
- <span>填写范围:</span>
- <span>{{ testJson.juriP ? testJson.juriP : '所有人' }}</span>
- </div>
- <div class="info_box" v-if="testJson.overtime">
- <span>截止时间:</span>
- <span>{{ testJson.overtime }}</span>
- </div>
- </div>
- </div>
- <div class="right" v-if="isDesktop">
- <div class="data_box">
- <span>提交数量</span>
- <span><span class="big">{{ works.length }}</span>份</span>
- </div>
- <div class="data_box" v-if="testJson.juriP">
- <span>表单完成率</span>
- <span><span class="big">{{ (iscount / pcount * 100).toFixed(0) }}</span>%</span>
- </div>
- <div class="data_box" v-if="testJson.juriP">
- <span>未完成人数</span>
- <span><span class="big">{{ pcount - iscount }}</span></span>
- </div>
- <div class="btn_box" @click="dialogVisibleShare = true">
- <span></span>
- <span>提醒</span>
- </div>
- </div>
- </div>
- <div class="search_nav" v-if="isDesktop">
- <div class="right">
- <span :class="{ active: stype == 1 }" @click="checkDataType(1)">按题目查看</span>
- <span :class="{ active: stype == 2 }" @click="checkDataType(2)">按人员查看</span>
- <span :class="{ active: stype == 3 }" @click="checkDataType(3)" v-show="false">按数量查看</span>
- </div>
- <div class="left" v-if="isDesktop">
- <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3">
- <el-select v-model="TeachingValue" @change="searchCourse" placeholder="按教研室">
- <el-option
- label="全部"
- value="">
- </el-option>
- <el-option
- v-for="item in TeachingOptions"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3">
- <el-date-picker
- v-model="SubmitTime"
- type="date"
- @change="searchCourse"
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- <!-- <el-select v-model="SubmitTime" placeholder="按提交时间筛选">
- <el-option
- label="全部"
- value="">
- </el-option>
- <el-option
- v-for="item in SubmitTimeOptions"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select> -->
- </div>
- <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3">
- <el-input v-model="courseName" class="student_input" placeholder="请输入需要搜索的姓名"></el-input>
- <span class="serach_icon" @click="searchCourse"></span>
- </div>
- <div class="btnA" v-if="stype == 1 && !pdfLoading" @click="exportPDF">导出PDF</div>
- <div class="btnA" v-if="stype == 2" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
- 导出数据
- <div v-show="btnDisplay" class="buttonBox">
- <div type="primary" @click="exportExcel">下载汇总表格</div>
- <div type="primary" @click="exportAllWord">导出人员数据</div>
- </div>
- </div>
- <div class="btnA" v-if="stype == 3" @click="exportAllWord2">导出人员数据</div>
- </div>
- </div>
- <div class="search_nav" style="display:flex;justify-content:space-evenly;border: none;" v-if="!isDesktop">
- <div class="right">
- <span :class="{ active2: stype == 1 }" @click="checkDataType(1)">按题目查看</span>
- <span :class="{ active2: stype == 2 }" @click="checkDataType(2)">按人员查看</span>
- <span :class="{ active2: stype == 3 }" @click="checkDataType(3)" v-show="false">按数量查看</span>
- </div>
- </div>
- <div class="title_content" v-if="stype == 1 && isDesktop" v-loading="isLoading">
- <div class="title_box" v-if="!testArray.length"
- style="display: flex;align-items: center;justify-content: center;height: 500px;">
- 暂无内容
- </div>
- <div class="title_box" v-for="(item, index) in testArray" :key="index">
- <div class="title">
- <el-tooltip :content="selectType(item)" placement="top" effect="dark">
- <span class="test_icon"
- :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>
- </el-tooltip>
- <span>{{ item.title }}</span>
- <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)">批量下载附件</el-button>
- <div v-if="item.type==7" style="right:0;position: absolute;">平均分:{{ getAverageScore(index) }}</div>
- </div>
- <div class="detail" v-if="item.detail">{{ item.detail }}</div>
- <div class="content1" v-if="item.type == 1">
- <div class="left">
- <div class="title">
- <span>选项</span>
- <span>小计</span>
- <span>比例</span>
- </div>
- <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
- <span>
- <el-tooltip :content="data.name" placement="top" effect="dark">
- <!-- content to trigger tooltip here -->
- <span>{{ data.name }}</span>
- </el-tooltip>
- </span>
- <span>{{ data.count }}</span>
- <span>
- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
- :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress>
- </span>
- </div>
- </div>
- <div class="right">
- <checkPie :dataJ="item.array"></checkPie>
- </div>
- </div>
- <div class="content2" v-if="item.type == 3">
- <div class="left">
- <div class="title">
- <span>序号</span>
- <span>词频</span>
- <span>答案文本</span>
- </div>
- <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
- <span>{{ index2 + 1 }}</span>
- <span>{{ data.count }}次</span>
- <el-tooltip :content="data.name" placement="top" effect="dark">
- <!-- content to trigger tooltip here -->
- <span>{{ data.name }}</span>
- </el-tooltip>
- </div>
- </div>
- <div class="right">
- <wordcloud :data="item.array" nameKey="name" valueKey="count" :showTooltip="false"
- :wordClick="wordClickHandler">
- </wordcloud>
- </div>
- </div>
- <div class="content3" v-if="item.type == 5">
- <div class="file" v-for="(file, index2) in item.array" :key="index + '-' + index2"
- @click.stop="checkFile(file)">
- <img class="download" src="../../../../assets/icon/fileIcon/download.png"
- @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
- <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
- <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
- <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
- <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
- <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
- <div class="name">
- <el-tooltip :content="file.name" placement="top" effect="dark">
- <span>{{ file.name }}</span>
- </el-tooltip>
- </div>
- </div>
- </div>
- <div class="content4" v-if="item.type == 6">
- <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
- <div class="tup">
- <img :src="item.cover != null && item.cover != ''
- ? JSON.parse(item.cover).length > 0
- ? JSON.parse(item.cover)[0].url
- : mr
- : mr
- " alt />
- <div class="bottom_box">
- <div>
- <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
- <span>{{ item.title }}</span>
- </el-tooltip>
- </div>
- <div class="kc_t">
- <span>{{ item.username }}</span>
- <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
- </div>
- <div class="kc_time">
- <span style="color: #717C8D">创建日期:</span>{{ item.time }}
- </div>
- <div class="kc_time">
- <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
- </div>
- </div>
- </div>
- </div>
- <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
- {{ courses }}
- </div> -->
- </div>
- <div class="content1" v-if="item.type == 7">
- <div class="left">
- <div class="title">
- <span>评分</span>
- <span>小计</span>
- <span>比例</span>
- </div>
- <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
- <span>
- <span>{{ data.name }}</span>
- </span>
- <span>{{ data.count }}</span>
- <span>
- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
- :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress>
- </span>
- </div>
- </div>
- <div class="right">
- <checkPie :dataJ="item.array"></checkPie>
- </div>
- </div>
- <div class="content2" v-if="item.type == 8">
- <div class="left">
- <div class="title">
- <span>序号</span>
- <span>词频</span>
- <span>日期</span>
- </div>
- <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
- <span>{{ index2 + 1 }}</span>
- <span>{{ data.count }}次</span>
- <el-tooltip :content="data.name" placement="top" effect="dark">
- <!-- content to trigger tooltip here -->
- <span>{{ data.name }}</span>
- </el-tooltip>
- </div>
- </div>
- <div class="right">
- <wordcloud :data="item.array" nameKey="name" valueKey="count" :showTooltip="false"
- :wordClick="wordClickHandler">
- </wordcloud>
- </div>
- </div>
- </div>
- </div>
- <div class="title_content" v-if="stype == 1 && !isDesktop" v-loading="isLoading">
- <div class="title_box" v-if="!testArray.length"
- style="display: flex;align-items: center;justify-content: center;height: 500px;">
- 暂无内容
- </div>
- <div class="title_box" v-for="(item, index) in testArray" :key="index">
- <div class="title" style="font-size: 16px;display: flex;justify-content: space-between;align-items: center;">
- <!-- <el-tooltip :content="selectType(item)" placement="top" effect="dark">
- <span class="test_icon"
- :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>
- </el-tooltip> -->
- <div style="display: flex;">
- <div class="topicTitCss">第{{ index+1 }}题:</div>
- <el-tooltip :content="item.title" placement="top" effect="dark">
- <div style="width: 100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ item.title }}</div>
- </el-tooltip>
-
- </div>
- <div style="display: flex;">
- <!-- <div v-if="item.type==7" style="right:0;position: absolute;">平均分:{{ getAverageScore(index) }}</div> -->
- <div style="color: rgba(0, 0, 0, 0.4);display: flex;align-items: center;">[{{ selectType(item) }}]</div>
- <!-- <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> -->
- </div>
- </div>
- <div class="detail" v-if="item.detail">{{ item.detail }}</div>
- <div class="content1" style="width:100%;display: block;" v-if="item.type == 1">
- <div class="left" style="width:100%" v-if="!item.cut">
- <div class="isDesktopTitle">
- <div>选项</div>
- <div>小计</div>
- <div>比例</div>
- </div>
- <div class="isDesktopTitle" v-for="(data, index2) in item.array" :key="index + '-' + index2">
- <!-- <span> -->
- <el-tooltip :content="data.name" placement="top" effect="dark">
- <!-- content to trigger tooltip here -->
- <div>{{ data.name }}</div>
- </el-tooltip>
- <!-- </span> -->
- <div>{{ data.count }}</div>
- <div>
- {{ data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0 }}
- <!-- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
- :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress> -->
- </div>
- </div>
- </div>
- <div class="right isDesktopRight" v-if="item.cut">
- <checkPie :dataJ="item.array"></checkPie>
- </div>
- <div class="cutBtnBlockCss">
- <div class="cutBtnCss" @click="item.cut=!item.cut">{{ item.cut?'查看详情':'查看视图' }}</div>
- </div>
- </div>
- <div class="content2" style="width:100%;display: block;" v-if="item.type == 3">
- <div class="left" style="width:100%" v-if="!item.cut">
- <div class="title">
- <span>序号</span>
- <span>词频</span>
- <span>答案文本</span>
- </div>
- <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
- <span>{{ index2 + 1 }}</span>
- <span>{{ data.count }}次</span>
- <el-tooltip :content="data.name" placement="top" effect="dark">
- <!-- content to trigger tooltip here -->
- <span>{{ data.name }}</span>
- </el-tooltip>
- </div>
- </div>
- <div class="right isDesktopRight" v-if="item.cut">
- <wordcloud :data="item.array" nameKey="name" valueKey="count" :showTooltip="false"
- :wordClick="wordClickHandler">
- </wordcloud>
- </div>
- <div class="cutBtnBlockCss">
- <div class="cutBtnCss" @click="item.cut=!item.cut">{{ item.cut?'查看详情':'查看视图' }}</div>
- </div>
- </div>
- <div class="content3" v-if="item.type == 5">
- <div class="file" v-for="(file, index2) in item.array" :key="index + '-' + index2"
- @click.stop="checkFile(file)">
- <img class="download" src="../../../../assets/icon/fileIcon/download.png"
- @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
- <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
- <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
- <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
- <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
- <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
- <div class="name">
- <el-tooltip :content="file.name" placement="top" effect="dark">
- <span>{{ file.name }}</span>
- </el-tooltip>
- </div>
- </div>
- </div>
- <div class="content4" v-if="item.type == 6">
- <div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
- <div class="tup">
- <img :src="item.cover != null && item.cover != ''
- ? JSON.parse(item.cover).length > 0
- ? JSON.parse(item.cover)[0].url
- : mr
- : mr
- " alt />
- <div class="bottom_box">
- <div>
- <el-tooltip :content="item.title" popper-class="text_tooltip" placement="top" effect="dark">
- <span>{{ item.title }}</span>
- </el-tooltip>
- </div>
- <div class="kc_t">
- <span>{{ item.username }}</span>
- <span>{{ item.state == 1 ? '阶段模式' : item.state == 2 ? '任务模式' : '极简模式' }}</span>
- </div>
- <div class="kc_time">
- <span style="color: #717C8D">创建日期:</span>{{ item.time }}
- </div>
- <div class="kc_time">
- <span style="color: #717C8D">修改日期:</span>{{ item.update_at }}
- </div>
- </div>
- </div>
- </div>
- <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
- {{ courses }}
- </div> -->
- </div>
- <div class="content1" style="width:100%;display: block;" v-if="item.type == 7">
- <div class="left" style="width:100%" v-if="!item.cut">
- <div class="isDesktopTitle">
- <div>评分</div>
- <div>小计</div>
- <div style="width: 120px;">比例</div>
- </div>
- <div class="isDesktopTitle" v-for="(data, index2) in item.array" :key="index + '-' + index2">
- <!-- <span> -->
- <div>{{ data.name }}</div>
- <!-- </span> -->
- <div>{{ data.count }}</div>
- <div style="width: 120px;">
- {{ data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0 }}
- <!-- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
- :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress> -->
- </div>
- </div>
- </div>
- <div class="right isDesktopRight" v-if="item.cut">
- <checkPie :dataJ="item.array"></checkPie>
- </div>
- <div class="cutBtnBlockCss">
- <div class="cutBtnCss" @click="item.cut=!item.cut">{{ item.cut?'查看详情':'查看视图' }}</div>
- </div>
- </div>
- <div class="content2" style="width:100%;display: block;" v-if="item.type == 8">
- <div class="left" style="width:100%" v-if="!item.cut">
- <div class="title">
- <span>序号</span>
- <span>词频</span>
- <span>日期</span>
- </div>
- <div class="data" v-for="(data, index2) in item.array" :key="index + '-' + index2">
- <span>{{ index2 + 1 }}</span>
- <span>{{ data.count }}次</span>
- <el-tooltip :content="data.name" placement="top" effect="dark">
- <!-- content to trigger tooltip here -->
- <span>{{ data.name }}</span>
- </el-tooltip>
- </div>
- </div>
- <div class="right isDesktopRight" v-if="item.cut">
- <wordcloud :data="item.array" nameKey="name" valueKey="count" :showTooltip="false"
- :wordClick="wordClickHandler">
- </wordcloud>
- </div>
- <div class="cutBtnBlockCss">
- <div class="cutBtnCss" @click="item.cut=!item.cut">{{ item.cut?'查看详情':'查看视图' }}</div>
- </div>
- </div>
- </div>
- </div>
- <div class="table_content" v-if="stype == 2 && isDesktop">
- <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
- style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
- @filter-change="handleFilterChange">
- <el-table-column fixed label="序号" width="80px" align="left">
- <template slot-scope="scope">
- {{ scope.$index + 1 }}
- </template>
- </el-table-column>
- <el-table-column fixed prop="name" label="提交人" width="120px" align="left">
- </el-table-column>
- <el-table-column prop="time" label="提交时间" width="170px" align="left">
- <template slot-scope="scope">
- <span :style="`${testJson.overtime&&new Date(testJson.overtime)<new Date(scope.row.time)?'color:#d12920':''}`">{{ scope.row.time }}</span>
- </template>
- </el-table-column>
- <el-table-column v-for="(item, index) in chapters" :key="index" :label="item.json.title"
- :min-width="item.type == 5 ? 200 : 150" align="left" :filters="item.type == 1 ? item.nameFilters : item.type == 6? item.nameFilters : null"
- :filter-method="item.type == 1 ? (value, row) => { return filterName(value, row, index) } : item.type == 6?(value, row) => { return filterCourse(value, row, index)}:null"
- :filter-placement="item.type == 1 || item.type ==6 ? filterPlacement : null">
- <template slot-scope="scope">
- <div v-if="scope.row.array[index].type == 1" style="display: flex; flex-wrap: wrap;">
- <span class="answer_type" v-for="(answer2, index2) in scope.row.array[index].json.answer2"
- :key="index + '-' + index2">{{ scope.row.array[index].json.array[answer2].option }}</span>
- </div>
- <div v-if="scope.row.array[index].type == 3 || scope.row.array[index].type == 8" style="display: flex; flex-wrap: wrap;">
- {{ scope.row.array[index].json.answer2 }}
- </div>
- <div v-if="scope.row.array[index].type == 5" style="display: flex; flex-wrap: wrap;"
- class="table_file">
- <div class="file" v-for="(file, index2) in scope.row.array[index].json.file"
- :key="index + '-' + index2" @click.stop="checkFile(file)">
- <img class="download" src="../../../../assets/icon/fileIcon/download.png"
- @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
- <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
- <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
- <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
- <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
- <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
- <div class="name">
- <el-tooltip :content="file.name" placement="top" effect="dark">
- <span>{{ file.name }}</span>
- </el-tooltip>
- </div>
- </div>
- </div>
- <div v-if="scope.row.array[index].type == 6" style="display: flex; flex-wrap: wrap;">
- {{ scope.row.array[index].json.answer2}}
- </div>
- <div v-if="scope.row.array[index].type == 7" style="display: flex; flex-wrap: wrap;">
- {{ getScore(scope.row.array[index].json) }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="300px" fixed="right" v-if="isN!=1">
- <template slot-scope="scope">
- <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
- <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
- <el-button @click="deleteTest(scope.row.id)" type="primary" size="small">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div class="table_content" v-if="stype == 2 && !isDesktop">
- <div v-for="(i,index) in worksArray" :key="i.id" class="isDesktopTable_content">
- <div class="isDTitle CutCss">
- <div style="font-size: 16px;font-weight: 600;">{{ i.name }}</div>
- <div :style="'font-size: 14px',i.cut?'color:rgba(54, 129, 252, 1)':'color: rgba(0, 0, 0, 0.6);'">{{ i.time }}</div>
- <div @click="i.cut=!i.cut">
- <img v-if="!i.cut" src="../../../../assets/icon/fileIcon/downImg.png" alt="">
- <img v-else src="../../../../assets/icon/fileIcon/upImg.png" alt="">
- </div>
- </div>
- <div v-if="i.cut">
- <div class="isDBri">
- <div>序号:{{ i.time }}</div>
- <div>提交时间:{{ i.time }}</div>
- <div>评课人:</div>
- </div>
- <div style="height: 1px;background-color: #717C8D;width: 100%;margin-bottom: 10px;"></div>
- <div>
- <div v-for="(k,kin) in chapters" :key="k.id" class="isCTiBlc">
- <div v-if="k.type == 1">
- <div class="isDTitle2">
- <div style="display: flex;justify-content: space-between;">
- <div style="display: flex;">
- <span class="topicTitCss">第{{kin+1}}题:</span>
- <div class="isDTitle2JsonTit">
- {{ k.json.title }}
- </div>
- </div>
- <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
- </div>
- <div class="IsDAnswer">
- <div v-for="(r, index2) in i.array[kin].json.answer2"
- :key="index + '-' + index2">
- {{ i.array[kin].json.array[r].option }}
- </div>
- </div>
- </div>
- </div>
- <div v-if="k.type == 3 || k.type == 8">
- <div class="isDTitle2">
- <div style="display: flex;justify-content: space-between;">
- <div style="display: flex;">
- <span class="topicTitCss">第{{kin+1}}题:</span>
- <div class="isDTitle2JsonTit">
- {{ k.json.title }}
- </div>
- </div>
- <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
- </div>
- <div class="IsDAnswer">
- {{ i.array[kin].json.answer2 }}
- </div>
- </div>
- </div>
- <div v-if="k.type == 5">
- <div class="isDTitle2">
- <div style="display: flex;justify-content: space-between;">
- <div style="display: flex;">
- <span class="topicTitCss">第{{kin+1}}题:</span>
- <div class="isDTitle2JsonTit">
- {{ k.json.title }}
- </div>
- </div>
- <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
- </div>
- <div class="IsDAnswer">
- <div class="IsDFile" v-for="(file, index2) in i.array[kin].json.file"
- :key="index + '-' + index2" @click.stop="checkFile(file)">
- <img class="IsDownload" src="../../../../assets/icon/fileIcon/download.png"
- @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
- <img class="IsDImg" :src="wordIcon" alt="" v-if="file.type == 1" />
- <img class="IsDImg" :src="videoIcon" alt="" v-if="file.type == 2" />
- <img class="IsDImg" :src="file.url" alt="" v-if="file.type == 3" />
- <img class="IsDImg" :src="wordIcon" alt="" v-if="file.type == 4" />
- <img class="IsDImg" :src="fileIcon" alt="" v-if="file.type == 5" />
- <div class="name" style="height: 30px;background-color: #ccc;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
- <!-- <el-tooltip :content="file.name" placement="top" effect="dark"> -->
- {{ file.name }}
- <!-- </el-tooltip> -->
- </div>
- </div>
- </div>
- </div>
- </div>
- <div v-if="k.type.type == 6">
- <div class="isDTitle2">
- <div style="display: flex;justify-content: space-between;">
- <div style="display: flex;">
- <span class="topicTitCss">第{{kin+1}}题:</span>
- <div class="isDTitle2JsonTit">
- {{ k.json.title }}
- </div>
- </div>
- <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
- </div>
- <div class="IsDAnswer">
- {{ i.array[kin].json.answer2 }}
- </div>
- </div>
- </div>
- <div v-if="k.type == 7">
- <div class="isDTitle2">
- <div style="display: flex;justify-content: space-between;">
- <div style="display: flex;">
- <span class="topicTitCss">第{{kin+1}}题:</span>
- <div class="isDTitle2JsonTit">
- {{ k.json.title }}
- </div>
- </div>
- <div style="color: rgba(0, 0, 0, 0.4);">[{{ selectType2(k.type,k.json.type) }}]</div>
- </div>
- <div class="IsDAnswer">
- {{ getScore(i.array[index].json) }}
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div style="width: 100%;display: flex;justify-content: end;">
- <div @click="i.cut=!i.cut" style="display: flex;flex-direction: column;align-items: center">
- <img src="../../../../assets/icon/fileIcon/retractImg.png" alt="">
- <div style="color: rgba(0, 0, 0, 0.4);font-size: 16px;">收起</div>
- </div>
- </div>
- </div>
- <div style="height: 1px;background-color: #717C8D;width: 100%;margin-bottom: 10px;"></div>
- </div>
- <!-- <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
- style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
- @filter-change="handleFilterChange">
- <el-table-column fixed label="序号" width="80px" align="left">
- <template slot-scope="scope">
- {{ scope.$index + 1 }}
- </template>
- </el-table-column>
- <el-table-column fixed prop="name" label="提交人" width="120px" align="left">
- </el-table-column>
- <el-table-column prop="time" label="提交时间" width="170px" align="left">
- <template slot-scope="scope">
- <span :style="`${testJson.overtime&&new Date(testJson.overtime)<new Date(scope.row.time)?'color:#d12920':''}`">{{ scope.row.time }}</span>
- </template>
- </el-table-column>
- <el-table-column v-for="(item, index) in chapters" :key="index" :label="item.json.title"
- :min-width="item.type == 5 ? 200 : 150" align="left" :filters="item.type == 1 ? item.nameFilters : item.type == 6? item.nameFilters : null"
- :filter-method="item.type == 1 ? (value, row) => { return filterName(value, row, index) } : item.type == 6?(value, row) => { return filterCourse(value, row, index)}:null"
- :filter-placement="item.type == 1 || item.type ==6 ? filterPlacement : null">
- <template slot-scope="scope">
- <div v-if="scope.row.array[index].type == 1" style="display: flex; flex-wrap: wrap;">
- <span class="answer_type" v-for="(answer2, index2) in scope.row.array[index].json.answer2"
- :key="index + '-' + index2">{{ scope.row.array[index].json.array[answer2].option }}</span>
- </div>
- <div v-if="scope.row.array[index].type == 3 || scope.row.array[index].type == 8" style="display: flex; flex-wrap: wrap;">
- {{ scope.row.array[index].json.answer2 }}
- </div>
- <div v-if="scope.row.array[index].type == 5" style="display: flex; flex-wrap: wrap;"
- class="table_file">
- <div class="file" v-for="(file, index2) in scope.row.array[index].json.file"
- :key="index + '-' + index2" @click.stop="checkFile(file)">
- <img class="download" src="../../../../assets/icon/fileIcon/download.png"
- @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
- <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
- <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
- <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
- <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
- <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
- <div class="name">
- <el-tooltip :content="file.name" placement="top" effect="dark">
- <span>{{ file.name }}</span>
- </el-tooltip>
- </div>
- </div>
- </div>
- <div v-if="scope.row.array[index].type == 6" style="display: flex; flex-wrap: wrap;">
- {{ scope.row.array[index].json.answer2}}
- </div>
- <div v-if="scope.row.array[index].type == 7" style="display: flex; flex-wrap: wrap;">
- {{ getScore(scope.row.array[index].json) }}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="300px" fixed="right" v-if="isN!=1">
- <template slot-scope="scope">
- <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
- <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
- <el-button @click="deleteTest(scope.row.id)" type="primary" size="small">删除</el-button>
- </template>
- </el-table-column>
- </el-table> -->
- </div>
- <div class="table_content" v-if="stype == 3">
- <div class="student_table">
- <el-table ref="table" :data="tableData" border :fit="true" v-loading="isLoading" style="width: 100%"
- :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
- <el-table-column prop="username" label="提交人" min-width="15" align="center">
- </el-table-column>
- <el-table-column prop="time" label="提交时间" min-width="15" align="center">
- </el-table-column>
- <el-table-column label="是否批改" min-width="15" align="center">
- <template slot-scope="scope">
- <div>{{ scope.row.type == 3 ? '是' : '否' }}</div>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="300px" v-if="isDesktop">
- <template slot-scope="scope" >
- <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
- <el-button @click="setWordHtml2(scope.row)" type="primary" size="small">导出答题信息</el-button>
- <el-button @click="deleteTest(scope.row.id)" type="primary" size="small">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div class="student_page">
- <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="total"
- @current-change="handleCurrentChange">
- </el-pagination>
- </div>
- </div>
- </div>
- </div>
- </div>
- <share-box :testJson="testJson" :TeachingValue="TeachingValue" :TeachName="TeachNameCpt" :dialogVisibleShare.sync="dialogVisibleShare"></share-box>
- <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
- <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
- <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl"></wOffice>
- </div>
- </template>
- <script>
- import shareBox from '../shareBox/index.vue'
- import videoIcon from '../../../../assets/icon/fileIcon/isVideo.png'
- import wordIcon from '../../../../assets/icon/fileIcon/isWord.png'
- import fileIcon from '../../../../assets/icon/fileIcon/word2.png'
- import wVideo from "../file/wVideo.vue";
- import wpdf from "../file/wPdf2.vue";
- import wOffice from "../file/wOffice.vue";
- import wordcloud from 'vue-wordcloud';
- import checkPie from '../data/checkPie.vue';
- import { downloadPDF } from '../../../tools/pdf'
- import JSZip from "jszip";
- import FileSaver from "file-saver";
- import XLSX from "xlsx-js-style";
- const getFile = (url) => {
- return new Promise((resolve, reject) => {
- var credentials = {
- accessKeyId: "AKIATLPEDU37QV5CHLMH",
- secretAccessKey: "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",
- }; //秘钥形式的登录上传
- window.AWS.config.update(credentials);
- window.AWS.config.region = "cn-northwest-1"; //设置区域
- let url2 = url;
- let _url2 = "";
- if (
- url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
- ) {
- _url2 = url2.split(
- "https://view.officeapps.live.com/op/view.aspx?src="
- )[1];
- } else {
- _url2 = url2;
- }
- var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
- let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
- var params = {
- Bucket: "ccrb",
- Key: name
- };
- s3.getObject(params, function (err, data) {
- if (err) {
- console.log(err, err.stack)
- resolve({ data: 1 });
- } else {
- resolve({ data: data.Body });
- console.log(data);
- } // sxuccessful response
- });
- // axios({
- });
- };
- export default {
- components: {
- shareBox,
- wVideo,
- wpdf,
- wOffice,
- checkPie,
- wordcloud
- },
- data() {
- return {
- userid: this.$route.query.userid,
- oid: this.$route.query.oid,
- org: this.$route.query.org,
- role: this.$route.query.role,
- cid: this.$route.query.cid,
- isN: this.$route.query.isN,
- peopleId: this.$route.query.peopleId,
- screenWidth: window.innerWidth,
- isDesktop: false,
- title: "",
- testType: [],
- see: false,
- cJson: [],
- loading: false,
- look: "",
- TeachingOptions:[],
- TeachingValue :'',
- SubmitTimeOptions: [],
- SubmitTime: '',
- tableHeight: 500,
- isLoading: false,
- pageSize: 10,
- total: 0,
- page: 1,
- tableData: [],
- testJson: {},
- works: [],
- iscount: 0,
- pcount: 0,
- stype: 1,
- courseName: "",
- dialogVisibleShare: false,
- worksArray: [],
- testArray: [],
- options2: {
- 1: "选择题",
- // 2: "问答题",
- 3: "问答题",
- 4: "添加文档",
- 5: "附件"
- },
- videoIcon: videoIcon,
- wordIcon: wordIcon,
- fileIcon: fileIcon,
- dialogVisiblePdf: false,
- dialogVisibleVideo: false,
- dialogVisibleOffice: false,
- wurl: "",
- chapters: [],
- filterPlacement: 'bottom-end',
- pdfLoading: false,
- btnDisplay: false
- };
- },
- watch: {},
- computed: {
- TeachNameCpt: function () {
- // `this` 指向 vm 实例
- return this.TeachingOptions.filter(i => {return i.id == this.TeachingValue})
- },
- // vcWords() {
- // return function (array) {
- // let _array = [];
- // if (array.length) {
- // for (var i = 0; i < array.length; i++) {
- // _array.push(
- // {
- // text: array[i].name,
- // weight: array[i].count,
- // }
- // )
- // }
- // }
- // console.log(_array);
- // return array.length ? _array : [];
- // };
- // },
- getScore() {
- return function (item) {
- let array = []
- for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
- array.push(i)
- }
- return item.answer2 ? array[item.answer2] : ''
- };
- },
- selectType() {
- return function (item) {
- if (item.type == 1 && item.atype == 2) {
- return '多选题'
- } else if (item.type == 1 && item.atype == 1) {
- return '单选题'
- } else if (item.type == 3) {
- return '问答题'
- } else if (item.type == 5) {
- return '附件'
- } else if (item.type == 6) {
- return '课程'
- } else if (item.type == 7) {
- return '评分'
- } else if (item.type == 8) {
- return '日期'
- }
- };
- },
- selectType2() {
- return function (val1,val2) {
- if (val1 == 1 && val2 == 2) {
- return '多选题'
- } else if (val1 == 1 && val2 == 1) {
- return '单选题'
- } else if (val1 == 3) {
- return '问答题'
- } else if (val1 == 5) {
- return '附件'
- } else if (val1 == 6) {
- return '课程'
- } else if (val1 == 7) {
- return '评分'
- } else if (val1 == 8) {
- return '日期'
- }
- };
- },
- // 获取评分的平均分
- getAverageScore(){
- return (_index)=>{
- let _result = 0;
- let _sum = 0;
- this.worksArray.forEach(i1=>{
- _result+=i1.array[_index].json.answer2
- _sum+=1;
- })
- _result = _sum ? (_result/_sum).toFixed(2) : 0
- return _result ? _result : 0;
- }
- }
- },
- methods: {
- //获取教研室列表
- getClass2() {
- let params = {
- oid: this.oid,
- };
- this.ajax
- .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
- .then((res) => {
- this.TeachingOptions = res.data[0];
- console.log('this.TeachingOptions',this.TeachingOptions);
- })
- .catch((err) => {
- this.isLoading = false;
- console.error(err);
- });
- },
- filterName(value, row, index) {
- let name = []
- for (var i = 0; i < row.array[index].json.answer2.length; i++) {
- name.push(row.array[index].json.array[row.array[index].json.answer2[i]].option)
- }
- console.log(name.indexOf(value) != -1);
- return name.indexOf(value) != -1;
- },
- // 筛选课程
- filterCourse(value, row, index) {
- return row.array[index].json.answer2 == value;
- },
- wordClickHandler(name, value) {
- // this.$notify({
- // title: name,
- // message: "数量:"+value
- // });
- },
- retrunCourse() {
- this.goTo(
- "/test?userid=" +
- this.userid +
- "&oid=" +
- this.oid +
- "&org=" +
- this.org +
- "&role=" +
- this.role
- );
- },
- goTo(path) {
- this.$router.push(path);
- },
- tableRowClassName({ row, rowIndex }) {
- if ((rowIndex + 1) % 2 === 0) {
- return "even_row";
- } else {
- return "";
- }
- },
- changeHeight() {
- if (this.stype == 1) {
- return
- }
- this.tableHeight = this.$refs.stepBox.offsetHeight - 120;
- if (this.tableHeight <= 530) {
- this.tableHeight = 530;
- }
- // 监听窗口大小变化
- let self = this;
- window.onresize = function () {
- if (self.stype == 1) {
- return
- }
- self.tableHeight = this.$refs.stepBox.offsetHeight - 120;
- if (self.tableHeight <= 530) {
- self.tableHeight = 530;
- }
- };
- // this.$refs.table.$el.offsetTop:表格距离浏览器的高度 //200表示你想要调整的表格距离底部的高度(你可以自己随意调整),因为我们一般都有放分页组件的,所以需要给它留一个高度
- },
- handleCurrentChange(val) {
- this.page = val;
- this.getData2();
- },
- getTest(row) {
- this.$router.push(
- "/checkTest2?cid=" +
- row.courseid +
- "&userid=" +
- this.userid +
- "&userid2=" +
- row.userid +
- "&tid=" +
- row.id +
- "&oid=" +
- this.oid +
- "&org=" +
- this.org +
- "&type=2" +
- "&role=" +
- this.role
- );
- },
- checkDataType(type) {
- if (this.stype != type) {
- this.stype = type
- this.courseName = ''
- if (type == 3) {
- this.getData2();
- } else {
- this.getData();
- }
- this.changeHeight();
- }
- },
- searchCourse() {
- if (this.stype == 3) {
- this.getData2()
- } else {
- this.getData()
- }
- },
- getData() {
- this.isLoading = true;
- let params = {
- cid: this.cid,
- cn: this.courseName,
- tim : !this.SubmitTime? '' : this.SubmitTime,
- tea: this.TeachingValue
- };
- this.ajax
- .get(this.$store.state.api + "getTestWorksNoPageCopy", params)
- .then(async (res) => {
- this.testJson = res.data[0][0]
- console.log('this.testJson',JSON.parse(JSON.stringify(this.testJson)));
- if (this.testJson.juriP) {
- let ajuri2 = this.testJson.juri2.split (',');
- let ajurip = this.testJson.juriP.split (',');
- let JData = ajuri2.reverse()
- this.TeachingOptions = JData.map((key, index) => ({
- id : key,
- name: ajurip[index]
- }));
- }else{
- this.getClass2()
- }
- // console.log('dddd',this.TeachingOptions);
- this.works = res.data[1]
- this.iscount = res.data[2][0].count
- this.pcount = res.data[3][0].count
- let chapters = this.setJSON(this.setJson2(JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))))
- this.chapters = this.setFilter(this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))))
- let testArray = []
- let array = []
- for (let i = 0; i < this.works.length; i++) {
- let cJson = this.setJSON(JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson))))
- if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
- let _json = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson))))
- for (var ja = 0; ja < _json.length; ja++) {
- let _json2 = _json[ja].json
- if (_json[ja].type == 6) {
- let _cjson = await this.getCourse(_json2.answer2)
- _json2.answer2 = _cjson ? _cjson.title : ''
- }
- }
- array.push({
- courseid: this.works[i].courseid,
- id: this.works[i].id,
- userid: this.works[i].userid,
- name: this.works[i].username ? this.works[i].username : '匿名',
- time: this.works[i].time,
- array: _json,
- cut:0,
- courseJson: JSON.parse(this.works[i].courseJson),
- })
- }
- }
- for (var i = 0; i < this.chapters.length; i++) {
- let el = this.chapters[i]
- let topic = {
- type: el.type,
- cut: 0,
- title: el.json ? el.json.title : '',
- detail: el.json ? el.json.detail : '',
- atype: el.json ? el.json.type : '',
- choice: el.json ? el.json.array : '',
- array: [],
- answer: el.json ? el.json.answer : '',
- count: 0,
- courses: el.json ? el.json.courses : [],
- small: el.json ? el.json.small : '',
- big: el.json ? el.json.big : '',
- }
- if (topic.type == 1) {
- for (var t = 0; t < topic.choice.length; t++) {
- topic.array.push({
- name: topic.choice[t].option,
- count: 0
- })
- }
- } else if (topic.type == 3) {
- } else if (topic.type == 5) {
- } else if (topic.type == 6) {
- let _answer = topic.courses
- topic.array = _answer
- topic.courseArray = [];
- let params = {
- cid:topic.array ? topic.array.join(",") : ''
- }
- let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
- let result = data.data[0]
- // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
- result.forEach(i=>{
- if(this.chapters.find(f=>f.type==6).nameFilters.find(c=>c.value==i.title)==undefined){
- this.chapters.find(i=>i.type==6).nameFilters.push({text:i.title,value:i.title})
- }
- })
- // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.title}})
- 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,'-'))
- topic.courseArray = result;
- // topic.array.forEach(async i => {
- // let data = await this.getCourse(i)
- // console.log(data.update_at)
- // 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,'-')
- // topic.courseArray.push(data)
- // })
- } else if (topic.type == 7) {
- for (var t = parseInt(topic.small); t <= parseInt(topic.big); t++) {
- topic.array.push({
- name: t,
- count: 0
- })
- }
- }
- for (var j = 0; j < array.length; j++) {
- let el2 = array[j]
- if (topic.type == 1) {
- let _answer = el2.array[i].json.answer2
- for (var k = 0; k < _answer.length; k++) {
- topic.array[_answer[k]].count++
- topic.count++
- }
- } else if (topic.type == 3 || topic.type == 8) {
- let type3 = 1
- let _answer = el2.array[i].json.answer2
- if (_answer) {
- for (var k = 0; k < topic.array.length; k++) {
- if (topic.array[k].name == _answer) {
- topic.array[k].count++
- type3 = 2
- topic.count++
- break;
- }
- }
- if (type3 == 1) {
- topic.array.push({
- name: _answer,
- count: 1
- })
- }
- }
- } else if (topic.type == 5) {
- let _answer = el2.array[i].json.file ? el2.array[i].json.file : []
- console.log(el2)
- let _user = {userid:el2.userid,username:el2.name}
- for (var k = 0; k < _answer.length; k++) {
- topic.array.push({..._answer[k],..._user})
- }
- } else if (topic.type == 7) {
- if(el2.array[i].json.answer2){
- let _answer = el2.array[i].json.answer2
- topic.array[_answer].count++
- topic.count++
- }
- }
- }
- console.log('topictopictopictopic',topic)
- testArray.push(topic)
- }
- this.testArray = testArray
- this.worksArray = array
- this.isLoading = false;
-
- })
- .catch((err) => {
- console.error(err);
- });
- },
- getData2() {
- this.isLoading = true;
- let params = {
- cid: this.cid,
- page: this.page,
- pageSize: this.pageSize,
- cn: this.courseName
- };
- this.ajax
- .get(this.$store.state.api + "getTestWorksPage3", params)
- .then((res) => {
- this.isLoading = false;
- this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
- this.tableData = res.data[0];
- })
- .catch((err) => {
- console.error(err);
- });
- },
- setJSON(json) {
- return json.filter((item) => {
- if (item.array) {
- item.array = item.array.filter((item2) => {
- if (item2.ttype == 1 && item2.json) {
- delete item2.json.answer2
- delete item2.json.score2
- delete item2.json.file
- }
- if (item2.array) {
- item2.array = item2.array.filter((item3) => {
- if (item3.ttype == 1 && item3.json) {
- delete item3.json.answer2
- delete item3.json.score2
- delete item3.json.file
- }
- return item3;
- });
- }
- return item2;
- });
- } else if (item.ttype == 1 && item.json) {
- delete item.json.answer2
- delete item.json.score2
- delete item.json.file
- }
- return item
- console.log(item.array);
- });
- },
- setJson2(json) {
- let _json = json;
- // this.type = _json[0].ttype;
- let checkArray = _json.filter((item) => {
- if (item.array) {
- item.array = item.array.filter((item2) => {
- if (item2.ttype == 1 && item2.json && !item2.json.answer2) {
- item2.json.answer2 = [];
- }
- if (item2.array) {
- item2.array = item2.array.filter((item3) => {
- if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
- item3.json.answer2 = [];
- }
- return item3;
- });
- }
- return (
- (item2.ttype != 1 && item2.array.length > 0) || item2.ttype == 1
- );
- });
- }
- if (item.ttype == 1 && item.json && !item.json.answer2) {
- item.json.answer2 = [];
- }
- console.log(item.array);
- return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
- });
- console.log(checkArray);
- return checkArray;
- },
- JSONSetting(json) {
- let _json = json
- let array = []
- _json.filter((item) => {
- if (item.array) {
- item.array = item.array.filter((item2) => {
- if (item2.ttype == 1 && item2.json) {
- array.push(item2)
- }
- if (item2.array) {
- item2.array = item2.array.filter((item3) => {
- if (item3.ttype == 1 && item3.json) {
- array.push(item3)
- }
- return item3;
- });
- }
- return item2;
- });
- }
- if (item.ttype == 1 && item.json) {
- array.push(item)
- }
- console.log(item.array);
- return item;
- });
- console.log(array);
- return array;
- },
- setFilter(json) {
- let _json = json
- let array = []
- _json.filter((item) => {
- item.nameFilters = [],
- item.filterParams = {
- name: [],
- }
- if (item.type == 1) {
- for (var i = 0; i < item.json.array.length; i++) {
- item.nameFilters.push({ text: item.json.array[i].option, value: item.json.array[i].option })
- }
- }
- array.push(item)
- return item;
- });
- return array
- },
- checkFile(item) {
- if (item.type == 3) {
- this.$hevueImgPreview(item.url);
- } else if (item.type == 5) {
- this.downloadFile(item);
- } else if (item.type == 1) {
- this.dialogVisibleOffice = true
- this.wurl = item.url
- } else if (item.type == 2) {
- this.dialogVisibleVideo = true
- this.wurl = item.url
- } else if (item.type == 4) {
- this.dialogVisiblePdf = true
- this.wurl = item.url
- }
- },
- downloadFile(f) {
- var credentials = {
- accessKeyId: "AKIATLPEDU37QV5CHLMH",
- secretAccessKey: "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",
- }; //秘钥形式的登录上传
- window.AWS.config.update(credentials);
- window.AWS.config.region = "cn-northwest-1"; //设置区域
- let url2 = f.url;
- let _url2 = "";
- if (
- url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
- ) {
- _url2 = url2.split(
- "https://view.officeapps.live.com/op/view.aspx?src="
- )[1];
- } else {
- _url2 = url2;
- }
- let _this = this;
- _this.downLoading = _url2
- var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
- let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
- var params = {
- Bucket: "ccrb",
- Key: name
- };
- s3.getObject(params, function (err, data) {
- _this.downLoading = ''
- if (err) console.log(err, err.stack); // an error occurred
- else {
- let url = window.URL.createObjectURL(new Blob([data.Body]));
- let a = document.createElement("a");
- a.name = f.name;
- a.href = url;
- a.download = f.name;
- a.click();
- console.log(data);
- } // sxuccessful response
- });
- },
- deleteTest(tid) {
- let _this = this
- _this
- .$confirm("确定删除此提交的表单么?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- let params = [{
- tid: tid,
- }];
- _this.ajax
- .post(_this.$store.state.api + "deleteTestCourseWorks", params)
- .then((res) => {
- _this.$message.success("删除成功");
- if (_this.stype == 3) {
- _this.getData2();
- } else {
- _this.getData();
- }
- })
- .catch((err) => {
- console.error(err);
- });
- })
- .catch(() => {
- return;
- });
- },
- exportPDF() {
- this.pdfLoading = true
- var a = document.getElementsByTagName("img")
- for (var i = 0; i < a.length; i++) { a[i].crossOrigin = "*" }
- downloadPDF(this.$refs.stepBox, this.testJson.title, () => {
- var _a = document.getElementsByTagName("img")
- for (var i = 0; i < _a.length; i++) {
- _a[i].removeAttribute("crossorigin")
- }
- setTimeout(() => {
- this.pdfLoading = false
- }, 2000);
- })
- },
- score(json) {
- let score = 0
- json.forEach(el => {
- if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
- el.array.forEach(item => {
- if (item.ttype == 2 && item.array.length > 0) {
- item.array.forEach(item2 => {
- if (item2.ttype == 1 && item2.json) {
- score += item2.json.score ? parseFloat(item2.json.score) : 0
- }
- })
- } else if (item.ttype == 1 && item.json) {
- score += item.json.score ? parseFloat(item.json.score) : 0
- }
- })
- } else if (el.ttype == 1 && el.json) {
- score += el.json.score ? parseFloat(el.json.score) : 0
- }
- })
- return score > 0 ? score + '分' : ''
- },
- score2(json) {
- let score = 0
- // let type = 1
- json.forEach(el => {
- if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
- el.array.forEach(item => {
- if (item.ttype == 2 && item.array.length > 0) {
- item.array.forEach(item2 => {
- if (item2.ttype == 1 && item2.json) {
- score += item2.json.score2 ? parseFloat(item2.json.score2) : 0
- }
- })
- } else if (item.ttype == 1 && item.json) {
- score += item.json.score2 ? parseFloat(item.json.score2) : 0
- }
- })
- } else if (el.ttype == 1 && el.json) {
- score += el.json.score2 ? parseFloat(el.json.score2) : 0
- }
- })
- return score + '分'
- },
- setWordHtml(data) {
- let _data = data
- let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
- let score = this.score(data.courseJson)
- let isScore = this.score2(data.courseJson)
- let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
- 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>`
- let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
- let _test = `<div style='margin-top:40px;'>`
- for (let i = 0; i < _data.array.length; i++) {
- let item = _data.array[i]
- let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${item.json.title}</div>`
- _test += _div
- if (item.type == 1) {
- for (let j = 0; j < item.json.array.length; j++) {
- let check = item.json.array[j]
- let _option = `<div style='margin:10px 0 0 40px;'>${(item.json.answer2 && item.json.answer2.indexOf(j) !== -1) ? '☑' : '☐'} ${check.option}</div>`
- _test += _option
- }
- } else if (item.type == 3 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
- _test += _option
- } else if (item.type == 5 && item.json.file) {
- for (let j = 0; j < item.json.file.length; j++) {
- let check = item.json.file[j]
- let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
- _test += _option
- }
- } else if (item.type == 6 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
- _test += _option
- } else if (item.type == 7 && item.json.answer2 ) {
- let _score = this.getScore2(item.json)
- let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
- _test += _option
- } else if (item.type == 8 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
- _test += _option
- }
- }
- _test += `</div>`
- let _html = _title + _content + _detail + _test;
- this.exportToWord(_data.name + '-' + _data.time, _html);
- },
- setWordHtml2(data) {
- let _data = data
- _data.array = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(data.courseJson))))
- let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
- let score = this.score(JSON.parse(data.courseJson))
- let isScore = this.score2(JSON.parse(data.courseJson))
- let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
- 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>`
- let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
- let _test = `<div style='margin-top:40px;'>`
- for (let i = 0; i < _data.array.length; i++) {
- let item = _data.array[i]
- let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${item.json.title}</div>`
- _test += _div
- if (item.type == 1) {
- for (let j = 0; j < item.json.array.length; j++) {
- let check = item.json.array[j]
- let _option = `<div style='margin:10px 0 0 40px;'>${(item.json.answer2 && item.json.answer2.indexOf(j) !== -1) ? '☑' : '☐'} ${check.option}</div>`
- _test += _option
- }
- } else if (item.type == 3 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
- _test += _option
- } else if (item.type == 5 && item.json.file) {
- for (let j = 0; j < item.json.file.length; j++) {
- let check = item.json.file[j]
- let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
- _test += _option
- }
- } else if (item.type == 6 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
- _test += _option
- } else if (item.type == 7 && item.json.answer2 ) {
- let _score = this.getScore2(item.json)
- let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
- _test += _option
- } else if (item.type == 8 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
- _test += _option
- }
- }
- _test += `</div>`
- let _html = _title + _content + _detail + _test;
- this.exportToWord(_data.username ? _data.username : '匿名' + '-' + _data.time, _html);
- },
- async exportToWord(a, html) {
- // 将html文件中需要用到的数据挂载到store上
- const content = `<!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>${a}</title>
- <style>
- </style>
- </head>
- <body>
- ${html}
- </body>
- </html>`;
- // debugger
- // 生成报告
- const link = document.createElement("a");
- let dname = a + ".doc";
- // link.download = "报告.html"; // 文件名
- link.download = dname; // 文件名
- link.style.display = "none";
- // 创建文件流
- // 创建bolb实例时,内容一定要放在[]中
- const blob = new Blob([content], {
- type: "text/plain;charset='utf-8'",
- });
- link.href = window.URL.createObjectURL(blob);
- document.body.appendChild(link);
- link.click();
- document.body.removeChild(link);
- },
- setWordHtmlAll(data) {
- let _data = data
- let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
- let score = this.score(data.courseJson)
- let isScore = this.score2(data.courseJson)
- let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
- 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>`
- let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
- let _test = `<div style='margin-top:40px;'>`
- for (let i = 0; i < _data.array.length; i++) {
- let item = _data.array[i]
- let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${item.json.title}</div>`
- _test += _div
- if (item.type == 1) {
- for (let j = 0; j < item.json.array.length; j++) {
- let check = item.json.array[j]
- let _option = `<div style='margin:10px 0 0 40px;'>${(item.json.answer2 && item.json.answer2.indexOf(j) !== -1) ? '☑' : '☐'} ${check.option}</div>`
- _test += _option
- }
- } else if (item.type == 3 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
- _test += _option
- } else if (item.type == 5 && item.json.file) {
- for (let j = 0; j < item.json.file.length; j++) {
- let check = item.json.file[j]
- let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
- _test += _option
- }
- } else if (item.type == 6 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`
- _test += _option
- } else if (item.type == 7 && item.json.answer2 ) {
- let _score = this.getScore2(item.json)
- let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
- _test += _option
- } else if (item.type == 8 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
- _test += _option
- }
- }
- _test += `</div>`
- let _html = _title + _content + _detail + _test;
- return this.exportToWordAll(_data.name + '-' + _data.time, _html);
- },
- async setWordHtmlAll2(data) {
- let _data = data
- _data.array = this.JSONSetting(JSON.parse(JSON.stringify(JSON.parse(data.courseJson))))
- let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
- let score = this.score(JSON.parse(data.courseJson))
- let isScore = this.score2(JSON.parse(data.courseJson))
- let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : ''
- 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>`
- let _detail = this.testJson.brief ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>` : ''
- let _test = `<div style='margin-top:40px;'>`
- for (let i = 0; i < _data.array.length; i++) {
- let item = _data.array[i]
- let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${item.json.title}</div>`
- _test += _div
- if (item.type == 1) {
- for (let j = 0; j < item.json.array.length; j++) {
- let check = item.json.array[j]
- let _option = `<div style='margin:10px 0 0 40px;'>${(item.json.answer2 && item.json.answer2.indexOf(j) !== -1) ? '☑' : '☐'} ${check.option}</div>`
- _test += _option
- }
- } else if (item.type == 3 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
- _test += _option
- } else if (item.type == 5 && item.json.file) {
- for (let j = 0; j < item.json.file.length; j++) {
- let check = item.json.file[j]
- let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`
- _test += _option
- }
- } else if (item.type == 6 && item.json.answer2) {
- let _cjson = await this.getCourse(item.json.answer2)
- let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${ _cjson ? _cjson.title : ''}</div>`
- _test += _option
- } else if (item.type == 7 && item.json.answer2 ) {
- let _score = this.getScore2(item.json)
- let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`
- _test += _option
- } else if (item.type == 8 && item.json.answer2) {
- let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`
- _test += _option
- }
- }
- _test += `</div>`
- let _html = _title + _content + _detail + _test;
- return this.exportToWordAll(_data.username ? _data.username : '匿名' + '-' + _data.time, _html);
- },
- async exportToWordAll(a, html) {
- // 将html文件中需要用到的数据挂载到store上
- const content = `<!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>${a}</title>
- <style>
- </style>
- </head>
- <body>
- ${html}
- </body>
- </html>`;
- // debugger
- // 生成报告
- const link = document.createElement("a");
- let dname = a + ".doc";
- // link.download = "报告.html"; // 文件名
- link.download = dname; // 文件名
- link.style.display = "none";
- // 创建文件流
- // 创建bolb实例时,内容一定要放在[]中
- const blob = new Blob([content], {
- type: "text/plain;charset='utf-8'",
- });
- return blob;
- },
- exportAllWord() {
- this.pdfLoading = true;
- const _chapInfo = this.worksArray;
- let url = [];
- for (let i = 0; i < _chapInfo.length; i++) {
- url.push({
- name: _chapInfo[i].name + '-' + _chapInfo[i].time,
- blob: this.setWordHtmlAll(_chapInfo[i]),
- });
- }
- console.log(url);
- this.downLoadAll(url);
- },
- exportAllWord2() {
- this.pdfLoading = true;
- let params = {
- cid: this.cid,
- page: 1,
- pageSize: 999,
- cn: this.courseName
- };
- this.ajax
- .get(this.$store.state.api + "getTestWorksPage3", params)
- .then((res) => {
- const _chapInfo = res.data[0];
- let url = [];
- for (let i = 0; i < _chapInfo.length; i++) {
- url.push({
- name: _chapInfo[i].username + '-' + _chapInfo[i].time,
- blob: this.setWordHtmlAll2(_chapInfo[i]),
- });
- }
- console.log(url);
- this.downLoadAll(url);
- })
- .catch((err) => {
- console.error(err);
- });
- },
- downLoadAll(url) {
- const data = url; // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
- const zip = new JSZip();
- const cache = {};
- data.forEach((item) => {
- // 下载文件, 并存成ArrayBuffer对象
- const file_name = item.name; // 获取文件名
- zip.file(file_name + '.doc', item.blob, { binary: true }); // 逐个添加文件
- cache[file_name] = item.blob;
- });
- zip.generateAsync({ type: "blob" }).then((content) => {
- // 生成二进制流
- FileSaver.saveAs(content, this.testJson.title + ".zip"); // 利用file-saver保存文件 自定义文件名
- setTimeout(() => {
- this.pdfLoading = false;
- }, 2000);
- });
- },
- handleFilterChange() {
- console.log(this.$refs.table.store.states.data);
- },
- exportExcel() {
- let res = this.$refs.table.store.states.data
- if (!res.length) {
- this.$message.error('无导出数据')
- return
- }
- this.isLoading = true;
- let chapters = this.chapters
- var array = [];
- for (var i = 0; i < res.length; i++) {
- var _json = {};
- _json["序号"] = i + 1;
- _json["提交人"] = res[i].name ? res[i].name : '匿名';
- _json["提交时间"] = res[i].time;
- for (var j = 0; j < chapters.length; j++) {
- _json[j + 1 + "." + chapters[j].json.title] = '';
- if (res[i].array[j].type == 1 && res[i].array[j].json.answer2) {
- let a = []
- for (var answer2 = 0; answer2 < res[i].array[j].json.answer2.length; answer2++) {
- a.push(res[i].array[j].json.array[res[i].array[j].json.answer2[answer2]].option)
- }
- _json[j + 1 + "." + chapters[j].json.title] = a.join('、')
- } else if (res[i].array[j].type == 3 && res[i].array[j].json.answer2) {
- _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
- } else if (res[i].array[j].type == 5 && res[i].array[j].json.file) {
- let files = []
- for (let file = 0; file < res[i].array[j].json.file.length; file++) {
- let check = res[i].array[j].json.file[file]
- files.push(file + 1 + '.' + check.name + '----' + check.url)
- }
- _json[j + 1 + "." + chapters[j].json.title] = files.join('\n')
- } else if (res[i].array[j].type == 6 && res[i].array[j].json.answer2) {
- _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
- } else if (res[i].array[j].type == 7 && res[i].array[j].json.answer2) {
- let _score = this.getScore2(res[i].array[j].json)
- _json[j + 1 + "." + chapters[j].json.title] = _score
- } else if (res[i].array[j].type == 8 && res[i].array[j].json.answer2) {
- _json[j + 1 + "." + chapters[j].json.title] = res[i].array[j].json.answer2
- }
- }
- array.push(_json);
- }
- let widthJson = []
- let widthArray = Object.keys(array[0])
- for (let i = 0; i < widthArray.length; i++) {
- if (i == 0) {
- widthJson.push({ wch: 5 })
- } else {
- widthJson.push({ wch: 30 })
- }
- }
- const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
- let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
- ws["!cols"] = widthJson;
- const styleObj = {
- alignment: {
- horizontal: "center",
- vertical: "center" // 设置垂直居中
- }
- }; // 设置居中对齐和加粗样式
- for (let cell in ws) {
- if (!cell[0].startsWith("!")) {
- ws[cell]["s"] = styleObj;
- }
- }
- XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
- XLSX.writeFile(workbook, this.testJson.title + ".xlsx");
- this.isLoading = false;
- this.$message({
- message: "导出成功",
- type: "success"
- });
- },
- async getCourse(id) {
- let params = {
- cid: id,
- };
- let res = await this.ajax.get(this.$store.state.api + "getCourseInfoTest", params)
- return res.data[0][0]
- },
- getScore2(item) {
- let array = []
- for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
- array.push(i)
- }
- return item.answer2 ? array[item.answer2] : ''
- },
- checkScreenSize() {
- this.screenWidth = window.innerWidth;
- this.isDesktop = this.screenWidth > 750; // 你可以根据需要调整这个阈值
- },
- downloadFileType5(fileData,title="附件"){
- let data = fileData;
- const zip = new JSZip();
- let downFileArray = [];
- let uniqueArr = data.filter((v,i,a)=>a.map(mb=>mb.userid).indexOf(v.userid)==i);
- uniqueArr.forEach(i=>{
- downFileArray.push({userid:i.userid,username:i.username ? i.username : '匿名',urlList:data.filter(d=>d.userid==i.userid).map(m=>m)});
- })
- let promises = [];
- if(downFileArray.length==1){//只有一位老师的情况
- if(downFileArray[0].urlList.length>1){//多个文件的情况
- const folder = zip.folder(`${downFileArray[0].username}`);
- downFileArray[0].urlList.forEach(i=>{
- const promise = getFile(i.url).then((data) => {
- if (data.data != 1) {
- // 下载文件, 并存成ArrayBuffer对象
- const file_name = i.name; // 获取文件名
- folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
- }
- });
- promises.push(promise)
- })
-
- }else{//只有一个文件的情况
- promises.push(getFile(downFileArray[0].urlList[0].url).then((data) => {
- if (data.data != 1) {
- // 下载文件, 并存成ArrayBuffer对象
- const file_name = `${downFileArray[0].username}-${downFileArray[0].urlList[0].name}`; // 获取文件名
- zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
- }
- }))
- }
- }else if(downFileArray.length>1){//有多位老师的情况
- downFileArray.forEach(i=>{
- if(i.urlList.length==1){//只有一个文件的情况
- promises.push(getFile(i.urlList[0].url).then((data) => {
- if (data.data != 1) {
- // 下载文件, 并存成ArrayBuffer对象
- const file_name = `${i.username ? i.username : '匿名'}-${i.urlList[0].name}`; // 获取文件名
- zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
- }
- }))
- }else if(i.urlList.length>1){//有多个文件的
- const folder = zip.folder(`${i.username ? i.username : '匿名'}`);
- i.urlList.forEach(ui=>{
- const promise = getFile(ui.url).then((data) => {
- if (data.data != 1) {
- // 下载文件, 并存成ArrayBuffer对象
- const file_name = ui.name; // 获取文件名
- folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
- }
- })
- promises.push(promise)
- })
- }
- })
- }
- Promise.all(promises).then(() => {
- zip.generateAsync({ type: "blob" }).then((content) => {
- // 生成二进制流
- FileSaver.saveAs(content, `${this.testJson.title}-${title}.zip`); // 利用file-saver保存文件 自定义文件名
- });
- });
- },
- getUserInfo() {
- let params = {
- uid: this.peopleId,
- };
- this.ajax
- .get(this.$store.state.api + "selectTestUser", params)
- .then((res) => {
- console.log('111111111111111111111',res.data[0][0]);
- // 用于存储归类后的数据的对象
- this.checkDataType(2)
- this.courseName = res.data[0][0].name
- this.searchCourse()
- })
- .catch((err) => {
- console.error(err);
- });
- },
- },
- beforeDestroy() {
- document.getElementsByTagName('html')[0].style.overflow = '';
- window.removeEventListener("resize", this.checkScreenSize);
- },
- mounted() {
- if(this.peopleId){
- this.getUserInfo();
- }
- this.checkScreenSize();
- window.addEventListener("resize", this.checkScreenSize);
- document.getElementsByTagName('html')[0].scrollTop = 0
- document.getElementsByTagName('html')[0].style.overflow = 'hidden'
- this.$nextTick(function () {
- this.getData();
- // this.getClass2()
- this.changeHeight()
- });
- },
- };
- </script>
- <style scoped>
- .pb_content {
- height: 100% !important;
- /* margin: 0 20px 0 20px; */
- }
- .cutBtnBlockCss{
- width: 100%;display: flex;justify-content: end;
- }
- .cutBtnCss{
- width: 68px;
- height: 27px;
- font-size: 14px;
- border-radius: 5px;
- display: flex;
- color: rgba(54, 129, 252, 1);
- justify-content: center;
- align-items: center;
- margin-top: 10px;
- border: 1px rgba(54, 129, 252, 1) solid;
- }
- .isDesktopRight{
- width:100% !important;
- margin:0 !important;
- height: 300px !important;
- border: none !important;
- }
- .isDTitle2JsonTit{
- width: 130px;
- color: rgba(0, 0, 0, 0.9);
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .IsDAnswer{
- margin: 20px 0 30px;color: rgba(0, 0, 0, 0.6);
- }
- .CutCss{
- height: 60px;
- line-height: 60px;
- }
- .topicTitCss{
- color: rgba(0, 0, 0, 0.9);
- font-weight: 600;
- margin-right: 5px;
- }
- .IsDFile{
- width: 150px;
- height: 120px;
- border-radius: 10px;
- position: relative;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- margin-bottom: 5px;
- }
- .IsDownload{
- position: absolute;
- width: 30px;
- top: 5px;
- right: 5px;
- }
- .IsDImg{
- width: 100%;
- height: 70px;
- flex: 1;
- }
- .pb_content_body {
- width: 100% !important;
- height: 100%;
- }
- .pb_content_body>.right {
- height: 100%;
- width: 100%;
- display: flex;
- overflow: hidden;
- flex-direction: column;
- }
- .basic_box {
- margin: 0 auto;
- position: relative;
- padding: 0 20px 0 20px;
- }
- .courseTop {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- width: calc(100% - 40px);
- margin: 0 auto;
- padding: 10px 0;
- }
- .stepsNav {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- }
- .step_box {
- width: calc(100% - 40px);
- margin: 0 auto;
- height: calc(100% - 50px);
- overflow: auto;
- background: #ffff;
- border-radius: 5px;
- }
- .el-table>>>.even_row {
- background-color: #f1f1f1 !important;
- }
- .student_page {
- margin-top: 10px;
- }
- .test_title {
- display: flex;
- padding: 15px 15px;
- width: 100%;
- box-sizing: border-box;
- justify-content: space-between;
- align-items: center;
- flex-wrap: wrap;
- margin-bottom: 10px;
- }
- .test_title .left {
- max-width: 100%;
- margin-top: 10px
- }
- .test_title .left .title {
- width: 100%;
- font-size: 24px;
- font-weight: 700;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .test_title .left .info {
- display: flex;
- margin-top: 15px;
- }
- .test_title .left .info .info_box {
- font-size: 14px;
- }
- .test_title .left .info .info_box+.info_box {
- margin-left: 20px;
- padding-left: 20px;
- border-left: 1px solid #E7E7E7;
- }
- .test_title .left .info .info_box span:nth-child(1) {
- color: #00000099;
- }
- .test_title .left .info .info_box span:nth-child(2) {}
- .test_title .right {
- display: flex;
- align-items: center;
- margin-top: 10px;
- max-width: 100%;
- }
- .test_title .right .data_box {
- margin-right: 15px;
- width: 150px;
- border: 1px solid #e7e7e7;
- border-radius: 5px;
- padding: 0 10px;
- height: 57px;
- font-size: 14px;
- color: #00000099;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .test_title .right .data_box span:nth-child(1) {}
- .test_title .right .data_box span:nth-child(2) {}
- .test_title .right .data_box span:nth-child(2) .big {
- font-size: 22px;
- }
- .test_title .right .btn_box {
- display: flex;
- flex-direction: column;
- width: 57px;
- height: 57px;
- background: #3681fc;
- border-radius: 5px;
- font-size: 14px;
- cursor: pointer;
- align-items: center;
- justify-content: center;
- color: #fff;
- }
- .test_title .right .btn_box span:nth-child(1) {
- display: block;
- width: 12px;
- height: 14px;
- margin-bottom: 5px;
- background-image: url('../../../../assets/icon/test/icon_share.png');
- background-size: 100% 100%;
- }
- .test_title .right .btn_box span:nth-child(2) {}
- .search_nav {
- border-bottom: 1px solid #E7E7E7;
- width: 100%;
- box-sizing: border-box;
- padding: 0 15px 10px;
- display: flex;
- align-items: flex-end;
- height: 50px;
- }
- .search_nav>.right {
- display: flex;
- align-items: center;
- }
- .search_nav>.right>span {
- height: 24px;
- font-size: 14px;
- color: #000;
- cursor: pointer;
- position: relative;
- }
- .search_nav>.isDesktopRightCut{
- display: flex;
- justify-content: space-between;
- width: 60%;
- }
- .search_nav>.right>span+span {
- margin-left: 35px;
- }
- .search_nav>.right>span.active {
- color: #3681FC;
- font-weight: 600;
- }
- .search_nav>.right>span.active::before {
- content: "";
- position: absolute;
- bottom: -10px;
- width: 15px;
- height: 3px;
- background: #3681fc;
- left: 50%;
- transform: translateX(-50%);
- }
- .search_nav>.left {
- display: flex;
- align-items: center;
- margin-left: auto;
- }
- .search_nav>.right>span.active2 {
- color: #3681FC;
- font-weight: 600;
- }
- .search_nav>.right>span.active2::before {
- content: "";
- position: absolute;
- bottom: -10px;
- width: 100%;
- height: 3px;
- background: #3681fc;
- left: 50%;
- transform: translateX(-50%);
- }
- .student_input>>>.el-input__inner {
- height: 40px;
- width: 190px;
- font-size: 13px;
- padding: 0 35px 0 10px;
- }
- .serach_icon {
- position: absolute;
- right: 12px;
- top: 50%;
- transform: translateY(-50%);
- width: 13px;
- height: 13px;
- background: url("../../../../assets/icon/test/test_search.png") no-repeat;
- background-size: 100% 100%;
- cursor: pointer;
- }
- .title_content {
- padding-bottom: 10px;
- }
- .title_content>.title_box {
- width: calc(100% - 48px);
- margin: 20px auto 0;
- }
- .title_content>.title_box>.title {
- font-size: 18px;
- display: flex;
- white-space: pre-line;
- position: relative;
- }
- .title_content>.title_box>.title>.test_icon {
- min-width: 20px;
- height: 20px;
- }
- .title_content>.title_box>.detail {
- font-size: 14px;
- color: #00000099;
- margin-top: 8px;
- white-space: pre-line;
- }
- .title_content>.title_box>.content1 {
- display: flex;
- width: 100%;
- margin-top: 10px;
- }
- .title_content>.title_box>.content1>>>.el-progress__text {
- color: #3681FC;
- min-width: 55px;
- font-size: 16px !important;
- }
- .title_content>.title_box>.content1>.left {
- width: calc(100% - 620px);
- border: 1px solid #e7e7e7;
- }
- .title_content>.title_box>.content1>.left>div+div {
- border-top: 1px solid #e7e7e7;
- }
- .title_content>.title_box>.content1>.left>.title,
- .title_content>.title_box>.content1>.left>.data {
- display: flex;
- height: 40px;
- align-items: center;
- width: 100%;
- padding: 0 15px;
- box-sizing: border-box;
- line-height: 16px;
- }
- .title_content>.title_box>.content1>.left>.title>span,
- .title_content>.title_box>.content1>.left>.data>span {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .title_content>.title_box>.content1>.left>.title>span:nth-child(1),
- .title_content>.title_box>.content1>.left>.data>span:nth-child(1) {
- width: calc(100% - 320px - 110px);
- }
- .title_content>.title_box>.content1>.left>.title>span:nth-child(2),
- .title_content>.title_box>.content1>.left>.data>span:nth-child(2) {
- width: 110px;
- }
- .title_content>.title_box>.content1>.left>.title>span:nth-child(3),
- .title_content>.title_box>.content1>.left>.data>span:nth-child(3) {
- width: 320px;
- }
- .isDesktopTitle{
- display: flex;
- justify-content: space-around;
- }
- .isDesktopTitle >div {
- width: 60px;
- height: 30px;
- line-height: 30px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- /* .isDesktopTitle:nth-child(1){
- width: 60px;
- }
- .isDesktopTitle:nth-child(2){
- width: 60px;
- }
- .isDesktopTitle:nth-child(3){
- flex: 1;
- } */
- .title_content>.title_box>.content1>.left>.title {
- font-weight: 700;
- background: #F9FAFB;
- }
- .title_content>.title_box>.content1>.right {
- width: 600px;
- margin-left: 20px;
- border: 1px solid #e7e7e7;
- min-height: 300px;
- }
- .title_content>.title_box>.content2 {
- display: flex;
- width: 100%;
- margin-top: 10px;
- }
- .title_content>.title_box>.content2>.left {
- width: calc(100% - 620px);
- border: 1px solid #e7e7e7;
- }
- .title_content>.title_box>.content2>.left>div+div {
- border-top: 1px solid #e7e7e7;
- }
- .title_content>.title_box>.content2>.left>.title,
- .title_content>.title_box>.content2>.left>.data {
- display: flex;
- height: 40px;
- align-items: center;
- width: 100%;
- padding: 0 15px;
- box-sizing: border-box;
- line-height: 16px;
- }
- .title_content>.title_box>.content2>.left>.title>span,
- .title_content>.title_box>.content2>.left>.data>span {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .title_content>.title_box>.content2>.left>.title>span:nth-child(1),
- .title_content>.title_box>.content2>.left>.data>span:nth-child(1) {
- width: 55px;
- }
- .title_content>.title_box>.content2>.left>.title>span:nth-child(2),
- .title_content>.title_box>.content2>.left>.data>span:nth-child(2) {
- width: 110px;
- }
- .title_content>.title_box>.content2>.left>.title>span:nth-child(3),
- .title_content>.title_box>.content2>.left>.data>span:nth-child(3) {
- max-width: calc(100% - 110px - 55px);
- }
- .title_content>.title_box>.content2>.left>.title {
- font-weight: 700;
- background: #F9FAFB;
- }
- .title_content>.title_box>.content2>.right {
- width: 600px;
- margin-left: 20px;
- border: 1px solid #e7e7e7;
- }
- .title_content>.title_box>.content2>.right>>>.wordCloud {
- height: auto;
- min-height: 300px;
- }
- .title_content>.title_box>.content3 {
- display: flex;
- width: 100%;
- overflow: auto;
- }
- .title_content>.title_box>.content3>.file {
- min-width: 200px;
- width: 200px;
- height: 140px;
- margin: 10px 10px 10px 0px;
- border-radius: 15px;
- box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
- overflow: hidden;
- margin-right: 15px;
- position: relative;
- display: flex;
- flex-direction: column;
- }
- .title_content>.title_box>.content3>.file>.img {
- width: 100%;
- height: calc(100% - 35px);
- object-fit: cover;
- cursor: pointer;
- }
- .title_content>.title_box>.content3>.file>.del {
- position: absolute;
- width: 25px;
- top: 10px;
- right: 10px;
- cursor: pointer;
- }
- .title_content>.title_box>.content3>.file>.download {
- position: absolute;
- width: 25px;
- top: 10px;
- right: 35px;
- cursor: pointer;
- opacity: .8;
- }
- .title_content>.title_box>.content3>.file>.name {
- height: 35px;
- width: 100%;
- background: #f9f9f9;
- display: flex;
- align-items: center;
- padding: 0 10px;
- box-sizing: border-box;
- }
- .title_content>.title_box>.content3>.file>.name>span {
- display: block;
- text-overflow: ellipsis;
- max-width: 100%;
- white-space: nowrap;
- overflow: hidden;
- }
- .table_content {
- /* width: calc(100% - 48px);
- margin: 20px auto 0; */
- padding: 20px 24px;
- width: 100%;
- box-sizing: border-box;
- }
- .table_content>>>.el-table td {
- padding: 5px 0;
- }
- .isDesktopTable_content{
- width: 100%;
- }
- .isDTitle{
- display: flex;
- justify-content: space-between;
- }
- .isDBri{
- display: flex;
- padding: 15px 0;
- font-size: 14px;
- color: rgba(0, 0, 0, 0.4);
- flex-direction: column;
- height: 80px;
- justify-content: space-between;
- }
- .answer_type {
- background: #F0F2F5;
- padding: 5px 10px;
- display: block;
- border-radius: 3px;
- margin: 5px;
- }
- .table_file>.file {
- min-width: 100px;
- width: 100px;
- height: 70px;
- margin: 10px 10px 10px 0px;
- border-radius: 5px;
- box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
- overflow: hidden;
- margin-right: 15px;
- position: relative;
- display: flex;
- flex-direction: column;
- }
- .table_file>.file>.img {
- width: 100%;
- height: calc(100% - 20px);
- object-fit: cover;
- cursor: pointer;
- }
- .table_file>.file>.del {
- position: absolute;
- width: 25px;
- top: 10px;
- right: 10px;
- cursor: pointer;
- }
- .table_file>.file>.download {
- position: absolute;
- width: 25px;
- top: 10px;
- right: 35px;
- cursor: pointer;
- opacity: .8;
- }
- .table_file>.file>.name {
- height: 20px;
- width: 100%;
- background: #f9f9f9;
- display: flex;
- align-items: center;
- padding: 0 10px;
- box-sizing: border-box;
- font-size: 12px;
- }
- .table_file>.file>.name>span {
- display: block;
- text-overflow: ellipsis;
- max-width: 100%;
- white-space: nowrap;
- overflow: hidden;
- }
- .btnA {
- color: #fff;
- background-color: #0061FF;
- padding: 0 24px;
- font-size: 14px;
- min-width: 64px;
- font-weight: 500;
- border-radius: 4px;
- box-sizing: border-box;
- border: none;
- cursor: pointer;
- transition: all 0.2s ease-in-out;
- height: 36px;
- display: flex;
- align-items: center;
- justify-content: center;
- line-height: 1;
- margin-right: 10px;
- position: relative;
- }
- .buttonBox {
- position: absolute;
- bottom: -0;
- transform: translateY(100%);
- background: #fff;
- border-radius: 5px;
- box-shadow: 0 0 3px 1px #e3e3e3;
- width: 100%;
- z-index: 999;
- }
- .buttonBox>div {
- height: 40px;
- line-height: 40px;
- width: 100%;
- text-align: center;
- color: #000;
- box-sizing: border-box;
- }
- .buttonBox>div+div {
- border-top: 1px solid #e0e0e0;
- }
- .buttonBox>div:hover {
- background: #f6f8ff;
- }
- .content4 {
- width: 100%;
- height: auto;
- display: flex;
- flex-wrap: nowrap;
- overflow: auto;
- }
- .out_box {
- display: flex;
- flex-direction: column;
- flex-wrap: nowrap;
- /* width: 200px; */
- min-width: 280px;
- width: 280px;
- background: #fff;
- /* background-color: white; */
- margin-right: 15px;
- /* border: 1px solid #ccc; */
- height: fit-content;
- box-sizing: border-box;
- border-radius: 0px 0px 5px 5px;
- /* overflow: hidden; */
- margin-bottom: 15px;
- position: relative;
- border-radius: 8px;
- box-sizing: border-box;
- overflow: hidden;
- border: 1px solid #3682fc00;
- cursor: pointer;
- border: 1px solid #6a9ff5;
- height: auto;
- }
- .out_boxActive {
- box-sizing: border-box;
- border: 3px solid #3681FC !important;
- }
- .out_box:hover {
- border: 1px solid #3681FC;
- }
- .bottom_box {
- width: 100%;
- display: flex;
- padding: 10px;
- flex-direction: column;
- box-sizing: border-box;
- height: 121px;
- flex-wrap: nowrap;
- justify-content: space-evenly;
- }
- .bottom_box>div:nth-child(1) {
- width: 100%;
- /* overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-weight: bold; */
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .bottom_box>div:nth-child(1)>span:nth-child(1) {
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-weight: bold;
- }
- .bottom_box>div:nth-child(1)>span:nth-child(2) {
- min-width: fit-content;
- font-size: 14px;
- color: #8c8c8c;
- }
- .tup {
- width: 100%;
- height: auto;
- margin: 0 auto;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 10px;
- box-sizing: border-box;
- }
- .tup>img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .kc_time {
- margin-top: 8px;
- font-size: 14px;
- color: #717C8D;
- }
- .kc_time+.kc_time {
- margin-top: 0;
- }
- .kc_t {
- margin-top: 5px;
- width: 100%;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .kc_t>span:nth-child(1) {
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .kc_t>span:nth-child(2) {
- min-width: fit-content;
- font-size: 14px;
- color: #8c8c8c;
- }
- .title_box>.title>.title_downBtn{
- position: absolute;
- right: 10px;
- top: 0;
- }
- </style>
|