home.vue 176 KB

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