home.vue 164 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797
  1. <template>
  2. <div class="common-layout">
  3. <el-container>
  4. <el-header>
  5. <myheader />
  6. </el-header>
  7. <el-main>
  8. <div class="main_container padding_gg">
  9. <div class="heder_tabs">
  10. <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick">
  11. <!-- 开始 -->
  12. <el-tab-pane label="首页" name="User">
  13. <!-- <router-link to="/"> </router-link> -->
  14. </el-tab-pane>
  15. <el-tab-pane label="问题设定" name="Role">
  16. <div class="imgzong Role">
  17. <!-- <div class="listitem lbg_color3 bkcolor3 ">
  18. <div class="threelist">
  19. <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist" :key="'Role' + index"
  20. :class="{ activeOrange: active == 'Role' + index }"
  21. @click="clickgeometry($event, index, 'Role' + index, item.titlie)">
  22. <el-image :src="getImgPath(item.url)" fit="cover" />
  23. <span>{{ item.titlie }}</span>
  24. </div>
  25. </div>
  26. </div> -->
  27. <!-- <div class="item2 margr" @click="clickgeometry($event, index, 'Role-' + '2', undmodel)">
  28. <el-image :src="getImgPath('tow1.png')" fit="cover" />
  29. <span>{{ f4ce }}</span>
  30. <el-select v-model="f4ce" class="no-border headersele" :suffix-icon="CaretBottom">
  31. <el-option v-for="item in optiongroup1" :key="item.value" :label="item.label" :value="item.value">
  32. </el-option>
  33. </el-select>
  34. </div> -->
  35. <div class="listitem lbg_color3 bkcolor3 threelist">
  36. <div class="item2 margr" @click="clickgeometry($event, index, 'Role-' + '2', undmodel)">
  37. <el-image :src="getImgPath('tow1.png')" fit="cover" />
  38. <span>{{ f4ce }}</span>
  39. <el-select v-model="f4ce" class="no-border headersele" :suffix-icon="CaretBottom">
  40. <el-option v-for="item in optiongroup1" :key="item.value" :label="item.label" :value="item.value">
  41. <div style="display: flex; align-items: center;">
  42. <img :src="getflowImgPath(item.img)" style="width: 20px; height: 20px; margin-right: 10px;" />
  43. <span>{{ item.label }}</span>
  44. </div>
  45. </el-option>
  46. </el-select>
  47. </div>
  48. <div class="item2 margr" @click="clickgeometry($event, index, 'Role-' + '1', modelban)">
  49. <el-image :src="getImgPath('tow2.png')" fit="cover" />
  50. <span>{{ modelban }}</span>
  51. <el-select v-model="modelban" class="no-border headersele" :suffix-icon="CaretBottom">
  52. <el-option v-for="item in optiongroup" :key="item.value" :label="item.label" :value="item.value">
  53. <div style="display: flex; align-items: center;">
  54. <img :src="getflowImgPath(item.img)" style="width: 20px; height: 20px; margin-right: 10px;" />
  55. <span>{{ item.label }}</span>
  56. </div>
  57. </el-option>
  58. </el-select>
  59. </div>
  60. <div class="item2 margr" @click="clickgeometry($event, index, 'Role-' + '2', undmodel)">
  61. <el-image :src="getImgPath('tow3.png')" fit="cover" />
  62. <span>{{ undmodel }}</span>
  63. <el-select v-model="undmodel" class="no-border headersele" :suffix-icon="CaretBottom">
  64. <el-option v-for="item in options4" :key="item.value" :label="item.label" :value="item.value">
  65. <div style="display: flex; align-items: center;">
  66. <img :src="item.icon" style="width: 20px; height: 20px; margin-right: 10px;" />
  67. <span>{{ item.label }}</span>
  68. </div>
  69. </el-option>
  70. </el-select>
  71. </div>
  72. </div>
  73. <!-- -->
  74. <div class="listitem lbg_color3 bkcolor3 ">
  75. <div class="threelist">
  76. <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist1" :key="'Role1' + index"
  77. :class="{ activeOrange: active == 'Role1' + index }"
  78. @click="clickgeometry($event, index, 'Role1' + index, item.titlie)">
  79. <el-image :src="getImgPath(item.url)" fit="cover" />
  80. <span>{{ item.titlie }}</span>
  81. </div>
  82. <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist11" :key="'Role11' + index"
  83. :class="{ activeOrange: active == 'Role11' + index }"
  84. @click="clickgeometry($event, index, 'Role11' + index, item.titlie)">
  85. <el-image :src="getImgPath(item.url)" fit="cover" />
  86. <el-color-picker v-model="color1" @change="colorpicker()"
  87. :class="{ 'is-show-panel': showTrigger }" />
  88. <span>{{ item.titlie }}</span>
  89. </div>
  90. </div>
  91. </div>
  92. <!-- -->
  93. <div class="listitem lbg_color3 bkcolor3 ">
  94. <div class="threelist">
  95. <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist2" :key="'Role2' + index"
  96. :class="{ activeOrange: active == 'Role2' + index }"
  97. @click="clickgeometry($event, index, 'Role2' + index, item.titlie)">
  98. <el-image :src="getImgPath(item.url)" fit="cover" />
  99. <span>{{ item.titlie }}</span>
  100. </div>
  101. <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist22" :key="'Role22' + index"
  102. :class="{ activeOrange: active == 'Role22' + index }"
  103. @click="clickgeometry($event, index, 'Role22' + index, item.titlie)">
  104. <el-image :src="getImgPath(item.url)" fit="cover" />
  105. <el-color-picker v-model="colortier" color-format="rgba" show-alpha @change="colorpickertier()"
  106. :class="{ 'is-show-panel': showTrigger }" />
  107. <span>{{ item.titlie }}</span>
  108. </div>
  109. </div>
  110. </div>
  111. <!-- -->
  112. <div class="listitem lbg_color3 bkcolor3 ">
  113. <div class="threelist">
  114. <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist3" :key="'Role3' + index"
  115. :class="{ activeOrange: active == 'Role3' + index }"
  116. @click="clickgeometry($event, index, 'Role3' + index, item.titlie)">
  117. <el-image :src="getImgPath(item.url)" fit="cover" />
  118. <span>{{ item.titlie }}</span>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </el-tab-pane>
  124. <el-tab-pane label="优化运行" name="Three">
  125. <div class="imgzong">
  126. <div class="listitem lbg_color3 bkcolor3 threelist">
  127. <div class="item2 floatitem" v-for="(item, index) in Threelist" :key="'Three-' + index"
  128. :class="{ activeOrange: active == 'Three-' + index }"
  129. @click="clickgeometry($event, index, 'Three-' + index, item.titlie)">
  130. <el-image :src="getImgPath(item.url)" fit="cover" />
  131. <span>{{ item.titlie }}</span>
  132. </div>
  133. </div>
  134. <!-- <div class="listitem lbg_color3 bkcolor3" v-for="(item, index) in Threelist1" :key="'Three1-' + index"
  135. :class="{ activeOrange: active == 'Three1' + index }"
  136. @click="clickgeometry($event, index, 'Three1' + index,item.titlie )">
  137. <div class="item2 ">
  138. <el-image :src="getImgPath(item.url)" fit="cover" />
  139. <span>{{ item.titlie }}</span>
  140. </div>
  141. </div> -->
  142. <div class="listitem lbg_color3 bkcolor3 ">
  143. <div class="threelist">
  144. <div class="item2 floatitem wentsd1" v-for="(item, index) in Threelist1" :key="'Three1' + index"
  145. :class="{ activeOrange: active == 'Three1' + index }"
  146. @click="clickgeometry($event, index, 'Three1' + index, item.titlie)">
  147. <el-image :src="getImgPath(item.url)" fit="cover" />
  148. <span>{{ item.titlie }}</span>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. </el-tab-pane>
  154. <el-tab-pane label="可视化" name="Config">
  155. <div class="imgzong">
  156. <!-- <button @click="etImgPath()"></button> -->
  157. <div class="listitem lbg_color3 bkcolor3 threelist" v-for="(item, index) in question" :key="'Config-' + index"
  158. :class="{ activeOrange: active == 'Config-' + index }"
  159. @click="clickgeometry($event, index, 'Config-' + index, item.titlie)">
  160. <div class="item2 ">
  161. <el-image :src="getImgPath(item.url)" fit="cover" />
  162. <span>{{ item.titlie }}</span>
  163. </div>
  164. </div>
  165. </div>
  166. </el-tab-pane>
  167. <el-tab-pane label="数据库管理" name="Seven">
  168. <div class="imgzong">
  169. <div class="listitem lbg_color3 bkcolor3 threelist" v-for="(item, index) in Sevenlist" :key="'Seven' + index"
  170. :class="{ activeOrange: active == 'Seven' + index }"
  171. @click="clickgeometry($event, index, 'Seven' + index, item.titlie)">
  172. <div class="item2 ">
  173. <el-image :src="getImgPath(item.url)" fit="cover" />
  174. <span>{{ item.titlie }}</span>
  175. </div>
  176. </div>
  177. </div>
  178. </el-tab-pane>
  179. <el-tab-pane label="帮助" name="eight">
  180. <div class="imgzong">
  181. <div class="listitem lbg_color3 bkcolor3 threelist" v-for="(item, index) in eightlist" :key="'eight' + index"
  182. :class="{ activeOrange: active == 'eight' + index }"
  183. @click="clickgeometry($event, index, 'eight' + index, item.titlie)">
  184. <div class="item2 ">
  185. <el-image :src="getImgPath(item.url)" fit="cover" />
  186. <span>{{ item.titlie }}</span>
  187. </div>
  188. </div>
  189. </div>
  190. </el-tab-pane>
  191. </el-tabs>
  192. </div>
  193. <!-- 新建任务 -->
  194. <el-dialog v-model="dialog.newdialog" v-if="tabactive == '新建任务'" align-center :modal="false"
  195. :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
  196. :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
  197. class="dialog_class bgcolor tianjia">
  198. <template #header="{ titleId, titleClass }">
  199. <div class="my-header ">
  200. <el-image :src="getImgPath('s0.png')" fit="contain"></el-image>
  201. <h4 :id="titleId" :class="titleClass">新建任务</h4>
  202. </div>
  203. </template>
  204. <div>
  205. <el-form>
  206. <el-form-item label="任务编号:" :label-width="formLabelWidth6">
  207. <el-input v-model="name" maxlength="18"
  208. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  209. placeholder="请输入" />
  210. </el-form-item>
  211. <el-form-item label="任务名称:" :label-width="formLabelWidth6">
  212. <el-input v-model="name" maxlength="18"
  213. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  214. placeholder="请输入" />
  215. </el-form-item>
  216. <el-form-item label="任务类型:" :label-width="formLabelWidth6">
  217. <el-input v-model="name" maxlength="18"
  218. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  219. placeholder="请输入" />
  220. </el-form-item>
  221. <el-form-item label="备注:" :label-width="formLabelWidth6">
  222. <el-input v-model="name" maxlength="18" type="textarea"
  223. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  224. placeholder="请输入" />
  225. </el-form-item>
  226. </el-form>
  227. </div>
  228. <template #footer>
  229. <div class="dialog-footer">
  230. <el-button @click="dialog.newdialog = false">取消</el-button>
  231. <el-button type="primary" @click="dialog.newdialog = false">
  232. 确定
  233. </el-button>
  234. </div>
  235. </template>
  236. </el-dialog>
  237. <!-- 问题设定 -->
  238. <el-dialog v-model="dialog.setdialog" v-if="tabactive == '问题设定'" align-center :modal="false"
  239. :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
  240. :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
  241. class="dialog_class bgcolor tianjia">
  242. <template #header="{ titleId, titleClass }">
  243. <div class="my-header ">
  244. <el-image :src="getImgPath('q0.png')" fit="contain"></el-image>
  245. <h4 :id="titleId" :class="titleClass">问题设定</h4>
  246. </div>
  247. </template>
  248. <div class="numberinput">
  249. <el-form>
  250. <el-form-item label="目标函数个数:" :label-width="formLabelWidth1">
  251. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  252. </el-form-item>
  253. <el-form-item label="建立代理模型约束个数:" :label-width="formLabelWidth1">
  254. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  255. </el-form-item>
  256. <el-form-item label="不建立代理模型约束个数:" :label-width="formLabelWidth1">
  257. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  258. </el-form-item>
  259. </el-form>
  260. </div>
  261. <template #footer>
  262. <div class="dialog-footer">
  263. <el-button @click="dialog.setdialog = false">取消</el-button>
  264. <el-button type="primary" @click="dialog.setdialog = false">
  265. 确定
  266. </el-button>
  267. </div>
  268. </template>
  269. </el-dialog>
  270. <!-- 外形参数化 -->
  271. <el-dialog v-model="dialog.parameter" v-if="tabactive == 'Task-11'" align-center :modal="false"
  272. :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
  273. :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
  274. class="dialog_class bgcolor tianjia sel">
  275. <template #header="{ titleId, titleClass }">
  276. <div class="my-header ">
  277. <el-image :src="getImgPath('t0.png')" fit="contain"></el-image>
  278. <h4 :id="titleId" :class="titleClass">外形参数化</h4>
  279. </div>
  280. </template>
  281. <div class="numberinput">
  282. <el-form>
  283. <el-form-item label="参数化方法:" :label-width="formLabelWidth6">
  284. <el-select v-model="canshu" :suffix-icon="CaretBottom" placeholder="请选择">
  285. <el-option v-for="item in canshulist" :key="item.value" :label="item.label" :value="item.value">
  286. </el-option>
  287. </el-select>
  288. </el-form-item>
  289. </el-form>
  290. </div>
  291. <template #footer>
  292. <div class="dialog-footer">
  293. <el-button @click="dialog.parameter = false">取消</el-button>
  294. <el-button type="primary" @click="dialog.parameter = false">
  295. 确定
  296. </el-button>
  297. </div>
  298. </template>
  299. </el-dialog>
  300. <!-- 代理模型 -->
  301. <el-dialog v-model="dialog.agency" v-if="tabactive == '代理模型'" align-center :modal="false"
  302. :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
  303. :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
  304. class="dialog_class bgcolor tianjia sel">
  305. <template #header="{ titleId, titleClass }">
  306. <div class="my-header ">
  307. <el-image :src="getImgPath('t2.png')" fit="contain"></el-image>
  308. <h4 :id="titleId" :class="titleClass">代理模型</h4>
  309. </div>
  310. </template>
  311. <div class="numberinput">
  312. <el-form>
  313. <el-form-item label="代理模型类型:" :label-width="formLabelWidth2">
  314. <el-select v-model="agval" :suffix-icon="CaretBottom" placeholder="请选择">
  315. <el-option v-for="item in agelist" :key="item.value" :label="item.label" :value="item.value">
  316. </el-option>
  317. </el-select>
  318. </el-form-item>
  319. <el-form-item label="设计空间类型:" :label-width="formLabelWidth2">
  320. <el-select v-model="agval1" :suffix-icon="CaretBottom" placeholder="请选择">
  321. <el-option v-for="item in agelist1" :key="item.value" :label="item.label" :value="item.value">
  322. </el-option>
  323. </el-select>
  324. </el-form-item>
  325. <el-form-item label="试验设计方法:" :label-width="formLabelWidth2">
  326. <el-select v-model="agval2" :suffix-icon="CaretBottom" placeholder="请选择">
  327. <el-option v-for="item in agelist2" :key="item.value" :label="item.label" :value="item.value">
  328. </el-option>
  329. </el-select>
  330. </el-form-item>
  331. <el-form-item label="初始样本点数:" :label-width="formLabelWidth2">
  332. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  333. </el-form-item>
  334. </el-form>
  335. </div>
  336. <template #footer>
  337. <div class="dialog-footer">
  338. <el-button @click="dialog.agency = false">取消</el-button>
  339. <el-button type="primary" @click="dialog.agency = false">
  340. 确定
  341. </el-button>
  342. </div>
  343. </template>
  344. </el-dialog>
  345. <!-- 终止条件 -->
  346. <el-dialog v-model="dialog.enddialog" v-if="tabactive == '终止条件 '" align-center :modal="false"
  347. :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
  348. :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
  349. class="dialog_class bgcolor tianjia sel">
  350. <template #header="{ titleId, titleClass }">
  351. <div class="my-header ">
  352. <el-image :src="getImgPath('t4.png')" fit="contain"></el-image>
  353. <h4 :id="titleId" :class="titleClass">终止条件</h4>
  354. </div>
  355. </template>
  356. <div class="numberinput">
  357. <el-form>
  358. <el-form-item label="EI最小值:" :label-width="formLabelWidth1">
  359. <el-input v-model="name" maxlength="18"
  360. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  361. placeholder="请输入" />
  362. </el-form-item>
  363. <el-form-item label="目标函数收敛误差:" :label-width="formLabelWidth1">
  364. <el-input v-model="name" maxlength="18"
  365. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  366. placeholder="请输入" />
  367. </el-form-item>
  368. <el-form-item label="优化解收敛精度:" :label-width="formLabelWidth1">
  369. <el-input v-model="name" maxlength="18"
  370. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  371. placeholder="请输入" />
  372. </el-form-item>
  373. <el-form-item label="真实函数约束精度:" :label-width="formLabelWidth1">
  374. <el-input v-model="name" maxlength="18"
  375. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  376. placeholder="请输入" />
  377. </el-form-item>
  378. <el-form-item label="代理模型约束精度:" :label-width="formLabelWidth1">
  379. <el-input v-model="name" maxlength="18"
  380. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  381. placeholder="请输入" />
  382. </el-form-item>
  383. </el-form>
  384. </div>
  385. <template #footer>
  386. <div class="dialog-footer">
  387. <el-button @click="dialog.enddialog = false">取消</el-button>
  388. <el-button type="primary" @click="dialog.enddialog = false">
  389. 确定
  390. </el-button>
  391. </div>
  392. </template>
  393. </el-dialog>
  394. <!-- 优化算法 -->
  395. <!-- <el-dialog v-model="dialog.sufun" v-if="tabactive == '优化算法'" align-center :modal="false"
  396. :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
  397. :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
  398. class="dialog_class sel bgcolor tianjia sel">
  399. <template #header="{ titleId, titleClass }">
  400. <div class="my-header ">
  401. <el-image :src="getImgPath('Framem.png')" fit="contain"></el-image>
  402. <h4 :id="titleId" :class="titleClass">优化算法</h4>
  403. </div>
  404. </template>
  405. <div class="numberinput">
  406. <div>
  407. <el-form-item label="优化算法" :label-width="formLabelWidth1">
  408. <el-select v-model="youhua.algorithm" :suffix-icon="CaretBottom" placeholder="请选择">
  409. <el-option v-for="item in yslist" :key="item.value" :label="item.label" :value="item.value">
  410. </el-option>
  411. </el-select>
  412. </el-form-item>
  413. <el-form-item label="种群规模:" :label-width="formLabelWidth1">
  414. <el-input-number v-model="youhua.popsize" :min="1" :max="10" controls-position="right" />
  415. </el-form-item>
  416. <el-form-item label="进化代数:" :label-width="formLabelWidth1">
  417. <el-input-number v-model="youhua.epoch" :min="1" :max="10" controls-position="right" />
  418. </el-form-item>
  419. <el-form-item label="交叉概率:" :label-width="formLabelWidth1">
  420. <el-input-number v-model="youhua.probcrossover" :min="1" :max="10" controls-position="right" />
  421. </el-form-item>
  422. <el-form-item label="变异概率:" :label-width="formLabelWidth1">
  423. <el-input-number v-model="youhua.probmut" :min="1" :max="10" controls-position="right" />
  424. </el-form-item>
  425. <el-form-item label="交叉算子:" :label-width="formLabelWidth1">
  426. <el-select v-model="youhua.proboperator" :suffix-icon="CaretBottom" placeholder="请选择">
  427. <el-option v-for="item in addlist2" :key="item.value" :label="item.label" :value="item.value">
  428. </el-option>
  429. </el-select>
  430. </el-form-item>
  431. <el-form-item label="竞赛规模:" :label-width="formLabelWidth1">
  432. <el-input-number v-model="youhua.probscale" :min="1" :max="10" controls-position="right" />
  433. </el-form-item>
  434. <el-form-item label="保留优选策略:" :label-width="formLabelWidth1">
  435. <el-select v-model="youhua.strategy" :suffix-icon="CaretBottom" placeholder="请选择">
  436. <el-option v-for="item in addlist3" :key="item.value" :label="item.label" :value="item.value">
  437. </el-option>
  438. </el-select>
  439. </el-form-item>
  440. <el-form-item label="变异算子选择:" :label-width="formLabelWidth1">
  441. <el-select v-model="youhua.operator" :suffix-icon="CaretBottom" placeholder="请选择">
  442. <el-option v-for="item in addlist4" :key="item.value" :label="item.label" :value="item.value">
  443. </el-option>
  444. </el-select>
  445. </el-form-item>
  446. <el-form-item label="GPU" :label-width="formLabelWidth1">
  447. <el-select v-model="youhua.gpu" :suffix-icon="CaretBottom" placeholder="请选择">
  448. <el-option v-for="item in addlist8" :key="item.value" :label="item.label" :value="item.value">
  449. </el-option>
  450. </el-select>
  451. </el-form-item>
  452. </div>
  453. </div>
  454. <template #footer>
  455. <div class="dialog-footer">
  456. <el-button @click="dialog.sufun = false">取消</el-button>
  457. <el-button type="primary" @click="dialog.sufun = false">
  458. 确定
  459. </el-button>
  460. </div>
  461. </template>
  462. </el-dialog> -->
  463. <!-- 加点方法 -->
  464. <el-dialog v-model="dialog.addfun" v-if="tabactive == '加点方法'" align-center :modal="false"
  465. :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
  466. :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
  467. class="dialog_class sel bgcolor tianjia sel">
  468. <template #header="{ titleId, titleClass }">
  469. <div class="my-header ">
  470. <el-image :src="getImgPath('t3.png')" fit="contain"></el-image>
  471. <h4 :id="titleId" :class="titleClass">加点方法</h4>
  472. </div>
  473. </template>
  474. <div class="numberinput">
  475. <el-form>
  476. <el-form-item label="最大样本点数:" :label-width="formLabelWidth1">
  477. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  478. </el-form-item>
  479. <el-form-item label="加点准则:" :label-width="formLabelWidth1">
  480. <el-select v-model="addval" :suffix-icon="CaretBottom" placeholder="请选择">
  481. <el-option v-for="item in addlist" :key="item.value" :label="item.label" :value="item.value">
  482. </el-option>
  483. </el-select>
  484. </el-form-item>
  485. <el-form-item label="单次迭代新增样本点数:" :label-width="formLabelWidth1">
  486. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  487. </el-form-item>
  488. <el-form-item label="约束处理方法:" :label-width="formLabelWidth1">
  489. <el-select v-model="addval1" :suffix-icon="CaretBottom" placeholder="请选择">
  490. <el-option v-for="item in addlist1" :key="item.value" :label="item.label" :value="item.value">
  491. </el-option>
  492. </el-select>
  493. </el-form-item>
  494. </el-form>
  495. </div>
  496. <template #footer>
  497. <div class="dialog-footer">
  498. <el-button @click="dialog.addfun = false">取消</el-button>
  499. <el-button type="primary" @click="dialog.addfun = false">
  500. 确定
  501. </el-button>
  502. </div>
  503. </template>
  504. </el-dialog>
  505. <!-- 任务管理 -->
  506. <el-dialog v-model="dialog.task" v-if="tabactive == '任务管理'" align-center :modal="false"
  507. :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
  508. :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="800px"
  509. class="dialog_class bgcolor tianjia">
  510. <template #header="{ titleId, titleClass }">
  511. <div class="my-header ">
  512. <el-image :src="getImgPath('s11.png')" fit="contain"></el-image>
  513. <h4 :id="titleId" :class="titleClass">任务管理</h4>
  514. </div>
  515. </template>
  516. <div>
  517. <el-table :data="tasktable" stripe style="width: 100%">
  518. <el-table-column prop="id" label="任务编号" />
  519. <el-table-column prop="name" label="任务名称" />
  520. <el-table-column prop="state" label="任务类型" />
  521. <el-table-column prop="time" label="备注" />
  522. </el-table>
  523. <div class="sev_ruwu sev">
  524. <div class="disflex">
  525. <el-form-item label="关键字:">
  526. <el-select v-model="seval4" :suffix-icon="CaretBottom" placeholder="请选择">
  527. <el-option v-for="item in sevlist" :key="item.value" :label="item.label" :value="item.value">
  528. </el-option>
  529. </el-select>
  530. </el-form-item>
  531. <el-input v-model="name" maxlength="18"
  532. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  533. placeholder="请输入" />
  534. <el-button class="btncolor">查询</el-button>
  535. <el-button class="btncolor">添加</el-button>
  536. <el-button class="btncolor">删除</el-button>
  537. <el-button class="btncolor">提交</el-button>
  538. </div>
  539. </div>
  540. </div>
  541. <template #footer>
  542. <div class="dialog-footer">
  543. <el-button @click="dialog.task = false">取消</el-button>
  544. <el-button type="primary" @click="dialog.task = false">
  545. 确定
  546. </el-button>
  547. </div>
  548. </template>
  549. </el-dialog>
  550. <!-- 任务检索 -->
  551. <el-dialog v-model="dialog.guanli" v-if="tabactive == '任务检索'" align-center :modal="false"
  552. :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
  553. :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="800px"
  554. class="dialog_class bgcolor tianjia">
  555. <template #header="{ titleId, titleClass }">
  556. <div class="my-header ">
  557. <el-image :src="getImgPath('s11.png')" fit="contain"></el-image>
  558. <h4 :id="titleId" :class="titleClass">任务检索</h4>
  559. </div>
  560. </template>
  561. <div>
  562. <div class="sev_ruwu">
  563. <div class="disflex">
  564. <el-form-item label="关键字:">
  565. <el-select v-model="seval4" :suffix-icon="CaretBottom" placeholder="请选择">
  566. <el-option v-for="item in sevlist" :key="item.value" :label="item.label" :value="item.value">
  567. </el-option>
  568. </el-select>
  569. </el-form-item>
  570. <el-input v-model="name" maxlength="18"
  571. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  572. placeholder="请输入关键字" />
  573. <el-checkbox class="magright" label="范围" v-model="checkbox" />
  574. <el-button class="btncolor">查询</el-button>
  575. </div>
  576. </div>
  577. <el-table :data="tasktable" stripe style="width: 100%">
  578. <el-table-column prop="id" label="任务编号" />
  579. <el-table-column prop="name" label="任务名称" />
  580. <el-table-column prop="state" label="任务类型" />
  581. <el-table-column prop="time" label="备注" />
  582. </el-table>
  583. </div>
  584. <template #footer>
  585. <div class="dialog-footer">
  586. <el-button @click="dialog.guanli = false">取消</el-button>
  587. <el-button type="primary" @click="dialog.guanli = false">
  588. 确定
  589. </el-button>
  590. </div>
  591. </template>
  592. </el-dialog>
  593. <!-- 优化器 -->
  594. <el-dialog v-model="dialog.optimizer" align-center :modal="false" :close-on-click-modal="false"
  595. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  596. :before-close="handleClose" width="430" class="dialog_class bgcolor tianjia sel">
  597. <template #header="{ titleId, titleClass }">
  598. <div class="my-header ">
  599. <el-image :src="getImgPath('t2.png')" fit="contain"></el-image>
  600. <h4 :id="titleId" :class="titleClass">优化器</h4>
  601. </div>
  602. </template>
  603. <div class="numberinput lefttext">
  604. <el-form>
  605. <span>代理模型</span>
  606. <el-form-item label="代理模型类型:" :label-width="formLabelWidth1">
  607. <el-select v-model="agval" :suffix-icon="CaretBottom" placeholder="请选择">
  608. <el-option v-for="item in agelist" :key="item.value" :label="item.label" :value="item.value">
  609. </el-option>
  610. </el-select>
  611. </el-form-item>
  612. <el-form-item label="设计空间类型:" :label-width="formLabelWidth1">
  613. <el-select v-model="agval1" :suffix-icon="CaretBottom" placeholder="请选择">
  614. <el-option v-for="item in agelist1" :key="item.value" :label="item.label" :value="item.value">
  615. </el-option>
  616. </el-select>
  617. </el-form-item>
  618. <el-form-item label="试验设计方法:" :label-width="formLabelWidth1">
  619. <el-select v-model="agval2" :suffix-icon="CaretBottom" placeholder="请选择">
  620. <el-option v-for="item in agelist2" :key="item.value" :label="item.label" :value="item.value">
  621. </el-option>
  622. </el-select>
  623. </el-form-item>
  624. <el-form-item label="初始样本点数:" :label-width="formLabelWidth1">
  625. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  626. </el-form-item>
  627. <span>加点准则</span>
  628. <el-form-item label="最大样本点数:" :label-width="formLabelWidth1">
  629. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  630. </el-form-item>
  631. <el-form-item label="加点准则:" :label-width="formLabelWidth1">
  632. <el-select v-model="addval" :suffix-icon="CaretBottom" placeholder="请选择">
  633. <el-option v-for="item in addlist" :key="item.value" :label="item.label" :value="item.value">
  634. </el-option>
  635. </el-select>
  636. </el-form-item>
  637. <el-form-item label="单次迭代新增样本点数:" :label-width="formLabelWidth1">
  638. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  639. </el-form-item>
  640. <el-form-item label="约束处理方法:" :label-width="formLabelWidth1">
  641. <el-select v-model="addval1" :suffix-icon="CaretBottom" placeholder="请选择">
  642. <el-option v-for="item in addlist1" :key="item.value" :label="item.label" :value="item.value">
  643. </el-option>
  644. </el-select>
  645. </el-form-item>
  646. <span>优化算法</span>
  647. <el-form-item label="优化算法:" :label-width="formLabelWidth1">
  648. <el-select v-model="ys" :suffix-icon="CaretBottom" placeholder="请选择">
  649. <el-option v-for="item in yslist" :key="item.value" :label="item.label" :value="item.value">
  650. </el-option>
  651. </el-select>
  652. </el-form-item>
  653. <el-form-item label="种群规模:" :label-width="formLabelWidth1">
  654. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  655. </el-form-item>
  656. <el-form-item label="最大迭代次数:" :label-width="formLabelWidth1">
  657. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  658. </el-form-item>
  659. <el-form-item label="交叉概率:" :label-width="formLabelWidth1">
  660. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  661. </el-form-item>
  662. <el-form-item label="变异概率:" :label-width="formLabelWidth1">
  663. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  664. </el-form-item>
  665. <el-form-item label="交叉算子:" :label-width="formLabelWidth1">
  666. <el-select v-model="addval2" :suffix-icon="CaretBottom" placeholder="请选择">
  667. <el-option v-for="item in addlist2" :key="item.value" :label="item.label" :value="item.value">
  668. </el-option>
  669. </el-select>
  670. </el-form-item>
  671. <el-form-item label="竞赛规模:" :label-width="formLabelWidth1">
  672. <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
  673. </el-form-item>
  674. <el-form-item label="保留优选策略:" :label-width="formLabelWidth1">
  675. <el-select v-model="addval3" :suffix-icon="CaretBottom" placeholder="请选择">
  676. <el-option v-for="item in addlist3" :key="item.value" :label="item.label" :value="item.value">
  677. </el-option>
  678. </el-select>
  679. </el-form-item>
  680. <el-form-item label="变异算子选择:" :label-width="formLabelWidth1">
  681. <el-select v-model="addval4" :suffix-icon="CaretBottom" placeholder="请选择">
  682. <el-option v-for="item in addlist4" :key="item.value" :label="item.label" :value="item.value">
  683. </el-option>
  684. </el-select>
  685. </el-form-item>
  686. <el-form-item label="precision:" :label-width="formLabelWidth1">
  687. <el-select v-model="addval7" :suffix-icon="CaretBottom" placeholder="请选择">
  688. <el-option v-for="item in addlist7" :key="item.value" :label="item.label" :value="item.value">
  689. </el-option>
  690. </el-select>
  691. </el-form-item>
  692. <el-form-item label="GPU" :label-width="formLabelWidth1">
  693. <el-select v-model="addval8" :suffix-icon="CaretBottom" placeholder="请选择">
  694. <el-option v-for="item in addlist8" :key="item.value" :label="item.label" :value="item.value">
  695. </el-option>
  696. </el-select>
  697. </el-form-item>
  698. </el-form>
  699. </div>
  700. <template #footer>
  701. <div class="dialog-footer">
  702. <el-button @click="dialog.optimizer = false">取消</el-button>
  703. <el-button type="primary" @click="dialog.optimizer = false">
  704. 确定
  705. </el-button>
  706. </div>
  707. </template>
  708. </el-dialog>
  709. <!-- Xfiol改版后的 -->
  710. <el-dialog v-model="dialog.Xfiol" align-center :modal="false" :close-on-click-modal="false"
  711. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false"
  712. modal-class="summary-dlg2 summary-dlg" :before-close="handleClose" width="540"
  713. class="dialog_class bgcolor tianjia colortext sel">
  714. <template #header="{ titleId, titleClass }">
  715. <div class="my-header ">
  716. <el-image :src="getImgPath('xuek9.png')" fit="contain"></el-image>
  717. <h4 :id="titleId" :class="titleClass">Xfoil</h4>
  718. </div>
  719. </template>
  720. <Xfoil ref="Xfoilref"/>
  721. <template #footer>
  722. <div class="dialog-footer">
  723. <!-- <el-button type="info" @click="newxfoil">新建 </el-button> -->
  724. <el-button type="info" @click="dialog.Xfiol = false">取消</el-button>
  725. <el-button type="primary" @click="xfoilok();dialog.Xfiol = false">
  726. 确定
  727. </el-button>
  728. </div>
  729. </template>
  730. </el-dialog>
  731. <!-- 列表 -->
  732. <el-dialog v-model="dialog.listdialog" align-center :modal="false" :close-on-click-modal="false"
  733. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  734. :before-close="handleClose" width="537" class="dialog_style sel" style="max-height: 70%;">
  735. <template #header="{ titleId, titleClass }">
  736. <div class="my-header ">
  737. <h4 :id="titleId" :class="titleClass">列表</h4>
  738. </div>
  739. </template>
  740. <div>
  741. <ListSE :isList="true" @update="handleUpdate"/>
  742. <!-- <el-form>
  743. <el-form-item label="设计集:" >
  744. <el-select v-model="listval" :suffix-icon="CaretBottom" placeholder="请选择">
  745. <el-option v-for="item in listoptions" :key="item.value" :label="item.label" :value="item.value">
  746. </el-option>
  747. </el-select>
  748. </el-form-item>
  749. <el-form-item label="选择要在表中显示的一个或者多个变量和响应" >
  750. </el-form-item>
  751. <el-card shadow="hover" style="width: 100%">
  752. <el-checkbox-group v-model="listcbval">
  753. <el-checkbox v-for="item in Listcheckbox" :key="item.value" :label="item.value" style="display: block">{{ item.label }}</el-checkbox>
  754. </el-checkbox-group>
  755. </el-card>
  756. </el-form> -->
  757. </div>
  758. <template #footer>
  759. <div class="dialog-footer">
  760. <el-button @click="dialog.listdialog = false">取消</el-button>
  761. <el-button type="primary" @click="selectshujuto();dialog.listdialog = false">
  762. 确定
  763. </el-button>
  764. </div>
  765. </template>
  766. </el-dialog>
  767. <!-- 散点图 -->
  768. <el-dialog v-model="dialog.scatterdialog" align-center :modal="false" :close-on-click-modal="false"
  769. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  770. :before-close="handleClose" width="500" class="dialog_style bgcolor tianjia sel" style="max-height: 70%;">
  771. <template #header="{ titleId, titleClass }">
  772. <div class="my-header ">
  773. <h4 :id="titleId" :class="titleClass">散点图</h4>
  774. </div>
  775. </template>
  776. <div>
  777. <ListSE :isList="false" @update="handleUpdate"/>
  778. </div>
  779. <template #footer>
  780. <div class="dialog-footer">
  781. <el-button @click="dialog.scatterdialog = false">取消</el-button>
  782. <el-button type="primary" @click="selectshujuto();dialog.scatterdialog = false">
  783. 确定
  784. </el-button>
  785. </div>
  786. </template>
  787. </el-dialog>
  788. <!-- 折线图 -->
  789. <el-dialog v-model="dialog.echartLinedialog" align-center :modal="false" :close-on-click-modal="false"
  790. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  791. :before-close="handleClose" width="500" class="dialog_style bgcolor tianjia sel" style="max-height: 70%;">
  792. <template #header="{ titleId, titleClass }">
  793. <div class="my-header ">
  794. <h4 :id="titleId" :class="titleClass">折线图</h4>
  795. </div>
  796. </template>
  797. <div>
  798. <ListSE :isList="false" @update="handleUpdate"/>
  799. </div>
  800. <template #footer>
  801. <div class="dialog-footer">
  802. <el-button @click="dialog.echartLinedialog = false">取消</el-button>
  803. <el-button type="primary" @click="selectshujuto();dialog.echartLinedialog = false">
  804. 确定
  805. </el-button>
  806. </div>
  807. </template>
  808. </el-dialog>
  809. <!-- 帕雷托图 -->
  810. <el-dialog v-model="dialog.paretodialog" align-center :modal="false" :close-on-click-modal="false"
  811. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  812. :before-close="handleClose" width="500" class="dialog_style bgcolor tianjia sel" style="max-height: 70%;">
  813. <template #header="{ titleId, titleClass }">
  814. <div class="my-header ">
  815. <h4 :id="titleId" :class="titleClass">帕雷托图</h4>
  816. </div>
  817. </template>
  818. <div>
  819. <el-form>
  820. <el-form-item label="选择在X轴显示的一个变量和响应" >
  821. </el-form-item>
  822. <el-card>
  823. <el-checkbox-group v-model="paretocbval">
  824. <el-checkbox v-for="item in paretocheckbox" :key="item.value" :label="item.value" style="display: block">{{ item.label }}</el-checkbox>
  825. </el-checkbox-group>
  826. </el-card>
  827. <el-form-item label="选择在Y轴显示的一个变量和响应" >
  828. </el-form-item>
  829. <el-card shadow="hover" style="width: 100%">
  830. <el-checkbox-group v-model="paretocbval">
  831. <el-checkbox v-for="item in paretocheckbox" :key="item.value" :label="item.value" style="display: block">{{ item.label }}</el-checkbox>
  832. </el-checkbox-group>
  833. </el-card>
  834. </el-form>
  835. </div>
  836. <template #footer>
  837. <div class="dialog-footer">
  838. <el-button @click="dialog.paretodialog = false">取消</el-button>
  839. <el-button type="primary" @click="dialog.paretodialog = false">
  840. 确定
  841. </el-button>
  842. </div>
  843. </template>
  844. </el-dialog>
  845. <!-- 云图/等值线图 -->
  846. <el-dialog v-model="dialog.clouddialog" align-center :modal="false" :close-on-click-modal="false"
  847. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  848. :before-close="handleClose" width="700" class="dialog_style bgcolor tianjia sel cloudChart" style="height: 500px;overflow: auto;">
  849. <template #header="{ titleId, titleClass }">
  850. <div class="my-header ">
  851. <h4 :id="titleId" :class="titleClass">云图/等值线显示</h4>
  852. </div>
  853. </template>
  854. <div>
  855. <div class="cloudbox">
  856. <el-row gutter="20">
  857. <el-col :span="2"></el-col>
  858. <el-col v-for="(item,index) in cloudbtnbox" :key="index" :span="4">
  859. <el-button style="width: 100%;" @click="openSeconddialog(item.btnname)">
  860. <el-image :src="getImgPath(item.url)" alt="img" fit="cover" style="width: 20px;margin-right: 4px;" />
  861. {{ item.btnname }}
  862. </el-button>
  863. </el-col>
  864. </el-row>
  865. </div>
  866. <div style="height: 400px;overflow: auto;">
  867. <cloudChart/>
  868. </div>
  869. </div>
  870. </el-dialog>
  871. <!-- 云图二级弹窗 -->
  872. <el-dialog v-model="seconddialogshow"
  873. align-center
  874. :modal="false"
  875. :close-on-click-modal="false"
  876. :append-to-body="true"
  877. draggable
  878. :fullscreen="false"
  879. :modal-append-to-body="false"
  880. modal-class="summary-dlg"
  881. :before-close="handleClose"
  882. width="500"
  883. class="dialog_class bgcolor tianjia "
  884. >
  885. <template #header="{ titleId, titleClass }">
  886. <div class="my-header">
  887. <h4 :id="titleId" :class="titleClass">{{ cloudsedtitle }}</h4>
  888. </div>
  889. </template>
  890. <cloudsecond :activesd="activesd"/>
  891. <template #footer>
  892. <div class="dialog-footer">
  893. <el-button @click="seconddialogshow = false">取消</el-button>
  894. <el-button type="primary" @click="seconddialogshow = false">
  895. 确定
  896. </el-button>
  897. </div>
  898. </template>
  899. </el-dialog>
  900. <!-- 查看报告 -->
  901. <el-dialog v-model="dialog.lookover" align-center :modal="false" :close-on-click-modal="false"
  902. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlgPdf"
  903. :before-close="handleClose" width="580px" height="800px">
  904. <template #header="{ titleId, titleClass }">
  905. <div class="my-header ">
  906. <el-image :src="getImgPath('k8.png')" fit="contain"></el-image>
  907. <h4 :id="titleId" :class="titleClass">查看报告:</h4>
  908. </div>
  909. </template>
  910. <pdfReportView/>
  911. <!-- <div class="numberinput lefttext">
  912. <el-form>
  913. <el-image :src="getImgPath('baog.png')" fit="contain"></el-image>
  914. </el-form>
  915. </div> -->
  916. <template #footer>
  917. <div class="dialog-footer">
  918. <el-button @click="dialog.lookover = false">取消</el-button>
  919. <el-button type="primary" @click="dialog.lookover = false">
  920. 确定
  921. </el-button>
  922. </div>
  923. </template>
  924. </el-dialog>
  925. <!-- 导出报告 -->
  926. <el-dialog v-model="dialog.exportreport" align-center :modal="false" :close-on-click-modal="false"
  927. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  928. :before-close="handleClose" width="600" class="dialog_class bgcolor tianjia sel" style="max-height: 70%;">
  929. <template #header="{ titleId, titleClass }">
  930. <div class="my-header ">
  931. <h4 :id="titleId" :class="titleClass">导出报告:</h4>
  932. </div>
  933. </template>
  934. <Exreport />
  935. <template #footer>
  936. <div class="dialog-footer">
  937. <el-button @click="dialog.exportreport = false">取消</el-button>
  938. <el-button type="primary" @click="dialog.exportreport = false">
  939. 确定
  940. </el-button>
  941. </div>
  942. </template>
  943. </el-dialog>
  944. <!-- 气动分析Xfoil、ADflow -->
  945. <el-dialog v-model="dialog.XfAD" align-center :modal="false" :close-on-click-modal="false"
  946. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  947. :before-close="handleClose" width="700" class="dialog_class bgcolor tianjia sel colortext">
  948. <template #header="{ titleId, titleClass }">
  949. <div class="my-header ">
  950. <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
  951. <h4 :id="titleId" :class="titleClass">气动分析</h4>
  952. </div>
  953. </template>
  954. <div class="numberinput lefttext ">
  955. <el-form>
  956. <el-tabs tab-position="left" class="demo-tabs" v-model="activeadf" @tab-click="adfhandleClick3">
  957. <el-tab-pane label="Xfoil" name="Xfoil">
  958. <Xfoil ref="Xfoilref"/>
  959. </el-tab-pane>
  960. <!-- ADflow -->
  961. <el-tab-pane label="ADflow" name="ADflow">
  962. <ADflow ref="ADflowref"/>
  963. </el-tab-pane>
  964. </el-tabs>
  965. </el-form>
  966. </div>
  967. <template #footer>
  968. <div class="dialog-footer">
  969. <el-button @click="dialog.XfAD = false">取消</el-button>
  970. <el-button type="primary" @click="getXfoilAdflowsave(activeadf);dialog.XfAD = false;">
  971. 确定
  972. </el-button>
  973. </div>
  974. </template>
  975. </el-dialog>
  976. <!-- CST -->
  977. <el-dialog v-model="dialog.CSTt" align-center :modal="false" :close-on-click-modal="false"
  978. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  979. :before-close="handleClose" width="730" class="dialog_class bgcolor colortext tianjia sel">
  980. <template #header="{ titleId, titleClass }">
  981. <div class="my-header ">
  982. <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image>
  983. <h4 :id="titleId" :class="titleClass">CST</h4>
  984. </div>
  985. </template>
  986. <csts ref="Cstref"/>
  987. <template #footer>
  988. <div class="dialog-footer">
  989. <el-button @click="dialog.CSTt = false">取消</el-button>
  990. <el-button type="primary" @click="cstok()">
  991. 确定
  992. </el-button>
  993. </div>
  994. </template>
  995. </el-dialog>
  996. <!-- FFD -->
  997. <el-dialog v-model="dialog.ffdt" align-center :modal="false" :close-on-click-modal="false"
  998. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  999. :before-close="handleClose" width="730" class="dialog_class bgcolor colortext tianjia sel">
  1000. <template #header="{ titleId, titleClass }">
  1001. <div class="my-header ">
  1002. <el-image :src="getImgPath('ffd.png')" fit="contain"></el-image>
  1003. <h4 :id="titleId" :class="titleClass">FFD</h4>
  1004. </div>
  1005. </template>
  1006. <ffds ref="Ffdref"/>
  1007. <template #footer>
  1008. <div class="dialog-footer">
  1009. <el-button @click="dialog.ffdt = false">取消</el-button>
  1010. <el-button type="primary" @click="ffdok()">
  1011. 确定
  1012. </el-button>
  1013. </div>
  1014. </template>
  1015. </el-dialog>
  1016. <!-- 气动分析CST、FFD -->
  1017. <el-dialog v-model="dialog.cstffd" align-center :modal="false" :close-on-click-modal="false"
  1018. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1019. :before-close="handleClose" width="900" class="dialog_class bgcolor tianjia sel colortext">
  1020. <template #header="{ titleId, titleClass }">
  1021. <div class="my-header ">
  1022. <h4 :id="titleId" :class="titleClass">参数化</h4>
  1023. </div>
  1024. </template>
  1025. <div class="numberinput lefttext ">
  1026. <el-form>
  1027. <!-- CST -->
  1028. <el-tabs tab-position="left" class="demo-tabs" v-model="activeadf" @tab-click="adfhandleClick2">
  1029. <el-tab-pane label="CST" name="CST">
  1030. <csts ref="Cstref"/>
  1031. </el-tab-pane>
  1032. <!-- FFD -->
  1033. <el-tab-pane label="FFD" name="FFD">
  1034. <ffds ref="Ffdref"/>
  1035. </el-tab-pane>
  1036. </el-tabs>
  1037. </el-form>
  1038. </div>
  1039. <template #footer>
  1040. <div class="dialog-footer">
  1041. <el-button @click="dialog.cstffd = false">取消</el-button>
  1042. <el-button type="primary" @click="getCstFfdsave(activeadf);dialog.cstffd = false">
  1043. 确定
  1044. </el-button>
  1045. </div>
  1046. </template>
  1047. </el-dialog>
  1048. <!-- TACS -->
  1049. <el-dialog v-model="dialog.Taxs" align-center :modal="false" :close-on-click-modal="false"
  1050. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1051. :before-close="handleClose" width="700" class="dialog_class bgcolor tianjia sel colortext ">
  1052. <template #header="{ titleId, titleClass }">
  1053. <div class="my-header ">
  1054. <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
  1055. <h4 :id="titleId" :class="titleClass">TACS</h4>
  1056. </div>
  1057. </template>
  1058. <TACS ref="Tacsref" />
  1059. <template #footer>
  1060. <div class="dialog-footer">
  1061. <el-button @click="dialog.Taxs = false">取消</el-button>
  1062. <el-button type="primary" @click="gettacstosave();dialog.Taxs = false">
  1063. 确定
  1064. </el-button>
  1065. </div>
  1066. </template>
  1067. </el-dialog>
  1068. <!-- 优化器 -->
  1069. <el-dialog v-model="dialog.optgroup" align-center :modal="false" :close-on-click-modal="false"
  1070. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1071. :before-close="handleClose" width="700" class="dialog_class bgcolor tianjia sel colortext">
  1072. <template #header="{ titleId, titleClass }">
  1073. <div class="my-header ">
  1074. <h4 :id="titleId" :class="titleClass">优化器</h4>
  1075. </div>
  1076. </template>
  1077. <div class="numberinput lefttext ">
  1078. <el-form>
  1079. <el-tabs tab-position="left" class="demo-tabs" v-model="activeadf" @tab-click="adfhandleClick">
  1080. <!-- 代理优化器 -->
  1081. <el-tab-pane label="代理优化器" name="代理优化器">
  1082. <Doptimize ref='Doptimizeref'/>
  1083. </el-tab-pane>
  1084. <!-- 进步优化器 -->
  1085. <el-tab-pane label="进化优化器" name="进化优化器">
  1086. <Joptimize ref='Joptimizeref'/>
  1087. </el-tab-pane>
  1088. <!-- 梯度优化器 -->
  1089. <el-tab-pane label="梯度优化器" name="梯度优化器">
  1090. <Toptimize ref='Toptimizeref'/>
  1091. </el-tab-pane>
  1092. </el-tabs>
  1093. </el-form>
  1094. </div>
  1095. <template #footer>
  1096. <div class="dialog-footer">
  1097. <el-button @click="dialog.optgroup = false">取消</el-button>
  1098. <el-button type="primary" @click="getSave(activeadf);dialog.optgroup = false">
  1099. 确定
  1100. </el-button>
  1101. </div>
  1102. </template>
  1103. </el-dialog>
  1104. <!-- 单独的进步优化器 -->
  1105. <el-dialog v-model="dialog.jboptimizer" align-center :modal="false" :close-on-click-modal="false"
  1106. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1107. :before-close="handleClose" width="430" class="dialog_class bgcolor tianjia sel colortext">
  1108. <template #header="{ titleId, titleClass }">
  1109. <div class="my-header ">
  1110. <!-- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image> -->
  1111. <h4 :id="titleId" :class="titleClass">优化算法:</h4>
  1112. </div>
  1113. </template>
  1114. <Joptimize ref='Joptimizeref'/>
  1115. <template #footer>
  1116. <div class="dialog-footer">
  1117. <el-button @click="dialog.jboptimizer = false">取消</el-button>
  1118. <el-button type="primary" @click="getaddsave(); dialog.jboptimizer = false">
  1119. 确定
  1120. </el-button>
  1121. </div>
  1122. </template>
  1123. </el-dialog>
  1124. <!-- 单独的代理优化器 -->
  1125. <el-dialog v-model="dialog.dboptimizer" align-center :modal="false" :close-on-click-modal="false"
  1126. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1127. :before-close="handleClose" width="530" class="dialog_class bgcolor tianjia sel colortext">
  1128. <template #header="{ titleId, titleClass }">
  1129. <div class="my-header ">
  1130. <!-- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image> -->
  1131. <h4 :id="titleId" :class="titleClass">代理优化器</h4>
  1132. </div>
  1133. </template>
  1134. <Doptimize ref="Doptimizeref"/>
  1135. <template #footer>
  1136. <div class="dialog-footer">
  1137. <el-button @click="dialog.dboptimizer = false">取消</el-button>
  1138. <el-button type="primary" @click="getDaddsave(); dialog.dboptimizer = false">
  1139. 确定
  1140. </el-button>
  1141. </div>
  1142. </template>
  1143. </el-dialog>
  1144. <!-- 单独的梯度优化器 -->
  1145. <el-dialog v-model="dialog.tboptimizer" align-center :modal="false" :close-on-click-modal="false"
  1146. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1147. :before-close="handleClose" width="430" class="dialog_class bgcolor tianjia sel colortext">
  1148. <template #header="{ titleId, titleClass }">
  1149. <div class="my-header ">
  1150. <!-- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image> -->
  1151. <h4 :id="titleId" :class="titleClass">梯度优化器:</h4>
  1152. </div>
  1153. </template>
  1154. <Toptimize ref="Toptimizeref"/>
  1155. <template #footer>
  1156. <div class="dialog-footer">
  1157. <el-button @click="dialog.tboptimizer = false">取消</el-button>
  1158. <el-button type="primary" @click="getTaddsave(); dialog.tboptimizer = false">
  1159. 确定
  1160. </el-button>
  1161. </div>
  1162. </template>
  1163. </el-dialog>
  1164. <!-- 单独的ADflow -->
  1165. <el-dialog v-model="dialog.isADflow" align-center :modal="false" :close-on-click-modal="false"
  1166. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1167. :before-close="handleClose" width="540" class="dialog_class bgcolor tianjia sel colortext">
  1168. <template #header="{ titleId, titleClass }">
  1169. <div class="my-header ">
  1170. <!-- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image> -->
  1171. <h4 :id="titleId" :class="titleClass">ADflow</h4>
  1172. </div>
  1173. </template>
  1174. <ADflow ref="ADflowref"/>
  1175. <template #footer>
  1176. <div class="dialog-footer">
  1177. <el-button @click="dialog.isADflow = false">取消</el-button>
  1178. <el-button type="primary" @click=" adflowok();dialog.isADflow = false">
  1179. 确定
  1180. </el-button>
  1181. </div>
  1182. </template>
  1183. </el-dialog>
  1184. <!-- Python -->
  1185. <el-dialog v-model="dialog.Pythonshow" align-center :modal="false" :close-on-click-modal="false"
  1186. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1187. :before-close="handleClose" width="700" class="dialog_class bgcolor colortext tianjia sel">
  1188. <template #header="{ titleId, titleClass }">
  1189. <div class="my-header ">
  1190. <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
  1191. <h4 :id="titleId" :class="titleClass">Python</h4>
  1192. </div>
  1193. </template>
  1194. <div class="footerp" style="height:525px;padding:15px">
  1195. <div>
  1196. <!-- <el-input
  1197. v-model="textarea1"
  1198. style="width: 100%"
  1199. :autosize="{ minRows: 2, maxRows: 4 }"
  1200. type="textarea"
  1201. placeholder="Please input"
  1202. /> -->
  1203. <PythonEdit v-show="pythoneditorshow" :value="textarea1" language="python" @change="handleEditorChange"/>
  1204. </div>
  1205. <div class="pythfoter">
  1206. <div class="span active" >
  1207. <el-image :src="xin" style="width: 25px;height: 25px;margin-right: 5px;"></el-image>
  1208. <span>信息栏 </span>
  1209. </div>
  1210. <el-input
  1211. v-model="textarea2"
  1212. style="width: 100%"
  1213. :autosize="{ minRows: 2, maxRows: 4 }"
  1214. type="textarea"
  1215. placeholder=""
  1216. />
  1217. </div>
  1218. </div>
  1219. <template #footer>
  1220. <div class="dialog-footer">
  1221. <el-button @click="dialog.Pythonshow = false">检查</el-button>
  1222. <el-button type="primary" @click="pythonSubmit(); dialog.Pythonshow = false">
  1223. 保存
  1224. </el-button>
  1225. </div>
  1226. </template>
  1227. </el-dialog>
  1228. <!-- MathFunc -->
  1229. <el-dialog v-model="dialog.MathFuncdialog" align-center :modal="false" :close-on-click-modal="false"
  1230. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1231. :before-close="handleClose" width="500" class="dialog_class bgcolor colortext tianjia sel">
  1232. <template #header="{ titleId, titleClass }">
  1233. <div class="my-header ">
  1234. <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
  1235. <h4 :id="titleId" :class="titleClass">MathFunc</h4>
  1236. </div>
  1237. </template>
  1238. <MathFunc ref="MathFuncref" @selectTab="MathFunctabchange"/>
  1239. <template #footer>
  1240. <div style="display: flex;justify-content: space-between;">
  1241. <div>
  1242. <el-button v-show="MathFuncxinjian" @click="mathfuncxinjian()">新建</el-button>
  1243. </div>
  1244. <div class="dialog-footer">
  1245. <el-button @click="dialog.MathFuncdialog = false">取消</el-button>
  1246. <el-button type="primary" @click="getmathfunctosave(); dialog.MathFuncdialog = false">
  1247. 确定
  1248. </el-button>
  1249. </div>
  1250. </div>
  1251. </template>
  1252. </el-dialog>
  1253. <!-- FSI -->
  1254. <el-dialog v-model="dialog.fsidialog" align-center :modal="false" :close-on-click-modal="false"
  1255. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1256. :before-close="handleClose" width="570" class="dialog_class bgcolor tianjia sel colortext">
  1257. <template #header="{ titleId, titleClass }">
  1258. <div class="my-header ">
  1259. <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
  1260. <h4 :id="titleId" :class="titleClass">FUM to FEM</h4>
  1261. </div>
  1262. </template>
  1263. <FSI ref="Fsiref"/>
  1264. <template #footer>
  1265. <div class="dialog-footer">
  1266. <el-button @click="dialog.fsidialog = false">取消</el-button>
  1267. <el-button type="primary" @click="getfsitosave();dialog.fsidialog = false">
  1268. 确定
  1269. </el-button>
  1270. </div>
  1271. </template>
  1272. </el-dialog>
  1273. <!-- Flight -->
  1274. <el-dialog v-model="dialog.flightdialog" align-center :modal="false" :close-on-click-modal="false"
  1275. :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
  1276. :before-close="handleClose" width="630" class="dialog_class bgcolor tianjia sel colortext">
  1277. <template #header="{ titleId, titleClass }">
  1278. <div class="my-header ">
  1279. <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
  1280. <h4 :id="titleId" :class="titleClass">Flight</h4>
  1281. </div>
  1282. </template>
  1283. <Flight ref="Flightref"/>
  1284. <template #footer>
  1285. <div class="dialog-footer">
  1286. <el-button @click="dialog.flightdialog = false">取消</el-button>
  1287. <el-button type="primary" @click=" dialog.flightdialog = false">
  1288. 确定
  1289. </el-button>
  1290. </div>
  1291. </template>
  1292. </el-dialog>
  1293. <!-- 内容区 -->
  1294. <div class="main mianflex">
  1295. <!--left菜单栏 -->
  1296. <Sidebar ref="Sidebarref" />
  1297. <!-- 放图形 -->
  1298. <div class="right_container">
  1299. <div class="main_model">
  1300. <div class="jindutiao" v-show="progressshow">
  1301. <span style="width: 150px;">运行进度</span>
  1302. <!-- <el-progress :text-inside="true" :stroke-width="26" :percentage="70" /> -->
  1303. <div class="demo-progress">
  1304. <el-progress :percentage="percentage" :color="customColor">
  1305. <!-- <template #default="{ percentage }">
  1306. <span class="percentage-value">当前进度:{{ percentage }}%</span>
  1307. </template> -->
  1308. </el-progress>
  1309. <!-- <button @click="tbn">点我</button> -->
  1310. </div>
  1311. </div>
  1312. <div class="main_model" v-show='flowshow'>
  1313. <vuefindex ref="vuefval" @optimizerfalse="optimizerfalse($event)"></vuefindex>
  1314. </div>
  1315. <div class="maxh221">
  1316. <!-- 中间部分 -->
  1317. <!-- 列表监控 -->
  1318. <div class="conter_mian classtable " v-show="jiankong" style="width:100%; height: 100%;">
  1319. <el-table :data="tableDatalieb"
  1320. border
  1321. style=" overflow: auto; height: 100%;"
  1322. :header-cell-class-name="lbjkheaderCellClassName"
  1323. :key="tableKey"
  1324. >
  1325. <el-table-column type="index" label="编号" width="100"></el-table-column>
  1326. <el-table-column v-for="(header, index) in tableHeaders" :key="index" :prop="header.prop" show-overflow-tooltip
  1327. :label="header.label" >
  1328. </el-table-column>
  1329. </el-table>
  1330. </div>
  1331. <!-- 曲线监控 -->
  1332. <div class="conter_mian classtable " v-if="echartshow" style="width:100%; height: 100%;">
  1333. <!-- <el-form-item label="" >
  1334. <el-select v-model="quval" :suffix-icon="CaretBottom" placeholder="请选择">
  1335. <el-option v-for="item in quxian" :key="item.value" :label="item.label" :value="item.value">
  1336. </el-option>
  1337. </el-select>
  1338. </el-form-item> -->
  1339. <optmonitor ref="optmonitor1" :echartdata="echartdata" :selval="quval" :curvedata="curvedata" />
  1340. </div>
  1341. <!-- 过程监控 -->
  1342. <div class="conter_mian classtable conter_flex" v-if="echartshow2" style="width:100%; height: 100%;">
  1343. <div class="echart_left ech">
  1344. <processMonitor1 ref="processMonitor1ref" :echartdata="echartdata" :selval="quval" :curvedata="curvedata"/>
  1345. </div>
  1346. <div class="echart_right ech">
  1347. <processMonitor2 ref="processMonitor2ref" :echartdata="echartdata" :selval="quval" :curvedata="curvedata"/>
  1348. </div>
  1349. </div>
  1350. <!-- 可视化开始 -->
  1351. <div class="conter_mian classtable echartcont" v-show="echartzongshow">
  1352. <tablelist ref="tablelistref" v-show="tablelistshow" :tablelistshow="tablelistshow"
  1353. :tabledataliebiao="datatotabledata" :tableHeaders="datatotableheader"/>
  1354. <echartarea ref="arearef" v-show="areashow" :areashow="areashow"/>
  1355. <bargraph ref="bargraphref" v-show="bargraphshow" :bargraphshow="bargraphshow"/>
  1356. <echartLine ref="echartLineref" v-show="echartLineshow" :echartLineshow="echartLineshow"/>
  1357. <BarChart ref="BarChartref" v-show="BarChartshow" :BarChartshow="BarChartshow"/>
  1358. <scatter ref="scatterref" v-show="scattershow" :scattershow="scattershow"/>
  1359. <radar ref="radarref" v-show="radarshow" :radarshow="radarshow"/>
  1360. <pie ref="pieref" v-show="pieshow" :pieshow="pieshow" />
  1361. <pareto ref="paretoref" v-show="paretoshow" :paretoshow="paretoshow" />
  1362. </div>
  1363. <!-- 可视化结束 -->
  1364. <!-- 右侧边栏开始 -->
  1365. <!-- 结束 -->
  1366. </div>
  1367. <el-footer class="femFooter">
  1368. <div class="gooterpading">
  1369. <div class="footerTitle el-tag--primary">
  1370. <div>
  1371. <div class="span" v-for="(tab, index) in tabs" :key="index" :class="{ 'active': activeIndex === index }"
  1372. @click="xxclick(index)">
  1373. <el-image :src="tab.img" fit="contain"></el-image>
  1374. <span>{{ tab.name }} </span></div>
  1375. </div>
  1376. <div>
  1377. <!-- <li
  1378. class="exloadbox"
  1379. v-show="elodingfalse"
  1380. >
  1381. <span>正在求解中</span>
  1382. <i class="el-icon-loading"></i>
  1383. </li> -->
  1384. <!-- <li>
  1385. <span >清空</span>
  1386. </li> -->
  1387. <li>
  1388. <span @click="footerShows('foot')">&#9650;&#9660;</span>
  1389. </li>
  1390. </div>
  1391. </div>
  1392. <div v-if="footerShow">
  1393. <div class="footerTextBox" v-if="activeIndex == 0">
  1394. <el-input class="footerText" type="textarea" id="textarea_id" v-model="logs"></el-input>
  1395. </div>
  1396. <div class="youhualog" v-if="activeIndex == 1">
  1397. <ul>
  1398. <template v-for="(tab, index) in listli" :key="index">
  1399. <el-divider v-if="index !== 0" direction="vertical" class="custom-divider"></el-divider>
  1400. <li @click="issueclick(index)" :class="{ 'active2': activeIndex2 === index }">
  1401. <el-image v-if="activeIndex2 === index" :src="tab.isimg" fit="contain"></el-image>
  1402. <el-image v-else :src="tab.noimg" fit="contain"></el-image>
  1403. <span>{{ tab.name }}</span>
  1404. </li>
  1405. </template>
  1406. </ul>
  1407. <div class="footer-content">
  1408. <div class="eldesign classtable" v-if="activeIndex2 == 0">
  1409. <el-table :data="designtable" border style="width: 100%" height="100">
  1410. <el-table-column type="index" label="编号" width="70" />
  1411. <el-table-column prop="name" label="变量名称">
  1412. <template #default="{ row }">
  1413. <el-input v-model="row.name" @change="handleEdit(row)" />
  1414. </template>
  1415. </el-table-column>
  1416. <el-table-column prop="upper" label="上限值">
  1417. <template #default="{ row }">
  1418. <el-input type="text" v-model="row.upper"
  1419. @change="handleEdit(row)" />
  1420. </template>
  1421. </el-table-column>
  1422. <el-table-column prop="lower" label="下限值">
  1423. <template #default="{ row }">
  1424. <el-input v-model="row.lower"
  1425. @change="handleEdit(row)" />
  1426. </template>
  1427. </el-table-column>
  1428. <el-table-column prop="reference" label="基准值" >
  1429. <template #default="{ row }">
  1430. <el-input v-model="row.reference"
  1431. @change="handleEdit(row)" />
  1432. </template>
  1433. </el-table-column>
  1434. <el-table-column prop="remark" label="说明">
  1435. <template #default="{ row }">
  1436. <el-input v-model="row.remark" @change="handleEdit(row)" />
  1437. </template>
  1438. </el-table-column>
  1439. <!-- <el-table-column label="操作" width="140">
  1440. <template #default="scope">
  1441. <el-button size="small" type="danger"
  1442. @click.stop="sjdelete(scope.$index, scope.row)">删除</el-button>
  1443. </template>
  1444. </el-table-column> -->
  1445. </el-table>
  1446. </div>
  1447. <div class="elconstraint classtable" v-if="activeIndex2 == 1">
  1448. <el-table :data="tableData" border style="width: 100%" height="100">
  1449. <el-table-column type="index" label="编号" width="100" />
  1450. <el-table-column prop="name" label="约束名称">
  1451. <template #default="{ row }">
  1452. <el-input v-model="row.name" @change="handleEdit(row)" />
  1453. </template>
  1454. </el-table-column>
  1455. <!-- <el-table-column prop="con" label="约束关系">
  1456. <template v-slot="scope">
  1457. <el-select class="no-border " v-model.number="scope.row.con" :suffix-icon="CaretBottom"
  1458. placeholder="请选择">
  1459. <el-option v-for="item in options3" :key="item.value" :label="item.label"
  1460. :value="item.value">
  1461. </el-option>
  1462. </el-select>
  1463. </template>
  1464. </el-table-column> -->
  1465. <el-table-column prop="reference" label="约束基准值">
  1466. <template #default="{ row }">
  1467. <el-input v-model="row.reference"
  1468. @change="handleEdit(row)" />
  1469. </template>
  1470. </el-table-column>
  1471. <el-table-column prop="upper" label="上限值">
  1472. <template #default="{ row }">
  1473. <el-input v-model="row.upper"
  1474. @change="handleEdit(row)" />
  1475. </template>
  1476. </el-table-column>
  1477. <el-table-column prop="lower" label="下限值">
  1478. <template #default="{ row }">
  1479. <el-input v-model="row.lower"
  1480. @change="handleEdit(row)" />
  1481. </template>
  1482. </el-table-column>
  1483. <!-- <el-table-column label="操作" width="140">
  1484. <template #default="scope">
  1485. <el-button size="small" type="danger"
  1486. @click.stop="ysdelete(scope.$index, scope.row)">删除</el-button>
  1487. </template>
  1488. </el-table-column> -->
  1489. </el-table>
  1490. </div>
  1491. <div class="eloptimize classtable" v-if="activeIndex2 == 2">
  1492. <el-table :data="eloptimize" border style="width: 100%" height="100">
  1493. <el-table-column type="index" label="编号" width="70" />
  1494. <el-table-column prop="name" label="目标名称">
  1495. <template #default="{ row }">
  1496. <el-input v-model="row.name" />
  1497. </template>
  1498. </el-table-column>
  1499. <el-table-column prop="optdir" label="优化方向">
  1500. <template v-slot="scope">
  1501. <el-select class="no-border " v-model="scope.row.optdir" :suffix-icon="CaretBottom"
  1502. placeholder="请选择">
  1503. <el-option v-for="item in options1" :key="item.value" :label="item.label"
  1504. :value="item.value">
  1505. </el-option>
  1506. </el-select>
  1507. </template>
  1508. </el-table-column>
  1509. <el-table-column prop="weight" label="权重系数">
  1510. <template #default="{ row }">
  1511. <el-input v-model="row.weight"
  1512. @change="handleEdit(row)" />
  1513. </template>
  1514. </el-table-column>
  1515. <!-- <el-table-column prop="scaling" label="数据缩放">
  1516. <template v-slot="scope">
  1517. <el-checkbox :false-label="0" :true-label="1" v-model="scope.row.scaling" />
  1518. </template>
  1519. </el-table-column>
  1520. <el-table-column prop="factor" label="缩放因子">
  1521. <template #default="{ row }">
  1522. <el-input v-model.number="row.factor" oninput="value=value.replace(/^|[^0-9]/g,'')"
  1523. @change="handleEdit(row)" />
  1524. </template>
  1525. </el-table-column> -->
  1526. <el-table-column prop="reference" label="约束基准值">
  1527. <template #default="{ row }">
  1528. <el-input v-model="row.reference"
  1529. @change="handleEdit(row)" />
  1530. </template>
  1531. </el-table-column>
  1532. <el-table-column prop="remark" label="说明">
  1533. <template #default="{ row }">
  1534. <el-input v-model="row.remark" @change="handleEdit(row)" />
  1535. </template>
  1536. </el-table-column>
  1537. <!-- <el-table-column label="操作" width="140">
  1538. <template #default="scope">
  1539. <el-button size="small" type="danger"
  1540. @click.stop="mbdelete(scope.$index, scope.row)">删除</el-button>
  1541. </template>
  1542. </el-table-column> -->
  1543. </el-table>
  1544. </div>
  1545. </div>
  1546. <div class="dibu">
  1547. <div class="footer-add">
  1548. <div class="sev_ruwu">
  1549. <div class="disflex flexend">
  1550. <el-form-item label="新增变量数:" v-if="activeIndex2 === 0">
  1551. <el-input v-model="tableval" maxlength="6"
  1552. oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
  1553. />
  1554. </el-form-item>
  1555. <el-button class="btncolor" v-if="activeIndex2 === 0">导入</el-button>
  1556. <el-button class="btncolor" @click="onAddItem">新建</el-button>
  1557. <el-button class="btncolor" @click="onokItem">确定</el-button>
  1558. </div>
  1559. </div>
  1560. </div>
  1561. </div>
  1562. </div>
  1563. </div>
  1564. <div class="pading_foter">
  1565. </div>
  1566. </div>
  1567. </el-footer>
  1568. </div>
  1569. </div>
  1570. </div>
  1571. </div>
  1572. </el-main>
  1573. </el-container>
  1574. </div>
  1575. </template>
  1576. <script setup>
  1577. import { ref, onMounted, reactive, provide, nextTick } from "vue";
  1578. import { RouterView, RouterLink, useRouter, useRoute } from "vue-router"
  1579. import myheader from "@/components/header.vue"
  1580. import { request, uploadFile } from "@/utils/request";
  1581. import { ElMessage, ElButton, ElDialog, ElSelect } from 'element-plus'
  1582. import { Edit, CaretBottom } from '@element-plus/icons-vue'
  1583. // import '@/utils/flexible'
  1584. import s0 from "@/assets/img/s0.png"
  1585. import gc1 from "@/assets/img/gc1.png"
  1586. import gc2 from "@/assets/img/gc2.png"
  1587. import gc3 from "@/assets/img/gc3.png"
  1588. import wen from "@/assets/img/wen.png"
  1589. import q2 from "@/assets/img/q2.png"
  1590. import f21 from "@/assets/img/f21.png"
  1591. import f22 from "@/assets/img/f22.png"
  1592. import f41 from "@/assets/img/f41.png"
  1593. import xin from "@/assets/img/xin.png"
  1594. import xin2 from "@/assets/img/xin2.png"
  1595. import s from "@/assets/img/s.png"
  1596. import y from "@/assets/img/y.png"
  1597. import y2 from "@/assets/img/y2.png"
  1598. import nos from "@/assets/img/nos.png"
  1599. import zy from "@/assets/img/zy.png"
  1600. import zy2 from "@/assets/img/zy2.png"
  1601. import xuek10 from '@/assets/flowimg/xuek10.png'
  1602. import xuek11 from '@/assets/flowimg/xuek11.png'
  1603. import xuek12 from '@/assets/flowimg/xuek12.png'
  1604. import optmonitor from './echart/optimize_monitor.vue'
  1605. import processMonitor1 from "./echart/process-monitor1.vue"
  1606. import processMonitor2 from "./echart/process-monitor2.vue"
  1607. import echartindex from './echart/index.vue'
  1608. import sixtop from './echart/six_top.vue'
  1609. import sixbottom from './echart/six_bottom.vue'
  1610. import sixindex from './demo/index.vue'
  1611. import sixchine from './demo/chine.vue'
  1612. import vuefindex from './vuetree/index.vue'
  1613. import Sidebar from './vuetree/Sidebar.vue'
  1614. // 可视化echart
  1615. import tablelist from './echart/tablelist.vue'
  1616. import echartarea from './echart/area.vue'
  1617. import bargraph from './echart/bargraph.vue'
  1618. import echartLine from './echart/echartLine.vue'
  1619. import BarChart from './echart/BarChart.vue'
  1620. import scatter from './echart/scatter.vue'
  1621. import radar from './echart/radar.vue'
  1622. import pie from './echart/pie.vue'
  1623. import pareto from './echart/pareto.vue'
  1624. import Doptimize from './titlecomponent/Doptimize.vue'
  1625. import Joptimize from './titlecomponent/Joptimize.vue'
  1626. import Toptimize from './titlecomponent/Toptimize.vue'
  1627. import ADflow from './titlecomponent/ADflow.vue'
  1628. import Xfoil from './titlecomponent/Xfoil.vue'
  1629. import csts from './titlecomponent/csts.vue'
  1630. import ffds from './titlecomponent/ffds.vue'
  1631. import cloudsecond from "./titlecomponent/Cloudsecond.vue";
  1632. import FSI from './titlecomponent/FSI.vue'
  1633. import Flight from './titlecomponent/Flight.vue'
  1634. import MathFunc from './titlecomponent/MathFunc.vue'
  1635. import ListSE from "./titlecomponent/ListSE.vue";
  1636. import TACS from "./titlecomponent/TACS.vue";
  1637. import fileUploads from './components/fileuploads.vue'
  1638. import Exreport from "./titlecomponent/Exreport.vue";
  1639. import PythonEdit from '@/components/PythonEditor/index.vue'; // python编辑器
  1640. import pdfReportView from '@/components/pdfReportView/index.vue'; //报告查看
  1641. import cloudChart from './threejsView/index.vue'; // 云图
  1642. import emitter from "@/utils/emitter";
  1643. let Sidebarref = ref();
  1644. let resource=ref(0);
  1645. let cstnum=ref('');
  1646. let textarea2=ref()
  1647. let textarea1 = ref(`import os
  1648. import numpy as np
  1649. from surromdao.solver import BaseSolver
  1650. class Branin(BaseSolver):
  1651. def __init__(self, filename=os.path):
  1652. super().__init__(filename)
  1653. def compute(self, xdict):
  1654. x = np.zeros(2)
  1655. # x[0] = xdict['x1']
  1656. # x[1] = xdict['x2']`);
  1657. let Cstref = ref();
  1658. let Ffdref = ref();
  1659. let Xfoilref = ref();
  1660. let ADflowref = ref();
  1661. let Joptimizeref=ref();
  1662. let Doptimizeref=ref();
  1663. let Toptimizeref=ref();
  1664. let Fsiref=ref();
  1665. let Flightref=ref();
  1666. let MathFuncref=ref();
  1667. let Tacsref=ref();
  1668. let f4ce = ref("优化问题组件");
  1669. let modelban = ref("学科分析组件");
  1670. let undmodel=ref('优化器组件');
  1671. let optiongroup1 = ref([
  1672. { label: '优化问题', value: '优化问题',img:'wen.png' }
  1673. ])
  1674. let options4 = ref([
  1675. { label: '进化优化器', value: '进化优化器', icon:xuek10 },
  1676. { label: '代理优化器', value: '代理优化器', icon:xuek11 },
  1677. { label: '梯度优化器', value: '梯度优化器', icon:xuek12 },
  1678. ])
  1679. let formLabelWidth3=ref(100)
  1680. let formLabelWidth200=ref(200)
  1681. let tablecstHeaders=ref([]);
  1682. let treeitem = ref({});
  1683. let treeitem2 = ref({});
  1684. let treeitem3 = ref({});
  1685. let percentage = ref(70);
  1686. let progressshow = ref(false);
  1687. let flowshow = ref(true);
  1688. let jiankong = ref(false);
  1689. let echartshow = ref(false);
  1690. let echartshow2 = ref(false);
  1691. let tablelistshow = ref(false);
  1692. let areashow = ref(false);
  1693. let echartLineshow = ref(false);
  1694. let BarChartshow = ref(false);
  1695. let bargraphshow = ref(false);
  1696. let scattershow = ref(false);
  1697. let radarshow = ref(false);
  1698. let pieshow = ref(false);
  1699. let paretoshow = ref(false);
  1700. let bargraphref = ref();
  1701. let echartLineref = ref();
  1702. let BarChartref = ref();
  1703. let radarref = ref();
  1704. let pieref = ref();
  1705. let paretoref = ref();
  1706. let scatterref = ref();
  1707. let echartzongshow = ref(false);
  1708. const router = useRouter();
  1709. const route = useRoute();
  1710. let tablelistref = ref();
  1711. let echartdata = ref(null);
  1712. let optmonitor1 = ref();
  1713. let processMonitor1ref = ref()
  1714. let processMonitor2ref = ref()
  1715. let arearef = ref();
  1716. let tableHeaders = ref([
  1717. { label: '参数1', prop: 'value1' },
  1718. { label: '参数2', prop: 'value2' },
  1719. { label: '参数3', prop: 'value3' },
  1720. { label: '参数4', prop: 'value4' },
  1721. { label: '参数5', prop: 'value5' },
  1722. ])
  1723. let varsobj = ref({});
  1724. let valsobj = ref({});
  1725. let tabarr = ref([]);
  1726. let arrobj = ref([]);
  1727. let tableDatalieb = ref([
  1728. { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
  1729. { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
  1730. { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
  1731. { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
  1732. { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
  1733. ])
  1734. let curvedata = ref('');
  1735. let websock = ref(null);
  1736. let times = ref({
  1737. lockReconnect: false, //是否真正建立连接
  1738. timeout: 28 * 1000, //30秒一次心跳
  1739. timeoutObj: null, //心跳倒计时
  1740. serverTimeoutObj: null, //
  1741. timeoutnum: null, //断开重连倒计时
  1742. })
  1743. let input3=ref()
  1744. let eid = ref('');//进步优化器的eid
  1745. let logs = ref("");
  1746. let pid = ref("");
  1747. let pythonwid = ref();
  1748. let youhuaqiwid = ref();
  1749. let canshuhuawid = ref();
  1750. let qidongyouhuawid = ref();
  1751. let fid = ref('');
  1752. let conid = ref('');
  1753. let tableval = ref();
  1754. let vuefval = ref();
  1755. let elodingfalse = ref(false);
  1756. let footerShow = ref(true);
  1757. let zhixing = ref('Rosenbrock');
  1758. let tabName = ref("one")
  1759. const tabs = [{
  1760. name:'信息栏',
  1761. img:xin,
  1762. },{
  1763. name:'优化问题',
  1764. img:xin2,
  1765. }]
  1766. const listli=[{
  1767. name:'设计变量',
  1768. noimg:nos,
  1769. isimg:s
  1770. },{
  1771. name:'约束条件',
  1772. noimg:y2,
  1773. isimg:zy2
  1774. },
  1775. {
  1776. name:'优化目标',
  1777. noimg:y,
  1778. isimg:zy
  1779. }
  1780. ]
  1781. const xfoil = ['输入', '执行', '输出'];
  1782. const newxfoil = ['输入参数', '输出参数', '中间参数'];
  1783. let srtable = ref([]);
  1784. let radio1=ref(0);
  1785. let srnewtable = ref([
  1786. {
  1787. date: '2016-05-04',
  1788. name: 'Aleyna Kutzner',
  1789. },
  1790. {
  1791. date: '2016-05-03',
  1792. name: 'Helen Jacobi',
  1793. },
  1794. ]);
  1795. let scnewtable = ref([
  1796. {
  1797. date: '2016-05-04',
  1798. name: 'Aleyna Kutzner',
  1799. con:-1
  1800. },
  1801. {
  1802. date: '2016-05-03',
  1803. name: 'Helen Jacobi',
  1804. con:1
  1805. },
  1806. ]);
  1807. let sctable = ref([]);
  1808. // let quxian=ref([{
  1809. // val:'1',name:"设计变量",
  1810. // val:'2',name:"约束条件",
  1811. // val:'3',name:"约束条件",
  1812. // }])
  1813. // let quval=ref('1')
  1814. let currentTab=ref(0);
  1815. // let tabslist = ref([
  1816. // { id: '0', name: '来流参数' },
  1817. // { id: '1', name: '设置参数' },
  1818. // { id: '2', name: '分析参数' },
  1819. // ])
  1820. let yslist = ref([
  1821. { label: 'GA', value: 'GA' },
  1822. { label: 'PSO', value: 'PSO' },
  1823. { label: 'NSGA2', value: 'NSGA2' },
  1824. ])
  1825. let lailiutable=ref([
  1826. {
  1827. data: 1,
  1828. name: '结构质量',
  1829. con:-1
  1830. },
  1831. {
  1832. data: 23,
  1833. name: 'KS失效',
  1834. con:1
  1835. },
  1836. {
  1837. data: 0.0,
  1838. name: '最大变形',
  1839. con: -1
  1840. }
  1841. ])
  1842. let quxian = ref([
  1843. { label: '设计变量', value: '设计变量' },
  1844. { label: '约束条件', value: '约束条件' },
  1845. { label: '目标函数', value: '目标函数' },
  1846. ])
  1847. let quval = ref("")
  1848. const activeIndex = ref(0);
  1849. const activeIndex2 = ref(0);
  1850. const activeIndex3 = ref(0);
  1851. const color1 = ref('');
  1852. const colortier = ref('rgba(16, 185, 129, 0.5)');
  1853. let showTrigger = ref(false);
  1854. let activeadf=ref('Xfoil');
  1855. const datatree = ref([
  1856. {
  1857. id: 1,
  1858. label: '工程',
  1859. children: [
  1860. {
  1861. id: '1-1',
  1862. label: '优化问题',
  1863. img: gc1,
  1864. },
  1865. {
  1866. id: '1-2',
  1867. label: '分析流程',
  1868. img: gc2,
  1869. },
  1870. {
  1871. id: '1-3',
  1872. label: '优化器',
  1873. img: gc3
  1874. },
  1875. ],
  1876. },
  1877. ])
  1878. let options1 = ref([
  1879. { label: '最大化', value: "-1" },
  1880. { label: '最小化', value: "1" },
  1881. ])
  1882. let options2 = ref([
  1883. { label: '升力系数', value: '升力系数' },
  1884. { label: '翼型面积', value: '翼型面积' },
  1885. ])
  1886. let options3 = ref([
  1887. { label: '大于', value: -1 },
  1888. { label: '小于', value: 1 },
  1889. ])
  1890. let shuxingopt = ref([
  1891. { label: '约束条件', value: -1 },
  1892. { label: '优化目标', value: 1 },
  1893. ])
  1894. let defaultExpandedArr = ref([]);
  1895. const defaultProps = {
  1896. children: 'children',
  1897. label: 'label',
  1898. }
  1899. let svarlist = ref('');
  1900. let conlist = ref('');
  1901. let funlist = ref('');
  1902. let looktext=ref('');
  1903. // treeData.value.forEach((item) => {
  1904. // defaultExpandedArr.value.push(item.id);
  1905. // });
  1906. const activeName = ref('Role')
  1907. const activeName1 = ref('message')
  1908. let active = ref('Role10');
  1909. let tabactive = ref("");
  1910. let checkbox = ref(false)
  1911. let formLabelWidth6 = ref(100)
  1912. let formLabelWidth1 = ref(170)
  1913. let formLabelWidth2 = ref(130)
  1914. let canshu = ref();
  1915. let question = ref([
  1916. { url: 'kk1.png', titlie: "列表" },
  1917. { url: 'kk2.png', titlie: "散点图" },
  1918. { url: 'kk4.png', titlie: "折线图" },
  1919. { url: 'kk8.png', titlie: "帕雷托图" },
  1920. { url: 'kk3.png', titlie: "面积图" },
  1921. { url: 'kk5.png', titlie: "柱状图" },
  1922. { url: 'k3.png', titlie: "饼状图" },
  1923. { url: 'kk6.png', titlie: "横条图" },
  1924. { url: 'kk7.png', titlie: "雷达图" },
  1925. { url: 'kk9.png', titlie: "云图/等值线" },
  1926. { url: 'kk10.png', titlie: "查看报告" },
  1927. { url: 'kk11.png', titlie: "导出报告" },
  1928. ])
  1929. let roletion = ref([
  1930. { url: 'f41.png', titlie: "测试函数模板" },
  1931. { url: 'r1.png', titlie: "工程优化模板" },
  1932. { url: 'r2.png', titlie: "自定义" },
  1933. ])
  1934. let tasktion = ref([
  1935. { url: 't0.png', titlie: "外形参数化" },
  1936. ])
  1937. let Rolelist = ref([
  1938. { url: 'tow1.png', titlie: "优化问题组件" },
  1939. { url: 'tow2.png', titlie: "学科分析组件" },
  1940. { url: 'tow3.png', titlie: "优化器组件" },
  1941. ])
  1942. let Rolelist1 = ref([
  1943. { url: 'l1.png', titlie: "逻辑流连线" },
  1944. { url: 'l2.png', titlie: "数据流连线" },
  1945. ])
  1946. let Rolelist11 = ref([{ url: 'w6.png', titlie: "选择连线颜色" }])
  1947. let Rolelist2 = ref([
  1948. { url: 'cai1.png', titlie: "模块组合" },
  1949. { url: 'cai2.png', titlie: "模块拆分" },
  1950. ])
  1951. let Rolelist22 = ref([{ url: 'w9.png', titlie: "选择图框颜色" }])
  1952. let Rolelist3 = ref([
  1953. { url: 'w10.png', titlie: "添加注释" },
  1954. ])
  1955. let Threelist = ref([
  1956. { url: 'you1.png', titlie: "开始" },
  1957. { url: 'you2.png', titlie: "暂停" },
  1958. { url: 'you3.png', titlie: "续算" },
  1959. { url: 'tts.png', titlie: "结束" },
  1960. ])
  1961. let Threelist1 = ref([
  1962. { url: 'yh1.png', titlie: "列表监控" },
  1963. { url: 'yh2.png', titlie: "曲线监控" },
  1964. { url: 'yh3.png', titlie: "过程监控" },
  1965. ])
  1966. let Sevenlist = ref([
  1967. { url: 'rr2.png', titlie: '任务检索' },
  1968. { url: 'rr1.png', titlie: '任务管理' },
  1969. { url: 'rr3.png', titlie: '备份' },
  1970. ])
  1971. let eightlist = ref([
  1972. { url: 'e1.png', titlie: '用户手册' },
  1973. { url: 'e2.png', titlie: '帮助文档' },
  1974. { url: 'e3.png', titlie: '关于软件' },
  1975. ])
  1976. let canshulist = ref([
  1977. { label: 'CST参数化', value: 'CST参数化' },
  1978. { label: 'FFD参数化', value: 'FFD参数化' },
  1979. ])
  1980. let sevlist = ref([
  1981. { label: '任务编号', value: '任务编号' },
  1982. { label: '任务名称', value: '任务名称' },
  1983. { label: '任务类型', value: '任务类型' },
  1984. { label: '创建时间', value: '创建时间' },
  1985. ])
  1986. let seval4 = ref('任务名称');
  1987. let agelist = ref([
  1988. { label: 'Kriging模型', value: 'Kriging模型' },
  1989. { label: '相关函数类型', value: '相关函数类型' },
  1990. { label: '超参数优化方法', value: '超参数优化方法' },
  1991. { label: 'Hooke Jeeves方法循环次数', value: 'Hooke Jeeves方法循环次数' },
  1992. ])
  1993. let agval = ref("Kriging模型")
  1994. let agval1 = ref("固定设计空间")
  1995. let agval2 = ref("拉丁超立方")
  1996. let agelist1 = ref([
  1997. { label: '固定设计空间', value: '固定设计空间' },
  1998. ])
  1999. let agelist2 = ref([
  2000. { label: '拉丁超立方', value: '拉丁超立方' },
  2001. ])
  2002. let addval = ref("EI + MSP")
  2003. let addlist = ref([
  2004. { label: 'EI + MSP', value: 'EI + MSP' },
  2005. ])
  2006. let addval1 = ref("概率相乘法")
  2007. let addlist1 = ref([
  2008. { label: '概率相乘法', value: '概率相乘法' },
  2009. ])
  2010. let addval2 = ref("SBX交叉")
  2011. let addlist2 = ref([
  2012. { label: 'SBX交叉', value: 'SBX交叉' },
  2013. ])
  2014. let addval3 = ref("最佳保留策略")
  2015. let ys = ref("GA")
  2016. let addlist3 = ref([
  2017. { label: '最佳保留策略', value: '最佳保留策略' },
  2018. ])
  2019. let addval4 = ref("倒位变异")
  2020. let addlist4 = ref([
  2021. { label: '倒位变异', value: '倒位变异' },
  2022. ])
  2023. let addval7 = ref("1e-7")
  2024. let addlist7 = ref([
  2025. { label: '1e-7', value: '1e-7' },
  2026. ])
  2027. let addval8 = ref("NO")
  2028. let addlist8 = ref([
  2029. { label: 'YES', value: 'YES' },
  2030. { label: 'NO', value: 'NO' },
  2031. ])
  2032. let paretocbval = ref([])
  2033. let paretocheckbox = ref([
  2034. {label:'-cl',value:'-cl'},
  2035. {label:'cd',value:'cd'},
  2036. ])
  2037. let cloudbtnbox = ref([
  2038. {url:'meshFile.png',btnname:'文件选择'},
  2039. {url:'yu.png',btnname:'域'},
  2040. {url:'kk9.png',btnname:'云图'},
  2041. {url:'seka.png',btnname:'色卡'},
  2042. {url:'dengzx.png',btnname:'等值线'},
  2043. ])
  2044. let dialog = ref({
  2045. newdialog: false,
  2046. setdialog: false,
  2047. targetdialog: false,
  2048. design: false,
  2049. constraint: false,
  2050. parameter: false,
  2051. agency: false,
  2052. optimizer: false,
  2053. jboptimizer: false,
  2054. dboptimizer: false,
  2055. tboptimizer: false,
  2056. isADflow:false,
  2057. lookover:false,
  2058. exportreport:false,
  2059. Xfiol: false,
  2060. tidu:false,
  2061. CSTt:false,
  2062. ffdt:false,
  2063. XfAD:false,
  2064. cstffd:false,
  2065. Taxs:false,
  2066. enddialog: false,
  2067. addfun: false,
  2068. sufun: false,
  2069. task: false,
  2070. guanli: false,
  2071. optgroup:false,
  2072. Pythonshow:false,
  2073. MathFuncdialog:false,
  2074. listdialog:false,
  2075. scatterdialog:false,
  2076. echartLinedialog:false,
  2077. paretodialog:false,
  2078. clouddialog:false,
  2079. fsidialog:false,
  2080. flightdialog:false,
  2081. })
  2082. // let columns=ref[{
  2083. // columns: [
  2084. // { label: '上表面', prop: 'sbiao' },
  2085. // { label: '下表面', prop: 'xbiao' },
  2086. // // 动态添加更多列
  2087. // ]
  2088. // }]
  2089. let options = ref([
  2090. { label: '升阻比', value: '升阻比' },
  2091. { label: 'RCS', value: 'RCS' },
  2092. ])
  2093. let tasklist = ref([
  2094. { label: '气动', value: '气动' },
  2095. { label: '结构', value: '结构' },
  2096. { label: '隐身', value: '隐身' },
  2097. { label: '噪声', value: '噪声' },
  2098. ])
  2099. const optiongroup = ref([
  2100. { label: 'CST', value: 'CST', img:'xuek0.png' },
  2101. { label: 'FFD', value: 'FFD', img:'ffd.png' },
  2102. { label: 'Xfoil', value: 'Xfoil', img:'xuek9.png' },
  2103. { label: 'ADflow', value: 'ADflow', img:'ADflow.png' },
  2104. { label: 'TACS', value: 'TACS', img:'TACS.png' },
  2105. { label: 'CATIA', value: 'CATIA', img:'xuek1.png' },
  2106. { label: 'Python', value: 'Python', img:'xuek8.png' },
  2107. { label: 'Excel', value: 'Excel', img:'xuek2.png' },
  2108. { label: 'Feko', value: 'Feko', img:'xuek3.png' },
  2109. { label: 'Fluent', value: 'Fluent', img:'xuek4.png' },
  2110. { label: 'HCFD', value: 'HCFD', img:'xuek5.png' },
  2111. { label: 'Matlab', value: 'Matlab', img:'xuek6.png' },
  2112. { label: 'Nastran', value: 'Nastran', img:'xuek7.png' },
  2113. { label: 'FUM to FEM', value: 'FSI', img:'fsi.png' },
  2114. { label: 'Flight', value: 'Flight', img:'flight.png' },
  2115. ])
  2116. const eloptimize = ref([])
  2117. const tableData = ref([])
  2118. const designtable = ref([])
  2119. const tasktable = ref([
  2120. // {
  2121. // id: "01",
  2122. // time: '2016-05-03',
  2123. // name: '升阻比',
  2124. // state: '增大',
  2125. // },
  2126. // {
  2127. // id: "02",
  2128. // time: '2016-05-03',
  2129. // name: '升阻比',
  2130. // state: '增大',
  2131. // },
  2132. ])
  2133. const customColor = ref('#2267B1')
  2134. const customColors = [
  2135. { color: '#f56c6c', percentage: 20 },
  2136. { color: '#f56c6c', percentage: 40 },
  2137. { color: '#5cb87a', percentage: 60 },
  2138. { color: '#5cb87a', percentage: 80 },
  2139. { color: '#5cb87a', percentage: 100 },
  2140. ]
  2141. let name = ref("1")
  2142. let num = ref(1)
  2143. const getImgPath = (url) => {
  2144. return new URL(`../assets/img/${url}`, import.meta.url).href
  2145. }
  2146. const getflowImgPath = (url) => {
  2147. return new URL(`../assets/flowimg/${url}`, import.meta.url).href
  2148. }
  2149. onMounted(() => {
  2150. //console.log( Sidebarref.value.datatree);
  2151. setTimeout(function () {
  2152. init();
  2153. initWebSocket();
  2154. logsget();
  2155. // vuefval.value.getroter()
  2156. }, 1500);
  2157. // childfun();
  2158. });
  2159. const sjdelete = (index, row) => {
  2160. console.log(index);
  2161. designtable.value.splice(index, 1)
  2162. }
  2163. const ysdelete = (index, row) => {
  2164. tableData.value.splice(index, 1)
  2165. }
  2166. const mbdelete = (index, row) => {
  2167. eloptimize.value.splice(index, 1)
  2168. }
  2169. // 初始值
  2170. const init = () => {
  2171. pid.value = route.query.pid;
  2172. console.log(route.query.pid);
  2173. }
  2174. const handleClick = (tab, event) => {
  2175. console.log('标签页:',tab.props.name);
  2176. tabactive.value = tab.props.name;
  2177. if (tabactive.value == 'User') {
  2178. vuefval.value.logToObject1().then(() => {
  2179. router.replace({ path: '/' });
  2180. console.log('跳转到首页');
  2181. });
  2182. } else {
  2183. }
  2184. if (tabactive.value == 'Role') {
  2185. flowshow.value = true;
  2186. console.log(11111)
  2187. } else {
  2188. flowshow.value = false;
  2189. console.log(flowshow.value)
  2190. }
  2191. ifjiankong();
  2192. dialogcolse()
  2193. // 可视化标签页
  2194. if (tabactive.value == 'Config') {
  2195. echartzongshow.value = true;
  2196. curveLine4();
  2197. } else {
  2198. echartzongshow.value = false;
  2199. }
  2200. }
  2201. const validateInput = (row) => {
  2202. // 允许输入 None / none / 负数 / 小数
  2203. if (/^(none|None|-?\d*\.?\d*)$/.test(row.upper)) {
  2204. row.upper = row.upper; // 允许输入
  2205. } else {
  2206. row.upper = row.upper.slice(0, -1); // 删除最后输入的非法字符
  2207. }
  2208. }
  2209. const validateInput1 = (row) => {
  2210. // 允许输入 None / none / 小数
  2211. if (/^(none|None|\d*\.?\d*)$/.test(row.upper)) {
  2212. row.upper = row.upper; // 允许输入
  2213. } else {
  2214. row.upper = row.upper.slice(0, -1); // 删除最后输入的非法字符
  2215. }
  2216. }
  2217. //表格点击事件
  2218. const handleEdit = (row) => {
  2219. // console.log('编辑后的数据:', row);
  2220. // 在这里处理数据保存逻辑,例如发送请求到后端更新数据
  2221. };
  2222. const footerClick = (tab, event) => {
  2223. }
  2224. // 关闭所有弹窗
  2225. const dialogcolse = () => {
  2226. dialog.value.newdialog = false;
  2227. dialog.value.setdialog = false;
  2228. dialog.value.targetdialog = false;
  2229. dialog.value.design = false;
  2230. dialog.value.constraint = false;
  2231. dialog.value.parameter = false;
  2232. dialog.value.agency = false;
  2233. dialog.value.addfun = false;
  2234. dialog.value.sufun = false;
  2235. dialog.value.enddialog = false;
  2236. dialog.value.task = false;
  2237. dialog.value.guanli = false;
  2238. }
  2239. // Tree的点击事件
  2240. const handleNodeClick = (data) => {
  2241. console.log(data)
  2242. tabactive.value = data.label;
  2243. dialogbolen();
  2244. }
  2245. const optimizerfalse = (val) => {
  2246. console.log('双击',val);
  2247. const name = val.name;
  2248. const wid = val.wid;
  2249. if (name == '优化器') {
  2250. // dialog.value.optimizer = true;
  2251. activeadf.value='代理优化器';
  2252. initoptimize(wid);
  2253. dialog.value.optgroup = true;
  2254. } else if (name == '参数化') {
  2255. activeadf.value='CST';
  2256. initcstffds(wid);
  2257. dialog.value.cstffd = true;
  2258. }else if (name == '气动分析') {
  2259. activeadf.value='Xfoil'
  2260. intxfoiladflow(wid);
  2261. dialog.value.XfAD = true;
  2262. } else if (name == '进化优化器') {
  2263. activeadf.value='进化优化器';
  2264. dialog.value.jboptimizer = true;
  2265. nextTick(() => {
  2266. // 确保 ref 已经初始化
  2267. if (Joptimizeref.value) {
  2268. // 调用 Joptimize 的 getoptimize 方法
  2269. Joptimizeref.value.getoptimize(pid.value,wid);
  2270. }
  2271. });
  2272. } else if (name == '代理优化器') {
  2273. activeadf.value='代理优化器';
  2274. // dialog.value.optgroup = true;
  2275. dialog.value.dboptimizer = true;
  2276. nextTick(() => {
  2277. // 确保 ref 已经初始化
  2278. if (Doptimizeref.value) {
  2279. Doptimizeref.value.getDoptimize(pid.value,wid);
  2280. }
  2281. });
  2282. }
  2283. // else if (val == 'Xfiol' || val == 'Rosenbrock') {
  2284. // importget();
  2285. // dialog.value.Xfiol = true;
  2286. // }
  2287. else if(name == '梯度优化器'){
  2288. activeadf.value='梯度优化器';
  2289. dialog.value.tboptimizer = true;
  2290. nextTick(() => {
  2291. // 确保 ref 已经初始化
  2292. if (Toptimizeref.value) {
  2293. Toptimizeref.value.getToptimize(pid.value,wid);
  2294. }
  2295. });
  2296. }else if(name == 'CST'){
  2297. /// dialog.value.CSTt = true;
  2298. activeadf.value='CST';
  2299. dialog.value.CSTt = true;
  2300. nextTick(() => {
  2301. // 确保 ref 已经初始化
  2302. if (Cstref.value) {
  2303. Cstref.value.getcst(pid.value,wid);
  2304. }
  2305. });
  2306. }else if(name == 'FFD'){
  2307. /// dialog.value.CSTt = true;
  2308. activeadf.value='FFD';
  2309. dialog.value.ffdt = true;
  2310. nextTick(() => {
  2311. // 确保 ref 已经初始化
  2312. if (Ffdref.value) {
  2313. Ffdref.value.getffds(pid.value,wid);
  2314. }
  2315. });
  2316. }
  2317. else if(name == 'ADflow'){
  2318. // adfhandleClick();
  2319. activeadf.value='ADflow';
  2320. dialog.value.isADflow = true;
  2321. nextTick(() => {
  2322. // 确保 ref 已经初始化
  2323. if (ADflowref.value) {
  2324. ADflowref.value.getadflow(pid.value,wid);
  2325. }
  2326. });
  2327. }else if(name == 'Xfoil'){
  2328. // activeadf.value='Xfiol';
  2329. dialog.value.Xfiol = true;
  2330. nextTick(() => {
  2331. // 确保 ref 已经初始化
  2332. if (Xfoilref.value) {
  2333. Xfoilref.value.getxfoil(pid.value,wid);
  2334. }
  2335. });
  2336. }else if(name == 'TACS'){
  2337. dialog.value.Taxs = true;
  2338. nextTick(() => {
  2339. // 确保 ref 已经初始化
  2340. if (Tacsref.value) {
  2341. Tacsref.value.gettacs(pid.value,wid);
  2342. }
  2343. });
  2344. }else if(name == '模版'){
  2345. dialog.value.optgroup = true;
  2346. activeadf.value='代理优化器';
  2347. }else if(name == 'Python'){
  2348. dialog.value.Pythonshow = true;
  2349. initPython(wid);
  2350. }else if(name == 'FSI'){
  2351. dialog.value.fsidialog = true;
  2352. nextTick(() => {
  2353. // 确保 ref 已经初始化
  2354. if (Fsiref.value) {
  2355. Fsiref.value.getfsi(pid.value,wid);
  2356. }
  2357. });
  2358. }else if(name == 'Flight'){
  2359. dialog.value.flightdialog = true;
  2360. }else if(name == 'MathFunc'){
  2361. dialog.value.MathFuncdialog = true;
  2362. nextTick(() => {
  2363. // 确保 ref 已经初始化
  2364. if (MathFuncref.value) {
  2365. MathFuncref.value.getmathfunc(pid.value,wid);
  2366. }
  2367. });
  2368. }
  2369. else {
  2370. dialog.value.optimizer = false;
  2371. dialog.value.jboptimizer = false;
  2372. dialog.value.Xfiol = false;
  2373. dialog.value.lookover = false;
  2374. dialog.value.tidu = false;
  2375. dialog.value.CSTt = false;
  2376. dialog.value.XfAD = false;
  2377. dialog.value.cstffd = false;
  2378. dialog.value.Pythonshow = false;
  2379. dialog.value.MathFuncdialog = false;
  2380. dialog.value.fsidialog = false;
  2381. dialog.value.flightdialog = false;
  2382. }
  2383. }
  2384. // 优化器窗口初始化
  2385. const initoptimize = (nowid) => {
  2386. youhuaqiwid.value = nowid;
  2387. const params1 = {
  2388. transCode:'MDO0018',
  2389. pid: pid.value,
  2390. wid: youhuaqiwid.value
  2391. }
  2392. const params2 = {
  2393. transCode:'MDO0031',
  2394. pid: pid.value,
  2395. wid: youhuaqiwid.value
  2396. }
  2397. const params3 = {
  2398. transCode:'MDO0033',
  2399. pid: pid.value,
  2400. wid: youhuaqiwid.value
  2401. }
  2402. Promise.all([
  2403. request(params1),
  2404. request(params2),
  2405. request(params3)
  2406. ]).then(([res1, res2, res3]) => {
  2407. console.log('1:', res1.checked);
  2408. console.log('2:', res2.checked);
  2409. console.log('3:', res3.checked);
  2410. if(res1.hasOwnProperty('eid')){
  2411. Joptimizeref.value.getoptimizeAssign(res1);
  2412. console.log('fuz1:');
  2413. }
  2414. if(res3.hasOwnProperty('grid')){
  2415. Toptimizeref.value.getToptimizeAssign(res3);
  2416. console.log('fuz2:');
  2417. }
  2418. if(res2.hasOwnProperty('suid')){
  2419. Doptimizeref.value.getDoptimizeAssign(res2);
  2420. console.log('fuz3:');
  2421. }
  2422. // 根据返回值来设置 activeadf
  2423. if (res1.checked === 1) {
  2424. activeadf.value = '进化优化器';
  2425. } else if (res2.checked === 1) {
  2426. activeadf.value = '代理优化器';
  2427. } else if (res3.checked === 1) {
  2428. activeadf.value = '梯度优化器';
  2429. }
  2430. console.log('Updated activeadf:', activeadf.value);
  2431. }).catch((err) => {
  2432. console.error('请求失败:', err);
  2433. });
  2434. }
  2435. // CST/FFD窗口初始化
  2436. const initcstffds = (nowid) => {
  2437. canshuhuawid.value = nowid;
  2438. const params1 = {
  2439. transCode:'MDO0040',
  2440. pid: pid.value,
  2441. wid: canshuhuawid.value
  2442. }
  2443. const params2 = {
  2444. transCode:'MDO0043',
  2445. pid: pid.value,
  2446. wid: canshuhuawid.value
  2447. }
  2448. Promise.all([
  2449. request(params1),
  2450. request(params2),
  2451. ]).then(([res1, res2]) => {
  2452. console.log('1:', res1.checked);
  2453. console.log('2:', res2.checked);
  2454. if(res1.hasOwnProperty('cstid')){
  2455. Cstref.value.getcstAssign(res1);
  2456. }else if(res2.hasOwnProperty("ffdid")){
  2457. Ffdref.value.getffdsAssign(res2);
  2458. }
  2459. // 根据返回值来设置 activeadf
  2460. if (res1.checked === 1) {
  2461. activeadf.value = 'CST';
  2462. } else if (res2.checked === 1) {
  2463. activeadf.value = 'FFD';
  2464. }
  2465. console.log('Updated activeadf:', activeadf.value);
  2466. }).catch((err) => {
  2467. console.error('请求失败:', err);
  2468. });
  2469. }
  2470. // Xfoil/ADflow窗口初始化
  2471. const intxfoiladflow = (nowid) => {
  2472. qidongyouhuawid.value = nowid;
  2473. const params1 = {
  2474. transCode:'MDO0046',
  2475. pid: pid.value,
  2476. wid: qidongyouhuawid.value
  2477. }
  2478. const params2 = {
  2479. transCode:'MDO0049',
  2480. pid: pid.value,
  2481. wid: qidongyouhuawid.value
  2482. }
  2483. Promise.all([
  2484. request(params1),
  2485. request(params2),
  2486. ]).then(([res1, res2]) => {
  2487. console.log('1:', res1.checked);
  2488. console.log('2:', res2.checked);
  2489. if(res1.hasOwnProperty("xfid")){
  2490. Xfoilref.value.getxfoilAssign(res1);
  2491. }else if(res2.hasOwnProperty("adid")){
  2492. ADflowref.value.getadflowAssign(res2);
  2493. }
  2494. // 根据返回值来设置 activeadf
  2495. if (res1.checked === 1) {
  2496. activeadf.value = 'Xfoil';
  2497. } else if (res2.checked === 1) {
  2498. activeadf.value = 'ADflow';
  2499. }
  2500. console.log('Updated activeadf:', activeadf.value);
  2501. }).catch((err) => {
  2502. console.error('请求失败:', err);
  2503. });
  2504. }
  2505. let pythoneditorshow = ref(false)
  2506. // Python窗口初始化
  2507. const initPython = (nowid) => {
  2508. console.log('Pythonchushihua');
  2509. pythoneditorshow.value = true; // 显示编辑器
  2510. pythonwid.value = nowid;
  2511. const param = {
  2512. transCode: 'MDO0036',
  2513. pid: pid.value,
  2514. wid: pythonwid.value
  2515. };
  2516. request(param).then((res) => {
  2517. console.log('Python:', res);
  2518. // 判断 res.ptython 是否为空,若不为空则赋值
  2519. if (res.ptython) {
  2520. console.log('Python内容:', res.ptython);
  2521. textarea1.value = res.ptython;
  2522. }
  2523. }).catch((err) => {
  2524. console.error('Python内容初始化失败');
  2525. });
  2526. };
  2527. // Python确认按钮提交
  2528. const pythonSubmit = () => {
  2529. console.log('Python确认按钮提交');
  2530. pythoneditorshow.value = false; // 隐藏编辑器
  2531. const param = {
  2532. transCode:'MDO0037',
  2533. pid: pid.value,
  2534. wid: pythonwid.value,
  2535. python: newtextarea1.value,
  2536. }
  2537. request(param).then((res) => {
  2538. ElMessage({
  2539. message: '保存成功',
  2540. type: 'success',
  2541. })
  2542. }).catch((err) => {
  2543. ElMessage.error('保存失败')
  2544. });
  2545. }
  2546. let newtextarea1 = ref(`import os
  2547. import numpy as np
  2548. from surromdao.solver import BaseSolver
  2549. class Branin(BaseSolver):
  2550. def __init__(self, filename=os.path):
  2551. super().__init__(filename)
  2552. def compute(self, xdict):
  2553. x = np.zeros(2)
  2554. # x[0] = xdict['x1']
  2555. # x[1] = xdict['x2']`);
  2556. // python处理编辑器内容变化的方法
  2557. const handleEditorChange = (value) => {
  2558. // console.log('Editor content changed in parent component:', value);
  2559. newtextarea1.value = value;
  2560. };
  2561. let MathFuncxinjian = ref('ture')
  2562. const MathFunctabchange = (val) => {
  2563. // console.log('MathFunctabchange:',val);
  2564. if(val == '1'){
  2565. MathFuncxinjian.value = false;
  2566. }else{
  2567. MathFuncxinjian.value = true;
  2568. }
  2569. }
  2570. // 模块选择
  2571. const clickgeometry = (e, index, key, name) => {
  2572. // console.log(key);
  2573. // console.log('模块选择:',name);
  2574. tabactive.value = name;
  2575. // 逻辑流数据流增加选中
  2576. if(key==='Role10' || key==='Role11'){
  2577. active.value = key;
  2578. }
  2579. dialogbolen();
  2580. }
  2581. const dialogbolen = () => {
  2582. switch (tabactive.value) {
  2583. case "新建任务":
  2584. dialog.value.newdialog = true;
  2585. break;
  2586. case "问题设定":
  2587. dialog.value.setdialog = true;
  2588. break;
  2589. case "优化目标":
  2590. dialog.value.targetdialog = true;
  2591. break;
  2592. case "设计变量":
  2593. dialog.value.design = true;
  2594. break;
  2595. case "约束条件":
  2596. dialog.value.constraint = true;
  2597. break;
  2598. case "外形参数化":
  2599. dialog.value.parameter = true;
  2600. break;
  2601. case "代理模型":
  2602. dialog.value.agency = true;
  2603. break;
  2604. case "加点方法":
  2605. dialog.value.addfun = true;
  2606. break;
  2607. case "优化算法":
  2608. dialog.value.sufun = true;
  2609. break;
  2610. case "终止条件":
  2611. dialog.value.enddialog = true;
  2612. break;
  2613. case "任务管理":
  2614. dialog.value.task = true;
  2615. break;
  2616. case "任务检索":
  2617. dialog.value.guanli = true;
  2618. break;
  2619. case "选择连线颜色":
  2620. showTrigger.value = true;
  2621. break;
  2622. case "逻辑流连线":
  2623. vuefval.value.linestrokeWidth('process');
  2624. break;
  2625. case "数据流连线":
  2626. vuefval.value.linestrokeWidth('data');
  2627. break;
  2628. case "模块组合":
  2629. vuefval.value.bgcolorfunc(colortier.value);
  2630. vuefval.value.onSelection();
  2631. break;
  2632. case "开始":
  2633. // optmonitor1.value.echatinit();
  2634. // processMonitor1ref.value.echatinit();
  2635. // processMonitor1ref.value.echatinit();
  2636. runok();
  2637. break;
  2638. case "列表监控":
  2639. ifjiankong();
  2640. listtableInit();
  2641. break;
  2642. case "曲线监控":
  2643. ifjiankong()
  2644. curveLine();
  2645. break;
  2646. case "过程监控":
  2647. ifjiankong()
  2648. curveLine2();
  2649. curveLine3();
  2650. break;
  2651. case "列表":
  2652. echatsfunc();
  2653. dialog.value.listdialog = true;
  2654. nextTick(() => {
  2655. initListSe();
  2656. });
  2657. break;
  2658. case "面积图":
  2659. echatsfunc();
  2660. // curveLine4();
  2661. break;
  2662. case "饼状图":
  2663. echatsfunc();
  2664. break;
  2665. case "柱状图":
  2666. echatsfunc();
  2667. break;
  2668. case "折线图":
  2669. dialog.value.echartLinedialog = true;
  2670. echatsfunc();
  2671. // curveLine4();
  2672. nextTick(() => {
  2673. initListSe();
  2674. });
  2675. break;
  2676. case "散点图":
  2677. // logsget();
  2678. dialog.value.scatterdialog = true;
  2679. echatsfunc();
  2680. // curveLine4();
  2681. nextTick(() => {
  2682. initListSe();
  2683. });
  2684. break;
  2685. case "横条图":
  2686. echatsfunc();
  2687. break;
  2688. case "雷达图":
  2689. //logsget();
  2690. echatsfunc();
  2691. break;
  2692. case "帕雷托图":
  2693. dialog.value.paretodialog = true;
  2694. echatsfunc();
  2695. break;
  2696. case "云图/等值线":
  2697. dialog.value.clouddialog = true;
  2698. break;
  2699. case "查看报告":
  2700. echatsfunc();
  2701. dialog.value.lookover = true;
  2702. break;
  2703. case "导出报告":
  2704. dialog.value.exportreport = true;
  2705. break;
  2706. default:
  2707. }
  2708. }
  2709. // 可视化清空
  2710. const echartclear = () => {
  2711. arearef.value.echatinit();
  2712. bargraphref.value.echatinit();
  2713. echartLineref.value.echatinit();
  2714. BarChartref.value.echatinit();
  2715. radarref.value.echatinit();
  2716. scatterref.value.echatinit();
  2717. pieref.value.echatinit();
  2718. paretoref.value.echatinit();
  2719. }
  2720. const echatsfunc = () => {
  2721. //echartzongshow.value=true;
  2722. // echartclear();
  2723. switch (tabactive.value) {
  2724. case "列表":
  2725. tablelistshow.value = true;
  2726. areashow.value = false;
  2727. bargraphshow.value = false;
  2728. echartLineshow.value = false;
  2729. BarChartshow.value = false;
  2730. radarshow.value = false;
  2731. scattershow.value = false;
  2732. pieshow = false;
  2733. paretoshow =false;
  2734. break;
  2735. case "面积图":
  2736. tablelistshow.value = false;
  2737. areashow.value = true;
  2738. bargraphshow.value = false;
  2739. echartLineshow.value = false;
  2740. BarChartshow.value = false;
  2741. radarshow.value = false;
  2742. scattershow.value = false;
  2743. pieshow = false;
  2744. paretoshow =false;
  2745. break;
  2746. case "柱状图":
  2747. tablelistshow.value = false;
  2748. areashow.value = false;
  2749. bargraphshow.value = true;
  2750. echartLineshow.value = false;
  2751. BarChartshow.value = false;
  2752. radarshow.value = false;
  2753. scattershow.value = false;
  2754. pieshow = false;
  2755. paretoshow = false;
  2756. break;
  2757. case "饼状图":
  2758. tablelistshow.value = false;
  2759. areashow.value = false;
  2760. bargraphshow.value = false;
  2761. echartLineshow.value = false;
  2762. BarChartshow.value = false;
  2763. radarshow.value = false;
  2764. scattershow.value = false;
  2765. pieshow = true;
  2766. paretoshow = false;
  2767. break;
  2768. case "折线图":
  2769. tablelistshow.value = false;
  2770. areashow.value = false;
  2771. bargraphshow.value = false;
  2772. echartLineshow.value = true;
  2773. BarChartshow.value = false;
  2774. radarshow.value = false;
  2775. scattershow.value = false;
  2776. pieshow = false;
  2777. paretoshow = false;
  2778. break;
  2779. case "散点图":
  2780. tablelistshow.value = false;
  2781. areashow.value = false;
  2782. bargraphshow.value = false;
  2783. echartLineshow.value = false;
  2784. BarChartshow.value = false;
  2785. radarshow.value = false;
  2786. scattershow.value = true;
  2787. pieshow = false;
  2788. paretoshow = false;
  2789. break
  2790. case "横条图":
  2791. tablelistshow.value = false;
  2792. areashow.value = false;
  2793. bargraphshow.value = false;
  2794. echartLineshow.value = false;
  2795. BarChartshow.value = true;
  2796. radarshow.value = false;
  2797. scattershow.value = false;
  2798. pieshow = false;
  2799. paretoshow = false;
  2800. break
  2801. case "雷达图":
  2802. tablelistshow.value = false;
  2803. areashow.value = false;
  2804. bargraphshow.value = false;
  2805. echartLineshow.value = false;
  2806. BarChartshow.value = false;
  2807. radarshow.value = true;
  2808. scattershow.value = false;
  2809. pieshow = false;
  2810. paretoshow = false;
  2811. break
  2812. case "帕雷托图":
  2813. tablelistshow.value = false;
  2814. areashow.value = false;
  2815. bargraphshow.value = false;
  2816. echartLineshow.value = false;
  2817. BarChartshow.value = false;
  2818. radarshow.value = false;
  2819. scattershow.value = false;
  2820. pieshow = false;
  2821. paretoshow = true;
  2822. break
  2823. default:
  2824. tablelistshow.value = false;
  2825. areashow.value = false;
  2826. bargraphshow.value = false;
  2827. echartLineshow.value = false;
  2828. BarChartshow.value = false;
  2829. radarshow.value = false;
  2830. scattershow.value = false;
  2831. pieshow = false;
  2832. paretoshow = false;
  2833. break
  2834. }
  2835. }
  2836. // 可视化结束
  2837. // ||activeName.value=='Three'&&tabactive.value=='开始'
  2838. const ifjiankong = () => {
  2839. if (activeName.value == 'Three' && tabactive.value == '列表监控' || activeName.value == 'Three' && tabactive.value == '开始') {
  2840. jiankong.value = true;
  2841. } else {
  2842. jiankong.value = false;
  2843. }
  2844. if (activeName.value == 'Three' && tabactive.value == '曲线监控' ) {
  2845. echartshow.value = true;
  2846. } else {
  2847. echartshow.value = false;
  2848. }
  2849. if (activeName.value == 'Three' && tabactive.value == '过程监控' ) {
  2850. echartshow2.value = true;
  2851. } else {
  2852. echartshow2.value = false;
  2853. }
  2854. }
  2855. // 求解
  2856. const runok = () => {
  2857. if(echartshow.value){
  2858. optmonitor1.value.echatinit();
  2859. }else if(echartshow2.value){
  2860. processMonitor1ref.value.echatinit();
  2861. processMonitor2ref.value.echatinit();
  2862. }
  2863. const params = {
  2864. transCode: 'MDO0039',
  2865. pid: pid.value,
  2866. }
  2867. request(params)
  2868. .then((res) => {
  2869. logs.value = '';
  2870. arrobj.value = [];
  2871. tabarr.value = [];
  2872. tableDatalieb.value = [];
  2873. tableHeaders.value = [];
  2874. ElMessage({
  2875. message: "开始运行",
  2876. type: 'success',
  2877. })
  2878. })
  2879. .catch((err) => {
  2880. ElMessage.error('运行失败')
  2881. })
  2882. }
  2883. const tableKey = ref(0);
  2884. const listtableInit = () => {
  2885. const params = {
  2886. transCode: 'MDO0021',
  2887. pid: pid.value,
  2888. type: 1,
  2889. }
  2890. request(params)
  2891. .then((res) => {
  2892. tableDatalieb.value = [];
  2893. tableKey.value++;
  2894. if (res.rows && res.rows.length > 0) {
  2895. // 遍历所有返回的条目
  2896. res.rows.forEach((row) => {
  2897. const { vars, vals } = row; // 获取每一行的 vars 和 vals
  2898. // 调用 tablefun 函数更新表格
  2899. tablefun1(vars, vals);
  2900. });
  2901. }
  2902. })
  2903. .catch((err) => {
  2904. ElMessage.error(err.returnMsg)
  2905. })
  2906. }
  2907. /**
  2908. * 解析 vals 数据,将 [ ] 解析成数组,其他数据保持原样
  2909. */
  2910. function parseVals(vals) {
  2911. let result = [];
  2912. let temp = "";
  2913. let inArray = false;
  2914. for (let char of vals) {
  2915. if (char === "[") {
  2916. inArray = true;
  2917. temp += char;
  2918. } else if (char === "]") {
  2919. inArray = false;
  2920. temp += char;
  2921. result.push(JSON.parse(temp.trim())); // 确保去除首尾空格后转换
  2922. temp = "";
  2923. } else if (char === " " && !inArray) {
  2924. if (temp.trim() !== "") { // 避免空字符串被加入
  2925. result.push(temp.trim());
  2926. }
  2927. temp = "";
  2928. } else {
  2929. temp += char;
  2930. }
  2931. }
  2932. if (temp.trim() !== "") {
  2933. result.push(temp.trim());
  2934. }
  2935. return result.filter(item => item !== ""); // 过滤掉空字符串
  2936. }
  2937. //曲线监控
  2938. const curveLine = () => {
  2939. const params = {
  2940. transCode: 'MDO0021',
  2941. pid: pid.value,
  2942. type: 1,
  2943. }
  2944. request(params)
  2945. .then((res) => {
  2946. curvedata.value = JSON.stringify(res.rows);
  2947. // console.log(curvedata.value);
  2948. optmonitor1.value.getshuju(curvedata.value);
  2949. // optmonitor1.value.getsockechart();
  2950. // arearef.value.getsockechart(curvedata.value);
  2951. // bargraphref.value.getsockechart(curvedata.value);
  2952. // echartLineref.value.getsockechart(curvedata.value);
  2953. // BarChartref.value.getsockechart(curvedata.value);
  2954. // radarref.value.getsockechart(curvedata.value);
  2955. // scatterref.value.getsockechart(curvedata.value);
  2956. // pieref.value.getsockechart(curvedata.value);
  2957. // paretoref.value.getsockechart(curvedata.value);
  2958. // optmonitor1.value.getecharts();
  2959. })
  2960. .catch((err) => {
  2961. ElMessage.error(err.returnMsg)
  2962. })
  2963. }
  2964. const curveLine2 = () => {
  2965. const params = {
  2966. transCode: 'MDO0021',
  2967. pid: pid.value,
  2968. type: 2,
  2969. }
  2970. request(params)
  2971. .then((res) => {
  2972. if (res.rows && res.rows.length > 0) {
  2973. curvedata.value = JSON.stringify(res.rows);
  2974. // console.log(curvedata.value);
  2975. processMonitor1ref.value.getshuju(curvedata.value);
  2976. }
  2977. })
  2978. .catch((err) => {
  2979. ElMessage.error(err.returnMsg)
  2980. })
  2981. }
  2982. const curveLine3 = () => {
  2983. const params = {
  2984. transCode: 'MDO0021',
  2985. pid: pid.value,
  2986. type: 3,
  2987. }
  2988. request(params)
  2989. .then((res) => {
  2990. // 检查返回的数据是否为空
  2991. if (res.rows && res.rows.length > 0) {
  2992. curvedata.value = JSON.stringify(res.rows);
  2993. // console.log(curvedata.value);
  2994. processMonitor2ref.value.getshuju(curvedata.value);
  2995. }
  2996. })
  2997. .catch((err) => {
  2998. // 错误处理
  2999. ElMessage.error(err.returnMsg);
  3000. })
  3001. }
  3002. const curveLine4 = () => {
  3003. const params = {
  3004. transCode: 'MDO0021',
  3005. pid: pid.value,
  3006. type: 1,
  3007. }
  3008. request(params)
  3009. .then((res) => {
  3010. // curvedata.value = JSON.stringify(res.rows);
  3011. // console.log('数据形式:',curvedata.value);
  3012. // echartLineref.value.getshuju(curvedata.value);
  3013. // scatterref.value.getshuju(curvedata.value);
  3014. if (res.rows && res.rows.length > 0) {
  3015. // 清空数据
  3016. datatotabledata.value = [];
  3017. datatotableheader.value = [];
  3018. // 遍历返回的所有行数据
  3019. res.rows.forEach((row) => {
  3020. const { vars, vals } = row; // 解析 vars 和 vals
  3021. datatotable(vars, vals);
  3022. });
  3023. }
  3024. console.log("表格数据:", datatotabledata.value);
  3025. console.log("表头数据:", datatotableheader.value);
  3026. })
  3027. .catch((err) => {
  3028. ElMessage.error(err.returnMsg)
  3029. })
  3030. }
  3031. const initListSe = () => {
  3032. emitter.emit('update:datatotableheader', datatotableheader.value);
  3033. emitter.emit('update:datatotabledata', datatotabledata.value);
  3034. }
  3035. let datatotableheader = ref([]);
  3036. let datatotabledata = ref([]);
  3037. // 解析数据到表格
  3038. const datatotable = (vars, vals) => {
  3039. console.log("表格更新");
  3040. // 解析列名,vars 以空格分隔
  3041. let headers = vars.split(" ");
  3042. // 解析 vals 数据
  3043. let values = vals.split(" ");
  3044. // 构造表格数据对象
  3045. let rowData = {};
  3046. let newHeaders = [];
  3047. headers.forEach((key, index) => {
  3048. let val = values[index];
  3049. // 处理数组数据,解析为 JSON 或直接填充
  3050. if (val.startsWith("[") && val.endsWith("]")) {
  3051. try {
  3052. let parsedArray = JSON.parse(val); // 解析数组
  3053. // 解析数组数据并拆分为多个列
  3054. parsedArray.forEach((item, subIndex) => {
  3055. let newKey = `${key}_${subIndex + 1}`; // 生成列名:原列名_1, _2, _3...
  3056. rowData[newKey] = item;
  3057. // 只在第一次时添加新列
  3058. if (
  3059. datatotableheader.value.length === 0 ||
  3060. !datatotableheader.value.some((h) => h.prop === newKey)
  3061. ) {
  3062. newHeaders.push({ label: newKey, prop: newKey });
  3063. }
  3064. });
  3065. } catch (e) {
  3066. rowData[key] = val; // 解析失败,保留原始字符串
  3067. }
  3068. } else {
  3069. rowData[key] = val !== undefined ? val : ""; // 处理数据长度不匹配情况
  3070. // 只在第一次时添加原始列
  3071. if (
  3072. datatotableheader.value.length === 0 ||
  3073. !datatotableheader.value.some((h) => h.prop === key)
  3074. ) {
  3075. newHeaders.push({ label: key, prop: key });
  3076. }
  3077. }
  3078. });
  3079. // 更新表头:防止重复添加
  3080. if (datatotableheader.value.length === 0) {
  3081. datatotableheader.value = newHeaders;
  3082. } else {
  3083. newHeaders.forEach((header) => {
  3084. if (!datatotableheader.value.some((h) => h.prop === header.prop)) {
  3085. datatotableheader.value.push(header);
  3086. }
  3087. });
  3088. }
  3089. // 更新表格数据
  3090. datatotabledata.value.push(rowData);
  3091. };
  3092. let listcbval = ref([]);
  3093. let listcbval2 = ref([]);
  3094. // 选择框值更新
  3095. const handleUpdate = (name, value) => {
  3096. if (name === 'listcbval') {
  3097. listcbval.value = value;
  3098. console.log("listcbval:",listcbval.value);
  3099. } else if (name === 'listcbval2') {
  3100. listcbval2.value = value;
  3101. console.log("listcbval2:",listcbval2.value);
  3102. }
  3103. };
  3104. // 列表,散点,折线图选择数据==>曲线绘制
  3105. const selectshujuto = () => {
  3106. console.log("确认:",tabactive.value);
  3107. if(tabactive.value === '散点图'){
  3108. scatterref.value.selectshuju(listcbval.value,listcbval2.value,datatotableheader.value,datatotabledata.value);
  3109. }else if(tabactive.value === '折线图'){
  3110. echartLineref.value.selectshuju(listcbval.value,listcbval2.value,datatotableheader.value,datatotabledata.value);
  3111. }else if(tabactive.value === '列表'){
  3112. tablelistref.value.selectshuju(listcbval2.value)
  3113. }
  3114. }
  3115. //选择颜色改变线的颜色
  3116. const colorpicker = (e) => {
  3117. console.log("color change:",vuefval.value);
  3118. vuefval.value.changeAllEdgesColor(color1.value);
  3119. }
  3120. //选择颜色改变tuceng的颜色
  3121. const colorpickertier = (e) => {
  3122. //vuefval.value.changeAllEdgesColor(color1.value);
  3123. vuefval.value.bgcolorfunc(colortier.value);
  3124. }
  3125. const deviceSelectChange = () => {
  3126. }
  3127. const handleClose = (done) => {
  3128. console.log(111)
  3129. dialog.value.newdialog = false;
  3130. done();
  3131. };
  3132. const targetclick = () => {
  3133. console.log(tableData.value)
  3134. }
  3135. // 模块组合
  3136. const modelgroup=()=>{
  3137. }
  3138. //新增
  3139. const onAddItem = () => {
  3140. let tablevalnum = Number(tableval.value) > 1 ? Number(tableval.value) : 1
  3141. if (activeIndex2.value == 0) {
  3142. for (let i = 0; i < tablevalnum; i++) {
  3143. designtable.value.push({
  3144. name: `x${i + 1}`,
  3145. upper: null,
  3146. lower: null,
  3147. reference: null,
  3148. remark: ''
  3149. })
  3150. }
  3151. } else if (activeIndex2.value == 1) {
  3152. for (let i = 0; i < tablevalnum; i++) {
  3153. tableData.value.push({
  3154. name: `g${i + 1}`,
  3155. con: -1,
  3156. reference: null,
  3157. upper: 0,
  3158. lower: 0,
  3159. })
  3160. }
  3161. } else if (activeIndex2.value == 2) {
  3162. for (let i = 0; i < tablevalnum; i++) {
  3163. eloptimize.value.push({
  3164. name: `c${i + 1}`,
  3165. optdir: '1',
  3166. weight: 0,
  3167. scaling: 0,
  3168. factor: 0,
  3169. reference: null,
  3170. remark: '',
  3171. })
  3172. }
  3173. }
  3174. }
  3175. const xxclick = (index) => {
  3176. activeIndex.value = index
  3177. if (activeIndex.value == 0) {
  3178. } else if (activeIndex.value == 1) {
  3179. getissue();
  3180. }
  3181. }
  3182. //底部优化问题
  3183. const issueclick = (index) => {
  3184. activeIndex2.value = index;
  3185. if (activeIndex2.value == 0) {
  3186. getissue();
  3187. } else if (activeIndex2.value == 1) {
  3188. getyueshu();
  3189. } else if (activeIndex2.value == 2) {
  3190. getmub();
  3191. }
  3192. }
  3193. //设计变量查询
  3194. const getissue = () => {
  3195. //let childernarr=[];
  3196. const params = {
  3197. transCode: 'MDO0022',
  3198. pid: pid.value,
  3199. }
  3200. request(params)
  3201. .then((res) => {
  3202. if (res.rows.length === 0) {
  3203. } else {
  3204. let item1 = {
  3205. id: "1-1-" + 1,
  3206. label: '设计变量',
  3207. img: q2,
  3208. children: []
  3209. }
  3210. let arr = Sidebarref.value.datatree[0].children[0].children;
  3211. let result = arr.find(element => element.id === item1.id);
  3212. console.log(result);
  3213. if (!result) {
  3214. Sidebarref.value.datatree[0].children[0].children.push(item1);
  3215. }
  3216. let childernarr=Sidebarref.value.datatree[0].children[0].children
  3217. Sidebarref.value.datatree[0].children[0].children.forEach((item,index)=>{
  3218. if(item.label=='设计变量'){
  3219. Sidebarref.value.datatree[0].children[0].children[index].children=[];
  3220. }
  3221. })
  3222. res.rows = res.rows.map((item, index) => {
  3223. item.lower = item.lower ?? 'none'
  3224. item.upper = item.upper ?? 'none'
  3225. item.reference = item.reference ?? 'none'
  3226. item.name = item.name ?? 'none'
  3227. item.remark = item.remark ?? 'none'
  3228. treeitem.value = {
  3229. id: "1-1-1-" + index,
  3230. label: item.name,
  3231. img: f21,
  3232. }
  3233. // console.log(Sidebarref.value.datatree[0].children[0].children[0].children)
  3234. childernarr.forEach((item,index)=>{
  3235. if(item.label=='设计变量'){
  3236. let addnode = Sidebarref.value.datatree[0].children[0].children[index].children.push(treeitem.value);
  3237. }
  3238. })
  3239. return item;
  3240. })
  3241. designtable.value = res.rows;
  3242. }
  3243. })
  3244. .catch((err) => {
  3245. ElMessage.error(err.returnMsg)
  3246. })
  3247. // }
  3248. // })
  3249. }
  3250. //约束条件查询
  3251. const getyueshu = () => {
  3252. const params = {
  3253. transCode: 'MDO0023',
  3254. pid: pid.value,
  3255. }
  3256. request(params)
  3257. .then((res) => {
  3258. if (res.rows.length === 0) {
  3259. } else {
  3260. let item2 = {
  3261. id: "1-2-" + 2,
  3262. label: '约束条件',
  3263. img: f22,
  3264. children: []
  3265. }
  3266. let arr = Sidebarref.value.datatree[0].children[0].children;
  3267. let result = arr.find(element => element.id === item2.id);
  3268. if (!result) {
  3269. Sidebarref.value.datatree[0].children[0].children.push(item2);
  3270. }
  3271. Sidebarref.value.datatree[0].children[0].children.forEach((item, index) => {
  3272. if (item.label == '约束条件') {
  3273. Sidebarref.value.datatree[0].children[0].children[index].children = [];
  3274. }
  3275. });
  3276. let childernarr = Sidebarref.value.datatree[0].children[0].children;
  3277. res.rows = res.rows.map((item, index) => {
  3278. // 确保转换为数字
  3279. item.con = item.con ?? 'none';
  3280. item.reference = item.reference ?? 'none';
  3281. item.upper =item.upper ?? 'none';
  3282. item.lower = item.lower ?? 'none';
  3283. console.log('item:', item);
  3284. treeitem2.value = {
  3285. id: "1-2-2-" + index,
  3286. label: item.name,
  3287. img: f21,
  3288. }
  3289. childernarr.forEach((item, index) => {
  3290. if (item.label == '约束条件') {
  3291. let addnode = Sidebarref.value.datatree[0].children[0].children[index].children.push(treeitem2.value);
  3292. }
  3293. });
  3294. return item;
  3295. });
  3296. tableData.value = res.rows; // 更新表格数据
  3297. }
  3298. })
  3299. .catch((err) => {
  3300. ElMessage.error(err.returnMsg);
  3301. })
  3302. }
  3303. //目标函数查询
  3304. const getmub = () => {
  3305. const params = {
  3306. transCode: 'MDO0024',
  3307. pid: pid.value,
  3308. }
  3309. request(params)
  3310. .then((res) => {
  3311. if (res.rows.length === 0) {
  3312. } else {
  3313. let item2 = {
  3314. id: "1-3-" + 3,
  3315. label: '目标函数',
  3316. img: f41,
  3317. children: []
  3318. }
  3319. let arr = Sidebarref.value.datatree[0].children[0].children;
  3320. let result = arr.find(element => element.id === item2.id);
  3321. if (!result) {
  3322. Sidebarref.value.datatree[0].children[0].children.push(item2);
  3323. }
  3324. Sidebarref.value.datatree[0].children[0].children.forEach((item,index)=>{
  3325. if(item.label=='目标函数'){
  3326. Sidebarref.value.datatree[0].children[0].children[index].children=[];
  3327. }
  3328. })
  3329. let childernarr=Sidebarref.value.datatree[0].children[0].children
  3330. res.rows = res.rows.map((item, index) => {
  3331. item.optdir = item.optdir ?? 'none';
  3332. item.weight = item.weight ?? 'none';
  3333. item.scaling = item.scaling ?? 'none';
  3334. item.factor = item.factor ?? 'none';
  3335. item.reference = item.reference ?? 'none';
  3336. item.remark = item.remark ?? 'none';
  3337. item.name = item.name ?? 'none';
  3338. treeitem3.value = {
  3339. id: "1-3-3-" + index,
  3340. label: item.name,
  3341. img: f21,
  3342. }
  3343. childernarr.forEach((item,index)=>{
  3344. if(item.label=='目标函数'){
  3345. let addnode = Sidebarref.value.datatree[0].children[0].children[index].children.push(treeitem3.value);
  3346. }
  3347. })
  3348. // console.log(11111)
  3349. // let addnode = Sidebarref.value.datatree[0].children[0].children[3].children.push(treeitem3.value);
  3350. return item;
  3351. })
  3352. eloptimize.value = res.rows;
  3353. }
  3354. })
  3355. .catch((err) => {
  3356. ElMessage.error(err.returnMsg)
  3357. })
  3358. }
  3359. //对象数组转化字符串
  3360. const getarr = (name, arrays) => {
  3361. console.log(arrays)
  3362. for (let i = 0; i < arrays.length; i++) {
  3363. let arr = [];
  3364. let att = [];
  3365. for (const key in arrays[i]) {
  3366. if (arrays[i].hasOwnProperty(key)) {
  3367. arr.push(arrays[i][key]);
  3368. }
  3369. }
  3370. for (let j = 0; j < arr.length; j++) {
  3371. if (typeof arr[j] === 'string' && arr[j] == "") {
  3372. console.log(11111)
  3373. arr[j] = " ";
  3374. }
  3375. }
  3376. if (arrays[i].hasOwnProperty('pid') == true) {
  3377. att = arr.slice(1, -1);
  3378. } else {
  3379. att = arr;
  3380. }
  3381. const valuesWithSemiColons = att.join(',');
  3382. name += valuesWithSemiColons + ';';
  3383. }
  3384. console.log('conlist',name)
  3385. return name;
  3386. }
  3387. const convertToStringArray = (result, Data) => {
  3388. console.log('Data:', Data);
  3389. result = Data.map(row => {
  3390. const vid = row.vid || ' ';
  3391. const name = row.name || ' ';
  3392. const upper = row.upper ?? ' ';
  3393. const lower = row.lower ?? ' ';
  3394. const reference = row.reference ?? ' ';
  3395. const remark = row.remark || ' ';
  3396. // 将字段连接为一个以逗号分隔的字符串
  3397. return `${vid},${name},${upper},${lower},${reference},${remark}`;
  3398. }).join(';'); // 每行之间用分号分隔
  3399. return result;
  3400. }
  3401. const convertToStringArray1 = (result, Data) => {
  3402. console.log('Data:', Data);
  3403. result = Data.map(row => {
  3404. const conid = row.conid || ' ';
  3405. const name = row.name || ' ';
  3406. const upper = row.upper ?? ' ';
  3407. const lower = row.lower ?? ' ';
  3408. const reference = row.reference ?? ' ';
  3409. // 将字段连接为一个以逗号分隔的字符串
  3410. return `${conid},${name},${reference},${upper},${lower}`;
  3411. }).join(';'); // 每行之间用分号分隔
  3412. return result;
  3413. }
  3414. const convertToStringArray2 = (result, Data) => {
  3415. console.log('Data:', Data);
  3416. result = Data.map(row => {
  3417. const fid = row.fid || ' ';
  3418. const name = row.name || ' ';
  3419. const optdir = row.optdir ?? ' ';
  3420. const weight = row.weight ?? ' ';
  3421. const reference = row.reference ?? ' ';
  3422. const remark = row.remark || ' ';
  3423. // 将字段连接为一个以逗号分隔的字符串
  3424. return `${fid},${name},${optdir},${weight},${reference},${remark}`;
  3425. }).join(';'); // 每行之间用分号分隔
  3426. return result;
  3427. }
  3428. //保存优化问题
  3429. const onokItem = () => {
  3430. console.log(activeIndex2.value);
  3431. if (activeIndex2.value == 0) {
  3432. svarlist.value = '';
  3433. console.log("designtable:",designtable.value)
  3434. svarlist.value = convertToStringArray(svarlist.value, designtable.value)
  3435. devise();
  3436. } else if (activeIndex2.value == 1) {
  3437. conlist.value = '';
  3438. console.log("tabledata:",tableData.value)
  3439. conlist.value = convertToStringArray1(conlist.value, tableData.value)
  3440. restrain();
  3441. } else if (activeIndex2.value == 2) {
  3442. funlist.value = '';
  3443. console.log("eloptimize:",eloptimize.value)
  3444. funlist.value = convertToStringArray2(funlist.value, eloptimize.value)
  3445. funlistaa();
  3446. }
  3447. }
  3448. //设计变量的添加
  3449. const devise = () => {
  3450. const params = {
  3451. transCode: 'MDO0054',
  3452. pid: pid.value,
  3453. vartr: svarlist.value
  3454. }
  3455. request(params)
  3456. .then((res) => {
  3457. ElMessage({
  3458. message: '设计变量保存成功',
  3459. type: 'success',
  3460. })
  3461. getissue();
  3462. })
  3463. .catch((err) => {
  3464. ElMessage.error('设计变量保存失败')
  3465. })
  3466. }
  3467. //约束的添加restrain
  3468. const restrain = () => {
  3469. const params = {
  3470. transCode: 'MDO0055',
  3471. pid: pid.value,
  3472. vartr: conlist.value
  3473. }
  3474. request(params)
  3475. .then((res) => {
  3476. ElMessage({
  3477. message: '约束条件保存成功',
  3478. type: 'success',
  3479. })
  3480. getyueshu();
  3481. })
  3482. .catch((err) => {
  3483. ElMessage.error('约束条件保存失败')
  3484. })
  3485. }
  3486. //优化目标接口
  3487. const funlistaa = () => {
  3488. const params = {
  3489. transCode: 'MDO0056',
  3490. pid: pid.value,
  3491. vartr: funlist.value
  3492. }
  3493. request(params)
  3494. .then((res) => {
  3495. ElMessage({
  3496. message: '优化目标保存成功',
  3497. type: 'success',
  3498. })
  3499. getmub();
  3500. })
  3501. .catch((err) => {
  3502. ElMessage.error('优化目标保存失败')
  3503. })
  3504. }
  3505. //初始化
  3506. const initialize = () => {
  3507. const params = {
  3508. transCode: 'MDO0011',
  3509. pid: pid.value,
  3510. }
  3511. request(params)
  3512. .then((res) => {
  3513. // ElMessage({
  3514. // message: res.returnMsg,
  3515. // type: 'success',
  3516. // })
  3517. importget();
  3518. })
  3519. .catch((err) => {
  3520. ElMessage.error(err.returnMsg)
  3521. })
  3522. }
  3523. // new输入参数
  3524. const changecheck = (val,row) => {
  3525. console.log(val);
  3526. console.log(row);
  3527. }
  3528. //输入参数查询
  3529. const importget = () => {
  3530. const params = {
  3531. transCode: 'MDO0012',
  3532. pid: pid.value,
  3533. }
  3534. request(params)
  3535. .then((res) => {
  3536. srtable.value = res.rows;
  3537. })
  3538. .catch((err) => {
  3539. ElMessage.error(err.returnMsg)
  3540. })
  3541. }
  3542. //输入保存
  3543. const susave = (index, row) => {
  3544. console.log(row);
  3545. const params = {
  3546. transCode: 'MDO0013',
  3547. pid: pid.value,
  3548. inid: row.inid,
  3549. vid: row.vid,
  3550. enable: row.enable,
  3551. name: row.name,
  3552. v1: row.v1,
  3553. v2: row.v2
  3554. }
  3555. request(params)
  3556. .then((res) => {
  3557. ElMessage({
  3558. message: '保存成功',
  3559. type: 'success',
  3560. })
  3561. })
  3562. .catch((err) => {
  3563. ElMessage.error(err.returnMsg)
  3564. })
  3565. }
  3566. // 输入的删除
  3567. const sudelete = (index, row) => {
  3568. if (row.hasOwnProperty('outid') == false) {
  3569. srtable.value.splice(index, 1)
  3570. } else {
  3571. const params = {
  3572. transCode: 'MDO0014',
  3573. inid: row.inid,
  3574. }
  3575. request(params)
  3576. .then((res) => {
  3577. importget();
  3578. ElMessage({
  3579. message: " 删除成功",
  3580. type: 'success',
  3581. })
  3582. })
  3583. .catch((err) => {
  3584. ElMessage.error(err.returnMsg)
  3585. })
  3586. }
  3587. }
  3588. //输入输出的新建
  3589. const newxfiol = () => {
  3590. if (activeIndex3.value == 0) {
  3591. srtable.value.push({
  3592. name: "",
  3593. v1: '0',
  3594. v2: '0',
  3595. enable: '0'
  3596. })
  3597. } else if (activeIndex3.value == 2) {
  3598. sctable.value.push({
  3599. name: "",
  3600. v1: '',
  3601. v2: '',
  3602. enable: '0'
  3603. })
  3604. }
  3605. }
  3606. // 点击掉查询接口
  3607. const dianjia = (index) => {
  3608. activeIndex3.value = index;
  3609. if (activeIndex3.value == 0) {
  3610. importget()
  3611. } else if (activeIndex3.value == 2) {
  3612. console.log(11111)
  3613. exportget();
  3614. }
  3615. }
  3616. //输出参数查询
  3617. const exportget = () => {
  3618. const params = {
  3619. transCode: 'MDO0015',
  3620. pid: pid.value,
  3621. }
  3622. request(params)
  3623. .then((res) => {
  3624. sctable.value = res.rows;
  3625. })
  3626. .catch((err) => {
  3627. ElMessage.error(err.returnMsg)
  3628. })
  3629. }
  3630. // 输出保存
  3631. const scsave = (index, row) => {
  3632. if (row.hasOwnProperty('fid') == true) {
  3633. fid.value = row.fid;
  3634. }
  3635. if (row.hasOwnProperty('conid') == true) {
  3636. conid.value = row.conid;
  3637. }
  3638. const params = {
  3639. transCode: 'MDO0016',
  3640. pid: pid.value,
  3641. outid: row.outid,
  3642. fid: fid.value,
  3643. conid: conid.value,
  3644. enable: row.enable,
  3645. name: row.name,
  3646. v1: row.v1,
  3647. v2: row.v2
  3648. }
  3649. request(params)
  3650. .then((res) => {
  3651. ElMessage({
  3652. message: '保存成功',
  3653. type: 'success',
  3654. })
  3655. exportget();
  3656. })
  3657. .catch((err) => {
  3658. ElMessage.error(err.returnMsg)
  3659. })
  3660. }
  3661. //输出删除scdelete
  3662. const scdelete = (index, row) => {
  3663. console.log(row);
  3664. if (row.hasOwnProperty('outid') == false) {
  3665. sctable.value.splice(index, 1)
  3666. } else {
  3667. const params = {
  3668. transCode: 'MDO0017',
  3669. outid: row.outid,
  3670. }
  3671. request(params)
  3672. .then((res) => {
  3673. exportget();
  3674. ElMessage({
  3675. message: " 删除成功",
  3676. type: 'success',
  3677. })
  3678. })
  3679. .catch((err) => {
  3680. ElMessage.error(err.returnMsg)
  3681. })
  3682. }
  3683. }
  3684. // 用于实时更新表格数据
  3685. function tablefun(vars, vals) {
  3686. console.log('表格更新');
  3687. // 解析列名,vars 以空格分隔
  3688. let headers = vars.split(" ");
  3689. // 更新表头
  3690. tableHeaders.value = headers.map(item => ({ label: item, prop: item }));
  3691. // 构造表格数据对象
  3692. let rowData = {};
  3693. headers.forEach((key, index) => {
  3694. rowData[key] = vals[index] !== undefined ? vals[index] : ""; // 处理数据长度不匹配情况
  3695. });
  3696. // 更新表格数据
  3697. tableDatalieb.value.push(rowData);
  3698. }
  3699. // 用于更新表格数据
  3700. const tablefun1 = (vars, vals) => {
  3701. console.log('表格更新');
  3702. // 解析列名,vars 以空格分隔
  3703. let headers = vars.split(" ");
  3704. // 更新表头
  3705. tableHeaders.value = headers.map(item => ({ label: item, prop: item }));
  3706. // 解析 vals 为数组(假设 vals 是一个字符串)
  3707. let values = vals.split(" ");
  3708. // 构造表格数据对象
  3709. let rowData = {};
  3710. headers.forEach((key, index) => {
  3711. rowData[key] = values[index] !== undefined ? values[index] : ""; // 处理数据长度不匹配情况
  3712. });
  3713. // 更新表格数据
  3714. tableDatalieb.value.push(rowData);
  3715. };
  3716. //获取日志
  3717. const logsget = () => {
  3718. const params = {
  3719. transCode: 'MDO0025',
  3720. pid: pid.value,
  3721. }
  3722. request(params)
  3723. .then((res) => {
  3724. // 去除空行
  3725. console.log('日志接口赋值')
  3726. logs.value = res.logs.split('\n').filter(line => line.trim() !== '').join('\n');
  3727. const results = extractBracesContent(logs.value);
  3728. for (let i = 0; i < results.length; i++) {
  3729. arrobj.value.push(results[i]);
  3730. let vals = (results[i].vals).split(" ");
  3731. tablefun(vals);
  3732. let echarr = [];
  3733. echarr.push(results[i])
  3734. optmonitor1.value.getsockechart(echarr);
  3735. processMonitor1ref.value.getsockechart(echarr);
  3736. processMonitor2ref.value.getsockechart(echarr);
  3737. // arearef.value.getsockechart(echarr);
  3738. // bargraphref.value.getsockechart(echarr);
  3739. // echartLineref.value.getsockechart(echarr);
  3740. // BarChartref.value.getsockechart(echarr);
  3741. // radarref.value.getsockechart(echarr);
  3742. // scatterref.value.getsockechart(echarr);
  3743. }
  3744. })
  3745. .catch((err) => {
  3746. ElMessage.error(err.returnMsg)
  3747. })
  3748. }
  3749. // 字符串截取
  3750. function extractBracesContent(str) {
  3751. const objectRegex = /\{[^}]+\}/g; // 匹配大括号对象
  3752. const matches = str.match(objectRegex);
  3753. if (!matches) return [];
  3754. return matches.map(match => {
  3755. try {
  3756. return JSON.parse(match);
  3757. } catch (e) {
  3758. console.error('Failed to parse object:', match);
  3759. return null;
  3760. }
  3761. }).filter(Boolean); // 过滤掉解析失败的对象
  3762. }
  3763. function convertToPercentage(number) {
  3764. return (number * 100);
  3765. }
  3766. //websockct的连接
  3767. function initWebSocket() {
  3768. //初始化weosocket
  3769. // const wsuri = "ws://192.168.0.43:8087//websocket?projectId="+this.pid; ws://192.168.0.131/diswebsocket?projectId=5
  3770. // const wsurl = "ws://192.168.108:8188//websocket?projectId=" + pid.value;
  3771. const wsurl = import.meta.env.VITE_WEBSOCKET_URL + pid.value;
  3772. // const wsurl =
  3773. // "ws://" +
  3774. // process.env.VUE_APP_BASE_websokt +
  3775. // "/diswebsocket?projectId=" +'5'
  3776. // aid.value;
  3777. websock = new WebSocket(wsurl);
  3778. websock.onopen = websocketonopen;
  3779. websock.onmessage = websocketonmessage;
  3780. websock.onerror = websocketonerror;
  3781. websock.onclose = websocketclose;
  3782. }
  3783. // Websoket连接成功事件
  3784. const websocketonopen = (res) => {
  3785. console.log("WebSocket连接成功", res);
  3786. console.log()
  3787. start();
  3788. };
  3789. // Websoket接收消息事件
  3790. const websocketonmessage = (res) => {
  3791. // console.log('websocket接受消息:',res.data)
  3792. arrobj.value = [];
  3793. if (res.data.indexOf('{') !== -1) {
  3794. progressshow.value = true;
  3795. console.log('websocket接受消息:',res.data)
  3796. // 解析 WebSocket 接收到的消息数据
  3797. let parsedData = JSON.parse(res.data);
  3798. let step = Number(parsedData.step);
  3799. if(parsedData.type === 1){
  3800. percentage.value = Math.round((step / 30) * 100);
  3801. }
  3802. console.log("进度:", percentage.value);
  3803. echartdata.value = res.data;
  3804. arrobj.value.push(parsedData);
  3805. console.log('tabactive:',tabactive.value)
  3806. if(jiankong.value && parsedData.type === 1){
  3807. console.log('列表监控')
  3808. tablefun1(parsedData.vars, parsedData.vals); // 传递 vars 和 vals 更新表格
  3809. }else if(echartshow.value&&parsedData.type === 1){
  3810. optmonitor1.value.getsockechart(arrobj.value);
  3811. }else if(echartshow2.value&&parsedData.type === 2){
  3812. processMonitor1ref.value.getsockechart(arrobj.value);
  3813. }else if(echartshow2.value&&parsedData.type === 3){
  3814. processMonitor2ref.value.getsockechart(arrobj.value);
  3815. }
  3816. // optmonitor1.value.getsockechart(arrobj.value);
  3817. // processMonitor1ref.getsockechart(arrobj.value);
  3818. // processMonitor2ref.getsockechart(arrobj.value);
  3819. // arearef.value.getsockechart(arrobj.value);
  3820. // bargraphref.value.getsockechart(arrobj.value);
  3821. // echartLineref.value.getsockechart(arrobj.value);
  3822. // BarChartref.value.getsockechart(arrobj.value);
  3823. // radarref.value.getsockechart(arrobj.value);
  3824. // scatterref.value.getsockechart(arrobj.value);
  3825. // pieref.value.getsockechart(arrobj.value);
  3826. // paretoref.value.getsockechart(arrobj.value);
  3827. } else {
  3828. if (res.data.indexOf('——成功') !== -1) {
  3829. const timer = setTimeout(function () {
  3830. progressshow.value = false;
  3831. console.log('关闭定时器')
  3832. }, 10000)
  3833. // console.log(22222)
  3834. // clearTimeout(timer);
  3835. }
  3836. if (res.data.indexOf('msg=heartChec') == -1) {
  3837. // 去除空行
  3838. const cleanedLog = res.data.split('\n').filter(line => line.trim() !== '').join('\n');
  3839. logs.value = logs.value + '\n' + cleanedLog;
  3840. let textarea = document.getElementById("textarea_id");
  3841. textarea.scrollTop = textarea.scrollHeight;
  3842. }
  3843. }
  3844. reset();
  3845. };
  3846. // Websoket连接错误事件
  3847. const websocketonerror = (res) => {
  3848. console.log("连接错误", res);
  3849. websock.close();
  3850. reconnect();
  3851. };
  3852. // Websoket断开事件
  3853. const websocketclose = (res) => {
  3854. console.log("断开连接", res);
  3855. };
  3856. // 创建 websocket 的实例
  3857. // 心跳包
  3858. const reconnect = () => {
  3859. if (times.value.lockReconnect) return;
  3860. times.value.lockReconnect = true;
  3861. //没连接上会一直重连,设置延迟避免请求过多
  3862. times.value.timeoutnum && clearTimeout(times.value.timeoutnum);
  3863. times.value.timeoutnum = setTimeout(function () {
  3864. //新连接
  3865. initWebSocket();
  3866. times.value.lockReconnect = false;
  3867. }, 10000);
  3868. }
  3869. const reset = () => {
  3870. //重置心跳
  3871. clearTimeout(times.value.timeoutObj);
  3872. clearTimeout(times.value.serverTimeoutObj);
  3873. start();
  3874. }
  3875. const start = () => {
  3876. //开启心跳
  3877. times.value.timeoutObj && clearTimeout(times.value.timeoutObj);
  3878. times.value.serverTimeoutObj && clearTimeout(times.value.serverTimeoutObj);
  3879. times.value.timeoutObj = setTimeout(function () {
  3880. //这里发送一个心跳,后端收到后,返回一个心跳消息
  3881. if (websock.readyState == 1) {
  3882. //如果连接正常
  3883. websock.send("heartCheck");
  3884. } else {
  3885. //否则重连
  3886. reconnect();
  3887. }
  3888. times.value.serverTimeoutObj = setTimeout(function () {
  3889. // 超时关闭
  3890. websock.close(); //如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
  3891. }, times.value.timeout);
  3892. }, times.value.timeout);
  3893. }
  3894. // 日志框
  3895. // 日志的文本框
  3896. const footerShows = (evt) => {
  3897. if (evt == "claer") {
  3898. logs.value = "";
  3899. } else {
  3900. footerShow.value = !footerShow.value;
  3901. }
  3902. }
  3903. // watch(() =>echartdata.value, (newValue, oldValue) => {
  3904. // // 这里处理 echartData 变化的逻辑
  3905. // console.log('echartData changed:', newValue);
  3906. // // console.log(optmonitor1.value);
  3907. // });
  3908. // 选项卡
  3909. const selectTab=(index)=>{
  3910. currentTab.value = index;
  3911. }
  3912. const adfhandleClick=(tab,event)=>{
  3913. console.log('表单切换',tab.props.label);
  3914. activeadf.value=tab.props.label;
  3915. if(tab.props.name === '进化优化器'){
  3916. nextTick(() => {
  3917. // 确保 ref 已经初始化
  3918. if (Joptimizeref.value) {
  3919. // 调用 Joptimize 的 getoptimize 方法
  3920. Joptimizeref.value.getoptimize(pid.value,youhuaqiwid.value);
  3921. }
  3922. });
  3923. }else if(tab.props.name === '代理优化器'){
  3924. nextTick(() => {
  3925. // 确保 ref 已经初始化
  3926. if (Doptimizeref.value) {
  3927. Doptimizeref.value.getDoptimize(pid.value,youhuaqiwid.value);
  3928. }
  3929. });
  3930. }else if(tab.props.name === '梯度优化器'){
  3931. nextTick(() => {
  3932. // 确保 ref 已经初始化
  3933. if (Toptimizeref.value) {
  3934. Toptimizeref.value.getToptimize(pid.value,youhuaqiwid.value);
  3935. }
  3936. });
  3937. }
  3938. }
  3939. const getaddsave = (nowid) => {
  3940. if (Joptimizeref.value && typeof Joptimizeref.value.getaddsave === 'function') {
  3941. if(nowid){
  3942. Joptimizeref.value.getaddsave(pid.value,nowid);
  3943. }else{
  3944. Joptimizeref.value.getaddsave(pid.value);
  3945. }
  3946. }
  3947. }
  3948. const getDaddsave = (nowid) => {
  3949. if (Doptimizeref.value && typeof Doptimizeref.value.getaddDsave === 'function') {
  3950. if(nowid){
  3951. Doptimizeref.value.getaddDsave(pid.value,nowid);
  3952. }else{
  3953. Doptimizeref.value.getaddDsave(pid.value);
  3954. }
  3955. }
  3956. }
  3957. const getTaddsave = (nowid) => {
  3958. if (Toptimizeref.value && typeof Toptimizeref.value.getaddTsave === 'function') {
  3959. if(nowid){
  3960. Toptimizeref.value.getaddTsave(pid.value,nowid);
  3961. }else{
  3962. Toptimizeref.value.getaddTsave(pid.value);
  3963. }
  3964. }
  3965. }
  3966. const getSave = (ref) => {
  3967. if (ref == '进化优化器'){
  3968. getaddsave(youhuaqiwid.value);
  3969. }else if(ref == '代理优化器'){
  3970. getDaddsave(youhuaqiwid.value);
  3971. }else if(ref == '梯度优化器'){
  3972. getTaddsave(youhuaqiwid.value);
  3973. }
  3974. }
  3975. // 参数化
  3976. const adfhandleClick2=(tab,event)=>{
  3977. console.log('表单切换',tab.props.label);
  3978. activeadf.value=tab.props.label;
  3979. if(tab.props.name === 'CST'){
  3980. nextTick(() => {
  3981. // 确保 ref 已经初始化
  3982. if (Cstref.value) {
  3983. Cstref.value.getcst(pid.value,canshuhuawid.value);
  3984. }
  3985. });
  3986. }else if(tab.props.name === 'FFD'){
  3987. nextTick(() => {
  3988. // 确保 ref 已经初始化
  3989. if (Ffdref.value) {
  3990. Ffdref.value.getffds(pid.value,canshuhuawid.value);
  3991. }
  3992. });
  3993. }
  3994. }
  3995. // 单独cst保存
  3996. const cstok=(nowid)=>{
  3997. // cstnum.value='';
  3998. if(Cstref.value){
  3999. if(nowid){
  4000. Cstref.value.getcstsave(pid.value,nowid);
  4001. }else{
  4002. Cstref.value.getcstsave(pid.value);
  4003. }
  4004. }
  4005. dialog.value.CSTt = false;
  4006. }
  4007. // 单独ffd保存
  4008. const ffdok=(nowid)=>{
  4009. if(Ffdref.value){
  4010. if(nowid){
  4011. Ffdref.value.getffdsave(pid.value,nowid);
  4012. }else{
  4013. Ffdref.value.getffdsave(pid.value);
  4014. }
  4015. }
  4016. dialog.value.ffdt = false;
  4017. }
  4018. // cstffd保存
  4019. const getCstFfdsave = (activeadf) => {
  4020. if (activeadf == 'CST') {
  4021. cstok(canshuhuawid.value);
  4022. } else if (activeadf == 'FFD') {
  4023. ffdok(canshuhuawid.value);
  4024. }
  4025. }
  4026. const adfhandleClick3=(tab,event)=>{
  4027. console.log('表单切换',tab.props.label);
  4028. activeadf.value=tab.props.label;
  4029. if(tab.props.name === 'Xfoil'){
  4030. nextTick(() => {
  4031. // 确保 ref 已经初始化
  4032. if (Xfoilref.value) {
  4033. Xfoilref.value.getxfoil(pid.value,qidongyouhuawid.value);
  4034. }
  4035. });
  4036. }else if(tab.props.name === 'ADflow'){
  4037. nextTick(() => {
  4038. // 确保 ref 已经初始化
  4039. if (ADflowref.value) {
  4040. ADflowref.value.getadflow(pid.value,qidongyouhuawid.value);
  4041. }
  4042. });
  4043. }
  4044. }
  4045. // xfoil保存
  4046. const xfoilok=(nowid)=>{
  4047. if(Xfoilref.value){
  4048. if(nowid){
  4049. Xfoilref.value.getxfoilsave(pid.value,nowid);
  4050. }else{
  4051. Xfoilref.value.getxfoilsave(pid.value);
  4052. }
  4053. }
  4054. }
  4055. // adflow保存
  4056. const adflowok=(nowid)=>{
  4057. if(ADflowref.value){
  4058. if(nowid){
  4059. ADflowref.value.getadflowsave(pid.value,nowid);
  4060. }else{
  4061. ADflowref.value.getadflowsave(pid.value);
  4062. }
  4063. }
  4064. }
  4065. // 气动优化xfoiladflow保存
  4066. const getXfoilAdflowsave = (activeadf) => {
  4067. if (activeadf == 'Xfoil') {
  4068. xfoilok(qidongyouhuawid.value);
  4069. } else if (activeadf == 'ADflow') {
  4070. adflowok(qidongyouhuawid.value);
  4071. }
  4072. }
  4073. // Fsi保存
  4074. const getfsitosave = () => {
  4075. if (Fsiref.value) {
  4076. Fsiref.value.getfsisave(pid.value);
  4077. }
  4078. }
  4079. const mathfuncxinjian = () => {
  4080. if(MathFuncref.value) {
  4081. MathFuncref.value.mathfuncnew();
  4082. }
  4083. }
  4084. // MathFunc保存
  4085. const getmathfunctosave = () => {
  4086. if (MathFuncref.value) {
  4087. MathFuncref.value.getmathfuncsave(pid.value);
  4088. }
  4089. }
  4090. // TACS保存
  4091. const gettacstosave = () => {
  4092. if (Tacsref.value) {
  4093. Tacsref.value.gettacssave(pid.value);
  4094. }
  4095. }
  4096. // 云图打开二级弹窗
  4097. let seconddialogshow = ref(false)
  4098. let activesd = ref ({
  4099. fileselect:false,
  4100. domain:false,
  4101. cloud:false,
  4102. colorchart:false,
  4103. isoline:false
  4104. })
  4105. let cloudsedtitle = ref('')
  4106. const openSeconddialog = (name) => {
  4107. // 设置 activesd 中的值来控制不同内容的显示
  4108. activesd.value.fileselect = false;
  4109. activesd.value.domain = false;
  4110. activesd.value.cloud = false;
  4111. activesd.value.colorchart = false;
  4112. activesd.value.isoline = false;
  4113. switch (name) {
  4114. case '文件选择':
  4115. activesd.value.fileselect = true;
  4116. cloudsedtitle.value = "文件选择";
  4117. break;
  4118. case '域':
  4119. activesd.value.domain = true;
  4120. cloudsedtitle.value = "域";
  4121. break;
  4122. case '云图':
  4123. activesd.value.cloud = true;
  4124. cloudsedtitle.value = "云图";
  4125. break;
  4126. case '色卡':
  4127. activesd.value.colorchart = true;
  4128. cloudsedtitle.value = "色卡";
  4129. break;
  4130. case '等值线':
  4131. activesd.value.isoline = true;
  4132. cloudsedtitle.value = "等值线";
  4133. break;
  4134. default:
  4135. break;
  4136. }
  4137. seconddialogshow.value = true
  4138. };
  4139. const lbjkheaderCellClassName = ({ columnIndex }) => {
  4140. if( columnIndex === 0 ) return '';
  4141. let dynamicColumnIndex = columnIndex - 1;
  4142. let totalColumns = tableHeaders.value.length;
  4143. let partsize = Math.ceil( totalColumns/3 );
  4144. if( dynamicColumnIndex < partsize ) {
  4145. return 'header-first';
  4146. }else if( dynamicColumnIndex < partsize*2 ) {
  4147. return 'header-second';
  4148. }else {
  4149. return 'header-third';
  4150. }
  4151. }
  4152. </script>
  4153. <style lang="scss" scoped>
  4154. .conter_flex {
  4155. display: flex;
  4156. .ech {
  4157. flex: 1;
  4158. }
  4159. }
  4160. //有子节点 且未展开
  4161. .left_main_content :deep(.el-icon svg) {
  4162. display: block;
  4163. }
  4164. .footerTitle {
  4165. display: flex;
  4166. justify-content: space-between;
  4167. padding: 5px 0px;
  4168. font-size: 20px;
  4169. height: 32px !important;
  4170. z-index: 99;;
  4171. // border-radius: 5px 5px 0px 0px;
  4172. // overflow: hidden;
  4173. border-top: 1px solid #B3B3B3;
  4174. border-bottom: 1px solid #B3B3B3;
  4175. }
  4176. .footerTitle .el-image{
  4177. width:24px;
  4178. }
  4179. .footerTitle div {
  4180. display: flex;
  4181. // justify-content:center ;
  4182. align-items: center;
  4183. font-size: 14px;
  4184. }
  4185. .kongzhit {
  4186. position: absolute;
  4187. bottom: 0;
  4188. width: 100%;
  4189. }
  4190. .footerTitle p {
  4191. margin: 0;
  4192. }
  4193. .footerTitle .span {
  4194. width: 130px;
  4195. height: 32px;
  4196. line-height: 40px;
  4197. padding: 0 10px;
  4198. box-sizing: border-box;
  4199. cursor: default;
  4200. position: relative;
  4201. font-size: 14px;
  4202. color: #333333;
  4203. font-family: 'Microsoft YaHei';
  4204. }
  4205. .footerTitle .span .el-image {
  4206. margin-left: 10px;
  4207. }
  4208. .footerTitle .span span{
  4209. padding-left:10px;
  4210. }
  4211. .footerText .el-textarea__inner {
  4212. width: 100%;
  4213. height: 178px !important;
  4214. border: 0;
  4215. font-size: 12px;
  4216. color: #333;
  4217. padding: 2px;
  4218. box-shadow:none;
  4219. }
  4220. .custom-button{
  4221. color: #333333;
  4222. background-color: #DCEAFF;
  4223. border: 1px solid #2267B1 ;
  4224. }
  4225. //没有子节点
  4226. </style>
  4227. <style>
  4228. .wentsd {
  4229. padding: 0 8px;
  4230. }
  4231. /* .el-treeicon .el-tree-node__expand-icon.is-leaf{
  4232. display: none !important;
  4233. } */
  4234. .custom-text {
  4235. font-family: 'Microsoft YaHei';
  4236. font-size: 16px;
  4237. color: rgba(51, 51, 51, 1);
  4238. /* line-height: 24px; */
  4239. text-align: left;
  4240. font-style: normal;
  4241. text-transform: none;
  4242. padding-left: 8px;
  4243. }
  4244. .el-tree .el-tree-node__children .custom-text {
  4245. font-family: 'Microsoft YaHei';
  4246. font-size: 14px;
  4247. /* 这里设置为20px,你可以根据需求调整大小 */
  4248. color: rgba(51, 51, 51, 0.8);
  4249. }
  4250. /* .el-tree .el-tree-node.is-current>.el-tree-node__content img{
  4251. display: none;
  4252. } */
  4253. .custom-tree {
  4254. overflow: auto;
  4255. }
  4256. .custom-tree1>.el-tree-node>.el-tree-node__content>div img {
  4257. /* display: none; */
  4258. /* 隐藏一级节点复选框 */
  4259. }
  4260. .footerTitle {
  4261. background: #eee;
  4262. border-radius: 0px 0px 0px 0px;
  4263. }
  4264. .footer-tab .el-tabs__item {
  4265. color: #333333;
  4266. }
  4267. .footerTitle .active {
  4268. background-color: #fff;
  4269. border-left:1px solid #B3B3B3;
  4270. border-right:1px solid #B3B3B3;
  4271. /* border-bottom:4px solid #fff; */
  4272. }
  4273. .footerTitle .active::before{
  4274. content: "";
  4275. display: block;
  4276. width: 100%;
  4277. height: 2px;
  4278. background: #2267B1;
  4279. border-radius: 0px 0px 0px 0px;
  4280. top: 0px;
  4281. left:0px;
  4282. position: absolute;
  4283. }
  4284. .footerTitle .active::after{
  4285. content: "";
  4286. display: block;
  4287. width: 100%;
  4288. height:4px;
  4289. background: #fff;
  4290. border-radius: 0px 0px 0px 0px;
  4291. bottom: 0px;
  4292. left:0px;
  4293. position: absolute;
  4294. }
  4295. .youhualog {
  4296. width: 100%;
  4297. height: 195px;
  4298. overflow-y: auto;
  4299. background: #fff;
  4300. }
  4301. .youhualog .active2 {
  4302. color: #2267B1;
  4303. }
  4304. .youhualog ul {
  4305. /* width:482px; */
  4306. display: flex;
  4307. align-items: center;
  4308. }
  4309. .youhualog ul li {
  4310. font-family: 'Microsoft YaHei';
  4311. /* flex: 1; */
  4312. /* border-left: 1px solid #B3B3B3; */
  4313. font-size: 14px;
  4314. height: 32px;
  4315. /* line-height: 40px; */
  4316. width: 120px;
  4317. display: flex;
  4318. /* justify-content: center; */
  4319. align-items: center;
  4320. padding:0 10px;
  4321. cursor: default;
  4322. }
  4323. .youhualog ul li span {
  4324. margin-left: 10px;
  4325. }
  4326. .footer-content {
  4327. /* // padding: 15px 24px; */
  4328. padding: 5px;
  4329. border: 1px solid #B3B3B3;
  4330. /* margin-right: 119px; */
  4331. }
  4332. .footer-add {
  4333. width: 600px;
  4334. }
  4335. .flexend {
  4336. display: flex;
  4337. justify-content: flex-end;
  4338. }
  4339. .dibu {
  4340. margin-top: 5px;
  4341. display: flex;
  4342. justify-content: flex-end;
  4343. height: 35px;
  4344. overflow: hidden;
  4345. }
  4346. .dibu .el-input__wrapper {
  4347. width: 226px;
  4348. }
  4349. .dibu .el-form-item_label {
  4350. color: #333333;
  4351. font-size: 14px;
  4352. font-family: 'Microsoft YaHei';
  4353. }
  4354. .dibu .btncolor {
  4355. margin-top: 2px;
  4356. height: 27px;
  4357. width: 70px;
  4358. background: #FFFFFF;
  4359. box-shadow: 0px 2px 2px 0px #B3B3B3;
  4360. border-radius: 0px 0px 0px 0px;
  4361. border: 1px solid #B3B3B3;
  4362. }
  4363. .classtable .el-table td.el-table__cell div .el-input__wrapper {
  4364. box-shadow: none !important;
  4365. padding: 0;
  4366. }
  4367. .classtable .el-table .el-table__cell {
  4368. padding: 0;
  4369. }
  4370. .gooterpading {
  4371. /* border: 1px solid #2267B1; */
  4372. }
  4373. .classtable .el-table th .cell {
  4374. /* background: #fff; */
  4375. line-height: 31px;
  4376. }
  4377. .classtable .el-table td.el-table__cell, .classtable .el-table th.el-table__cell{
  4378. color: #333333;
  4379. font-size: 14px;
  4380. font-family: 'Microsoft YaHei';
  4381. }
  4382. .footer-content .classtable .el-table td.el-table__cell,.footer-content .classtable .el-table th.el-table__cell {
  4383. color: #333333;
  4384. font-size: 14px;
  4385. font-family: 'Microsoft YaHei';
  4386. }
  4387. .classtable .el-table td.el-table__cell div {
  4388. height: 31px;
  4389. overflow: hidden;
  4390. display: flex;
  4391. align-items: center; /* 垂直居中 */
  4392. justify-content: center; /* 水平居中 */
  4393. }
  4394. .classtable .el-table td.el-table__cell,
  4395. .el-table th.el-table__cell.is-leaf,
  4396. .eldesign {
  4397. /* border: 1px solid #000000; */
  4398. }
  4399. /* .el-color-picker__trigger {
  4400. //display: none;
  4401. } */
  4402. /* 使颜色选择器的触发器可点击,但不显示 */
  4403. .el-color-picker__trigger.is-show-panel {
  4404. display: block;
  4405. }
  4406. .conter_mian {
  4407. padding: 1px;
  4408. }
  4409. .summary-dlg2 .el-dialog__body {
  4410. padding: 0;
  4411. }
  4412. .summary-dlg .el-dialog__wrapper {
  4413. pointer-events: none;
  4414. }
  4415. .summary-dlg .el-dialog {
  4416. pointer-events: auto;
  4417. }
  4418. .summary-dlgPdf .el-dialog__body{
  4419. padding: 5px;
  4420. }
  4421. .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
  4422. background-color: #fff;
  4423. }
  4424. .youhualog1 {
  4425. position: relative;
  4426. }
  4427. .chushij {
  4428. position: absolute;
  4429. right: 13px;
  4430. top: 5px;
  4431. }
  4432. .jindutiao {
  4433. margin: 20px;
  4434. width: 60%;
  4435. padding: 0 0 2px 0px;
  4436. /* background: #9FCDFF; */
  4437. display: flex;
  4438. justify-content: center;
  4439. align-items: center;
  4440. }
  4441. .jindutiao .demo-progress {
  4442. width: 100%;
  4443. }
  4444. .jindutiao .demo-progress .el-progress__text {
  4445. font-size: 13px;
  4446. color: #333333;
  4447. font-family: 'Microsoft YaHei';
  4448. }
  4449. .jindutiao .percentage-value {
  4450. font-size: 13px;
  4451. color: #333333;
  4452. font-family: 'Microsoft YaHei';
  4453. }
  4454. .cstleft{
  4455. width:50%;
  4456. flex: 1;
  4457. }
  4458. .XFpdding{
  4459. /* height: 425px; */
  4460. }
  4461. .dialog_class {
  4462. color: #333333;
  4463. font-size: 16px;
  4464. font-family: 'Microsoft YaHei';
  4465. }
  4466. </style>