list.vue 322 KB

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