tree.vue 165 KB

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