tree.vue 166 KB

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