tree.vue 167 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660
  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" placeholder="可填写分部评定权值/试验编号配置"></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. let pid=data.primaryKeyId?data.primaryKeyId:data.pKeyId
  4129. this.getTempProjectList(pid)
  4130. },
  4131. syncProjectHandle(data) {
  4132. this.$confirm("是否同步节点【" + data.title + "】到合同段?", "提示", {
  4133. confirmButtonText: "确定",
  4134. cancelButtonText: "取消",
  4135. type: "warning",
  4136. }).then(() => {
  4137. let notify = this.$notify({
  4138. title: "提示",
  4139. message: "节点数据同步中...",
  4140. duration: 0,
  4141. });
  4142. let pid = data.primaryKeyId ? data.primaryKeyId : data.pKeyId;
  4143. syncNodeinfo(pid)
  4144. .then(() => {
  4145. this.updateNodeTable();
  4146. this.$message({
  4147. type: "success",
  4148. message: "同步成功",
  4149. });
  4150. })
  4151. .catch(() => {
  4152. this.$message({
  4153. type: "error",
  4154. message: "同步失败",
  4155. });
  4156. })
  4157. .finally(() => {
  4158. notify.close();
  4159. });
  4160. });
  4161. },
  4162. //同步元素表单排序到合同段
  4163. async syncSortHandle(data) {
  4164. console.log('同步到合同');
  4165. this.isShowLeft=false
  4166. this.curTreeData=data
  4167. if(this.syncListDialog){
  4168. return
  4169. }
  4170. // await this.getNodeStatusData()
  4171. this.syncForm.range='2'
  4172. this.proSyncTag=true
  4173. this.isShowTable=true
  4174. this.getTypeOptions()
  4175. this.getRangeOptions()
  4176. this.getCheckIdList()
  4177. selectByNodeTable(data.id, this.projectid, this.id).then((res) => {
  4178. if (res.data.data.length>0) {
  4179. this.preTableData = res.data.data;
  4180. } else {
  4181. this.preTableData = [];
  4182. }
  4183. });
  4184. },
  4185. typeTreeLoadNode(node, resolve) {
  4186. let pid = 0;
  4187. if (node.level != 0) {
  4188. pid = node.data.id;
  4189. }
  4190. tabTypeLazyTree(pid, this.projectid).then((res) => {
  4191. let arr = [];
  4192. if (Array.isArray(res.data.data)) {
  4193. arr = res.data.data;
  4194. }
  4195. return resolve(arr);
  4196. });
  4197. },
  4198. getTypeTreeDetail() {},
  4199. independent() {
  4200. this.$router.push({
  4201. path: "/project/independent",
  4202. query: {
  4203. pid: this.projectid,
  4204. wbsid: this.$route.query.wbsid,
  4205. wbsType: this.wbsType,
  4206. },
  4207. });
  4208. },
  4209. archiveTimeClick() {
  4210. this.$router.push({
  4211. path: "/project/archiveTime",
  4212. query: { pid: this.projectid, wbsid: this.$route.query.wbsid },
  4213. });
  4214. },
  4215. syncElectric(item) {
  4216. if (this.curTreeData.primaryKeyId || this.curTreeData.pKeyId) {
  4217. console.log("同步电签默认信息");
  4218. this.$confirm("是否同步电签默认信息?", "提示", {
  4219. confirmButtonText: "确定",
  4220. cancelButtonText: "取消",
  4221. type: "warning",
  4222. }).then(() => {
  4223. this.syncElectricLoad = true;
  4224. this.menuoptions.forEach((ele) => {
  4225. if (item.value == ele.value) {
  4226. ele.load = true;
  4227. }
  4228. });
  4229. let pid = this.curTreeData.primaryKeyId
  4230. ? this.curTreeData.primaryKeyId
  4231. : this.curTreeData.pKeyId;
  4232. syncProjecteVisa(this.projectid, pid)
  4233. .then(() => {
  4234. this.$message({
  4235. type: "success",
  4236. message: "同步成功!",
  4237. });
  4238. })
  4239. .finally(() => {
  4240. this.syncElectricLoad = false;
  4241. this.menuoptions.forEach((ele) => {
  4242. if (item.value == ele.value) {
  4243. ele.load = false;
  4244. }
  4245. });
  4246. });
  4247. });
  4248. } else {
  4249. this.$message.warning("请先选择左侧节点");
  4250. }
  4251. },
  4252. //节点参数 关联元素
  4253. linkEle(row) {
  4254. console.log(row, "row");
  4255. if (!row.id) {
  4256. this.$message.warning("请先保存数据,再点击关联元素");
  4257. } else {
  4258. this.linkEleVisible = true;
  4259. this.curParam = row;
  4260. getParamElements({
  4261. nodeId: this.curTreeData.id,
  4262. projectId: this.projectid,
  4263. paramId: row.id,
  4264. scopeType: 10,
  4265. }).then((res) => {
  4266. if (res.data.data.length) {
  4267. this.linkEleTableList = res.data.data;
  4268. } else {
  4269. this.linkEleTableList = [];
  4270. }
  4271. });
  4272. }
  4273. },
  4274. //关联元素弹框
  4275. tolinkEle(row) {
  4276. this.curLinkEleTable = row;
  4277. this.linkCheckVisible = true;
  4278. let pid = this.curTreeData.primaryKeyId
  4279. ? this.curTreeData.primaryKeyId
  4280. : this.curTreeData.pKeyId;
  4281. selectFormElements(row.id, { type: 3, nodeId: pid }).then((res) => {
  4282. res.data.data.forEach((ele) => {
  4283. ele.checked = false;
  4284. ele.show = true;
  4285. });
  4286. this.linkEleList = res.data.data;
  4287. this.linkEleListAll = [].concat(this.linkEleList);
  4288. });
  4289. },
  4290. //删除关联
  4291. delLink(data) {
  4292. this.$confirm("删除关联, 是否继续?", "提示", {
  4293. confirmButtonText: "确定",
  4294. cancelButtonText: "取消",
  4295. type: "warning",
  4296. })
  4297. .then(() => {
  4298. console.log(data);
  4299. delParamElements(data).then(() => {
  4300. this.$message({
  4301. type: "success",
  4302. message: "删除成功!",
  4303. });
  4304. getParamElements({
  4305. nodeId: this.curTreeData.id,
  4306. projectId: this.projectid,
  4307. paramId: this.curParam.id,
  4308. scopeType: 10,
  4309. }).then((res) => {
  4310. if (res.data.data.length) {
  4311. this.linkEleTableList = res.data.data;
  4312. } else {
  4313. this.linkEleTableList = [];
  4314. }
  4315. });
  4316. });
  4317. })
  4318. .catch(() => {});
  4319. },
  4320. //筛选元素
  4321. searchEle() {
  4322. this.linkEleList = this.linkEleListAll.filter((ele) => {
  4323. return ele.eName.indexOf(this.linkEleKey) > -1;
  4324. });
  4325. },
  4326. linkEleCheck(value, index) {
  4327. //console.log(value)
  4328. if (value) {
  4329. this.linkEleList.forEach((ele, i) => {
  4330. if (i != index) {
  4331. ele.checked = false;
  4332. }
  4333. });
  4334. }
  4335. },
  4336. //关联元素
  4337. saveLinkEle() {
  4338. let target = {};
  4339. this.linkEleList.forEach((e) => {
  4340. if (e.checked == true) {
  4341. target = { elementId: e.id, paramId: this.curParam.id };
  4342. }
  4343. });
  4344. if (JSON.stringify(target) !== "{}") {
  4345. specifiedParamElements(target).then((data) => {
  4346. this.linkCheckVisible = false;
  4347. getParamElements({
  4348. nodeId: this.curTreeData.id,
  4349. projectId: this.projectid,
  4350. paramId: this.curParam.id,
  4351. scopeType: 10,
  4352. }).then((res) => {
  4353. if (res.data.data.length) {
  4354. this.linkEleTableList = res.data.data;
  4355. } else {
  4356. this.linkEleTableList = [];
  4357. }
  4358. });
  4359. });
  4360. } else {
  4361. this.$message.warning("请先选择关联元素");
  4362. }
  4363. },
  4364. //树形控件菜单相关方法
  4365. mouseout() {
  4366. this.menuvisible = false;
  4367. },
  4368. //展示菜单
  4369. showMenu(e, data, node) {
  4370. e.preventDefault();
  4371. console.log(e, "e");
  4372. var x = e.pageX; //这个应该是相对于整个浏览器页面的x坐标,左上角为坐标原点(0,0)
  4373. var y = e.pageY; //这个应该是相对于整个浏览器页面的y坐标,左上角为坐标原点(0,0)
  4374. this.menutop = y;
  4375. this.menuleft = x;
  4376. this.menuvisible = true;
  4377. },
  4378. menuClick(e, item, data) {
  4379. e.preventDefault();
  4380. if (item.key === "sort") {
  4381. this.sortpai(data);
  4382. } else if (item.key === "sync1") {
  4383. this.syncNodeTableHandle(data);
  4384. } //
  4385. else if (item.key === "sync3") {
  4386. this.syncSortHandle(data);
  4387. } else if (item.key === "add") {
  4388. this.addNodeHandle();
  4389. } else if (item.key === "edit") {
  4390. this.editNodeHandle();
  4391. } else if (item.key === "del") {
  4392. this.delNodeHandle();
  4393. } else if (item.value === "jdSync") {
  4394. this.syncInfoHandle(item);
  4395. } else if (item.value === "gsSync") {
  4396. this.$message({
  4397. type: "info",
  4398. message: "暂无相关接口!",
  4399. });
  4400. } else if (item.value === "dqSync") {
  4401. this.syncElectric(item);
  4402. }
  4403. },
  4404. //展示数据同步下拉框
  4405. showSyncbtn() {
  4406. this.isshowSyncbtn = !this.isshowSyncbtn;
  4407. },
  4408. getDictTypelist() {
  4409. if (this.dynamicDictList.length > 1) {
  4410. return;
  4411. }
  4412. getDictionary({
  4413. code: "land_field_dict",
  4414. }).then((res) => {
  4415. res.data.data.forEach((element) => {
  4416. element.dictKey = Number(element.dictKey);
  4417. });
  4418. this.dynamicDictList = res.data.data;
  4419. const filteredList = this.dynamicDictList.filter(
  4420. (item) => item.dictKey === 600 || item.dictKey === 0
  4421. );
  4422. this.dynamicDictList = filteredList;
  4423. });
  4424. },
  4425. getSelectFormElements(id) {
  4426. this.editEleTableloading = true;
  4427. selectFormElements(this.curEleTable.pkeyId, {
  4428. type: 0,
  4429. search: this.searchinput,
  4430. }).then((res) => {
  4431. this.editEleTableloading = false;
  4432. this.editTable = res.data.data;
  4433. });
  4434. },
  4435. //编辑
  4436. handleEdit(index, row) {
  4437. this.curEleTable = row;
  4438. this.getSelectFormElements();
  4439. this.editDialogShow = true;
  4440. this.getDictTypelist();
  4441. },
  4442. //编辑元素信息(请谨慎操作)
  4443. clearsearchinput() {
  4444. this.getSelectFormElements();
  4445. },
  4446. searchinputChange() {
  4447. this.getSelectFormElements();
  4448. },
  4449. saveEles() {
  4450. if (this.editTable.length > 0) {
  4451. this.saveLoading = true;
  4452. updateBatchElements(
  4453. this.editTable,
  4454. this.curEleTable.initTableName
  4455. ).then(() => {
  4456. this.saveLoading = false;
  4457. this.editDialogShow = false;
  4458. this.updateNodeTable();
  4459. this.$message({
  4460. type: "success",
  4461. message: "保存成功!",
  4462. });
  4463. });
  4464. } else {
  4465. this.editDialogShow = false;
  4466. this.updateNodeTable();
  4467. this.$message({
  4468. type: "success",
  4469. message: "保存成功!",
  4470. });
  4471. }
  4472. },
  4473. //文件题名(全局按钮)
  4474. fileTitleHandle(){
  4475. this.getFileTableData()
  4476. this.fileTitleVisible = true;
  4477. },
  4478. changeRadio(val){
  4479. console.log(val,'val');
  4480. const fileItem = this.fileTableData[this.chooseFileIndex];
  4481. this.$set(fileItem, 'type', val);
  4482. },
  4483. //获取文件题名规则
  4484. getFileTableData(){
  4485. this.fileTableLoading=true
  4486. getNameRule(
  4487. { projectId:this.projectid}
  4488. ).then((res) => {
  4489. this.fileTableLoading=false
  4490. if(res.data.data){
  4491. this.fileTableData = res.data.data;
  4492. this.fileTableData.forEach((element) => {
  4493. element.roleNameVal = element.nameRule.split(",");
  4494. element.ruleName=element.nameVaule.split("-")
  4495. if(element.type===2){
  4496. const list=element.list
  4497. let arr=[]
  4498. let arrId=[]
  4499. list.forEach((ele) => {
  4500. arr.push(ele.nodeName)
  4501. arrId.push(ele.nodeId)
  4502. });
  4503. element.ruleSizeVal = arr.join('、');
  4504. element.ruleSizeValId=arrId
  4505. }else{
  4506. element.ruleSizeVal=''
  4507. element.ruleSizeValId=''
  4508. }
  4509. });
  4510. }else{
  4511. this.fileTableData =[]
  4512. }
  4513. });
  4514. },
  4515. //获取文件题名范围
  4516. getTitleRangeData(row){
  4517. this.fileTreeLoading=true
  4518. getTitleRange(
  4519. { projectId:this.projectid,
  4520. nameId:row.nameId,
  4521. }
  4522. ).then((res) => {
  4523. this.fileTreeLoading=false
  4524. if(res.data.data){
  4525. this.fileTreeData = res.data.data;
  4526. // this.deCheckTreeKeys = this.fileTreeData.filter(node => node.status === 11).map(node => node.id);
  4527. }else{
  4528. this.fileTreeData =[]
  4529. }
  4530. });
  4531. },
  4532. //选择题名范围
  4533. chooseFile(index,row){
  4534. const {ruleName}=row
  4535. if(ruleName&&ruleName.length>0){
  4536. this.chooseFileVisible = true;
  4537. this.chooseFileIndex= index;
  4538. this.deCheckTreeKeys=row.ruleSizeValId
  4539. this.getTitleRangeData(row)
  4540. }else{
  4541. this.$message.warning('请先选择文件题名规则');
  4542. }
  4543. },
  4544. checkFileSize(data,{checkedNodes,checkedKeys}){
  4545. let checkedTitles = checkedNodes.map(node => node.nodeName).join('、');
  4546. this.fileTableData[this.chooseFileIndex].isEdit1=false
  4547. const fileItem = this.fileTableData[this.chooseFileIndex];
  4548. this.$set(fileItem, 'ruleSizeVal', checkedTitles);
  4549. this.$set(fileItem, 'ruleSizeValId', checkedKeys);
  4550. this.deCheckTreeKeys=checkedKeys
  4551. },
  4552. getCheckedNodes (treeData, checkedKeys) {
  4553. let result = []
  4554. treeData.forEach(node => {
  4555. if (checkedKeys&&checkedKeys.includes(node.id)) {
  4556. result.push(node)
  4557. }
  4558. if (node.children) {
  4559. result = result.concat(getCheckedNodes(node.children, checkedKeys))
  4560. }
  4561. })
  4562. return result
  4563. },
  4564. saveFileSize(){
  4565. // const checkedNodes = this.getCheckedNodes(this.fileTreeData, this.deCheckTreeKeys).filter(node => node.status !== 11)
  4566. const checkedNodes = this.getCheckedNodes(this.fileTreeData, this.deCheckTreeKeys)
  4567. this.fileTableData[this.chooseFileIndex].ruleSizeValId = checkedNodes.map(node => node.id)
  4568. this.fileTableData[this.chooseFileIndex].ruleSizeVal = checkedNodes.map(node => node.nodeName).join('、')
  4569. this.chooseFileVisible = false;
  4570. this.isShowSize=false
  4571. setTimeout(()=>{
  4572. this.isShowSize=true
  4573. },100)
  4574. },
  4575. editRow(index,row){
  4576. console.log(row,'row');
  4577. this.$set(row, "isEdit", true);
  4578. this.$set(row, "isEdit1", true);
  4579. this.fileTitleModel.type=row.type
  4580. },
  4581. //保存文件题名
  4582. saveRow(index,row){
  4583. if(row.ruleName.length<1){
  4584. this.$message.warning('请选择文件题名规则')
  4585. return
  4586. }
  4587. if(!row.type){
  4588. this.$message.warning('请选择文件题名范围')
  4589. return
  4590. }
  4591. this.$set(row, "isEdit", false);
  4592. this.$set(row, "isEdit1", false)
  4593. const ruleName=row.ruleName.join('-')
  4594. let ruleSizeVal=''
  4595. if(row.type==1){
  4596. ruleSizeVal=''
  4597. }else{
  4598. ruleSizeVal=row.ruleSizeValId.join(',')
  4599. }
  4600. let nameRuleDtos={
  4601. nameId:row.nameId,
  4602. nameRule:ruleName,
  4603. nodeId:ruleSizeVal,
  4604. projectId:this.projectid,
  4605. type:this.fileTitleModel.type
  4606. }
  4607. saveOrUpdateNameRule(
  4608. [nameRuleDtos]
  4609. ).then((res) => {
  4610. if(res.data.code==200){
  4611. this.$message.success(res.data.msg)
  4612. this.getFileTableData()
  4613. }else{
  4614. this.$message.error(res.data.msg)
  4615. }
  4616. });
  4617. },
  4618. changeRoleName(data,row){
  4619. const originalData=this.nodeTypelist
  4620. const dictKeyToDictValueMap = originalData.reduce((acc, item) => {
  4621. acc[item.dictKey] = item.dictValue;
  4622. return acc;
  4623. }, {});
  4624. const result = data.map(dictKey => dictKeyToDictValueMap[dictKey]);
  4625. this.$set(row, "roleNameVal", result);
  4626. this.selectDiv=Math.random()
  4627. },
  4628. addRow(){
  4629. this.fileTableData.unshift({isEdit:true,isEdit1:true,})
  4630. this.fileTitleModel.type=''
  4631. },
  4632. refreshRow(){
  4633. this.getFileTableData()
  4634. },
  4635. delRow(index,row){
  4636. if(!row.nameId){
  4637. this.fileTableData.splice(index,1)
  4638. }else{
  4639. this.$confirm("确定将选择数据删除?", {
  4640. confirmButtonText: "确定",
  4641. cancelButtonText: "取消",
  4642. type: "warning"
  4643. })
  4644. .then(() => {
  4645. return deletedNameRule(
  4646. {nameId:row.nameId}
  4647. ).then((res) => {
  4648. if(res.data.code==200){
  4649. this.$message.success(res.data.msg)
  4650. this.getFileTableData()
  4651. }else{
  4652. this.$message.error(res.data.msg)
  4653. }
  4654. });
  4655. });
  4656. }
  4657. },
  4658. batchsaveFileSize(){
  4659. let isCansave=true
  4660. let saveArr=[]
  4661. this.fileTableData.forEach((ele)=>{
  4662. if(ele.ruleName.length<1||!ele.type){
  4663. this.$message.warning('请先完善相关信息')
  4664. isCansave=false
  4665. return
  4666. }
  4667. let ruleSizeVal=''
  4668. if(ele.type==1){
  4669. ruleSizeVal=''
  4670. }else{
  4671. ruleSizeVal=ele.ruleSizeValId.join(',')
  4672. }
  4673. const ruleName=ele.ruleName.join('-')
  4674. saveArr.push({
  4675. nameId:ele.nameId||'',
  4676. nameRule:ruleName,
  4677. nodeId:ruleSizeVal,
  4678. projectId:this.projectid,
  4679. type:ele.type
  4680. })
  4681. })
  4682. if(!isCansave){
  4683. return
  4684. }
  4685. this.saveFileLoading=true
  4686. saveOrUpdateNameRule(
  4687. saveArr
  4688. ).then((res) => {
  4689. this.saveFileLoading=false
  4690. if(res.data.code==200){
  4691. this.$message.success(res.data.msg)
  4692. this.getFileTableData()
  4693. }else{
  4694. this.$message.error(res.data.msg)
  4695. }
  4696. });
  4697. },
  4698. async proSyncbtn(){
  4699. console.log('项目数据同步');
  4700. this.isAdd=''
  4701. this.getTypeOptions()
  4702. this.getRangeOptions()
  4703. this.getCheckIdList()
  4704. this.proSyncTag=true
  4705. if(this.$refs.syncProTree){
  4706. this.$refs.syncProTree.setCheckedKeys([])
  4707. }
  4708. if(this.$refs.proTable){
  4709. this.$refs.proTable.clearSelection()
  4710. }
  4711. this.isShowLeft=true
  4712. this.isShowTable=false
  4713. },
  4714. getRangeOptions(){
  4715. getDictionary({
  4716. code: "wbs_snyc_range",
  4717. }).then((res) => {
  4718. this.rangeOptions = res.data.data;
  4719. });
  4720. },
  4721. getTypeOptions(){
  4722. getDictionary({
  4723. code: "wbs_sync_type",
  4724. }).then((res) => {
  4725. this.typeOptions = res.data.data;
  4726. });
  4727. },
  4728. handleCheckChange1(data){
  4729. console.log(data,'data1111111111');
  4730. getNodeStatus({ id:data.primaryKeyId}).then((res) => {
  4731. if(res.data.code==200){
  4732. if(res.data.data){
  4733. this.$message.success('该节点有同步任务,请取消选择')
  4734. }
  4735. }else{
  4736. this.$message.error(res.data.msg)
  4737. }
  4738. });
  4739. },
  4740. async handleCheckChange(_,{checkedKeys,halfCheckedNodes}) {
  4741. let ids=checkedKeys && checkedKeys.length ? checkedKeys.join(',') : ''
  4742. // await this.getNodeStatusData()
  4743. this.getTempProjectList(ids)
  4744. },
  4745. async getTempProjectList(ids){
  4746. if(ids.length>0){
  4747. //分页获取证书列表数据
  4748. const { data: res } = await getTempProject({
  4749. nodeIds:ids
  4750. });
  4751. if (res.code == 200) {
  4752. this.templateIdList = res.data;
  4753. }
  4754. }
  4755. },
  4756. async changeTemplateId(val){
  4757. if(!this.isShowTable){
  4758. return
  4759. }
  4760. let type=''
  4761. let projectId=''
  4762. let wbsId=''
  4763. for (let index = 0; index < this.templateIdList.length; index++) {
  4764. const elemet = this.templateIdList[index];
  4765. if(elemet.id==val){
  4766. type = elemet.type;
  4767. this.typeTem=elemet.type
  4768. projectId=elemet.id
  4769. wbsId=elemet.wbsId
  4770. break
  4771. }
  4772. }
  4773. if(type===2){
  4774. selectByNodeTable(this.curTreeData.id, projectId, wbsId).then((res) => {
  4775. if (res.data.data&&res.data.data.length > 0) {
  4776. this.preTableData = res.data.data;
  4777. } else {
  4778. this.preTableData = [];
  4779. }
  4780. });
  4781. }else{
  4782. const { data: res } = await findNodeTableByCondition1( this.curTreeData.id )
  4783. if (res.code === 200) {
  4784. console.log(Array.isArray(res.data));
  4785. if (Array.isArray(res.data)) {
  4786. this.preTableData = res.data
  4787. } else {
  4788. this.preTableData = []
  4789. }
  4790. }
  4791. }
  4792. },
  4793. async getCheckIdList(){
  4794. let code=this.wbsType!==1?'wbs_sync_contract_range':'wbs_sync_contract_quality'
  4795. getDictionary({
  4796. code: code,
  4797. }).then((res) => {
  4798. this.checkIdList = res.data.data;
  4799. });
  4800. },
  4801. closeProSyncTag(){
  4802. this.proSyncTag=false
  4803. this.syncForm={
  4804. range:'',
  4805. rangeName:'',
  4806. type:[],
  4807. typeName:'',
  4808. templateId:'',
  4809. templateName:'',
  4810. contractRange:[],
  4811. contractRangeName:'',
  4812. nodeId:'',
  4813. formIds:''};
  4814. this.preTableData=[]
  4815. this.isShowLeft=false
  4816. },
  4817. async saveProTag(){
  4818. this.syncForm.projectId=this.projectid
  4819. if(this.isShowLeft){
  4820. let ids=this.$refs.syncProTree.getCheckedKeys()
  4821. this.syncForm.nodeId=ids.join(',')
  4822. if(this.syncForm.nodeId===''){
  4823. this.$message.warning('请选择节点')
  4824. return
  4825. }
  4826. }else{
  4827. this.syncForm.nodeId=this.curTreeData.primaryKeyId
  4828. }
  4829. // await this.getNodeStatusData()
  4830. if(this.syncListDialog){
  4831. return
  4832. }
  4833. if(this.syncForm.rangeName==''){
  4834. for (let index = 0; index < this.rangeOptions.length; index++) {
  4835. const element =this. rangeOptions[index];
  4836. if(element.dictKey==this.syncForm.range){
  4837. this.syncForm.rangeName=element.dictValue
  4838. break
  4839. }
  4840. }
  4841. }
  4842. console.log(this.syncForm.range,'this.syncForm.range=');
  4843. if(this.syncForm.range===''){
  4844. this.$message.warning('请选择同步范围')
  4845. return
  4846. }
  4847. this.saveProTagLoading=true
  4848. addSync({
  4849. ...this.syncForm,
  4850. type:this.syncForm.type.join(','),
  4851. contractRange:this.syncForm.contractRange.join(',')
  4852. }
  4853. ).then((res) => {
  4854. console.log(res,'res');
  4855. this.saveProTagLoading=false
  4856. if(res.data.code==200){
  4857. this.$message.success(res.data.msg)
  4858. //this.getNodeStatusData()
  4859. console.log(res.data,'res.data');
  4860. this.syncListData.nodeNum=res.data.data.nodeNum
  4861. this.syncListData.nodeNumEnd=res.data.data.nodeNumEnd
  4862. if(this.isShowLeft){
  4863. this.isAdd=res.data.data.id
  4864. }else{
  4865. this.isAdd=''
  4866. }
  4867. this.syncListDialog=true
  4868. this.closeProSyncTag()
  4869. }else{
  4870. this.$message.error(res.data.msg)
  4871. this.saveProTagLoading=false
  4872. }
  4873. })
  4874. .finally(() => {
  4875. this.saveProTagLoading = false;
  4876. });
  4877. },
  4878. closeSyncListTag(){
  4879. this.syncListDialog=false;
  4880. this.updateNodeTable()
  4881. },
  4882. handleCheckAllChange(val) {
  4883. this.syncForm.type = val ? this.typeOptions.map(item => item.dictKey) : [];
  4884. this.isIndeterminate = false;
  4885. },
  4886. handleCheckAllChange1(val) {
  4887. this.syncForm.contractRange = val ? this.checkIdList.map(item => item.dictKey) : [];
  4888. this.isIndeterminate1 = false;
  4889. },
  4890. handleCheckedTypeChange(value){
  4891. let checkedCount = value.length;
  4892. this.checkAll = checkedCount === this.typeOptions.length;
  4893. this.isIndeterminate = checkedCount > 0 && checkedCount < this.typeOptions.length;
  4894. },
  4895. handleCheckedTypeChange1(value){
  4896. let checkedCount = value.length;
  4897. this.checkAll1 = checkedCount === this.checkIdList.length;
  4898. this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.checkIdList.length;
  4899. },
  4900. handleSelectionChange(val) {
  4901. let arr = []
  4902. if(val.length>0){
  4903. for (let index = 0; index < val.length; index++) {
  4904. let i = val[index];
  4905. if( this.typeTem===2){
  4906. arr.push(i.pkeyId)
  4907. }else{
  4908. arr.push(i.id)
  4909. }
  4910. // arr.push(i.id)
  4911. }
  4912. this.syncForm.formIds=arr.join(',')
  4913. }
  4914. },
  4915. async handleCommand(command,row){
  4916. // await this.getNodeStatusData()
  4917. if(this.syncListDialog){
  4918. return
  4919. }
  4920. this.checkRow=row
  4921. if(command==='a'){
  4922. this.$confirm("当前表单配置将同步到项目下所有相同表单,请谨慎同步!!!!!!", "表单同步提醒", {
  4923. distinguishCancelAndClose: true,
  4924. confirmButtonText: "确定",
  4925. cancelButtonText: "取消",
  4926. }).then(() => {
  4927. addSync({
  4928. projectId:this.projectid,
  4929. range:'3',
  4930. nodeId:row.pkeyId,
  4931. nodeName:this.curTreeData.title,
  4932. }
  4933. ).then((res) => {
  4934. if(res.data.code==200){
  4935. this.$message.success(res.data.msg)
  4936. }else{
  4937. this.$message.error(res.data.msg)
  4938. }
  4939. })
  4940. });
  4941. }else if(command==='b'){
  4942. this.syncTableDialog=true
  4943. this.isShowLeft=true
  4944. if(this.$refs.proTable1){
  4945. this.$refs.proTable1.clearSelection()
  4946. }
  4947. }
  4948. },
  4949. saveTableSync(){
  4950. this.saveTableSyncLoad=true
  4951. addSync({
  4952. projectId:this.projectid,
  4953. range:'4',
  4954. nodeId:this.checkRow.pkeyId,
  4955. nodeName:this.curTreeData.title,
  4956. formIds:this.formIds,
  4957. }
  4958. ).then((res) => {
  4959. this.saveTableSyncLoad=false
  4960. if(res.data.code==200){
  4961. this.$message.success(res.data.msg)
  4962. this.syncTableDialog=false
  4963. this.$refs.proTable1.clearSelection()
  4964. this.updateNodeTable()
  4965. }else{
  4966. this.$message.error(res.data.msg)
  4967. }
  4968. })
  4969. this.saveTableSyncLoad=false
  4970. },
  4971. handleNodeClick(data) {
  4972. selectByNodeTable(data.id, this.projectid, this.id).then((res) => {
  4973. if (res.data.data.length) {
  4974. this.preTableData1 = res.data.data;
  4975. } else {
  4976. this.preTableData1 = [];
  4977. }
  4978. });
  4979. },
  4980. handleSelectionChange1(val) {
  4981. if (val.length > 1) {
  4982. // 如果选择了多个,只保留最后一个
  4983. this.$nextTick(() => {
  4984. this.$refs.proTable1.clearSelection();
  4985. this.$refs.proTable1.toggleRowSelection(val.pop());
  4986. });
  4987. }
  4988. if(val.length>0){
  4989. this.formIds=val[0].pkeyId
  4990. }else{
  4991. this.formIds=''
  4992. }
  4993. },
  4994. async refreshData(){
  4995. this.refreshLoading=true
  4996. getNodeStatus({ id:this.curTreeData.primaryKeyId}).then((res) => {
  4997. this.refreshLoading=false
  4998. if(res.data.code==200){
  4999. if(res.data.data){
  5000. this.syncListData.nodeNum=res.data.data.nodeNum
  5001. this.syncListData.nodeNumEnd=res.data.data.nodeNumEnd
  5002. }else{
  5003. this.syncListData={
  5004. nodeNum:'',//同步节点数量
  5005. nodeNumEnd:''//已同步数量
  5006. }
  5007. }
  5008. }else{
  5009. this.syncListData={
  5010. nodeNum:'',//同步节点数量
  5011. nodeNumEnd:''//已同步数量
  5012. }
  5013. this.$message.error(res.data.msg)
  5014. }
  5015. }).finally(() => {
  5016. this.refreshLoading = false;
  5017. });
  5018. },
  5019. refreshData1(){
  5020. console.log('shuax');
  5021. this.refreshLoading1=true
  5022. getById({ id:this.isAdd}).then((res) => {
  5023. this.refreshLoading1=false
  5024. if(res.data.code==200){
  5025. if(res.data.data){
  5026. this.syncListData.nodeNum=res.data.data.nodeNum
  5027. this.syncListData.nodeNumEnd=res.data.data.nodeNumEnd
  5028. }else{
  5029. this.syncListData={
  5030. nodeNum:'',//同步节点数量
  5031. nodeNumEnd:''//已同步数量
  5032. }
  5033. }
  5034. }else{
  5035. this.syncListData={
  5036. nodeNum:'',//同步节点数量
  5037. nodeNumEnd:''//已同步数量
  5038. }
  5039. this.$message.error(res.data.msg)
  5040. }
  5041. });
  5042. },
  5043. getNodeStatusData(){
  5044. let ids=''
  5045. if(this.isShowLeft){
  5046. ids=this.$refs.syncProTree.getCheckedKeys()
  5047. ids=ids.join(',')
  5048. }
  5049. else{
  5050. ids=this.curTreeData.primaryKeyId
  5051. }
  5052. getNodeStatus({ id:ids}).then((res) => {
  5053. if(res.data.code==200){
  5054. if(res.data.data){
  5055. this.syncListData.nodeNum=res.data.data.nodeNum
  5056. this.syncListData.nodeNumEnd=res.data.data.nodeNumEnd
  5057. this.syncListDialog=true
  5058. }else{
  5059. this.syncListData={
  5060. nodeNum:'',//同步节点数量
  5061. nodeNumEnd:''//已同步数量
  5062. }
  5063. this.syncListDialog=false
  5064. }
  5065. }else{
  5066. this.syncListDialog=false
  5067. this.syncListData={
  5068. nodeNum:'',//同步节点数量
  5069. nodeNumEnd:''//已同步数量
  5070. }
  5071. this.$message.error(res.data.msg)
  5072. }
  5073. });
  5074. },
  5075. //基础数据管理
  5076. handleBasicClick(command) {
  5077. if (command === "code") {
  5078. this.codeDialog = true;
  5079. this.$refs.codeSetRef.show(this.projectid)
  5080. }else if(command === "rule") {
  5081. this.$router.push({
  5082. path: "/rule/manager",
  5083. query: {
  5084. id: this.id,
  5085. parentId:this.nodeDetail.parentId,
  5086. tenant_id: this.userInfo.tenant_id,
  5087. projectid: this.projectid,
  5088. },
  5089. });
  5090. }
  5091. }
  5092. },
  5093. watch: {
  5094. "GLExcelFrom.search"(val) {
  5095. console.log(val);
  5096. if (this.exceldata) {
  5097. this.$refs.tree.filter(val);
  5098. }
  5099. },
  5100. 'syncForm.contractRange': {
  5101. handler(newVal) {
  5102. if (newVal && newVal.length) {
  5103. const selectedValues = newVal.map(key => {
  5104. const item = this.checkIdList.find(item => item.dictKey === key);
  5105. return item ? item.dictValue : key;
  5106. });
  5107. this.syncForm.contractRangeName = selectedValues.join(',');
  5108. } else {
  5109. this.syncForm.contractRangeName = '';
  5110. }
  5111. },
  5112. immediate: true
  5113. },
  5114. 'syncForm.templateId': {
  5115. handler(newVal) {
  5116. if (newVal && newVal.length) {
  5117. for (let index = 0; index < this.templateIdList.length; index++) {
  5118. const elemet = this.templateIdList[index];
  5119. if(elemet.id==newVal){
  5120. this.syncForm.templateName = elemet.name;
  5121. break
  5122. }
  5123. }
  5124. } else {
  5125. this.syncForm.rangeName = '';
  5126. }
  5127. },
  5128. immediate: true
  5129. },
  5130. 'syncForm.type': {
  5131. handler(newVal) {
  5132. if (newVal && newVal.length) {
  5133. const selectedValues = newVal.map(key => {
  5134. const item = this.typeOptions.find(item => item.dictKey === key);
  5135. return item ? item.dictValue : key;
  5136. });
  5137. this.syncForm.typeName = selectedValues.join(',');
  5138. } else {
  5139. this.syncForm.typeName = '';
  5140. }
  5141. },
  5142. immediate: true
  5143. },
  5144. 'syncForm.range': {
  5145. handler(newVal) {
  5146. console.log(newVal,'newVal');
  5147. if (newVal && newVal.length) {
  5148. for (let index = 0; index < this.rangeOptions.length; index++) {
  5149. const elemet = this.rangeOptions[index];
  5150. if(elemet.dictKey==newVal){
  5151. this.syncForm.rangeName = elemet.dictValue;
  5152. break
  5153. }
  5154. }
  5155. } else {
  5156. this.syncForm.rangeName = '';
  5157. }
  5158. },
  5159. immediate: true
  5160. },
  5161. },
  5162. components: {
  5163. dynamicExcel,
  5164. ManualSorting,
  5165. FormulaEdit,
  5166. EditElement,
  5167. FormulaEditone,
  5168. CodeSet
  5169. },
  5170. };
  5171. </script>
  5172. <style scoped lang="scss">
  5173. .font-s-12 ::v-deep .iconfont {
  5174. font-size: 12px;
  5175. }
  5176. .el-popper[x-placement^="bottom"] {
  5177. margin-top: -6px;
  5178. }
  5179. .right-btn {
  5180. position: absolute;
  5181. right: 20px;
  5182. top: 10px;
  5183. font-size: 20px;
  5184. }
  5185. .custom-tree-node {
  5186. .normal-black {
  5187. display: none;
  5188. }
  5189. &:hover {
  5190. .normal-black {
  5191. display: inline-block;
  5192. }
  5193. }
  5194. &.show .normal-black {
  5195. display: inline-block;
  5196. }
  5197. }
  5198. .excelBox {
  5199. ::v-deep .el-dialog__body {
  5200. padding: 20px;
  5201. }
  5202. }
  5203. //调整表单样式
  5204. .excelHtml {
  5205. position: absolute;
  5206. z-index: 999999;
  5207. top: 50px;
  5208. left: 0px;
  5209. width: 100%;
  5210. height: 100%;
  5211. }
  5212. .jiedian {
  5213. ::v-deep .el-dialog__body {
  5214. padding: 10px 20px !important;
  5215. }
  5216. }
  5217. .filter-tree {
  5218. min-width: 100%;
  5219. display: inline-block;
  5220. }
  5221. .full-dialog {
  5222. ::v-deep .el-dialog__body {
  5223. padding-bottom: 0;
  5224. padding-top: 0;
  5225. }
  5226. ::v-deep .basic-container {
  5227. height: calc(100vh - 60px);
  5228. }
  5229. }
  5230. .my-basic-con {
  5231. padding: 6px 6px;
  5232. }
  5233. // 树形控件菜单样式
  5234. .contextmenu {
  5235. margin: 0;
  5236. background: #fff;
  5237. z-index: 1000;
  5238. position: fixed; //关键样式设置固定定位
  5239. list-style-type: none;
  5240. padding: 5px 0;
  5241. border-radius: 4px;
  5242. font-size: 12px;
  5243. font-weight: 400;
  5244. color: #333;
  5245. box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
  5246. }
  5247. .contextmenu li {
  5248. margin: 0;
  5249. padding: 7px 16px;
  5250. cursor: pointer;
  5251. }
  5252. .contextmenu li:hover {
  5253. background: #eee;
  5254. }
  5255. .selectBtn {
  5256. position: absolute;
  5257. top: 50px;
  5258. right: 585px;
  5259. z-index: 1000;
  5260. width: 140px;
  5261. text-align: left;
  5262. }
  5263. .titlerow {
  5264. // float: right;
  5265. background-color: rgba(31, 34, 41, 0.8);
  5266. // width:104%;
  5267. padding-left: 10px;
  5268. padding-right: 10px;
  5269. text-align: right;
  5270. margin-top: -20px;
  5271. margin-left: -20px;
  5272. margin-right: -20px;
  5273. }
  5274. .dialog-title{
  5275. display: flex;
  5276. }
  5277. .dialog-title-text{
  5278. flex: 0.4;
  5279. padding-left: 10px;
  5280. }
  5281. .dialog-title-tip{
  5282. flex: 0.6;
  5283. // position: absolute;
  5284. color:rgba(255, 125, 67, 1);
  5285. padding-left: 40px;
  5286. // right: 60px;
  5287. }
  5288. .sync-container{
  5289. margin-top: -30px;
  5290. display: flex;
  5291. height: 570px;
  5292. .box-card-1{
  5293. margin-right: 10px;
  5294. height: 100%;
  5295. overflow-y: auto;
  5296. }
  5297. .box-card-2{
  5298. flex: 1;
  5299. height: 100%;
  5300. overflow-y: auto;
  5301. .el-form-item {
  5302. border: 1px solid #dcdfe6;
  5303. padding: 0 10px 10px 10px;
  5304. border-radius: 4px;
  5305. font-weight: bold;
  5306. .el-form-item__label {
  5307. font-weight: bold;
  5308. padding-bottom: 0px;
  5309. }
  5310. .el-form--label-top .el-form-item__label{
  5311. padding: 0px !important;
  5312. }
  5313. }
  5314. }
  5315. }
  5316. .content-box{
  5317. display: flex;
  5318. flex-direction: column;
  5319. justify-content: center;
  5320. align-items: center;
  5321. font-weight: bolder;
  5322. .mt-14{
  5323. margin-top: 14px;
  5324. }
  5325. }
  5326. </style>
  5327. <style lang="scss">
  5328. .el-dialog.hc-link-nodes-dialog {
  5329. width: 500px;
  5330. margin-top: 50px !important;
  5331. height: calc(100% - 100px);
  5332. .el-dialog__body {
  5333. height: calc(100% - 154px);
  5334. border-top: 1px solid #eee;
  5335. border-bottom: 1px solid #eee;
  5336. padding: 14px;
  5337. overflow: auto;
  5338. }
  5339. }
  5340. .el-tree.hc-link-nodes-tree .el-tree-node .el-tree-node__content {
  5341. .el-checkbox {
  5342. display: none;
  5343. }
  5344. .is-leaf + .el-checkbox {
  5345. display: inline-block;
  5346. }
  5347. }
  5348. .warning-text{
  5349. color: orange;
  5350. font-weight: bold;
  5351. }
  5352. .orange {
  5353. color: orange;
  5354. }
  5355. .box-card-2{
  5356. .el-form-item {
  5357. .el-form-item__content {
  5358. line-height: 10px !important;
  5359. margin-top: -10px !important;
  5360. }
  5361. }
  5362. }
  5363. </style>