addCourse.vue 143 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828
  1. <template>
  2. <div class="pb_content">
  3. <div class="pb_content_body" style="position: relative; margin: 0">
  4. <div class="right">
  5. <div class="courseTop">
  6. <div class="stepsNav">
  7. <h3 class="info_title" v-if="steps == 1">课程内容填写</h3>
  8. <h3 class="info_title" v-if="steps == 2">请选择课程框架</h3>
  9. <h3 class="info_title" v-if="steps == 3">课程内容填写</h3>
  10. <h3 class="info_title" v-if="steps == 4">上传课程</h3>
  11. <el-breadcrumb
  12. separator-class="el-icon-arrow-right"
  13. style="margin-top: 15px"
  14. >
  15. <el-breadcrumb-item
  16. :to="{ path: '/course?userid=' + userid + '&oid=' + oid }"
  17. >课程管理</el-breadcrumb-item
  18. >
  19. <el-breadcrumb-item>添加课程</el-breadcrumb-item>
  20. </el-breadcrumb>
  21. </div>
  22. <div
  23. v-if="steps == 1 || steps == 2 || steps == 3"
  24. style="
  25. font-size: 25px;
  26. color: #dedede;
  27. font-weight: bold;
  28. margin-left: auto;
  29. margin-right: 2%;
  30. "
  31. >
  32. {{
  33. steps == 1
  34. ? "第一步"
  35. : steps == 2
  36. ? "第二步"
  37. : steps == 3
  38. ? "第三步"
  39. : ""
  40. }}
  41. </div>
  42. </div>
  43. <div style="display: flex; margin-top: 20px; position: relative">
  44. <div class="stepBg" :class="steps == 3 ? 'isHeight' : ''">
  45. <div v-if="steps == 1" class="first" @click="navSteps(1)">
  46. <div>
  47. <img src="../../assets/icon/first.png" alt />
  48. </div>
  49. <div>填写基本信息</div>
  50. </div>
  51. <div v-else class="firstNo" @click="navSteps(1)">
  52. <div>
  53. <img src="../../assets/icon/firstNo.png" alt />
  54. </div>
  55. <div>填写基本信息</div>
  56. </div>
  57. <div v-show="cid == ''" class="secondNo">
  58. <div
  59. v-if="steps == 2"
  60. class="newSteps second"
  61. @click="navSteps(2)"
  62. >
  63. <div style="margin: 5px 10px 0 0; width: 2rem">
  64. <img src="../../assets/icon/second.png" alt />
  65. </div>
  66. <div>选择课程框架</div>
  67. </div>
  68. <div v-else class="newSteps secondNo" @click="navSteps(2)">
  69. <div>
  70. <img src="../../assets/icon/secondNo.png" alt />
  71. </div>
  72. <div>选择课程框架</div>
  73. </div>
  74. </div>
  75. <div v-if="steps == 3" class="third" @click="navSteps(3)">
  76. <div>
  77. <img src="../../assets/icon/third.png" alt />
  78. </div>
  79. <div>上传课程内容</div>
  80. </div>
  81. <div v-else class="thirdNo" @click="navSteps(3)">
  82. <div>
  83. <img src="../../assets/icon/thirdNo.png" alt />
  84. </div>
  85. <div>上传课程内容</div>
  86. </div>
  87. <div v-if="steps == 4" class="four">
  88. <div>
  89. <img src="../../assets/icon/four.png" alt />
  90. </div>
  91. <div>上传完成</div>
  92. </div>
  93. <div v-else class="fourNo">
  94. <div>
  95. <img src="../../assets/icon/fourNo.png" alt />
  96. </div>
  97. <div>上传完成</div>
  98. </div>
  99. </div>
  100. <div class="rightBox" v-if="this.steps == 1">
  101. <div class="whiteBg">
  102. <div class="right_title">课程基本信息</div>
  103. <div class="basic_box">
  104. <div class="big_box">
  105. <div class="left_first">
  106. <div>
  107. <div>
  108. <div class="bInfo_title" style="margin-bottom: 15px">
  109. <span style="color: red">*</span> 课程名称
  110. </div>
  111. <div style="display: flex">
  112. <img
  113. src="../../assets/icon/projectName.png"
  114. alt
  115. style="margin-right: 8px"
  116. />
  117. <input
  118. type="text"
  119. placeholder="请输入课程名称"
  120. class="binfo_input"
  121. v-model="courseName"
  122. />
  123. </div>
  124. </div>
  125. <div class="both">
  126. <div class="choose">
  127. <div
  128. class="all_choose"
  129. v-for="(item, index) in CourseType[0]"
  130. :key="index"
  131. >
  132. <span>{{ item.name }}</span>
  133. <el-checkbox-group v-model="courseTypeId">
  134. <el-checkbox
  135. v-for="item1 in CourseTypeJson[item.id]"
  136. :key="item1.id"
  137. :label="item1.id"
  138. >{{ item1.name }}</el-checkbox
  139. >
  140. </el-checkbox-group>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. <div class="whiteBg" style="border-radius: 0">
  150. <div class="right_first">
  151. <div class="right_title">上传封面与成员</div>
  152. <div
  153. style="
  154. padding: 0 0 50px 0;
  155. display: flex;
  156. align-items: baseline;
  157. justify-content: flex-start;
  158. "
  159. >
  160. <div style="margin: 45px 0px 0px 80px">
  161. <div class="bInfo_title" style="margin-top: 0 !important">
  162. 课程封面
  163. </div>
  164. <el-upload
  165. :class="{ disUoloadSty: noneBtnImg }"
  166. class="upCss"
  167. action="#"
  168. list-type="picture"
  169. v-loading="uploadLoading1"
  170. :http-request="beforeUpload1"
  171. ref="upload1"
  172. :on-preview="handlePictureCardPreview"
  173. :on-remove="handle_remove1"
  174. :show-file-list="true"
  175. :file-list="cover"
  176. accept="image/*"
  177. :limit="1"
  178. :on-exceed="onExceed"
  179. >
  180. <i class="el-icon-plus"></i>
  181. </el-upload>
  182. </div>
  183. <div
  184. style="
  185. display: flex;
  186. flex-flow: row nowrap;
  187. flex-direction: row;
  188. align-items: baseline; ;
  189. "
  190. >
  191. <div style="flex: 0.5 1 0%; margin: 30px 80px 0">
  192. <div class="bInfo_title">协同编辑</div>
  193. <div
  194. class="addPeople"
  195. @click="isNoFinsh"
  196. style="background: #6b92c9"
  197. >
  198. 添加协同成员
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  206. <div class="right_title">课程简要描述</div>
  207. <div style="width: 55%; padding: 10px 0 10px 80px">
  208. <div>
  209. <textarea
  210. rows="8"
  211. class="binfo_input"
  212. cols
  213. v-model="courseText"
  214. ></textarea>
  215. </div>
  216. </div>
  217. <el-switch
  218. v-model="isTeacherSee"
  219. active-text="允许给其他老师查看"
  220. style="margin: 30px 0px 10px 110px; padding-bottom: 30px"
  221. ></el-switch>
  222. </div>
  223. </div>
  224. <div class="rightBox" v-if="this.steps == 2">
  225. <div class="basic_box" style="margin: 20px 30px 0 !important">
  226. <div
  227. style="
  228. color: #b8b8b8;
  229. background: #fff;
  230. width: 26%;
  231. height: 40px;
  232. border-radius: 15px;
  233. padding-left: 20px;
  234. line-height: 40px;
  235. font-size: 17px;
  236. box-shadow: 0px 1px 2px 2px #e0e0e0;
  237. "
  238. >
  239. 请选择合适的课程模板
  240. </div>
  241. <div class="wordbox">
  242. <div
  243. class="wordTeacher"
  244. v-for="(aa, indexF) in templateArray"
  245. :key="indexF"
  246. @click="checkTemplate(aa)"
  247. >
  248. <div class="wordPic">
  249. <img src="../../assets/icon/wordMub.png" alt />
  250. </div>
  251. <div
  252. style="
  253. margin-top: 10px;
  254. line-height: 19px;
  255. overflow: hidden;
  256. text-overflow: ellipsis;
  257. white-space: nowrap;
  258. padding: 0 20px;
  259. "
  260. >
  261. {{ aa.title }}
  262. </div>
  263. </div>
  264. <div class="wordTeacher" @click="checkTemplate2()">
  265. <div class="wordPic">
  266. <img src="../../assets/icon/wordMub.png" alt />
  267. </div>
  268. <div
  269. style="
  270. margin-top: 10px;
  271. line-height: 19px;
  272. overflow: hidden;
  273. text-overflow: ellipsis;
  274. white-space: nowrap;
  275. padding: 0 20px;
  276. "
  277. >
  278. 新建课程
  279. </div>
  280. </div>
  281. <div class="wordTeacher" @click="checkTemplate1()">
  282. <div class="wordPic">
  283. <img src="../../assets/icon/wordMub.png" alt />
  284. </div>
  285. <div
  286. style="
  287. margin-top: 10px;
  288. line-height: 19px;
  289. overflow: hidden;
  290. text-overflow: ellipsis;
  291. white-space: nowrap;
  292. padding: 0 20px;
  293. "
  294. >
  295. 我的课程
  296. </div>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. <div class="rightBox" v-if="this.steps == 3">
  302. <div class="basic_box" style="margin: 0px 0 0 30px">
  303. <div
  304. style="display: flex; flex-direction: row; align-items: center"
  305. >
  306. <div class="cru_selectBox">
  307. <div
  308. v-for="(item, index) in unitJson"
  309. :key="index"
  310. class="cru_select"
  311. :class="unitIndex == index ? 'cru_selected' : ''"
  312. @click="unitSet(index)"
  313. >
  314. 第{{ index + 1 }}阶段
  315. </div>
  316. <img
  317. src="../../assets/line.png"
  318. class="cru_line"
  319. :style="{
  320. left: offsetLetfPx + 'px',
  321. }"
  322. />
  323. </div>
  324. <div class="addStageImg" @click="addunit()">
  325. <img src="../../assets/icon/add.png" alt />
  326. </div>
  327. </div>
  328. <div
  329. style="margin: 0 0 40px 0"
  330. v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  331. :key="index"
  332. >
  333. <div>
  334. <div class="chapter_contentbox">
  335. <div>第{{ unitIndex + 1 }}阶段</div>
  336. <div>
  337. <input
  338. type="text"
  339. placeholder="阶段标题"
  340. class="binfo_input"
  341. v-model="unitJson[unitIndex].dyName"
  342. />
  343. </div>
  344. <div
  345. v-if="unitJson.length > 1"
  346. @click="deleteUnit(unitIndex)"
  347. ></div>
  348. </div>
  349. </div>
  350. <div style="margin: 50px 0 10px 0; font-size: 24px">
  351. 添加任务
  352. </div>
  353. <div
  354. class="taskBorder"
  355. v-for="(itemTask, itemTaskIndex) in item.taskJson"
  356. :key="itemTaskIndex"
  357. >
  358. <div>
  359. <div>
  360. <div
  361. class="chapter_contentbox"
  362. style="
  363. flex-direction: row;
  364. justify-content: flex-start;
  365. align-items: center;
  366. "
  367. >
  368. <div
  369. style="
  370. font-weight: unset;
  371. font-size: 1.5em;
  372. font-weight: 700;
  373. width: 110px;
  374. "
  375. >
  376. 任务名称
  377. </div>
  378. <div>
  379. <input
  380. type="text"
  381. placeholder="输入任务名称"
  382. class="binfo_input"
  383. style="height: 50px; border-radius: 4px"
  384. v-model="
  385. unitJson[unitIndex].chapterInfo[0].taskJson[
  386. itemTaskIndex
  387. ].task
  388. "
  389. />
  390. </div>
  391. <div
  392. class="remove"
  393. v-if="item.taskJson.length > 1"
  394. @click="deleteTask(itemTaskIndex)"
  395. style="position: absolute; right: 55px"
  396. ></div>
  397. </div>
  398. <div
  399. style="
  400. display: flex;
  401. margin: 0 0 20px 0;
  402. flex-direction: row;
  403. justify-content: flex-start;
  404. align-items: center;
  405. width: 70.5% !important;
  406. padding-top: 30px;
  407. "
  408. >
  409. <div class="lineTitle">任务描述</div>
  410. <div class="line"></div>
  411. </div>
  412. <div>
  413. <editor-bar
  414. style="width: 70.5% !important;margin: 0;"
  415. placeholder="请输入任务描述"
  416. v-model="
  417. unitJson[unitIndex].chapterInfo[0].taskJson[
  418. itemTaskIndex
  419. ].taskDetail
  420. "
  421. @change="change"
  422. ></editor-bar>
  423. <!-- <textarea
  424. rows="6"
  425. class="binfo_input"
  426. placeholder="请输入任务描述"
  427. cols
  428. style="width: 70.5% !important; height: 120px"
  429. v-model="
  430. unitJson[unitIndex].chapterInfo[0].taskJson[
  431. itemTaskIndex
  432. ].taskDetail
  433. "
  434. ></textarea> -->
  435. </div>
  436. </div>
  437. </div>
  438. <div
  439. class="basic_box"
  440. style="
  441. margin: 0;
  442. min-height: 0;
  443. width: 66% !important;
  444. paddint-top: 10px !important;
  445. "
  446. >
  447. <div
  448. style="
  449. display: flex;
  450. margin: 0 0 20px 0;
  451. flex-direction: row;
  452. justify-content: flex-start;
  453. align-items: center;
  454. "
  455. >
  456. <div class="lineTitle">学习内容</div>
  457. <div class="line"></div>
  458. </div>
  459. <div>
  460. <div
  461. class="add_chapters_box"
  462. v-if="
  463. itemTask.chapterData &&
  464. itemTask.chapterData.length == 0
  465. "
  466. style="height: 185px"
  467. ></div>
  468. <div
  469. v-else
  470. class="add_chapters_box"
  471. style="display: flex; flex-direction: column"
  472. >
  473. <div
  474. class="chapter_upload"
  475. v-for="(item1, index1) in itemTask.chapterData"
  476. :key="item1.id"
  477. @click="
  478. getChapterData(
  479. $event,
  480. unitIndex,
  481. index,
  482. index1,
  483. item1.type
  484. )
  485. "
  486. >
  487. <div
  488. class="chapter_upload_t"
  489. style="width: 100%"
  490. ></div>
  491. <div
  492. class="chapter_upload_o"
  493. style="
  494. position: relative;
  495. display: flex;
  496. align-items: center;
  497. "
  498. >
  499. <div
  500. class="chapter_upload_l"
  501. style="padding: 1px 0 0 10px"
  502. >
  503. <div
  504. v-if="item1.type == 2"
  505. class="chapter_upload_l_i1"
  506. ></div>
  507. <div
  508. v-if="
  509. item1.type == 3 ||
  510. item1.type == 6 ||
  511. item1.type == 7
  512. "
  513. class="chapter_upload_l_i5"
  514. style="margin-left: 1px"
  515. ></div>
  516. <div
  517. v-if="item1.type == 8"
  518. class="chapter_upload_l_i8"
  519. style="margin-left: 1px"
  520. ></div>
  521. </div>
  522. <div
  523. class="chapter_upload_ic"
  524. style="
  525. cursor: pointer;
  526. position: absolute;
  527. width: 45px;
  528. right: 0;
  529. top: 0;
  530. "
  531. >
  532. <div class="chapter_upload_ic_l"></div>
  533. <div
  534. class="chapter_upload_ic_r"
  535. style="position: absolute"
  536. @click.stop="
  537. deleteChapterData(
  538. $event,
  539. unitIndex,
  540. index,
  541. index1,
  542. itemTaskIndex
  543. )
  544. "
  545. >
  546. <div></div>
  547. </div>
  548. </div>
  549. <div class="chapter_upload_n">
  550. <input
  551. v-if="
  552. item1.type == 2 ||
  553. item1.type == 3 ||
  554. item1.type == 7
  555. "
  556. :placeholder="item1.name"
  557. @change="
  558. updataVideoT(
  559. $event,
  560. unitIndex,
  561. chapterIndex,
  562. index1
  563. )
  564. "
  565. style="
  566. border: none;
  567. outline: none;
  568. width: 55%;
  569. minwidth: 215px;
  570. z-index: 99;
  571. font-size: 14px;
  572. "
  573. />
  574. <input
  575. :placeholder="item1.name"
  576. v-if="item1.type == 6"
  577. style="
  578. border: none;
  579. outline: none;
  580. width: 55%;
  581. minwidth: 215px;
  582. "
  583. readonly="true"
  584. @click="selectAttText(itemTaskIndex, index1)"
  585. />
  586. <input
  587. :placeholder="item1.name"
  588. v-if="item1.type == 8"
  589. style="
  590. border: none;
  591. outline: none;
  592. width: 55%;
  593. minwidth: 215px;
  594. "
  595. readonly="true"
  596. @click="selectLine(itemTaskIndex, index1)"
  597. />
  598. <div
  599. class="chapter_upload_ud"
  600. style="z-index: 99"
  601. >
  602. <div
  603. class="chapter_upload_up"
  604. @click="
  605. upCd($event, unitIndex, index, index1)
  606. "
  607. ></div>
  608. <div
  609. class="chapter_upload_down"
  610. @click="
  611. downCd($event, unitIndex, index, index1)
  612. "
  613. ></div>
  614. </div>
  615. </div>
  616. </div>
  617. </div>
  618. </div>
  619. </div>
  620. <div class="add_info_box">
  621. <button class="info_btn" @click="addImg($event)">
  622. 添加教学视频
  623. <input
  624. type="file"
  625. accept="video/mp4, video/quicktime, video/x-msvideo"
  626. style="display: none"
  627. v-if="inputShow"
  628. @change="
  629. beforeUpload2($event, unitIndex, 2, itemTaskIndex)
  630. "
  631. />
  632. </button>
  633. <button class="info_btn" @click="addImg($event)">
  634. 添加教学附件
  635. <input
  636. type="file"
  637. accept="application/pdf, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  638. style="display: none"
  639. v-if="inputShow"
  640. @change="
  641. beforeUpload2($event, unitIndex, 3, itemTaskIndex)
  642. "
  643. />
  644. </button>
  645. <button
  646. class="info_btn"
  647. @click="addAttText(itemTaskIndex)"
  648. >
  649. 添加图文
  650. </button>
  651. <button class="info_btn" @click="openLine(itemTaskIndex)">
  652. 添加链接
  653. </button>
  654. </div>
  655. </div>
  656. <div
  657. style="
  658. flex-direction: row;
  659. justify-content: flex-start;
  660. align-items: center;
  661. padding: 0 0 0 30px;
  662. paddint-top: 10px !important;
  663. "
  664. >
  665. <div
  666. style="
  667. display: flex;
  668. flex-direction: row;
  669. align-items: center;
  670. margin-bottom: 20px;
  671. "
  672. >
  673. <div class="lineTitle">练习内容</div>
  674. <div class="line" style="width: 90%"></div>
  675. </div>
  676. </div>
  677. <div class="toolChoose" style="padding: 0 0 0 30px">
  678. <div class="tools">
  679. <div
  680. class="leftTools"
  681. style="
  682. width: 95%;
  683. padding: 0 0 15px 0;
  684. border-bottom: 1px solid #efefef;
  685. margin-bottom: 15px;
  686. "
  687. v-for="(itemTool, toolIndex) in itemTask.toolChoose"
  688. :key="toolIndex"
  689. >
  690. <div>
  691. <textarea
  692. rows="3"
  693. type="text"
  694. placeholder="添加工具描述"
  695. class="binfo_input"
  696. style="margin: 20px 0; width: 71.5% !important"
  697. v-model="itemTool.toolDetail"
  698. ></textarea>
  699. </div>
  700. <div
  701. style="
  702. display: flex;
  703. flex-direction: row;
  704. align-items: baseline;
  705. flex-wrap: nowrap;
  706. justify-content: flex-start;
  707. position: relative;
  708. "
  709. >
  710. <div style="margin-right: 20px; font-weight: bold">
  711. 工具 {{ toolIndex + 1 }} :
  712. </div>
  713. <div class="chooseWho">
  714. <div
  715. :class="
  716. itemTool.toolType == 0 ? 'isChooseActive' : ''
  717. "
  718. @click="itemTool.toolType = 0"
  719. >
  720. 展示类
  721. </div>
  722. <div
  723. :class="
  724. itemTool.toolType == 1 ? 'isChooseActive' : ''
  725. "
  726. @click="itemTool.toolType = 1"
  727. >
  728. 思维类
  729. </div>
  730. <div
  731. :class="
  732. itemTool.toolType == 2 ? 'isChooseActive' : ''
  733. "
  734. @click="itemTool.toolType = 2"
  735. >
  736. 评价类
  737. </div>
  738. <div
  739. :class="
  740. itemTool.toolType == 3 ? 'isChooseActive' : ''
  741. "
  742. @click="itemTool.toolType = 3"
  743. >
  744. 创作类
  745. </div>
  746. </div>
  747. <div
  748. class="remove"
  749. @click="deleteTool(itemTaskIndex, toolIndex)"
  750. v-if="itemTask.toolChoose.length > 1"
  751. style="position: absolute; right: 55px"
  752. ></div>
  753. </div>
  754. <div style="min-height: 163px">
  755. <div class="toolSort" v-if="itemTool.toolType == 0">
  756. <!-- <div class="tool">
  757. <div
  758. class="whiteBIcon"
  759. @click="addTools(8, itemTaskIndex, toolIndex)"
  760. >
  761. <img src="../../assets/icon/secondToolList/library.png" alt />
  762. <div style="margin: 5px 0">素材库</div>
  763. </div>
  764. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  765. <img
  766. src="../../assets/icon/checkNo.png"
  767. alt
  768. v-if="itemTool.tool.indexOf(8) == -1"
  769. />
  770. <img src="../../assets/icon/checkedIs.png" alt v-else />
  771. </div>
  772. </div>-->
  773. <div class="tool">
  774. <div
  775. class="whiteBIcon"
  776. @click="addTools(17, itemTaskIndex, toolIndex)"
  777. >
  778. <img
  779. src="../../assets/icon/secondToolList/library.png"
  780. alt
  781. />
  782. <div style="margin: 5px 0">学习资料</div>
  783. </div>
  784. <div
  785. class="check"
  786. @click="addTools(17, itemTaskIndex, toolIndex)"
  787. >
  788. <img
  789. src="../../assets/icon/checkNo.png"
  790. alt
  791. v-if="itemTool.tool.indexOf(17) == -1"
  792. />
  793. <img
  794. src="../../assets/icon/checkedIs.png"
  795. alt
  796. v-else
  797. />
  798. </div>
  799. </div>
  800. <div class="tool">
  801. <div
  802. class="whiteBIcon"
  803. @click="addTools(10, itemTaskIndex, toolIndex)"
  804. >
  805. <img
  806. src="../../assets/icon/thirdToolList/time.png"
  807. alt
  808. />
  809. <div style="margin: 5px 0">倒计时</div>
  810. </div>
  811. <div
  812. class="check"
  813. @click="addTools(10, itemTaskIndex, toolIndex)"
  814. >
  815. <img
  816. src="../../assets/icon/checkNo.png"
  817. alt
  818. v-if="itemTool.tool.indexOf(10) == -1"
  819. />
  820. <img
  821. src="../../assets/icon/checkedIs.png"
  822. alt
  823. v-else
  824. />
  825. </div>
  826. </div>
  827. </div>
  828. <div class="toolSort" v-if="itemTool.toolType == 1">
  829. <div class="tool">
  830. <div
  831. class="whiteBIcon"
  832. @click="addTools(7, itemTaskIndex, toolIndex)"
  833. >
  834. <img
  835. src="../../assets/icon/secondToolList/mindNetwork.png"
  836. alt
  837. />
  838. <div style="margin: 5px 0">思维网格</div>
  839. </div>
  840. <div
  841. class="check"
  842. @click="addTools(7, itemTaskIndex, toolIndex)"
  843. >
  844. <img
  845. src="../../assets/icon/checkNo.png"
  846. alt
  847. v-if="itemTool.tool.indexOf(7) == -1"
  848. />
  849. <img
  850. src="../../assets/icon/checkedIs.png"
  851. alt
  852. v-else
  853. />
  854. </div>
  855. </div>
  856. <div class="tool">
  857. <div
  858. class="whiteBIcon"
  859. @click="addTools(1, itemTaskIndex, toolIndex)"
  860. >
  861. <img
  862. src="../../assets/icon/secondToolList/whiteBoard.png"
  863. alt
  864. />
  865. <div style="margin: 5px 0">电子白板</div>
  866. </div>
  867. <div
  868. class="check"
  869. @click="addTools(1, itemTaskIndex, toolIndex)"
  870. >
  871. <img
  872. src="../../assets/icon/checkNo.png"
  873. alt
  874. v-if="itemTool.tool.indexOf(1) == -1"
  875. />
  876. <img
  877. src="../../assets/icon/checkedIs.png"
  878. alt
  879. v-else
  880. />
  881. </div>
  882. </div>
  883. <div class="tool">
  884. <div
  885. class="whiteBIcon"
  886. @click="addTools(2, itemTaskIndex, toolIndex)"
  887. >
  888. <img
  889. src="../../assets/icon/secondToolList/note.png"
  890. alt
  891. />
  892. <div style="margin: 5px 0">便签</div>
  893. </div>
  894. <div
  895. class="check"
  896. @click="addTools(2, itemTaskIndex, toolIndex)"
  897. >
  898. <img
  899. src="../../assets/icon/checkNo.png"
  900. alt
  901. v-if="itemTool.tool.indexOf(2) == -1"
  902. />
  903. <img
  904. src="../../assets/icon/checkedIs.png"
  905. alt
  906. v-else
  907. />
  908. </div>
  909. </div>
  910. <div class="tool">
  911. <div
  912. class="whiteBIcon"
  913. @click="addTools(6, itemTaskIndex, toolIndex)"
  914. >
  915. <img
  916. src="../../assets/icon/secondToolList/doc.png"
  917. alt
  918. />
  919. <div style="margin: 5px 0">协同文档</div>
  920. </div>
  921. <div
  922. class="check"
  923. @click="addTools(6, itemTaskIndex, toolIndex)"
  924. >
  925. <img
  926. src="../../assets/icon/checkNo.png"
  927. alt
  928. v-if="itemTool.tool.indexOf(6) == -1"
  929. />
  930. <img
  931. src="../../assets/icon/checkedIs.png"
  932. alt
  933. v-else
  934. />
  935. </div>
  936. </div>
  937. <div class="tool">
  938. <div
  939. class="whiteBIcon"
  940. @click="addTools(3, itemTaskIndex, toolIndex)"
  941. >
  942. <img
  943. src="../../assets/icon/secondToolList/mindMapping.png"
  944. alt
  945. />
  946. <div style="margin: 5px 0">思维导图</div>
  947. </div>
  948. <div
  949. class="check"
  950. @click="addTools(3, itemTaskIndex, toolIndex)"
  951. >
  952. <img
  953. src="../../assets/icon/checkNo.png"
  954. alt
  955. v-if="itemTool.tool.indexOf(3) == -1"
  956. />
  957. <img
  958. src="../../assets/icon/checkedIs.png"
  959. alt
  960. v-else
  961. />
  962. </div>
  963. </div>
  964. </div>
  965. <div class="toolSort" v-if="itemTool.toolType == 2">
  966. <!-- <div class="tool">
  967. <div
  968. class="whiteBIcon"
  969. @click="addTools(5, itemTaskIndex, toolIndex)"
  970. >
  971. <img
  972. src="../../assets/icon/thirdToolList/score.png"
  973. alt
  974. />
  975. <div style="margin: 5px 0">量规评分</div>
  976. </div>
  977. <div
  978. class="check"
  979. @click="addTools(5, itemTaskIndex, toolIndex)"
  980. >
  981. <img
  982. src="../../assets/icon/checkNo.png"
  983. alt
  984. v-if="itemTool.tool.indexOf(5) == -1"
  985. />
  986. <img
  987. src="../../assets/icon/checkedIs.png"
  988. alt
  989. v-else
  990. />
  991. </div>
  992. </div>-->
  993. <div class="tool">
  994. <div
  995. class="whiteBIcon"
  996. @click="openTools(itemTaskIndex, 4, toolIndex)"
  997. >
  998. <img
  999. src="../../assets/icon/thirdToolList/ask.png"
  1000. alt
  1001. />
  1002. <div style="margin: 5px 0">问卷调查</div>
  1003. </div>
  1004. <div
  1005. class="check"
  1006. @click="addTools(4, itemTaskIndex, toolIndex)"
  1007. >
  1008. <img
  1009. src="../../assets/icon/checkNo.png"
  1010. alt
  1011. v-if="itemTool.tool.indexOf(4) == -1"
  1012. />
  1013. <img
  1014. src="../../assets/icon/checkedIs.png"
  1015. alt
  1016. v-else
  1017. />
  1018. </div>
  1019. </div>
  1020. <div class="tool">
  1021. <div
  1022. class="whiteBIcon"
  1023. @click="openTools(itemTaskIndex, 15, toolIndex)"
  1024. >
  1025. <img
  1026. src="../../assets/icon/thirdToolList/answer.png"
  1027. alt
  1028. />
  1029. <div style="margin: 5px 0">问答工具</div>
  1030. </div>
  1031. <div
  1032. class="check"
  1033. @click="addTools(15, itemTaskIndex, toolIndex)"
  1034. >
  1035. <img
  1036. src="../../assets/icon/checkNo.png"
  1037. alt
  1038. v-if="itemTool.tool.indexOf(15) == -1"
  1039. />
  1040. <img
  1041. src="../../assets/icon/checkedIs.png"
  1042. alt
  1043. v-else
  1044. />
  1045. </div>
  1046. </div>
  1047. <div class="tool">
  1048. <div
  1049. class="whiteBIcon"
  1050. @click="addTools(16, itemTaskIndex, toolIndex)"
  1051. >
  1052. <img
  1053. src="../../assets/icon/thirdToolList/work.png"
  1054. alt
  1055. />
  1056. <div style="margin: 5px 0">作业提交</div>
  1057. </div>
  1058. <div
  1059. class="check"
  1060. @click="addTools(16, itemTaskIndex, toolIndex)"
  1061. >
  1062. <img
  1063. src="../../assets/icon/checkNo.png"
  1064. alt
  1065. v-if="itemTool.tool.indexOf(16) == -1"
  1066. />
  1067. <img
  1068. src="../../assets/icon/checkedIs.png"
  1069. alt
  1070. v-else
  1071. />
  1072. </div>
  1073. </div>
  1074. </div>
  1075. <div class="toolSort" v-if="itemTool.toolType == 3">
  1076. <div class="tool">
  1077. <div
  1078. class="whiteBIcon"
  1079. @click="addTools(18, itemTaskIndex, toolIndex)"
  1080. >
  1081. <img
  1082. src="../../assets/icon/thirdToolList/trainPlatform.png"
  1083. alt
  1084. />
  1085. <div style="margin: 5px 0">训练平台</div>
  1086. </div>
  1087. <div
  1088. class="check"
  1089. @click="addTools(18, itemTaskIndex, toolIndex)"
  1090. >
  1091. <img
  1092. src="../../assets/icon/checkNo.png"
  1093. alt
  1094. v-if="itemTool.tool.indexOf(18) == -1"
  1095. />
  1096. <img
  1097. src="../../assets/icon/checkedIs.png"
  1098. alt
  1099. v-else
  1100. />
  1101. </div>
  1102. </div>
  1103. <div class="tool">
  1104. <div
  1105. class="whiteBIcon"
  1106. @click="addTools(21, itemTaskIndex, toolIndex)"
  1107. >
  1108. <img
  1109. src="../../assets/icon/fourthToolList/program.png"
  1110. alt
  1111. />
  1112. <div style="margin: 5px 0">编程平台</div>
  1113. </div>
  1114. <div
  1115. class="check"
  1116. @click="addTools(21, itemTaskIndex, toolIndex)"
  1117. >
  1118. <img
  1119. src="../../assets/icon/checkNo.png"
  1120. alt
  1121. v-if="itemTool.tool.indexOf(21) == -1"
  1122. />
  1123. <img
  1124. src="../../assets/icon/checkedIs.png"
  1125. alt
  1126. v-else
  1127. />
  1128. </div>
  1129. </div>
  1130. <div class="tool">
  1131. <div
  1132. class="whiteBIcon"
  1133. @click="addTools(22, itemTaskIndex, toolIndex)"
  1134. >
  1135. <img
  1136. src="../../assets/icon/fourthToolList/AIprogram2.png"
  1137. alt
  1138. />
  1139. <div style="margin: 5px 0">AI体验</div>
  1140. </div>
  1141. <div
  1142. class="check"
  1143. @click="addTools(22, itemTaskIndex, toolIndex)"
  1144. >
  1145. <img
  1146. src="../../assets/icon/checkNo.png"
  1147. alt
  1148. v-if="itemTool.tool.indexOf(22) == -1"
  1149. />
  1150. <img
  1151. src="../../assets/icon/checkedIs.png"
  1152. alt
  1153. v-else
  1154. />
  1155. </div>
  1156. </div>
  1157. <div class="tool">
  1158. <div
  1159. class="whiteBIcon"
  1160. @click="addTools(23, itemTaskIndex, toolIndex)"
  1161. >
  1162. <img
  1163. src="../../assets/icon/fourthToolList/Pythonprogram.png"
  1164. alt
  1165. />
  1166. <div style="margin: 5px 0">Python</div>
  1167. </div>
  1168. <div
  1169. class="check"
  1170. @click="addTools(23, itemTaskIndex, toolIndex)"
  1171. >
  1172. <img
  1173. src="../../assets/icon/checkNo.png"
  1174. alt
  1175. v-if="itemTool.tool.indexOf(23) == -1"
  1176. />
  1177. <img
  1178. src="../../assets/icon/checkedIs.png"
  1179. alt
  1180. v-else
  1181. />
  1182. </div>
  1183. </div>
  1184. <div class="tool">
  1185. <div
  1186. class="whiteBIcon"
  1187. @click="addTools(24, itemTaskIndex, toolIndex)"
  1188. >
  1189. <img
  1190. src="../../assets/icon/fourthToolList/program.png"
  1191. alt
  1192. />
  1193. <div style="margin: 5px 0">AI平台</div>
  1194. </div>
  1195. <div
  1196. class="check"
  1197. @click="addTools(24, itemTaskIndex, toolIndex)"
  1198. >
  1199. <img
  1200. src="../../assets/icon/checkNo.png"
  1201. alt
  1202. v-if="itemTool.tool.indexOf(24) == -1"
  1203. />
  1204. <img
  1205. src="../../assets/icon/checkedIs.png"
  1206. alt
  1207. v-else
  1208. />
  1209. </div>
  1210. </div>
  1211. </div>
  1212. </div>
  1213. </div>
  1214. <div
  1215. class="addToolFun"
  1216. @click="addToolFun(itemTaskIndex)"
  1217. >
  1218. <div class="addToolImg">
  1219. <img src="../../assets/icon/add.png" alt />
  1220. </div>
  1221. <div>添加工具</div>
  1222. </div>
  1223. </div>
  1224. </div>
  1225. <div class="elist_css">
  1226. <div class="elist_title">
  1227. <div
  1228. style="
  1229. display: flex;
  1230. flex-direction: row;
  1231. align-items: center;
  1232. margin-bottom: 20px;
  1233. "
  1234. >
  1235. <div class="lineTitle">评价设置</div>
  1236. <div class="line" style="width: 90%"></div>
  1237. </div>
  1238. </div>
  1239. <div
  1240. v-if="itemTask.eList && itemTask.eList.length"
  1241. class="elist_input"
  1242. >
  1243. <div
  1244. v-for="(eItem, eIndex) in itemTask.eList"
  1245. :key="eIndex"
  1246. class="elist_input_box"
  1247. >
  1248. <span>评价名称:</span>
  1249. <input
  1250. type="input"
  1251. v-model="itemTask.eList[eIndex].value"
  1252. placeholder="填写评价名称"
  1253. />
  1254. <span>评星等级:</span>
  1255. <el-rate
  1256. v-model="itemTask.eList[eIndex].score"
  1257. @change="setEListStar()"
  1258. disabled
  1259. ></el-rate>
  1260. <div
  1261. class="remove"
  1262. @click="deletEList(unitIndex, itemTaskIndex, eIndex)"
  1263. ></div>
  1264. <div class="elist_inptu_text">
  1265. <span>评价描述:</span>
  1266. <input
  1267. type="input"
  1268. v-model="itemTask.eList[eIndex].detail"
  1269. placeholder="填写评价描述"
  1270. />
  1271. </div>
  1272. </div>
  1273. </div>
  1274. <div
  1275. class="addToolFun"
  1276. @click="addEList(unitIndex, itemTaskIndex)"
  1277. >
  1278. <div class="addToolImg">
  1279. <img src="../../assets/icon/add.png" alt />
  1280. </div>
  1281. <div>添加</div>
  1282. </div>
  1283. </div>
  1284. <div class="funBlock" style="padding: 0">
  1285. <div class="fold">
  1286. <div @click="fold(itemTaskIndex, $event, 1)">折叠</div>
  1287. <div class="arrow">
  1288. <img src="../../assets/icon/fold.png" alt />
  1289. </div>
  1290. </div>
  1291. <div class="fold">
  1292. <div @click="fold(itemTaskIndex, $event, 0)">展开</div>
  1293. <div class="arrow">
  1294. <img src="../../assets/icon/expand.png" alt />
  1295. </div>
  1296. </div>
  1297. </div>
  1298. </div>
  1299. <div class="addTaskBorder" @click="addTaskBorder">
  1300. <div>
  1301. <img src="../../assets/icon/addHw.png" alt />
  1302. <span>添加任务</span>
  1303. </div>
  1304. </div>
  1305. </div>
  1306. </div>
  1307. </div>
  1308. <div
  1309. style="
  1310. width: calc(100% - 17% - 25px);
  1311. background: #fff;
  1312. border-radius: 10px;
  1313. min-height: 550px;
  1314. min-width: 800px;
  1315. "
  1316. v-if="this.steps == 4"
  1317. >
  1318. <div class="basic_box_success">
  1319. <div class="right_img">
  1320. <img src="../../assets/icon/right.png" alt />
  1321. </div>
  1322. <div style="font-weight: bold">成功</div>
  1323. <div>您的课程编号</div>
  1324. <div class="number">{{ number }}</div>
  1325. <div class="success_button">
  1326. <div class="look_course" @click="isNoFinsh">
  1327. 邀请老师协同编辑
  1328. </div>
  1329. <div class="attend_others" @click="goCourse">预览课程</div>
  1330. </div>
  1331. </div>
  1332. </div>
  1333. </div>
  1334. <div class="info_btnBox">
  1335. <button
  1336. class="info_btn"
  1337. v-if="steps == 1"
  1338. @click="goTo('/course?userid=' + userid + '&oid=' + oid)"
  1339. >
  1340. 返回课程
  1341. </button>
  1342. <button
  1343. class="info_btn"
  1344. v-if="steps > 1 && steps != 5"
  1345. @click="lastSteps"
  1346. >
  1347. {{ steps == 4 ? "返回首页" : "上一步" }}
  1348. </button>
  1349. <button class="info_btn" v-if="steps < 5" @click="nextSteps">
  1350. {{ steps == 3 ? "确认上传" : "下一步" }}
  1351. </button>
  1352. </div>
  1353. </div>
  1354. </div>
  1355. <el-dialog
  1356. title="提示"
  1357. :visible.sync="dialogVisible"
  1358. :append-to-body="true"
  1359. width="25%"
  1360. :before-close="handleClose"
  1361. class="dialog_diy2 customWidth"
  1362. >
  1363. <div>请复制该链接邀请协同编辑</div>
  1364. <div>http://www.boomyon.com/index-zhang.com</div>
  1365. <span slot="footer" class="dialog-footer">
  1366. <el-button type="primary">复制链接分享</el-button>
  1367. <el-button @click="dialogVisible = false">取消</el-button>
  1368. </span>
  1369. </el-dialog>
  1370. <el-dialog
  1371. :title="updateBoolean2 ? '查看文档' : '添加文档'"
  1372. :visible.sync="dialogVisible1"
  1373. :append-to-body="true"
  1374. width="25%"
  1375. :before-close="handleClose"
  1376. class="dialog_diy2 customWidth"
  1377. >
  1378. <el-form>
  1379. <el-form-item label="文档标题">
  1380. <el-input
  1381. v-model="tTitle"
  1382. auto-complete="off"
  1383. placeholder="请输入文档标题名..."
  1384. ></el-input>
  1385. </el-form-item>
  1386. <div>文档简介</div>
  1387. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  1388. </el-form>
  1389. <span slot="footer" class="dialog-footer">
  1390. <el-button @click="dialogVisible1 = false">取 消</el-button>
  1391. <el-button type="primary" @click="addWord" v-if="!updateBoolean2"
  1392. >添加</el-button
  1393. >
  1394. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  1395. </span>
  1396. </el-dialog>
  1397. <el-dialog
  1398. title="添加文档"
  1399. :visible.sync="dialogVisible2"
  1400. :append-to-body="true"
  1401. width="500px"
  1402. :before-close="handleClose"
  1403. class="dialog_diy"
  1404. >
  1405. <el-form>
  1406. <el-form-item label="文档标题">
  1407. <el-input
  1408. v-model="templateC.title"
  1409. auto-complete="off"
  1410. placeholder="请输入文档标题名..."
  1411. ></el-input>
  1412. </el-form-item>
  1413. <div>文档内容</div>
  1414. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  1415. </el-form>
  1416. <span slot="footer" class="dialog-footer">
  1417. <el-button @click="clearChoose">取 消</el-button>
  1418. <el-button type="primary" @click="wordNext()">确定</el-button>
  1419. </span>
  1420. </el-dialog>
  1421. <el-dialog
  1422. title="添加富文本"
  1423. :visible.sync="dialogVisible6"
  1424. :append-to-body="true"
  1425. width="500px"
  1426. :before-close="handleClose"
  1427. class="dialog_diy"
  1428. >
  1429. <el-form>
  1430. <el-form-item label="文本标题">
  1431. <el-input
  1432. v-model="AttText.title"
  1433. auto-complete="off"
  1434. placeholder="请输入文本标题..."
  1435. ></el-input>
  1436. </el-form-item>
  1437. <div>富文本内容</div>
  1438. <editor-bar v-model="AttText.text" @change="change"></editor-bar>
  1439. </el-form>
  1440. <span slot="footer" class="dialog-footer">
  1441. <el-button @click="clearAttText">取 消</el-button>
  1442. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  1443. </span>
  1444. </el-dialog>
  1445. <el-dialog
  1446. title="添加链接"
  1447. :visible.sync="dialogVisible7"
  1448. :append-to-body="true"
  1449. width="500px"
  1450. :before-close="handleClose"
  1451. class="dialog_diy lineCss"
  1452. >
  1453. <el-form>
  1454. <el-form-item label="链接" :label-width="formLabelWidth">
  1455. <span>
  1456. <el-input
  1457. placeholder="请输入链接"
  1458. clearable
  1459. v-model="line"
  1460. class="add_input"
  1461. ></el-input>
  1462. </span>
  1463. </el-form-item>
  1464. </el-form>
  1465. <span slot="footer" class="dialog-footer">
  1466. <el-button @click="clearLine">取 消</el-button>
  1467. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  1468. </span>
  1469. </el-dialog>
  1470. <el-dialog
  1471. title="添加课程成员"
  1472. :visible.sync="dialogVisible3"
  1473. :append-to-body="true"
  1474. width="25%"
  1475. height="80%"
  1476. :before-close="handleClose"
  1477. class="addNewPP customWidth"
  1478. >
  1479. <div class="people">
  1480. <div class="people_top">
  1481. <div class="people_nav">选择成员</div>
  1482. <div class="people_top_right">
  1483. <div class="people_search">
  1484. <el-input
  1485. placeholder="搜索成员"
  1486. v-model="searchPeople"
  1487. ></el-input>
  1488. <div class="search_img" @click="searchStudent">
  1489. <img src="../../assets/icon/search.png" alt />
  1490. </div>
  1491. </div>
  1492. </div>
  1493. </div>
  1494. <el-checkbox-group v-model="checkboxList" class="people_name">
  1495. <el-checkbox
  1496. v-for="item in studentJuri"
  1497. :key="item.userid"
  1498. :label="item.userid"
  1499. >{{ item.name ? item.name : "暂无学生可选" }}</el-checkbox
  1500. >
  1501. </el-checkbox-group>
  1502. </div>
  1503. <span slot="footer" class="dialog-footer">
  1504. <el-button @click="dialogVisible3 = false">取 消</el-button>
  1505. <el-button type="primary" @click="isAddPP">确定</el-button>
  1506. </span>
  1507. </el-dialog>
  1508. <el-dialog
  1509. title="创建问卷调查"
  1510. :visible.sync="dialogVisible5"
  1511. :append-to-body="true"
  1512. width="800px"
  1513. :before-close="handleClose"
  1514. class="dialog_diy"
  1515. >
  1516. <div>
  1517. <div
  1518. class="a_add_title"
  1519. style="
  1520. display: flex;
  1521. flex-direction: row;
  1522. align-items: center;
  1523. justify-content: center;
  1524. "
  1525. >
  1526. <div style="margin-right: 20px; font-size: 20px">问卷标题:</div>
  1527. <el-input
  1528. v-model="askJson.askTitle"
  1529. placeholder="请输入问卷标题"
  1530. style="width: 400px"
  1531. ></el-input>
  1532. </div>
  1533. <div class="a_addBox">
  1534. <div style="font-size: 16px; color: #c7c7c7">请输入问卷内容</div>
  1535. <div
  1536. class="a_add_box"
  1537. v-for="(item1, index1) in askJson.askCount"
  1538. :key="index1"
  1539. >
  1540. <div class="a_add_head">
  1541. <div>
  1542. {{ index1 + 1 + "、" }}
  1543. <el-input
  1544. class="a_add_head_input"
  1545. v-model="askJson.askJson[index1].askstitle"
  1546. placeholder="请输入问卷题目..."
  1547. ></el-input>
  1548. </div>
  1549. <div class="a_add_head_div">
  1550. <el-button type="primary" size="small" @click="addAskList()"
  1551. >添加</el-button
  1552. >
  1553. <el-button
  1554. type="primary"
  1555. size="small"
  1556. @click="deleteAskList()"
  1557. v-if="index1 != 0"
  1558. >删除</el-button
  1559. >
  1560. </div>
  1561. </div>
  1562. <div class="a_add_body">
  1563. <div class="a_add_input">
  1564. <el-input
  1565. v-for="(item2, checkIndex) in askJson.askJson[index1].askItem"
  1566. :key="checkIndex"
  1567. v-model="askJson.askJson[index1].checkList[checkIndex]"
  1568. placeholder="请输入选项..."
  1569. style="width: 150px; margin: 10px 10px 0 0"
  1570. ></el-input>
  1571. </div>
  1572. <div class="a_add_body_div">
  1573. <el-button
  1574. style="margin: 10px 0px 0 0"
  1575. type="primary"
  1576. size="small"
  1577. @click="addcheckList(askJson.askJson[index1])"
  1578. v-if="askJson.askJson[index1].askItem < 4"
  1579. >添加</el-button
  1580. >
  1581. <el-button
  1582. type="primary"
  1583. size="small"
  1584. style="margin: 10px 0 0 0"
  1585. @click="deletecheckList(askJson.askJson[index1])"
  1586. v-if="askJson.askJson[index1].askItem != 1"
  1587. >删除</el-button
  1588. >
  1589. </div>
  1590. </div>
  1591. </div>
  1592. </div>
  1593. </div>
  1594. <span slot="footer" class="dialog-footer">
  1595. <el-button @click="dialogVisible5 = false">取 消</el-button>
  1596. <el-button type="primary" @click="addAsk">确 定</el-button>
  1597. </span>
  1598. </el-dialog>
  1599. <el-dialog
  1600. title="添加工具"
  1601. :visible.sync="dialogVisible4"
  1602. :append-to-body="true"
  1603. width="600px"
  1604. :before-close="handleClose"
  1605. class="dialog_diy addToolsDia"
  1606. >
  1607. <div class="toolChoose" style="padding: 0 0 0 30px">
  1608. <div class="tools">
  1609. <div
  1610. class="leftTools"
  1611. style="
  1612. width: 95%;
  1613. padding: 0 0 15px 0;
  1614. border-bottom: 1px solid #efefef;
  1615. margin-bottom: 15px;
  1616. "
  1617. v-for="(itemTools, itemToolsIndex) in chapTools"
  1618. :key="itemToolsIndex"
  1619. >
  1620. <div
  1621. style="
  1622. display: flex;
  1623. flex-direction: row;
  1624. align-items: baseline;
  1625. flex-wrap: nowrap;
  1626. justify-content: flex-start;
  1627. position: relative;
  1628. "
  1629. >
  1630. <div class="chooseWho">
  1631. <div
  1632. :class="chapToolsType == 0 ? 'isChooseActive' : ''"
  1633. @click="chapToolsType = 0"
  1634. >
  1635. 展示类
  1636. </div>
  1637. <div
  1638. :class="chapToolsType == 1 ? 'isChooseActive' : ''"
  1639. @click="chapToolsType = 1"
  1640. >
  1641. 思维类
  1642. </div>
  1643. <div
  1644. :class="chapToolsType == 2 ? 'isChooseActive' : ''"
  1645. @click="chapToolsType = 2"
  1646. >
  1647. 评价类
  1648. </div>
  1649. </div>
  1650. </div>
  1651. <div style="min-height: 163px">
  1652. <div class="toolSort" v-if="chapToolsType == 0">
  1653. <div class="tool">
  1654. <div class="whiteBIcon" @click="chapAddTools(8)">
  1655. <img
  1656. src="../../assets/icon/secondToolList/library.png"
  1657. alt
  1658. />
  1659. <div style="margin: 5px 0">素材库</div>
  1660. </div>
  1661. <div class="check" @click="chapAddTools(8)">
  1662. <img
  1663. src="../../assets/icon/checkNo.png"
  1664. alt
  1665. v-if="itemTools.tools.indexOf(8) == -1"
  1666. />
  1667. <img src="../../assets/icon/checkedIs.png" alt v-else />
  1668. </div>
  1669. </div>
  1670. </div>
  1671. <div class="toolSort" v-if="chapToolsType == 1">
  1672. <div class="tool">
  1673. <div class="whiteBIcon" @click="chapAddTools(7)">
  1674. <img
  1675. src="../../assets/icon/secondToolList/mindNetwork.png"
  1676. alt
  1677. />
  1678. <div style="margin: 5px 0">思维网格</div>
  1679. </div>
  1680. <div class="check" @click="chapAddTools(7)">
  1681. <img
  1682. src="../../assets/icon/checkNo.png"
  1683. alt
  1684. v-if="itemTools.tools.indexOf(7) == -1"
  1685. />
  1686. <img src="../../assets/icon/checkedIs.png" alt v-else />
  1687. </div>
  1688. </div>
  1689. <div class="tool">
  1690. <div class="whiteBIcon" @click="chapAddTools(1)">
  1691. <img
  1692. src="../../assets/icon/secondToolList/whiteBoard.png"
  1693. alt
  1694. />
  1695. <div style="margin: 5px 0">电子白板</div>
  1696. </div>
  1697. <div class="check" @click="chapAddTools(1)">
  1698. <img
  1699. src="../../assets/icon/checkNo.png"
  1700. alt
  1701. v-if="itemTools.tools.indexOf(1) == -1"
  1702. />
  1703. <img src="../../assets/icon/checkedIs.png" alt v-else />
  1704. </div>
  1705. </div>
  1706. <div class="tool">
  1707. <div class="whiteBIcon" @click="chapAddTools(2)">
  1708. <img src="../../assets/icon/secondToolList/note.png" alt />
  1709. <div style="margin: 5px 0">便签</div>
  1710. </div>
  1711. <div class="check" @click="chapAddTools(2)">
  1712. <img
  1713. src="../../assets/icon/checkNo.png"
  1714. alt
  1715. v-if="itemTools.tools.indexOf(2) == -1"
  1716. />
  1717. <img src="../../assets/icon/checkedIs.png" alt v-else />
  1718. </div>
  1719. </div>
  1720. <div class="tool">
  1721. <div class="whiteBIcon" @click="chapAddTools(6)">
  1722. <img src="../../assets/icon/secondToolList/doc.png" alt />
  1723. <div style="margin: 5px 0">协同文档</div>
  1724. </div>
  1725. <div class="check" @click="chapAddTools(6)">
  1726. <img
  1727. src="../../assets/icon/checkNo.png"
  1728. alt
  1729. v-if="itemTools.tools.indexOf(6) == -1"
  1730. />
  1731. <img src="../../assets/icon/checkedIs.png" alt v-else />
  1732. </div>
  1733. </div>
  1734. <div class="tool">
  1735. <div class="whiteBIcon" @click="chapAddTools(3)">
  1736. <img
  1737. src="../../assets/icon/secondToolList/mindMapping.png"
  1738. alt
  1739. />
  1740. <div style="margin: 5px 0">思维导图</div>
  1741. </div>
  1742. <div class="check" @click="chapAddTools(3)">
  1743. <img
  1744. src="../../assets/icon/checkNo.png"
  1745. alt
  1746. v-if="itemTools.tools.indexOf(3) == -1"
  1747. />
  1748. <img src="../../assets/icon/checkedIs.png" alt v-else />
  1749. </div>
  1750. </div>
  1751. </div>
  1752. <div class="toolSort" v-if="chapToolsType == 2">
  1753. <div class="tool">
  1754. <div class="whiteBIcon" @click="chapAddTools(5)">
  1755. <img src="../../assets/icon/thirdToolList/score.png" alt />
  1756. <div style="margin: 5px 0">量规评分</div>
  1757. </div>
  1758. <div class="check" @click="chapAddTools(5)">
  1759. <img
  1760. src="../../assets/icon/checkNo.png"
  1761. alt
  1762. v-if="itemTools.tools.indexOf(5) == -1"
  1763. />
  1764. <img src="../../assets/icon/checkedIs.png" alt v-else />
  1765. </div>
  1766. </div>
  1767. <div class="tool">
  1768. <div
  1769. class="whiteBIcon"
  1770. @click="openTools(chapCount, 4, null)"
  1771. >
  1772. <img src="../../assets/icon/thirdToolList/ask.png" alt />
  1773. <div style="margin: 5px 0">问卷调查</div>
  1774. </div>
  1775. <div class="check" @click="chapAddTools(4)">
  1776. <img
  1777. src="../../assets/icon/checkNo.png"
  1778. alt
  1779. v-if="itemTools.tools.indexOf(4) == -1"
  1780. />
  1781. <img src="../../assets/icon/checkedIs.png" alt v-else />
  1782. </div>
  1783. </div>
  1784. </div>
  1785. </div>
  1786. <div>
  1787. <input
  1788. type="text"
  1789. placeholder="添加工具描述"
  1790. class="binfo_input"
  1791. style="margin: 20px 0; width: 71.5% !important"
  1792. v-model="itemTools.toolDetail"
  1793. />
  1794. </div>
  1795. </div>
  1796. </div>
  1797. </div>
  1798. <span slot="footer" class="dialog-footer">
  1799. <el-button @click="dialogVisible4 = false">取 消</el-button>
  1800. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  1801. </span>
  1802. </el-dialog>
  1803. <el-dialog
  1804. title="添加问答"
  1805. :visible.sync="dialogVisible8"
  1806. :append-to-body="true"
  1807. width="500px"
  1808. :before-close="handleClose"
  1809. class="dialog_diy"
  1810. >
  1811. <div>
  1812. <div
  1813. class="a_add_title"
  1814. style="
  1815. display: flex;
  1816. flex-direction: column;
  1817. align-items: flex-start;
  1818. justify-content: center;
  1819. "
  1820. >
  1821. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  1822. <el-input
  1823. v-model="answerQ"
  1824. placeholder="请输入您要问的问题"
  1825. ></el-input>
  1826. </div>
  1827. </div>
  1828. <span slot="footer" class="dialog-footer">
  1829. <el-button @click="dialogVisible8 = false">取 消</el-button>
  1830. <el-button type="primary" @click="addAnswer">确 定</el-button>
  1831. </span>
  1832. </el-dialog>
  1833. </div>
  1834. </template>
  1835. <script>
  1836. import "../../common/aws-sdk-2.235.1.min.js";
  1837. import $ from "jquery";
  1838. import EditorBar from "../../components/tools/wangEnduit";
  1839. export default {
  1840. components: { EditorBar },
  1841. data() {
  1842. return {
  1843. checkAll: false,
  1844. checkedCities: [],
  1845. isIndeterminate: true,
  1846. steps: 1,
  1847. nbOrder: 0,
  1848. courseId: "",
  1849. chapToolsType: 0,
  1850. chapTools: [
  1851. {
  1852. tools: [],
  1853. toolDetail: "",
  1854. },
  1855. ],
  1856. line: "",
  1857. lineCount: 0,
  1858. lineType: 0,
  1859. chapCount: 0,
  1860. courseName: "",
  1861. isTeacherSee: false,
  1862. courseText: "",
  1863. formLabelWidth: "100px",
  1864. uploadLoading1: false,
  1865. noneBtnImg: false,
  1866. updateBoolean2: false,
  1867. unitIndex: 0,
  1868. taskCount: 0,
  1869. dialogVisible: false,
  1870. dialogVisible1: false,
  1871. dialogVisible2: false,
  1872. dialogVisible3: false,
  1873. dialogVisible4: false,
  1874. dialogVisible5: false,
  1875. dialogVisible6: false,
  1876. dialogVisible7: false,
  1877. dialogVisible8: false,
  1878. publicTool: 0,
  1879. searchPeople: "",
  1880. userid: this.$route.query.userid,
  1881. oid: this.$route.query.oid,
  1882. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  1883. cover: [], //课程封面
  1884. myWord: [],
  1885. askJson: {
  1886. askCount: 1,
  1887. askTitle: "",
  1888. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  1889. },
  1890. unitJson: [
  1891. {
  1892. dyName: "", //单元标题
  1893. chapterInfo: [
  1894. {
  1895. isread: false,
  1896. chapterid: this.guid(),
  1897. title: "",
  1898. courseName: "",
  1899. taskJson: [
  1900. {
  1901. task: "",
  1902. taskDetail: "",
  1903. chapterData: [],
  1904. toolText: "",
  1905. toolChoose: [
  1906. {
  1907. tool: [],
  1908. toolDetail: "",
  1909. toolType: 0,
  1910. askCount: 1,
  1911. askTitle: "",
  1912. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  1913. },
  1914. ],
  1915. isShowTools: false,
  1916. askCount: 1,
  1917. isFold: 0,
  1918. askTitle: "",
  1919. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  1920. checkJson: [{ checkCount: [], checkPerent: [] }],
  1921. homeworkList: [],
  1922. },
  1923. ],
  1924. itemCount: 1,
  1925. fileList1: [],
  1926. video: [],
  1927. testData: [],
  1928. pData: [],
  1929. templateArray: [],
  1930. },
  1931. ],
  1932. },
  1933. ],
  1934. studentJuri: [],
  1935. checkboxList: [],
  1936. number: "",
  1937. tTitle: "",
  1938. tdetail: "",
  1939. templateC: {},
  1940. AttText: {},
  1941. AttTextType: 0,
  1942. AttTextIndex: 0,
  1943. cTemplate: "",
  1944. CourseType: [],
  1945. CourseTypeJson: {},
  1946. courseTypeId: [],
  1947. courseTypeSon: [],
  1948. clearArray: [],
  1949. loading: false,
  1950. toolType: 0,
  1951. inputShow: true,
  1952. toolIndex: 0,
  1953. cidType: 0,
  1954. answerQ: "",
  1955. };
  1956. },
  1957. computed: {
  1958. offsetLetfPx: function () {
  1959. //addnum可以直接在模板语法里面用,相当于data内的值
  1960. return (
  1961. $(".cru_select")[this.unitIndex] &&
  1962. $(".cru_select")[this.unitIndex].offsetLeft
  1963. );
  1964. },
  1965. },
  1966. methods: {
  1967. handleCheckAllChange(val) {
  1968. this.checkedCities = val ? cityOptions : [];
  1969. this.isIndeterminate = false;
  1970. },
  1971. handleCheckedCitiesChange(value) {
  1972. let checkedCount = value.length;
  1973. this.checkAll = checkedCount === this.cities.length;
  1974. this.isIndeterminate =
  1975. checkedCount > 0 && checkedCount < this.cities.length;
  1976. },
  1977. addHw(e) {
  1978. var el = e.currentTarget;
  1979. el.getElementsByTagName("input")[0].click();
  1980. },
  1981. change(val) {
  1982. console.log(val);
  1983. },
  1984. handleClose(done) {
  1985. done();
  1986. },
  1987. imgChange1(file, fileList, type, itemTaskIndex) {
  1988. if (type == 1) {
  1989. var _tmp = this.cover;
  1990. } else if (
  1991. type == 2 ||
  1992. type == 3 ||
  1993. type == 6 ||
  1994. type == 7 ||
  1995. type == 8
  1996. ) {
  1997. var _tmp =
  1998. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  1999. .chapterData;
  2000. } else if (type == 4) {
  2001. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  2002. } else {
  2003. var _tmp =
  2004. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  2005. .homeworkList;
  2006. }
  2007. this.noneBtnImg = _tmp.length >= 1;
  2008. },
  2009. goTo(path) {
  2010. this.$router.push(path);
  2011. },
  2012. guid() {
  2013. var _num,
  2014. i,
  2015. _guid = "";
  2016. for (i = 0; i < 32; i++) {
  2017. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  2018. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  2019. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  2020. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  2021. _guid += "-";
  2022. }
  2023. }
  2024. return _guid;
  2025. },
  2026. lastSteps() {
  2027. if (this.steps == 4) {
  2028. this.goTo("/course?userid=" + this.userid + "&oid=" + this.oid);
  2029. } else {
  2030. if (this.cidType == 0) {
  2031. this.steps--;
  2032. } else {
  2033. if (this.steps == 3) {
  2034. this.steps = 1;
  2035. }
  2036. }
  2037. }
  2038. },
  2039. navSteps(s) {
  2040. if (this.cidType == 0) {
  2041. if (s == 1) {
  2042. this.steps = 1;
  2043. }
  2044. if (s == 2) {
  2045. this.steps = 2;
  2046. }
  2047. if (s == 3) {
  2048. this.cTemplate = this.templateC.content;
  2049. this.dialogVisible2 = false;
  2050. this.steps = 3;
  2051. }
  2052. } else {
  2053. if (s == 1) {
  2054. this.steps = 1;
  2055. }
  2056. if (s == 3) {
  2057. this.cTemplate = this.templateC.content;
  2058. this.dialogVisible2 = false;
  2059. this.steps = 3;
  2060. }
  2061. }
  2062. },
  2063. nextSteps() {
  2064. if (this.cidType == 1) {
  2065. if (this.steps == 1) {
  2066. if (this.courseName != "") {
  2067. this.steps = 3;
  2068. } else {
  2069. this.$message.error("请将信息填写完整");
  2070. return;
  2071. }
  2072. } else if (this.steps == 3) {
  2073. if (this.cid == "" || this.cid == undefined) {
  2074. if (this.courseName == "") {
  2075. this.$message.error("请将信息填写完整");
  2076. return;
  2077. } else {
  2078. this.addWork();
  2079. this.steps++;
  2080. }
  2081. } else {
  2082. if (this.courseName == "") {
  2083. this.$message.error("请将信息填写完整");
  2084. return;
  2085. } else {
  2086. this.updateWork();
  2087. this.steps++;
  2088. }
  2089. }
  2090. }
  2091. } else {
  2092. if (this.steps == 1) {
  2093. if (this.courseName != "") {
  2094. this.steps++;
  2095. } else {
  2096. this.$message.error("请将信息填写完整");
  2097. return;
  2098. }
  2099. } else if (this.steps == 2) {
  2100. if (this.templateC.id != "" || this.templateC.id != undefined) {
  2101. this.cTemplate = this.templateC.content;
  2102. }
  2103. this.dialogVisible2 = false;
  2104. this.steps++;
  2105. } else if (this.steps == 3) {
  2106. if (this.cid == "" || this.cid == undefined) {
  2107. if (this.courseName == "") {
  2108. this.$message.error("请将信息填写完整");
  2109. return;
  2110. } else {
  2111. this.addWork();
  2112. this.steps++;
  2113. }
  2114. } else {
  2115. if (this.courseName == "") {
  2116. this.$message.error("请将信息填写完整");
  2117. return;
  2118. } else {
  2119. this.updateWork();
  2120. this.steps++;
  2121. }
  2122. }
  2123. }
  2124. }
  2125. },
  2126. unitSet(i) {
  2127. this.unitIndex = i;
  2128. },
  2129. time() {
  2130. if (!this.now) {
  2131. this.now = new Date().getTime();
  2132. return true;
  2133. } else {
  2134. let time = new Date().getTime();
  2135. if (time - this.now > 3000) {
  2136. this.now = time;
  2137. return true;
  2138. } else {
  2139. return false;
  2140. }
  2141. }
  2142. },
  2143. deleteUnit(i) {
  2144. var _this = this;
  2145. if (_this.time()) {
  2146. _this
  2147. .$confirm("确定删除此单元吗?", "提示", {
  2148. confirmButtonText: "确定",
  2149. cancelButtonText: "取消",
  2150. type: "warning",
  2151. })
  2152. .then(() => {
  2153. _this.unitJson.splice(i, 1);
  2154. this.unitIndex = this.unitIndex - 1;
  2155. _this.$message.success("删除成功");
  2156. })
  2157. .catch(() => {
  2158. return;
  2159. });
  2160. }
  2161. },
  2162. deleteTool(itemTaskIndex, i) {
  2163. var _this = this;
  2164. if (_this.time()) {
  2165. _this
  2166. .$confirm("确定删除此工具吗?", "提示", {
  2167. confirmButtonText: "确定",
  2168. cancelButtonText: "取消",
  2169. type: "warning",
  2170. })
  2171. .then(() => {
  2172. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  2173. itemTaskIndex
  2174. ].toolChoose.splice(i, 1);
  2175. _this.$message.success("删除成功");
  2176. })
  2177. .catch(() => {
  2178. return;
  2179. });
  2180. }
  2181. },
  2182. deleteTask(i) {
  2183. var _this = this;
  2184. if (_this.time()) {
  2185. _this
  2186. .$confirm("确定删除此任务吗?", "提示", {
  2187. confirmButtonText: "确定",
  2188. cancelButtonText: "取消",
  2189. type: "warning",
  2190. })
  2191. .then(() => {
  2192. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  2193. i,
  2194. 1
  2195. );
  2196. _this.$message.success("删除成功");
  2197. })
  2198. .catch(() => {
  2199. return;
  2200. });
  2201. }
  2202. },
  2203. handlePictureCardPreview(file) {
  2204. this.dialogImageUrl = file.url;
  2205. },
  2206. clean(i, c) {
  2207. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  2208. },
  2209. handle_remove1(file, fileList, type) {
  2210. var _tmp = this.cover;
  2211. for (var i = 0, len = _tmp.length; i < len; i++) {
  2212. if (_tmp[i].uid == file.uid) {
  2213. _tmp.splice(i, 1);
  2214. break;
  2215. }
  2216. this.cover = _tmp;
  2217. }
  2218. this.noneBtnImg = _tmp.length >= 1;
  2219. },
  2220. addImg(e) {
  2221. var el = e.currentTarget;
  2222. el.getElementsByTagName("input")[0].click();
  2223. },
  2224. addChaptersTools(i) {
  2225. this.chapTools = [
  2226. {
  2227. tools: [],
  2228. toolDetail: "",
  2229. },
  2230. ];
  2231. this.chapCount = i;
  2232. this.dialogVisible4 = true;
  2233. },
  2234. isNoFinsh() {
  2235. this.$message.warning("功能正在开发中");
  2236. },
  2237. addAttText(i) {
  2238. this.AttText = {
  2239. title: "",
  2240. text: "",
  2241. };
  2242. this.taskCount = i;
  2243. this.AttTextType = 0;
  2244. this.$forceUpdate();
  2245. this.dialogVisible6 = true;
  2246. },
  2247. openLine(i) {
  2248. this.line = "";
  2249. this.lineCount = i;
  2250. this.lineType = 0;
  2251. this.$forceUpdate();
  2252. this.dialogVisible7 = true;
  2253. },
  2254. beforeUpload1(event, type) {
  2255. const loading = this.openLoading();
  2256. var file = event.file;
  2257. var credentials = {
  2258. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  2259. secretAccessKey: "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",
  2260. }; //秘钥形式的登录上传
  2261. window.AWS.config.update(credentials);
  2262. window.AWS.config.region = "cn-northwest-1"; //设置区域
  2263. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  2264. var _this = this;
  2265. if (file) {
  2266. var params = {
  2267. Key:
  2268. file.name.split(".")[0] +
  2269. new Date().getTime() +
  2270. "." +
  2271. file.name.split(".")[1],
  2272. ContentType: file.type,
  2273. Body: file,
  2274. "Access-Control-Allow-Credentials": "*",
  2275. ACL: "public-read",
  2276. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  2277. var options = {
  2278. partSize: 2048 * 1024 * 1024,
  2279. queueSize: 2,
  2280. leavePartsOnError: true,
  2281. };
  2282. bucket
  2283. .upload(params, options)
  2284. .on("httpUploadProgress", function (evt) {
  2285. //这里可以写进度条
  2286. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  2287. })
  2288. .send(function (err, data) {
  2289. loading.close();
  2290. if (err) {
  2291. var a = _this.$refs.upload1.uploadFiles;
  2292. a.splice(a.length - 1, a.length);
  2293. _this.$message.error("上传失败");
  2294. } else {
  2295. _this.cover.push({
  2296. name: file.name,
  2297. url: data.Location,
  2298. uid: file.uid,
  2299. });
  2300. _this.imgChange1(null, null, 1, null);
  2301. console.log(data.Location);
  2302. }
  2303. });
  2304. }
  2305. },
  2306. beforeUpload(data) {
  2307. this.$refs.upload1.uploadFiles;
  2308. this.uploadLoading1 = true;
  2309. var file = data.file;
  2310. var credentials = {
  2311. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  2312. secretAccessKey: "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",
  2313. }; //秘钥形式的登录上传
  2314. window.AWS.config.update(credentials);
  2315. window.AWS.config.region = "cn-northwest-1"; //设置区域
  2316. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  2317. var _this = this;
  2318. if (file) {
  2319. var params = {
  2320. Key:
  2321. file.name.split(".")[0] +
  2322. new Date().getTime() +
  2323. "." +
  2324. file.name.split(".")[1],
  2325. ContentType: file.type,
  2326. Body: file,
  2327. "Access-Control-Allow-Credentials": "*",
  2328. ACL: "public-read",
  2329. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  2330. var options = {
  2331. partSize: 2048 * 1024 * 1024,
  2332. queueSize: 2,
  2333. leavePartsOnError: true,
  2334. };
  2335. bucket
  2336. .upload(params, options)
  2337. .on("httpUploadProgress", function (evt) {
  2338. //这里可以写进度条
  2339. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  2340. })
  2341. .send(function (err, data) {
  2342. _this.uploadLoading1 = false;
  2343. if (err) {
  2344. var a = _this.$refs.upload1.uploadFiles;
  2345. a.splice(a.length - 1, a.length);
  2346. _this.$message.error("上传失败");
  2347. } else {
  2348. //上传成功处理
  2349. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  2350. name: file.name,
  2351. url: data.Location,
  2352. uid: file.uid,
  2353. });
  2354. _this.imgChange();
  2355. console.log(data.Location);
  2356. }
  2357. });
  2358. }
  2359. },
  2360. onExceed() {
  2361. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  2362. },
  2363. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  2364. const loading = this.openLoading();
  2365. var file = event.target.files[0];
  2366. this.inputShow = false;
  2367. var credentials = {
  2368. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  2369. secretAccessKey: "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",
  2370. }; //秘钥形式的登录上传
  2371. window.AWS.config.update(credentials);
  2372. window.AWS.config.region = "cn-northwest-1"; //设置区域
  2373. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  2374. var _this = this;
  2375. if (file) {
  2376. var params = {
  2377. Key:
  2378. file.name.split(".")[0] +
  2379. new Date().getTime() +
  2380. "." +
  2381. file.name.split(".")[1],
  2382. ContentType: file.type,
  2383. Body: file,
  2384. "Access-Control-Allow-Credentials": "*",
  2385. ACL: "public-read",
  2386. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  2387. var options = {
  2388. partSize: 2048 * 1024 * 1024,
  2389. queueSize: 2,
  2390. leavePartsOnError: true,
  2391. };
  2392. bucket
  2393. .upload(params, options)
  2394. .on("httpUploadProgress", function (evt) {
  2395. //这里可以写进度条
  2396. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  2397. })
  2398. .send(function (err, data) {
  2399. loading.close();
  2400. _this.inputShow = true;
  2401. if (err) {
  2402. var a = _this.$refs.upload1.uploadFiles;
  2403. a.splice(a.length - 1, a.length);
  2404. _this.$message.error("上传失败");
  2405. } else {
  2406. if (type == 2 || type == 3) {
  2407. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  2408. itemTaskIndex
  2409. ].chapterData.push({
  2410. name: file.name,
  2411. url: data.Location,
  2412. uid: file.uid,
  2413. type: type,
  2414. });
  2415. _this.imgChange1(null, null, type, itemTaskIndex);
  2416. } else if (type == 4) {
  2417. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  2418. itemTaskIndex
  2419. ].fileList1.push({
  2420. name: file.name,
  2421. url: data.Location,
  2422. uid: file.uid,
  2423. });
  2424. _this.imgChange1(null, null, type, itemTaskIndex);
  2425. } else if (type == 5) {
  2426. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  2427. itemTaskIndex
  2428. ].homeworkList.push({
  2429. name: file.name,
  2430. url: data.Location,
  2431. uid: file.uid,
  2432. });
  2433. _this.imgChange1(null, null, type, itemTaskIndex);
  2434. }
  2435. console.log(data.Location);
  2436. }
  2437. });
  2438. }
  2439. },
  2440. addunit() {
  2441. this.unitJson.push({
  2442. dyName: "", //单元标题
  2443. chapterInfo: [
  2444. {
  2445. isread: false,
  2446. chapterid: this.guid(),
  2447. title: "",
  2448. courseName: "",
  2449. taskJson: [
  2450. {
  2451. task: "",
  2452. taskDetail: "",
  2453. chapterData: [],
  2454. toolText: "",
  2455. toolChoose: [
  2456. {
  2457. tool: [],
  2458. toolDetail: "",
  2459. toolType: 0,
  2460. askCount: 1,
  2461. askTitle: "",
  2462. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  2463. },
  2464. ],
  2465. isShowTools: false,
  2466. askCount: 1,
  2467. isFold: 0,
  2468. askTitle: "",
  2469. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  2470. checkJson: [{ checkCount: [], checkPerent: [] }],
  2471. homeworkList: [],
  2472. },
  2473. ],
  2474. itemCount: 1,
  2475. fileList1: [],
  2476. video: [],
  2477. testData: [],
  2478. pData: [],
  2479. templateArray: [],
  2480. },
  2481. ],
  2482. });
  2483. setTimeout(() => {
  2484. this.unitIndex = this.unitJson.length - 1;
  2485. this.unitSet(this.unitIndex);
  2486. }, 0);
  2487. },
  2488. addToolFun(itemTaskIndex) {
  2489. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2490. itemTaskIndex
  2491. ].toolChoose.push({
  2492. tool: [],
  2493. toolDetail: "",
  2494. toolType: 0,
  2495. askCount: 1,
  2496. askTitle: "",
  2497. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  2498. });
  2499. },
  2500. addTaskBorder() {
  2501. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  2502. task: "",
  2503. taskDetail: "",
  2504. chapterData: [],
  2505. toolText: "",
  2506. toolChoose: [
  2507. {
  2508. tool: [],
  2509. toolDetail: "",
  2510. toolType: 0,
  2511. askCount: 1,
  2512. askTitle: "",
  2513. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  2514. },
  2515. ],
  2516. isShowTools: false,
  2517. askCount: 1,
  2518. isFold: 0,
  2519. askTitle: "",
  2520. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  2521. checkJson: [{ checkCount: [], checkPerent: [] }],
  2522. homeworkList: [],
  2523. });
  2524. },
  2525. add(e, i) {
  2526. var el = e.currentTarget;
  2527. el.getElementsByTagName("input")[0].click();
  2528. },
  2529. fold(i, e, type) {
  2530. var a = e.path[3];
  2531. var b = e.path[2];
  2532. if (type == 1) {
  2533. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  2534. a.className += " smallTaskBorder";
  2535. b.className += " funBlockTop";
  2536. } else {
  2537. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  2538. a.className = "taskBorder";
  2539. b.className = "funBlock";
  2540. }
  2541. console.log(e);
  2542. },
  2543. deleteHomeworkBox(unitIndex, index, i) {
  2544. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  2545. this.taskCount
  2546. ].homeworkList.splice(i, 1);
  2547. },
  2548. getStudent() {
  2549. let params = {
  2550. oid: this.oid,
  2551. cu: "",
  2552. cn: this.searchPeople,
  2553. };
  2554. this.ajax
  2555. .get(this.$store.state.api + "selectStudentAdd", params)
  2556. .then((res) => {
  2557. this.studentJuri = res.data[0];
  2558. })
  2559. .catch((err) => {
  2560. this.isLoading = false;
  2561. console.error(err);
  2562. });
  2563. },
  2564. searchStudent() {
  2565. this.getStudent();
  2566. },
  2567. getChapterData(e, i, j, ic, type) {
  2568. e.stopPropagation();
  2569. this.updataC = true;
  2570. this.icc = ic;
  2571. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  2572. console.log("还不能下载图片喔");
  2573. }
  2574. },
  2575. deleteChapterData(e, i, j, ic, taskI) {
  2576. e.stopPropagation();
  2577. this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(ic, 1);
  2578. },
  2579. updataVideoT(e, i, j, ic) {
  2580. e.stopPropagation();
  2581. this.unitJson[i].chapterInfo[j].taskJson[this.taskCount].chapterData[
  2582. ic
  2583. ].name = e.target.value;
  2584. },
  2585. upCd(e, i, j, ic) {
  2586. e.stopPropagation();
  2587. if (ic == 0) {
  2588. return;
  2589. }
  2590. var a =
  2591. this.unitJson[i].chapterInfo[j].taskJson[this.taskCount].chapterData[
  2592. ic - 1
  2593. ];
  2594. this.unitJson[i].chapterInfo[j].taskJson[this.taskCount].chapterData[
  2595. ic - 1
  2596. ] =
  2597. this.unitJson[i].chapterInfo[j].taskJson[this.taskCount].chapterData[
  2598. ic
  2599. ];
  2600. this.unitJson[i].chapterInfo[j].taskJson[this.taskCount].chapterData[ic] =
  2601. a;
  2602. },
  2603. downCd(e, i, j, ic) {
  2604. e.stopPropagation();
  2605. if (ic == this.unitJson[i].chapterInfo[j].chapterData.length - 1) {
  2606. return;
  2607. }
  2608. var a =
  2609. this.unitJson[i].chapterInfo[j].taskJson[this.taskCount].chapterData[
  2610. ic + 1
  2611. ];
  2612. this.unitJson[i].chapterInfo[j].taskJson[this.taskCount].chapterData[
  2613. ic + 1
  2614. ] =
  2615. this.unitJson[i].chapterInfo[j].taskJson[this.taskCount].chapterData[
  2616. ic
  2617. ];
  2618. this.unitJson[i].chapterInfo[j].taskJson[this.taskCount].chapterData[ic] =
  2619. a;
  2620. },
  2621. addWork() {
  2622. for (var i = 0; i < this.unitJson.length; i++) {
  2623. for (
  2624. var j = 0;
  2625. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  2626. j++
  2627. ) {
  2628. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  2629. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  2630. i
  2631. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  2632. return ele.value != "";
  2633. });
  2634. }
  2635. }
  2636. }
  2637. let params = [
  2638. {
  2639. uid: this.userid,
  2640. title: this.courseName,
  2641. brief: this.courseText.replace(/%/g, "%25"),
  2642. cover:
  2643. this.cover.length > 0
  2644. ? JSON.stringify(this.cover)
  2645. : JSON.stringify([
  2646. {
  2647. name: "noBanner.jpg",
  2648. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/noBanner1656409780264.jpg",
  2649. uid: 1656409780264,
  2650. status: "success",
  2651. },
  2652. ]),
  2653. astudent:
  2654. this.checkboxList.length > 0
  2655. ? JSON.stringify(this.checkboxList)
  2656. : [],
  2657. see: this.isTeacherSee == true ? 0 : 1,
  2658. chapters: JSON.stringify(this.unitJson),
  2659. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  2660. courseType: JSON.stringify(this.courseTypeId),
  2661. },
  2662. ];
  2663. this.ajax
  2664. .post(this.$store.state.api + "addWorkNew", params)
  2665. .then((res) => {
  2666. this.$message({
  2667. message: "新增成功",
  2668. type: "success",
  2669. });
  2670. this.number = res.data.ordernumber;
  2671. this.courseId = res.data.courseId;
  2672. this.islogin = true;
  2673. })
  2674. .catch((err) => {
  2675. this.$message.error("新增失败");
  2676. console.error(err);
  2677. });
  2678. },
  2679. goCourse() {
  2680. window.parent.postMessage({ cid: this.courseId, type: "1" }, "*");
  2681. },
  2682. updateWork() {
  2683. for (var i = 0; i < this.unitJson.length; i++) {
  2684. for (
  2685. var j = 0;
  2686. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  2687. j++
  2688. ) {
  2689. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  2690. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  2691. i
  2692. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  2693. return ele.value != "";
  2694. });
  2695. }
  2696. }
  2697. }
  2698. let params = [
  2699. {
  2700. cid: this.cid,
  2701. title: this.courseName,
  2702. brief: this.courseText.replace(/%/g, "%25"),
  2703. cover: this.cover.length > 0 ? JSON.stringify(this.cover) : "",
  2704. astudent:
  2705. this.checkboxList.length > 0
  2706. ? JSON.stringify(this.checkboxList)
  2707. : [],
  2708. see: this.isTeacherSee == true ? 0 : 1,
  2709. chapters: JSON.stringify(this.unitJson).replaceAll(/%/g,'%25'),
  2710. template: this.myWord != "undefined" ? this.myWord : [],
  2711. uid: this.userid,
  2712. courseType: JSON.stringify(this.courseTypeId),
  2713. },
  2714. ];
  2715. this.ajax
  2716. .post(this.$store.state.api + "updateWorkNew", params)
  2717. .then((res) => {
  2718. this.$message({
  2719. message: "修改成功",
  2720. type: "success",
  2721. });
  2722. this.number = this.nbOrder;
  2723. this.courseId = this.cid;
  2724. })
  2725. .catch((err) => {
  2726. this.$message.error("修改失败");
  2727. console.error(err);
  2728. });
  2729. },
  2730. guid() {
  2731. var _num,
  2732. i,
  2733. _guid = "";
  2734. for (i = 0; i < 32; i++) {
  2735. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  2736. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  2737. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  2738. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  2739. _guid += "-";
  2740. }
  2741. }
  2742. return _guid;
  2743. },
  2744. insertWord() {
  2745. this.dialogVisible1 = true;
  2746. this.updateBoolean2 = false;
  2747. this.tTitle = "";
  2748. this.tdetail = "";
  2749. },
  2750. addWord() {
  2751. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  2752. name: this.tTitle,
  2753. content: this.tdetail,
  2754. uid: this.guid(),
  2755. });
  2756. this.dialogVisible1 = false;
  2757. },
  2758. upWord() {},
  2759. selectWord(uid, i, c) {
  2760. this.dialogVisible1 = true;
  2761. this.updateBoolean2 = true;
  2762. if (
  2763. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  2764. ) {
  2765. this.tTitle =
  2766. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  2767. this.tdetail =
  2768. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  2769. }
  2770. },
  2771. isAddPP() {
  2772. if (this.checkboxList.length > 0) {
  2773. this.$message({
  2774. message: "添加成功",
  2775. type: "success",
  2776. });
  2777. this.dialogVisible3 = false;
  2778. } else {
  2779. this.$message({
  2780. message: "请添加课程成员",
  2781. type: "error",
  2782. });
  2783. }
  2784. },
  2785. getTemplate() {
  2786. this.ajax
  2787. .get(this.$store.state.api + "getCourseTemplateT", "")
  2788. .then((res) => {
  2789. this.templateArray = res.data[0];
  2790. })
  2791. .catch((err) => {});
  2792. },
  2793. clearChoose() {
  2794. this.clearArray.splice(this.templateC.id, 1);
  2795. this.dialogVisible2 = false;
  2796. },
  2797. clearAttText() {
  2798. this.AttText = {
  2799. title: "",
  2800. text: "",
  2801. };
  2802. this.dialogVisible6 = false;
  2803. },
  2804. clearLine() {
  2805. this.line = "";
  2806. this.dialogVisible7 = false;
  2807. },
  2808. checkTemplate(res) {
  2809. let _this = this;
  2810. _this
  2811. .$confirm("确定选择此模板吗?", "提示", {
  2812. confirmButtonText: "确定",
  2813. cancelButtonText: "取消",
  2814. type: "warning",
  2815. })
  2816. .then(() => {
  2817. _this.unitJson = JSON.parse(res.chapters);
  2818. _this.steps++;
  2819. })
  2820. .catch(() => {
  2821. return;
  2822. });
  2823. },
  2824. checkTemplate1(w) {
  2825. this.steps++;
  2826. },
  2827. checkTemplate2() {
  2828. let _this = this;
  2829. _this
  2830. .$confirm("确定选择空模板吗?", "提示", {
  2831. confirmButtonText: "确定",
  2832. cancelButtonText: "取消",
  2833. type: "warning",
  2834. })
  2835. .then(() => {
  2836. _this.unitJson = [
  2837. {
  2838. dyName: "", //单元标题
  2839. chapterInfo: [
  2840. {
  2841. isread: false,
  2842. chapterid: this.guid(),
  2843. title: "",
  2844. courseName: "",
  2845. taskJson: [
  2846. {
  2847. task: "",
  2848. taskDetail: "",
  2849. chapterData: [],
  2850. toolText: "",
  2851. toolChoose: [
  2852. {
  2853. tool: [],
  2854. toolDetail: "",
  2855. toolType: 0,
  2856. askCount: 1,
  2857. askTitle: "",
  2858. askJson: [
  2859. { askstitle: "", askItem: 1, checkList: [] },
  2860. ],
  2861. },
  2862. ],
  2863. isShowTools: false,
  2864. askCount: 1,
  2865. isFold: 0,
  2866. askTitle: "",
  2867. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  2868. checkJson: [{ checkCount: [], checkPerent: [] }],
  2869. homeworkList: [],
  2870. },
  2871. ],
  2872. itemCount: 1,
  2873. fileList1: [],
  2874. video: [],
  2875. testData: [],
  2876. pData: [],
  2877. templateArray: [],
  2878. },
  2879. ],
  2880. },
  2881. ];
  2882. this.steps++;
  2883. })
  2884. .catch(() => {
  2885. return;
  2886. });
  2887. },
  2888. wordNext() {
  2889. this.dialogVisible2 = false;
  2890. },
  2891. isAddOrUpdateAttText() {
  2892. if (this.AttTextType == 0) {
  2893. this.addAttTextMessage();
  2894. } else {
  2895. this.updateAttText();
  2896. }
  2897. },
  2898. isAddOrUpdateLine() {
  2899. if (this.lineType == 0) {
  2900. this.addLine();
  2901. } else {
  2902. this.updateLine();
  2903. }
  2904. },
  2905. addAttTextMessage() {
  2906. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2907. this.taskCount
  2908. ].chapterData.push({
  2909. name: this.AttText.title,
  2910. url: this.AttText.text,
  2911. type: 6,
  2912. });
  2913. this.imgChange1(null, null, 6, this.taskCount);
  2914. this.dialogVisible6 = false;
  2915. },
  2916. selectAttText(itemTaskIndex, i) {
  2917. this.AttText.title =
  2918. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2919. itemTaskIndex
  2920. ].chapterData[i].name;
  2921. this.AttText.text =
  2922. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2923. itemTaskIndex
  2924. ].chapterData[i].url;
  2925. this.taskCount = itemTaskIndex;
  2926. this.AttTextIndex = i;
  2927. this.AttTextType = 1;
  2928. this.dialogVisible6 = true;
  2929. },
  2930. updateAttText() {
  2931. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2932. this.taskCount
  2933. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  2934. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2935. this.taskCount
  2936. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  2937. this.dialogVisible6 = false;
  2938. },
  2939. addLine() {
  2940. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2941. this.lineCount
  2942. ].chapterData.push({
  2943. name: "链接",
  2944. url: this.line,
  2945. type: 8,
  2946. });
  2947. this.imgChange1(null, null, 8, this.lineCount);
  2948. this.dialogVisible7 = false;
  2949. },
  2950. selectLine(itemTaskIndex, i) {
  2951. this.line =
  2952. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2953. itemTaskIndex
  2954. ].chapterData[i].url;
  2955. this.taskCount = itemTaskIndex;
  2956. this.lineCount = i;
  2957. this.lineType = 1;
  2958. this.dialogVisible7 = true;
  2959. },
  2960. updateLine() {
  2961. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2962. this.taskCount
  2963. ].chapterData[this.lineCount].url = this.line;
  2964. this.dialogVisible7 = false;
  2965. },
  2966. addPP() {
  2967. this.dialogVisible3 = true;
  2968. },
  2969. goTo(path) {
  2970. this.$router.push(path);
  2971. },
  2972. openTools(itemTaskIndex, i, toolIndex) {
  2973. this.toolIndex = toolIndex;
  2974. this.taskCount = itemTaskIndex;
  2975. if (i == 4) {
  2976. if (toolIndex == null) {
  2977. var a =
  2978. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  2979. .chapterData;
  2980. for (var i = 0; i < a.length; i++) {
  2981. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  2982. this.askJson =
  2983. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2984. itemTaskIndex
  2985. ].chapterData[i].askJson;
  2986. }
  2987. }
  2988. } else {
  2989. this.askJson = JSON.parse(
  2990. JSON.stringify(
  2991. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  2992. itemTaskIndex
  2993. ].toolChoose[toolIndex]
  2994. )
  2995. );
  2996. }
  2997. this.dialogVisible5 = true;
  2998. } else if (i == 15) {
  2999. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3000. itemTaskIndex
  3001. ].toolChoose[toolIndex].answerQ
  3002. ? JSON.parse(
  3003. JSON.stringify(
  3004. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3005. itemTaskIndex
  3006. ].toolChoose[toolIndex].answerQ
  3007. )
  3008. )
  3009. : "";
  3010. this.dialogVisible8 = true;
  3011. }
  3012. },
  3013. chapAddTools(i) {
  3014. if (this.chapTools[0].tools.length == 0) {
  3015. this.chapTools[0].tools.push(i);
  3016. } else {
  3017. if (this.chapTools[0].tools.indexOf(i) != -1) {
  3018. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  3019. } else {
  3020. this.chapTools[0].tools.push(i);
  3021. }
  3022. }
  3023. this.$forceUpdate();
  3024. },
  3025. addChaptersDataTools() {
  3026. if (this.chapTools[0].tools.indexOf(4) != -1) {
  3027. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3028. this.chapCount
  3029. ].chapterData.push({
  3030. name: this.chapTools[0].toolDetail,
  3031. url: this.chapTools[0].tools,
  3032. type: 7,
  3033. askJson: this.askJson,
  3034. });
  3035. } else {
  3036. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3037. this.chapCount
  3038. ].chapterData.push({
  3039. name: this.chapTools[0].toolDetail,
  3040. url: this.chapTools[0].tools,
  3041. type: 7,
  3042. });
  3043. }
  3044. this.imgChange1(null, null, 7, this.chapCount);
  3045. this.dialogVisible4 = false;
  3046. },
  3047. addTools(i, itemTaskIndex, toolIndex) {
  3048. // if (
  3049. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  3050. // .toolChoose[toolIndex].tool.length == 0
  3051. // ) {
  3052. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3053. // itemTaskIndex
  3054. // ].toolChoose[toolIndex].tool.push(i);
  3055. // } else {
  3056. // if (
  3057. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3058. // itemTaskIndex
  3059. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  3060. // ) {
  3061. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3062. // itemTaskIndex
  3063. // ].toolChoose[toolIndex].tool.splice(
  3064. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3065. // itemTaskIndex
  3066. // ].toolChoose[toolIndex].tool.indexOf(i),
  3067. // 1
  3068. // );
  3069. // } else {
  3070. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3071. // itemTaskIndex
  3072. // ].toolChoose[toolIndex].tool.push(i);
  3073. // }
  3074. // console.log(
  3075. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  3076. // .toolChoose[toolIndex].tool
  3077. // );
  3078. // }
  3079. if (i == 4) {
  3080. if (
  3081. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  3082. .toolChoose[toolIndex].askJson.askTitle == "" ||
  3083. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  3084. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  3085. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  3086. .toolChoose[toolIndex].askJson[0].checkList < 2
  3087. ) {
  3088. this.$message({
  3089. message: "请填写完整问卷内容",
  3090. type: "error",
  3091. });
  3092. return;
  3093. }
  3094. }
  3095. if (i == 15) {
  3096. if (
  3097. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  3098. .toolChoose[toolIndex].answerQ ||
  3099. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  3100. .toolChoose[toolIndex].answerQ == ""
  3101. ) {
  3102. this.$message({
  3103. message: "请填写问答内容",
  3104. type: "error",
  3105. });
  3106. return;
  3107. }
  3108. }
  3109. if (
  3110. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  3111. .toolChoose[toolIndex].tool.length > 0
  3112. ) {
  3113. if (
  3114. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3115. itemTaskIndex
  3116. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  3117. ) {
  3118. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3119. itemTaskIndex
  3120. ].toolChoose[toolIndex].tool.splice(
  3121. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3122. itemTaskIndex
  3123. ].toolChoose[toolIndex].tool.indexOf(i),
  3124. 1
  3125. );
  3126. } else {
  3127. this.$message({
  3128. message: "每个工具只能添加一个",
  3129. type: "error",
  3130. });
  3131. }
  3132. } else {
  3133. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3134. itemTaskIndex
  3135. ].toolChoose[toolIndex].tool.push(i);
  3136. }
  3137. this.$forceUpdate();
  3138. },
  3139. addAskList() {
  3140. this.askJson.askJson.push({
  3141. askstitle: "",
  3142. askItem: 1,
  3143. checkList: [],
  3144. });
  3145. this.askJson.askCount++;
  3146. },
  3147. deleteAskList() {
  3148. this.askJson.askJson.splice(-1);
  3149. this.askJson.askCount--;
  3150. },
  3151. addcheckList(json) {
  3152. json.checkList.length++;
  3153. json.askItem++;
  3154. },
  3155. deletecheckList(json) {
  3156. json.checkList.length--;
  3157. json.askItem--;
  3158. },
  3159. addAsk() {
  3160. if (this.askJson.askTitle === "") {
  3161. this.$message.error("问卷调查标题不能为空!");
  3162. return;
  3163. }
  3164. var aj = this.askJson.askJson;
  3165. var b = 1;
  3166. for (var i = 0; i < aj.length; i++) {
  3167. if (aj[i].askstitle === "") {
  3168. var a = 1;
  3169. for (let index = 0; index < aj[i].askItem; index++) {
  3170. const element = aj[i].checkList[index]
  3171. ? aj[i].checkList[index]
  3172. : "";
  3173. if (element != "") {
  3174. b++;
  3175. this.$message.error("填写了问卷调查选项,问卷调查题目不能为空!");
  3176. return;
  3177. } else {
  3178. a++;
  3179. }
  3180. }
  3181. if (b == 1) {
  3182. this.$message.error("至少填写一个问题");
  3183. return;
  3184. }
  3185. } else if (aj[i].askstitle != "") {
  3186. for (let index = 0; index < aj[i].askItem; index++) {
  3187. const element = aj[i].checkList[index]
  3188. ? aj[i].checkList[index]
  3189. : "";
  3190. var index = 0;
  3191. for (var z = 0; z < aj[i].checkList.length; z++) {
  3192. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  3193. if (checkC != "") {
  3194. index++;
  3195. } else {
  3196. this.$message.error("问卷调查选项不能为空!");
  3197. return;
  3198. }
  3199. }
  3200. b++;
  3201. if (index < 2) {
  3202. this.$message.error(
  3203. "填写了问卷调查的题目,问卷调查选项至少要有两项!"
  3204. );
  3205. return;
  3206. }
  3207. }
  3208. }
  3209. }
  3210. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  3211. var elc = el.checkList.filter((element) => {
  3212. return element != "";
  3213. });
  3214. return el.askstitle != "" && elc.length != 0;
  3215. });
  3216. if (!this.dialogVisible4) {
  3217. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3218. this.taskCount
  3219. ].toolChoose[this.toolIndex] = this.askJson;
  3220. }
  3221. this.dialogVisible5 = false;
  3222. },
  3223. addAnswer() {
  3224. if (this.answerQ == "") {
  3225. this.$message.error("请输入您想要问的问题");
  3226. return;
  3227. }
  3228. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  3229. this.taskCount
  3230. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  3231. this.dialogVisible8 = false;
  3232. },
  3233. selectCourseDetail() {
  3234. if (this.cid == "" || this.cid == undefined) {
  3235. console.log("这是新增课程");
  3236. } else {
  3237. this.cidType = 1;
  3238. let params = {
  3239. cid: this.cid,
  3240. };
  3241. this.ajax
  3242. .get(this.$store.state.api + "select_course_detail", params)
  3243. .then((res) => {
  3244. this.loading = true;
  3245. this.unitJson = JSON.parse(res.data[0][0].chapters);
  3246. for (var j in this.unitJson) {
  3247. for (var i in this.unitJson[j].chapterInfo) {
  3248. this.unitJson[j].chapterInfo[i].taskJson[
  3249. this.taskCount
  3250. ].toolChoose = this.unitJson[j].chapterInfo[i].taskJson[
  3251. this.taskCount
  3252. ].toolChoose
  3253. ? this.unitJson[j].chapterInfo[i].taskJson[this.taskCount]
  3254. .toolChoose
  3255. : [];
  3256. }
  3257. }
  3258. this.courseName = res.data[0][0].title;
  3259. this.courseText = res.data[0][0].brief;
  3260. this.cover = JSON.parse(res.data[0][0].cover);
  3261. this.noneBtnImg = this.cover.length >= 1;
  3262. this.checkboxList =
  3263. res.data[0][0].course_student.length > 0
  3264. ? JSON.parse(res.data[0][0].course_student)
  3265. : [];
  3266. this.isTeacherSee =
  3267. res.data[0][0].is_teacher_look == 0 ? true : false;
  3268. this.myWord = res.data[0][0].template;
  3269. this.templateC.id = "123";
  3270. this.nbOrder = res.data[0][0].ordernumber;
  3271. for (var i = 0; i < res.data[1].length; i++) {
  3272. this.courseTypeId.push(res.data[1][i].typeid);
  3273. }
  3274. console.log(this.courseTypeId);
  3275. this.$forceUpdate();
  3276. })
  3277. .catch((err) => {
  3278. console.error(err);
  3279. });
  3280. }
  3281. },
  3282. getTypeName() {
  3283. console.log(this.courseTypeId);
  3284. this.$forceUpdate();
  3285. },
  3286. selectType() {
  3287. this.ajax
  3288. .get(this.$store.state.api + "selectType")
  3289. .then((res) => {
  3290. this.CourseType = res.data;
  3291. for (var i = 0; i < res.data[0].length; i++) {
  3292. if (!this.cid) {
  3293. this.courseTypeId[res.data[0][i].id] = "";
  3294. }
  3295. for (var j = 0; j < res.data[1].length; j++) {
  3296. if (res.data[0][i].id == res.data[1][j].pid) {
  3297. if (!this.CourseTypeJson[res.data[0][i].id]) {
  3298. this.CourseTypeJson[res.data[0][i].id] = [];
  3299. }
  3300. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  3301. }
  3302. }
  3303. }
  3304. })
  3305. .catch((err) => {
  3306. console.error(err);
  3307. });
  3308. },
  3309. /*添加评价 */
  3310. addEList(index, tIndex) {
  3311. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  3312. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  3313. value: "",
  3314. detail: "",
  3315. score: 5,
  3316. })
  3317. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  3318. { value: "", detail: "", score: 5 },
  3319. ]);
  3320. this.$forceUpdate();
  3321. },
  3322. deletEList(index, tIndex, eIndex) {
  3323. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  3324. eIndex,
  3325. 1
  3326. );
  3327. this.$forceUpdate();
  3328. },
  3329. setEListStar() {
  3330. this.$forceUpdate();
  3331. },
  3332. },
  3333. created() {
  3334. this.getStudent();
  3335. this.getTemplate();
  3336. this.selectType();
  3337. this.loading = false;
  3338. setTimeout(() => {
  3339. this.selectCourseDetail();
  3340. }, 500);
  3341. },
  3342. };
  3343. </script>
  3344. <style scoped>
  3345. .dialog_diy >>> .el-dialog__header {
  3346. background: #3d67bc !important;
  3347. padding: 15px 20px;
  3348. }
  3349. .dialog_diy >>> .el-dialog__title {
  3350. color: #fff;
  3351. }
  3352. .dialog_diy >>> .el-dialog__headerbtn {
  3353. top: 19px;
  3354. }
  3355. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
  3356. color: #fff;
  3357. }
  3358. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
  3359. color: #fff;
  3360. }
  3361. .dialog_diy >>> .el-dialog__body,
  3362. .dialog_diy >>> .el-dialog__footer {
  3363. background: #fafafa;
  3364. }
  3365. .left {
  3366. border-right: 1px solid rgb(60, 94, 143);
  3367. display: flex;
  3368. flex-direction: column;
  3369. align-items: center;
  3370. min-height: 600px;
  3371. width: 385px;
  3372. height: 80%;
  3373. }
  3374. .tips {
  3375. color: rgb(128, 128, 128);
  3376. font-size: 12px;
  3377. width: 270px;
  3378. margin: 40px;
  3379. }
  3380. .pb_content {
  3381. height: auto !important;
  3382. margin: 0 20px 0 20px;
  3383. }
  3384. .pb_content_body {
  3385. width: 100% !important;
  3386. height: 100%;
  3387. }
  3388. .info_solid {
  3389. width: 270px;
  3390. height: 30px;
  3391. border-left: 1px solid #bdbdbd;
  3392. margin: 10px 0px 10px 30px;
  3393. }
  3394. .info_steps {
  3395. width: 270px;
  3396. font-size: 0.875rem;
  3397. display: flex;
  3398. align-items: center;
  3399. }
  3400. .info_steps span:nth-child(1) {
  3401. width: 30px;
  3402. height: 30px;
  3403. background: rgba(0, 0, 0, 0.38);
  3404. display: block;
  3405. color: #fff;
  3406. border-radius: 40px;
  3407. text-align: center;
  3408. line-height: 30px;
  3409. }
  3410. .steps_active {
  3411. background: #3d67bc !important;
  3412. }
  3413. .info_steps span:nth-child(2) {
  3414. margin-left: 5px;
  3415. }
  3416. .right {
  3417. height: 100%;
  3418. width: 100%;
  3419. }
  3420. .basic_box {
  3421. width: 90%;
  3422. margin: 0 auto;
  3423. position: relative;
  3424. }
  3425. .basic_box_success {
  3426. width: 80%;
  3427. min-height: 455px;
  3428. margin: 50px auto;
  3429. position: relative;
  3430. text-align: center;
  3431. border-bottom: 1px solid #bfbfbf;
  3432. }
  3433. .info_title {
  3434. font-size: 1.5em;
  3435. margin: 20px 30px 20px 30px;
  3436. }
  3437. .bInfo_title {
  3438. font-size: 20px;
  3439. text-align: left;
  3440. margin-top: 20px;
  3441. margin-bottom: 10px;
  3442. font-weight: 700;
  3443. }
  3444. .small_title {
  3445. font-size: 14px;
  3446. line-height: 40px;
  3447. }
  3448. .binfo_input {
  3449. font: inherit;
  3450. color: currentColor;
  3451. width: 100%;
  3452. margin: 0;
  3453. padding: 15px 14px;
  3454. display: block;
  3455. min-width: 0;
  3456. outline: none;
  3457. box-sizing: content-box;
  3458. background: none;
  3459. -webkit-tap-highlight-color: transparent;
  3460. border: 1px solid rgba(0, 0, 0, 0.23);
  3461. border-radius: 4px;
  3462. box-sizing: border-box;
  3463. resize: none;
  3464. }
  3465. .binfo_input:focus-visible {
  3466. border: 1px solid rgba(61, 103, 188);
  3467. }
  3468. .chapter_beizhu {
  3469. font-size: 12px;
  3470. font-weight: bold;
  3471. float: right;
  3472. color: rgb(128, 128, 128);
  3473. margin-top: 5px;
  3474. }
  3475. .chapter_uploadBox1 {
  3476. text-align: left;
  3477. background-color: rgb(242, 242, 242);
  3478. width: 100%;
  3479. height: 67px;
  3480. padding: 0px 15px;
  3481. border-radius: 8px;
  3482. overflow: hidden;
  3483. font-size: 16px;
  3484. box-sizing: border-box;
  3485. position: relative;
  3486. }
  3487. .chapter_add {
  3488. width: 100%;
  3489. height: 32px;
  3490. margin-top: 15px;
  3491. cursor: pointer;
  3492. }
  3493. .chapter_add_l {
  3494. margin-left: 5px;
  3495. width: 30px;
  3496. height: 30px;
  3497. float: left;
  3498. border: 1px solid #aaa;
  3499. color: #aaa;
  3500. border-radius: 50%;
  3501. font-size: 25px;
  3502. text-align: center;
  3503. }
  3504. .chapter_add_r {
  3505. font-size: 18px;
  3506. height: 40px;
  3507. line-height: 30px;
  3508. text-indent: 10px;
  3509. color: #aaa;
  3510. }
  3511. .chapter_add_r span {
  3512. font-size: 12px;
  3513. color: rgb(204, 204, 204);
  3514. }
  3515. .chapter_add_input {
  3516. display: none;
  3517. }
  3518. .line {
  3519. width: 85%;
  3520. margin: 0 auto;
  3521. border-top: 1px solid #e5e5e5;
  3522. margin-top: 20px;
  3523. }
  3524. .info_btnBox {
  3525. width: 100%;
  3526. display: flex;
  3527. justify-content: space-evenly;
  3528. margin: 20px 0 25px 0;
  3529. }
  3530. .info_btn,
  3531. .teacherWord {
  3532. color: #fff;
  3533. background-color: #6a8ed5;
  3534. padding: 8px 24px;
  3535. font-size: 0.9375rem;
  3536. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  3537. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  3538. min-width: 64px;
  3539. font-weight: 500;
  3540. border-radius: 4px;
  3541. box-sizing: border-box;
  3542. border: none;
  3543. cursor: pointer;
  3544. }
  3545. .teacherWord {
  3546. width: 105px !important;
  3547. text-align: center !important;
  3548. line-height: 36px !important;
  3549. padding: 0 !important;
  3550. font-size: 14px !important;
  3551. margin: 10px 0 !important;
  3552. }
  3553. .wordTeacher {
  3554. display: flex;
  3555. flex-direction: column;
  3556. width: 20%;
  3557. text-align: center;
  3558. font-size: 14px;
  3559. margin: 30px 30px 0 10px;
  3560. background: #fff;
  3561. position: relative;
  3562. border-radius: 5px;
  3563. padding: 25px 0px;
  3564. }
  3565. .wordPic {
  3566. margin: 0 auto;
  3567. width: 60px;
  3568. height: 60px;
  3569. cursor: pointer;
  3570. }
  3571. .deleteWord {
  3572. width: 22px;
  3573. height: 22px;
  3574. position: absolute;
  3575. right: 20px;
  3576. top: -10px;
  3577. cursor: pointer;
  3578. }
  3579. .wordPic > img,
  3580. .deleteWord > img,
  3581. .addToolImg > img {
  3582. width: 100%;
  3583. height: 100%;
  3584. }
  3585. .info_btn:hover {
  3586. background-color: #4f7cd5 !important;
  3587. }
  3588. .cru_selectBox {
  3589. display: flex;
  3590. margin: 24px 0 10px;
  3591. flex-wrap: nowrap;
  3592. white-space: nowrap;
  3593. overflow: auto;
  3594. position: relative;
  3595. height: 47px;
  3596. }
  3597. .cru_selectBox::-webkit-scrollbar {
  3598. /*滚动条整体样式*/
  3599. width: 6px;
  3600. /*高宽分别对应横竖滚动条的尺寸*/
  3601. height: 6px;
  3602. }
  3603. /*定义滚动条轨道 内阴影+圆角*/
  3604. .cru_selectBox::-webkit-scrollbar-track {
  3605. border-radius: 10px;
  3606. background-color: #eee;
  3607. }
  3608. /*定义滑块 内阴影+圆角*/
  3609. .cru_selectBox::-webkit-scrollbar-thumb {
  3610. border-radius: 10px;
  3611. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  3612. background-color: rgba(0, 0, 0, 0.1);
  3613. }
  3614. .cru_line {
  3615. position: absolute;
  3616. bottom: 0px;
  3617. transition: all 0.5s;
  3618. left: 0px;
  3619. width: 125px;
  3620. margin-left: -25px;
  3621. }
  3622. .cru_select {
  3623. font-size: 21px;
  3624. margin-right: 37px;
  3625. margin-left: 5px;
  3626. cursor: pointer;
  3627. color: #a6a6a6;
  3628. }
  3629. .cru_selected {
  3630. color: #0b7fc2 !important;
  3631. }
  3632. .chapter_contentbox {
  3633. display: flex;
  3634. align-items: center;
  3635. margin-top: 15px;
  3636. }
  3637. .chapter_contentbox div:nth-child(1) {
  3638. width: 150px;
  3639. margin: 0px;
  3640. font-size: 2em;
  3641. color: black;
  3642. display: block;
  3643. white-space: nowrap;
  3644. overflow: hidden;
  3645. text-overflow: ellipsis;
  3646. font-weight: 600;
  3647. }
  3648. .chapter_contentbox div:nth-child(2) {
  3649. width: 380px;
  3650. }
  3651. .chapter_contentbox div:nth-child(3),
  3652. .remove {
  3653. background-image: url(../../assets/remove.png);
  3654. cursor: pointer;
  3655. opacity: 0.5;
  3656. width: 40px;
  3657. height: 50px;
  3658. background-repeat: no-repeat;
  3659. background-position: 5px 10px;
  3660. }
  3661. .binfo_input {
  3662. font: inherit;
  3663. color: currentColor;
  3664. width: 100%;
  3665. margin: 0;
  3666. padding: 15px 14px;
  3667. display: block;
  3668. min-width: 0;
  3669. outline: none;
  3670. box-sizing: content-box;
  3671. background: none;
  3672. border: 1px solid rgba(0, 0, 0, 0.23);
  3673. border-radius: 4px;
  3674. box-sizing: border-box;
  3675. background: #fff;
  3676. }
  3677. .binfo_input:focus-visible {
  3678. border: 1px solid rgba(61, 103, 188);
  3679. }
  3680. .time {
  3681. display: flex;
  3682. margin: 35px 0 80px 0;
  3683. }
  3684. .chapter_btnbox {
  3685. width: 160px;
  3686. border-radius: 5px;
  3687. border: 2px dashed gray;
  3688. display: flex;
  3689. padding: 8px 50px;
  3690. align-items: center;
  3691. justify-content: center;
  3692. margin: 30px auto 0;
  3693. cursor: pointer;
  3694. }
  3695. .icon_add {
  3696. position: relative;
  3697. width: 24px;
  3698. padding-top: 20px;
  3699. border-radius: 100%;
  3700. border-width: 2px;
  3701. border-style: solid;
  3702. border-color: gray;
  3703. }
  3704. .icon_add i:nth-child(1) {
  3705. position: absolute;
  3706. left: 50%;
  3707. top: 50%;
  3708. height: 60%;
  3709. transform: translate(-50%, -50%);
  3710. border-width: 1px;
  3711. border-style: solid;
  3712. border-color: inherit;
  3713. }
  3714. .icon_add i:nth-child(2) {
  3715. position: absolute;
  3716. top: 50%;
  3717. left: 50%;
  3718. width: 60%;
  3719. transform: translate(-50%, -50%);
  3720. border-width: 1px;
  3721. border-style: solid;
  3722. border-color: inherit;
  3723. }
  3724. .chapter_btn_w {
  3725. font-size: 0.9375rem;
  3726. font-weight: bold;
  3727. color: gray;
  3728. margin-left: 20px;
  3729. }
  3730. .disUoloadSty >>> .el-icon-plus {
  3731. display: none !important; /* 上传按钮隐藏 */
  3732. }
  3733. .imgLeft {
  3734. margin: 15px 0;
  3735. }
  3736. .add_info_box {
  3737. margin: 20px 0;
  3738. }
  3739. .add_info_box button {
  3740. margin: 0 10px 10px 0;
  3741. }
  3742. .add_chapters_box {
  3743. text-align: left;
  3744. background-color: rgb(232 234 237);
  3745. width: 100%;
  3746. padding: 0px 15px;
  3747. border-radius: 15px;
  3748. font-size: 16px;
  3749. box-sizing: border-box;
  3750. position: relative;
  3751. padding: 0 10px 5px 10px;
  3752. height: 185px;
  3753. overflow-y: auto;
  3754. overflow-x: hidden;
  3755. }
  3756. .homework_box {
  3757. display: flex;
  3758. align-items: flex-start;
  3759. flex-wrap: wrap;
  3760. margin: 15px 0 0 0;
  3761. flex-direction: column;
  3762. align-content: flex-start;
  3763. }
  3764. .course_homework {
  3765. display: flex;
  3766. justify-content: center;
  3767. flex-direction: row;
  3768. align-items: center;
  3769. margin: 0 10px 0 0;
  3770. }
  3771. .course_homework >>> .el-input__inner {
  3772. width: 140px;
  3773. margin-left: 15px;
  3774. }
  3775. .chapter_upload_move {
  3776. position: relative;
  3777. background-color: #fff;
  3778. position: absolute;
  3779. width: 100%;
  3780. top: 0px;
  3781. left: 0px;
  3782. border: 1px solid #eee;
  3783. border-radius: 5px;
  3784. transition: width 2s;
  3785. -moz-transition: width 2s;
  3786. -webkit-transition: width 2s;
  3787. -o-transition: width 2s;
  3788. }
  3789. .chapter_upload_l_i {
  3790. background-image: url("../../assets/icon.png");
  3791. background-position: 3px -165px;
  3792. width: 30px;
  3793. height: 30px;
  3794. margin: 10px auto 0 auto;
  3795. }
  3796. .left_first {
  3797. display: flex;
  3798. flex-direction: column;
  3799. flex-wrap: nowrap;
  3800. width: 65%;
  3801. }
  3802. .right_first {
  3803. width: 100%;
  3804. height: 100%;
  3805. margin-top: 15px;
  3806. }
  3807. .right_title {
  3808. height: 30px;
  3809. padding: 20px 0 10px 30px;
  3810. border-bottom: 1px solid #f2f2f2;
  3811. font-size: 1.5em;
  3812. font-weight: bold;
  3813. }
  3814. .people {
  3815. border: 1px solid rgb(229 229 229);
  3816. height: 495px;
  3817. border-radius: 5px;
  3818. width: 100%;
  3819. overflow: auto;
  3820. }
  3821. .people_top {
  3822. display: flex;
  3823. width: 100%;
  3824. justify-content: space-between;
  3825. align-items: center;
  3826. }
  3827. .people_nav,
  3828. .people_top_right {
  3829. padding: 20px 0 0 20px;
  3830. }
  3831. .people_search {
  3832. display: flex;
  3833. position: relative;
  3834. }
  3835. .people_search >>> .el-input__inner {
  3836. height: 25px;
  3837. width: 95%;
  3838. }
  3839. .search_img {
  3840. width: 20px;
  3841. height: 20px;
  3842. position: absolute;
  3843. right: 15px;
  3844. top: 3px;
  3845. }
  3846. .search_img > img {
  3847. width: 100%;
  3848. height: 100%;
  3849. }
  3850. .people_name {
  3851. display: flex;
  3852. justify-content: flex-start;
  3853. padding: 20px 0 0 25px;
  3854. flex-direction: column;
  3855. flex-wrap: wrap;
  3856. }
  3857. .people_name >>> .el-checkbox {
  3858. width: 100%;
  3859. display: flex;
  3860. align-items: center;
  3861. margin-bottom: 10px;
  3862. }
  3863. .people_name >>> .el-checkbox__label {
  3864. text-overflow: ellipsis;
  3865. overflow: hidden;
  3866. width: 100%;
  3867. }
  3868. .right_img {
  3869. width: 150px;
  3870. height: 150px;
  3871. margin: 0 auto;
  3872. }
  3873. .right_img > img {
  3874. width: 100%;
  3875. height: 100%;
  3876. }
  3877. .number {
  3878. margin-top: 20px;
  3879. color: #4aa6ff;
  3880. text-decoration: underline;
  3881. }
  3882. .success_button {
  3883. display: flex;
  3884. text-align: center;
  3885. margin: 5% 0 auto;
  3886. flex-direction: row;
  3887. justify-content: center;
  3888. }
  3889. .look_course {
  3890. margin-right: 40px;
  3891. background: #3d67bc;
  3892. width: 200px;
  3893. height: 35px;
  3894. line-height: 35px;
  3895. color: #fff;
  3896. text-align: center;
  3897. font-size: 14px;
  3898. border-radius: 5px;
  3899. cursor: pointer;
  3900. }
  3901. .attend_others {
  3902. width: 250px;
  3903. background: #4fb13c;
  3904. height: 35px;
  3905. line-height: 35px;
  3906. color: #fff;
  3907. text-align: center;
  3908. font-size: 14px;
  3909. border-radius: 5px;
  3910. cursor: pointer;
  3911. }
  3912. .dialog_diy2 >>> .el-dialog__body {
  3913. text-align: center;
  3914. }
  3915. .write_togother {
  3916. position: absolute;
  3917. right: 45px;
  3918. display: flex;
  3919. top: 5%;
  3920. }
  3921. .write_people {
  3922. font-size: 14px;
  3923. line-height: 50px;
  3924. padding-right: 10px;
  3925. }
  3926. .end_write {
  3927. background: #3d67bc;
  3928. color: #fff;
  3929. width: 100px;
  3930. height: 35px;
  3931. line-height: 35px;
  3932. text-align: center;
  3933. font-size: 14px;
  3934. border-radius: 5px;
  3935. cursor: pointer;
  3936. }
  3937. .chapter_upload {
  3938. height: 50px;
  3939. margin-top: 12px;
  3940. position: relative;
  3941. display: flex;
  3942. align-items: center;
  3943. width: 100%;
  3944. min-height: 50px;
  3945. }
  3946. .chapter_upload_t {
  3947. background-color: #fff;
  3948. position: absolute;
  3949. height: 100%;
  3950. top: 0px;
  3951. left: 0px;
  3952. border-radius: 40px;
  3953. box-sizing: border-box;
  3954. box-shadow: 0 0 3px 3px #dfdfdf;
  3955. }
  3956. .chapter_upload_o {
  3957. width: 100%;
  3958. height: 100%;
  3959. position: relative;
  3960. z-index: 1;
  3961. }
  3962. .chapter_upload_ic {
  3963. height: 30px;
  3964. float: right;
  3965. }
  3966. .chapter_upload_ic_l {
  3967. width: 50px;
  3968. height: 50px;
  3969. float: left;
  3970. }
  3971. .chapter_upload_ic_l div {
  3972. width: 30px;
  3973. height: 35px;
  3974. background: url("../../assets/icon/icon.png");
  3975. }
  3976. .chapter_upload_ic_r {
  3977. width: 50px;
  3978. height: 50px;
  3979. float: left;
  3980. margin-left: 0px;
  3981. display: flex;
  3982. align-items: center;
  3983. }
  3984. .chapter_upload_ic_r div {
  3985. width: 25px;
  3986. height: 25px;
  3987. background-image: url("../../assets/delete.png");
  3988. background-size: 100% 100%;
  3989. }
  3990. .chapter_upload_n {
  3991. display: flex;
  3992. text-indent: 10px;
  3993. text-decoration: none;
  3994. text-overflow: ellipsis;
  3995. white-space: nowrap;
  3996. overflow: hidden;
  3997. width: 55%;
  3998. margin-left: 10px;
  3999. cursor: pointer;
  4000. margin-top: 2px;
  4001. }
  4002. .chapter_upload_l_i1 {
  4003. background-image: url("../../assets/icon/video.png");
  4004. width: 28px;
  4005. height: 28px;
  4006. background-size: 100% 100%;
  4007. }
  4008. .chapter_upload_l_i5 {
  4009. background-image: url("../../assets/icon/word.png");
  4010. width: 24px;
  4011. height: 24px;
  4012. background-size: 100% 100%;
  4013. }
  4014. .chapter_upload_l_i8 {
  4015. background-image: url("../../assets/icon/line.png");
  4016. width: 24px;
  4017. height: 24px;
  4018. background-size: 100% 100%;
  4019. }
  4020. .chapter_upload_ud {
  4021. display: flex;
  4022. flex-direction: column;
  4023. margin-left: 5px;
  4024. justify-content: center;
  4025. }
  4026. .chapter_upload_up {
  4027. background-image: url("../../assets/icon/up.png");
  4028. width: 17px;
  4029. height: 15px;
  4030. background-size: 100% 100%;
  4031. cursor: pointer;
  4032. }
  4033. .chapter_upload_down {
  4034. background-image: url("../../assets/icon/down.png");
  4035. width: 17px;
  4036. height: 15px;
  4037. margin: 2px auto 0 auto;
  4038. background-size: 100% 100%;
  4039. cursor: pointer;
  4040. }
  4041. .addWordStyle {
  4042. display: flex;
  4043. flex-direction: row;
  4044. justify-content: flex-start;
  4045. overflow-x: auto;
  4046. white-space: nowrap;
  4047. flex-wrap: wrap;
  4048. }
  4049. /* table 样式 */
  4050. .cont >>> table {
  4051. border-top: 1px solid #ccc;
  4052. border-left: 1px solid #ccc;
  4053. }
  4054. .cont >>> table td,
  4055. .cont >>> table th {
  4056. border-bottom: 1px solid #ccc;
  4057. border-right: 1px solid #ccc;
  4058. padding: 3px 5px;
  4059. }
  4060. .cont >>> table th {
  4061. border-bottom: 2px solid #ccc;
  4062. text-align: center;
  4063. }
  4064. /* blockquote 样式 */
  4065. .cont >>> blockquote {
  4066. display: block;
  4067. border-left: 8px solid #d0e5f2;
  4068. padding: 5px 10px;
  4069. margin: 10px 0;
  4070. line-height: 1.4;
  4071. font-size: 100%;
  4072. background-color: #f1f1f1;
  4073. }
  4074. /* code 样式 */
  4075. .cont >>> code {
  4076. display: inline-block;
  4077. *display: inline;
  4078. *zoom: 1;
  4079. background-color: #f1f1f1;
  4080. border-radius: 3px;
  4081. padding: 3px 5px;
  4082. margin: 0 3px;
  4083. }
  4084. .cont >>> pre code {
  4085. display: block;
  4086. }
  4087. /* ul ol 样式 */
  4088. .cont >>> ul,
  4089. ol {
  4090. margin: 10px 0 10px 20px;
  4091. }
  4092. .wordbox {
  4093. display: flex;
  4094. flex-wrap: wrap;
  4095. cursor: pointer;
  4096. width: 100%;
  4097. }
  4098. .checkword {
  4099. width: 22px;
  4100. height: 22px;
  4101. margin: 10px auto 0;
  4102. cursor: pointer;
  4103. }
  4104. .checkword img {
  4105. width: 100%;
  4106. }
  4107. .stepBg {
  4108. margin: 0 25px 0 0;
  4109. width: 17%;
  4110. min-width: 230px;
  4111. border-radius: 10px;
  4112. display: flex;
  4113. flex-direction: column;
  4114. justify-content: flex-start;
  4115. align-items: center;
  4116. flex-wrap: nowrap;
  4117. background: #fff;
  4118. min-height: 700px;
  4119. top: 18%;
  4120. }
  4121. .stepBg > div {
  4122. height: 80px;
  4123. width: 85%;
  4124. cursor: pointer;
  4125. margin: 10px 0;
  4126. border-radius: 10px;
  4127. }
  4128. .first,
  4129. .second,
  4130. .third,
  4131. .four {
  4132. background: #4a83d0;
  4133. height: 90px;
  4134. color: #fff;
  4135. display: flex;
  4136. flex-direction: row;
  4137. align-items: center;
  4138. justify-content: center;
  4139. }
  4140. .first > div:nth-child(1),
  4141. .second > div:nth-child(1),
  4142. .third > div:nth-child(1),
  4143. .four > div:nth-child(1) {
  4144. margin: 5px 10px 0 0;
  4145. width: 2rem;
  4146. }
  4147. .firstNo,
  4148. .secondNo,
  4149. .thirdNo,
  4150. .fourNo {
  4151. background: #e7e7e7;
  4152. color: #adadad;
  4153. display: flex;
  4154. flex-direction: row;
  4155. align-items: center;
  4156. justify-content: center;
  4157. }
  4158. .firstNo > div:nth-child(1),
  4159. .secondNo > div:nth-child(1),
  4160. .thirdNo > div:nth-child(1),
  4161. .fourNo > div:nth-child(1) {
  4162. margin: 5px 10px 0 0;
  4163. width: 2rem;
  4164. }
  4165. .uploadWidth >>> .el-upload {
  4166. width: 60px;
  4167. height: 60px;
  4168. position: relative;
  4169. }
  4170. .addPeople {
  4171. background: #fa6060;
  4172. width: 135px;
  4173. height: 40px;
  4174. color: #fff;
  4175. border-radius: 5px;
  4176. text-align: center;
  4177. line-height: 40px;
  4178. font-size: 15px;
  4179. cursor: pointer;
  4180. margin-top: 20px;
  4181. }
  4182. .kcImg {
  4183. width: 60px;
  4184. margin-left: 10px;
  4185. }
  4186. .zyImg {
  4187. width: 55px;
  4188. margin: 0 10px;
  4189. }
  4190. .deleteZy {
  4191. width: 20px;
  4192. position: absolute;
  4193. top: 5px;
  4194. right: 5px;
  4195. cursor: pointer;
  4196. }
  4197. .kcImg > img,
  4198. .zyImg > img,
  4199. .deleteZy > img {
  4200. width: 100%;
  4201. height: 100%;
  4202. }
  4203. .zyBox {
  4204. display: flex;
  4205. flex-direction: row;
  4206. align-items: center;
  4207. background: #67d37d;
  4208. color: #fff;
  4209. width: 210px;
  4210. margin: 20px 20px 0 0;
  4211. border-radius: 10px;
  4212. height: 70px;
  4213. position: relative;
  4214. }
  4215. .upCss {
  4216. display: flex;
  4217. flex-direction: row;
  4218. justify-content: flex-start;
  4219. }
  4220. .upCss >>> .el-icon-plus {
  4221. position: none !important;
  4222. width: 200px;
  4223. height: 100px;
  4224. display: flex;
  4225. flex-wrap: nowrap;
  4226. flex-direction: column;
  4227. align-items: center;
  4228. justify-content: center;
  4229. border: 1px dashed #ccc;
  4230. min-width: 78px;
  4231. min-height: 100px;
  4232. z-index: 999;
  4233. }
  4234. .addStageImg {
  4235. min-width: 25px;
  4236. min-height: 25px;
  4237. width: 25px;
  4238. height: 25px;
  4239. cursor: pointer;
  4240. }
  4241. .addHW {
  4242. width: 28px;
  4243. height: 28px;
  4244. cursor: pointer;
  4245. }
  4246. .addStageImg > img,
  4247. .addHW > img {
  4248. width: 100%;
  4249. height: 100%;
  4250. }
  4251. .addNewPP >>> .el-dialog__body {
  4252. padding: 5px 20px;
  4253. }
  4254. .isHeight {
  4255. height: 680px;
  4256. }
  4257. .toolChoose {
  4258. display: flex;
  4259. /* width: 100%; */
  4260. flex-direction: row;
  4261. flex-wrap: wrap;
  4262. }
  4263. .tool {
  4264. display: flex;
  4265. flex-direction: column;
  4266. flex-wrap: nowrap;
  4267. width: fit-content;
  4268. margin: 10px 0 10px 0;
  4269. align-items: center;
  4270. }
  4271. .tool + .tool {
  4272. margin-right: 45px;
  4273. }
  4274. .whiteBIcon {
  4275. width: 80px;
  4276. cursor: pointer;
  4277. display: flex;
  4278. flex-direction: column;
  4279. flex-wrap: nowrap;
  4280. align-items: center;
  4281. }
  4282. .whiteBIcon > img,
  4283. .check > img,
  4284. .toolIcon > img,
  4285. .arrow > img {
  4286. width: 100%;
  4287. height: 100%;
  4288. }
  4289. .whiteBIcon > img {
  4290. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  4291. border-radius: 15px;
  4292. }
  4293. .check {
  4294. width: 20px;
  4295. height: 20px;
  4296. cursor: pointer;
  4297. margin: 10px 0;
  4298. }
  4299. .customWidth >>> .el-dialog {
  4300. min-width: 500px !important;
  4301. }
  4302. .a_addBox {
  4303. margin: 10px 0;
  4304. background: #fff;
  4305. padding: 15px;
  4306. max-height: 400px;
  4307. overflow: auto;
  4308. }
  4309. .a_add_box {
  4310. border-bottom: 2px solid #eee;
  4311. padding-bottom: 10px;
  4312. }
  4313. .a_add_head {
  4314. display: flex;
  4315. align-items: center;
  4316. justify-content: space-between;
  4317. margin: 10px 0;
  4318. font-size: 18px;
  4319. }
  4320. .a_add_head .a_add_head_input {
  4321. width: 300px;
  4322. }
  4323. .a_add_head .a_add_head_div {
  4324. display: flex;
  4325. align-items: center;
  4326. justify-content: space-between;
  4327. }
  4328. .a_add_body {
  4329. display: flex;
  4330. align-items: center;
  4331. }
  4332. .a_add_input {
  4333. display: flex;
  4334. align-items: center;
  4335. flex-wrap: wrap;
  4336. }
  4337. .width100 {
  4338. width: 100%;
  4339. }
  4340. .a_add_input .a_add_persent {
  4341. width: 100%;
  4342. }
  4343. .a_add_persent_div {
  4344. width: 100%;
  4345. display: flex;
  4346. align-items: center;
  4347. }
  4348. .a_add_persent_div span {
  4349. margin: 5px 0;
  4350. }
  4351. .a_add_persent_div span:nth-child(1) {
  4352. width: 30%;
  4353. }
  4354. .a_add_persent_div span:nth-child(2) {
  4355. width: 7%;
  4356. }
  4357. .a_add_persent_div span:nth-child(3) {
  4358. width: 40%;
  4359. }
  4360. .a_add_body_div {
  4361. display: flex;
  4362. align-items: center;
  4363. justify-content: center;
  4364. flex-direction: column;
  4365. }
  4366. .all_choose {
  4367. display: flex;
  4368. flex-direction: row;
  4369. align-items: flex-start;
  4370. }
  4371. .all_choose > span {
  4372. width: 80px;
  4373. display: block;
  4374. letter-spacing: 14px;
  4375. }
  4376. .all_choose >>> .el-checkbox-group {
  4377. display: flex;
  4378. flex-direction: row;
  4379. width: 820px;
  4380. flex-wrap: wrap;
  4381. align-content: center;
  4382. justify-content: flex-start;
  4383. align-items: center;
  4384. margin-top: 3px;
  4385. }
  4386. .all_choose > .el-checkbox-group >>> .el-checkbox {
  4387. margin-bottom: 10px;
  4388. display: flex;
  4389. flex-direction: row;
  4390. align-items: center;
  4391. }
  4392. .all_choose > .el-checkbox-group > .el-checkbox >>> .el-checkbox__label {
  4393. min-width: 80px;
  4394. overflow: hidden;
  4395. width: 80px;
  4396. text-overflow: ellipsis;
  4397. white-space: nowrap;
  4398. }
  4399. .all_choose > .el-checkbox-group > .el-checkbox >>> .el-checkbox__label:hover {
  4400. width: auto;
  4401. }
  4402. .choose > div:nth-child(3) > span {
  4403. letter-spacing: 0 !important;
  4404. }
  4405. .choose {
  4406. display: flex;
  4407. flex-direction: column;
  4408. flex-wrap: nowrap;
  4409. height: 100%;
  4410. justify-content: space-evenly;
  4411. align-items: flex-start;
  4412. }
  4413. .both {
  4414. display: flex;
  4415. flex-direction: row;
  4416. flex-wrap: wrap;
  4417. width: 100%;
  4418. height: 350px;
  4419. align-items: center;
  4420. justify-content: flex-start;
  4421. }
  4422. .notice >>> .el-dialog {
  4423. width: 500px !important;
  4424. text-align: center;
  4425. }
  4426. .notice >>> .el-button {
  4427. margin-top: 20px;
  4428. }
  4429. .whiteBg {
  4430. background: #fff;
  4431. border-radius: 10px;
  4432. min-width: 800px;
  4433. }
  4434. .chooseWho {
  4435. display: flex;
  4436. width: 250px;
  4437. flex-direction: row;
  4438. flex-wrap: nowrap;
  4439. justify-content: space-between;
  4440. padding-bottom: 10px;
  4441. }
  4442. .chooseWho > div {
  4443. cursor: pointer;
  4444. padding-bottom: 10px;
  4445. font-weight: bold;
  4446. }
  4447. .isChooseActive {
  4448. color: #3e88f4;
  4449. border-bottom: 2px solid #2f80f3;
  4450. }
  4451. .toolSort {
  4452. display: flex;
  4453. flex-direction: row;
  4454. flex-wrap: wrap;
  4455. justify-content: flex-start;
  4456. align-items: flex-start;
  4457. min-width: 685px;
  4458. }
  4459. .toolSort > div {
  4460. margin-right: 45px;
  4461. }
  4462. .tools {
  4463. width: 100%;
  4464. display: flex;
  4465. flex-direction: column;
  4466. flex-wrap: nowrap;
  4467. align-items: flex-start;
  4468. }
  4469. .leftTools,
  4470. .rightTools {
  4471. width: 50%;
  4472. }
  4473. .rightTools {
  4474. display: flex;
  4475. flex-direction: row;
  4476. flex-wrap: nowrap;
  4477. justify-content: space-around;
  4478. }
  4479. .firstToolList {
  4480. display: flex;
  4481. flex-direction: column;
  4482. flex-wrap: nowrap;
  4483. align-items: center;
  4484. }
  4485. .iconList {
  4486. display: flex;
  4487. flex-direction: row;
  4488. flex-wrap: wrap;
  4489. justify-content: flex-start;
  4490. align-items: center;
  4491. margin: 20px 0 5px 0;
  4492. width: 240px;
  4493. min-width: 240px;
  4494. }
  4495. .iconTool {
  4496. display: flex;
  4497. flex-direction: column;
  4498. flex-wrap: nowrap;
  4499. align-items: center;
  4500. justify-content: flex-start;
  4501. margin: 15px 10px;
  4502. }
  4503. .toolIcon {
  4504. width: 50px;
  4505. }
  4506. .taskBorder {
  4507. border: 1px solid #e1e1e1;
  4508. border-radius: 10px;
  4509. margin-top: 20px;
  4510. min-height: 1160px;
  4511. position: relative;
  4512. background: #fbfbfb;
  4513. }
  4514. .smallTaskBorder {
  4515. height: 170px;
  4516. min-height: 170px !important;
  4517. overflow: hidden;
  4518. }
  4519. .taskBorder > div {
  4520. padding: 30px 0 10px 30px;
  4521. }
  4522. .addTaskBorder {
  4523. border: 2px solid #e1e1e1;
  4524. border-radius: 10px;
  4525. margin-top: 25px;
  4526. cursor: pointer;
  4527. }
  4528. .addTaskBorder > div {
  4529. margin: 0 auto;
  4530. display: flex;
  4531. align-items: center;
  4532. justify-content: center;
  4533. }
  4534. .addTaskBorder > div > img {
  4535. width: 100px;
  4536. }
  4537. .addTaskBorder > div > span {
  4538. font-size: 23px;
  4539. color: #dbdbdb;
  4540. }
  4541. .funBlock {
  4542. display: flex;
  4543. padding: 15px 0;
  4544. flex-direction: row;
  4545. justify-content: flex-end;
  4546. align-items: center;
  4547. position: absolute;
  4548. right: 15px;
  4549. bottom: 35px;
  4550. }
  4551. .fold {
  4552. display: flex;
  4553. margin: 0 10px;
  4554. flex-direction: row;
  4555. align-items: center;
  4556. cursor: pointer;
  4557. }
  4558. .arrow {
  4559. width: 15px;
  4560. height: 15px;
  4561. margin-left: 10px;
  4562. }
  4563. .addToolFun {
  4564. display: flex;
  4565. width: 150px;
  4566. flex-direction: row;
  4567. align-items: center;
  4568. justify-content: center;
  4569. border: 1px dashed;
  4570. border-radius: 5px;
  4571. height: 50px;
  4572. margin: 35px auto 0;
  4573. cursor: pointer;
  4574. }
  4575. .addToolImg {
  4576. width: 30px;
  4577. height: 30px;
  4578. margin-right: 20px;
  4579. }
  4580. .addToolsDia >>> .el-dialog__body {
  4581. padding: 20px;
  4582. }
  4583. .addToolsDia >>> .el-dialog__body > .toolChoose {
  4584. padding: 0;
  4585. }
  4586. .addToolsDia >>> .el-dialog__body > .toolChoose > .leftTools {
  4587. padding: 0;
  4588. border-bottom: none;
  4589. margin-bottom: 0;
  4590. }
  4591. .addToolsDia >>> .el-dialog__body > .toolChoose > .leftTools > .chooseWho {
  4592. width: 100%;
  4593. }
  4594. .lineCss >>> .el-form-item__label {
  4595. width: auto !important;
  4596. }
  4597. .lineCss >>> .el-form-item__content {
  4598. margin-left: 50px !important;
  4599. }
  4600. .newSteps {
  4601. display: flex;
  4602. width: 100% !important;
  4603. height: 80px;
  4604. cursor: pointer;
  4605. margin: 10px 0;
  4606. border-radius: 10px;
  4607. flex-direction: row;
  4608. align-content: center;
  4609. justify-content: center;
  4610. align-items: center;
  4611. margin: 0 !important;
  4612. }
  4613. /* 评价样式 */
  4614. .elist_css {
  4615. margin-bottom: 60px;
  4616. }
  4617. .elist_title {
  4618. margin-bottom: 10px;
  4619. }
  4620. .elist_input {
  4621. }
  4622. .elist_input_box {
  4623. display: flex;
  4624. align-items: center;
  4625. flex-wrap: wrap;
  4626. }
  4627. .elist_input_box + .elist_input_box {
  4628. margin-top: 30px;
  4629. }
  4630. .elist_input .elist_input_box input {
  4631. font: inherit;
  4632. color: currentColor;
  4633. width: 200px;
  4634. padding: 8px 14px;
  4635. display: block;
  4636. min-width: 0;
  4637. outline: none;
  4638. border: 1px solid rgba(0, 0, 0, 0.23);
  4639. border-radius: 4px;
  4640. box-sizing: border-box;
  4641. background: #fff;
  4642. margin: 0 20px 0 0;
  4643. }
  4644. .elist_input .elist_input_box span {
  4645. height: 36px;
  4646. line-height: 36px;
  4647. color: rgb(82, 82, 82);
  4648. }
  4649. .elist_input .elist_input_box .remove {
  4650. height: 20px;
  4651. width: 20px;
  4652. background-size: 100% 100%;
  4653. background-position: unset;
  4654. margin-left: 5px;
  4655. }
  4656. .elist_input_box >>> .el-rate {
  4657. display: flex;
  4658. height: 36px;
  4659. align-items: center;
  4660. }
  4661. .elist_input_box .elist_inptu_text {
  4662. width: 100%;
  4663. display: flex;
  4664. align-items: center;
  4665. margin-top: 10px;
  4666. }
  4667. .elist_input_box .elist_inptu_text input {
  4668. width: 500px;
  4669. }
  4670. .elist_input_box >>> .el-rate__icon {
  4671. font-size: 24px;
  4672. }
  4673. .elist_btn {
  4674. margin-top: 10px;
  4675. }
  4676. .lineTitle {
  4677. font-size: 1.5em;
  4678. font-weight: bold;
  4679. margin-top: 15px;
  4680. width: 110px;
  4681. min-width: 110px;
  4682. }
  4683. .courseTop {
  4684. display: flex;
  4685. flex-direction: row;
  4686. justify-content: flex-start;
  4687. align-items: center;
  4688. width: 100%;
  4689. background: rgb(255, 255, 255);
  4690. border-radius: 10px;
  4691. }
  4692. .stepsNav {
  4693. display: flex;
  4694. flex-direction: row;
  4695. justify-content: flex-start;
  4696. align-items: center;
  4697. border-radius: 80px;
  4698. box-shadow: 0px 1px 2px 3px #f2f2f2;
  4699. margin: 30px 20px 20px 45px;
  4700. min-width: 420px;
  4701. }
  4702. .rightBox {
  4703. width: calc(83% - 25px);
  4704. background: rgb(255, 255, 255);
  4705. border-radius: 10px;
  4706. min-height: 550px;
  4707. min-width: 700px;
  4708. height: 700px;
  4709. overflow: auto;
  4710. }
  4711. </style>