12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883 |
- <template>
- <div class="common-layout">
- <el-container>
- <el-header>
- <myheader />
- </el-header>
- <el-main>
- <div class="main_container padding_gg">
- <div class="heder_tabs">
- <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick">
- <!-- 开始 -->
- <el-tab-pane label="首页" name="User">
- <!-- <router-link to="/"> </router-link> -->
- </el-tab-pane>
- <el-tab-pane label="问题设定" name="Role">
- <div class="imgzong Role">
-
- <!-- <div class="listitem lbg_color3 bkcolor3 ">
- <div class="threelist">
- <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist" :key="'Role' + index"
- :class="{ activeOrange: active == 'Role' + index }"
- @click="clickgeometry($event, index, 'Role' + index, item.titlie)">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- </div>
- </div> -->
- <!-- <div class="item2 margr" @click="clickgeometry($event, index, 'Role-' + '2', undmodel)">
- <el-image :src="getImgPath('tow1.png')" fit="cover" />
- <span>{{ f4ce }}</span>
- <el-select v-model="f4ce" class="no-border headersele" :suffix-icon="CaretBottom">
- <el-option v-for="item in optiongroup1" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div> -->
- <div class="listitem lbg_color3 bkcolor3 threelist">
- <div class="item2 margr" @click="clickgeometry($event, index, 'Role-' + '2', undmodel)">
- <el-image :src="getImgPath('tow1.png')" fit="cover" />
- <span>{{ f4ce }}</span>
- <!-- <el-select v-model="f4ce" class="no-border headersele" :suffix-icon="CaretBottom">
- <el-option v-for="item in optiongroup1" :key="item.value" :label="item.label" :value="item.value">
- <div style="display: flex; align-items: center;">
- <img :src="getflowImgPath(item.img)" style="width: 20px; height: 20px; margin-right: 10px;" />
- <span>{{ item.label }}</span>
- </div>
- </el-option>
- </el-select> -->
- <el-dropdown
- trigger="click"
-
- >
- <!-- 下拉触发区域(只显示图标) -->
- <span class="dropdown-trigger">
- <el-icon :size="12" style="width:78px;top:-4px"><arrow-down /></el-icon> <!-- 自定义图标 -->
- </span>
- <!-- 下拉菜单选项 -->
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item
- v-for="item in optiongroup1"
- :key="item.value"
- :command="item.value"
- >
- <div style="display: flex; align-items: center;">
- <img
- :src="getflowImgPath(item.img)"
- style="width: 20px; height: 20px; margin-right: 10px;"
- />
- <span>{{ item.label }}</span>
- </div>
- </el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- </div>
- <div class="item2 margr" @click="clickgeometry($event, index, 'Role-' + '1', modelban)">
- <el-image :src="getImgPath('tow2.png')" fit="cover" />
- <span>{{ modelban }}</span>
- <!-- <el-select v-model="modelban" class="no-border headersele" :suffix-icon="CaretBottom">
- <el-option v-for="item in optiongroup" :key="item.value" :label="item.label" :value="item.value">
- <div style="display: flex; align-items: center;">
- <img :src="getflowImgPath(item.img)" style="width: 20px; height: 20px; margin-right: 10px;" />
- <span>{{ item.label }}</span>
- </div>
- </el-option>
- </el-select> -->
- <el-dropdown
- trigger="click"
-
- >
- <!-- 下拉触发区域(只显示图标) -->
- <span class="dropdown-trigger">
- <el-icon :size="12" style="width:78px;top:-4px"><arrow-down /></el-icon> <!-- 自定义图标 -->
- </span>
- <!-- 下拉菜单选项 -->
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item
- v-for="item in optiongroup"
- :key="item.value"
- :command="item.value"
- >
- <div style="display: flex; align-items: center;">
- <img
- :src="getflowImgPath(item.img)"
- style="width: 20px; height: 20px; margin-right: 10px;"
- />
- <span>{{ item.label }}</span>
- </div>
- </el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- </div>
- <div class="item2 margr" @click="clickgeometry($event, index, 'Role-' + '2', undmodel)">
- <el-image :src="getImgPath('tow3.png')" fit="cover" />
- <span>{{ undmodel }}</span>
- <!-- <el-select v-model="undmodel" class="no-border headersele" :suffix-icon="CaretBottom">
- <el-option v-for="item in options4" :key="item.value" :label="item.label" :value="item.value">
- <div style="display: flex; align-items: center;">
- <img :src="item.icon" style="width: 20px; height: 20px; margin-right: 10px;" />
- <span>{{ item.label }}</span>
- </div>
- </el-option>
- </el-select> -->
- <el-dropdown
- trigger="click"
-
- >
- <!-- 下拉触发区域(只显示图标) -->
- <span class="dropdown-trigger">
- <el-icon :size="12" style="width:78px;top:-4px"><arrow-down /></el-icon> <!-- 自定义图标 -->
- </span>
- <!-- 下拉菜单选项 -->
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item
- v-for="item in options4"
- :key="item.value"
- :command="item.value"
- >
- <div style="display: flex; align-items: center;">
- <img
- :src="item.icon"
- style="width: 20px; height: 20px; margin-right: 10px;"
- />
- <span>{{ item.label }}</span>
- </div>
- </el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- </div>
- </div>
- <!-- -->
- <div class="listitem lbg_color3 bkcolor3 ">
- <div class="threelist">
- <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist1" :key="'Role1' + index"
- :class="{ activeOrange: active == 'Role1' + index }"
- @click="clickgeometry($event, index, 'Role1' + index, item.titlie)">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist11" :key="'Role11' + index"
- :class="{ activeOrange: active == 'Role11' + index }"
- @click="clickgeometry($event, index, 'Role11' + index, item.titlie)">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <el-color-picker v-model="color1" @change="colorpicker()"
- :class="{ 'is-show-panel': showTrigger }" />
- <span>{{ item.titlie }}</span>
- </div>
- </div>
- </div>
- <!-- -->
- <div class="listitem lbg_color3 bkcolor3 ">
- <div class="threelist">
- <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist2" :key="'Role2' + index"
- :class="{ activeOrange: active == 'Role2' + index }"
- @click="clickgeometry($event, index, 'Role2' + index, item.titlie)">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist22" :key="'Role22' + index"
- :class="{ activeOrange: active == 'Role22' + index }"
- @click="clickgeometry($event, index, 'Role22' + index, item.titlie)">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <el-color-picker v-model="colortier" color-format="rgba" show-alpha @change="colorpickertier()"
- :class="{ 'is-show-panel': showTrigger }" />
- <span>{{ item.titlie }}</span>
- </div>
- </div>
- </div>
- <!-- -->
- <div class="listitem lbg_color3 bkcolor3 ">
- <div class="threelist">
- <div class="item2 floatitem wentsd" v-for="(item, index) in Rolelist3" :key="'Role3' + index"
- :class="{ activeOrange: active == 'Role3' + index }"
- @click="clickgeometry($event, index, 'Role3' + index, item.titlie)">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- </div>
- </div>
-
- </div>
- </el-tab-pane>
- <el-tab-pane label="优化运行" name="Three">
- <div class="imgzong">
- <div class="listitem lbg_color3 bkcolor3 threelist">
- <div class="item2 floatitem" v-for="(item, index) in Threelist" :key="'Three-' + index"
- :class="{ activeOrange: active == 'Three-' + index }"
- @click="clickgeometry($event, index, 'Three-' + index, item.titlie)">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- </div>
- <!-- <div class="listitem lbg_color3 bkcolor3" v-for="(item, index) in Threelist1" :key="'Three1-' + index"
- :class="{ activeOrange: active == 'Three1' + index }"
- @click="clickgeometry($event, index, 'Three1' + index,item.titlie )">
- <div class="item2 ">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- </div> -->
- <div class="listitem lbg_color3 bkcolor3 ">
- <div class="threelist">
- <div class="item2 floatitem wentsd1" v-for="(item, index) in Threelist1" :key="'Three1' + index"
- :class="{ activeOrange: active == 'Three1' + index }"
- @click="clickgeometry($event, index, 'Three1' + index, item.titlie)">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane label="可视化" name="Config">
- <div class="imgzong">
- <!-- <button @click="etImgPath()"></button> -->
- <div class="listitem lbg_color3 bkcolor3 threelist" v-for="(item, index) in question" :key="'Config-' + index"
- :class="{ activeOrange: active == 'Config-' + index }"
- @click="clickgeometry($event, index, 'Config-' + index, item.titlie)">
- <div class="item2 ">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane label="数据库管理" name="Seven">
- <div class="imgzong">
- <div class="listitem lbg_color3 bkcolor3 threelist" v-for="(item, index) in Sevenlist" :key="'Seven' + index"
- :class="{ activeOrange: active == 'Seven' + index }"
- @click="clickgeometry($event, index, 'Seven' + index, item.titlie)">
- <div class="item2 ">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane label="帮助" name="eight">
- <div class="imgzong">
- <div class="listitem lbg_color3 bkcolor3 threelist" v-for="(item, index) in eightlist" :key="'eight' + index"
- :class="{ activeOrange: active == 'eight' + index }"
- @click="clickgeometry($event, index, 'eight' + index, item.titlie)">
- <div class="item2 ">
- <el-image :src="getImgPath(item.url)" fit="cover" />
- <span>{{ item.titlie }}</span>
- </div>
- </div>
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- <!-- 新建任务 -->
- <el-dialog v-model="dialog.newdialog" v-if="tabactive == '新建任务'" align-center :modal="false"
- :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
- :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
- class="dialog_class bgcolor tianjia">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('s0.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">新建任务</h4>
- </div>
- </template>
- <div>
- <el-form>
- <el-form-item label="任务编号:" :label-width="formLabelWidth6">
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- </el-form-item>
- <el-form-item label="任务名称:" :label-width="formLabelWidth6">
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- </el-form-item>
- <el-form-item label="任务类型:" :label-width="formLabelWidth6">
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- </el-form-item>
- <el-form-item label="备注:" :label-width="formLabelWidth6">
- <el-input v-model="name" maxlength="18" type="textarea"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- </el-form-item>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.newdialog = false">取消</el-button>
- <el-button type="primary" @click="dialog.newdialog = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 问题设定 -->
- <el-dialog v-model="dialog.setdialog" v-if="tabactive == '问题设定'" align-center :modal="false"
- :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
- :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
- class="dialog_class bgcolor tianjia">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('q0.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">问题设定</h4>
- </div>
- </template>
- <div class="numberinput">
- <el-form>
- <el-form-item label="目标函数个数:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="建立代理模型约束个数:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="不建立代理模型约束个数:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.setdialog = false">取消</el-button>
- <el-button type="primary" @click="dialog.setdialog = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 外形参数化 -->
- <el-dialog v-model="dialog.parameter" v-if="tabactive == 'Task-11'" align-center :modal="false"
- :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
- :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
- class="dialog_class bgcolor tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('t0.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">外形参数化</h4>
- </div>
- </template>
- <div class="numberinput">
- <el-form>
- <el-form-item label="参数化方法:" :label-width="formLabelWidth6">
- <el-select v-model="canshu" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in canshulist" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.parameter = false">取消</el-button>
- <el-button type="primary" @click="dialog.parameter = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 代理模型 -->
- <el-dialog v-model="dialog.agency" v-if="tabactive == '代理模型'" align-center :modal="false"
- :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
- :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
- class="dialog_class bgcolor tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">代理模型</h4>
- </div>
- </template>
- <div class="numberinput">
- <el-form>
- <el-form-item label="代理模型类型:" :label-width="formLabelWidth2">
- <el-select v-model="agval" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in agelist" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="设计空间类型:" :label-width="formLabelWidth2">
- <el-select v-model="agval1" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in agelist1" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="试验设计方法:" :label-width="formLabelWidth2">
- <el-select v-model="agval2" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in agelist2" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="初始样本点数:" :label-width="formLabelWidth2">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.agency = false">取消</el-button>
- <el-button type="primary" @click="dialog.agency = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 终止条件 -->
- <el-dialog v-model="dialog.enddialog" v-if="tabactive == '终止条件 '" align-center :modal="false"
- :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
- :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
- class="dialog_class bgcolor tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('t4.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">终止条件</h4>
- </div>
- </template>
- <div class="numberinput">
- <el-form>
- <el-form-item label="EI最小值:" :label-width="formLabelWidth1">
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- </el-form-item>
- <el-form-item label="目标函数收敛误差:" :label-width="formLabelWidth1">
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- </el-form-item>
- <el-form-item label="优化解收敛精度:" :label-width="formLabelWidth1">
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- </el-form-item>
- <el-form-item label="真实函数约束精度:" :label-width="formLabelWidth1">
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- </el-form-item>
- <el-form-item label="代理模型约束精度:" :label-width="formLabelWidth1">
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- </el-form-item>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.enddialog = false">取消</el-button>
- <el-button type="primary" @click="dialog.enddialog = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 优化算法 -->
- <!-- <el-dialog v-model="dialog.sufun" v-if="tabactive == '优化算法'" align-center :modal="false"
- :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
- :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
- class="dialog_class sel bgcolor tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('Framem.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">优化算法</h4>
- </div>
- </template>
- <div class="numberinput">
- <div>
- <el-form-item label="优化算法" :label-width="formLabelWidth1">
- <el-select v-model="youhua.algorithm" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in yslist" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="种群规模:" :label-width="formLabelWidth1">
- <el-input-number v-model="youhua.popsize" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="进化代数:" :label-width="formLabelWidth1">
- <el-input-number v-model="youhua.epoch" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="交叉概率:" :label-width="formLabelWidth1">
- <el-input-number v-model="youhua.probcrossover" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="变异概率:" :label-width="formLabelWidth1">
- <el-input-number v-model="youhua.probmut" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="交叉算子:" :label-width="formLabelWidth1">
- <el-select v-model="youhua.proboperator" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist2" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="竞赛规模:" :label-width="formLabelWidth1">
- <el-input-number v-model="youhua.probscale" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="保留优选策略:" :label-width="formLabelWidth1">
- <el-select v-model="youhua.strategy" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist3" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="变异算子选择:" :label-width="formLabelWidth1">
- <el-select v-model="youhua.operator" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist4" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="GPU" :label-width="formLabelWidth1">
- <el-select v-model="youhua.gpu" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist8" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </div>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.sufun = false">取消</el-button>
- <el-button type="primary" @click="dialog.sufun = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog> -->
- <!-- 加点方法 -->
- <el-dialog v-model="dialog.addfun" v-if="tabactive == '加点方法'" align-center :modal="false"
- :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
- :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="480"
- class="dialog_class sel bgcolor tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('t3.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">加点方法</h4>
- </div>
- </template>
- <div class="numberinput">
- <el-form>
- <el-form-item label="最大样本点数:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="加点准则:" :label-width="formLabelWidth1">
- <el-select v-model="addval" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="单次迭代新增样本点数:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="约束处理方法:" :label-width="formLabelWidth1">
- <el-select v-model="addval1" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist1" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.addfun = false">取消</el-button>
- <el-button type="primary" @click="dialog.addfun = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 任务管理 -->
- <el-dialog v-model="dialog.task" v-if="tabactive == '任务管理'" align-center :modal="false"
- :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
- :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="800px"
- class="dialog_class bgcolor tianjia">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('s11.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">任务管理</h4>
- </div>
- </template>
- <div>
- <el-table :data="tasktable" stripe style="width: 100%">
- <el-table-column prop="id" label="任务编号" />
- <el-table-column prop="name" label="任务名称" />
- <el-table-column prop="state" label="任务类型" />
- <el-table-column prop="time" label="备注" />
- </el-table>
- <div class="sev_ruwu sev">
- <div class="disflex">
- <el-form-item label="关键字:">
- <el-select v-model="seval4" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in sevlist" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入" />
- <el-button class="btncolor">查询</el-button>
- <el-button class="btncolor">添加</el-button>
- <el-button class="btncolor">删除</el-button>
- <el-button class="btncolor">提交</el-button>
- </div>
- </div>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.task = false">取消</el-button>
- <el-button type="primary" @click="dialog.task = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 任务检索 -->
- <el-dialog v-model="dialog.guanli" v-if="tabactive == '任务检索'" align-center :modal="false"
- :close-on-click-modal="true" :append-to-body="true" draggable :fullscreen="false"
- :modal-append-to-body="false" modal-class="summary-dlg" :before-close="handleClose" width="800px"
- class="dialog_class bgcolor tianjia">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('s11.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">任务检索</h4>
- </div>
- </template>
- <div>
- <div class="sev_ruwu">
- <div class="disflex">
- <el-form-item label="关键字:">
- <el-select v-model="seval4" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in sevlist" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-input v-model="name" maxlength="18"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- placeholder="请输入关键字" />
- <el-checkbox class="magright" label="范围" v-model="checkbox" />
- <el-button class="btncolor">查询</el-button>
- </div>
- </div>
- <el-table :data="tasktable" stripe style="width: 100%">
- <el-table-column prop="id" label="任务编号" />
- <el-table-column prop="name" label="任务名称" />
- <el-table-column prop="state" label="任务类型" />
- <el-table-column prop="time" label="备注" />
- </el-table>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.guanli = false">取消</el-button>
- <el-button type="primary" @click="dialog.guanli = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 优化器 -->
- <el-dialog v-model="dialog.optimizer" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="430" class="dialog_class bgcolor tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">优化器</h4>
- </div>
- </template>
- <div class="numberinput lefttext">
- <el-form>
- <span>代理模型</span>
- <el-form-item label="代理模型类型:" :label-width="formLabelWidth1">
- <el-select v-model="agval" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in agelist" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="设计空间类型:" :label-width="formLabelWidth1">
- <el-select v-model="agval1" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in agelist1" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="试验设计方法:" :label-width="formLabelWidth1">
- <el-select v-model="agval2" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in agelist2" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="初始样本点数:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <span>加点准则</span>
- <el-form-item label="最大样本点数:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="加点准则:" :label-width="formLabelWidth1">
- <el-select v-model="addval" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="单次迭代新增样本点数:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="约束处理方法:" :label-width="formLabelWidth1">
- <el-select v-model="addval1" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist1" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <span>优化算法</span>
- <el-form-item label="优化算法:" :label-width="formLabelWidth1">
- <el-select v-model="ys" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in yslist" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="种群规模:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="最大迭代次数:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="交叉概率:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="变异概率:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="交叉算子:" :label-width="formLabelWidth1">
- <el-select v-model="addval2" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist2" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="竞赛规模:" :label-width="formLabelWidth1">
- <el-input-number v-model="num" :min="1" :max="10" controls-position="right" />
- </el-form-item>
- <el-form-item label="保留优选策略:" :label-width="formLabelWidth1">
- <el-select v-model="addval3" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist3" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="变异算子选择:" :label-width="formLabelWidth1">
- <el-select v-model="addval4" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist4" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="precision:" :label-width="formLabelWidth1">
- <el-select v-model="addval7" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist7" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="GPU" :label-width="formLabelWidth1">
- <el-select v-model="addval8" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in addlist8" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.optimizer = false">取消</el-button>
- <el-button type="primary" @click="dialog.optimizer = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
-
- <!-- Xfiol改版后的 -->
- <el-dialog v-model="dialog.Xfiol" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false"
- modal-class="summary-dlg2 summary-dlg" :before-close="handleClose" width="540"
- class="dialog_class bgcolor tianjia colortext sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('xuek9.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">Xfoil</h4>
- </div>
- </template>
- <Xfoil ref="Xfoilref"/>
- <template #footer>
- <div class="dialog-footer">
- <!-- <el-button type="info" @click="newxfoil">新建 </el-button> -->
- <el-button type="info" @click="dialog.Xfiol = false">取消</el-button>
- <el-button type="primary" @click="xfoilok();dialog.Xfiol = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
-
- <!-- 列表 -->
- <el-dialog v-model="dialog.listdialog" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="537" class="dialog_style sel" style="max-height: 70%;">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <h4 :id="titleId" :class="titleClass">列表</h4>
- </div>
- </template>
- <div>
- <ListSE :isList="true" @update="handleUpdate"/>
- <!-- <el-form>
- <el-form-item label="设计集:" >
- <el-select v-model="listval" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in listoptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="选择要在表中显示的一个或者多个变量和响应" >
- </el-form-item>
- <el-card shadow="hover" style="width: 100%">
- <el-checkbox-group v-model="listcbval">
- <el-checkbox v-for="item in Listcheckbox" :key="item.value" :label="item.value" style="display: block">{{ item.label }}</el-checkbox>
- </el-checkbox-group>
- </el-card>
- </el-form> -->
- </div>
- <template #footer>
- <div class="dialog-footer">
-
- <el-button @click="dialog.listdialog = false">取消</el-button>
- <el-button type="primary" @click="selectshujuto();dialog.listdialog = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 散点图 -->
- <el-dialog v-model="dialog.scatterdialog" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="500" class="dialog_style bgcolor tianjia sel" style="max-height: 70%;">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <h4 :id="titleId" :class="titleClass">散点图</h4>
- </div>
- </template>
- <div>
- <ListSE :isList="false" @update="handleUpdate"/>
- </div>
- <template #footer>
- <div class="dialog-footer">
-
- <el-button @click="dialog.scatterdialog = false">取消</el-button>
- <el-button type="primary" @click="selectshujuto();dialog.scatterdialog = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 折线图 -->
- <el-dialog v-model="dialog.echartLinedialog" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="500" class="dialog_style bgcolor tianjia sel" style="max-height: 70%;">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <h4 :id="titleId" :class="titleClass">折线图</h4>
- </div>
- </template>
- <div>
- <ListSE :isList="false" @update="handleUpdate"/>
- </div>
- <template #footer>
- <div class="dialog-footer">
-
- <el-button @click="dialog.echartLinedialog = false">取消</el-button>
- <el-button type="primary" @click="selectshujuto();dialog.echartLinedialog = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 帕雷托图 -->
- <el-dialog v-model="dialog.paretodialog" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="500" class="dialog_style bgcolor tianjia sel" style="max-height: 70%;">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <h4 :id="titleId" :class="titleClass">帕雷托图</h4>
- </div>
- </template>
- <div>
- <el-form>
- <el-form-item label="选择在X轴显示的一个变量和响应" >
- </el-form-item>
- <el-card>
- <el-checkbox-group v-model="paretocbval">
- <el-checkbox v-for="item in paretocheckbox" :key="item.value" :label="item.value" style="display: block">{{ item.label }}</el-checkbox>
- </el-checkbox-group>
- </el-card>
- <el-form-item label="选择在Y轴显示的一个变量和响应" >
- </el-form-item>
- <el-card shadow="hover" style="width: 100%">
- <el-checkbox-group v-model="paretocbval">
- <el-checkbox v-for="item in paretocheckbox" :key="item.value" :label="item.value" style="display: block">{{ item.label }}</el-checkbox>
- </el-checkbox-group>
- </el-card>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
-
- <el-button @click="dialog.paretodialog = false">取消</el-button>
- <el-button type="primary" @click="dialog.paretodialog = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 云图/等值线图 -->
- <cloundCharts
- v-model="dialog.clouddialog"
- />
- <el-dialog v-model="dialog.paretodialog" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="700" class="dialog_style bgcolor tianjia sel cloudChart" style="height: 500px;overflow: auto;">
- <template #header>
- <div class="my-header ">
- <h4 :id="titleId" :class="titleClass">云图/等值线显示</h4>
- </div>
- </template>
- <div>
- <div class="cloudbox">
- <el-row gutter="20">
- <el-col :span="2"></el-col>
- <el-col v-for="(item,index) in cloudbtnbox" :key="index" :span="4">
- <el-button style="width: 100%;" @click="openSeconddialog(item.btnname)">
- <el-image :src="getImgPath(item.url)" alt="img" fit="cover" style="width: 20px;margin-right: 4px;" />
- {{ item.btnname }}
- </el-button>
- </el-col>
- </el-row>
- </div>
- <div style="height: 400px;overflow: auto;">
- <cloudChart/>
- </div>
-
- </div>
- </el-dialog>
- <!-- 云图二级弹窗 -->
- <el-dialog v-model="seconddialogshow"
- align-center
- :modal="false"
- :close-on-click-modal="false"
- :append-to-body="true"
- draggable
- :fullscreen="false"
- :modal-append-to-body="false"
- modal-class="summary-dlg"
- :before-close="handleClose"
- width="500"
- class="dialog_class bgcolor tianjia "
-
- >
- <template #header="{ titleId, titleClass }">
- <div class="my-header">
- <h4 :id="titleId" :class="titleClass">{{ cloudsedtitle }}</h4>
- </div>
- </template>
- <cloudsecond :activesd="activesd"/>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="seconddialogshow = false">取消</el-button>
- <el-button type="primary" @click="seconddialogshow = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 查看报告 -->
- <el-dialog v-model="dialog.lookover" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlgPdf"
- :before-close="handleClose" width="580px" height="800px">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('k8.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">查看报告:</h4>
- </div>
- </template>
- <pdfReportView/>
- <!-- <div class="numberinput lefttext">
- <el-form>
- <el-image :src="getImgPath('baog.png')" fit="contain"></el-image>
- </el-form>
- </div> -->
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.lookover = false">取消</el-button>
- <el-button type="primary" @click="dialog.lookover = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 导出报告 -->
- <el-dialog v-model="dialog.exportreport" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="600" class="dialog_class bgcolor tianjia sel" style="max-height: 70%;">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <h4 :id="titleId" :class="titleClass">导出报告:</h4>
- </div>
- </template>
- <Exreport />
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.exportreport = false">取消</el-button>
- <el-button type="primary" @click="dialog.exportreport = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 气动分析Xfoil、ADflow -->
- <el-dialog v-model="dialog.XfAD" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="700" class="dialog_class bgcolor tianjia sel colortext">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">气动分析</h4>
- </div>
- </template>
- <div class="numberinput lefttext ">
- <el-form>
- <el-tabs tab-position="left" class="demo-tabs" v-model="activeadf" @tab-click="adfhandleClick3">
- <el-tab-pane label="Xfoil" name="Xfoil">
- <Xfoil ref="Xfoilref"/>
- </el-tab-pane>
- <!-- ADflow -->
- <el-tab-pane label="ADflow" name="ADflow">
- <ADflow ref="ADflowref"/>
- </el-tab-pane>
- </el-tabs>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.XfAD = false">取消</el-button>
- <el-button type="primary" @click="getXfoilAdflowsave(activeadf);dialog.XfAD = false;">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- CST -->
- <el-dialog v-model="dialog.CSTt" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="730" class="dialog_class bgcolor colortext tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">CST</h4>
- </div>
- </template>
- <csts ref="Cstref"/>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.CSTt = false">取消</el-button>
- <el-button type="primary" @click="cstok()">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- FFD -->
- <el-dialog v-model="dialog.ffdt" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="730" class="dialog_class bgcolor colortext tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <el-image :src="getImgPath('ffd.png')" fit="contain"></el-image>
- <h4 :id="titleId" :class="titleClass">FFD</h4>
- </div>
- </template>
- <ffds ref="Ffdref"/>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.ffdt = false">取消</el-button>
- <el-button type="primary" @click="ffdok()">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 气动分析CST、FFD -->
- <el-dialog v-model="dialog.cstffd" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="900" class="dialog_class bgcolor tianjia sel colortext">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <h4 :id="titleId" :class="titleClass">参数化</h4>
- </div>
- </template>
- <div class="numberinput lefttext ">
- <el-form>
- <!-- CST -->
- <el-tabs tab-position="left" class="demo-tabs" v-model="activeadf" @tab-click="adfhandleClick2">
- <el-tab-pane label="CST" name="CST">
- <csts ref="Cstref"/>
- </el-tab-pane>
- <!-- FFD -->
- <el-tab-pane label="FFD" name="FFD">
- <ffds ref="Ffdref"/>
- </el-tab-pane>
- </el-tabs>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.cstffd = false">取消</el-button>
- <el-button type="primary" @click="getCstFfdsave(activeadf);dialog.cstffd = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- TACS -->
- <el-dialog v-model="dialog.Taxs" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="700" class="dialog_class bgcolor tianjia sel colortext ">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">TACS</h4>
- </div>
- </template>
- <TACS ref="Tacsref" />
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.Taxs = false">取消</el-button>
- <el-button type="primary" @click="gettacstosave();dialog.Taxs = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 优化器 -->
- <el-dialog v-model="dialog.optgroup" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="700" class="dialog_class bgcolor tianjia sel colortext">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <h4 :id="titleId" :class="titleClass">优化器</h4>
- </div>
- </template>
- <div class="numberinput lefttext ">
- <el-form>
- <el-tabs tab-position="left" class="demo-tabs" v-model="activeadf" @tab-click="adfhandleClick">
- <!-- 代理优化器 -->
- <el-tab-pane label="代理优化器" name="代理优化器">
- <Doptimize ref='Doptimizeref'/>
- </el-tab-pane>
- <!-- 进步优化器 -->
- <el-tab-pane label="进化优化器" name="进化优化器">
- <Joptimize ref='Joptimizeref'/>
- </el-tab-pane>
- <!-- 梯度优化器 -->
- <el-tab-pane label="梯度优化器" name="梯度优化器">
- <Toptimize ref='Toptimizeref'/>
- </el-tab-pane>
- </el-tabs>
- </el-form>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.optgroup = false">取消</el-button>
- <el-button type="primary" @click="getSave(activeadf);dialog.optgroup = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 单独的进步优化器 -->
- <el-dialog v-model="dialog.jboptimizer" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="430" class="dialog_class bgcolor tianjia sel colortext">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">优化算法:</h4>
- </div>
- </template>
- <Joptimize ref='Joptimizeref'/>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.jboptimizer = false">取消</el-button>
- <el-button type="primary" @click="getaddsave(); dialog.jboptimizer = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 单独的代理优化器 -->
- <el-dialog v-model="dialog.dboptimizer" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="530" class="dialog_class bgcolor tianjia sel colortext">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">代理优化器</h4>
- </div>
- </template>
- <Doptimize ref="Doptimizeref"/>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.dboptimizer = false">取消</el-button>
- <el-button type="primary" @click="getDaddsave(); dialog.dboptimizer = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 单独的梯度优化器 -->
- <el-dialog v-model="dialog.tboptimizer" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="430" class="dialog_class bgcolor tianjia sel colortext">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">梯度优化器:</h4>
- </div>
- </template>
- <Toptimize ref="Toptimizeref"/>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.tboptimizer = false">取消</el-button>
- <el-button type="primary" @click="getTaddsave(); dialog.tboptimizer = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 单独的ADflow -->
- <el-dialog v-model="dialog.isADflow" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="540" class="dialog_class bgcolor tianjia sel colortext">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('t2.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">ADflow</h4>
- </div>
- </template>
- <ADflow ref="ADflowref"/>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.isADflow = false">取消</el-button>
- <el-button type="primary" @click=" adflowok();dialog.isADflow = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- Python -->
- <el-dialog v-model="dialog.Pythonshow" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="700" class="dialog_class bgcolor colortext tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">Python</h4>
- </div>
- </template>
- <div class="footerp" style="height:525px;padding:15px">
- <div>
- <!-- <el-input
- v-model="textarea1"
-
- style="width: 100%"
- :autosize="{ minRows: 2, maxRows: 4 }"
- type="textarea"
- placeholder="Please input"
- /> -->
- <PythonEdit v-show="pythoneditorshow" v-model:value="textarea1" language="python" @change="handleEditorChange"/>
- </div>
- <div class="pythfoter">
- <div class="span active" >
- <el-image :src="xin" style="width: 25px;height: 25px;margin-right: 5px;"></el-image>
- <span>信息栏 </span>
- </div>
- <el-input
- v-model="textarea2"
- style="width: 100%"
- :autosize="{ minRows: 2, maxRows: 4 }"
- type="textarea"
- placeholder=""
- />
- </div>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.Pythonshow = false">检查</el-button>
- <el-button type="primary" @click="pythonSubmit(); dialog.Pythonshow = false">
- 保存
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- MathFunc -->
- <el-dialog v-model="dialog.MathFuncdialog" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="500" class="dialog_class bgcolor colortext tianjia sel">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">MathFunc</h4>
- </div>
- </template>
- <MathFunc ref="MathFuncref" @selectTab="MathFunctabchange"/>
- <template #footer>
- <div style="display: flex;justify-content: space-between;">
- <div>
- <el-button v-show="MathFuncxinjian" @click="mathfuncxinjian()">新建</el-button>
- </div>
- <div class="dialog-footer">
- <el-button @click="dialog.MathFuncdialog = false">取消</el-button>
- <el-button type="primary" @click="getmathfunctosave(); dialog.MathFuncdialog = false">
- 确定
- </el-button>
- </div>
- </div>
-
- </template>
- </el-dialog>
- <!-- FSI -->
- <el-dialog v-model="dialog.fsidialog" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="570" class="dialog_class bgcolor tianjia sel colortext">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">FUN to FEM</h4>
- </div>
- </template>
- <FSI ref="Fsiref"/>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.fsidialog = false">取消</el-button>
- <el-button type="primary" @click="getfsitosave();dialog.fsidialog = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- Flight -->
- <el-dialog v-model="dialog.flightdialog" align-center :modal="false" :close-on-click-modal="false"
- :append-to-body="true" draggable :fullscreen="false" :modal-append-to-body="false" modal-class="summary-dlg"
- :before-close="handleClose" width="630" class="dialog_class bgcolor tianjia sel colortext">
- <template #header="{ titleId, titleClass }">
- <div class="my-header ">
- <!-- <el-image :src="getImgPath('xuek0.png')" fit="contain"></el-image> -->
- <h4 :id="titleId" :class="titleClass">Flight</h4>
- </div>
- </template>
- <Flight ref="Flightref"/>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialog.flightdialog = false">取消</el-button>
- <el-button type="primary" @click=" dialog.flightdialog = false">
- 确定
- </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 内容区 -->
- <div class="main mianflex">
- <!--left菜单栏 -->
- <Sidebar ref="Sidebarref" />
- <!-- 放图形 -->
- <div class="right_container">
- <div class="main_model">
- <div class="jindutiao" v-show="progressshow">
- <!-- 进度条 -->
- <span style="width: 150px;">运行进度</span>
- <!-- <el-progress :text-inside="true" :stroke-width="26" :percentage="70" /> -->
- <div class="demo-progress">
- <el-progress :percentage="percentage" :color="customColor">
- <!-- <template #default="{ percentage }">
- <span class="percentage-value">当前进度:{{ percentage }}%</span>
- </template> -->
- </el-progress>
- <!-- <button @click="tbn">点我</button> -->
- </div>
- </div>
- <div class="main_model" v-show='flowshow'>
- <vuefindex ref="vuefval" @optimizerfalse="optimizerfalse($event)"></vuefindex>
- </div>
- <div class="maxh221">
- <!-- 中间部分 -->
- <!-- 列表监控 -->
- <div class="conter_mian classtable " v-show="jiankong" style="width:100%; height: 100%;">
- <el-table :data="tableDatalieb"
- border
- style=" overflow: auto; height: 100%;"
- :header-cell-class-name="lbjkheaderCellClassName"
- :key="tableKey"
- >
- <el-table-column type="index" label="编号" width="100"></el-table-column>
- <el-table-column v-for="(header, index) in tableHeaders" :key="index" :prop="header.prop" show-overflow-tooltip
- :label="header.label" >
- </el-table-column>
- </el-table>
- </div>
- <!-- 曲线监控 -->
- <div class="conter_mian classtable " v-if="echartshow" style="width:100%; height: 100%;">
- <!-- <el-form-item label="" >
- <el-select v-model="quval" :suffix-icon="CaretBottom" placeholder="请选择">
- <el-option v-for="item in quxian" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item> -->
- <optmonitor ref="optmonitor1" :echartdata="echartdata" :selval="quval" :curvedata="curvedata" />
- </div>
- <!-- 过程监控 -->
- <div class="conter_mian classtable conter_flex" v-if="echartshow2" style="width:100%; height: 100%;">
- <div class="echart_left ech">
- <processMonitor1 ref="processMonitor1ref" :echartdata="echartdata" :selval="quval" :curvedata="curvedata"/>
- </div>
- <div class="echart_right ech">
- <processMonitor2 ref="processMonitor2ref" :echartdata="echartdata" :selval="quval" :curvedata="curvedata"/>
- </div>
- </div>
- <!-- 可视化开始 -->
- <div class="conter_mian classtable echartcont" v-show="echartzongshow">
- <tablelist ref="tablelistref" v-show="tablelistshow" :tablelistshow="tablelistshow"
- :tabledataliebiao="datatotabledata" :tableHeaders="datatotableheader"/>
- <echartarea ref="arearef" v-show="areashow" :areashow="areashow"/>
- <bargraph ref="bargraphref" v-show="bargraphshow" :bargraphshow="bargraphshow"/>
- <echartLine ref="echartLineref" v-show="echartLineshow" :echartLineshow="echartLineshow"/>
- <BarChart ref="BarChartref" v-show="BarChartshow" :BarChartshow="BarChartshow"/>
- <scatter ref="scatterref" v-show="scattershow" :scattershow="scattershow"/>
- <radar ref="radarref" v-show="radarshow" :radarshow="radarshow"/>
- <pie ref="pieref" v-show="pieshow" :pieshow="pieshow" />
- <pareto ref="paretoref" v-show="paretoshow" :paretoshow="paretoshow" />
- </div>
- <!-- 可视化结束 -->
- <!-- 右侧边栏开始 -->
- <!-- 结束 -->
- </div>
- <el-footer class="femFooter">
- <div class="gooterpading">
- <div class="footerTitle el-tag--primary">
- <div>
- <div class="span" v-for="(tab, index) in tabs" :key="index" :class="{ 'active': activeIndex === index }"
- @click="xxclick(index)">
- <el-image :src="tab.img" fit="contain"></el-image>
- <span>{{ tab.name }} </span></div>
- </div>
- <div>
- <!-- <li
- class="exloadbox"
- v-show="elodingfalse"
- >
- <span>正在求解中</span>
- <i class="el-icon-loading"></i>
- </li> -->
- <!-- <li>
- <span >清空</span>
- </li> -->
- <li>
- <span @click="footerShows('foot')">▲▼</span>
- </li>
- </div>
- </div>
- <div v-if="footerShow">
- <div class="footerTextBox" v-if="activeIndex == 0">
- <el-input class="footerText" type="textarea" id="textarea_id" v-model="logs"></el-input>
- </div>
- <div class="youhualog" v-if="activeIndex == 1">
- <ul>
- <template v-for="(tab, index) in listli" :key="index">
- <el-divider v-if="index !== 0" direction="vertical" class="custom-divider"></el-divider>
- <li @click="issueclick(index)" :class="{ 'active2': activeIndex2 === index }">
- <el-image v-if="activeIndex2 === index" :src="tab.isimg" fit="contain"></el-image>
- <el-image v-else :src="tab.noimg" fit="contain"></el-image>
- <span>{{ tab.name }}</span>
- </li>
- </template>
- </ul>
- <div class="footer-content">
- <div class="eldesign classtable" v-if="activeIndex2 == 0">
- <el-table :data="designtable" border style="width: 100%" height="100">
- <el-table-column type="index" label="编号" width="70" />
- <el-table-column prop="name" label="变量名称">
- <template #default="{ row }">
- <el-input v-model="row.name" @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <el-table-column prop="upper" label="上限值">
- <template #default="{ row }">
- <el-input type="text" v-model="row.upper"
- @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <el-table-column prop="lower" label="下限值">
- <template #default="{ row }">
- <el-input v-model="row.lower"
- @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <el-table-column prop="reference" label="基准值" >
- <template #default="{ row }">
- <el-input v-model="row.reference"
- @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <el-table-column prop="remark" label="说明">
- <template #default="{ row }">
- <el-input v-model="row.remark" @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <!-- <el-table-column label="操作" width="140">
- <template #default="scope">
- <el-button size="small" type="danger"
- @click.stop="sjdelete(scope.$index, scope.row)">删除</el-button>
- </template>
- </el-table-column> -->
- </el-table>
- </div>
- <div class="elconstraint classtable" v-if="activeIndex2 == 1">
- <el-table :data="tableData" border style="width: 100%" height="100">
- <el-table-column type="index" label="编号" width="100" />
- <el-table-column prop="name" label="约束名称">
- <template #default="{ row }">
- <el-input v-model="row.name" @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <!-- <el-table-column prop="con" label="约束关系">
- <template v-slot="scope">
- <el-select class="no-border " v-model.number="scope.row.con" :suffix-icon="CaretBottom"
- placeholder="请选择">
- <el-option v-for="item in options3" :key="item.value" :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </template>
- </el-table-column> -->
- <el-table-column prop="reference" label="约束基准值">
- <template #default="{ row }">
- <el-input v-model="row.reference"
- @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <el-table-column prop="upper" label="上限值">
- <template #default="{ row }">
- <el-input v-model="row.upper"
- @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <el-table-column prop="lower" label="下限值">
- <template #default="{ row }">
- <el-input v-model="row.lower"
- @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <!-- <el-table-column label="操作" width="140">
- <template #default="scope">
- <el-button size="small" type="danger"
- @click.stop="ysdelete(scope.$index, scope.row)">删除</el-button>
- </template>
- </el-table-column> -->
- </el-table>
- </div>
- <div class="eloptimize classtable" v-if="activeIndex2 == 2">
- <el-table :data="eloptimize" border style="width: 100%" height="100">
- <el-table-column type="index" label="编号" width="70" />
-
- <el-table-column prop="name" label="目标名称">
- <template #default="{ row }">
- <el-input v-model="row.name" />
- </template>
- </el-table-column>
- <el-table-column prop="optdir" label="优化方向">
- <template v-slot="scope">
- <el-select class="no-border " v-model="scope.row.optdir" :suffix-icon="CaretBottom"
- placeholder="请选择">
- <el-option v-for="item in options1" :key="item.value" :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="weight" label="权重系数">
- <template #default="{ row }">
- <el-input v-model="row.weight"
- @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <!-- <el-table-column prop="scaling" label="数据缩放">
- <template v-slot="scope">
- <el-checkbox :false-label="0" :true-label="1" v-model="scope.row.scaling" />
- </template>
- </el-table-column>
- <el-table-column prop="factor" label="缩放因子">
- <template #default="{ row }">
- <el-input v-model.number="row.factor" oninput="value=value.replace(/^|[^0-9]/g,'')"
- @change="handleEdit(row)" />
- </template>
- </el-table-column> -->
- <el-table-column prop="reference" label="约束基准值">
- <template #default="{ row }">
- <el-input v-model="row.reference"
- @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <el-table-column prop="remark" label="说明">
- <template #default="{ row }">
- <el-input v-model="row.remark" @change="handleEdit(row)" />
- </template>
- </el-table-column>
- <!-- <el-table-column label="操作" width="140">
- <template #default="scope">
- <el-button size="small" type="danger"
- @click.stop="mbdelete(scope.$index, scope.row)">删除</el-button>
- </template>
- </el-table-column> -->
- </el-table>
- </div>
- </div>
- <div class="dibu">
- <div class="footer-add">
- <div class="sev_ruwu">
- <div class="disflex flexend">
- <el-form-item label="新增变量数:" v-if="activeIndex2 === 0">
- <el-input v-model="tableval" maxlength="6"
- oninput="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,'')" class="w-50 m-2"
- />
- </el-form-item>
- <el-button class="btncolor" v-if="activeIndex2 === 0">导入</el-button>
- <el-button class="btncolor" @click="onAddItem">新建</el-button>
- <el-button class="btncolor" @click="onokItem">确定</el-button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="pading_foter">
- </div>
- </div>
- </el-footer>
- </div>
- </div>
- </div>
- </div>
- </el-main>
- </el-container>
- </div>
- </template>
- <script setup>
- import { ref, onMounted, reactive, provide, nextTick } from "vue";
- import { RouterView, RouterLink, useRouter, useRoute } from "vue-router"
- import myheader from "@/components/header.vue"
- import { request, uploadFile } from "@/utils/request";
- import { ElMessage, ElButton, ElDialog, ElSelect } from 'element-plus'
- import { Edit, CaretBottom } from '@element-plus/icons-vue'
- // import '@/utils/flexible'
- import { ArrowDown } from '@element-plus/icons-vue';
- import s0 from "@/assets/img/s0.png"
- import gc1 from "@/assets/img/gc1.png"
- import gc2 from "@/assets/img/gc2.png"
- import gc3 from "@/assets/img/gc3.png"
- import wen from "@/assets/img/wen.png"
- import q2 from "@/assets/img/q2.png"
- import f21 from "@/assets/img/f21.png"
- import f22 from "@/assets/img/f22.png"
- import f41 from "@/assets/img/f41.png"
- import xin from "@/assets/img/xin.png"
- import xin2 from "@/assets/img/xin2.png"
- import s from "@/assets/img/s.png"
- import y from "@/assets/img/y.png"
- import y2 from "@/assets/img/y2.png"
- import nos from "@/assets/img/nos.png"
- import zy from "@/assets/img/zy.png"
- import zy2 from "@/assets/img/zy2.png"
- import xuek10 from '@/assets/flowimg/xuek10.png'
- import xuek11 from '@/assets/flowimg/xuek11.png'
- import xuek12 from '@/assets/flowimg/xuek12.png'
- import optmonitor from './echart/optimize_monitor.vue'
- import processMonitor1 from "./echart/process-monitor1.vue"
- import processMonitor2 from "./echart/process-monitor2.vue"
- import echartindex from './echart/index.vue'
- import sixtop from './echart/six_top.vue'
- import sixbottom from './echart/six_bottom.vue'
- import sixindex from './demo/index.vue'
- import sixchine from './demo/chine.vue'
- import vuefindex from './vuetree/index.vue'
- import Sidebar from './vuetree/Sidebar.vue'
- // 可视化echart
- import tablelist from './echart/tablelist.vue'
- import echartarea from './echart/area.vue'
- import bargraph from './echart/bargraph.vue'
- import echartLine from './echart/echartLine.vue'
- import BarChart from './echart/BarChart.vue'
- import scatter from './echart/scatter.vue'
- import radar from './echart/radar.vue'
- import pie from './echart/pie.vue'
- import pareto from './echart/pareto.vue'
- import Doptimize from './titlecomponent/Doptimize.vue'
- import Joptimize from './titlecomponent/Joptimize.vue'
- import Toptimize from './titlecomponent/Toptimize.vue'
- import ADflow from './titlecomponent/ADflow.vue'
- import Xfoil from './titlecomponent/Xfoil.vue'
- import csts from './titlecomponent/csts.vue'
- import ffds from './titlecomponent/ffds.vue'
- import cloudsecond from "./titlecomponent/Cloudsecond.vue";
- import FSI from './titlecomponent/FSI.vue'
- import Flight from './titlecomponent/Flight.vue'
- import MathFunc from './titlecomponent/MathFunc.vue'
- import ListSE from "./titlecomponent/ListSE.vue";
- import TACS from "./titlecomponent/TACS.vue";
- import fileUploads from './components/fileuploads.vue'
- import Exreport from "./titlecomponent/Exreport.vue";
- import PythonEdit from '@/components/PythonEditor/index.vue'; // python编辑器
- import pdfReportView from '@/components/pdfReportView/index.vue'; //报告查看
- import cloudChart from './threejsView/index.vue'; // 云图
- import emitter from "@/utils/emitter";
- import cloundCharts from '@/components/cloudChart/index.vue';
- let Sidebarref = ref();
- let resource=ref(0);
- let cstnum=ref('');
- let textarea2=ref()
- let textarea1 = ref(`import os
- import numpy as np
- from surromdao.solver import BaseSolver
- class Branin(BaseSolver):
- def __init__(self, filename=os.path):
- super().__init__(filename)
-
- def compute(self, xdict):
- x = np.zeros(2)
- # x[0] = xdict['x1']
- # x[1] = xdict['x2']`);
- let Cstref = ref();
- let Ffdref = ref();
- let Xfoilref = ref();
- let ADflowref = ref();
- let Joptimizeref=ref();
- let Doptimizeref=ref();
- let Toptimizeref=ref();
- let Fsiref=ref();
- let Flightref=ref();
- let MathFuncref=ref();
- let Tacsref=ref();
- let f4ce = ref("优化问题组件");
- let modelban = ref("学科分析组件");
- let undmodel=ref('优化器组件');
- let optiongroup1 = ref([
- { label: '优化问题', value: '优化问题',img:'wen.png' }
- ])
- let options4 = ref([
- { label: '进化优化器', value: '进化优化器', icon:xuek10 },
- { label: '代理优化器', value: '代理优化器', icon:xuek11 },
- { label: '梯度优化器', value: '梯度优化器', icon:xuek12 },
- ])
- let formLabelWidth3=ref(100)
- let formLabelWidth200=ref(200)
- let tablecstHeaders=ref([]);
- let treeitem = ref({});
- let treeitem2 = ref({});
- let treeitem3 = ref({});
- let percentage = ref(0);
- let percentageTotalstep = ref(100);
- let progressshow = ref(false);
- let flowshow = ref(true);
- let jiankong = ref(false);
- let echartshow = ref(false);
- let echartshow2 = ref(false);
- let tablelistshow = ref(false);
- let areashow = ref(false);
- let echartLineshow = ref(false);
- let BarChartshow = ref(false);
- let bargraphshow = ref(false);
- let scattershow = ref(false);
- let radarshow = ref(false);
- let pieshow = ref(false);
- let paretoshow = ref(false);
- let bargraphref = ref();
- let echartLineref = ref();
- let BarChartref = ref();
- let radarref = ref();
- let pieref = ref();
- let paretoref = ref();
- let scatterref = ref();
- let echartzongshow = ref(false);
- const router = useRouter();
- const route = useRoute();
- let tablelistref = ref();
- let echartdata = ref(null);
- let optmonitor1 = ref();
- let processMonitor1ref = ref()
- let processMonitor2ref = ref()
- let arearef = ref();
- let tableHeaders = ref([
- { label: '参数1', prop: 'value1' },
- { label: '参数2', prop: 'value2' },
- { label: '参数3', prop: 'value3' },
- { label: '参数4', prop: 'value4' },
- { label: '参数5', prop: 'value5' },
- ])
- let varsobj = ref({});
- let valsobj = ref({});
- let tabarr = ref([]);
- let arrobj = ref([]);
- let tableDatalieb = ref([
- { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
- { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
- { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
- { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
- { value1: '0.00', value2: '0.00', value3:'0.00', value4:'0.00', value5:'0.00'},
- ])
- let curvedata = ref('');
- let websock = ref(null);
- let times = ref({
- lockReconnect: false, //是否真正建立连接
- timeout: 28 * 1000, //30秒一次心跳
- timeoutObj: null, //心跳倒计时
- serverTimeoutObj: null, //
- timeoutnum: null, //断开重连倒计时
- })
- let input3=ref()
- let eid = ref('');//进步优化器的eid
- let logs = ref("");
- let pid = ref("");
- let pythonwid = ref();
- let youhuaqiwid = ref();
- let canshuhuawid = ref();
- let qidongyouhuawid = ref();
- let fid = ref('');
- let conid = ref('');
- let tableval = ref();
- let vuefval = ref();
- let elodingfalse = ref(false);
- let footerShow = ref(true);
- let zhixing = ref('Rosenbrock');
- let tabName = ref("one")
- const tabs = [{
- name:'信息栏',
- img:xin,
- },{
- name:'优化问题',
- img:xin2,
- }]
- const listli=[{
- name:'设计变量',
- noimg:nos,
- isimg:s
- },{
- name:'约束条件',
- noimg:y2,
- isimg:zy2
- },
- {
- name:'优化目标',
- noimg:y,
- isimg:zy
- }
- ]
- const xfoil = ['输入', '执行', '输出'];
- const newxfoil = ['输入参数', '输出参数', '中间参数'];
- let srtable = ref([]);
- let radio1=ref(0);
- let srnewtable = ref([
- {
- date: '2016-05-04',
- name: 'Aleyna Kutzner',
- },
- {
- date: '2016-05-03',
- name: 'Helen Jacobi',
- },
- ]);
- let scnewtable = ref([
- {
- date: '2016-05-04',
- name: 'Aleyna Kutzner',
- con:-1
- },
- {
- date: '2016-05-03',
- name: 'Helen Jacobi',
- con:1
- },
- ]);
- let sctable = ref([]);
- // let quxian=ref([{
- // val:'1',name:"设计变量",
- // val:'2',name:"约束条件",
- // val:'3',name:"约束条件",
- // }])
- // let quval=ref('1')
- let currentTab=ref(0);
- // let tabslist = ref([
- // { id: '0', name: '来流参数' },
- // { id: '1', name: '设置参数' },
- // { id: '2', name: '分析参数' },
- // ])
- let yslist = ref([
- { label: 'GA', value: 'GA' },
- { label: 'PSO', value: 'PSO' },
- { label: 'NSGA2', value: 'NSGA2' },
- ])
- let lailiutable=ref([
- {
- data: 1,
- name: '结构质量',
- con:-1
- },
- {
- data: 23,
- name: 'KS失效',
- con:1
- },
- {
- data: 0.0,
- name: '最大变形',
- con: -1
- }
- ])
- let quxian = ref([
- { label: '设计变量', value: '设计变量' },
- { label: '约束条件', value: '约束条件' },
- { label: '目标函数', value: '目标函数' },
- ])
- let quval = ref("")
- const activeIndex = ref(0);
- const activeIndex2 = ref(0);
- const activeIndex3 = ref(0);
- const color1 = ref('');
- const colortier = ref('rgba(16, 185, 129, 0.5)');
- let showTrigger = ref(false);
- let activeadf=ref('Xfoil');
- const datatree = ref([
- {
- id: 1,
- label: '工程',
- children: [
- {
- id: '1-1',
- label: '优化问题',
- img: gc1,
- },
- {
- id: '1-2',
- label: '分析流程',
- img: gc2,
- },
- {
- id: '1-3',
- label: '优化器',
- img: gc3
- },
- ],
- },
- ])
- let options1 = ref([
- { label: '最大化', value: "-1" },
- { label: '最小化', value: "1" },
- ])
- let options2 = ref([
- { label: '升力系数', value: '升力系数' },
- { label: '翼型面积', value: '翼型面积' },
- ])
- let options3 = ref([
- { label: '大于', value: -1 },
- { label: '小于', value: 1 },
- ])
- let shuxingopt = ref([
- { label: '约束条件', value: -1 },
- { label: '优化目标', value: 1 },
- ])
- let defaultExpandedArr = ref([]);
- const defaultProps = {
- children: 'children',
- label: 'label',
- }
- let svarlist = ref('');
- let conlist = ref('');
- let funlist = ref('');
- let looktext=ref('');
- // treeData.value.forEach((item) => {
- // defaultExpandedArr.value.push(item.id);
- // });
- const activeName = ref('Role')
- const activeName1 = ref('message')
- let active = ref('Role10');
- let tabactive = ref("");
- let checkbox = ref(false)
- let formLabelWidth6 = ref(100)
- let formLabelWidth1 = ref(170)
- let formLabelWidth2 = ref(130)
- let canshu = ref();
- let question = ref([
- { url: 'kk1.png', titlie: "列表" },
- { url: 'kk2.png', titlie: "散点图" },
- { url: 'kk4.png', titlie: "折线图" },
- { url: 'kk8.png', titlie: "帕雷托图" },
- { url: 'kk3.png', titlie: "面积图" },
- { url: 'kk5.png', titlie: "柱状图" },
- { url: 'k3.png', titlie: "饼状图" },
-
- { url: 'kk6.png', titlie: "横条图" },
- { url: 'kk7.png', titlie: "雷达图" },
-
- { url: 'kk9.png', titlie: "云图/等值线" },
- { url: 'kk10.png', titlie: "查看报告" },
- { url: 'kk11.png', titlie: "导出报告" },
- ])
- let roletion = ref([
- { url: 'f41.png', titlie: "测试函数模板" },
- { url: 'r1.png', titlie: "工程优化模板" },
- { url: 'r2.png', titlie: "自定义" },
- ])
- let tasktion = ref([
- { url: 't0.png', titlie: "外形参数化" },
- ])
- let Rolelist = ref([
- { url: 'tow1.png', titlie: "优化问题组件" },
- { url: 'tow2.png', titlie: "学科分析组件" },
- { url: 'tow3.png', titlie: "优化器组件" },
- ])
- let Rolelist1 = ref([
- { url: 'l1.png', titlie: "逻辑流连线" },
- { url: 'l2.png', titlie: "数据流连线" },
- ])
- let Rolelist11 = ref([{ url: 'w6.png', titlie: "选择连线颜色" }])
- let Rolelist2 = ref([
- { url: 'cai1.png', titlie: "模块组合" },
- { url: 'cai2.png', titlie: "模块拆分" },
- ])
- let Rolelist22 = ref([{ url: 'w9.png', titlie: "选择图框颜色" }])
- let Rolelist3 = ref([
- { url: 'w10.png', titlie: "添加注释" },
- ])
- let Threelist = ref([
- { url: 'you1.png', titlie: "开始" },
- { url: 'you2.png', titlie: "暂停" },
- { url: 'you3.png', titlie: "续算" },
- { url: 'tts.png', titlie: "结束" },
- ])
- let Threelist1 = ref([
- { url: 'yh1.png', titlie: "列表监控" },
- { url: 'yh2.png', titlie: "曲线监控" },
- { url: 'yh3.png', titlie: "过程监控" },
- ])
- let Sevenlist = ref([
- { url: 'rr2.png', titlie: '任务检索' },
- { url: 'rr1.png', titlie: '任务管理' },
- { url: 'rr3.png', titlie: '备份' },
- ])
- let eightlist = ref([
- { url: 'e1.png', titlie: '用户手册' },
- { url: 'e2.png', titlie: '帮助文档' },
- { url: 'e3.png', titlie: '关于软件' },
- ])
- let canshulist = ref([
- { label: 'CST参数化', value: 'CST参数化' },
- { label: 'FFD参数化', value: 'FFD参数化' },
- ])
- let sevlist = ref([
- { label: '任务编号', value: '任务编号' },
- { label: '任务名称', value: '任务名称' },
- { label: '任务类型', value: '任务类型' },
- { label: '创建时间', value: '创建时间' },
- ])
- let seval4 = ref('任务名称');
- let agelist = ref([
- { label: 'Kriging模型', value: 'Kriging模型' },
- { label: '相关函数类型', value: '相关函数类型' },
- { label: '超参数优化方法', value: '超参数优化方法' },
- { label: 'Hooke Jeeves方法循环次数', value: 'Hooke Jeeves方法循环次数' },
- ])
- let agval = ref("Kriging模型")
- let agval1 = ref("固定设计空间")
- let agval2 = ref("拉丁超立方")
- let agelist1 = ref([
- { label: '固定设计空间', value: '固定设计空间' },
- ])
- let agelist2 = ref([
- { label: '拉丁超立方', value: '拉丁超立方' },
- ])
- let addval = ref("EI + MSP")
- let addlist = ref([
- { label: 'EI + MSP', value: 'EI + MSP' },
- ])
- let addval1 = ref("概率相乘法")
- let addlist1 = ref([
- { label: '概率相乘法', value: '概率相乘法' },
- ])
- let addval2 = ref("SBX交叉")
- let addlist2 = ref([
- { label: 'SBX交叉', value: 'SBX交叉' },
- ])
- let addval3 = ref("最佳保留策略")
- let ys = ref("GA")
- let addlist3 = ref([
- { label: '最佳保留策略', value: '最佳保留策略' },
- ])
- let addval4 = ref("倒位变异")
- let addlist4 = ref([
- { label: '倒位变异', value: '倒位变异' },
- ])
- let addval7 = ref("1e-7")
- let addlist7 = ref([
- { label: '1e-7', value: '1e-7' },
- ])
- let addval8 = ref("NO")
- let addlist8 = ref([
- { label: 'YES', value: 'YES' },
- { label: 'NO', value: 'NO' },
- ])
- let paretocbval = ref([])
- let paretocheckbox = ref([
- {label:'-cl',value:'-cl'},
- {label:'cd',value:'cd'},
- ])
- let cloudbtnbox = ref([
- {url:'meshFile.png',btnname:'文件选择'},
- {url:'yu.png',btnname:'域'},
- {url:'kk9.png',btnname:'云图'},
- {url:'seka.png',btnname:'色卡'},
- {url:'dengzx.png',btnname:'等值线'},
- ])
- let dialog = ref({
- newdialog: false,
- setdialog: false,
- targetdialog: false,
- design: false,
- constraint: false,
- parameter: false,
- agency: false,
- optimizer: false,
- jboptimizer: false,
- dboptimizer: false,
- tboptimizer: false,
- isADflow:false,
- lookover:false,
- exportreport:false,
- Xfiol: false,
- tidu:false,
- CSTt:false,
- ffdt:false,
- XfAD:false,
- cstffd:false,
- Taxs:false,
- enddialog: false,
- addfun: false,
- sufun: false,
- task: false,
- guanli: false,
- optgroup:false,
- Pythonshow:false,
- MathFuncdialog:false,
- listdialog:false,
- scatterdialog:false,
- echartLinedialog:false,
- paretodialog:false,
- clouddialog:false,
- fsidialog:false,
- flightdialog:false,
- })
- // let columns=ref[{
- // columns: [
- // { label: '上表面', prop: 'sbiao' },
- // { label: '下表面', prop: 'xbiao' },
- // // 动态添加更多列
- // ]
- // }]
- let options = ref([
- { label: '升阻比', value: '升阻比' },
- { label: 'RCS', value: 'RCS' },
- ])
- let tasklist = ref([
- { label: '气动', value: '气动' },
- { label: '结构', value: '结构' },
- { label: '隐身', value: '隐身' },
- { label: '噪声', value: '噪声' },
- ])
- const optiongroup = ref([
- { label: 'CST', value: 'CST', img:'xuek0.png' },
- { label: 'FFD', value: 'FFD', img:'ffd.png' },
- { label: 'Xfoil', value: 'Xfoil', img:'xuek9.png' },
- { label: 'ADflow', value: 'ADflow', img:'ADflow.png' },
- { label: 'TACS', value: 'TACS', img:'TACS.png' },
- { label: 'CATIA', value: 'CATIA', img:'xuek1.png' },
- { label: 'Python', value: 'Python', img:'xuek8.png' },
- { label: 'Excel', value: 'Excel', img:'xuek2.png' },
- { label: 'Feko', value: 'Feko', img:'xuek3.png' },
- { label: 'Fluent', value: 'Fluent', img:'xuek4.png' },
- { label: 'HCFD', value: 'HCFD', img:'xuek5.png' },
- { label: 'Matlab', value: 'Matlab', img:'xuek6.png' },
- { label: 'Nastran', value: 'Nastran', img:'xuek7.png' },
- { label: 'FUN to FEM', value: 'FSI', img:'fsi.png' },
- { label: 'Flight', value: 'Flight', img:'flight.png' },
- ])
- const eloptimize = ref([])
- const tableData = ref([])
- const designtable = ref([])
- const tasktable = ref([
- // {
- // id: "01",
- // time: '2016-05-03',
- // name: '升阻比',
- // state: '增大',
- // },
- // {
- // id: "02",
- // time: '2016-05-03',
- // name: '升阻比',
- // state: '增大',
- // },
- ])
- const customColor = ref('#2267B1')
- const customColors = [
- { color: '#f56c6c', percentage: 20 },
- { color: '#f56c6c', percentage: 40 },
- { color: '#5cb87a', percentage: 60 },
- { color: '#5cb87a', percentage: 80 },
- { color: '#5cb87a', percentage: 100 },
- ]
- let name = ref("1")
- let num = ref(1)
- const getImgPath = (url) => {
- return new URL(`../assets/img/${url}`, import.meta.url).href
- }
- const getflowImgPath = (url) => {
- return new URL(`../assets/flowimg/${url}`, import.meta.url).href
- }
- onMounted(() => {
- //console.log( Sidebarref.value.datatree);
- setTimeout(function () {
- init();
- initWebSocket();
- logsget();
- // vuefval.value.getroter()
- }, 1500);
- // childfun();
- emitter.on("stepfromyouhuaqi",handlePercentage);
- });
- onUnmounted(() => {
- emitter.off("stepfromyouhuaqi", handlePercentage);
- });
- const sjdelete = (index, row) => {
- console.log(index);
- designtable.value.splice(index, 1)
- }
- const ysdelete = (index, row) => {
- tableData.value.splice(index, 1)
- }
- const mbdelete = (index, row) => {
- eloptimize.value.splice(index, 1)
- }
- // 初始值
- const init = () => {
- pid.value = route.query.pid;
- console.log(route.query.pid);
- }
- const handleClick = (tab, event) => {
- console.log('标签页:',tab.props.name);
- tabactive.value = tab.props.name;
- if (tabactive.value == 'User') {
- vuefval.value.logToObject1().then(() => {
- router.replace({ path: '/' });
- console.log('跳转到首页');
- });
- } else {
- }
- if (tabactive.value == 'Role') {
- flowshow.value = true;
- console.log(11111)
- } else {
- flowshow.value = false;
- console.log(flowshow.value)
- }
- ifjiankong();
- dialogcolse()
- // 可视化标签页
- if (tabactive.value == 'Config') {
- echartzongshow.value = true;
- curveLine4();
- } else {
- echartzongshow.value = false;
- }
- }
- const validateInput = (row) => {
- // 允许输入 None / none / 负数 / 小数
- if (/^(none|None|-?\d*\.?\d*)$/.test(row.upper)) {
- row.upper = row.upper; // 允许输入
- } else {
- row.upper = row.upper.slice(0, -1); // 删除最后输入的非法字符
- }
- }
- const validateInput1 = (row) => {
- // 允许输入 None / none / 小数
- if (/^(none|None|\d*\.?\d*)$/.test(row.upper)) {
- row.upper = row.upper; // 允许输入
- } else {
- row.upper = row.upper.slice(0, -1); // 删除最后输入的非法字符
- }
- }
- //表格点击事件
- const handleEdit = (row) => {
- // console.log('编辑后的数据:', row);
- // 在这里处理数据保存逻辑,例如发送请求到后端更新数据
- };
- const footerClick = (tab, event) => {
- }
- // 关闭所有弹窗
- const dialogcolse = () => {
- dialog.value.newdialog = false;
- dialog.value.setdialog = false;
- dialog.value.targetdialog = false;
- dialog.value.design = false;
- dialog.value.constraint = false;
- dialog.value.parameter = false;
- dialog.value.agency = false;
- dialog.value.addfun = false;
- dialog.value.sufun = false;
- dialog.value.enddialog = false;
- dialog.value.task = false;
- dialog.value.guanli = false;
- }
- // Tree的点击事件
- const handleNodeClick = (data) => {
- console.log(data)
- tabactive.value = data.label;
- dialogbolen();
- }
- const optimizerfalse = (val) => {
- console.log('双击',val);
- const name = val.name;
- const wid = val.wid;
- if (name == '优化器') {
- // dialog.value.optimizer = true;
- activeadf.value='代理优化器';
- initoptimize(wid);
- dialog.value.optgroup = true;
- } else if (name == '参数化') {
- activeadf.value='CST';
- initcstffds(wid);
- dialog.value.cstffd = true;
- }else if (name == '气动分析') {
- activeadf.value='Xfoil'
- intxfoiladflow(wid);
- dialog.value.XfAD = true;
- } else if (name == '进化优化器') {
- activeadf.value='进化优化器';
- dialog.value.jboptimizer = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Joptimizeref.value) {
- // 调用 Joptimize 的 getoptimize 方法
- Joptimizeref.value.getoptimize(pid.value,wid);
- }
- });
- } else if (name == '代理优化器') {
- activeadf.value='代理优化器';
- // dialog.value.optgroup = true;
- dialog.value.dboptimizer = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Doptimizeref.value) {
- Doptimizeref.value.getDoptimize(pid.value,wid);
- }
- });
- }
- // else if (val == 'Xfiol' || val == 'Rosenbrock') {
- // importget();
- // dialog.value.Xfiol = true;
- // }
- else if(name == '梯度优化器'){
- activeadf.value='梯度优化器';
- dialog.value.tboptimizer = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Toptimizeref.value) {
- Toptimizeref.value.getToptimize(pid.value,wid);
- }
- });
- }else if(name == 'CST'){
- /// dialog.value.CSTt = true;
- activeadf.value='CST';
- dialog.value.CSTt = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Cstref.value) {
- Cstref.value.getcst(pid.value,wid);
- }
- });
- }else if(name == 'FFD'){
- /// dialog.value.CSTt = true;
- activeadf.value='FFD';
- dialog.value.ffdt = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Ffdref.value) {
- Ffdref.value.getffds(pid.value,wid);
- }
- });
- }
- else if(name == 'ADflow'){
- // adfhandleClick();
- activeadf.value='ADflow';
- dialog.value.isADflow = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (ADflowref.value) {
- ADflowref.value.getadflow(pid.value,wid);
- }
- });
- }else if(name == 'Xfoil'){
- // activeadf.value='Xfiol';
- dialog.value.Xfiol = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Xfoilref.value) {
- Xfoilref.value.getxfoil(pid.value,wid);
- }
- });
- }else if(name == 'TACS'){
- dialog.value.Taxs = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Tacsref.value) {
- Tacsref.value.gettacs(pid.value,wid);
- }
- });
- }else if(name == '模版'){
- dialog.value.optgroup = true;
- activeadf.value='代理优化器';
- }else if(name == 'Python'){
- dialog.value.Pythonshow = true;
- initPython(wid);
- }else if(name == 'FSI'){
- dialog.value.fsidialog = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Fsiref.value) {
- Fsiref.value.getfsi(pid.value,wid);
- }
- });
- }else if(name == 'Flight'){
- dialog.value.flightdialog = true;
-
- }else if(name == 'MathFunc'){
- dialog.value.MathFuncdialog = true;
- nextTick(() => {
- // 确保 ref 已经初始化
- if (MathFuncref.value) {
- MathFuncref.value.getmathfunc(pid.value,wid);
- }
- });
- }
- else {
- dialog.value.optimizer = false;
- dialog.value.jboptimizer = false;
- dialog.value.Xfiol = false;
- dialog.value.lookover = false;
- dialog.value.tidu = false;
- dialog.value.CSTt = false;
- dialog.value.XfAD = false;
- dialog.value.cstffd = false;
- dialog.value.Pythonshow = false;
- dialog.value.MathFuncdialog = false;
- dialog.value.fsidialog = false;
- dialog.value.flightdialog = false;
- }
- }
- // 优化器窗口初始化
- const initoptimize = (nowid) => {
- youhuaqiwid.value = nowid;
- const params1 = {
- transCode:'MDO0018',
- pid: pid.value,
- wid: youhuaqiwid.value
- }
- const params2 = {
- transCode:'MDO0031',
- pid: pid.value,
- wid: youhuaqiwid.value
- }
- const params3 = {
- transCode:'MDO0033',
- pid: pid.value,
- wid: youhuaqiwid.value
- }
- Promise.all([
- request(params1),
- request(params2),
- request(params3)
- ]).then(([res1, res2, res3]) => {
- console.log('1:', res1.checked);
- console.log('2:', res2.checked);
- console.log('3:', res3.checked);
- if(res1.hasOwnProperty('eid')){
- Joptimizeref.value.getoptimizeAssign(res1);
- console.log('fuz1:');
- }
- if(res3.hasOwnProperty('grid')){
- Toptimizeref.value.getToptimizeAssign(res3);
- console.log('fuz2:');
- }
- if(res2.hasOwnProperty('suid')){
- Doptimizeref.value.getDoptimizeAssign(res2);
- console.log('fuz3:');
- }
-
- // 根据返回值来设置 activeadf
- if (res1.checked === 1) {
- activeadf.value = '进化优化器';
- } else if (res2.checked === 1) {
- activeadf.value = '代理优化器';
- } else if (res3.checked === 1) {
- activeadf.value = '梯度优化器';
- }
- console.log('Updated activeadf:', activeadf.value);
- }).catch((err) => {
- console.error('请求失败:', err);
- });
- }
- // CST/FFD窗口初始化
- const initcstffds = (nowid) => {
- canshuhuawid.value = nowid;
- const params1 = {
- transCode:'MDO0040',
- pid: pid.value,
- wid: canshuhuawid.value
- }
- const params2 = {
- transCode:'MDO0043',
- pid: pid.value,
- wid: canshuhuawid.value
- }
- Promise.all([
- request(params1),
- request(params2),
- ]).then(([res1, res2]) => {
- console.log('1:', res1.checked);
- console.log('2:', res2.checked);
- if(res1.hasOwnProperty('cstid')){
- Cstref.value.getcstAssign(res1);
- }else if(res2.hasOwnProperty("ffdid")){
- Ffdref.value.getffdsAssign(res2);
- }
-
- // 根据返回值来设置 activeadf
- if (res1.checked === 1) {
- activeadf.value = 'CST';
- } else if (res2.checked === 1) {
- activeadf.value = 'FFD';
- }
- console.log('Updated activeadf:', activeadf.value);
- }).catch((err) => {
- console.error('请求失败:', err);
- });
- }
- // Xfoil/ADflow窗口初始化
- const intxfoiladflow = (nowid) => {
- qidongyouhuawid.value = nowid;
- const params1 = {
- transCode:'MDO0046',
- pid: pid.value,
- wid: qidongyouhuawid.value
- }
- const params2 = {
- transCode:'MDO0049',
- pid: pid.value,
- wid: qidongyouhuawid.value
- }
- Promise.all([
- request(params1),
- request(params2),
- ]).then(([res1, res2]) => {
- console.log('1:', res1.checked);
- console.log('2:', res2.checked);
- if(res1.hasOwnProperty("xfid")){
- Xfoilref.value.getxfoilAssign(res1);
- }else if(res2.hasOwnProperty("adid")){
- ADflowref.value.getadflowAssign(res2);
- }
-
- // 根据返回值来设置 activeadf
- if (res1.checked === 1) {
- activeadf.value = 'Xfoil';
- } else if (res2.checked === 1) {
- activeadf.value = 'ADflow';
- }
- console.log('Updated activeadf:', activeadf.value);
- }).catch((err) => {
- console.error('请求失败:', err);
- });
- }
- let pythoneditorshow = ref(false)
- // Python窗口初始化
- const initPython = (nowid) => {
- console.log('Pythonchushihua');
- pythoneditorshow.value = true; // 显示编辑器
- pythonwid.value = nowid;
- const param = {
- transCode: 'MDO0036',
- pid: pid.value,
- wid: pythonwid.value
- };
-
- request(param).then((res) => {
- console.log('Python:', res);
-
- // 判断 res.ptython 是否为空,若不为空则赋值
- if (res.ptython) {
- console.log('Python内容:', res.ptython);
- textarea1.value = res.ptython;
-
- }
- }).catch((err) => {
- console.error('Python内容初始化失败');
- });
- };
- // Python确认按钮提交
- const pythonSubmit = () => {
- console.log('Python确认按钮提交');
- pythoneditorshow.value = false; // 隐藏编辑器
- const param = {
- transCode:'MDO0037',
- pid: pid.value,
- wid: pythonwid.value,
- python: textarea1.value,
- }
- request(param).then((res) => {
- ElMessage({
- message: '保存成功',
- type: 'success',
- })
- }).catch((err) => {
- ElMessage.error('保存失败')
- });
- }
- let MathFuncxinjian = ref(false)
- const MathFunctabchange = (val) => {
- // console.log('MathFunctabchange:',val);
- if(val == '2'){
- MathFuncxinjian.value = true;
- }else{
- MathFuncxinjian.value = false;
- }
- }
- // 模块选择
- const clickgeometry = (e, index, key, name) => {
- // console.log(key);
- // console.log('模块选择:',name);
- tabactive.value = name;
- // 逻辑流数据流增加选中
- if(key==='Role10' || key==='Role11'){
- active.value = key;
- }
-
- dialogbolen();
- }
- const dialogbolen = () => {
- switch (tabactive.value) {
- case "新建任务":
- dialog.value.newdialog = true;
- break;
- case "问题设定":
- dialog.value.setdialog = true;
- break;
- case "优化目标":
- dialog.value.targetdialog = true;
- break;
- case "设计变量":
- dialog.value.design = true;
- break;
- case "约束条件":
- dialog.value.constraint = true;
- break;
- case "外形参数化":
- dialog.value.parameter = true;
- break;
- case "代理模型":
- dialog.value.agency = true;
- break;
- case "加点方法":
- dialog.value.addfun = true;
- break;
- case "优化算法":
- dialog.value.sufun = true;
- break;
- case "终止条件":
- dialog.value.enddialog = true;
- break;
- case "任务管理":
- dialog.value.task = true;
- break;
- case "任务检索":
- dialog.value.guanli = true;
- break;
- case "选择连线颜色":
- showTrigger.value = true;
- break;
- case "逻辑流连线":
- vuefval.value.linestrokeWidth('process');
- break;
- case "数据流连线":
- vuefval.value.linestrokeWidth('data');
- break;
- case "模块组合":
- vuefval.value.bgcolorfunc(colortier.value);
- vuefval.value.onSelection();
- break;
- case "开始":
- // optmonitor1.value.echatinit();
- // processMonitor1ref.value.echatinit();
- // processMonitor1ref.value.echatinit();
- runok();
- break;
- case "列表监控":
- ifjiankong();
- listtableInit();
- break;
- case "曲线监控":
- ifjiankong()
- curveLine();
- break;
- case "过程监控":
- ifjiankong()
- curveLine2();
- curveLine3();
- break;
- case "列表":
- echatsfunc();
- dialog.value.listdialog = true;
- nextTick(() => {
- initListSe();
- });
- break;
- case "面积图":
- echatsfunc();
- // curveLine4();
- break;
- case "饼状图":
- echatsfunc();
- break;
- case "柱状图":
- echatsfunc();
- break;
- case "折线图":
- dialog.value.echartLinedialog = true;
- echatsfunc();
- // curveLine4();
- nextTick(() => {
- initListSe();
- });
-
- break;
- case "散点图":
- // logsget();
- dialog.value.scatterdialog = true;
- echatsfunc();
- // curveLine4();
- nextTick(() => {
- initListSe();
- });
- break;
- case "横条图":
- echatsfunc();
- break;
- case "雷达图":
- //logsget();
- echatsfunc();
- break;
- case "帕雷托图":
- dialog.value.paretodialog = true;
- echatsfunc();
- break;
- case "云图/等值线":
- dialog.value.clouddialog = true;
- break;
- case "查看报告":
- echatsfunc();
- dialog.value.lookover = true;
- break;
- case "导出报告":
- dialog.value.exportreport = true;
- break;
- default:
- }
- }
- // 可视化清空
- const echartclear = () => {
- arearef.value.echatinit();
- bargraphref.value.echatinit();
- echartLineref.value.echatinit();
- BarChartref.value.echatinit();
- radarref.value.echatinit();
- scatterref.value.echatinit();
- pieref.value.echatinit();
- paretoref.value.echatinit();
- }
- const echatsfunc = () => {
- //echartzongshow.value=true;
- // echartclear();
- switch (tabactive.value) {
- case "列表":
- tablelistshow.value = true;
- areashow.value = false;
- bargraphshow.value = false;
- echartLineshow.value = false;
- BarChartshow.value = false;
- radarshow.value = false;
- scattershow.value = false;
- pieshow = false;
- paretoshow =false;
- break;
- case "面积图":
- tablelistshow.value = false;
- areashow.value = true;
- bargraphshow.value = false;
- echartLineshow.value = false;
- BarChartshow.value = false;
- radarshow.value = false;
- scattershow.value = false;
- pieshow = false;
- paretoshow =false;
- break;
- case "柱状图":
- tablelistshow.value = false;
- areashow.value = false;
- bargraphshow.value = true;
- echartLineshow.value = false;
- BarChartshow.value = false;
- radarshow.value = false;
- scattershow.value = false;
- pieshow = false;
- paretoshow = false;
- break;
- case "饼状图":
- tablelistshow.value = false;
- areashow.value = false;
- bargraphshow.value = false;
- echartLineshow.value = false;
- BarChartshow.value = false;
- radarshow.value = false;
- scattershow.value = false;
- pieshow = true;
- paretoshow = false;
- break;
- case "折线图":
- tablelistshow.value = false;
- areashow.value = false;
- bargraphshow.value = false;
- echartLineshow.value = true;
- BarChartshow.value = false;
- radarshow.value = false;
- scattershow.value = false;
- pieshow = false;
- paretoshow = false;
- break;
- case "散点图":
- tablelistshow.value = false;
- areashow.value = false;
- bargraphshow.value = false;
- echartLineshow.value = false;
- BarChartshow.value = false;
- radarshow.value = false;
- scattershow.value = true;
- pieshow = false;
- paretoshow = false;
- break
- case "横条图":
- tablelistshow.value = false;
- areashow.value = false;
- bargraphshow.value = false;
- echartLineshow.value = false;
- BarChartshow.value = true;
- radarshow.value = false;
- scattershow.value = false;
- pieshow = false;
- paretoshow = false;
- break
- case "雷达图":
- tablelistshow.value = false;
- areashow.value = false;
- bargraphshow.value = false;
- echartLineshow.value = false;
- BarChartshow.value = false;
- radarshow.value = true;
- scattershow.value = false;
- pieshow = false;
- paretoshow = false;
- break
- case "帕雷托图":
- tablelistshow.value = false;
- areashow.value = false;
- bargraphshow.value = false;
- echartLineshow.value = false;
- BarChartshow.value = false;
- radarshow.value = false;
- scattershow.value = false;
- pieshow = false;
- paretoshow = true;
- break
- default:
- tablelistshow.value = false;
- areashow.value = false;
- bargraphshow.value = false;
- echartLineshow.value = false;
- BarChartshow.value = false;
- radarshow.value = false;
- scattershow.value = false;
- pieshow = false;
- paretoshow = false;
- break
- }
- }
- // 可视化结束
- // ||activeName.value=='Three'&&tabactive.value=='开始'
- const ifjiankong = () => {
- if (activeName.value == 'Three' && tabactive.value == '列表监控' || activeName.value == 'Three' && tabactive.value == '开始') {
- jiankong.value = true;
- } else {
- jiankong.value = false;
- }
- if (activeName.value == 'Three' && tabactive.value == '曲线监控' ) {
- echartshow.value = true;
- } else {
- echartshow.value = false;
- }
- if (activeName.value == 'Three' && tabactive.value == '过程监控' ) {
- echartshow2.value = true;
- } else {
- echartshow2.value = false;
- }
- }
- // 求解
- const runok = () => {
- if(echartshow.value){
- optmonitor1.value.echatinit();
- }else if(echartshow2.value){
- processMonitor1ref.value.echatinit();
- processMonitor2ref.value.echatinit();
- }
- const params = {
- transCode: 'MDO0039',
- pid: pid.value,
- }
- request(params)
- .then((res) => {
- logs.value = '';
- arrobj.value = [];
- tabarr.value = [];
- tableDatalieb.value = [];
- tableHeaders.value = [];
- ElMessage({
- message: "开始运行",
- type: 'success',
- })
- })
- .catch((err) => {
- ElMessage.error('运行失败')
- })
- }
- const tableKey = ref(0);
- const listtableInit = () => {
- const params = {
- transCode: 'MDO0021',
- pid: pid.value,
- type: 1,
- }
- request(params)
- .then((res) => {
- tableDatalieb.value = [];
- tableKey.value++;
- if (res.rows && res.rows.length > 0) {
- // 遍历所有返回的条目
- res.rows.forEach((row) => {
- const { vars, vals } = row; // 获取每一行的 vars 和 vals
- // 调用 tablefun 函数更新表格
- tablefun1(vars, vals);
- });
- }
-
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- /**
- * 解析 vals 数据,将 [ ] 解析成数组,其他数据保持原样
- */
- function parseVals(vals) {
- let result = [];
- let temp = "";
- let inArray = false;
- for (let char of vals) {
- if (char === "[") {
- inArray = true;
- temp += char;
- } else if (char === "]") {
- inArray = false;
- temp += char;
- result.push(JSON.parse(temp.trim())); // 确保去除首尾空格后转换
- temp = "";
- } else if (char === " " && !inArray) {
- if (temp.trim() !== "") { // 避免空字符串被加入
- result.push(temp.trim());
- }
- temp = "";
- } else {
- temp += char;
- }
- }
- if (temp.trim() !== "") {
- result.push(temp.trim());
- }
- return result.filter(item => item !== ""); // 过滤掉空字符串
- }
- //曲线监控
- const curveLine = () => {
- const params = {
- transCode: 'MDO0021',
- pid: pid.value,
- type: 1,
- }
- request(params)
- .then((res) => {
- curvedata.value = JSON.stringify(res.rows);
- // console.log(curvedata.value);
- optmonitor1.value.getshuju(curvedata.value);
- // optmonitor1.value.getsockechart();
- // arearef.value.getsockechart(curvedata.value);
- // bargraphref.value.getsockechart(curvedata.value);
- // echartLineref.value.getsockechart(curvedata.value);
- // BarChartref.value.getsockechart(curvedata.value);
- // radarref.value.getsockechart(curvedata.value);
- // scatterref.value.getsockechart(curvedata.value);
- // pieref.value.getsockechart(curvedata.value);
- // paretoref.value.getsockechart(curvedata.value);
- // optmonitor1.value.getecharts();
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- // 过程监控1
- const curveLine2 = () => {
- const params = {
- transCode: 'MDO0021',
- pid: pid.value,
- type: 2,
- }
- request(params)
- .then((res) => {
- if (res.rows && res.rows.length > 0) {
- curvedata.value = JSON.stringify(res.rows);
- // console.log(curvedata.value);
- processMonitor1ref.value.getshuju(curvedata.value);
- }
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- // 过程监控2
- const curveLine3 = () => {
- const params = {
- transCode: 'MDO0021',
- pid: pid.value,
- type: 3,
- }
- request(params)
- .then((res) => {
- // 检查返回的数据是否为空
- if (res.rows && res.rows.length > 0) {
- curvedata.value = JSON.stringify(res.rows);
- // console.log(curvedata.value);
- processMonitor2ref.value.getshuju(curvedata.value);
- }
- })
- .catch((err) => {
- // 错误处理
- ElMessage.error(err.returnMsg);
- })
- }
- // 可视化页数据
- const curveLine4 = () => {
- const params = {
- transCode: 'MDO0021',
- pid: pid.value,
- type: 1,
- }
- request(params)
- .then((res) => {
- // curvedata.value = JSON.stringify(res.rows);
- // console.log('数据形式:',curvedata.value);
-
- // echartLineref.value.getshuju(curvedata.value);
- // scatterref.value.getshuju(curvedata.value);
- if (res.rows && res.rows.length > 0) {
- // 清空数据
- datatotabledata.value = [];
- datatotableheader.value = [];
- // 遍历返回的所有行数据
- res.rows.forEach((row) => {
- const { vars, vals } = row; // 解析 vars 和 vals
- datatotable(vars, vals);
- });
- }
- console.log("表格数据:", datatotabledata.value);
- console.log("表头数据:", datatotableheader.value);
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- const initListSe = () => {
- emitter.emit('update:datatotableheader', datatotableheader.value);
- emitter.emit('update:datatotabledata', datatotabledata.value);
- }
- let datatotableheader = ref([]);
- let datatotabledata = ref([]);
- // 解析数据到表格
- const datatotable = (vars, vals) => {
- console.log("表格更新");
- // 解析列名,vars 以空格分隔
- let headers = vars.split(" ");
- // 解析 vals 数据
- let values = vals.split(" ");
- // 构造表格数据对象
- let rowData = {};
- let newHeaders = [];
- headers.forEach((key, index) => {
- let val = values[index];
- // 处理数组数据,解析为 JSON 或直接填充
- if (val.startsWith("[") && val.endsWith("]")) {
- try {
- let parsedArray = JSON.parse(val); // 解析数组
- // 解析数组数据并拆分为多个列
- parsedArray.forEach((item, subIndex) => {
- let newKey = `${key}_${subIndex + 1}`; // 生成列名:原列名_1, _2, _3...
- rowData[newKey] = item;
- // 只在第一次时添加新列
- if (
- datatotableheader.value.length === 0 ||
- !datatotableheader.value.some((h) => h.prop === newKey)
- ) {
- newHeaders.push({ label: newKey, prop: newKey });
- }
- });
- } catch (e) {
- rowData[key] = val; // 解析失败,保留原始字符串
- }
- } else {
- rowData[key] = val !== undefined ? val : ""; // 处理数据长度不匹配情况
- // 只在第一次时添加原始列
- if (
- datatotableheader.value.length === 0 ||
- !datatotableheader.value.some((h) => h.prop === key)
- ) {
- newHeaders.push({ label: key, prop: key });
- }
- }
- });
- // 更新表头:防止重复添加
- if (datatotableheader.value.length === 0) {
- datatotableheader.value = newHeaders;
- } else {
- newHeaders.forEach((header) => {
- if (!datatotableheader.value.some((h) => h.prop === header.prop)) {
- datatotableheader.value.push(header);
- }
- });
- }
- // 更新表格数据
- datatotabledata.value.push(rowData);
- };
- let listcbval = ref([]);
- let listcbval2 = ref([]);
- // 选择框值更新
- const handleUpdate = (name, value) => {
- if (name === 'listcbval') {
- listcbval.value = value;
- console.log("listcbval:",listcbval.value);
- } else if (name === 'listcbval2') {
- listcbval2.value = value;
- console.log("listcbval2:",listcbval2.value);
- }
- };
- // 列表,散点,折线图选择数据==>曲线绘制
- const selectshujuto = () => {
- console.log("确认:",tabactive.value);
- if(tabactive.value === '散点图'){
- scatterref.value.selectshuju(listcbval.value,listcbval2.value,datatotableheader.value,datatotabledata.value);
- }else if(tabactive.value === '折线图'){
- echartLineref.value.selectshuju(listcbval.value,listcbval2.value,datatotableheader.value,datatotabledata.value);
- }else if(tabactive.value === '列表'){
- tablelistref.value.selectshuju(listcbval2.value)
- }
- }
- //选择颜色改变线的颜色
- const colorpicker = (e) => {
- console.log("color change:",vuefval.value);
- vuefval.value.changeAllEdgesColor(color1.value);
- }
- //选择颜色改变tuceng的颜色
- const colorpickertier = (e) => {
- //vuefval.value.changeAllEdgesColor(color1.value);
- vuefval.value.bgcolorfunc(colortier.value);
- }
- const deviceSelectChange = () => {
- }
- const handleClose = (done) => {
- console.log(111)
- dialog.value.newdialog = false;
- done();
- };
- const targetclick = () => {
- console.log(tableData.value)
- }
- // 模块组合
- const modelgroup=()=>{
- }
- //新增
- const onAddItem = () => {
- let tablevalnum = Number(tableval.value) > 1 ? Number(tableval.value) : 1
- if (activeIndex2.value == 0) {
- for (let i = 0; i < tablevalnum; i++) {
- designtable.value.push({
- name: `x${i + 1}`,
- upper: null,
- lower: null,
- reference: null,
- remark: ''
- })
- }
- } else if (activeIndex2.value == 1) {
- for (let i = 0; i < tablevalnum; i++) {
- tableData.value.push({
- name: `g${i + 1}`,
- con: -1,
- reference: null,
- upper: 0,
- lower: 0,
- })
- }
- } else if (activeIndex2.value == 2) {
- for (let i = 0; i < tablevalnum; i++) {
- eloptimize.value.push({
- name: `c${i + 1}`,
- optdir: '1',
- weight: 0,
- scaling: 0,
- factor: 0,
- reference: null,
- remark: '',
- })
- }
- }
- }
- const xxclick = (index) => {
- activeIndex.value = index
- if (activeIndex.value == 0) {
- } else if (activeIndex.value == 1) {
- getissue();
- }
- }
- //底部优化问题
- const issueclick = (index) => {
- activeIndex2.value = index;
- if (activeIndex2.value == 0) {
- getissue();
- } else if (activeIndex2.value == 1) {
- getyueshu();
- } else if (activeIndex2.value == 2) {
- getmub();
- }
- }
- //设计变量查询
- const getissue = () => {
- //let childernarr=[];
- const params = {
- transCode: 'MDO0022',
- pid: pid.value,
- }
- request(params)
- .then((res) => {
- if (res.rows.length === 0) {
- } else {
- let item1 = {
- id: "1-1-" + 1,
- label: '设计变量',
- img: q2,
- children: []
- }
- let arr = Sidebarref.value.datatree[0].children[0].children;
- let result = arr.find(element => element.id === item1.id);
- console.log(result);
- if (!result) {
- Sidebarref.value.datatree[0].children[0].children.push(item1);
- }
- let childernarr=Sidebarref.value.datatree[0].children[0].children
- Sidebarref.value.datatree[0].children[0].children.forEach((item,index)=>{
- if(item.label=='设计变量'){
- Sidebarref.value.datatree[0].children[0].children[index].children=[];
- }
- })
- res.rows = res.rows.map((item, index) => {
- item.lower = item.lower ?? 'none'
- item.upper = item.upper ?? 'none'
- item.reference = item.reference ?? 'none'
- item.name = item.name ?? 'none'
- item.remark = item.remark ?? 'none'
- treeitem.value = {
- id: "1-1-1-" + index,
- label: item.name,
- img: f21,
- }
- // console.log(Sidebarref.value.datatree[0].children[0].children[0].children)
- childernarr.forEach((item,index)=>{
- if(item.label=='设计变量'){
- let addnode = Sidebarref.value.datatree[0].children[0].children[index].children.push(treeitem.value);
- }
- })
- return item;
- })
- designtable.value = res.rows;
-
- }
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- // }
- // })
- }
- //约束条件查询
- const getyueshu = () => {
- const params = {
- transCode: 'MDO0023',
- pid: pid.value,
- }
- request(params)
- .then((res) => {
- if (res.rows.length === 0) {
- } else {
- let item2 = {
- id: "1-2-" + 2,
- label: '约束条件',
- img: f22,
- children: []
- }
- let arr = Sidebarref.value.datatree[0].children[0].children;
- let result = arr.find(element => element.id === item2.id);
- if (!result) {
- Sidebarref.value.datatree[0].children[0].children.push(item2);
- }
- Sidebarref.value.datatree[0].children[0].children.forEach((item, index) => {
- if (item.label == '约束条件') {
- Sidebarref.value.datatree[0].children[0].children[index].children = [];
- }
- });
- let childernarr = Sidebarref.value.datatree[0].children[0].children;
- res.rows = res.rows.map((item, index) => {
- // 确保转换为数字
- item.con = item.con ?? 'none';
- item.reference = item.reference ?? 'none';
- item.upper =item.upper ?? 'none';
- item.lower = item.lower ?? 'none';
- console.log('item:', item);
- treeitem2.value = {
- id: "1-2-2-" + index,
- label: item.name,
- img: f21,
- }
- childernarr.forEach((item, index) => {
- if (item.label == '约束条件') {
- let addnode = Sidebarref.value.datatree[0].children[0].children[index].children.push(treeitem2.value);
- }
- });
- return item;
- });
-
- tableData.value = res.rows; // 更新表格数据
- }
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg);
- })
- }
- //目标函数查询
- const getmub = () => {
- const params = {
- transCode: 'MDO0024',
- pid: pid.value,
- }
- request(params)
- .then((res) => {
- if (res.rows.length === 0) {
- } else {
- let item2 = {
- id: "1-3-" + 3,
- label: '目标函数',
- img: f41,
- children: []
- }
- let arr = Sidebarref.value.datatree[0].children[0].children;
- let result = arr.find(element => element.id === item2.id);
- if (!result) {
- Sidebarref.value.datatree[0].children[0].children.push(item2);
- }
- Sidebarref.value.datatree[0].children[0].children.forEach((item,index)=>{
- if(item.label=='目标函数'){
- Sidebarref.value.datatree[0].children[0].children[index].children=[];
- }
- })
- let childernarr=Sidebarref.value.datatree[0].children[0].children
- res.rows = res.rows.map((item, index) => {
- item.optdir = item.optdir ?? 'none';
- item.weight = item.weight ?? 'none';
- item.scaling = item.scaling ?? 'none';
- item.factor = item.factor ?? 'none';
- item.reference = item.reference ?? 'none';
- item.remark = item.remark ?? 'none';
- item.name = item.name ?? 'none';
- treeitem3.value = {
- id: "1-3-3-" + index,
- label: item.name,
- img: f21,
- }
- childernarr.forEach((item,index)=>{
- if(item.label=='目标函数'){
- let addnode = Sidebarref.value.datatree[0].children[0].children[index].children.push(treeitem3.value);
- }
- })
-
- // console.log(11111)
- // let addnode = Sidebarref.value.datatree[0].children[0].children[3].children.push(treeitem3.value);
- return item;
- })
- eloptimize.value = res.rows;
- }
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- //对象数组转化字符串
- const getarr = (name, arrays) => {
- console.log(arrays)
- for (let i = 0; i < arrays.length; i++) {
- let arr = [];
- let att = [];
- for (const key in arrays[i]) {
- if (arrays[i].hasOwnProperty(key)) {
- arr.push(arrays[i][key]);
- }
- }
- for (let j = 0; j < arr.length; j++) {
- if (typeof arr[j] === 'string' && arr[j] == "") {
- console.log(11111)
- arr[j] = " ";
- }
- }
- if (arrays[i].hasOwnProperty('pid') == true) {
- att = arr.slice(1, -1);
- } else {
- att = arr;
- }
- const valuesWithSemiColons = att.join(',');
- name += valuesWithSemiColons + ';';
- }
- console.log('conlist',name)
- return name;
- }
- const convertToStringArray = (result, Data) => {
- console.log('Data:', Data);
- result = Data.map(row => {
-
- const vid = row.vid || ' ';
- const name = row.name || ' ';
- const upper = row.upper ?? ' ';
- const lower = row.lower ?? ' ';
- const reference = row.reference ?? ' ';
- const remark = row.remark || ' ';
- // 将字段连接为一个以逗号分隔的字符串
- return `${vid},${name},${upper},${lower},${reference},${remark}`;
- }).join(';'); // 每行之间用分号分隔
- return result;
- }
- const convertToStringArray1 = (result, Data) => {
- console.log('Data:', Data);
- result = Data.map(row => {
-
- const conid = row.conid || ' ';
- const name = row.name || ' ';
- const upper = row.upper ?? ' ';
- const lower = row.lower ?? ' ';
- const reference = row.reference ?? ' ';
- // 将字段连接为一个以逗号分隔的字符串
- return `${conid},${name},${reference},${upper},${lower}`;
- }).join(';'); // 每行之间用分号分隔
- return result;
- }
- const convertToStringArray2 = (result, Data) => {
- console.log('Data:', Data);
- result = Data.map(row => {
-
- const fid = row.fid || ' ';
- const name = row.name || ' ';
- const optdir = row.optdir ?? ' ';
- const weight = row.weight ?? ' ';
- const reference = row.reference ?? ' ';
- const remark = row.remark || ' ';
- // 将字段连接为一个以逗号分隔的字符串
- return `${fid},${name},${optdir},${weight},${reference},${remark}`;
- }).join(';'); // 每行之间用分号分隔
- return result;
- }
- //保存优化问题
- const onokItem = () => {
- console.log(activeIndex2.value);
- if (activeIndex2.value == 0) {
- svarlist.value = '';
- console.log("designtable:",designtable.value)
- svarlist.value = convertToStringArray(svarlist.value, designtable.value)
- devise();
- } else if (activeIndex2.value == 1) {
- conlist.value = '';
- console.log("tabledata:",tableData.value)
- conlist.value = convertToStringArray1(conlist.value, tableData.value)
- restrain();
- } else if (activeIndex2.value == 2) {
- funlist.value = '';
- console.log("eloptimize:",eloptimize.value)
- funlist.value = convertToStringArray2(funlist.value, eloptimize.value)
- funlistaa();
- }
- }
- //设计变量的添加
- const devise = () => {
- const params = {
- transCode: 'MDO0054',
- pid: pid.value,
- vartr: svarlist.value
- }
- request(params)
- .then((res) => {
- ElMessage({
- message: '设计变量保存成功',
- type: 'success',
- })
- getissue();
- })
- .catch((err) => {
- ElMessage.error('设计变量保存失败')
- })
- }
- //约束的添加restrain
- const restrain = () => {
- const params = {
- transCode: 'MDO0055',
- pid: pid.value,
- vartr: conlist.value
- }
- request(params)
- .then((res) => {
- ElMessage({
- message: '约束条件保存成功',
- type: 'success',
- })
- getyueshu();
- })
- .catch((err) => {
- ElMessage.error('约束条件保存失败')
- })
- }
- //优化目标接口
- const funlistaa = () => {
- const params = {
- transCode: 'MDO0056',
- pid: pid.value,
- vartr: funlist.value
- }
- request(params)
- .then((res) => {
- ElMessage({
- message: '优化目标保存成功',
- type: 'success',
- })
- getmub();
- })
- .catch((err) => {
- ElMessage.error('优化目标保存失败')
- })
- }
- //初始化
- const initialize = () => {
- const params = {
- transCode: 'MDO0011',
- pid: pid.value,
- }
- request(params)
- .then((res) => {
- // ElMessage({
- // message: res.returnMsg,
- // type: 'success',
- // })
- importget();
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- // new输入参数
- const changecheck = (val,row) => {
- console.log(val);
- console.log(row);
- }
- //输入参数查询
- const importget = () => {
- const params = {
- transCode: 'MDO0012',
- pid: pid.value,
- }
- request(params)
- .then((res) => {
- srtable.value = res.rows;
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- //输入保存
- const susave = (index, row) => {
- console.log(row);
- const params = {
- transCode: 'MDO0013',
- pid: pid.value,
- inid: row.inid,
- vid: row.vid,
- enable: row.enable,
- name: row.name,
- v1: row.v1,
- v2: row.v2
- }
- request(params)
- .then((res) => {
- ElMessage({
- message: '保存成功',
- type: 'success',
- })
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- // 输入的删除
- const sudelete = (index, row) => {
- if (row.hasOwnProperty('outid') == false) {
- srtable.value.splice(index, 1)
- } else {
- const params = {
- transCode: 'MDO0014',
- inid: row.inid,
- }
- request(params)
- .then((res) => {
- importget();
- ElMessage({
- message: " 删除成功",
- type: 'success',
- })
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- }
- //输入输出的新建
- const newxfiol = () => {
- if (activeIndex3.value == 0) {
- srtable.value.push({
- name: "",
- v1: '0',
- v2: '0',
- enable: '0'
- })
- } else if (activeIndex3.value == 2) {
- sctable.value.push({
- name: "",
- v1: '',
- v2: '',
- enable: '0'
- })
- }
- }
- // 点击掉查询接口
- const dianjia = (index) => {
- activeIndex3.value = index;
- if (activeIndex3.value == 0) {
- importget()
- } else if (activeIndex3.value == 2) {
- console.log(11111)
- exportget();
- }
- }
- //输出参数查询
- const exportget = () => {
- const params = {
- transCode: 'MDO0015',
- pid: pid.value,
- }
- request(params)
- .then((res) => {
- sctable.value = res.rows;
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- // 输出保存
- const scsave = (index, row) => {
- if (row.hasOwnProperty('fid') == true) {
- fid.value = row.fid;
- }
- if (row.hasOwnProperty('conid') == true) {
- conid.value = row.conid;
- }
- const params = {
- transCode: 'MDO0016',
- pid: pid.value,
- outid: row.outid,
- fid: fid.value,
- conid: conid.value,
- enable: row.enable,
- name: row.name,
- v1: row.v1,
- v2: row.v2
- }
- request(params)
- .then((res) => {
- ElMessage({
- message: '保存成功',
- type: 'success',
- })
- exportget();
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- //输出删除scdelete
- const scdelete = (index, row) => {
- console.log(row);
- if (row.hasOwnProperty('outid') == false) {
- sctable.value.splice(index, 1)
- } else {
- const params = {
- transCode: 'MDO0017',
- outid: row.outid,
- }
- request(params)
- .then((res) => {
- exportget();
- ElMessage({
- message: " 删除成功",
- type: 'success',
- })
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- }
- // 用于实时更新表格数据
- function tablefun(vars, vals) {
- console.log('表格更新');
-
- // 解析列名,vars 以空格分隔
- let headers = vars.split(" ");
- // 更新表头
- tableHeaders.value = headers.map(item => ({ label: item, prop: item }));
- // 构造表格数据对象
- let rowData = {};
- headers.forEach((key, index) => {
- rowData[key] = vals[index] !== undefined ? vals[index] : ""; // 处理数据长度不匹配情况
- });
- // 更新表格数据
- tableDatalieb.value.push(rowData);
- }
- // 用于更新表格数据
- const tablefun1 = (vars, vals) => {
- console.log('表格更新');
-
- // 解析列名,vars 以空格分隔
- let headers = vars.split(" ");
- // 更新表头
- tableHeaders.value = headers.map(item => ({ label: item, prop: item }));
- // 解析 vals 为数组(假设 vals 是一个字符串)
- let values = vals.split(" ");
- // 构造表格数据对象
- let rowData = {};
- headers.forEach((key, index) => {
- rowData[key] = values[index] !== undefined ? values[index] : ""; // 处理数据长度不匹配情况
- });
- // 更新表格数据
- tableDatalieb.value.push(rowData);
- };
- //获取日志
- const logsget = () => {
- const params = {
- transCode: 'MDO0025',
- pid: pid.value,
- }
- request(params)
- .then((res) => {
- // 去除空行
- console.log('日志接口赋值')
- logs.value = res.logs.split('\n').filter(line => line.trim() !== '').join('\n');
- const results = extractBracesContent(logs.value);
- for (let i = 0; i < results.length; i++) {
- arrobj.value.push(results[i]);
- let vals = (results[i].vals).split(" ");
- tablefun(vals);
- let echarr = [];
- echarr.push(results[i])
- optmonitor1.value.getsockechart(echarr);
- processMonitor1ref.value.getsockechart(echarr);
- processMonitor2ref.value.getsockechart(echarr);
- // arearef.value.getsockechart(echarr);
- // bargraphref.value.getsockechart(echarr);
- // echartLineref.value.getsockechart(echarr);
- // BarChartref.value.getsockechart(echarr);
- // radarref.value.getsockechart(echarr);
- // scatterref.value.getsockechart(echarr);
- }
- })
- .catch((err) => {
- ElMessage.error(err.returnMsg)
- })
- }
- // 字符串截取
- function extractBracesContent(str) {
- const objectRegex = /\{[^}]+\}/g; // 匹配大括号对象
- const matches = str.match(objectRegex);
- if (!matches) return [];
- return matches.map(match => {
- try {
- return JSON.parse(match);
- } catch (e) {
- console.error('Failed to parse object:', match);
- return null;
- }
- }).filter(Boolean); // 过滤掉解析失败的对象
- }
- function convertToPercentage(number) {
- return (number * 100);
- }
- const handlePercentage = (val) => {
- console.log("步数设置:",val),
- percentageTotalstep.value = val;
- }
- //websockct的连接
- function initWebSocket() {
- //初始化weosocket
- // const wsuri = "ws://192.168.0.43:8087//websocket?projectId="+this.pid; ws://192.168.0.131/diswebsocket?projectId=5
- // const wsurl = "ws://192.168.108:8188//websocket?projectId=" + pid.value;
- const wsurl = import.meta.env.VITE_WEBSOCKET_URL + pid.value;
- // const wsurl =
- // "ws://" +
- // process.env.VUE_APP_BASE_websokt +
- // "/diswebsocket?projectId=" +'5'
- // aid.value;
- websock = new WebSocket(wsurl);
- websock.onopen = websocketonopen;
- websock.onmessage = websocketonmessage;
- websock.onerror = websocketonerror;
- websock.onclose = websocketclose;
- }
- // Websoket连接成功事件
- const websocketonopen = (res) => {
- console.log("WebSocket连接成功", res);
- console.log()
- start();
- };
- // Websoket接收消息事件
- const websocketonmessage = (res) => {
- // console.log('websocket接受消息:',res.data)
- arrobj.value = [];
- if (res.data.indexOf('{') !== -1) {
- progressshow.value = true;
- console.log('websocket接受消息:',res.data)
- // 解析 WebSocket 接收到的消息数据
- let parsedData = JSON.parse(res.data);
- let step = Number(parsedData.step);
- console.log('步数:',step)
- if(parsedData.type === 1){
- console.log('总步数:',percentageTotalstep.value)
- percentage.value = Math.round((step / percentageTotalstep.value) * 100);
- }
- console.log("进度:", percentage.value);
- echartdata.value = res.data;
- arrobj.value.push(parsedData);
- console.log('tabactive:',tabactive.value)
- if(jiankong.value && parsedData.type === 1){
- console.log('列表监控')
- tablefun1(parsedData.vars, parsedData.vals); // 传递 vars 和 vals 更新表格
- }else if(echartshow.value&&parsedData.type === 1){
- optmonitor1.value.getsockechart(arrobj.value);
- }else if(echartshow2.value&&parsedData.type === 2){
- processMonitor1ref.value.getsockechart(arrobj.value);
- }else if(echartshow2.value&&parsedData.type === 3){
- processMonitor2ref.value.getsockechart(arrobj.value);
- }
-
-
- // 新增:记录结构化 JSON 数据到日志
- const cleanedJsonLog = res.data.split('\n').filter(line => line.trim() !== '').join('\n');
- logs.value = logs.value + '\n' + cleanedJsonLog;
- // 自动滚动日志到底部
- let textarea = document.getElementById("textarea_id");
- textarea.scrollTop = textarea.scrollHeight;
- } else {
- if (res.data.indexOf('——成功') !== -1) {
- const timer = setTimeout(function () {
- progressshow.value = false;
- console.log('关闭定时器')
- }, 10000)
- // console.log(22222)
- // clearTimeout(timer);
- }
- if (res.data.indexOf('msg=heartChec') == -1) {
- // 去除空行
- const cleanedLog = res.data.split('\n').filter(line => line.trim() !== '').join('\n');
- logs.value = logs.value + '\n' + cleanedLog;
- let textarea = document.getElementById("textarea_id");
- textarea.scrollTop = textarea.scrollHeight;
-
- }
- }
- reset();
- };
- // Websoket连接错误事件
- const websocketonerror = (res) => {
- console.log("连接错误", res);
- websock.close();
- reconnect();
- };
- // Websoket断开事件
- const websocketclose = (res) => {
- console.log("断开连接", res);
- };
- // 创建 websocket 的实例
- // 心跳包
- const reconnect = () => {
- if (times.value.lockReconnect) return;
- times.value.lockReconnect = true;
- //没连接上会一直重连,设置延迟避免请求过多
- times.value.timeoutnum && clearTimeout(times.value.timeoutnum);
- times.value.timeoutnum = setTimeout(function () {
- //新连接
- initWebSocket();
- times.value.lockReconnect = false;
- }, 10000);
- }
- const reset = () => {
- //重置心跳
- clearTimeout(times.value.timeoutObj);
- clearTimeout(times.value.serverTimeoutObj);
- start();
- }
- const start = () => {
- //开启心跳
- times.value.timeoutObj && clearTimeout(times.value.timeoutObj);
- times.value.serverTimeoutObj && clearTimeout(times.value.serverTimeoutObj);
- times.value.timeoutObj = setTimeout(function () {
- //这里发送一个心跳,后端收到后,返回一个心跳消息
- if (websock.readyState == 1) {
- //如果连接正常
- websock.send("heartCheck");
- } else {
- //否则重连
- reconnect();
- }
- times.value.serverTimeoutObj = setTimeout(function () {
- // 超时关闭
- websock.close(); //如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
- }, times.value.timeout);
- }, times.value.timeout);
- }
- // 日志框
- // 日志的文本框
- const footerShows = (evt) => {
- if (evt == "claer") {
- logs.value = "";
- } else {
- footerShow.value = !footerShow.value;
- }
- }
- // watch(() =>echartdata.value, (newValue, oldValue) => {
- // // 这里处理 echartData 变化的逻辑
- // console.log('echartData changed:', newValue);
- // // console.log(optmonitor1.value);
- // });
- // 选项卡
- const selectTab=(index)=>{
- currentTab.value = index;
- }
- const adfhandleClick=(tab,event)=>{
- console.log('表单切换',tab.props.label);
- activeadf.value=tab.props.label;
- if(tab.props.name === '进化优化器'){
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Joptimizeref.value) {
- // 调用 Joptimize 的 getoptimize 方法
- Joptimizeref.value.getoptimize(pid.value,youhuaqiwid.value);
- }
- });
- }else if(tab.props.name === '代理优化器'){
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Doptimizeref.value) {
- Doptimizeref.value.getDoptimize(pid.value,youhuaqiwid.value);
- }
- });
- }else if(tab.props.name === '梯度优化器'){
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Toptimizeref.value) {
- Toptimizeref.value.getToptimize(pid.value,youhuaqiwid.value);
- }
- });
- }
- }
- const getaddsave = (nowid) => {
- if (Joptimizeref.value && typeof Joptimizeref.value.getaddsave === 'function') {
- if(nowid){
- Joptimizeref.value.getaddsave(pid.value,nowid);
- }else{
- Joptimizeref.value.getaddsave(pid.value);
- }
-
- }
- }
- const getDaddsave = (nowid) => {
- if (Doptimizeref.value && typeof Doptimizeref.value.getaddDsave === 'function') {
- if(nowid){
- Doptimizeref.value.getaddDsave(pid.value,nowid);
- }else{
- Doptimizeref.value.getaddDsave(pid.value);
- }
- }
- }
- const getTaddsave = (nowid) => {
- if (Toptimizeref.value && typeof Toptimizeref.value.getaddTsave === 'function') {
- if(nowid){
- Toptimizeref.value.getaddTsave(pid.value,nowid);
- }else{
- Toptimizeref.value.getaddTsave(pid.value);
- }
- }
- }
- const getSave = (ref) => {
- if (ref == '进化优化器'){
- getaddsave(youhuaqiwid.value);
- }else if(ref == '代理优化器'){
- getDaddsave(youhuaqiwid.value);
- }else if(ref == '梯度优化器'){
- getTaddsave(youhuaqiwid.value);
- }
- }
- // 参数化
- const adfhandleClick2=(tab,event)=>{
- console.log('表单切换',tab.props.label);
- activeadf.value=tab.props.label;
- if(tab.props.name === 'CST'){
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Cstref.value) {
- Cstref.value.getcst(pid.value,canshuhuawid.value);
- }
- });
- }else if(tab.props.name === 'FFD'){
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Ffdref.value) {
- Ffdref.value.getffds(pid.value,canshuhuawid.value);
- }
- });
- }
- }
- // 单独cst保存
- const cstok=(nowid)=>{
- // cstnum.value='';
- if(Cstref.value){
- if(nowid){
- Cstref.value.getcstsave(pid.value,nowid);
- }else{
- Cstref.value.getcstsave(pid.value);
- }
- }
- dialog.value.CSTt = false;
- }
- // 单独ffd保存
- const ffdok=(nowid)=>{
- if(Ffdref.value){
- if(nowid){
- Ffdref.value.getffdsave(pid.value,nowid);
- }else{
- Ffdref.value.getffdsave(pid.value);
- }
- }
- dialog.value.ffdt = false;
-
- }
- // cstffd保存
- const getCstFfdsave = (activeadf) => {
- if (activeadf == 'CST') {
- cstok(canshuhuawid.value);
- } else if (activeadf == 'FFD') {
- ffdok(canshuhuawid.value);
- }
- }
- const adfhandleClick3=(tab,event)=>{
- console.log('表单切换',tab.props.label);
- activeadf.value=tab.props.label;
- if(tab.props.name === 'Xfoil'){
- nextTick(() => {
- // 确保 ref 已经初始化
- if (Xfoilref.value) {
- Xfoilref.value.getxfoil(pid.value,qidongyouhuawid.value);
- }
- });
- }else if(tab.props.name === 'ADflow'){
- nextTick(() => {
- // 确保 ref 已经初始化
- if (ADflowref.value) {
- ADflowref.value.getadflow(pid.value,qidongyouhuawid.value);
- }
- });
- }
- }
- // xfoil保存
- const xfoilok=(nowid)=>{
- if(Xfoilref.value){
- if(nowid){
- Xfoilref.value.getxfoilsave(pid.value,nowid);
- }else{
- Xfoilref.value.getxfoilsave(pid.value);
- }
- }
- }
- // adflow保存
- const adflowok=(nowid)=>{
- if(ADflowref.value){
- if(nowid){
- ADflowref.value.getadflowsave(pid.value,nowid);
- }else{
- ADflowref.value.getadflowsave(pid.value);
- }
- }
- }
- // 气动优化xfoiladflow保存
- const getXfoilAdflowsave = (activeadf) => {
- if (activeadf == 'Xfoil') {
- xfoilok(qidongyouhuawid.value);
- } else if (activeadf == 'ADflow') {
- adflowok(qidongyouhuawid.value);
- }
- }
- // Fsi保存
- const getfsitosave = () => {
- if (Fsiref.value) {
- Fsiref.value.getfsisave(pid.value);
- }
- }
- const mathfuncxinjian = () => {
- if(MathFuncref.value) {
- MathFuncref.value.mathfuncnew();
- }
- }
- // MathFunc保存
- const getmathfunctosave = () => {
- if (MathFuncref.value) {
- MathFuncref.value.getmathfuncsave(pid.value);
- }
- }
- // TACS保存
- const gettacstosave = () => {
- if (Tacsref.value) {
- Tacsref.value.gettacssave(pid.value);
- }
- }
- // 云图打开二级弹窗
- let seconddialogshow = ref(false)
- let activesd = ref ({
- fileselect:false,
- domain:false,
- cloud:false,
- colorchart:false,
- isoline:false
- })
- let cloudsedtitle = ref('')
- const openSeconddialog = (name) => {
- // 设置 activesd 中的值来控制不同内容的显示
- activesd.value.fileselect = false;
- activesd.value.domain = false;
- activesd.value.cloud = false;
- activesd.value.colorchart = false;
- activesd.value.isoline = false;
- switch (name) {
- case '文件选择':
- activesd.value.fileselect = true;
- cloudsedtitle.value = "文件选择";
- break;
- case '域':
- activesd.value.domain = true;
- cloudsedtitle.value = "域";
- break;
- case '云图':
- activesd.value.cloud = true;
- cloudsedtitle.value = "云图";
- break;
- case '色卡':
- activesd.value.colorchart = true;
- cloudsedtitle.value = "色卡";
- break;
- case '等值线':
- activesd.value.isoline = true;
- cloudsedtitle.value = "等值线";
- break;
- default:
- break;
- }
- seconddialogshow.value = true
- };
- const lbjkheaderCellClassName = ({ columnIndex }) => {
- if( columnIndex === 0 ) return '';
- let dynamicColumnIndex = columnIndex - 1;
- let totalColumns = tableHeaders.value.length;
- let partsize = Math.ceil( totalColumns/3 );
- if( dynamicColumnIndex < partsize ) {
- return 'header-first';
- }else if( dynamicColumnIndex < partsize*2 ) {
- return 'header-second';
- }else {
- return 'header-third';
- }
- }
- </script>
- <style lang="scss" scoped>
- .conter_flex {
- display: flex;
- .ech {
- flex: 1;
-
- }
- }
- //有子节点 且未展开
- .left_main_content :deep(.el-icon svg) {
- display: block;
- }
- .footerTitle {
- display: flex;
- justify-content: space-between;
- padding: 5px 0px;
- font-size: 20px;
- height: 32px !important;
- z-index: 99;;
- // border-radius: 5px 5px 0px 0px;
- // overflow: hidden;
- border-top: 1px solid #B3B3B3;
- border-bottom: 1px solid #B3B3B3;
- }
- .footerTitle .el-image{
- width:24px;
- }
- .footerTitle div {
- display: flex;
- // justify-content:center ;
- align-items: center;
- font-size: 14px;
- }
- .kongzhit {
- position: absolute;
- bottom: 0;
- width: 100%;
- }
- .footerTitle p {
- margin: 0;
- }
- .footerTitle .span {
- width: 130px;
- height: 32px;
- line-height: 40px;
- padding: 0 10px;
- box-sizing: border-box;
- cursor: default;
- position: relative;
- font-size: 14px;
- color: #333333;
- font-family: 'Microsoft YaHei';
- }
- .footerTitle .span .el-image {
- margin-left: 10px;
- }
- .footerTitle .span span{
- padding-left:10px;
- }
- .footerText .el-textarea__inner {
- width: 100%;
- height: 178px !important;
- border: 0;
- font-size: 12px;
- color: #333;
- padding: 2px;
- box-shadow:none;
- }
- .custom-button{
- color: #333333;
- background-color: #DCEAFF;
- border: 1px solid #2267B1 ;
- }
- //没有子节点
- </style>
- <style>
- .wentsd {
- padding: 0 8px;
- }
- /* .el-treeicon .el-tree-node__expand-icon.is-leaf{
- display: none !important;
- } */
- .custom-text {
- font-family: 'Microsoft YaHei';
- font-size: 16px;
- color: rgba(51, 51, 51, 1);
- /* line-height: 24px; */
- text-align: left;
- font-style: normal;
- text-transform: none;
- padding-left: 8px;
- }
- .el-tree .el-tree-node__children .custom-text {
- font-family: 'Microsoft YaHei';
- font-size: 14px;
- /* 这里设置为20px,你可以根据需求调整大小 */
- color: rgba(51, 51, 51, 0.8);
- }
- /* .el-tree .el-tree-node.is-current>.el-tree-node__content img{
- display: none;
- } */
- .custom-tree {
- overflow: auto;
- }
- .custom-tree1>.el-tree-node>.el-tree-node__content>div img {
- /* display: none; */
- /* 隐藏一级节点复选框 */
- }
- .footerTitle {
- background: #eee;
- border-radius: 0px 0px 0px 0px;
- }
- .footer-tab .el-tabs__item {
- color: #333333;
- }
- .footerTitle .active {
- background-color: #fff;
- border-left:1px solid #B3B3B3;
- border-right:1px solid #B3B3B3;
- /* border-bottom:4px solid #fff; */
- }
- .footerTitle .active::before{
- content: "";
- display: block;
- width: 100%;
- height: 2px;
- background: #2267B1;
- border-radius: 0px 0px 0px 0px;
- top: 0px;
- left:0px;
- position: absolute;
- }
- .footerTitle .active::after{
- content: "";
- display: block;
- width: 100%;
- height:4px;
- background: #fff;
- border-radius: 0px 0px 0px 0px;
- bottom: 0px;
- left:0px;
- position: absolute;
- }
- .youhualog {
- width: 100%;
- height: 195px;
- overflow-y: auto;
- background: #fff;
- }
- .youhualog .active2 {
- color: #2267B1;
- }
- .youhualog ul {
- /* width:482px; */
- display: flex;
- align-items: center;
- }
- .youhualog ul li {
- font-family: 'Microsoft YaHei';
- /* flex: 1; */
- /* border-left: 1px solid #B3B3B3; */
- font-size: 14px;
- height: 32px;
- /* line-height: 40px; */
- width: 120px;
- display: flex;
- /* justify-content: center; */
- align-items: center;
- padding:0 10px;
- cursor: default;
- }
- .youhualog ul li span {
- margin-left: 10px;
- }
- .footer-content {
- /* // padding: 15px 24px; */
- padding: 5px;
- border: 1px solid #B3B3B3;
- /* margin-right: 119px; */
- }
- .footer-add {
- width: 600px;
- }
- .flexend {
- display: flex;
- justify-content: flex-end;
- }
- .dibu {
- margin-top: 5px;
- display: flex;
- justify-content: flex-end;
- height: 35px;
- overflow: hidden;
- }
- .dibu .el-input__wrapper {
- width: 226px;
- }
- .dibu .el-form-item_label {
- color: #333333;
- font-size: 14px;
- font-family: 'Microsoft YaHei';
- }
- .dibu .btncolor {
- margin-top: 2px;
- height: 27px;
- width: 70px;
- background: #FFFFFF;
- box-shadow: 0px 2px 2px 0px #B3B3B3;
- border-radius: 0px 0px 0px 0px;
- border: 1px solid #B3B3B3;
- }
- .classtable .el-table td.el-table__cell div .el-input__wrapper {
- box-shadow: none !important;
- padding: 0;
- }
- .classtable .el-table .el-table__cell {
- padding: 0;
- }
- .gooterpading {
- /* border: 1px solid #2267B1; */
- }
- .classtable .el-table th .cell {
- /* background: #fff; */
- line-height: 31px;
- }
- .classtable .el-table td.el-table__cell, .classtable .el-table th.el-table__cell{
- color: #333333;
- font-size: 14px;
- font-family: 'Microsoft YaHei';
- }
- .footer-content .classtable .el-table td.el-table__cell,.footer-content .classtable .el-table th.el-table__cell {
- color: #333333;
- font-size: 14px;
- font-family: 'Microsoft YaHei';
- }
- .classtable .el-table td.el-table__cell div {
- height: 31px;
- overflow: hidden;
- display: flex;
- align-items: center; /* 垂直居中 */
- justify-content: center; /* 水平居中 */
- }
- .classtable .el-table td.el-table__cell,
- .el-table th.el-table__cell.is-leaf,
- .eldesign {
- /* border: 1px solid #000000; */
- }
- /* .el-color-picker__trigger {
- //display: none;
- } */
- /* 使颜色选择器的触发器可点击,但不显示 */
- .el-color-picker__trigger.is-show-panel {
- display: block;
- }
- .conter_mian {
- padding: 1px;
- }
- .summary-dlg2 .el-dialog__body {
- padding: 0;
- }
- .summary-dlg .el-dialog__wrapper {
- pointer-events: none;
- }
- .summary-dlg .el-dialog {
- pointer-events: auto;
- }
- .summary-dlgPdf .el-dialog__body{
- padding: 5px;
- }
- .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
- background-color: #fff;
- }
- .youhualog1 {
- position: relative;
- }
- .chushij {
- position: absolute;
- right: 13px;
- top: 5px;
- }
- .jindutiao {
- margin: 20px;
- width: 60%;
- padding: 0 0 2px 0px;
- /* background: #9FCDFF; */
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .jindutiao .demo-progress {
- width: 100%;
- }
- .jindutiao .demo-progress .el-progress__text {
- font-size: 13px;
- color: #333333;
- font-family: 'Microsoft YaHei';
- }
- .jindutiao .percentage-value {
- font-size: 13px;
- color: #333333;
- font-family: 'Microsoft YaHei';
- }
- .cstleft{
- width:50%;
- flex: 1;
-
- }
- .XFpdding{
- /* height: 425px; */
- }
- .dialog_class {
- padding: 0px ;
- color: #333333;
- font-size: 16px;
- font-family: 'Microsoft YaHei';
- }
- </style>
|