tree.vue 165 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615
  1. <template>
  2. <div style="height: 100%">
  3. <basic-container v-show="showType == 1">
  4. <el-row class="titlerow">
  5. <el-col>
  6. <div style="position: relative">
  7. <span style="float: left; margin-top: 15px; color: white">{{
  8. projectName
  9. }}</span>
  10. <el-button
  11. size="medium"
  12. icon="el-icon-help"
  13. style="margin-right: 10px"
  14. @click="fileTitleHandle"
  15. >文件题名(全局)
  16. </el-button>
  17. <el-dropdown style="margin-right: 10px" @command ="handleBasicClick" v-if="wbsType == 2">
  18. <el-button size="medium">
  19. 基础数据管理<i class="el-icon-arrow-down el-icon--right"></i>
  20. </el-button>
  21. <el-dropdown-menu slot="dropdown">
  22. <el-dropdown-item command="code">编号管理</el-dropdown-item>
  23. <el-dropdown-item command="rule">规范参数管理</el-dropdown-item>
  24. </el-dropdown-menu>
  25. </el-dropdown>
  26. <!-- 同步按钮 -->
  27. <el-button
  28. size="medium"
  29. style="margin-right: 10px"
  30. @click="proSyncbtn"
  31. >项目数据同步
  32. </el-button>
  33. <el-button
  34. size="medium"
  35. icon="el-icon-s-grid"
  36. @click="eleFormulaHandle"
  37. v-if="leftType == 5"
  38. >表单设置
  39. </el-button>
  40. <el-button
  41. size="medium"
  42. icon="el-icon-s-grid"
  43. @click="eleHandle"
  44. v-else
  45. >元素设置
  46. </el-button>
  47. <el-button size="medium" icon="el-icon-help" @click="nodeInfoHandle"
  48. >节点参数设置
  49. </el-button>
  50. <el-button
  51. style="margin-top: 10px"
  52. size="medium"
  53. icon="el-icon-price-tag"
  54. @click="independent"
  55. >独立表单库
  56. </el-button>
  57. <el-button
  58. style="margin-top: 10px"
  59. size="medium"
  60. icon="el-icon-time"
  61. @click="archiveTimeClick"
  62. >归档文件时间设置
  63. </el-button>
  64. </div>
  65. </el-col>
  66. </el-row>
  67. <el-row :gutter="20" class="h-100p" style="padding: 10px">
  68. <el-col :span="8" style="height: 85%">
  69. <div class="h-100p flex flex-d-c">
  70. <p style="margin-top: 2px">工程节点信息</p>
  71. <div
  72. class="flex"
  73. style="align-items: center; justify-content: space-between"
  74. >
  75. <el-input
  76. placeholder="输入关键字进行过滤"
  77. v-model="filterText"
  78. clearable
  79. style="width: 65%; margin-right: 15px"
  80. @clear="clearSearch"
  81. ></el-input>
  82. <el-switch
  83. v-model="searchType"
  84. active-value="1"
  85. inactive-value="2"
  86. inline-prompt
  87. active-text="按节点"
  88. inactive-text="按表名"
  89. />
  90. <el-button type="primary" @click="searchTreeClick"
  91. >搜索</el-button
  92. >
  93. </div>
  94. <div class="flex1 ov-hidden">
  95. <el-scrollbar class="h-100p" v-if="isShowTree">
  96. <div v-loading="treeLoad">
  97. <el-tree
  98. class="filter-tree"
  99. lazy
  100. :load="loadNode"
  101. @node-click="getNodeDetail"
  102. :props="defaultProps"
  103. :expand-on-click-node="false"
  104. highlight-current
  105. node-key="id"
  106. ref="tree"
  107. :default-expanded-keys="defaultExpandedKeys"
  108. v-show="!isSearch"
  109. >
  110. <span
  111. class="custom-tree-node"
  112. :class="data.moreShow ? 'show' : ''"
  113. slot-scope="{ node, data }"
  114. @mouseleave="mouseout(data)"
  115. >
  116. <div class="pd-r-20">
  117. {{ node.label }}
  118. <div class="normal-black">
  119. <div>
  120. <el-link :underline="false">
  121. <i
  122. class="el-icon-menu"
  123. @click.stop="showMenu($event, data, node)"
  124. v-if="node.level != 1"
  125. ></i>
  126. </el-link>
  127. <!-- 因右键自定义菜单事件需要获取当前点击的位置,所以此处绑定动态样式来控制菜单实时跟踪鼠标右键点击位置 -->
  128. <ul
  129. v-show="menuvisible"
  130. :style="{
  131. left: menuleft + 'px',
  132. top: menutop + 'px',
  133. }"
  134. class="contextmenu"
  135. >
  136. <li
  137. v-for="item in menusData"
  138. :key="item"
  139. @click="menuClick($event, item, data)"
  140. >
  141. <i :class="item.icon"></i>
  142. <el-tooltip
  143. class="item"
  144. effect="light"
  145. :content="item.content"
  146. placement="right-start"
  147. >
  148. <span>{{ item.label }}</span>
  149. </el-tooltip>
  150. </li>
  151. </ul>
  152. </div>
  153. </div>
  154. </div>
  155. </span>
  156. </el-tree>
  157. <el-tree
  158. :load="searchtreeLoad"
  159. :data="searchTreeData"
  160. @node-click="getNodeDetail"
  161. :props="defaultProps"
  162. :expand-on-click-node="false"
  163. highlight-current
  164. node-key="id"
  165. v-show="isSearch"
  166. default-expand-all
  167. >
  168. <span
  169. class="custom-tree-node"
  170. :class="data.moreShow ? 'show' : ''"
  171. slot-scope="{ node, data }"
  172. @mouseleave="mouseout(data)"
  173. >
  174. <div class="pd-r-20">
  175. {{ node.label }}
  176. <div class="normal-black">
  177. <div>
  178. <el-link :underline="false">
  179. <i
  180. class="el-icon-menu"
  181. @click="showMenu($event, data, node)"
  182. v-if="node.level != 1"
  183. ></i>
  184. </el-link>
  185. <ul
  186. v-show="menuvisible"
  187. :style="{
  188. left: menuleft + 'px',
  189. top: menutop + 'px',
  190. }"
  191. class="contextmenu"
  192. >
  193. <li
  194. v-for="item in menusData"
  195. :key="item"
  196. @click="menuClick($event, item, data)"
  197. >
  198. <i :class="item.icon"></i>{{ item.label }}
  199. </li>
  200. </ul>
  201. </div>
  202. </div>
  203. </div>
  204. </span>
  205. </el-tree>
  206. </div>
  207. </el-scrollbar>
  208. </div>
  209. </div>
  210. </el-col>
  211. <el-col :span="16" class="h-100p flex flex-d-c">
  212. <template v-if="leftType == 5">
  213. <div class="mg-b-10">节点信息</div>
  214. <div>
  215. <el-table :data="tableData" border style="width: 100%">
  216. <el-table-column
  217. align="center"
  218. prop="nodeName"
  219. label="当前节点"
  220. ></el-table-column>
  221. <el-table-column
  222. align="center"
  223. prop="nodeType"
  224. :formatter="formatCat"
  225. label="节点类型"
  226. width="180"
  227. ></el-table-column>
  228. <el-table-column
  229. align="center"
  230. prop="parentName"
  231. label="上级节点"
  232. ></el-table-column>
  233. <el-table-column
  234. align="center"
  235. prop="primaryKeyId"
  236. label="primaryKeyId"
  237. ></el-table-column>
  238. <el-table-column
  239. align="center"
  240. prop="id"
  241. label="id"
  242. ></el-table-column>
  243. <el-table-column
  244. align="center"
  245. prop="majorDataType"
  246. :formatter="formMajorType"
  247. label="内业资料类型"
  248. ></el-table-column>
  249. </el-table>
  250. </div>
  251. <div class="flex jc-sb">
  252. <p>
  253. <span>当前项目信息表</span>
  254. <el-button
  255. type="text"
  256. style="margin-left: 10px"
  257. icon="el-icon-edit-outline"
  258. class="text-icon"
  259. @click="editEditElementForm()"
  260. ></el-button>
  261. <el-button
  262. type="text"
  263. icon="el-icon-sort"
  264. class="text-icon"
  265. @click="privateTableSort()"
  266. ></el-button>
  267. </p>
  268. <div class="mg-t-10"></div>
  269. </div>
  270. <div style="flex: 1; position: relative">
  271. <el-table
  272. :data="formData"
  273. border
  274. height="100%"
  275. style="width: 100%; position: absolute"
  276. >
  277. <el-table-column
  278. align="center"
  279. prop="tableName"
  280. label="表单名称"
  281. ></el-table-column>
  282. <el-table-column
  283. align="center"
  284. prop="elementTotal"
  285. width="80"
  286. label="字段总量"
  287. ></el-table-column>
  288. <el-table-column
  289. align="center"
  290. prop="fillRate"
  291. width="80"
  292. label="填报率"
  293. ></el-table-column>
  294. <el-table-column
  295. align="center"
  296. prop="tableType"
  297. :formatter="formatTableType"
  298. width="100"
  299. label="表单类型"
  300. ></el-table-column>
  301. <el-table-column width="150"
  302. align="center"
  303. prop="tableOwner"
  304. :formatter="formatOwner"
  305. label="所属方"
  306. ></el-table-column>
  307. <el-table-column label="操作" >
  308. <template slot-scope="scope">
  309. <el-button
  310. size="mini"
  311. @click="handlePreview(scope.$index, scope.row)"
  312. >预览
  313. </el-button>
  314. <el-button
  315. size="mini"
  316. @click="handleEdit(scope.$index, scope.row)"
  317. >编辑
  318. </el-button>
  319. <el-button
  320. size="mini"
  321. type="success"
  322. v-throttle="3000"
  323. v-show="scope.row.status == 0"
  324. @click="hideMD(scope.row)"
  325. >取消隐藏
  326. </el-button>
  327. <el-button
  328. size="mini"
  329. type="primary"
  330. v-throttle="3000"
  331. v-show="scope.row.status == 1"
  332. @click="hideMD(scope.row)"
  333. >隐藏表单
  334. </el-button>
  335. <el-button
  336. size="mini"
  337. type="danger"
  338. @click="handleDelete(scope.$index, scope.row)"
  339. >删除
  340. </el-button>
  341. </template>
  342. </el-table-column>
  343. </el-table>
  344. </div>
  345. </template>
  346. <template v-if="leftType == 4">
  347. <div style="flex: 1; position: relative">
  348. <el-table
  349. :data="formData"
  350. border
  351. height="100%"
  352. style="width: 100%; position: absolute"
  353. >
  354. <el-table-column
  355. align="center"
  356. prop="tableName"
  357. label="表单名称"
  358. ></el-table-column>
  359. <el-table-column
  360. align="center"
  361. prop="tableType"
  362. :formatter="formatTableType"
  363. label="表单类型"
  364. ></el-table-column>
  365. <el-table-column
  366. align="center"
  367. prop="fillRate"
  368. label="填报率"
  369. ></el-table-column>
  370. <el-table-column
  371. label="是否关联清表"
  372. prop="isLinkTable"
  373. align="center"
  374. >
  375. <template slot-scope="scope">
  376. <span v-if="scope.row.isLinkTable == 2">是</span>
  377. <span v-else>否</span>
  378. </template>
  379. </el-table-column>
  380. <el-table-column
  381. align="center"
  382. prop="tableOwner"
  383. :formatter="formatOwner"
  384. label="所属方"
  385. ></el-table-column>
  386. <el-table-column label="操作" width="520" align="center">
  387. <template slot-scope="scope">
  388. <el-link type="primary" @click="Associationlist(scope)"
  389. >关联清表
  390. </el-link>
  391. <el-link
  392. class="mg-l-10"
  393. type="primary"
  394. :disabled="
  395. scope.row.excelId == -1 || scope.row.excelId == null
  396. "
  397. @click="
  398. rightClick(
  399. scope.row.pkeyId,
  400. scope.row.excelId,
  401. scope.row.id,
  402. scope.row.initTableName,
  403. scope.row.initTableId
  404. )
  405. "
  406. >编辑元素
  407. </el-link>
  408. <el-link
  409. class="mg-l-10"
  410. type="primary"
  411. :disabled="
  412. scope.row.excelId == -1 || scope.row.excelId == null
  413. "
  414. @click="adjustExcel(scope.row.pkeyId, scope.row.excelId)"
  415. >调整表单
  416. </el-link>
  417. <el-link
  418. class="mg-l-10"
  419. type="primary"
  420. @click="handleEditFormula(scope.$index, scope.row)"
  421. >编辑元素公式
  422. </el-link>
  423. <el-dropdown @command="handleCommand($event,scope.row)">
  424. <el-button type="text" class="mg-l-10">
  425. 表单同步<i class="el-icon-arrow-down el-icon--right"></i>
  426. </el-button>
  427. <el-dropdown-menu slot="dropdown">
  428. <el-dropdown-item command="a">同步到项目下所有表单</el-dropdown-item>
  429. <el-dropdown-item command="b">同步其他表单配置</el-dropdown-item>
  430. </el-dropdown-menu>
  431. </el-dropdown>
  432. <el-button
  433. class="mg-l-10"
  434. type="text"
  435. :loading="handlesyncLoad"
  436. @click="handleLinkNodes(scope.$index, scope.row)"
  437. v-if="
  438. curTreeData.nodeType === 1000 ||
  439. curTreeData.nodeType === 1001
  440. "
  441. >关联节点
  442. </el-button>
  443. <el-link
  444. class="mg-l-10"
  445. type="danger"
  446. @click="handleDelete(scope.$index, scope.row)"
  447. >删除表单
  448. </el-link>
  449. </template>
  450. </el-table-column>
  451. </el-table>
  452. </div>
  453. </template>
  454. </el-col>
  455. </el-row>
  456. </basic-container>
  457. <el-row class="h-100p" v-show="showType == 2">
  458. <el-col :span="6" class="h-100p">
  459. <basic-container>
  460. <el-scrollbar class="h-100p">
  461. <el-tree
  462. class="filter-tree"
  463. lazy
  464. :data="typeTreeData"
  465. :load="typeTreeLoadNode"
  466. @node-click="getTypeTreeDetail"
  467. :props="defaultProps"
  468. :expand-on-click-node="false"
  469. highlight-current
  470. node-key="id"
  471. >
  472. </el-tree>
  473. </el-scrollbar>
  474. </basic-container>
  475. </el-col>
  476. <el-col :span="18" class="h-100p">
  477. <basic-container>
  478. <div class="flex h-100p flex-d-c">
  479. <div style="flex: 1; position: relative">
  480. <el-table
  481. :data="formData"
  482. border
  483. height="100%"
  484. style="width: 100%; position: absolute"
  485. >
  486. <el-table-column
  487. align="center"
  488. prop="tableName"
  489. label="表单名称"
  490. ></el-table-column>
  491. <el-table-column
  492. align="center"
  493. prop="tableType"
  494. :formatter="formatTableType"
  495. label="表单类型"
  496. ></el-table-column>
  497. <el-table-column
  498. align="center"
  499. prop="fillRate"
  500. label="填报率"
  501. ></el-table-column>
  502. <el-table-column
  503. label="是否关联清表"
  504. prop="isLinkTable"
  505. align="center"
  506. >
  507. <template slot-scope="scope">
  508. <span v-if="scope.row.isLinkTable == 2">是</span>
  509. <span v-else>否</span>
  510. </template>
  511. </el-table-column>
  512. <el-table-column
  513. align="center"
  514. prop="tableOwner"
  515. :formatter="formatOwner"
  516. label="所属方"
  517. ></el-table-column>
  518. <el-table-column label="操作" align="center">
  519. <template slot-scope="scope">
  520. <el-link type="primary" @click="Associationlist(scope)"
  521. >关联清表
  522. </el-link>
  523. <el-link
  524. class="mg-l-10"
  525. type="primary"
  526. :disabled="
  527. scope.row.excelId == -1 || scope.row.excelId == null
  528. "
  529. @click="
  530. rightClick(
  531. scope.row.pkeyId,
  532. scope.row.excelId,
  533. scope.row.id,
  534. scope.row.initTableName,
  535. scope.row.initTableId
  536. )
  537. "
  538. >编辑元素
  539. </el-link>
  540. <el-link
  541. class="mg-l-10"
  542. type="primary"
  543. :disabled="
  544. scope.row.excelId == -1 || scope.row.excelId == null
  545. "
  546. @click="adjustExcel(scope.row.pkeyId, scope.row.excelId)"
  547. >调整表单
  548. </el-link>
  549. <el-link
  550. class="mg-l-10"
  551. type="primary"
  552. @click="handleEditFormula(scope.$index, scope.row)"
  553. >编辑元素公式
  554. </el-link>
  555. <el-link
  556. class="mg-l-10"
  557. type="danger"
  558. @click="handleDelete(scope.$index, scope.row)"
  559. >删除表单
  560. </el-link>
  561. </template>
  562. </el-table-column>
  563. </el-table>
  564. </div>
  565. <div class="mg-t-10 flex jc-sb">
  566. <div></div>
  567. <el-button size="medium" @click="showType = 1"
  568. >返回WBS树
  569. </el-button>
  570. </div>
  571. </div>
  572. </basic-container>
  573. </el-col>
  574. </el-row>
  575. <!-- 编辑元素表单信息 -->
  576. <el-dialog
  577. title="编辑元素表单信息"
  578. :visible.sync="editElementFormTag"
  579. width="60%"
  580. :modal-append-to-body="false"
  581. >
  582. <div>
  583. <el-table :data="formDatass" border style="width: 100%">
  584. <el-table-column prop="tableName" label="表名">
  585. <template slot-scope="scope">
  586. <el-input
  587. v-model="scope.row.tableName"
  588. placeholder="请输入表名称"
  589. ></el-input>
  590. </template>
  591. </el-table-column>
  592. <el-table-column prop="tableType" label="表类型">
  593. <template slot-scope="scope">
  594. <el-select v-model="scope.row.tableType" placeholder="请选择">
  595. <el-option
  596. v-for="(item, key) in tableTypelist"
  597. :key="key"
  598. :label="item.dictValue"
  599. :value="item.dictKey"
  600. >
  601. </el-option>
  602. </el-select>
  603. </template>
  604. </el-table-column>
  605. <el-table-column prop="tableOwner" label="所属方">
  606. <template slot-scope="scope">
  607. <el-select v-model="scope.row.tableOwner" placeholder="请选择">
  608. <el-option
  609. v-for="(item, key) in ownerTypeList"
  610. :key="key"
  611. :label="item.dictValue"
  612. :value="item.dictKey"
  613. >
  614. </el-option>
  615. </el-select>
  616. </template>
  617. </el-table-column>
  618. <el-table-column prop="fillRate" label="填报率">
  619. <template slot-scope="scope">
  620. <el-input
  621. v-model="scope.row.fillRate"
  622. placeholder="请输入填报率"
  623. ></el-input>
  624. </template>
  625. </el-table-column>
  626. <el-table-column prop="nodeType" label="节点类型" v-if="wbsType == 5">
  627. <template slot-scope="scope">
  628. <el-select v-model="scope.row.nodeType" placeholder="请选择" >
  629. <el-option
  630. v-for="item in nodeTypelist"
  631. :key="item.id"
  632. :label="item.dictValue"
  633. :value="item.dictKey"
  634. ></el-option>
  635. </el-select>
  636. </template>
  637. </el-table-column>
  638. </el-table>
  639. </div>
  640. <span slot="footer" class="dialog-footer">
  641. <el-button @click="editElementFormTag = false">取 消</el-button>
  642. <el-button
  643. type="primary"
  644. @click="editeditElementFormMF()"
  645. :loading="editeditElementFormMFLoading"
  646. >确 定</el-button
  647. >
  648. </span>
  649. </el-dialog>
  650. <!-- 调整表单模板 -->
  651. <div v-if="excelHtml" class="excelHtml">
  652. <dynamicExcel
  653. @remove="removeExcel"
  654. v-if="excelHtml"
  655. :pkeyId="GLExcelFrom.id"
  656. :excelId="GLExcelFrom.excelId"
  657. />
  658. </div>
  659. <el-dialog
  660. title="调整排序"
  661. :visible.sync="sortTag"
  662. width="50%"
  663. append-to-body
  664. >
  665. <ManualSorting v-if="sortTag2" @bianhua="bianhua()" :sort="sort" />
  666. <span slot="footer" class="dialog-footer">
  667. <el-button @click="(sortTag = false), (sortTag2 = false)"
  668. >取 消</el-button
  669. >
  670. <el-button type="primary" @click="editSort()" v-loading="sureSortload"
  671. >确 定</el-button
  672. >
  673. </span>
  674. </el-dialog>
  675. <!-- 元素表排序 -->
  676. <el-dialog
  677. title="调整排序"
  678. :visible.sync="excelSortTag"
  679. width="50%"
  680. append-to-body
  681. >
  682. <ManualSorting
  683. v-if="excelSortTag2"
  684. @bianhua="bianhua2()"
  685. :sort="tableSortList"
  686. />
  687. <span slot="footer" class="dialog-footer">
  688. <el-button @click="excelSortTag = false">取 消</el-button>
  689. <el-button
  690. type="primary"
  691. @click="editPrivateSort()"
  692. v-loading="surePrivateSortload"
  693. >确 定</el-button
  694. >
  695. </span>
  696. </el-dialog>
  697. <!-- 关联清表 -->
  698. <el-dialog
  699. title="关联清表"
  700. class="excelBox"
  701. :visible.sync="GLExcel"
  702. width="500px"
  703. modal-append-to-body
  704. append-to-body
  705. @close="GLExcelMD"
  706. >
  707. <div>
  708. <el-select
  709. style="width: 400px"
  710. v-model="GLExcelFrom.name"
  711. placeholder="请选择"
  712. @change="changetherr()"
  713. >
  714. <el-option
  715. v-for="(item, key) in GLExcelData"
  716. :key="key"
  717. :label="item.name"
  718. :value="item.id"
  719. >
  720. </el-option>
  721. </el-select>
  722. <el-scrollbar style="margin-top: 20px; height: 50vh">
  723. <el-input
  724. style="width: 400px"
  725. v-model.trim="GLExcelFrom.search"
  726. placeholder="请输入需要选择的内容"
  727. ></el-input>
  728. <el-tree
  729. :filter-node-method="filterNode222"
  730. ref="tree"
  731. class="filter-tree"
  732. style="margin-top: 10px"
  733. :props="GLExcelProps"
  734. :data="exceldata"
  735. node-key="id"
  736. accordion
  737. show-checkbox
  738. @check="checkchange"
  739. v-loading="GLExcelLoading"
  740. >
  741. </el-tree>
  742. </el-scrollbar>
  743. </div>
  744. <span
  745. slot="footer"
  746. class="dialog-footer"
  747. style="display: flex; justify-content: center; align-items: center"
  748. >
  749. <el-button @click="GLExcelMD()">取 消</el-button>
  750. <el-button
  751. style="margin-left: 30px"
  752. type="primary"
  753. v-throttle="2000"
  754. @click="saveLinkTab()"
  755. >确 定</el-button
  756. >
  757. </span>
  758. </el-dialog>
  759. <!-- 节点详情 -->
  760. <el-dialog
  761. :title="dialogTitle"
  762. :visible.sync="dialogVisible"
  763. width="50%"
  764. append-to-body
  765. :close-on-click-modal="false"
  766. @closed="saveNodeLoading = false"
  767. >
  768. <el-form
  769. ref="nodeDetail"
  770. :model="nodeDetail"
  771. :rules="rules"
  772. label-width="140px"
  773. >
  774. <el-form-item label="节点名称" prop="nodeName">
  775. <div class="flex">
  776. <el-input v-model="nodeDetail.nodeName"></el-input>
  777. <el-button class="mg-l-10" type="primary" @click="aliasShow"
  778. >添加别名
  779. </el-button>
  780. </div>
  781. </el-form-item>
  782. <el-form-item label="上级节点">
  783. <el-input v-model="nodeDetail.parentName" disabled></el-input>
  784. </el-form-item>
  785. <el-form-item label="节点类型" prop="nodeType">
  786. <el-select
  787. v-model="nodeDetail.nodeType"
  788. placeholder="请选择"
  789. class="w-100p"
  790. @change="nodeTypeChange"
  791. clearable
  792. >
  793. <el-option
  794. v-for="item in nodeTypelist"
  795. :key="item.id"
  796. :label="item.dictValue"
  797. :value="item.dictKey"
  798. ></el-option>
  799. </el-select>
  800. </el-form-item>
  801. <el-form-item label="划分编号" v-if="wbsType !== 2 && wbsType !== 5">
  802. <el-input v-model="nodeDetail.partitionCode"></el-input>
  803. </el-form-item>
  804. <el-form-item label="唯一编码" v-if="wbsType !== 5">
  805. <el-input v-model="nodeDetail.uniqueCode"></el-input>
  806. </el-form-item>
  807. <template v-if="nodeDetail.nodeType == 6">
  808. <el-form-item label="是否有混凝土">
  809. <el-radio-group v-model="nodeDetail.isConcrete" size="small">
  810. <el-radio :label="0" border>无</el-radio>
  811. <el-radio :label="1" border>有</el-radio>
  812. </el-radio-group>
  813. </el-form-item>
  814. <el-form-item label="是否试验节点">
  815. <el-radio-group v-model="nodeDetail.isExpernode" size="small">
  816. <el-radio :label="0" border>否</el-radio>
  817. <el-radio :label="1" border>是</el-radio>
  818. </el-radio-group>
  819. </el-form-item>
  820. </template>
  821. <el-form-item
  822. label="内业资料类型"
  823. prop="majorDataType"
  824. v-if="wbsType !== 2 && wbsType !== 5"
  825. >
  826. <el-select
  827. v-model="nodeDetail.majorDataType"
  828. placeholder="请选择"
  829. class="w-100p"
  830. clearable
  831. >
  832. <el-option
  833. v-for="item in majorDataTypeList"
  834. :key="item.id"
  835. :label="item.dictValue"
  836. :value="item.dictKey"
  837. ></el-option>
  838. </el-select>
  839. </el-form-item>
  840. <el-form-item label="标准分类">
  841. <el-select
  842. v-model="nodeDetail.className"
  843. placeholder="请选择"
  844. class="w-100p"
  845. @change="changeStandType"
  846. clearable
  847. >
  848. <el-option
  849. v-for="item in standardTypeOptions"
  850. :key="item.id"
  851. :label="item.dictValue"
  852. :value="item.dictKey"
  853. ></el-option>
  854. </el-select>
  855. </el-form-item>
  856. <el-form-item label="单元名称">
  857. <el-select
  858. v-model="nodeDetail.unitName"
  859. placeholder="请选择"
  860. class="w-100p"
  861. clearable
  862. >
  863. <el-option
  864. v-for="item in unitOptions"
  865. :key="item.id"
  866. :label="item.dictValue"
  867. :value="item.dictKey"
  868. ></el-option>
  869. </el-select>
  870. </el-form-item>
  871. <el-form-item
  872. label="是否新增中隐藏"
  873. prop="isAddConceal"
  874. v-if="wbsType !== 2 && wbsType !== 5"
  875. >
  876. <el-radio-group v-model="nodeDetail.isAddConceal" size="small">
  877. <el-radio :label="1" border>是</el-radio>
  878. <el-radio :label="0" border>否</el-radio>
  879. </el-radio-group>
  880. </el-form-item>
  881. <el-form-item
  882. label="勾选相关联试验"
  883. prop="mixRatioTestIds"
  884. v-if="wbsType === 2 && nodeDetail.nodeType === 53"
  885. >
  886. <div
  887. style="position: relative; height: 300px; border: 1px solid #dddfe6"
  888. >
  889. <el-scrollbar class="h-100p">
  890. <div v-loading="testTreeLoad">
  891. <el-tree
  892. class="filter-tree"
  893. :data="testTreeData"
  894. :props="defaultProps"
  895. :expand-on-click-node="false"
  896. highlight-current
  897. node-key="id"
  898. ref="treeall"
  899. show-checkbox
  900. :default-checked-keys="mixRatioTestIds"
  901. @check="TestTreeCheckChange"
  902. />
  903. </div>
  904. </el-scrollbar>
  905. </div>
  906. </el-form-item>
  907. </el-form>
  908. <span slot="footer" class="dialog-footer">
  909. <el-button @click="dialogVisible = false">取 消</el-button>
  910. <el-button type="primary" @click="saveNode" :loading="saveNodeLoading"
  911. >确 定</el-button
  912. >
  913. </span>
  914. </el-dialog>
  915. <!-- 创建新的元素表 -->
  916. <el-dialog
  917. title="创建新的元素表"
  918. :visible.sync="eleVisible"
  919. width="80%"
  920. append-to-body
  921. :close-on-click-modal="false"
  922. >
  923. <el-form
  924. ref="eleDialog"
  925. :model="eleForm"
  926. :rules="eleRules"
  927. label-width="110px"
  928. >
  929. <el-form-item label="表名" prop="nodeName">
  930. <el-input v-model="eleForm.nodeName"></el-input>
  931. </el-form-item>
  932. <el-row>
  933. <el-col :span="12">
  934. <el-form-item label="表类型" prop="tableType">
  935. <el-select
  936. v-model="eleForm.tableType"
  937. placeholder="请选择"
  938. class="w-100p"
  939. >
  940. <el-option
  941. v-for="item in tableTypelist"
  942. :key="item.id"
  943. :label="item.dictValue"
  944. :value="item.dictKey"
  945. ></el-option>
  946. </el-select>
  947. </el-form-item>
  948. </el-col>
  949. <el-col :span="12">
  950. <el-form-item label="所属方" prop="tableOwner">
  951. <el-select
  952. v-model="eleForm.tableOwner"
  953. placeholder="请选择"
  954. class="w-100p"
  955. >
  956. <el-option
  957. v-for="item in ownerTypeList"
  958. :key="item.id"
  959. :label="item.dictValue"
  960. :value="item.dictKey"
  961. ></el-option>
  962. </el-select>
  963. </el-form-item>
  964. </el-col>
  965. </el-row>
  966. </el-form>
  967. <div class="flex jc-sb">
  968. <div></div>
  969. <div>
  970. <el-link type="primary" @click="importVisible = true"
  971. >快捷导入
  972. </el-link>
  973. <el-link type="primary" class="mg-l-20" @click="downloadTmp"
  974. >下载导入模版
  975. </el-link>
  976. </div>
  977. </div>
  978. <div class="border-grey">
  979. <p class="font-c-warning">编辑元素信息(请谨慎操作)</p>
  980. <el-table
  981. :data="eleForm.elementList"
  982. border
  983. style="width: 100%"
  984. height="400px"
  985. >
  986. <el-table-column
  987. align="center"
  988. type="index"
  989. width="50"
  990. ></el-table-column>
  991. <el-table-column align="center" prop="eName" label="字段名称">
  992. <template slot-scope="scope">
  993. <el-input
  994. v-model="scope.row.eName"
  995. size="small"
  996. placeholder="请输入内容"
  997. ></el-input>
  998. </template>
  999. </el-table-column>
  1000. <el-table-column
  1001. align="center"
  1002. prop="eType"
  1003. label="数据类型"
  1004. width="120"
  1005. >
  1006. <template slot-scope="scope">
  1007. <el-select
  1008. v-model="scope.row.eType"
  1009. size="small"
  1010. placeholder="请选择"
  1011. >
  1012. <el-option
  1013. v-for="item in dataTypeList"
  1014. :key="item.id"
  1015. :label="item.dictValue"
  1016. :value="item.dictKey"
  1017. ></el-option>
  1018. </el-select>
  1019. </template>
  1020. </el-table-column>
  1021. <el-table-column
  1022. align="center"
  1023. prop="eLength"
  1024. label="长度"
  1025. width="120"
  1026. >
  1027. <template slot-scope="scope">
  1028. <el-input
  1029. v-model="scope.row.eLength"
  1030. size="small"
  1031. placeholder="请输入内容"
  1032. :disabled="scope.row.eType == 4"
  1033. ></el-input>
  1034. </template>
  1035. </el-table-column>
  1036. <el-table-column
  1037. align="center"
  1038. prop="eAllowDeviation"
  1039. label="允许偏差值"
  1040. >
  1041. <template slot-scope="scope">
  1042. <div class="flex">
  1043. <el-select
  1044. v-model="scope.row.allow"
  1045. size="small"
  1046. placeholder="请选择"
  1047. style="width: 120px"
  1048. >
  1049. <el-option :key="1" label="≥" value="≥"></el-option>
  1050. <el-option :key="2" label="≤" value="≤"></el-option>
  1051. <el-option :key="3" label="±" value="±"></el-option>
  1052. <el-option :key="4" label="【】" value="【】"></el-option>
  1053. </el-select>
  1054. <el-input
  1055. v-model="scope.row.deviation"
  1056. size="small"
  1057. placeholder="请输入内容"
  1058. ></el-input>
  1059. </div>
  1060. </template>
  1061. </el-table-column>
  1062. <el-table-column
  1063. align="center"
  1064. prop="eInspectionMethod"
  1065. label="检查方法和频率"
  1066. >
  1067. <template slot-scope="scope">
  1068. <el-input
  1069. v-model="scope.row.eInspectionMethod"
  1070. size="small"
  1071. placeholder="请输入内容"
  1072. ></el-input>
  1073. </template>
  1074. </el-table-column>
  1075. <el-table-column align="center" label="操作" width="80">
  1076. <template slot="header">
  1077. <el-button
  1078. @click="addEleRow(eleForm.elementList)"
  1079. type="text"
  1080. icon="el-icon-circle-plus-outline"
  1081. class="text-icon"
  1082. ></el-button>
  1083. </template>
  1084. <template slot-scope="scope">
  1085. <el-button
  1086. icon="el-icon-remove-outline"
  1087. type="text"
  1088. @click="delEleRow(scope.$index, eleForm.elementList)"
  1089. class="text-icon text-icon-danger"
  1090. ></el-button>
  1091. </template>
  1092. </el-table-column>
  1093. </el-table>
  1094. </div>
  1095. <span slot="footer" class="dialog-footer">
  1096. <el-button @click="eleVisible = false">取 消</el-button>
  1097. <el-button type="primary" @click="saveFormAndElementHandle"
  1098. >保 存</el-button
  1099. >
  1100. </span>
  1101. </el-dialog>
  1102. <!-- 模板导入 -->
  1103. <el-dialog
  1104. title="模版导入"
  1105. :visible.sync="importVisible"
  1106. width="50%"
  1107. append-to-body
  1108. :close-on-click-modal="false"
  1109. >
  1110. <p>
  1111. 提示:必须按照系统要求的模版格式上传,否则系统识别无效
  1112. <el-link type="primary" @click="downloadTmp">下载导入模版</el-link>
  1113. </p>
  1114. <div>
  1115. <el-button size="small" type="primary" @click="fileClick2"
  1116. >本地上传
  1117. </el-button>
  1118. <input
  1119. @change="tmpImport"
  1120. type="file"
  1121. hidden
  1122. ref="file2"
  1123. accept=".xls, .xlsx"
  1124. />
  1125. </div>
  1126. <el-table :data="tempList" border style="width: 100%">
  1127. <el-table-column align="center" prop="eName" label="字段信息">
  1128. </el-table-column>
  1129. <el-table-column
  1130. align="center"
  1131. prop="eType"
  1132. label="数据类型"
  1133. width="120"
  1134. >
  1135. </el-table-column>
  1136. <el-table-column align="center" prop="eLength" label="长度" width="120">
  1137. </el-table-column>
  1138. <el-table-column
  1139. align="center"
  1140. prop="eAllowDeviation"
  1141. label="允许偏差值"
  1142. >
  1143. </el-table-column>
  1144. <el-table-column
  1145. align="center"
  1146. prop="eInspectionMethod"
  1147. label="检查方法和频率"
  1148. >
  1149. </el-table-column>
  1150. </el-table>
  1151. <span slot="footer" class="dialog-footer">
  1152. <el-button @click="importVisible = false">取 消</el-button>
  1153. <el-button type="primary" @click="importHandle">确 定</el-button>
  1154. </span>
  1155. </el-dialog>
  1156. <!-- 预览元素 -->
  1157. <el-dialog
  1158. :title="(curEleTable.tableName ? curEleTable.tableName : '') + ''"
  1159. :visible.sync="editEleVisible"
  1160. width="80%"
  1161. append-to-body
  1162. :close-on-click-modal="false"
  1163. >
  1164. <!-- <p class="font-c-warning">编辑元素信息(请谨慎操作)</p> -->
  1165. <el-table :data="editEleList" border style="width: 100%" height="400px">
  1166. <el-table-column
  1167. align="center"
  1168. type="index"
  1169. width="50"
  1170. ></el-table-column>
  1171. <el-table-column align="center" prop="eName" label="字段信息">
  1172. </el-table-column>
  1173. <el-table-column
  1174. align="center"
  1175. prop="eType"
  1176. label="数据类型"
  1177. width="120"
  1178. :formatter="eTypeFormatter"
  1179. >
  1180. </el-table-column>
  1181. <el-table-column align="center" prop="eLength" label="长度" width="120">
  1182. </el-table-column>
  1183. <el-table-column
  1184. align="center"
  1185. prop="eAllowDeviation"
  1186. label="允许偏差值"
  1187. >
  1188. </el-table-column>
  1189. <el-table-column
  1190. align="center"
  1191. prop="eInspectionMethod"
  1192. label="检查方法和频率"
  1193. >
  1194. </el-table-column>
  1195. </el-table>
  1196. <span slot="footer" class="dialog-footer">
  1197. <el-button @click="editEleVisible = false">取 消</el-button>
  1198. <!-- <el-button
  1199. type="primary"
  1200. @click="saveEles"
  1201. >确 定</el-button> -->
  1202. </span>
  1203. </el-dialog>
  1204. <!-- 元素公式 -->
  1205. <el-dialog
  1206. :title="
  1207. (curEleTable.tableName ? curEleTable.tableName : '') + ' 元素公式'
  1208. "
  1209. :visible.sync="editEleFormulaVisible"
  1210. width="800px"
  1211. append-to-body
  1212. :close-on-click-modal="false"
  1213. >
  1214. <div class="flex mg-b-10">
  1215. <el-input
  1216. v-model="formulaInput"
  1217. placeholder="请输入名称"
  1218. size="samll"
  1219. clearable
  1220. @clear="searchFormulaName"
  1221. ></el-input>
  1222. <el-button type="info" class="mg-l-10" @click="searchFormulaName"
  1223. >搜索
  1224. </el-button>
  1225. </div>
  1226. <el-table
  1227. :data="editEleListFilter"
  1228. border
  1229. style="width: 100%"
  1230. height="400px"
  1231. >
  1232. <el-table-column align="center" prop="eName" label="字段信息">
  1233. </el-table-column>
  1234. <el-table-column align="center" label="操作" width="200">
  1235. <template slot-scope="scope">
  1236. <el-link
  1237. :type="scope.row.globalFormula == 1 ? 'warning' : 'primary'"
  1238. @click="toFormulaEdit(scope.row, 10)"
  1239. >全局公式
  1240. </el-link>
  1241. <el-link
  1242. v-show="scope.row.hasPartFormula"
  1243. class="mg-l-10"
  1244. :type="scope.row.isSaveFormula == 1 ? 'warning' : 'primary'"
  1245. @click="toFormulaEdit(scope.row, 20)"
  1246. >节点公式
  1247. </el-link>
  1248. <!-- <el-link
  1249. class="mg-l-10"
  1250. type="danger"
  1251. @click="delEleRowHandle(scope.$index,editEleListFilter)"
  1252. >删除</el-link> -->
  1253. </template>
  1254. </el-table-column>
  1255. </el-table>
  1256. </el-dialog>
  1257. <!-- 导入划分 -->
  1258. <el-dialog
  1259. title="导入划分"
  1260. :visible.sync="importTemplateVisible"
  1261. width="800px"
  1262. append-to-body
  1263. :close-on-click-modal="false"
  1264. >
  1265. <div v-loading="importLoading">
  1266. <div>
  1267. <el-link type="primary" @click="handleDownload">下载导入模版</el-link>
  1268. </div>
  1269. <div class="mg-t-20">
  1270. <el-button type="primary" @click="fileClick">选择文件</el-button>
  1271. <span v-if="upFile" class="mg-l-20">{{ upFile.name }}</span>
  1272. <input
  1273. @change="fileChange"
  1274. type="file"
  1275. hidden
  1276. ref="file"
  1277. accept=".xls, .xlsx"
  1278. />
  1279. </div>
  1280. <div v-if="!upFile">当前还未选择文件,请选择需要导入的文件</div>
  1281. </div>
  1282. <span slot="footer" class="dialog-footer">
  1283. <el-button @click="importTemplateVisible = false">取 消</el-button>
  1284. <el-button
  1285. type="primary"
  1286. @click="importTemplateHandle"
  1287. :loading="importLoading"
  1288. >导 入</el-button
  1289. >
  1290. </span>
  1291. </el-dialog>
  1292. <!-- 节点参数 -->
  1293. <el-dialog
  1294. title="节点参数"
  1295. :visible.sync="nodeInfoVisible"
  1296. width="800px"
  1297. append-to-body
  1298. class="jiedian"
  1299. :close-on-click-modal="false"
  1300. :show-close="false"
  1301. @close="closenodeInfoVisible"
  1302. >
  1303. <div>
  1304. <el-button
  1305. type="text"
  1306. icon="el-icon-s-operation"
  1307. class="right-btn"
  1308. @click="setNodeParameters()"
  1309. ></el-button>
  1310. <div class="flexEnd">
  1311. <i
  1312. class="el-icon-circle-plus marbottom10"
  1313. @click="addNodeInfoTable()"
  1314. style="font-size: 24px; color: rgb(37, 193, 99); cursor: pointer"
  1315. ></i>
  1316. <i
  1317. class="el-icon-refresh-right marbottom10"
  1318. @click="refreshnfoTable()"
  1319. style="font-size: 24px; color: rgb(37, 193, 99); cursor: pointer"
  1320. ></i>
  1321. </div>
  1322. <el-table
  1323. :data="nodeInfoTable"
  1324. border
  1325. style="width: 100%"
  1326. height="400"
  1327. v-loading="nodeInfoTableLoad"
  1328. >
  1329. <el-table-column align="center" prop="name" label="参数名称">
  1330. <template slot-scope="scope">
  1331. <el-select
  1332. v-model="scope.row.k"
  1333. placeholder="请选择"
  1334. class="w-100p"
  1335. >
  1336. <el-option
  1337. v-for="item in namelist"
  1338. :key="item.k"
  1339. :label="item.name"
  1340. :value="item.k"
  1341. ></el-option>
  1342. </el-select>
  1343. </template>
  1344. </el-table-column>
  1345. <el-table-column align="center" prop="value" label="参数值设置">
  1346. <template slot-scope="scope">
  1347. <el-input v-model="scope.row.v"></el-input>
  1348. </template>
  1349. </el-table-column>
  1350. <el-table-column align="center" prop="describe" label="描述">
  1351. <template slot-scope="scope">
  1352. <el-input v-model="scope.row.remark"></el-input>
  1353. </template>
  1354. </el-table-column>
  1355. <el-table-column label="操作" width="120" align="center">
  1356. <template slot-scope="scope">
  1357. <el-button
  1358. type="text"
  1359. size="small"
  1360. class="text-icon-primary"
  1361. @click="linkEle(scope.row)"
  1362. >关联元素
  1363. </el-button>
  1364. <el-button
  1365. type="text"
  1366. size="small"
  1367. class="text-icon-danger"
  1368. @click="delNodeInfoss(scope.$index, scope.row)"
  1369. >删除
  1370. </el-button>
  1371. </template>
  1372. </el-table-column>
  1373. </el-table>
  1374. </div>
  1375. <span slot="footer" class="dialog-footer">
  1376. <el-button @click="nodeInfoVisible = false">取 消</el-button>
  1377. <el-button
  1378. type="primary"
  1379. @click="nodeInfoSave()"
  1380. :loading="nodeInfoSaveload"
  1381. >保 存</el-button
  1382. >
  1383. </span>
  1384. </el-dialog>
  1385. <!-- 设置参数名称 -->
  1386. <el-dialog
  1387. title="设置参数名称"
  1388. :visible.sync="infoNameVisible"
  1389. width="800px"
  1390. append-to-body
  1391. class="jiedian"
  1392. :close-on-click-modal="false"
  1393. >
  1394. <div>
  1395. <div class="flexEnd">
  1396. <i
  1397. class="el-icon-circle-plus marbottom10"
  1398. @click="setParameterName()"
  1399. style="font-size: 24px; color: rgb(37, 193, 99); cursor: pointer"
  1400. ></i>
  1401. </div>
  1402. <el-table :data="namelists" border style="width: 100%" height="400">
  1403. <el-table-column align="center" prop="name" label="参数名称">
  1404. <template slot-scope="scope">
  1405. <el-input v-model="scope.row.name"></el-input>
  1406. </template>
  1407. </el-table-column>
  1408. <el-table-column align="center" prop="key" label="参数值KEY">
  1409. <template slot-scope="scope">
  1410. <el-input v-model="scope.row.k"></el-input>
  1411. </template>
  1412. </el-table-column>
  1413. <el-table-column align="center" prop="describe" label="描述">
  1414. <template slot-scope="scope">
  1415. <el-input v-model="scope.row.remark"></el-input>
  1416. </template>
  1417. </el-table-column>
  1418. <el-table-column label="操作" width="120" align="center">
  1419. <template slot-scope="scope">
  1420. <el-button
  1421. type="text"
  1422. size="small"
  1423. class="text-icon-danger"
  1424. @click="delNodeInfo(scope.$index, scope.row)"
  1425. >删除
  1426. </el-button>
  1427. </template>
  1428. </el-table-column>
  1429. </el-table>
  1430. </div>
  1431. <span slot="footer" class="dialog-footer">
  1432. <el-button @click="addParameterName()">保 存</el-button>
  1433. <el-button @click="closeParameter()">关 闭</el-button>
  1434. </span>
  1435. </el-dialog>
  1436. <el-dialog
  1437. title="别名"
  1438. :visible.sync="aliasVisible"
  1439. width="600px"
  1440. append-to-body
  1441. :close-on-click-modal="false"
  1442. >
  1443. <div>
  1444. <div class="flex">
  1445. <el-input
  1446. v-model="aliasInput"
  1447. placeholder="请输入节点别名"
  1448. ></el-input>
  1449. <el-button class="mg-l-20" type="primary" @click="addAlias"
  1450. >添加
  1451. </el-button>
  1452. </div>
  1453. <div class="flex" style="flex-wrap: wrap">
  1454. <div class="mg-t-10" v-for="(tag, index) in aliasArr" :key="index">
  1455. <el-tag closable @close="delAlias(index)">
  1456. {{ tag }}
  1457. </el-tag>
  1458. <span v-if="index != aliasArr.length - 1">、</span>
  1459. </div>
  1460. </div>
  1461. </div>
  1462. <span slot="footer" class="dialog-footer">
  1463. <el-button @click="aliasVisible = false">取 消</el-button>
  1464. <el-button type="primary" @click="saveAliasHandle">确 定</el-button>
  1465. </span>
  1466. </el-dialog>
  1467. <!-- 节点公式 -->
  1468. <el-dialog
  1469. :title="
  1470. (curEleTable.tableName ? curEleTable.tableName : '') +
  1471. ' 元素公式(元素库)'
  1472. "
  1473. :visible.sync="formulaCompVisible"
  1474. fullscreen
  1475. append-to-body
  1476. class="full-dialog"
  1477. @close="closeformulaComp"
  1478. >
  1479. <FormulaEdit
  1480. :fromcurNode="curTreeData"
  1481. :projectid="projectid"
  1482. :wbsid="id"
  1483. :nodeid="curTreeData.id"
  1484. :eleid="formulaCurRow.id"
  1485. :globaltype="formulaCurRow.globaltype"
  1486. :iswbstype="0"
  1487. @hideDialog="formulaCompVisible = false"
  1488. v-if="formulaCompVisible"
  1489. ></FormulaEdit>
  1490. </el-dialog>
  1491. <!-- 全局公式 -->
  1492. <el-dialog
  1493. title=""
  1494. :visible.sync="formulaCompVisible1"
  1495. fullscreen
  1496. append-to-body
  1497. class="full-dialog"
  1498. @close="closeformulaComp1"
  1499. >
  1500. <FormulaEditone
  1501. :wbsid="id"
  1502. :nodeid="curTreeData.id"
  1503. :eleid="formulaCurRow.id"
  1504. :elementType="formulaCurRow.elementType"
  1505. :projectid="projectid"
  1506. :tableType="istableType"
  1507. :globaltype="formulaCurRow.globaltype"
  1508. @hideDialog="formulaCompVisible1 = false"
  1509. :fromcurNode="curEleTable"
  1510. :iswbstype="0"
  1511. v-if="formulaCompVisible1"
  1512. >
  1513. </FormulaEditone>
  1514. </el-dialog>
  1515. <!-- 编辑元素 -->
  1516. <el-dialog
  1517. title=" "
  1518. :visible.sync="editElementVisible"
  1519. fullscreen
  1520. append-to-body
  1521. class="full-dialog"
  1522. >
  1523. <EditElement
  1524. :editElementQuery="curTreeData"
  1525. :pkeyId="editElementQuery.pkeyId"
  1526. :excelId="editElementQuery.excelId"
  1527. :id="editElementQuery.id"
  1528. :initTableName="editElementQuery.initTableName"
  1529. :pid="editElementQuery.pid"
  1530. :wbsid="editElementQuery.wbsid"
  1531. :initTableId="editElementQuery.initTableId"
  1532. :nodeid="editElementQuery.nodeid"
  1533. @hideDialog="editElementVisible = false"
  1534. @adjustExcel="adjustExcel"
  1535. v-if="editElementVisible"
  1536. ></EditElement>
  1537. </el-dialog>
  1538. <el-dialog
  1539. title="节点参数设置-关联元素"
  1540. :visible.sync="linkEleVisible"
  1541. width="800px"
  1542. append-to-body
  1543. class="jiedian"
  1544. :close-on-click-modal="false"
  1545. >
  1546. <div>
  1547. <el-table
  1548. :data="linkEleTableList"
  1549. border
  1550. style="width: 100%"
  1551. height="400"
  1552. >
  1553. <el-table-column align="center" prop="tableName" label="元素表名">
  1554. </el-table-column>
  1555. <el-table-column
  1556. align="center"
  1557. prop="elementName"
  1558. label="关联元素字段"
  1559. >
  1560. </el-table-column>
  1561. <el-table-column label="操作" width="160" align="center">
  1562. <template slot-scope="scope">
  1563. <el-button
  1564. v-if="!scope.row.mappingId"
  1565. type="text"
  1566. size="small"
  1567. class="text-icon-primary"
  1568. @click="tolinkEle(scope.row)"
  1569. >选择元素
  1570. </el-button>
  1571. <el-button
  1572. v-if="!!scope.row.mappingId"
  1573. type="text"
  1574. size="small"
  1575. class="text-icon-danger"
  1576. @click="delLink(scope.row)"
  1577. >删除关联
  1578. </el-button>
  1579. </template>
  1580. </el-table-column>
  1581. </el-table>
  1582. </div>
  1583. <span slot="footer" class="dialog-footer">
  1584. <!-- <el-button @click="saveLinks">保 存</el-button> -->
  1585. <el-button @click="linkEleVisible = false">关 闭</el-button>
  1586. </span>
  1587. </el-dialog>
  1588. <el-dialog
  1589. title="选择关联元素"
  1590. :visible.sync="linkCheckVisible"
  1591. width="600px"
  1592. append-to-body
  1593. class="jiedian"
  1594. :close-on-click-modal="false"
  1595. >
  1596. <div>
  1597. <div class="flex mg-b-20">
  1598. <el-input
  1599. v-model="linkEleKey"
  1600. placeholder="请输入元素关键字搜索"
  1601. ></el-input>
  1602. <el-link class="mg-l-20" :underline="false">
  1603. <i
  1604. class="el-icon-search"
  1605. style="font-size: 20px"
  1606. @click="searchEle"
  1607. ></i>
  1608. </el-link>
  1609. </div>
  1610. <el-table :data="linkEleList" border style="width: 100%" height="400">
  1611. <el-table-column align="center" prop="eName" label="元素名">
  1612. </el-table-column>
  1613. <el-table-column label="操作" width="55">
  1614. <template slot-scope="scope">
  1615. <el-checkbox
  1616. v-model="scope.row.checked"
  1617. @change="(value) => linkEleCheck(value, scope.$index)"
  1618. ></el-checkbox>
  1619. </template>
  1620. </el-table-column>
  1621. </el-table>
  1622. </div>
  1623. <span slot="footer" class="dialog-footer">
  1624. <el-button @click="saveLinkEle">保 存</el-button>
  1625. <el-button @click="linkCheckVisible = false">关 闭</el-button>
  1626. </span>
  1627. </el-dialog>
  1628. <!-- 关联节点 -->
  1629. <el-dialog
  1630. title="关联节点"
  1631. :visible="isLinkNodes"
  1632. append-to-body
  1633. center
  1634. destroy-on-close
  1635. custom-class="hc-link-nodes-dialog"
  1636. @close="linkNodesClose"
  1637. >
  1638. <el-tree
  1639. ref="tree2"
  1640. class="hc-link-nodes-tree"
  1641. lazy
  1642. :load="loadNode"
  1643. :props="defaultProps"
  1644. show-checkbox
  1645. check-strictly
  1646. :default-checked-keys="checkedLinkNodesKeys"
  1647. highlight-current
  1648. node-key="primaryKeyId"
  1649. />
  1650. <span slot="footer" class="dialog-footer">
  1651. <el-button @click="linkNodesClose">取 消</el-button>
  1652. <el-button
  1653. type="primary"
  1654. @click="linkNodesSave"
  1655. v-loading="linkNodesLoad"
  1656. >确 定</el-button
  1657. >
  1658. </span>
  1659. </el-dialog>
  1660. <!-- 编辑 -->
  1661. <el-dialog
  1662. :title="(curEleTable.tableName ? curEleTable.tableName : '') + ''"
  1663. :visible.sync="editDialogShow"
  1664. width="80%"
  1665. append-to-body
  1666. :close-on-click-modal="false"
  1667. >
  1668. <p class="font-c-warning">编辑元素信息(请谨慎操作)</p>
  1669. <div style="display: flex; margin-bottom: 10px">
  1670. <el-input
  1671. placeholder="请输入你想编辑的元素名称"
  1672. v-model="searchinput"
  1673. :size="size"
  1674. clearable
  1675. @clear="clearsearchinput"
  1676. >
  1677. </el-input>
  1678. <el-button
  1679. type="primary"
  1680. icon="el-icon-search"
  1681. size="small"
  1682. @click="searchinputChange"
  1683. >搜索</el-button
  1684. >
  1685. </div>
  1686. <el-table
  1687. :data="editTable"
  1688. border
  1689. style="width: 100%"
  1690. height="400px"
  1691. v-loading="editEleTableloading"
  1692. >
  1693. <el-table-column
  1694. align="center"
  1695. type="index"
  1696. width="50"
  1697. ></el-table-column>
  1698. <el-table-column align="center" prop="eName" label="元素名称">
  1699. <template slot="header">
  1700. <i class="required"></i>
  1701. <span>元素名称</span>
  1702. </template>
  1703. <template slot-scope="scope">
  1704. <el-input
  1705. v-model="scope.row.eName"
  1706. size="small"
  1707. placeholder="请输入内容"
  1708. ></el-input>
  1709. </template>
  1710. </el-table-column>
  1711. <el-table-column align="center" prop="dynamicDict" label="动态字典">
  1712. <template slot="header">
  1713. <span>动态字典</span>
  1714. </template>
  1715. <template slot-scope="scope">
  1716. <el-select
  1717. v-model="scope.row.dynamicDict"
  1718. filterable
  1719. size="small"
  1720. placeholder="请选择"
  1721. >
  1722. <el-option
  1723. v-for="item in dynamicDictList"
  1724. :key="item.id"
  1725. :label="item.dictValue"
  1726. :value="item.dictKey"
  1727. ></el-option>
  1728. </el-select>
  1729. </template>
  1730. </el-table-column>
  1731. </el-table>
  1732. <span slot="footer" class="dialog-footer">
  1733. <el-button @click="editDialogShow = false">取 消</el-button>
  1734. <el-button type="primary" @click="saveEles" :loading="saveLoading"
  1735. >确 定</el-button
  1736. >
  1737. </span>
  1738. </el-dialog>
  1739. <!-- 文件题名全局配置 -->
  1740. <el-dialog
  1741. title="文件题名全局配置"
  1742. :visible.sync="fileTitleVisible"
  1743. width="60%"
  1744. append-to-body
  1745. :close-on-click-modal="false"
  1746. >
  1747. <div class="flexEnd">
  1748. <i
  1749. class="el-icon-circle-plus "
  1750. style="font-size: 24px; color: rgb(37, 193, 99); cursor: pointer"
  1751. @click="addRow"
  1752. ></i>
  1753. <i
  1754. class="el-icon-refresh "
  1755. style="font-size: 24px; color: rgb(37, 193, 99); cursor: pointer"
  1756. @click="refreshRow"
  1757. ></i>
  1758. </div>
  1759. <el-table
  1760. :data="fileTableData"
  1761. style="width: 100%;height: 500px;"
  1762. align="center"
  1763. v-loading="fileTableLoading"
  1764. >
  1765. <el-table-column
  1766. label="文件题名规则"
  1767. prop="roleNameVal">
  1768. <template #default="scope">
  1769. <el-select
  1770. :id="selectDiv"
  1771. v-if="scope.row.isEdit"
  1772. v-model="scope.row.ruleName"
  1773. multiple
  1774. placeholder="请选择"
  1775. style="width: 240px"
  1776. @change="changeRoleName($event,scope.row,scope.index)"
  1777. >
  1778. <el-option
  1779. v-for="item in nodeTypelist1"
  1780. :key="item.id"
  1781. :label="item.dictValue"
  1782. :value="item.dictKey"
  1783. ></el-option>
  1784. </el-select>
  1785. <span v-else>
  1786. <el-tag v-for="item in scope.row.roleNameVal" style="margin-right: 2px;">{{ item }}</el-tag>
  1787. </span>
  1788. </template>
  1789. </el-table-column>
  1790. <el-table-column
  1791. label="文件题名范围"
  1792. prop="ruleSizeVal"
  1793. >
  1794. <template #default="scope">
  1795. <div v-if="isShowSize">
  1796. <span v-if="scope.row.type===1" :class="{'orange': scope.row.isEdit}" @click="chooseFile(scope.$index, scope.row)">所有节点</span>
  1797. <div v-else>
  1798. <el-link type="warning" @click="chooseFile(scope.$index, scope.row)" v-if="!scope.row.ruleSizeVal">选择题名范围</el-link>
  1799. <span v-else @click="chooseFile(scope.$index, scope.row)" :class="{'orange': scope.row.isEdit}">{{ scope.row.ruleSizeVal }}</span>
  1800. </div>
  1801. </div>
  1802. </template>
  1803. </el-table-column>
  1804. <el-table-column
  1805. label="操作"
  1806. width="150px"
  1807. >
  1808. <template slot-scope="scope">
  1809. <el-link
  1810. v-if="!scope.row.isEdit"
  1811. type="primary"
  1812. class="mg-r-10"
  1813. @click="editRow(scope.$index, scope.row)">编辑</el-link>
  1814. <el-link
  1815. v-else
  1816. type="primary"
  1817. class="mg-r-10"
  1818. @click="saveRow(scope.$index, scope.row)">保存</el-link>
  1819. <el-link
  1820. @click="delRow(scope.$index, scope.row)"
  1821. type="danger"
  1822. >删除</el-link>
  1823. </template>
  1824. </el-table-column>
  1825. </el-table>
  1826. <template #footer>
  1827. <div class="dialog-footer">
  1828. <el-button @click="fileTitleVisible=false">取消</el-button>
  1829. <el-button type="primary" @click="batchsaveFileSize" :loading="saveFileLoading">
  1830. 保存
  1831. </el-button>
  1832. </div>
  1833. </template>
  1834. </el-dialog>
  1835. <!-- 选择题名范围i -->
  1836. <el-dialog
  1837. :visible.sync="chooseFileVisible"
  1838. title="选择题名范围"
  1839. width="500"
  1840. align-center
  1841. append-to-body
  1842. >
  1843. <el-form label-position="left" label-width="80px" :model="fileTitleModel" :rules="fileTitleRules" ref="fileTitleRef">
  1844. <el-form-item label="题名范围" prop="type">
  1845. <el-radio v-model="fileTitleModel.type" :label="1" @input="changeRadio">所有节点</el-radio><br/>
  1846. <el-radio v-model="fileTitleModel.type" :label="2" @input="changeRadio">部分节点</el-radio>
  1847. <div v-if="fileTitleModel.type==2" class="warning-text">请选择节点</div>
  1848. <el-scrollbar class="h-100p" style="height: 400px;" v-if="fileTitleModel.type==2" v-loading="fileTreeLoading">
  1849. <el-tree
  1850. :data="fileTreeData"
  1851. :props="filedefaultProps"
  1852. :expand-on-click-node="false"
  1853. highlight-current
  1854. node-key="id"
  1855. show-checkbox
  1856. @check="checkFileSize"
  1857. :default-checked-keys="deCheckTreeKeys"
  1858. >
  1859. </el-tree>
  1860. </el-scrollbar>
  1861. </el-form-item>
  1862. </el-form>
  1863. <template #footer>
  1864. <div class="dialog-footer">
  1865. <el-button @click="chooseFileVisible=false">取消</el-button>
  1866. <el-button type="primary" @click="saveFileSize">
  1867. 保存
  1868. </el-button>
  1869. </div>
  1870. </template>
  1871. </el-dialog>
  1872. <!-- 项目数据同步 -->
  1873. <el-dialog
  1874. :visible.sync="proSyncTag"
  1875. width="80%"
  1876. append-to-body
  1877. @close=closeProSyncTag
  1878. >
  1879. <span slot="title" class="dialog-title">
  1880. <div class="dialog-title-text">项目数据同步</div>
  1881. <span class="dialog-title-tip">重新同步项目下所有配置,不保留独有配置,慎重同步!!!</span>
  1882. </span>
  1883. <div class="sync-container">
  1884. <el-card class="box-card-1" :style="{ width: isShowLeft ? '40%' : '0%' }">
  1885. <el-scrollbar style="height: 100%;">
  1886. <div v-loading="treeLoad">
  1887. <el-tree
  1888. check-strictly
  1889. class="filter-tree"
  1890. lazy
  1891. :load="loadNode"
  1892. show-checkbox
  1893. :props="defaultProps"
  1894. :expand-on-click-node="false"
  1895. highlight-current
  1896. node-key="primaryKeyId"
  1897. @check="handleCheckChange"
  1898. @check-change="handleCheckChange1"
  1899. ref="syncProTree"
  1900. >
  1901. </el-tree>
  1902. </div>
  1903. </el-scrollbar>
  1904. </el-card>
  1905. <el-card class="box-card-2">
  1906. <el-form ref="syncForm" :model="syncForm" label-position="top">
  1907. <el-form-item label="同步范围" v-if="!isShowTable">
  1908. <el-radio-group v-model="syncForm.range">
  1909. <el-radio
  1910. v-for="item in rangeOptions"
  1911. :key="item.id"
  1912. :label="item.dictKey"
  1913. >{{ item.dictValue}}</el-radio>
  1914. </el-radio-group>
  1915. </el-form-item>
  1916. <el-form-item label="同步类型" prop="type">
  1917. <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  1918. <div style="margin: 15px 0;"></div>
  1919. <el-checkbox-group v-model="syncForm.type" @change="handleCheckedTypeChange">
  1920. <el-checkbox v-for="item in typeOptions" :label="item.dictKey" :key="item.id">{{ item.dictValue}}</el-checkbox>
  1921. </el-checkbox-group>
  1922. </el-form-item>
  1923. <!-- <el-form-item label="选择同步范围(节点状态)" prop="contractRange" v-if="syncForm.range==='2'">
  1924. <el-checkbox-group v-model="syncForm.contractRange">
  1925. <el-checkbox label="全选" name="1"></el-checkbox>
  1926. <el-checkbox v-for="(item,index) in checkIdList" :label="item.dictKey" :key="item.id">{{ item.dictValue}}</el-checkbox>
  1927. </el-checkbox-group>
  1928. </el-form-item> -->
  1929. <el-form-item label="选择同步范围(节点状态)" prop="contractRange" v-if="syncForm.range==='2'">
  1930. <el-checkbox :indeterminate="isIndeterminate1" v-model="checkAll1" @change="handleCheckAllChange1">全选</el-checkbox>
  1931. <div style="margin: 15px 0;"></div>
  1932. <el-checkbox-group v-model="syncForm.contractRange" @change="handleCheckedTypeChange1">
  1933. <el-checkbox v-for="item in checkIdList" :label="item.dictKey" :key="item.id">{{ item.dictValue}}</el-checkbox>
  1934. </el-checkbox-group>
  1935. </el-form-item>
  1936. <el-form-item label="选择同步源" prop="templateId" v-else>
  1937. <el-select v-model="syncForm.templateId" placeholder="请选择同步源" style="width: 100%;" size="small" @change="changeTemplateId">
  1938. <el-option
  1939. v-for="item in templateIdList"
  1940. :key="item.id"
  1941. :label="item.name"
  1942. :value="item.id">
  1943. </el-option>
  1944. </el-select>
  1945. </el-form-item>
  1946. </el-form>
  1947. <div class="table-box" v-if="isShowTable">
  1948. <h4 style="margin-left: 4px;">表单预览</h4>
  1949. <el-table
  1950. size="small"
  1951. ref="proTable"
  1952. :data="preTableData"
  1953. stripe
  1954. style="width: 100%"
  1955. max-height="300"
  1956. @selection-change="handleSelectionChange"
  1957. >
  1958. <el-table-column
  1959. type="selection"
  1960. width="55">
  1961. </el-table-column>
  1962. <el-table-column
  1963. prop="tableName"
  1964. label="表单名称"
  1965. width="180">
  1966. </el-table-column>
  1967. <el-table-column
  1968. prop="tableType"
  1969. :formatter="formatTableType"
  1970. label="表单类型"
  1971. width="180">
  1972. </el-table-column>
  1973. <el-table-column
  1974. prop="tableOwner"
  1975. :formatter="formatOwner"
  1976. label="所属方">
  1977. </el-table-column>
  1978. </el-table>
  1979. </div>
  1980. </el-card>
  1981. </div>
  1982. <span slot="footer" class="dialog-footer">
  1983. <el-button @click="closeProSyncTag">取 消</el-button>
  1984. <el-button type="primary" @click="saveProTag" :loading="saveProTagLoading">确 定</el-button>
  1985. </span>
  1986. </el-dialog>
  1987. <!-- 同步队列 -->
  1988. <el-dialog
  1989. title="同步队列"
  1990. :visible.sync="syncListDialog"
  1991. width="30%"
  1992. append-to-body
  1993. :close-on-click-modal="false"
  1994. >
  1995. <div class="content-box" v-loading="refreshLoading||refreshLoading1">
  1996. <el-image
  1997. style="width: 100px; height: 100px"
  1998. :src="require('@/assets/loader.svg')"
  1999. fit="contain"></el-image>
  2000. <div class="mt-14">同步中</div>
  2001. <div class="mt-14">
  2002. 同步数量{{ syncListData.nodeNum }} 剩余数量{{ syncListData.nodeNumEnd }}
  2003. </div>
  2004. <div class="mt-14">
  2005. <el-button type="primary" @click="syncListDialog=false">好的,我已知晓</el-button>
  2006. </div>
  2007. <div class="mt-14">
  2008. <el-link type="primary" @click="refreshData" v-loading="refreshLoading" v-if="!isAdd">刷新数据</el-link>
  2009. <el-link type="primary" @click="refreshData1" v-loading="refreshLoading1" v-else>刷新数据</el-link>
  2010. </div>
  2011. </div>
  2012. </el-dialog>
  2013. <!-- 同步表单其他配置 -->
  2014. <el-dialog
  2015. title="同步表单其他配置"
  2016. :visible.sync="syncTableDialog"
  2017. width="70%"
  2018. append-to-body
  2019. :close-on-click-modal="false"
  2020. >
  2021. <div class="sync-container">
  2022. <el-card class="box-card-1" :style="{ width: isShowLeft ? '40%' : '0%' }">
  2023. <el-scrollbar style="height: 100%;">
  2024. <div >
  2025. <el-tree
  2026. class="filter-tree"
  2027. lazy
  2028. :load="loadNode"
  2029. @node-click="handleNodeClick"
  2030. :props="defaultProps"
  2031. :expand-on-click-node="false"
  2032. highlight-current
  2033. node-key="primaryKeyId"
  2034. >
  2035. </el-tree>
  2036. </div>
  2037. </el-scrollbar>
  2038. </el-card>
  2039. <el-card class="box-card-2">
  2040. <div class="table-box">
  2041. <h4 style="margin-left: 4px;">表单预览</h4>
  2042. <el-table
  2043. size="small"
  2044. ref="proTable1"
  2045. :data="preTableData1"
  2046. stripe
  2047. style="width: 100%"
  2048. max-height="300"
  2049. @selection-change="handleSelectionChange1"
  2050. >
  2051. <el-table-column
  2052. type="selection"
  2053. width="55">
  2054. </el-table-column>
  2055. <el-table-column
  2056. prop="tableName"
  2057. label="表单名称"
  2058. width="180">
  2059. </el-table-column>
  2060. <el-table-column
  2061. prop="tableType"
  2062. :formatter="formatTableType"
  2063. label="表单类型"
  2064. width="180">
  2065. </el-table-column>
  2066. <el-table-column
  2067. prop="tableOwner"
  2068. :formatter="formatOwner"
  2069. label="所属方">
  2070. </el-table-column>
  2071. </el-table>
  2072. </div>
  2073. </el-card>
  2074. </div>
  2075. <span slot="footer" class="dialog-footer">
  2076. <el-button @click="syncTableDialog = false">取 消</el-button>
  2077. <el-button type="primary" @click="saveTableSync" :loading="saveTableSyncLoad">确 定</el-button>
  2078. </span>
  2079. </el-dialog>
  2080. <!-- 编号设置弹窗 -->
  2081. <CodeSet ref="codeSetRef" ></CodeSet>
  2082. </div>
  2083. </template>
  2084. <script>
  2085. import ManualSorting from "@/components/WbsTree/ManualSorting";
  2086. import dynamicExcel from "./treeTemplate/dynamicExcel.vue";
  2087. import FormulaEdit from "@/views/formula/edit.vue";
  2088. import FormulaEditone from "@/views/formula/edit1.vue";
  2089. import EditElement from "@/views/manager/projectinfo/editElement/editElement.vue";
  2090. import CodeSet from "./codeSet.vue";
  2091. import {
  2092. saveFormAndElement,
  2093. selectFormElements,
  2094. importWbsTree,
  2095. findWbsTreePrivateSameLevel,
  2096. wbsTreePrivateSort,
  2097. parameters,
  2098. saveOrUpdateBatch,
  2099. keymap,
  2100. updateBatchNodeTableInfo2,
  2101. updateStatus,
  2102. getParamElements,
  2103. specifiedParamElements,
  2104. delParamElements,
  2105. selectPrivateFormElements,
  2106. syncCurrentFormInProject,
  2107. getQueryValueByType,
  2108. } from "@/api/manager/wbstree";
  2109. import {
  2110. saveElement,
  2111. remove as removeElement,
  2112. updateBatchElements,
  2113. getTemplate,
  2114. importWbsElement,
  2115. } from "@/api/manager/wbsformelement";
  2116. import {
  2117. getLazytree,
  2118. getDetail,
  2119. update,
  2120. findNodeTableByCondition as selectByNodeTable,
  2121. removeTableByCondition as removeTableById,
  2122. removePrivateTreeNode,
  2123. wbsTreePrivateTableSort,
  2124. privateSubmitFullName,
  2125. syncNodeParam,
  2126. syncProjecteVisa,
  2127. syncNodeTable,
  2128. syncNodeinfo,
  2129. tabTypeLazyTree,
  2130. syncContractTabSort,
  2131. linkNodeTree,
  2132. getLinekNodeTreelist,getNameRule,getTitleRange,saveOrUpdateNameRule,deletedNameRule
  2133. } from "@/api/manager/wbsprivate";
  2134. import { findProjectTree as getAlltree } from "@/api/manager/projectinfo";
  2135. import { refrehPram } from "@/api/manager/wbstree";
  2136. import { getList as getAttchFromOriginalName } from "@/api/resource/attach";
  2137. import { getDictionary, getChildList } from "@/api/system/dict";
  2138. import { mapGetters } from "vuex";
  2139. import {
  2140. getList,
  2141. tabLazytreeAll,
  2142. saveLinkTab,
  2143. getExcelHtml,
  2144. } from "@/api/exctab/excelmodel";
  2145. import { getStore, setStore } from "@/util/store";
  2146. import { getTempProject,addSync,getNodeStatus,getById } from "@/api/manager/ledger";
  2147. import { selectByNodeTable as findNodeTableByCondition1 } from "@/api/manager/wbstree";
  2148. export default {
  2149. data() {
  2150. var checkMajorDataType = (rule, value, callback) => {
  2151. //console.log(this.nodeDetail.nodeType)
  2152. //console.log(this.nodeDetail.majorDataType)
  2153. if (this.nodeDetail.nodeType == 6) {
  2154. if (!this.nodeDetail.majorDataType) {
  2155. callback(new Error("工序节点必须选择内业资料类型"));
  2156. }
  2157. }
  2158. callback();
  2159. };
  2160. return {
  2161. fromcurNode: {},
  2162. formDatass: [],
  2163. editElementFormTag: false,
  2164. editeditElementFormMFLoading: false,
  2165. jiedianId: "",
  2166. //#region
  2167. sortTag: false,
  2168. sortTag2: false,
  2169. sureSortload: false,
  2170. surePrivateSortload: false,
  2171. sort: [],
  2172. //#endregion
  2173. //#region 关联清表
  2174. loading: false,
  2175. GLExcel: false,
  2176. GLExcelFrom: {
  2177. id: "",
  2178. name: "",
  2179. search: "", //搜素框舒服的值
  2180. ids: "",
  2181. excelId: "",
  2182. initTableName: "",
  2183. initTableId: "",
  2184. },
  2185. GLExcelData: [], //
  2186. GLExcelProps: {
  2187. label: "name",
  2188. children: "children",
  2189. disabled: "hasChildren",
  2190. isLeaf: function (data) {
  2191. let tag = false;
  2192. if (!data.hasChildren) {
  2193. tag = true;
  2194. }
  2195. if (data.isExistForm == 1) {
  2196. tag = true;
  2197. }
  2198. return tag;
  2199. },
  2200. },
  2201. exceldata: [], //清表模板
  2202. GLExcelLoading: false,
  2203. //#endregion
  2204. //#region 调整表单
  2205. adjustmentExcel: "",
  2206. excelHtml: false,
  2207. //#endregion
  2208. //#region
  2209. id: "",
  2210. projectid: "",
  2211. filterText: "",
  2212. treeData: [],
  2213. searchType: "1",
  2214. isSearch: false,
  2215. searchTreeData: [],
  2216. searchtreeLoad: false,
  2217. treeLoad: false,
  2218. isShowTree: true,
  2219. menuShow: false,
  2220. defaultProps: {
  2221. children: "children",
  2222. label: "title",
  2223. isLeaf: function (data) {
  2224. //console.log(data, !data.hasChildren, data.isExistForm);
  2225. let tag = false;
  2226. if (!data.hasChildren) {
  2227. tag = true;
  2228. }
  2229. /*if (data.isExistForm == 1) {
  2230. tag = true;
  2231. }*/
  2232. if (data.nodeType >= 6 && data.nodeType <= 13) {
  2233. tag = true;
  2234. }
  2235. //中间交工。开工报告、质量评定)
  2236. if (
  2237. data.majorDataType == 1 ||
  2238. data.majorDataType == 2 ||
  2239. data.majorDataType == 3
  2240. ) {
  2241. tag = true;
  2242. }
  2243. return tag;
  2244. // return !data.hasChildren || (data.isExistForm == 1);
  2245. },
  2246. },
  2247. leftType: 5,
  2248. curTreeData: {},
  2249. curTreeNode: {},
  2250. tableData: [],
  2251. nodeDetail: {},
  2252. formData: [],
  2253. editType: 1,
  2254. dialogVisible: false,
  2255. saveNodeLoading: false,
  2256. nodeTypelist1: [],
  2257. majorDataTypeList: [],
  2258. rules: {
  2259. nodeName: [
  2260. { required: true, message: "请输入节点名称", trigger: "blur" },
  2261. ],
  2262. nodeType: [
  2263. { required: true, message: "请选择节点类型", trigger: "change" },
  2264. ],
  2265. majorDataType: [{ validator: checkMajorDataType, trigger: "change" }],
  2266. isAddConceal: [
  2267. {
  2268. required: true,
  2269. message: "请选择是否新增中隐藏",
  2270. trigger: "change",
  2271. },
  2272. ],
  2273. },
  2274. eleVisible: false,
  2275. tableTypelist: [],
  2276. dataTypeList: [],
  2277. ownerTypeList: [],
  2278. eleForm: {
  2279. elementList: [],
  2280. },
  2281. eleRules: {
  2282. nodeName: [
  2283. { required: true, message: "请输入表名称", trigger: "blur" },
  2284. ],
  2285. tableType: [
  2286. { required: true, message: "请选择表类型", trigger: "change" },
  2287. ],
  2288. tableOwner: [
  2289. { required: true, message: "请选择所属方", trigger: "change" },
  2290. ],
  2291. },
  2292. importVisible: false,
  2293. tempList: [],
  2294. curEleTable: {},
  2295. istableType: true,
  2296. editEleVisible: false,
  2297. editEleList: [],
  2298. eleReg: /(≥|≤|±|【】)?([^≥≤±【】]*)/,
  2299. editEleFormulaVisible: false,
  2300. isMeter: false,
  2301. formulaInput: "",
  2302. editEleListFilter: [],
  2303. editEleListAll: [],
  2304. importTemplateVisible: false,
  2305. fileUrl: "",
  2306. upFile: null,
  2307. importLoading: false,
  2308. nodeInfoVisible: false,
  2309. nodeInfoTable: [],
  2310. nodeInfoTableLoad: false,
  2311. namelist: [],
  2312. namelists: [],
  2313. delids: [],
  2314. infoNameVisible: false,
  2315. excelSortTag: false,
  2316. excelSortTag2: false,
  2317. tableSortList: [],
  2318. //#endregion
  2319. defaultExpandedKeys: [],
  2320. expandName: this.$route.fullPath,
  2321. aliasVisible: false, //别名
  2322. aliasInput: "",
  2323. aliasArr: [],
  2324. formulaCompVisible: false, //公式弹框
  2325. formulaCompVisible1: false,
  2326. formulaCurRow: {}, //当前元素
  2327. editElementVisible: false, //编辑元素弹框
  2328. editElementQuery: {
  2329. pkeyId: "",
  2330. excelId: "",
  2331. id: "",
  2332. initTableName: "",
  2333. initTableId: "",
  2334. pid: "",
  2335. wbsid: "",
  2336. nodeid: "",
  2337. }, //传参
  2338. syncBtnLoad: false,
  2339. syncElectricLoad: false,
  2340. showType: 1,
  2341. typeTreeData: [],
  2342. testTreeLoad: false,
  2343. testTreeData: [],
  2344. mixRatioTestIds: [],
  2345. //节点参数,关联元素
  2346. curParam: {}, //当前节点参数
  2347. linkEleVisible: false,
  2348. linkEleTableList: [], //元素表数组
  2349. curLinkEleTable: {}, //当前元素表
  2350. linkCheckVisible: false, //关联弹框
  2351. linkEleList: [], //元素数组
  2352. linkEleKey: "", //搜索关键字
  2353. menusData: [
  2354. // {icon: 'el-icon-s-promotion', label: '新增节点', key: "add"},
  2355. {
  2356. icon: "el-icon-s-promotion",
  2357. label: "编辑节点",
  2358. key: "edit",
  2359. content: "编辑节点",
  2360. },
  2361. {
  2362. icon: "el-icon-upload",
  2363. label: "后管数据同步",
  2364. key: "sync1",
  2365. content: "后管数据同步",
  2366. },
  2367. {
  2368. icon: "el-icon-upload",
  2369. label: "同步到合同段",
  2370. key: "sync3",
  2371. content: "同步到合同段",
  2372. },
  2373. {
  2374. icon: "el-icon-sort",
  2375. label: "调整排序",
  2376. key: "sort",
  2377. content: "调整排序",
  2378. },
  2379. {
  2380. icon: "el-icon-s-promotion",
  2381. label: "删除节点",
  2382. key: "del",
  2383. content: "删除节点",
  2384. },
  2385. ], //树组件操作菜单
  2386. menuvisible: false,
  2387. menuleft: 20,
  2388. menutop: 0,
  2389. //同步菜单按钮
  2390. menuoptions: [
  2391. {
  2392. value: "jdSync",
  2393. label: "节点参数同步",
  2394. load: false,
  2395. },
  2396. {
  2397. value: "dqSync",
  2398. label: "电签同步",
  2399. load: false,
  2400. },
  2401. {
  2402. value: "gsSync",
  2403. label: "公式同步",
  2404. load: false,
  2405. },
  2406. // {
  2407. // value: "zdSync",
  2408. // label: "字典同步",
  2409. // load: false,
  2410. // },
  2411. ],
  2412. menuvalue: "",
  2413. isshowSyncbtn: false,
  2414. projectName: "",
  2415. nodeInfoSaveload: false,
  2416. handlesyncLoad: false, //表单同步
  2417. isLinkNodes: false,
  2418. linkNodesLoad: false,
  2419. checkedLinkNodesKeys: [],
  2420. rowPkeyId: "",
  2421. nodesCheck: [],
  2422. standardTypeOptions: [], //标准分类
  2423. unitOptions: [], //单位名称
  2424. editDialogShow: false, //编辑元素
  2425. searchinput: "",
  2426. editTable: [],
  2427. editEleTableloading: false,
  2428. dynamicDictList: [],
  2429. saveLoading: false,
  2430. fileTitleVisible:false,
  2431. deCheckTreeKeys:[],
  2432. fileTableData:[
  2433. ],
  2434. fileTitleRef:null,
  2435. fileTitleModel:{
  2436. type:'',
  2437. },
  2438. fileTreeLoading:false,
  2439. fileTreeData:[],
  2440. filedefaultProps:{
  2441. children: 'children',
  2442. label: 'nodeName',
  2443. disabled:function (data) {
  2444. return data.status===11 ;
  2445. },
  2446. },
  2447. fileTitleRules:{
  2448. type: [
  2449. { required: true, message: '请选择题名范围', trigger: 'blur' },
  2450. ],
  2451. },
  2452. fileTableLoading:false,
  2453. chooseFileVisible:false,
  2454. chooseFileRow: {},
  2455. chooseFileIndex: -1,
  2456. isShowSize:true,
  2457. selectDiv:Math.random(),
  2458. saveFileLoading:false,
  2459. proSyncTag:false,
  2460. rangeOptions:[],
  2461. typeOptions:[],
  2462. checkAll: false,
  2463. checkAll1: false,
  2464. isIndeterminate: false,
  2465. isIndeterminate1: false,
  2466. syncForm:{
  2467. range:'',
  2468. rangeName:'',
  2469. type:[],
  2470. typeName:'',
  2471. templateId:'',
  2472. templateName:'',
  2473. contractRange:[],
  2474. contractRangeName:'',
  2475. formIds:''
  2476. },
  2477. preTableData:[],
  2478. multipleSelection: [],
  2479. checkIdList:[
  2480. ],
  2481. isShowLeft:false,
  2482. isShowTable:false,
  2483. templateIdList:[],//同步源
  2484. saveProTagLoading:false,
  2485. syncTableDialog:false,
  2486. preTableData1:[],
  2487. formIds:'',
  2488. saveTableSyncLoad:false,
  2489. checkRow:null,
  2490. syncListDialog:false,
  2491. refreshLoading:false,
  2492. syncListData:{
  2493. nodeNum:'',//同步节点数量
  2494. nodeNumEnd:''//已同步数量
  2495. },
  2496. isAdd:'',
  2497. refreshLoading1:false,
  2498. codeDialog:false,
  2499. codeSetRef: null,
  2500. };
  2501. },
  2502. computed: {
  2503. ...mapGetters(["userInfo"]),
  2504. },
  2505. created() {
  2506. this.init();
  2507. //console.log(this.userInfo)
  2508. },
  2509. methods: {
  2510. //#region
  2511. init() {
  2512. //this.id = this.$route.query.wbsid;
  2513. //this.projectid = this.$route.query.pid;
  2514. const { wbsid, pid, type } = this.$route.query;
  2515. this.id = wbsid;
  2516. this.projectid = pid;
  2517. this.wbsType = type ? Number(type) : 1;
  2518. this.getNodeTypelistData()
  2519. this.getNodeTypelist();
  2520. this.getTableTypelist();
  2521. this.getDataTypelist();
  2522. this.getOwnerTypelist();
  2523. this.getStandardTypeOptions();
  2524. this.getMajorDataTypeList();
  2525. this.defaultExpandedKeys = getStore({ name: this.expandName });
  2526. this.projectName = this.$route.query.projectName;
  2527. },
  2528. loadNode(node, resolve) {
  2529. let pid = 0;
  2530. if (node.level != 0) {
  2531. pid = node.data.id;
  2532. }
  2533. const type = this.wbsType;
  2534. getLazytree(this.id, pid, this.userInfo.tenant_id, this.projectid, {
  2535. wbsType: type,
  2536. }).then((res) => {
  2537. let arr = [];
  2538. if (Array.isArray(res.data.data)) {
  2539. arr = res.data.data;
  2540. }
  2541. return resolve(arr);
  2542. });
  2543. },
  2544. getNodeDetail(data, node) {
  2545. console.log("getNodeDetail", data);
  2546. let parentName = "";
  2547. if (node.parent.data) {
  2548. parentName = node.parent.data.title;
  2549. }
  2550. this.curTreeData = data;
  2551. this.curTreeNode = node;
  2552. this.curTreeData.parentName = parentName;
  2553. getDetail(data.id, this.id, this.projectid).then((res) => {
  2554. res.data.data.parentName = parentName;
  2555. let tableObj=res.data.data;
  2556. tableObj.primaryKeyId=data.primaryKeyId
  2557. this.tableData = [res.data.data];
  2558. this.nodeDetail = Object.assign({}, res.data.data);
  2559. });
  2560. this.updateNodeTable();
  2561. // this.nodeTypeChange(data.nodeType)
  2562. //获取节点展开路径
  2563. this.getExpandedKeys(node);
  2564. },
  2565. saveNode() {
  2566. const type = this.wbsType;
  2567. this.$refs["nodeDetail"].validate((valid) => {
  2568. if (valid) {
  2569. const { mixRatioTestIds, nodeType } = this.nodeDetail;
  2570. if (type === 2 && nodeType === 53) {
  2571. if (mixRatioTestIds) {
  2572. if (this.editType == 1) {
  2573. this.addNode();
  2574. } else if (this.editType == 2) {
  2575. this.updateNode();
  2576. }
  2577. } else {
  2578. this.$message({
  2579. type: "error",
  2580. message: "请先选择节点",
  2581. });
  2582. return false;
  2583. }
  2584. } else {
  2585. if (this.editType == 1) {
  2586. this.addNode();
  2587. } else if (this.editType == 2) {
  2588. this.updateNode();
  2589. }
  2590. }
  2591. } else {
  2592. console.log("error submit!!");
  2593. return false;
  2594. }
  2595. });
  2596. },
  2597. addNode() {
  2598. this.saveNodeLoading = true;
  2599. update(this.nodeDetail).then(() => {
  2600. this.updateTreeNewNode();
  2601. this.dialogVisible = false;
  2602. this.$message({
  2603. type: "success",
  2604. message: "新增成功!",
  2605. });
  2606. });
  2607. },
  2608. updateNode() {
  2609. update(this.nodeDetail).then(() => {
  2610. let node = this.tableData[0];
  2611. node.nodeName = this.nodeDetail.nodeName;
  2612. node.nodeType = this.nodeDetail.nodeType;
  2613. this.curTreeData.title = this.nodeDetail.nodeName;
  2614. this.dialogVisible = false;
  2615. this.$message({
  2616. type: "success",
  2617. message: "修改成功!",
  2618. });
  2619. });
  2620. },
  2621. toSplit(val) {
  2622. return val ? String(val).split(",") : "";
  2623. },
  2624. setLeftType(type, data, node) {
  2625. this.jiedianId = data.id;
  2626. this.getNodeTypelistData()
  2627. if (type == 4 || type == 5) {
  2628. this.leftType = type;
  2629. }
  2630. this.curTreeData = data;
  2631. this.curTreeNode = node;
  2632. this.$refs.tree.setCurrentKey(data.id);
  2633. if (type == 1 || type == 2) {
  2634. this.getMajorDataTypeList();
  2635. this.dialogVisible = true;
  2636. this.editType = type;
  2637. }
  2638. getDetail(data.id, this.id, this.projectid).then((res) => {
  2639. let parentName = "";
  2640. if (node.parent.data) {
  2641. parentName = node.parent.data.title;
  2642. }
  2643. res.data.data.parentName = parentName;
  2644. this.tableData = [res.data.data];
  2645. if (type == 1) {
  2646. this.nodeDetail = {
  2647. parentId: res.data.data.id,
  2648. parentName: parentName,
  2649. projectId: res.data.data.projectId,
  2650. };
  2651. } else {
  2652. this.nodeDetail = Object.assign({}, res.data.data);
  2653. this.mixRatioTestIds = this.toSplit(res.data.data.mixRatioTestIds);
  2654. }
  2655. this.nodeDetail.type = 1; // '1'节点 '2'表单
  2656. this.nodeDetail.wbsId = this.id;
  2657. this.nodeDetail.tenantId = this.userInfo.tenant_id;
  2658. this.changeStandType(this.nodeDetail.className);
  2659. });
  2660. if (this.leftType == 4) {
  2661. selectByNodeTable(data.id, this.projectid, this.id).then((res) => {
  2662. if (res.data.data.length) {
  2663. this.formData = res.data.data;
  2664. } else {
  2665. this.formData = [];
  2666. }
  2667. });
  2668. }
  2669. //获取节点展开路径
  2670. this.getExpandedKeys(node);
  2671. },
  2672. showFormElement() {
  2673. if (!this.nodeDetail.id) {
  2674. this.$message({
  2675. type: "warning",
  2676. message: "请先选择在哪个节点下创建表",
  2677. });
  2678. return;
  2679. }
  2680. this.eleVisible = true;
  2681. },
  2682. addEleRow(list) {
  2683. list.push({});
  2684. },
  2685. delEleRow(index, list) {
  2686. list.splice(index, 1);
  2687. },
  2688. saveFormAndElementHandle() {
  2689. this.$refs["eleDialog"].validate((valid) => {
  2690. if (valid) {
  2691. this.eleForm.wbsId = this.id;
  2692. this.eleForm.tenantId = this.userInfo.tenant_id;
  2693. this.eleForm.nodeType = -1;
  2694. this.eleForm.type = 2; // '1'节点 '2'表单
  2695. this.eleForm.parentId = this.nodeDetail.id;
  2696. this.eleForm.elementList.forEach((element) => {
  2697. element.eAllowDeviation =
  2698. (element.allow ? element.allow : "") +
  2699. (element.deviation ? element.deviation : "");
  2700. if (element.eType == 4) {
  2701. element.eLength = 0;
  2702. }
  2703. });
  2704. saveFormAndElement(this.eleForm).then(() => {
  2705. //console.log(res)
  2706. this.updateTreeNewNode();
  2707. this.updateNodeTable();
  2708. this.eleVisible = false;
  2709. this.$message({
  2710. type: "success",
  2711. message: "新增成功!",
  2712. });
  2713. });
  2714. } else {
  2715. console.log("error submit!!");
  2716. return false;
  2717. }
  2718. });
  2719. },
  2720. updateTreeNewNode() {
  2721. getLazytree(
  2722. this.id,
  2723. this.nodeDetail.parentId,
  2724. this.userInfo.tenant_id,
  2725. this.projectid
  2726. ).then((res) => {
  2727. this.$refs.tree.updateKeyChildren(
  2728. this.nodeDetail.parentId,
  2729. res.data.data
  2730. );
  2731. });
  2732. },
  2733. updateNodeTable() {
  2734. selectByNodeTable(this.curTreeData.id, this.projectid, this.id).then(
  2735. (res) => {
  2736. if (res.data.data && res.data.data.length) {
  2737. this.formData = res.data.data;
  2738. this.formData.forEach((ele) => {
  2739. ele.nodeType = Number(ele.nodeType);
  2740. });
  2741. } else {
  2742. this.formData = [];
  2743. }
  2744. }
  2745. );
  2746. },
  2747. deleNode(data, node) {
  2748. let pid = data.primaryKeyId ? data.primaryKeyId : data.pKeyId;
  2749. this.$confirm(
  2750. "此操作将删除节点【" + data.title + "】, 是否继续?",
  2751. "提示",
  2752. {
  2753. confirmButtonText: "确定",
  2754. cancelButtonText: "取消",
  2755. type: "warning",
  2756. }
  2757. )
  2758. .then(() => {
  2759. removePrivateTreeNode(pid).then(() => {
  2760. this.$refs.tree.remove(node);
  2761. this.$message({
  2762. type: "success",
  2763. message: "删除成功!",
  2764. });
  2765. });
  2766. })
  2767. .catch(() => {});
  2768. },
  2769. importHandle() {},
  2770. handlePreview(index, row) {
  2771. this.curEleTable = row;
  2772. selectPrivateFormElements(this.curEleTable.initTableId).then((res) => {
  2773. res.data.data.forEach((element) => {
  2774. this.eleReg.exec(element.eAllowDeviation);
  2775. element.allow = RegExp.$1 ? RegExp.$1 : "";
  2776. element.deviation = RegExp.$2 ? RegExp.$2 : "";
  2777. });
  2778. this.editEleList = res.data.data;
  2779. });
  2780. this.editEleVisible = true;
  2781. },
  2782. //关联节点
  2783. handleLinkNodes(index, row) {
  2784. this.rowPkeyId = row.pkeyId;
  2785. this.linkNodesLoad = false;
  2786. this.isLinkNodes = true;
  2787. getLinekNodeTreelist(row.pkeyId)
  2788. .then(({ data }) => {
  2789. const res = data.data;
  2790. if (res instanceof Array) {
  2791. this.checkedLinkNodesKeys = res;
  2792. } else {
  2793. this.checkedLinkNodesKeys = [];
  2794. }
  2795. })
  2796. .catch(() => {
  2797. this.checkedLinkNodesKeys = [];
  2798. });
  2799. },
  2800. //确定关联
  2801. linkNodesSave() {
  2802. const keys = this.$refs.tree2.getCheckedKeys();
  2803. // if (keys.length <= 0) {
  2804. // this.$message({
  2805. // type: "warning",
  2806. // message: "请先勾选节点",
  2807. // });
  2808. // return;
  2809. // }
  2810. const pkeyId = this.rowPkeyId;
  2811. this.linkNodesLoad = true;
  2812. linkNodeTree(keys.length >0?keys.join(","):'', pkeyId)
  2813. .then(() => {
  2814. this.$message({
  2815. type: "success",
  2816. message: "关联成功!",
  2817. });
  2818. this.linkNodesLoad = false;
  2819. this.linkNodesClose();
  2820. })
  2821. .catch(() => {
  2822. this.linkNodesLoad = false;
  2823. });
  2824. },
  2825. //关闭关联弹窗
  2826. linkNodesClose() {
  2827. this.isLinkNodes = false;
  2828. this.linkNodesLoad = false;
  2829. this.checkedLinkNodesKeys = [];
  2830. this.nodesCheck = [];
  2831. this.rowPkeyId = "";
  2832. },
  2833. handleDelete(index, row) {
  2834. this.$confirm("是否删除 " + row.tableName + " ?", "删除元素表", {
  2835. distinguishCancelAndClose: true,
  2836. confirmButtonText: "删除",
  2837. cancelButtonText: "取消",
  2838. }).then(() => {
  2839. removeTableById(row.id, this.projectid, this.id).then(() => {
  2840. this.formData.splice(index, 1);
  2841. this.$message({
  2842. type: "success",
  2843. message: "删除成功!",
  2844. });
  2845. });
  2846. });
  2847. },
  2848. async hideMD(row) {
  2849. //隐藏按钮
  2850. const code = await this.updateStatus(row.pkeyId, row.status);
  2851. if (code == 200) {
  2852. if (row.status == 0) {
  2853. row.status = 1;
  2854. } else {
  2855. row.status = 0;
  2856. }
  2857. }
  2858. },
  2859. async updateStatus(pKeyId, status) {
  2860. //隐藏功能激活
  2861. const { data: res } = await updateStatus({ pKeyId });
  2862. if (res.code == 200) {
  2863. this.$message({
  2864. type: "success",
  2865. message: status == 1 ? "隐藏成功" : "激活成功",
  2866. });
  2867. }
  2868. return res.code;
  2869. },
  2870. handleEditFormula(index, row) {
  2871. this.curEleTable = row;
  2872. selectFormElements(this.curEleTable.pkeyId, { type: 0 }).then((res) => {
  2873. this.editEleListFilter = res.data.data;
  2874. this.editEleListAll = [].concat(this.editEleListFilter);
  2875. });
  2876. this.editEleFormulaVisible = true;
  2877. },
  2878. //表单同步
  2879. handlesync(index, row) {
  2880. },
  2881. //搜索 筛选
  2882. searchFormulaName() {
  2883. this.editEleListFilter = this.editEleListAll.filter((ele) => {
  2884. return ele.eName.indexOf(this.formulaInput) > -1;
  2885. });
  2886. },
  2887. saveNewEle(row) {
  2888. row.eAllowDeviation =
  2889. (row.allow ? row.allow : "") + (row.deviation ? row.deviation : "");
  2890. row.fId = this.curEleTable.initTableId;
  2891. row.initTableName = this.curEleTable.initTableName;
  2892. if (row.eType == 4) {
  2893. row.eLength = 0;
  2894. }
  2895. saveElement(row).then((res) => {
  2896. if (res.data.data) {
  2897. this.$set(row, "id", res.data.data.id);
  2898. this.$set(row, "ekey", res.data.data.ekey);
  2899. this.$message({
  2900. type: "success",
  2901. message: "保存成功!",
  2902. });
  2903. }
  2904. });
  2905. },
  2906. delEleRowHandle(index, list) {
  2907. let row = list[index];
  2908. if (row.id) {
  2909. //有id需要请求删除
  2910. this.$confirm("是否确认删除?", "删除元素", {
  2911. distinguishCancelAndClose: true,
  2912. confirmButtonText: "删除",
  2913. cancelButtonText: "取消",
  2914. }).then(() => {
  2915. removeElement(row.id, this.curEleTable.initTableName, row.ekey).then(
  2916. () => {
  2917. list.splice(index, 1);
  2918. }
  2919. );
  2920. });
  2921. } else {
  2922. list.splice(index, 1);
  2923. }
  2924. },
  2925. nodeTypeChange(val) {
  2926. console.log(333333333);
  2927. if (val === 53) {
  2928. // if (this.testTreeData.length > 0) {
  2929. // return;
  2930. // }
  2931. this.testTreeLoad = true;
  2932. // getAlltreeTrial(this.projectid, this.id, this.curTreeData.primaryKeyId).then((res) => {
  2933. // this.testTreeLoad = false;
  2934. // console.log(res.data.data,'data');
  2935. // let trialdata=res.data.data
  2936. // if(trialdata&&trialdata.allTree){
  2937. // this.testTreeData = trialdata.allTree[0];
  2938. // if(trialdata.allStatusIds.length>0){
  2939. // //设置勾选相关联试验全选
  2940. // this.mixRatioTestIds =trialdata.allStatusIds[0];
  2941. // }
  2942. // }
  2943. // });
  2944. let pid = this.curTreeData.primaryKeyId
  2945. ? this.curTreeData.primaryKeyId
  2946. : this.curTreeData.pKeyId;
  2947. getAlltree(this.projectid, this.id, pid).then((res) => {
  2948. this.testTreeLoad = false;
  2949. console.log(res.data.data, "data");
  2950. this.testTreeData = res.data.data;
  2951. });
  2952. }
  2953. },
  2954. //根据逗号联合
  2955. toJoin(arr) {
  2956. return arr ? arr.join() : "";
  2957. },
  2958. TestTreeCheckChange(_, { checkedKeys, halfCheckedKeys }) {
  2959. // const newarr = [...checkedKeys, ...halfCheckedKeys];
  2960. const newarr = [...checkedKeys];
  2961. this.nodeDetail.mixRatioTestIds = this.toJoin(newarr);
  2962. },
  2963. // filterChange() {
  2964. // if (this.treeData.length > 0) {
  2965. // this.$refs.treeall.filter(this.filterText);
  2966. // return;
  2967. // }
  2968. // this.treeLoad = true;
  2969. // getAlltree(this.projectid, this.id).then((res) => {
  2970. // this.treeLoad = false;
  2971. // this.treeData = res.data.data;
  2972. // console.log(res.data.data,'res.data.data');
  2973. // this.$nextTick(() => {
  2974. // this.$refs.treeall.filter(this.filterText);
  2975. // });
  2976. // });
  2977. // },
  2978. //搜索树
  2979. //搜索树
  2980. searchTreeClick() {
  2981. if (this.filterText.length > 0) {
  2982. this.isSearch = true;
  2983. this.searchtreeLoad = true;
  2984. getQueryValueByType({
  2985. queryValue: this.filterText,
  2986. type: this.searchType,
  2987. wbsId: this.id,
  2988. projectId: this.projectid,
  2989. }).then((res) => {
  2990. let arr = [];
  2991. if (Array.isArray(res.data.data)) {
  2992. arr = res.data.data;
  2993. this.searchTreeData = arr;
  2994. } else {
  2995. this.searchTreeData = [];
  2996. }
  2997. });
  2998. } else {
  2999. this.isSearch = false;
  3000. }
  3001. this.searchtreeLoad = false;
  3002. },
  3003. clearSearch() {
  3004. this.isSearch = false;
  3005. },
  3006. importTemplate(data) {
  3007. this.importTemplateVisible = true;
  3008. this.curTreeData = data;
  3009. if (!this.fileUrl) {
  3010. getAttchFromOriginalName(1, 20, {
  3011. originalName: "WBS划分模板.xls",
  3012. }).then((res) => {
  3013. if (res.data.data.records.length) {
  3014. this.fileUrl = res.data.data.records[0].link;
  3015. } else {
  3016. this.fileUrl = "";
  3017. }
  3018. });
  3019. }
  3020. },
  3021. importTemplateHandle() {
  3022. if (!this.upFile) {
  3023. this.$message({
  3024. type: "warning",
  3025. message: "请先选择文件再进行导入",
  3026. });
  3027. return;
  3028. }
  3029. let forms = new FormData();
  3030. forms.append("excelFile", this.upFile);
  3031. let wbsTreeFu = {
  3032. wbsId: this.id,
  3033. parentId: this.curTreeData.id,
  3034. // ancestors:'0,'+this.curTreeData.id,
  3035. };
  3036. let json = JSON.stringify(wbsTreeFu);
  3037. let blob = new Blob([json], { type: "application/json" });
  3038. forms.append("wbsTreeFu", blob);
  3039. this.importLoading = true;
  3040. importWbsTree(forms)
  3041. .then(() => {
  3042. //this.$router.go(0)
  3043. let node = this.$refs.tree.getNode(this.curTreeData.id);
  3044. node.isLeaf = false;
  3045. this.importTemplateVisible = false;
  3046. this.upFile = null;
  3047. })
  3048. .finally(() => {
  3049. this.importLoading = false;
  3050. });
  3051. },
  3052. handleDownload() {
  3053. if (this.fileUrl) {
  3054. window.open(this.fileUrl);
  3055. } else {
  3056. this.$message({
  3057. type: "warning",
  3058. message: "请先在附件管理上传【WBS划分模板.xls】文件",
  3059. });
  3060. }
  3061. },
  3062. fileClick() {
  3063. this.$refs.file.click();
  3064. },
  3065. fileChange(e) {
  3066. const file = e.target.files[0];
  3067. if (!file) {
  3068. // 如果用户没有选择图片,只是点了文件上传这个按钮
  3069. return;
  3070. }
  3071. //console.log(file)
  3072. this.upFile = file;
  3073. },
  3074. editNodeInfo(index, row) {
  3075. this.$set(row, "isEdit", true);
  3076. },
  3077. saveNodeInfoHandle(index, row) {
  3078. row.isEdit = false;
  3079. },
  3080. downloadTmp() {
  3081. getTemplate().then((res) => {
  3082. //console.log(res)
  3083. let blob = new Blob([res.data], {
  3084. type: "application/vnd.ms-excel",
  3085. });
  3086. //console.log(blob)
  3087. let filename = Date.parse(new Date()) + ".xls";
  3088. if (window.navigator.msSaveOrOpenBlob) {
  3089. // 兼容IE10
  3090. window.navigator.msSaveBlob(blob, filename);
  3091. } else {
  3092. // 兼容chrome/firefox
  3093. let aTag = document.createElement("a");
  3094. aTag.download = Date.parse(new Date()) + ".xls";
  3095. aTag.href = window.URL.createObjectURL(blob);
  3096. aTag.click();
  3097. URL.revokeObjectURL(aTag.href);
  3098. }
  3099. });
  3100. },
  3101. fileClick2() {
  3102. this.$refs.file2.click();
  3103. },
  3104. tmpImport(e) {
  3105. const file = e.target.files[0];
  3106. const formData = new FormData();
  3107. formData.append("file", file);
  3108. //console.log(file.name)
  3109. importWbsElement(formData)
  3110. .then((res) => {
  3111. res.data.data.forEach((element) => {
  3112. element.eName = element.elementName;
  3113. element.eLength = element.elementLength;
  3114. element.eType = Number(element.elementType);
  3115. element.eAllowDeviation = element.elementAllowDeviation;
  3116. element.eInspectionMethod = element.elementInspectionMethod;
  3117. this.eleReg.exec(element.eAllowDeviation);
  3118. // console.log(RegExp.$1)
  3119. // console.log(RegExp.$2)
  3120. element.allow = RegExp.$1 ? RegExp.$1 : "";
  3121. element.deviation = RegExp.$2 ? RegExp.$2 : "";
  3122. });
  3123. this.eleForm.elementList = res.data.data;
  3124. this.importVisible = false;
  3125. })
  3126. .finally(() => {
  3127. e.target.value = "";
  3128. });
  3129. },
  3130. visiblechange(value, data) {
  3131. this.$set(data, "moreShow", value);
  3132. },
  3133. bianhua2() {
  3134. this.excelSortTag2 = false;
  3135. this.$nextTick(() => {
  3136. this.excelSortTag2 = true;
  3137. });
  3138. },
  3139. //私有树的元素表修改排序
  3140. privateTableSort() {
  3141. if (!this.curTreeData.id) {
  3142. this.$message({
  3143. type: "warning",
  3144. message: "请先选择需要排序的节点",
  3145. });
  3146. return;
  3147. }
  3148. this.tableSortList = this.formData.map((form, index) => {
  3149. return {
  3150. sort: index + 1,
  3151. nodeName: form.tableName,
  3152. pkeyId: form.pkeyId,
  3153. };
  3154. });
  3155. this.excelSortTag = true;
  3156. this.excelSortTag2 = true;
  3157. },
  3158. editPrivateSort() {
  3159. this.surePrivateSortload = true;
  3160. wbsTreePrivateTableSort(this.tableSortList).then(() => {
  3161. this.$message({
  3162. type: "success",
  3163. message: "排序成功!",
  3164. });
  3165. this.updateNodeTable();
  3166. this.surePrivateSortload = false;
  3167. this.excelSortTag = false;
  3168. this.excelSortTag2 = false;
  3169. });
  3170. },
  3171. //解析元素数据类型
  3172. eTypeFormatter(row) {
  3173. let text = "";
  3174. for (let i = 0; i < this.dataTypeList.length; i++) {
  3175. if (this.dataTypeList[i].dictKey == row.eType) {
  3176. text = this.dataTypeList[i].dictValue;
  3177. break;
  3178. }
  3179. }
  3180. return text;
  3181. },
  3182. //跳转到公式配置页面
  3183. toFormulaEdit(row, type) {
  3184. this.curEleTable.hasPartFormula = row.hasPartFormula;
  3185. this.formulaCurRow = row;
  3186. this.formulaCurRow.globaltype = type;
  3187. if (type === 10) {
  3188. this.formulaCompVisible1 = true;
  3189. this.formulaCurRow.elementType = false;
  3190. this.istableType = true;
  3191. } else {
  3192. this.formulaCompVisible = true;
  3193. }
  3194. },
  3195. //关闭公式弹窗
  3196. closeformulaComp() {
  3197. console.log("关闭");
  3198. selectFormElements(this.curEleTable.pkeyId, { type: 0 }).then((res) => {
  3199. this.editEleListFilter = res.data.data;
  3200. this.editEleListAll = [].concat(this.editEleListFilter);
  3201. });
  3202. },
  3203. //关闭公式弹窗
  3204. closeformulaComp1() {
  3205. console.log("关闭");
  3206. selectFormElements(this.curEleTable.pkeyId, { type: 0 }).then((res) => {
  3207. this.editEleListFilter = res.data.data;
  3208. this.editEleListAll = [].concat(this.editEleListFilter);
  3209. });
  3210. },
  3211. getNodeTypelist() {
  3212. let code = "name_rule";
  3213. getDictionary({
  3214. code,
  3215. }).then((res) => {
  3216. this.nodeTypelist1 = res.data.data;
  3217. });
  3218. },
  3219. getNodeTypelistData() {
  3220. const type = this.wbsType;
  3221. let code = "";
  3222. if (type === 5) {
  3223. code = "lar_node_type"; //征拆
  3224. } else if (type === 2) {
  3225. code = "trial_node_type"; //试验
  3226. } else if (type === 3) {
  3227. code = "meter_node_type"; //计量
  3228. } else {
  3229. {
  3230. code = "wbs_node_type"; //质检
  3231. }
  3232. }
  3233. getDictionary({
  3234. code,
  3235. }).then((res) => {
  3236. this.nodeTypelist = res.data.data;
  3237. res.data.data.forEach((element) => {
  3238. element.dictKey = Number(element.dictKey);
  3239. });
  3240. this.nodeTypelist = res.data.data;
  3241. });
  3242. },
  3243. getMajorDataTypeList() {
  3244. // if (this.majorDataTypeList.length > 1) {
  3245. // return;
  3246. // }
  3247. getDictionary({
  3248. code: "major_data_type",
  3249. }).then((res) => {
  3250. res.data.data.forEach((element) => {
  3251. element.dictKey = Number(element.dictKey);
  3252. });
  3253. // this.majorDataTypeList = res.data.data;
  3254. this.majorDataTypeList = res.data.data.filter(
  3255. (item) => item.dictKey != 0
  3256. );
  3257. });
  3258. },
  3259. getTableTypelist() {
  3260. const type = this.wbsType;
  3261. if (this.tableTypelist.length > 1) {
  3262. return;
  3263. }
  3264. let code = "";
  3265. if (type === 5) {
  3266. code = "table_type"; //征拆
  3267. } else if (type === 2) {
  3268. code = "trial_table_type"; //试验
  3269. } else {
  3270. code = "table_type"; //质检
  3271. }
  3272. getDictionary({
  3273. // code: "table_type",
  3274. // code: type === 2 ? "trial_table_type" : "table_type",
  3275. code,
  3276. }).then((res) => {
  3277. res.data.data.forEach((element) => {
  3278. element.dictKey = Number(element.dictKey);
  3279. });
  3280. this.tableTypelist = res.data.data;
  3281. });
  3282. },
  3283. getDataTypelist() {
  3284. if (this.dataTypeList.length > 1) {
  3285. return;
  3286. }
  3287. getDictionary({
  3288. code: "data_type",
  3289. }).then((res) => {
  3290. res.data.data.forEach((element) => {
  3291. element.dictKey = Number(element.dictKey);
  3292. });
  3293. this.dataTypeList = res.data.data;
  3294. });
  3295. },
  3296. getOwnerTypelist() {
  3297. if (this.ownerTypeList.length > 1) {
  3298. return;
  3299. }
  3300. getDictionary({
  3301. code: "owner_type",
  3302. }).then((res) => {
  3303. res.data.data.forEach((element) => {
  3304. element.dictKey = Number(element.dictKey);
  3305. });
  3306. this.ownerTypeList = res.data.data;
  3307. });
  3308. },
  3309. getStandardTypeOptions() {
  3310. getDictionary({
  3311. code: "classification",
  3312. }).then((res) => {
  3313. res.data.data.forEach((element) => {
  3314. element.dictKey = Number(element.dictKey);
  3315. });
  3316. // 定义要过滤的 dictKey 值
  3317. const targetKeys = [1, 2, 3, 4, 5];
  3318. // 过滤数组
  3319. const filteredOptions = res.data.data.filter((item) =>
  3320. targetKeys.includes(item.dictKey)
  3321. );
  3322. this.standardTypeOptions = filteredOptions;
  3323. });
  3324. },
  3325. changeStandType(val) {
  3326. let parentId = "";
  3327. this.standardTypeOptions.forEach((item) => {
  3328. if (item.dictKey == val) {
  3329. parentId = item.id; // 找到匹配项,提取 parentId
  3330. }
  3331. });
  3332. getChildList(1, 10000, parentId).then((res) => {
  3333. res.data.data.forEach((element) => {
  3334. element.dictKey = Number(element.dictKey);
  3335. });
  3336. this.unitOptions = res.data.data;
  3337. this.unitOptions = this.unitOptions.filter(
  3338. (item) => item.dictKey != -1
  3339. );
  3340. });
  3341. },
  3342. formatCat(row, column, cellValue) {
  3343. for (let i = 0; i < this.nodeTypelist.length; i++) {
  3344. if (this.nodeTypelist[i].dictKey == cellValue) {
  3345. return this.nodeTypelist[i].dictValue;
  3346. }
  3347. }
  3348. return cellValue;
  3349. //console.log(cellValue)
  3350. },
  3351. formatTableType(row, column, cellValue) {
  3352. for (let i = 0; i < this.tableTypelist.length; i++) {
  3353. if (this.tableTypelist[i].dictKey == cellValue) {
  3354. return this.tableTypelist[i].dictValue;
  3355. }
  3356. }
  3357. return cellValue;
  3358. //console.log(cellValue)
  3359. },
  3360. formatOwner(row, column, cellValue) {
  3361. for (let i = 0; i < this.ownerTypeList.length; i++) {
  3362. if (this.ownerTypeList[i].dictKey == cellValue) {
  3363. return this.ownerTypeList[i].dictValue;
  3364. }
  3365. }
  3366. return cellValue;
  3367. //console.log(cellValue)
  3368. },
  3369. formatdataType(row, column, cellValue) {
  3370. for (let i = 0; i < this.dataTypeList.length; i++) {
  3371. if (this.dataTypeList[i].dictKey == cellValue) {
  3372. return this.dataTypeList[i].dictValue;
  3373. }
  3374. }
  3375. return cellValue;
  3376. },
  3377. formMajorType(row, column, cellValue) {
  3378. for (let i = 0; i < this.majorDataTypeList.length; i++) {
  3379. if (this.majorDataTypeList[i].dictKey == cellValue) {
  3380. return this.majorDataTypeList[i].dictValue;
  3381. }
  3382. }
  3383. return cellValue;
  3384. },
  3385. // filterNode(value, data) {
  3386. // if (!value) return true;
  3387. // return data.title.indexOf(value) !== -1;
  3388. // },
  3389. getReturnNode(node, _array, value) {
  3390. let isPass =
  3391. node.data && node.data.title && node.data.title.indexOf(value) !== -1;
  3392. isPass ? _array.push(isPass) : "";
  3393. if (!isPass && node.level != 1 && node.parent) {
  3394. this.getReturnNode(node.parent, _array, value);
  3395. }
  3396. },
  3397. filterNode(value, data, node) {
  3398. if (!value) {
  3399. return true;
  3400. }
  3401. let level = node.level;
  3402. let _array = []; //这里使用数组存储 只是为了存储值。
  3403. this.getReturnNode(node, _array, value);
  3404. let result = false;
  3405. _array.forEach((item) => {
  3406. result = result || item;
  3407. });
  3408. return result;
  3409. },
  3410. //#endregion
  3411. //#region wbs私有树排序
  3412. async sortpai(data) {
  3413. console.log(data);
  3414. await this.findWbsTreePrivateSameLevel({
  3415. parentId: data.parentId,
  3416. projectId: this.projectid,
  3417. wbsId: this.id,
  3418. });
  3419. this.sortTag = true;
  3420. this.sortTag2 = true;
  3421. },
  3422. editSort() {
  3423. this.wbsTreePrivateSort();
  3424. },
  3425. bianhua() {
  3426. this.sortTag2 = false;
  3427. this.$nextTick(() => {
  3428. this.sortTag2 = true;
  3429. });
  3430. },
  3431. async wbsTreePrivateSort() {
  3432. this.sureSortload = true;
  3433. //wbs私有树节点手动排序
  3434. const { data: res } = await wbsTreePrivateSort(this.sort);
  3435. console.log(res);
  3436. if (res.code == 200) {
  3437. this.sortTag = false;
  3438. this.sortTag2 = false;
  3439. this.$message({
  3440. type: "success",
  3441. message: "排序成功!",
  3442. });
  3443. this.sureSortload = false;
  3444. this.isShowTree = false;
  3445. setTimeout(() => {
  3446. this.isShowTree = true;
  3447. }, 100);
  3448. // window.location.reload();
  3449. // this.getLazytreessss();
  3450. }
  3451. },
  3452. async findWbsTreePrivateSameLevel(da) {
  3453. //wbs私有树同级节点接口
  3454. const { data: res } = await findWbsTreePrivateSameLevel(da);
  3455. if (res.code == 200) {
  3456. this.sort = res.data;
  3457. }
  3458. },
  3459. async getLazytreessss() {
  3460. const type = this.wbsType;
  3461. const { data: res } = await getLazytree(
  3462. this.id,
  3463. 0,
  3464. this.userInfo.tenant_id,
  3465. this.projectid,
  3466. { wbsType: type }
  3467. );
  3468. console.log(res);
  3469. if (res.code == 200) {
  3470. this.treeData = res.data;
  3471. }
  3472. },
  3473. //#endregion
  3474. //#region 关联清表
  3475. async getList(da) {
  3476. //获取清表模板信息
  3477. const { data: res } = await getList(da);
  3478. console.log(res);
  3479. if (res.code === 200 && res.msg === "操作成功") {
  3480. this.GLExcelData = res.data.records;
  3481. }
  3482. },
  3483. async tabLazytreeAll() {
  3484. //清表树信息
  3485. this.GLExcelLoading = true;
  3486. const { data: res } = await tabLazytreeAll({
  3487. modeId: this.GLExcelFrom.name,
  3488. name: this.GLExcelFrom.search,
  3489. });
  3490. this.GLExcelLoading = false;
  3491. console.log(res);
  3492. if (res.code === 200 && res.msg === "操作成功") {
  3493. this.exceldata = res.data;
  3494. }
  3495. },
  3496. Associationlist(scope) {
  3497. //关联清表点击事件
  3498. console.log(scope.row);
  3499. this.GLExcel = true;
  3500. this.getList({
  3501. current: 1,
  3502. size: 100000,
  3503. parentId: 0,
  3504. });
  3505. this.GLExcelFrom.name = scope.row.modeId;
  3506. setTimeout(() => {
  3507. this.$refs.tree.setCheckedKeys([scope.row.excelId]);
  3508. }, 2000);
  3509. this.GLExcelFrom.initTableId = scope.row.initTableId;
  3510. this.GLExcelFrom.id = scope.row.pkeyId;
  3511. this.GLExcelFrom.excelId = scope.row.excelId;
  3512. this.GLExcelFrom.ids = scope.row.id;
  3513. this.GLExcelFrom.initTableName = scope.row.initTableName;
  3514. console.log(this.GLExcelFrom, "this.GLExcelFrom");
  3515. },
  3516. changetherr() {
  3517. //清表类型选择框change事件
  3518. if (this.GLExcelFrom.name != "") {
  3519. this.GLExcelFrom.search = "";
  3520. this.tabLazytreeAll();
  3521. }
  3522. },
  3523. GLExcelMD() {
  3524. //弹框关闭事件
  3525. this.GLExcelFrom.name = "";
  3526. this.GLExcelFrom.search = "";
  3527. this.GLExcelFrom.id = "";
  3528. this.exceldata = [];
  3529. this.$refs.tree.setCheckedKeys([]);
  3530. this.GLExcel = false;
  3531. },
  3532. checkchange(data) {
  3533. //节点选中回调
  3534. if (this.$refs.tree.getCheckedNodes().length === 0) {
  3535. this.$refs.tree.setCheckedKeys([]);
  3536. } else if (this.$refs.tree.getCheckedNodes().length >= 1) {
  3537. this.$refs.tree.setCheckedKeys([data.id]);
  3538. }
  3539. },
  3540. async saveLinkTab() {
  3541. //保存按钮
  3542. let checkNodes = this.$refs.tree.getCheckedNodes();
  3543. if (checkNodes.length > 0) {
  3544. let node = checkNodes[checkNodes.length - 1];
  3545. if (node.fileType != 3) {
  3546. this.$message({
  3547. type: "warning",
  3548. message: "请先上传Excel表",
  3549. });
  3550. return;
  3551. }
  3552. const { data: res } = await saveLinkTab({
  3553. exceTabId: node.id,
  3554. tabId: this.GLExcelFrom.id,
  3555. });
  3556. console.log(res);
  3557. if (res.code === 200) {
  3558. this.$message({
  3559. type: "success",
  3560. message: "关联清表成功",
  3561. });
  3562. // selectByNodeTable刷新表单列表
  3563. this.updateNodeTable();
  3564. this.GLExcel = false;
  3565. console.log(this.GLExcelFrom, "GLExcelFrom");
  3566. this.rightClick(
  3567. this.GLExcelFrom.id,
  3568. this.GLExcelFrom.excelId,
  3569. this.GLExcelFrom.ids,
  3570. this.GLExcelFrom.initTableName,
  3571. this.GLExcelFrom.initTableId
  3572. );
  3573. }
  3574. } else {
  3575. this.$message({
  3576. type: "warning",
  3577. message: "请先设置清表",
  3578. });
  3579. }
  3580. },
  3581. getReturnNode2(node, _array, value) {
  3582. let isPass =
  3583. node.data && node.data.name && node.data.name.indexOf(value) !== -1;
  3584. isPass ? _array.push(isPass) : "";
  3585. if (!isPass && node.level != 1 && node.parent) {
  3586. this.getReturnNode2(node.parent, _array, value);
  3587. }
  3588. },
  3589. filterNode222(value, data, node) {
  3590. if (!value) {
  3591. return true;
  3592. }
  3593. let level = node.level;
  3594. let _array = []; //这里使用数组存储 只是为了存储值。
  3595. this.getReturnNode2(node, _array, value);
  3596. let result = false;
  3597. _array.forEach((item) => {
  3598. result = result || item;
  3599. });
  3600. return result;
  3601. },
  3602. //#endregion
  3603. //#region 节点参数
  3604. nodeInfo(data) {
  3605. //节点参数按钮
  3606. this.keymap();
  3607. //console.log(data)
  3608. let pid = data.primaryKeyId ? data.primaryKeyId : data.pKeyId;
  3609. this.jiedianId = pid;
  3610. this.parameters(pid);
  3611. this.nodeInfoVisible = true;
  3612. },
  3613. closenodeInfoVisible() {
  3614. this.nodeInfoTable = [];
  3615. this.nodeInfoVisible = false;
  3616. },
  3617. addNodeInfoTable() {
  3618. //添加节点参数数据
  3619. this.nodeInfoTable.unshift({
  3620. k: "",
  3621. v: "",
  3622. remark: "",
  3623. nodeId: this.jiedianId,
  3624. type: 1,
  3625. });
  3626. console.log(this.nodeInfoTable);
  3627. },
  3628. refreshnfoTable() {
  3629. //刷新表格
  3630. let prams = {
  3631. nodeId: this.jiedianId,
  3632. type: 1,
  3633. projectId: this.projectid,
  3634. };
  3635. this.nodeInfoTableLoad = true;
  3636. refrehPram(prams).then((res) => {
  3637. this.nodeInfoTableLoad = false;
  3638. if (res.data.code == 200) {
  3639. this.$message.success("刷新成功");
  3640. }
  3641. });
  3642. },
  3643. delNodeInfo(key, obj) {
  3644. this.delids.push(obj.id);
  3645. //设置参数名称中的删除按钮
  3646. this.namelists.splice(key, 1);
  3647. },
  3648. delNodeInfoss(key, obj) {
  3649. this.delids.push(obj.id);
  3650. //节点参数
  3651. this.nodeInfoTable.splice(key, 1);
  3652. },
  3653. setNodeParameters() {
  3654. //打开设置节点参数弹框按钮
  3655. this.infoNameVisible = true;
  3656. this.namelists = [...this.namelist];
  3657. },
  3658. async setParameterName() {
  3659. //设置参数名称中添加节点参数按钮
  3660. // wbsId: this.jiedianId
  3661. this.namelists.unshift({
  3662. name: "",
  3663. remark: "",
  3664. k: "",
  3665. type: 0,
  3666. nodeId: this.jiedianId,
  3667. });
  3668. },
  3669. async nodeInfoSave() {
  3670. //节点参数弹框保存按钮
  3671. if (this.nodeInfoTable) {
  3672. // if (this.nodeInfoTable.length == 0) {
  3673. // await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,type:1,delIds:this.delids,wps:[
  3674. // {
  3675. // nodeId: this.jiedianId,
  3676. // type: -1,
  3677. // },
  3678. // ]});
  3679. // this.nodeInfoVisible = false;
  3680. // this.delIds=[];
  3681. // this.$message({
  3682. // type: "success",
  3683. // message: "保存参数节点成功!",
  3684. // });
  3685. // return;
  3686. // }
  3687. console.log(this.namelist);
  3688. let tag = true;
  3689. this.nodeInfoTable.forEach((val) => {
  3690. if (!val.k | !val.v) {
  3691. return (tag = false);
  3692. }
  3693. //if (!val.name) {
  3694. for (let i = 0; i < this.namelist.length; i++) {
  3695. if (this.namelist[i].k == val.k) {
  3696. val.name = this.namelist[i].name;
  3697. return;
  3698. }
  3699. }
  3700. //}
  3701. });
  3702. if (tag) {
  3703. this.nodeInfoSaveload = true;
  3704. await this.saveOrUpdateBatch({
  3705. scopeType: 10,
  3706. projectId: this.projectid,
  3707. nodeId: this.jiedianId,
  3708. wps: this.nodeInfoTable,
  3709. type: 1,
  3710. delIds: this.delids,
  3711. });
  3712. this.delIds = [];
  3713. this.$message({
  3714. type: "success",
  3715. message: "设置参数节点成功!",
  3716. });
  3717. this.nodeInfoSaveload = false;
  3718. this.parameters(this.jiedianId);
  3719. // this.nodeInfoVisible = false;
  3720. } else {
  3721. this.$message({
  3722. type: "error",
  3723. message: "请填写所有的参数名称和参数值!",
  3724. });
  3725. }
  3726. } else {
  3727. this.$message({
  3728. type: "error",
  3729. message: "请先设置参数节点!",
  3730. });
  3731. }
  3732. },
  3733. async addParameterName() {
  3734. //设置参数名称中的保存按钮
  3735. if (this.namelists.length) {
  3736. let tag = true;
  3737. this.namelists.forEach((val) => {
  3738. if (!val.name || !val.k) {
  3739. return (tag = false);
  3740. }
  3741. });
  3742. if (tag) {
  3743. await this.saveOrUpdateBatch({
  3744. scopeType: 10,
  3745. projectId: this.projectid,
  3746. nodeId: this.jiedianId,
  3747. wps: this.namelists,
  3748. type: 0,
  3749. delIds: this.delids,
  3750. }); //保存设置参数
  3751. this.infoNameVisible = false;
  3752. this.delIds = [];
  3753. this.keymap();
  3754. } else {
  3755. this.$message({
  3756. type: "error",
  3757. message: "请填写所有的参数名称和参数值KEY!",
  3758. });
  3759. }
  3760. } else {
  3761. this.$message({
  3762. type: "warning",
  3763. message: "请先添加参数",
  3764. });
  3765. }
  3766. },
  3767. closeParameter() {
  3768. //设置参数名称,关闭按钮
  3769. this.namelists = [];
  3770. this.infoNameVisible = false;
  3771. },
  3772. async parameters(wbsId) {
  3773. //获取接待你参数列表
  3774. const { data: res } = await parameters({ wbsId });
  3775. console.log(res);
  3776. if (res.code == 200) {
  3777. if (Array.isArray(res.data)) {
  3778. this.nodeInfoTable = res.data;
  3779. }
  3780. }
  3781. },
  3782. async saveOrUpdateBatch(da) {
  3783. //保存
  3784. const { data: res } = await saveOrUpdateBatch(da);
  3785. this.delids = [];
  3786. console.log(res);
  3787. },
  3788. async keymap() {
  3789. //节点参数枚举
  3790. const { data: res } = await keymap();
  3791. console.log(res);
  3792. if (res.code == 200) {
  3793. this.namelist = res.data;
  3794. }
  3795. },
  3796. //#endregion
  3797. //#region 调整表单
  3798. adjustExcel(pkeyId, excelId) {
  3799. //调整表单
  3800. this.GLExcelFrom.id = pkeyId;
  3801. this.GLExcelFrom.excelId = excelId;
  3802. this.getExcelHtml(pkeyId);
  3803. },
  3804. async getExcelHtml(pkeyId) {
  3805. const { data: res } = await getExcelHtml({ pkeyId });
  3806. console.log(res);
  3807. if (res.code === 200) {
  3808. localStorage.setItem("excelHtml", res.data);
  3809. this.adjustmentExcel = res.data;
  3810. this.excelHtml = true;
  3811. }
  3812. },
  3813. removeExcel() {
  3814. this.excelHtml = false;
  3815. },
  3816. //#endregion
  3817. //#region 编辑元素
  3818. async rightClick(pkeyId, excelId, id, initTableName, initTableId) {
  3819. await this.getExcelHtml2(pkeyId);
  3820. this.editElementQuery.pkeyId = pkeyId;
  3821. this.editElementQuery.excelId = excelId;
  3822. this.editElementQuery.id = id;
  3823. this.editElementQuery.initTableName = initTableName;
  3824. this.editElementQuery.initTableId = initTableId;
  3825. this.editElementQuery.pid = this.$route.query.pid;
  3826. this.editElementQuery.wbsid = this.$route.query.wbsid;
  3827. this.editElementQuery.nodeid = this.curTreeData.id;
  3828. this.editElementVisible = true;
  3829. },
  3830. async getExcelHtml2(pkeyId) {
  3831. const { data: res } = await getExcelHtml({ pkeyId });
  3832. console.log(res);
  3833. if (res.code === 200) {
  3834. localStorage.setItem("editElement", res.data);
  3835. }
  3836. },
  3837. //#endregion
  3838. //#region 元素表单信息
  3839. editEditElementForm() {
  3840. //标记元素
  3841. if (this.formData.length) {
  3842. let da = [];
  3843. this.formDatass = [...this.formData];
  3844. this.formDatass.forEach((val) => {
  3845. da.push({
  3846. tableType: val.tableType - 0,
  3847. tableOwner: val.tableOwner - 0,
  3848. pkeyId: val.pkeyId,
  3849. tableName: val.tableName,
  3850. fillRate: val.fillRate,
  3851. nodeType: val.nodeType - 0,
  3852. });
  3853. });
  3854. this.formDatass = da;
  3855. this.editElementFormTag = true;
  3856. }else{
  3857. this.$message({
  3858. type: "warning",
  3859. message: "当前列表无数据!",
  3860. });
  3861. }
  3862. },
  3863. editeditElementFormMF() {
  3864. //保存按钮
  3865. let da = [];
  3866. let tag = true;
  3867. this.formDatass.forEach((val) => {
  3868. if (!val.tableName || !val.tableType || !val.tableOwner) {
  3869. tag = false;
  3870. return;
  3871. } else {
  3872. da.push({
  3873. pkeyId: val.pkeyId,
  3874. nodeName: val.tableName,
  3875. tableType: val.tableType,
  3876. tableOwner: val.tableOwner,
  3877. fillRate: val.fillRate,
  3878. nodeType: val.nodeType,
  3879. });
  3880. }
  3881. });
  3882. if (tag) {
  3883. this.updateBatchNodeTableInfo2(da);
  3884. } else {
  3885. this.$message({
  3886. type: "success",
  3887. message: "请填写完整元素表单的所有信息!",
  3888. });
  3889. }
  3890. },
  3891. async updateBatchNodeTableInfo2(da) {
  3892. this.editeditElementFormMFLoading = true;
  3893. //共有编辑元素
  3894. const { data: res } = await updateBatchNodeTableInfo2(da);
  3895. if (res.code == 200) {
  3896. this.editElementFormTag = false;
  3897. this.updateNodeTable();
  3898. this.editeditElementFormMFLoading = false;
  3899. }
  3900. this.editeditElementFormMFLoading = false;
  3901. },
  3902. //#endregion
  3903. //获取节点展开路径
  3904. getExpandedKeys(node) {
  3905. //console.log(node)
  3906. let expandedKeys = [];
  3907. while (node.parent) {
  3908. expandedKeys.push(node.data.id);
  3909. node = node.parent;
  3910. }
  3911. setStore({
  3912. name: this.expandName,
  3913. content: expandedKeys,
  3914. type: true, //sessionStorage
  3915. });
  3916. //console.log(expandedKeys)
  3917. },
  3918. //触发节点参数
  3919. nodeInfoHandle() {
  3920. if (!this.curTreeData.id) {
  3921. this.$message({
  3922. type: "warning",
  3923. message: "请先选择节点",
  3924. });
  3925. return;
  3926. }
  3927. this.nodeInfo(this.curTreeData);
  3928. },
  3929. eleFormulaHandle() {
  3930. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3931. this.$message({
  3932. type: "warning",
  3933. message: "请先选择节点",
  3934. });
  3935. return;
  3936. }
  3937. this.setLeftType(4, this.curTreeData, this.curTreeNode);
  3938. // this.showType = 2;
  3939. },
  3940. editNodeHandle() {
  3941. console.log(this.curTreeData, "this.curTreeData.id ");
  3942. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3943. this.$message({
  3944. type: "warning",
  3945. message: "请先选择节点",
  3946. });
  3947. return;
  3948. }
  3949. this.mixRatioTestIds = [];
  3950. // this.nodeTypeChange(53);
  3951. this.nodeTypeChange(this.curTreeData.nodeType);
  3952. this.dialogTitle = "编辑节点";
  3953. this.setLeftType(2, this.curTreeData, this.curTreeNode);
  3954. },
  3955. addNodeHandle() {
  3956. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3957. this.$message({
  3958. type: "warning",
  3959. message: "请先选择节点",
  3960. });
  3961. return;
  3962. }
  3963. this.mixRatioTestIds = [];
  3964. // this.nodeTypeChange(53);
  3965. this.nodeTypeChange(this.curTreeData.nodeType);
  3966. this.dialogTitle = "新增节点";
  3967. this.setLeftType(1, this.curTreeData, this.curTreeNode);
  3968. },
  3969. copyNodeHandle() {
  3970. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3971. this.$message({
  3972. type: "warning",
  3973. message: "请先选择节点",
  3974. });
  3975. return;
  3976. }
  3977. },
  3978. delNodeHandle() {
  3979. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3980. this.$message({
  3981. type: "warning",
  3982. message: "请先选择节点",
  3983. });
  3984. return;
  3985. }
  3986. if (this.curTreeNode.level == 1) {
  3987. this.$message({
  3988. type: "warning",
  3989. message: "当前节点无法删除",
  3990. });
  3991. return;
  3992. }
  3993. this.deleNode(this.curTreeData, this.curTreeNode);
  3994. },
  3995. eleHandle() {
  3996. if (!this.curTreeData.id || !this.curTreeNode.id) {
  3997. this.$message({
  3998. type: "warning",
  3999. message: "请先选择节点",
  4000. });
  4001. return;
  4002. }
  4003. this.setLeftType(5, this.curTreeData, this.curTreeNode);
  4004. },
  4005. syncInfoHandle(item) {
  4006. if (this.curTreeData.primaryKeyId || this.curTreeData.pKeyId) {
  4007. this.$confirm("是否同步节点参数?", "提示", {
  4008. confirmButtonText: "确定",
  4009. cancelButtonText: "取消",
  4010. type: "warning",
  4011. }).then(() => {
  4012. this.syncBtnLoad = true;
  4013. this.menuoptions.forEach((ele) => {
  4014. if (item.value == ele.value) {
  4015. ele.load = true;
  4016. }
  4017. });
  4018. let pid = this.curTreeData.primaryKeyId
  4019. ? this.curTreeData.primaryKeyId
  4020. : this.curTreeData.pKeyId;
  4021. syncNodeParam(this.projectid, pid)
  4022. .then(() => {
  4023. this.$message({
  4024. type: "success",
  4025. message: "同步成功!",
  4026. });
  4027. })
  4028. .finally(() => {
  4029. this.syncBtnLoad = false;
  4030. this.menuoptions.forEach((ele) => {
  4031. if (item.value == ele.value) {
  4032. ele.load = false;
  4033. }
  4034. });
  4035. });
  4036. });
  4037. } else {
  4038. this.$message.warning("请先选择左侧节点");
  4039. }
  4040. },
  4041. //显示别名弹窗
  4042. aliasShow() {
  4043. this.aliasVisible = true;
  4044. if (this.nodeDetail.fullName) {
  4045. this.aliasArr = this.nodeDetail.fullName.split(",");
  4046. } else {
  4047. this.aliasArr = [];
  4048. }
  4049. this.aliasInput = "";
  4050. },
  4051. addAlias() {
  4052. if (this.aliasInput) {
  4053. this.aliasArr.push(this.aliasInput);
  4054. this.aliasInput = "";
  4055. }
  4056. },
  4057. delAlias(index) {
  4058. this.aliasArr.splice(index, 1);
  4059. },
  4060. saveAliasHandle() {
  4061. this.nodeDetail.fullName = this.aliasArr.join(",");
  4062. if (this.editType == 1) {
  4063. //新增
  4064. this.aliasVisible = false;
  4065. } else if (this.editType == 2) {
  4066. //编辑 私有
  4067. privateSubmitFullName(
  4068. this.nodeDetail.pKeyId,
  4069. this.nodeDetail.fullName
  4070. ).then(() => {
  4071. this.$message({
  4072. type: "success",
  4073. message: "保存成功",
  4074. });
  4075. this.aliasVisible = false;
  4076. });
  4077. }
  4078. },
  4079. async syncNodeTableHandle(data) {
  4080. this.isAdd=''
  4081. console.log('后管数据同步',data);
  4082. this.curTreeData=data
  4083. this.isShowLeft=false
  4084. await this.getNodeStatusData()
  4085. if(this.syncListDialog){
  4086. return
  4087. }
  4088. this.syncForm.range='1'
  4089. this.proSyncTag=true
  4090. if(this.$refs.syncProTree){
  4091. this.$refs.syncProTree.setCheckedKeys([])
  4092. }
  4093. if(this.$refs.proTable){
  4094. this.$refs.proTable.clearSelection()
  4095. }
  4096. this.isShowTable=true
  4097. this.getTypeOptions()
  4098. this.getRangeOptions()
  4099. this.getCheckIdList()
  4100. this.getTempProjectList(data.primaryKeyId)
  4101. },
  4102. syncProjectHandle(data) {
  4103. this.$confirm("是否同步节点【" + data.title + "】到合同段?", "提示", {
  4104. confirmButtonText: "确定",
  4105. cancelButtonText: "取消",
  4106. type: "warning",
  4107. }).then(() => {
  4108. let notify = this.$notify({
  4109. title: "提示",
  4110. message: "节点数据同步中...",
  4111. duration: 0,
  4112. });
  4113. let pid = data.primaryKeyId ? data.primaryKeyId : data.pKeyId;
  4114. syncNodeinfo(pid)
  4115. .then(() => {
  4116. this.updateNodeTable();
  4117. this.$message({
  4118. type: "success",
  4119. message: "同步成功",
  4120. });
  4121. })
  4122. .catch(() => {
  4123. this.$message({
  4124. type: "error",
  4125. message: "同步失败",
  4126. });
  4127. })
  4128. .finally(() => {
  4129. notify.close();
  4130. });
  4131. });
  4132. },
  4133. //同步元素表单排序到合同段
  4134. async syncSortHandle(data) {
  4135. console.log('同步到合同');
  4136. this.isShowLeft=false
  4137. this.curTreeData=data
  4138. if(this.syncListDialog){
  4139. return
  4140. }
  4141. await this.getNodeStatusData()
  4142. this.syncForm.range='2'
  4143. this.proSyncTag=true
  4144. this.isShowTable=true
  4145. this.getTypeOptions()
  4146. this.getRangeOptions()
  4147. this.getCheckIdList()
  4148. selectByNodeTable(data.id, this.projectid, this.id).then((res) => {
  4149. if (res.data.data.length>0) {
  4150. this.preTableData = res.data.data;
  4151. } else {
  4152. this.preTableData = [];
  4153. }
  4154. });
  4155. },
  4156. typeTreeLoadNode(node, resolve) {
  4157. let pid = 0;
  4158. if (node.level != 0) {
  4159. pid = node.data.id;
  4160. }
  4161. tabTypeLazyTree(pid, this.projectid).then((res) => {
  4162. let arr = [];
  4163. if (Array.isArray(res.data.data)) {
  4164. arr = res.data.data;
  4165. }
  4166. return resolve(arr);
  4167. });
  4168. },
  4169. getTypeTreeDetail() {},
  4170. independent() {
  4171. this.$router.push({
  4172. path: "/project/independent",
  4173. query: {
  4174. pid: this.projectid,
  4175. wbsid: this.$route.query.wbsid,
  4176. wbsType: this.wbsType,
  4177. },
  4178. });
  4179. },
  4180. archiveTimeClick() {
  4181. this.$router.push({
  4182. path: "/project/archiveTime",
  4183. query: { pid: this.projectid, wbsid: this.$route.query.wbsid },
  4184. });
  4185. },
  4186. syncElectric(item) {
  4187. if (this.curTreeData.primaryKeyId || this.curTreeData.pKeyId) {
  4188. console.log("同步电签默认信息");
  4189. this.$confirm("是否同步电签默认信息?", "提示", {
  4190. confirmButtonText: "确定",
  4191. cancelButtonText: "取消",
  4192. type: "warning",
  4193. }).then(() => {
  4194. this.syncElectricLoad = true;
  4195. this.menuoptions.forEach((ele) => {
  4196. if (item.value == ele.value) {
  4197. ele.load = true;
  4198. }
  4199. });
  4200. let pid = this.curTreeData.primaryKeyId
  4201. ? this.curTreeData.primaryKeyId
  4202. : this.curTreeData.pKeyId;
  4203. syncProjecteVisa(this.projectid, pid)
  4204. .then(() => {
  4205. this.$message({
  4206. type: "success",
  4207. message: "同步成功!",
  4208. });
  4209. })
  4210. .finally(() => {
  4211. this.syncElectricLoad = false;
  4212. this.menuoptions.forEach((ele) => {
  4213. if (item.value == ele.value) {
  4214. ele.load = false;
  4215. }
  4216. });
  4217. });
  4218. });
  4219. } else {
  4220. this.$message.warning("请先选择左侧节点");
  4221. }
  4222. },
  4223. //节点参数 关联元素
  4224. linkEle(row) {
  4225. console.log(row, "row");
  4226. if (!row.id) {
  4227. this.$message.warning("请先保存数据,再点击关联元素");
  4228. } else {
  4229. this.linkEleVisible = true;
  4230. this.curParam = row;
  4231. getParamElements({
  4232. nodeId: this.curTreeData.id,
  4233. projectId: this.projectid,
  4234. paramId: row.id,
  4235. scopeType: 10,
  4236. }).then((res) => {
  4237. if (res.data.data.length) {
  4238. this.linkEleTableList = res.data.data;
  4239. } else {
  4240. this.linkEleTableList = [];
  4241. }
  4242. });
  4243. }
  4244. },
  4245. //关联元素弹框
  4246. tolinkEle(row) {
  4247. this.curLinkEleTable = row;
  4248. this.linkCheckVisible = true;
  4249. let pid = this.curTreeData.primaryKeyId
  4250. ? this.curTreeData.primaryKeyId
  4251. : this.curTreeData.pKeyId;
  4252. selectFormElements(row.id, { type: 3, nodeId: pid }).then((res) => {
  4253. res.data.data.forEach((ele) => {
  4254. ele.checked = false;
  4255. ele.show = true;
  4256. });
  4257. this.linkEleList = res.data.data;
  4258. this.linkEleListAll = [].concat(this.linkEleList);
  4259. });
  4260. },
  4261. //删除关联
  4262. delLink(data) {
  4263. this.$confirm("删除关联, 是否继续?", "提示", {
  4264. confirmButtonText: "确定",
  4265. cancelButtonText: "取消",
  4266. type: "warning",
  4267. })
  4268. .then(() => {
  4269. console.log(data);
  4270. delParamElements(data).then(() => {
  4271. this.$message({
  4272. type: "success",
  4273. message: "删除成功!",
  4274. });
  4275. getParamElements({
  4276. nodeId: this.curTreeData.id,
  4277. projectId: this.projectid,
  4278. paramId: this.curParam.id,
  4279. scopeType: 10,
  4280. }).then((res) => {
  4281. if (res.data.data.length) {
  4282. this.linkEleTableList = res.data.data;
  4283. } else {
  4284. this.linkEleTableList = [];
  4285. }
  4286. });
  4287. });
  4288. })
  4289. .catch(() => {});
  4290. },
  4291. //筛选元素
  4292. searchEle() {
  4293. this.linkEleList = this.linkEleListAll.filter((ele) => {
  4294. return ele.eName.indexOf(this.linkEleKey) > -1;
  4295. });
  4296. },
  4297. linkEleCheck(value, index) {
  4298. //console.log(value)
  4299. if (value) {
  4300. this.linkEleList.forEach((ele, i) => {
  4301. if (i != index) {
  4302. ele.checked = false;
  4303. }
  4304. });
  4305. }
  4306. },
  4307. //关联元素
  4308. saveLinkEle() {
  4309. let target = {};
  4310. this.linkEleList.forEach((e) => {
  4311. if (e.checked == true) {
  4312. target = { elementId: e.id, paramId: this.curParam.id };
  4313. }
  4314. });
  4315. if (JSON.stringify(target) !== "{}") {
  4316. specifiedParamElements(target).then((data) => {
  4317. this.linkCheckVisible = false;
  4318. getParamElements({
  4319. nodeId: this.curTreeData.id,
  4320. projectId: this.projectid,
  4321. paramId: this.curParam.id,
  4322. scopeType: 10,
  4323. }).then((res) => {
  4324. if (res.data.data.length) {
  4325. this.linkEleTableList = res.data.data;
  4326. } else {
  4327. this.linkEleTableList = [];
  4328. }
  4329. });
  4330. });
  4331. } else {
  4332. this.$message.warning("请先选择关联元素");
  4333. }
  4334. },
  4335. //树形控件菜单相关方法
  4336. mouseout() {
  4337. this.menuvisible = false;
  4338. },
  4339. //展示菜单
  4340. showMenu(e, data, node) {
  4341. e.preventDefault();
  4342. console.log(e, "e");
  4343. var x = e.pageX; //这个应该是相对于整个浏览器页面的x坐标,左上角为坐标原点(0,0)
  4344. var y = e.pageY; //这个应该是相对于整个浏览器页面的y坐标,左上角为坐标原点(0,0)
  4345. this.menutop = y;
  4346. this.menuleft = x;
  4347. this.menuvisible = true;
  4348. },
  4349. menuClick(e, item, data) {
  4350. e.preventDefault();
  4351. if (item.key === "sort") {
  4352. this.sortpai(data);
  4353. } else if (item.key === "sync1") {
  4354. this.syncNodeTableHandle(data);
  4355. } //
  4356. else if (item.key === "sync3") {
  4357. this.syncSortHandle(data);
  4358. } else if (item.key === "add") {
  4359. this.addNodeHandle();
  4360. } else if (item.key === "edit") {
  4361. this.editNodeHandle();
  4362. } else if (item.key === "del") {
  4363. this.delNodeHandle();
  4364. } else if (item.value === "jdSync") {
  4365. this.syncInfoHandle(item);
  4366. } else if (item.value === "gsSync") {
  4367. this.$message({
  4368. type: "info",
  4369. message: "暂无相关接口!",
  4370. });
  4371. } else if (item.value === "dqSync") {
  4372. this.syncElectric(item);
  4373. }
  4374. },
  4375. //展示数据同步下拉框
  4376. showSyncbtn() {
  4377. this.isshowSyncbtn = !this.isshowSyncbtn;
  4378. },
  4379. getDictTypelist() {
  4380. if (this.dynamicDictList.length > 1) {
  4381. return;
  4382. }
  4383. getDictionary({
  4384. code: "land_field_dict",
  4385. }).then((res) => {
  4386. res.data.data.forEach((element) => {
  4387. element.dictKey = Number(element.dictKey);
  4388. });
  4389. this.dynamicDictList = res.data.data;
  4390. const filteredList = this.dynamicDictList.filter(
  4391. (item) => item.dictKey === 600 || item.dictKey === 0
  4392. );
  4393. this.dynamicDictList = filteredList;
  4394. });
  4395. },
  4396. getSelectFormElements(id) {
  4397. this.editEleTableloading = true;
  4398. selectFormElements(this.curEleTable.pkeyId, {
  4399. type: 0,
  4400. search: this.searchinput,
  4401. }).then((res) => {
  4402. this.editEleTableloading = false;
  4403. this.editTable = res.data.data;
  4404. });
  4405. },
  4406. //编辑
  4407. handleEdit(index, row) {
  4408. this.curEleTable = row;
  4409. this.getSelectFormElements();
  4410. this.editDialogShow = true;
  4411. this.getDictTypelist();
  4412. },
  4413. //编辑元素信息(请谨慎操作)
  4414. clearsearchinput() {
  4415. this.getSelectFormElements();
  4416. },
  4417. searchinputChange() {
  4418. this.getSelectFormElements();
  4419. },
  4420. saveEles() {
  4421. if (this.editTable.length > 0) {
  4422. this.saveLoading = true;
  4423. updateBatchElements(
  4424. this.editTable,
  4425. this.curEleTable.initTableName
  4426. ).then(() => {
  4427. this.saveLoading = false;
  4428. this.editDialogShow = false;
  4429. this.updateNodeTable();
  4430. this.$message({
  4431. type: "success",
  4432. message: "保存成功!",
  4433. });
  4434. });
  4435. } else {
  4436. this.editDialogShow = false;
  4437. this.updateNodeTable();
  4438. this.$message({
  4439. type: "success",
  4440. message: "保存成功!",
  4441. });
  4442. }
  4443. },
  4444. //文件题名(全局按钮)
  4445. fileTitleHandle(){
  4446. this.getFileTableData()
  4447. this.fileTitleVisible = true;
  4448. },
  4449. changeRadio(val){
  4450. console.log(val,'val');
  4451. const fileItem = this.fileTableData[this.chooseFileIndex];
  4452. this.$set(fileItem, 'type', val);
  4453. },
  4454. //获取文件题名规则
  4455. getFileTableData(){
  4456. this.fileTableLoading=true
  4457. getNameRule(
  4458. { projectId:this.projectid}
  4459. ).then((res) => {
  4460. this.fileTableLoading=false
  4461. if(res.data.data){
  4462. this.fileTableData = res.data.data;
  4463. this.fileTableData.forEach((element) => {
  4464. element.roleNameVal = element.nameRule.split(",");
  4465. element.ruleName=element.nameVaule.split("-")
  4466. if(element.type===2){
  4467. const list=element.list
  4468. let arr=[]
  4469. let arrId=[]
  4470. list.forEach((ele) => {
  4471. arr.push(ele.nodeName)
  4472. arrId.push(ele.nodeId)
  4473. });
  4474. element.ruleSizeVal = arr.join('、');
  4475. element.ruleSizeValId=arrId
  4476. }else{
  4477. element.ruleSizeVal=''
  4478. element.ruleSizeValId=''
  4479. }
  4480. });
  4481. }else{
  4482. this.fileTableData =[]
  4483. }
  4484. });
  4485. },
  4486. //获取文件题名范围
  4487. getTitleRangeData(row){
  4488. this.fileTreeLoading=true
  4489. getTitleRange(
  4490. { projectId:this.projectid,
  4491. nameId:row.nameId,
  4492. }
  4493. ).then((res) => {
  4494. this.fileTreeLoading=false
  4495. if(res.data.data){
  4496. this.fileTreeData = res.data.data;
  4497. // this.deCheckTreeKeys = this.fileTreeData.filter(node => node.status === 11).map(node => node.id);
  4498. }else{
  4499. this.fileTreeData =[]
  4500. }
  4501. });
  4502. },
  4503. //选择题名范围
  4504. chooseFile(index,row){
  4505. const {ruleName}=row
  4506. if(ruleName&&ruleName.length>0){
  4507. this.chooseFileVisible = true;
  4508. this.chooseFileIndex= index;
  4509. this.deCheckTreeKeys=row.ruleSizeValId
  4510. this.getTitleRangeData(row)
  4511. }else{
  4512. this.$message.warning('请先选择文件题名规则');
  4513. }
  4514. },
  4515. checkFileSize(data,{checkedNodes,checkedKeys}){
  4516. let checkedTitles = checkedNodes.map(node => node.nodeName).join('、');
  4517. this.fileTableData[this.chooseFileIndex].isEdit1=false
  4518. const fileItem = this.fileTableData[this.chooseFileIndex];
  4519. this.$set(fileItem, 'ruleSizeVal', checkedTitles);
  4520. this.$set(fileItem, 'ruleSizeValId', checkedKeys);
  4521. this.deCheckTreeKeys=checkedKeys
  4522. },
  4523. getCheckedNodes (treeData, checkedKeys) {
  4524. let result = []
  4525. treeData.forEach(node => {
  4526. if (checkedKeys&&checkedKeys.includes(node.id)) {
  4527. result.push(node)
  4528. }
  4529. if (node.children) {
  4530. result = result.concat(getCheckedNodes(node.children, checkedKeys))
  4531. }
  4532. })
  4533. return result
  4534. },
  4535. saveFileSize(){
  4536. // const checkedNodes = this.getCheckedNodes(this.fileTreeData, this.deCheckTreeKeys).filter(node => node.status !== 11)
  4537. const checkedNodes = this.getCheckedNodes(this.fileTreeData, this.deCheckTreeKeys)
  4538. this.fileTableData[this.chooseFileIndex].ruleSizeValId = checkedNodes.map(node => node.id)
  4539. this.fileTableData[this.chooseFileIndex].ruleSizeVal = checkedNodes.map(node => node.nodeName).join('、')
  4540. this.chooseFileVisible = false;
  4541. this.isShowSize=false
  4542. setTimeout(()=>{
  4543. this.isShowSize=true
  4544. },100)
  4545. },
  4546. editRow(index,row){
  4547. console.log(row,'row');
  4548. this.$set(row, "isEdit", true);
  4549. this.$set(row, "isEdit1", true);
  4550. this.fileTitleModel.type=row.type
  4551. },
  4552. //保存文件题名
  4553. saveRow(index,row){
  4554. if(row.ruleName.length<1){
  4555. this.$message.warning('请选择文件题名规则')
  4556. return
  4557. }
  4558. if(!row.type){
  4559. this.$message.warning('请选择文件题名范围')
  4560. return
  4561. }
  4562. this.$set(row, "isEdit", false);
  4563. this.$set(row, "isEdit1", false)
  4564. const ruleName=row.ruleName.join('-')
  4565. let ruleSizeVal=''
  4566. if(row.type==1){
  4567. ruleSizeVal=''
  4568. }else{
  4569. ruleSizeVal=row.ruleSizeValId.join(',')
  4570. }
  4571. let nameRuleDtos={
  4572. nameId:row.nameId,
  4573. nameRule:ruleName,
  4574. nodeId:ruleSizeVal,
  4575. projectId:this.projectid,
  4576. type:this.fileTitleModel.type
  4577. }
  4578. saveOrUpdateNameRule(
  4579. [nameRuleDtos]
  4580. ).then((res) => {
  4581. if(res.data.code==200){
  4582. this.$message.success(res.data.msg)
  4583. this.getFileTableData()
  4584. }else{
  4585. this.$message.error(res.data.msg)
  4586. }
  4587. });
  4588. },
  4589. changeRoleName(data,row){
  4590. const originalData=this.nodeTypelist
  4591. const dictKeyToDictValueMap = originalData.reduce((acc, item) => {
  4592. acc[item.dictKey] = item.dictValue;
  4593. return acc;
  4594. }, {});
  4595. const result = data.map(dictKey => dictKeyToDictValueMap[dictKey]);
  4596. this.$set(row, "roleNameVal", result);
  4597. this.selectDiv=Math.random()
  4598. },
  4599. addRow(){
  4600. this.fileTableData.unshift({isEdit:true,isEdit1:true,})
  4601. this.fileTitleModel.type=''
  4602. },
  4603. refreshRow(){
  4604. this.getFileTableData()
  4605. },
  4606. delRow(index,row){
  4607. if(!row.nameId){
  4608. this.fileTableData.splice(index,1)
  4609. }else{
  4610. this.$confirm("确定将选择数据删除?", {
  4611. confirmButtonText: "确定",
  4612. cancelButtonText: "取消",
  4613. type: "warning"
  4614. })
  4615. .then(() => {
  4616. return deletedNameRule(
  4617. {nameId:row.nameId}
  4618. ).then((res) => {
  4619. if(res.data.code==200){
  4620. this.$message.success(res.data.msg)
  4621. this.getFileTableData()
  4622. }else{
  4623. this.$message.error(res.data.msg)
  4624. }
  4625. });
  4626. });
  4627. }
  4628. },
  4629. batchsaveFileSize(){
  4630. let isCansave=true
  4631. let saveArr=[]
  4632. this.fileTableData.forEach((ele)=>{
  4633. if(ele.ruleName.length<1||!ele.type){
  4634. this.$message.warning('请先完善相关信息')
  4635. isCansave=false
  4636. return
  4637. }
  4638. let ruleSizeVal=''
  4639. if(ele.type==1){
  4640. ruleSizeVal=''
  4641. }else{
  4642. ruleSizeVal=ele.ruleSizeValId.join(',')
  4643. }
  4644. const ruleName=ele.ruleName.join('-')
  4645. saveArr.push({
  4646. nameId:ele.nameId||'',
  4647. nameRule:ruleName,
  4648. nodeId:ruleSizeVal,
  4649. projectId:this.projectid,
  4650. type:ele.type
  4651. })
  4652. })
  4653. if(!isCansave){
  4654. return
  4655. }
  4656. this.saveFileLoading=true
  4657. saveOrUpdateNameRule(
  4658. saveArr
  4659. ).then((res) => {
  4660. this.saveFileLoading=false
  4661. if(res.data.code==200){
  4662. this.$message.success(res.data.msg)
  4663. this.getFileTableData()
  4664. }else{
  4665. this.$message.error(res.data.msg)
  4666. }
  4667. });
  4668. },
  4669. async proSyncbtn(){
  4670. console.log('项目数据同步');
  4671. this.isAdd=''
  4672. this.getTypeOptions()
  4673. this.getRangeOptions()
  4674. this.getCheckIdList()
  4675. this.proSyncTag=true
  4676. if(this.$refs.syncProTree){
  4677. this.$refs.syncProTree.setCheckedKeys([])
  4678. }
  4679. if(this.$refs.proTable){
  4680. this.$refs.proTable.clearSelection()
  4681. }
  4682. this.isShowLeft=true
  4683. this.isShowTable=false
  4684. },
  4685. getRangeOptions(){
  4686. getDictionary({
  4687. code: "wbs_snyc_range",
  4688. }).then((res) => {
  4689. this.rangeOptions = res.data.data;
  4690. });
  4691. },
  4692. getTypeOptions(){
  4693. getDictionary({
  4694. code: "wbs_sync_type",
  4695. }).then((res) => {
  4696. this.typeOptions = res.data.data;
  4697. });
  4698. },
  4699. handleCheckChange1(data){
  4700. console.log(data,'data1111111111');
  4701. getNodeStatus({ id:data.primaryKeyId}).then((res) => {
  4702. if(res.data.code==200){
  4703. if(res.data.data){
  4704. this.$message.success('该节点有同步任务,请取消选择')
  4705. }
  4706. }else{
  4707. this.$message.error(res.data.msg)
  4708. }
  4709. });
  4710. },
  4711. async handleCheckChange(_,{checkedKeys,halfCheckedNodes}) {
  4712. let ids=checkedKeys && checkedKeys.length ? checkedKeys.join(',') : ''
  4713. // await this.getNodeStatusData()
  4714. this.getTempProjectList(ids)
  4715. },
  4716. async getTempProjectList(ids){
  4717. if(ids.length>0){
  4718. //分页获取证书列表数据
  4719. const { data: res } = await getTempProject({
  4720. nodeIds:ids
  4721. });
  4722. if (res.code == 200) {
  4723. this.templateIdList = res.data;
  4724. }
  4725. }
  4726. },
  4727. async changeTemplateId(val){
  4728. if(!this.isShowTable){
  4729. return
  4730. }
  4731. let type=''
  4732. let projectId=''
  4733. let wbsId=''
  4734. for (let index = 0; index < this.templateIdList.length; index++) {
  4735. const elemet = this.templateIdList[index];
  4736. if(elemet.id==val){
  4737. type = elemet.type;
  4738. projectId=elemet.id
  4739. wbsId=elemet.wbsId
  4740. break
  4741. }
  4742. }
  4743. if(type===2){
  4744. selectByNodeTable(this.curTreeData.id, projectId, wbsId).then((res) => {
  4745. if (res.data.data&&res.data.data.length > 0) {
  4746. this.preTableData = res.data.data;
  4747. } else {
  4748. this.preTableData = [];
  4749. }
  4750. });
  4751. }else{
  4752. const { data: res } = await findNodeTableByCondition1( this.curTreeData.id )
  4753. if (res.code === 200) {
  4754. console.log(Array.isArray(res.data));
  4755. if (Array.isArray(res.data)) {
  4756. this.preTableData = res.data
  4757. } else {
  4758. this.preTableData = []
  4759. }
  4760. }
  4761. }
  4762. },
  4763. async getCheckIdList(){
  4764. let code=this.wbsType!==1?'wbs_sync_contract_range':'wbs_sync_contract_quality'
  4765. getDictionary({
  4766. code: code,
  4767. }).then((res) => {
  4768. this.checkIdList = res.data.data;
  4769. });
  4770. },
  4771. closeProSyncTag(){
  4772. this.proSyncTag=false
  4773. this.syncForm={
  4774. range:'',
  4775. rangeName:'',
  4776. type:[],
  4777. typeName:'',
  4778. templateId:'',
  4779. templateName:'',
  4780. contractRange:[],
  4781. contractRangeName:'',
  4782. nodeId:'',
  4783. formIds:''};
  4784. this.preTableData=[]
  4785. this.isShowLeft=false
  4786. },
  4787. async saveProTag(){
  4788. this.syncForm.projectId=this.projectid
  4789. if(this.isShowLeft){
  4790. let ids=this.$refs.syncProTree.getCheckedKeys()
  4791. this.syncForm.nodeId=ids.join(',')
  4792. if(this.syncForm.nodeId===''){
  4793. this.$message.warning('请选择节点')
  4794. return
  4795. }
  4796. }else{
  4797. this.syncForm.nodeId=this.curTreeData.primaryKeyId
  4798. }
  4799. // await this.getNodeStatusData()
  4800. if(this.syncListDialog){
  4801. return
  4802. }
  4803. if(this.syncForm.rangeName==''){
  4804. for (let index = 0; index < this.rangeOptions.length; index++) {
  4805. const element =this. rangeOptions[index];
  4806. if(element.dictKey==this.syncForm.range){
  4807. this.syncForm.rangeName=element.dictValue
  4808. break
  4809. }
  4810. }
  4811. }
  4812. console.log(this.syncForm.range,'this.syncForm.range=');
  4813. if(this.syncForm.range===''){
  4814. this.$message.warning('请选择同步范围')
  4815. return
  4816. }
  4817. this.saveProTagLoading=true
  4818. addSync({
  4819. ...this.syncForm,
  4820. type:this.syncForm.type.join(','),
  4821. contractRange:this.syncForm.contractRange.join(',')
  4822. }
  4823. ).then((res) => {
  4824. console.log(res,'res');
  4825. this.saveProTagLoading=false
  4826. if(res.data.code==200){
  4827. this.$message.success(res.data.msg)
  4828. //this.getNodeStatusData()
  4829. console.log(res.data,'res.data');
  4830. this.syncListData.nodeNum=res.data.data.nodeNum
  4831. this.syncListData.nodeNumEnd=res.data.data.nodeNumEnd
  4832. if(this.isShowLeft){
  4833. this.isAdd=res.data.data.id
  4834. }else{
  4835. this.isAdd=''
  4836. }
  4837. this.syncListDialog=true
  4838. this.closeProSyncTag()
  4839. }else{
  4840. this.$message.error(res.data.msg)
  4841. this.saveProTagLoading=false
  4842. }
  4843. })
  4844. .finally(() => {
  4845. this.saveProTagLoading = false;
  4846. });
  4847. },
  4848. handleCheckAllChange(val) {
  4849. this.syncForm.type = val ? this.typeOptions.map(item => item.dictKey) : [];
  4850. this.isIndeterminate = false;
  4851. },
  4852. handleCheckAllChange1(val) {
  4853. this.syncForm.contractRange = val ? this.checkIdList.map(item => item.dictKey) : [];
  4854. this.isIndeterminate1 = false;
  4855. },
  4856. handleCheckedTypeChange(value){
  4857. let checkedCount = value.length;
  4858. this.checkAll = checkedCount === this.typeOptions.length;
  4859. this.isIndeterminate = checkedCount > 0 && checkedCount < this.typeOptions.length;
  4860. },
  4861. handleCheckedTypeChange1(value){
  4862. let checkedCount = value.length;
  4863. this.checkAll1 = checkedCount === this.checkIdList.length;
  4864. this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.checkIdList.length;
  4865. },
  4866. handleSelectionChange(val) {
  4867. let arr = []
  4868. if(val.length>0){
  4869. for (let index = 0; index < val.length; index++) {
  4870. let i = val[index];
  4871. if(this.templateIdList[0].type===2){
  4872. arr.push(i.pkeyId)
  4873. }else{
  4874. arr.push(i.id)
  4875. }
  4876. // arr.push(i.id)
  4877. }
  4878. this.syncForm.formIds=arr.join(',')
  4879. }
  4880. },
  4881. async handleCommand(command,row){
  4882. await this.getNodeStatusData()
  4883. if(this.syncListDialog){
  4884. return
  4885. }
  4886. this.checkRow=row
  4887. if(command==='a'){
  4888. this.$confirm("当前表单配置将同步到项目下所有相同表单,请谨慎同步!!!!!!", "表单同步提醒", {
  4889. distinguishCancelAndClose: true,
  4890. confirmButtonText: "确定",
  4891. cancelButtonText: "取消",
  4892. }).then(() => {
  4893. addSync({
  4894. projectId:this.projectid,
  4895. range:'3',
  4896. nodeId:row.pkeyId,
  4897. nodeName:this.curTreeData.title,
  4898. }
  4899. ).then((res) => {
  4900. if(res.data.code==200){
  4901. this.$message.success(res.data.msg)
  4902. }else{
  4903. this.$message.error(res.data.msg)
  4904. }
  4905. })
  4906. });
  4907. }else if(command==='b'){
  4908. this.syncTableDialog=true
  4909. if(this.$refs.proTable1){
  4910. this.$refs.proTable1.clearSelection()
  4911. }
  4912. }
  4913. },
  4914. saveTableSync(){
  4915. this.saveTableSyncLoad=true
  4916. addSync({
  4917. projectId:this.projectid,
  4918. range:'4',
  4919. nodeId:this.checkRow.pkeyId,
  4920. nodeName:this.curTreeData.title,
  4921. formIds:this.formIds,
  4922. }
  4923. ).then((res) => {
  4924. this.saveTableSyncLoad=false
  4925. if(res.data.code==200){
  4926. this.$message.success(res.data.msg)
  4927. this.syncTableDialog=false
  4928. this.$refs.proTable1.clearSelection()
  4929. }else{
  4930. this.$message.error(res.data.msg)
  4931. }
  4932. })
  4933. this.saveTableSyncLoad=false
  4934. },
  4935. handleNodeClick(data) {
  4936. selectByNodeTable(data.id, this.projectid, this.id).then((res) => {
  4937. if (res.data.data.length) {
  4938. this.preTableData1 = res.data.data;
  4939. } else {
  4940. this.preTableData1 = [];
  4941. }
  4942. });
  4943. },
  4944. handleSelectionChange1(val) {
  4945. let arr = []
  4946. if(val.length>0){
  4947. for (let index = 0; index < val.length; index++) {
  4948. let i = val[index];
  4949. arr.push(i.id)
  4950. }
  4951. this.formIds=arr.join(',')
  4952. // this.syncForm.formIds=arr.join(',')
  4953. }
  4954. },
  4955. async refreshData(){
  4956. this.refreshLoading=true
  4957. getNodeStatus({ id:this.curTreeData.primaryKeyId}).then((res) => {
  4958. this.refreshLoading=false
  4959. if(res.data.code==200){
  4960. if(res.data.data){
  4961. this.syncListData.nodeNum=res.data.data.nodeNum
  4962. this.syncListData.nodeNumEnd=res.data.data.nodeNumEnd
  4963. }else{
  4964. this.syncListData={
  4965. nodeNum:'',//同步节点数量
  4966. nodeNumEnd:''//已同步数量
  4967. }
  4968. }
  4969. }else{
  4970. this.syncListData={
  4971. nodeNum:'',//同步节点数量
  4972. nodeNumEnd:''//已同步数量
  4973. }
  4974. this.$message.error(res.data.msg)
  4975. }
  4976. }).finally(() => {
  4977. this.refreshLoading = false;
  4978. });
  4979. },
  4980. refreshData1(){
  4981. console.log('shuax');
  4982. this.refreshLoading1=true
  4983. getById({ id:this.isAdd}).then((res) => {
  4984. this.refreshLoading1=false
  4985. if(res.data.code==200){
  4986. if(res.data.data){
  4987. this.syncListData.nodeNum=res.data.data.nodeNum
  4988. this.syncListData.nodeNumEnd=res.data.data.nodeNumEnd
  4989. }else{
  4990. this.syncListData={
  4991. nodeNum:'',//同步节点数量
  4992. nodeNumEnd:''//已同步数量
  4993. }
  4994. }
  4995. }else{
  4996. this.syncListData={
  4997. nodeNum:'',//同步节点数量
  4998. nodeNumEnd:''//已同步数量
  4999. }
  5000. this.$message.error(res.data.msg)
  5001. }
  5002. });
  5003. },
  5004. getNodeStatusData(){
  5005. let ids=''
  5006. if(this.isShowLeft){
  5007. ids=this.$refs.syncProTree.getCheckedKeys()
  5008. ids=ids.join(',')
  5009. }
  5010. else{
  5011. ids=this.curTreeData.primaryKeyId
  5012. }
  5013. getNodeStatus({ id:ids}).then((res) => {
  5014. if(res.data.code==200){
  5015. if(res.data.data){
  5016. this.syncListData.nodeNum=res.data.data.nodeNum
  5017. this.syncListData.nodeNumEnd=res.data.data.nodeNumEnd
  5018. this.syncListDialog=true
  5019. }else{
  5020. this.syncListData={
  5021. nodeNum:'',//同步节点数量
  5022. nodeNumEnd:''//已同步数量
  5023. }
  5024. this.syncListDialog=false
  5025. }
  5026. }else{
  5027. this.syncListDialog=false
  5028. this.syncListData={
  5029. nodeNum:'',//同步节点数量
  5030. nodeNumEnd:''//已同步数量
  5031. }
  5032. this.$message.error(res.data.msg)
  5033. }
  5034. });
  5035. },
  5036. //基础数据管理
  5037. handleBasicClick(command) {
  5038. if (command === "code") {
  5039. this.codeDialog = true;
  5040. this.$refs.codeSetRef.show()
  5041. }else if(command === "rule") {
  5042. this.$router.push({
  5043. path: "/rule/manager",
  5044. query: {
  5045. id: this.id,
  5046. parentId:this.nodeDetail.parentId,
  5047. tenant_id: this.userInfo.tenant_id,
  5048. projectid: this.projectid,
  5049. },
  5050. });
  5051. }
  5052. }
  5053. },
  5054. watch: {
  5055. "GLExcelFrom.search"(val) {
  5056. console.log(val);
  5057. if (this.exceldata) {
  5058. this.$refs.tree.filter(val);
  5059. }
  5060. },
  5061. 'syncForm.contractRange': {
  5062. handler(newVal) {
  5063. if (newVal && newVal.length) {
  5064. const selectedValues = newVal.map(key => {
  5065. const item = this.checkIdList.find(item => item.dictKey === key);
  5066. return item ? item.dictValue : key;
  5067. });
  5068. this.syncForm.contractRangeName = selectedValues.join(',');
  5069. } else {
  5070. this.syncForm.contractRangeName = '';
  5071. }
  5072. },
  5073. immediate: true
  5074. },
  5075. 'syncForm.templateId': {
  5076. handler(newVal) {
  5077. if (newVal && newVal.length) {
  5078. for (let index = 0; index < this.templateIdList.length; index++) {
  5079. const elemet = this.templateIdList[index];
  5080. if(elemet.id==newVal){
  5081. this.syncForm.templateName = elemet.name;
  5082. break
  5083. }
  5084. }
  5085. } else {
  5086. this.syncForm.rangeName = '';
  5087. }
  5088. },
  5089. immediate: true
  5090. },
  5091. 'syncForm.type': {
  5092. handler(newVal) {
  5093. if (newVal && newVal.length) {
  5094. const selectedValues = newVal.map(key => {
  5095. const item = this.typeOptions.find(item => item.dictKey === key);
  5096. return item ? item.dictValue : key;
  5097. });
  5098. this.syncForm.typeName = selectedValues.join(',');
  5099. } else {
  5100. this.syncForm.typeName = '';
  5101. }
  5102. },
  5103. immediate: true
  5104. },
  5105. 'syncForm.range': {
  5106. handler(newVal) {
  5107. console.log(newVal,'newVal');
  5108. if (newVal && newVal.length) {
  5109. for (let index = 0; index < this.rangeOptions.length; index++) {
  5110. const elemet = this.rangeOptions[index];
  5111. if(elemet.dictKey==newVal){
  5112. this.syncForm.rangeName = elemet.dictValue;
  5113. break
  5114. }
  5115. }
  5116. } else {
  5117. this.syncForm.rangeName = '';
  5118. }
  5119. },
  5120. immediate: true
  5121. },
  5122. },
  5123. components: {
  5124. dynamicExcel,
  5125. ManualSorting,
  5126. FormulaEdit,
  5127. EditElement,
  5128. FormulaEditone,
  5129. CodeSet
  5130. },
  5131. };
  5132. </script>
  5133. <style scoped lang="scss">
  5134. .font-s-12 ::v-deep .iconfont {
  5135. font-size: 12px;
  5136. }
  5137. .el-popper[x-placement^="bottom"] {
  5138. margin-top: -6px;
  5139. }
  5140. .right-btn {
  5141. position: absolute;
  5142. right: 20px;
  5143. top: 10px;
  5144. font-size: 20px;
  5145. }
  5146. .custom-tree-node {
  5147. .normal-black {
  5148. display: none;
  5149. }
  5150. &:hover {
  5151. .normal-black {
  5152. display: inline-block;
  5153. }
  5154. }
  5155. &.show .normal-black {
  5156. display: inline-block;
  5157. }
  5158. }
  5159. .excelBox {
  5160. ::v-deep .el-dialog__body {
  5161. padding: 20px;
  5162. }
  5163. }
  5164. //调整表单样式
  5165. .excelHtml {
  5166. position: absolute;
  5167. z-index: 999999;
  5168. top: 50px;
  5169. left: 0px;
  5170. width: 100%;
  5171. height: 100%;
  5172. }
  5173. .jiedian {
  5174. ::v-deep .el-dialog__body {
  5175. padding: 10px 20px !important;
  5176. }
  5177. }
  5178. .filter-tree {
  5179. min-width: 100%;
  5180. display: inline-block;
  5181. }
  5182. .full-dialog {
  5183. ::v-deep .el-dialog__body {
  5184. padding-bottom: 0;
  5185. padding-top: 0;
  5186. }
  5187. ::v-deep .basic-container {
  5188. height: calc(100vh - 60px);
  5189. }
  5190. }
  5191. .my-basic-con {
  5192. padding: 6px 6px;
  5193. }
  5194. // 树形控件菜单样式
  5195. .contextmenu {
  5196. margin: 0;
  5197. background: #fff;
  5198. z-index: 1000;
  5199. position: fixed; //关键样式设置固定定位
  5200. list-style-type: none;
  5201. padding: 5px 0;
  5202. border-radius: 4px;
  5203. font-size: 12px;
  5204. font-weight: 400;
  5205. color: #333;
  5206. box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
  5207. }
  5208. .contextmenu li {
  5209. margin: 0;
  5210. padding: 7px 16px;
  5211. cursor: pointer;
  5212. }
  5213. .contextmenu li:hover {
  5214. background: #eee;
  5215. }
  5216. .selectBtn {
  5217. position: absolute;
  5218. top: 50px;
  5219. right: 585px;
  5220. z-index: 1000;
  5221. width: 140px;
  5222. text-align: left;
  5223. }
  5224. .titlerow {
  5225. // float: right;
  5226. background-color: rgba(31, 34, 41, 0.8);
  5227. // width:104%;
  5228. padding-left: 10px;
  5229. padding-right: 10px;
  5230. text-align: right;
  5231. margin-top: -20px;
  5232. margin-left: -20px;
  5233. margin-right: -20px;
  5234. }
  5235. .dialog-title{
  5236. display: flex;
  5237. }
  5238. .dialog-title-text{
  5239. flex: 0.4;
  5240. padding-left: 10px;
  5241. }
  5242. .dialog-title-tip{
  5243. flex: 0.6;
  5244. // position: absolute;
  5245. color:rgba(255, 125, 67, 1);
  5246. padding-left: 40px;
  5247. // right: 60px;
  5248. }
  5249. .sync-container{
  5250. margin-top: -30px;
  5251. display: flex;
  5252. height: 570px;
  5253. .box-card-1{
  5254. margin-right: 10px;
  5255. height: 100%;
  5256. overflow-y: auto;
  5257. }
  5258. .box-card-2{
  5259. flex: 1;
  5260. height: 100%;
  5261. overflow-y: auto;
  5262. .el-form-item {
  5263. border: 1px solid #dcdfe6;
  5264. padding: 0 10px 10px 10px;
  5265. border-radius: 4px;
  5266. font-weight: bold;
  5267. .el-form-item__label {
  5268. font-weight: bold;
  5269. padding-bottom: 0px;
  5270. }
  5271. .el-form--label-top .el-form-item__label{
  5272. padding: 0px !important;
  5273. }
  5274. }
  5275. }
  5276. }
  5277. .content-box{
  5278. display: flex;
  5279. flex-direction: column;
  5280. justify-content: center;
  5281. align-items: center;
  5282. font-weight: bolder;
  5283. .mt-14{
  5284. margin-top: 14px;
  5285. }
  5286. }
  5287. </style>
  5288. <style lang="scss">
  5289. .el-dialog.hc-link-nodes-dialog {
  5290. width: 500px;
  5291. margin-top: 50px !important;
  5292. height: calc(100% - 100px);
  5293. .el-dialog__body {
  5294. height: calc(100% - 154px);
  5295. border-top: 1px solid #eee;
  5296. border-bottom: 1px solid #eee;
  5297. padding: 14px;
  5298. overflow: auto;
  5299. }
  5300. }
  5301. .el-tree.hc-link-nodes-tree .el-tree-node .el-tree-node__content {
  5302. .el-checkbox {
  5303. display: none;
  5304. }
  5305. .is-leaf + .el-checkbox {
  5306. display: inline-block;
  5307. }
  5308. }
  5309. .warning-text{
  5310. color: orange;
  5311. font-weight: bold;
  5312. }
  5313. .orange {
  5314. color: orange;
  5315. }
  5316. .box-card-2{
  5317. .el-form-item {
  5318. .el-form-item__content {
  5319. line-height: 10px !important;
  5320. margin-top: -10px !important;
  5321. }
  5322. }
  5323. }
  5324. </style>