DeskTop.js 273 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484
  1. /*
  2. 此处为桌面系统启动应用区域
  3. */
  4. Namespace.register("U.MD.D.I"); //桌面应用处理
  5. //判断图片是否在拖拽,如果是拖拽图标的过程是不会打开图片的
  6. U.MD.D.I.IsDrag;
  7. U.MD.D.I.Ip;
  8. //教师桌面图标的全局变量
  9. U.MD.D.I.teacherDeskIcon = [
  10. { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
  11. { "Name": "学习中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
  12. { "Name": "学生管理", "Url": "student", "style": { "cssText": "background-image:url(/img/icon/student.png)" } },
  13. { "Name": "学生评价", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
  14. { "Name": "班级管理", "Url": "class", "style": { "cssText": "background-image:url(/img/icon/class.png)" } },
  15. { "Name": "我的资料", "Url": "my", "style": { "cssText": "background-image:url(/img/icon/myMessage.png)" } },
  16. { "Name": "通知公告", "Url": "notice", "style": { "cssText": "background-image:url(/img/icon/news.png)" } },
  17. { "Name": "素材库", "Url": "library", "style": { "cssText": "background-image:url(/img/icon/library.png)" } },
  18. { "Name": "电子白板", "Url": "whiteboard", "style": { "cssText": "background-image:url(/img/icon/whiteBoard.png)" } },
  19. { "Name": "问卷调查", "Url": "investigation", "style": { "cssText": "background-image:url(/img/icon/ask.png)" } },
  20. { "Name": "便签分类", "Url": "note", "style": { "cssText": "background-image:url(/img/icon/note.png)" } },
  21. // { "Name": "量规评分", "Url": "score", "style": { "cssText": "background-image:url(/img/icon/score.png)" } },
  22. { "Name": "思维导图", "Url": "mind", "style": { "cssText": "background-image:url(/img/icon/mindMapping.png)" } },
  23. { "Name": "协同文档", "Url": "doc", "style": { "cssText": "background-image:url(/img/icon/doc.png)" } },
  24. { "Name": "思维网格", "Url": "mindNetwork", "style": { "cssText": "background-image:url(/img/icon/mindNetwork.png)" } },
  25. { "Name": "实时课堂", "Url": "teacherClassRoom", "style": { "cssText": "background-image:url(/img/icon/classRoom.png)" } },
  26. { "Name": "目标管理", "Url": "sys", "style": { "cssText": "background-image:url(/img/icon/evalua.png)" } },
  27. { "Name": "课程设计", "Url": "courseDesign", "style": { "cssText": "background-image:url(/img/icon/courseDesign.png)" } },
  28. { "Name": "训练平台", "Url": "train", "style": { "cssText": "background-image:url(/img/icon/trainPlatform.png)" } },
  29. { "Name": "编程平台", "Url": "program", "style": { "cssText": "background-image:url(/img/icon/program.png)" } },
  30. { "Name": "AI体验", "Url": "AIprogram2", "style": { "cssText": "background-image:url(/img/icon/AIprogram2.png)" } },
  31. { "Name": "Python", "Url": "Pythonprogram", "style": { "cssText": "background-image:url(/img/icon/Pythonprogram.png)" } },
  32. { "Name": "AI编程", "Url": "AIprogram", "style": { "cssText": "background-image:url(/img/icon/AIprogram.png)" } },
  33. { "Name": "源码编辑", "Url": "codeEdit", "style": { "cssText": "background-image:url(/img/icon/code.png)" } },
  34. { "Name": "MindMap", "Url": "MindMap", "style": { "cssText": "background-image:url(/img/icon/MIndMap.png)" } },
  35. { "Name": "翻译", "Url": "translation", "style": { "cssText": "background-image:url(/img/icon/translation.png)" } },
  36. { "Name": " 魔盒识字", "Url": "mohe", "style": { "cssText": "background-image:url(/img/icon/mohe.png)" } },
  37. { "Name": "24点", "Url": "24game", "style": { "cssText": "background-image:url(/img/icon/24game.png)" } },
  38. { "Name": "数学画板", "Url": "netWorkPanel", "style": { "cssText": "background-image:url(/img/icon/networkPanel.png)" } },
  39. { "Name": "GeoGebra", "Url": "GeoGebra", "style": { "cssText": "background-image:url(/img/icon/GeoGebra.png)" } },
  40. { "Name": "项目进展", "Url": "case", "style": { "cssText": "background-image:url(/img/icon/case.png)" } },
  41. // { "Name": "国家教育", "Url": "resources", "style": { "cssText": "background-image:url(/img/icon/resources.png)" } },
  42. { "Name": "赛诺梵", "Url": "snf", "style": { "cssText": "background-image:url(/img/icon/snf.png)" } },
  43. { "Name": "汉字宫", "Url": "han", "style": { "cssText": "background-image:url(/img/icon/han.png)" } },
  44. ];
  45. U.MD.D.I.studentDeskIcon = [
  46. // { "Name": "我的项目", "Url": "studnetProject", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
  47. { "Name": "学习中心", "Url": "studentStudy", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
  48. // { "Name": "我的评价", "Url": "studentEvaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
  49. // { "Name": "我的资料", "Url": "my", "style": { "cssText": "background-image:url(/img/icon/myMessage.png)" } },
  50. // { "Name": "素材库", "Url": "library", "style": { "cssText": "background-image:url(/img/icon/library.png)" } },
  51. // { "Name": "电子白板", "Url": "whiteboard", "style": { "cssText": "background-image:url(/img/icon/whiteBoard.png)" } },
  52. // { "Name": "问卷调查", "Url": "investigation", "style": { "cssText": "background-image:url(/img/icon/ask.png)" } },
  53. // { "Name": "便签分类", "Url": "note", "style": { "cssText": "background-image:url(/img/icon/note.png)" } },
  54. // { "Name": "量规评分", "Url": "score", "style": { "cssText": "background-image:url(/img/icon/score.png)" } },
  55. // { "Name": "思维导图", "Url": "mind", "style": { "cssText": "background-image:url(/img/icon/mindMapping.png)" } },
  56. // { "Name": "协同文档", "Url": "doc", "style": { "cssText": "background-image:url(/img/icon/doc.png)" } },
  57. // { "Name": "思维网格", "Url": "mindNetwork", "style": { "cssText": "background-image:url(/img/icon/mindNetwork.png)" } },
  58. { "Name": "实时课堂", "Url": "studentClassRoom", "style": { "cssText": "background-image:url(/img/icon/classRoom.png)" } },
  59. // { "Name": "训练平台", "Url": "train", "style": { "cssText": "background-image:url(/img/icon/trainPlatform.png)" } },
  60. // { "Name": "编程平台", "Url": "program", "style": { "cssText": "background-image:url(/img/icon/program.png)" } },
  61. // { "Name": "AI体验", "Url": "AIprogram2", "style": { "cssText": "background-image:url(/img/icon/AIprogram2.png)" } },
  62. // { "Name": "Python", "Url": "Pythonprogram", "style": { "cssText": "background-image:url(/img/icon/Pythonprogram.png)" } },
  63. // { "Name": "AI编程", "Url": "AIprogram", "style": { "cssText": "background-image:url(/img/icon/AIprogram.png)" } },
  64. // { "Name": "源码编辑", "Url": "codeEdit", "style": { "cssText": "background-image:url(/img/icon/code.png)" } },
  65. // { "Name": "MindMap", "Url": "MindMap", "style": { "cssText": "background-image:url(/img/icon/MIndMap.png)" } },
  66. // { "Name": "翻译", "Url": "translation", "style": { "cssText": "background-image:url(/img/icon/translation.png)" } },
  67. // { "Name": " 魔盒识字", "Url": "mohe", "style": { "cssText": "background-image:url(/img/icon/mohe.png)" } },
  68. // { "Name": "24点", "Url": "24game", "style": { "cssText": "background-image:url(/img/icon/24game.png)" } },
  69. // { "Name": "数学画板", "Url": "netWorkPanel", "style": { "cssText": "background-image:url(/img/icon/networkPanel.png)" } },
  70. // { "Name": "GeoGebra", "Url": "GeoGebra", "style": { "cssText": "background-image:url(/img/icon/GeoGebra.png)" } },
  71. // { "Name": "国家教育", "Url": "resources", "style": { "cssText": "background-image:url(/img/icon/resources.png)" } },
  72. { "Name": "汉字宫", "Url": "han", "style": { "cssText": "background-image:url(/img/icon/han.png)" } },
  73. ];
  74. U.MD.D.I.schoolDeskIcon = [
  75. { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
  76. { "Name": "学习中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
  77. { "Name": "学生评价", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
  78. { "Name": "通知公告", "Url": "notice", "style": { "cssText": "background-image:url(/img/icon/news.png)" } },
  79. { "Name": "学习资料", "Url": "stuLibrary", "style": { "cssText": "background-image:url(/img/icon/library.png)" } },
  80. { "Name": "电子白板", "Url": "whiteboard", "style": { "cssText": "background-image:url(/img/icon/whiteBoard.png)" } },
  81. { "Name": "问卷调查", "Url": "investigation", "style": { "cssText": "background-image:url(/img/icon/ask.png)" } },
  82. { "Name": "思维导图", "Url": "mind", "style": { "cssText": "background-image:url(/img/icon/mindMapping.png)" } },
  83. { "Name": "协同文档", "Url": "doc", "style": { "cssText": "background-image:url(/img/icon/doc.png)" } },
  84. { "Name": "思维网格", "Url": "mindNetwork", "style": { "cssText": "background-image:url(/img/icon/mindNetwork.png)" } },
  85. { "Name": "目标管理", "Url": "sys", "style": { "cssText": "background-image:url(/img/icon/evalua.png)" } },
  86. { "Name": "课程设计", "Url": "courseDesign", "style": { "cssText": "background-image:url(/img/icon/courseDesign.png)" } },
  87. { "Name": "训练平台", "Url": "train", "style": { "cssText": "background-image:url(/img/icon/trainPlatform.png)" } },
  88. { "Name": "编程平台", "Url": "program", "style": { "cssText": "background-image:url(/img/icon/program.png)" } },
  89. { "Name": "AI体验", "Url": "AIprogram2", "style": { "cssText": "background-image:url(/img/icon/AIprogram2.png)" } },
  90. { "Name": "Python", "Url": "Pythonprogram", "style": { "cssText": "background-image:url(/img/icon/Pythonprogram.png)" } },
  91. { "Name": "AI编程", "Url": "AIprogram", "style": { "cssText": "background-image:url(/img/icon/AIprogram.png)" } },
  92. { "Name": "源码编辑", "Url": "codeEdit", "style": { "cssText": "background-image:url(/img/icon/code.png)" } },
  93. { "Name": "MindMap", "Url": "MindMap", "style": { "cssText": "background-image:url(/img/icon/MIndMap.png)" } },
  94. // { "Name": "国家教育", "Url": "resources", "style": { "cssText": "background-image:url(/img/icon/resources.png)" } },
  95. ];
  96. U.MD.D.I.orgDeskIcon = [
  97. { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgProject.png)" } },
  98. { "Name": "学习中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgStudy.png)" } },
  99. { "Name": "学生评价", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgEva.png)" } },
  100. { "Name": "项目进展", "Url": "case", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgCase.png)" } },
  101. ];
  102. U.MD.D.I.orgStemDeskIcon = [
  103. { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgProject.png)" } },
  104. { "Name": "学习中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgStudy.png)" } },
  105. { "Name": "学生管理", "Url": "student", "style": { "cssText": "background-image:url(/img/icon/student.png)" } },
  106. { "Name": "学生评价", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgEva.png)" } },
  107. { "Name": "我的资料", "Url": "my", "style": { "cssText": "background-image:url(/img/icon/myMessage.png)" } },
  108. { "Name": "目标管理", "Url": "sys", "style": { "cssText": "background-image:url(/img/icon/evalua.png)" } },
  109. { "Name": "课程设计", "Url": "courseDesign", "style": { "cssText": "background-image:url(/img/icon/courseDesign.png)" } },
  110. { "Name": "项目进展", "Url": "case", "style": { "cssText": "background-image:url(/img/icon/case.png)" } },
  111. ];
  112. U.MD.D.I.hanDeskIcon = [
  113. { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgProject.png)" } },
  114. { "Name": "学习中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgStudy.png)" } },
  115. { "Name": "学生评价", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/orgIcon/orgEva.png)" } },
  116. { "Name": "汉字家族", "Url": "hanFamily", "style": { "cssText": "background-image:url(/img/icon/hanFamily.png)" } },
  117. { "Name": "国学经典", "Url": "hanClassics", "style": { "cssText": "background-image:url(/img/icon/hanClassics.png)" } },
  118. { "Name": "笔画训练", "Url": "hanTraining", "style": { "cssText": "background-image:url(/img/icon/hanTraining.png)" } },
  119. { "Name": "书法课堂", "Url": "hanClass", "style": { "cssText": "background-image:url(/img/icon/hanClass.png)" } },
  120. { "Name": "汉字宫", "Url": "han", "style": { "cssText": "background-image:url(/img/icon/han.png)" } },
  121. { "Name": " 魔盒识字", "Url": "mohe", "style": { "cssText": "background-image:url(/img/icon/mohe.png)" } },
  122. ];
  123. U.MD.D.I.GMteacherDeskIcon = [
  124. { "Name": "项目管理", "Url": "projectGM", "style": { "cssText": "background-image:url(/img/icon/gm/courseMange.png)" } },
  125. { "Name": "学习中心", "Url": "studyGM", "style": { "cssText": "background-image:url(/img/icon/gm/learning.png)" } },
  126. { "Name": "学生管理", "Url": "studentGM", "style": { "cssText": "background-image:url(/img/icon/gm/student.png)" } },
  127. { "Name": "学生评价", "Url": "evaluateGM", "style": { "cssText": "background-image:url(/img/icon/gm/evaluate.png)" } },
  128. { "Name": "班级管理", "Url": "classGM", "style": { "cssText": "background-image:url(/img/icon/gm/class.png)" } },
  129. // { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
  130. { "Name": "素材库", "Url": "meterialGM", "style": { "cssText": "background-image:url(/img/icon/gm/material.png)" } },
  131. // { "Name": "消息通知", "Url": "messageGM", "style": { "cssText": "background-image:url(/img/icon/gm/message.png)" } },
  132. { "Name": "案例征集", "Url": "gpbl", "style": { "cssText": "background-image:url(/img/icon/gpbl2.png)" } },
  133. ];
  134. U.MD.D.I.GMorganizerDeskIcon = [
  135. { "Name": "项目管理", "Url": "projectGM", "style": { "cssText": "background-image:url(/img/icon/gm/courseMange.png)" } },
  136. { "Name": "学习中心", "Url": "studyGM", "style": { "cssText": "background-image:url(/img/icon/gm/learning.png)" } },
  137. { "Name": "学生管理", "Url": "studentGM", "style": { "cssText": "background-image:url(/img/icon/gm/student.png)" } },
  138. { "Name": "学生评价", "Url": "evaluateGM", "style": { "cssText": "background-image:url(/img/icon/gm/evaluate.png)" } },
  139. // { "Name": "班级管理", "Url": "classGM", "style": { "cssText": "background-image:url(/img/icon/gm/class.png)" } },
  140. { "Name": "项目进展", "Url": "caseGM", "style": { "cssText": "background-image:url(/img/icon/gm/case.png)" } },
  141. { "Name": "学校管理", "Url": "schoolGM", "style": { "cssText": "background-image:url(/img/icon/gm/school.png)" } },
  142. { "Name": "教师管理", "Url": "teacherGM", "style": { "cssText": "background-image:url(/img/icon/gm/teacher.png)" } },
  143. // { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
  144. { "Name": "素材库", "Url": "meterialGM", "style": { "cssText": "background-image:url(/img/icon/gm/material.png)" } },
  145. { "Name": "项目审核", "Url": "examineGM", "style": { "cssText": "background-image:url(/img/icon/gm/examine.png)" } },
  146. // { "Name": "消息通知", "Url": "messageGM", "style": { "cssText": "background-image:url(/img/icon/gm/message.png)" } },
  147. { "Name": "案例征集", "Url": "gpbl", "style": { "cssText": "background-image:url(/img/icon/gpbl2.png)" } },
  148. ];
  149. U.MD.D.I.GMstudentDeskIcon = [
  150. { "Name": "学习中心", "Url": "studyGM", "style": { "cssText": "background-image:url(/img/icon/gm/learning.png)" } },
  151. { "Name": "我的评价", "Url": "evaluateSGM", "style": { "cssText": "background-image:url(/img/icon/gm/evaluate.png)" } },
  152. // { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
  153. { "Name": "素材库", "Url": "meterialGM", "style": { "cssText": "background-image:url(/img/icon/gm/material.png)" } },
  154. // { "Name": "消息通知", "Url": "messageGM", "style": { "cssText": "background-image:url(/img/icon/gm/message.png)" } },
  155. ];
  156. U.MD.D.I.teacherDeskIcon = [
  157. { "Name": "项目管理", "Url": "projectGM", "style": { "cssText": "background-image:url(/img/icon/gm/courseMange.png)" } },
  158. { "Name": "学习中心", "Url": "studyGM", "style": { "cssText": "background-image:url(/img/icon/gm/learning.png)" } },
  159. { "Name": "学生管理", "Url": "studentGM", "style": { "cssText": "background-image:url(/img/icon/gm/student.png)" } },
  160. { "Name": "学生评价", "Url": "evaluateGM", "style": { "cssText": "background-image:url(/img/icon/gm/evaluate.png)" } },
  161. { "Name": "班级管理", "Url": "classGM", "style": { "cssText": "background-image:url(/img/icon/gm/class.png)" } },
  162. { "Name": "我的资料", "Url": "dataGM", "style": { "cssText": "background-image:url(/img/icon/gm/data.png)" } },
  163. { "Name": "项目进展", "Url": "caseGM", "style": { "cssText": "background-image:url(/img/icon/gm/case.png)" } },
  164. { "Name": "素材库", "Url": "meterialGM", "style": { "cssText": "background-image:url(/img/icon/gm/material.png)" } },
  165. ];
  166. //#region 桌面初始化a
  167. /**
  168. * 初始化桌面的起始函数
  169. *
  170. */
  171. U.MD.D.I.init = function () {
  172. if ($("#U_MD_D_K")[0]) {
  173. //初始化桌面图标
  174. U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0]);
  175. // var clickUrl = ':12588/requestIp.php';
  176. // U.MD.D.I.Mysqlrequest(clickUrl,function(data){
  177. // U.MD.D.I.Ip = data;
  178. // var AccessUrl = ':12588/useAccess.php?ip=' + U.MD.D.I.Ip;
  179. // U.MD.D.I.Mysqlrequest(AccessUrl,function(data){
  180. // U.selectEl("#U_MD_D_RW").css("width", US.width - 165 + "px");
  181. // })
  182. // //初始化任务栏,因为是静态的,所以直接改变样式即可.
  183. // })
  184. }
  185. }
  186. /**
  187. * 隐藏任务栏
  188. *
  189. * @param {element} 桌面元素
  190. */
  191. U.MD.D.I.hiddenTaskbar = function (el) {
  192. //任务栏位置变小
  193. U.selectEl(el).parentElement(3).css({ "bottom": "-60px" });
  194. //桌面的位置变大
  195. // U.selectEl("#U_MD_D_K").css({ "left": "5px" });
  196. }
  197. /**
  198. * 隐藏任务栏
  199. *
  200. * @param {element} 桌面元素
  201. */
  202. U.MD.D.I.hiddenTaskbarout = function (el) {
  203. //任务栏位置变小
  204. if (!U.UF.EV.stopBubbleMouseOutOrOver(el)) {
  205. //任务栏位置变化
  206. U.selectEl(el).css({ "bottom": "-60px" });
  207. //桌面的位置变大
  208. // U.selectEl("#U_MD_D_K").css({ "left": "5px" });
  209. }
  210. }
  211. /**
  212. * 初始化打印桌面图标
  213. *
  214. * @param {element} 桌面元素
  215. */
  216. U.MD.D.I.initDesktopIcons = function (el) {
  217. var i, //用于循环
  218. _content, //桌面图标元素
  219. _iconcontent, //桌面图标元素
  220. _frag = $$("frag"), //定义一个碎片元素
  221. _type = US.userInfo.type,
  222. _org = US.userInfo.org,
  223. _oid = US.userInfo.organizeid,
  224. _role = US.userInfo.role,
  225. _teacherDesktopIconInfo = U.MD.D.I.teacherDeskIcon, //获取教师端桌面图标
  226. _studentDesktopIconInfo = U.MD.D.I.studentDeskIcon, //获取学生端桌面图标
  227. _orgDesktopIconInfo = U.MD.D.I.orgDeskIcon, //获取组织桌面图标
  228. _orgStemDeskIcon = U.MD.D.I.orgStemDeskIcon,
  229. _hanDeskIcon = U.MD.D.I.hanDeskIcon,
  230. _schoolDesktopIconInfo = U.MD.D.I.schoolDeskIcon, //获取测试学校桌面图标
  231. _GMteacherDesktopIconInfo = U.MD.D.I.GMteacherDeskIcon, //获取光明学校桌面图标
  232. _GMstudentDesktopIconInfo = U.MD.D.I.GMstudentDeskIcon; //获取光明学校桌面图标
  233. _GMorganizerDesktopIconInfo = U.MD.D.I.GMorganizerDeskIcon; //获取光明学校桌面图标
  234. //清楚桌面图标
  235. el.innerHTML = "";
  236. //循环创建桌面图标
  237. if (_type == 2 && _oid != "91305d49-01ba-11ed-8c78-005056b86db5" && _org != "eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217") {
  238. for (i = 0; i < _studentDesktopIconInfo.length; i++) {
  239. _content = $$("div", {
  240. className: "U_MD_D_KO",
  241. "onmousedown": U.UF.C.closure(function (obj) {
  242. //防止拖动图标即打开了桌面应用
  243. U.MD.D.click(this, obj);
  244. }, [_studentDesktopIconInfo[i]]),
  245. "onclick": U.UF.C.closure(function (obj) {
  246. //防止拖动图标即打开了桌面应用
  247. U.MD.D.click(this, obj);
  248. }, [_studentDesktopIconInfo[i]])
  249. }, _frag); //
  250. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  251. $$("div", { className: "U_MD_D_KOS U_Img", "style": _studentDesktopIconInfo[i].style }, _iconcontent);
  252. $$("div", { className: "U_MD_D_KOX", "innerHTML": _studentDesktopIconInfo[i].Name }, _iconcontent);
  253. }
  254. } else if ((_type == 1 || _type == 4) && _oid == "d9db3320-503a-11ed-8c78-005056b86db5") {
  255. for (i = 0; i < _hanDeskIcon.length; i++) {
  256. _content = $$("div", {
  257. className: "U_MD_D_KO",
  258. "onmousedown": U.UF.C.closure(function (obj) {
  259. //防止拖动图标即打开了桌面应用
  260. U.MD.D.click(this, obj);
  261. }, [_hanDeskIcon[i]]),
  262. "onclick": U.UF.C.closure(function (obj) {
  263. //防止拖动图标即打开了桌面应用
  264. U.MD.D.click(this, obj);
  265. }, [_hanDeskIcon[i]])
  266. }, _frag); //
  267. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  268. $$("div", { className: "U_MD_D_KOS U_Img", "style": _hanDeskIcon[i].style }, _iconcontent);
  269. $$("div", { className: "U_MD_D_KOX", "innerHTML": _hanDeskIcon[i].Name }, _iconcontent);
  270. }
  271. } else if ((_type == 1 || _type == 4) && _org == "7ada499f-4ec7-11ed-8c78-005056b86db5") {
  272. for (i = 0; i < _orgStemDeskIcon.length; i++) {
  273. _content = $$("div", {
  274. className: "U_MD_D_KO",
  275. "onmousedown": U.UF.C.closure(function (obj) {
  276. //防止拖动图标即打开了桌面应用
  277. U.MD.D.click(this, obj);
  278. }, [_orgStemDeskIcon[i]]),
  279. "onclick": U.UF.C.closure(function (obj) {
  280. //防止拖动图标即打开了桌面应用
  281. U.MD.D.click(this, obj);
  282. }, [_orgStemDeskIcon[i]])
  283. }, _frag); //
  284. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  285. $$("div", { className: "U_MD_D_KOS U_Img", "style": _orgStemDeskIcon[i].style }, _iconcontent);
  286. $$("div", { className: "U_MD_D_KOX", "innerHTML": _orgStemDeskIcon[i].Name }, _iconcontent);
  287. }
  288. } else if ((_type == 1 || _type == 4) && _org == "eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d" && _role == 0) {
  289. for (i = 0; i < _orgDesktopIconInfo.length; i++) {
  290. _content = $$("div", {
  291. className: "U_MD_D_KO",
  292. "onmousedown": U.UF.C.closure(function (obj) {
  293. //防止拖动图标即打开了桌面应用
  294. U.MD.D.click(this, obj);
  295. }, [_orgDesktopIconInfo[i]]),
  296. "onclick": U.UF.C.closure(function (obj) {
  297. //防止拖动图标即打开了桌面应用
  298. U.MD.D.click(this, obj);
  299. }, [_orgDesktopIconInfo[i]])
  300. }, _frag); //
  301. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  302. $$("div", { className: "U_MD_D_KOS U_Img", "style": _orgDesktopIconInfo[i].style }, _iconcontent);
  303. $$("div", { className: "U_MD_D_KOX", "innerHTML": _orgDesktopIconInfo[i].Name }, _iconcontent);
  304. }
  305. } else if ((_type == 1 || _type == 4) && _org == "eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217" && _role === 1) {
  306. for (i = 0; i < _GMorganizerDesktopIconInfo.length; i++) {
  307. _content = $$("div", {
  308. className: "U_MD_D_KO",
  309. "onmousedown": U.UF.C.closure(function (obj) {
  310. //防止拖动图标即打开了桌面应用
  311. U.MD.D.click(this, obj);
  312. }, [_GMorganizerDesktopIconInfo[i]]),
  313. "onclick": U.UF.C.closure(function (obj) {
  314. //防止拖动图标即打开了桌面应用
  315. U.MD.D.click(this, obj);
  316. }, [_GMorganizerDesktopIconInfo[i]])
  317. }, _frag); //
  318. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  319. $$("div", { className: "U_MD_D_KOS U_Img", "style": _GMorganizerDesktopIconInfo[i].style }, _iconcontent);
  320. $$("div", { className: "U_MD_D_KOX", "innerHTML": _GMorganizerDesktopIconInfo[i].Name }, _iconcontent);
  321. }
  322. } else if ((_type == 1 || _type == 4) && _oid == "91305d49-01ba-11ed-8c78-005056b86db5") {
  323. for (i = 0; i < _schoolDesktopIconInfo.length; i++) {
  324. _content = $$("div", {
  325. className: "U_MD_D_KO",
  326. "onmousedown": U.UF.C.closure(function (obj) {
  327. //防止拖动图标即打开了桌面应用
  328. U.MD.D.click(this, obj);
  329. }, [_schoolDesktopIconInfo[i]]),
  330. "onclick": U.UF.C.closure(function (obj) {
  331. //防止拖动图标即打开了桌面应用
  332. U.MD.D.click(this, obj);
  333. }, [_schoolDesktopIconInfo[i]])
  334. }, _frag); //
  335. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  336. $$("div", { className: "U_MD_D_KOS U_Img", "style": _schoolDesktopIconInfo[i].style }, _iconcontent);
  337. $$("div", { className: "U_MD_D_KOX", "innerHTML": _schoolDesktopIconInfo[i].Name }, _iconcontent);
  338. }
  339. } else if (_type == 2 && _oid == "91305d49-01ba-11ed-8c78-005056b86db5") {
  340. for (i = 0; i < _studentDesktopIconInfo.length; i++) {
  341. _content = $$("div", {
  342. className: "U_MD_D_KO",
  343. "onmousedown": U.UF.C.closure(function (obj) {
  344. //防止拖动图标即打开了桌面应用
  345. U.MD.D.click(this, obj);
  346. }, [_studentDesktopIconInfo[i]]),
  347. "onclick": U.UF.C.closure(function (obj) {
  348. //防止拖动图标即打开了桌面应用
  349. U.MD.D.click(this, obj);
  350. }, [_studentDesktopIconInfo[i]])
  351. }, _frag); //
  352. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  353. $$("div", { className: "U_MD_D_KOS U_Img", "style": _studentDesktopIconInfo[i].style }, _iconcontent);
  354. $$("div", { className: "U_MD_D_KOX", "innerHTML": _studentDesktopIconInfo[i].Name }, _iconcontent);
  355. }
  356. } else if ((_type == 1 || _type == 4) && _org == "eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217") {
  357. for (i = 0; i < _GMteacherDesktopIconInfo.length; i++) {
  358. _content = $$("div", {
  359. className: "U_MD_D_KO",
  360. "onmousedown": U.UF.C.closure(function (obj) {
  361. //防止拖动图标即打开了桌面应用
  362. U.MD.D.click(this, obj);
  363. }, [_GMteacherDesktopIconInfo[i]]),
  364. "onclick": U.UF.C.closure(function (obj) {
  365. //防止拖动图标即打开了桌面应用
  366. U.MD.D.click(this, obj);
  367. }, [_GMteacherDesktopIconInfo[i]])
  368. }, _frag); //
  369. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  370. $$("div", { className: "U_MD_D_KOS U_Img", "style": _GMteacherDesktopIconInfo[i].style }, _iconcontent);
  371. $$("div", { className: "U_MD_D_KOX", "innerHTML": _GMteacherDesktopIconInfo[i].Name }, _iconcontent);
  372. }
  373. } else if (_type == 2 && _org == "eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217") {
  374. for (i = 0; i < _GMstudentDesktopIconInfo.length; i++) {
  375. _content = $$("div", {
  376. className: "U_MD_D_KO",
  377. "onmousedown": U.UF.C.closure(function (obj) {
  378. //防止拖动图标即打开了桌面应用
  379. U.MD.D.click(this, obj);
  380. }, [_GMstudentDesktopIconInfo[i]]),
  381. "onclick": U.UF.C.closure(function (obj) {
  382. //防止拖动图标即打开了桌面应用
  383. U.MD.D.click(this, obj);
  384. }, [_GMstudentDesktopIconInfo[i]])
  385. }, _frag); //
  386. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  387. $$("div", { className: "U_MD_D_KOS U_Img", "style": _GMstudentDesktopIconInfo[i].style }, _iconcontent);
  388. $$("div", { className: "U_MD_D_KOX", "innerHTML": _GMstudentDesktopIconInfo[i].Name }, _iconcontent);
  389. }
  390. } else {
  391. for (i = 0; i < _teacherDesktopIconInfo.length; i++) {
  392. _content = $$("div", {
  393. className: "U_MD_D_KO",
  394. "onmousedown": U.UF.C.closure(function (obj) {
  395. //防止拖动图标即打开了桌面应用
  396. U.MD.D.click(this, obj);
  397. }, [_teacherDesktopIconInfo[i]]),
  398. "onclick": U.UF.C.closure(function (obj) {
  399. //防止拖动图标即打开了桌面应用
  400. U.MD.D.click(this, obj);
  401. }, [_teacherDesktopIconInfo[i]])
  402. }, _frag); //
  403. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  404. $$("div", { className: "U_MD_D_KOS U_Img", "style": _teacherDesktopIconInfo[i].style }, _iconcontent);
  405. $$("div", { className: "U_MD_D_KOX", "innerHTML": _teacherDesktopIconInfo[i].Name }, _iconcontent);
  406. }
  407. }
  408. //加载好后给图标定位
  409. U.MD.D.iconPostion($(_frag).Child());
  410. //把图标加载到页面
  411. el.appendChild(_frag);
  412. }
  413. /**
  414. * 显示任务栏
  415. *
  416. * @param {element} 桌面元素
  417. */
  418. U.MD.D.I.displayTaskbar = function (el) {
  419. //判断是否需要形式任务栏,由于用了mouseover事件会冒泡响应多次,这里做了过滤
  420. if (!U.UF.EV.stopBubbleMouseOutOrOver(el) && U.selectEl(el).css("bottom") != "0px") {
  421. //任务栏位置变化
  422. U.selectEl(el).css({ "bottom": "0px" });
  423. //桌面位置变话
  424. // U.selectEl("#U_MD_D_K").css({ "left": "70px" });
  425. }
  426. }
  427. //#region 桌面图标拖动逻辑
  428. /**
  429. * 桌面排列图标
  430. *
  431. * @param {element} 桌面元素
  432. * @param {object} 上下相距的距离
  433. * @param {object} 左右相距的距离
  434. * @return {object} 命名空间
  435. */
  436. U.MD.D.iconPostion = function (childs, top, left) {
  437. var i, ol = (US.width - (Math.floor(US.width / 150) * 150)) / 2; //用于循环处理
  438. top = top || 70; //如果没有设置元素的间距处理默认上间距为15
  439. left = (US.width - (Math.min(Math.floor(US.width / 150), childs.length) * 150)) / 2; //left || 20; //如果没有设置元素的间距处理默认左间距为15
  440. //循环所有的图标,设置每个图标的间距,打印顺序是竖排打印的方式
  441. for (i = 0; i < childs.length; i++) {
  442. //如果竖排top超过了范围处理
  443. if (left + 150 > US.width - 10) {
  444. //left超过了页面范围处理,则向上重叠打印处理
  445. if ((top + 180) > US.Height) {
  446. top -= 150;
  447. left -= 150;
  448. }
  449. //没有超过范围,那么left+90添加到下一个竖排打印
  450. else {
  451. top += 150;
  452. left = ol;
  453. };
  454. }
  455. //给图标的位置赋值
  456. U.selectEl(childs[i]).css({ bottom: top + "px", left: left + "px" });
  457. if (i < childs.length - 1) {
  458. //页面图标每次向下加95
  459. left += 150;
  460. }
  461. }
  462. //返回最后调用的图标的位置
  463. return [top, left];
  464. }
  465. /**
  466. * 桌面点击事件逻辑
  467. *
  468. * @param {element} 桌面元素
  469. * @param {object} 上下相距的距离
  470. * @param {object} 左右相距的距离
  471. * @return {object} 命名空间
  472. */
  473. U.MD.D.click = function (el, obj) {
  474. var _buttonnumber = event.button; //点击的按钮的事件值
  475. var _userinfo = US.userInfo;
  476. U.UF.EV.stopBubble(); //阻止向上冒泡
  477. //onmousedown 包含了左键和右键 这里大于2是为了兼容 所有浏览器的右键处理
  478. if (_buttonnumber < 2) {
  479. //如果是click事件的处理
  480. if (event.type == "click") {
  481. //如果元素在mousemove事件中没有移动则出发click事件
  482. if (!U.MD.D.I.IsDrag) {
  483. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  484. U.alert("请先登录您的账号!");
  485. setTimeout(() => {
  486. U.MD.U.L.login();
  487. }, 2000);
  488. } else {
  489. //打开应用处理
  490. U.MD.D.I.openApplication(obj.Url, { "userid": US.userInfo.userid, "directoryid": US.FTPFOLDERID });
  491. }
  492. }
  493. }
  494. //如果是mouse事件的处理
  495. else {
  496. //拖动处理,添加拖动和拖动结束事件
  497. //U.UF.F.drag(el, U.MD.D.iconMove, U.MD.D.iconUp);
  498. }
  499. U.MD.D.I.IsDrag = false;
  500. }
  501. }
  502. /**
  503. * 拖动的处理
  504. *
  505. */
  506. U.MD.D.iconMove = function () {
  507. //如果当前位置点击初始化的位置出现了变化,则设置是否拖动的属性 U.MD.D.I.IsDrag为true
  508. //U.MD.D.I.IsDrag = true;
  509. U.MD.D.I.IsDrag = false;
  510. }
  511. /**
  512. * 拖动结束后,这里是定位处理,以网状的形式定位
  513. *
  514. * @param {element} 拖动的元素
  515. * @return {object} 命名空间
  516. */
  517. U.MD.D.iconUp = function (el) {
  518. var _top = 20,
  519. _left = 20,
  520. _margin,
  521. _childs = U.selectEl("#U_MD_D_K").Child(), //桌面所有的图标
  522. _positioninfo = U.UF.EL.getElementInfo(el); //获取拖动结束的元素的位置
  523. if (_positioninfo["OT"] > 20) {
  524. //网状的形式定位,如果差超过了55,那么向下定位,否则向上定位
  525. _margin = ((_positioninfo["OT"] - 20) % 150 > 55 && _positioninfo["OT"] + 150 < US.height) ? 1 : 0;
  526. _top = (Math.floor((_positioninfo["OT"] - 20) / 150) + _margin) * 150 + 20;
  527. }
  528. if (_positioninfo["OL"] > 20) {
  529. //网状的形式定位,如果差超过了90,那么向右定位,否则向左定位
  530. _margin = ((_positioninfo["OL"] - 20) % 150 > 45 && _positioninfo["OL"] + 150 < US.width) ? 1 : 0;
  531. _left = (Math.floor((_positioninfo["OL"] - 20) / 150) + _margin) * 150 + 20
  532. }
  533. //while循环判断么一个重叠的元素
  534. do {
  535. _positioninfo = U.MD.D.iconPostion([el], _top, _left); //给重叠的元素向下定位
  536. _top = _positioninfo[0] + 150; //得到定位后的top
  537. _left = _positioninfo[1]; //得到定位后的left
  538. } while (el = U.MD.D.isOverlap(el, _childs, _positioninfo))
  539. }
  540. /**
  541. * 判断拖动后图标是否重叠
  542. *
  543. * @param {element} 拖动的元素
  544. * @param {element} 桌面所有的元素
  545. * @param {array} 拖动元素的位置
  546. ----------[0] 上 top
  547. ----------[1] 左 left
  548. * @return {object} 命名空间
  549. */
  550. U.MD.D.isOverlap = function (el, childs, postionarray) {
  551. //循环所有的图标
  552. for (var i = 0; i < childs.length; i++) {
  553. //判断有没有和该图标诶子重叠的元素
  554. if (el != childs[i] && (childs[i].offsetTop == postionarray[0] && childs[i].offsetLeft == postionarray[1])) {
  555. return childs[i]; //如果有返回
  556. }
  557. }
  558. }
  559. //#endregion
  560. //#endregion
  561. //#region 桌面应用
  562. /**
  563. * 打开应用
  564. *
  565. * @param {string} 类型
  566. -----------------Disk 网盘系统
  567. -----------------PDisk 学习系统网盘
  568. -----------------Poto 图片
  569. -----------------Video 视频
  570. -----------------Music 音乐
  571. -----------------Word word
  572. -----------------Excel excel
  573. -----------------Txt 记事本
  574. -----------------PB 学习系统
  575. -----------------Blog 朋友圈系统
  576. -----------------FTP ftp系统
  577. -----------------Group 好友群
  578. -----------------SY 首页系统
  579. -----------------Set 个人设置
  580. -----------------XSet 系统设置
  581. -----------------App 我们所有的app
  582. -----------------BC c.1473.cn 平台
  583. -----------------CWeb d.1473.cn 变成平台
  584. -----------------其他的外联系统 我们统一用iframe打开
  585. * @param {array} 类型
  586. 如果第一个参数为"disk",则第二个参数为object,里面包含了用户id和目录id{userid:"",directoryid:""}
  587. 如果第一个参数为"word"或者"excel","txt",则第二个参数为文件信息fileinfo。
  588. 如果第一个参数为"blog"或者"PDisk"。建议删除。
  589. 如果第一个参数为其他,则无第二个参数
  590. * @returns {array}
  591. */
  592. window.addEventListener('message', function (e) { // 监听 message 事件
  593. // alert(e.data.type);
  594. if (e.data.screenType && e.data.screenType == "2") { //项目管理传入
  595. U.MD.D.I.openInApplication("studyDetail", e.data.cid, e.data.screenType, 4)
  596. //3是展示全部阶段 2学生 1老师 4专家
  597. } else if (e.data.screenType && e.data.screenType == "3") { //项目管理传入
  598. U.MD.D.I.openInApplication("studyDetail", e.data.cid, 2, 1)
  599. } else if (e.data.screenType && e.data.screenType == "2gm") { //项目管理传入
  600. U.MD.D.I.openInApplication("studyDetailGM", e.data.cid, e.data.screenType, 4)
  601. //3是展示全部阶段 2学生 1老师 4专家
  602. } else if (e.data.screenType && e.data.screenType == "3gm") { //项目管理传入
  603. U.MD.D.I.openInApplication("studyDetailGM", e.data.cid, 2, 1)
  604. } else if (e.data.close && e.data.close == "1") { //更新用户信息
  605. U.MD.D.I.selectUser();
  606. } else if (e.data.allScreen && e.data.allScreen == "1") {
  607. var _formel = document.getElementById("study");
  608. U.UF.F.windowZooming(_formel);
  609. } else if (e.data.allScreen && e.data.allScreen == "2") {
  610. var _formel = document.getElementById("studyDetail");
  611. U.UF.F.windowZooming(_formel);
  612. } else if (e.data.allScreen && e.data.allScreen == "2gm") {
  613. var _formel = document.getElementById("studyDetail");
  614. U.UF.F.windowZooming(_formel);
  615. } else if (e.data.allScreen && e.data.allScreen == "3") {
  616. var _formel = document.getElementById("studentStudy");
  617. U.UF.F.windowZooming(_formel);
  618. } else if (e.data.allScreen && e.data.allScreen == "6") {
  619. var _formel = document.getElementById("study");
  620. //如果最大化了,那么就把他缩小
  621. // if (_formel.ismaximize) {
  622. // return;
  623. // }
  624. // U.UF.F.windowZooming(_formel);
  625. U.UF.F.topWindow(_formel);
  626. } else if (e.data.allScreen && e.data.allScreen == "4") {
  627. var _formel = document.getElementById("studyDetail");
  628. //如果最大化了,那么就把他缩小
  629. // if (_formel.ismaximize) {
  630. // return;
  631. // }
  632. // U.UF.F.windowZooming(_formel);
  633. U.UF.F.topWindow(_formel);
  634. } else if (e.data.allScreen && e.data.allScreen == "5") {
  635. var _formel = document.getElementById("studentStudy");
  636. // if (_formel.ismaximize) {
  637. // return;
  638. // }
  639. // U.UF.F.windowZooming(_formel);
  640. U.UF.F.topWindow(_formel);
  641. } else if (e.data.allScreen && e.data.allScreen == "5gm") {
  642. var _formel = document.getElementById("study");
  643. // if (_formel.ismaximize) {
  644. // return;
  645. // }
  646. // U.UF.F.windowZooming(_formel);
  647. U.UF.F.topWindow(_formel);
  648. } else if (e.data.tools && e.data.tools == "1") {
  649. // U.MD.D.I.openApplication("whiteboard")
  650. U.MD.D.I.openApplicationJie("whiteboard", e.data.cid, e.data.stage, e.data.task, e.data.tool)
  651. } else if (e.data.tools && e.data.tools == "2") {
  652. U.MD.D.I.openApplication("note")
  653. } else if (e.data.tools && e.data.tools == "3") {
  654. // U.MD.D.I.openApplication("mind")
  655. U.MD.D.I.openApplicationJie("mind", e.data.cid, e.data.stage, e.data.task, e.data.tool)
  656. } else if (e.data.tools && e.data.tools == "4") {
  657. U.MD.D.I.openApplication("investigation")
  658. } else if (e.data.tools && e.data.tools == "6") {
  659. // U.MD.D.I.openApplication("doc")
  660. U.MD.D.I.openApplicationJie("doc", e.data.cid, e.data.stage, e.data.task, e.data.tool)
  661. } else if (e.data.tools && e.data.tools == "7") {
  662. // U.MD.D.I.openApplication("mindNetwork")
  663. U.MD.D.I.openApplicationJie("mindNetwork", e.data.cid, e.data.stage, e.data.task, e.data.tool)
  664. } else if (e.data.tools && e.data.tools == "8") {
  665. U.MD.D.I.openApplication("library")
  666. } else if (e.data.tools && e.data.tools == "17") {
  667. U.MD.D.I.openApplication("stuLibrary")
  668. } else if (e.data.tools && e.data.tools == "18") {
  669. U.MD.D.I.openApplication("train")
  670. } else if (e.data.tools && e.data.tools == "21") {
  671. U.MD.D.I.openApplication("program")
  672. } else if (e.data.tools && e.data.tools == "22") {
  673. U.MD.D.I.openApplication("AIprogram2")
  674. } else if (e.data.tools && e.data.tools == "23") {
  675. U.MD.D.I.openApplication("Pythonprogram")
  676. } else if (e.data.tools && e.data.tools == "24") {
  677. U.MD.D.I.openApplication("AIprogram")
  678. } else if (e.data.tools && e.data.tools == "25") {
  679. U.MD.D.I.openApplication("sys")
  680. } else if (e.data.tools && e.data.tools == "26") {
  681. // U.MD.D.I.openApplication("courseDesign")
  682. U.MD.D.I.openApplicationJie("courseDesign", e.data.cid, e.data.stage, e.data.task, e.data.tool)
  683. } else if (e.data.tools && e.data.tools == "31") {
  684. U.MD.D.I.openApplication("netWorkPanel")
  685. } else if (e.data.tools && e.data.tools == "32") {
  686. U.MD.D.I.openApplication("codeEdit")
  687. } else if (e.data.tools && e.data.tools == "28") {
  688. U.MD.D.I.openApplication("translation")
  689. } else if (e.data.tools && e.data.tools == "37") {
  690. U.MD.D.I.openApplication("mohe")
  691. } else if (e.data.tools && e.data.tools == "38") {
  692. U.MD.D.I.openApplication("24game")
  693. } else if (e.data.tools && e.data.tools == "39") {
  694. U.MD.D.I.openApplication("GeoGebra")
  695. } else if (e.data.tools && e.data.tools == "43") {
  696. U.MD.D.I.openApplication("studentEvaluate")
  697. } else if (e.data.tools && e.data.tools == "44") {
  698. U.MD.D.I.openInApplication("hanUrl", '', '', '')
  699. } else if (e.data.tools && e.data.tools == "46") {
  700. U.MD.D.I.openApplication("project")
  701. }
  702. });
  703. U.MD.D.I.selectUser = function () {
  704. U.A.Request(US.Config.pbl + "selectUser?userid=" + US.userInfo.userid, [], function (res) { //US.userInfo.userid
  705. if (res.value[0].length > 0) {
  706. US.userInfo = res.value[0][0];
  707. $(".userName")[0].innerHTML = US.userInfo.username;
  708. }
  709. }, [], { "type": "GET", "withCredentials": true });
  710. }
  711. U.MD.D.I.openInApplication = function (str, data, screenType, tType) {
  712. var _userinfo = US.userInfo, //登录用户信息
  713. _userid = US.userInfo.userid, //登录用户id
  714. _oid = _userinfo.organizeid,
  715. _type = US.userInfo.type,
  716. _org = US.userInfo.org,
  717. _classId = US.userInfo.classid;
  718. if (_type == 4) {
  719. tType = 4
  720. }
  721. switch (str) {
  722. case "studyDetail":
  723. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  724. setTimeout(() => {
  725. U.MD.U.L.login();
  726. }, 2000);
  727. } else {
  728. _formdiv = new U.UF.UI.form(
  729. "项目详情",
  730. $$("iframe", { "allow": "camera *; microphone *;display-capture", "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/courseDetail?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&courseId=" + data + "&tType=" + tType + "&cid=" + _classId + "&screenType=" + screenType }), {
  731. "id": "studyDetail",
  732. "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
  733. "onresize": function () { }
  734. }, {
  735. closecallback: function () { }
  736. }, { "style": { "height": "36px" } }).form; //创建窗体
  737. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  738. break;
  739. }
  740. case "studyDetailGM":
  741. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  742. setTimeout(() => {
  743. U.MD.U.L.login();
  744. }, 2000);
  745. } else {
  746. _formdiv = new U.UF.UI.form(
  747. "项目详情",
  748. $$("iframe", { "allow": "camera *; microphone *;display-capture", "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/courseDetailGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&courseId=" + data + "&tType=" + tType + "&cid=" + _classId + "&screenType=" + screenType }), {
  749. "id": "studyDetail",
  750. "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
  751. "onresize": function () { }
  752. }, {
  753. closecallback: function () { }
  754. }, { "style": { "height": "36px" } }).form; //创建窗体
  755. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/learning.png)" }, "name": "学习中心", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  756. // window.open(US.Config.bpbl + "/pbl-student-table/dist/#/courseDetailGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&courseId=" + data + "&tType=" + tType + "&cid=" + _classId + "&screenType=" + screenType, "学习中心", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  757. break;
  758. }
  759. case "hanUrl":
  760. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  761. setTimeout(() => {
  762. U.MD.U.L.login();
  763. }, 2000);
  764. } else {
  765. _formdiv = new U.UF.UI.form(
  766. "汉字宫",
  767. $$("iframe", { "allow": "camera *; microphone *;display-capture", "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "//school.hanzigon.cn/?appid=734714090237947#/material/video?grade_id=62&lesson_code=621&id=2432" }), {
  768. "id": "hanUrl",
  769. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  770. "onresize": function () { }
  771. }, {
  772. closecallback: function () { }
  773. }, { "style": { "height": "36px" } }).form; //创建窗体
  774. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/hanClass.png)" }, "name": "汉字宫", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  775. break;
  776. }
  777. }
  778. }
  779. U.MD.D.I.openApplication = function (str, obj, info) {
  780. obj = obj || {};
  781. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  782. _formdiv, //创建任务栏时同时弹出的窗体元素。
  783. _userinfo = US.userInfo, //登录用户信息
  784. _userid = obj.userid || US.userInfo.userid, //登录用户id
  785. _oid = obj.organizeid || _userinfo.organizeid,
  786. _type = US.userInfo.type,
  787. _org = US.userInfo.org,
  788. _role = US.userInfo.role,
  789. _classId = US.userInfo.classid,
  790. _TscreenType = 1
  791. _screenType = 2,
  792. _SscreenType = 3;
  793. if (_type == 2 && _oid != "91305d49-01ba-11ed-8c78-005056b86db5") {
  794. switch (str) {
  795. case "studnetProject": //好友打开
  796. _formdiv = new U.UF.UI.form(
  797. "我的项目",
  798. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/project?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _SscreenType }), {
  799. "id": "studnetProject",
  800. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  801. "onresize": function () { }
  802. }, {
  803. closecallback: function () { }
  804. }, { "style": { "height": "36px" } }).form; //创建窗体
  805. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "我的项目", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  806. break;
  807. case "studentEvaluate": //好友打开
  808. _formdiv = new U.UF.UI.form(
  809. "我的评价",
  810. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/works?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  811. "id": "studentEvaluate",
  812. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  813. "onresize": function () { }
  814. }, {
  815. closecallback: function () { }
  816. }, { "style": { "height": "36px" } }).form; //创建窗体
  817. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "我的评价", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  818. break;
  819. case "my":
  820. _formdiv = new U.UF.UI.form(
  821. "我的资料",
  822. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/data?userid=" + _userid + "&org=" + _org }), {
  823. "id": "my",
  824. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  825. "onresize": function () { }
  826. }, {
  827. closecallback: function () { }
  828. }, { "style": { "height": "36px" } }).form; //创建窗体
  829. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  830. break;
  831. case "program":
  832. _formdiv = new U.UF.UI.form(
  833. "编程平台",
  834. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://x.cocorobo.cn" }), {
  835. "id": "program",
  836. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  837. "onresize": function () { }
  838. }, {
  839. closecallback: function () { }
  840. }, { "style": { "height": "36px" } }).form; //创建窗体
  841. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "编程平台", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  842. break;
  843. case "library":
  844. _formdiv = new U.UF.UI.form(
  845. "素材库",
  846. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/library?userid=" + _userid + "&org=" + _org }), {
  847. "id": "library",
  848. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  849. "onresize": function () { }
  850. }, {
  851. closecallback: function () { }
  852. }, { "style": { "height": "36px" } }).form; //创建窗体
  853. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  854. break;
  855. case "whiteboard":
  856. _formdiv = new U.UF.UI.form(
  857. "电子白板",
  858. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  859. "id": "whiteboard",
  860. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  861. "onresize": function () { }
  862. }, {
  863. closecallback: function () { }
  864. }, { "style": { "height": "36px" } }).form; //创建窗体
  865. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/whiteBoard.png)" }, "name": "电子白板", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  866. break;
  867. case "investigation":
  868. _formdiv = new U.UF.UI.form(
  869. "问卷调查",
  870. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/ask?userid=" + _userid + "&org=" + _org }), {
  871. "id": "investigation",
  872. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  873. "onresize": function () { }
  874. }, {
  875. closecallback: function () { }
  876. }, { "style": { "height": "36px" } }).form; //创建窗体
  877. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  878. break;
  879. case "note":
  880. _formdiv = new U.UF.UI.form(
  881. "便签分类",
  882. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/note?userid=" + _userid + "&org=" + _org }), {
  883. "id": "note",
  884. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  885. "onresize": function () { }
  886. }, {
  887. closecallback: function () { }
  888. }, { "style": { "height": "36px" } }).form; //创建窗体
  889. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  890. break;
  891. // case "score":
  892. // _formdiv = new U.UF.UI.form(
  893. // "量规评分",
  894. // $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "" }), {
  895. // "id": "score",
  896. // "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  897. // "onresize": function() {}
  898. // }, {
  899. // closecallback: function() {}
  900. // }, { "style": { "height": "36px" } }).form; //创建窗体
  901. // _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  902. // break;
  903. case "mind":
  904. _formdiv = new U.UF.UI.form(
  905. "思维导图",
  906. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  907. "id": "mind",
  908. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  909. "onresize": function () { }
  910. }, {
  911. closecallback: function () { }
  912. }, { "style": { "height": "36px" } }).form; //创建窗体
  913. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindMapping.png)" }, "name": "思维导图", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  914. break;
  915. case "doc":
  916. // U.MD.D.I.isRoom();
  917. _formdiv = new U.UF.UI.form(
  918. "协同文档",
  919. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), { //"/Office/Word/WordEditArea.htm"
  920. "id": "doc",
  921. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  922. "onresize": function () { }
  923. }, {
  924. closecallback: function () { }
  925. }, { "style": { "height": "36px" } }).form; //创建窗体
  926. // U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  927. // $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  928. // })
  929. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/doc.png)" }, "name": "协同文档", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  930. break;
  931. case "studentStudy":
  932. _formdiv = new U.UF.UI.form(
  933. "学习中心",
  934. $$("iframe", { "allow": "camera *; microphone *;display-capture","webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _SscreenType }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  935. "id": "studentStudy",
  936. "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
  937. "onresize": function () { }
  938. }, {
  939. closecallback: function () { }
  940. }, { "style": { "height": "36px" } }).form; //创建窗体
  941. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  942. break;
  943. case "train": //好友打开
  944. _formdiv = new U.UF.UI.form(
  945. "训练平台",
  946. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://xunlian.cocorobo.cn/" }), {
  947. "id": "train",
  948. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  949. "onresize": function () { }
  950. }, {
  951. closecallback: function () { }
  952. }, { "style": { "height": "36px" } }).form; //创建窗体
  953. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/trainPlatform.png)" }, "name": "训练平台", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  954. break;
  955. case "mindNetwork": //好友打开
  956. _formdiv = new U.UF.UI.form(
  957. "思维网格",
  958. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid + "&org=" + _org }), {
  959. "id": "mindNetwork",
  960. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  961. "onresize": function () { }
  962. }, {
  963. closecallback: function () { }
  964. }, { "style": { "height": "36px" } }).form; //创建窗体
  965. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindNetwork.png)" }, "name": "思维网格", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  966. break;
  967. case "studentClassRoom": //好友打开
  968. _formdiv = new U.UF.UI.form(
  969. "实时课堂",
  970. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/liveRoom?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  971. "id": "studentClassRoom",
  972. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  973. "onresize": function () { }
  974. }, {
  975. closecallback: function () { }
  976. }, { "style": { "height": "36px" } }).form; //创建窗体
  977. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/classRoom.png)" }, "name": "实时课堂", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  978. setTimeout(() => {
  979. U.UF.F.windowZooming(_formdiv)
  980. }, 0);
  981. break;
  982. }
  983. } else if (_type == 2 && _oid == "91305d49-01ba-11ed-8c78-005056b86db5") {
  984. switch (str) {
  985. case "studnetProject": //好友打开
  986. _formdiv = new U.UF.UI.form(
  987. "我的项目",
  988. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/project?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _SscreenType }), {
  989. "id": "studnetProject",
  990. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  991. "onresize": function () { }
  992. }, {
  993. closecallback: function () { }
  994. }, { "style": { "height": "36px" } }).form; //创建窗体
  995. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "我的项目", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  996. break;
  997. case "studentEvaluate": //好友打开
  998. _formdiv = new U.UF.UI.form(
  999. "我的评价",
  1000. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/works?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1001. "id": "studentEvaluate",
  1002. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  1003. "onresize": function () { }
  1004. }, {
  1005. closecallback: function () { }
  1006. }, { "style": { "height": "36px" } }).form; //创建窗体
  1007. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "我的评价", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1008. break;
  1009. case "my":
  1010. _formdiv = new U.UF.UI.form(
  1011. "我的资料",
  1012. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/data?userid=" + _userid + "&org=" + _org }), {
  1013. "id": "my",
  1014. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  1015. "onresize": function () { }
  1016. }, {
  1017. closecallback: function () { }
  1018. }, { "style": { "height": "36px" } }).form; //创建窗体
  1019. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1020. break;
  1021. case "program":
  1022. _formdiv = new U.UF.UI.form(
  1023. "编程平台",
  1024. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://x.cocorobo.cn" }), {
  1025. "id": "program",
  1026. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  1027. "onresize": function () { }
  1028. }, {
  1029. closecallback: function () { }
  1030. }, { "style": { "height": "36px" } }).form; //创建窗体
  1031. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "编程平台", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1032. break;
  1033. case "library":
  1034. _formdiv = new U.UF.UI.form(
  1035. "素材库",
  1036. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/library?userid=" + _userid + "&org=" + _org }), {
  1037. "id": "library",
  1038. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1039. "onresize": function () { }
  1040. }, {
  1041. closecallback: function () { }
  1042. }, { "style": { "height": "36px" } }).form; //创建窗体
  1043. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1044. break;
  1045. case "whiteboard":
  1046. _formdiv = new U.UF.UI.form(
  1047. "电子白板",
  1048. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  1049. "id": "whiteboard",
  1050. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1051. "onresize": function () { }
  1052. }, {
  1053. closecallback: function () { }
  1054. }, { "style": { "height": "36px" } }).form; //创建窗体
  1055. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/whiteBoard.png)" }, "name": "电子白板", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1056. break;
  1057. case "investigation":
  1058. _formdiv = new U.UF.UI.form(
  1059. "问卷调查",
  1060. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/ask?userid=" + _userid + "&org=" + _org }), {
  1061. "id": "investigation",
  1062. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1063. "onresize": function () { }
  1064. }, {
  1065. closecallback: function () { }
  1066. }, { "style": { "height": "36px" } }).form; //创建窗体
  1067. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1068. break;
  1069. case "note":
  1070. _formdiv = new U.UF.UI.form(
  1071. "便签分类",
  1072. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/note?userid=" + _userid + "&org=" + _org }), {
  1073. "id": "note",
  1074. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  1075. "onresize": function () { }
  1076. }, {
  1077. closecallback: function () { }
  1078. }, { "style": { "height": "36px" } }).form; //创建窗体
  1079. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1080. break;
  1081. // case "score":
  1082. // _formdiv = new U.UF.UI.form(
  1083. // "量规评分",
  1084. // $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "" }), {
  1085. // "id": "score",
  1086. // "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1087. // "onresize": function() {}
  1088. // }, {
  1089. // closecallback: function() {}
  1090. // }, { "style": { "height": "36px" } }).form; //创建窗体
  1091. // _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1092. // break;
  1093. case "mind":
  1094. _formdiv = new U.UF.UI.form(
  1095. "思维导图",
  1096. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  1097. "id": "mind",
  1098. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1099. "onresize": function () { }
  1100. }, {
  1101. closecallback: function () { }
  1102. }, { "style": { "height": "36px" } }).form; //创建窗体
  1103. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindMapping.png)" }, "name": "思维导图", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1104. break;
  1105. case "doc":
  1106. // U.MD.D.I.isRoom();
  1107. _formdiv = new U.UF.UI.form(
  1108. "协同文档",
  1109. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  1110. "id": "doc",
  1111. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1112. "onresize": function () { }
  1113. }, {
  1114. closecallback: function () { }
  1115. }, { "style": { "height": "36px" } }).form; //创建窗体
  1116. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  1117. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  1118. })
  1119. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/doc.png)" }, "name": "协同文档", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1120. break;
  1121. case "train": //好友打开
  1122. _formdiv = new U.UF.UI.form(
  1123. "训练平台",
  1124. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://xunlian.cocorobo.cn/" }), {
  1125. "id": "train",
  1126. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1127. "onresize": function () { }
  1128. }, {
  1129. closecallback: function () { }
  1130. }, { "style": { "height": "36px" } }).form; //创建窗体
  1131. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/trainPlatform.png)" }, "name": "训练平台", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1132. break;
  1133. case "studentStudy":
  1134. _formdiv = new U.UF.UI.form(
  1135. "学习中心",
  1136. $$("iframe", { "allow": "camera *; microphone *;display-capture","webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _SscreenType }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  1137. "id": "studentStudy",
  1138. "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
  1139. "onresize": function () { }
  1140. }, {
  1141. closecallback: function () { }
  1142. }, { "style": { "height": "36px" } }).form; //创建窗体
  1143. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1144. break;
  1145. case "mindNetwork": //好友打开
  1146. _formdiv = new U.UF.UI.form(
  1147. "思维网格",
  1148. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid + "&org=" + _org }), {
  1149. "id": "mindNetwork",
  1150. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1151. "onresize": function () { }
  1152. }, {
  1153. closecallback: function () { }
  1154. }, { "style": { "height": "36px" } }).form; //创建窗体
  1155. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindNetwork.png)" }, "name": "思维网格", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1156. break;
  1157. case "studentClassRoom": //好友打开
  1158. _formdiv = new U.UF.UI.form(
  1159. "实时课堂",
  1160. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/liveRoom?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1161. "id": "studentClassRoom",
  1162. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1163. "onresize": function () { }
  1164. }, {
  1165. closecallback: function () { }
  1166. }, { "style": { "height": "36px" } }).form; //创建窗体
  1167. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/classRoom.png)" }, "name": "实时课堂", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1168. setTimeout(() => {
  1169. U.UF.F.windowZooming(_formdiv)
  1170. }, 0);
  1171. break;
  1172. }
  1173. } else if ((_type == 1 || _type == 4) && _oid != "91305d49-01ba-11ed-8c78-005056b86db5") {
  1174. //选择应用处理
  1175. switch (str) {
  1176. case "project": //好友打开
  1177. _formdiv = new U.UF.UI.form(
  1178. "项目管理",
  1179. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/course?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1180. "id": "project",
  1181. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1182. "onresize": function () { }
  1183. }, {
  1184. closecallback: function () { }
  1185. }, { "style": { "height": "36px" } }).form; //创建窗体
  1186. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "项目管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1187. break;
  1188. case "student":
  1189. _formdiv = new U.UF.UI.form(
  1190. "学生管理",
  1191. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/student?userid=" + _userid + "&oid=" + _oid + "&cid=" + _classId + "&org=" + _org }), {
  1192. "id": "student",
  1193. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1194. "onresize": function () { }
  1195. }, {
  1196. closecallback: function () { }
  1197. }, { "style": { "height": "36px" } }).form; //创建窗体
  1198. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/student.png)" }, "name": "学生管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1199. break;
  1200. case "evaluate":
  1201. _formdiv = new U.UF.UI.form(
  1202. "学生评价",
  1203. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/works?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1204. "id": "evaluate",
  1205. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1206. "onresize": function () { }
  1207. }, {
  1208. closecallback: function () { }
  1209. }, { "style": { "height": "36px" } }).form; //创建窗体
  1210. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "学生评价", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1211. break;
  1212. case "sys":
  1213. _formdiv = new U.UF.UI.form(
  1214. "目标管理",
  1215. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/evaluation?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1216. "id": "sys",
  1217. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1218. "onresize": function () { }
  1219. }, {
  1220. closecallback: function () { }
  1221. }, { "style": { "height": "36px" } }).form; //创建窗体
  1222. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evalua.png)" }, "name": "目标管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1223. break;
  1224. case "courseDesign":
  1225. _formdiv = new U.UF.UI.form(
  1226. "课程设计",
  1227. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/course-design-vue" }), {
  1228. "id": "courseDesign",
  1229. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1230. "onresize": function () { }
  1231. }, {
  1232. closecallback: function () { }
  1233. }, { "style": { "height": "36px" } }).form; //创建窗体
  1234. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/courseDesign.png)" }, "name": "课程设计", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1235. break;
  1236. case "program":
  1237. _formdiv = new U.UF.UI.form(
  1238. "编程平台",
  1239. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://x.cocorobo.cn" }), {
  1240. "id": "program",
  1241. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  1242. "onresize": function () { }
  1243. }, {
  1244. closecallback: function () { }
  1245. }, { "style": { "height": "36px" } }).form; //创建窗体
  1246. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "编程平台", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1247. break;
  1248. case "class":
  1249. _formdiv = new U.UF.UI.form(
  1250. "班级管理",
  1251. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/class?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1252. "id": "class",
  1253. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1254. "onresize": function () { }
  1255. }, {
  1256. closecallback: function () { }
  1257. }, { "style": { "height": "36px" } }).form; //创建窗体
  1258. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/class.png)" }, "name": "班级管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1259. break;
  1260. case "my":
  1261. _formdiv = new U.UF.UI.form(
  1262. "我的资料",
  1263. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/data?userid=" + _userid + "&org=" + _org }), {
  1264. "id": "my",
  1265. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  1266. "onresize": function () { }
  1267. }, {
  1268. closecallback: function () { }
  1269. }, { "style": { "height": "36px" } }).form; //创建窗体
  1270. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1271. break;
  1272. case "notice":
  1273. _formdiv = new U.UF.UI.form(
  1274. "通知公告",
  1275. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/notice?userid=" + _userid + "&org=" + _org }), {
  1276. "id": "notice",
  1277. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1278. "onresize": function () { }
  1279. }, {
  1280. closecallback: function () { }
  1281. }, { "style": { "height": "36px" } }).form; //创建窗体
  1282. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/news.png)" }, "name": "通知公告", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1283. break;
  1284. case "library":
  1285. _formdiv = new U.UF.UI.form(
  1286. "素材库",
  1287. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/library?userid=" + _userid + "&org=" + _org }), {
  1288. "id": "library",
  1289. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1290. "onresize": function () { }
  1291. }, {
  1292. closecallback: function () { }
  1293. }, { "style": { "height": "36px" } }).form; //创建窗体
  1294. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1295. break;
  1296. case "whiteboard":
  1297. _formdiv = new U.UF.UI.form(
  1298. "电子白板",
  1299. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  1300. "id": "whiteboard",
  1301. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1302. "onresize": function () { }
  1303. }, {
  1304. closecallback: function () { }
  1305. }, { "style": { "height": "36px" } }).form; //创建窗体
  1306. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/whiteBoard.png)" }, "name": "电子白板", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1307. break;
  1308. case "investigation":
  1309. _formdiv = new U.UF.UI.form(
  1310. "问卷调查",
  1311. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/ask?userid=" + _userid + "&org=" + _org }), {
  1312. "id": "investigation",
  1313. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1314. "onresize": function () { }
  1315. }, {
  1316. closecallback: function () { }
  1317. }, { "style": { "height": "36px" } }).form; //创建窗体
  1318. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1319. break;
  1320. case "note":
  1321. _formdiv = new U.UF.UI.form(
  1322. "便签分类",
  1323. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/note?userid=" + _userid + "&org=" + _org }), {
  1324. "id": "note",
  1325. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  1326. "onresize": function () { }
  1327. }, {
  1328. closecallback: function () { }
  1329. }, { "style": { "height": "36px" } }).form; //创建窗体
  1330. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1331. break;
  1332. // case "score":
  1333. // _formdiv = new U.UF.UI.form(
  1334. // "量规评分",
  1335. // $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "" }), {
  1336. // "id": "score",
  1337. // "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1338. // "onresize": function() {}
  1339. // }, {
  1340. // closecallback: function() {}
  1341. // }, { "style": { "height": "36px" } }).form; //创建窗体
  1342. // _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
  1343. // break;
  1344. case "mind":
  1345. _formdiv = new U.UF.UI.form(
  1346. "思维导图",
  1347. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  1348. "id": "mind",
  1349. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1350. "onresize": function () { }
  1351. }, {
  1352. closecallback: function () { }
  1353. }, { "style": { "height": "36px" } }).form; //创建窗体
  1354. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindMapping.png)" }, "name": "思维导图", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1355. break;
  1356. case "doc":
  1357. // U.MD.D.I.isRoom();
  1358. _formdiv = new U.UF.UI.form(
  1359. "协同文档",
  1360. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  1361. "id": "doc",
  1362. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1363. "onresize": function () { }
  1364. }, {
  1365. closecallback: function () { }
  1366. }, { "style": { "height": "36px" } }).form; //创建窗体
  1367. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  1368. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  1369. })
  1370. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/doc.png)" }, "name": "协同文档", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1371. break;
  1372. case "study":
  1373. _formdiv = new U.UF.UI.form(
  1374. "学习中心",
  1375. $$("iframe", { "allow": "camera *; microphone *;display-capture","webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _TscreenType }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  1376. "id": "study",
  1377. "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
  1378. "onresize": function () { }
  1379. }, {
  1380. closecallback: function () { }
  1381. }, { "style": { "height": "36px" } }).form; //创建窗体
  1382. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1383. break;
  1384. case "mindNetwork": //好友打开
  1385. _formdiv = new U.UF.UI.form(
  1386. "思维网格",
  1387. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid + "&org=" + _org }), {
  1388. "id": "mindNetwork",
  1389. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1390. "onresize": function () { }
  1391. }, {
  1392. closecallback: function () { }
  1393. }, { "style": { "height": "36px" } }).form; //创建窗体
  1394. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindNetwork.png)" }, "name": "思维网格", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1395. break;
  1396. case "train": //好友打开
  1397. _formdiv = new U.UF.UI.form(
  1398. "训练平台",
  1399. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://xunlian.cocorobo.cn/" }), {
  1400. "id": "mindNetwork",
  1401. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1402. "onresize": function () { }
  1403. }, {
  1404. closecallback: function () { }
  1405. }, { "style": { "height": "36px" } }).form; //创建窗体
  1406. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/trainPlatform.png)" }, "name": "训练平台", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1407. break;
  1408. case "teacherClassRoom": //好友打开
  1409. _formdiv = new U.UF.UI.form(
  1410. "实时课堂",
  1411. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/classRoom?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1412. "id": "teacherClassRoom",
  1413. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1414. "onresize": function () { }
  1415. }, {
  1416. closecallback: function () { }
  1417. }, { "style": { "height": "36px" } }).form; //创建窗体
  1418. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/classRoom.png)" }, "name": "实时课堂", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1419. setTimeout(() => {
  1420. U.UF.F.windowZooming(_formdiv)
  1421. }, 0);
  1422. break;
  1423. }
  1424. } else if ((_type == 1 || _type == 4) && _oid == "91305d49-01ba-11ed-8c78-005056b86db5") {
  1425. switch (str) {
  1426. case "project": //好友打开
  1427. _formdiv = new U.UF.UI.form(
  1428. "项目管理",
  1429. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/course?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1430. "id": "project",
  1431. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1432. "onresize": function () { }
  1433. }, {
  1434. closecallback: function () { }
  1435. }, { "style": { "height": "36px" } }).form; //创建窗体
  1436. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "项目管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1437. break;
  1438. case "evaluate":
  1439. _formdiv = new U.UF.UI.form(
  1440. "学生评价",
  1441. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/works?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1442. "id": "evaluate",
  1443. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1444. "onresize": function () { }
  1445. }, {
  1446. closecallback: function () { }
  1447. }, { "style": { "height": "36px" } }).form; //创建窗体
  1448. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "学生评价", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1449. break;
  1450. case "notice":
  1451. _formdiv = new U.UF.UI.form(
  1452. "通知公告",
  1453. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/notice?userid=" + _userid + "&org=" + _org }), {
  1454. "id": "notice",
  1455. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1456. "onresize": function () { }
  1457. }, {
  1458. closecallback: function () { }
  1459. }, { "style": { "height": "36px" } }).form; //创建窗体
  1460. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/news.png)" }, "name": "通知公告", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1461. break;
  1462. case "stuLibrary":
  1463. _formdiv = new U.UF.UI.form(
  1464. "学习资料",
  1465. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/studyLibrary?userid=" + _userid + "&org=" + _org }), {
  1466. "id": "stuLibrary",
  1467. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1468. "onresize": function () { }
  1469. }, {
  1470. closecallback: function () { }
  1471. }, { "style": { "height": "36px" } }).form; //创建窗体
  1472. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/stuLibrary.png)" }, "name": "学习资料", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1473. break;
  1474. case "program":
  1475. _formdiv = new U.UF.UI.form(
  1476. "编程平台",
  1477. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://x.cocorobo.cn" }), {
  1478. "id": "program",
  1479. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  1480. "onresize": function () { }
  1481. }, {
  1482. closecallback: function () { }
  1483. }, { "style": { "height": "36px" } }).form; //创建窗体
  1484. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "编程平台", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1485. break;
  1486. case "whiteboard":
  1487. _formdiv = new U.UF.UI.form(
  1488. "电子白板",
  1489. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://iwb.cocorobo.cn/" }), {
  1490. "id": "whiteboard",
  1491. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1492. "onresize": function () { }
  1493. }, {
  1494. closecallback: function () { }
  1495. }, { "style": { "height": "36px" } }).form; //创建窗体
  1496. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/whiteBoard.png)" }, "name": "电子白板", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1497. break;
  1498. case "investigation":
  1499. _formdiv = new U.UF.UI.form(
  1500. "问卷调查",
  1501. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/ask?userid=" + _userid + "&org=" + _org }), {
  1502. "id": "investigation",
  1503. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1504. "onresize": function () { }
  1505. }, {
  1506. closecallback: function () { }
  1507. }, { "style": { "height": "36px" } }).form; //创建窗体
  1508. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1509. break;
  1510. case "mind":
  1511. _formdiv = new U.UF.UI.form(
  1512. "思维导图",
  1513. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/kityminder-editor/dist/index.html" }), { //"/jsmind/example/demo.html"
  1514. "id": "mind",
  1515. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1516. "onresize": function () { }
  1517. }, {
  1518. closecallback: function () { }
  1519. }, { "style": { "height": "36px" } }).form; //创建窗体
  1520. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindMapping.png)" }, "name": "思维导图", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1521. break;
  1522. case "doc":
  1523. // U.MD.D.I.isRoom();
  1524. _formdiv = new U.UF.UI.form(
  1525. "协同文档",
  1526. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  1527. "id": "doc",
  1528. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1529. "onresize": function () { }
  1530. }, {
  1531. closecallback: function () { }
  1532. }, { "style": { "height": "36px" } }).form; //创建窗体
  1533. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  1534. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  1535. })
  1536. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/doc.png)" }, "name": "协同文档", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1537. break;
  1538. case "study":
  1539. _formdiv = new U.UF.UI.form(
  1540. "学习中心",
  1541. $$("iframe", { "allow": "camera *; microphone *;display-capture","webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _TscreenType }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  1542. "id": "study",
  1543. "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
  1544. "onresize": function () { }
  1545. }, {
  1546. closecallback: function () { }
  1547. }, { "style": { "height": "36px" } }).form; //创建窗体
  1548. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1549. break;
  1550. case "mindNetwork": //好友打开
  1551. _formdiv = new U.UF.UI.form(
  1552. "思维网格",
  1553. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid + "&org=" + _org }), {
  1554. "id": "mindNetwork",
  1555. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1556. "onresize": function () { }
  1557. }, {
  1558. closecallback: function () { }
  1559. }, { "style": { "height": "36px" } }).form; //创建窗体
  1560. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindNetwork.png)" }, "name": "思维网格", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1561. break;
  1562. case "train": //好友打开
  1563. _formdiv = new U.UF.UI.form(
  1564. "训练平台",
  1565. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://xunlian.cocorobo.cn/" }), {
  1566. "id": "train",
  1567. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1568. "onresize": function () { }
  1569. }, {
  1570. closecallback: function () { }
  1571. }, { "style": { "height": "36px" } }).form; //创建窗体
  1572. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/trainPlatform.png)" }, "name": "训练平台", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1573. break;
  1574. case "sys":
  1575. _formdiv = new U.UF.UI.form(
  1576. "目标管理",
  1577. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/evaluation?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1578. "id": "sys",
  1579. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1580. "onresize": function () { }
  1581. }, {
  1582. closecallback: function () { }
  1583. }, { "style": { "height": "36px" } }).form; //创建窗体
  1584. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evalua.png)" }, "name": "目标管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1585. break;
  1586. case "courseDesign":
  1587. _formdiv = new U.UF.UI.form(
  1588. "课程设计",
  1589. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/course-design-vue" }), {
  1590. "id": "courseDesign",
  1591. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1592. "onresize": function () { }
  1593. }, {
  1594. closecallback: function () { }
  1595. }, { "style": { "height": "36px" } }).form; //创建窗体
  1596. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/courseDesign.png)" }, "name": "课程设计", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1597. break;
  1598. }
  1599. } else if (!_type) {
  1600. switch (str) {
  1601. case "my":
  1602. _formdiv = new U.UF.UI.form(
  1603. "我的资料",
  1604. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/data?userid=" + _userid + "&org=" + _org }), {
  1605. "id": "my",
  1606. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  1607. "onresize": function () { }
  1608. }, {
  1609. closecallback: function () { }
  1610. }, { "style": { "height": "36px" } }).form; //创建窗体
  1611. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1612. break;
  1613. }
  1614. }
  1615. switch (str) {
  1616. // AIprogram2 AI体验 aihub.cocorobo.cn
  1617. // Pythonprogram Python编程 python-blockly.cocorobo.cn
  1618. // AIprogram AI编程 ai-blockly.cocorobo.cn
  1619. case "AIprogram2": //AI体验
  1620. _formdiv = new U.UF.UI.form(
  1621. "AI体验",
  1622. $$("iframe", { "frameborder": "no", "allow": "camera", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://aihub.cocorobo.cn/" }), {
  1623. "id": "AIprogram2",
  1624. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  1625. "onresize": function () { }
  1626. }, {
  1627. closecallback: function () { }
  1628. }, { "style": { "height": "36px" } }).form; //创建窗体
  1629. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/AIprogram2.png)" }, "name": "AI体验", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1630. break;
  1631. case "Pythonprogram": //python编程
  1632. _formdiv = new U.UF.UI.form(
  1633. "Python编程",
  1634. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://python-blockly.cocorobo.cn/" }), {
  1635. "id": "Pythonprogram",
  1636. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  1637. "onresize": function () { }
  1638. }, {
  1639. closecallback: function () { }
  1640. }, { "style": { "height": "36px" } }).form; //创建窗体
  1641. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/Pythonprogram.png)" }, "name": "Python编程", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1642. break;
  1643. case "AIprogram": //ai编程
  1644. _formdiv = new U.UF.UI.form(
  1645. "AI编程平台",
  1646. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://ai-blockly.cocorobo.cn/?lang=zh-hans" }), {
  1647. "id": "AIprogram",
  1648. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  1649. "onresize": function () { }
  1650. }, {
  1651. closecallback: function () { }
  1652. }, { "style": { "height": "36px" } }).form; //创建窗体
  1653. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/AIprogram.png)" }, "name": "AI编程平台", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1654. break;
  1655. case "resources": //国家教育
  1656. _formdiv = new U.UF.UI.form(
  1657. "国家教育",
  1658. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://so.eduyun.cn/synResource" }), {
  1659. "id": "resources",
  1660. "style": { "width": "80%", "height": "90%", "overflow": 'hidden' },
  1661. "onresize": function () { }
  1662. }, {
  1663. closecallback: function () { }
  1664. }, { "style": { "height": "36px" } }).form; //创建窗体
  1665. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/resources.png)" }, "name": "国家教育", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1666. break;
  1667. case "codeEdit": //源码编辑
  1668. _formdiv = new U.UF.UI.form(
  1669. "源码编辑",
  1670. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://kitten.codemao.cn/" }), {
  1671. "id": "codeEdit",
  1672. "style": { "width": "80%", "height": "90%", "overflow": 'hidden' },
  1673. "onresize": function () { }
  1674. }, {
  1675. closecallback: function () { }
  1676. }, { "style": { "height": "36px" } }).form; //创建窗体
  1677. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/code.png)" }, "name": "源码编辑", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1678. break; //
  1679. case "MindMap": //MindMap
  1680. _formdiv = new U.UF.UI.form(
  1681. "MindMap",
  1682. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "//cloud.cocorobo.cn/mind/" }), {
  1683. "id": "MindMap",
  1684. "style": { "width": "80%", "height": "90%", "overflow": 'hidden' },
  1685. "onresize": function () { }
  1686. }, {
  1687. closecallback: function () { }
  1688. }, { "style": { "height": "36px" } }).form; //创建窗体
  1689. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/MIndMap.png)" }, "name": "MindMap", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1690. break;
  1691. case "netWorkPanel": //netWorkPanel
  1692. _formdiv = new U.UF.UI.form(
  1693. "netWorkPanel",
  1694. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "//www.netpad.net.cn/svg.html" }), {
  1695. "id": "netWorkPanel",
  1696. "style": { "width": "80%", "height": "90%", "overflow": 'hidden' },
  1697. "onresize": function () { }
  1698. }, {
  1699. closecallback: function () { }
  1700. }, { "style": { "height": "36px" } }).form; //创建窗体
  1701. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/netWorkPanel.png)" }, "name": "netWorkPanel", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1702. break;
  1703. case "GeoGebra": //GeoGebra
  1704. _formdiv = new U.UF.UI.form(
  1705. "GeoGebra",
  1706. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "//www.geogebra.org/calculator" }), {
  1707. "id": "GeoGebra",
  1708. "style": { "width": "80%", "height": "90%", "overflow": 'hidden' },
  1709. "onresize": function () { }
  1710. }, {
  1711. closecallback: function () { }
  1712. }, { "style": { "height": "36px" } }).form; //创建窗体
  1713. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/GeoGebra.png)" }, "name": "GeoGebra", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1714. break;
  1715. case "translation": //翻译
  1716. _formdiv = new U.UF.UI.form(
  1717. "翻译",
  1718. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "//dict.youdao.com/" }), {
  1719. "id": "translation",
  1720. "style": { "width": "80%", "height": "90%", "overflow": 'hidden' },
  1721. "onresize": function () { }
  1722. }, {
  1723. closecallback: function () { }
  1724. }, { "style": { "height": "36px" } }).form; //创建窗体
  1725. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/translation.png)" }, "name": "翻译", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1726. break;
  1727. case "mohe": //魔盒
  1728. _formdiv = new U.UF.UI.form(
  1729. "魔盒识字",
  1730. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "//games.cocorobo.cn/view/index.html#/" }), {
  1731. "id": "mohe",
  1732. "style": { "width": "375px", "height": "667px", "overflow": 'hidden' },
  1733. "onresize": function () { }
  1734. }, {
  1735. closecallback: function () { }
  1736. }, { "style": { "height": "36px" } }).form; //创建窗体
  1737. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mohe.png)" }, "name": "魔盒识字", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1738. break;
  1739. case "24game": //24点
  1740. _formdiv = new U.UF.UI.form(
  1741. "24点",
  1742. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "//24.cocorobo.cn/#/index" }), {
  1743. "id": "24game",
  1744. "style": { "width": "375px", "height": "667px", "overflow": 'hidden' },
  1745. "onresize": function () { }
  1746. }, {
  1747. closecallback: function () { }
  1748. }, { "style": { "height": "36px" } }).form; //创建窗体
  1749. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/24game.png)" }, "name": "24点", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1750. break;
  1751. case "case":
  1752. _formdiv = new U.UF.UI.form(
  1753. "项目进展",
  1754. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/CaseDesign?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1755. "id": "case",
  1756. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1757. "onresize": function () { }
  1758. }, {
  1759. closecallback: function () { }
  1760. }, { "style": { "height": "36px" } }).form; //创建窗体
  1761. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/case.png)" }, "name": "项目进展", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1762. break;
  1763. case "snf":
  1764. _formdiv = new U.UF.UI.form(
  1765. "赛诺梵",
  1766. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "//try.cynovan.com/standard/?trial=true&data=%7B%22username%22%3A%22cynovanDemo%22%2C%22password%22%3A%22cynovanDemo%22%7D&redirect_uri=http://janus.cynovan.com/#/app/workflow/menu/1/r/6343ce2ac00fa32609d1f91b" }), {
  1767. "id": "snf",
  1768. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1769. "onresize": function () { }
  1770. }, {
  1771. closecallback: function () { }
  1772. }, { "style": { "height": "36px" } }).form; //创建窗体
  1773. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/snf.png)" }, "name": "赛诺梵", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1774. break;
  1775. case "hanFamily":
  1776. _formdiv = new U.UF.UI.form(
  1777. "汉字家族",
  1778. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://school.hanzigon.cn/?appid=734714090237947#/hzjz" }), {
  1779. "id": "hanFamily",
  1780. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1781. "onresize": function () { }
  1782. }, {
  1783. closecallback: function () { }
  1784. }, { "style": { "height": "36px" } }).form; //创建窗体
  1785. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/hanFamily.png)" }, "name": "汉字家族", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1786. break;
  1787. case "hanClassics":
  1788. _formdiv = new U.UF.UI.form(
  1789. "国学经典",
  1790. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://school.hanzigon.cn/?appid=734714090237947#/gxjd" }), {
  1791. "id": "hanClassics",
  1792. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1793. "onresize": function () { }
  1794. }, {
  1795. closecallback: function () { }
  1796. }, { "style": { "height": "36px" } }).form; //创建窗体
  1797. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/hanClassics.png)" }, "name": "国学经典", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1798. break;
  1799. case "hanTraining":
  1800. _formdiv = new U.UF.UI.form(
  1801. "笔画训练",
  1802. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://school.hanzigon.cn/?appid=734714090237947#/bhxl" }), {
  1803. "id": "hanTraining",
  1804. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1805. "onresize": function () { }
  1806. }, {
  1807. closecallback: function () { }
  1808. }, { "style": { "height": "36px" } }).form; //创建窗体
  1809. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/hanTraining.png)" }, "name": "笔画训练", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1810. break;
  1811. case "hanClass":
  1812. _formdiv = new U.UF.UI.form(
  1813. "书法课堂",
  1814. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://school.hanzigon.cn/?appid=734714090237947#/sfkt" }), {
  1815. "id": "hanClass",
  1816. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1817. "onresize": function () { }
  1818. }, {
  1819. closecallback: function () { }
  1820. }, { "style": { "height": "36px" } }).form; //创建窗体
  1821. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/hanClass.png)" }, "name": "书法课堂", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1822. break;
  1823. case "han":
  1824. _formdiv = new U.UF.UI.form(
  1825. "汉字宫",
  1826. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://school.hanzigon.cn/?appid=734714090237947#/home" }), {
  1827. "id": "han",
  1828. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1829. "onresize": function () { }
  1830. }, {
  1831. closecallback: function () { }
  1832. }, { "style": { "height": "36px" } }).form; //创建窗体
  1833. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/han.png)" }, "name": "汉字宫", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1834. break;
  1835. case "projectGM": //项目管理
  1836. _formdiv = new U.UF.UI.form(
  1837. "项目管理",
  1838. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/course?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1839. "id": "projectGM",
  1840. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1841. "onresize": function () { }
  1842. }, {
  1843. closecallback: function () { }
  1844. }, { "style": { "height": "36px" } }).form; //创建窗体
  1845. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/courseMange.png)" }, "name": "项目管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1846. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/courseGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org, "项目管理", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1847. break;
  1848. case "studyGM"://学习中心
  1849. _formdiv = new U.UF.UI.form(
  1850. "学习中心",
  1851. $$("iframe", { "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _TscreenType }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  1852. "id": "study",
  1853. "style": { "width": "100%", "height": "100%", "overflow": 'hidden' },
  1854. "onresize": function () { }
  1855. }, {
  1856. closecallback: function () { }
  1857. }, { "style": { "height": "36px" } }).form; //创建窗体
  1858. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/learning.png)" }, "name": "学习中心", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1859. // window.open(US.Config.bpbl + "/pbl-student-table/dist/#/indexGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&tType=" + _type + "&cid=" + _classId + "&screenType=" + _TscreenType, "学习中心", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1860. break;
  1861. // studentGM
  1862. case "studentGM"://学生管理
  1863. _formdiv = new U.UF.UI.form(
  1864. "学生管理",
  1865. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/studentGM?userid=" + _userid + "&oid=" + _oid + "&cid=" + _classId + "&org=" + _org }), {
  1866. "id": "studentGM",
  1867. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1868. "onresize": function () { }
  1869. }, {
  1870. closecallback: function () { }
  1871. }, { "style": { "height": "36px" } }).form; //创建窗体
  1872. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/student.png)" }, "name": "学生管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1873. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/studentGM?userid=" + _userid + "&oid=" + _oid + "&cid=" + _classId + "&org=" + _org, "学生管理", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1874. break;
  1875. case "evaluateGM"://学生评价
  1876. _formdiv = new U.UF.UI.form(
  1877. "学生评价",
  1878. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/worksGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1879. "id": "evaluateGM",
  1880. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1881. "onresize": function () { }
  1882. }, {
  1883. closecallback: function () { }
  1884. }, { "style": { "height": "36px" } }).form; //创建窗体
  1885. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/evaluate.png)" }, "name": "学生评价", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1886. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/worksGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org, "学生评价", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1887. break;
  1888. // classGM
  1889. case "classGM"://班级管理
  1890. _formdiv = new U.UF.UI.form(
  1891. "班级管理",
  1892. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/classGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1893. "id": "classGM",
  1894. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1895. "onresize": function () { }
  1896. }, {
  1897. closecallback: function () { }
  1898. }, { "style": { "height": "36px" } }).form; //创建窗体
  1899. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/class.png)" }, "name": "班级管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1900. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/classGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org, "班级管理", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1901. break;
  1902. // dataGM
  1903. case "dataGM":
  1904. _formdiv = new U.UF.UI.form(
  1905. "我的资料",
  1906. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/dataGM?userid=" + _userid + "&org=" + _org }), {
  1907. "id": "dataGM",
  1908. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  1909. "onresize": function () { }
  1910. }, {
  1911. closecallback: function () { }
  1912. }, { "style": { "height": "36px" } }).form; //创建窗体
  1913. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/data.png)" }, "name": "我的资料", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1914. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/dataGM?userid=" + _userid + "&org=" + _org, "我的资料", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1915. break;
  1916. // caseGM
  1917. case "caseGM"://项目进展
  1918. _formdiv = new U.UF.UI.form(
  1919. "项目进展",
  1920. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/CaseDesignGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1921. "id": "caseGM",
  1922. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1923. "onresize": function () { }
  1924. }, {
  1925. closecallback: function () { }
  1926. }, { "style": { "height": "36px" } }).form; //创建窗体
  1927. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/case.png)" }, "name": "项目进展", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1928. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/CaseDesignGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org, "项目进展", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1929. break;
  1930. // meterialGM
  1931. case "meterialGM"://素材库
  1932. _formdiv = new U.UF.UI.form(
  1933. "素材库",
  1934. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/libraryGM?userid=" + _userid + "&org=" + _org }), {
  1935. "id": "meterialGM",
  1936. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1937. "onresize": function () { }
  1938. }, {
  1939. closecallback: function () { }
  1940. }, { "style": { "height": "36px" } }).form; //创建窗体
  1941. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/material.png)" }, "name": "素材库", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1942. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/libraryGM?userid=" + _userid + "&org=" + _org, "素材库", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1943. break;
  1944. // evaluateSGM
  1945. case "evaluateSGM": //我的评价
  1946. _formdiv = new U.UF.UI.form(
  1947. "我的评价",
  1948. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-student-table/dist/#/worksGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1949. "id": "evaluateSGM",
  1950. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  1951. "onresize": function () { }
  1952. }, {
  1953. closecallback: function () { }
  1954. }, { "style": { "height": "36px" } }).form; //创建窗体
  1955. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/evaluate.png)" }, "name": "我的评价", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1956. // window.open(US.Config.bpbl + "/pbl-student-table/dist/#/worksGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org, "我的评价", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1957. break;
  1958. case "schoolGM": //学校管理
  1959. _formdiv = new U.UF.UI.form(
  1960. "学校管理",
  1961. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/schoolGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1962. "id": "schoolGM",
  1963. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1964. "onresize": function () { }
  1965. }, {
  1966. closecallback: function () { }
  1967. }, { "style": { "height": "36px" } }).form; //创建窗体
  1968. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/school.png)" }, "name": "学校管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1969. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/schoolGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org, "学校管理", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1970. break;
  1971. case "teacherGM": //教师管理
  1972. _formdiv = new U.UF.UI.form(
  1973. "教师管理",
  1974. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/teacherGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1975. "id": "teacherGM",
  1976. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1977. "onresize": function () { }
  1978. }, {
  1979. closecallback: function () { }
  1980. }, { "style": { "height": "36px" } }).form; //创建窗体
  1981. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/teacher.png)" }, "name": "教师管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1982. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/teacherGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org, "教师管理", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1983. break;
  1984. case "examineGM": //教师管理
  1985. _formdiv = new U.UF.UI.form(
  1986. "项目审核",
  1987. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/examineGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org }), {
  1988. "id": "examineGM",
  1989. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  1990. "onresize": function () { }
  1991. }, {
  1992. closecallback: function () { }
  1993. }, { "style": { "height": "36px" } }).form; //创建窗体
  1994. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/examine.png)" }, "name": "项目审核", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  1995. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/examineGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org, "项目审核", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  1996. break;
  1997. case "messageGM": //消息通知
  1998. _formdiv = new U.UF.UI.form(
  1999. "消息通知",
  2000. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/noticeGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role }), {
  2001. "id": "messageGM",
  2002. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  2003. "onresize": function () { }
  2004. }, {
  2005. closecallback: function () { }
  2006. }, { "style": { "height": "36px" } }).form; //创建窗体
  2007. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gm/examine.png)" }, "name": "消息通知", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  2008. // window.open(US.Config.bpbl + "/pbl-teacher-table/dist/#/noticeGM?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role, "消息通知", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  2009. break;
  2010. case "gpbl": //消息通知
  2011. _formdiv = new U.UF.UI.form(
  2012. "案例征集",
  2013. $$("iframe", { "allow": "camera *; microphone *;display-capture;midi;encrypted-media;", "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "","frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pblgm.cocorobo.cn/#/login?userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&role=" + _role }), {
  2014. "id": "gpbl",
  2015. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  2016. "onresize": function () { }
  2017. }, {
  2018. closecallback: function () { }
  2019. }, { "style": { "height": "36px" } }).form; //创建窗体
  2020. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/gpbl2.png)" }, "name": "案例征集", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  2021. // window.open("https://gdpbl.cocorobo.cn/#/login", "案例征集", "height=" + US.height + ", width=" + US.width + ", top=100, left=100, toolbar=no, menubar=0, resizable=0, location=0, status=no");
  2022. break;
  2023. }
  2024. //U.MD.D.I.openClick(str);
  2025. //如果有任务栏信息
  2026. if (_taskbar) {
  2027. U.MD.D.T.taskbar(_taskbar); //创建任务处理
  2028. }
  2029. }
  2030. // U.MD.D.I.openClick = function(str){
  2031. // var click = '';
  2032. // switch(str){
  2033. // case 'friend':
  2034. // click = '我的好友';
  2035. // break;
  2036. // case 'domain':
  2037. // click = '域名管理';
  2038. // break;
  2039. // case 'disk':
  2040. // click = '我的云盘';
  2041. // break;
  2042. // case 'word':
  2043. // click = 'Word';
  2044. // break;
  2045. // case 'excel':
  2046. // click = 'Execl';
  2047. // break;
  2048. // case 'txt':
  2049. // click = '文本文件';
  2050. // break;
  2051. // case 'lookupFriend':
  2052. // click = '查找好友';
  2053. // break;
  2054. // case 'ftp':
  2055. // click = 'FTP';
  2056. // break;
  2057. // case 'group':
  2058. // click = '群组';
  2059. // break;
  2060. // case 'set':
  2061. // click = '我的设置';
  2062. // break;
  2063. // case 'systemSet':
  2064. // click = '系统设置';
  2065. // break;
  2066. // case 'boomYun':
  2067. // click = '互联办公';
  2068. // break;
  2069. // case 'xz':
  2070. // click = '云端下载';
  2071. // break;
  2072. // case 'client':
  2073. // click = '有思浏览器';
  2074. // break;
  2075. // case 'backEndProgramming':
  2076. // click = '在线后台编程';
  2077. // break;
  2078. // case 'frontEndProgramming':
  2079. // click = '在线前端编程';
  2080. // break;
  2081. // default: break;
  2082. // }
  2083. // if(U.MD.D.I.Ip && click){
  2084. // var clickUrl = ':12588/useClick.php?name=' + click + '&ip=' + U.MD.D.I.Ip;
  2085. // U.MD.D.I.Mysqlrequest(clickUrl,function(data){
  2086. // })
  2087. // }
  2088. // }
  2089. /**
  2090. *函数作用:ajax简易函数,使用post格式
  2091. *@param url {data} 后台地址
  2092. *@param data {data} 参数json
  2093. *@param fn {data} 回调函数
  2094. *
  2095. */
  2096. // U.MD.D.I.Mysqlrequest = function(url,fn){
  2097. // var xhr = new XMLHttpRequest();
  2098. // xhr.open("GET",url,true);
  2099. // xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  2100. // xhr.onreadystatechange = function(){
  2101. // if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 304)){
  2102. // fn.call(this,xhr.responseText);
  2103. // }
  2104. // };
  2105. // xhr.send();
  2106. // }
  2107. /*判断是否是内网IP*/
  2108. // U.MD.D.I.isInnerIPFn = function(str){
  2109. // var curPageUrl = str;
  2110. // var reg1 = /(http|ftp|https|www):\/\//g;//去掉前缀
  2111. // curPageUrl =curPageUrl.replace(reg1,'');
  2112. // // console.log('curPageUrl-1 '+curPageUrl);
  2113. // var reg2 = /\:+/g;//替换冒号为一点
  2114. // curPageUrl =curPageUrl.replace(reg2,'.');
  2115. // // console.log('curPageUrl-2 '+curPageUrl);
  2116. // curPageUrl = curPageUrl.split('.');//通过一点来划分数组
  2117. // var ipAddress = curPageUrl[0]+'.'+curPageUrl[1]+'.'+curPageUrl[2]+'.'+curPageUrl[3];
  2118. // if(curPageUrl[2] != '16'){
  2119. // return ipAddress;
  2120. // }else{
  2121. // return false;
  2122. // }
  2123. // }
  2124. // U.MD.D.I.getUserIP = function(onNewIP) { // onNewIp - your listener function for new IPs
  2125. // //compatibility for firefox and chrome
  2126. // var myPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
  2127. // var pc = new myPeerConnection({
  2128. // iceServers: []
  2129. // }),
  2130. // noop = function() {},
  2131. // localIPs = {},
  2132. // ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g,
  2133. // key;
  2134. // function iterateIP(ip) {
  2135. // if (!localIPs[ip]) onNewIP(ip);
  2136. // localIPs[ip] = true;
  2137. // }
  2138. // //create a bogus data channel
  2139. // pc.createDataChannel("");
  2140. // // create offer and set local description
  2141. // pc.createOffer().then(function(sdp) {
  2142. // sdp.sdp.split('\n').forEach(function(line) {
  2143. // if (line.indexOf('candidate') < 0) return;
  2144. // line.match(ipRegex).forEach(iterateIP);
  2145. // });
  2146. // pc.setLocalDescription(sdp, noop, noop);
  2147. // }).catch(function(reason) {
  2148. // // An error occurred, so handle the failure to connect
  2149. // });
  2150. // //sten for candidate events
  2151. // pc.onicecandidate = function(ice) {
  2152. // if (!ice || !ice.candidate || !ice.candidate.candidate || !ice.candidate.candidate.match(ipRegex)) return;
  2153. // ice.candidate.candidate.match(ipRegex).forEach(iterateIP);
  2154. // };
  2155. // }
  2156. // U.MD.D.I.getUserIpBool = function(callback){
  2157. // U.MD.D.I.getUserIP(function(ip){
  2158. // alert("Got IP! :" + ip);
  2159. // });
  2160. //}
  2161. //#endregion
  2162. U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
  2163. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  2164. _formdiv, //创建任务栏时同时弹出的窗体元素。
  2165. _userinfo = US.userInfo, //登录用户信息
  2166. _userid = US.userInfo.userid //登录用户id
  2167. let _iframe;
  2168. let _cid = cid,
  2169. _stage = stage,
  2170. _task = task,
  2171. _tool = tool;
  2172. var _jie = $$("div", {
  2173. "style": {
  2174. "position": "absolute",
  2175. "bottom": "50px",
  2176. "right": "50px",
  2177. "zIndex": "9999",
  2178. "backgroundColor": "#2268bc",
  2179. "color": "#fff",
  2180. "padding": "12px 20px",
  2181. "cursor": "pointer",
  2182. "borderRadius": "4px",
  2183. },
  2184. "innerHTML": "提交作业"
  2185. })
  2186. let aTool = ''
  2187. let _loading = document.createElement('div')
  2188. _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
  2189. // _loading.id = "";
  2190. let _lchild = document.createElement('div')
  2191. let _limg = document.createElement('img')
  2192. _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
  2193. _limg.style = "width: 26px;margin-right: 10px;"
  2194. _lchild.appendChild(_limg)
  2195. let _lspan = document.createElement('span')
  2196. _lspan.innerHTML = "上传中..."
  2197. _lchild.appendChild(_lspan)
  2198. _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
  2199. _loading.appendChild(_lchild)
  2200. var _box = $$('div', {
  2201. "style": {
  2202. "position": "relative",
  2203. "width": "100%",
  2204. "height": "100%",
  2205. },
  2206. })
  2207. _box.appendChild(_loading)
  2208. _box.id = str + '_loadLi_Jie' + cid + stage + task + tool + _userid
  2209. switch (str) {
  2210. case "whiteboard":
  2211. aTool = 1;
  2212. _iframe = $$("iframe", {
  2213. "frameborder": "no",
  2214. "border": "0",
  2215. "scrolling ": "no",
  2216. "style": {
  2217. "cssText": "border:0;width:100%;height:100%"
  2218. },
  2219. "src": "https://iwb.cocorobo.cn/"
  2220. })
  2221. _box.appendChild(_iframe);
  2222. _box.appendChild(_jie);
  2223. _formdiv = new U.UF.UI.form(
  2224. "电子白板",
  2225. _box, {
  2226. "id": "whiteboard" + cid + stage + task + tool,
  2227. "style": {
  2228. "width": "90%",
  2229. "height": "90%",
  2230. "overflow": 'hidden'
  2231. },
  2232. "onresize": function () { }
  2233. }, {
  2234. closecallback: function () { }
  2235. }, {
  2236. "style": {
  2237. "height": "36px"
  2238. }
  2239. }).form; //创建窗体
  2240. _taskbar = {
  2241. "id": str + _formdiv.id,
  2242. "style": {
  2243. "backgroundImage": "url(/img/icon/whiteBoard.png)"
  2244. },
  2245. "name": "电子白板",
  2246. "forms": _formdiv,
  2247. "click": function () {
  2248. U.MD.D.I.openApplication(str, obj, info);
  2249. }
  2250. }
  2251. break;
  2252. case "mind":
  2253. aTool = 3;
  2254. _iframe = $$("iframe", {
  2255. "frameborder": "no",
  2256. "border": "0",
  2257. "scrolling ": "no",
  2258. "style": {
  2259. "cssText": "border:0;width:100%;height:100%"
  2260. },
  2261. "src": "/kityminder-editor/dist/index.html"
  2262. })
  2263. _box.appendChild(_iframe);
  2264. _box.appendChild(_jie);
  2265. _formdiv = new U.UF.UI.form(
  2266. "思维导图",
  2267. _box, { //"/jsmind/example/demo.html"
  2268. "id": "mind" + cid + stage + task + tool,
  2269. "style": {
  2270. "width": "90%",
  2271. "height": "90%",
  2272. "overflow": 'hidden'
  2273. },
  2274. "onresize": function () { }
  2275. }, {
  2276. closecallback: function () { }
  2277. }, {
  2278. "style": {
  2279. "height": "36px"
  2280. }
  2281. }).form; //创建窗体
  2282. _taskbar = {
  2283. "id": str + _formdiv.id,
  2284. "style": {
  2285. "backgroundImage": "url(/img/icon/mindMapping.png)"
  2286. },
  2287. "name": "思维导图",
  2288. "forms": _formdiv,
  2289. "click": function () {
  2290. U.MD.D.I.openApplication(str, obj, info);
  2291. }
  2292. }
  2293. break;
  2294. case "MindMap":
  2295. aTool = 3;
  2296. _iframe = $$("iframe", {
  2297. "frameborder": "no",
  2298. "border": "0",
  2299. "scrolling ": "no",
  2300. "style": {
  2301. "cssText": "border:0;width:100%;height:100%"
  2302. },
  2303. "src": "//cloud.cocorobo.cn/mind/"
  2304. })
  2305. _box.appendChild(_iframe);
  2306. _box.appendChild(_jie);
  2307. _formdiv = new U.UF.UI.form(
  2308. "思维导图",
  2309. _box, { //"/jsmind/example/demo.html"
  2310. "id": "mind" + cid + stage + task + tool,
  2311. "style": {
  2312. "width": "90%",
  2313. "height": "90%",
  2314. "overflow": 'hidden'
  2315. },
  2316. "onresize": function () { }
  2317. }, {
  2318. closecallback: function () { }
  2319. }, {
  2320. "style": {
  2321. "height": "36px"
  2322. }
  2323. }).form; //创建窗体
  2324. _taskbar = {
  2325. "id": str + _formdiv.id,
  2326. "style": {
  2327. "backgroundImage": "url(/img/icon/mindMapping.png)"
  2328. },
  2329. "name": "思维导图",
  2330. "forms": _formdiv,
  2331. "click": function () {
  2332. U.MD.D.I.openApplication(str, obj, info);
  2333. }
  2334. }
  2335. break;
  2336. case "doc":
  2337. aTool = 6;
  2338. _iframe = $$("iframe", {
  2339. "frameborder": "no",
  2340. "border": "0",
  2341. "scrolling ": "no",
  2342. "style": {
  2343. "cssText": "border:0;width:100%;height:100%"
  2344. },
  2345. "src": "/Office/Word/WordEditArea.htm"
  2346. })
  2347. _box.appendChild(_iframe);
  2348. _box.appendChild(_jie);
  2349. _formdiv = new U.UF.UI.form(
  2350. "协同文档",
  2351. _box, {
  2352. "id": "doc" + cid + stage + task + tool,
  2353. "style": {
  2354. "width": "90%",
  2355. "height": "90%",
  2356. "overflow": 'hidden'
  2357. },
  2358. "onresize": function () { }
  2359. }, {
  2360. closecallback: function () { }
  2361. }, {
  2362. "style": {
  2363. "height": "36px"
  2364. }
  2365. }).form; //创建窗体
  2366. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  2367. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load(cid, stage, task, tool);
  2368. })
  2369. _taskbar = {
  2370. "id": str + _formdiv.id,
  2371. "style": {
  2372. "backgroundImage": "url(/img/icon/doc.png)"
  2373. },
  2374. "name": "协同文档",
  2375. "forms": _formdiv,
  2376. "click": function () {
  2377. U.MD.D.I.openApplication(str, obj, info);
  2378. }
  2379. }
  2380. break;
  2381. case "mindNetwork": //好友打开
  2382. aTool = 7;
  2383. _iframe = $$("iframe", {
  2384. "webkitallowfullscreen": "",
  2385. "mozallowfullscreen": "",
  2386. "allowfullscreen": "",
  2387. "frameborder": "no",
  2388. "border": "0",
  2389. "scrolling ": "no",
  2390. "style": {
  2391. "cssText": "border:0; width:100%; height:100%;"
  2392. },
  2393. "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid
  2394. })
  2395. _box.appendChild(_iframe);
  2396. _box.appendChild(_jie);
  2397. _formdiv = new U.UF.UI.form(
  2398. "思维网格",
  2399. _box, {
  2400. "id": "mindNetwork" + cid + stage + task + tool,
  2401. "style": {
  2402. "width": "90%",
  2403. "height": "90%",
  2404. "overflow": 'hidden'
  2405. },
  2406. "onresize": function () { }
  2407. }, {
  2408. closecallback: function () { }
  2409. }, {
  2410. "style": {
  2411. "height": "36px"
  2412. }
  2413. }).form; //创建窗体
  2414. _taskbar = {
  2415. "id": str + _formdiv.id,
  2416. "style": {
  2417. "backgroundImage": "url(/img/icon/mindNetwork.png)"
  2418. },
  2419. "name": "思维网格",
  2420. "forms": _formdiv,
  2421. "click": function () {
  2422. U.MD.D.I.openApplication(str, obj, info);
  2423. }
  2424. }
  2425. break;
  2426. case "courseDesign":
  2427. _iframe = $$("iframe", {
  2428. "webkitallowfullscreen": "",
  2429. "mozallowfullscreen": "",
  2430. "allowfullscreen": "",
  2431. "frameborder": "no",
  2432. "border": "0",
  2433. "scrolling ": "no",
  2434. "style": {
  2435. "cssText": "border:0; width:100%; height:100%;"
  2436. },
  2437. "src": "/course-design-vue"
  2438. })
  2439. _box.appendChild(_iframe);
  2440. _box.appendChild(_jie);
  2441. _formdiv = new U.UF.UI.form(
  2442. "项目设计",
  2443. _box, {
  2444. "id": "courseDesign" + cid + stage + task + tool,
  2445. "style": {
  2446. "width": "90%",
  2447. "height": "90%",
  2448. "overflow": 'hidden'
  2449. },
  2450. "onresize": function () { }
  2451. }, {
  2452. closecallback: function () { }
  2453. }, {
  2454. "style": {
  2455. "height": "36px"
  2456. }
  2457. }).form; //创建窗体
  2458. _taskbar = {
  2459. "id": str + _formdiv.id,
  2460. "style": {
  2461. "backgroundImage": "url(/img/icon/courseDesign.png)"
  2462. },
  2463. "name": "项目设计",
  2464. "forms": _formdiv,
  2465. "click": function () {
  2466. U.MD.D.I.openApplication(str, obj, info);
  2467. }
  2468. }
  2469. break;
  2470. }
  2471. const script1 = document.createElement("script");
  2472. script1.type = "text/javascript";
  2473. // script1.src = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
  2474. script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
  2475. const script2 = document.createElement("script");
  2476. script2.type = "text/javascript";
  2477. // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
  2478. script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
  2479. const script3 = document.createElement("script");
  2480. script3.type = "text/javascript";
  2481. script3.charset = "UTF-8";
  2482. script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
  2483. const script4 = document.createElement("script");
  2484. script4.type = "text/javascript";
  2485. // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu2.js";
  2486. script4.src = "https://cloud.cocorobo.cn/js/Common/jietu2.js";
  2487. if (_iframe) {
  2488. if (str == 'doc') {
  2489. _iframe = _formdiv.querySelector('iframe')
  2490. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  2491. _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool);
  2492. _iframe.contentWindow.document.body.appendChild(script1);
  2493. _iframe.contentWindow.document.body.appendChild(script2);
  2494. // _iframe.contentWindow.document.body.appendChild(script3);
  2495. _iframe.contentWindow.document.body.appendChild(script4);
  2496. })
  2497. if (onloadListener) {
  2498. _iframe.contentDocument.location.reload()
  2499. } else {
  2500. _iframe.contentDocument.location.reload()
  2501. }
  2502. } else if (str == 'courseDesign') {
  2503. U.UF.DL.iframeLoad(_iframe, function () {
  2504. // _iframe.contentWindow.U.MD.O.W.load();
  2505. // _iframe.contentWindow.document.body.appendChild(script1);
  2506. _iframe.contentWindow.document.body.appendChild(script2);
  2507. _iframe.contentWindow.document.body.appendChild(script4);
  2508. })
  2509. } else if (str == 'mind') {
  2510. _iframe = _formdiv.querySelector('iframe')
  2511. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  2512. //
  2513. _iframe.contentWindow.document.body.appendChild(script1);
  2514. _iframe.contentWindow.document.body.appendChild(script2);
  2515. _iframe.contentWindow.document.body.appendChild(script4);
  2516. U.MD.D.I.getContent(cid, stage, task, tool, _userid, '2', _iframe)
  2517. })
  2518. if (onloadListener) {
  2519. _iframe.contentDocument.location.reload()
  2520. } else {
  2521. _iframe.contentDocument.location.reload()
  2522. }
  2523. } else if (str == 'whiteboard') {
  2524. _iframe = _formdiv.querySelector('iframe')
  2525. let onloadListener = _iframe.onload = () => {
  2526. _iframe.contentWindow.document.body.appendChild(script1);
  2527. _iframe.contentWindow.document.body.appendChild(script2);
  2528. _iframe.contentWindow.document.body.appendChild(script4);
  2529. U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
  2530. };
  2531. if (onloadListener) {
  2532. _iframe.contentDocument.location.reload()
  2533. } else {
  2534. _iframe.contentDocument.location.reload()
  2535. }
  2536. } else {
  2537. _iframe.onload = () => {
  2538. _iframe.contentWindow.document.body.appendChild(script1);
  2539. _iframe.contentWindow.document.body.appendChild(script2);
  2540. // _iframe.contentWindow.document.body.appendChild(script3);
  2541. _iframe.contentWindow.document.body.appendChild(script4);
  2542. };
  2543. }
  2544. _jie.onclick = async () => {
  2545. let text = ''
  2546. if (aTool == 1) {
  2547. text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
  2548. } else if (aTool == 6) {
  2549. text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
  2550. } else if (aTool == 3) {
  2551. text = await U.MD.D.I.getEditorContent(_iframe);
  2552. }
  2553. _loading.style.display = 'flex'
  2554. console.log(_loading);
  2555. var _ajs = _iframe.contentWindow.document.createElement("script");
  2556. _ajs.type = "text/javascript";
  2557. _ajs.innerHTML =
  2558. // 'console.log(' + _loading + ');\n' +
  2559. 'var _js = document.createElement("script");\n' +
  2560. '_js.type="text/javascript";\n' +
  2561. '_js.charset="UTF-8";\n' +
  2562. '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
  2563. "_js.onload = function(){\n" +
  2564. ' var a = document.getElementsByTagName("img")\n' +
  2565. ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
  2566. " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).then(canvas => {\n" +
  2567. '  var base64Url = canvas.toDataURL("image/png");\n' +
  2568. 'var base64 = "<img src=" + base64Url + " />"\n' +
  2569. 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
  2570. "beforeUpload_shishi(file," +
  2571. "'" +
  2572. _userid +
  2573. "'" +
  2574. ", " +
  2575. "'" +
  2576. _cid +
  2577. "'" +
  2578. ", " +
  2579. "'" +
  2580. _stage +
  2581. "'" +
  2582. ", " +
  2583. "'" +
  2584. _task +
  2585. "'" +
  2586. ", " +
  2587. "'" +
  2588. _tool +
  2589. "'" +
  2590. ", " +
  2591. "'" +
  2592. (str + '_loadLi_Jie' + cid + stage + task + tool + _userid) +
  2593. "'" +
  2594. ", " +
  2595. "'" +
  2596. aTool +
  2597. "'" +
  2598. ", " +
  2599. "`" +
  2600. text +
  2601. "`" +
  2602. ")\n" +
  2603. " });\n" +
  2604. "}\n" +
  2605. "document.head.appendChild(_js);\n";
  2606. _iframe.contentWindow.document.head.appendChild(_ajs);
  2607. }
  2608. }
  2609. //U.MD.D.I.openClick(str);
  2610. //如果有任务栏信息
  2611. // if (_taskbar) {
  2612. // U.MD.D.T.taskbar(_taskbar); //创建任务处理
  2613. // }
  2614. }
  2615. U.MD.D.I.openApplicationJieE = function (str, cid, stage, task, tool) {
  2616. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  2617. _formdiv, //创建任务栏时同时弹出的窗体元素。
  2618. _userinfo = US.userInfo, //登录用户信息
  2619. _userid = US.userInfo.userid //登录用户id
  2620. let _iframe;
  2621. let _cid = cid,
  2622. _stage = stage,
  2623. _task = task,
  2624. _tool = tool;
  2625. var _jie = $$("div", {
  2626. "style": {
  2627. "position": "absolute",
  2628. "bottom": "50px",
  2629. "right": "50px",
  2630. "zIndex": "9999",
  2631. "backgroundColor": "#2268bc",
  2632. "color": "#fff",
  2633. "padding": "12px 20px",
  2634. "cursor": "pointer",
  2635. "borderRadius": "4px",
  2636. },
  2637. "innerHTML": "提交作业"
  2638. })
  2639. let aTool = ''
  2640. let _loading = document.createElement('div')
  2641. _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
  2642. // _loading.id = "";
  2643. let _lchild = document.createElement('div')
  2644. let _limg = document.createElement('img')
  2645. _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
  2646. _limg.style = "width: 26px;margin-right: 10px;"
  2647. _lchild.appendChild(_limg)
  2648. let _lspan = document.createElement('span')
  2649. _lspan.innerHTML = "上传中..."
  2650. _lchild.appendChild(_lspan)
  2651. _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
  2652. _loading.appendChild(_lchild)
  2653. var _box = $$('div', {
  2654. "style": {
  2655. "position": "relative",
  2656. "width": "100%",
  2657. "height": "100%",
  2658. },
  2659. })
  2660. _box.appendChild(_loading)
  2661. _box.id = str + '_loadLi_JieE' + cid + stage + task + tool + _userid
  2662. switch (str) {
  2663. case "whiteboard":
  2664. aTool = 1;
  2665. _iframe = $$("iframe", {
  2666. "frameborder": "no",
  2667. "border": "0",
  2668. "scrolling ": "no",
  2669. "style": {
  2670. "cssText": "border:0;width:100%;height:100%"
  2671. },
  2672. "src": "https://iwb.cocorobo.cn/"
  2673. })
  2674. _box.appendChild(_iframe);
  2675. _box.appendChild(_jie);
  2676. _formdiv = new U.UF.UI.form(
  2677. "电子白板",
  2678. _box, {
  2679. "id": "whiteboard" + cid + stage + task + tool,
  2680. "style": {
  2681. "width": "90%",
  2682. "height": "90%",
  2683. "overflow": 'hidden'
  2684. },
  2685. "onresize": function () { }
  2686. }, {
  2687. closecallback: function () { }
  2688. }, {
  2689. "style": {
  2690. "height": "36px"
  2691. }
  2692. }).form; //创建窗体
  2693. _taskbar = {
  2694. "id": str + _formdiv.id,
  2695. "style": {
  2696. "backgroundImage": "url(/img/icon/whiteBoard.png)"
  2697. },
  2698. "name": "电子白板",
  2699. "forms": _formdiv,
  2700. "click": function () {
  2701. U.MD.D.I.openApplication(str, obj, info);
  2702. }
  2703. }
  2704. break;
  2705. case "mind":
  2706. aTool = 3;
  2707. _iframe = $$("iframe", {
  2708. "frameborder": "no",
  2709. "border": "0",
  2710. "scrolling ": "no",
  2711. "style": {
  2712. "cssText": "border:0;width:100%;height:100%"
  2713. },
  2714. "src": "/kityminder-editor/dist/index.html"
  2715. })
  2716. _box.appendChild(_iframe);
  2717. _box.appendChild(_jie);
  2718. _formdiv = new U.UF.UI.form(
  2719. "思维导图",
  2720. _box, { //"/jsmind/example/demo.html"
  2721. "id": "mind" + cid + stage + task + tool,
  2722. "style": {
  2723. "width": "90%",
  2724. "height": "90%",
  2725. "overflow": 'hidden'
  2726. },
  2727. "onresize": function () { }
  2728. }, {
  2729. closecallback: function () { }
  2730. }, {
  2731. "style": {
  2732. "height": "36px"
  2733. }
  2734. }).form; //创建窗体
  2735. _taskbar = {
  2736. "id": str + _formdiv.id,
  2737. "style": {
  2738. "backgroundImage": "url(/img/icon/mindMapping.png)"
  2739. },
  2740. "name": "思维导图",
  2741. "forms": _formdiv,
  2742. "click": function () {
  2743. U.MD.D.I.openApplication(str, obj, info);
  2744. }
  2745. }
  2746. break;
  2747. case "MindMap":
  2748. aTool = 3;
  2749. _iframe = $$("iframe", {
  2750. "frameborder": "no",
  2751. "border": "0",
  2752. "scrolling ": "no",
  2753. "style": {
  2754. "cssText": "border:0;width:100%;height:100%"
  2755. },
  2756. "src": "//cloud.cocorobo.cn/mind/"
  2757. })
  2758. _box.appendChild(_iframe);
  2759. _box.appendChild(_jie);
  2760. _formdiv = new U.UF.UI.form(
  2761. "思维导图",
  2762. _box, { //"/jsmind/example/demo.html"
  2763. "id": "mind" + cid + stage + task + tool,
  2764. "style": {
  2765. "width": "90%",
  2766. "height": "90%",
  2767. "overflow": 'hidden'
  2768. },
  2769. "onresize": function () { }
  2770. }, {
  2771. closecallback: function () { }
  2772. }, {
  2773. "style": {
  2774. "height": "36px"
  2775. }
  2776. }).form; //创建窗体
  2777. _taskbar = {
  2778. "id": str + _formdiv.id,
  2779. "style": {
  2780. "backgroundImage": "url(/img/icon/mindMapping.png)"
  2781. },
  2782. "name": "思维导图",
  2783. "forms": _formdiv,
  2784. "click": function () {
  2785. U.MD.D.I.openApplication(str, obj, info);
  2786. }
  2787. }
  2788. break;
  2789. case "doc":
  2790. aTool = 6;
  2791. _iframe = $$("iframe", {
  2792. "frameborder": "no",
  2793. "border": "0",
  2794. "scrolling ": "no",
  2795. "style": {
  2796. "cssText": "border:0;width:100%;height:100%"
  2797. },
  2798. "src": "/Office/Word/WordEditArea.htm"
  2799. })
  2800. _box.appendChild(_iframe);
  2801. _box.appendChild(_jie);
  2802. _formdiv = new U.UF.UI.form(
  2803. "协同文档",
  2804. _box, {
  2805. "id": "doc" + cid + stage + task + tool,
  2806. "style": {
  2807. "width": "90%",
  2808. "height": "90%",
  2809. "overflow": 'hidden'
  2810. },
  2811. "onresize": function () { }
  2812. }, {
  2813. closecallback: function () { }
  2814. }, {
  2815. "style": {
  2816. "height": "36px"
  2817. }
  2818. }).form; //创建窗体
  2819. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  2820. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load(cid, stage, task, tool);
  2821. })
  2822. _taskbar = {
  2823. "id": str + _formdiv.id,
  2824. "style": {
  2825. "backgroundImage": "url(/img/icon/doc.png)"
  2826. },
  2827. "name": "协同文档",
  2828. "forms": _formdiv,
  2829. "click": function () {
  2830. U.MD.D.I.openApplication(str, obj, info);
  2831. }
  2832. }
  2833. break;
  2834. case "mindNetwork": //好友打开
  2835. aTool = 7;
  2836. _iframe = $$("iframe", {
  2837. "webkitallowfullscreen": "",
  2838. "mozallowfullscreen": "",
  2839. "allowfullscreen": "",
  2840. "frameborder": "no",
  2841. "border": "0",
  2842. "scrolling ": "no",
  2843. "style": {
  2844. "cssText": "border:0; width:100%; height:100%;"
  2845. },
  2846. "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid
  2847. })
  2848. _box.appendChild(_iframe);
  2849. _box.appendChild(_jie);
  2850. _formdiv = new U.UF.UI.form(
  2851. "思维网格",
  2852. _box, {
  2853. "id": "mindNetwork" + cid + stage + task + tool,
  2854. "style": {
  2855. "width": "90%",
  2856. "height": "90%",
  2857. "overflow": 'hidden'
  2858. },
  2859. "onresize": function () { }
  2860. }, {
  2861. closecallback: function () { }
  2862. }, {
  2863. "style": {
  2864. "height": "36px"
  2865. }
  2866. }).form; //创建窗体
  2867. _taskbar = {
  2868. "id": str + _formdiv.id,
  2869. "style": {
  2870. "backgroundImage": "url(/img/icon/mindNetwork.png)"
  2871. },
  2872. "name": "思维网格",
  2873. "forms": _formdiv,
  2874. "click": function () {
  2875. U.MD.D.I.openApplication(str, obj, info);
  2876. }
  2877. }
  2878. break;
  2879. case "courseDesign":
  2880. _iframe = $$("iframe", {
  2881. "webkitallowfullscreen": "",
  2882. "mozallowfullscreen": "",
  2883. "allowfullscreen": "",
  2884. "frameborder": "no",
  2885. "border": "0",
  2886. "scrolling ": "no",
  2887. "style": {
  2888. "cssText": "border:0; width:100%; height:100%;"
  2889. },
  2890. "src": "/course-design-vue"
  2891. })
  2892. _box.appendChild(_iframe);
  2893. _box.appendChild(_jie);
  2894. _formdiv = new U.UF.UI.form(
  2895. "项目设计",
  2896. _box, {
  2897. "id": "courseDesign" + cid + stage + task + tool,
  2898. "style": {
  2899. "width": "90%",
  2900. "height": "90%",
  2901. "overflow": 'hidden'
  2902. },
  2903. "onresize": function () { }
  2904. }, {
  2905. closecallback: function () { }
  2906. }, {
  2907. "style": {
  2908. "height": "36px"
  2909. }
  2910. }).form; //创建窗体
  2911. _taskbar = {
  2912. "id": str + _formdiv.id,
  2913. "style": {
  2914. "backgroundImage": "url(/img/icon/courseDesign.png)"
  2915. },
  2916. "name": "项目设计",
  2917. "forms": _formdiv,
  2918. "click": function () {
  2919. U.MD.D.I.openApplication(str, obj, info);
  2920. }
  2921. }
  2922. break;
  2923. }
  2924. const script1 = document.createElement("script");
  2925. script1.type = "text/javascript";
  2926. // script1.src = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
  2927. script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
  2928. const script2 = document.createElement("script");
  2929. script2.type = "text/javascript";
  2930. // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
  2931. script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
  2932. const script3 = document.createElement("script");
  2933. script3.type = "text/javascript";
  2934. script3.charset = "UTF-8";
  2935. script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
  2936. const script4 = document.createElement("script");
  2937. script4.type = "text/javascript";
  2938. // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu2.js";
  2939. script4.src = window.origin + "/js/Common/jietu2E.js";
  2940. if (_iframe) {
  2941. if (str == 'doc') {
  2942. _iframe = _formdiv.querySelector('iframe')
  2943. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  2944. _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool);
  2945. _iframe.contentWindow.document.body.appendChild(script1);
  2946. _iframe.contentWindow.document.body.appendChild(script2);
  2947. // _iframe.contentWindow.document.body.appendChild(script3);
  2948. _iframe.contentWindow.document.body.appendChild(script4);
  2949. })
  2950. if (onloadListener) {
  2951. _iframe.contentDocument.location.reload()
  2952. } else {
  2953. _iframe.contentDocument.location.reload()
  2954. }
  2955. } else if (str == 'courseDesign') {
  2956. U.UF.DL.iframeLoad(_iframe, function () {
  2957. // _iframe.contentWindow.U.MD.O.W.load();
  2958. // _iframe.contentWindow.document.body.appendChild(script1);
  2959. _iframe.contentWindow.document.body.appendChild(script2);
  2960. _iframe.contentWindow.document.body.appendChild(script4);
  2961. })
  2962. } else if (str == 'mind') {
  2963. _iframe = _formdiv.querySelector('iframe')
  2964. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  2965. //
  2966. _iframe.contentWindow.document.body.appendChild(script1);
  2967. _iframe.contentWindow.document.body.appendChild(script2);
  2968. _iframe.contentWindow.document.body.appendChild(script4);
  2969. U.MD.D.I.getContent(cid, stage, task, tool, _userid, '2', _iframe)
  2970. })
  2971. if (onloadListener) {
  2972. _iframe.contentDocument.location.reload()
  2973. } else {
  2974. _iframe.contentDocument.location.reload()
  2975. }
  2976. } else if (str == 'whiteboard') {
  2977. _iframe = _formdiv.querySelector('iframe')
  2978. let onloadListener = _iframe.onload = () => {
  2979. _iframe.contentWindow.document.body.appendChild(script1);
  2980. _iframe.contentWindow.document.body.appendChild(script2);
  2981. _iframe.contentWindow.document.body.appendChild(script4);
  2982. U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
  2983. };
  2984. if (onloadListener) {
  2985. _iframe.contentDocument.location.reload()
  2986. } else {
  2987. _iframe.contentDocument.location.reload()
  2988. }
  2989. } else {
  2990. _iframe.onload = () => {
  2991. _iframe.contentWindow.document.body.appendChild(script1);
  2992. _iframe.contentWindow.document.body.appendChild(script2);
  2993. // _iframe.contentWindow.document.body.appendChild(script3);
  2994. _iframe.contentWindow.document.body.appendChild(script4);
  2995. };
  2996. }
  2997. _jie.onclick = async () => {
  2998. let text = ''
  2999. if (aTool == 1) {
  3000. text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
  3001. } else if (aTool == 6) {
  3002. text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
  3003. } else if (aTool == 3) {
  3004. text = await U.MD.D.I.getEditorContent(_iframe);
  3005. }
  3006. _loading.style.display = 'flex'
  3007. console.log(_loading);
  3008. var _ajs = _iframe.contentWindow.document.createElement("script");
  3009. _ajs.type = "text/javascript";
  3010. _ajs.innerHTML =
  3011. // 'console.log(' + _loading + ');\n' +
  3012. 'var _js = document.createElement("script");\n' +
  3013. '_js.type="text/javascript";\n' +
  3014. '_js.charset="UTF-8";\n' +
  3015. '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
  3016. "_js.onload = function(){\n" +
  3017. ' var a = document.getElementsByTagName("img")\n' +
  3018. ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
  3019. " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).then(canvas => {\n" +
  3020. '  var base64Url = canvas.toDataURL("image/png");\n' +
  3021. 'var base64 = "<img src=" + base64Url + " />"\n' +
  3022. 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
  3023. "beforeUpload_shishi(file," +
  3024. "'" +
  3025. _userid +
  3026. "'" +
  3027. ", " +
  3028. "'" +
  3029. _cid +
  3030. "'" +
  3031. ", " +
  3032. "'" +
  3033. _stage +
  3034. "'" +
  3035. ", " +
  3036. "'" +
  3037. _task +
  3038. "'" +
  3039. ", " +
  3040. "'" +
  3041. _tool +
  3042. "'" +
  3043. ", " +
  3044. "'" +
  3045. (str + '_loadLi_JieE' + cid + stage + task + tool + _userid) +
  3046. "'" +
  3047. ", " +
  3048. "'" +
  3049. aTool +
  3050. "'" +
  3051. ", " +
  3052. "`" +
  3053. text +
  3054. "`" +
  3055. ")\n" +
  3056. " });\n" +
  3057. "}\n" +
  3058. "document.head.appendChild(_js);\n";
  3059. _iframe.contentWindow.document.head.appendChild(_ajs);
  3060. }
  3061. }
  3062. //U.MD.D.I.openClick(str);
  3063. //如果有任务栏信息
  3064. // if (_taskbar) {
  3065. // U.MD.D.T.taskbar(_taskbar); //创建任务处理
  3066. // }
  3067. }
  3068. U.MD.D.I.openApplicationJieTeacher = function (str, cid, stage, task, tool, student) {
  3069. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  3070. _formdiv, //创建任务栏时同时弹出的窗体元素。
  3071. _userid = student.userid, //登录用户id
  3072. _username = student.student //用户名字
  3073. let _iframe;
  3074. let _cid = cid,
  3075. _stage = stage,
  3076. _task = task,
  3077. _tool = tool;
  3078. var _jie = $$("div", {
  3079. "style": {
  3080. "position": "absolute",
  3081. "bottom": "50px",
  3082. "right": "50px",
  3083. "zIndex": "9999",
  3084. "backgroundColor": "#2268bc",
  3085. "color": "#fff",
  3086. "padding": "12px 20px",
  3087. "cursor": "pointer",
  3088. "borderRadius": "4px",
  3089. },
  3090. "innerHTML": "提交作业"
  3091. })
  3092. let aTool = ''
  3093. let _loading = document.createElement('div')
  3094. _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
  3095. // _loading.id = "";
  3096. let _lchild = document.createElement('div')
  3097. let _limg = document.createElement('img')
  3098. _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
  3099. _limg.style = "width: 26px;margin-right: 10px;"
  3100. _lchild.appendChild(_limg)
  3101. let _lspan = document.createElement('span')
  3102. _lspan.innerHTML = "上传中..."
  3103. _lchild.appendChild(_lspan)
  3104. _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
  3105. _loading.appendChild(_lchild)
  3106. var _box = $$('div', {
  3107. "style": {
  3108. "position": "relative",
  3109. "width": "100%",
  3110. "height": "100%",
  3111. },
  3112. })
  3113. _box.appendChild(_loading)
  3114. _box.id = str + '_loadLi_JieTeacher' + cid + stage + task + tool + _userid
  3115. switch (str) {
  3116. case "whiteboard":
  3117. aTool = 1;
  3118. _iframe = $$("iframe", {
  3119. "frameborder": "no",
  3120. "border": "0",
  3121. "scrolling ": "no",
  3122. "style": {
  3123. "cssText": "border:0;width:100%;height:100%"
  3124. },
  3125. "src": "https://iwb.cocorobo.cn/"
  3126. })
  3127. _box.appendChild(_iframe);
  3128. _box.appendChild(_jie);
  3129. _formdiv = new U.UF.UI.form(
  3130. "电子白板-" + _username,
  3131. _box, {
  3132. "id": "whiteboard" + cid + stage + task + tool + _userid,
  3133. "style": {
  3134. "width": "90%",
  3135. "height": "90%",
  3136. "overflow": 'hidden'
  3137. },
  3138. "onresize": function () { }
  3139. }, {
  3140. closecallback: function () { }
  3141. }, {
  3142. "style": {
  3143. "height": "36px"
  3144. }
  3145. }).form; //创建窗体
  3146. _taskbar = {
  3147. "id": str + _formdiv.id,
  3148. "style": {
  3149. "backgroundImage": "url(/img/icon/whiteBoard.png)"
  3150. },
  3151. "name": "电子白板",
  3152. "forms": _formdiv,
  3153. "click": function () {
  3154. U.MD.D.I.openApplication(str, obj, info);
  3155. }
  3156. }
  3157. break;
  3158. case "mind":
  3159. aTool = 3;
  3160. _iframe = $$("iframe", {
  3161. "frameborder": "no",
  3162. "border": "0",
  3163. "scrolling ": "no",
  3164. "style": {
  3165. "cssText": "border:0;width:100%;height:100%"
  3166. },
  3167. "src": "/kityminder-editor/dist/index.html"
  3168. })
  3169. _box.appendChild(_iframe);
  3170. _box.appendChild(_jie);
  3171. _formdiv = new U.UF.UI.form(
  3172. "思维导图-" + _username,
  3173. _box, { //"/jsmind/example/demo.html"
  3174. "id": "mind" + cid + stage + task + tool + _userid,
  3175. "style": {
  3176. "width": "90%",
  3177. "height": "90%",
  3178. "overflow": 'hidden'
  3179. },
  3180. "onresize": function () { }
  3181. }, {
  3182. closecallback: function () { }
  3183. }, {
  3184. "style": {
  3185. "height": "36px"
  3186. }
  3187. }).form; //创建窗体
  3188. _taskbar = {
  3189. "id": str + _formdiv.id,
  3190. "style": {
  3191. "backgroundImage": "url(/img/icon/mindMapping.png)"
  3192. },
  3193. "name": "思维导图",
  3194. "forms": _formdiv,
  3195. "click": function () {
  3196. U.MD.D.I.openApplication(str, obj, info);
  3197. }
  3198. }
  3199. break;
  3200. case "MindMap":
  3201. aTool = 3;
  3202. _iframe = $$("iframe", {
  3203. "frameborder": "no",
  3204. "border": "0",
  3205. "scrolling ": "no",
  3206. "style": {
  3207. "cssText": "border:0;width:100%;height:100%"
  3208. },
  3209. "src": "//cloud.cocorobo.cn/mind/"
  3210. })
  3211. _box.appendChild(_iframe);
  3212. _box.appendChild(_jie);
  3213. _formdiv = new U.UF.UI.form(
  3214. "思维导图-" + _username,
  3215. _box, { //"/jsmind/example/demo.html"
  3216. "id": "mind" + cid + stage + task + tool + _userid,
  3217. "style": {
  3218. "width": "90%",
  3219. "height": "90%",
  3220. "overflow": 'hidden'
  3221. },
  3222. "onresize": function () { }
  3223. }, {
  3224. closecallback: function () { }
  3225. }, {
  3226. "style": {
  3227. "height": "36px"
  3228. }
  3229. }).form; //创建窗体
  3230. _taskbar = {
  3231. "id": str + _formdiv.id,
  3232. "style": {
  3233. "backgroundImage": "url(/img/icon/mindMapping.png)"
  3234. },
  3235. "name": "思维导图",
  3236. "forms": _formdiv,
  3237. "click": function () {
  3238. U.MD.D.I.openApplication(str, obj, info);
  3239. }
  3240. }
  3241. break;
  3242. case "doc":
  3243. aTool = 6;
  3244. _iframe = $$("iframe", {
  3245. "frameborder": "no",
  3246. "border": "0",
  3247. "scrolling ": "no",
  3248. "style": {
  3249. "cssText": "border:0;width:100%;height:100%"
  3250. },
  3251. "src": "/Office/Word/WordEditArea.htm"
  3252. })
  3253. _box.appendChild(_iframe);
  3254. _box.appendChild(_jie);
  3255. _formdiv = new U.UF.UI.form(
  3256. "协同文档-" + _username,
  3257. _box, {
  3258. "id": "doc" + cid + stage + task + tool + _userid,
  3259. "style": {
  3260. "width": "90%",
  3261. "height": "90%",
  3262. "overflow": 'hidden'
  3263. },
  3264. "onresize": function () { }
  3265. }, {
  3266. closecallback: function () { }
  3267. }, {
  3268. "style": {
  3269. "height": "36px"
  3270. }
  3271. }).form; //创建窗体
  3272. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  3273. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load(cid, stage, task, tool);
  3274. })
  3275. _taskbar = {
  3276. "id": str + _formdiv.id,
  3277. "style": {
  3278. "backgroundImage": "url(/img/icon/doc.png)"
  3279. },
  3280. "name": "协同文档",
  3281. "forms": _formdiv,
  3282. "click": function () {
  3283. U.MD.D.I.openApplication(str, obj, info);
  3284. }
  3285. }
  3286. break;
  3287. case "mindNetwork": //好友打开
  3288. aTool = 7;
  3289. _iframe = $$("iframe", {
  3290. "webkitallowfullscreen": "",
  3291. "mozallowfullscreen": "",
  3292. "allowfullscreen": "",
  3293. "frameborder": "no",
  3294. "border": "0",
  3295. "scrolling ": "no",
  3296. "style": {
  3297. "cssText": "border:0; width:100%; height:100%;"
  3298. },
  3299. "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid
  3300. })
  3301. _box.appendChild(_iframe);
  3302. _box.appendChild(_jie);
  3303. _formdiv = new U.UF.UI.form(
  3304. "思维网格-" + _username,
  3305. _box, {
  3306. "id": "mindNetwork" + cid + stage + task + tool + _userid,
  3307. "style": {
  3308. "width": "90%",
  3309. "height": "90%",
  3310. "overflow": 'hidden'
  3311. },
  3312. "onresize": function () { }
  3313. }, {
  3314. closecallback: function () { }
  3315. }, {
  3316. "style": {
  3317. "height": "36px"
  3318. }
  3319. }).form; //创建窗体
  3320. _taskbar = {
  3321. "id": str + _formdiv.id,
  3322. "style": {
  3323. "backgroundImage": "url(/img/icon/mindNetwork.png)"
  3324. },
  3325. "name": "思维网格",
  3326. "forms": _formdiv,
  3327. "click": function () {
  3328. U.MD.D.I.openApplication(str, obj, info);
  3329. }
  3330. }
  3331. break;
  3332. case "courseDesign":
  3333. _iframe = $$("iframe", {
  3334. "webkitallowfullscreen": "",
  3335. "mozallowfullscreen": "",
  3336. "allowfullscreen": "",
  3337. "frameborder": "no",
  3338. "border": "0",
  3339. "scrolling ": "no",
  3340. "style": {
  3341. "cssText": "border:0; width:100%; height:100%;"
  3342. },
  3343. "src": "/course-design-vue"
  3344. })
  3345. _box.appendChild(_iframe);
  3346. _box.appendChild(_jie);
  3347. _formdiv = new U.UF.UI.form(
  3348. "项目设计-" + _username,
  3349. _box, {
  3350. "id": "courseDesign" + cid + stage + task + tool + _userid,
  3351. "style": {
  3352. "width": "90%",
  3353. "height": "90%",
  3354. "overflow": 'hidden'
  3355. },
  3356. "onresize": function () { }
  3357. }, {
  3358. closecallback: function () { }
  3359. }, {
  3360. "style": {
  3361. "height": "36px"
  3362. }
  3363. }).form; //创建窗体
  3364. _taskbar = {
  3365. "id": str + _formdiv.id,
  3366. "style": {
  3367. "backgroundImage": "url(/img/icon/courseDesign.png)"
  3368. },
  3369. "name": "项目设计",
  3370. "forms": _formdiv,
  3371. "click": function () {
  3372. U.MD.D.I.openApplication(str, obj, info);
  3373. }
  3374. }
  3375. break;
  3376. }
  3377. const script1 = document.createElement("script");
  3378. script1.type = "text/javascript";
  3379. // script1.src = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
  3380. script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
  3381. const script2 = document.createElement("script");
  3382. script2.type = "text/javascript";
  3383. // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
  3384. script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
  3385. const script3 = document.createElement("script");
  3386. script3.type = "text/javascript";
  3387. script3.charset = "UTF-8";
  3388. script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
  3389. const script4 = document.createElement("script");
  3390. script4.type = "text/javascript";
  3391. // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu2.js";
  3392. script4.src = "https://cloud.cocorobo.cn/js/Common/jietu2.js";
  3393. if (_iframe) {
  3394. if (str == 'doc') {
  3395. _iframe = _formdiv.querySelector('iframe')
  3396. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  3397. _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool);
  3398. _iframe.contentWindow.document.body.appendChild(script1);
  3399. _iframe.contentWindow.document.body.appendChild(script2);
  3400. // _iframe.contentWindow.document.body.appendChild(script3);
  3401. _iframe.contentWindow.document.body.appendChild(script4);
  3402. })
  3403. if (onloadListener) {
  3404. _iframe.contentDocument.location.reload()
  3405. } else {
  3406. _iframe.contentDocument.location.reload()
  3407. }
  3408. } else if (str == 'courseDesign') {
  3409. U.UF.DL.iframeLoad(_iframe, function () {
  3410. // _iframe.contentWindow.U.MD.O.W.load();
  3411. // _iframe.contentWindow.document.body.appendChild(script1);
  3412. _iframe.contentWindow.document.body.appendChild(script2);
  3413. _iframe.contentWindow.document.body.appendChild(script4);
  3414. })
  3415. } else if (str == 'mind') {
  3416. _iframe = _formdiv.querySelector('iframe')
  3417. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  3418. //
  3419. _iframe.contentWindow.document.body.appendChild(script1);
  3420. _iframe.contentWindow.document.body.appendChild(script2);
  3421. _iframe.contentWindow.document.body.appendChild(script4);
  3422. U.MD.D.I.getContent(cid, stage, task, tool, _userid, '2', _iframe)
  3423. })
  3424. if (onloadListener) {
  3425. _iframe.contentDocument.location.reload()
  3426. } else {
  3427. _iframe.contentDocument.location.reload()
  3428. }
  3429. } else if (str == 'whiteboard') {
  3430. _iframe = _formdiv.querySelector('iframe')
  3431. let onloadListener = _iframe.onload = () => {
  3432. _iframe.contentWindow.document.body.appendChild(script1);
  3433. _iframe.contentWindow.document.body.appendChild(script2);
  3434. _iframe.contentWindow.document.body.appendChild(script4);
  3435. U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
  3436. };
  3437. if (onloadListener) {
  3438. _iframe.contentDocument.location.reload()
  3439. } else {
  3440. _iframe.contentDocument.location.reload()
  3441. }
  3442. } else {
  3443. _iframe.onload = () => {
  3444. _iframe.contentWindow.document.body.appendChild(script1);
  3445. _iframe.contentWindow.document.body.appendChild(script2);
  3446. // _iframe.contentWindow.document.body.appendChild(script3);
  3447. _iframe.contentWindow.document.body.appendChild(script4);
  3448. };
  3449. }
  3450. _jie.onclick = async () => {
  3451. let text = ''
  3452. if (aTool == 1) {
  3453. text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
  3454. } else if (aTool == 6) {
  3455. text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
  3456. } else if (aTool == 3) {
  3457. text = await U.MD.D.I.getEditorContent(_iframe);
  3458. }
  3459. _loading.style.display = 'flex'
  3460. console.log(_loading);
  3461. var _ajs = _iframe.contentWindow.document.createElement("script");
  3462. _ajs.type = "text/javascript";
  3463. _ajs.innerHTML =
  3464. // 'console.log(' + _loading + ');\n' +
  3465. 'var _js = document.createElement("script");\n' +
  3466. '_js.type="text/javascript";\n' +
  3467. '_js.charset="UTF-8";\n' +
  3468. '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
  3469. "_js.onload = function(){\n" +
  3470. ' var a = document.getElementsByTagName("img")\n' +
  3471. ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
  3472. " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).then(canvas => {\n" +
  3473. '  var base64Url = canvas.toDataURL("image/png");\n' +
  3474. 'var base64 = "<img src=" + base64Url + " />"\n' +
  3475. 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
  3476. "beforeUpload_shishi(file," +
  3477. "'" +
  3478. _userid +
  3479. "'" +
  3480. ", " +
  3481. "'" +
  3482. _cid +
  3483. "'" +
  3484. ", " +
  3485. "'" +
  3486. _stage +
  3487. "'" +
  3488. ", " +
  3489. "'" +
  3490. _task +
  3491. "'" +
  3492. ", " +
  3493. "'" +
  3494. _tool +
  3495. "'" +
  3496. ", " +
  3497. "'" +
  3498. (str + '_loadLi_JieTeacher' + cid + stage + task + tool + _userid) +
  3499. "'" +
  3500. ", " +
  3501. "'" +
  3502. aTool +
  3503. "'" +
  3504. ", " +
  3505. "`" +
  3506. text +
  3507. "`" +
  3508. ")\n" +
  3509. " });\n" +
  3510. "}\n" +
  3511. "document.head.appendChild(_js);\n";
  3512. _iframe.contentWindow.document.head.appendChild(_ajs);
  3513. }
  3514. }
  3515. }
  3516. U.MD.D.I.openApplicationJieTeacherE = function (str, cid, stage, task, tool, student) {
  3517. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  3518. _formdiv, //创建任务栏时同时弹出的窗体元素。
  3519. _userid = student.userid, //登录用户id
  3520. _username = student.student //用户名字
  3521. let _iframe;
  3522. let _cid = cid,
  3523. _stage = stage,
  3524. _task = task,
  3525. _tool = tool;
  3526. var _jie = $$("div", {
  3527. "style": {
  3528. "position": "absolute",
  3529. "bottom": "50px",
  3530. "right": "50px",
  3531. "zIndex": "9999",
  3532. "backgroundColor": "#2268bc",
  3533. "color": "#fff",
  3534. "padding": "12px 20px",
  3535. "cursor": "pointer",
  3536. "borderRadius": "4px",
  3537. },
  3538. "innerHTML": "提交作业"
  3539. })
  3540. let aTool = ''
  3541. let _loading = document.createElement('div')
  3542. _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
  3543. // _loading.id = "";
  3544. let _lchild = document.createElement('div')
  3545. let _limg = document.createElement('img')
  3546. _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
  3547. _limg.style = "width: 26px;margin-right: 10px;"
  3548. _lchild.appendChild(_limg)
  3549. let _lspan = document.createElement('span')
  3550. _lspan.innerHTML = "上传中..."
  3551. _lchild.appendChild(_lspan)
  3552. _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
  3553. _loading.appendChild(_lchild)
  3554. var _box = $$('div', {
  3555. "style": {
  3556. "position": "relative",
  3557. "width": "100%",
  3558. "height": "100%",
  3559. },
  3560. })
  3561. _box.appendChild(_loading)
  3562. _box.id = str + '_loadLi_JieTeacherE' + cid + stage + task + tool + _userid
  3563. switch (str) {
  3564. case "whiteboard":
  3565. aTool = 1;
  3566. _iframe = $$("iframe", {
  3567. "frameborder": "no",
  3568. "border": "0",
  3569. "scrolling ": "no",
  3570. "style": {
  3571. "cssText": "border:0;width:100%;height:100%"
  3572. },
  3573. "src": "https://iwb.cocorobo.cn/"
  3574. })
  3575. _box.appendChild(_iframe);
  3576. _box.appendChild(_jie);
  3577. _formdiv = new U.UF.UI.form(
  3578. "电子白板-" + _username,
  3579. _box, {
  3580. "id": "whiteboard" + cid + stage + task + tool + _userid,
  3581. "style": {
  3582. "width": "90%",
  3583. "height": "90%",
  3584. "overflow": 'hidden'
  3585. },
  3586. "onresize": function () { }
  3587. }, {
  3588. closecallback: function () { }
  3589. }, {
  3590. "style": {
  3591. "height": "36px"
  3592. }
  3593. }).form; //创建窗体
  3594. _taskbar = {
  3595. "id": str + _formdiv.id,
  3596. "style": {
  3597. "backgroundImage": "url(/img/icon/whiteBoard.png)"
  3598. },
  3599. "name": "电子白板",
  3600. "forms": _formdiv,
  3601. "click": function () {
  3602. U.MD.D.I.openApplication(str, obj, info);
  3603. }
  3604. }
  3605. break;
  3606. case "mind":
  3607. aTool = 3;
  3608. _iframe = $$("iframe", {
  3609. "frameborder": "no",
  3610. "border": "0",
  3611. "scrolling ": "no",
  3612. "style": {
  3613. "cssText": "border:0;width:100%;height:100%"
  3614. },
  3615. "src": "/kityminder-editor/dist/index.html"
  3616. })
  3617. _box.appendChild(_iframe);
  3618. _box.appendChild(_jie);
  3619. _formdiv = new U.UF.UI.form(
  3620. "思维导图-" + _username,
  3621. _box, { //"/jsmind/example/demo.html"
  3622. "id": "mind" + cid + stage + task + tool + _userid,
  3623. "style": {
  3624. "width": "90%",
  3625. "height": "90%",
  3626. "overflow": 'hidden'
  3627. },
  3628. "onresize": function () { }
  3629. }, {
  3630. closecallback: function () { }
  3631. }, {
  3632. "style": {
  3633. "height": "36px"
  3634. }
  3635. }).form; //创建窗体
  3636. _taskbar = {
  3637. "id": str + _formdiv.id,
  3638. "style": {
  3639. "backgroundImage": "url(/img/icon/mindMapping.png)"
  3640. },
  3641. "name": "思维导图",
  3642. "forms": _formdiv,
  3643. "click": function () {
  3644. U.MD.D.I.openApplication(str, obj, info);
  3645. }
  3646. }
  3647. break;
  3648. case "MindMap":
  3649. aTool = 3;
  3650. _iframe = $$("iframe", {
  3651. "frameborder": "no",
  3652. "border": "0",
  3653. "scrolling ": "no",
  3654. "style": {
  3655. "cssText": "border:0;width:100%;height:100%"
  3656. },
  3657. "src": "//cloud.cocorobo.cn/mind/"
  3658. })
  3659. _box.appendChild(_iframe);
  3660. _box.appendChild(_jie);
  3661. _formdiv = new U.UF.UI.form(
  3662. "思维导图-" + _username,
  3663. _box, { //"/jsmind/example/demo.html"
  3664. "id": "mind" + cid + stage + task + tool + _userid,
  3665. "style": {
  3666. "width": "90%",
  3667. "height": "90%",
  3668. "overflow": 'hidden'
  3669. },
  3670. "onresize": function () { }
  3671. }, {
  3672. closecallback: function () { }
  3673. }, {
  3674. "style": {
  3675. "height": "36px"
  3676. }
  3677. }).form; //创建窗体
  3678. _taskbar = {
  3679. "id": str + _formdiv.id,
  3680. "style": {
  3681. "backgroundImage": "url(/img/icon/mindMapping.png)"
  3682. },
  3683. "name": "思维导图",
  3684. "forms": _formdiv,
  3685. "click": function () {
  3686. U.MD.D.I.openApplication(str, obj, info);
  3687. }
  3688. }
  3689. break;
  3690. case "doc":
  3691. aTool = 6;
  3692. _iframe = $$("iframe", {
  3693. "frameborder": "no",
  3694. "border": "0",
  3695. "scrolling ": "no",
  3696. "style": {
  3697. "cssText": "border:0;width:100%;height:100%"
  3698. },
  3699. "src": "/Office/Word/WordEditArea.htm"
  3700. })
  3701. _box.appendChild(_iframe);
  3702. _box.appendChild(_jie);
  3703. _formdiv = new U.UF.UI.form(
  3704. "协同文档-" + _username,
  3705. _box, {
  3706. "id": "doc" + cid + stage + task + tool + _userid,
  3707. "style": {
  3708. "width": "90%",
  3709. "height": "90%",
  3710. "overflow": 'hidden'
  3711. },
  3712. "onresize": function () { }
  3713. }, {
  3714. closecallback: function () { }
  3715. }, {
  3716. "style": {
  3717. "height": "36px"
  3718. }
  3719. }).form; //创建窗体
  3720. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  3721. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load(cid, stage, task, tool);
  3722. })
  3723. _taskbar = {
  3724. "id": str + _formdiv.id,
  3725. "style": {
  3726. "backgroundImage": "url(/img/icon/doc.png)"
  3727. },
  3728. "name": "协同文档",
  3729. "forms": _formdiv,
  3730. "click": function () {
  3731. U.MD.D.I.openApplication(str, obj, info);
  3732. }
  3733. }
  3734. break;
  3735. case "mindNetwork": //好友打开
  3736. aTool = 7;
  3737. _iframe = $$("iframe", {
  3738. "webkitallowfullscreen": "",
  3739. "mozallowfullscreen": "",
  3740. "allowfullscreen": "",
  3741. "frameborder": "no",
  3742. "border": "0",
  3743. "scrolling ": "no",
  3744. "style": {
  3745. "cssText": "border:0; width:100%; height:100%;"
  3746. },
  3747. "src": US.Config.bpbl + "/pbl-teacher-table/dist/#/Grid?userid=" + _userid
  3748. })
  3749. _box.appendChild(_iframe);
  3750. _box.appendChild(_jie);
  3751. _formdiv = new U.UF.UI.form(
  3752. "思维网格-" + _username,
  3753. _box, {
  3754. "id": "mindNetwork" + cid + stage + task + tool + _userid,
  3755. "style": {
  3756. "width": "90%",
  3757. "height": "90%",
  3758. "overflow": 'hidden'
  3759. },
  3760. "onresize": function () { }
  3761. }, {
  3762. closecallback: function () { }
  3763. }, {
  3764. "style": {
  3765. "height": "36px"
  3766. }
  3767. }).form; //创建窗体
  3768. _taskbar = {
  3769. "id": str + _formdiv.id,
  3770. "style": {
  3771. "backgroundImage": "url(/img/icon/mindNetwork.png)"
  3772. },
  3773. "name": "思维网格",
  3774. "forms": _formdiv,
  3775. "click": function () {
  3776. U.MD.D.I.openApplication(str, obj, info);
  3777. }
  3778. }
  3779. break;
  3780. case "courseDesign":
  3781. _iframe = $$("iframe", {
  3782. "webkitallowfullscreen": "",
  3783. "mozallowfullscreen": "",
  3784. "allowfullscreen": "",
  3785. "frameborder": "no",
  3786. "border": "0",
  3787. "scrolling ": "no",
  3788. "style": {
  3789. "cssText": "border:0; width:100%; height:100%;"
  3790. },
  3791. "src": "/course-design-vue"
  3792. })
  3793. _box.appendChild(_iframe);
  3794. _box.appendChild(_jie);
  3795. _formdiv = new U.UF.UI.form(
  3796. "项目设计-" + _username,
  3797. _box, {
  3798. "id": "courseDesign" + cid + stage + task + tool + _userid,
  3799. "style": {
  3800. "width": "90%",
  3801. "height": "90%",
  3802. "overflow": 'hidden'
  3803. },
  3804. "onresize": function () { }
  3805. }, {
  3806. closecallback: function () { }
  3807. }, {
  3808. "style": {
  3809. "height": "36px"
  3810. }
  3811. }).form; //创建窗体
  3812. _taskbar = {
  3813. "id": str + _formdiv.id,
  3814. "style": {
  3815. "backgroundImage": "url(/img/icon/courseDesign.png)"
  3816. },
  3817. "name": "项目设计",
  3818. "forms": _formdiv,
  3819. "click": function () {
  3820. U.MD.D.I.openApplication(str, obj, info);
  3821. }
  3822. }
  3823. break;
  3824. }
  3825. const script1 = document.createElement("script");
  3826. script1.type = "text/javascript";
  3827. // script1.src = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
  3828. script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
  3829. const script2 = document.createElement("script");
  3830. script2.type = "text/javascript";
  3831. // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
  3832. script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
  3833. const script3 = document.createElement("script");
  3834. script3.type = "text/javascript";
  3835. script3.charset = "UTF-8";
  3836. script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
  3837. const script4 = document.createElement("script");
  3838. script4.type = "text/javascript";
  3839. // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu2.js";
  3840. script4.src = window.origin + "/js/Common/jietu2E.js";
  3841. if (_iframe) {
  3842. if (str == 'doc') {
  3843. _iframe = _formdiv.querySelector('iframe')
  3844. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  3845. _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool);
  3846. _iframe.contentWindow.document.body.appendChild(script1);
  3847. _iframe.contentWindow.document.body.appendChild(script2);
  3848. // _iframe.contentWindow.document.body.appendChild(script3);
  3849. _iframe.contentWindow.document.body.appendChild(script4);
  3850. })
  3851. if (onloadListener) {
  3852. _iframe.contentDocument.location.reload()
  3853. } else {
  3854. _iframe.contentDocument.location.reload()
  3855. }
  3856. } else if (str == 'courseDesign') {
  3857. U.UF.DL.iframeLoad(_iframe, function () {
  3858. // _iframe.contentWindow.U.MD.O.W.load();
  3859. // _iframe.contentWindow.document.body.appendChild(script1);
  3860. _iframe.contentWindow.document.body.appendChild(script2);
  3861. _iframe.contentWindow.document.body.appendChild(script4);
  3862. })
  3863. } else if (str == 'mind') {
  3864. _iframe = _formdiv.querySelector('iframe')
  3865. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  3866. //
  3867. _iframe.contentWindow.document.body.appendChild(script1);
  3868. _iframe.contentWindow.document.body.appendChild(script2);
  3869. _iframe.contentWindow.document.body.appendChild(script4);
  3870. U.MD.D.I.getContent(cid, stage, task, tool, _userid, '2', _iframe)
  3871. })
  3872. if (onloadListener) {
  3873. _iframe.contentDocument.location.reload()
  3874. } else {
  3875. _iframe.contentDocument.location.reload()
  3876. }
  3877. } else if (str == 'whiteboard') {
  3878. _iframe = _formdiv.querySelector('iframe')
  3879. let onloadListener = _iframe.onload = () => {
  3880. _iframe.contentWindow.document.body.appendChild(script1);
  3881. _iframe.contentWindow.document.body.appendChild(script2);
  3882. _iframe.contentWindow.document.body.appendChild(script4);
  3883. U.MD.D.I.getContent(cid, stage, task, tool, _userid, '3', _iframe)
  3884. };
  3885. if (onloadListener) {
  3886. _iframe.contentDocument.location.reload()
  3887. } else {
  3888. _iframe.contentDocument.location.reload()
  3889. }
  3890. } else {
  3891. _iframe.onload = () => {
  3892. _iframe.contentWindow.document.body.appendChild(script1);
  3893. _iframe.contentWindow.document.body.appendChild(script2);
  3894. // _iframe.contentWindow.document.body.appendChild(script3);
  3895. _iframe.contentWindow.document.body.appendChild(script4);
  3896. };
  3897. }
  3898. _jie.onclick = async () => {
  3899. let text = ''
  3900. if (aTool == 1) {
  3901. text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
  3902. } else if (aTool == 6) {
  3903. text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
  3904. } else if (aTool == 3) {
  3905. text = await U.MD.D.I.getEditorContent(_iframe);
  3906. }
  3907. _loading.style.display = 'flex'
  3908. console.log(_loading);
  3909. var _ajs = _iframe.contentWindow.document.createElement("script");
  3910. _ajs.type = "text/javascript";
  3911. _ajs.innerHTML =
  3912. // 'console.log(' + _loading + ');\n' +
  3913. 'var _js = document.createElement("script");\n' +
  3914. '_js.type="text/javascript";\n' +
  3915. '_js.charset="UTF-8";\n' +
  3916. '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
  3917. "_js.onload = function(){\n" +
  3918. ' var a = document.getElementsByTagName("img")\n' +
  3919. ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
  3920. " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).then(canvas => {\n" +
  3921. '  var base64Url = canvas.toDataURL("image/png");\n' +
  3922. 'var base64 = "<img src=" + base64Url + " />"\n' +
  3923. 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
  3924. "beforeUpload_shishi(file," +
  3925. "'" +
  3926. _userid +
  3927. "'" +
  3928. ", " +
  3929. "'" +
  3930. _cid +
  3931. "'" +
  3932. ", " +
  3933. "'" +
  3934. _stage +
  3935. "'" +
  3936. ", " +
  3937. "'" +
  3938. _task +
  3939. "'" +
  3940. ", " +
  3941. "'" +
  3942. _tool +
  3943. "'" +
  3944. ", " +
  3945. "'" +
  3946. (str + '_loadLi_JieTeacherE' + cid + stage + task + tool + _userid) +
  3947. "'" +
  3948. ", " +
  3949. "'" +
  3950. aTool +
  3951. "'" +
  3952. ", " +
  3953. "`" +
  3954. text +
  3955. "`" +
  3956. ")\n" +
  3957. " });\n" +
  3958. "}\n" +
  3959. "document.head.appendChild(_js);\n";
  3960. _iframe.contentWindow.document.head.appendChild(_ajs);
  3961. }
  3962. }
  3963. }
  3964. U.MD.D.I.getEditorContent = function (iframe) {
  3965. return new Promise((resolve, reject) => {
  3966. iframe.contentWindow.editor.minder.exportData('json').then(function (content) {
  3967. console.log(content);
  3968. resolve(content)
  3969. });
  3970. });
  3971. }
  3972. U.MD.D.I.getContent = function (cid, s, task, t, uid, type, iframe) {
  3973. // U.A.Request(US.Config.pbl + "selectWord2?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type, [], function (res) {
  3974. // if (res.value[0].length > 0) {
  3975. // // resolve(res.value[0][0].text);
  3976. // iframe.contentWindow.editor.minder.importData('json', res.value[0][0].text).then(function (data) {
  3977. // $(fileInput).val('');
  3978. // });
  3979. // }
  3980. // }, [], { "type": "GET", "withCredentials": true });
  3981. var xmlhttp;
  3982. var Mac, Sn, DeviceId
  3983. if (window.XMLHttpRequest) {
  3984. // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
  3985. xmlhttp = new XMLHttpRequest();
  3986. } else {
  3987. // IE6, IE5 浏览器执行代码
  3988. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  3989. }
  3990. xmlhttp.onreadystatechange = function () {
  3991. if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
  3992. if (xmlhttp.response && JSON.parse(xmlhttp.response)[0].length > 0) {
  3993. // resolve(res.value[0][0].text);
  3994. if (type == '2') {
  3995. iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text)
  3996. } else if (type == '3') {
  3997. iframe.contentWindow.h.app.updateScene({ elements: JSON.parse(JSON.parse(xmlhttp.response)[0][0].text) })
  3998. }
  3999. } else {
  4000. U.MD.D.I.getContents2(cid, s, task, t, uid, type, iframe)
  4001. }
  4002. }
  4003. }
  4004. xmlhttp.open("GET", US.Config.pbl + "selectWord2?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type, true);
  4005. xmlhttp.send();
  4006. }
  4007. U.MD.D.I.openApplicationJieS = function (str, cid, stage, task, tool) {
  4008. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  4009. _formdiv, //创建任务栏时同时弹出的窗体元素。
  4010. _userinfo = US.userInfo, //登录用户信息
  4011. _userid = US.userInfo.userid //登录用户id
  4012. let _iframe;
  4013. let _cid = cid,
  4014. _stage = stage,
  4015. _task = task,
  4016. _tool = tool;
  4017. var _jie = $$("div", {
  4018. "style": {
  4019. "position": "absolute",
  4020. "bottom": "50px",
  4021. "right": "50px",
  4022. "zIndex": "9999",
  4023. "backgroundColor": "#2268bc",
  4024. "color": "#fff",
  4025. "padding": "12px 20px",
  4026. "cursor": "pointer",
  4027. "borderRadius": "4px",
  4028. },
  4029. "innerHTML": "确认并提交"
  4030. })
  4031. let aTool = ''
  4032. let _loading = document.createElement('div')
  4033. _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
  4034. // _loading.id = "";
  4035. let _lchild = document.createElement('div')
  4036. let _limg = document.createElement('img')
  4037. _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
  4038. _limg.style = "width: 26px;margin-right: 10px;"
  4039. _lchild.appendChild(_limg)
  4040. let _lspan = document.createElement('span')
  4041. _lspan.innerHTML = "上传中..."
  4042. _lchild.appendChild(_lspan)
  4043. _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
  4044. _loading.appendChild(_lchild)
  4045. var _box = $$('div', {
  4046. "style": {
  4047. "position": "relative",
  4048. "width": "100%",
  4049. "height": "100%",
  4050. },
  4051. })
  4052. _box.appendChild(_loading)
  4053. _box.id = str + '_loadLi_JieS' + cid + stage + task + tool + _userid
  4054. switch (str) {
  4055. case "whiteboard":
  4056. aTool = 1;
  4057. _iframe = $$("iframe", {
  4058. "frameborder": "no",
  4059. "border": "0",
  4060. "scrolling ": "no",
  4061. "style": {
  4062. "cssText": "border:0;width:100%;height:100%"
  4063. },
  4064. "src": "https://iwb.cocorobo.cn/"
  4065. })
  4066. _box.appendChild(_iframe);
  4067. _box.appendChild(_jie);
  4068. _formdiv = new U.UF.UI.form(
  4069. "电子白板",
  4070. _box, {
  4071. "id": "whiteboards" + cid + stage + task + tool,
  4072. "style": {
  4073. "width": "90%",
  4074. "height": "90%",
  4075. "overflow": 'hidden'
  4076. },
  4077. "onresize": function () { }
  4078. }, {
  4079. closecallback: function () { }
  4080. }, {
  4081. "style": {
  4082. "height": "36px"
  4083. }
  4084. }).form; //创建窗体
  4085. _taskbar = {
  4086. "id": str + _formdiv.id,
  4087. "style": {
  4088. "backgroundImage": "url(/img/icon/whiteBoard.png)"
  4089. },
  4090. "name": "电子白板",
  4091. "forms": _formdiv,
  4092. "click": function () {
  4093. U.MD.D.I.openApplication(str, obj, info);
  4094. }
  4095. }
  4096. break;
  4097. case "mind":
  4098. aTool = 3;
  4099. _iframe = $$("iframe", {
  4100. "frameborder": "no",
  4101. "border": "0",
  4102. "scrolling ": "no",
  4103. "style": {
  4104. "cssText": "border:0;width:100%;height:100%"
  4105. },
  4106. "src": "/kityminder-editor/dist/index.html"
  4107. });
  4108. _box.appendChild(_iframe);
  4109. _box.appendChild(_jie);
  4110. _formdiv = new U.UF.UI.form(
  4111. "思维导图",
  4112. _box, { //"/jsmind/example/demo.html"
  4113. "id": "minds" + cid + stage + task + tool,
  4114. "style": {
  4115. "width": "90%",
  4116. "height": "90%",
  4117. "overflow": 'hidden'
  4118. },
  4119. "onresize": function () { }
  4120. }, {
  4121. closecallback: function () { }
  4122. }, {
  4123. "style": {
  4124. "height": "36px"
  4125. }
  4126. }).form; //创建窗体
  4127. _taskbar = {
  4128. "id": str + _formdiv.id,
  4129. "style": {
  4130. "backgroundImage": "url(/img/icon/mindMapping.png)"
  4131. },
  4132. "name": "思维导图",
  4133. "forms": _formdiv,
  4134. "click": function () {
  4135. U.MD.D.I.openApplication(str, obj, info);
  4136. }
  4137. }
  4138. break;
  4139. case "doc":
  4140. aTool = 6;
  4141. _iframe = $$("iframe", {
  4142. "frameborder": "no",
  4143. "border": "0",
  4144. "scrolling ": "no",
  4145. "style": {
  4146. "cssText": "border:0;width:100%;height:100%"
  4147. },
  4148. "src": "/Office/Word/WordEditArea.htm"
  4149. })
  4150. _box.appendChild(_iframe);
  4151. _box.appendChild(_jie);
  4152. _formdiv = new U.UF.UI.form(
  4153. "协同文档",
  4154. _box, {
  4155. "id": "docs" + cid + stage + task + tool,
  4156. "style": {
  4157. "width": "90%",
  4158. "height": "90%",
  4159. "overflow": 'hidden'
  4160. },
  4161. "onresize": function () { }
  4162. }, {
  4163. closecallback: function () { }
  4164. }, {
  4165. "style": {
  4166. "height": "36px"
  4167. }
  4168. }).form; //创建窗体
  4169. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  4170. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load(cid, stage, task, tool, '2');
  4171. })
  4172. _taskbar = {
  4173. "id": str + _formdiv.id,
  4174. "style": {
  4175. "backgroundImage": "url(/img/icon/doc.png)"
  4176. },
  4177. "name": "协同文档",
  4178. "forms": _formdiv,
  4179. "click": function () {
  4180. U.MD.D.I.openApplication(str, obj, info);
  4181. }
  4182. }
  4183. break;
  4184. }
  4185. const script1 = document.createElement("script");
  4186. script1.type = "text/javascript";
  4187. // script1.src = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
  4188. script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
  4189. const script2 = document.createElement("script");
  4190. script2.type = "text/javascript";
  4191. // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
  4192. script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
  4193. const script3 = document.createElement("script");
  4194. script3.type = "text/javascript";
  4195. script3.charset = "UTF-8";
  4196. script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
  4197. const script4 = document.createElement("script");
  4198. script4.type = "text/javascript";
  4199. // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu4.js";
  4200. script4.src = "https://cloud.cocorobo.cn/js/Common/jietu4.js";
  4201. if (_iframe) {
  4202. if (str == 'doc') {
  4203. _iframe = _formdiv.querySelector('iframe')
  4204. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  4205. _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool, '2');
  4206. _iframe.contentWindow.document.body.appendChild(script1);
  4207. _iframe.contentWindow.document.body.appendChild(script2);
  4208. // _iframe.contentWindow.document.body.appendChild(script3);
  4209. _iframe.contentWindow.document.body.appendChild(script4);
  4210. })
  4211. if (onloadListener) {
  4212. _iframe.contentDocument.location.reload()
  4213. } else {
  4214. _iframe.contentDocument.location.reload()
  4215. }
  4216. } else if (str == 'mind') {
  4217. _iframe = _formdiv.querySelector('iframe')
  4218. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  4219. _iframe.contentWindow.document.body.appendChild(script1);
  4220. _iframe.contentWindow.document.body.appendChild(script2);
  4221. _iframe.contentWindow.document.body.appendChild(script4);
  4222. U.MD.D.I.getContents(cid, stage, task, tool, _userid, '2', _iframe)
  4223. })
  4224. if (onloadListener) {
  4225. _iframe.contentDocument.location.reload()
  4226. } else {
  4227. _iframe.contentDocument.location.reload()
  4228. }
  4229. } else {
  4230. _iframe.onload = () => {
  4231. _iframe.contentWindow.document.body.appendChild(script1);
  4232. _iframe.contentWindow.document.body.appendChild(script2);
  4233. // _iframe.contentWindow.document.body.appendChild(script3);
  4234. _iframe.contentWindow.document.body.appendChild(script4);
  4235. };
  4236. }
  4237. _jie.onclick = async () => {
  4238. let text = ''
  4239. if (aTool == 6) {
  4240. text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
  4241. } else if (aTool == 3) {
  4242. text = await U.MD.D.I.getEditorContent(_iframe);
  4243. }
  4244. _loading.style.display = 'flex'
  4245. console.log(_loading);
  4246. var _ajs = _iframe.contentWindow.document.createElement("script");
  4247. _ajs.type = "text/javascript";
  4248. _ajs.innerHTML =
  4249. // 'console.log(' + _loading + ');\n' +
  4250. 'var _js = document.createElement("script");\n' +
  4251. '_js.type="text/javascript";\n' +
  4252. '_js.charset="UTF-8";\n' +
  4253. '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
  4254. "_js.onload = function(){\n" +
  4255. ' var a = document.getElementsByTagName("img")\n' +
  4256. ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
  4257. " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).then(canvas => {\n" +
  4258. '  var base64Url = canvas.toDataURL("image/png");\n' +
  4259. 'var base64 = "<img src=" + base64Url + " />"\n' +
  4260. 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
  4261. "beforeUpload_shishi(file," +
  4262. "'" +
  4263. _userid +
  4264. "'" +
  4265. ", " +
  4266. "'" +
  4267. _cid +
  4268. "'" +
  4269. ", " +
  4270. "'" +
  4271. _stage +
  4272. "'" +
  4273. ", " +
  4274. "'" +
  4275. _task +
  4276. "'" +
  4277. ", " +
  4278. "'" +
  4279. _tool +
  4280. "'" +
  4281. ", " +
  4282. "'" +
  4283. (str + '_loadLi_JieS' + cid + stage + task + tool + _userid) +
  4284. "'" +
  4285. ", " +
  4286. "'" +
  4287. aTool +
  4288. "'" +
  4289. ", " +
  4290. "`" +
  4291. text +
  4292. "`" +
  4293. ")\n" +
  4294. " });\n" +
  4295. "}\n" +
  4296. "document.head.appendChild(_js);\n";
  4297. _iframe.contentWindow.document.head.appendChild(_ajs);
  4298. }
  4299. }
  4300. //U.MD.D.I.openClick(str);
  4301. //如果有任务栏信息
  4302. // if (_taskbar) {
  4303. // U.MD.D.T.taskbar(_taskbar); //创建任务处理
  4304. // }
  4305. }
  4306. U.MD.D.I.openApplicationJieStudio = function (str, cid, stage, task, tool) {
  4307. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  4308. _formdiv, //创建任务栏时同时弹出的窗体元素。
  4309. _userinfo = US.userInfo, //登录用户信息
  4310. _userid = US.userInfo.userid //登录用户id
  4311. let _iframe;
  4312. let _cid = cid,
  4313. _stage = stage,
  4314. _task = task,
  4315. _tool = tool;
  4316. var _jie = $$("div", {
  4317. "style": {
  4318. "position": "absolute",
  4319. "bottom": "50px",
  4320. "right": "50px",
  4321. "zIndex": "9999",
  4322. "backgroundColor": "#2268bc",
  4323. "color": "#fff",
  4324. "padding": "12px 20px",
  4325. "cursor": "pointer",
  4326. "borderRadius": "4px",
  4327. },
  4328. "innerHTML": "确认并提交"
  4329. })
  4330. let aTool = ''
  4331. let _loading = document.createElement('div')
  4332. _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
  4333. // _loading.id = "";
  4334. let _lchild = document.createElement('div')
  4335. let _limg = document.createElement('img')
  4336. _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
  4337. _limg.style = "width: 26px;margin-right: 10px;"
  4338. _lchild.appendChild(_limg)
  4339. let _lspan = document.createElement('span')
  4340. _lspan.innerHTML = "上传中..."
  4341. _lchild.appendChild(_lspan)
  4342. _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
  4343. _loading.appendChild(_lchild)
  4344. var _box = $$('div', {
  4345. "style": {
  4346. "position": "relative",
  4347. "width": "100%",
  4348. "height": "100%",
  4349. },
  4350. })
  4351. _box.appendChild(_loading)
  4352. _box.id = str + '_loadLi_JieStudio' + cid + stage + task + tool + _userid
  4353. switch (str) {
  4354. case "whiteboard":
  4355. aTool = 1;
  4356. _iframe = $$("iframe", {
  4357. "frameborder": "no",
  4358. "border": "0",
  4359. "scrolling ": "no",
  4360. "style": {
  4361. "cssText": "border:0;width:100%;height:100%"
  4362. },
  4363. "src": "https://iwb.cocorobo.cn/"
  4364. })
  4365. _box.appendChild(_iframe);
  4366. _box.appendChild(_jie);
  4367. _formdiv = new U.UF.UI.form(
  4368. "电子白板",
  4369. _box, {
  4370. "id": "whiteboards" + cid + stage + task + tool,
  4371. "style": {
  4372. "width": "90%",
  4373. "height": "90%",
  4374. "overflow": 'hidden'
  4375. },
  4376. "onresize": function () { }
  4377. }, {
  4378. closecallback: function () { }
  4379. }, {
  4380. "style": {
  4381. "height": "36px"
  4382. }
  4383. }).form; //创建窗体
  4384. _taskbar = {
  4385. "id": str + _formdiv.id,
  4386. "style": {
  4387. "backgroundImage": "url(/img/icon/whiteBoard.png)"
  4388. },
  4389. "name": "电子白板",
  4390. "forms": _formdiv,
  4391. "click": function () {
  4392. U.MD.D.I.openApplication(str, obj, info);
  4393. }
  4394. }
  4395. break;
  4396. case "mind":
  4397. aTool = 3;
  4398. _iframe = $$("iframe", {
  4399. "frameborder": "no",
  4400. "border": "0",
  4401. "scrolling ": "no",
  4402. "style": {
  4403. "cssText": "border:0;width:100%;height:100%"
  4404. },
  4405. "src": "/kityminder-editor/dist/index.html"
  4406. });
  4407. _box.appendChild(_iframe);
  4408. _box.appendChild(_jie);
  4409. _formdiv = new U.UF.UI.form(
  4410. "思维导图",
  4411. _box, { //"/jsmind/example/demo.html"
  4412. "id": "minds" + cid + stage + task + tool,
  4413. "style": {
  4414. "width": "90%",
  4415. "height": "90%",
  4416. "overflow": 'hidden'
  4417. },
  4418. "onresize": function () { }
  4419. }, {
  4420. closecallback: function () { }
  4421. }, {
  4422. "style": {
  4423. "height": "36px"
  4424. }
  4425. }).form; //创建窗体
  4426. _taskbar = {
  4427. "id": str + _formdiv.id,
  4428. "style": {
  4429. "backgroundImage": "url(/img/icon/mindMapping.png)"
  4430. },
  4431. "name": "思维导图",
  4432. "forms": _formdiv,
  4433. "click": function () {
  4434. U.MD.D.I.openApplication(str, obj, info);
  4435. }
  4436. }
  4437. break;
  4438. case "doc":
  4439. aTool = 6;
  4440. _iframe = $$("iframe", {
  4441. "frameborder": "no",
  4442. "border": "0",
  4443. "scrolling ": "no",
  4444. "style": {
  4445. "cssText": "border:0;width:100%;height:100%"
  4446. },
  4447. "src": "/Office/Word/WordEditArea.htm"
  4448. })
  4449. _box.appendChild(_iframe);
  4450. _box.appendChild(_jie);
  4451. _formdiv = new U.UF.UI.form(
  4452. "协同文档",
  4453. _box, {
  4454. "id": "docs" + cid + stage + task + tool,
  4455. "style": {
  4456. "width": "90%",
  4457. "height": "90%",
  4458. "overflow": 'hidden'
  4459. },
  4460. "onresize": function () { }
  4461. }, {
  4462. closecallback: function () { }
  4463. }, {
  4464. "style": {
  4465. "height": "36px"
  4466. }
  4467. }).form; //创建窗体
  4468. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  4469. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load(cid, stage, task, tool, '2');
  4470. })
  4471. _taskbar = {
  4472. "id": str + _formdiv.id,
  4473. "style": {
  4474. "backgroundImage": "url(/img/icon/doc.png)"
  4475. },
  4476. "name": "协同文档",
  4477. "forms": _formdiv,
  4478. "click": function () {
  4479. U.MD.D.I.openApplication(str, obj, info);
  4480. }
  4481. }
  4482. break;
  4483. }
  4484. const script1 = document.createElement("script");
  4485. script1.type = "text/javascript";
  4486. // script1.src = US.Config.bpbl + "/pbl-student-table/dist/js/jquery-3.6.0.min.js";
  4487. script1.src = "https://cloud.cocorobo.cn/js/Common/jquery-3.6.0.min.js";
  4488. const script2 = document.createElement("script");
  4489. script2.type = "text/javascript";
  4490. // script2.src = US.Config.bpbl + "/pbl-student-table/dist/js/aws-sdk-2.235.1.min.js";
  4491. script2.src = "https://cloud.cocorobo.cn/js/Common/aws-sdk-2.235.1.min.js";
  4492. const script3 = document.createElement("script");
  4493. script3.type = "text/javascript";
  4494. script3.charset = "UTF-8";
  4495. script3.src = "https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";
  4496. const script4 = document.createElement("script");
  4497. script4.type = "text/javascript";
  4498. // script4.src = US.Config.bpbl + "/pbl-student-table/dist/js/jietu4.js";
  4499. script4.src = "https://cloud.cocorobo.cn/js/Common/jietu5.js";
  4500. if (_iframe) {
  4501. if (str == 'doc') {
  4502. _iframe = _formdiv.querySelector('iframe')
  4503. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  4504. _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool, '2');
  4505. _iframe.contentWindow.document.body.appendChild(script1);
  4506. _iframe.contentWindow.document.body.appendChild(script2);
  4507. // _iframe.contentWindow.document.body.appendChild(script3);
  4508. _iframe.contentWindow.document.body.appendChild(script4);
  4509. })
  4510. if (onloadListener) {
  4511. _iframe.contentDocument.location.reload()
  4512. } else {
  4513. _iframe.contentDocument.location.reload()
  4514. }
  4515. } else if (str == 'mind') {
  4516. _iframe = _formdiv.querySelector('iframe')
  4517. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  4518. _iframe.contentWindow.document.body.appendChild(script1);
  4519. _iframe.contentWindow.document.body.appendChild(script2);
  4520. _iframe.contentWindow.document.body.appendChild(script4);
  4521. U.MD.D.I.getContents(cid, stage, task, tool, _userid, '2', _iframe)
  4522. })
  4523. if (onloadListener) {
  4524. _iframe.contentDocument.location.reload()
  4525. } else {
  4526. _iframe.contentDocument.location.reload()
  4527. }
  4528. } else {
  4529. _iframe.onload = () => {
  4530. _iframe.contentWindow.document.body.appendChild(script1);
  4531. _iframe.contentWindow.document.body.appendChild(script2);
  4532. // _iframe.contentWindow.document.body.appendChild(script3);
  4533. _iframe.contentWindow.document.body.appendChild(script4);
  4534. };
  4535. }
  4536. _jie.onclick = async () => {
  4537. let text = ''
  4538. if (aTool == 6) {
  4539. text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
  4540. } else if (aTool == 3) {
  4541. text = await U.MD.D.I.getEditorContent(_iframe);
  4542. }
  4543. _loading.style.display = 'flex'
  4544. console.log(_loading);
  4545. var _ajs = _iframe.contentWindow.document.createElement("script");
  4546. _ajs.type = "text/javascript";
  4547. _ajs.innerHTML =
  4548. // 'console.log(' + _loading + ');\n' +
  4549. 'var _js = document.createElement("script");\n' +
  4550. '_js.type="text/javascript";\n' +
  4551. '_js.charset="UTF-8";\n' +
  4552. '_js.src="https://cloud.cocorobo.cn/js/Common/html2canvas.min.js";\n' +
  4553. "_js.onload = function(){\n" +
  4554. ' var a = document.getElementsByTagName("img")\n' +
  4555. ' for(var i = 0;i<a.length;i++){a[i].crossOrigin="anonymous"}\n' +
  4556. " html2canvas(document.body,{allowTaint: true,useCORS: true,height: document.body.scrollHeight,windowHeight: document.body.scrollHeight}).then(canvas => {\n" +
  4557. '  var base64Url = canvas.toDataURL("image/png");\n' +
  4558. 'var base64 = "<img src=" + base64Url + " />"\n' +
  4559. 'var file = dataURLtoFile_shishi(base64Url, "截图")\n' +
  4560. "beforeUpload_shishi(file," +
  4561. "'" +
  4562. _userid +
  4563. "'" +
  4564. ", " +
  4565. "'" +
  4566. _cid +
  4567. "'" +
  4568. ", " +
  4569. "'" +
  4570. _stage +
  4571. "'" +
  4572. ", " +
  4573. "'" +
  4574. _task +
  4575. "'" +
  4576. ", " +
  4577. "'" +
  4578. _tool +
  4579. "'" +
  4580. ", " +
  4581. "'" +
  4582. (str + '_loadLi_JieStudio' + cid + stage + task + tool + _userid) +
  4583. "'" +
  4584. ", " +
  4585. "'" +
  4586. aTool +
  4587. "'" +
  4588. ", " +
  4589. "`" +
  4590. text +
  4591. "`" +
  4592. ")\n" +
  4593. " });\n" +
  4594. "}\n" +
  4595. "document.head.appendChild(_js);\n";
  4596. _iframe.contentWindow.document.head.appendChild(_ajs);
  4597. }
  4598. }
  4599. //U.MD.D.I.openClick(str);
  4600. //如果有任务栏信息
  4601. // if (_taskbar) {
  4602. // U.MD.D.T.taskbar(_taskbar); //创建任务处理
  4603. // }
  4604. }
  4605. U.MD.D.I.openApplicationYu = function (str, cid, stage, task, tool) {
  4606. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  4607. _formdiv, //创建任务栏时同时弹出的窗体元素。
  4608. _userinfo = US.userInfo, //登录用户信息
  4609. _userid = US.userInfo.userid //登录用户id
  4610. let _iframe;
  4611. let _cid = cid,
  4612. _stage = stage,
  4613. _task = task,
  4614. _tool = tool;
  4615. var _jie = $$("div", {
  4616. "style": {
  4617. "position": "absolute",
  4618. "bottom": "50px",
  4619. "right": "50px",
  4620. "zIndex": "9999",
  4621. "backgroundColor": "#2268bc",
  4622. "color": "#fff",
  4623. "padding": "12px 20px",
  4624. "cursor": "pointer",
  4625. "borderRadius": "4px",
  4626. },
  4627. "innerHTML": "上传模板"
  4628. })
  4629. let aTool = ''
  4630. let _loading = document.createElement('div')
  4631. _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
  4632. // _loading.id = "";
  4633. let _lchild = document.createElement('div')
  4634. let _limg = document.createElement('img')
  4635. _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
  4636. _limg.style = "width: 26px;margin-right: 10px;"
  4637. _lchild.appendChild(_limg)
  4638. let _lspan = document.createElement('span')
  4639. _lspan.innerHTML = "上传中..."
  4640. _lchild.appendChild(_lspan)
  4641. _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
  4642. _loading.appendChild(_lchild)
  4643. var _box = $$('div', {
  4644. "style": {
  4645. "position": "relative",
  4646. "width": "100%",
  4647. "height": "100%",
  4648. },
  4649. })
  4650. _box.appendChild(_loading)
  4651. _box.id = str + '_loadLi_Yu' + cid + stage + task + tool + _userid
  4652. switch (str) {
  4653. case "whiteboard":
  4654. aTool = 1;
  4655. _iframe = $$("iframe", {
  4656. "frameborder": "no",
  4657. "border": "0",
  4658. "scrolling ": "no",
  4659. "style": {
  4660. "cssText": "border:0;width:100%;height:100%"
  4661. },
  4662. "src": "https://iwb.cocorobo.cn/"
  4663. })
  4664. _box.appendChild(_iframe);
  4665. _box.appendChild(_jie);
  4666. _formdiv = new U.UF.UI.form(
  4667. "电子白板",
  4668. _box, {
  4669. "id": "whiteboards_Yu" + cid + stage + task + tool,
  4670. "style": {
  4671. "width": "90%",
  4672. "height": "90%",
  4673. "overflow": 'hidden'
  4674. },
  4675. "onresize": function () { }
  4676. }, {
  4677. closecallback: function () { }
  4678. }, {
  4679. "style": {
  4680. "height": "36px"
  4681. }
  4682. }).form; //创建窗体
  4683. _taskbar = {
  4684. "id": str + _formdiv.id,
  4685. "style": {
  4686. "backgroundImage": "url(/img/icon/whiteBoard.png)"
  4687. },
  4688. "name": "电子白板",
  4689. "forms": _formdiv,
  4690. "click": function () {
  4691. U.MD.D.I.openApplication(str, obj, info);
  4692. }
  4693. }
  4694. break;
  4695. case "mind":
  4696. aTool = 3;
  4697. _iframe = $$("iframe", {
  4698. "frameborder": "no",
  4699. "border": "0",
  4700. "scrolling ": "no",
  4701. "style": {
  4702. "cssText": "border:0;width:100%;height:100%"
  4703. },
  4704. "src": "/kityminder-editor/dist/index.html"
  4705. });
  4706. _box.appendChild(_iframe);
  4707. _box.appendChild(_jie);
  4708. _formdiv = new U.UF.UI.form(
  4709. "思维导图",
  4710. _box, { //"/jsmind/example/demo.html"
  4711. "id": "minds_Yu" + cid + stage + task + tool,
  4712. "style": {
  4713. "width": "90%",
  4714. "height": "90%",
  4715. "overflow": 'hidden'
  4716. },
  4717. "onresize": function () { }
  4718. }, {
  4719. closecallback: function () { }
  4720. }, {
  4721. "style": {
  4722. "height": "36px"
  4723. }
  4724. }).form; //创建窗体
  4725. _taskbar = {
  4726. "id": str + _formdiv.id,
  4727. "style": {
  4728. "backgroundImage": "url(/img/icon/mindMapping.png)"
  4729. },
  4730. "name": "思维导图",
  4731. "forms": _formdiv,
  4732. "click": function () {
  4733. U.MD.D.I.openApplication(str, obj, info);
  4734. }
  4735. }
  4736. break;
  4737. case "doc":
  4738. aTool = 6;
  4739. _iframe = $$("iframe", {
  4740. "frameborder": "no",
  4741. "border": "0",
  4742. "scrolling ": "no",
  4743. "style": {
  4744. "cssText": "border:0;width:100%;height:100%"
  4745. },
  4746. "src": "/Office/Word/WordEditArea.htm"
  4747. })
  4748. _box.appendChild(_iframe);
  4749. _box.appendChild(_jie);
  4750. _formdiv = new U.UF.UI.form(
  4751. "协同文档",
  4752. _box, {
  4753. "id": "docs_Yu" + cid + stage + task + tool,
  4754. "style": {
  4755. "width": "90%",
  4756. "height": "90%",
  4757. "overflow": 'hidden'
  4758. },
  4759. "onresize": function () { }
  4760. }, {
  4761. closecallback: function () { }
  4762. }, {
  4763. "style": {
  4764. "height": "36px"
  4765. }
  4766. }).form; //创建窗体
  4767. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  4768. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load(cid, stage, task, tool, '2');
  4769. })
  4770. _taskbar = {
  4771. "id": str + _formdiv.id,
  4772. "style": {
  4773. "backgroundImage": "url(/img/icon/doc.png)"
  4774. },
  4775. "name": "协同文档",
  4776. "forms": _formdiv,
  4777. "click": function () {
  4778. U.MD.D.I.openApplication(str, obj, info);
  4779. }
  4780. }
  4781. break;
  4782. case "CocoPi":
  4783. aTool = 57;
  4784. _iframe = $$("iframe", {
  4785. "allowpaymentrequest": "allowpaymentrequest",
  4786. "allow": "camera *; microphone *;display-capture;midi;encrypted-media;usb",
  4787. "webkitallowfullscreen": "",
  4788. "mozallowfullscreen": "",
  4789. "frameborder": "no",
  4790. "border": "0",
  4791. "scrolling ": "no",
  4792. "style": {
  4793. "cssText": "border:0;width:100%;height:100%"
  4794. },
  4795. "src": "https://pi.cocorobo.cn/"
  4796. })
  4797. _box.appendChild(_iframe);
  4798. _box.appendChild(_jie);
  4799. _formdiv = new U.UF.UI.form(
  4800. "CocoPi",
  4801. _box, {
  4802. "id": "CocoPi_Yu" + cid + stage + task + tool,
  4803. "style": {
  4804. "width": "90%",
  4805. "height": "90%",
  4806. "overflow": 'hidden'
  4807. },
  4808. "onresize": function () { }
  4809. }, {
  4810. closecallback: function () { }
  4811. }, {
  4812. "style": {
  4813. "height": "36px"
  4814. }
  4815. }).form; //创建窗体
  4816. _taskbar = {
  4817. "id": str + _formdiv.id,
  4818. "style": {
  4819. "backgroundImage": "url(/img/icon/cocopi.png)"
  4820. },
  4821. "name": "CocoPi",
  4822. "forms": _formdiv,
  4823. "click": function () {
  4824. U.MD.D.I.openApplication(str, obj, info);
  4825. }
  4826. }
  4827. break;
  4828. }
  4829. if (_iframe) {
  4830. if (str == 'doc') {
  4831. _iframe = _formdiv.querySelector('iframe')
  4832. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  4833. _iframe.contentWindow.U.MD.O.W.load(cid, stage, task, tool, '2');
  4834. })
  4835. if (onloadListener) {
  4836. _iframe.contentDocument.location.reload()
  4837. } else {
  4838. _iframe.contentDocument.location.reload()
  4839. }
  4840. } else if (str == 'mind') {
  4841. _iframe = _formdiv.querySelector('iframe')
  4842. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  4843. U.MD.D.I.getContents2(cid, stage, task, tool, _userid, '2', _iframe)
  4844. })
  4845. if (onloadListener) {
  4846. _iframe.contentDocument.location.reload()
  4847. } else {
  4848. _iframe.contentDocument.location.reload()
  4849. }
  4850. } else if (str == 'whiteboard') {
  4851. _iframe = _formdiv.querySelector('iframe')
  4852. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  4853. U.MD.D.I.getContents2(cid, stage, task, tool, _userid, '3', _iframe)
  4854. })
  4855. if (onloadListener) {
  4856. _iframe.contentDocument.location.reload()
  4857. } else {
  4858. _iframe.contentDocument.location.reload()
  4859. }
  4860. } else if (str == 'CocoPi') {
  4861. _iframe = _formdiv.querySelector('iframe')
  4862. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  4863. U.MD.D.I.getContents2(cid, stage, task, tool, _userid, '4', _iframe)
  4864. })
  4865. if (onloadListener) {
  4866. _iframe.contentDocument.location.reload()
  4867. } else {
  4868. _iframe.contentDocument.location.reload()
  4869. }
  4870. } else {
  4871. _iframe.onload = () => { };
  4872. }
  4873. _jie.onclick = async () => {
  4874. let text = ''
  4875. let type = '2'
  4876. if (aTool == 1) {
  4877. text = JSON.stringify(_iframe.contentWindow.h.app.scene.elements)
  4878. type = '3'
  4879. } else if (aTool == 6) {
  4880. text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
  4881. type = '1'
  4882. } else if (aTool == 3) {
  4883. text = await U.MD.D.I.getEditorContent(_iframe);
  4884. type = '2'
  4885. } else if (aTool == 57) {
  4886. text = encodeURIComponent(_iframe.contentWindow.getLoadXmlStr())
  4887. type = '4'
  4888. }
  4889. _loading.style.display = 'flex'
  4890. U.MD.D.I.setContents(_cid, _stage, _task, _tool, _userid, type, text, _loading, _lspan)
  4891. }
  4892. }
  4893. //U.MD.D.I.openClick(str);
  4894. //如果有任务栏信息
  4895. // if (_taskbar) {
  4896. // U.MD.D.T.taskbar(_taskbar); //创建任务处理
  4897. // }
  4898. }
  4899. U.MD.D.I.getContents = function (cid, s, task, t, uid, type, iframe) {
  4900. var xmlhttp;
  4901. var Mac, Sn, DeviceId
  4902. if (window.XMLHttpRequest) {
  4903. // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
  4904. xmlhttp = new XMLHttpRequest();
  4905. } else {
  4906. // IE6, IE5 浏览器执行代码
  4907. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  4908. }
  4909. xmlhttp.onreadystatechange = function () {
  4910. if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
  4911. if (xmlhttp.response && JSON.parse(xmlhttp.response)[0].length > 0) {
  4912. // resolve(res.value[0][0].text);
  4913. iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text)
  4914. }
  4915. }
  4916. }
  4917. xmlhttp.open("GET", US.Config.pbl + "selectWords?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type, true);
  4918. xmlhttp.send();
  4919. }
  4920. U.MD.D.I.getContents2 = function (cid, s, task, t, uid, type, iframe) {
  4921. var xmlhttp;
  4922. var Mac, Sn, DeviceId
  4923. if (window.XMLHttpRequest) {
  4924. // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
  4925. xmlhttp = new XMLHttpRequest();
  4926. } else {
  4927. // IE6, IE5 浏览器执行代码
  4928. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  4929. }
  4930. xmlhttp.onreadystatechange = function () {
  4931. if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
  4932. if (xmlhttp.response && JSON.parse(xmlhttp.response)[0].length > 0) {
  4933. // resolve(res.value[0][0].text);
  4934. if (type == '2') {
  4935. iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text)
  4936. } else if (type == '3') {
  4937. iframe.contentWindow.h.app.updateScene({ elements: JSON.parse(JSON.parse(xmlhttp.response)[0][0].text) })
  4938. } else if (type == '4') {
  4939. iframe.contentWindow.loadingXml(JSON.parse(xmlhttp.response)[0][0].text)
  4940. }
  4941. } else {
  4942. if (type == '2') {
  4943. iframe.contentWindow.editor.minder.importData('json', '')
  4944. } else if (type == '3') {
  4945. iframe.contentWindow.h.app.updateScene({ elements: [] })
  4946. } else if (type == '4') {
  4947. iframe.contentWindow.window.blockpy.components.editor.blockly.clear();
  4948. }
  4949. }
  4950. }
  4951. }
  4952. xmlhttp.open("GET", US.Config.pbl + "selectWordsY?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type, true);
  4953. xmlhttp.send();
  4954. }
  4955. U.MD.D.I.setContents = function (cid, s, task, t, uid, type, text, loading, span) {
  4956. var xmlhttp;
  4957. var Mac, Sn, DeviceId
  4958. if (window.XMLHttpRequest) {
  4959. // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
  4960. xmlhttp = new XMLHttpRequest();
  4961. } else {
  4962. // IE6, IE5 浏览器执行代码
  4963. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  4964. }
  4965. xmlhttp.onreadystatechange = function () {
  4966. if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
  4967. if (xmlhttp.response) {
  4968. // resolve(res.value[0][0].text);
  4969. // iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text).then(function (data) {
  4970. // $(fileInput).val('');
  4971. // });
  4972. span.innerHTML = '上传成功'
  4973. setTimeout(() => {
  4974. loading.style.display = 'none'
  4975. }, 1000);
  4976. }
  4977. }
  4978. }
  4979. // xmlhttp.open("GET", US.Config.pbl + "insertWord2y?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t+ "&text=" + text + "&type=" + type, true);
  4980. xmlhttp.open("POST", US.Config.pbl + "insertWord2y", true);
  4981. // xmlhttp.open("POST", "http://localhost:7003/api/pbl/" + "insertWord2y", true);
  4982. xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  4983. // 设置请求头,表示请求体的编码格式
  4984. xmlhttp.send("uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&text=" + text.replaceAll(/%/g, "%25") + "&type=" + type);
  4985. // 设置请求体,使用url-encoded格式的数据
  4986. }
  4987. U.MD.D.I.openApplicationUpload = function (str, cid, stage, task, tool) {
  4988. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  4989. _formdiv, //创建任务栏时同时弹出的窗体元素。
  4990. _userinfo = US.userInfo, //登录用户信息
  4991. _userid = US.userInfo.userid //登录用户id
  4992. let _iframe;
  4993. let _cid = cid,
  4994. _stage = stage,
  4995. _task = task,
  4996. _tool = tool;
  4997. var _jie = $$("div", {
  4998. "style": {
  4999. "position": "absolute",
  5000. "bottom": "50px",
  5001. "right": "50px",
  5002. "zIndex": "9999",
  5003. "backgroundColor": "#2268bc",
  5004. "color": "#fff",
  5005. "padding": "12px 20px",
  5006. "cursor": "pointer",
  5007. "borderRadius": "4px",
  5008. },
  5009. "innerHTML": "提交作业"
  5010. })
  5011. let aTool = ''
  5012. let _loading = document.createElement('div')
  5013. _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
  5014. // _loading.id = "";
  5015. let _lchild = document.createElement('div')
  5016. let _limg = document.createElement('img')
  5017. _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
  5018. _limg.style = "width: 26px;margin-right: 10px;"
  5019. _lchild.appendChild(_limg)
  5020. let _lspan = document.createElement('span')
  5021. _lspan.innerHTML = "上传中..."
  5022. _lchild.appendChild(_lspan)
  5023. _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
  5024. _loading.appendChild(_lchild)
  5025. var _box = $$('div', {
  5026. "style": {
  5027. "position": "relative",
  5028. "width": "100%",
  5029. "height": "100%",
  5030. },
  5031. })
  5032. _box.appendChild(_loading)
  5033. _box.id = str + '_loadLi_Upload' + cid + stage + task + tool + _userid
  5034. switch (str) {
  5035. case "CocoPi":
  5036. aTool = 57;
  5037. _iframe = $$("iframe", {
  5038. "allowpaymentrequest": "allowpaymentrequest",
  5039. "allow": "camera *; microphone *;display-capture;midi;encrypted-media;usb",
  5040. "webkitallowfullscreen": "",
  5041. "mozallowfullscreen": "",
  5042. "frameborder": "no",
  5043. "border": "0",
  5044. "scrolling ": "no",
  5045. "style": {
  5046. "cssText": "border:0;width:100%;height:100%"
  5047. },
  5048. "src": "https://pi.cocorobo.cn/"
  5049. })
  5050. _box.appendChild(_iframe);
  5051. _box.appendChild(_jie);
  5052. _formdiv = new U.UF.UI.form(
  5053. "CocoPi",
  5054. _box, {
  5055. "id": "CocoPi_Upload" + cid + stage + task + tool,
  5056. "style": {
  5057. "width": "90%",
  5058. "height": "90%",
  5059. "overflow": 'hidden'
  5060. },
  5061. "onresize": function () { }
  5062. }, {
  5063. closecallback: function () { }
  5064. }, {
  5065. "style": {
  5066. "height": "36px"
  5067. }
  5068. }).form; //创建窗体
  5069. _taskbar = {
  5070. "id": str + _formdiv.id,
  5071. "style": {
  5072. "backgroundImage": "url(/img/icon/cocopi.png)"
  5073. },
  5074. "name": "CocoPi",
  5075. "forms": _formdiv,
  5076. "click": function () {
  5077. U.MD.D.I.openApplication(str, obj, info);
  5078. }
  5079. }
  5080. break;
  5081. }
  5082. if (_iframe) {
  5083. if (str == 'CocoPi') {
  5084. _iframe = _formdiv.querySelector('iframe')
  5085. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  5086. U.MD.D.I.getUploadContent(cid, stage, task, tool, _userid, aTool, '15', _iframe)
  5087. })
  5088. if (onloadListener) {
  5089. _iframe.contentDocument.location.reload()
  5090. } else {
  5091. _iframe.contentDocument.location.reload()
  5092. }
  5093. }
  5094. _jie.onclick = async () => {
  5095. let text = ''
  5096. if (aTool == 57) {
  5097. text = _iframe.contentWindow.getLoadXmlStr()
  5098. }
  5099. _loading.style.display = 'flex'
  5100. console.log(_loading);
  5101. U.A.Request(US.Config.pbl + "addCourseWorks4-u", [_userid, _cid, _stage, _task, _tool, text.replaceAll(/%/g, "%25"), 15, aTool, text], function (res) {
  5102. _loading.style.display = 'none'
  5103. let _div = document.createElement('div')
  5104. _div.style = "width:100%;height:100%;background:#0000008f;position:fixed;top:0;left:0;z-index:99999999999999;display: flex;justify-content: center;align-items: center;"
  5105. let _inner = document.createElement('div')
  5106. _inner.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;"
  5107. _inner.innerHTML = "上传成功"
  5108. _div.appendChild(_inner)
  5109. _iframe.contentWindow.window.document.body.appendChild(_div)
  5110. _div.onclick = () => {
  5111. _iframe.contentWindow.window.document.body.removeChild(_div)
  5112. }
  5113. setTimeout(() => {
  5114. _iframe.contentWindow.window.document.body.removeChild(_div)
  5115. }, 1000);
  5116. }, [], { "type": "POST", "withCredentials": true });
  5117. }
  5118. }
  5119. }
  5120. U.MD.D.I.openApplicationTeacherUpload = function (str, cid, stage, task, tool, student) {
  5121. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  5122. _formdiv, //创建任务栏时同时弹出的窗体元素。
  5123. _userid = student.userid, //登录用户id
  5124. _username = student.student //用户名字
  5125. let _iframe;
  5126. let _cid = cid,
  5127. _stage = stage,
  5128. _task = task,
  5129. _tool = tool;
  5130. var _jie = $$("div", {
  5131. "style": {
  5132. "position": "absolute",
  5133. "bottom": "50px",
  5134. "right": "50px",
  5135. "zIndex": "9999",
  5136. "backgroundColor": "#2268bc",
  5137. "color": "#fff",
  5138. "padding": "12px 20px",
  5139. "cursor": "pointer",
  5140. "borderRadius": "4px",
  5141. },
  5142. "innerHTML": "提交作业"
  5143. })
  5144. let aTool = ''
  5145. let _loading = document.createElement('div')
  5146. _loading.style = "width:100%;height:100%;background:#00000000;position:absolute;top:0;left:0;z-index:99999999999999;display: none;justify-content: center;align-items: center;"
  5147. // _loading.id = "";
  5148. let _lchild = document.createElement('div')
  5149. let _limg = document.createElement('img')
  5150. _limg.src = US.Config.bpbl + '/pbl-student-table/dist/js/loading.gif'
  5151. _limg.style = "width: 26px;margin-right: 10px;"
  5152. _lchild.appendChild(_limg)
  5153. let _lspan = document.createElement('span')
  5154. _lspan.innerHTML = "上传中..."
  5155. _lchild.appendChild(_lspan)
  5156. _lchild.style = "color: rgb(255, 255, 255);padding: 15px;background: rgba(0, 0, 0, 0.44);font-size: 18px;display: flex;align-items: center;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
  5157. _loading.appendChild(_lchild)
  5158. var _box = $$('div', {
  5159. "style": {
  5160. "position": "relative",
  5161. "width": "100%",
  5162. "height": "100%",
  5163. },
  5164. })
  5165. _box.appendChild(_loading)
  5166. _box.id = str + '_loadLi_TeacherUpload' + cid + stage + task + tool + _userid
  5167. switch (str) {
  5168. case "CocoPi":
  5169. aTool = 57;
  5170. _iframe = $$("iframe", {
  5171. "allowpaymentrequest": "allowpaymentrequest",
  5172. "allow": "camera *; microphone *;display-capture;midi;encrypted-media;usb",
  5173. "webkitallowfullscreen": "",
  5174. "mozallowfullscreen": "",
  5175. "frameborder": "no",
  5176. "border": "0",
  5177. "scrolling ": "no",
  5178. "style": {
  5179. "cssText": "border:0;width:100%;height:100%"
  5180. },
  5181. "src": "https://pi.cocorobo.cn/"
  5182. })
  5183. _box.appendChild(_iframe);
  5184. _box.appendChild(_jie);
  5185. _formdiv = new U.UF.UI.form(
  5186. "CocoPi-" + _username,
  5187. _box, {
  5188. "id": "CocoPi_TeacherUpload" + cid + stage + task + tool + _userid,
  5189. "style": {
  5190. "width": "90%",
  5191. "height": "90%",
  5192. "overflow": 'hidden'
  5193. },
  5194. "onresize": function () { }
  5195. }, {
  5196. closecallback: function () { }
  5197. }, {
  5198. "style": {
  5199. "height": "36px"
  5200. }
  5201. }).form; //创建窗体
  5202. _taskbar = {
  5203. "id": str + _formdiv.id,
  5204. "style": {
  5205. "backgroundImage": "url(/img/icon/cocopi.png)"
  5206. },
  5207. "name": "CocoPi",
  5208. "forms": _formdiv,
  5209. "click": function () {
  5210. U.MD.D.I.openApplication(str, obj, info);
  5211. }
  5212. }
  5213. break;
  5214. }
  5215. if (_iframe) {
  5216. if (str == 'CocoPi') {
  5217. _iframe = _formdiv.querySelector('iframe')
  5218. let onloadListener = U.UF.DL.iframeLoad(_iframe, function () {
  5219. U.MD.D.I.getUploadContent(cid, stage, task, tool, _userid, aTool, '15', _iframe)
  5220. })
  5221. if (onloadListener) {
  5222. _iframe.contentDocument.location.reload()
  5223. } else {
  5224. _iframe.contentDocument.location.reload()
  5225. }
  5226. }
  5227. _jie.onclick = async () => {
  5228. let text = ''
  5229. if (aTool == 57) {
  5230. text = _iframe.contentWindow.getLoadXmlStr()
  5231. }
  5232. _loading.style.display = 'flex'
  5233. console.log(_loading);
  5234. U.A.Request(US.Config.pbl + "addCourseWorks4-u", [_userid, _cid, _stage, _task, _tool, text.replaceAll(/%/g, "%25"), 15, aTool, text], function (res) {
  5235. _loading.style.display = 'none'
  5236. let _div = document.createElement('div')
  5237. _div.style = "width:100%;height:100%;background:#0000008f;position:fixed;top:0;left:0;z-index:99999999999999;display: flex;justify-content: center;align-items: center;"
  5238. let _inner = document.createElement('div')
  5239. _inner.style = "color: #fff;padding: 15px;background: #00000070;border-radius: 5px;font-size: 18px;"
  5240. _inner.innerHTML = "上传成功"
  5241. _div.appendChild(_inner)
  5242. _iframe.contentWindow.window.document.body.appendChild(_div)
  5243. _div.onclick = () => {
  5244. _iframe.contentWindow.window.document.body.removeChild(_div)
  5245. }
  5246. setTimeout(() => {
  5247. _iframe.contentWindow.window.document.body.removeChild(_div)
  5248. }, 1000);
  5249. }, [], { "type": "POST", "withCredentials": true });
  5250. }
  5251. }
  5252. }
  5253. U.MD.D.I.getUploadContent = function (cid, s, task, t, uid, atool, type, iframe) {
  5254. U.A.Request(US.Config.pbl + "selectWorksDetail2u", [uid, cid, s, task, t, type, atool], function (res) {
  5255. if (res.value[0].length > 0) {
  5256. if (atool == 57) {
  5257. iframe.contentWindow.loadingXml(res.value[0][0].content)
  5258. }
  5259. } else {
  5260. if (atool == 57) {
  5261. U.MD.D.I.getContents2(cid, s, task, t, uid, '4', iframe)
  5262. // iframe.contentWindow.window.blockpy.components.editor.blockly.clear();
  5263. }
  5264. }
  5265. }, [], { "type": "POST", "withCredentials": true });
  5266. }