list.vue 318 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356
  1. <template>
  2. <section>
  3. <!--工具条-->
  4. <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
  5. <el-form :inline="true">
  6. <el-form-item :label="$t('listofitems')" class="toolbar_formitem_n1">
  7. </el-form-item>
  8. <el-form-item >
  9. <!-- <div style="display: flex;align-items: center;height: 40px;"> -->
  10. <div v-if="true" style="display: flex;align-items: center;height: 40px;">
  11. <el-input v-model="keyword" class="input-with-select" @keyup.enter.native="searchList()" :placeholder="searchField == '1' ? $t('peaseenterthe') : $t('peaseenterthe')" clearable="true" size="small">
  12. <el-select v-model="searchField" style="width:120px;" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')">
  13. <el-option :label="$t('headerTop.projectName')" value=1 ></el-option>
  14. <el-option :label="user.companyId == '7030' ? '项目令号' : $t('Itemno')" value=2 ></el-option>
  15. </el-select>
  16. <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
  17. </el-input>
  18. </div>
  19. </el-form-item>
  20. <el-form-item >
  21. <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ $t('state.states') }}</span>
  22. <el-select v-model="status" style="width:120px;" :placeholder="$t('defaultText.pleaseChoose')" @change="searchList" size="small">
  23. <el-option :label="$t('all')" value=0 ></el-option>
  24. <el-option :label="$t('ongoing')" value=1 ></el-option>
  25. <el-option :label="$t('state.completed')" value=2 ></el-option>
  26. <el-option :label="$t('state.undone')" value=3 ></el-option>
  27. <el-option :label="$t('paused')" value=4 ></el-option>
  28. </el-select>
  29. </el-form-item>
  30. <!-- 主项目筛选 -->
  31. <el-form-item v-if="user.timeType.mainProjectState == '1'">
  32. <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ $t('zhu-xiang-mu') }}</span>
  33. <el-select v-model="projectMainId" style="width:110px;" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="searchClfList" size="small">
  34. <el-option v-for="item in mainProjectList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
  35. </el-select>
  36. </el-form-item>
  37. <!-- 分类筛选 -->
  38. <el-form-item >
  39. <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ user.companyId == 4811 ? '项目分类' : $t('fen-lei') }}</span>
  40. <el-select v-model="statusClf" style="width:140px;" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="searchClfList" size="small">
  41. <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
  42. </el-select>
  43. </el-form-item>
  44. <el-form-item style="float:right;" v-if="permissions.projectImport || permissions.projectExport || permissions.projectClassification || (user.company.packageProject == 1 && permissions.projectCostOfItems)">
  45. <el-dropdown>
  46. <el-link type="primary" :underline="false">{{ $t('viewmore') }}<i class="el-icon-arrow-down el-icon--right"></i></el-link>
  47. <el-dropdown-menu slot="dropdown">
  48. <el-dropdown-item v-if="permissions.projectImport">
  49. <el-link type="primary" :underline="false" @click="importProjectBefore">{{ $t('importproject') }}</el-link>
  50. <!-- <el-upload ref="upload" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
  51. <el-link type="primary" :underline="false" >{{ $t('importproject') }}</el-link>
  52. </el-upload> -->
  53. </el-dropdown-item>
  54. <el-dropdown-item v-if="permissions.projectImport">
  55. <el-link type="primary" :underline="false" @click="downloadmb" v-if="user.company.packageCustomer == 1 || user.company.packageProvider == 1 || user.timeType.mainProjectState == 1 || user.companyId == '936' || user.timeType.reportCc == 1">{{ $t('Downloadthetemplate') }}</el-link>
  56. <el-link type="primary" :underline="false" href="./upload/项目导入模板.xlsx" :download="$t('importtemplateproject') + '.xlsx'" v-else-if="user.timeType.projectWithDept==0 && (user.timeType.reportAuditType==0||user.timeType.reportAuditType==4||user.timeType.reportAuditType==6)">{{ $t('Downloadthetemplate') }}</el-link>
  57. <el-link type="primary" :underline="false" href="./upload/项目导入模板_5.xlsx" :download="$t('importtemplateproject') + '.xlsx'" v-else-if="user.timeType.projectWithDept==0 && !(user.timeType.reportAuditType==0||user.timeType.reportAuditType==4||user.timeType.reportAuditType==6)">{{ $t('Downloadthetemplate') }}</el-link>
  58. <!--项目带所属部门的-->
  59. <el-link type="primary" :underline="false" href="./upload/项目导入模板_部门.xlsx" download="项目导入模板+部门.xlsx" v-else>{{ $t('Downloadthetemplate') }}</el-link>
  60. </el-dropdown-item>
  61. <el-dropdown-item v-if="permissions.projectExport" :disabled="exportDisabled">
  62. <el-link type="primary" :underline="false" @click="exportProjectData" :download="$t('exportProject') + '.xlsx'">{{ $t('exportProject') }}</el-link>
  63. </el-dropdown-item>
  64. <el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectExport">
  65. <el-link type="primary" :underline="false" v-if="user.companyId==936" @click="groupTaskDialog=true" :download="$t('exportingTaskGroups') +'.xlsx'">{{ $t('exportingTaskGroups') }}</el-link>
  66. <el-link type="primary" :underline="false" v-else @click="exportProjectGroup" :download="$t('exportingTaskGroups') +'.xlsx'">{{ $t('exportingTaskGroups') }}</el-link>
  67. </el-dropdown-item>
  68. <el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">
  69. <el-link type="primary" :underline="false" @click="showBaseCostItemDialog">{{ $t('baselinecostitem') }}</el-link>
  70. </el-dropdown-item>
  71. <el-dropdown-item v-if="permissions.projectClassification">
  72. <el-link type="primary" :underline="false" @click="showClfDialog = true">{{ $t('classificationmanagement') }}</el-link>
  73. </el-dropdown-item>
  74. <el-dropdown-item v-if="user.timeType.mainProjectState == 1">
  75. <el-link type="primary" :underline="false" @click="mainProjectDialog = true">{{ $t('masterprojectmanagement') }}</el-link>
  76. </el-dropdown-item>
  77. <el-dropdown-item v-if="permissions.projectPhase && user.company.packageProject == 1">
  78. <el-link type="primary" :underline="false" @click="phaseProjectDialog = true">{{ $t('projectstagemanagement') }}</el-link>
  79. </el-dropdown-item>
  80. <el-dropdown-item v-if="user.timeType.projectLevelState == 1">
  81. <el-link type="primary" :underline="false" @click="projectLevelDialog = true">{{ $t('projectlevelmanagement') }}</el-link>
  82. </el-dropdown-item>
  83. <el-dropdown-item v-if="user.timeType.syncFanwei==1||user.timeType.syncSap==1">
  84. <el-link type="primary" :underline="false" @click="syncProjectDig=true, synchronizationInputVal = ''">{{'同步项目信息'}}</el-link>
  85. </el-dropdown-item>
  86. <el-dropdown-item v-if="user.companyId==3385 && permissions.projectClassification">
  87. <el-link type="primary" :underline="false" @click="functionalDivisionDig=true,getFunctionalList()">{{'职能分工设置'}}</el-link>
  88. </el-dropdown-item>
  89. <el-dropdown-item v-if="user.timeType.projectManDay == 1 && permissions.projectClassification">
  90. <el-link type="primary" :underline="false" @click="projectManDaySettingDialog = true;getManDaySetting()">{{ '预估工时配置' }}</el-link>
  91. </el-dropdown-item>
  92. <el-dropdown-item v-if="user.companyId == 10 || user.companyId == 5608">
  93. <el-link type="primary" :underline="false" @click="importTaskDialog = true">{{ '项目任务导入' }}</el-link>
  94. </el-dropdown-item>
  95. </el-dropdown-menu>
  96. </el-dropdown>
  97. </el-form-item>
  98. <!-- <el-form-item style="float:right;" v-if="user.role == 1||user.role == 2||user.role == 5"> -->
  99. <el-form-item style="float:right;" v-if="permissions.projectNew">
  100. <el-link type="primary" :underline="false" @click="handleAdd(-1,null)">{{ $t('newproject') }}</el-link>
  101. </el-form-item>
  102. <el-form-item style="float:right;" v-if="permissions.projectResources">
  103. <!-- <router-link to="/projectGantt"> -->
  104. <el-link type="primary" :underline="false" @click="isganttshow = true">{{ $t('resourceallocation') }}</el-link>
  105. <!-- </router-link> -->
  106. <el-dialog v-if="isganttshow" :visible.sync="isganttshow" width="90vw" top="3vh" style="height:96%" class="ganttdialog">
  107. <projectgantt></projectgantt>
  108. </el-dialog>
  109. </el-form-item>
  110. <br/>
  111. <br v-if="user.companyId == 936">
  112. <!-- 时间段筛选 -->
  113. <el-form-item>
  114. <span style="margin-left:15px;margin-right:5px;color:#606266;">{{ $t('message.period') }}</span>
  115. <el-date-picker v-model="createDate" type="daterange" :range-separator="$t('other.to')" :start-placeholder="$t('time.startDate')" :end-placeholder="$t('time.endDate')" @change="manageSelect()" value-format="yyyy-MM-dd" :placeholder="$t('optiondate')" size="small" clearable style="width:290px;margin-left:5px"></el-date-picker>
  116. </el-form-item>
  117. <!-- 项目经理筛选 -->
  118. <el-form-item>
  119. <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ $t('projectmanager') }}</span>
  120. <el-select v-if="user.userNameNeedTranslate != 1" v-model="inchagerId" style="width:140px;" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="manageSelect" size="small" filterable popper-class="managePopperClass">
  121. <el-option v-for="item in users" :key="item.id" :label="user.companyId == 936 ? item.name + '\u3000' + item.jobNumber : item.name" :value="item.id">
  122. <span style="float: left">{{ item.name }}</span>
  123. <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
  124. </el-option>
  125. </el-select>
  126. <selectCat v-if="user.userNameNeedTranslate == 1 && attemptFields != '223'" :filterable="true" :size="'mini'" :subject="users" :subjectId="inchagerId" :distinction="'1'" :clearable="true" @selectCal="selectCal"></selectCat>
  127. <selectPersonnel v-model="inchagerId" clearable @change="manageSelect" size="small" v-if="user.userNameNeedTranslate == 1 && attemptFields == '223'"></selectPersonnel>
  128. </el-form-item>
  129. <el-form-item>
  130. <span style="margin-left:25px;margin-right:5px;color:#606266;">{{ $t('participantin') }}</span>
  131. <el-select v-if="user.userNameNeedTranslate != 1" v-model="participationId" style="width:140px;" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="participationSelect" size="small" filterable popper-class="managePopperClass">
  132. <el-option v-for="item in users" :key="item.id" :label="user.companyId == 936 ? item.name + '\u3000' + item.jobNumber : item.name" :value="item.id">
  133. <span style="float: left">{{ item.name }}</span>
  134. <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
  135. </el-option>
  136. </el-select>
  137. <selectCat v-if="user.userNameNeedTranslate == 1 && attemptFields != '223' " :filterable="true" :size="'mini'" :subject="users" :subjectId="participationId" :distinction="'2'" :clearable="true" @selectCal="selectCal"></selectCat>
  138. <selectPersonnel v-model="participationId" clearable @change="participationSelect" size="small" v-if="user.userNameNeedTranslate == 1 && attemptFields == '223'"></selectPersonnel>
  139. </el-form-item>
  140. <!-- 部门筛选 -->
  141. <el-form-item v-if="user.timeType.projectWithDept">
  142. <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ $t('lable.department') }}</span>
  143. <el-cascader v-model="deptId" style="width:140px;" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"
  144. :props="{ checkStrictly: true, expandTrigger: 'hover' }" :show-all-levels="false" clearable filterable @change="searchClfList" size="small"
  145. ></el-cascader>
  146. </el-form-item>
  147. </el-form>
  148. </el-col>
  149. <!--列表-->
  150. <el-table ref="projectlistOfWudulist" border @cell-mouse-enter="hoverCall" @cell-mouse-leave="handCall" :cell-class-name="tableCellClassName" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedWudulist" @sort-change="tableSort">
  151. <el-table-column type="selection" width="60" :selectable="isSelectable">
  152. <!-- creator 项目创建人 incharger 项目负责人 -->
  153. </el-table-column>
  154. <!-- <el-table-column type="index" width="60" v-else>
  155. <template slot-scope="scope" >
  156. {{scope.$index+1+(page-1)*size}}
  157. </template>
  158. </el-table-column> -->
  159. <el-table-column prop="projectCode" :label="user.companyId == '7030' ? '项目令号' : $t('Itemno')" sortable="custom" width="150"></el-table-column>
  160. <el-table-column prop="projectMainName" :label="$t('zhu-xiang-mu')" sortable="custom" min-width="250" v-if="user.timeType.mainProjectState == '1'">
  161. </el-table-column>
  162. <el-table-column prop="contractCode" :label="$t('contractno')" width="200" v-if="user.companyId == '936'">
  163. <template slot-scope="scope">
  164. <!-- <div v-if="scope.row.projectSeparate">
  165. {{scope.row.projectSeparate.contractCode}}
  166. </div> -->
  167. <div v-if="scope.row.projectSeparate">
  168. <div v-if="scope.row.projectSeparate.contractCode">
  169. <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectSeparate.contractCode.length > 15">
  170. <div>
  171. <span>{{scope.row.projectSeparate.contractCode}}</span>
  172. </div>
  173. <div slot="reference" class="kans">
  174. <span>{{scope.row.projectSeparate.contractCode}}...</span>
  175. </div>
  176. </el-popover>
  177. <div v-else>
  178. <span>{{scope.row.projectSeparate.contractCode}}</span>
  179. </div>
  180. </div>
  181. </div>
  182. </template>
  183. </el-table-column>
  184. <!-- <el-table-column prop="projectCategorySub" label="项目分组" width="200" v-if="user.companyId == '428'">
  185. <template slot-scope="scope">
  186. <div v-if="scope.row.projectSeparate">
  187. <div v-if="scope.row.projectSeparate.projectCategorySub">
  188. <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectSeparate.projectCategorySub.length > 15">
  189. <div>
  190. <span>{{scope.row.projectSeparate.projectCategorySub}}</span>
  191. </div>
  192. <div slot="reference" class="kans">
  193. <span>{{scope.row.projectSeparate.projectCategorySub}}...</span>
  194. </div>
  195. </el-popover>
  196. <div v-else>
  197. <span>{{scope.row.projectSeparate.projectCategorySub}}</span>
  198. </div>
  199. </div>
  200. </div>
  201. </template>
  202. </el-table-column> -->
  203. <el-table-column prop="categoryName" :label="$t('projectclassification')" sortable="custom" width="140"></el-table-column>
  204. <el-table-column prop="projectName" :label="$t('headerTop.projectName')" min-width="250" sortable="custom">
  205. <template slot-scope="scope">
  206. <!-- <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectName.length > 15">
  207. <div>
  208. <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
  209. <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
  210. </div>
  211. <div slot="reference" class="kans">
  212. <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName.substring(0,15)}}...</el-link>
  213. <span v-if="user.company.packageProject==0" >{{scope.row.projectName.substring(0,15)}}...</span>
  214. </div>
  215. </el-popover>
  216. <div v-else>
  217. <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
  218. <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
  219. </div> -->
  220. <div>
  221. <el-link type="primary" v-if="user.company.packageProject==1 && (user.company.nonProjectSimple==0 || (user.company.nonProjectSimple==1&&scope.row.isPublic==0))" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
  222. <span v-else>{{scope.row.projectName}}</span>
  223. </div>
  224. </template>
  225. </el-table-column>
  226. <el-table-column prop="departmentName" :label="$t('subordinatedepartments')" sortable="custom" width="200" v-if="user.timeType.projectWithDept">
  227. <template slot-scope="scope">
  228. <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
  229. </template>
  230. </el-table-column>
  231. <el-table-column prop="inchargerName" :label="$t('projectmanager')" sortable="custom" min-width="150">
  232. <template slot-scope="scope">
  233. <el-link type="primary" :underline="false" @click="showUser(scope.row.inchargerId)">
  234. <span v-if="user.userNameNeedTranslate != 1">
  235. {{scope.row.inchargerName}}
  236. </span>
  237. <span v-if="user.userNameNeedTranslate == 1">
  238. <TranslationOpenDataText type='userName' :openid='scope.row.inchargerName'></TranslationOpenDataText>
  239. </span>
  240. </el-link>
  241. </template>
  242. </el-table-column>
  243. <div v-if="user.timeType.projectCustom">
  244. <el-table-column :prop="`plate${+index+1}`" sortable="custom" width="200" v-for="(item, index) in dataList" :key="item.id" :label="item.customName" v-if="item.customType!=1" ></el-table-column>
  245. </div>
  246. <!-- 项目阶段 -->
  247. <!-- 换位置之前看下项目阶段发起的请求 -->
  248. <el-table-column prop="currentStage" :label="$t('projectphase')" sortable="custom" min-width="150" width="220" v-if="user.company.packageProject == 1">
  249. <template slot-scope="scope">
  250. {{scope.row.currentStageId == null ? $t('nostage') : scope.row.currentStageName}}
  251. <el-link v-if="(permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId)" type="primary" :underline="false" @click="showChangeStageDialog(scope.row.id, scope.row.currentStageId)">
  252. <i class="el-icon-edit"></i>
  253. </el-link>
  254. </template>
  255. </el-table-column>
  256. <el-table-column prop="participator" :label="$t('participants')" :min-width="user.company.packageCustomer != 1 ? '100' : '300'" sortable v-if="user.company.packageProject==0">
  257. <template slot-scope="scope">
  258. <span v-if="(scope.row.participator || []).length > 0">
  259. <el-link type="primary" @click="showAllparticipator(scope.row)">
  260. <TranslationOpenDataText type='userName' :openid='scope.row.participator[0].name'></TranslationOpenDataText>
  261. <span v-if="scope.row.participator.length > 1">...</span>
  262. </el-link>
  263. </span>
  264. </template>
  265. </el-table-column>
  266. <!-- 客户管理 -->
  267. <el-table-column prop="customerName" :label="$t('ke-hu')" min-width="190" v-if="user.company.packageCustomer == 1" sortable="custom">
  268. <template slot-scope="scope">
  269. <el-popover placement="top" width="250" trigger="hover" v-if="scope.row.customerName&&scope.row.customerName.length > 12">
  270. <div slot="reference" class="kans">
  271. <span >{{scope.row.customerName.substring(0,12)}}...</span>
  272. </div>
  273. <span >{{scope.row.customerName}}</span>
  274. </el-popover>
  275. <div v-else>
  276. <span >{{scope.row.customerName}}</span>
  277. </div>
  278. </template>
  279. </el-table-column>
  280. <!-- 研究中心 -->
  281. <el-table-column prop="associateDegreeNames" :label="centerNameDegree" min-width="190" v-if="user.timeType.isCro == 1" sortable="custom">
  282. <template slot-scope="scope">
  283. <!-- <div>
  284. {{scope.row.associateDegreeNames}}
  285. </div> -->
  286. <el-popover placement="top" width="300" trigger="hover" v-if="scope.row.associateDegreeNames&&scope.row.associateDegreeNames.length > 12">
  287. <div slot="reference" class="kans">
  288. <span >{{scope.row.associateDegreeNames.substring(0,12)}}...</span>
  289. </div>
  290. <span >{{scope.row.associateDegreeNames}}</span>
  291. </el-popover>
  292. <div v-else>
  293. <span >{{scope.row.associateDegreeNames}}</span>
  294. </div>
  295. </template>
  296. </el-table-column>
  297. <!-- 级别 -->
  298. <el-table-column :prop="user.timeType.projectLevelState == 1 ? 'levelName' : 'level'" :label="$t('ji-bie')" min-width="190" v-if="user.company.packageProject == 1">
  299. <template slot-scope="scope">
  300. <span v-if="user.timeType.projectLevelState == 1">{{scope.row.levelName}}</span>
  301. <span v-else>{{importanceListLable[scope.row.level - 1]}}</span>
  302. </template>
  303. </el-table-column>
  304. <!-- 合同金额 -->
  305. <el-table-column prop="contractAmount" :label="$t('contractamount')" width="200" align="right">
  306. <template slot-scope="scope" >
  307. <span>¥{{Number(scope.row.contractAmount).toFixed(2)}}</span>
  308. </template>
  309. </el-table-column>
  310. <!-- 日报审核人 -->
  311. <el-table-column prop="projectAuditorName" :label="$t('newspaperauditor')" sortable="custom" min-width="150" v-if="user.company.companyName=='成都明夷电子科技有限公司'">
  312. <template slot-scope="scope">
  313. <el-link type="primary" :underline="false" @click="showUser(scope.row.projectAuditorId)">
  314. {{scope.row.projectAuditorName}}
  315. </el-link>
  316. </template>
  317. </el-table-column>
  318. <!-- 供应商 -->
  319. <!-- <el-table-column prop="providerNames" label="供应商" min-width="190" v-if="user.company.packageProvider">
  320. </el-table-column> -->
  321. <!-- <div v-if="user.company.packageProvider"> -->
  322. <template>
  323. <div v-for="(item, index) in listHeader" :key="index">
  324. <el-table-column prop="providerNames" :label="item" min-width="190" v-if="user.company.packageProvider">
  325. <template slot-scope="scope">
  326. <div>
  327. {{item | mobans(scope.row.providerInfoList)}}
  328. </div>
  329. </template>
  330. </el-table-column>
  331. </div>
  332. </template>
  333. <el-table-column prop="status" :label="$t('state.states')" min-width="100" sortable="custom">
  334. <template slot-scope="scope">
  335. {{scope.row.status == null?"-":statusTxt[scope.row.status]}}
  336. </template>
  337. </el-table-column>
  338. <!--专业项目协作-->
  339. <el-table-column prop="planStartDate" :label="$t('time.startDate')" min-width="96" >
  340. </el-table-column>
  341. <el-table-column prop="planEndDate" :label="$t('expirationdate')" min-width="96" >
  342. </el-table-column>
  343. <el-table-column prop="progress" :label="$t('completeness')" min-width="100" v-if="user.company.packageProject == 1">
  344. <template slot-scope="scope">
  345. {{scope.row.progress==null?"-":scope.row.progress}}%
  346. </template>
  347. </el-table-column>
  348. <el-table-column prop="manDay" :label="$t('yuGuGongShi')" min-width="150" v-if="user.timeType.projectManDay == 1">
  349. <template slot-scope="scope">
  350. {{scope.row.manDay==null?"":scope.row.manDay}}<span v-if="scope.row.manDay">{{ $t('renTian') }}({{scope.row.estimatedWorkTime}}h)</span>
  351. </template>
  352. </el-table-column>
  353. <el-table-column prop="residueEstimatedWorkTime" :label="$t('shengYuYuGuGongShi')" min-width="120" v-if="user.timeType.projectManDay == 1">
  354. <template slot-scope="scope">
  355. {{scope.row.residueEstimatedWorkTime==null?"":scope.row.residueEstimatedWorkTime}}<span v-if="scope.row.residueEstimatedWorkTime">h</span>
  356. </template>
  357. </el-table-column>
  358. <el-table-column :label="$t('operation')" :width="showColumnWidth" align="left" fixed="right" v-if="showColumnWidth != '0' || permissions.projectManagement">
  359. <template slot-scope="scope">
  360. <el-button v-if="(permissions.projectManagement || user.id==scope.row.creatorId) && user.timeType.mainProjectState != '1' && !user.timeType.hideSubproject" size="mini" @click="subProject(scope.row)">{{ $t('lable.subproject') }}</el-button>
  361. <el-button size="mini" v-if="permissions.projectParticipator || permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId" type="primary" @click="handleAdd(scope.$index, scope.row)">{{ $t('bian-ji') }}</el-button>
  362. <!-- <el-button v-if="permissions.projectManagement || user.id==scope.row.creatorId" size="mini" @click="deletePro(scope.$index, scope.row)">删除</el-button> -->
  363. <!--如果是威派格,项目经理不给权限-->
  364. <el-dropdown class="customdropdown" split-button size="mini" @click="finishPro(scope.row)" v-if="(user.companyId != 936 || user.id!=scope.row.inchargerId) && (permissions.projectManagement || user.id==scope.row.creatorId || user.id==scope.row.inchargerId) && scope.row.status == 1" placement="bottom-start">
  365. {{ $t('wan-cheng') }}
  366. <el-dropdown-menu slot="dropdown" class="customdropdown_menu">
  367. <el-button size="mini" @click="cancelPro(scope.row)" class="customdropdown_menu_btn">{{ $t('btn.undo') }}</el-button><br>
  368. <el-button size="mini" @click="suspendPro(scope.row)" class="customdropdown_menu_btn">{{ $t('zan-ting') }}</el-button><br>
  369. </el-dropdown-menu>
  370. </el-dropdown>
  371. <!--如果是威派格,项目经理不给权限-->
  372. <el-button v-if="(user.companyId != 936 || user.id!=scope.row.inchargerId)&& (permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId) && scope.row.status >= 2" size="mini" @click="restartPro(scope.row)">{{ $t('zhong-qi') }}</el-button>
  373. </template>
  374. </el-table-column>
  375. </el-table>
  376. <!--工具条-->
  377. <el-col :span="24" class="toolbar">
  378. <el-button size="small" @click="batchSetWudulistBtn1" v-if="(user.timeType.customDegreeActive || user.company.packageProject) && (showColumnWidth != '0' || permissions.projectManagement)">{{ $t('btn.cancel') }}</el-button>
  379. <el-dropdown>
  380. <el-button type="primary" size="small">
  381. {{ $t('piLiangCaoZuo') }}<i class="el-icon-arrow-down el-icon--right"></i>
  382. </el-button>
  383. <el-dropdown-menu slot="dropdown">
  384. <template v-if="user.timeType.customDegreeActive && (showColumnWidth != '0' || permissions.projectManagement)">
  385. <el-dropdown-item><el-button type="text" @click="batchSetWudulistBtn2(true)">{{ $t('volumeset') }} {{user.timeType.customDegreeName}}</el-button></el-dropdown-item>
  386. <el-dropdown-item><el-button type="text" @click="batchSetWudulistBtn2(false)">{{ $t('pi-liang-tian-jia') }} {{user.timeType.customDegreeName}}</el-button></el-dropdown-item>
  387. </template>
  388. <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
  389. <el-dropdown-item><el-button type="text" @click="addTaskGroup()" >{{ $t('piLiangZengJiaRenWuFenZu') }}</el-button></el-dropdown-item>
  390. </template>
  391. <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
  392. <el-dropdown-item><el-button type="text" @click="setGroupIncharger()" >{{ $t('piLiangSheZhiFenZuFuZeRen') }}</el-button></el-dropdown-item>
  393. </template>
  394. <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
  395. <el-dropdown-item><el-button type="text" @click="addGroupPerson()" :loading="addGroupPersonBtnLoading">{{ $t('groupparticipantsinbatches') }}</el-button></el-dropdown-item>
  396. </template>
  397. <template v-if="(showColumnWidth != '0' || permissions.projectManagement)">
  398. <el-dropdown-item><el-button type="text" @click="batchProjectTaskParticipant()">{{ $t('piLiangTianJiaRenWuChanYuRen') }}</el-button></el-dropdown-item>
  399. <el-dropdown-item><el-button type="text" @click="addProPreson()">{{ $t('projectparticipantsinbatches') }}</el-button></el-dropdown-item>
  400. <el-dropdown-item><el-button type="text" v-if="permissions.projectManagement" @click="batchIncharger()">{{ $t('projectmanagersinbatches') }}</el-button></el-dropdown-item>
  401. <el-dropdown-item><el-button type="text" v-if="user.company.packageProject" @click="batchProjectStage()">{{ $t('piLiangXiuGaiXiangMuJieDuan') }}</el-button></el-dropdown-item>
  402. <el-dropdown-item><el-button type="text" v-if="user.roleName=($t('role.superAdministrator'))" @click="batchDelete()" :loading="isDeleting">{{ $t('Batchdelete') }}</el-button></el-dropdown-item>
  403. </template>
  404. </el-dropdown-menu>
  405. </el-dropdown>
  406. <el-pagination :key="projectListPageComponentKey"
  407. @size-change="handleSizeChange"
  408. @current-change="handleCurrentChange"
  409. :page-sizes="[20 , 50 , 80 , 100]"
  410. :page-size="size"
  411. :current-page.sync="page"
  412. layout="total, sizes, prev, pager, next"
  413. :total="total"
  414. style="float:right;"
  415. ></el-pagination>
  416. </el-col>
  417. <!--新增界面-->
  418. <el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="960px" :top="'6vh'">
  419. <div style="height: 72vh;overflow-y: auto;overflow-x: hidden;">
  420. <el-form ref="form1" :model="addForm" :rules="rules" label-width="120px">
  421. <el-form-item :label="user.companyId == '7030' ? '项目令号' : $t('Itemno')" :class="title == $t('newproject')" v-if="user.companyId!=936">
  422. <!-- <el-input v-model="addForm.code" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目编号" clearable></el-input> -->
  423. <el-input v-model="addForm.code" :placeholder="$t('peaseenterthe')" clearable :disabled="canOnlyModParticipator || (!permissions.projectManagement && addForm.creatorId != user.id && !permissions.projectCodeAndName)" maxlength="50" show-word-limit="true"></el-input>
  424. </el-form-item>
  425. <el-form-item :label="user.companyId == '7030' ? '项目令号' : $t('Itemno')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.companyId==936" prop="code">
  426. <!-- <el-input v-model="addForm.code" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目编号" clearable></el-input> -->
  427. <el-input v-model="addForm.code" :placeholder="$t('peaseenterthe')" clearable :disabled="canOnlyModParticipator || (!permissions.projectManagement && addForm.creatorId != user.id && !permissions.projectCodeAndName) || isShowProjectName" maxlength="50" show-word-limit="true"></el-input>
  428. </el-form-item>
  429. <el-form-item :label="$t('zhu-xiang-mu')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.timeType.mainProjectState == '1'">
  430. <!-- <el-select v-model="addForm.projectMainId" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id" @change="projectManagementChange"> -->
  431. <el-select v-model="addForm.projectMainId" clearable @change="projectManagementChange">
  432. <el-option v-for="(item) in mainProjectList" :key="item.id" :value="item.id" :label="item.name + '\u3000' + item.code">
  433. <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.code }}</span>
  434. <span style="float: right;margin-left: 20px">{{ item.name }}</span>
  435. </el-option>
  436. </el-select>
  437. </el-form-item>
  438. <el-form-item :label="$t('projectclassification')" v-if="user.timeType.mainProjectState != '1'">
  439. <!-- <el-select v-model="addForm.category" style="width:32%;" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id"> -->
  440. <el-select v-model="addForm.category" style="width:32%;" clearable filterable :disabled="canOnlyModParticipator">
  441. <el-option v-for="(item) in baseClfList" :key="item.id" :value="item.id" :label="item.name"></el-option>
  442. </el-select>
  443. </el-form-item>
  444. <el-form-item :label="$t('headerTop.projectName')" prop="name">
  445. <!-- <el-input v-model="addForm.name" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目名称" clearable></el-input> -->
  446. <el-input v-model="addForm.name" :placeholder="$t('peaseenterthe')" clearable :disabled="canOnlyModParticipator || (!permissions.projectManagement && addForm.creatorId != user.id && !permissions.projectCodeAndName) || isShowProjectName" maxlength="255" show-word-limit="true"></el-input>
  447. </el-form-item>
  448. <el-form-item :label="$t('other.projectDescription')" prop="projectDesc">
  449. <!-- <el-input v-model="addForm.projectDesc" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目描述" clearable maxlength="4000"></el-input> -->
  450. <el-input v-model="addForm.projectDesc" :placeholder="$t('peaseenterthe')" clearable maxlength="4000" :disabled="canOnlyModParticipator" show-word-limit></el-input>
  451. </el-form-item>
  452. <el-form-item :label="$t('projecttype')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" prop="isPublic">
  453. <el-select v-model="addForm.isPublic" style="width:32%;" @change="selectPublic" :disabled="canOnlyModParticipator">
  454. <el-option :value="0" :label="$t('zheng-shi-xiang-mu')"></el-option>
  455. <el-option :value="1" :label="$t('fei-xiang-mu')"></el-option>
  456. </el-select>
  457. <el-tooltip effect="dark" :content="$t('zheng-shi-xiang-mu-zhi-dui-can-yu-ren-kai-fang-fei-xiang-mu-dui-suo-you-cheng-yuan-kai-fang')" placement="top-start">
  458. <i class="el-icon-question"></i>
  459. </el-tooltip>
  460. <div v-if="user.company.packageCustomer == 1" style="display: inline-block;width: 50%">
  461. <span style="margin-left:63px;margin-right:10px;" >{{ $t('ke-hu') }}</span>
  462. <el-select v-model="addForm.customerId" clearable="true" filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:70%;" :disabled="canOnlyModParticipator">
  463. <el-option v-for="item in customerList" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
  464. </el-select>
  465. </div>
  466. </el-form-item>
  467. <el-form-item :label="$t('subordinatedepartments')" :prop="user.companyId == 936 ? 'deptId' : false" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.timeType.projectWithDept">
  468. <el-cascader v-model="addForm.deptId" :options="departmentList" :placeholder="$t('defaultText.pleaseChoose')" :disabled="canOnlyModParticipator"
  469. :props="{ checkStrictly: true, expandTrigger: 'hover' }" clearable filterable @change="cascaderChange" style="width: 100%"
  470. v-if="user.userNameNeedTranslate != 1"
  471. ></el-cascader>
  472. <!-- <vueCascader :size="'medium'" :widthStr="'430'" :filterable="true" :clearable="true" :subject="departmentList" :subjectId="addForm.deptId" :radios="true" :distinction="'20'" :disabled="canOnlyModParticipator" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" ></vueCascader> -->
  473. <vueCascadeSelection v-model="addForm.deptId" :options="departmentList" :props="{ checkStrictly: true, expandTrigger: 'hover' }" :disabled="canOnlyModParticipator" v-if="user.userNameNeedTranslate == 1"></vueCascadeSelection>
  474. </el-form-item>
  475. <el-form-item :label="$t('supplier')" v-if="user.company.packageProvider">
  476. <el-select v-model="addForm.supplierId" multiple :placeholder="$t('defaultText.pleaseChoose')" filterable="true" style="width: 100%" :disabled="canOnlyModParticipator">
  477. <span v-for="(item, index) in supplierList" :key="index">
  478. <el-option :label="item.providerName" :value="item.id"></el-option>
  479. </span>
  480. </el-select>
  481. </el-form-item>
  482. <el-form-item :label="yonghuUser.customDegreeName" v-if="yonghuUser.customDegreeActive == 1">
  483. <el-select v-model="auseList" multiple :placeholder="$t('defaultText.pleaseChoose')" filterable="true" style="width: 100%" :disabled="canOnlyModParticipator">
  484. <span v-for="(item, index) in ause" :key="index">
  485. <el-option :label="item.name" :value="item.id"></el-option>
  486. </span>
  487. </el-select>
  488. </el-form-item>
  489. <!-- <el-form-item label="客户" v-if="user.company.packageCustomer == 1">
  490. <el-select v-model="addForm.customerId" clearable="true" filterable placeholder="请选择客户" style="width:100%;" >
  491. <el-option v-for="item in customerList" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
  492. </el-select>
  493. </el-form-item> -->
  494. <el-form-item :label="$t('Allparticipants')" v-show="addForm.isPublic == 0" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''">
  495. <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate != 1">
  496. <div slot="content" style="width:780px">{{addForm.userNames}}</div>
  497. <el-input @focus="showChooseMembTree" v-model="addForm.userNames"></el-input>
  498. </el-tooltip>
  499. <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate == 1">
  500. <div slot="content" style="max-width: 780px;max-height: 400px;overflow-y: auto;">
  501. <span v-for="(item, index) in addFormUserNames" :key="index">
  502. <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
  503. <span v-if="index < addFormUserNames.length - 1">,</span>
  504. </span>
  505. </div>
  506. <div @click="showChooseMembTree" style="width: 800px;overflow:hidden;white-space:nowrap;height:40px;border: 1px solid #DCDFE6;border-radius: 4px;box-sizing: border-box;padding: 0 10px">
  507. <template v-for="(item, index) in addFormUserNames">
  508. <template v-if="index <= 13">
  509. <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
  510. <span v-if="index < addFormUserNames.length - 1">,</span>
  511. <span v-if="(addFormUserNames || []).length > 13 && index == 13">...</span>
  512. </template>
  513. </template>
  514. </div>
  515. </el-tooltip>
  516. </el-form-item>
  517. <el-form-item :label="$t('projectmanager')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0)">
  518. <el-select v-if="user.userNameNeedTranslate != 1" v-model="addForm.inchargerId" filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:32%;" :disabled="canOnlyModParticipator || projectManagerEdit">
  519. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id">
  520. <span style="float: left">{{ item.name }}</span>
  521. <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
  522. </el-option>
  523. </el-select>
  524. <selectCat v-if="user.userNameNeedTranslate == 1" :filterable="true" :size="'medium'" :subject="participator" :subjectId="addForm.inchargerId" :distinction="'3'" @selectCal="selectCal" :disabled="canOnlyModParticipator || projectManagerEdit || isShowProjectName"></selectCat>
  525. <!--项目复审人-->
  526. <span v-if="user.timeType.reportAuditType == 8" style="margin-left:63px;margin-right:10px;" >{{ $t('other.projectReviwer') }}</span>
  527. <el-select v-if="user.timeType.reportAuditType == 8 && user.userNameNeedTranslate != 1" v-model="addForm.reviwerId" clearable filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:32%;" :disabled="canOnlyModParticipator || projectManagerEdit">
  528. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  529. <span style="float: left">{{ item.name }}</span>
  530. <span style="float: right; color: #8492a6;">{{ item.jobNumber }}</span>
  531. </el-option>
  532. </el-select>
  533. <selectCat v-if="user.timeType.reportAuditType == 8 && user.userNameNeedTranslate == 1" :filterable="true" :size="'medium'" :subject="users" :subjectId="addForm.reviwerId" :distinction="'4'" @selectCal="selectCal" :disabled="canOnlyModParticipator || projectManagerEdit || isShowProjectName"></selectCat>
  534. </el-form-item>
  535. <span v-if="user.companyId != 469">
  536. <el-form-item :label="$t('newspaperauditor')" v-show="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4 || user.timeType.reportAuditType == 6 || user.timeType.reportAuditType == 9" v-if="user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0)">
  537. <el-select v-if="user.userNameNeedTranslate != '1'" @change="$forceUpdate()" v-model="addForm.auditUserIds" :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('defaultistheprojectleader')" style="width:100%;" :multiple="user.timeType.reportAuditType != 6 && user.timeType.reportAuditType != 9" >
  538. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
  539. </el-select>
  540. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :tile="true" :filterable="true" :widthStr="'800'" :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" :subjectId="addForm.auditUserIds" :subject="participator" :clearable="false" :distinction="'10'" :multiSelect="user.timeType.reportAuditType != 6 && user.timeType.reportAuditType != 9" @selectCal="selectCal"></selectCat>
  541. </el-form-item>
  542. </span>
  543. <el-form-item v-if="user.timeType.reportCc == 1 && (user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))" :label="$t('riBaoChaoSongRen')" >
  544. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.ccUserIds" multiple="true" :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('qingXuanZeChaoSongRen')" style="width:100%;" >
  545. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
  546. </el-select>
  547. <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :tile="true" :widthStr="'800'" :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" :subjectId="addForm.ccUserIds" :subject="participator" :clearable="false" :distinction="'10'" :multiSelect="true" @selectCal="selectCal"></selectCat>
  548. </el-form-item>
  549. <!--专业项目协作版本功能 -->
  550. <el-form-item :label="$t('ji-bie')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.company.packageProject==1 && (user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))">
  551. <el-select v-model="addForm.level" :placeholder="$t('defaultText.pleaseChoose')" style="width:32%;" v-if="user.timeType.projectLevelState == 1" :disabled="canOnlyModParticipator || isShowProjectName">
  552. <el-option v-for="item in levelList" :key="item.id" :label="item.projectLevelName" :value="item.id"></el-option>
  553. </el-select>
  554. <el-select v-model="addForm.level" :placeholder="this.$t('defaultText.pleaseChoose')" style="width:32%;" :disabled="canOnlyModParticipator" v-else>
  555. <el-option v-for="item in importanceList" :key="item.id" :label="item.label" :value="item.id"></el-option>
  556. </el-select>
  557. <!-- 增加合同金额字段 -->
  558. <!-- <span style="margin-left:63px;margin-right:10px;" v-if="user.company.packageProject==1">合同金额</span>
  559. <el-input id="contractAmount" v-model="addForm.contractAmount" style="width:33%;" @blur="contractAmountChange(addForm.contractAmount)"
  560. placeholder="整数" clearable @keyup.native="restrictNumber('contractAmount')" :disabled="title == '新增项目' ? false : false"></el-input><span style="margin-left:10px;">元</span> -->
  561. </el-form-item>
  562. <!-- 增加合同金额字段 -->
  563. <el-form-item :label="$t('contractamount')" v-if="(user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))">
  564. <el-input id="contractAmount" v-model="addForm.contractAmount" :disabled="canOnlyModParticipator" style="width:32%;" @input="contractAmountChange(addForm.contractAmount)" :placeholder="$t('zheng-shu')" clearable maxlength="9" @keyup.native="restrictNumber('contractAmount')"></el-input><span style="margin-left:10px;position:absolute;">{{ $t('yuan') }}</span>
  565. <template v-if="title == $t('modifytheproject') && contractAmountReasonShow">
  566. <span style="margin-left:63px;margin-right:10px;">{{ $t('modifythereason') }}</span>
  567. <el-input v-model="addForm.changeContractReason" style="width:33%" clearable :placeholder="$t('contractamountasd')"></el-input>
  568. </template>
  569. </el-form-item>
  570. <el-form-item :label="$t('ommencementDate')" prop="planStartDate" >
  571. <el-date-picker v-model="addForm.planStartDate" :disabled="canOnlyModParticipator"
  572. :editable="false" style="width:32%;"
  573. format="yyyy-MM-dd"
  574. value-format="yyyy-MM-dd"
  575. :clearable="false" type="date" clearable
  576. :placeholder="$t('optiondate')"></el-date-picker>
  577. <span style="margin-left:63px;margin-right:10px;" >{{ $t('ji-hua-jie-shu-ri-qi') }}</span>
  578. <el-date-picker v-model="addForm.planEndDate" style="width:33%;"
  579. :editable="false" :disabled="canOnlyModParticipator"
  580. format="yyyy-MM-dd"
  581. value-format="yyyy-MM-dd"
  582. :clearable="false" type="date" clearable
  583. :placeholder="$t('optiondate')"></el-date-picker>
  584. </el-form-item>
  585. <!-- 增加BU字段 绎维固定字段 -->
  586. <el-form-item label="BU" v-if="user.companyId == '862'">
  587. <el-cascader ref="deptCascader" v-model="addForm.bu" style="width: 250px" :show-all-levels="false" :disabled="canOnlyModParticipator"
  588. :options="buOption" :props="{ checkStrictly: true, expandTrigger: 'hover' }" clearable v-show="user.userNameNeedTranslate != 1"></el-cascader>
  589. <vueCascader :size="'small'" :subjectId="addForm.bu" :widthStr="'200'" :clearable="true" :subject="buOption" :radios="true" :distinction="'32'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
  590. </el-form-item>
  591. <!-- 增加项目人天字段 绎维固定字段 -->
  592. <el-form-item v-if="user.timeType.projectManDay == 1 && (user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))">
  593. <template slot="label"><span v-if="manDaySetting.projectManDayFillMode == 2 || (manDaySetting.projectManDayFillMode == 1 && addForm.fromOutside == 0)" style="padding:5px;color:red;">*</span>{{ $t('xiangMuRenTian') }}</template>
  594. <el-input v-model.number="addForm.manDay" :placeholder="$t('peaseenterthe')" @input="jisuanEstimatedWorkTime(addForm.manDay)" style="width: 100px"></el-input>
  595. <span style="margin-left:10px;position:absolute;">{{ $t('renTianYuGuGongShi') }}<el-input size="small" v-model.number="addForm.estimatedWorkTime" :placeholder="$t('peaseenterthe')" @input="jisuanManDay(addForm.estimatedWorkTime)" style="width: 100px"></el-input>h)</span>
  596. <el-tooltip effect="dark" :content="$t('genJuXiTongJiChuSheZhiMeiRiZhengChangGongZuoShiChangJiSuan_1RenTianWeiYiGeMeiRiZhengChangGongZuoShiChang')" placement="top-start" style="margin-left:180px">
  597. <i class="el-icon-question" style="color:#606266"></i>
  598. </el-tooltip>
  599. <span style="margin-left:63px;margin-right:10px;" v-if="user.companyId != 936" >{{ $t('guanKongKaiShiRiQi') }}</span>
  600. <el-date-picker v-model="addForm.manDayStartDate" v-if="user.companyId != 936"
  601. :editable="false" style="width:20%;"
  602. format="yyyy-MM-dd"
  603. value-format="yyyy-MM-dd"
  604. :clearable="false" type="date"
  605. :placeholder="$t('optiondate')"></el-date-picker>
  606. <el-tooltip effect="dark" :content="$t('congGaiRiQiQiTianBaoGongShiKaiShiZhanYongYuSuanRenTianGongShi')" placement="top-start" style="margin-left:10px" v-if="user.companyId != 936">
  607. <i class="el-icon-question" style="color:#606266"></i>
  608. </el-tooltip>
  609. </el-form-item>
  610. <el-form-item :label="$t('projectoutput')" prop="outputValue" v-if="user.timeType.outputValueStatus == 1">
  611. <el-input id="outputValue" v-model="addForm.outputValue" style="width:32%;" :disabled="canOnlyModParticipator"
  612. placeholder="" clearable @keyup.native="restrictNumber('outputValue')">
  613. </el-input><span style="margin-left:10px;">{{ $t('yuan') }}</span>
  614. </el-form-item>
  615. <!-- 单个公司的固定字段 -->
  616. <div v-if="user.companyId == '936'">
  617. <el-form-item :label="$t('contractno')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''">
  618. <el-input v-model="addForm.contractCode" maxlength="50" show-word-limit :placeholder="$t('peaseenterthe')" clearable :disabled="canOnlyModParticipator || isShowProjectName"></el-input>
  619. </el-form-item>
  620. <el-form-item :label="$t('warrantystartime')">
  621. <el-date-picker v-model="addForm.warrantyStartDate"
  622. :editable="false" style="width:32%;" :disabled="canOnlyModParticipator"
  623. format="yyyy-MM-dd"
  624. value-format="yyyy-MM-dd"
  625. :clearable="false" type="date"
  626. :placeholder="$t('optiondate')"></el-date-picker>
  627. <span style="margin-left:63px;margin-right:10px;" >{{ $t('warrantyexpirationtime') }}</span>
  628. <el-date-picker v-model="addForm.warrantyEndDate" style="width:33%;" :disabled="canOnlyModParticipator"
  629. :editable="false"
  630. format="yyyy-MM-dd"
  631. value-format="yyyy-MM-dd"
  632. :clearable="false" type="date"
  633. :placeholder="$t('optiondate')"></el-date-picker>
  634. </el-form-item>
  635. <el-form-item :label="$t('IndependentProject')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''">
  636. <!-- <el-input v-model="addForm.projectCategorySub" placeholder="请输入自主项目类别" clearable></el-input> -->
  637. <el-select v-model="addForm.projectCategorySub" :placeholder="$t('defaultText.pleaseChoose')" clearable :disabled="canOnlyModParticipator">
  638. <el-option :value="$t('softwareproject')" :label="$t('softwareproject')"></el-option>
  639. <el-option :value="$t('hardwareproject')" :label="$t('hardwareproject')"></el-option>
  640. <el-option :value="$t('integrationproject')" :label="$t('integrationproject')"></el-option>
  641. <el-option :value="$t('fu-wu-xiang-mu')" :label="$t('fu-wu-xiang-mu')"></el-option>
  642. </el-select>
  643. </el-form-item>
  644. <el-form-item :label="$t('region')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''">
  645. <el-input v-model="addForm.region" :placeholder="$t('peaseenterthe')" clearable :disabled="canOnlyModParticipator || isShowProjectName"></el-input>
  646. </el-form-item>
  647. <el-form-item :label="$t('subordinateBU')" >
  648. <el-input v-model="addForm.bu" :placeholder="$t('subordinateBU')" clearable :disabled="canOnlyModParticipator"></el-input>
  649. </el-form-item>
  650. </div>
  651. <!-- 用户自己定义的字段 -->
  652. <div style="margin-top: 20px" v-if="dataList.length > 0 && user.timeType.projectCustom">
  653. <el-form-item v-for="(item, index) in dataList" :key="item.id" :label="item.customName">
  654. <div v-if="item.customType == 0">
  655. <el-input v-model="item.value" clearable :placeholder="$t('pleaseentercontent')" @input="ipts(item.value, index)"></el-input>
  656. </div>
  657. <div v-if="item.customType == 1">
  658. <el-upload
  659. list-type="picture-card"
  660. ref="upload" :file-list="item.value" :action="index" :auto-upload="true" :limit="2" :disabled="item.valuelist.length == '2'" :http-request="fileUpload">
  661. <i slot="default" class="el-icon-plus"></i>
  662. <div slot="file" slot-scope="{file}">
  663. <img
  664. class="el-upload-list__item-thumbnail"
  665. :src="file.url" alt=""
  666. >
  667. <span class="el-upload-list__item-actions">
  668. <span
  669. class="el-upload-list__item-preview"
  670. @click="handlePictureCardPreview(file)"
  671. >
  672. <i class="el-icon-zoom-in"></i>
  673. </span>
  674. <span
  675. v-if="!disabled"
  676. class="el-upload-list__item-delete"
  677. @click="handleRemove(file, index)"
  678. >
  679. <i class="el-icon-delete"></i>
  680. </span>
  681. </span>
  682. </div>
  683. </el-upload>
  684. </div>
  685. <div v-if="item.customType == 2">
  686. <el-date-picker v-model="item.value" type="date" :placeholder="$t('pleaseselectadate')" value-format="yyyy-MM-dd"></el-date-picker>
  687. </div>
  688. </el-form-item>
  689. </div>
  690. <!-- <div v-if="user.companyId == '428'">
  691. <el-form-item :label="$t('projectgroup')" >
  692. <el-input v-model="addForm.projectCategorySub" maxlength="50" show-word-limit :placeholder="$t('peaseenterthe')" clearable></el-input>
  693. </el-form-item>
  694. </div> -->
  695. <!-- 项目基线 -->
  696. <div style="margin: 10px 0 30px 0;min-height:200px;" v-if="user.company.packageProject == 1 && !canOnlyModParticipator && (user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))">
  697. <el-tabs v-model="activeName" @tab-click="handleClick">
  698. <el-tab-pane :label="$t('costbaseline')" name="baseCostPanel" >
  699. <div style="padding-top:10px;">
  700. <!--新版 -->
  701. <span class="rg_span" v-for="(item, index) in projectBaseCostData" :key="item.id">
  702. <span style="width:120px;display: inline-block;" v-if="user.company.packageProject==1">{{item.baseName}}</span>
  703. <el-input :id="'baseCost'+index" @input="addUpfun()" v-model="item.baseAmount" style="width:200px; margin-bottom: 20px"
  704. :placeholder="$t('zheng-shu')" clearable @keyup.native="restrictNumber('baseCost'+index)"></el-input><span style="margin-left:10px;">{{ $t('yuan') }}</span>
  705. </span>
  706. <!-- 合计 -->
  707. <div style="margin-top: 10px;float:right;">
  708. <span style="margin-right:50px;margin-right:10px;" v-if="user.company.packageProject==1">{{ $t('other.totals') }}</span>
  709. <span v-if="addForm.budget <= 0 || addForm.budget == undefined">0</span>
  710. <span v-else>{{addForm.budget | numberToCurrency}}</span>
  711. <span style="margin-right:50px;margin-left:10px;">{{ $t('yuan') }}</span>
  712. </div>
  713. </div>
  714. </el-tab-pane>
  715. <el-tab-pane :label="$t('keynodes')" name="baseCostPanep" v-if="user.companyId == '936'">
  716. <div style="padding-top:10px;">
  717. <!--新版 -->
  718. <div class="keyNodes">
  719. <div class="keyNodesName">{{ $t('nameofthenode') }}</div>
  720. <div class="keyNodesTime">{{ $t('plannedcompletiontime') }}</div>
  721. <div class="keyNodesTime">{{ $t('actualcompletiontime') }}</div>
  722. <div class="keyNodesTime">{{ $t('state.states') }}</div>
  723. </div>
  724. <div class="keyNodes" v-for="item in projectKeyNodesData" :key="item.nodesId">
  725. <div class="keyNodesName">{{item.nodesName}}</div>
  726. <div class="keyNodesTime">
  727. <el-date-picker v-model="item.planCompleteDate" clearable style="width: 80%" size="small" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" :placeholder="$t('optiondate')"></el-date-picker>
  728. </div>
  729. <div class="keyNodesTime">
  730. <el-date-picker v-model="item.actualCompleteDate" clearable style="width: 80%" size="small" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" :placeholder="$t('optiondate')"></el-date-picker>
  731. </div>
  732. <div class="keyNodesTime">
  733. <el-select v-model="item.states" :placeholder="$t('defaultText.pleaseChoose')" style="width: 80%" size="small">
  734. <el-option :label="$t('zheng-chang')" value="0"></el-option>
  735. <el-option :label="$t('yan-qi')" value="1"></el-option>
  736. <el-option :label="$t('wan-cheng')" value="2"></el-option>
  737. </el-select>
  738. </div>
  739. </div>
  740. </div>
  741. </el-tab-pane>
  742. <el-tab-pane :label="$t('engineering')" name="engineeringProfession" v-if="user.company.packageEngineering == 1">
  743. <div style="padding-top:10px;" class="gongcheng">
  744. <el-table :data="projectProfessionList" size="small" :key="Math.random()" :height="'400px'">
  745. <el-table-column prop="professionId" width="200">
  746. <template slot-scope="scope">
  747. <el-select v-model="scope.row.professionId" >
  748. <el-option v-for="item in professionList" :key="item.id" :label="item.name" :value="item.id"/>
  749. </el-select>
  750. </template>
  751. <template slot="header" >
  752. <span style="font-size:14px;font-weight:normal;">{{ $t('nameprofessional') }}</span>
  753. </template>
  754. </el-table-column>
  755. <el-table-column prop="percentage" width="120" :label="$t('zhan-bi')">
  756. <template slot-scope="scope">
  757. <div><el-input type="number" v-model="scope.row.percentage"></el-input></div>
  758. </template>
  759. </el-table-column>
  760. <el-table-column prop="membNames" :label="$t('personnelproportion')">
  761. <template slot-scope="scope">
  762. <span style="margin:0 5px;" v-for="item in scope.row.membList" :key="item.membId">
  763. <span v-if="user.userNameNeedTranslate != 1">{{item.membName}}({{item.percentage}}%)</span>
  764. <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='item.membName'></TranslationOpenDataText>({{item.percentage}}%)</span>
  765. </span>
  766. <el-link @click="showEditPpMembs(scope.row)">{{(scope.row.membList == null || scope.row.membList.length == 0)?$t('professionalparticipants'):$t('setup')}}</el-link>
  767. </template>
  768. </el-table-column>
  769. <el-table-column prop="inchargerName" width="200" :label="$t('head')">
  770. <template slot-scope="scope">
  771. <el-select v-model="scope.row.inchargerId" v-if="user.userNameNeedTranslate != 1">
  772. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
  773. </el-select>
  774. <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="participator" :subjectId="scope.row.inchargerId" :other="scope.$index" :distinction="'4'" @selectCal="selectCal"></selectCat>
  775. </template>
  776. </el-table-column>
  777. <el-table-column width="80">
  778. <template slot-scope="scope">
  779. <el-button icon="el-icon-delete" size="mini" style="margin-left:10px;" @click.stop.native="deleteItem(scope.$index)"></el-button>
  780. </template>
  781. <template slot="header" >
  782. <el-link type="primary" :underline="false" @click="addItem">{{ $t('addTian') }}</el-link>
  783. </template>
  784. </el-table-column>
  785. </el-table>
  786. </div>
  787. </el-tab-pane>
  788. <!-- <el-tab-pane label="相关领导" name="leaders" >
  789. <div style="padding-top:10px;">
  790. <el-input @focus="showChooseLeaderTree" v-model="addForm.notifyUserNames" placeholder="请选择需要接收审核通知的相关领导"></el-input>
  791. </div>
  792. </el-tab-pane> -->
  793. </el-tabs>
  794. </div>
  795. </el-form>
  796. </div>
  797. <div slot="footer" class="dialog-footer;">
  798. <el-button @click.native="deletePro(1, addForm)" v-if="(permissions.projectManagement || user.id==deleteVif) && addForm.id" style="float:left">{{ $t('btn.delete') }}</el-button>
  799. <el-button @click.native="addFormVisible = false">{{ $t('btn.cancel') }}</el-button>
  800. <el-button type="primary" @click="submitInsert" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  801. </div>
  802. </el-dialog>
  803. <!-- 图片放大弹窗 -->
  804. <el-dialog :visible.sync="imgUrlListFlg" width="70%" :before-close="xhutDown">
  805. <img width="100%" :src="imgUrlLists" alt="">
  806. </el-dialog>
  807. <!--用户详细信息弹出框-->
  808. <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
  809. <div class="line"><span>{{ $t('lable.name') }}</span>
  810. <span v-if="user.userNameNeedTranslate != 1">{{userDetail.name}}</span>
  811. <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='userDetail.name'></TranslationOpenDataText></span>
  812. </div>
  813. <div class="line"><span>{{ $t('Worknumber') }}</span><span>{{userDetail.jobNumber}}</span></div>
  814. <div class="line"><span>{{ $t('lable.phone') }}</span><span>{{userDetail.phone}}</span></div>
  815. <div class="line"><span>{{ $t('jiao-se') }}</span><span>{{userDetail.roleName}}</span></div>
  816. <div class="line"><span>{{ $t('lable.department') }}</span>
  817. <span v-if="user.userNameNeedTranslate != 1">{{userDetail.departmentName}}</span>
  818. <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='userDetail.departmentName'></TranslationOpenDataText></span>
  819. </div>
  820. <div slot="footer" class="dialog-footer">
  821. <el-button type="primary" @click="userDetailVisible = false" >{{ $t('btn.determine') }}</el-button>
  822. </div>
  823. </el-dialog>
  824. <!-- 子项目列表 -->
  825. <el-dialog :title="$t('listofsubitems')" show-header="false" v-if="subProjectVisible" :visible.sync="subProjectVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  826. <el-table :data="subProjectList" highlight-current-row height="400" style="width: 100%;">
  827. <el-table-column width="120" :label="$t('subprojectno')" prop="code"></el-table-column>
  828. <el-table-column prop="name" :label="$t('names')" ></el-table-column>
  829. <el-table-column :label="$t('operation')" width="220">
  830. <template slot-scope="scope" >
  831. <el-switch
  832. @change="changSubStatus(scope.row)"
  833. v-model="scope.row.status"
  834. active-color="#13ce66"
  835. inactive-color="#ff4949"
  836. style="margin-right: 20px;">
  837. </el-switch>
  838. <el-button size="small" type="primary" @click="addNewSubProject(scope.row)">{{ $t('bian-ji') }}</el-button>
  839. <el-button size="small" type="danger" @click="deleteSubPro(scope.row)">{{ $t('btn.delete') }}</el-button>
  840. </template>
  841. </el-table-column>
  842. </el-table>
  843. <div slot="footer" class="dialog-footer">
  844. <el-button type="default" :disabled="subProjectList.length == 0" @click="forSubProjectlist = list.filter(a=>a.id != currentProject.id);copySubPListVisible = true;" style="align:left;">{{ $t('fuZhiDaoQiTaXiangMu') }}</el-button>
  845. <el-button type="primary" @click="subProjectVisible = false" >{{ $t('Shutdown') }}</el-button>
  846. <el-button type="primary" @click="addNewSubProject()" >{{ $t('addsubitems') }}</el-button>
  847. </div>
  848. </el-dialog>
  849. <!--选择项目弹出框-->
  850. <el-dialog :title="$t('xuanZeYaoFuZhiDaoDeMuBiaoXiangMu')" v-if="copySubPListVisible" :visible.sync="copySubPListVisible" :close-on-click-modal="false" customClass="customWidth" width="700px">
  851. <el-table ref="projectForSubCopy" border @cell-mouse-enter="hoverCall" @cell-mouse-leave="handCall" :cell-class-name="tableCellClassName" :data="forSubProjectlist" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedProlistForSub" @sort-change="tableSort">
  852. <el-table-column type="selection" width="60" >
  853. </el-table-column>
  854. <el-table-column prop="projectCode" :label="user.companyId == '7030' ? '项目令号' : $t('Itemno')" width="150"></el-table-column>
  855. <el-table-column prop="projectName" :label="$t('headerTop.projectName')" min-width="250">
  856. </el-table-column>
  857. </el-table>
  858. <div slot="footer" class="dialog-footer">
  859. <el-button @click.native="copySubPListVisible = false">{{ $t('btn.cancel') }}</el-button>
  860. <el-button type="primary" @click="submitCopySubProject()" >{{ $t('btn.submit') }}</el-button>
  861. </div>
  862. </el-dialog>
  863. <!-- 新增子项目弹出框 -->
  864. <el-dialog :title="$t('modifysubproject')" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="500px">
  865. <el-form ref="form2" :model="temaddForm" :rules="rules" label-width="100px">
  866. <!-- <el-form-item label="项目编号" prop="code"> -->
  867. <el-form-item :label="user.companyId == '7030' ? '项目令号' : $t('Itemno')">
  868. <el-input v-model="temaddForm.code" :placeholder="$t('peaseenterthe')" clearable></el-input>
  869. </el-form-item>
  870. <el-form-item :label="$t('headerTop.projectName')" prop="name">
  871. <el-input v-model="temaddForm.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
  872. </el-form-item>
  873. </el-form>
  874. <div slot="footer" class="dialog-footer">
  875. <el-button @click.native="addSubProject = false">{{ $t('btn.cancel') }}</el-button>
  876. <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  877. </div>
  878. </el-dialog>
  879. <!-- 项目基线成本项配置弹出框 -->
  880. <el-dialog :title="$t('baselinecostitemmanagement')" show-header="false" v-if="showBaseConfig" :visible.sync="showBaseConfig" :close-on-click-modal="false" customClass="customWidth" width="600px">
  881. <el-table :data="baseCostItemList" highlight-current-row height="400" style="width: 100%;">
  882. <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
  883. <template slot-scope="scope" >
  884. {{scope.$index+1+(page-1)*size}}
  885. </template>
  886. </el-table-column>
  887. <el-table-column prop="name" :label="$t('names')" ></el-table-column>
  888. <el-table-column prop="alarmType" :label="$t('yu-jing')">
  889. <template slot-scope="scope">
  890. <span>{{scope.row.alarmType ? $t('hourscostwarning') : $t('wu-yu-jing')}}</span>
  891. </template>
  892. </el-table-column>
  893. <el-table-column :label="$t('operation')" width="150">
  894. <template slot-scope="scope" >
  895. <el-button size="small" type="primary" @click="addNewBaseItem(scope.row)">{{ $t('bian-ji') }}</el-button>
  896. <el-button size="small" type="danger" @click="deleteBaseItem(scope.row)">{{ $t('btn.delete') }}</el-button>
  897. </template>
  898. </el-table-column>
  899. </el-table>
  900. <div slot="footer" class="dialog-footer">
  901. <el-button type="primary" @click="showBaseConfig = false" >{{ $t('Shutdown') }}</el-button>
  902. <el-button type="primary" @click="addNewBaseItem()" >{{ $t('newcostitem') }}</el-button>
  903. </div>
  904. </el-dialog>
  905. <!-- 项目关键节点配置弹出框 -->
  906. <el-dialog :title="$t('keyprojectnodes')" show-header="false" v-if="keyNodesIsShow" :visible.sync="keyNodesIsShow" :close-on-click-modal="false" customClass="customWidth" width="600px">
  907. <el-table :data="keyNodesList" highlight-current-row height="400" style="width: 100%;">
  908. <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
  909. <template slot-scope="scope" >
  910. {{scope.$index+1+(page-1)*size}}
  911. </template>
  912. </el-table-column>
  913. <el-table-column prop="name" :label="$t('names')" ></el-table-column>
  914. <el-table-column :label="$t('operation')" width="150">
  915. <template slot-scope="scope" >
  916. <el-button size="small" type="primary" @click="addNewkeyNodes(scope.row)">{{ $t('bian-ji') }}</el-button>
  917. <el-button size="small" type="danger" @click="deletekeyNodes(scope.row)">{{ $t('btn.delete') }}</el-button>
  918. </template>
  919. </el-table-column>
  920. </el-table>
  921. <div slot="footer" class="dialog-footer">
  922. <el-button type="primary" @click="keyNodesIsShow = false" >{{ $t('Shutdown') }}</el-button>
  923. <el-button type="primary" @click="addNewkeyNodes()" >{{$t('addingKeyNodes')}}</el-button>
  924. </div>
  925. </el-dialog>
  926. <!-- 分类条目配置 -->
  927. <el-dialog :title="$t('projectclassificationqwe')" show-header="false" v-if="showClfDialog" :visible.sync="showClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  928. <el-table :data="baseClfList" highlight-current-row height="400" style="width: 100%;">
  929. <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
  930. <template slot-scope="scope" >
  931. {{scope.$index+1}}
  932. </template>
  933. </el-table-column>
  934. <el-table-column prop="name" :label="$t('names')" ></el-table-column>
  935. <el-table-column :label="$t('operation')" :width="user.companyId == '862' ? '300px' : '180px'">
  936. <template slot-scope="scope" >
  937. <el-button size="small" type="primary" @click="auditProcess(scope.row)" v-if="user.companyId == '862'" >{{ $t('AuditProcess') }}</el-button>
  938. <el-button size="small" type="primary" @click="addNewClf(scope.row)">{{ $t('bian-ji') }}</el-button>
  939. <el-button size="small" type="danger" @click="deleteClf(scope.row)">{{ $t('btn.delete') }}</el-button>
  940. </template>
  941. </el-table-column>
  942. </el-table>
  943. <div slot="footer" class="dialog-footer">
  944. <el-button type="primary" @click="showClfDialog = false" >{{ $t('Shutdown') }}</el-button>
  945. <el-button type="primary" @click="addNewClf()" >{{ $t('newCategoryItem') }}</el-button>
  946. </div>
  947. </el-dialog>
  948. <!-- 主项目配置 -->
  949. <el-dialog :title="$t('masterprojectmanagement')" show-header="false" v-if="mainProjectDialog" :visible.sync="mainProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="800px">
  950. <el-table :data="mainProjectList" highlight-current-row height="400" style="width: 100%;">
  951. <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
  952. <template slot-scope="scope" >
  953. {{scope.$index+1+(page-1)*size}}
  954. </template>
  955. </el-table-column>
  956. <el-table-column prop="code" :label="$t('bian-hao')" ></el-table-column>
  957. <el-table-column prop="name" :label="$t('names')" ></el-table-column>
  958. <el-table-column prop="categoryName" :label="$t('fen-lei-ming-cheng')" ></el-table-column>
  959. <el-table-column :label="$t('operation')" width="150">
  960. <template slot-scope="scope" >
  961. <el-button size="small" type="primary" @click="addManPro(scope.row)">{{ $t('bian-ji') }}</el-button>
  962. <el-button size="small" type="danger" @click="deleteManPro(scope.row)">{{ $t('btn.delete') }}</el-button>
  963. </template>
  964. </el-table-column>
  965. </el-table>
  966. <div slot="footer" class="dialog-footer">
  967. <el-button type="primary" @click="mainProjectDialog = false" >{{ $t('Shutdown') }}</el-button>
  968. <el-button type="primary" @click="addManPro()" >{{ $t('addzhuxiang') }}</el-button>
  969. </div>
  970. </el-dialog>
  971. <!-- 项目阶段配置 -->
  972. <el-dialog :title="$t('projectstagemanagement')" show-header="false" v-if="phaseProjectDialog" :visible.sync="phaseProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  973. <el-table :data="phaseList" highlight-current-row height="400" style="width: 100%;">
  974. <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
  975. <template slot-scope="scope" >
  976. {{scope.$index+1+(page-1)*size}}
  977. </template>
  978. </el-table-column>
  979. <el-table-column prop="projectStageName" :label="$t('phasename')" ></el-table-column>
  980. <el-table-column :label="$t('operation')" width="150">
  981. <template slot-scope="scope" >
  982. <el-button size="small" type="primary" @click="addPanthPro(scope.row)">{{ $t('bian-ji') }}</el-button>
  983. <el-button size="small" type="danger" @click="deletePanthPro(scope.row)">{{ $t('btn.delete') }}</el-button>
  984. </template>
  985. </el-table-column>
  986. </el-table>
  987. <div slot="footer" class="dialog-footer">
  988. <el-button type="primary" @click="phaseProjectDialog = false" >{{ $t('Shutdown') }}</el-button>
  989. <el-button type="primary" @click="addPanthPro()" >{{ $t('newprojectstage') }}</el-button>
  990. </div>
  991. </el-dialog>
  992. <!-- 项目级别管理 -->
  993. <el-dialog :title="$t('projectlevelmanagement')" show-header="false" v-if="projectLevelDialog" :visible.sync="projectLevelDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  994. <el-table :data="levelList" highlight-current-row height="400" style="width: 100%;" >
  995. <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
  996. <template slot-scope="scope" >
  997. {{scope.$index+1+(page-1)*size}}
  998. </template>
  999. </el-table-column>
  1000. <el-table-column prop="projectLevelName" :label="$t('levelnames')" ></el-table-column>
  1001. <el-table-column :label="$t('operation')" width="150">
  1002. <template slot-scope="scope" >
  1003. <el-button size="small" type="primary" @click="addProjectLevel(scope.row)">{{ $t('bian-ji') }}</el-button>
  1004. <el-button size="small" type="danger" @click="deleteProjectLevel(scope.row)">{{ $t('btn.delete') }}</el-button>
  1005. </template>
  1006. </el-table-column>
  1007. </el-table>
  1008. <div slot="footer" class="dialog-footer">
  1009. <el-button type="primary" @click="projectLevelDialog = false" >{{ $t('Shutdown') }}</el-button>
  1010. <el-button type="primary" @click="addProjectLevel()" >{{ $t('newProjectLevel') }}</el-button>
  1011. </div>
  1012. </el-dialog>
  1013. <el-dialog :title="$t('xiangMuYuGuGongShiPeiZhi')" show-header="false" v-if="projectManDaySettingDialog" :visible.sync="projectManDaySettingDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  1014. <el-form label-width="200px" :form="manDaySetting">
  1015. <el-form-item :label="$t('yuGuGongShiShiFouBiTian')" >
  1016. <el-select v-model="manDaySetting.projectManDayFillMode" :placeholder="$t('defaultText.pleaseChoose')" >
  1017. <el-option :label="$t('feiBiTian')" :value="0"></el-option>
  1018. <el-option :label="$t('gongShiXiTongChuangJianDeXiangMuBiTian')" :value="1"></el-option>
  1019. <el-option :label="$t('gongShiXiTongHeWaiBuTongBuDeXiangMuDuBiTian')" :value="2"></el-option>
  1020. <el-option :label="$t('waibutongbuXiangMuBiTian')" :value="3"></el-option>
  1021. </el-select>
  1022. </el-form-item>
  1023. <el-form-item :label="$t('xiangMuGongShiShengYuTiXingBaiFenBi')" >
  1024. <el-input v-model="manDaySetting.projectWarningPercent" type="number" style="width:200px;">
  1025. </el-input>%
  1026. </el-form-item>
  1027. <el-form-item :label="$t('xiangMuGongShiBuZuShi')" >
  1028. <el-select v-model="manDaySetting.projectFronzeOnLack" :placeholder="$t('defaultText.pleaseChoose')" >
  1029. <el-option :label="$t('jinZhiTianBao')" :value="1"></el-option>
  1030. <el-option :label="$t('keYiTianBaoJinTiXing')" :value="0"></el-option>
  1031. </el-select>
  1032. </el-form-item>
  1033. <el-form-item :label="$t('fenZuGongShiShengYuTiXingBaiFenBi')" v-if="user.company.packageProject == 1">
  1034. <el-input v-model="manDaySetting.groupWarningPercent" type="number" style="width:200px;">
  1035. </el-input>%
  1036. </el-form-item>
  1037. <el-form-item :label="$t('fenZuGongShiBuZuShi')" v-if="user.company.packageProject == 1" >
  1038. <el-select v-model="manDaySetting.groupFronzeOnLack" :placeholder="$t('defaultText.pleaseChoose')" >
  1039. <el-option :label="$t('jinZhiTianBao')" :value="1"></el-option>
  1040. <el-option :label="$t('keYiTianBaoJinTiXing')" :value="0"></el-option>
  1041. </el-select>
  1042. </el-form-item>
  1043. </el-form>
  1044. <div slot="footer" class="dialog-footer">
  1045. <el-button type="default" @click="projectManDaySettingDialog = false" >{{ $t('Shutdown') }}</el-button>
  1046. <el-button type="primary" @click="saveProjectManDaySetting()" >{{ $t('save') }}</el-button>
  1047. </div>
  1048. </el-dialog>
  1049. <!-- 导出任务分组 -->
  1050. <el-dialog :title="$t('exportingTaskGroups')" show-header="false" v-if="groupTaskDialog" :visible.sync="groupTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  1051. <el-form>
  1052. <el-form-item :label="$t('IndependentProject')">
  1053. <el-select v-model="projectCategorySubId" :placeholder="$t('defaultText.pleaseChoose')" clearable >
  1054. <el-option v-for="item in projectCategorySubList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  1055. </el-select>
  1056. </el-form-item>
  1057. </el-form>
  1058. <div slot="footer" class="dialog-footer">
  1059. <el-button type="primary" @click="groupTaskDialog = false" >{{ $t('Shutdown') }}</el-button>
  1060. <el-button type="primary" @click="exportProjectGroup" >{{ $t('export.export') }}</el-button>
  1061. </div>
  1062. </el-dialog>
  1063. <!-- 新增/编辑项目级别 -->
  1064. <el-dialog :title="$t('modifyingtheprojectLevel')" v-if="addProjectLevelDialog" :visible.sync="addProjectLevelDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1065. <el-form ref="form2" :model="addLevelForm" :rules="rules" label-width="120px">
  1066. <el-form-item :label="$t('projectLevelName')" prop="projectLevelName">
  1067. <el-input v-model="addLevelForm.projectLevelName" :placeholder="$t('peaseenterthe')" clearable></el-input>
  1068. </el-form-item>
  1069. </el-form>
  1070. <div slot="footer" class="dialog-footer">
  1071. <el-button @click="addProjectLevelDialog = false">{{ $t('btn.cancel') }}</el-button>
  1072. <el-button type="primary" @click="submitLevelPro" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  1073. </div>
  1074. </el-dialog>
  1075. <!-- 新增/编辑 分类条目 -->
  1076. <el-dialog :title="$t('addmodifycategoryentry')" v-if="addClfDialog" :visible.sync="addClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1077. <el-form ref="form2" :model="addClf" :rules="rules" label-width="100px">
  1078. <!-- <el-form-item :label="$t('mainProjectName')" prop="name"> -->
  1079. <el-form-item :label="$t('fen-lei-ming-cheng')" prop="name">
  1080. <el-input v-model="addClf.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
  1081. </el-form-item>
  1082. </el-form>
  1083. <div slot="footer" class="dialog-footer">
  1084. <el-button @click.native="addClfDialog = false">{{ $t('btn.cancel') }}</el-button>
  1085. <el-button type="primary" @click="submitClf" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  1086. </div>
  1087. </el-dialog>
  1088. <!-- 分类条目有关审核流程设置 -->
  1089. <el-dialog :title="$t('AuditProcess')" v-if="auditProcessDialog" :visible.sync="auditProcessDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1090. <el-form ref="form2" :model="auditProcess" :rules="rules" label-width="150px">
  1091. <!-- <el-form-item :label="$t('mainProjectName')" prop="name"> -->
  1092. <el-form-item :label="$t('AuditProcess')" prop="name">
  1093. <template>
  1094. <el-checkbox v-model="addClf.proInchargerAudit" >{{ $t('xiangMuShenHeRenShenHe') }}</el-checkbox>
  1095. <div style="width: 120px ; text-align: center;"><i class="el-icon-bottom"></i></div>
  1096. <el-checkbox v-model="addClf.proBuAudit" >{{ $t('xiangMuSuoShuBuFuZeRenShenHe') }}</el-checkbox>
  1097. </template>
  1098. </el-form-item>
  1099. </el-form>
  1100. <div slot="footer" class="dialog-footer">
  1101. <el-button @click.native="auditProcessDialog = false">{{ $t('btn.cancel') }}</el-button>
  1102. <el-button type="primary" @click="submitClf" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  1103. </div>
  1104. </el-dialog>
  1105. <!-- 新增/编辑主项目 -->
  1106. <el-dialog :title="$t('modifythemainproject')" v-if="addFlgmainProjectDialog" :visible.sync="addFlgmainProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1107. <el-form ref="form2" :model="addMainForm" :rules="rules" label-width="100px">
  1108. <!-- <el-form-item label="主项目编号" prop="code"> -->
  1109. <el-form-item :label="$t('mainProjectNo')">
  1110. <el-input v-model="addMainForm.code" :placeholder="$t('peaseenterthe')" clearable></el-input>
  1111. </el-form-item>
  1112. <el-form-item :label="$t('mainProjectName')" prop="name">
  1113. <el-input v-model="addMainForm.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
  1114. </el-form-item>
  1115. <el-form-item :label="$t('projectclassification')">
  1116. <el-select v-model="addMainForm.categoryId" :placeholder="$t('defaultText.pleaseChoose')" clearable >
  1117. <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  1118. </el-select>
  1119. </el-form-item>
  1120. </el-form>
  1121. <div slot="footer" class="dialog-footer">
  1122. <el-button @click.native="addFlgmainProjectDialog = false">{{ $t('btn.cancel') }}</el-button>
  1123. <el-button type="primary" @click="submitManPro" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  1124. </div>
  1125. </el-dialog>
  1126. <!-- 新增/编辑项目阶段 -->
  1127. <el-dialog :title="$t('modifyingtheprojectphase')" v-if="addFlgPanthProjectDialog" :visible.sync="addFlgPanthProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1128. <el-form ref="form2" :model="addPanthForm" :rules="rules" label-width="120px">
  1129. <el-form-item :label="$t('projectStageName')" prop="name">
  1130. <el-input v-model="addPanthForm.projectStageName" :placeholder="$t('peaseenterthe')" clearable></el-input>
  1131. </el-form-item>
  1132. </el-form>
  1133. <div slot="footer" class="dialog-footer">
  1134. <el-button @click.native="addFlgPanthProjectDialog = false">{{ $t('btn.cancel') }}</el-button>
  1135. <el-button type="primary" @click="submitPanthPro" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  1136. </div>
  1137. </el-dialog>
  1138. <el-dialog :title="$t('modificationcostitem')" v-if="addBaseItemDialog" :visible.sync="addBaseItemDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1139. <el-form ref="form2" :model="addForm" :rules="rules" label-width="100px">
  1140. <el-form-item :label="$t('nameofcostitem')" prop="name">
  1141. <el-input v-model="addForm.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
  1142. </el-form-item>
  1143. <el-form-item :label="$t('yu-jing')" prop="alarmType">
  1144. <el-radio v-model="addForm.alarmType" :label="0">{{ $t('wu-yu-jing') }}</el-radio>
  1145. <el-radio v-model="addForm.alarmType" :label="1">{{ $t('hourscostwarning') }}</el-radio>
  1146. </el-form-item>
  1147. </el-form>
  1148. <div slot="footer" class="dialog-footer">
  1149. <el-button @click.native="addBaseItemDialog = false">{{ $t('btn.cancel') }}</el-button>
  1150. <el-button type="primary" @click="submitInsertBaseItem" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  1151. </div>
  1152. </el-dialog>
  1153. <el-dialog :title="$t('modifyingKeyNodesn')" v-if="addBasekeyNodesialog" :visible.sync="addBasekeyNodesialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1154. <el-form ref="form2" :model="addFormkeyNodes" :rules="rules" label-width="120px">
  1155. <el-form-item :label="$t('keyNodeNames')" prop="name">
  1156. <el-input v-model.trim="addFormkeyNodes.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
  1157. </el-form-item>
  1158. </el-form>
  1159. <div slot="footer" class="dialog-footer">
  1160. <el-button @click.native="addBasekeyNodesialog = false">{{ $t('btn.cancel') }}</el-button>
  1161. <el-button type="primary" @click="submitkeyNodes" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  1162. </div>
  1163. </el-dialog>
  1164. <!-- 按部门选择人员 -->
  1165. <el-dialog :title="$t('selectingParticipants')" :visible.sync="chooseParticipVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1166. <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
  1167. <div v-if="user.userNameNeedTranslate == '1'">
  1168. <el-input :placeholder="$t('pleaseentercontent')" v-model.trim="filterText" class="input-with-select" @keyup.enter.native="echartDepartment()">
  1169. <el-button slot="append" icon="el-icon-search" @click="echartDepartment()"></el-button>
  1170. </el-input>
  1171. </div>
  1172. <div class="tree" style="height:400px">
  1173. <el-scrollbar style="height:100%">
  1174. <el-input
  1175. :placeholder="$t('keywordfiltering')"
  1176. v-model="filterText" v-if="user.userNameNeedTranslate != '1'">
  1177. </el-input>
  1178. <el-tree :data="deptMembData" :key="searchPersonnelFlgnum" show-checkbox :default-expand-all="searchPersonnelFlg" :props="defaultProps" node-key="id"
  1179. ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
  1180. highlight-current :filter-node-method="filterNode">
  1181. <span class="custom-tree-node" slot-scope="{ node, data }">
  1182. <span v-if="user.userNameNeedTranslate == '1'">
  1183. <span v-if="node.data.children">
  1184. <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
  1185. </span>
  1186. <span v-else>
  1187. <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
  1188. </span>
  1189. </span>
  1190. <span v-if="user.userNameNeedTranslate != '1'">
  1191. {{ node.label }}
  1192. </span>
  1193. <!-- {{ node.label }} -->
  1194. </span>
  1195. </el-tree>
  1196. </el-scrollbar>
  1197. </div>
  1198. <div>{{ $t('btn.choose') }}&nbsp;{{chosenMembCount}}&nbsp;{{ $t('other.people') }}</div>
  1199. <div slot="footer" class="dialog-footer">
  1200. <el-button @click="chooseParticipVisible = false" >{{ $t('btn.cancel') }}</el-button>
  1201. <el-button type="primary" @click="chooseParticip()" >{{ $t('btn.determine') }}</el-button>
  1202. </div>
  1203. </el-dialog>
  1204. <!-- 按部门选择相关领导,弃用 -->
  1205. <!-- <el-dialog title="选择相关领导" v-if="chooseLeaderVisible" :visible.sync="chooseLeaderVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1206. <div class="tree" style="height:400px">
  1207. <el-scrollbar style="height:100%">
  1208. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  1209. ref="chooseLeaderTree" @check-change="onLeaderTreeItemChange" :default-checked-keys="addForm.notifyUserIds"
  1210. highlight-current ></el-tree>
  1211. </el-scrollbar>
  1212. </div>
  1213. <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>
  1214. <div slot="footer" class="dialog-footer">
  1215. <el-button @click="chooseLeaderVisible = false" >取消</el-button>
  1216. <el-button type="primary" @click="chooseLeader()" >确定</el-button>
  1217. </div>
  1218. </el-dialog> -->
  1219. <!-- 项目专业人员的设置 -->
  1220. <el-dialog :title="$t('setupprojectprofessionals')" v-if="editPpMembDialog" :visible.sync="editPpMembDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  1221. <div class="gongcheng">
  1222. <el-table :data="curProfessionRow.membList" height="400">
  1223. <el-table-column prop="name" :label="$t('professionals')">
  1224. <template slot-scope="scope">
  1225. <el-select v-model="scope.row.membId" v-if="user.userNameNeedTranslate != 1" filterable :placeholder="$t('professionaladdsparticipant')" style="width:100%;" >
  1226. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id">
  1227. </el-option>
  1228. </el-select>
  1229. <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :subject="participator" :subjectId="scope.row.membId" :distinction="'11'" :other="scope.$index" @selectCal="selectCal"></selectCat>
  1230. </template>
  1231. </el-table-column>
  1232. <el-table-column prop="percentage" width="120" :label="$t('zhan-bi')">
  1233. <template slot-scope="scope">
  1234. <el-input type="number" v-model="scope.row.percentage"></el-input>
  1235. </template>
  1236. </el-table-column>
  1237. <el-table-column width="80">
  1238. <template slot-scope="scope">
  1239. <el-button icon="el-icon-delete" size="mini" style="margin-left:10px;" @click.stop.native="deleteMembItem(scope.$index)"></el-button>
  1240. </template>
  1241. <template slot="header" >
  1242. <el-link @click="addMembItem" type="primary">{{ $t('addTian') }}</el-link>
  1243. </template>
  1244. </el-table-column>
  1245. </el-table>
  1246. <div slot="footer" class="dialog-footer">
  1247. <el-button @click="editPpMembDialog = false" >{{ $t('btn.cancel') }}</el-button>
  1248. <el-button type="primary" @click="addPpMemb" >{{ $t('btn.determine') }}</el-button>
  1249. </div>
  1250. </div>
  1251. </el-dialog>
  1252. <!-- 批量修改自定义维度 -->
  1253. <el-dialog :title="checkoradd ? $t('changes') : $t('pi-liang-tian-jia')" :visible.sync="checkedWuduDialog" v-if="checkedWuduDialog" width="40%">
  1254. <el-form model="" label-width="20%">
  1255. <el-form-item :label="$t('setup') + user.timeType.customDegreeName">
  1256. <el-select v-model="checkedWuduArr" value-key="id" :placeholder="$t('defaultText.pleaseChoose') + user.timeType.customDegreeName" multiple style="width: 100%">
  1257. <el-option v-for="item in ause" :key="item.id" :label="item.name" :value="item"></el-option>
  1258. </el-select>
  1259. </el-form-item>
  1260. </el-form>
  1261. <div slot="footer" class="dialog-footer">
  1262. <el-button @click="checkedWuduDialog = false">{{ $t('btn.cancel') }}</el-button>
  1263. <el-button type="primary" @click="batchSetWudulistBtn3" v-if="checkoradd">{{ $t('btn.determine') }}</el-button>
  1264. <el-button type="primary" @click="batchSetWudulistBtn4" v-if="!checkoradd">{{ $t('btn.determine') }}</el-button>
  1265. </div>
  1266. </el-dialog>
  1267. <!-- 批量添加参与人 -->
  1268. <el-dialog :title="isAddGroupPerson ? $t('groupparticipantsinbatches') : $t('projectparticipantsinbatches')" v-if="addGroupPersonDialog" :visible.sync="addGroupPersonDialog" width="600px">
  1269. <el-form label-width="20%">
  1270. <el-form-item :label="$t('screening.selectPeople')">
  1271. <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate != '1'">
  1272. <div slot="content" style="width:450px">{{addGroupPersonData.personNames}}</div>
  1273. <el-input @focus="addGroupPersonP" v-model="addGroupPersonData.personNames"></el-input>
  1274. </el-tooltip>
  1275. <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate == '1'">
  1276. <div slot="content" style="width:580px">
  1277. <span v-for="(item, index) in addGroupPersonDataPersonNames" :key="index">
  1278. <!-- {{item}} -->
  1279. <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
  1280. <span v-if="index < addGroupPersonDataPersonNames.length - 1">,</span>
  1281. </span>
  1282. </div>
  1283. <div @click="addGroupPersonP" style="width: 450px;overflow:hidden;white-space:nowrap;height:40px;border: 1px solid #DCDFE6;border-radius: 4px;box-sizing: border-box;padding: 0 10px">
  1284. <span v-for="(item, index) in addGroupPersonDataPersonNames" :key="index">
  1285. <!-- {{item}} -->
  1286. <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
  1287. <span v-if="index < addGroupPersonDataPersonNames.length - 1">,</span>
  1288. </span>
  1289. </div>
  1290. </el-tooltip>
  1291. </el-form-item>
  1292. <el-form-item :label="$t('xuan-ze-fen-zu')" v-if="isAddGroupPerson">
  1293. <el-select v-model="addGroupPersonData.group" multiple :placeholder="$t('selectagroup')" style="width:100%">
  1294. <el-option v-for="item in addGroupList"
  1295. :key="item.groupIds"
  1296. :label="item.name"
  1297. :value="item.groupIds"></el-option>
  1298. </el-select>
  1299. </el-form-item>
  1300. </el-form>
  1301. <div slot="footer" class="dialog-footer">
  1302. <el-button @click="addGroupPersonDialog = false" >{{ $t('btn.cancel') }}</el-button>
  1303. <el-button type="primary" @click="addGroupPersonSure()" v-if="isAddGroupPerson">{{ $t('btn.determine') }}</el-button>
  1304. <el-button type="primary" @click="addProPersonSure()" v-else>{{ $t('btn.determine') }}</el-button>
  1305. </div>
  1306. <el-dialog append-to-body :title="$t('screening.selectPeople')" v-if="addGroupPersonPdialog" :visible.sync="addGroupPersonPdialog" width="40%" top="6.5vh">
  1307. <div class="tree" style="height:50vh">
  1308. <el-scrollbar style="height:100%">
  1309. <el-input
  1310. :placeholder="$t('keywordfiltering')"
  1311. v-model="filterText2"
  1312. v-if="user.userNameNeedTranslate != 1">
  1313. </el-input>
  1314. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  1315. ref="chooseMembTree2" @check-change="addPersonCheck"
  1316. highlight-current :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person">
  1317. <span class="custom-tree-node" slot-scope="{ node, data }">
  1318. <span v-if="user.userNameNeedTranslate == '1'">
  1319. <span v-if="node.data.children">
  1320. <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
  1321. </span>
  1322. <span v-else>
  1323. <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
  1324. </span>
  1325. </span>
  1326. <span v-if="user.userNameNeedTranslate != '1'">
  1327. {{ node.label }}
  1328. </span>
  1329. </span>
  1330. </el-tree>
  1331. </el-scrollbar>
  1332. </div>
  1333. <div>{{ $t('btn.choose') }}&nbsp;{{chosenMembCount}}&nbsp;{{ $t('other.people') }}</div>
  1334. <div slot="footer" class="dialog-footer">
  1335. <el-button @click="addGroupPersonPdialog = false" >{{ $t('btn.cancel') }}</el-button>
  1336. <el-button type="primary" @click="addPersonSure()" >{{ $t('btn.determine') }}</el-button>
  1337. </div>
  1338. </el-dialog>
  1339. </el-dialog>
  1340. <!-- 批量设置项目经理 -->
  1341. <el-dialog :title="$t('projectmanagersinbatches')" v-if="batchInchargerDialog" :visible.sync="batchInchargerDialog" width="500px">
  1342. <el-form model="" label-width="120px">
  1343. <el-form-item :label="$t('setupprojectmanager')">
  1344. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="paramInchargerId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 80%" filterable clearable>
  1345. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  1346. <span style="float: left">{{item.name}}</span>
  1347. <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
  1348. </el-option>
  1349. </el-select>
  1350. <selectCat :size="'small'" :widthStr="'272'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="paramInchargerId" :distinction="'5'" @selectCal="selectCal"></selectCat>
  1351. </el-form-item>
  1352. </el-form>
  1353. <div slot="footer" class="dialog-footer">
  1354. <el-button @click="batchInchargerDialog = false" >{{ $t('btn.cancel') }}</el-button>
  1355. <el-button type="primary" @click="batchInchargerSure()">{{ $t('btn.determine') }}</el-button>
  1356. </div>
  1357. </el-dialog>
  1358. <el-dialog :title="$t('importproject')" v-if="importProjectBeforeDialog" :visible.sync="importProjectBeforeDialog" width="30%">
  1359. <el-checkbox v-model="paramData1" style="margin-left:10px">{{ $t('dui-yi-you-xiang-mu-jin-hang-xin-xi-geng-xin') }}</el-checkbox>
  1360. <el-checkbox v-model="changeParticipation" @change="changeParticipationValue(changeParticipation)" style="margin-left:10px" >{{ '根据文件中参与人对现有的进行删减' }}</el-checkbox>
  1361. <div slot="footer" class="dialog-footer" style="text-algin:center;">
  1362. <el-upload ref="upload" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
  1363. <el-button type="primary">{{ $t('importproject') }}</el-button>
  1364. </el-upload>
  1365. </div>
  1366. </el-dialog>
  1367. <el-dialog :title="$t('xiu-gai-xiang-mu-dang-qian-jie-duan')" v-if="changeStageDialogVisible" :visible.sync="changeStageDialogVisible" width="500px">
  1368. <el-select v-model="curChangeProject.curStageId" filterable :placeholder="$t('pleaseselecttheprojectphase')" style="width: 100%;">
  1369. <el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
  1370. </el-select>
  1371. <div slot="footer" class="dialog-footer" style="text-algin:center;">
  1372. <el-button type="primary" @click="confirmChangeStage">{{ $t('btn.determine') }}</el-button>
  1373. </div>
  1374. </el-dialog>
  1375. <el-dialog :title="$t('piLiangXiuGaiXiangMuJieDuan')" v-if="batchChangeStageDialogVisible" :visible.sync="batchChangeStageDialogVisible" width="500px">
  1376. <el-select v-model="curChangeProject.curStageId" filterable :placeholder="$t('pleaseselecttheprojectphase')" style="width: 100%">
  1377. <el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
  1378. </el-select>
  1379. <div slot="footer" class="dialog-footer" style="text-algin:center;">
  1380. <el-button type="primary" @click="editBatchProjectStage()" :loading="batchChangeStageLoading">{{ $t('btn.determine') }}</el-button>
  1381. </div>
  1382. </el-dialog>
  1383. <el-dialog append-to-body :title="$t('projectimportresult')" v-if="showImportResult" :visible.sync="showImportResult" width="40%">
  1384. <div >
  1385. {{importResultMsg}}
  1386. </div>
  1387. </el-dialog>
  1388. <!-- 职能分工设置 -->
  1389. <el-dialog :title="$t('zhiNengFenGongSheZhi')" v-if="functionalDivisionDig" :visible.sync="functionalDivisionDig" width="80%">
  1390. <el-table border :data="functionalList" style="width: 100%">
  1391. <el-table-column prop="id" :label="$t('headerTop.serialNumber')" width="50" type="index" align="center"
  1392. :index="index=>index+1"/>
  1393. <el-table-column prop="timeType" :label="$t('gongShiLeiXing')" align="center">
  1394. <template slot-scope="scope">
  1395. <span v-show="!scope.row.editFlag">{{scope.row.timeType}}</span>
  1396. <el-select v-show="scope.row.editFlag" v-model="scope.row.timeType" :placeholder="$t('defaultText.pleaseChoose')">
  1397. <el-option
  1398. v-for="item in timeTypeList"
  1399. :key="item.value"
  1400. :label="item.label"
  1401. :value="item.label">
  1402. </el-option>
  1403. </el-select>
  1404. </template>
  1405. </el-table-column>
  1406. <el-table-column prop="roleId" :label="$t('jiao-se')" align="center">
  1407. <template slot-scope="scope">
  1408. <span v-show="!scope.row.editFlag">{{scope.row.role}}</span>
  1409. <el-select v-show="scope.row.editFlag" v-model="scope.row.role" :placeholder="$t('defaultText.pleaseChoose')">
  1410. <el-option
  1411. v-for="item in roleList"
  1412. :key="item.value"
  1413. :label="item.label"
  1414. :value="item.label">
  1415. </el-option>
  1416. </el-select>
  1417. </template>
  1418. </el-table-column>
  1419. <el-table-column prop="jobRespon" :label="$t('gongZuoZhiZe')" align="center">
  1420. <template slot-scope="scope">
  1421. <span v-show="!scope.row.editFlag">{{scope.row.jobRespon}}</span>
  1422. <el-input v-show="scope.row.editFlag"
  1423. v-model="scope.row.jobRespon">
  1424. </el-input>
  1425. </template>
  1426. </el-table-column>
  1427. <el-table-column prop="workContext" :label="$t('gongZuoNeiRong')" align="center">
  1428. <template slot-scope="scope">
  1429. <a v-if="scope.row.id" @click="workContextDig=true,getWorkContextList(scope.row.id)" class="themeFontColor">{{ $t('datamaintenance') }}</a>
  1430. <a v-else>{{ $t('datamaintenance') }}</a>
  1431. </template>
  1432. </el-table-column>
  1433. <el-table-column :label="$t('operation')" width="120" align="center">
  1434. <template slot-scope="scope">
  1435. <div style="display: flex;">
  1436. <el-button size="small"
  1437. type="text"
  1438. icon="CircleCheck"
  1439. v-show="scope.row.editFlag"
  1440. @click="functionalSubmit(scope.row)">{{ $t('btn.determine') }}
  1441. </el-button>
  1442. <el-button size="small"
  1443. type="text"
  1444. icon="CircleClose"
  1445. v-show="scope.row.editFlag"
  1446. @click="functionalCancel(scope.row,scope.$index,'functional')">{{ $t('btn.cancel') }}
  1447. </el-button>
  1448. <el-button size="small"
  1449. icon="Edit"
  1450. type="text"
  1451. v-show="!scope.row.editFlag"
  1452. @click="functionalEditVersion(scope.row)"> {{ $t('bian-ji') }}
  1453. </el-button>
  1454. <el-button size="small"
  1455. icon="Delete"
  1456. type="text"
  1457. v-show="!scope.row.editFlag"
  1458. @click="functionalDelVersion(scope.row,scope.$index)">{{ $t('btn.delete') }}
  1459. </el-button>
  1460. </div>
  1461. </template>
  1462. </el-table-column>
  1463. </el-table>
  1464. <div slot="footer" class="dialog-footer">
  1465. <el-button @click="addFunctional('functional')" type="primary">{{ $t('tianJiaYiHang') }}</el-button>
  1466. <el-button @click="functionalDivisionDig = false" >{{ $t('btn.cancel') }}</el-button>
  1467. <el-button type="primary" @click="submitFunctional()">{{ $t('btn.determine') }}</el-button>
  1468. </div>
  1469. </el-dialog>
  1470. <!-- 工作内容dig -->
  1471. <el-dialog :title="$t('gongZuoNeiRong')" v-if="workContextDig" :visible.sync="workContextDig" width="40%">
  1472. <el-table border :data="workContextList" style="width: 100%">
  1473. <el-table-column prop="id" :label="$t('headerTop.serialNumber')" width="50" type="index" align="center"
  1474. :index="index=>index+1"/>
  1475. <el-table-column prop="workContext" :label="$t('gongZuoNeiRong')" align="center">
  1476. <template slot-scope="scope">
  1477. <span v-show="!scope.row.editFlag">{{scope.row.workContext}}</span>
  1478. <el-input v-show="scope.row.editFlag"
  1479. v-model="scope.row.workContext">
  1480. </el-input>
  1481. </template>
  1482. </el-table-column>
  1483. <el-table-column :label="$t('operation')" width="120" align="center">
  1484. <template slot-scope="scope">
  1485. <div style="display: flex;">
  1486. <el-button size="small"
  1487. type="text"
  1488. icon="CircleCheck"
  1489. v-show="scope.row.editFlag"
  1490. @click="functionalSubmit(scope.row)">{{ $t('btn.determine') }}
  1491. </el-button>
  1492. <el-button size="small"
  1493. type="text"
  1494. icon="CircleClose"
  1495. v-show="scope.row.editFlag"
  1496. @click="functionalCancel(scope.row,scope.$index,'workContext')">{{ $t('btn.cancel') }}
  1497. </el-button>
  1498. <el-button size="small"
  1499. icon="Edit"
  1500. type="text"
  1501. v-show="!scope.row.editFlag"
  1502. @click="functionalEditVersion(scope.row)"> {{ $t('bian-ji') }}
  1503. </el-button>
  1504. <el-button size="small"
  1505. icon="Delete"
  1506. type="text"
  1507. v-show="!scope.row.editFlag"
  1508. @click="workContextDelVersion(scope.row,scope.$index)">{{ $t('btn.delete') }}
  1509. </el-button>
  1510. </div>
  1511. </template>
  1512. </el-table-column>
  1513. </el-table>
  1514. <div slot="footer" class="dialog-footer">
  1515. <el-button @click="addFunctional('workContext')" type="primary">{{ $t('tianJiaYiHang') }}</el-button>
  1516. <el-button @click="workContextDig = false" >{{ $t('btn.cancel') }}</el-button>
  1517. <el-button type="primary" @click="submitWorkContext()">{{ $t('btn.determine') }}</el-button>
  1518. </div>
  1519. </el-dialog>
  1520. <!-- 批量增加任务分组 -->
  1521. <!-- <el-dialog :title="'批量增加任务分组'" v-if="addTaskGroupDig" :visible.sync="addTaskGroupDig" width="40%">
  1522. <el-form label-width="20%">
  1523. <el-form-item :label="'分组名称:'">
  1524. <el-input v-model="batchAddTaskGroupName" placeholder="请输入内容"></el-input>
  1525. </el-form-item>
  1526. </el-form>
  1527. <div slot="footer" class="dialog-footer">
  1528. <el-button @click="addTaskGroupDig = false,this.batchAddTaskGroupName=null">{{ $t('btn.cancel') }}</el-button>
  1529. <el-button type="primary" @click="batchAddTaskGroup()">{{ $t('btn.determine') }}</el-button>
  1530. </div>
  1531. </el-dialog> -->
  1532. <!-- 批量设置任务分组负责人 -->
  1533. <el-dialog :title="$t('piLiangSheZhiRenWuFenZuFuZeRen')" v-if="addTaskGroupInchargerDig" :visible.sync="addTaskGroupInchargerDig" width="40%">
  1534. <el-form label-width="20%">
  1535. <el-form-item :label="$t('fenZuMingCheng')">
  1536. <el-select v-model="hasSetGroupName" :placeholder="$t('defaultText.pleaseChoose')">
  1537. <el-option
  1538. v-for="item in hasSetGroupList"
  1539. :key="item.value"
  1540. :label="item.label"
  1541. :value="item.label">
  1542. </el-option>
  1543. </el-select>
  1544. </el-form-item>
  1545. <el-form-item :label="$t('fenZuFuZeRen')">
  1546. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="hasSetGroupInchargerId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 80%" filterable clearable>
  1547. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  1548. <span style="float: left">{{item.name}}</span>
  1549. <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
  1550. </el-option>
  1551. </el-select>
  1552. <selectCat :size="'small'" :widthStr="'272'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="hasSetGroupInchargerId" :distinction="'6'" @selectCal="selectCal"></selectCat>
  1553. </el-form-item>
  1554. </el-form>
  1555. <div slot="footer" class="dialog-footer">
  1556. <el-button @click="addTaskGroupInchargerDig = false,this.hasSetGroupInchargerId=null,this.hasSetGroupName=null">{{ $t('btn.cancel') }}</el-button>
  1557. <el-button type="primary" @click="batchSetGroupIncharger()">{{ $t('btn.determine') }}</el-button>
  1558. </div>
  1559. </el-dialog>
  1560. <!-- 项目同步弹窗 -->
  1561. <el-dialog :title="$t('xiangMuFuWuTongBu')" :visible.sync="syncProjectDig" width="600px" :before-close="handleClose">
  1562. <el-form label-width="0">
  1563. <div class="synchronization">
  1564. <div class="synchronizationLabel">
  1565. <el-select v-model="synchronizationVal" :placeholder="$t('defaultText.pleaseChoose')" @change="synchronizationChange()">
  1566. <el-option :label="$t('yiTongBuXiangMu')" value="0"></el-option>
  1567. <el-option :label="$t('weiTongBuXiangMu')" value="1"></el-option>
  1568. </el-select>
  1569. </div>
  1570. <el-form-item style="flex: 1" v-if="synchronizationVal == 0">
  1571. <el-select filterable collapse-tags clearable v-model="hasChooseProjectCode" multiple :placeholder="$t('defaultText.pleaseChoose')" style="width:100%">
  1572. <el-option v-for="item in allProjectList" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.projectCode">
  1573. <span style="float: right; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
  1574. <span style="float: left;">{{ item.projectName }}</span>
  1575. </el-option>
  1576. </el-select>
  1577. </el-form-item>
  1578. <el-form-item style="flex: 1" v-if="synchronizationVal == 1">
  1579. <el-input :placeholder="$t('Pleaseentertheprojectnumber')" v-model="synchronizationInputVal" clearable></el-input>
  1580. </el-form-item>
  1581. </div>
  1582. </el-form>
  1583. <span slot="footer" class="dialog-footer">
  1584. <el-button @click="syncProjectDig = false">{{ $t('quXiao') }}</el-button>
  1585. <el-button type="primary" @click="syncProjectForThird(hasChooseProjectCode)">{{ $t('startsynchronization') }}</el-button>
  1586. </span>
  1587. </el-dialog>
  1588. <!--导入数据,下载模板 -->
  1589. <el-dialog :title="$t('wdorkplanimport')" v-if="importTaskDialog" :visible.sync="importTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1590. <el-form ref="form4" >
  1591. <el-form-item :label="'1. '+$t('qing-xian-xia-zai-mo-ban-bing-tian-xie-hou-shang-chuan')" >
  1592. <el-link type="primary" :underline="false" href="./upload/多项目任务导入模板.xlsx" download="多项目任务模板.xlsx'">{{ $t('xiaZaiDuoXiangMuRenWuMoBan') }}</el-link>
  1593. </el-form-item>
  1594. </el-form>
  1595. <div slot="footer" class="dialog-footer">
  1596. <el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
  1597. <el-button type="primary" :underline="false" style="width:100%;" :loading="loadingExport">{{ $t('uoloadFiles') }}</el-button>
  1598. </el-upload>
  1599. </div>
  1600. </el-dialog>
  1601. <!-- 新增任务分组弹出框 -->
  1602. <el-dialog v-if="addTaskGroupDig" :visible.sync="addTaskGroupDig" :close-on-click-modal="false" customClass="customWidth" width="600px">
  1603. <div slot="title" >
  1604. <el-tabs v-model="createGroupWay">
  1605. <el-tab-pane :label="$t('newgrouping')" name="new">
  1606. <el-form ref="formGrouping" :model="groupForm" :rules="formGrouping" style="margin-top:40px;">
  1607. <el-form-item prop="name">
  1608. <el-input v-model.trim="groupForm.name" :placeholder="$t('pleaseenteragroupname')" maxlength="50"
  1609. show-word-limit clearable></el-input>
  1610. </el-form-item>
  1611. <el-button type="primary" @click="addGroup('formGrouping')" style="width:100%;" >{{ $t('create') }}</el-button>
  1612. </el-form>
  1613. </el-tab-pane>
  1614. <el-tab-pane :label="$t('creatintemplate')" name="template">
  1615. <el-card :class="`template_box ${t.selected ? 'themeBorderColor' : ''}`" :style="t.selected?'border: 1px solid;':''" v-for="(t,tIndex) in groupTemplateList" :key="t.id" @click.native="choseTemplate(tIndex)">
  1616. <div>
  1617. <el-row >
  1618. <el-col :span="22">
  1619. <div><span>{{t.name}}</span>
  1620. <el-link :underline="false" type="primary" style="color:#aaa;margin-left:10px;"
  1621. @click="setTemplate(t)"><i class="el-icon-setting" v-show="t.isSystem == 0" ></i>
  1622. </el-link>
  1623. <el-link :underline="false" type="primary" style="color:#aaa;margin-left:10px;"
  1624. @click="deleteTemplate(t)"><i class="el-icon-delete" v-show="t.isSystem == 0" ></i>
  1625. </el-link>
  1626. </div>
  1627. <div style="margin-top:10px;">
  1628. <span style="color:#8c8c8c;font-size:12px;" v-for="(s,index) in t.stagesList" :key="s.id">
  1629. <i class="el-icon-arrow-right" v-if="index>0"></i>
  1630. {{s.stagesName}}</span>
  1631. </div>
  1632. </el-col>
  1633. <el-col :span="2">
  1634. <i class="el-icon-check themeFontColor" v-show="t.selected" style="font-size:20px;margin-top:12px;"></i>
  1635. </el-col>
  1636. </el-row>
  1637. </div>
  1638. </el-card>
  1639. <el-button type="primary" @click="addTemplateGroup" style="width:100%;" >{{ $t('create') }}</el-button>
  1640. </el-tab-pane>
  1641. </el-tabs>
  1642. </div>
  1643. <el-dialog :title="$t('bian-ji-mo-ban')" append-to-body v-if="setTemplateDialog" :visible.sync="setTemplateDialog" width="500px">
  1644. <el-form label-width="20%">
  1645. <el-form-item :label="$t('mo-ban-ming-cheng')"><el-input v-model="setTemplateData.name" style="width:80%" clearable></el-input></el-form-item>
  1646. <el-form-item label=""><el-checkbox v-model="setTemplateData.creWithPro">{{ $t('suixiangmuzidongchuangjian') }}</el-checkbox></el-form-item>
  1647. <el-form-item v-for="item,index in setTemplateData.stagesList" :key="item.id" :label="index == 0 ? $t('tasklist') : ''">
  1648. <el-input v-model="item.stagesName" style="width:70%" clearable></el-input>
  1649. <el-link :underline="false" type="primary" style="color:#aaa;" @click="deleteStages(item,index)" v-if="index != 0">
  1650. <i class="el-icon-delete"></i>
  1651. </el-link>
  1652. </el-form-item>
  1653. <el-link style="margin-left:20%" :underline="false" type="primary" @click="addStages()">{{ $t('xin-zeng-ren-wu-lie-biao') }}</el-link>
  1654. </el-form>
  1655. <div slot="footer" class="dialog-footer">
  1656. <el-button type="primary" @click="setTemplateDialog = false">{{ $t('btn.cancel') }}</el-button>
  1657. <el-button type="primary" @click="setTemplateSave()">{{ $t('save') }}</el-button>
  1658. </div>
  1659. </el-dialog>
  1660. </el-dialog>
  1661. <!-- 参与人 -->
  1662. <el-dialog :title="participatorVisibleTitle" :visible.sync="participatorVisible" width="50%" :before-close="handleClose">
  1663. <div>
  1664. <el-link type="primary" style="margin-right:10px;" v-for="(item, index) in participatorValue" :key="index" @click="showUser(item.id)">
  1665. <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
  1666. </el-link>
  1667. </div>
  1668. </el-dialog>
  1669. <!-- 选择人 -->
  1670. <DepartmentSelectionPersonnel :visible="batchProjectTaskParticipantVisible" @changeParticipant="changeTaskParticipantVisible" @submitParticipant="addProjectTaskParticipant"></DepartmentSelectionPersonnel>
  1671. </section>
  1672. </template>
  1673. <style scoped>
  1674. .input-with-select .el-input-group__prepend {
  1675. background-color: #fff;
  1676. }
  1677. .line {
  1678. padding:10px;
  1679. }
  1680. .line span{
  1681. font-size:15px;
  1682. }
  1683. .line span:nth-child(even){
  1684. float:right;
  1685. }
  1686. .kans {
  1687. width: 230px;
  1688. overflow:hidden;
  1689. white-space:nowrap;
  1690. text-overflow: ellipsis;
  1691. }
  1692. a {
  1693. text-decoration: none;
  1694. }
  1695. .router-link-active {
  1696. text-decoration: none;
  1697. }
  1698. </style>
  1699. <script>
  1700. import util from "../../common/js/util";
  1701. import projectgantt from "./project_gantt.vue"
  1702. // 自定义select组件
  1703. import selectCat from "@/components/select.vue"
  1704. import vueCascader from "@/components/cascader.vue"
  1705. import vueCascadeSelection from "@/components/cascadeSelection.vue"
  1706. import DepartmentSelectionPersonnel from "@/components/departmentSelectionPersonnel.vue"
  1707. // 尝试字段
  1708. import selectPersonnel from "@/components/selectPersonnel.vue"
  1709. export default {
  1710. components:{
  1711. projectgantt,
  1712. selectCat,
  1713. vueCascader,
  1714. vueCascadeSelection,
  1715. DepartmentSelectionPersonnel,
  1716. selectPersonnel
  1717. },
  1718. data() {
  1719. return {
  1720. attemptFields: localStorage.getItem('attemptFields'),
  1721. importTaskDialog: false,
  1722. manDaySetting:{},
  1723. projectManDaySettingDialog: false,
  1724. projectListPageComponentKey: 1,
  1725. isDeleting: false,
  1726. forSubProjectlist:[],
  1727. copySubPListVisible: false,
  1728. projectManagerEdit: false,
  1729. canOnlyModParticipator: false,
  1730. curChangeProject:null,
  1731. changeStageDialogVisible: false,
  1732. addFlgmainProjectDialog: false,
  1733. addFlgPanthProjectDialog: false,
  1734. addProjectLevelDialog: false,
  1735. mainProjectList: [],
  1736. mainProjectDialog: false,
  1737. projectLevelDialog: false,
  1738. showImportResult: false,
  1739. importResultMsg:null,
  1740. isganttshow: false,
  1741. deleteAlertMsg: null,
  1742. chosenLeaders:[],
  1743. baseClfList:[],
  1744. chooseLeaderVisible:false,
  1745. projectProfessionItem:null,
  1746. curProfessionRow:null,
  1747. editPpMembDialog:false,
  1748. professionList:[],
  1749. projectProfessionList:[],
  1750. activeName:"baseCostPanel",
  1751. chosenMembCount:0,
  1752. chosenMembList:[],//选中的人员
  1753. allMembData:[],
  1754. auditProcessDialog: false,
  1755. deptMembData: [
  1756. {
  1757. id: 0,
  1758. label: this.$t('lable.unassigned'),
  1759. }
  1760. ],
  1761. option: [],
  1762. depData: {
  1763. id: -1,
  1764. label: this.$t('lable.allStaff'),
  1765. },
  1766. defaultProps: {
  1767. children: 'children',
  1768. label: 'label'
  1769. },
  1770. wxFilterText: '',
  1771. mainProjectId:'',
  1772. filterName:null,
  1773. chooseParticipVisible: false,
  1774. projectBaseCostData:[],
  1775. addBaseItemDialog:false,
  1776. showBaseConfig:false,
  1777. customerList:[],
  1778. roleArray:[this.$t('role.ordinaryEmployees'),this.$t('role.superAdministrator'), this.$t('role.systemAdministrator'), this.$t('role.companyTop'),this.$t('role.financialAdministrator'), this.$t('role.projectManager')],
  1779. status:"1",
  1780. statusTxt:["-",this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone'),this.$t('paused')],
  1781. importanceList:[{id:1,label:this.$t('zheng-chang')},{id:2,label:this.$t('jin-ji')},{id:3,label:this.$t('zhong-yao')},{id:4,label:this.$t('zhong-yao-qie-jin-ji')}],
  1782. importanceListLable:[this.$t('zheng-chang'), this.$t('jin-ji'), this.$t('zhong-yao'), this.$t('zhong-yao-qie-jin-ji'), this.$t('di-feng-xian'), this.$t('zhong-feng-xian'), this.$t('gao-feng-xian')],
  1783. searchField:'1',
  1784. keyword:null,
  1785. user: JSON.parse(sessionStorage.getItem("user")),
  1786. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  1787. userDetailVisible: false,
  1788. userDetail:{},
  1789. date: new Date(),
  1790. users: [],
  1791. participator:[],
  1792. tableHeight: 0,
  1793. listLoading: false,
  1794. total: 0,
  1795. page: 1,
  1796. size: localStorage.getItem("projectPageSize")==null?20:parseInt(localStorage.getItem("projectPageSize")),
  1797. list: [],
  1798. subProjectVisible: false,
  1799. subProjectList: [],//子项目列表
  1800. currentProject:{},
  1801. addSubProject: false,
  1802. addFormVisible: false,
  1803. addLoading: false,
  1804. groupTaskDialog:false,
  1805. addUp: 0, // 合计
  1806. title: "",
  1807. addForm: {
  1808. name: '',
  1809. userId: [],
  1810. level:1,
  1811. bu:'',
  1812. id: '',
  1813. code: '',
  1814. projectDesc: '',
  1815. alarmType: 0
  1816. },
  1817. addFormUserNames: [],
  1818. temaddForm: {},
  1819. rules: {
  1820. name: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
  1821. code: [{ required: true, message: this.$t('qing-shu-ru-bian-hao'), trigger: "blur" }],
  1822. projectStageName: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
  1823. projectLevelName: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
  1824. deptId: [{ required: true, message: this.$t('qingXuanZeSuoShuBuMen'), trigger: "blur" }]
  1825. },
  1826. ause: [],
  1827. auseList: [],
  1828. yonghuUser: [],
  1829. filterText: '',
  1830. filterText2: '',
  1831. showClfDialog: false,
  1832. addClfDialog:false,
  1833. addClf:{name:'',id:''},
  1834. addMainForm:{
  1835. name:'',
  1836. id:'',
  1837. code: '',
  1838. categoryId: ''
  1839. },
  1840. addPanthForm: {
  1841. id: '',
  1842. projectStageName: ''
  1843. },
  1844. addLevelForm: {
  1845. id: '',
  1846. projectStageName: ''
  1847. },
  1848. statusClf:null,
  1849. permissionsObj: {},
  1850. checkedPForSubArr:[],
  1851. checkedProjectArr: [],
  1852. checkedWuduDialog: false,
  1853. checkedWuduArr: [],
  1854. checkoradd: true,
  1855. addGroupPersonBtnLoading: false,
  1856. addGroupPersonDialog: false,
  1857. addGroupList: [],
  1858. addGroupPersonData: {
  1859. group: [],
  1860. person: null,
  1861. personNames: ''
  1862. },
  1863. addGroupPersonPdialog: false,
  1864. showColumnWidth: '300',
  1865. deleteVif: null,
  1866. isAddGroupPerson: true,
  1867. projectMainId: '',
  1868. supplierList: '',
  1869. sortProp: '',
  1870. sortOrder: null,
  1871. currentCell: null, // 当前单击的是哪一个单元格
  1872. phaseList: [],
  1873. phaseProjectId: '', // 阶段项目id
  1874. phaseProjectValie: null, // 阶段项目值
  1875. listHeader: [], // 列表表头
  1876. rowid: '',
  1877. phaseProjectDialog: false, // 项目阶段
  1878. levelList: [], // 项目级别
  1879. departmentList: [],
  1880. deptId: [],
  1881. buOption:[],
  1882. contractAmountOld: 0,
  1883. contractAmountReasonShow: false,
  1884. centerNameDegree: '',
  1885. batchInchargerDialog: false,
  1886. paramInchargerId: '',
  1887. inchagerId: '',
  1888. keyNodesIsShow: false,
  1889. keyNodesList: [],
  1890. projectKeyNodesData: [],
  1891. addBasekeyNodesialog: false,
  1892. addFormkeyNodes: {
  1893. name: ''
  1894. },
  1895. participationId: '',
  1896. importProjectBeforeDialog: false,
  1897. paramData1: false,
  1898. chosenListBackup: [], // 备份
  1899. searchPersonnelFlg: false,
  1900. searchPersonnelFlgnum: 1,
  1901. createDate: [], // 项目筛选时间段
  1902. exportDisabled: false,
  1903. exportNotification: null,
  1904. dataList: [],
  1905. dataListBf: [],
  1906. imgUrlLists: '',
  1907. imgUrlListFlg: false,
  1908. estimatedWorkTime:'',
  1909. projectCategorySubList:[
  1910. {
  1911. value: 1,
  1912. label: this.$t('softwareproject')
  1913. },
  1914. {
  1915. value: 2,
  1916. label: this.$t('hardwareproject')
  1917. },
  1918. {
  1919. value: 3,
  1920. label: this.$t('integrationproject')
  1921. },
  1922. {
  1923. value: 4,
  1924. label: this.$t('fuWuXiangMu')
  1925. }
  1926. ],
  1927. projectCategorySubId:'',
  1928. // 威派格定制(只有管理员才能更改项目名称,编号,级别,合同,大区,经理)
  1929. isShowProjectName: false,
  1930. //职能相关字段
  1931. functionalDivisionDig:false,
  1932. functionalList:[],
  1933. timeTypeList:[
  1934. {
  1935. value: 1,
  1936. label: this.$t('xiangMuGongShi')
  1937. },
  1938. {
  1939. value: 2,
  1940. label: this.$t('feiXiangMuGongShi')
  1941. },
  1942. ],
  1943. roleList:[
  1944. {
  1945. value: 1,
  1946. label: 'CRC&LM'
  1947. },
  1948. {
  1949. value: 2,
  1950. label: 'PM'
  1951. },
  1952. ],
  1953. //工作内容
  1954. workContextDig:false,
  1955. functionalId:null,
  1956. workContextList:[],
  1957. oldValue:null,
  1958. addTaskGroupDig:false,
  1959. batchAddTaskGroupName:null,
  1960. hasSetGroupName:null,
  1961. hasSetGroupInchargerId:null,
  1962. hasSetGroupList:[],
  1963. addTaskGroupInchargerDig:false,
  1964. filterNodePersonnel: [],
  1965. syncProjectDig:false,
  1966. allProjectList:[],
  1967. hasChooseProjectCode:[],
  1968. synchronizationVal: '0',
  1969. synchronizationInputVal: '',
  1970. groupTemplateList:[],
  1971. createGroupWay:'new',
  1972. groupForm:{},
  1973. setTemplateDialog: false,
  1974. selectedGroup:{},
  1975. changeParticipation:false,
  1976. participatorVisible: false,
  1977. participatorValue: [],
  1978. batchChangeStageDialogVisible: false,
  1979. batchChangeStageLoading: false,
  1980. batchProjectTaskParticipantVisible: false,
  1981. batchDepartment: []
  1982. };
  1983. },
  1984. // 过滤器
  1985. filters: {
  1986. numberToCurrency(value) {
  1987. if (!value) return '0.00'
  1988. // 将数值截取,保留两位小数
  1989. value = value.toFixed(2)
  1990. // 获取整数部分
  1991. const intPart = Math.trunc(value)
  1992. // 整数部分处理,增加,
  1993. const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  1994. // 预定义小数部分
  1995. let floatPart = '.00'
  1996. // 将数值截取为小数部分和整数部分
  1997. const valueArray = value.toString().split('.')
  1998. if (valueArray.length === 2) { // 有小数部分
  1999. floatPart = valueArray[1].toString() // 取得小数部分
  2000. return intPartFormat + '.' + floatPart
  2001. }
  2002. return intPartFormat + floatPart
  2003. },
  2004. mobans(value, valueList) {
  2005. for(var i in valueList) {
  2006. if(valueList[i].providerCateGoryName == value) {
  2007. return valueList[i].providerInfoName
  2008. }
  2009. }
  2010. },
  2011. },
  2012. watch: {
  2013. filterText(val) {
  2014. let { userNameNeedTranslate } = JSON.parse(sessionStorage.getItem("user"))
  2015. if(userNameNeedTranslate != 1) {
  2016. this.$refs.chooseMembTree.filter(val);
  2017. }
  2018. if(!val) {
  2019. this.$refs.chooseMembTree.filter(val);
  2020. }
  2021. },
  2022. filterText2(val) {
  2023. this.$refs.chooseMembTree2.filter(val);
  2024. }
  2025. },
  2026. updated () {
  2027. // console.log('执行upload生命周期')
  2028. this.$nextTick(()=>{
  2029. this.$refs.projectlistOfWudulist.doLayout();
  2030. })
  2031. },
  2032. methods: {
  2033. addProjectTaskParticipant(userList) {
  2034. const userIds = userList.map(item => item.id).join(',')
  2035. const projectIds = this.checkedProjectArr.map(a => a.id).join(',')
  2036. this.http.post('/project/batchSetProjectTaskExecutor', {
  2037. userIds, projectIds
  2038. },
  2039. res => {
  2040. if (res.code == "ok") {
  2041. this.getList()
  2042. this.changeTaskParticipantVisible(false);
  2043. } else {
  2044. this.$message({
  2045. message: res.msg,
  2046. type: "error"
  2047. });
  2048. }
  2049. },
  2050. error => {
  2051. this.$message({
  2052. message: error,
  2053. type: "error"
  2054. });
  2055. });
  2056. },
  2057. batchProjectTaskParticipant() {
  2058. if (this.checkedProjectArr.length == 0) {
  2059. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2060. return
  2061. }
  2062. this.changeTaskParticipantVisible(true)
  2063. },
  2064. changeTaskParticipantVisible(flag) {
  2065. this.batchProjectTaskParticipantVisible = flag
  2066. },
  2067. showAllparticipator(item) {
  2068. this.participatorVisibleTitle = item.projectName + ' -- '+this.$t('participantin')
  2069. this.participatorValue = item.participator || []
  2070. this.participatorVisible = true
  2071. },
  2072. // 批量导入任务
  2073. importTask(item) {
  2074. //首先判断文件类型
  2075. this.loadingExport = true
  2076. let str = item.file.name.split(".");
  2077. let format = str[str.length - 1];
  2078. if (format != "xls" && format != "xlsx") {
  2079. this.loadingExport = false
  2080. this.$message({
  2081. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  2082. type: "error"
  2083. });
  2084. } else {
  2085. this.listLoading = true;
  2086. let formData = new FormData();
  2087. formData.append("file", item.file);
  2088. formData.append("isMultiProject", 1);
  2089. this.http.uploadFile('/task/importTask', formData,
  2090. res => {
  2091. this.$refs.upload.clearFiles();
  2092. this.listLoading = false;
  2093. this.loadingExport = false
  2094. if (res.code == "ok") {
  2095. this.$message({
  2096. message: this.$t('other.importSuccess'),
  2097. type: "success"
  2098. });
  2099. this.importTaskDialog = false;
  2100. } else {
  2101. this.$message({
  2102. message: res.msg,
  2103. type: "error"
  2104. });
  2105. }
  2106. },
  2107. error => {
  2108. this.$refs.upload.clearFiles();
  2109. this.listLoading = false;
  2110. this.loadingExport = false
  2111. this.$message({
  2112. message: error,
  2113. type: "error"
  2114. });
  2115. });
  2116. }
  2117. },
  2118. saveProjectManDaySetting() {
  2119. this.http.post('/estimate-time-setting/save', this.manDaySetting,
  2120. res => {
  2121. if (res.code == "ok") {
  2122. this.projectManDaySettingDialog = false;
  2123. } else {
  2124. this.$message({
  2125. message: res.msg,
  2126. type: "error"
  2127. });
  2128. }
  2129. },
  2130. error => {
  2131. this.$message({
  2132. message: error,
  2133. type: "error"
  2134. });
  2135. });
  2136. },
  2137. //获取项目预估工时配置数据
  2138. getManDaySetting() {
  2139. this.http.post('/estimate-time-setting/get', {
  2140. companyId: this.user.companyId
  2141. },
  2142. res => {
  2143. if (res.code == "ok") {
  2144. this.manDaySetting = res.data;
  2145. } else {
  2146. this.$message({
  2147. message: res.msg,
  2148. type: "error"
  2149. });
  2150. }
  2151. },
  2152. error => {
  2153. this.$message({
  2154. message: error,
  2155. type: "error"
  2156. });
  2157. });
  2158. },
  2159. submitCopySubProject() {
  2160. //获取选中的项目
  2161. if (this.checkedPForSubArr.length == 0) {
  2162. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2163. return
  2164. }
  2165. var targetPIds = JSON.stringify(this.checkedPForSubArr.map((a)=>{return a.id}));
  2166. //http post请求提交
  2167. this.http.post('/sub-project/copyToProjects', {
  2168. projectId: this.currentProject.id,
  2169. targetProjectIds: targetPIds,
  2170. },
  2171. res => {
  2172. if (res.code == "ok") {
  2173. this.$message({
  2174. message: this.$t('operationissuccessful'),
  2175. type: "success"
  2176. });
  2177. this.copySubPListVisible = false;
  2178. } else {
  2179. this.$message({
  2180. message: res.msg,
  2181. type: "error"
  2182. });
  2183. }
  2184. },
  2185. error => {
  2186. this.$message({
  2187. message: error,
  2188. type: "error"
  2189. });
  2190. });
  2191. },
  2192. // 批量修改项目阶段
  2193. batchProjectStage() {
  2194. if (this.checkedProjectArr.length == 0) {
  2195. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2196. return
  2197. }
  2198. const projectManagement = this.permissions.projectManagement
  2199. const userId = this.user.id
  2200. const list = this.checkedProjectArr.filter((item) => {
  2201. return item.inchargerId != userId && item.creatorId != userId
  2202. })
  2203. if(!projectManagement && list.length > 0) {
  2204. const promptText = list.map(item => item.projectName)
  2205. this.$message(`${this.$t('other.project')}[${promptText.join(',')}]${this.$t('buShuYuNingDeQuanXianNei')}`)
  2206. return
  2207. }
  2208. this.curChangeProject = { projectId: '', curStageId: '' }
  2209. this.batchChangeStageDialogVisible = true
  2210. },
  2211. editBatchProjectStage() {
  2212. const projectIdList = this.checkedProjectArr.map(a => a.id)
  2213. const stageId = this.curChangeProject.curStageId
  2214. const stage = this.phaseList.find(item => item.id == stageId)
  2215. this.batchChangeStageLoading = true
  2216. this.http.post('/project/batchChangeStage', {
  2217. projectIdArray: JSON.stringify(projectIdList),
  2218. stageId: stageId,
  2219. stageName: stage.projectStageName
  2220. },
  2221. res => {
  2222. this.batchChangeStageLoading = false
  2223. if (res.code == "ok") {
  2224. this.getList()
  2225. this.batchChangeStageDialogVisible = false;
  2226. } else {
  2227. this.$message({
  2228. message: res.msg,
  2229. type: "error"
  2230. });
  2231. }
  2232. },
  2233. error => {
  2234. this.batchChangeStageLoading = false
  2235. this.$message({
  2236. message: error,
  2237. type: "error"
  2238. });
  2239. });
  2240. },
  2241. confirmChangeStage() {
  2242. let currentStageName = ''
  2243. for(var i in this.phaseList) {
  2244. if(this.phaseList[i].id == this.curChangeProject.curStageId) {
  2245. currentStageName = this.phaseList[i].projectStageName
  2246. }
  2247. }
  2248. this.http.post('/project/changeCurrentStage', {
  2249. projectId: this.curChangeProject.projectId,
  2250. currentStageId: this.curChangeProject.curStageId,
  2251. currentStageName: currentStageName
  2252. },
  2253. res => {
  2254. if (res.code == "ok") {
  2255. this.getList()
  2256. this.changeStageDialogVisible = false;
  2257. } else {
  2258. this.$message({
  2259. message: res.msg,
  2260. type: "error"
  2261. });
  2262. }
  2263. },
  2264. error => {
  2265. this.$message({
  2266. message: error,
  2267. type: "error"
  2268. });
  2269. });
  2270. },
  2271. showChangeStageDialog(projectId, curStageId) {
  2272. this.curChangeProject = {projectId: projectId, curStageId: curStageId};
  2273. this.changeStageDialogVisible = true;
  2274. },
  2275. addNewkeyNodes(row) {
  2276. this.addBasekeyNodesialog = true
  2277. if(row) {
  2278. this.addFormkeyNodes = row
  2279. } else {
  2280. this.addFormkeyNodes = {
  2281. name: ''
  2282. }
  2283. }
  2284. },
  2285. // 获取关键节点
  2286. getkeyNodes() {
  2287. this.http.post('/project-key-nodes-setting/list', {},
  2288. res => {
  2289. if (res.code == "ok") {
  2290. // this.keyNodesIsShow = true
  2291. this.keyNodesList = res.data
  2292. } else {
  2293. this.$message({
  2294. message: res.msg,
  2295. type: "error"
  2296. });
  2297. }
  2298. },
  2299. error => {
  2300. this.$message({
  2301. message: error,
  2302. type: "error"
  2303. });
  2304. });
  2305. },
  2306. hoverCall(row) {
  2307. this.rowid=row.id
  2308. },
  2309. handCall() {
  2310. this.rowid = ''
  2311. },
  2312. // 获取阶段
  2313. obtainPhase(item) {
  2314. this.http.post('/project-stage/list', {},
  2315. res => {
  2316. if (res.code == "ok") {
  2317. // this.phaseList = res.data
  2318. this.$set(this, 'phaseList', res.data)
  2319. } else {
  2320. this.$message({
  2321. message: res.msg,
  2322. type: "error"
  2323. });
  2324. }
  2325. },
  2326. error => {
  2327. this.$message({
  2328. message: error,
  2329. type: "error"
  2330. });
  2331. });
  2332. },
  2333. // 获取级别
  2334. getProjectLevel(){
  2335. this.http.post('/project-level/list', {},
  2336. res => {
  2337. if (res.code == "ok") {
  2338. this.levelList = res.data
  2339. // this.$set(this, 'levelList', res.data)
  2340. } else {
  2341. this.$message({
  2342. message: res.msg,
  2343. type: "error"
  2344. });
  2345. }
  2346. },
  2347. error => {
  2348. this.$message({
  2349. message: error,
  2350. type: "error"
  2351. });
  2352. });
  2353. },
  2354. addProjectLevel(row){
  2355. this.addProjectLevelDialog = true
  2356. if(!row) {
  2357. this.addLevelForm = {
  2358. projectLevelName: '',
  2359. id: ''
  2360. // companyId:''
  2361. }
  2362. } else {
  2363. this.addLevelForm = {
  2364. id: row.id,
  2365. projectLevelName: row.projectLevelName
  2366. // companyId: row.companyId
  2367. }
  2368. }
  2369. },
  2370. deleteProjectLevel(row) {
  2371. this.$confirm($t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingprojectlevels'), {
  2372. confirmButtonText: this.$t('btn.determine'),
  2373. cancelButtonText: this.$t('btn.cancel'),
  2374. type: "warning"
  2375. })
  2376. .then(() => {
  2377. this.listLoading = true;
  2378. this.http.post('/project-level/delete',{
  2379. id: row.id
  2380. },
  2381. res => {
  2382. this.listLoading = false;
  2383. if (res.code == "ok") {
  2384. this.$message({
  2385. message: this.$t('message.successfullyDeleted'),
  2386. type: "success"
  2387. });
  2388. this.getProjectLevel();
  2389. } else {
  2390. this.$message({
  2391. message: res.msg,
  2392. type: "error"
  2393. });
  2394. }
  2395. },
  2396. error => {
  2397. this.listLoading = false;
  2398. this.$message({
  2399. message: error,
  2400. type: "error"
  2401. });
  2402. }
  2403. );
  2404. })
  2405. .catch(() => {});
  2406. },
  2407. submitLevelPro(){
  2408. this.http.post('/project-level/addOrMod',this.addLevelForm,
  2409. res => {
  2410. if (res.code == "ok") {
  2411. this.addProjectLevelDialog = false;
  2412. this.getProjectLevel()
  2413. } else {
  2414. this.$message({
  2415. message: res.msg,
  2416. type: "error"
  2417. });
  2418. }
  2419. },
  2420. error => {
  2421. this.$message({
  2422. message: error,
  2423. type: "error"
  2424. });
  2425. }
  2426. );
  2427. },
  2428. // 表格点击
  2429. tableCellClassName({row, column, rowIndex, columnIndex}) {
  2430. row.index=rowIndex;
  2431. column.index=columnIndex;
  2432. },
  2433. // clickCell(row,column) {
  2434. // // console.log('can can need',row,column)
  2435. // this.currentCell = row.index + ',' + column.index;
  2436. // this.phaseProjectValie = row.currentStageId ? row.currentStageId : ''
  2437. // if(this.permissions.projectManagement || this.user.id==row.inchargerId || this.user.id==row.creatorId) {
  2438. // this.phaseProjectId = row.id
  2439. // setTimeout(() => {
  2440. // // 获得焦点
  2441. // this.$refs[row.index + ',' + column.index].focus();
  2442. // })
  2443. // }
  2444. // },
  2445. // selectChange() {
  2446. // let currentStageName = ''
  2447. // for(var i in this.phaseList) {
  2448. // if(this.phaseList[i].id == this.phaseProjectValie) {
  2449. // currentStageName = this.phaseList[i].projectStageName
  2450. // }
  2451. // }
  2452. // this.http.post('/project/changeCurrentStage', {
  2453. // projectId: this.phaseProjectId,
  2454. // currentStageId: this.phaseProjectValie,
  2455. // currentStageName: currentStageName
  2456. // },
  2457. // res => {
  2458. // if (res.code == "ok") {
  2459. // this.getList()
  2460. // } else {
  2461. // this.$message({
  2462. // message: res.msg,
  2463. // type: "error"
  2464. // });
  2465. // }
  2466. // },
  2467. // error => {
  2468. // this.$message({
  2469. // message: error,
  2470. // type: "error"
  2471. // });
  2472. // });
  2473. // },
  2474. // hideSelect() {
  2475. // var that = this
  2476. // setTimeout(() => {
  2477. // that.currentCell = null
  2478. // }, 500)
  2479. // },
  2480. // 点击主项目事件
  2481. projectManagementChange() {
  2482. let categoryId = ''
  2483. for(var i in this.mainProjectList) {
  2484. if(this.mainProjectList[i].id == this.addForm.projectMainId) {
  2485. categoryId = this.mainProjectList[i].categoryId
  2486. }
  2487. }
  2488. categoryId == '' ? '' : this.addForm.category = categoryId
  2489. // console.log(this.addForm)
  2490. },
  2491. tableSort({column, prop, order}){
  2492. if(prop == 'inchargerName' || prop == 'customerName' || prop == 'projectCode' || prop == 'categoryName' || prop == 'projectName' || prop == 'status' || prop == 'currentStage' || prop == 'departmentName' || prop == 'associateDegreeNames'){
  2493. this.sortOrder = order
  2494. this.sortProp = prop
  2495. this.getList()
  2496. }
  2497. },
  2498. fileUpload(file) {
  2499. //首先判断文件类型
  2500. console.log(file)
  2501. let str = file.file.name.split(".");
  2502. let indexLi = file.action
  2503. let format = str[str.length - 1];
  2504. if (format != "jpg" && format != "jpeg" && format != "png") {
  2505. this.$message({
  2506. message: this.$t('qingXuanZeJpgHuoJpegWenJian'),
  2507. type: "error"
  2508. });
  2509. } else {
  2510. let formData = new FormData();
  2511. formData.append("multipartFile", file.file);
  2512. this.http.uploadFile('/common/uploadFile', formData,
  2513. res => {
  2514. if (res.code == "ok") {
  2515. this.dataList[indexLi].valuelist.push(res.data)
  2516. this.$forceUpdate()
  2517. this.$message({
  2518. message: this.$t('uploadedsuccessfully'),
  2519. type: "success"
  2520. });
  2521. } else {
  2522. this.$message({
  2523. message: res.msg,
  2524. type: "error"
  2525. });
  2526. }
  2527. },
  2528. error => {
  2529. this.$message({
  2530. message: error,
  2531. type: "error"
  2532. });
  2533. });
  2534. }
  2535. },
  2536. handleRemove(file, index) {
  2537. let uploadFiles = this.$refs.upload[0].uploadFiles
  2538. for (var i = 0; i < uploadFiles.length; i++) {
  2539. if (uploadFiles[i]['url'] == file.url) {
  2540. uploadFiles.splice(i, 1)
  2541. this.dataList[index].valuelist.splice(i, 1)
  2542. }
  2543. }
  2544. },
  2545. handlePictureCardPreview(file) {
  2546. console.log(file)
  2547. this.imgUrlLists = file.url;
  2548. this.imgUrlListFlg = true;
  2549. // this.$set(this, 'imgUrlListFlg', true)
  2550. // console.log(this.imgUrlListFlg)
  2551. this.$forceUpdate()
  2552. },
  2553. xhutDown(done) {
  2554. this.imgUrlListFlg = false
  2555. done()
  2556. this.$forceUpdate()
  2557. },
  2558. ipts(i, item) {
  2559. this.$forceUpdate()
  2560. },
  2561. getObtain() {
  2562. this.http.post('/project-custom/getProjectCustom', {},
  2563. res => {
  2564. if(res.code == 'ok') {
  2565. var yaunz = []
  2566. for(var i in res.data) {
  2567. if(res.data[i].customType == '1') {
  2568. this.$set(res.data[i], 'value', [])
  2569. this.$set(res.data[i], 'valuelist', [])
  2570. } else {
  2571. this.$set(res.data[i], 'value', '')
  2572. this.$set(res.data[i], 'valuelist', [])
  2573. }
  2574. yaunz.push(res.data[i])
  2575. }
  2576. this.dataList = yaunz
  2577. this.dataListBf = yaunz
  2578. } else {
  2579. this.$message({
  2580. message: error,
  2581. type: "error"
  2582. });
  2583. }
  2584. },
  2585. error => {;
  2586. this.$message({
  2587. message: error,
  2588. type: "error"
  2589. });
  2590. });
  2591. },
  2592. //获取项目列表
  2593. getSupplierList() {
  2594. this.http.post('/provider-info/list', {
  2595. pageIndex: 1,
  2596. // pageSize: 999,
  2597. pageSize: -1,
  2598. keyword: ''
  2599. },
  2600. res => {
  2601. if (res.code == "ok") {
  2602. this.supplierList = res.data.records;
  2603. } else {
  2604. this.$message({
  2605. message: res.msg,
  2606. type: "error"
  2607. });
  2608. }
  2609. },
  2610. error => {
  2611. this.$message({
  2612. message: error,
  2613. type: "error"
  2614. });
  2615. });
  2616. },
  2617. addManPro(row) {
  2618. this.addFlgmainProjectDialog = true
  2619. if(!row) {
  2620. this.addMainForm = {
  2621. name: '',
  2622. id: '',
  2623. code: '',
  2624. categoryId: ''
  2625. }
  2626. } else {
  2627. this.addMainForm = {
  2628. id: row.id,
  2629. code: row.code,
  2630. name: row.name,
  2631. categoryId: row.categoryId,
  2632. }
  2633. }
  2634. },
  2635. addPanthPro(row) {
  2636. this.addFlgPanthProjectDialog = true
  2637. if(!row) {
  2638. this.addPanthForm = {
  2639. projectStageName: '',
  2640. id: '',
  2641. companyId:''
  2642. }
  2643. } else {
  2644. this.addPanthForm = {
  2645. id: row.id,
  2646. projectStageName: row.projectStageName,
  2647. companyId: row.companyId
  2648. }
  2649. }
  2650. },
  2651. // 获取主项目
  2652. getMainProject() {
  2653. this.http.post('/project-main/list',{},res => {
  2654. if(res.code == 'ok'){
  2655. this.mainProjectList = res.data
  2656. }else {
  2657. this.$message({
  2658. message: res.msg,
  2659. type: 'error'
  2660. })
  2661. }
  2662. },err => {
  2663. this.$message({
  2664. message: err,
  2665. type: 'error'
  2666. })
  2667. })
  2668. },
  2669. checkedProlistForSub(e) {
  2670. this.checkedPForSubArr = e;
  2671. },
  2672. // 批量修改自定义维度
  2673. checkedWudulist(e){
  2674. // console.log(e);
  2675. this.checkedProjectArr = e
  2676. },
  2677. batchSetWudulistBtn1(){
  2678. this.$refs.projectlistOfWudulist.clearSelection()
  2679. this.checkedWuduArr = [],
  2680. this.addGroupPersonData = {
  2681. group: null,
  2682. person: null,
  2683. personNames: ''
  2684. }
  2685. },
  2686. batchSetWudulistBtn2(e){
  2687. if(this.checkedProjectArr.length == 0){
  2688. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2689. return
  2690. }
  2691. this.checkoradd = e
  2692. this.checkedWuduDialog = true
  2693. },
  2694. batchSetWudulistBtn3(){
  2695. if(this.checkedWuduArr.length == 0){
  2696. this.$message(this.$t('defaultText.pleaseChoose') + this.user.timeType.customDegreeName)
  2697. return
  2698. }
  2699. let projectIds = []
  2700. for(let i=0; i<this.checkedProjectArr.length; i++){
  2701. projectIds.push(this.checkedProjectArr[i].id)
  2702. }
  2703. let degreeIds = []
  2704. let degreeNames = []
  2705. for(let s=0; s<this.checkedWuduArr.length; s++){
  2706. degreeIds.push(this.checkedWuduArr[s].id)
  2707. degreeNames.push(this.checkedWuduArr[s].name)
  2708. }
  2709. this.http.post('/project/saveBatchAccoDegrees',{
  2710. ids: JSON.stringify(projectIds),
  2711. associateDegrees: degreeIds.toString(),
  2712. associateDegreeNames: degreeNames.toString()
  2713. },res => {
  2714. if(res.code == 'ok'){
  2715. this.checkedWuduDialog = false
  2716. this.batchSetWudulistBtn1()
  2717. this.$message({
  2718. message: this.$t('setupthesuccess'),
  2719. type: 'success'
  2720. })
  2721. this.getList()
  2722. }else {
  2723. this.$message({
  2724. message: res.msg,
  2725. type: 'error'
  2726. })
  2727. }
  2728. },err => {
  2729. this.$message({
  2730. message: err,
  2731. type: 'error'
  2732. })
  2733. })
  2734. },
  2735. batchSetWudulistBtn4(){
  2736. if(this.checkedWuduArr.length == 0){
  2737. this.$message(this.$t('defaultText.pleaseChoose') + this.user.timeType.customDegreeName)
  2738. return
  2739. }
  2740. let projectIds = []
  2741. for(let i=0; i<this.checkedProjectArr.length; i++){
  2742. projectIds.push(this.checkedProjectArr[i].id)
  2743. }
  2744. let degreeIds = []
  2745. let degreeNames = []
  2746. for(let s=0; s<this.checkedWuduArr.length; s++){
  2747. degreeIds.push(this.checkedWuduArr[s].id)
  2748. degreeNames.push(this.checkedWuduArr[s].name)
  2749. }
  2750. this.http.post('/project/addBatchAccoDegrees',{
  2751. ids: JSON.stringify(projectIds),
  2752. associateDegrees: degreeIds.toString(),
  2753. associateDegreeNames: degreeNames.toString()
  2754. },res => {
  2755. if(res.code == 'ok'){
  2756. this.checkedWuduDialog = false
  2757. this.batchSetWudulistBtn1()
  2758. this.$message({
  2759. message: this.$t('addsuccessful'),
  2760. type: 'success'
  2761. })
  2762. this.getList()
  2763. }else {
  2764. this.$message({
  2765. message: res.msg,
  2766. type: 'error'
  2767. })
  2768. }
  2769. },err => {
  2770. this.$message({
  2771. message: err,
  2772. type: 'error'
  2773. })
  2774. })
  2775. },
  2776. isSelectable(row,index){
  2777. if(row.creatorId == this.user.id || row.inchargerId == this.user.id || this.permissions.projectManagement){
  2778. return true
  2779. }else{
  2780. return false
  2781. }
  2782. },
  2783. test(row){
  2784. // console.log(row);
  2785. },
  2786. //批量增加任务分组
  2787. addTaskGroup(){
  2788. if(this.checkedProjectArr.length == 0){
  2789. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2790. return
  2791. }
  2792. this.addTaskGroupDig=true
  2793. },
  2794. // 重新定义了 addGroup 方法
  2795. addGroup(formName) {
  2796. // return
  2797. let proArr = []
  2798. for(let i=0;i<this.checkedProjectArr.length;i++){
  2799. proArr.push(this.checkedProjectArr[i].id)
  2800. }
  2801. this.groupForm={
  2802. ...this.groupForm,
  2803. projectIds:proArr.join(',')
  2804. }
  2805. this.$refs[formName].validate((valid) => {
  2806. if (valid) {
  2807. this.http.post('/task-group/save',this.groupForm,
  2808. res => {
  2809. if (res.code == "ok") {
  2810. this.$message({
  2811. message: this.$t('operationissuccessful'),
  2812. type: "success"
  2813. });
  2814. } else {
  2815. this.$message({
  2816. message: res.msg,
  2817. type: "error"
  2818. });
  2819. }
  2820. },
  2821. error => {
  2822. this.$message({
  2823. message: error,
  2824. type: "error"
  2825. });
  2826. });
  2827. } else {
  2828. console.log('error submit!!');
  2829. return false;
  2830. }
  2831. });
  2832. },
  2833. createGroup() {
  2834. this.addGroupDialog = true;
  2835. this.groupForm = {projectId: this.curProjectId};
  2836. },
  2837. batchAddTaskGroup(){
  2838. if(!this.batchAddTaskGroupName){
  2839. this.$message({
  2840. message: this.$t('qingTianXieFenZuMingCheng'),
  2841. type: 'warning'
  2842. })
  2843. return
  2844. }
  2845. let proArr = []
  2846. for(let i=0;i<this.checkedProjectArr.length;i++){
  2847. proArr.push(this.checkedProjectArr[i].id)
  2848. }
  2849. this.http.post("/task-group/batchSaveTaskGroup",{
  2850. taskGroupName:this.batchAddTaskGroupName,
  2851. projectIds:proArr.join(",")
  2852. },res=>{
  2853. if(res.code == 'ok'){
  2854. this.$message({
  2855. message: this.$t('operationissuccessful'),
  2856. type: 'success'
  2857. })
  2858. this.addTaskGroupDig=false
  2859. this.batchAddTaskGroupName=null
  2860. }else {
  2861. this.$message({
  2862. message: res.msg,
  2863. type: 'error'
  2864. })
  2865. }
  2866. },err=>{
  2867. this.$message({
  2868. message: err,
  2869. type: 'error'
  2870. })
  2871. })
  2872. },
  2873. //批量设置分组负责人
  2874. setGroupIncharger(){
  2875. let proArr = []
  2876. for(let i=0;i<this.checkedProjectArr.length;i++){
  2877. proArr.push(this.checkedProjectArr[i].id)
  2878. }
  2879. if(this.checkedProjectArr.length == 0){
  2880. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2881. return
  2882. }
  2883. this.addTaskGroupInchargerDig=true
  2884. this.http.post("/task-group/getAllHadGroup",{
  2885. projectIds:proArr.join(",")
  2886. },res=>{
  2887. if(res.code == 'ok'){
  2888. this.hasSetGroupList=res.data
  2889. }else {
  2890. this.$message({
  2891. message: res.msg,
  2892. type: 'error'
  2893. })
  2894. }
  2895. },err=>{
  2896. this.$message({
  2897. message: err,
  2898. type: 'error'
  2899. })
  2900. })
  2901. },
  2902. batchSetGroupIncharger(){
  2903. if(!this.hasSetGroupName){
  2904. this.$message({
  2905. message: this.$t('defaultText.pleaseSelectaTaskGroup'),
  2906. type: 'warning'
  2907. })
  2908. return
  2909. }
  2910. if(!this.hasSetGroupInchargerId){
  2911. this.$message({
  2912. message: this.$t('qingXuanZeFenZuFuZeRen'),
  2913. type: 'warning'
  2914. })
  2915. return
  2916. }
  2917. let proArr = []
  2918. for(let i=0;i<this.checkedProjectArr.length;i++){
  2919. proArr.push(this.checkedProjectArr[i].id)
  2920. }
  2921. this.http.post("/task-group/batchSetGroupIncharger",{
  2922. taskGroupName:this.hasSetGroupName,
  2923. projectIds:proArr.join(","),
  2924. inchargerId:this.hasSetGroupInchargerId
  2925. },res=>{
  2926. if(res.code == 'ok'){
  2927. this.$message({
  2928. message: this.$t('operationissuccessful'),
  2929. type: 'success'
  2930. })
  2931. this.addTaskGroupInchargerDig=false
  2932. this.hasSetGroupInchargerId=null
  2933. this.hasSetGroupName=null
  2934. }else {
  2935. this.$message({
  2936. message: res.msg,
  2937. type: 'error'
  2938. })
  2939. }
  2940. },err=>{
  2941. this.$message({
  2942. message: err,
  2943. type: 'error'
  2944. })
  2945. })
  2946. },
  2947. // 批量添加分组参与人员
  2948. addGroupPerson(){
  2949. let proArr = []
  2950. if(this.checkedProjectArr.length == 0){
  2951. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2952. return
  2953. }
  2954. this.addGroupPersonBtnLoading = true
  2955. this.isAddGroupPerson = true
  2956. for(let i=0;i<this.checkedProjectArr.length;i++){
  2957. proArr.push(this.checkedProjectArr[i].id)
  2958. }
  2959. this.http.post('/project/getProjectsGroups',{
  2960. projectIdArray: JSON.stringify(proArr)
  2961. },res => {
  2962. if(res.code == 'ok'){
  2963. // console.log('分组',res.data);
  2964. this.addGroupList = res.data
  2965. this.addGroupPersonBtnLoading = false
  2966. this.addGroupPersonDialog = true
  2967. }else {
  2968. this.$message({
  2969. message: res.msg,
  2970. type: 'error'
  2971. })
  2972. }
  2973. },err => {
  2974. this.$message({
  2975. message: err,
  2976. type: 'error'
  2977. })
  2978. })
  2979. },
  2980. addGroupPersonP(){
  2981. this.filterText2 = ''
  2982. this.chosenMembCount = this.addGroupPersonDataPersonNames && this.addGroupPersonDataPersonNames.length || 0
  2983. this.addGroupPersonPdialog = true
  2984. },
  2985. addPersonCheck(){
  2986. var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  2987. var list = chosenList.filter(item=>item.isUser == 1);
  2988. this.chosenMembCount = list.length;
  2989. // console.log(list);
  2990. },
  2991. addPersonSure(){
  2992. this.addGroupPersonPdialog = false
  2993. let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  2994. let list = chosenList.filter(item=>item.isUser == 1);
  2995. let listIDs = []
  2996. let listNames = ''
  2997. let listNamesList = []
  2998. for(let i=0;i<list.length;i++){
  2999. listIDs.push(list[i].id)
  3000. listNames += list[i].label + ','
  3001. listNamesList.push(list[i].label)
  3002. }
  3003. this.addGroupPersonData.person = listIDs
  3004. this.addGroupPersonData.personNames = listNames
  3005. this.addGroupPersonDataPersonNames = listNamesList
  3006. this.batchDepartment = chosenList.filter(item => !item.isUser).map(item => item.id)
  3007. },
  3008. addGroupPersonSure(){
  3009. if(this.addGroupPersonData.group.length == 0 || this.addGroupPersonData.person == null){
  3010. this.$message({
  3011. message: this.$t('pleaseselectpersonnelasd'),
  3012. type: 'warning'
  3013. })
  3014. return
  3015. }
  3016. let groupList = []
  3017. for(let i=0;i<this.addGroupPersonData.group.length;i++){
  3018. groupList = [...groupList,...this.addGroupPersonData.group[i]]
  3019. }
  3020. this.http.post('/project/batchAddMembToGroup',{
  3021. membIdArray: JSON.stringify(this.addGroupPersonData.person),
  3022. groupIds: JSON.stringify(groupList)
  3023. },res => {
  3024. if(res.code == 'ok'){
  3025. this.addGroupPersonDialog = false,
  3026. this.batchSetWudulistBtn1()
  3027. this.$message({
  3028. message: this.$t('addsuccessful'),
  3029. type: 'success'
  3030. })
  3031. this.getList()
  3032. }else {
  3033. this.$message({
  3034. message: res.msg,
  3035. type: 'error'
  3036. })
  3037. }
  3038. },err => {
  3039. this.$message({
  3040. message: err,
  3041. type: 'error'
  3042. })
  3043. })
  3044. },
  3045. batchDelete(){
  3046. if(this.checkedProjectArr.length == 0){
  3047. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  3048. return
  3049. }
  3050. let proArr = []
  3051. for(let i=0;i<this.checkedProjectArr.length;i++){
  3052. proArr.push(this.checkedProjectArr[i].id)
  3053. // proArr += this.checkedProjectArr[i].id + ','
  3054. }
  3055. this.isDeleting = true;
  3056. // proArr = proArr.substring(0,proArr.length - 1)
  3057. this.http.post('/project/batchDeleteProject',{
  3058. projectIdArray: JSON.stringify(proArr)
  3059. },res => {
  3060. this.isDeleting = false;
  3061. if(res.code == 'ok'){
  3062. this.$message({
  3063. message: this.$t('message.successfullyDeleted'),
  3064. type: 'success'
  3065. })
  3066. this.getList()
  3067. }else {
  3068. this.$message({
  3069. message: res.msg,
  3070. type: 'error'
  3071. })
  3072. }
  3073. },err => {
  3074. this.$message({
  3075. message: err,
  3076. type: 'error'
  3077. })
  3078. })
  3079. },
  3080. // 批量设置项目经理
  3081. batchIncharger(){
  3082. if(this.checkedProjectArr.length == 0){
  3083. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  3084. return
  3085. }
  3086. this.batchInchargerDialog = true
  3087. this.paramInchargerId = ''
  3088. },
  3089. batchInchargerSure(){
  3090. if(!this.paramInchargerId){
  3091. this.$message({
  3092. message: this.$t('pleaseselecttheprojectmanager'),
  3093. type: 'warning'
  3094. })
  3095. return
  3096. }
  3097. let proArr = ''
  3098. for(let i=0;i<this.checkedProjectArr.length;i++){
  3099. // proArr.push(this.checkedProjectArr[i].id)
  3100. proArr += this.checkedProjectArr[i].id + ','
  3101. }
  3102. proArr = proArr.substring(0,proArr.length - 1)
  3103. this.http.post('/project/batchExchangeIncharger',{
  3104. inchargerId: this.paramInchargerId,
  3105. projectIds: proArr
  3106. },res => {
  3107. if(res.code == 'ok'){
  3108. this.batchInchargerDialog = false
  3109. this.$message({
  3110. message: this.$t('setupthesuccess'),
  3111. type: 'success'
  3112. })
  3113. this.getList()
  3114. }else {
  3115. this.$message({
  3116. message: res.msg,
  3117. type: 'error'
  3118. })
  3119. }
  3120. },err => {
  3121. this.$message({
  3122. message: err,
  3123. type: 'error'
  3124. })
  3125. })
  3126. },
  3127. // 批量添加项目参与人
  3128. addProPreson(){
  3129. if(this.checkedProjectArr.length == 0){
  3130. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  3131. return
  3132. }
  3133. this.batchDepartment = []
  3134. this.addGroupPersonDialog = true
  3135. this.isAddGroupPerson = false
  3136. },
  3137. addProPersonSure(){
  3138. if(this.addGroupPersonData.person == null){
  3139. this.$message({
  3140. message: this.$t('pleaseselectpersonnel'),
  3141. type: 'warning'
  3142. })
  3143. return
  3144. }
  3145. let proArr = []
  3146. for(let i=0;i<this.checkedProjectArr.length;i++){
  3147. proArr.push(this.checkedProjectArr[i].id)
  3148. // proArr += this.checkedProjectArr[i].id + ','
  3149. }
  3150. // proArr = proArr.substring(0,proArr.length - 1)
  3151. this.http.post('/project/batchSetParticipation',{
  3152. userIds: JSON.stringify(this.addGroupPersonData.person),
  3153. projectIdArray: JSON.stringify(proArr),
  3154. deptIds: JSON.stringify(this.batchDepartment)
  3155. },res => {
  3156. if(res.code == 'ok'){
  3157. this.addGroupPersonDialog = false,
  3158. this.batchSetWudulistBtn1()
  3159. this.$message({
  3160. message: this.$t('addsuccessful'),
  3161. type: 'success'
  3162. })
  3163. this.getList()
  3164. }else {
  3165. this.$message({
  3166. message: res.msg,
  3167. type: 'error'
  3168. })
  3169. }
  3170. },err => {
  3171. this.$message({
  3172. message: err,
  3173. type: 'error'
  3174. })
  3175. })
  3176. },
  3177. filterNode(value, data) {
  3178. // if (!value) return true;
  3179. // return data.label.indexOf(value) !== -1;
  3180. let { userNameNeedTranslate } = this.user
  3181. console.log(value, data, '《=== 执行')
  3182. if (!value) return true;
  3183. if(userNameNeedTranslate != '1') {
  3184. return data.label.indexOf(value) !== -1;
  3185. } else {
  3186. return this.filterNodePersonnel.some(item => item.includes(data.label))
  3187. }
  3188. },
  3189. //重启项目
  3190. restartPro(row) {
  3191. this.http.post('/project/start',{id: row.id},
  3192. res => {
  3193. if (res.code == "ok") {
  3194. this.$message({
  3195. message: this.$t('restartthesuccess'),
  3196. type: "success"
  3197. });
  3198. row.status = 1;
  3199. } else {
  3200. this.$message({
  3201. message: res.msg,
  3202. type: "error"
  3203. });
  3204. }
  3205. },
  3206. error => {
  3207. this.$message({
  3208. message: error,
  3209. type: "error"
  3210. });
  3211. });
  3212. },
  3213. //撤销项目
  3214. cancelPro(row) {
  3215. this.http.post('/project/cancel',{id: row.id},
  3216. res => {
  3217. if (res.code == "ok") {
  3218. this.$message({
  3219. message: this.$t('Revocationofsuccess'),
  3220. type: "success"
  3221. });
  3222. row.status = 3;
  3223. } else {
  3224. this.$message({
  3225. message: res.msg,
  3226. type: "error"
  3227. });
  3228. }
  3229. },
  3230. error => {
  3231. this.$message({
  3232. message: error,
  3233. type: "error"
  3234. });
  3235. });
  3236. },
  3237. // 暂停项目
  3238. suspendPro(row) {
  3239. this.http.post('/project/suspend',{id: row.id},
  3240. res => {
  3241. if (res.code == "ok") {
  3242. this.$message({
  3243. message: this.$t('suspensionofsuccess'),
  3244. type: "success"
  3245. });
  3246. row.status = 4;
  3247. } else {
  3248. this.$message({
  3249. message: res.msg,
  3250. type: "error"
  3251. });
  3252. }
  3253. },
  3254. error => {
  3255. this.$message({
  3256. message: error,
  3257. type: "error"
  3258. });
  3259. });
  3260. },
  3261. //完成项目
  3262. finishPro(row) {
  3263. this.http.post('/project/finish',{id: row.id},
  3264. res => {
  3265. if (res.code == "ok") {
  3266. this.$message({
  3267. message: this.$t('projectcompletion'),
  3268. type: "success"
  3269. });
  3270. row.status = 2;
  3271. } else {
  3272. this.$message({
  3273. message: res.msg,
  3274. type: "error"
  3275. });
  3276. }
  3277. },
  3278. error => {
  3279. this.$message({
  3280. message: error,
  3281. type: "error"
  3282. });
  3283. });
  3284. },
  3285. exportProjectData() {
  3286. let param = {
  3287. status: this.status,
  3288. }
  3289. if(this.keyword){param.searchField = this.searchField;param.keyword = this.keyword}
  3290. if(this.projectMainId){param.projectMainId = this.projectMainId}
  3291. if(this.statusClf){param.category = this.statusClf}
  3292. if(this.deptId.length){param.deptId = this.deptId[this.deptId.length-1]}
  3293. if(this.inchagerId){param.inchagerId = this.inchagerId}
  3294. if(this.participationId){param.participation = this.participationId}
  3295. this.exportDisabled = true
  3296. this.exportNotification = this.$notify({
  3297. title: this.$t('exportProject'),
  3298. message: this.$t('xiangMuDaoChuZhongQingShaoHou'),
  3299. duration: 0,
  3300. showClose: false
  3301. });
  3302. //导出项目
  3303. this.http.post('/project/exportData',param,
  3304. res => {
  3305. this.exportDisabled = false
  3306. this.exportNotification.close()
  3307. if (res.code == "ok") {
  3308. var filePath = res.data;
  3309. const a = document.createElement('a'); // 创建a标签
  3310. a.setAttribute('download', this.$t('projectexport') + '.xlsx');// download属性
  3311. a.setAttribute('href', filePath);// href链接
  3312. a.click(); //自执行点击事件
  3313. a.remove();
  3314. }
  3315. },
  3316. error => {
  3317. this.exportDisabled = false
  3318. this.exportNotification.close()
  3319. this.$message({
  3320. message: error,
  3321. type: "error"
  3322. });
  3323. }
  3324. );
  3325. },
  3326. // 编辑模板
  3327. setTemplate(t){
  3328. console.log(t);
  3329. this.setTemplateData = t
  3330. this.setTemplateData.needDelete = []
  3331. this.setTemplateDialog = true
  3332. },
  3333. choseTemplate(tIndex) {
  3334. // this.groupTemplateList.forEach((g)=>{
  3335. // g.selected = false;
  3336. // })
  3337. this.sidebarIndex = tIndex
  3338. // this.groupTemplateList[tIndex].selected = true;
  3339. this.groupTemplateList.forEach((g, i)=>{
  3340. if(tIndex == i) {
  3341. g.selected = !g.selected;
  3342. }
  3343. })
  3344. },
  3345. //删除模板
  3346. deleteTemplate(t) {
  3347. var that = this;
  3348. this.$confirm(this.$t('que-ren-yao-shan-chu')+"["+t.name+"]"+this.$t('ma'), this.$t('other.prompts'), {
  3349. //type: 'warning'
  3350. }).then(() => {
  3351. this.http.post('/group-template/deleteTemplate', {id: t.id},
  3352. res => {
  3353. if (res.code == "ok") {
  3354. this.getGroupTemplate();
  3355. this.$message({
  3356. message: this.$t('deletingTemplateSuccessfully'),
  3357. type: "success"
  3358. });
  3359. } else {
  3360. this.$message({
  3361. message: res.msg,
  3362. type: "error"
  3363. });
  3364. }
  3365. }
  3366. );
  3367. });
  3368. },
  3369. //创建模板
  3370. createTemplate() {
  3371. this.saveTemplateLoading = true;
  3372. this.http.post('/group-template/addTemplate', this.templateForm,
  3373. res => {
  3374. this.saveTemplateLoading = false;
  3375. if (res.code == "ok") {
  3376. this.addToTmpDialog = false;
  3377. this.getGroupTemplate();
  3378. this.$message({
  3379. message: this.$t('addTemplateSuccessfully'),
  3380. type: "success"
  3381. });
  3382. } else {
  3383. this.$message({
  3384. message: res.msg,
  3385. type: "error"
  3386. });
  3387. }
  3388. }
  3389. );
  3390. },
  3391. setTemplateSave(){
  3392. if(this.setTemplateData.name == '' || this.setTemplateData.name == null){
  3393. this.$message({
  3394. message: this.$t('mo-ban-ming-cheng-bu-neng-wei-kong'),
  3395. type: 'error'
  3396. })
  3397. return
  3398. }
  3399. for(let i in this.setTemplateData.stagesList){
  3400. if(this.setTemplateData.stagesList[i].stagesName == '' || this.setTemplateData.stagesList[i].stagesName == null){
  3401. this.$message({
  3402. message: this.$t('ren-wu-lie-biao-ming-cheng-bu-neng-wei-kong'),
  3403. type: 'error'
  3404. })
  3405. return
  3406. }
  3407. }
  3408. this.http.post('/task-group/setTemplate',this.setTemplateData,
  3409. res => {
  3410. if(res.code == 'ok'){
  3411. this.$message({
  3412. message: this.$t('message.modifyTheSuccess'),
  3413. type: 'success'
  3414. })
  3415. this.getGroupTemplate()
  3416. this.setTemplateDialog = false
  3417. }else{
  3418. this.$message({
  3419. message: res.msg,
  3420. type: 'error'
  3421. })
  3422. }
  3423. },err => {
  3424. this.$message({
  3425. message: err,
  3426. type: 'error'
  3427. })
  3428. })
  3429. },
  3430. addStages(){
  3431. this.setTemplateData.stagesList.push({
  3432. stagesName: '',
  3433. templateId: this.setTemplateData.id
  3434. })
  3435. },
  3436. deleteStages(item,index){
  3437. this.setTemplateData.needDelete.push(item.id)
  3438. this.setTemplateData.stagesList.splice(index,1)
  3439. console.log('deletestages',item.id);
  3440. },
  3441. exportProjectGroup() {
  3442. //导出项目分组
  3443. this.http.post('/project/exportGroupData',{projectCategorySubId:this.projectCategorySubId},
  3444. res => {
  3445. if (res.code == "ok") {
  3446. var filePath = res.data;
  3447. const a = document.createElement('a'); // 创建a标签
  3448. a.setAttribute('download', this.$t('projecttaskgroupexport') + '.xlsx');// download属性
  3449. a.setAttribute('href', filePath);// href链接
  3450. a.click(); //自执行点击事件
  3451. a.remove();
  3452. }
  3453. },
  3454. error => {
  3455. this.$message({
  3456. message: error,
  3457. type: "error"
  3458. });
  3459. }
  3460. );
  3461. },
  3462. userssHu() {
  3463. this.http.post('/time-type/getCompanyTimeSetting',{
  3464. companyId: this.user.companyId
  3465. },
  3466. res => {
  3467. if (res.code == "ok") {
  3468. this.yonghuUser = res.data
  3469. // console.log(this.yonghuUser)
  3470. }
  3471. },
  3472. error => {
  3473. this.$message({
  3474. message: error,
  3475. type: "error"
  3476. });
  3477. }
  3478. );
  3479. },
  3480. yanjiuzx() {
  3481. this.http.post('/report-extra-degree/getAll ',{},
  3482. res => {
  3483. if (res.code == "ok") {
  3484. // console.log(res, '过来的数据')
  3485. this.ause = res.data
  3486. } else {
  3487. this.$message({
  3488. message: res.msg,
  3489. type: "error"
  3490. });
  3491. }
  3492. },
  3493. error => {
  3494. this.$message({
  3495. message: error,
  3496. type: "error"
  3497. });
  3498. }
  3499. );
  3500. },
  3501. selectPublic() {
  3502. if (this.addForm.isPublic == 1) {
  3503. this.participator = this.users;
  3504. } else {
  3505. this.participator = [];
  3506. }
  3507. },
  3508. addPpMemb() {
  3509. //检查合计比例是否到达100%
  3510. let p = 0;
  3511. let hasNoMemb = false;
  3512. this.curProfessionRow.membList.forEach(m=>{
  3513. p += parseInt(m.percentage);
  3514. //检查人员是否选择
  3515. if (m.membId == null) {
  3516. hasNoMemb = true;
  3517. }
  3518. });
  3519. if (hasNoMemb) {
  3520. this.$message({
  3521. message: this.$t('professionalscannotbeempty'),
  3522. type: "error"
  3523. });
  3524. return;
  3525. }
  3526. //检查人员不能重复
  3527. let hasDuplicate = false;
  3528. this.curProfessionRow.membList.forEach(m=>{
  3529. if (this.curProfessionRow.membList.filter(innerM=>innerM.membId == m.membId).length>1) {
  3530. hasDuplicate = true;
  3531. }
  3532. });
  3533. if (hasDuplicate) {
  3534. this.$message({
  3535. message: this.$t('professionalscannotrepeat'),
  3536. type: "error"
  3537. });
  3538. return;
  3539. }
  3540. if (p != 100) {
  3541. this.$message({
  3542. message: this.$t('totalproportionmust'),
  3543. type: "error"
  3544. });
  3545. return;
  3546. }
  3547. this.editPpMembDialog = false;
  3548. this.curProfessionRow.membList.forEach(m=>{
  3549. m.membName = this.participator.filter(p=>p.id == m.membId)[0].name;
  3550. });
  3551. this.projectProfessionItem.membList = JSON.parse(JSON.stringify(this.curProfessionRow.membList));
  3552. },
  3553. //删除专业人员
  3554. deleteMembItem(index) {
  3555. this.curProfessionRow.membList.splice(index,1);
  3556. },
  3557. //添加专业人员
  3558. addMembItem() {
  3559. if (this.curProfessionRow.membList == null) {
  3560. this.curProfessionRow.membList = [{membId:null, percentage:100}];
  3561. } else {
  3562. let p = 0;
  3563. this.curProfessionRow.membList.forEach(m=>{
  3564. p += parseInt(m.percentage);
  3565. });
  3566. this.curProfessionRow.membList.push({membId:null, percentage:100-p});
  3567. }
  3568. this.$forceUpdate();
  3569. },
  3570. showEditPpMembs(row) {
  3571. this.projectProfessionItem = row;
  3572. this.curProfessionRow = JSON.parse(JSON.stringify(row));
  3573. if (this.curProfessionRow.membList == null || this.curProfessionRow.membList.length == 0) {
  3574. this.curProfessionRow.membList = [{membId:null, percentage:100}];
  3575. }
  3576. this.editPpMembDialog = true;
  3577. },
  3578. getProjectNotifyUserList(projectId) {
  3579. this.http.post("/project-notify-user/get", {projectId: projectId},
  3580. res => {
  3581. if (res.code == "ok") {
  3582. var chosenLeaderIds = [];
  3583. var chosenLeaderNames = '';
  3584. var leaderList = res.data;
  3585. this.chosenLeaders = leaderList;
  3586. for(var j in leaderList) {
  3587. chosenLeaderIds.push(leaderList[j].userId)
  3588. chosenLeaderNames += leaderList[j].userName+',';
  3589. }
  3590. if (chosenLeaderNames.length > 0) {
  3591. chosenLeaderNames = chosenLeaderNames.substring(0, chosenLeaderNames.length -1);
  3592. }
  3593. this.addForm.notifyUserIds = chosenLeaderIds;
  3594. this.addForm.notifyUserNames = chosenLeaderNames;
  3595. } else {
  3596. this.$message({
  3597. message: res.msg,
  3598. type: "error"
  3599. });
  3600. }
  3601. },
  3602. error => {
  3603. this.$message({
  3604. message: error,
  3605. type: "error"
  3606. });
  3607. });
  3608. },
  3609. addTemplateGroup() {
  3610. var param = JSON.parse(JSON.stringify(this.groupTemplateList.filter(g=>g.selected)))
  3611. console.log(param, '你看看啊')
  3612. for(var i in param) {
  3613. delete param[i].stagesList
  3614. }
  3615. if(param.length < 1) {
  3616. this.$message({
  3617. message: this.$t('qngxuanz'),
  3618. type: "error"
  3619. });
  3620. return
  3621. }
  3622. var s = null
  3623. var k = ''
  3624. if (s){
  3625. this.addGroupDialog = false;
  3626. this.$message({
  3627. message: this.$t('projectalreadyhasgroup')+'['+k+'],'+this.$t('changethegroupname'),
  3628. type: "error"
  3629. });
  3630. return
  3631. }
  3632. console.log('将要闯过去的值', param)
  3633. let proArr = []
  3634. for(let i=0;i<this.checkedProjectArr.length;i++){
  3635. proArr.push(this.checkedProjectArr[i].id)
  3636. }
  3637. // return
  3638. // this.http.post('/task-group/createFromTemplate',param,
  3639. this.http.post('/task-group/createFromTemplate',{
  3640. templateJson: JSON.stringify(param),
  3641. projectId: this.curProjectId,
  3642. projectIds:proArr.join(",")
  3643. },
  3644. res => {
  3645. if (res.code == "ok") {
  3646. this.$message({
  3647. message: this.$t('operationissuccessful'),
  3648. type: "success"
  3649. });
  3650. this.addTaskGroupDig = false;
  3651. } else {
  3652. this.$message({
  3653. message: res.msg,
  3654. type: "error"
  3655. });
  3656. }
  3657. },
  3658. error => {
  3659. this.$message({
  3660. message: error,
  3661. type: "error"
  3662. });
  3663. });
  3664. },
  3665. getProjectProfessions(projectId) {
  3666. this.http.post("/project-profession/get", {projectId: projectId},
  3667. res => {
  3668. if (res.code == "ok") {
  3669. this.projectProfessionList = res.data;
  3670. } else {
  3671. this.$message({
  3672. message: res.msg,
  3673. type: "error"
  3674. });
  3675. }
  3676. },
  3677. error => {
  3678. this.$message({
  3679. message: error,
  3680. type: "error"
  3681. });
  3682. });
  3683. },
  3684. checkProjectProfession() {
  3685. //检查合计比例是否到达100%
  3686. let p = 0;
  3687. let hasNoMemb = false;
  3688. let hasNoProfession = false;
  3689. let hasNoMembList = false;
  3690. this.projectProfessionList.forEach(m=>{
  3691. p += parseInt(m.percentage);
  3692. //检查人员是否选择
  3693. if (m.inchargerId == null) {
  3694. hasNoMemb = true;
  3695. }
  3696. if (m.professionId == null) {
  3697. hasNoProfession = true;
  3698. }
  3699. if (m.membList == null) {
  3700. hasNoMembList = true;
  3701. }
  3702. });
  3703. if (hasNoProfession) {
  3704. this.$message({
  3705. message: this.$t('majorcannotbeempty'),
  3706. type: "error"
  3707. });
  3708. return false;
  3709. }
  3710. if (hasNoMembList) {
  3711. this.$message({
  3712. message: this.$t('personnelcannotbeleftblank'),
  3713. type: "error"
  3714. });
  3715. return false;
  3716. }
  3717. if (hasNoMemb) {
  3718. this.$message({
  3719. message: this.$t('leadercannotbeblank'),
  3720. type: "error"
  3721. });
  3722. return false;
  3723. }
  3724. //检查专业不能重复
  3725. let hasDuplicate = false;
  3726. this.projectProfessionList.forEach(m=>{
  3727. if (this.projectProfessionList.filter(innerM=>innerM.professionId == m.professionId).length>1) {
  3728. hasDuplicate = true;
  3729. }
  3730. });
  3731. if (hasDuplicate) {
  3732. this.$message({
  3733. message: this.$t('shouldnotberepeated'),
  3734. type: "error"
  3735. });
  3736. return false;
  3737. }
  3738. if (this.projectProfessionList.length > 0 && p != 100) {
  3739. this.$message({
  3740. message: this.$t('numberomajorsmust'),
  3741. type: "error"
  3742. });
  3743. return false;
  3744. }
  3745. return true;
  3746. },
  3747. //保存项目专业
  3748. saveProjectProfessions(projectId) {
  3749. var list = this.projectProfessionList.filter(p=>p.professionId != null);
  3750. list.forEach(p=>p.inchargerName = this.participator.filter(m=>m.id == p.inchargerId)[0].name);
  3751. list.forEach(p=>p.professionName = this.professionList.filter(m=>m.id == p.professionId)[0].name);
  3752. this.http.post("/project-profession/modify", {projectId: projectId, json: JSON.stringify(list)},
  3753. res => {
  3754. if (res.code == "ok") {
  3755. return false;
  3756. } else {
  3757. this.$message({
  3758. message: res.msg,
  3759. type: "error"
  3760. });
  3761. }
  3762. },
  3763. error => {
  3764. this.$message({
  3765. message: error,
  3766. type: "error"
  3767. });
  3768. });
  3769. },
  3770. //删除项目专业
  3771. deleteItem(index) {
  3772. this.projectProfessionList.splice(index,1);
  3773. },
  3774. //添加项目专业
  3775. addItem() {
  3776. let p = 0;
  3777. this.projectProfessionList.forEach(m=>{
  3778. p += parseInt(m.percentage);
  3779. });
  3780. this.projectProfessionList.push( { professionId:null, inchargerId:null,membIds:[], percentage: 100-p});
  3781. },
  3782. getProfessionList() {
  3783. this.http.post("/profession/getAll", {},
  3784. res => {
  3785. if (res.code == "ok") {
  3786. var list = res.data;
  3787. this.professionList = list;
  3788. } else {
  3789. this.$message({
  3790. message: res.msg,
  3791. type: "error"
  3792. });
  3793. }
  3794. },
  3795. error => {
  3796. this.$message({
  3797. message: error,
  3798. type: "error"
  3799. });
  3800. });
  3801. },
  3802. restrictNumber(targetId) {
  3803. let inpu = document.getElementById(targetId);
  3804. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  3805. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  3806. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g,'').replace('$#*','.');//去除其他"."
  3807. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  3808. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  3809. inpu.value = parseFloat(inpu.value);
  3810. }
  3811. },
  3812. showChooseLeaderTree() {
  3813. this.chosenMembCount = this.chosenLeaders.length;
  3814. this.chooseLeaderVisible = true;
  3815. },
  3816. onLeaderTreeItemChange() {
  3817. var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
  3818. var list = chosenList.filter(item=>item.isUser == 1);
  3819. this.chosenMembCount = list.length;
  3820. },
  3821. showChooseMembTree() {
  3822. this.deptMembData = JSON.parse(JSON.stringify(this.allMembData))
  3823. this.chosenMembCount = this.participator.length;
  3824. this.chooseParticipVisible = true;
  3825. this.filterText = ''
  3826. this.wxFilterText = ''
  3827. if(this.user.userNameNeedTranslate == 1) {
  3828. this.getDepartment()
  3829. }
  3830. let that = this
  3831. setTimeout(()=>{
  3832. that.chosenListBackup = that.$refs.chooseMembTree.getCheckedNodes();
  3833. }, 500)
  3834. console.log(this.chosenListBackup, '备份的数据')
  3835. },
  3836. onTreeItemChange() {
  3837. var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
  3838. var list = chosenList.filter(item=>item.isUser == 1);
  3839. this.chosenMembCount = list.length;
  3840. },
  3841. findUserInTree() {
  3842. if (this.filterName == '') {
  3843. this.deptMembData = this.allMembData;
  3844. } else {
  3845. var list = this.findRecursively(this.filterName, this.allMembData);
  3846. this.deptMembData = list;
  3847. }
  3848. },
  3849. findRecursively(username, list) {
  3850. var filterList = [];
  3851. for (var i=0;i<list.length; i++) {
  3852. if (list[i].isUser == 1) {
  3853. if (list[i].label.indexOf(username) >= 0) {
  3854. //匹配上了
  3855. filterList.push(list[i]);
  3856. }
  3857. } else if (list[i].children != null && list[i].children.length > 0) {
  3858. var subList = this.findRecursively(username, list[i].children);
  3859. if (subList.length > 0) {
  3860. subList.forEach(s=>filterList.push(s));
  3861. }
  3862. }
  3863. }
  3864. return filterList;
  3865. },
  3866. //确定选择参与人
  3867. chooseParticip() {
  3868. var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
  3869. if(this.searchPersonnelFlg) {
  3870. chosenList = [...chosenList, ...this.chosenListBackup]
  3871. }
  3872. this.chosenMembList = chosenList.filter(item=>item.isUser == 1);
  3873. this.addForm.userNames = '';
  3874. this.addFormUserNames = []
  3875. this.addForm.userId = [];
  3876. this.participator = [];
  3877. for (var i=0;i<this.chosenMembList.length; i++) {
  3878. this.addForm.userId.push(this.chosenMembList[i].id);
  3879. this.addForm.userNames += this.chosenMembList[i].label+',';
  3880. this.addFormUserNames.push(this.chosenMembList[i].label)
  3881. var item = {id:this.chosenMembList[i].id, name:this.chosenMembList[i].label};
  3882. this.participator.push(item);
  3883. }
  3884. if (this.addForm.userNames.length > 0) {
  3885. this.addForm.userNames = this.addForm.userNames.substring(0, this.addForm.userNames.length-1);
  3886. // this.addFormUserNames = this.addFormUserNames.substring(0, this.addFormUserNames.length-1);
  3887. }
  3888. console.log(this.addForm.userId)
  3889. console.log(this.addForm.userNames)
  3890. console.log(this.addFormUserNames)
  3891. console.log(chosenList, '<===== chosenList')
  3892. // console.log(parentId)
  3893. // this.addForm.deptIds = [...new Set(chosenList.map(item => item.parentId))].filter(item => item != 0);
  3894. this.addForm.deptIds = chosenList.filter(item => !item.isUser).map(item => item.id);
  3895. console.log(this.addForm.deptIds)
  3896. this.chooseParticipVisible = false;
  3897. },
  3898. //选中相关领导
  3899. // chooseLeader() {
  3900. // this.chooseLeaderVisible = false;
  3901. // var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
  3902. // var chosenMembList = chosenList.filter(item=>item.isUser == 1);
  3903. // this.addForm.notifyUserNames = '';
  3904. // this.addForm.notifyUserIds = [];
  3905. // this.chosenLeaders = [];
  3906. // for (var i=0;i<chosenMembList.length; i++) {
  3907. // this.addForm.notifyUserIds.push(chosenMembList[i].id);
  3908. // this.addForm.notifyUserNames += chosenMembList[i].label+',';
  3909. // var item = {userId:chosenMembList[i].id, userName:chosenMembList[i].label};
  3910. // this.chosenLeaders.push(item);
  3911. // }
  3912. // if (this.addForm.notifyUserNames.length > 0) {
  3913. // this.addForm.notifyUserNames = this.addForm.notifyUserNames.substring(0, this.addForm.notifyUserNames.length-1);
  3914. // }
  3915. // },
  3916. // 获取部门列表
  3917. getDepartment() {
  3918. this.http.post("/department/listAllMemb", {},
  3919. res => {
  3920. if (res.code == "ok") {
  3921. var list = res.data;
  3922. //设置员工到部门下面
  3923. this.setUserToDept(list);
  3924. this.deptMembData = list;
  3925. console.log(this.deptMembData, '看看数据')
  3926. //用于筛选过滤
  3927. this.allMembData = JSON.parse(JSON.stringify(this.deptMembData));
  3928. } else {
  3929. this.$message({
  3930. message: res.msg,
  3931. type: "error"
  3932. });
  3933. }
  3934. },
  3935. error => {
  3936. this.$message({
  3937. message: error,
  3938. type: "error"
  3939. });
  3940. });
  3941. },
  3942. // 获取部门列表
  3943. getDepartment2() {
  3944. this.http.post(
  3945. this.port.manage.depList,{},
  3946. (res) => {
  3947. if (res.code == "ok") {
  3948. var list = res.data
  3949. this.buOption = this.changeArr(JSON.parse(JSON.stringify(list)));
  3950. } else {
  3951. this.$message({
  3952. message: res.msg,
  3953. type: "error",
  3954. });
  3955. }
  3956. },
  3957. (error) => {
  3958. this.$message({
  3959. message: error,
  3960. type: "error",
  3961. });
  3962. }
  3963. );
  3964. },
  3965. // 修改数组
  3966. changeArr(arr) {
  3967. for (var i = 0; i < arr.length; i++) {
  3968. if(arr[i].id != -1 && arr[i].id != 0) {
  3969. // if(arr[i].userList) {
  3970. // if(arr[i].userList.length > 0) {
  3971. // arr[i].children = arr[i].userList
  3972. // }
  3973. // }
  3974. if (arr[i].children != null && arr[i].children.length>0) {
  3975. arr[i].children = this.changeArr(arr[i].children);
  3976. }
  3977. arr[i].id && (arr[i].value = arr[i].id);
  3978. delete arr[i].id;
  3979. }
  3980. }
  3981. for(var i in arr) {
  3982. if(arr[i].id == -1 || arr[i].id == 0) {
  3983. arr.splice(i,1)
  3984. }
  3985. }
  3986. return arr;
  3987. },
  3988. // 企业微信搜索
  3989. echartDepartment() {
  3990. console.log('我点击了搜索')
  3991. if(this.filterText != '') {
  3992. this.http.post("/user/getEmployeeList", {
  3993. keyword: this.filterText,
  3994. cursor: '',
  3995. departmentId: -1,
  3996. pageIndex: 1,
  3997. pageSize: 1000
  3998. },
  3999. res => {
  4000. if (res.code == "ok") {
  4001. this.filterNodePersonnel = res.data.records.map(item => item.name)
  4002. this.$refs.chooseMembTree.filter(this.filterText);
  4003. } else {
  4004. this.$message({
  4005. message: res.msg,
  4006. type: "error"
  4007. });
  4008. }
  4009. },
  4010. error => {
  4011. this.$message({
  4012. message: error,
  4013. type: "error"
  4014. });
  4015. });
  4016. } else {
  4017. this.searchPersonnelFlgnum = +this.searchPersonnelFlgnum +1
  4018. this.searchPersonnelFlg = false
  4019. this.getDepartment()
  4020. }
  4021. },
  4022. setUserToDept(list) {
  4023. for (var i in list) {
  4024. if (list[i].children != null) {
  4025. this.setUserToDept(list[i].children);
  4026. }
  4027. if (list[i].userList != null) {
  4028. if (list[i].children == null) {
  4029. list[i].children = [];
  4030. }
  4031. list[i].userList.forEach(element => {
  4032. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  4033. list[i].children.push(obj);
  4034. });
  4035. }
  4036. }
  4037. },
  4038. // 获取分类条目
  4039. getClfConfigList() {
  4040. this.http.get('/project-category/list',
  4041. res => {
  4042. if (res.code == "ok") {
  4043. this.baseClfList = res.data;
  4044. // console.log("获取分类条目",res.data);
  4045. this.$forceUpdate();
  4046. } else {
  4047. this.$message({
  4048. message: res.msg,
  4049. type: "error"
  4050. });
  4051. }
  4052. },
  4053. error => {
  4054. this.$message({
  4055. message: error,
  4056. type: "error"
  4057. });
  4058. }
  4059. );
  4060. },
  4061. // 新增/编辑 分类条目
  4062. addNewClf(row) {
  4063. this.addClfDialog = true;
  4064. if (row == null) {
  4065. this.addClf = {}
  4066. } else {
  4067. this.addClf = row;
  4068. }
  4069. },
  4070. // 提交
  4071. submitClf() {
  4072. this.addClf.proBuAudit ? this.addClf.proBuAudit =1 : this.addClf.proBuAudit = 0
  4073. this.addClf.proInchargerAudit ? this.addClf.proInchargerAudit = 1 : this.addClf.proInchargerAudit = 0
  4074. this.http.post('/project-category/addOrMod',this.addClf,
  4075. res => {
  4076. if (res.code == "ok") {
  4077. this.addClfDialog = false;
  4078. this.auditProcessDialog=false;
  4079. this.baseClfList = res.data;
  4080. // this.$forceUpdate();
  4081. // console.log(res.data);
  4082. } else {
  4083. this.$message({
  4084. message: res.msg,
  4085. type: "error"
  4086. });
  4087. }
  4088. },
  4089. error => {
  4090. this.$message({
  4091. message: error,
  4092. type: "error"
  4093. });
  4094. }
  4095. );
  4096. },
  4097. // 提交
  4098. submitManPro() {
  4099. this.http.post('/project-main/addOrMod',this.addMainForm,
  4100. res => {
  4101. if (res.code == "ok") {
  4102. this.addFlgmainProjectDialog = false;
  4103. this.getMainProject()
  4104. } else {
  4105. this.$message({
  4106. message: res.msg,
  4107. type: "error"
  4108. });
  4109. }
  4110. },
  4111. error => {
  4112. this.$message({
  4113. message: error,
  4114. type: "error"
  4115. });
  4116. }
  4117. );
  4118. },
  4119. // 分类绑定审核流程设置
  4120. auditProcess(row) {
  4121. this.auditProcessDialog = true;
  4122. row.proBuAudit ? row.proBuAudit = true : row.proBuAudit = false
  4123. row.proInchargerAudit ? row.proInchargerAudit = true : row.proInchargerAudit = false
  4124. if (row == null) {
  4125. this.addClf = {}
  4126. } else {
  4127. this.addClf = row;
  4128. }
  4129. },
  4130. // 提交项目阶段
  4131. submitPanthPro() {
  4132. this.http.post('/project-stage/addOrMod',this.addPanthForm,
  4133. res => {
  4134. if (res.code == "ok") {
  4135. this.addFlgPanthProjectDialog = false;
  4136. this.obtainPhase()
  4137. } else {
  4138. this.$message({
  4139. message: res.msg,
  4140. type: "error"
  4141. });
  4142. }
  4143. },
  4144. error => {
  4145. this.$message({
  4146. message: error,
  4147. type: "error"
  4148. });
  4149. }
  4150. );
  4151. },
  4152. // 删除
  4153. deleteClf(row) {
  4154. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingCategoryEntry'), {
  4155. confirmButtonText: this.$t('btn.determine'),
  4156. cancelButtonText: this.$t('btn.cancel'),
  4157. type: "warning"
  4158. })
  4159. .then(() => {
  4160. this.listLoading = true;
  4161. this.http.post('/project-category/delete',{
  4162. id: row.id
  4163. },
  4164. res => {
  4165. this.listLoading = false;
  4166. if (res.code == "ok") {
  4167. this.$message({
  4168. message: this.$t('message.successfullyDeleted'),
  4169. type: "success"
  4170. });
  4171. this.getClfConfigList();
  4172. } else {
  4173. this.$message({
  4174. message: res.msg,
  4175. type: "error"
  4176. });
  4177. }
  4178. },
  4179. error => {
  4180. this.listLoading = false;
  4181. this.$message({
  4182. message: error,
  4183. type: "error"
  4184. });
  4185. }
  4186. );
  4187. })
  4188. .catch(() => {});
  4189. },
  4190. // 删除主项目
  4191. deleteManPro(row) {
  4192. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletethemainproject'), {
  4193. confirmButtonText: this.$t('btn.determine'),
  4194. cancelButtonText: this.$t('btn.cancel'),
  4195. type: "warning"
  4196. })
  4197. .then(() => {
  4198. this.listLoading = true;
  4199. this.http.post('/project-main/delete',{
  4200. id: row.id
  4201. },
  4202. res => {
  4203. this.listLoading = false;
  4204. if (res.code == "ok") {
  4205. this.$message({
  4206. message: this.$t('message.successfullyDeleted'),
  4207. type: "success"
  4208. });
  4209. this.getMainProject();
  4210. } else {
  4211. this.$message({
  4212. message: res.msg,
  4213. type: "error"
  4214. });
  4215. }
  4216. },
  4217. error => {
  4218. this.listLoading = false;
  4219. this.$message({
  4220. message: error,
  4221. type: "error"
  4222. });
  4223. }
  4224. );
  4225. })
  4226. .catch(() => {});
  4227. },
  4228. // 删除项目阶段
  4229. deletePanthPro(row) {
  4230. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingprojectphases'), {
  4231. confirmButtonText: this.$t('btn.determine'),
  4232. cancelButtonText: this.$t('btn.cancel'),
  4233. type: "warning"
  4234. })
  4235. .then(() => {
  4236. this.listLoading = true;
  4237. this.http.post('/project-stage/delete ',{
  4238. id: row.id
  4239. },
  4240. res => {
  4241. this.listLoading = false;
  4242. if (res.code == "ok") {
  4243. this.$message({
  4244. message: this.$t('message.successfullyDeleted'),
  4245. type: "success"
  4246. });
  4247. this.obtainPhase();
  4248. } else {
  4249. this.$message({
  4250. message: res.msg,
  4251. type: "error"
  4252. });
  4253. }
  4254. },
  4255. error => {
  4256. this.listLoading = false;
  4257. this.$message({
  4258. message: error,
  4259. type: "error"
  4260. });
  4261. }
  4262. );
  4263. })
  4264. .catch(() => {});
  4265. },
  4266. // 分类筛选
  4267. searchClfList(){
  4268. this.page = 1;
  4269. this.getList();
  4270. },
  4271. manageSelect(){
  4272. this.page = 1
  4273. this.getList()
  4274. },
  4275. getProjectBaseConfigList() {
  4276. this.http.post('/project-basecost-setting/list',{},
  4277. res => {
  4278. if (res.code == "ok") {
  4279. this.baseCostItemList = res.data;
  4280. this.$forceUpdate();
  4281. } else {
  4282. this.$message({
  4283. message: res.msg,
  4284. type: "error"
  4285. });
  4286. }
  4287. },
  4288. error => {
  4289. this.$message({
  4290. message: error,
  4291. type: "error"
  4292. });
  4293. }
  4294. );
  4295. },
  4296. deletekeyNodes(row) {
  4297. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingKeyNode'), {
  4298. confirmButtonText: this.$t('btn.determine'),
  4299. cancelButtonText: this.$t('btn.cancel'),
  4300. type: "warning"
  4301. })
  4302. .then(() => {
  4303. this.listLoading = true;
  4304. this.http.post('/project-key-nodes-setting/delete',{
  4305. id: row.id
  4306. },
  4307. res => {
  4308. this.listLoading = false;
  4309. if (res.code == "ok") {
  4310. this.$message({
  4311. message: this.$t('message.successfullyDeleted'),
  4312. type: "success"
  4313. });
  4314. this.getkeyNodes();
  4315. } else {
  4316. this.$message({
  4317. message: res.msg,
  4318. type: "error"
  4319. });
  4320. }
  4321. },
  4322. error => {
  4323. this.listLoading = false;
  4324. this.$message({
  4325. message: error,
  4326. type: "error"
  4327. });
  4328. }
  4329. );
  4330. })
  4331. .catch(() => {});
  4332. },
  4333. syncProjectForThird(hasChooseProjectCode){
  4334. let url=''
  4335. let param={}
  4336. if(this.user.timeType.syncFanwei==1){
  4337. // 美莱德同步项目信息来源泛微
  4338. url='/project/syncProjectWithFanwei'
  4339. }else if(this.user.timeType.syncSap==1){
  4340. // 依斯倍同步项目信息来源SAP
  4341. url='/project/syncProjectWithSap'
  4342. if(hasChooseProjectCode){
  4343. param={
  4344. projectCodes: this.synchronizationVal == '0' ? hasChooseProjectCode.toString() : this.synchronizationInputVal
  4345. }
  4346. }
  4347. }
  4348. this.$confirm(this.$t('queRenTongBuXiangMuShuJu'),this.$t('other.prompts'),{
  4349. confirmButtonText: this.$t('btn.determine'),
  4350. cancelButtonText: this.$t('btn.cancel'),
  4351. type: 'info'
  4352. }).then(()=>{
  4353. const loading = this.$loading({
  4354. lock: true,
  4355. text: this.$t('zhengZaiTongBuZhongQingNaiXinDengDai'),
  4356. spinner: 'el-icon-loading',
  4357. background: 'rgba(0, 0, 0, 0.7)'
  4358. });
  4359. this.http.post(url,param,
  4360. res => {
  4361. loading.close();
  4362. console.log(res, 'res')
  4363. if (res.code == "ok") {
  4364. this.$message({
  4365. message: this.$t('xiangMuTongBuChengGong'),
  4366. type: "success"
  4367. });
  4368. this.syncProjectDig=false
  4369. this.hasChooseProjectCode=[]
  4370. } else {
  4371. this.$message({
  4372. message: res.msg,
  4373. type: "error"
  4374. });
  4375. }
  4376. },
  4377. error => {
  4378. loading.close();
  4379. console.log(error, 'res')
  4380. this.$message({
  4381. message: error,
  4382. type: "error"
  4383. });
  4384. }
  4385. );
  4386. }).catch(() => {
  4387. });
  4388. },
  4389. deleteBaseItem(row) {
  4390. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletethecostbaselineitem'), {
  4391. confirmButtonText: this.$t('btn.determine'),
  4392. cancelButtonText: this.$t('btn.cancel'),
  4393. type: "warning"
  4394. })
  4395. .then(() => {
  4396. this.listLoading = true;
  4397. this.http.post('/project-basecost-setting/delete',{
  4398. id: row.id
  4399. },
  4400. res => {
  4401. this.listLoading = false;
  4402. if (res.code == "ok") {
  4403. this.$message({
  4404. message: this.$t('message.successfullyDeleted'),
  4405. type: "success"
  4406. });
  4407. this.getProjectBaseConfigList();
  4408. } else {
  4409. this.$message({
  4410. message: res.msg,
  4411. type: "error"
  4412. });
  4413. }
  4414. },
  4415. error => {
  4416. this.listLoading = false;
  4417. this.$message({
  4418. message: error,
  4419. type: "error"
  4420. });
  4421. }
  4422. );
  4423. })
  4424. .catch(() => {});
  4425. },
  4426. submitInsertBaseItem() {
  4427. this.http.post('/project-basecost-setting/addOrMod',this.addForm,
  4428. res => {
  4429. if (res.code == "ok") {
  4430. this.addBaseItemDialog = false;
  4431. this.baseCostItemList = res.data;
  4432. this.$forceUpdate();
  4433. } else {
  4434. this.$message({
  4435. message: res.msg,
  4436. type: "error"
  4437. });
  4438. }
  4439. },
  4440. error => {
  4441. this.$message({
  4442. message: error,
  4443. type: "error"
  4444. });
  4445. }
  4446. );
  4447. },
  4448. submitkeyNodes() {
  4449. // console.log(this.addForm, '提交的参数')
  4450. // return
  4451. this.http.post('/project-key-nodes-setting/addOrMod',this.addFormkeyNodes,
  4452. res => {
  4453. if (res.code == "ok") {
  4454. this.addBasekeyNodesialog = false;
  4455. this.keyNodesList = res.data;
  4456. this.$forceUpdate();
  4457. } else {
  4458. this.$message({
  4459. message: res.msg,
  4460. type: "error"
  4461. });
  4462. }
  4463. },
  4464. error => {
  4465. this.$message({
  4466. message: error,
  4467. type: "error"
  4468. });
  4469. }
  4470. );
  4471. },
  4472. showBaseCostItemDialog() {
  4473. this.showBaseConfig = true;
  4474. },
  4475. addNewBaseItem(row) {
  4476. this.addBaseItemDialog = true;
  4477. if (row == null) {
  4478. this.addForm = {alarmType: 0}
  4479. } else {
  4480. this.addForm = JSON.parse(JSON.stringify(row));
  4481. }
  4482. },
  4483. //获取客户列表
  4484. getCustomerList() {
  4485. this.http.post('/customer-info/getAll', {
  4486. },
  4487. res => {
  4488. if (res.code == "ok") {
  4489. this.customerList = res.data;
  4490. } else {
  4491. this.$message({
  4492. message: res.msg,
  4493. type: "error"
  4494. });
  4495. }
  4496. },
  4497. error => {
  4498. this.$message({
  4499. message: error,
  4500. type: "error"
  4501. });
  4502. });
  4503. },
  4504. importProjectBefore(){
  4505. this.paramData1 = false
  4506. this.changeParticipation = false
  4507. this.importProjectBeforeDialog = true
  4508. },
  4509. changeParticipationValue(value){
  4510. this.paramData1=value
  4511. },
  4512. importProject(item) {
  4513. //首先判断文件类型
  4514. let str = item.file.name.split(".");
  4515. let format = str[str.length - 1];
  4516. if (format != "xls" && format != "xlsx") {
  4517. this.$message({
  4518. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  4519. type: "error"
  4520. });
  4521. } else {
  4522. this.listLoading = true;
  4523. let formData = new FormData();
  4524. formData.append("file", item.file);
  4525. formData.append("userId", this.user.id);
  4526. formData.append('key',this.paramData1 ? 1 : 0)
  4527. formData.append('changeParticipation',this.changeParticipation ? 1 : 0)
  4528. this.http.uploadFile('/project/importData', formData,
  4529. res => {
  4530. this.$refs.upload.clearFiles();
  4531. this.listLoading = false;
  4532. if (res.code == "ok") {
  4533. // this.$message({
  4534. // message: res.data,
  4535. // type: "success"
  4536. // },5000);
  4537. //弹窗显示
  4538. this.showImportResult = true;
  4539. this.importProjectBeforeDialog = false
  4540. this.importResultMsg = res.data;
  4541. this.getList();
  4542. } else {
  4543. this.$message({
  4544. message: res.msg,
  4545. type: "error"
  4546. });
  4547. }
  4548. },
  4549. error => {
  4550. this.$refs.upload.clearFiles();
  4551. this.listLoading = false;
  4552. this.$message({
  4553. message: error,
  4554. type: "error"
  4555. });
  4556. });
  4557. }
  4558. },
  4559. number(){
  4560. //     this.addForm.budget = this.addForm.budget.replace(/[^\.\d]/g,'');
  4561. // this.addForm.budget = this.addForm.budget.replace('.','');
  4562. },
  4563. deleteSubPro(subProject) {
  4564. this.$confirm(this.$t('makesuretodeletethesubproject') + subProject.name + this.$t('ma'),this.$t('deletesubproject'), {
  4565. confirmButtonText: this.$t('btn.determine'),
  4566. cancelButtonText: this.$t('btn.cancel'),
  4567. type: "warning"
  4568. })
  4569. .then(() => {
  4570. this.listLoading = true;
  4571. this.http.post('/sub-project/deleteProject',{
  4572. id: subProject.id
  4573. },
  4574. res => {
  4575. this.listLoading = false;
  4576. if (res.code == "ok") {
  4577. this.$message({
  4578. message: this.$t('message.successfullyDeleted'),
  4579. type: "success"
  4580. });
  4581. this.subProject(this.currentProject);
  4582. } else {
  4583. this.$message({
  4584. message: res.msg,
  4585. type: "error"
  4586. });
  4587. }
  4588. },
  4589. error => {
  4590. this.listLoading = false;
  4591. this.$message({
  4592. message: error,
  4593. type: "error"
  4594. });
  4595. }
  4596. );
  4597. })
  4598. .catch(() => {});
  4599. },
  4600. searchList() {
  4601. this.page = 1;
  4602. this.getList();
  4603. },
  4604. addNewSubProject(subProject) {
  4605. if (subProject == null) {
  4606. this.temaddForm = {projectId: this.currentProject.id, level:1}
  4607. } else {
  4608. let aac = JSON.parse(JSON.stringify(subProject))
  4609. aac.status=aac.status==true?1:0
  4610. this.temaddForm = JSON.parse(JSON.stringify(aac));
  4611. }
  4612. this.addSubProject = true;
  4613. },
  4614. //显示子项目
  4615. subProject(item) {
  4616. this.subProjectVisible = true;
  4617. this.currentProject = item;
  4618. this.http.post('/sub-project/list', {
  4619. projectId: item.id
  4620. },
  4621. res => {
  4622. if (res.code == "ok") {
  4623. for(let i = 0; i < res.data.length; i++){
  4624. res.data[i].status=res.data[i].status==1?true:false
  4625. }
  4626. this.subProjectList = res.data
  4627. } else {
  4628. this.$message({
  4629. message: res.msg,
  4630. type: "error"
  4631. });
  4632. }
  4633. },
  4634. error => {
  4635. this.$message({
  4636. message: error,
  4637. type: "error"
  4638. });
  4639. });
  4640. },
  4641. //显示用户详情
  4642. showUser(userId) {
  4643. this.userDetailVisible = true;
  4644. this.http.post(this.port.manage.userDetail, {
  4645. userId: userId
  4646. },
  4647. res => {
  4648. if (res.code == "ok") {
  4649. this.userDetail = res.data;
  4650. } else {
  4651. this.$message({
  4652. message: res.msg,
  4653. type: "error"
  4654. });
  4655. }
  4656. },
  4657. error => {
  4658. this.$message({
  4659. message: error,
  4660. type: "error"
  4661. });
  4662. });
  4663. },
  4664. //选择参与人
  4665. changeParticipator() {
  4666. //检查是否在参与人中,如果没有需要加入到参与人中
  4667. // console.log('addform',this.addForm.userId,this.users);
  4668. this.participator = [];
  4669. this.addForm.userId.forEach(u=>{
  4670. var list = this.users.filter(au=>au.id == u);
  4671. if (list.length > 0) {
  4672. var findUser = list[0];
  4673. this.participator.push(findUser);
  4674. } else {
  4675. // console.log('未找到用户: '+u);
  4676. }
  4677. })
  4678. },
  4679. getUsers() {
  4680. this.http.post('/user/getSimpleActiveUserList', {},
  4681. res => {
  4682. if (res.code == "ok") {
  4683. this.users = res.data;
  4684. } else {
  4685. this.$message({
  4686. message: res.msg,
  4687. type: "error"
  4688. });
  4689. }
  4690. },
  4691. error => {
  4692. this.$message({
  4693. message: error,
  4694. type: "error"
  4695. });
  4696. });
  4697. },
  4698. //分页
  4699. handleCurrentChange(val) {
  4700. this.page = val;
  4701. this.getList();
  4702. },
  4703. handleSizeChange(val) {
  4704. this.size = val;
  4705. localStorage.projectPageSize = this.size;
  4706. this.page = 1
  4707. this.getList();
  4708. },
  4709. participationSelect(){
  4710. this.page = 1
  4711. this.getList()
  4712. },
  4713. //获取项目列表
  4714. getList() {
  4715. localStorage.projectPageIndex = this.page;
  4716. this.listLoading = true;
  4717. let parameter = {
  4718. pageIndex: this.page,
  4719. pageSize: this.size,
  4720. keyword:this.keyword,
  4721. searchField: this.searchField,
  4722. status: this.status,
  4723. category: this.statusClf,
  4724. projectMainId: this.projectMainId,
  4725. inchagerId: this.inchagerId,
  4726. participation: this.participationId,
  4727. }
  4728. if(this.createDate) {
  4729. parameter.startDate = this.createDate[0]
  4730. parameter.endDate = this.createDate[1]
  4731. }
  4732. if(this.sortOrder){
  4733. if(this.sortProp == 'inchargerName'){
  4734. parameter.sortProp = "incharger_id"
  4735. }else if(this.sortProp == 'customerName'){
  4736. parameter.sortProp = "customer_id"
  4737. }else if(this.sortProp == 'projectCode'){
  4738. parameter.sortProp = 'project_code'
  4739. }else if(this.sortProp == 'categoryName'){
  4740. parameter.sortProp = 'category'
  4741. }else if(this.sortProp == 'projectName'){
  4742. parameter.sortProp = 'project_name'
  4743. }else if(this.sortProp == 'status'){
  4744. parameter.sortProp = 'status'
  4745. }else if(this.sortProp == 'currentStage'){
  4746. parameter.sortProp = 'current_stage_name'
  4747. }else if(this.sortProp == 'departmentName'){
  4748. parameter.sortProp = 'dept_id'
  4749. }else if(this.sortProp == 'associateDegreeNames'){
  4750. parameter.sortProp = 'associate_degrees'
  4751. }
  4752. if(this.sortOrder == 'descending'){
  4753. parameter.sortOrder = 0
  4754. }else if(this.sortOrder == 'ascending'){
  4755. parameter.sortOrder = 1
  4756. }
  4757. }
  4758. if(this.deptId.length > 0) {
  4759. parameter.deptId = this.deptId[this.deptId.length - 1]
  4760. } else {
  4761. parameter.deptId = ''
  4762. }
  4763. this.http.post(this.port.project.listPage, parameter,
  4764. res => {
  4765. this.listLoading = false;
  4766. if (res.code == "ok") {
  4767. var list = res.data.records;
  4768. for(var i in list) {
  4769. var participator = list[i].participator , str = "";
  4770. for(var j in participator) {
  4771. if(j == participator.length-1) {
  4772. str += participator[j].name
  4773. } else {
  4774. str += participator[j].name + ','
  4775. }
  4776. }
  4777. list[i].userNames = str;
  4778. }
  4779. this.centerNameDegree = res.data.degrees
  4780. this.showColumnWidth = this.showColumn(list)
  4781. this.list = list;
  4782. this.total = res.data.total;
  4783. // this.$nextTick(()=>{
  4784. // this.$refs.projectlistOfWudulist.doLayout();
  4785. // })
  4786. this.listHeader = res.data.nameList;
  4787. } else {
  4788. this.$message({
  4789. message: res.msg,
  4790. type: "error"
  4791. });
  4792. }
  4793. },
  4794. error => {
  4795. this.listLoading = false;
  4796. this.$message({
  4797. message: error,
  4798. type: "error"
  4799. });
  4800. });
  4801. },
  4802. showColumn(list){
  4803. if(!this.permissions.projectManagement){
  4804. let creat = false
  4805. let incha = false
  4806. for(let i in list){
  4807. if(this.user.id == list[i].creatorId){
  4808. creat = true
  4809. }
  4810. if(this.user.id == list[i].inchargerId){
  4811. incha = true
  4812. }
  4813. }
  4814. if(creat){
  4815. return '300'
  4816. }else {
  4817. if(incha){
  4818. return '210'
  4819. } else if (this.permissions.projectParticipator) {//编辑参与人权限
  4820. return '110'
  4821. } else {
  4822. return '0'
  4823. }
  4824. }
  4825. }else {
  4826. return '300'
  4827. }
  4828. },
  4829. // 合同金额发生改变,需弹出修改原因的输入框
  4830. contractAmountChange(value){
  4831. if(this.contractAmountOld != value){
  4832. this.contractAmountReasonShow = true
  4833. }else{
  4834. this.contractAmountReasonShow = false
  4835. this.addForm.changeContractReason = ''
  4836. }
  4837. },
  4838. //获取分组模板列表
  4839. getGroupTemplate() {
  4840. this.http.post('/group-template/getList',{},
  4841. res => {
  4842. if (res.code == "ok") {
  4843. this.groupTemplateList = res.data;
  4844. this.groupTemplateList[0].selected = true;
  4845. } else {
  4846. this.$message({
  4847. message: res.msg,
  4848. type: "error"
  4849. });
  4850. }
  4851. },
  4852. error => {
  4853. this.$message({
  4854. message: error,
  4855. type: "error"
  4856. });
  4857. });
  4858. },
  4859. // 处理数据
  4860. handleData(data) {
  4861. let arrLists = JSON.parse(JSON.stringify(this.dataListBf))
  4862. var arr = []
  4863. for(var s in arrLists) {
  4864. for(var p in data.plateMap) {
  4865. if(arrLists[s].customName == p && arrLists[s].customType != '1') {
  4866. arrLists[s].value = data.plateMap[p]
  4867. }
  4868. if(arrLists[s].customName == p && arrLists[s].customType == '1' && data.plateMap[p] != null && data.plateMap[p] != ''){
  4869. var sel = data.plateMap[p].split(',')
  4870. var live = []
  4871. for(var dd in sel) {
  4872. var obj = {}
  4873. obj.name = p
  4874. // obj.url = this.pictureAddress + '/upload/' + sel[dd]
  4875. obj.url = '/upload/' + sel[dd]
  4876. live.push(obj)
  4877. }
  4878. console.log('值值hi', this.pictureAddress)
  4879. arrLists[s].value = live
  4880. arrLists[s].valuelist = sel
  4881. }
  4882. }
  4883. }
  4884. this.dataList = arrLists
  4885. console.log(this.form, 9999)
  4886. console.log(this.dataList, 8888)
  4887. this.dialogVisible = true
  4888. },
  4889. //显示新增界面
  4890. handleAdd(i, item) {
  4891. this.canOnlyModParticipator = false;
  4892. this.projectManagerEdit = false
  4893. this.contractAmountReasonShow = false
  4894. if(i == -1) {
  4895. if(this.user.companyId == '936') {
  4896. this.isShowProjectName = false
  4897. }
  4898. this.title = this.$t('newproject');
  4899. this.addForm = {
  4900. name: '',
  4901. isPublic:0,
  4902. userId: [],
  4903. userNames:'',
  4904. code:'',
  4905. inchargerId:null,
  4906. level: this.user.timeType.projectLevelState == 1 ? (this.levelList.length > 0 ? this.levelList[0].id : null) : 1,
  4907. customerId:null,
  4908. notifyUserNames:'',
  4909. chosenLeaders:[],
  4910. category:null,
  4911. creatorId: this.user.id,
  4912. projectMainId: '',
  4913. outputValue: '',
  4914. bu: [],
  4915. manDay:0,
  4916. fromOutside: 0,
  4917. // deptId: []
  4918. deptIds: []
  4919. }
  4920. this.estimatedWorkTime=''
  4921. for(var i in this.dataList) {
  4922. var str = 'plate' + (+i + 1)
  4923. this.$set(this.addForm,str, '')
  4924. }
  4925. if(this.user.timeType.projectWithDept) {
  4926. this.$set(this.addForm, 'deptId', [])
  4927. }
  4928. if(this.user.companyId == '936') {
  4929. this.$set(this.addForm, 'contractCode', '')
  4930. this.$set(this.addForm, 'warrantyStartDate', '')
  4931. this.$set(this.addForm, 'warrantyEndDate', '')
  4932. this.$set(this.addForm, 'projectCategorySub', '')
  4933. this.$set(this.addForm, 'region', '')
  4934. this.$set(this.addForm, 'bu', '')
  4935. }
  4936. if(this.user.timeType.projectManDay){
  4937. this.$set(this.addForm, 'manDay',0)
  4938. this.$set(this.addForm, 'manDayStartDate','')
  4939. }
  4940. // if(this.user.companyId == '428') {
  4941. // this.$set(this.addForm, 'projectCategorySub', '')
  4942. // }
  4943. this.projectBaseCostData = [];
  4944. this.auseList = [];
  4945. for (var m=0;m<this.baseCostItemList.length; m++) {
  4946. this.projectBaseCostData.push({baseId: this.baseCostItemList[m].id, baseName:this.baseCostItemList[m].name, baseAmount:0});
  4947. }
  4948. // 关键节点
  4949. if(this.user.companyId == '936') {
  4950. this.projectKeyNodesData = []
  4951. for (var m=0;m<this.keyNodesList.length; m++) {
  4952. this.projectKeyNodesData.push({nodesId: this.keyNodesList[m].id, nodesName:this.keyNodesList[m].name, planCompleteDate: null, actualCompleteDate: null, states: '0'});
  4953. }
  4954. // console.log(this.projectKeyNodesData, '节点值')
  4955. }
  4956. } else {
  4957. const usersJson = JSON.parse(sessionStorage.getItem("user"))
  4958. if(usersJson.companyId == '936') {
  4959. if(usersJson.roleName != this.$t('role.superAdministrator') && usersJson.roleName != this.$t('role.systemAdministrator')) {
  4960. this.isShowProjectName = true
  4961. } else {
  4962. this.isShowProjectName = false
  4963. }
  4964. }
  4965. this.http.post('/project/detailTwo', {id: item.id},
  4966. res => {
  4967. if (res.code == "ok") {
  4968. this.handleData(res.data)
  4969. this.estimatedWorkTime=res.data.estimatedWorkTime==null?0:res.data.estimatedWorkTime
  4970. this.addForm.estimatedWorkTime=res.data.estimatedWorkTime==null?0:res.data.estimatedWorkTime
  4971. }
  4972. });
  4973. //编辑时,非 (管理全部项目,项目创建人,项目经理),有编辑项目参与人权限的人,可以进行参与人的修改
  4974. if (!(this.permissions.projectManagement || this.user.id==item.inchargerId || this.user.id == item.creatorId) && this.permissions.projectParticipator) {
  4975. this.canOnlyModParticipator = true;
  4976. }
  4977. if(this.permissions.projectManagement || this.user.id == item.creatorId) {
  4978. this.projectManagerEdit = false
  4979. } else {
  4980. this.projectManagerEdit = true
  4981. }
  4982. this.title = this.$t('modifytheproject');
  4983. var list = item.participator;
  4984. if (item.isPublic == 1) {
  4985. list = this.users;
  4986. }
  4987. var arr = [];
  4988. var names = '';
  4989. let namesLiss = [] // 企业微信用到的参与者
  4990. for(var j in list) {
  4991. arr.push(list[j].id)
  4992. names += list[j].name+',';
  4993. namesLiss.push(list[j].name)
  4994. }
  4995. if (names.length > 0) {
  4996. names = names.substring(0, names.length -1);
  4997. }
  4998. this.addFormUserNames = namesLiss
  4999. var listList = JSON.parse(JSON.stringify(item)),
  5000. arrList = [],
  5001. array = [];
  5002. if (listList.deptCascade != "0" && listList.deptCascade != null) {
  5003. if (listList.deptCascade.indexOf(",") > -1) {
  5004. arrList = listList.deptCascade.split(",");
  5005. } else {
  5006. arrList = [].concat(listList.deptCascade);
  5007. }
  5008. }
  5009. for (var i in arrList) {
  5010. array.push(parseInt(arrList[i]));
  5011. }
  5012. let buascaderList = []
  5013. if(item.buId) {
  5014. let buArrList = item.buId.split(',')
  5015. for(var i in buArrList) {
  5016. buArrList[i] = +buArrList[i]
  5017. }
  5018. buascaderList = buArrList
  5019. }
  5020. // console.log(array, '转换', listList)
  5021. this.addForm = {
  5022. id: item.id,
  5023. name: item.projectName,
  5024. isPublic: item.isPublic,
  5025. userId: arr,
  5026. userNames:names,
  5027. code:item.projectCode,
  5028. inchargerId: item.inchargerId,
  5029. reviwerId: item.reviwerId,
  5030. level: item.level,
  5031. planStartDate: item.planStartDate,
  5032. planEndDate: item.planEndDate,
  5033. budget: item.budget,
  5034. baseMan: item.baseMan,
  5035. contractAmount: item.contractAmount,
  5036. baseFee: item.baseFee,
  5037. baseRisk1: item.baseRisk1,
  5038. baseRisk2: item.baseRisk2,
  5039. baseOutsourcing: item.baseOutsourcing,
  5040. customerId:item.customerId==0?null:item.customerId,
  5041. category:item.category,
  5042. projectDesc: item.projectDesc,
  5043. projectMainId: item.projectMainId,
  5044. creatorId: item.creatorId,
  5045. outputValue: item.outputValue,
  5046. // deptId: array.reverse(),
  5047. changeContractReason: '',
  5048. bu: buascaderList,
  5049. manDay:item.manDay==null?0:item.manDay,
  5050. manDayStartDate:item.manDayStartDate,
  5051. manDayDisable:item.manDay,
  5052. fromOutside:item.fromOutside,
  5053. deptIds: (item.departmentList || []).map(item => item.departmentId)
  5054. }
  5055. for(var i in this.dataList) {
  5056. var str = 'plate' + (+i + 1)
  5057. if(this.dataList[i].customType != '1') {
  5058. this.$set(this.addForm,str, this.dataList[i].value==null?'':this.dataList[i].value)
  5059. } else {
  5060. this.$set(this.addForm,str,this.dataList[i].valuelist.join('@'))
  5061. }
  5062. }
  5063. this.contractAmountOld = item.contractAmount ? item.contractAmount : 0
  5064. // console.log(this.addForm, '数据')
  5065. if(this.user.timeType.projectWithDept) {
  5066. this.$set(this.addForm, 'deptId', array.reverse())
  5067. }
  5068. // 判断公司id是否等于936
  5069. if(this.user.companyId == '936') {
  5070. if(item.projectSeparate) {
  5071. this.$set(this.addForm, 'contractCode', item.projectSeparate.contractCode)
  5072. this.$set(this.addForm, 'warrantyStartDate', item.projectSeparate.warrantyStartDate)
  5073. this.$set(this.addForm, 'warrantyEndDate', item.projectSeparate.warrantyEndDate)
  5074. this.$set(this.addForm, 'projectCategorySub', item.projectSeparate.projectCategorySub)
  5075. this.$set(this.addForm, 'region', item.projectSeparate.region)
  5076. this.$set(this.addForm, 'bu', item.projectSeparate.bu)
  5077. } else {
  5078. this.$set(this.addForm, 'contractCode', '')
  5079. this.$set(this.addForm, 'warrantyStartDate', '')
  5080. this.$set(this.addForm, 'warrantyEndDate', '')
  5081. this.$set(this.addForm, 'projectCategorySub', '')
  5082. this.$set(this.addForm, 'region', '')
  5083. this.$set(this.addForm, 'bu', '')
  5084. }
  5085. }
  5086. console.log(111111)
  5087. // 判断是否有供应商
  5088. if(this.user.company.packageProvider) {
  5089. if(item.providerIds) {
  5090. let arr = []
  5091. let zhhi = item.providerIds.split(',')
  5092. for(let i in zhhi) {
  5093. arr.push(+zhhi[i] + 0)
  5094. }
  5095. this.$set(this.addForm, 'supplierId', arr)
  5096. } else {
  5097. this.$set(this.addForm, 'supplierId', [])
  5098. }
  5099. }
  5100. // 判断是否有供应商结尾
  5101. this.deleteVif = item.creatorId
  5102. if(item.associateDegrees != null && item.associateDegrees != 'null' && item.associateDegrees != '') {
  5103. var spli = item.associateDegrees.split(',')
  5104. var sl = []
  5105. for(var i in spli) {
  5106. var num = +spli[i] + 0
  5107. sl.push(num)
  5108. }
  5109. this.auseList = sl
  5110. } else {
  5111. this.auseList = []
  5112. }
  5113. this.changeParticipator();
  5114. this.getProjectBaseData(item.id);
  5115. this.getProjectKeyNodeData(item.id)
  5116. if (this.user.company.packageEngineering == 1) {
  5117. this.getProjectProfessions(item.id);
  5118. }
  5119. //获取审核人
  5120. this.getProjectAutorList(item.id);
  5121. if (this.user.timeType.reportCc == 1) {
  5122. this.getProjectCcUserList(item.id);
  5123. }
  5124. }
  5125. this.addFormVisible = true;
  5126. if (this.user.timeType.projectManDay == 1) {
  5127. this.getManDaySetting();
  5128. }
  5129. if (this.user.company.packageEngineering == 1) {
  5130. if (this.professionList.length == 0) {
  5131. this.getProfessionList();
  5132. }
  5133. }
  5134. },
  5135. //获取项目日报抄送人
  5136. getProjectCcUserList(projectId) {
  5137. this.http.post('/project-ccuser/getList',{projectId: projectId},
  5138. res => {
  5139. if (res.code == "ok") {
  5140. this.addForm.ccUserIds = res.data.map(function(item) {
  5141. return item.userId;
  5142. });
  5143. this.$forceUpdate()
  5144. } else {
  5145. this.$message({
  5146. message: res.msg,
  5147. type: "error"
  5148. });
  5149. }
  5150. },
  5151. error => {
  5152. this.listLoading = false;
  5153. this.$message({
  5154. message: error,
  5155. type: "error"
  5156. });
  5157. }
  5158. );
  5159. },
  5160. //获取项目审核人
  5161. getProjectAutorList(projectId) {
  5162. this.http.post('/project-auditor/getList',{projectId: projectId},
  5163. res => {
  5164. if (res.code == "ok") {
  5165. if (this.user.timeType.reportAuditType == 6 || this.user.timeType.reportAuditType == 9) {
  5166. //单个日报审核人,单选
  5167. var arr = res.data.map(function(item) {
  5168. return item.auditorId;
  5169. });
  5170. if (arr.length > 0) {
  5171. this.addForm.auditUserIds = arr[0];
  5172. } else {
  5173. this.addForm.auditUserIds = null;
  5174. }
  5175. } else {
  5176. this.addForm.auditUserIds = res.data.map(function(item) {
  5177. return item.auditorId;
  5178. });
  5179. }
  5180. this.$forceUpdate()
  5181. } else {
  5182. this.$message({
  5183. message: res.msg,
  5184. type: "error"
  5185. });
  5186. }
  5187. },
  5188. error => {
  5189. this.listLoading = false;
  5190. this.$message({
  5191. message: error,
  5192. type: "error"
  5193. });
  5194. }
  5195. );
  5196. },
  5197. getProjectBaseData(projectId) {
  5198. this.http.post('/project-basecost/get',{projectId: projectId},
  5199. res => {
  5200. if (res.code == "ok") {
  5201. this.projectBaseCostData = res.data;
  5202. } else {
  5203. this.$message({
  5204. message: res.msg,
  5205. type: "error"
  5206. });
  5207. }
  5208. },
  5209. error => {
  5210. this.listLoading = false;
  5211. this.$message({
  5212. message: error,
  5213. type: "error"
  5214. });
  5215. }
  5216. );
  5217. },
  5218. getProjectKeyNodeData(projectId) {
  5219. this.http.post('/project-key-nodes/get',{projectId: projectId},
  5220. res => {
  5221. if (res.code == "ok") {
  5222. this.projectKeyNodesData = res.data;
  5223. } else {
  5224. this.$message({
  5225. message: res.msg,
  5226. type: "error"
  5227. });
  5228. }
  5229. },
  5230. error => {
  5231. this.listLoading = false;
  5232. this.$message({
  5233. message: error,
  5234. type: "error"
  5235. });
  5236. }
  5237. );
  5238. },
  5239. //提交子项目创建修改请求
  5240. submitInsertSubProject () {
  5241. this.$refs.form2.validate(valid => {
  5242. if (valid) {
  5243. this.http.post('/sub-project/saveOrUpdate',this.temaddForm,
  5244. res => {
  5245. if (res.code == "ok") {
  5246. this.$message({
  5247. message: this.$t('operationissuccessful'),
  5248. type: "success"
  5249. });
  5250. this.subProject(this.currentProject);
  5251. this.addSubProject = false;
  5252. } else {
  5253. this.$message({
  5254. message: res.msg,
  5255. type: "error"
  5256. });
  5257. }
  5258. },
  5259. error => {
  5260. this.listLoading = false;
  5261. this.$message({
  5262. message: error,
  5263. type: "error"
  5264. });
  5265. }
  5266. );
  5267. }
  5268. });
  5269. },
  5270. // 项目基线合计
  5271. addUpfun() {
  5272. var total = 0;
  5273. for (var i=0;i<this.projectBaseCostData.length; i++) {
  5274. if (this.projectBaseCostData[i].baseAmount) {
  5275. total += parseFloat(this.projectBaseCostData[i].baseAmount);
  5276. }
  5277. }
  5278. this.addForm.budget = total;
  5279. // var a = '0'
  5280. // var q = '0'
  5281. // var w = '0'
  5282. // var e = '0'
  5283. // var r = '0'
  5284. // // this.addForm.baseMan === undefined || this.addForm.baseMan === NaN ? this.addForm.baseMa = '0' : this.addForm.baseMan
  5285. // if (this.addForm.baseMan == undefined || this.addForm.baseMan == NaN) {
  5286. // a = 0
  5287. // } else {
  5288. // a = this.addForm.baseMan
  5289. // }
  5290. // if (this.addForm.baseFee !== undefined) q = this.addForm.baseFee
  5291. // if (this.addForm.baseOutsourcing !== undefined) w = this.addForm.baseOutsourcing
  5292. // if (this.addForm.baseRisk1 !== undefined) e = this.addForm.baseRisk1
  5293. // if (this.addForm.baseRisk2 !== undefined) r = this.addForm.baseRisk2
  5294. // this.addForm.budget = +a + +q + +w + +e + +r
  5295. },
  5296. submitInsert() {
  5297. this.$refs.form1.validate(valid => {
  5298. if (valid) {
  5299. if (this.user.company.packageEngineering == 1) {
  5300. if (!this.checkProjectProfession()) {//检查不通过,直接返回
  5301. return;
  5302. }
  5303. }
  5304. this.addLoading = true;
  5305. let formData = new FormData();
  5306. formData.append("name", this.addForm.name);
  5307. if(this.addForm.projectDesc != null) {
  5308. formData.append("projectDesc", this.addForm.projectDesc);
  5309. }
  5310. if(this.addForm.id != null) {
  5311. formData.append("id", this.addForm.id);
  5312. }
  5313. if(this.addForm.isPublic != null) {
  5314. formData.append("isPublic", this.addForm.isPublic);
  5315. }
  5316. if(this.addForm.userId.length != 0 && this.addForm.isPublic == 0) {
  5317. for(var j in this.addForm.userId) {
  5318. formData.append("userId", this.addForm.userId[j]);
  5319. }
  5320. }
  5321. if(this.addForm.inchargerId != null) {
  5322. formData.append("inchargerId", this.addForm.inchargerId);
  5323. }
  5324. if(this.addForm.code != null) {
  5325. formData.append("code", this.addForm.code);
  5326. }
  5327. if(this.addForm.planStartDate != null) {
  5328. formData.append("planStartDate", this.addForm.planStartDate);
  5329. }
  5330. if(this.addForm.planEndDate != null) {
  5331. formData.append("planEndDate", this.addForm.planEndDate);
  5332. }
  5333. if(this.addForm.level != null) {
  5334. formData.append("level", this.addForm.level);
  5335. }
  5336. if(this.addForm.contractAmount != null) {
  5337. formData.append("contractAmount", this.addForm.contractAmount);
  5338. }
  5339. if(this.contractAmountReasonShow){
  5340. formData.append("changeContractReason", this.addForm.changeContractReason);
  5341. }
  5342. if (this.projectBaseCostData != null) {
  5343. formData.append("projectBaseCostData", JSON.stringify(this.projectBaseCostData));
  5344. //计算总预算成本
  5345. if (this.addForm.budget == null) {
  5346. this.addForm.budget = 0;
  5347. }
  5348. formData.append("budget", this.addForm.budget);
  5349. }
  5350. if (this.addForm.customerId == null) {
  5351. formData.append("customerId", 0);
  5352. } else {
  5353. formData.append("customerId", this.addForm.customerId);
  5354. }
  5355. if (this.addForm.contractAmount) {
  5356. formData.append("contractAmount", this.addForm.contractAmount);
  5357. } else {
  5358. formData.append("contractAmount", 0);
  5359. }
  5360. if (this.chosenLeaders != null && this.chosenLeaders.length > 0) {
  5361. formData.append("chosenLeaders", JSON.stringify(this.chosenLeaders));
  5362. }
  5363. if (this.user.timeType.outputValueStatus == 1){
  5364. formData.append("outputValue",this.addForm.outputValue ? this.addForm.outputValue : 0)
  5365. }
  5366. var listId = []
  5367. var listName = []
  5368. for(var i in this.auseList) {
  5369. for(var j in this.ause) {
  5370. if(this.auseList[i] == this.ause[j].id) {
  5371. listId.push(this.ause[j].id);
  5372. listName.push(this.ause[j].name);
  5373. break;
  5374. }
  5375. }
  5376. }
  5377. listId.toString()
  5378. listName.toString()
  5379. formData.append("associateDegrees", listId)
  5380. formData.append("associateDegreeNames", listName)
  5381. //日报审核人
  5382. if (this.addForm.auditUserIds) {
  5383. if (this.user.timeType.reportAuditType == 6 || this.user.timeType.reportAuditType == 9) {
  5384. formData.append("auditUserIds", this.addForm.auditUserIds);
  5385. } else {
  5386. formData.append("auditUserIds", JSON.stringify(this.addForm.auditUserIds));
  5387. }
  5388. }
  5389. //日报抄送人
  5390. if (this.addForm.ccUserIds) {
  5391. formData.append("ccUserIds", JSON.stringify(this.addForm.ccUserIds));
  5392. }
  5393. if(this.addForm.category != null) {
  5394. formData.append("category", this.addForm.category);
  5395. }
  5396. if(this.user.timeType.mainProjectState == '1' && this.addForm.projectMainId) {
  5397. formData.append("projectMainId", this.addForm.projectMainId);
  5398. }
  5399. // 提交供应商
  5400. // 线判断是否有供应商
  5401. if(this.user.company.packageProvider) {
  5402. let suppStrName = []
  5403. for(let is in this.addForm.supplierId) {
  5404. for(let js in this.supplierList) {
  5405. if(this.addForm.supplierId[is] == this.supplierList[js].id) {
  5406. suppStrName.push(this.supplierList[js].providerName)
  5407. }
  5408. }
  5409. }
  5410. formData.append("providerNames", suppStrName.toString());
  5411. formData.append("providerIds", this.addForm.supplierId.toString());
  5412. }
  5413. // 判断公司id是否等于 936
  5414. if(this.user.companyId == '936') {
  5415. formData.append("contractCode", this.addForm.contractCode ? this.addForm.contractCode : '');
  5416. formData.append("warrantyStartDate", this.addForm.warrantyStartDate ? this.addForm.warrantyStartDate : '');
  5417. formData.append("warrantyEndDate", this.addForm.warrantyEndDate ? this.addForm.warrantyEndDate : '');
  5418. formData.append("projectCategorySub", this.addForm.projectCategorySub ? this.addForm.projectCategorySub : '');
  5419. formData.append("region", this.addForm.region ? this.addForm.region : '');
  5420. // 关键节点
  5421. formData.append("projectKeyNodesData", JSON.stringify(this.projectKeyNodesData));
  5422. }
  5423. // if(this.user.companyId == '428') {
  5424. // formData.append("projectCategorySub", this.addForm.projectCategorySub ? this.addForm.projectCategorySub : '');
  5425. // }
  5426. if(this.user.timeType.projectWithDept) {
  5427. if(this.addForm.deptId != null && this.addForm.deptId != '') {
  5428. // formData.append("deptId", this.addForm.deptId[this.addForm.deptId.length - 1])
  5429. if(Array.isArray(this.addForm.deptId)) {
  5430. formData.append("deptId", this.addForm.deptId[this.addForm.deptId.length - 1])
  5431. } else {
  5432. formData.append("deptId", this.addForm.deptId)
  5433. }
  5434. }
  5435. }
  5436. formData.append("buId", this.addForm.bu ? this.addForm.bu : '');
  5437. if(this.user.timeType.projectManDay){
  5438. //检验预估人天的必填属性
  5439. if (this.manDaySetting.projectManDayFillMode == 2 || (this.manDaySetting.projectManDayFillMode == 1 && this.addForm.fromOutside == 0)) {
  5440. if (!this.addForm.manDay) {
  5441. this.$message({
  5442. message: this.$t('yuGuGongShiBuNengWei_0'),
  5443. type: "error"
  5444. });
  5445. this.addLoading = false;
  5446. return;
  5447. }
  5448. }
  5449. formData.append("manDay", this.addForm.manDay ? this.addForm.manDay : '');
  5450. formData.append("manDayStartDate", this.addForm.manDayStartDate ? this.addForm.manDayStartDate : '');
  5451. }
  5452. for(var i in this.dataList) {
  5453. var str = 'plate' + (+i + 1)
  5454. if(this.dataList[i].customType != '1') {
  5455. formData.append(str,this.dataList[i].value==null?'':this.dataList[i].value);
  5456. } else {
  5457. formData.append(str,this.dataList[i].valuelist.join('@'));
  5458. }
  5459. }
  5460. //复核人
  5461. if (this.addForm.reviwerId) {
  5462. formData.append('reviwerId', this.addForm.reviwerId);
  5463. }
  5464. const deptListNew = this.addForm.deptIds.filter(item => item)
  5465. formData.append('deptIds', deptListNew.join(','))
  5466. this.http.uploadFile(this.port.project.add,formData,
  5467. res => {
  5468. this.addLoading = false;
  5469. if (res.code == "ok") {
  5470. this.$message({
  5471. message: (this.addForm.id!=null?this.$t('xiu-gai'):this.$t('create'))+this.$t('other.successful'),
  5472. type: "success"
  5473. });
  5474. this.addFormVisible = false;
  5475. this.getList();
  5476. if (this.user.company.packageEngineering == 1) {
  5477. this.saveProjectProfessions(res.data);
  5478. }
  5479. } else {
  5480. this.$message({
  5481. message: res.msg,
  5482. type: "error"
  5483. });
  5484. }
  5485. },
  5486. error => {
  5487. this.addLoading = false;
  5488. this.$message({
  5489. message: error,
  5490. type: "error"
  5491. });
  5492. });
  5493. }
  5494. });
  5495. },
  5496. cascaderChange(e) {
  5497. // console.log(e)
  5498. // console.log(this.addForm)
  5499. // if(e.length )
  5500. // console.log(e)
  5501. },
  5502. // 删除
  5503. deletePro(i, item) {
  5504. this.$confirm(this.$t('makesuretodeletetheitem')+"[" + item.name + "]"+this.$t('ma'),this.$t('deletetheproject'), {
  5505. confirmButtonText: this.$t('btn.determine'),
  5506. cancelButtonText: this.$t('btn.cancel'),
  5507. type: "warning"
  5508. })
  5509. .then(() => {
  5510. this.listLoading = true;
  5511. this.http.post(this.port.project.delete,{
  5512. id: item.id
  5513. },
  5514. res => {
  5515. this.listLoading = false;
  5516. if (res.code == "ok") {
  5517. this.$message({
  5518. message: this.$t('message.successfullyDeleted'),
  5519. type: "success"
  5520. });
  5521. this.getList();
  5522. this.addFormVisible = false
  5523. } else if (res.code == 'reconfirm') {
  5524. this.deleteAlertMsg = res.msg;
  5525. this.forceDeletePro(item.id);
  5526. } else {
  5527. this.$message({
  5528. message: res.msg,
  5529. type: "error"
  5530. });
  5531. }
  5532. },
  5533. error => {
  5534. this.listLoading = false;
  5535. this.$message({
  5536. message: error,
  5537. type: "error"
  5538. });
  5539. }
  5540. );
  5541. })
  5542. .catch(() => {});
  5543. },
  5544. // 模板下载
  5545. downloadmb(){
  5546. this.http.post('/project/getTemplate',{
  5547. companyId: this.user.companyId
  5548. },res => {
  5549. if(res.code == 'ok'){
  5550. var filePath = res.data;
  5551. const a = document.createElement('a'); // 创建a标签
  5552. var fileName = filePath.split('/')[2];
  5553. a.setAttribute('download', fileName);// download属性
  5554. a.setAttribute('href', filePath);// href链接
  5555. a.click(); //自执行点击事件
  5556. a.remove();
  5557. }else{
  5558. this.$message({
  5559. message: res.msg,
  5560. type: 'error'
  5561. })
  5562. }
  5563. },err => {
  5564. this.$message({
  5565. message: err,
  5566. type: 'error'
  5567. })
  5568. })
  5569. },
  5570. //强制删除项目
  5571. forceDeletePro(deleteProId) {
  5572. this.$confirm(this.deleteAlertMsg,this.$t('deletetheproject'), {
  5573. confirmButtonText: this.$t('btn.determine'),
  5574. cancelButtonText: this.$t('btn.cancel'),
  5575. type: "warning"
  5576. })
  5577. .then(() => {
  5578. this.listLoading = true;
  5579. this.http.post(this.port.project.delete,{
  5580. id: deleteProId ,force:1
  5581. },
  5582. res => {
  5583. this.listLoading = false;
  5584. if (res.code == "ok") {
  5585. this.$message({
  5586. message: this.$t('message.successfullyDeleted'),
  5587. type: "success"
  5588. });
  5589. this.getList();
  5590. this.addFormVisible = false;
  5591. } else {
  5592. this.$message({
  5593. message: res.msg,
  5594. type: "error"
  5595. });
  5596. }
  5597. },
  5598. error => {
  5599. this.listLoading = false;
  5600. this.$message({
  5601. message: error,
  5602. type: "error"
  5603. });
  5604. }
  5605. );
  5606. })
  5607. .catch(() => {});
  5608. },
  5609. detail(i) {
  5610. this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
  5611. },
  5612. // 获取部门
  5613. getDepartmentList() {
  5614. this.http.post( this.port.manage.depList, {},
  5615. res => {
  5616. if (res.code == "ok") {
  5617. let dptlist = JSON.parse(JSON.stringify(res.data));
  5618. this.departmentList = this.changeArr(dptlist);
  5619. } else {
  5620. this.$message({
  5621. message: res.msg,
  5622. type: "error"
  5623. });
  5624. }
  5625. },error => {
  5626. this.$message({
  5627. message: error,
  5628. type: "error"
  5629. });
  5630. });
  5631. },
  5632. changeArr(arr) {
  5633. for (var i = 0; i < arr.length; i++) {
  5634. if(arr[i].id != -1 && arr[i].id != 0) {
  5635. if (arr[i].children != null && arr[i].children.length>0) {
  5636. arr[i].children = this.changeArr(arr[i].children);
  5637. }
  5638. arr[i].id && (arr[i].value = arr[i].id);
  5639. delete arr[i].id;
  5640. }
  5641. }
  5642. for(var i in arr) {
  5643. if(arr[i].id == -1 || arr[i].id == 0) {
  5644. arr.splice(i,1)
  5645. }
  5646. }
  5647. return arr;
  5648. },
  5649. // 自定义组件事件
  5650. selectCal(obj) {
  5651. if(obj.distinction == '1') {
  5652. this.inchagerId = obj.id
  5653. this.manageSelect()
  5654. } else if(obj.distinction == '2') {
  5655. this.participationId = obj.id
  5656. this.participationSelect()
  5657. } else if(obj.distinction == '3') {
  5658. this.addForm.inchargerId = obj.id
  5659. // console.log(this.participator)
  5660. this.participator = JSON.parse(JSON.stringify(this.participator))
  5661. } else if(obj.distinction =='4') {
  5662. this.projectProfessionList[obj.other].inchargerId = obj.id
  5663. } else if(obj.distinction =='5') {
  5664. this.paramInchargerId = obj.id
  5665. }else if(obj.distinction =='6') {
  5666. this.hasSetGroupInchargerId = obj.id
  5667. } else if(obj.distinction == '10') {
  5668. const { arrUserList, id } = obj;
  5669. console.log('返回的数据:', obj);
  5670. this.participator = [...this.participator];
  5671. this.addForm.auditUserIds = (arrUserList && arrUserList.length)
  5672. ? arrUserList.map(user => user.id)
  5673. : id;
  5674. // let userList = obj.arrUserList
  5675. // let arr = []
  5676. // for(var i in userList) {
  5677. // arr.push(userList[i].id)
  5678. // }
  5679. // this.participator = JSON.parse(JSON.stringify(this.participator))
  5680. // this.addForm.auditUserIds = arr
  5681. } else if(obj.distinction == '11') {
  5682. let userList = obj.id
  5683. console.log(obj)
  5684. this.curProfessionRow.membList[obj.other].membId = userList
  5685. }
  5686. },
  5687. vueCasader(obj) {
  5688. console.log(obj, '<-==== 接收的数据')
  5689. if(obj.distinction == '32') {
  5690. let arr = []
  5691. arr.push(obj.id)
  5692. this.addForm.bu = arr.join(",")
  5693. } else if(obj.distinction == '20') {
  5694. this.addForm.deptId = obj.id
  5695. }
  5696. console.log(this.addForm)
  5697. },
  5698. changSubStatus(subProject) {
  5699. this.http.post('/sub-project/updateStatus',{
  5700. id: subProject.id,
  5701. status: subProject.status?1:0
  5702. },
  5703. res => {
  5704. this.listLoading = false;
  5705. if (res.code == "ok") {
  5706. this.$message({
  5707. message: subProject.status?this.$t('kaiQiChengGong'):this.$t('guanBiChengGong'),
  5708. type: "success"
  5709. });
  5710. this.subProject(this.currentProject);
  5711. } else {
  5712. this.$message({
  5713. message: res.msg,
  5714. type: "error"
  5715. });
  5716. }
  5717. },
  5718. error => {
  5719. this.$message({
  5720. message: error,
  5721. type: "error"
  5722. });
  5723. }
  5724. );
  5725. },
  5726. //计算预估工时
  5727. jisuanEstimatedWorkTime(manDay){
  5728. this.addForm.estimatedWorkTime=manDay*this.user.timeType.allday
  5729. },
  5730. //计算预估工时
  5731. jisuanManDay(estimatedWorkTime){
  5732. this.addForm.manDay=estimatedWorkTime/this.user.timeType.allday
  5733. },
  5734. getProjectList(){
  5735. this.http.post(this.port.project.list,{
  5736. },
  5737. res => {
  5738. this.listLoading = false;
  5739. if (res.code == "ok") {
  5740. this.allProjectList=res.data
  5741. } else {
  5742. this.$message({
  5743. message: res.msg,
  5744. type: "error"
  5745. });
  5746. }
  5747. },
  5748. error => {
  5749. this.$message({
  5750. message: error,
  5751. type: "error"
  5752. });
  5753. }
  5754. );
  5755. },
  5756. //点击添加
  5757. addFunctional(type){
  5758. if(type=="functional"){
  5759. this.functionalList.push({
  5760. "id":null,
  5761. 'timeType': this.$t('xiangMuGongShi'),
  5762. 'role': 'CRC&LM',
  5763. 'jobRespon': '',
  5764. "companyId":this.user.companyId,
  5765. 'editFlag': true, // 可编辑标识
  5766. 'isSubmit': 0, // 是否点击确定标识
  5767. })
  5768. }else if(type=="workContext"){
  5769. this.workContextList.push({
  5770. "id":null,
  5771. "proFunId":this.functionalId,
  5772. 'workContext':null,
  5773. 'editFlag': true, // 可编辑标识
  5774. 'isSubmit': 0, // 是否点击确定标识
  5775. })
  5776. }
  5777. },
  5778. // 确定
  5779. functionalSubmit(row){
  5780. row.editFlag = false
  5781. row.isSubmit = 1
  5782. },
  5783. // 取消
  5784. functionalCancel(row, index,type){
  5785. row.editFlag = false
  5786. if (row.isSubmit) {
  5787. if(type=="functional"){
  5788. // this.functionalList[index]=this.oldValue
  5789. this.$set(this.functionalList,index,this.oldValue);
  5790. }else if(type=="workContext"){
  5791. this.workContextList[index] = this.oldValue
  5792. }
  5793. }
  5794. else if(!row.id){
  5795. if(type=="functional"){
  5796. this.functionalDelVersion(row,index);
  5797. }else if(type=="workContext"){
  5798. this.workContextDelVersion(row,index);
  5799. }
  5800. }
  5801. },
  5802. // 编辑
  5803. functionalEditVersion(row){
  5804. // v.value = JSON.parse(JSON.stringify(row));
  5805. this.oldValue= Object.assign({}, row);;
  5806. console.log("row",row,"old",this.oldValue)
  5807. row.editFlag = true;
  5808. },
  5809. // 删除
  5810. functionalDelVersion (row,index){
  5811. console.log("index",index,'row',row)
  5812. if(row.id==null){
  5813. this.functionalList.splice(index, 1)
  5814. return
  5815. }
  5816. this.$confirm(this.$t('ciCaoZuoJiangYongJiuShanChuGaiWenJianShiFouJiXu'), this.$t('other.prompts'), {
  5817. confirmButtonText: this.$t('btn.determine'),
  5818. cancelButtonText: this.$t('btn.cancel'),
  5819. type: 'warning'
  5820. }).then(() => {
  5821. this.functionalList.splice(index, 1)
  5822. this.http.post('/project/deleteFunctionalDivision',{
  5823. id:row.id,
  5824. },
  5825. res => {
  5826. if (res.code == "ok") {
  5827. this.$message({
  5828. message: this.$t('message.successfullyDeleted'),
  5829. type: "success"
  5830. });
  5831. } else {
  5832. this.$message({
  5833. message: res.msg,
  5834. type: "error"
  5835. });
  5836. }
  5837. },
  5838. error => {
  5839. this.$message({
  5840. message: error,
  5841. type: "error"
  5842. });
  5843. }
  5844. );
  5845. }).catch(() => {
  5846. this.$message({
  5847. type: 'info',
  5848. message: this.$t('thedeletionhasbeencancelled')
  5849. });
  5850. });
  5851. },
  5852. // 删除
  5853. workContextDelVersion (row,index){
  5854. if(row.id==null){
  5855. this.workContextList.splice(index, 1)
  5856. return
  5857. }
  5858. this.$confirm(this.$t('ciCaoZuoJiangYongJiuShanChuGaiWenJianShiFouJiXu'), this.$t('other.prompts'), {
  5859. confirmButtonText: this.$t('btn.determine'),
  5860. cancelButtonText: this.$t('btn.cancel'),
  5861. type: 'warning'
  5862. }).then(() => {
  5863. this.workContextList.splice(index, 1)
  5864. this.http.post('/project/deleteFunWorkContext',{
  5865. id:row.id,
  5866. },
  5867. res => {
  5868. if (res.code == "ok") {
  5869. this.$message({
  5870. message: this.$t('message.successfullyDeleted'),
  5871. type: "success"
  5872. });
  5873. } else {
  5874. this.$message({
  5875. message: res.msg,
  5876. type: "error"
  5877. });
  5878. }
  5879. },
  5880. error => {
  5881. this.$message({
  5882. message: error,
  5883. type: "error"
  5884. });
  5885. }
  5886. );
  5887. }).catch(() => {
  5888. this.$message({
  5889. type: 'info',
  5890. message: this.$t('thedeletionhasbeencancelled')
  5891. });
  5892. });
  5893. },
  5894. //保存职能分工
  5895. submitFunctional(){
  5896. this.http.post('/project/editFunctionalDivision',{
  5897. json:JSON.stringify(this.functionalList),
  5898. },
  5899. res => {
  5900. if (res.code == "ok") {
  5901. this.$message({
  5902. message: this.$t('operationissuccessful'),
  5903. type: "success"
  5904. });
  5905. this.getFunctionalList()
  5906. } else {
  5907. this.$message({
  5908. message: res.msg,
  5909. type: "error"
  5910. });
  5911. }
  5912. },
  5913. error => {
  5914. this.$message({
  5915. message: error,
  5916. type: "error"
  5917. });
  5918. }
  5919. );
  5920. },
  5921. //保存工作内容
  5922. submitWorkContext(){
  5923. for(var index in this.workContextList){
  5924. if(!this.workContextList[index].workContext){
  5925. this.$message({
  5926. message: this.$t('qingTianXieGongZuoNeiRong'),
  5927. type: "error"
  5928. });
  5929. return
  5930. }
  5931. }
  5932. this.http.post('/project/editFunWorkContext',{
  5933. json:JSON.stringify(this.workContextList),
  5934. },
  5935. res => {
  5936. if (res.code == "ok") {
  5937. this.$message({
  5938. message: this.$t('operationissuccessful'),
  5939. type: "success"
  5940. });
  5941. // this.workContextDig = false
  5942. this.getWorkContextList()
  5943. } else {
  5944. this.$message({
  5945. message: res.msg,
  5946. type: "error"
  5947. });
  5948. }
  5949. },
  5950. error => {
  5951. this.$message({
  5952. message: error,
  5953. type: "error"
  5954. });
  5955. }
  5956. );
  5957. },
  5958. //获取职能列表
  5959. getFunctionalList(){
  5960. this.http.post('/project/getFunctionalDivisionList',{},
  5961. res => {
  5962. if (res.code == "ok") {
  5963. this.functionalList=res.data
  5964. } else {
  5965. this.$message({
  5966. message: res.msg,
  5967. type: "error"
  5968. });
  5969. }
  5970. },
  5971. error => {
  5972. this.$message({
  5973. message: error,
  5974. type: "error"
  5975. });
  5976. }
  5977. );
  5978. },
  5979. //获取工作内容
  5980. getWorkContextList(item){
  5981. if(item){
  5982. this.functionalId=item
  5983. }
  5984. this.http.post('/project/getFunWorkContextList',{
  5985. id:this.functionalId
  5986. },
  5987. res => {
  5988. if (res.code == "ok") {
  5989. this.workContextList=res.data
  5990. } else {
  5991. this.$message({
  5992. message: res.msg,
  5993. type: "error"
  5994. });
  5995. }
  5996. },
  5997. error => {
  5998. this.$message({
  5999. message: error,
  6000. type: "error"
  6001. });
  6002. }
  6003. );
  6004. },
  6005. //获取角色列表
  6006. getRoleList(){
  6007. this.http.post('/permission/getRoleList',{
  6008. companyId:this.user.companyId,
  6009. },
  6010. res => {
  6011. if (res.code == "ok") {
  6012. this.roleList=res.data
  6013. } else {
  6014. this.$message({
  6015. message: res.msg,
  6016. type: "error"
  6017. });
  6018. }
  6019. },
  6020. error => {
  6021. this.$message({
  6022. message: error,
  6023. type: "error"
  6024. });
  6025. }
  6026. );
  6027. },
  6028. synchronizationChange() {
  6029. if(this.synchronizationVal == '1') {
  6030. this.hasChooseProjectCode = []
  6031. } else {
  6032. this.synchronizationInputVal = ''
  6033. }
  6034. }
  6035. },
  6036. created() {
  6037. let height = window.innerHeight;
  6038. this.tableHeight = height - 225;
  6039. const that = this;
  6040. window.onresize = function temp() {
  6041. that.tableHeight = window.innerHeight - 195;
  6042. };
  6043. },
  6044. mounted() {
  6045. this.userssHu()
  6046. this.getDepartment();
  6047. this.getDepartment2();
  6048. this.projectListPageComponentKey++;
  6049. //localStorage中为string类型,需转化为int类型才会发生渲染
  6050. if (localStorage.projectPageIndex) {
  6051. this.page = parseInt(localStorage.projectPageIndex);
  6052. }
  6053. this.getList();
  6054. this.getUsers();
  6055. this.getCustomerList();
  6056. this.getProjectBaseConfigList();
  6057. this.getClfConfigList()
  6058. this.yanjiuzx()
  6059. this.getObtain()
  6060. this.getProjectList()
  6061. this.getGroupTemplate()
  6062. // this.getRoleList()
  6063. // 判断是否有供应商字段
  6064. if(this.user.company.packageProvider == 1){
  6065. this.getSupplierList()
  6066. // this.getPhase()
  6067. }
  6068. if(this.user.company.packageProject == 1) {
  6069. this.obtainPhase()
  6070. }
  6071. // this.getSupplierList()
  6072. if(this.user.timeType.mainProjectState == 1){
  6073. this.getMainProject()
  6074. }
  6075. if(this.user.timeType.projectLevelState == 1){
  6076. this.getProjectLevel()
  6077. }
  6078. // 判断释放为专业版
  6079. if(this.user.company.packageProject == 1) {
  6080. this.importanceList = [{id:1,label:this.$t('zheng-chang')},{id:5,label:this.$t('di-feng-xian')},{id:6,label:this.$t('zhong-feng-xian')},{id:7,label:this.$t('gao-feng-xian')},{id:2,label:this.$t('jin-ji')},{id:3,label:this.$t('zhong-yao')},{id:4,label:this.$t('zhong-yao-qie-jin-ji')}]
  6081. } else {
  6082. this.importanceList = [{id:1,label:this.$t('zheng-chang')},{id:2,label:this.$t('jin-ji')},{id:3,label:this.$t('zhong-yao')},{id:4,label:this.$t('zhong-yao-qie-jin-ji')}]
  6083. }
  6084. // 获取部门
  6085. if(this.user.timeType.projectWithDept) {
  6086. this.getDepartmentList()
  6087. }
  6088. if(this.user.companyId == '936') {
  6089. this.getkeyNodes()
  6090. }
  6091. if (this.user.timeType.projectManDay == 1) {
  6092. this.getManDaySetting();
  6093. }
  6094. },
  6095. };
  6096. </script>
  6097. <style lang="scss" scoped>
  6098. @import "../../assets/scss/handle";
  6099. .themeFontColor {
  6100. @include font_color("color");
  6101. }
  6102. .themeBorderColor {
  6103. @include border_color("border_color");
  6104. }
  6105. .synchronization {
  6106. display: flex;
  6107. justify-content: space-between;
  6108. // align-items: center;
  6109. .synchronizationLabel {
  6110. width: 140px;
  6111. }
  6112. }
  6113. .rg_span{
  6114. display: inline-block;
  6115. }
  6116. .rg_span span {
  6117. text-align: right;
  6118. box-sizing: border-box;
  6119. padding-right: 10px;
  6120. }
  6121. .el-dialog__title {
  6122. display: inline-table;
  6123. margin-top: 20px;
  6124. }
  6125. .addss {
  6126. width: 100%;
  6127. overflow: hidden;
  6128. white-space: nowrap;
  6129. text-overflow: ellipsis;
  6130. }
  6131. .keyNodes {
  6132. display: flex;
  6133. width: 100%;
  6134. box-sizing: border-box;
  6135. padding: 10px 30px;
  6136. }
  6137. .keyNodes .keyNodesTime {
  6138. width: 190px;
  6139. display: flex;
  6140. justify-content: center;
  6141. }
  6142. .keyNodes .keyNodesName {
  6143. width: 260px;
  6144. display: flex;
  6145. align-items: center;
  6146. overflow: hidden;
  6147. text-overflow: ellipsis;
  6148. }
  6149. // 111
  6150. </style>
  6151. <style lang="scss" scoped>
  6152. @import "../../assets/scss/handle";
  6153. .managePopperClass{
  6154. width: 190px;
  6155. }
  6156. .el-dropdown-link {
  6157. @include font_color("color");
  6158. }
  6159. .customdropdown{
  6160. margin-left: 10px;
  6161. }
  6162. .customdropdown .el-dropdown__caret-button{
  6163. height: 27px;
  6164. }
  6165. .customdropdown .el-button--mini:nth-child(1){
  6166. height: 27px;
  6167. }
  6168. .customdropdown_menu{
  6169. padding: 0;
  6170. }
  6171. .customdropdown_menu_btn{
  6172. border-color: transparent;
  6173. }
  6174. .ganttdialog .el-dialog__body{
  6175. height: 550px;
  6176. }
  6177. .toolbar_formitem_n1{
  6178. margin-right: 0 !important;
  6179. }
  6180. .wpgCssClass .el-form-item__label{
  6181. font-weight: 600;
  6182. }
  6183. .gongcheng .el-table .cell{
  6184. overflow: inherit !important;
  6185. }
  6186. </style>