1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241 |
- <template>
- <section>
- <!--工具条-->
- <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
- <el-form :inline="true">
- <el-form-item :label="$t('listofitems')" class="toolbar_formitem_n1">
-
- </el-form-item>
- <el-form-item >
- <!-- <div style="display: flex;align-items: center;height: 40px;"> -->
- <div v-if="true" style="display: flex;align-items: center;height: 40px;">
- <el-input v-model="keyword" class="input-with-select" :placeholder="searchField == '1' ? $t('peaseenterthe') : $t('peaseenterthe')" clearable="true" size="small">
- <el-select v-model="searchField" style="width:120px;" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')">
- <el-option :label="$t('headerTop.projectName')" value=1 ></el-option>
- <el-option :label="$t('Itemno')" value=2 ></el-option>
- </el-select>
- <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
- </el-input>
- </div>
- </el-form-item>
- <el-form-item >
- <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ $t('state.states') }}</span>
- <el-select v-model="status" style="width:120px;" :placeholder="$t('defaultText.pleaseChoose')" @change="searchList" size="small">
- <el-option :label="$t('all')" value=0 ></el-option>
- <el-option :label="$t('ongoing')" value=1 ></el-option>
- <el-option :label="$t('state.completed')" value=2 ></el-option>
- <el-option :label="$t('state.undone')" value=3 ></el-option>
- <el-option :label="$t('paused')" value=4 ></el-option>
- </el-select>
- </el-form-item>
- <!-- 主项目筛选 -->
- <el-form-item v-if="user.timeType.mainProjectState == '1'">
- <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ $t('zhu-xiang-mu') }}</span>
- <el-select v-model="projectMainId" style="width:110px;" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="searchClfList" size="small">
- <el-option v-for="item in mainProjectList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
- </el-select>
- </el-form-item>
- <!-- 分类筛选 -->
- <el-form-item >
- <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ $t('fen-lei') }}</span>
- <el-select v-model="statusClf" style="width:140px;" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="searchClfList" size="small">
- <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item style="float:right;" v-if="permissions.projectImport || permissions.projectExport || permissions.projectClassification || (user.company.packageProject == 1 && permissions.projectCostOfItems)">
- <el-dropdown>
- <el-link type="primary" :underline="false">{{ $t('viewmore') }}<i class="el-icon-arrow-down el-icon--right"></i></el-link>
-
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item v-if="permissions.projectImport">
- <el-link type="primary" :underline="false" @click="importProjectBefore">{{ $t('importproject') }}</el-link>
- <!-- <el-upload ref="upload" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
- <el-link type="primary" :underline="false" >{{ $t('importproject') }}</el-link>
- </el-upload> -->
- </el-dropdown-item>
- <el-dropdown-item v-if="permissions.projectImport">
- <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>
- <el-link type="primary" :underline="false" href="./upload/项目导入模板.xlsx" :download="$t('importtemplateproject') + '.xlsx'" v-else-if="user.timeType.projectWithDept==0">{{ $t('Downloadthetemplate') }}</el-link>
- <!--项目带所属部门的-->
- <el-link type="primary" :underline="false" href="./upload/项目导入模板_部门.xlsx" download="项目导入模板+部门.xlsx" v-else>{{ $t('Downloadthetemplate') }}</el-link>
-
- </el-dropdown-item>
- <el-dropdown-item v-if="permissions.projectExport" :disabled="exportDisabled">
- <el-link type="primary" :underline="false" @click="exportProjectData" :download="$t('exportProject') + '.xlsx'">{{ $t('exportProject') }}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectExport">
- <el-link type="primary" :underline="false" v-if="user.companyId==936" @click="groupTaskDialog=true" :download="$t('exportingTaskGroups') +'.xlsx'">{{ $t('exportingTaskGroups') }}</el-link>
- <el-link type="primary" :underline="false" v-else @click="exportProjectGroup" :download="$t('exportingTaskGroups') +'.xlsx'">{{ $t('exportingTaskGroups') }}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">
- <el-link type="primary" :underline="false" @click="showBaseCostItemDialog">{{ $t('baselinecostitem') }}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="permissions.projectClassification">
- <el-link type="primary" :underline="false" @click="showClfDialog = true">{{ $t('classificationmanagement') }}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="user.timeType.mainProjectState == 1">
- <el-link type="primary" :underline="false" @click="mainProjectDialog = true">{{ $t('masterprojectmanagement') }}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="permissions.projectPhase && user.company.packageProject == 1">
- <el-link type="primary" :underline="false" @click="phaseProjectDialog = true">{{ $t('projectstagemanagement') }}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="user.timeType.projectLevelState == 1">
- <el-link type="primary" :underline="false" @click="projectLevelDialog = true">{{ $t('projectlevelmanagement') }}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="user.timeType.syncFanwei==1||user.timeType.syncSap==1">
- <el-link type="primary" :underline="false" @click="syncProjectDig=true, synchronizationInputVal = ''">{{'同步项目信息'}}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="user.companyId==3385 && permissions.projectClassification">
- <el-link type="primary" :underline="false" @click="functionalDivisionDig=true,getFunctionalList()">{{'职能分工设置'}}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="user.timeType.projectManDay == 1 && permissions.projectClassification">
- <el-link type="primary" :underline="false" @click="projectManDaySettingDialog = true;getManDaySetting()">{{ '预估工时配置' }}</el-link>
- </el-dropdown-item>
- <el-dropdown-item v-if="user.companyId == 10 || user.companyId == 5608">
- <el-link type="primary" :underline="false" @click="importTaskDialog = true">{{ '项目任务导入' }}</el-link>
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </el-form-item>
- <!-- <el-form-item style="float:right;" v-if="user.role == 1||user.role == 2||user.role == 5"> -->
- <el-form-item style="float:right;" v-if="permissions.projectNew">
- <el-link type="primary" :underline="false" @click="handleAdd(-1,null)">{{ $t('newproject') }}</el-link>
- </el-form-item>
- <el-form-item style="float:right;" v-if="permissions.projectResources">
- <!-- <router-link to="/projectGantt"> -->
- <el-link type="primary" :underline="false" @click="isganttshow = true">{{ $t('resourceallocation') }}</el-link>
- <!-- </router-link> -->
- <el-dialog v-if="isganttshow" :visible.sync="isganttshow" width="90vw" top="3vh" style="height:96%" class="ganttdialog">
- <projectgantt></projectgantt>
- </el-dialog>
- </el-form-item>
- <br/>
-
- <br v-if="user.companyId == 936">
- <!-- 时间段筛选 -->
- <el-form-item>
- <span style="margin-left:15px;margin-right:5px;color:#606266;">时间段</span>
- <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>
- </el-form-item>
- <!-- 项目经理筛选 -->
- <el-form-item>
- <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ $t('projectmanager') }}</span>
- <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">
- <el-option v-for="item in users" :key="item.id" :label="user.companyId == 936 ? item.name + '\u3000' + item.jobNumber : item.name" :value="item.id">
- <span style="float: left">{{ item.name }}</span>
- <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
- </el-option>
- </el-select>
- <selectCat v-if="user.userNameNeedTranslate == 1" :filterable="true" :size="'mini'" :subject="users" :subjectId="inchagerId" :distinction="'1'" :clearable="true" @selectCal="selectCal"></selectCat>
- </el-form-item>
- <el-form-item>
- <span style="margin-left:25px;margin-right:5px;color:#606266;">{{ $t('participantin') }}</span>
- <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">
- <el-option v-for="item in users" :key="item.id" :label="user.companyId == 936 ? item.name + '\u3000' + item.jobNumber : item.name" :value="item.id">
- <span style="float: left">{{ item.name }}</span>
- <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
- </el-option>
- </el-select>
- <selectCat v-if="user.userNameNeedTranslate == 1" :filterable="true" :size="'mini'" :subject="users" :subjectId="participationId" :distinction="'2'" :clearable="true" @selectCal="selectCal"></selectCat>
- </el-form-item>
- <!-- 部门筛选 -->
- <el-form-item v-if="user.timeType.projectWithDept">
- <span style="margin-left:5px;margin-right:5px;color:#606266;">{{ $t('lable.department') }}</span>
- <el-cascader v-model="deptId" style="width:140px;" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"
- :props="{ checkStrictly: true, expandTrigger: 'hover' }" :show-all-levels="false" clearable filterable @change="searchClfList" size="small"
- ></el-cascader>
- </el-form-item>
- </el-form>
- </el-col>
- <!--列表-->
- <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">
- <el-table-column type="selection" width="60" :selectable="isSelectable">
- <!-- creator 项目创建人 incharger 项目负责人 -->
- </el-table-column>
- <!-- <el-table-column type="index" width="60" v-else>
- <template slot-scope="scope" >
- {{scope.$index+1+(page-1)*size}}
- </template>
- </el-table-column> -->
- <el-table-column prop="projectCode" :label="$t('Itemno')" sortable="custom" width="150"></el-table-column>
- <el-table-column prop="contractCode" :label="$t('contractno')" width="200" v-if="user.companyId == '936'">
- <template slot-scope="scope">
- <!-- <div v-if="scope.row.projectSeparate">
- {{scope.row.projectSeparate.contractCode}}
- </div> -->
- <div v-if="scope.row.projectSeparate">
- <div v-if="scope.row.projectSeparate.contractCode">
- <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectSeparate.contractCode.length > 15">
- <div>
- <span>{{scope.row.projectSeparate.contractCode}}</span>
- </div>
- <div slot="reference" class="kans">
- <span>{{scope.row.projectSeparate.contractCode}}...</span>
- </div>
- </el-popover>
- <div v-else>
- <span>{{scope.row.projectSeparate.contractCode}}</span>
- </div>
- </div>
- </div>
- </template>
- </el-table-column>
- <!-- <el-table-column prop="projectCategorySub" label="项目分组" width="200" v-if="user.companyId == '428'">
- <template slot-scope="scope">
- <div v-if="scope.row.projectSeparate">
- <div v-if="scope.row.projectSeparate.projectCategorySub">
- <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectSeparate.projectCategorySub.length > 15">
- <div>
- <span>{{scope.row.projectSeparate.projectCategorySub}}</span>
- </div>
- <div slot="reference" class="kans">
- <span>{{scope.row.projectSeparate.projectCategorySub}}...</span>
- </div>
- </el-popover>
- <div v-else>
- <span>{{scope.row.projectSeparate.projectCategorySub}}</span>
- </div>
- </div>
- </div>
- </template>
- </el-table-column> -->
- <el-table-column prop="categoryName" :label="$t('projectclassification')" sortable="custom" width="140"></el-table-column>
- <el-table-column prop="projectName" :label="$t('headerTop.projectName')" min-width="250" sortable="custom">
- <template slot-scope="scope">
- <!-- <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectName.length > 15">
- <div>
- <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
- <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
- </div>
- <div slot="reference" class="kans">
- <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>
- <span v-if="user.company.packageProject==0" >{{scope.row.projectName.substring(0,15)}}...</span>
- </div>
- </el-popover>
- <div v-else>
- <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
- <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
- </div> -->
- <div>
- <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>
- <span v-else>{{scope.row.projectName}}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="departmentName" :label="$t('subordinatedepartments')" sortable="custom" width="200" v-if="user.timeType.projectWithDept"></el-table-column>
- <el-table-column prop="projectMainName" :label="$t('zhu-xiang-mu')" sortable="custom" min-width="250" v-if="user.timeType.mainProjectState == '1'">
- </el-table-column>
- <el-table-column prop="inchargerName" :label="$t('projectmanager')" sortable="custom" min-width="150">
- <template slot-scope="scope">
- <el-link type="primary" :underline="false" @click="showUser(scope.row.inchargerId)">
- <span v-if="user.userNameNeedTranslate != 1">
- {{scope.row.inchargerName}}
- </span>
- <span v-if="user.userNameNeedTranslate == 1">
- <ww-open-data type='userName' :openid='scope.row.inchargerName'></ww-open-data>
- </span>
- </el-link>
- </template>
- </el-table-column>
-
- <div v-if="user.timeType.projectCustom">
- <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>
- </div>
-
- <!-- 项目阶段 -->
- <!-- 换位置之前看下项目阶段发起的请求 -->
- <el-table-column prop="currentStage" :label="$t('projectphase')" sortable="custom" min-width="150" width="220" v-if="user.company.packageProject == 1">
- <template slot-scope="scope">
- {{scope.row.currentStageId == null ? $t('nostage') : scope.row.currentStageName}}
- <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)">
- <i class="el-icon-edit"></i>
- </el-link>
- </template>
- </el-table-column>
- <el-table-column prop="participator" :label="$t('participants')" :min-width="user.company.packageCustomer != 1 ? '100' : '300'" sortable v-if="user.company.packageProject==0">
- <template slot-scope="scope">
- <!-- <v-for v-for="par in scope.row.participator" :key="par.id" >
- <el-link style="margin-right:10px;" type="primary" @click="showUser(par.id)">{{par.name}}</el-link>
- </v-for> -->
- <div v-if="scope.row.participator.length > 5">
- <el-popover placement="top" width="500" trigger="hover" v-if="scope.row.participator.length > 0">
- <span v-for="par in scope.row.participator" :key="par.id">
- <el-link style="margin-right:10px;" :underline="false" type="primary" @click="showUser(par.id)">
- <span v-if="user.userNameNeedTranslate != 1">
- {{par.name}}
- </span>
- <span v-if="user.userNameNeedTranslate == 1">
- <ww-open-data type='userName' :openid='par.name'></ww-open-data>
- </span>
- </el-link>
- </span>
- <div slot="reference" class="addss">
- <span v-for="par in scope.row.participator" :key="par.id">
- <el-link style="margin-right:10px;" :underline="false" type="primary" @click="showUser(par.id)">
- <span v-if="user.userNameNeedTranslate != 1">
- {{par.name}}
- </span>
- <span v-if="user.userNameNeedTranslate == 1">
- <ww-open-data type='userName' :openid='par.name'></ww-open-data>
- </span>
- </el-link>
- </span>
- </div>
- </el-popover>
- </div>
- <div v-else>
- <span v-for="par in scope.row.participator" :key="par.id" >
- <el-link style="margin-right:10px;" type="primary" :underline="false" @click="showUser(par.id)" v-if="user.userNameNeedTranslate != 1">
- {{par.name}}
- </el-link>
- <el-link style="margin-right:10px;" type="primary" :underline="false" @click="showUser(par.id)" v-if="user.userNameNeedTranslate == 1">
- <ww-open-data type='userName' :openid='par.name'></ww-open-data>
- </el-link>
- </span>
- </div>
-
- </template>
- </el-table-column>
- <!-- 客户管理 -->
- <el-table-column prop="customerName" :label="$t('ke-hu')" min-width="190" v-if="user.company.packageCustomer == 1" sortable="custom">
- <template slot-scope="scope">
- <el-popover placement="top" width="250" trigger="hover" v-if="scope.row.customerName&&scope.row.customerName.length > 12">
- <div slot="reference" class="kans">
- <span >{{scope.row.customerName.substring(0,12)}}...</span>
- </div>
- <span >{{scope.row.customerName}}</span>
- </el-popover>
- <div v-else>
- <span >{{scope.row.customerName}}</span>
- </div>
- </template>
- </el-table-column>
- <!-- 研究中心 -->
- <el-table-column prop="associateDegreeNames" :label="centerNameDegree" min-width="190" v-if="user.timeType.isCro == 1" sortable="custom">
- <template slot-scope="scope">
- <!-- <div>
- {{scope.row.associateDegreeNames}}
- </div> -->
- <el-popover placement="top" width="300" trigger="hover" v-if="scope.row.associateDegreeNames&&scope.row.associateDegreeNames.length > 12">
- <div slot="reference" class="kans">
- <span >{{scope.row.associateDegreeNames.substring(0,12)}}...</span>
- </div>
- <span >{{scope.row.associateDegreeNames}}</span>
- </el-popover>
- <div v-else>
- <span >{{scope.row.associateDegreeNames}}</span>
- </div>
- </template>
- </el-table-column>
- <!-- 级别 -->
- <el-table-column :prop="user.timeType.projectLevelState == 1 ? 'levelName' : 'level'" :label="$t('ji-bie')" min-width="190" v-if="user.company.packageProject == 1">
- <template slot-scope="scope">
- <span v-if="user.timeType.projectLevelState == 1">{{scope.row.levelName}}</span>
- <span v-else>{{importanceListLable[scope.row.level - 1]}}</span>
- </template>
- </el-table-column>
- <!-- 合同金额 -->
- <el-table-column prop="contractAmount" :label="'合同金额'" width="200" v-if="user.company.packageProject==1" align="right">
- <template slot-scope="scope" >
- <span>¥{{Number(scope.row.contractAmount).toFixed(2)}}</span>
- </template>
- </el-table-column>
- <!-- 日报审核人 -->
- <el-table-column prop="projectAuditorName" :label="'日报审核人'" sortable="custom" min-width="150" v-if="user.company.companyName=='成都明夷电子科技有限公司'">
- <template slot-scope="scope">
- <el-link type="primary" :underline="false" @click="showUser(scope.row.projectAuditorId)">
- {{scope.row.projectAuditorName}}
- </el-link>
- </template>
- </el-table-column>
- <!-- 供应商 -->
- <!-- <el-table-column prop="providerNames" label="供应商" min-width="190" v-if="user.company.packageProvider">
- </el-table-column> -->
- <!-- <div v-if="user.company.packageProvider"> -->
- <template>
- <div v-for="(item, index) in listHeader" :key="index">
- <el-table-column prop="providerNames" :label="item" min-width="190" v-if="user.company.packageProvider">
- <template slot-scope="scope">
- <div>
- {{item | mobans(scope.row.providerInfoList)}}
- </div>
- </template>
- </el-table-column>
- </div>
- </template>
- <el-table-column prop="status" :label="$t('state.states')" min-width="100" sortable="custom">
- <template slot-scope="scope">
- {{scope.row.status == null?"-":statusTxt[scope.row.status]}}
- </template>
- </el-table-column>
- <!--专业项目协作-->
-
- <el-table-column prop="planStartDate" :label="$t('time.startDate')" min-width="96" >
- </el-table-column>
- <el-table-column prop="planEndDate" :label="$t('expirationdate')" min-width="96" >
- </el-table-column>
- <el-table-column prop="progress" :label="$t('completeness')" min-width="100" v-if="user.company.packageProject == 1">
- <template slot-scope="scope">
- {{scope.row.progress==null?"-":scope.row.progress}}%
- </template>
- </el-table-column>
- <el-table-column prop="manDay" :label="'预估工时'" min-width="150" v-if="user.timeType.projectManDay == 1">
- <template slot-scope="scope">
- {{scope.row.manDay==null?"":scope.row.manDay}}<span v-if="scope.row.manDay">人天({{scope.row.estimatedWorkTime}}h)</span>
- </template>
- </el-table-column>
- <el-table-column prop="residueEstimatedWorkTime" :label="'剩余预估工时'" min-width="120" v-if="user.timeType.projectManDay == 1">
- <template slot-scope="scope">
- {{scope.row.residueEstimatedWorkTime==null?"":scope.row.residueEstimatedWorkTime}}<span v-if="scope.row.residueEstimatedWorkTime">h</span>
- </template>
- </el-table-column>
- <el-table-column :label="$t('operation')" :width="showColumnWidth" align="left" fixed="right" v-if="showColumnWidth != '0' || permissions.projectManagement">
- <template slot-scope="scope">
- <el-button v-if="(permissions.projectManagement || user.id==scope.row.creatorId) && user.timeType.mainProjectState != '1'" size="mini" @click="subProject(scope.row)">{{ $t('lable.subproject') }}</el-button>
- <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>
- <!-- <el-button v-if="permissions.projectManagement || user.id==scope.row.creatorId" size="mini" @click="deletePro(scope.$index, scope.row)">删除</el-button> -->
- <el-dropdown class="customdropdown" split-button size="mini" @click="finishPro(scope.row)" v-if="(permissions.projectManagement || user.id==scope.row.creatorId || user.id==scope.row.inchargerId) && scope.row.status == 1" placement="bottom-start">
- {{ $t('wan-cheng') }}
- <el-dropdown-menu slot="dropdown" class="customdropdown_menu">
- <el-button size="mini" @click="cancelPro(scope.row)" class="customdropdown_menu_btn">{{ $t('btn.undo') }}</el-button><br>
- <el-button size="mini" @click="suspendPro(scope.row)" class="customdropdown_menu_btn">{{ $t('zan-ting') }}</el-button><br>
- </el-dropdown-menu>
- </el-dropdown>
- <el-button v-if="(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>
- </template>
- </el-table-column>
- </el-table>
- <!--工具条-->
- <el-col :span="24" class="toolbar">
- <el-button size="small" @click="batchSetWudulistBtn1" v-if="(user.timeType.customDegreeActive || user.company.packageProject) && (showColumnWidth != '0' || permissions.projectManagement)">{{ $t('btn.cancel') }}</el-button>
- <template v-if="user.timeType.customDegreeActive && (showColumnWidth != '0' || permissions.projectManagement)">
- <el-button size="small" type="primary" @click="batchSetWudulistBtn2(true)">{{ $t('volumeset') }} {{user.timeType.customDegreeName}}</el-button>
- <el-button size="small" type="primary" @click="batchSetWudulistBtn2(false)">{{ $t('pi-liang-tian-jia') }} {{user.timeType.customDegreeName}}</el-button>
- </template>
- <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
- <el-button size="small" type="primary" @click="addTaskGroup()" >{{'批量增加任务分组'}}</el-button>
- </template>
- <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
- <el-button size="small" type="primary" @click="setGroupIncharger()" >{{'批量设置分组负责人'}}</el-button>
- </template>
- <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
- <el-button size="small" type="primary" @click="addGroupPerson()" :loading="addGroupPersonBtnLoading">{{ $t('groupparticipantsinbatches') }}</el-button>
- </template>
- <template v-if="(showColumnWidth != '0' || permissions.projectManagement)">
- <el-button size="small" type="primary" @click="addProPreson()">{{ $t('projectparticipantsinbatches') }}</el-button>
- <el-button size="small" type="primary" v-if="permissions.projectManagement" @click="batchIncharger()">{{ $t('projectmanagersinbatches') }}</el-button>
- <el-button size="small" type="primary" v-if="user.roleName='超级管理员'" @click="batchDelete()" :loading="isDeleting">批量删除</el-button>
- </template>
-
- <el-pagination :key="projectListPageComponentKey"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[20 , 50 , 80 , 100]"
- :page-size="size"
- :current-page.sync="page"
- layout="total, sizes, prev, pager, next"
- :total="total"
- style="float:right;"
- ></el-pagination>
- </el-col>
- <!--新增界面-->
- <el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="960px" :top="'6vh'">
- <div style="height: 72vh;overflow-y: auto;overflow-x: hidden;">
- <el-form ref="form1" :model="addForm" :rules="rules" label-width="120px">
- <el-form-item :label="$t('Itemno')" :class="title == $t('newproject')" v-if="user.companyId!=936">
- <!-- <el-input v-model="addForm.code" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目编号" clearable></el-input> -->
- <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>
- </el-form-item>
- <el-form-item :label="$t('Itemno')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.companyId==936" prop="code">
- <!-- <el-input v-model="addForm.code" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目编号" clearable></el-input> -->
- <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>
- </el-form-item>
- <el-form-item :label="$t('zhu-xiang-mu')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.timeType.mainProjectState == '1'">
- <!-- <el-select v-model="addForm.projectMainId" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id" @change="projectManagementChange"> -->
- <el-select v-model="addForm.projectMainId" clearable @change="projectManagementChange">
- <el-option v-for="(item) in mainProjectList" :key="item.id" :value="item.id" :label="item.name + '\u3000' + item.code">
- <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.code }}</span>
- <span style="float: right;margin-left: 20px">{{ item.name }}</span>
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('projectclassification')" v-if="user.timeType.mainProjectState != '1'">
- <!-- <el-select v-model="addForm.category" style="width:32%;" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id"> -->
- <el-select v-model="addForm.category" style="width:32%;" clearable filterable :disabled="canOnlyModParticipator">
- <el-option v-for="(item) in baseClfList" :key="item.id" :value="item.id" :label="item.name"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('headerTop.projectName')" prop="name">
- <!-- <el-input v-model="addForm.name" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目名称" clearable></el-input> -->
- <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>
- </el-form-item>
- <el-form-item :label="$t('other.projectDescription')" prop="projectDesc">
- <!-- <el-input v-model="addForm.projectDesc" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目描述" clearable maxlength="4000"></el-input> -->
- <el-input v-model="addForm.projectDesc" :placeholder="$t('peaseenterthe')" clearable maxlength="4000" :disabled="canOnlyModParticipator" show-word-limit></el-input>
- </el-form-item>
- <el-form-item :label="$t('projecttype')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" prop="isPublic">
- <el-select v-model="addForm.isPublic" style="width:32%;" @change="selectPublic" :disabled="canOnlyModParticipator">
- <el-option :value="0" :label="$t('zheng-shi-xiang-mu')"></el-option>
- <el-option :value="1" :label="$t('fei-xiang-mu')"></el-option>
- </el-select>
- <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">
- <i class="el-icon-question"></i>
- </el-tooltip>
- <div v-if="user.company.packageCustomer == 1" style="display: inline-block;width: 50%">
- <span style="margin-left:63px;margin-right:10px;" >{{ $t('ke-hu') }}</span>
- <el-select v-model="addForm.customerId" clearable="true" filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:70%;" :disabled="canOnlyModParticipator">
- <el-option v-for="item in customerList" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
- </el-select>
- </div>
- </el-form-item>
- <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">
- <el-cascader v-model="addForm.deptId" :options="departmentList" :placeholder="$t('defaultText.pleaseChoose')" :disabled="canOnlyModParticipator"
- :props="{ checkStrictly: true, expandTrigger: 'hover' }" clearable filterable @change="cascaderChange" style="width: 100%"
- ></el-cascader>
- </el-form-item>
- <!-- 供应商 -->
- <!-- <el-form-item label="供应商" v-if="user.company.packageProvider">
- <el-select v-model="addForm.supplierId" multiple collapse-tags style="width:32%;" placeholder="请选择供应商">
- <el-option v-for="item in supplierList" :key="item.id" :label="item.providerName" :value="item.id">
- </el-option>
- </el-select>
- </el-form-item> -->
- <el-form-item :label="$t('supplier')" v-if="user.company.packageProvider">
- <el-select v-model="addForm.supplierId" multiple :placeholder="$t('defaultText.pleaseChoose')" filterable="true" style="width: 100%" :disabled="canOnlyModParticipator">
- <span v-for="(item, index) in supplierList" :key="index">
- <el-option :label="item.providerName" :value="item.id"></el-option>
- </span>
- </el-select>
- </el-form-item>
- <el-form-item :label="yonghuUser.customDegreeName" v-if="yonghuUser.customDegreeActive == 1">
- <el-select v-model="auseList" multiple :placeholder="$t('defaultText.pleaseChoose')" filterable="true" style="width: 100%" :disabled="canOnlyModParticipator">
- <span v-for="(item, index) in ause" :key="index">
- <el-option :label="item.name" :value="item.id"></el-option>
- </span>
- </el-select>
- </el-form-item>
- <!-- <el-form-item label="客户" v-if="user.company.packageCustomer == 1">
- <el-select v-model="addForm.customerId" clearable="true" filterable placeholder="请选择客户" style="width:100%;" >
- <el-option v-for="item in customerList" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
- </el-select>
- </el-form-item> -->
- <el-form-item :label="$t('Allparticipants')" v-show="addForm.isPublic == 0" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''">
- <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate != 1">
- <div slot="content" style="width:780px">{{addForm.userNames}}</div>
- <el-input @focus="showChooseMembTree" v-model="addForm.userNames"></el-input>
- </el-tooltip>
- <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate == 1">
- <div slot="content" style="width:780px">
- <span v-for="(item, index) in addFormUserNames" :key="index">
- <!-- {{item}} -->
- <ww-open-data type='userName' :openid='item'></ww-open-data>
- <span v-if="index < addFormUserNames.length - 1">,</span>
- </span>
- </div>
- <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">
- <span v-for="(item, index) in addFormUserNames" :key="index">
- <!-- {{item}} -->
- <ww-open-data type='userName' :openid='item'></ww-open-data>
- <span v-if="index < addFormUserNames.length - 1">,</span>
- </span>
- </div>
- </el-tooltip>
- </el-form-item>
- <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)">
- <el-select v-if="user.userNameNeedTranslate != 1" v-model="addForm.inchargerId" filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:32%;" :disabled="canOnlyModParticipator || projectManagerEdit">
- <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id">
- <span style="float: left">{{ item.name }}</span>
- <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
- </el-option>
- </el-select>
- <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :subject="participator" :subjectId="addForm.inchargerId" :distinction="'3'" @selectCal="selectCal" :disabled="canOnlyModParticipator || projectManagerEdit || isShowProjectName"></selectCat>
- </el-form-item>
- <span v-if="user.companyId != 469">
- <el-form-item :label="$t('newspaperauditor')" v-show="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4 || user.timeType.reportAuditType == 6" v-if="user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0)">
- <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" >
- <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
- <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.auditUserIds" :subject="participator" :clearable="false" :distinction="'10'" :multiSelect="user.timeType.reportAuditType != 6" @selectCal="selectCal"></selectCat>
- </el-form-item>
- </span>
-
- <el-form-item v-if="user.timeType.reportCc == 1 && (user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))" label="日报抄送人" >
- <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="请选择抄送人" style="width:100%;" >
- <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
- <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>
- </el-form-item>
- <!--专业项目协作版本功能 -->
- <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))">
- <el-select v-model="addForm.level" :placeholder="$t('defaultText.pleaseChoose')" style="width:32%;" v-if="user.timeType.projectLevelState == 1" :disabled="canOnlyModParticipator || isShowProjectName">
- <el-option v-for="item in levelList" :key="item.id" :label="item.projectLevelName" :value="item.id"></el-option>
- </el-select>
- <el-select v-model="addForm.level" :placeholder="this.$t('defaultText.pleaseChoose')" style="width:32%;" :disabled="canOnlyModParticipator" v-else>
- <el-option v-for="item in importanceList" :key="item.id" :label="item.label" :value="item.id"></el-option>
- </el-select>
- <!-- 增加合同金额字段 -->
- <!-- <span style="margin-left:63px;margin-right:10px;" v-if="user.company.packageProject==1">合同金额</span>
- <el-input id="contractAmount" v-model="addForm.contractAmount" style="width:33%;" @blur="contractAmountChange(addForm.contractAmount)"
- placeholder="整数" clearable @keyup.native="restrictNumber('contractAmount')" :disabled="title == '新增项目' ? false : false"></el-input><span style="margin-left:10px;">元</span> -->
- </el-form-item>
- <!-- 增加合同金额字段 -->
- <el-form-item :label="$t('contractamount')" v-if="user.company.packageProject==1 && (user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))">
- <el-input id="contractAmount" v-model="addForm.contractAmount" :disabled="canOnlyModParticipator" style="width:32%;" @input="contractAmountChange(addForm.contractAmount)" :placeholder="$t('zheng-shu')" clearable @keyup.native="restrictNumber('contractAmount')"></el-input><span style="margin-left:10px;position:absolute;">{{ $t('yuan') }}</span>
- <template v-if="title == $t('modifytheproject') && contractAmountReasonShow">
- <span style="margin-left:63px;margin-right:10px;">{{ $t('modifythereason') }}</span>
- <el-input v-model="addForm.changeContractReason" style="width:33%" clearable :placeholder="$t('contractamountasd')"></el-input>
- </template>
- </el-form-item>
- <el-form-item :label="$t('ommencementDate')" prop="planStartDate" v-if="(user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))">
- <el-date-picker v-model="addForm.planStartDate" :disabled="canOnlyModParticipator"
- :editable="false" style="width:32%;"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- :clearable="false" type="date"
- :placeholder="$t('optiondate')"></el-date-picker>
- <span style="margin-left:63px;margin-right:10px;" >{{ $t('ji-hua-jie-shu-ri-qi') }}</span>
- <el-date-picker v-model="addForm.planEndDate" style="width:33%;"
- :editable="false" :disabled="canOnlyModParticipator"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- :clearable="false" type="date"
- :placeholder="$t('optiondate')"></el-date-picker>
- </el-form-item>
- <!-- 增加BU字段 绎维固定字段 -->
- <el-form-item label="BU" v-if="user.companyId == '862'">
- <el-cascader ref="deptCascader" v-model="addForm.bu" style="width: 250px" :show-all-levels="false" :disabled="canOnlyModParticipator"
- :options="buOption" :props="{ checkStrictly: true, expandTrigger: 'hover' }" clearable v-show="user.userNameNeedTranslate != 1"></el-cascader>
- <vueCascader :size="'small'" :subjectId="addForm.bu" :widthStr="'200'" :clearable="true" :subject="buOption" :radios="true" :distinction="'32'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
- </el-form-item>
- <!-- 增加项目人天字段 绎维固定字段 -->
- <el-form-item v-if="user.timeType.projectManDay == 1 && (user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))">
- <template slot="label"><span v-if="manDaySetting.projectManDayFillMode == 2 || (manDaySetting.projectManDayFillMode == 1 && addForm.fromOutside == 0)" style="padding:5px;color:red;">*</span>项目人天</template>
- <el-input v-model.number="addForm.manDay" :placeholder="$t('peaseenterthe')" @input="jisuanEstimatedWorkTime(addForm.manDay)" style="width: 100px"></el-input>
- <span style="margin-left:10px;position:absolute;">人天(预估工时:<el-input size="small" v-model.number="addForm.estimatedWorkTime" :placeholder="$t('peaseenterthe')" @input="jisuanManDay(addForm.estimatedWorkTime)" style="width: 100px"></el-input>h)</span>
- <el-tooltip effect="dark" :content="$t('根据系统基础设置每日正常工作时长计算,1人天为一个每日正常工作时长')" placement="top-start" style="margin-left:180px">
- <i class="el-icon-question" style="color:#606266"></i>
- </el-tooltip>
- <span style="margin-left:63px;margin-right:10px;" v-if="user.companyId != 936" >{{'管控开始日期'}}</span>
- <el-date-picker v-model="addForm.manDayStartDate" v-if="user.companyId != 936"
- :editable="false" style="width:20%;"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- :clearable="false" type="date"
- :placeholder="$t('optiondate')"></el-date-picker>
- <el-tooltip effect="dark" :content="$t('从该日期起,填报工时开始占用预算人天工时')" placement="top-start" style="margin-left:10px" v-if="user.companyId != 936">
- <i class="el-icon-question" style="color:#606266"></i>
- </el-tooltip>
- </el-form-item>
- <el-form-item :label="$t('projectoutput')" prop="outputValue" v-if="user.timeType.outputValueStatus == 1">
- <el-input id="outputValue" v-model="addForm.outputValue" style="width:32%;" :disabled="canOnlyModParticipator"
- placeholder="" clearable @keyup.native="restrictNumber('outputValue')">
- </el-input><span style="margin-left:10px;">{{ $t('yuan') }}</span>
- </el-form-item>
- <!-- 单个公司的固定字段 -->
- <div v-if="user.companyId == '936'">
- <el-form-item :label="$t('contractno')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''">
- <el-input v-model="addForm.contractCode" maxlength="50" show-word-limit :placeholder="$t('peaseenterthe')" clearable :disabled="canOnlyModParticipator || isShowProjectName"></el-input>
- </el-form-item>
- <el-form-item :label="$t('warrantystartime')">
- <el-date-picker v-model="addForm.warrantyStartDate"
- :editable="false" style="width:32%;" :disabled="canOnlyModParticipator"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- :clearable="false" type="date"
- :placeholder="$t('optiondate')"></el-date-picker>
- <span style="margin-left:63px;margin-right:10px;" >{{ $t('warrantyexpirationtime') }}</span>
- <el-date-picker v-model="addForm.warrantyEndDate" style="width:33%;" :disabled="canOnlyModParticipator"
- :editable="false"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- :clearable="false" type="date"
- :placeholder="$t('optiondate')"></el-date-picker>
- </el-form-item>
- <el-form-item :label="$t('IndependentProject')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''">
- <!-- <el-input v-model="addForm.projectCategorySub" placeholder="请输入自主项目类别" clearable></el-input> -->
- <el-select v-model="addForm.projectCategorySub" :placeholder="$t('defaultText.pleaseChoose')" clearable :disabled="canOnlyModParticipator">
- <el-option :value="$t('softwareproject')" :label="$t('softwareproject')"></el-option>
- <el-option :value="$t('hardwareproject')" :label="$t('hardwareproject')"></el-option>
- <el-option :value="$t('integrationproject')" :label="$t('integrationproject')"></el-option>
- <el-option :value="$t('fu-wu-xiang-mu')" :label="$t('fu-wu-xiang-mu')"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('region')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''">
- <el-input v-model="addForm.region" :placeholder="$t('peaseenterthe')" clearable :disabled="canOnlyModParticipator || isShowProjectName"></el-input>
- </el-form-item>
- <el-form-item :label="$t('subordinateBU')" >
- <el-input v-model="addForm.bu" :placeholder="$t('subordinateBU')" clearable :disabled="canOnlyModParticipator"></el-input>
- </el-form-item>
- </div>
- <!-- 用户自己定义的字段 -->
- <div style="margin-top: 20px" v-if="dataList.length > 0 && user.timeType.projectCustom">
- <el-form-item v-for="(item, index) in dataList" :key="item.id" :label="item.customName">
- <div v-if="item.customType == 0">
- <el-input v-model="item.value" clearable placeholder="请输入内容" @input="ipts(item.value, index)"></el-input>
- </div>
- <div v-if="item.customType == 1">
- <el-upload
- list-type="picture-card"
- ref="upload" :file-list="item.value" :action="index" :auto-upload="true" :limit="2" :disabled="item.valuelist.length == '2'" :http-request="fileUpload">
- <i slot="default" class="el-icon-plus"></i>
- <div slot="file" slot-scope="{file}">
- <img
- class="el-upload-list__item-thumbnail"
- :src="file.url" alt=""
- >
- <span class="el-upload-list__item-actions">
- <span
- class="el-upload-list__item-preview"
- @click="handlePictureCardPreview(file)"
- >
- <i class="el-icon-zoom-in"></i>
- </span>
- <span
- v-if="!disabled"
- class="el-upload-list__item-delete"
- @click="handleRemove(file, index)"
- >
- <i class="el-icon-delete"></i>
- </span>
- </span>
- </div>
- </el-upload>
- </div>
- <div v-if="item.customType == 2">
- <el-date-picker v-model="item.value" type="date" placeholder="请选择日期" value-format="yyyy-MM-dd"></el-date-picker>
- </div>
- </el-form-item>
- </div>
- <!-- <div v-if="user.companyId == '428'">
- <el-form-item :label="$t('projectgroup')" >
- <el-input v-model="addForm.projectCategorySub" maxlength="50" show-word-limit :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- </div> -->
- <!-- 项目基线 -->
- <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))">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane :label="$t('costbaseline')" name="baseCostPanel" >
- <div style="padding-top:10px;">
- <!--新版 -->
- <span class="rg_span" v-for="(item, index) in projectBaseCostData" :key="item.id">
- <span style="width:120px;display: inline-block;" v-if="user.company.packageProject==1">{{item.baseName}}</span>
- <el-input :id="'baseCost'+index" @input="addUpfun()" v-model="item.baseAmount" style="width:200px; margin-bottom: 20px"
- :placeholder="$t('zheng-shu')" clearable @keyup.native="restrictNumber('baseCost'+index)"></el-input><span style="margin-left:10px;">{{ $t('yuan') }}</span>
- </span>
- <!-- 合计 -->
- <div style="margin-top: 10px;float:right;">
- <span style="margin-right:50px;margin-right:10px;" v-if="user.company.packageProject==1">{{ $t('other.totals') }}</span>
- <span v-if="addForm.budget <= 0 || addForm.budget == undefined">0</span>
- <span v-else>{{addForm.budget | numberToCurrency}}</span>
- <span style="margin-right:50px;margin-left:10px;">{{ $t('yuan') }}</span>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane :label="$t('keynodes')" name="baseCostPanep" v-if="user.companyId == '936'">
- <div style="padding-top:10px;">
- <!--新版 -->
- <div class="keyNodes">
- <div class="keyNodesName">{{ $t('nameofthenode') }}</div>
- <div class="keyNodesTime">{{ $t('plannedcompletiontime') }}</div>
- <div class="keyNodesTime">{{ $t('actualcompletiontime') }}</div>
- <div class="keyNodesTime">{{ $t('state.states') }}</div>
- </div>
- <div class="keyNodes" v-for="item in projectKeyNodesData" :key="item.nodesId">
- <div class="keyNodesName">{{item.nodesName}}</div>
- <div class="keyNodesTime">
- <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>
- </div>
- <div class="keyNodesTime">
- <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>
- </div>
- <div class="keyNodesTime">
- <el-select v-model="item.states" :placeholder="$t('defaultText.pleaseChoose')" style="width: 80%" size="small">
- <el-option :label="$t('zheng-chang')" value="0"></el-option>
- <el-option :label="$t('yan-qi')" value="1"></el-option>
- <el-option :label="$t('wan-cheng')" value="2"></el-option>
- </el-select>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane :label="$t('engineering')" name="engineeringProfession" v-if="user.company.packageEngineering == 1">
- <div style="padding-top:10px;" class="gongcheng">
- <el-table :data="projectProfessionList" size="small" :key="Math.random()" :height="'400px'">
- <el-table-column prop="professionId" width="200">
- <template slot-scope="scope">
- <el-select v-model="scope.row.professionId" >
- <el-option v-for="item in professionList" :key="item.id" :label="item.name" :value="item.id"/>
- </el-select>
- </template>
- <template slot="header" >
- <span style="font-size:14px;font-weight:normal;">{{ $t('nameprofessional') }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="percentage" width="120" :label="$t('zhan-bi')">
- <template slot-scope="scope">
- <div><el-input type="number" v-model="scope.row.percentage"></el-input></div>
- </template>
- </el-table-column>
-
- <el-table-column prop="membNames" :label="$t('personnelproportion')">
- <template slot-scope="scope">
- <span style="margin:0 5px;" v-for="item in scope.row.membList" :key="item.membId">
- <span v-if="user.userNameNeedTranslate != 1">{{item.membName}}({{item.percentage}}%)</span>
- <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.membName'></ww-open-data>({{item.percentage}}%)</span>
- </span>
- <el-link @click="showEditPpMembs(scope.row)">{{(scope.row.membList == null || scope.row.membList.length == 0)?$t('professionalparticipants'):$t('setup')}}</el-link>
- </template>
- </el-table-column>
- <el-table-column prop="inchargerName" width="200" :label="$t('head')">
- <template slot-scope="scope">
- <el-select v-model="scope.row.inchargerId" v-if="user.userNameNeedTranslate != 1">
- <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
- <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="participator" :subjectId="scope.row.inchargerId" :other="scope.$index" :distinction="'4'" @selectCal="selectCal"></selectCat>
- </template>
- </el-table-column>
- <el-table-column width="80">
- <template slot-scope="scope">
- <el-button icon="el-icon-delete" size="mini" style="margin-left:10px;" @click.stop.native="deleteItem(scope.$index)"></el-button>
- </template>
- <template slot="header" >
- <el-link type="primary" :underline="false" @click="addItem">{{ $t('addTian') }}</el-link>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-tab-pane>
- <!-- <el-tab-pane label="相关领导" name="leaders" >
- <div style="padding-top:10px;">
- <el-input @focus="showChooseLeaderTree" v-model="addForm.notifyUserNames" placeholder="请选择需要接收审核通知的相关领导"></el-input>
- </div>
- </el-tab-pane> -->
- </el-tabs>
- </div>
-
- </el-form>
- </div>
- <div slot="footer" class="dialog-footer;">
- <el-button @click.native="deletePro(1, addForm)" v-if="(permissions.projectManagement || user.id==deleteVif) && addForm.id" style="float:left">{{ $t('btn.delete') }}</el-button>
- <el-button @click.native="addFormVisible = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitInsert" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <!-- 图片放大弹窗 -->
- <el-dialog :visible.sync="imgUrlListFlg" width="70%" :before-close="xhutDown">
- <img width="100%" :src="imgUrlLists" alt="">
- </el-dialog>
- <!--用户详细信息弹出框-->
- <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
- <div class="line"><span>{{ $t('lable.name') }}</span>
- <span v-if="user.userNameNeedTranslate != 1">{{userDetail.name}}</span>
- <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='userDetail.name'></ww-open-data></span>
- </div>
- <div class="line"><span>{{ $t('Worknumber') }}</span><span>{{userDetail.jobNumber}}</span></div>
- <div class="line"><span>{{ $t('lable.phone') }}</span><span>{{userDetail.phone}}</span></div>
- <div class="line"><span>{{ $t('jiao-se') }}</span><span>{{userDetail.roleName}}</span></div>
- <div class="line"><span>{{ $t('lable.department') }}</span>
- <span v-if="user.userNameNeedTranslate != 1">{{userDetail.departmentName}}</span>
- <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='userDetail.departmentName'></ww-open-data></span>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="userDetailVisible = false" >{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- <!-- 子项目列表 -->
- <el-dialog :title="$t('listofsubitems')" show-header="false" v-if="subProjectVisible" :visible.sync="subProjectVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-table :data="subProjectList" highlight-current-row height="400" style="width: 100%;">
- <el-table-column width="120" :label="$t('subprojectno')" prop="code"></el-table-column>
- <el-table-column prop="name" :label="$t('names')" ></el-table-column>
- <el-table-column :label="$t('operation')" width="220">
- <template slot-scope="scope" >
- <el-switch
- @change="changSubStatus(scope.row)"
- v-model="scope.row.status"
- active-color="#13ce66"
- inactive-color="#ff4949"
- style="margin-right: 20px;">
- </el-switch>
- <el-button size="small" type="primary" @click="addNewSubProject(scope.row)">{{ $t('bian-ji') }}</el-button>
- <el-button size="small" type="danger" @click="deleteSubPro(scope.row)">{{ $t('btn.delete') }}</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button type="default" :disabled="subProjectList.length == 0" @click="forSubProjectlist = list.filter(a=>a.id != currentProject.id);copySubPListVisible = true;" style="align:left;">复制到其他项目</el-button>
- <el-button type="primary" @click="subProjectVisible = false" >{{ $t('Shutdown') }}</el-button>
- <el-button type="primary" @click="addNewSubProject()" >{{ $t('addsubitems') }}</el-button>
- </div>
- </el-dialog>
- <!--选择项目弹出框-->
- <el-dialog title="选择要复制到的目标项目" v-if="copySubPListVisible" :visible.sync="copySubPListVisible" :close-on-click-modal="false" customClass="customWidth" width="700px">
- <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">
- <el-table-column type="selection" width="60" >
- </el-table-column>
- <el-table-column prop="projectCode" :label="$t('Itemno')" width="150"></el-table-column>
- <el-table-column prop="projectName" :label="$t('headerTop.projectName')" min-width="250">
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button @click.native="copySubPListVisible = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitCopySubProject()" >{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <!-- 新增子项目弹出框 -->
- <el-dialog :title="$t('modifysubproject')" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-form ref="form2" :model="temaddForm" :rules="rules" label-width="100px">
- <!-- <el-form-item label="项目编号" prop="code"> -->
- <el-form-item :label="$t('Itemno')">
- <el-input v-model="temaddForm.code" :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- <el-form-item :label="$t('headerTop.projectName')" prop="name">
- <el-input v-model="temaddForm.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click.native="addSubProject = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <!-- 项目基线成本项配置弹出框 -->
- <el-dialog :title="$t('baselinecostitemmanagement')" show-header="false" v-if="showBaseConfig" :visible.sync="showBaseConfig" :close-on-click-modal="false" customClass="customWidth" width="600px">
- <el-table :data="baseCostItemList" highlight-current-row height="400" style="width: 100%;">
- <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
- <template slot-scope="scope" >
- {{scope.$index+1+(page-1)*size}}
- </template>
- </el-table-column>
- <el-table-column prop="name" :label="$t('names')" ></el-table-column>
- <el-table-column prop="alarmType" :label="$t('yu-jing')">
- <template slot-scope="scope">
- <span>{{scope.row.alarmType ? $t('hourscostwarning') : $t('wu-yu-jing')}}</span>
- </template>
- </el-table-column>
- <el-table-column :label="$t('operation')" width="150">
- <template slot-scope="scope" >
- <el-button size="small" type="primary" @click="addNewBaseItem(scope.row)">{{ $t('bian-ji') }}</el-button>
- <el-button size="small" type="danger" @click="deleteBaseItem(scope.row)">{{ $t('btn.delete') }}</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="showBaseConfig = false" >{{ $t('Shutdown') }}</el-button>
- <el-button type="primary" @click="addNewBaseItem()" >{{ $t('newcostitem') }}</el-button>
- </div>
- </el-dialog>
- <!-- 项目关键节点配置弹出框 -->
- <el-dialog :title="$t('keyprojectnodes')" show-header="false" v-if="keyNodesIsShow" :visible.sync="keyNodesIsShow" :close-on-click-modal="false" customClass="customWidth" width="600px">
- <el-table :data="keyNodesList" highlight-current-row height="400" style="width: 100%;">
- <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
- <template slot-scope="scope" >
- {{scope.$index+1+(page-1)*size}}
- </template>
- </el-table-column>
- <el-table-column prop="name" :label="$t('names')" ></el-table-column>
- <el-table-column :label="$t('operation')" width="150">
- <template slot-scope="scope" >
- <el-button size="small" type="primary" @click="addNewkeyNodes(scope.row)">{{ $t('bian-ji') }}</el-button>
- <el-button size="small" type="danger" @click="deletekeyNodes(scope.row)">{{ $t('btn.delete') }}</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="keyNodesIsShow = false" >{{ $t('Shutdown') }}</el-button>
- <el-button type="primary" @click="addNewkeyNodes()" >{{$t('addingKeyNodes')}}</el-button>
- </div>
- </el-dialog>
- <!-- 分类条目配置 -->
- <el-dialog :title="$t('projectclassificationqwe')" show-header="false" v-if="showClfDialog" :visible.sync="showClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-table :data="baseClfList" highlight-current-row height="400" style="width: 100%;">
- <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
- <template slot-scope="scope" >
- {{scope.$index+1}}
- </template>
- </el-table-column>
- <el-table-column prop="name" :label="$t('names')" ></el-table-column>
- <el-table-column :label="$t('operation')" :width="user.companyId == '862' ? '300px' : '180px'">
- <template slot-scope="scope" >
- <el-button size="small" type="primary" @click="auditProcess(scope.row)" v-if="user.companyId == '862'" >{{ $t('AuditProcess') }}</el-button>
- <el-button size="small" type="primary" @click="addNewClf(scope.row)">{{ $t('bian-ji') }}</el-button>
- <el-button size="small" type="danger" @click="deleteClf(scope.row)">{{ $t('btn.delete') }}</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="showClfDialog = false" >{{ $t('Shutdown') }}</el-button>
- <el-button type="primary" @click="addNewClf()" >{{ $t('newCategoryItem') }}</el-button>
- </div>
- </el-dialog>
- <!-- 主项目配置 -->
- <el-dialog :title="$t('masterprojectmanagement')" show-header="false" v-if="mainProjectDialog" :visible.sync="mainProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="800px">
- <el-table :data="mainProjectList" highlight-current-row height="400" style="width: 100%;">
- <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
- <template slot-scope="scope" >
- {{scope.$index+1+(page-1)*size}}
- </template>
- </el-table-column>
- <el-table-column prop="code" :label="$t('bian-hao')" ></el-table-column>
- <el-table-column prop="name" :label="$t('names')" ></el-table-column>
- <el-table-column prop="categoryName" :label="$t('fen-lei-ming-cheng')" ></el-table-column>
- <el-table-column :label="$t('operation')" width="150">
- <template slot-scope="scope" >
- <el-button size="small" type="primary" @click="addManPro(scope.row)">{{ $t('bian-ji') }}</el-button>
- <el-button size="small" type="danger" @click="deleteManPro(scope.row)">{{ $t('btn.delete') }}</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="mainProjectDialog = false" >{{ $t('Shutdown') }}</el-button>
- <el-button type="primary" @click="addManPro()" >{{ $t('addzhuxiang') }}</el-button>
- </div>
- </el-dialog>
- <!-- 项目阶段配置 -->
- <el-dialog :title="$t('projectstagemanagement')" show-header="false" v-if="phaseProjectDialog" :visible.sync="phaseProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
- <el-table :data="phaseList" highlight-current-row height="400" style="width: 100%;">
- <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
- <template slot-scope="scope" >
- {{scope.$index+1+(page-1)*size}}
- </template>
- </el-table-column>
- <el-table-column prop="projectStageName" :label="$t('phasename')" ></el-table-column>
- <el-table-column :label="$t('operation')" width="150">
- <template slot-scope="scope" >
- <el-button size="small" type="primary" @click="addPanthPro(scope.row)">{{ $t('bian-ji') }}</el-button>
- <el-button size="small" type="danger" @click="deletePanthPro(scope.row)">{{ $t('btn.delete') }}</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="phaseProjectDialog = false" >{{ $t('Shutdown') }}</el-button>
- <el-button type="primary" @click="addPanthPro()" >{{ $t('newprojectstage') }}</el-button>
- </div>
- </el-dialog>
- <!-- 项目级别管理 -->
- <el-dialog :title="$t('projectlevelmanagement')" show-header="false" v-if="projectLevelDialog" :visible.sync="projectLevelDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
- <el-table :data="levelList" highlight-current-row height="400" style="width: 100%;" >
- <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
- <template slot-scope="scope" >
- {{scope.$index+1+(page-1)*size}}
- </template>
- </el-table-column>
- <el-table-column prop="projectLevelName" :label="$t('levelnames')" ></el-table-column>
- <el-table-column :label="$t('operation')" width="150">
- <template slot-scope="scope" >
- <el-button size="small" type="primary" @click="addProjectLevel(scope.row)">{{ $t('bian-ji') }}</el-button>
- <el-button size="small" type="danger" @click="deleteProjectLevel(scope.row)">{{ $t('btn.delete') }}</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="projectLevelDialog = false" >{{ $t('Shutdown') }}</el-button>
- <el-button type="primary" @click="addProjectLevel()" >{{ $t('newProjectLevel') }}</el-button>
- </div>
- </el-dialog>
-
- <el-dialog title="项目预估工时配置" show-header="false" v-if="projectManDaySettingDialog" :visible.sync="projectManDaySettingDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
- <el-form label-width="200px" :form="manDaySetting">
- <el-form-item :label="'预估工时是否必填'" >
- <el-select v-model="manDaySetting.projectManDayFillMode" :placeholder="$t('defaultText.pleaseChoose')" >
- <el-option label="非必填" :value="0"></el-option>
- <el-option label="工时系统创建的项目必填" :value="1"></el-option>
- <el-option label="工时系统和外部同步的项目都必填" :value="2"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="'项目工时剩余提醒百分比'" >
- <el-input v-model="manDaySetting.projectWarningPercent" type="number" style="width:200px;">
- </el-input>%
- </el-form-item>
- <el-form-item :label="'项目工时不足时'" >
- <el-select v-model="manDaySetting.projectFronzeOnLack" :placeholder="$t('defaultText.pleaseChoose')" >
- <el-option label="禁止填报" :value="1"></el-option>
- <el-option label="可以填报,仅提醒" :value="0"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="'分组工时剩余提醒百分比'" v-if="user.company.packageProject == 1">
- <el-input v-model="manDaySetting.groupWarningPercent" type="number" style="width:200px;">
- </el-input>%
- </el-form-item>
- <el-form-item :label="'分组工时不足时'" v-if="user.company.packageProject == 1" >
- <el-select v-model="manDaySetting.groupFronzeOnLack" :placeholder="$t('defaultText.pleaseChoose')" >
- <el-option label="禁止填报" :value="1"></el-option>
- <el-option label="可以填报,仅提醒" :value="0"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="default" @click="projectManDaySettingDialog = false" >{{ $t('Shutdown') }}</el-button>
- <el-button type="primary" @click="saveProjectManDaySetting()" >保存</el-button>
- </div>
- </el-dialog>
- <!-- 导出任务分组 -->
- <el-dialog :title="'导出任务分组'" show-header="false" v-if="groupTaskDialog" :visible.sync="groupTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
- <el-form>
- <el-form-item :label="'自主项目类别'">
- <el-select v-model="projectCategorySubId" :placeholder="$t('defaultText.pleaseChoose')" clearable >
- <el-option v-for="item in projectCategorySubList" :key="item.value" :label="item.label" :value="item.value"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="groupTaskDialog = false" >{{ $t('Shutdown') }}</el-button>
- <el-button type="primary" @click="exportProjectGroup" >{{ '导出' }}</el-button>
- </div>
- </el-dialog>
- <!-- 新增/编辑项目级别 -->
- <el-dialog :title="$t('modifyingtheprojectLevel')" v-if="addProjectLevelDialog" :visible.sync="addProjectLevelDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-form ref="form2" :model="addLevelForm" :rules="rules" label-width="120px">
- <el-form-item :label="$t('projectLevelName')" prop="projectLevelName">
- <el-input v-model="addLevelForm.projectLevelName" :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addProjectLevelDialog = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitLevelPro" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <!-- 新增/编辑 分类条目 -->
- <el-dialog :title="$t('addmodifycategoryentry')" v-if="addClfDialog" :visible.sync="addClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-form ref="form2" :model="addClf" :rules="rules" label-width="100px">
- <!-- <el-form-item :label="$t('mainProjectName')" prop="name"> -->
- <el-form-item :label="$t('fen-lei-ming-cheng')" prop="name">
- <el-input v-model="addClf.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click.native="addClfDialog = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitClf" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <!-- 分类条目有关审核流程设置 -->
- <el-dialog :title="$t('AuditProcess')" v-if="auditProcessDialog" :visible.sync="auditProcessDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-form ref="form2" :model="auditProcess" :rules="rules" label-width="150px">
- <!-- <el-form-item :label="$t('mainProjectName')" prop="name"> -->
- <el-form-item :label="$t('AuditProcess')" prop="name">
- <template>
- <el-checkbox v-model="addClf.proInchargerAudit" >项目审核人审核</el-checkbox>
- <div style="width: 120px ; text-align: center;"><i class="el-icon-bottom"></i></div>
- <el-checkbox v-model="addClf.proBuAudit" >项目所属BU负责人审核</el-checkbox>
- </template>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click.native="auditProcessDialog = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitClf" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <!-- 新增/编辑主项目 -->
- <el-dialog :title="$t('modifythemainproject')" v-if="addFlgmainProjectDialog" :visible.sync="addFlgmainProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-form ref="form2" :model="addMainForm" :rules="rules" label-width="100px">
- <!-- <el-form-item label="主项目编号" prop="code"> -->
- <el-form-item :label="$t('mainProjectNo')">
- <el-input v-model="addMainForm.code" :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- <el-form-item :label="$t('mainProjectName')" prop="name">
- <el-input v-model="addMainForm.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- <el-form-item :label="$t('projectclassification')">
- <el-select v-model="addMainForm.categoryId" :placeholder="$t('defaultText.pleaseChoose')" clearable >
- <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click.native="addFlgmainProjectDialog = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitManPro" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <!-- 新增/编辑项目阶段 -->
- <el-dialog :title="$t('modifyingtheprojectphase')" v-if="addFlgPanthProjectDialog" :visible.sync="addFlgPanthProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-form ref="form2" :model="addPanthForm" :rules="rules" label-width="120px">
- <el-form-item :label="$t('projectStageName')" prop="name">
- <el-input v-model="addPanthForm.projectStageName" :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click.native="addFlgPanthProjectDialog = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitPanthPro" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="$t('modificationcostitem')" v-if="addBaseItemDialog" :visible.sync="addBaseItemDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-form ref="form2" :model="addForm" :rules="rules" label-width="100px">
- <el-form-item :label="$t('nameofcostitem')" prop="name">
- <el-input v-model="addForm.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- <el-form-item :label="$t('yu-jing')" prop="alarmType">
- <el-radio v-model="addForm.alarmType" :label="0">{{ $t('wu-yu-jing') }}</el-radio>
- <el-radio v-model="addForm.alarmType" :label="1">{{ $t('hourscostwarning') }}</el-radio>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click.native="addBaseItemDialog = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitInsertBaseItem" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="$t('modifyingKeyNodesn')" v-if="addBasekeyNodesialog" :visible.sync="addBasekeyNodesialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-form ref="form2" :model="addFormkeyNodes" :rules="rules" label-width="120px">
- <el-form-item :label="$t('keyNodeNames')" prop="name">
- <el-input v-model.trim="addFormkeyNodes.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click.native="addBasekeyNodesialog = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitkeyNodes" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
- </el-dialog>
- <!-- 按部门选择人员 -->
- <el-dialog :title="$t('selectingParticipants')" :visible.sync="chooseParticipVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
- <div v-if="user.userNameNeedTranslate == '1'">
- <el-input placeholder="请输入内容" v-model.trim="filterText" class="input-with-select">
- <el-button slot="append" icon="el-icon-search" @click="echartDepartment()"></el-button>
- </el-input>
- </div>
-
- <div class="tree" style="height:400px">
- <el-scrollbar style="height:100%">
- <el-input
- :placeholder="$t('keywordfiltering')"
- v-model="filterText" v-if="user.userNameNeedTranslate != '1'">
- </el-input>
- <el-tree :data="deptMembData" :key="searchPersonnelFlgnum" show-checkbox :default-expand-all="searchPersonnelFlg" :props="defaultProps" node-key="id"
- ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
- highlight-current :filter-node-method="filterNode">
- <span class="custom-tree-node" slot-scope="{ node, data }">
- <span v-if="user.userNameNeedTranslate == '1'">
- <span v-if="node.data.children">
- <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
- </span>
- <span v-else>
- <ww-open-data type='userName' :openid='node.label'></ww-open-data>
- </span>
- </span>
- <span v-if="user.userNameNeedTranslate != '1'">
- {{ node.label }}
- </span>
- <!-- {{ node.label }} -->
- </span>
- </el-tree>
- </el-scrollbar>
- </div>
- <div>{{ $t('btn.choose') }} {{chosenMembCount}} {{ $t('other.people') }}</div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="chooseParticipVisible = false" >{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="chooseParticip()" >{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- <!-- 按部门选择相关领导,弃用 -->
- <!-- <el-dialog title="选择相关领导" v-if="chooseLeaderVisible" :visible.sync="chooseLeaderVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <div class="tree" style="height:400px">
- <el-scrollbar style="height:100%">
- <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
- ref="chooseLeaderTree" @check-change="onLeaderTreeItemChange" :default-checked-keys="addForm.notifyUserIds"
- highlight-current ></el-tree>
- </el-scrollbar>
- </div>
- <div>已选中 {{chosenMembCount}} 人</div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="chooseLeaderVisible = false" >取消</el-button>
- <el-button type="primary" @click="chooseLeader()" >确定</el-button>
- </div>
- </el-dialog> -->
- <!-- 项目专业人员的设置 -->
- <el-dialog :title="$t('setupprojectprofessionals')" v-if="editPpMembDialog" :visible.sync="editPpMembDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
- <div class="gongcheng">
- <el-table :data="curProfessionRow.membList" height="400">
- <el-table-column prop="name" :label="$t('professionals')">
- <template slot-scope="scope">
- <el-select v-model="scope.row.membId" v-if="user.userNameNeedTranslate != 1" filterable :placeholder="$t('professionaladdsparticipant')" style="width:100%;" >
- <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
- <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :subject="participator" :subjectId="scope.row.membId" :distinction="'11'" :other="scope.$index" @selectCal="selectCal"></selectCat>
- </template>
- </el-table-column>
- <el-table-column prop="percentage" width="120" :label="$t('zhan-bi')">
- <template slot-scope="scope">
- <el-input type="number" v-model="scope.row.percentage"></el-input>
- </template>
- </el-table-column>
- <el-table-column width="80">
- <template slot-scope="scope">
- <el-button icon="el-icon-delete" size="mini" style="margin-left:10px;" @click.stop.native="deleteMembItem(scope.$index)"></el-button>
- </template>
- <template slot="header" >
- <el-link @click="addMembItem" type="primary">{{ $t('addTian') }}</el-link>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button @click="editPpMembDialog = false" >{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="addPpMemb" >{{ $t('btn.determine') }}</el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 批量修改自定义维度 -->
- <el-dialog :title="checkoradd ? $t('changes') : $t('pi-liang-tian-jia')" :visible.sync="checkedWuduDialog" v-if="checkedWuduDialog" width="40%">
- <el-form model="" label-width="20%">
- <el-form-item :label="$t('setup') + user.timeType.customDegreeName">
- <el-select v-model="checkedWuduArr" value-key="id" :placeholder="$t('defaultText.pleaseChoose') + user.timeType.customDegreeName" multiple style="width: 100%">
- <el-option v-for="item in ause" :key="item.id" :label="item.name" :value="item"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="checkedWuduDialog = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="batchSetWudulistBtn3" v-if="checkoradd">{{ $t('btn.determine') }}</el-button>
- <el-button type="primary" @click="batchSetWudulistBtn4" v-if="!checkoradd">{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- <!-- 批量添加参与人 -->
- <el-dialog :title="isAddGroupPerson ? $t('groupparticipantsinbatches') : $t('projectparticipantsinbatches')" v-if="addGroupPersonDialog" :visible.sync="addGroupPersonDialog" width="600px">
- <el-form label-width="20%">
- <el-form-item :label="$t('screening.selectPeople')">
- <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate != '1'">
- <div slot="content" style="width:450px">{{addGroupPersonData.personNames}}</div>
- <el-input @focus="addGroupPersonP" v-model="addGroupPersonData.personNames"></el-input>
- </el-tooltip>
- <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate == '1'">
- <div slot="content" style="width:580px">
- <span v-for="(item, index) in addGroupPersonDataPersonNames" :key="index">
- <!-- {{item}} -->
- <ww-open-data type='userName' :openid='item'></ww-open-data>
- <span v-if="index < addGroupPersonDataPersonNames.length - 1">,</span>
- </span>
- </div>
- <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">
- <span v-for="(item, index) in addGroupPersonDataPersonNames" :key="index">
- <!-- {{item}} -->
- <ww-open-data type='userName' :openid='item'></ww-open-data>
- <span v-if="index < addGroupPersonDataPersonNames.length - 1">,</span>
- </span>
- </div>
- </el-tooltip>
- </el-form-item>
- <el-form-item :label="$t('xuan-ze-fen-zu')" v-if="isAddGroupPerson">
- <el-select v-model="addGroupPersonData.group" multiple :placeholder="$t('selectagroup')" style="width:100%">
- <el-option v-for="item in addGroupList"
- :key="item.groupIds"
- :label="item.name"
- :value="item.groupIds"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addGroupPersonDialog = false" >{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="addGroupPersonSure()" v-if="isAddGroupPerson">{{ $t('btn.determine') }}</el-button>
- <el-button type="primary" @click="addProPersonSure()" v-else>{{ $t('btn.determine') }}</el-button>
- </div>
- <el-dialog append-to-body :title="$t('screening.selectPeople')" v-if="addGroupPersonPdialog" :visible.sync="addGroupPersonPdialog" width="40%">
- <div class="tree" style="height:300px">
- <el-scrollbar style="height:100%">
- <el-input
- :placeholder="$t('keywordfiltering')"
- v-model="filterText2"
- v-if="user.userNameNeedTranslate != 1">
- </el-input>
- <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
- ref="chooseMembTree2" @check-change="addPersonCheck"
- highlight-current :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person">
- <span class="custom-tree-node" slot-scope="{ node, data }">
- <span v-if="user.userNameNeedTranslate == '1'">
- <span v-if="node.data.children">
- <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
- </span>
- <span v-else>
- <ww-open-data type='userName' :openid='node.label'></ww-open-data>
- </span>
- </span>
- <span v-if="user.userNameNeedTranslate != '1'">
- {{ node.label }}
- </span>
- </span>
- </el-tree>
- </el-scrollbar>
- </div>
- <div>{{ $t('btn.choose') }} {{chosenMembCount}} {{ $t('other.people') }}</div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addGroupPersonPdialog = false" >{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="addPersonSure()" >{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- </el-dialog>
- <!-- 批量设置项目经理 -->
- <el-dialog :title="$t('projectmanagersinbatches')" v-if="batchInchargerDialog" :visible.sync="batchInchargerDialog" width="500px">
- <el-form model="" label-width="120px">
- <el-form-item :label="$t('setupprojectmanager')">
- <el-select v-if="user.userNameNeedTranslate != '1'" v-model="paramInchargerId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 80%" filterable clearable>
- <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
- <span style="float: left">{{item.name}}</span>
- <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
- </el-option>
- </el-select>
- <selectCat :size="'small'" :widthStr="'272'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="paramInchargerId" :distinction="'5'" @selectCal="selectCal"></selectCat>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="batchInchargerDialog = false" >{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="batchInchargerSure()">{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="$t('importproject')" v-if="importProjectBeforeDialog" :visible.sync="importProjectBeforeDialog" width="30%">
- <el-checkbox v-model="paramData1" style="margin-left:10px">{{ $t('dui-yi-you-xiang-mu-jin-hang-xin-xi-geng-xin') }}</el-checkbox>
- <el-checkbox v-model="changeParticipation" @change="changeParticipationValue(changeParticipation)" style="margin-left:10px" >{{ '根据文件中参与人对现有的进行删减' }}</el-checkbox>
- <div slot="footer" class="dialog-footer" style="text-algin:center;">
- <el-upload ref="upload" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
- <el-button type="primary">{{ $t('importproject') }}</el-button>
- </el-upload>
- </div>
- </el-dialog>
- <el-dialog :title="$t('xiu-gai-xiang-mu-dang-qian-jie-duan')" v-if="changeStageDialogVisible" :visible.sync="changeStageDialogVisible" width="300px">
- <el-select v-model="curChangeProject.curStageId" filterable :placeholder="$t('pleaseselecttheprojectphase')" style="margin: 0 auto;">
- <el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
- </el-select>
- <div slot="footer" class="dialog-footer" style="text-algin:center;">
- <el-button type="primary" @click="confirmChangeStage">{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- <el-dialog append-to-body :title="$t('projectimportresult')" v-if="showImportResult" :visible.sync="showImportResult" width="40%">
- <div >
- {{importResultMsg}}
- </div>
- </el-dialog>
- <!-- 职能分工设置 -->
- <el-dialog :title="'职能分工设置'" v-if="functionalDivisionDig" :visible.sync="functionalDivisionDig" width="80%">
- <el-table border :data="functionalList" style="width: 100%">
- <el-table-column prop="id" label="序号" width="50" type="index" align="center"
- :index="index=>index+1"/>
- <el-table-column prop="timeType" label="工时类型" align="center">
- <template slot-scope="scope">
- <span v-show="!scope.row.editFlag">{{scope.row.timeType}}</span>
- <el-select v-show="scope.row.editFlag" v-model="scope.row.timeType" placeholder="请选择">
- <el-option
- v-for="item in timeTypeList"
- :key="item.value"
- :label="item.label"
- :value="item.label">
- </el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="roleId" label="角色" align="center">
- <template slot-scope="scope">
- <span v-show="!scope.row.editFlag">{{scope.row.role}}</span>
- <el-select v-show="scope.row.editFlag" v-model="scope.row.role" placeholder="请选择">
- <el-option
- v-for="item in roleList"
- :key="item.value"
- :label="item.label"
- :value="item.label">
- </el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="jobRespon" label="工作职责" align="center">
- <template slot-scope="scope">
- <span v-show="!scope.row.editFlag">{{scope.row.jobRespon}}</span>
- <el-input v-show="scope.row.editFlag"
- v-model="scope.row.jobRespon">
- </el-input>
- </template>
- </el-table-column>
- <el-table-column prop="workContext" label="工作内容" align="center">
- <template slot-scope="scope">
- <a v-if="scope.row.id" @click="workContextDig=true,getWorkContextList(scope.row.id)" style="color:#409EFF">{{'数据维护'}}</a>
- <a v-else>{{'数据维护'}}</a>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="120" align="center">
- <template slot-scope="scope">
- <div style="display: flex;">
- <el-button size="small"
- type="text"
- icon="CircleCheck"
- v-show="scope.row.editFlag"
- @click="functionalSubmit(scope.row)">确定
- </el-button>
- <el-button size="small"
- type="text"
- icon="CircleClose"
- v-show="scope.row.editFlag"
- @click="functionalCancel(scope.row,scope.$index,'functional')">取消
- </el-button>
- <el-button size="small"
- icon="Edit"
- type="text"
- v-show="!scope.row.editFlag"
- @click="functionalEditVersion(scope.row)"> 编辑
- </el-button>
- <el-button size="small"
- icon="Delete"
- type="text"
- v-show="!scope.row.editFlag"
- @click="functionalDelVersion(scope.row,scope.$index)">删除
- </el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addFunctional('functional')" type="primary">添加一行</el-button>
- <el-button @click="functionalDivisionDig = false" >{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitFunctional()">{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- <!-- 工作内容dig -->
- <el-dialog :title="'工作内容'" v-if="workContextDig" :visible.sync="workContextDig" width="40%">
- <el-table border :data="workContextList" style="width: 100%">
- <el-table-column prop="id" label="序号" width="50" type="index" align="center"
- :index="index=>index+1"/>
- <el-table-column prop="workContext" label="工作内容" align="center">
- <template slot-scope="scope">
- <span v-show="!scope.row.editFlag">{{scope.row.workContext}}</span>
- <el-input v-show="scope.row.editFlag"
- v-model="scope.row.workContext">
- </el-input>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="120" align="center">
- <template slot-scope="scope">
- <div style="display: flex;">
- <el-button size="small"
- type="text"
- icon="CircleCheck"
- v-show="scope.row.editFlag"
- @click="functionalSubmit(scope.row)">确定
- </el-button>
- <el-button size="small"
- type="text"
- icon="CircleClose"
- v-show="scope.row.editFlag"
- @click="functionalCancel(scope.row,scope.$index,'workContext')">取消
- </el-button>
- <el-button size="small"
- icon="Edit"
- type="text"
- v-show="!scope.row.editFlag"
- @click="functionalEditVersion(scope.row)"> 编辑
- </el-button>
- <el-button size="small"
- icon="Delete"
- type="text"
- v-show="!scope.row.editFlag"
- @click="workContextDelVersion(scope.row,scope.$index)">删除
- </el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addFunctional('workContext')" type="primary">添加一行</el-button>
- <el-button @click="workContextDig = false" >{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitWorkContext()">{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- <!-- 批量增加任务分组 -->
- <!-- <el-dialog :title="'批量增加任务分组'" v-if="addTaskGroupDig" :visible.sync="addTaskGroupDig" width="40%">
- <el-form label-width="20%">
- <el-form-item :label="'分组名称:'">
- <el-input v-model="batchAddTaskGroupName" placeholder="请输入内容"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addTaskGroupDig = false,this.batchAddTaskGroupName=null">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="batchAddTaskGroup()">{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog> -->
- <!-- 批量设置任务分组负责人 -->
- <el-dialog :title="'批量设置任务分组负责人'" v-if="addTaskGroupInchargerDig" :visible.sync="addTaskGroupInchargerDig" width="40%">
- <el-form label-width="20%">
- <el-form-item :label="'分组名称:'">
- <el-select v-model="hasSetGroupName" placeholder="请选择">
- <el-option
- v-for="item in hasSetGroupList"
- :key="item.value"
- :label="item.label"
- :value="item.label">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="'分组负责人:'">
- <el-select v-if="user.userNameNeedTranslate != '1'" v-model="hasSetGroupInchargerId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 80%" filterable clearable>
- <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
- <span style="float: left">{{item.name}}</span>
- <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
- </el-option>
- </el-select>
- <selectCat :size="'small'" :widthStr="'272'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="hasSetGroupInchargerId" :distinction="'6'" @selectCal="selectCal"></selectCat>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addTaskGroupInchargerDig = false,this.hasSetGroupInchargerId=null,this.hasSetGroupName=null">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="batchSetGroupIncharger()">{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- <!-- 项目同步弹窗 -->
- <el-dialog title="项目服务同步" :visible.sync="syncProjectDig" width="600px" :before-close="handleClose">
- <el-form label-width="0">
- <div class="synchronization">
- <div class="synchronizationLabel">
- <el-select v-model="synchronizationVal" placeholder="请选择" @change="synchronizationChange()">
- <el-option label="已同步项目" value="0"></el-option>
- <el-option label="未同步项目" value="1"></el-option>
- </el-select>
- </div>
- <el-form-item style="flex: 1" v-if="synchronizationVal == 0">
- <el-select filterable collapse-tags clearable v-model="hasChooseProjectCode" multiple placeholder="请选择" style="width:100%">
- <el-option v-for="item in allProjectList" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.projectCode">
- <span style="float: right; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
- <span style="float: left;">{{ item.projectName }}</span>
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item style="flex: 1" v-if="synchronizationVal == 1">
- <el-input placeholder="请输入项目编号" v-model="synchronizationInputVal" clearable></el-input>
- </el-form-item>
- </div>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="syncProjectDig = false">取 消</el-button>
- <el-button type="primary" @click="syncProjectForThird(hasChooseProjectCode)">开始同步</el-button>
- </span>
- </el-dialog>
- <!--导入数据,下载模板 -->
- <el-dialog :title="$t('wdorkplanimport')" v-if="importTaskDialog" :visible.sync="importTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
- <el-form ref="form4" >
- <el-form-item :label="'1. '+$t('qing-xian-xia-zai-mo-ban-bing-tian-xie-hou-shang-chuan')" >
- <el-link type="primary" :underline="false" href="./upload/多项目任务导入模板.xlsx" download="多项目任务模板.xlsx'">下载多项目任务模板</el-link>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
- <el-button type="primary" :underline="false" style="width:100%;" :loading="loadingExport">{{ $t('uoloadFiles') }}</el-button>
- </el-upload>
- </div>
- </el-dialog>
- <!-- 新增任务分组弹出框 -->
- <el-dialog v-if="addTaskGroupDig" :visible.sync="addTaskGroupDig" :close-on-click-modal="false" customClass="customWidth" width="600px">
- <div slot="title" >
- <el-tabs v-model="createGroupWay">
- <el-tab-pane :label="$t('newgrouping')" name="new">
- <el-form ref="formGrouping" :model="groupForm" :rules="formGrouping" style="margin-top:40px;">
- <el-form-item prop="name">
- <el-input v-model.trim="groupForm.name" :placeholder="$t('pleaseenteragroupname')" maxlength="50"
- show-word-limit clearable></el-input>
- </el-form-item>
- <el-button type="primary" @click="addGroup('formGrouping')" style="width:100%;" >{{ $t('create') }}</el-button>
- </el-form>
- </el-tab-pane>
- <el-tab-pane :label="$t('creatintemplate')" name="template">
- <el-card class="template_box" :style="t.selected?'border: 1px solid #409eff;':''" v-for="(t,tIndex) in groupTemplateList" :key="t.id" @click.native="choseTemplate(tIndex)">
- <div>
- <el-row >
- <el-col :span="22">
- <div><span>{{t.name}}</span>
- <el-link :underline="false" type="primary" style="color:#aaa;margin-left:10px;"
- @click="setTemplate(t)"><i class="el-icon-setting" v-show="t.isSystem == 0" ></i>
- </el-link>
- <el-link :underline="false" type="primary" style="color:#aaa;margin-left:10px;"
- @click="deleteTemplate(t)"><i class="el-icon-delete" v-show="t.isSystem == 0" ></i>
- </el-link>
- </div>
- <div style="margin-top:10px;">
- <span style="color:#8c8c8c;font-size:12px;" v-for="(s,index) in t.stagesList" :key="s.id">
- <i class="el-icon-arrow-right" v-if="index>0"></i>
- {{s.stagesName}}</span>
- </div>
- </el-col>
- <el-col :span="2">
- <i class="el-icon-check" v-show="t.selected" style="font-size:20px;color:#409eff;margin-top:12px;"></i>
- </el-col>
-
- </el-row>
-
- </div>
- </el-card>
- <el-button type="primary" @click="addTemplateGroup" style="width:100%;" >{{ $t('create') }}</el-button>
- </el-tab-pane>
- </el-tabs>
- </div>
- <el-dialog :title="$t('bian-ji-mo-ban')" append-to-body v-if="setTemplateDialog" :visible.sync="setTemplateDialog" width="500px">
- <el-form label-width="20%">
- <el-form-item :label="$t('mo-ban-ming-cheng')"><el-input v-model="setTemplateData.name" style="width:80%" clearable></el-input></el-form-item>
- <el-form-item label=""><el-checkbox v-model="setTemplateData.creWithPro">{{ $t('suixiangmuzidongchuangjian') }}</el-checkbox></el-form-item>
- <el-form-item v-for="item,index in setTemplateData.stagesList" :key="item.id" :label="index == 0 ? '任务列表' : ''">
- <el-input v-model="item.stagesName" style="width:70%" clearable></el-input>
- <el-link :underline="false" type="primary" style="color:#aaa;" @click="deleteStages(item,index)" v-if="index != 0">
- <i class="el-icon-delete"></i>
- </el-link>
- </el-form-item>
- <el-link style="margin-left:20%" :underline="false" type="primary" @click="addStages()">{{ $t('xin-zeng-ren-wu-lie-biao') }}</el-link>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="setTemplateDialog = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="setTemplateSave()">{{ $t('save') }}</el-button>
- </div>
- </el-dialog>
- </el-dialog>
- </section>
- </template>
- <style scoped>
- .input-with-select .el-input-group__prepend {
- background-color: #fff;
- }
- .line {
- padding:10px;
- }
- .line span{
- font-size:15px;
- }
- .line span:nth-child(even){
- float:right;
- }
- .kans {
- width: 230px;
- overflow:hidden;
- white-space:nowrap;
- text-overflow: ellipsis;
- }
- a {
- text-decoration: none;
- }
-
- .router-link-active {
- text-decoration: none;
- }
- </style>
- <script>
- import util from "../../common/js/util";
- import projectgantt from "./project_gantt.vue"
- // 自定义select组件
- import selectCat from "@/components/select.vue"
- export default {
- components:{
- projectgantt,
- selectCat
- },
- data() {
- return {
- importTaskDialog: false,
- manDaySetting:{},
- projectManDaySettingDialog: false,
- projectListPageComponentKey: 1,
- isDeleting: false,
- forSubProjectlist:[],
- copySubPListVisible: false,
- projectManagerEdit: false,
- canOnlyModParticipator: false,
- curChangeProject:null,
- changeStageDialogVisible: false,
- addFlgmainProjectDialog: false,
- addFlgPanthProjectDialog: false,
- addProjectLevelDialog: false,
- mainProjectList: [],
- mainProjectDialog: false,
- projectLevelDialog: false,
- showImportResult: false,
- importResultMsg:null,
- isganttshow: false,
- deleteAlertMsg: null,
- chosenLeaders:[],
- baseClfList:[],
- chooseLeaderVisible:false,
- projectProfessionItem:null,
- curProfessionRow:null,
- editPpMembDialog:false,
- professionList:[],
- projectProfessionList:[],
- activeName:"baseCostPanel",
- chosenMembCount:0,
- chosenMembList:[],//选中的人员
- allMembData:[],
- auditProcessDialog: false,
- deptMembData: [
- {
- id: 0,
- label: this.$t('lable.unassigned'),
- }
- ],
- option: [],
- depData: {
- id: -1,
- label: this.$t('lable.allStaff'),
- },
- defaultProps: {
- children: 'children',
- label: 'label'
- },
-
- wxFilterText: '',
- mainProjectId:'',
- filterName:null,
- chooseParticipVisible: false,
- projectBaseCostData:[],
- addBaseItemDialog:false,
- showBaseConfig:false,
- customerList:[],
- 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')],
- status:"1",
- statusTxt:["-",this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone'),this.$t('paused')],
- 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')}],
- 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')],
- searchField:'1',
- keyword:null,
- user: JSON.parse(sessionStorage.getItem("user")),
- permissions: JSON.parse(sessionStorage.getItem("permissions")),
- userDetailVisible: false,
- userDetail:{},
- date: new Date(),
- users: [],
- participator:[],
- tableHeight: 0,
- listLoading: false,
- total: 0,
- page: 1,
- size: localStorage.getItem("projectPageSize")==null?20:parseInt(localStorage.getItem("projectPageSize")),
- list: [],
- subProjectVisible: false,
- subProjectList: [],//子项目列表
- currentProject:{},
- addSubProject: false,
- addFormVisible: false,
- addLoading: false,
- groupTaskDialog:false,
- addUp: 0, // 合计
- title: "",
- addForm: {
- name: '',
- userId: [],
- level:1,
- bu:'',
- id: '',
- code: '',
- projectDesc: '',
- alarmType: 0
- },
- addFormUserNames: [],
- temaddForm: {},
- rules: {
- name: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
- code: [{ required: true, message: this.$t('qing-shu-ru-bian-hao'), trigger: "blur" }],
- projectStageName: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
- projectLevelName: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
- deptId: [{ required: true, message: '请选择所属部门', trigger: "blur" }]
- },
- ause: [],
- auseList: [],
- yonghuUser: [],
- filterText: '',
- filterText2: '',
- showClfDialog: false,
- addClfDialog:false,
- addClf:{name:'',id:''},
- addMainForm:{
- name:'',
- id:'',
- code: '',
- categoryId: ''
- },
- addPanthForm: {
- id: '',
- projectStageName: ''
- },
- addLevelForm: {
- id: '',
- projectStageName: ''
- },
- statusClf:null,
- permissionsObj: {},
- checkedPForSubArr:[],
- checkedProjectArr: [],
- checkedWuduDialog: false,
- checkedWuduArr: [],
- checkoradd: true,
- addGroupPersonBtnLoading: false,
- addGroupPersonDialog: false,
- addGroupList: [],
- addGroupPersonData: {
- group: [],
- person: null,
- personNames: ''
- },
- addGroupPersonPdialog: false,
- showColumnWidth: '300',
- deleteVif: null,
- isAddGroupPerson: true,
- projectMainId: '',
- supplierList: '',
- sortProp: '',
- sortOrder: null,
- currentCell: null, // 当前单击的是哪一个单元格
- phaseList: [],
- phaseProjectId: '', // 阶段项目id
- phaseProjectValie: null, // 阶段项目值
- listHeader: [], // 列表表头
- rowid: '',
- phaseProjectDialog: false, // 项目阶段
- levelList: [], // 项目级别
- departmentList: [],
- deptId: [],
- buOption:[],
- contractAmountOld: 0,
- contractAmountReasonShow: false,
- centerNameDegree: '',
- batchInchargerDialog: false,
- paramInchargerId: '',
- inchagerId: '',
- keyNodesIsShow: false,
- keyNodesList: [],
- projectKeyNodesData: [],
- addBasekeyNodesialog: false,
- addFormkeyNodes: {
- name: ''
- },
- participationId: '',
- importProjectBeforeDialog: false,
- paramData1: false,
- chosenListBackup: [], // 备份
- searchPersonnelFlg: false,
- searchPersonnelFlgnum: 1,
- createDate: [], // 项目筛选时间段
- exportDisabled: false,
- exportNotification: null,
- dataList: [],
- dataListBf: [],
- imgUrlLists: '',
- imgUrlListFlg: false,
- estimatedWorkTime:'',
- projectCategorySubList:[
- {
- value: 1,
- label: '纯软件项目'
- },
- {
- value: 2,
- label: '纯硬件项目'
- },
- {
- value: 3,
- label: '集成项目'
- },
- {
- value: 4,
- label: '服务项目'
- }
- ],
- projectCategorySubId:'',
- // 威派格定制(只有管理员才能更改项目名称,编号,级别,合同,大区,经理)
- isShowProjectName: false,
- //职能相关字段
- functionalDivisionDig:false,
- functionalList:[],
- timeTypeList:[
- {
- value: 1,
- label: '项目工时'
- },
- {
- value: 2,
- label: '非项目工时'
- },
- ],
- roleList:[
- {
- value: 1,
- label: 'CRC&LM'
- },
- {
- value: 2,
- label: 'PM'
- },
- ],
- //工作内容
- workContextDig:false,
- functionalId:null,
- workContextList:[],
- oldValue:null,
- addTaskGroupDig:false,
- batchAddTaskGroupName:null,
- hasSetGroupName:null,
- hasSetGroupInchargerId:null,
- hasSetGroupList:[],
- addTaskGroupInchargerDig:false,
- filterNodePersonnel: [],
- syncProjectDig:false,
- allProjectList:[],
- hasChooseProjectCode:[],
- synchronizationVal: '0',
- synchronizationInputVal: '',
- groupTemplateList:[],
- createGroupWay:'new',
- groupForm:{},
- setTemplateDialog: false,
- selectedGroup:{},
- changeParticipation:false,
- };
- },
- // 过滤器
- filters: {
- numberToCurrency(value) {
- if (!value) return '0.00'
- // 将数值截取,保留两位小数
- value = value.toFixed(2)
- // 获取整数部分
- const intPart = Math.trunc(value)
- // 整数部分处理,增加,
- const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
- // 预定义小数部分
- let floatPart = '.00'
- // 将数值截取为小数部分和整数部分
- const valueArray = value.toString().split('.')
- if (valueArray.length === 2) { // 有小数部分
- floatPart = valueArray[1].toString() // 取得小数部分
- return intPartFormat + '.' + floatPart
- }
- return intPartFormat + floatPart
- },
- mobans(value, valueList) {
- for(var i in valueList) {
- if(valueList[i].providerCateGoryName == value) {
- return valueList[i].providerInfoName
- }
- }
- },
- },
- watch: {
- filterText(val) {
- let { userNameNeedTranslate } = JSON.parse(sessionStorage.getItem("user"))
- if(userNameNeedTranslate != 1) {
- this.$refs.chooseMembTree.filter(val);
- }
- if(!val) {
- this.$refs.chooseMembTree.filter(val);
- }
- },
- filterText2(val) {
- this.$refs.chooseMembTree2.filter(val);
- }
- },
- updated () {
- // console.log('执行upload生命周期')
- this.$nextTick(()=>{
- this.$refs.projectlistOfWudulist.doLayout();
- })
- },
- methods: {
- // 批量导入任务
- importTask(item) {
- //首先判断文件类型
- this.loadingExport = true
- let str = item.file.name.split(".");
- let format = str[str.length - 1];
- if (format != "xls" && format != "xlsx") {
- this.loadingExport = false
- this.$message({
- message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
- type: "error"
- });
- } else {
- this.listLoading = true;
- let formData = new FormData();
- formData.append("file", item.file);
- formData.append("isMultiProject", 1);
- this.http.uploadFile('/task/importTask', formData,
- res => {
- this.$refs.upload.clearFiles();
- this.listLoading = false;
- this.loadingExport = false
- if (res.code == "ok") {
- this.$message({
- message: this.$t('other.importSuccess'),
- type: "success"
- });
- this.importTaskDialog = false;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$refs.upload.clearFiles();
- this.listLoading = false;
- this.loadingExport = false
- this.$message({
- message: error,
- type: "error"
- });
- });
- }
- },
- saveProjectManDaySetting() {
- this.http.post('/estimate-time-setting/save', this.manDaySetting,
- res => {
- if (res.code == "ok") {
- this.projectManDaySettingDialog = false;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //获取项目预估工时配置数据
- getManDaySetting() {
- this.http.post('/estimate-time-setting/get', {
- companyId: this.user.companyId
- },
- res => {
- if (res.code == "ok") {
- this.manDaySetting = res.data;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- submitCopySubProject() {
- //获取选中的项目
- if (this.checkedPForSubArr.length == 0) {
- this.$message(this.$t('defaultText.pleaseSelectSnItem'))
- return
- }
-
- var targetPIds = JSON.stringify(this.checkedPForSubArr.map((a)=>{return a.id}));
- //http post请求提交
- this.http.post('/sub-project/copyToProjects', {
- projectId: this.currentProject.id,
- targetProjectIds: targetPIds,
- },
- res => {
- if (res.code == "ok") {
- this.$message({
- message: '操作成功',
- type: "success"
- });
- this.copySubPListVisible = false;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- confirmChangeStage() {
- let currentStageName = ''
- for(var i in this.phaseList) {
- if(this.phaseList[i].id == this.curChangeProject.curStageId) {
- currentStageName = this.phaseList[i].projectStageName
- }
- }
- this.http.post('/project/changeCurrentStage', {
- projectId: this.curChangeProject.projectId,
- currentStageId: this.curChangeProject.curStageId,
- currentStageName: currentStageName
- },
- res => {
- if (res.code == "ok") {
- this.getList()
- this.changeStageDialogVisible = false;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- showChangeStageDialog(projectId, curStageId) {
- this.curChangeProject = {projectId: projectId, curStageId: curStageId};
- this.changeStageDialogVisible = true;
- },
- addNewkeyNodes(row) {
- this.addBasekeyNodesialog = true
- if(row) {
- this.addFormkeyNodes = row
- } else {
- this.addFormkeyNodes = {
- name: ''
- }
- }
- },
- // 获取关键节点
- getkeyNodes() {
- this.http.post('/project-key-nodes-setting/list', {},
- res => {
- if (res.code == "ok") {
- // this.keyNodesIsShow = true
- this.keyNodesList = res.data
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- hoverCall(row) {
- this.rowid=row.id
- },
- handCall() {
- this.rowid = ''
- },
- // 获取阶段
- obtainPhase(item) {
- this.http.post('/project-stage/list', {},
- res => {
- if (res.code == "ok") {
- // this.phaseList = res.data
- this.$set(this, 'phaseList', res.data)
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- // 获取级别
- getProjectLevel(){
- this.http.post('/project-level/list', {},
- res => {
- if (res.code == "ok") {
- this.levelList = res.data
- // this.$set(this, 'levelList', res.data)
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- addProjectLevel(row){
- this.addProjectLevelDialog = true
- if(!row) {
- this.addLevelForm = {
- projectLevelName: '',
- id: ''
- // companyId:''
- }
- } else {
- this.addLevelForm = {
- id: row.id,
- projectLevelName: row.projectLevelName
- // companyId: row.companyId
- }
- }
- },
- deleteProjectLevel(row) {
- this.$confirm($t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingprojectlevels'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: "warning"
- })
- .then(() => {
- this.listLoading = true;
- this.http.post('/project-level/delete',{
- id: row.id
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- this.getProjectLevel();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- })
- .catch(() => {});
- },
- submitLevelPro(){
- this.http.post('/project-level/addOrMod',this.addLevelForm,
- res => {
- if (res.code == "ok") {
- this.addProjectLevelDialog = false;
- this.getProjectLevel()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- // 表格点击
- tableCellClassName({row, column, rowIndex, columnIndex}) {
- row.index=rowIndex;
- column.index=columnIndex;
- },
- // clickCell(row,column) {
- // // console.log('can can need',row,column)
- // this.currentCell = row.index + ',' + column.index;
- // this.phaseProjectValie = row.currentStageId ? row.currentStageId : ''
- // if(this.permissions.projectManagement || this.user.id==row.inchargerId || this.user.id==row.creatorId) {
- // this.phaseProjectId = row.id
- // setTimeout(() => {
- // // 获得焦点
- // this.$refs[row.index + ',' + column.index].focus();
- // })
- // }
- // },
- // selectChange() {
- // let currentStageName = ''
- // for(var i in this.phaseList) {
- // if(this.phaseList[i].id == this.phaseProjectValie) {
- // currentStageName = this.phaseList[i].projectStageName
- // }
- // }
- // this.http.post('/project/changeCurrentStage', {
- // projectId: this.phaseProjectId,
- // currentStageId: this.phaseProjectValie,
- // currentStageName: currentStageName
- // },
- // res => {
- // if (res.code == "ok") {
- // this.getList()
- // } else {
- // this.$message({
- // message: res.msg,
- // type: "error"
- // });
- // }
- // },
- // error => {
- // this.$message({
- // message: error,
- // type: "error"
- // });
- // });
- // },
- // hideSelect() {
- // var that = this
- // setTimeout(() => {
- // that.currentCell = null
- // }, 500)
- // },
- // 点击主项目事件
- projectManagementChange() {
- let categoryId = ''
- for(var i in this.mainProjectList) {
- if(this.mainProjectList[i].id == this.addForm.projectMainId) {
- categoryId = this.mainProjectList[i].categoryId
- }
- }
- categoryId == '' ? '' : this.addForm.category = categoryId
- // console.log(this.addForm)
- },
- tableSort({column, prop, order}){
- if(prop == 'inchargerName' || prop == 'customerName' || prop == 'projectCode' || prop == 'categoryName' || prop == 'projectName' || prop == 'status' || prop == 'currentStage' || prop == 'departmentName' || prop == 'associateDegreeNames'){
- this.sortOrder = order
- this.sortProp = prop
- this.getList()
- }
- },
- fileUpload(file) {
- //首先判断文件类型
- console.log(file)
- let str = file.file.name.split(".");
- let indexLi = file.action
- let format = str[str.length - 1];
- if (format != "jpg" && format != "jpeg" && format != "png") {
- this.$message({
- message: "请选择.jpg或.jpeg文件",
- type: "error"
- });
- } else {
- let formData = new FormData();
- formData.append("multipartFile", file.file);
- this.http.uploadFile('/common/uploadFile', formData,
- res => {
- if (res.code == "ok") {
- this.dataList[indexLi].valuelist.push(res.data)
- this.$forceUpdate()
- this.$message({
- message: "上传成功",
- type: "success"
- });
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- }
- },
- handleRemove(file, index) {
- let uploadFiles = this.$refs.upload[0].uploadFiles
- for (var i = 0; i < uploadFiles.length; i++) {
- if (uploadFiles[i]['url'] == file.url) {
- uploadFiles.splice(i, 1)
- this.dataList[index].valuelist.splice(i, 1)
- }
- }
- },
- handlePictureCardPreview(file) {
- console.log(file)
- this.imgUrlLists = file.url;
- this.imgUrlListFlg = true;
- // this.$set(this, 'imgUrlListFlg', true)
- // console.log(this.imgUrlListFlg)
- this.$forceUpdate()
- },
- xhutDown(done) {
- this.imgUrlListFlg = false
- done()
- this.$forceUpdate()
- },
- ipts(i, item) {
- this.$forceUpdate()
- },
- getObtain() {
- this.http.post('/project-custom/getProjectCustom', {},
- res => {
- if(res.code == 'ok') {
- var yaunz = []
- for(var i in res.data) {
- if(res.data[i].customType == '1') {
- this.$set(res.data[i], 'value', [])
- this.$set(res.data[i], 'valuelist', [])
- } else {
- this.$set(res.data[i], 'value', '')
- this.$set(res.data[i], 'valuelist', [])
- }
- yaunz.push(res.data[i])
- }
- this.dataList = yaunz
- this.dataListBf = yaunz
- } else {
- this.$message({
- message: error,
- type: "error"
- });
- }
- },
- error => {;
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //获取项目列表
- getSupplierList() {
- this.http.post('/provider-info/list', {
- pageIndex: 1,
- // pageSize: 999,
- pageSize: -1,
- keyword: ''
- },
- res => {
- if (res.code == "ok") {
- this.supplierList = res.data.records;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- addManPro(row) {
- this.addFlgmainProjectDialog = true
- if(!row) {
- this.addMainForm = {
- name: '',
- id: '',
- code: '',
- categoryId: ''
- }
- } else {
- this.addMainForm = {
- id: row.id,
- code: row.code,
- name: row.name,
- categoryId: row.categoryId,
- }
- }
- },
- addPanthPro(row) {
- this.addFlgPanthProjectDialog = true
- if(!row) {
- this.addPanthForm = {
- projectStageName: '',
- id: '',
- companyId:''
- }
- } else {
- this.addPanthForm = {
- id: row.id,
- projectStageName: row.projectStageName,
- companyId: row.companyId
- }
- }
- },
- // 获取主项目
- getMainProject() {
- this.http.post('/project-main/list',{},res => {
- if(res.code == 'ok'){
- this.mainProjectList = res.data
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- checkedProlistForSub(e) {
- this.checkedPForSubArr = e;
- },
- // 批量修改自定义维度
- checkedWudulist(e){
- // console.log(e);
- this.checkedProjectArr = e
- },
- batchSetWudulistBtn1(){
- this.$refs.projectlistOfWudulist.clearSelection()
- this.checkedWuduArr = [],
- this.addGroupPersonData = {
- group: null,
- person: null,
- personNames: ''
- }
- },
- batchSetWudulistBtn2(e){
- if(this.checkedProjectArr.length == 0){
- this.$message(this.$t('defaultText.pleaseSelectSnItem'))
- return
- }
- this.checkoradd = e
- this.checkedWuduDialog = true
- },
- batchSetWudulistBtn3(){
- if(this.checkedWuduArr.length == 0){
- this.$message(this.$t('defaultText.pleaseChoose') + this.user.timeType.customDegreeName)
- return
- }
- let projectIds = []
- for(let i=0; i<this.checkedProjectArr.length; i++){
- projectIds.push(this.checkedProjectArr[i].id)
- }
- let degreeIds = []
- let degreeNames = []
- for(let s=0; s<this.checkedWuduArr.length; s++){
- degreeIds.push(this.checkedWuduArr[s].id)
- degreeNames.push(this.checkedWuduArr[s].name)
- }
- this.http.post('/project/saveBatchAccoDegrees',{
- ids: JSON.stringify(projectIds),
- associateDegrees: degreeIds.toString(),
- associateDegreeNames: degreeNames.toString()
- },res => {
- if(res.code == 'ok'){
- this.checkedWuduDialog = false
- this.batchSetWudulistBtn1()
- this.$message({
- message: this.$t('setupthesuccess'),
- type: 'success'
- })
- this.getList()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- batchSetWudulistBtn4(){
- if(this.checkedWuduArr.length == 0){
- this.$message(this.$t('defaultText.pleaseChoose') + this.user.timeType.customDegreeName)
- return
- }
- let projectIds = []
- for(let i=0; i<this.checkedProjectArr.length; i++){
- projectIds.push(this.checkedProjectArr[i].id)
- }
- let degreeIds = []
- let degreeNames = []
- for(let s=0; s<this.checkedWuduArr.length; s++){
- degreeIds.push(this.checkedWuduArr[s].id)
- degreeNames.push(this.checkedWuduArr[s].name)
- }
- this.http.post('/project/addBatchAccoDegrees',{
- ids: JSON.stringify(projectIds),
- associateDegrees: degreeIds.toString(),
- associateDegreeNames: degreeNames.toString()
- },res => {
- if(res.code == 'ok'){
- this.checkedWuduDialog = false
- this.batchSetWudulistBtn1()
- this.$message({
- message: this.$t('addsuccessful'),
- type: 'success'
- })
- this.getList()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- isSelectable(row,index){
- if(row.creatorId == this.user.id || row.inchargerId == this.user.id || this.permissions.projectManagement){
- return true
- }else{
- return false
- }
- },
- test(row){
- // console.log(row);
- },
- //批量增加任务分组
- addTaskGroup(){
- if(this.checkedProjectArr.length == 0){
- this.$message(this.$t('defaultText.pleaseSelectSnItem'))
- return
- }
- this.addTaskGroupDig=true
- },
- // 重新定义了 addGroup 方法
- addGroup(formName) {
- // return
- let proArr = []
- for(let i=0;i<this.checkedProjectArr.length;i++){
- proArr.push(this.checkedProjectArr[i].id)
- }
- this.groupForm={
- ...this.groupForm,
- projectIds:proArr.join(',')
- }
- this.$refs[formName].validate((valid) => {
- if (valid) {
- this.http.post('/task-group/save',this.groupForm,
- res => {
- if (res.code == "ok") {
- this.$message({
- message: "操作成功",
- type: "success"
- });
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- createGroup() {
- this.addGroupDialog = true;
- this.groupForm = {projectId: this.curProjectId};
- },
- batchAddTaskGroup(){
- if(!this.batchAddTaskGroupName){
- this.$message({
- message: '请填写分组名称',
- type: 'warning'
- })
- return
- }
- let proArr = []
- for(let i=0;i<this.checkedProjectArr.length;i++){
- proArr.push(this.checkedProjectArr[i].id)
- }
- this.http.post("/task-group/batchSaveTaskGroup",{
- taskGroupName:this.batchAddTaskGroupName,
- projectIds:proArr.join(",")
- },res=>{
- if(res.code == 'ok'){
- this.$message({
- message: '操作成功',
- type: 'success'
- })
- this.addTaskGroupDig=false
- this.batchAddTaskGroupName=null
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err=>{
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- //批量设置分组负责人
- setGroupIncharger(){
- let proArr = []
- for(let i=0;i<this.checkedProjectArr.length;i++){
- proArr.push(this.checkedProjectArr[i].id)
- }
- if(this.checkedProjectArr.length == 0){
- this.$message(this.$t('defaultText.pleaseSelectSnItem'))
- return
- }
- this.addTaskGroupInchargerDig=true
- this.http.post("/task-group/getAllHadGroup",{
- projectIds:proArr.join(",")
- },res=>{
- if(res.code == 'ok'){
- this.hasSetGroupList=res.data
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err=>{
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- batchSetGroupIncharger(){
- if(!this.hasSetGroupName){
- this.$message({
- message: '请选择任务分组',
- type: 'warning'
- })
- return
- }
- if(!this.hasSetGroupInchargerId){
- this.$message({
- message: '请选择分组负责人',
- type: 'warning'
- })
- return
- }
- let proArr = []
- for(let i=0;i<this.checkedProjectArr.length;i++){
- proArr.push(this.checkedProjectArr[i].id)
- }
- this.http.post("/task-group/batchSetGroupIncharger",{
- taskGroupName:this.hasSetGroupName,
- projectIds:proArr.join(","),
- inchargerId:this.hasSetGroupInchargerId
- },res=>{
- if(res.code == 'ok'){
- this.$message({
- message: '操作成功',
- type: 'success'
- })
- this.addTaskGroupInchargerDig=false
- this.hasSetGroupInchargerId=null
- this.hasSetGroupName=null
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err=>{
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- // 批量添加分组参与人员
- addGroupPerson(){
- let proArr = []
- if(this.checkedProjectArr.length == 0){
- this.$message(this.$t('defaultText.pleaseSelectSnItem'))
- return
- }
- this.addGroupPersonBtnLoading = true
- this.isAddGroupPerson = true
- for(let i=0;i<this.checkedProjectArr.length;i++){
- proArr.push(this.checkedProjectArr[i].id)
- }
- this.http.post('/project/getProjectsGroups',{
- projectIdArray: JSON.stringify(proArr)
- },res => {
- if(res.code == 'ok'){
- // console.log('分组',res.data);
- this.addGroupList = res.data
- this.addGroupPersonBtnLoading = false
- this.addGroupPersonDialog = true
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
-
- },
- addGroupPersonP(){
- this.filterText2 = ''
- this.addGroupPersonPdialog = true
- },
- addPersonCheck(){
- var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
- var list = chosenList.filter(item=>item.isUser == 1);
- this.chosenMembCount = list.length;
- // console.log(list);
- },
- addPersonSure(){
- this.addGroupPersonPdialog = false
- let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
- let list = chosenList.filter(item=>item.isUser == 1);
- let listIDs = []
- let listNames = ''
- let listNamesList = []
- for(let i=0;i<list.length;i++){
- listIDs.push(list[i].id)
- listNames += list[i].label + ','
- listNamesList.push(list[i].label)
- }
- this.addGroupPersonData.person = listIDs
- this.addGroupPersonData.personNames = listNames
- this.addGroupPersonDataPersonNames = listNamesList
- console.log('触发', this.addGroupPersonDataPersonNames)
- },
- addGroupPersonSure(){
- if(this.addGroupPersonData.group.length == 0 || this.addGroupPersonData.person == null){
- this.$message({
- message: this.$t('pleaseselectpersonnelasd'),
- type: 'warning'
- })
- return
- }
- let groupList = []
- for(let i=0;i<this.addGroupPersonData.group.length;i++){
- groupList = [...groupList,...this.addGroupPersonData.group[i]]
- }
- this.http.post('/project/batchAddMembToGroup',{
- membIdArray: JSON.stringify(this.addGroupPersonData.person),
- groupIds: JSON.stringify(groupList)
- },res => {
- if(res.code == 'ok'){
- this.addGroupPersonDialog = false,
-
- this.batchSetWudulistBtn1()
- this.$message({
- message: this.$t('addsuccessful'),
- type: 'success'
- })
- this.getList()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- batchDelete(){
- if(this.checkedProjectArr.length == 0){
- this.$message(this.$t('defaultText.pleaseSelectSnItem'))
- return
- }
- let proArr = []
- for(let i=0;i<this.checkedProjectArr.length;i++){
- proArr.push(this.checkedProjectArr[i].id)
- // proArr += this.checkedProjectArr[i].id + ','
- }
- this.isDeleting = true;
- // proArr = proArr.substring(0,proArr.length - 1)
- this.http.post('/project/batchDeleteProject',{
- projectIdArray: JSON.stringify(proArr)
- },res => {
- this.isDeleting = false;
- if(res.code == 'ok'){
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: 'success'
- })
- this.getList()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- // 批量设置项目经理
- batchIncharger(){
- if(this.checkedProjectArr.length == 0){
- this.$message(this.$t('defaultText.pleaseSelectSnItem'))
- return
- }
- this.batchInchargerDialog = true
- this.paramInchargerId = ''
- },
- batchInchargerSure(){
- if(!this.paramInchargerId){
- this.$message({
- message: this.$t('pleaseselecttheprojectmanager'),
- type: 'warning'
- })
- return
- }
- let proArr = ''
- for(let i=0;i<this.checkedProjectArr.length;i++){
- // proArr.push(this.checkedProjectArr[i].id)
- proArr += this.checkedProjectArr[i].id + ','
- }
- proArr = proArr.substring(0,proArr.length - 1)
- this.http.post('/project/batchExchangeIncharger',{
- inchargerId: this.paramInchargerId,
- projectIds: proArr
- },res => {
- if(res.code == 'ok'){
- this.batchInchargerDialog = false
- this.$message({
- message: this.$t('setupthesuccess'),
- type: 'success'
- })
- this.getList()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- // 批量添加项目参与人
- addProPreson(){
- if(this.checkedProjectArr.length == 0){
- this.$message(this.$t('defaultText.pleaseSelectSnItem'))
- return
- }
- this.addGroupPersonDialog = true
- this.isAddGroupPerson = false
- },
- addProPersonSure(){
- if(this.addGroupPersonData.person == null){
- this.$message({
- message: this.$t('pleaseselectpersonnel'),
- type: 'warning'
- })
- return
- }
-
- let proArr = []
- for(let i=0;i<this.checkedProjectArr.length;i++){
- proArr.push(this.checkedProjectArr[i].id)
- // proArr += this.checkedProjectArr[i].id + ','
- }
- // proArr = proArr.substring(0,proArr.length - 1)
- this.http.post('/project/batchSetParticipation',{
- userIds: JSON.stringify(this.addGroupPersonData.person),
- projectIdArray: JSON.stringify(proArr)
- },res => {
- if(res.code == 'ok'){
- this.addGroupPersonDialog = false,
-
- this.batchSetWudulistBtn1()
- this.$message({
- message: this.$t('addsuccessful'),
- type: 'success'
- })
- this.getList()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- filterNode(value, data) {
- // if (!value) return true;
- // return data.label.indexOf(value) !== -1;
- let { userNameNeedTranslate } = this.user
- console.log(value, data, '《=== 执行')
- if (!value) return true;
- if(userNameNeedTranslate != '1') {
- return data.label.indexOf(value) !== -1;
- } else {
- return this.filterNodePersonnel.some(item => item.includes(data.label))
- }
- },
- //重启项目
- restartPro(row) {
- this.http.post('/project/start',{id: row.id},
- res => {
- if (res.code == "ok") {
- this.$message({
- message: this.$t('restartthesuccess'),
- type: "success"
- });
- row.status = 1;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //撤销项目
- cancelPro(row) {
- this.http.post('/project/cancel',{id: row.id},
- res => {
- if (res.code == "ok") {
- this.$message({
- message: this.$t('Revocationofsuccess'),
- type: "success"
- });
- row.status = 3;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- // 暂停项目
- suspendPro(row) {
- this.http.post('/project/suspend',{id: row.id},
- res => {
- if (res.code == "ok") {
- this.$message({
- message: this.$t('suspensionofsuccess'),
- type: "success"
- });
- row.status = 4;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //完成项目
- finishPro(row) {
- this.http.post('/project/finish',{id: row.id},
- res => {
- if (res.code == "ok") {
- this.$message({
- message: this.$t('projectcompletion'),
- type: "success"
- });
- row.status = 2;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- exportProjectData() {
- let param = {
- status: this.status,
- }
- if(this.keyword){param.searchField = this.searchField;param.keyword = this.keyword}
- if(this.projectMainId){param.projectMainId = this.projectMainId}
- if(this.statusClf){param.category = this.statusClf}
- if(this.deptId.length){param.deptId = this.deptId[this.deptId.length-1]}
- if(this.inchagerId){param.inchagerId = this.inchagerId}
- if(this.participationId){param.participation = this.participationId}
- this.exportDisabled = true
- this.exportNotification = this.$notify({
- title: '导出项目',
- message: '项目导出中、请稍后...',
- duration: 0,
- showClose: false
- });
- //导出项目
- this.http.post('/project/exportData',param,
- res => {
- this.exportDisabled = false
- this.exportNotification.close()
- if (res.code == "ok") {
- var filePath = res.data;
- const a = document.createElement('a'); // 创建a标签
- a.setAttribute('download', this.$t('projectexport') + '.xlsx');// download属性
- a.setAttribute('href', filePath);// href链接
- a.click(); //自执行点击事件
- a.remove();
- }
- },
- error => {
- this.exportDisabled = false
- this.exportNotification.close()
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- // 编辑模板
- setTemplate(t){
- console.log(t);
- this.setTemplateData = t
- this.setTemplateData.needDelete = []
- this.setTemplateDialog = true
- },
- choseTemplate(tIndex) {
- // this.groupTemplateList.forEach((g)=>{
- // g.selected = false;
- // })
- this.sidebarIndex = tIndex
- // this.groupTemplateList[tIndex].selected = true;
- this.groupTemplateList.forEach((g, i)=>{
- if(tIndex == i) {
- g.selected = !g.selected;
- }
- })
- },
- //删除模板
- deleteTemplate(t) {
- var that = this;
- this.$confirm(this.$t('que-ren-yao-shan-chu')+"["+t.name+"]"+this.$t('ma'), this.$t('other.prompts'), {
- //type: 'warning'
- }).then(() => {
- this.http.post('/group-template/deleteTemplate', {id: t.id},
- res => {
- if (res.code == "ok") {
- this.getGroupTemplate();
- this.$message({
- message: this.$t('deletingTemplateSuccessfully'),
- type: "success"
- });
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- }
- );
- });
- },
- //创建模板
- createTemplate() {
- this.saveTemplateLoading = true;
- this.http.post('/group-template/addTemplate', this.templateForm,
- res => {
- this.saveTemplateLoading = false;
- if (res.code == "ok") {
- this.addToTmpDialog = false;
- this.getGroupTemplate();
- this.$message({
- message: this.$t('addTemplateSuccessfully'),
- type: "success"
- });
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- }
- );
- },
- setTemplateSave(){
- if(this.setTemplateData.name == '' || this.setTemplateData.name == null){
- this.$message({
- message: this.$t('mo-ban-ming-cheng-bu-neng-wei-kong'),
- type: 'error'
- })
- return
- }
- for(let i in this.setTemplateData.stagesList){
- if(this.setTemplateData.stagesList[i].stagesName == '' || this.setTemplateData.stagesList[i].stagesName == null){
- this.$message({
- message: this.$t('ren-wu-lie-biao-ming-cheng-bu-neng-wei-kong'),
- type: 'error'
- })
- return
- }
- }
- this.http.post('/task-group/setTemplate',this.setTemplateData,
- res => {
- if(res.code == 'ok'){
- this.$message({
- message: this.$t('message.modifyTheSuccess'),
- type: 'success'
- })
- this.getGroupTemplate()
- this.setTemplateDialog = false
- }else{
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- addStages(){
- this.setTemplateData.stagesList.push({
- stagesName: '',
- templateId: this.setTemplateData.id
- })
- },
- deleteStages(item,index){
- this.setTemplateData.needDelete.push(item.id)
- this.setTemplateData.stagesList.splice(index,1)
- console.log('deletestages',item.id);
- },
- exportProjectGroup() {
- //导出项目分组
- this.http.post('/project/exportGroupData',{projectCategorySubId:this.projectCategorySubId},
- res => {
- if (res.code == "ok") {
- var filePath = res.data;
- const a = document.createElement('a'); // 创建a标签
- a.setAttribute('download', this.$t('projecttaskgroupexport') + '.xlsx');// download属性
- a.setAttribute('href', filePath);// href链接
- a.click(); //自执行点击事件
- a.remove();
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- userssHu() {
- this.http.post('/time-type/getCompanyTimeSetting',{
- companyId: this.user.companyId
- },
- res => {
- if (res.code == "ok") {
- this.yonghuUser = res.data
- // console.log(this.yonghuUser)
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- yanjiuzx() {
- this.http.post('/report-extra-degree/getAll ',{},
- res => {
- if (res.code == "ok") {
- // console.log(res, '过来的数据')
- this.ause = res.data
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- selectPublic() {
- if (this.addForm.isPublic == 1) {
- this.participator = this.users;
- } else {
- this.participator = [];
- }
- },
- addPpMemb() {
- //检查合计比例是否到达100%
- let p = 0;
- let hasNoMemb = false;
- this.curProfessionRow.membList.forEach(m=>{
- p += parseInt(m.percentage);
- //检查人员是否选择
- if (m.membId == null) {
- hasNoMemb = true;
- }
- });
- if (hasNoMemb) {
- this.$message({
- message: this.$t('professionalscannotbeempty'),
- type: "error"
- });
- return;
- }
- //检查人员不能重复
- let hasDuplicate = false;
- this.curProfessionRow.membList.forEach(m=>{
- if (this.curProfessionRow.membList.filter(innerM=>innerM.membId == m.membId).length>1) {
- hasDuplicate = true;
- }
- });
- if (hasDuplicate) {
- this.$message({
- message: this.$t('professionalscannotrepeat'),
- type: "error"
- });
- return;
- }
- if (p != 100) {
- this.$message({
- message: this.$t('totalproportionmust'),
- type: "error"
- });
- return;
- }
-
- this.editPpMembDialog = false;
- this.curProfessionRow.membList.forEach(m=>{
- m.membName = this.participator.filter(p=>p.id == m.membId)[0].name;
- });
- this.projectProfessionItem.membList = JSON.parse(JSON.stringify(this.curProfessionRow.membList));
- },
- //删除专业人员
- deleteMembItem(index) {
- this.curProfessionRow.membList.splice(index,1);
- },
- //添加专业人员
- addMembItem() {
- if (this.curProfessionRow.membList == null) {
- this.curProfessionRow.membList = [{membId:null, percentage:100}];
- } else {
- let p = 0;
- this.curProfessionRow.membList.forEach(m=>{
- p += parseInt(m.percentage);
- });
- this.curProfessionRow.membList.push({membId:null, percentage:100-p});
- }
- this.$forceUpdate();
- },
- showEditPpMembs(row) {
- this.projectProfessionItem = row;
- this.curProfessionRow = JSON.parse(JSON.stringify(row));
- if (this.curProfessionRow.membList == null || this.curProfessionRow.membList.length == 0) {
- this.curProfessionRow.membList = [{membId:null, percentage:100}];
- }
- this.editPpMembDialog = true;
- },
- getProjectNotifyUserList(projectId) {
- this.http.post("/project-notify-user/get", {projectId: projectId},
- res => {
- if (res.code == "ok") {
- var chosenLeaderIds = [];
- var chosenLeaderNames = '';
- var leaderList = res.data;
- this.chosenLeaders = leaderList;
- for(var j in leaderList) {
- chosenLeaderIds.push(leaderList[j].userId)
- chosenLeaderNames += leaderList[j].userName+',';
- }
- if (chosenLeaderNames.length > 0) {
- chosenLeaderNames = chosenLeaderNames.substring(0, chosenLeaderNames.length -1);
- }
- this.addForm.notifyUserIds = chosenLeaderIds;
- this.addForm.notifyUserNames = chosenLeaderNames;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- addTemplateGroup() {
- var param = JSON.parse(JSON.stringify(this.groupTemplateList.filter(g=>g.selected)))
- console.log(param, '你看看啊')
- for(var i in param) {
- delete param[i].stagesList
- }
- if(param.length < 1) {
- this.$message({
- message: this.$t('qngxuanz'),
- type: "error"
- });
- return
- }
- var s = null
- var k = ''
- if (s){
- this.addGroupDialog = false;
- this.$message({
- message: this.$t('projectalreadyhasgroup')+'['+k+'],'+this.$t('changethegroupname'),
- type: "error"
- });
- return
- }
- console.log('将要闯过去的值', param)
- let proArr = []
- for(let i=0;i<this.checkedProjectArr.length;i++){
- proArr.push(this.checkedProjectArr[i].id)
- }
- // return
- // this.http.post('/task-group/createFromTemplate',param,
- this.http.post('/task-group/createFromTemplate',{
- templateJson: JSON.stringify(param),
- projectId: this.curProjectId,
- projectIds:proArr.join(",")
- },
- res => {
- if (res.code == "ok") {
- this.$message({
- message: "操作成功",
- type: "success"
- });
- this.addTaskGroupDig = false;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- getProjectProfessions(projectId) {
- this.http.post("/project-profession/get", {projectId: projectId},
- res => {
- if (res.code == "ok") {
- this.projectProfessionList = res.data;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- checkProjectProfession() {
- //检查合计比例是否到达100%
- let p = 0;
- let hasNoMemb = false;
- let hasNoProfession = false;
- let hasNoMembList = false;
- this.projectProfessionList.forEach(m=>{
- p += parseInt(m.percentage);
- //检查人员是否选择
- if (m.inchargerId == null) {
- hasNoMemb = true;
- }
- if (m.professionId == null) {
- hasNoProfession = true;
- }
- if (m.membList == null) {
- hasNoMembList = true;
- }
- });
-
- if (hasNoProfession) {
- this.$message({
- message: this.$t('majorcannotbeempty'),
- type: "error"
- });
- return false;
- }
- if (hasNoMembList) {
- this.$message({
- message: this.$t('personnelcannotbeleftblank'),
- type: "error"
- });
- return false;
- }
- if (hasNoMemb) {
- this.$message({
- message: this.$t('leadercannotbeblank'),
- type: "error"
- });
- return false;
- }
- //检查专业不能重复
- let hasDuplicate = false;
- this.projectProfessionList.forEach(m=>{
- if (this.projectProfessionList.filter(innerM=>innerM.professionId == m.professionId).length>1) {
- hasDuplicate = true;
- }
- });
- if (hasDuplicate) {
- this.$message({
- message: this.$t('shouldnotberepeated'),
- type: "error"
- });
- return false;
- }
- if (this.projectProfessionList.length > 0 && p != 100) {
- this.$message({
- message: this.$t('numberomajorsmust'),
- type: "error"
- });
- return false;
- }
- return true;
- },
- //保存项目专业
- saveProjectProfessions(projectId) {
- var list = this.projectProfessionList.filter(p=>p.professionId != null);
- list.forEach(p=>p.inchargerName = this.participator.filter(m=>m.id == p.inchargerId)[0].name);
- list.forEach(p=>p.professionName = this.professionList.filter(m=>m.id == p.professionId)[0].name);
- this.http.post("/project-profession/modify", {projectId: projectId, json: JSON.stringify(list)},
- res => {
- if (res.code == "ok") {
-
- return false;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //删除项目专业
- deleteItem(index) {
- this.projectProfessionList.splice(index,1);
- },
- //添加项目专业
- addItem() {
- let p = 0;
- this.projectProfessionList.forEach(m=>{
- p += parseInt(m.percentage);
- });
- this.projectProfessionList.push( { professionId:null, inchargerId:null,membIds:[], percentage: 100-p});
- },
- getProfessionList() {
- this.http.post("/profession/getAll", {},
- res => {
- if (res.code == "ok") {
- var list = res.data;
- this.professionList = list;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- restrictNumber(targetId) {
- let inpu = document.getElementById(targetId);
- inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
- inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
- inpu.value = inpu.value.replace(".", "$#*").replace(/\./g,'').replace('$#*','.');//去除其他"."
- inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
- if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
- inpu.value = parseFloat(inpu.value);
- }
- },
- showChooseLeaderTree() {
- this.chosenMembCount = this.chosenLeaders.length;
- this.chooseLeaderVisible = true;
- },
- onLeaderTreeItemChange() {
- var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
- var list = chosenList.filter(item=>item.isUser == 1);
- this.chosenMembCount = list.length;
- },
- showChooseMembTree() {
- this.deptMembData = JSON.parse(JSON.stringify(this.allMembData))
- this.chosenMembCount = this.participator.length;
- this.chooseParticipVisible = true;
- this.filterText = ''
- this.wxFilterText = ''
- if(this.user.userNameNeedTranslate == 1) {
- this.getDepartment()
- }
- let that = this
- setTimeout(()=>{
- that.chosenListBackup = that.$refs.chooseMembTree.getCheckedNodes();
- }, 500)
- console.log(this.chosenListBackup, '备份的数据')
- },
- onTreeItemChange() {
- var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
- var list = chosenList.filter(item=>item.isUser == 1);
- this.chosenMembCount = list.length;
- },
- findUserInTree() {
- if (this.filterName == '') {
- this.deptMembData = this.allMembData;
- } else {
- var list = this.findRecursively(this.filterName, this.allMembData);
- this.deptMembData = list;
- }
- },
- findRecursively(username, list) {
- var filterList = [];
- for (var i=0;i<list.length; i++) {
- if (list[i].isUser == 1) {
- if (list[i].label.indexOf(username) >= 0) {
- //匹配上了
- filterList.push(list[i]);
- }
- } else if (list[i].children != null && list[i].children.length > 0) {
- var subList = this.findRecursively(username, list[i].children);
- if (subList.length > 0) {
- subList.forEach(s=>filterList.push(s));
- }
- }
- }
- return filterList;
- },
- //确定选择参与人
- chooseParticip() {
- this.chooseParticipVisible = false;
- var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
- if(this.searchPersonnelFlg) {
- chosenList = [...chosenList, ...this.chosenListBackup]
- }
- this.chosenMembList = chosenList.filter(item=>item.isUser == 1);
- this.addForm.userNames = '';
- this.addFormUserNames = []
- this.addForm.userId = [];
- this.participator = [];
- for (var i=0;i<this.chosenMembList.length; i++) {
- this.addForm.userId.push(this.chosenMembList[i].id);
- this.addForm.userNames += this.chosenMembList[i].label+',';
- this.addFormUserNames.push(this.chosenMembList[i].label)
- var item = {id:this.chosenMembList[i].id, name:this.chosenMembList[i].label};
- this.participator.push(item);
- }
- if (this.addForm.userNames.length > 0) {
- this.addForm.userNames = this.addForm.userNames.substring(0, this.addForm.userNames.length-1);
- // this.addFormUserNames = this.addFormUserNames.substring(0, this.addFormUserNames.length-1);
- }
- console.log(this.addForm.userId)
- console.log(this.addForm.userNames)
- console.log(this.addFormUserNames)
- },
- //选中相关领导
- // chooseLeader() {
- // this.chooseLeaderVisible = false;
- // var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
- // var chosenMembList = chosenList.filter(item=>item.isUser == 1);
- // this.addForm.notifyUserNames = '';
- // this.addForm.notifyUserIds = [];
- // this.chosenLeaders = [];
- // for (var i=0;i<chosenMembList.length; i++) {
- // this.addForm.notifyUserIds.push(chosenMembList[i].id);
- // this.addForm.notifyUserNames += chosenMembList[i].label+',';
- // var item = {userId:chosenMembList[i].id, userName:chosenMembList[i].label};
- // this.chosenLeaders.push(item);
- // }
- // if (this.addForm.notifyUserNames.length > 0) {
- // this.addForm.notifyUserNames = this.addForm.notifyUserNames.substring(0, this.addForm.notifyUserNames.length-1);
- // }
- // },
- // 获取部门列表
- getDepartment() {
- this.http.post("/department/listAllMemb", {},
- res => {
- if (res.code == "ok") {
- var list = res.data;
- //设置员工到部门下面
- this.setUserToDept(list);
- this.deptMembData = list;
- console.log(this.deptMembData, '看看数据')
-
- //用于筛选过滤
- this.allMembData = JSON.parse(JSON.stringify(this.deptMembData));
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- // 获取部门列表
- getDepartment2() {
- this.http.post(
- this.port.manage.depList,{},
- (res) => {
- if (res.code == "ok") {
- var list = res.data
- this.buOption = this.changeArr(JSON.parse(JSON.stringify(list)));
- } else {
- this.$message({
- message: res.msg,
- type: "error",
- });
- }
- },
- (error) => {
- this.$message({
- message: error,
- type: "error",
- });
- }
- );
- },
- // 修改数组
- changeArr(arr) {
- for (var i = 0; i < arr.length; i++) {
- if(arr[i].id != -1 && arr[i].id != 0) {
- // if(arr[i].userList) {
- // if(arr[i].userList.length > 0) {
- // arr[i].children = arr[i].userList
- // }
- // }
- if (arr[i].children != null && arr[i].children.length>0) {
- arr[i].children = this.changeArr(arr[i].children);
- }
- arr[i].id && (arr[i].value = arr[i].id);
- delete arr[i].id;
- }
- }
- for(var i in arr) {
- if(arr[i].id == -1 || arr[i].id == 0) {
- arr.splice(i,1)
- }
- }
- return arr;
- },
- // 企业微信搜索
- echartDepartment() {
- console.log('我点击了搜索')
- if(this.filterText != '') {
- this.http.post("/user/getEmployeeList", {
- keyword: this.filterText,
- cursor: '',
- departmentId: -1,
- pageIndex: 1,
- pageSize: 1000
- },
- res => {
- if (res.code == "ok") {
- this.filterNodePersonnel = res.data.records.map(item => item.name)
- this.$refs.chooseMembTree.filter(this.filterText);
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- } else {
- this.searchPersonnelFlgnum = +this.searchPersonnelFlgnum +1
- this.searchPersonnelFlg = false
- this.getDepartment()
- }
- },
-
- setUserToDept(list) {
- for (var i in list) {
- if (list[i].children != null) {
- this.setUserToDept(list[i].children);
- }
-
- if (list[i].userList != null) {
- if (list[i].children == null) {
- list[i].children = [];
- }
- list[i].userList.forEach(element => {
- var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
- list[i].children.push(obj);
- });
- }
- }
- },
- // 获取分类条目
- getClfConfigList() {
- this.http.get('/project-category/list',
- res => {
- if (res.code == "ok") {
- this.baseClfList = res.data;
- // console.log("获取分类条目",res.data);
- this.$forceUpdate();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
-
- },
- // 新增/编辑 分类条目
- addNewClf(row) {
- this.addClfDialog = true;
- if (row == null) {
- this.addClf = {}
- } else {
- this.addClf = row;
- }
- },
- // 提交
- submitClf() {
- this.addClf.proBuAudit ? this.addClf.proBuAudit =1 : this.addClf.proBuAudit = 0
- this.addClf.proInchargerAudit ? this.addClf.proInchargerAudit = 1 : this.addClf.proInchargerAudit = 0
- this.http.post('/project-category/addOrMod',this.addClf,
- res => {
- if (res.code == "ok") {
- this.addClfDialog = false;
- this.auditProcessDialog=false;
- this.baseClfList = res.data;
- // this.$forceUpdate();
- // console.log(res.data);
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- // 提交
- submitManPro() {
- this.http.post('/project-main/addOrMod',this.addMainForm,
- res => {
- if (res.code == "ok") {
- this.addFlgmainProjectDialog = false;
- this.getMainProject()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- // 分类绑定审核流程设置
- auditProcess(row) {
- this.auditProcessDialog = true;
- row.proBuAudit ? row.proBuAudit = true : row.proBuAudit = false
- row.proInchargerAudit ? row.proInchargerAudit = true : row.proInchargerAudit = false
- if (row == null) {
- this.addClf = {}
- } else {
- this.addClf = row;
- }
- },
- // 提交项目阶段
- submitPanthPro() {
- this.http.post('/project-stage/addOrMod',this.addPanthForm,
- res => {
- if (res.code == "ok") {
- this.addFlgPanthProjectDialog = false;
- this.obtainPhase()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- // 删除
- deleteClf(row) {
- this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingCategoryEntry'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: "warning"
- })
- .then(() => {
- this.listLoading = true;
- this.http.post('/project-category/delete',{
- id: row.id
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- this.getClfConfigList();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- })
- .catch(() => {});
- },
- // 删除主项目
- deleteManPro(row) {
- this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletethemainproject'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: "warning"
- })
- .then(() => {
- this.listLoading = true;
- this.http.post('/project-main/delete',{
- id: row.id
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- this.getMainProject();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- })
- .catch(() => {});
- },
- // 删除项目阶段
- deletePanthPro(row) {
- this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingprojectphases'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: "warning"
- })
- .then(() => {
- this.listLoading = true;
- this.http.post('/project-stage/delete ',{
- id: row.id
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- this.obtainPhase();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- })
- .catch(() => {});
- },
- // 分类筛选
- searchClfList(){
- this.page = 1;
- this.getList();
- },
- manageSelect(){
- this.page = 1
- this.getList()
- },
-
- getProjectBaseConfigList() {
- this.http.post('/project-basecost-setting/list',{},
- res => {
- if (res.code == "ok") {
- this.baseCostItemList = res.data;
- this.$forceUpdate();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
-
- },
- deletekeyNodes(row) {
- this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingKeyNode'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: "warning"
- })
- .then(() => {
- this.listLoading = true;
- this.http.post('/project-key-nodes-setting/delete',{
- id: row.id
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- this.getkeyNodes();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- })
- .catch(() => {});
- },
-
- syncProjectForThird(hasChooseProjectCode){
- let url=''
- let param={}
- if(this.user.timeType.syncFanwei==1){
- // 美莱德同步项目信息来源泛微
- url='/project/syncProjectWithFanwei'
- }else if(this.user.timeType.syncSap==1){
- // 依斯倍同步项目信息来源SAP
- url='/project/syncProjectWithSap'
- if(hasChooseProjectCode){
- param={
- projectCodes: this.synchronizationVal == '0' ? hasChooseProjectCode.toString() : this.synchronizationInputVal
- }
- }
- }
- this.$confirm('确认同步项目数据?','提示',{
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'info'
- }).then(()=>{
- const loading = this.$loading({
- lock: true,
- text: '正在同步中,请耐心等待。',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- this.http.post(url,param,
- res => {
- loading.close();
- console.log(res, 'res')
- if (res.code == "ok") {
- this.$message({
- message: '项目同步成功',
- type: "success"
- });
- this.syncProjectDig=false
- this.hasChooseProjectCode=[]
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- loading.close();
- console.log(error, 'res')
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- }).catch(() => {
- });
-
- },
- deleteBaseItem(row) {
- this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletethecostbaselineitem'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: "warning"
- })
- .then(() => {
- this.listLoading = true;
- this.http.post('/project-basecost-setting/delete',{
- id: row.id
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- this.getProjectBaseConfigList();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- })
- .catch(() => {});
- },
- submitInsertBaseItem() {
- this.http.post('/project-basecost-setting/addOrMod',this.addForm,
- res => {
- if (res.code == "ok") {
- this.addBaseItemDialog = false;
- this.baseCostItemList = res.data;
- this.$forceUpdate();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- submitkeyNodes() {
- // console.log(this.addForm, '提交的参数')
- // return
- this.http.post('/project-key-nodes-setting/addOrMod',this.addFormkeyNodes,
- res => {
- if (res.code == "ok") {
- this.addBasekeyNodesialog = false;
- this.keyNodesList = res.data;
- this.$forceUpdate();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- showBaseCostItemDialog() {
- this.showBaseConfig = true;
- },
- addNewBaseItem(row) {
- this.addBaseItemDialog = true;
- if (row == null) {
- this.addForm = {alarmType: 0}
- } else {
- this.addForm = JSON.parse(JSON.stringify(row));
- }
- },
- //获取客户列表
- getCustomerList() {
- this.http.post('/customer-info/getAll', {
- },
- res => {
- if (res.code == "ok") {
- this.customerList = res.data;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- importProjectBefore(){
- this.paramData1 = false
- this.changeParticipation = false
- this.importProjectBeforeDialog = true
- },
- changeParticipationValue(value){
- this.paramData1=value
- },
- importProject(item) {
- //首先判断文件类型
- let str = item.file.name.split(".");
- let format = str[str.length - 1];
- if (format != "xls" && format != "xlsx") {
- this.$message({
- message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
- type: "error"
- });
- } else {
- this.listLoading = true;
- let formData = new FormData();
- formData.append("file", item.file);
- formData.append("userId", this.user.id);
- formData.append('key',this.paramData1 ? 1 : 0)
- formData.append('changeParticipation',this.changeParticipation ? 1 : 0)
- this.http.uploadFile('/project/importData', formData,
- res => {
- this.$refs.upload.clearFiles();
- this.listLoading = false;
- if (res.code == "ok") {
- // this.$message({
- // message: res.data,
- // type: "success"
- // },5000);
- //弹窗显示
- this.showImportResult = true;
- this.importProjectBeforeDialog = false
- this.importResultMsg = res.data;
- this.getList();
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$refs.upload.clearFiles();
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- });
- }
- },
- number(){
- // this.addForm.budget = this.addForm.budget.replace(/[^\.\d]/g,'');
- // this.addForm.budget = this.addForm.budget.replace('.','');
- },
- deleteSubPro(subProject) {
- this.$confirm(this.$t('makesuretodeletethesubproject') + subProject.name + this.$t('ma'),this.$t('deletesubproject'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: "warning"
- })
- .then(() => {
- this.listLoading = true;
- this.http.post('/sub-project/deleteProject',{
- id: subProject.id
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- this.subProject(this.currentProject);
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- })
- .catch(() => {});
- },
- searchList() {
- this.page = 1;
- this.getList();
- },
- addNewSubProject(subProject) {
- if (subProject == null) {
- this.temaddForm = {projectId: this.currentProject.id, level:1}
- } else {
- let aac = JSON.parse(JSON.stringify(subProject))
- aac.status=aac.status==true?1:0
- this.temaddForm = JSON.parse(JSON.stringify(aac));
- }
- this.addSubProject = true;
- },
- //显示子项目
- subProject(item) {
- this.subProjectVisible = true;
- this.currentProject = item;
- this.http.post('/sub-project/list', {
- projectId: item.id
- },
- res => {
- if (res.code == "ok") {
- for(let i = 0; i < res.data.length; i++){
- res.data[i].status=res.data[i].status==1?true:false
- }
- this.subProjectList = res.data
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //显示用户详情
- showUser(userId) {
- this.userDetailVisible = true;
- this.http.post(this.port.manage.userDetail, {
- userId: userId
- },
- res => {
- if (res.code == "ok") {
- this.userDetail = res.data;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //选择参与人
- changeParticipator() {
- //检查是否在参与人中,如果没有需要加入到参与人中
- // console.log('addform',this.addForm.userId,this.users);
- this.participator = [];
- this.addForm.userId.forEach(u=>{
- var list = this.users.filter(au=>au.id == u);
- if (list.length > 0) {
- var findUser = list[0];
- this.participator.push(findUser);
- } else {
- console.log('未找到用户: '+u);
- }
-
- })
- },
- getUsers() {
- // this.http.post(this.port.manage.list, {
- // departmentId: -1,
- // pageIndex: 1,
- // // pageSize: 99999
- // pageSize: -1
- // },
- this.http.post('/user/getSimpleActiveUserList', {},
- res => {
- if (res.code == "ok") {
- this.users = res.data;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //分页
- handleCurrentChange(val) {
- this.page = val;
- this.getList();
- },
- handleSizeChange(val) {
- this.size = val;
- localStorage.projectPageSize = this.size;
- this.page = 1
- this.getList();
- },
- participationSelect(){
- this.page = 1
- this.getList()
- },
- //获取项目列表
- getList() {
- localStorage.projectPageIndex = this.page;
- this.listLoading = true;
- let parameter = {
- pageIndex: this.page,
- pageSize: this.size,
- keyword:this.keyword,
- searchField: this.searchField,
- status: this.status,
- category: this.statusClf,
- projectMainId: this.projectMainId,
- inchagerId: this.inchagerId,
- participation: this.participationId,
- }
- if(this.createDate) {
- parameter.startDate = this.createDate[0]
- parameter.endDate = this.createDate[1]
- }
- if(this.sortOrder){
- if(this.sortProp == 'inchargerName'){
- parameter.sortProp = "incharger_id"
- }else if(this.sortProp == 'customerName'){
- parameter.sortProp = "customer_id"
- }else if(this.sortProp == 'projectCode'){
- parameter.sortProp = 'project_code'
- }else if(this.sortProp == 'categoryName'){
- parameter.sortProp = 'category'
- }else if(this.sortProp == 'projectName'){
- parameter.sortProp = 'project_name'
- }else if(this.sortProp == 'status'){
- parameter.sortProp = 'status'
- }else if(this.sortProp == 'currentStage'){
- parameter.sortProp = 'current_stage_name'
- }else if(this.sortProp == 'departmentName'){
- parameter.sortProp = 'dept_id'
- }else if(this.sortProp == 'associateDegreeNames'){
- parameter.sortProp = 'associate_degrees'
- }
- if(this.sortOrder == 'descending'){
- parameter.sortOrder = 0
- }else if(this.sortOrder == 'ascending'){
- parameter.sortOrder = 1
- }
- }
- if(this.deptId.length > 0) {
- parameter.deptId = this.deptId[this.deptId.length - 1]
- } else {
- parameter.deptId = ''
- }
- this.http.post(this.port.project.listPage, parameter,
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- var list = res.data.records;
- for(var i in list) {
- var participator = list[i].participator , str = "";
- for(var j in participator) {
- if(j == participator.length-1) {
- str += participator[j].name
- } else {
- str += participator[j].name + ','
- }
- }
- list[i].userNames = str;
- }
- this.centerNameDegree = res.data.degrees
- this.showColumnWidth = this.showColumn(list)
- this.list = list;
- this.total = res.data.total;
- // this.$nextTick(()=>{
- // this.$refs.projectlistOfWudulist.doLayout();
- // })
- this.listHeader = res.data.nameList;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- showColumn(list){
- if(!this.permissions.projectManagement){
- let creat = false
- let incha = false
- for(let i in list){
- if(this.user.id == list[i].creatorId){
- creat = true
- }
- if(this.user.id == list[i].inchargerId){
- incha = true
- }
- }
- if(creat){
- return '300'
- }else {
- if(incha){
- return '210'
- } else if (this.permissions.projectParticipator) {//编辑参与人权限
- return '110'
- } else {
- return '0'
- }
- }
- }else {
- return '300'
- }
- },
- // 合同金额发生改变,需弹出修改原因的输入框
- contractAmountChange(value){
-
- if(this.contractAmountOld != value){
- this.contractAmountReasonShow = true
- }else{
- this.contractAmountReasonShow = false
- this.addForm.changeContractReason = ''
- }
- },
- //获取分组模板列表
- getGroupTemplate() {
- this.http.post('/group-template/getList',{},
- res => {
- if (res.code == "ok") {
- this.groupTemplateList = res.data;
- this.groupTemplateList[0].selected = true;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
-
- },
- // 处理数据
- chulishuju(data) {
- console.log(data, 12345)
- console.log(this.dataListBf, '看看')
- let arrLists = JSON.parse(JSON.stringify(this.dataListBf))
- var arr = []
- for(var s in arrLists) {
- for(var p in data.plateMap) {
- if(arrLists[s].customName == p && arrLists[s].customType != '1') {
- arrLists[s].value = data.plateMap[p]
- }
- if(arrLists[s].customName == p && arrLists[s].customType == '1' && data.plateMap[p] != null && data.plateMap[p] != ''){
- var sel = data.plateMap[p].split(',')
- var live = []
- for(var dd in sel) {
- var obj = {}
- obj.name = p
- // obj.url = this.pictureAddress + '/upload/' + sel[dd]
- obj.url = '/upload/' + sel[dd]
- live.push(obj)
- }
- console.log('值值hi', this.pictureAddress)
- arrLists[s].value = live
- arrLists[s].valuelist = sel
- }
- }
- }
- this.dataList = arrLists
- console.log(this.form, 9999)
- console.log(this.dataList, 8888)
- this.dialogVisible = true
- },
- //显示新增界面
- handleAdd(i, item) {
- this.canOnlyModParticipator = false;
- this.projectManagerEdit = false
- this.contractAmountReasonShow = false
- if(i == -1) {
- if(this.user.companyId == '936') {
- this.isShowProjectName = false
- }
- this.title = this.$t('newproject');
- this.addForm = {
- name: '',
- isPublic:0,
- userId: [],
- userNames:'',
- code:'',
- inchargerId:null,
- level: this.user.timeType.projectLevelState == 1 ? (this.levelList.length > 0 ? this.levelList[0].id : null) : 1,
- customerId:null,
- notifyUserNames:'',
- chosenLeaders:[],
- category:null,
- creatorId: this.user.id,
- projectMainId: '',
- outputValue: '',
- bu: [],
- manDay:0,
- fromOutside: 0,
- // deptId: []
- }
- this.estimatedWorkTime=''
- for(var i in this.dataList) {
- var str = 'plate' + (+i + 1)
- this.$set(this.addForm,str, '')
- }
- if(this.user.timeType.projectWithDept) {
- this.$set(this.addForm, 'deptId', [])
- }
- if(this.user.companyId == '936') {
- this.$set(this.addForm, 'contractCode', '')
- this.$set(this.addForm, 'warrantyStartDate', '')
- this.$set(this.addForm, 'warrantyEndDate', '')
- this.$set(this.addForm, 'projectCategorySub', '')
- this.$set(this.addForm, 'region', '')
- this.$set(this.addForm, 'bu', '')
- }
- if(this.user.timeType.projectManDay){
- this.$set(this.addForm, 'manDay',0)
- this.$set(this.addForm, 'manDayStartDate','')
- }
- // if(this.user.companyId == '428') {
- // this.$set(this.addForm, 'projectCategorySub', '')
- // }
- this.projectBaseCostData = [];
- this.auseList = [];
- for (var m=0;m<this.baseCostItemList.length; m++) {
- this.projectBaseCostData.push({baseId: this.baseCostItemList[m].id, baseName:this.baseCostItemList[m].name, baseAmount:0});
- }
- // 关键节点
- if(this.user.companyId == '936') {
- this.projectKeyNodesData = []
- for (var m=0;m<this.keyNodesList.length; m++) {
- this.projectKeyNodesData.push({nodesId: this.keyNodesList[m].id, nodesName:this.keyNodesList[m].name, planCompleteDate: null, actualCompleteDate: null, states: '0'});
- }
- // console.log(this.projectKeyNodesData, '节点值')
- }
- } else {
- console.log('点击来编辑执行')
- const usersJson = JSON.parse(sessionStorage.getItem("user"))
- if(usersJson.companyId == '936') {
- if(usersJson.roleName != '超级管理员' && usersJson.roleName != '系统管理员') {
- this.isShowProjectName = true
- } else {
- this.isShowProjectName = false
- }
- }
- console.log(this.isShowProjectName, '看看值')
- this.http.post('/project/detailTwo', {id: item.id},
- res => {
- if (res.code == "ok") {
- this.chulishuju(res.data)
- this.estimatedWorkTime=res.data.estimatedWorkTime==null?0:res.data.estimatedWorkTime
- this.addForm.estimatedWorkTime=res.data.estimatedWorkTime==null?0:res.data.estimatedWorkTime
- }
- });
- //编辑时,非 (管理全部项目,项目创建人,项目经理),有编辑项目参与人权限的人,可以进行参与人的修改
- if (!(this.permissions.projectManagement || this.user.id==item.inchargerId || this.user.id == item.creatorId) && this.permissions.projectParticipator) {
- this.canOnlyModParticipator = true;
- }
- if(this.permissions.projectManagement || this.user.id == item.creatorId) {
- this.projectManagerEdit = false
- } else {
- this.projectManagerEdit = true
- }
- this.title = this.$t('modifytheproject');
- var list = item.participator;
- if (item.isPublic == 1) {
- list = this.users;
- }
- var arr = [];
- var names = '';
- let namesLiss = [] // 企业微信用到的参与者
- for(var j in list) {
- arr.push(list[j].id)
- names += list[j].name+',';
- namesLiss.push(list[j].name)
- }
- if (names.length > 0) {
- names = names.substring(0, names.length -1);
- }
- this.addFormUserNames = namesLiss
- var listList = JSON.parse(JSON.stringify(item)),
- arrList = [],
- array = [];
- if (listList.deptCascade != "0" && listList.deptCascade != null) {
- if (listList.deptCascade.indexOf(",") > -1) {
- arrList = listList.deptCascade.split(",");
- } else {
- arrList = [].concat(listList.deptCascade);
- }
- }
- for (var i in arrList) {
- array.push(parseInt(arrList[i]));
- }
- let buascaderList = []
- if(item.buId) {
- let buArrList = item.buId.split(',')
- for(var i in buArrList) {
- buArrList[i] = +buArrList[i]
- }
- buascaderList = buArrList
- }
- // console.log(array, '转换', listList)
- this.addForm = {
- id: item.id,
- name: item.projectName,
- isPublic: item.isPublic,
- userId: arr,
- userNames:names,
- code:item.projectCode,
- inchargerId: item.inchargerId,
- level: item.level,
- planStartDate: item.planStartDate,
- planEndDate: item.planEndDate,
- budget: item.budget,
- baseMan: item.baseMan,
- contractAmount: item.contractAmount,
- baseFee: item.baseFee,
- baseRisk1: item.baseRisk1,
- baseRisk2: item.baseRisk2,
- baseOutsourcing: item.baseOutsourcing,
- customerId:item.customerId==0?null:item.customerId,
- category:item.category,
- projectDesc: item.projectDesc,
- projectMainId: item.projectMainId,
- creatorId: item.creatorId,
- outputValue: item.outputValue,
- // deptId: array.reverse(),
- changeContractReason: '',
- bu: buascaderList,
- manDay:item.manDay==null?0:item.manDay,
- manDayStartDate:item.manDayStartDate,
- manDayDisable:item.manDay,
- fromOutside:item.fromOutside
- }
- for(var i in this.dataList) {
- var str = 'plate' + (+i + 1)
- if(this.dataList[i].customType != '1') {
- this.$set(this.addForm,str, this.dataList[i].value==null?'':this.dataList[i].value)
- } else {
- this.$set(this.addForm,str,this.dataList[i].valuelist.join('@'))
- }
- }
- this.contractAmountOld = item.contractAmount ? item.contractAmount : 0
- // console.log(this.addForm, '数据')
- if(this.user.timeType.projectWithDept) {
- this.$set(this.addForm, 'deptId', array.reverse())
- }
- // 判断公司id是否等于936
- if(this.user.companyId == '936') {
- if(item.projectSeparate) {
- this.$set(this.addForm, 'contractCode', item.projectSeparate.contractCode)
- this.$set(this.addForm, 'warrantyStartDate', item.projectSeparate.warrantyStartDate)
- this.$set(this.addForm, 'warrantyEndDate', item.projectSeparate.warrantyEndDate)
- this.$set(this.addForm, 'projectCategorySub', item.projectSeparate.projectCategorySub)
- this.$set(this.addForm, 'region', item.projectSeparate.region)
- this.$set(this.addForm, 'bu', item.projectSeparate.bu)
- } else {
- this.$set(this.addForm, 'contractCode', '')
- this.$set(this.addForm, 'warrantyStartDate', '')
- this.$set(this.addForm, 'warrantyEndDate', '')
- this.$set(this.addForm, 'projectCategorySub', '')
- this.$set(this.addForm, 'region', '')
- this.$set(this.addForm, 'bu', '')
- }
- }
- // if(this.user.companyId == '428') {
- // if(item.projectSeparate) {
- // this.$set(this.addForm, 'projectCategorySub', item.projectSeparate.projectCategorySub)
- // } else {
- // this.$set(this.addForm, 'projectCategorySub', '')
- // }
- // }
- // 判断是否有供应商
- if(this.user.company.packageProvider) {
- // this.addForm.supplierId = item.providerIds.split(',')
- if(item.providerIds) {
- let arr = []
- let zhhi = item.providerIds.split(',')
- for(let i in zhhi) {
- arr.push(+zhhi[i] + 0)
- }
- this.$set(this.addForm, 'supplierId', arr)
- // console.log( this.addForm.supplierId)
- } else {
- this.$set(this.addForm, 'supplierId', [])
- }
-
- }
- // 判断是否有供应商结尾
- this.deleteVif = item.creatorId
- // console.log("handleadd",this.deleteVif,this.addForm)
- if(item.associateDegrees != null && item.associateDegrees != 'null' && item.associateDegrees != '') {
- var spli = item.associateDegrees.split(',')
- var sl = []
- for(var i in spli) {
- var num = +spli[i] + 0
- sl.push(num)
- }
- this.auseList = sl
- // console.log(this.auseList)
- } else {
- this.auseList = []
- }
- // var spli = item.associateDegrees.split(',')
- // var sl = []
- // for(var i in spli) {
- // var num = +spli[i] + 0
- // sl.push(num)
- // }
- // this.auseList = sl
- // console.log(this.auseList)
- this.changeParticipator();
- this.getProjectBaseData(item.id);
- this.getProjectKeyNodeData(item.id)
- if (this.user.company.packageEngineering == 1) {
- this.getProjectProfessions(item.id);
-
- }
- //获取项目的相关领导
- // this.getProjectNotifyUserList(item.id);
- this.getProjectAutorList(item.id);
- if (this.user.timeType.reportCc == 1) {
- this.getProjectCcUserList(item.id);
- }
- // this.findUserInTree()
- }
- this.addFormVisible = true;
- if (this.user.timeType.projectManDay == 1) {
- this.getManDaySetting();
- }
- if (this.user.company.packageEngineering == 1) {
- if (this.professionList.length == 0) {
- this.getProfessionList();
- }
- }
- },
- //获取项目日报抄送人
- getProjectCcUserList(projectId) {
- this.http.post('/project-ccuser/getList',{projectId: projectId},
- res => {
- if (res.code == "ok") {
- this.addForm.ccUserIds = res.data.map(function(item) {
- return item.userId;
- });
- this.$forceUpdate()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- //获取项目审核人
- getProjectAutorList(projectId) {
- this.http.post('/project-auditor/getList',{projectId: projectId},
- res => {
- if (res.code == "ok") {
- if (this.user.timeType.reportAuditType == 6) {
- //单个日报审核人,单选
- var arr = res.data.map(function(item) {
- return item.auditorId;
- });
- if (arr.length > 0) {
- this.addForm.auditUserIds = arr[0];
- } else {
- this.addForm.auditUserIds = null;
- }
- } else {
- this.addForm.auditUserIds = res.data.map(function(item) {
- return item.auditorId;
- });
- }
-
- this.$forceUpdate()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- getProjectBaseData(projectId) {
- this.http.post('/project-basecost/get',{projectId: projectId},
- res => {
- if (res.code == "ok") {
- this.projectBaseCostData = res.data;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- getProjectKeyNodeData(projectId) {
- this.http.post('/project-key-nodes/get',{projectId: projectId},
- res => {
- if (res.code == "ok") {
- this.projectKeyNodesData = res.data;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- //提交子项目创建修改请求
- submitInsertSubProject () {
- this.$refs.form2.validate(valid => {
- if (valid) {
- this.http.post('/sub-project/saveOrUpdate',this.temaddForm,
- res => {
- if (res.code == "ok") {
- this.$message({
- message: this.$t('operationissuccessful'),
- type: "success"
- });
- this.subProject(this.currentProject);
- this.addSubProject = false;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- }
- });
- },
- // 项目基线合计
- addUpfun() {
- var total = 0;
- for (var i=0;i<this.projectBaseCostData.length; i++) {
- if (this.projectBaseCostData[i].baseAmount) {
- total += parseFloat(this.projectBaseCostData[i].baseAmount);
- }
- }
- this.addForm.budget = total;
- // var a = '0'
- // var q = '0'
- // var w = '0'
- // var e = '0'
- // var r = '0'
- // // this.addForm.baseMan === undefined || this.addForm.baseMan === NaN ? this.addForm.baseMa = '0' : this.addForm.baseMan
- // if (this.addForm.baseMan == undefined || this.addForm.baseMan == NaN) {
- // a = 0
- // } else {
- // a = this.addForm.baseMan
- // }
- // if (this.addForm.baseFee !== undefined) q = this.addForm.baseFee
- // if (this.addForm.baseOutsourcing !== undefined) w = this.addForm.baseOutsourcing
- // if (this.addForm.baseRisk1 !== undefined) e = this.addForm.baseRisk1
- // if (this.addForm.baseRisk2 !== undefined) r = this.addForm.baseRisk2
- // this.addForm.budget = +a + +q + +w + +e + +r
- },
- submitInsert() {
- this.$refs.form1.validate(valid => {
- if (valid) {
- if (this.user.company.packageEngineering == 1) {
- if (!this.checkProjectProfession()) {//检查不通过,直接返回
- return;
- }
- }
- this.addLoading = true;
- let formData = new FormData();
- formData.append("name", this.addForm.name);
- if(this.addForm.projectDesc != null) {
- formData.append("projectDesc", this.addForm.projectDesc);
- }
- if(this.addForm.id != null) {
- formData.append("id", this.addForm.id);
- }
- if(this.addForm.isPublic != null) {
- formData.append("isPublic", this.addForm.isPublic);
- }
- if(this.addForm.userId.length != 0 && this.addForm.isPublic == 0) {
- for(var j in this.addForm.userId) {
- formData.append("userId", this.addForm.userId[j]);
- }
- }
- if(this.addForm.inchargerId != null) {
- formData.append("inchargerId", this.addForm.inchargerId);
- }
- if(this.addForm.code != null) {
- formData.append("code", this.addForm.code);
- }
- if(this.addForm.planStartDate != null) {
- formData.append("planStartDate", this.addForm.planStartDate);
- }
- if(this.addForm.planEndDate != null) {
- formData.append("planEndDate", this.addForm.planEndDate);
- }
- if(this.addForm.level != null) {
- formData.append("level", this.addForm.level);
- }
- if(this.addForm.contractAmount != null) {
- formData.append("contractAmount", this.addForm.contractAmount);
- }
- if(this.contractAmountReasonShow){
- formData.append("changeContractReason", this.addForm.changeContractReason);
- }
- if (this.projectBaseCostData != null) {
- formData.append("projectBaseCostData", JSON.stringify(this.projectBaseCostData));
- //计算总预算成本
- if (this.addForm.budget == null) {
- this.addForm.budget = 0;
- }
- formData.append("budget", this.addForm.budget);
- }
- if (this.addForm.customerId == null) {
- formData.append("customerId", 0);
- } else {
- formData.append("customerId", this.addForm.customerId);
- }
- if (this.addForm.contractAmount) {
- formData.append("contractAmount", this.addForm.contractAmount);
- } else {
- formData.append("contractAmount", 0);
- }
- if (this.chosenLeaders != null && this.chosenLeaders.length > 0) {
- formData.append("chosenLeaders", JSON.stringify(this.chosenLeaders));
- }
- if (this.user.timeType.outputValueStatus == 1){
- formData.append("outputValue",this.addForm.outputValue ? this.addForm.outputValue : 0)
- }
-
- var listId = []
- var listName = []
- for(var i in this.auseList) {
- for(var j in this.ause) {
- if(this.auseList[i] == this.ause[j].id) {
- listId.push(this.ause[j].id);
- listName.push(this.ause[j].name);
- break;
- }
- }
- }
- listId.toString()
- listName.toString()
- formData.append("associateDegrees", listId)
- formData.append("associateDegreeNames", listName)
- //日报审核人
- if (this.addForm.auditUserIds) {
- if (this.user.timeType.reportAuditType == 6) {
- formData.append("auditUserIds", this.addForm.auditUserIds);
- } else {
- formData.append("auditUserIds", JSON.stringify(this.addForm.auditUserIds));
- }
- }
- //日报抄送人
- if (this.addForm.ccUserIds) {
- formData.append("ccUserIds", JSON.stringify(this.addForm.ccUserIds));
- }
- if(this.addForm.category != null) {
- formData.append("category", this.addForm.category);
- }
- if(this.user.timeType.mainProjectState == '1' && this.addForm.projectMainId) {
- formData.append("projectMainId", this.addForm.projectMainId);
- }
- // 提交供应商
- // 线判断是否有供应商
- if(this.user.company.packageProvider) {
- let suppStrName = []
- for(let is in this.addForm.supplierId) {
- for(let js in this.supplierList) {
- if(this.addForm.supplierId[is] == this.supplierList[js].id) {
- suppStrName.push(this.supplierList[js].providerName)
- }
- }
- }
- formData.append("providerNames", suppStrName.toString());
- formData.append("providerIds", this.addForm.supplierId.toString());
- }
- // 判断公司id是否等于 936
- if(this.user.companyId == '936') {
- formData.append("contractCode", this.addForm.contractCode ? this.addForm.contractCode : '');
- formData.append("warrantyStartDate", this.addForm.warrantyStartDate ? this.addForm.warrantyStartDate : '');
- formData.append("warrantyEndDate", this.addForm.warrantyEndDate ? this.addForm.warrantyEndDate : '');
- formData.append("projectCategorySub", this.addForm.projectCategorySub ? this.addForm.projectCategorySub : '');
- formData.append("region", this.addForm.region ? this.addForm.region : '');
- // 关键节点
- formData.append("projectKeyNodesData", JSON.stringify(this.projectKeyNodesData));
- }
- // if(this.user.companyId == '428') {
- // formData.append("projectCategorySub", this.addForm.projectCategorySub ? this.addForm.projectCategorySub : '');
- // }
- if(this.user.timeType.projectWithDept) {
- if(this.addForm.deptId != null && this.addForm.deptId != '') {
- formData.append("deptId", this.addForm.deptId[this.addForm.deptId.length - 1])
- }
- }
- formData.append("buId", this.addForm.bu ? this.addForm.bu : '');
- if(this.user.timeType.projectManDay){
- //检验预估人天的必填属性
- if (this.manDaySetting.projectManDayFillMode == 2 || (this.manDaySetting.projectManDayFillMode == 1 && this.addForm.fromOutside == 0)) {
- if (!this.addForm.manDay) {
- this.$message({
- message: '预估工时不能为0',
- type: "error"
- });
- this.addLoading = false;
- return;
- }
- }
- formData.append("manDay", this.addForm.manDay ? this.addForm.manDay : '');
- formData.append("manDayStartDate", this.addForm.manDayStartDate ? this.addForm.manDayStartDate : '');
- }
- for(var i in this.dataList) {
- var str = 'plate' + (+i + 1)
- if(this.dataList[i].customType != '1') {
- formData.append(str,this.dataList[i].value==null?'':this.dataList[i].value);
- } else {
- formData.append(str,this.dataList[i].valuelist.join('@'));
- }
- }
- // formData.append("associateDegreeNames", listName)
- //console.log("addform",this.addForm);
- //return
- this.http.uploadFile(this.port.project.add,formData,
- res => {
- this.addLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: (this.addForm.id!=null?this.$t('xiu-gai'):this.$t('create'))+this.$t('other.successful'),
- type: "success"
- });
- this.addFormVisible = false;
- this.getList();
- if (this.user.company.packageEngineering == 1) {
- this.saveProjectProfessions(res.data);
- }
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.addLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- });
- }
- });
- },
- cascaderChange(e) {
- // console.log(e)
- // console.log(this.addForm)
- // if(e.length )
- // console.log(e)
- },
- // 删除
- deletePro(i, item) {
- this.$confirm(this.$t('makesuretodeletetheitem')+"[" + item.name + "]"+this.$t('ma'),this.$t('deletetheproject'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: "warning"
- })
- .then(() => {
- this.listLoading = true;
- this.http.post(this.port.project.delete,{
- id: item.id
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- this.getList();
- this.addFormVisible = false
- } else if (res.code == 'reconfirm') {
- this.deleteAlertMsg = res.msg;
- this.forceDeletePro(item.id);
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- })
- .catch(() => {});
- },
- // 模板下载
- downloadmb(){
- this.http.post('/project/getTemplate',{
- companyId: this.user.companyId
- },res => {
- if(res.code == 'ok'){
- var filePath = res.data;
- const a = document.createElement('a'); // 创建a标签
- var fileName = filePath.split('/')[2];
- a.setAttribute('download', fileName);// download属性
- a.setAttribute('href', filePath);// href链接
- a.click(); //自执行点击事件
- a.remove();
- }else{
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- //强制删除项目
- forceDeletePro(deleteProId) {
- this.$confirm(this.deleteAlertMsg,this.$t('deletetheproject'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: "warning"
- })
- .then(() => {
- this.listLoading = true;
- this.http.post(this.port.project.delete,{
- id: deleteProId ,force:1
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- this.getList();
- this.addFormVisible = false;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.listLoading = false;
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- })
- .catch(() => {});
- },
- detail(i) {
- this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
- },
- // 获取部门
- getDepartmentList() {
- this.http.post( this.port.manage.depList, {},
- res => {
- if (res.code == "ok") {
- let dptlist = JSON.parse(JSON.stringify(res.data));
- this.departmentList = this.changeArr(dptlist);
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- changeArr(arr) {
- for (var i = 0; i < arr.length; i++) {
- if(arr[i].id != -1 && arr[i].id != 0) {
- if (arr[i].children != null && arr[i].children.length>0) {
- arr[i].children = this.changeArr(arr[i].children);
- }
- arr[i].id && (arr[i].value = arr[i].id);
- delete arr[i].id;
- }
- }
- for(var i in arr) {
- if(arr[i].id == -1 || arr[i].id == 0) {
- arr.splice(i,1)
- }
- }
- return arr;
- },
- // 自定义组件事件
- selectCal(obj) {
- if(obj.distinction == '1') {
- this.inchagerId = obj.id
- this.manageSelect()
- } else if(obj.distinction == '2') {
- this.participationId = obj.id
- this.participationSelect()
- } else if(obj.distinction == '3') {
- this.addForm.inchargerId = obj.id
- // console.log(this.participator)
- this.participator = JSON.parse(JSON.stringify(this.participator))
- } else if(obj.distinction =='4') {
- this.projectProfessionList[obj.other].inchargerId = obj.id
- } else if(obj.distinction =='5') {
- this.paramInchargerId = obj.id
- }else if(obj.distinction =='6') {
- this.hasSetGroupInchargerId = obj.id
- } else if(obj.distinction == '10') {
- let userList = obj.arrUserList
- let arr = []
- for(var i in userList) {
- arr.push(userList[i].id)
- }
- this.participator = JSON.parse(JSON.stringify(this.participator))
- this.addForm.auditUserIds = arr
- } else if(obj.distinction == '11') {
- let userList = obj.id
- console.log(obj)
- this.curProfessionRow.membList[obj.other].membId = userList
- }
- },
- vueCasader(obj) {
- if(obj.distinction == '32') {
- let arr = []
- arr.push(obj.id)
- this.addForm.bu = arr.join(",")
- }
- },
- changSubStatus(subProject) {
- this.http.post('/sub-project/updateStatus',{
- id: subProject.id,
- status: subProject.status?1:0
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: subProject.status?"开启成功":"关闭成功",
- type: "success"
- });
- this.subProject(this.currentProject);
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- //计算预估工时
- jisuanEstimatedWorkTime(manDay){
- this.addForm.estimatedWorkTime=manDay*this.user.timeType.allday
- },
- //计算预估工时
- jisuanManDay(estimatedWorkTime){
- this.addForm.manDay=estimatedWorkTime/this.user.timeType.allday
- },
- getProjectList(){
- this.http.post(this.port.project.list,{
- },
- res => {
- this.listLoading = false;
- if (res.code == "ok") {
- this.allProjectList=res.data
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- //点击添加
- addFunctional(type){
- if(type=="functional"){
- this.functionalList.push({
- "id":null,
- 'timeType': '项目工时',
- 'role': 'CRC&LM',
- 'jobRespon': '',
- "companyId":this.user.companyId,
- 'editFlag': true, // 可编辑标识
- 'isSubmit': 0, // 是否点击确定标识
- })
- }else if(type=="workContext"){
- this.workContextList.push({
- "id":null,
- "proFunId":this.functionalId,
- 'workContext':null,
- 'editFlag': true, // 可编辑标识
- 'isSubmit': 0, // 是否点击确定标识
- })
- }
- },
- // 确定
- functionalSubmit(row){
- row.editFlag = false
- row.isSubmit = 1
- },
- // 取消
- functionalCancel(row, index,type){
- row.editFlag = false
- if (row.isSubmit) {
- if(type=="functional"){
- // this.functionalList[index]=this.oldValue
- this.$set(this.functionalList,index,this.oldValue);
- }else if(type=="workContext"){
- this.workContextList[index] = this.oldValue
- }
- }
- else if(!row.id){
- if(type=="functional"){
- this.functionalDelVersion(row,index);
- }else if(type=="workContext"){
- this.workContextDelVersion(row,index);
- }
- }
-
- },
- // 编辑
- functionalEditVersion(row){
- // v.value = JSON.parse(JSON.stringify(row));
- this.oldValue= Object.assign({}, row);;
- console.log("row",row,"old",this.oldValue)
- row.editFlag = true;
- },
- // 删除
- functionalDelVersion (row,index){
- console.log("index",index,'row',row)
- if(row.id==null){
- this.functionalList.splice(index, 1)
- return
- }
- this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.functionalList.splice(index, 1)
- this.http.post('/project/deleteFunctionalDivision',{
- id:row.id,
- },
- res => {
- if (res.code == "ok") {
- this.$message({
- message: '删除成功',
- type: "success"
- });
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
-
- },
- // 删除
- workContextDelVersion (row,index){
- if(row.id==null){
- this.workContextList.splice(index, 1)
- return
- }
- this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.workContextList.splice(index, 1)
- this.http.post('/project/deleteFunWorkContext',{
- id:row.id,
- },
- res => {
- if (res.code == "ok") {
- this.$message({
- message: '删除成功',
- type: "success"
- });
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
-
- },
- //保存职能分工
- submitFunctional(){
- this.http.post('/project/editFunctionalDivision',{
- json:JSON.stringify(this.functionalList),
- },
- res => {
- if (res.code == "ok") {
- this.$message({
- message: '操作成功',
- type: "success"
- });
- this.getFunctionalList()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- //保存工作内容
- submitWorkContext(){
- for(var index in this.workContextList){
- if(!this.workContextList[index].workContext){
- this.$message({
- message: "请填写工作内容",
- type: "error"
- });
- return
- }
- }
- this.http.post('/project/editFunWorkContext',{
- json:JSON.stringify(this.workContextList),
- },
- res => {
- if (res.code == "ok") {
- this.$message({
- message: '操作成功',
- type: "success"
- });
- // this.workContextDig = false
- this.getWorkContextList()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- //获取职能列表
- getFunctionalList(){
- this.http.post('/project/getFunctionalDivisionList',{},
- res => {
- if (res.code == "ok") {
- this.functionalList=res.data
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- //获取工作内容
- getWorkContextList(item){
- if(item){
- this.functionalId=item
- }
- this.http.post('/project/getFunWorkContextList',{
- id:this.functionalId
- },
- res => {
- if (res.code == "ok") {
- this.workContextList=res.data
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- //获取角色列表
- getRoleList(){
- this.http.post('/permission/getRoleList',{
- companyId:this.user.companyId,
- },
- res => {
- if (res.code == "ok") {
- this.roleList=res.data
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
-
- synchronizationChange() {
- if(this.synchronizationVal == '1') {
- this.hasChooseProjectCode = []
- } else {
- this.synchronizationInputVal = ''
- }
- }
- },
- created() {
- let height = window.innerHeight;
- this.tableHeight = height - 225;
- const that = this;
- window.onresize = function temp() {
- that.tableHeight = window.innerHeight - 195;
- };
- },
- mounted() {
- this.userssHu()
- this.getDepartment();
- this.getDepartment2();
- this.projectListPageComponentKey++;
- //localStorage中为string类型,需转化为int类型才会发生渲染
- if (localStorage.projectPageIndex) {
- this.page = parseInt(localStorage.projectPageIndex);
- }
-
- this.getList();
- this.getUsers();
- this.getCustomerList();
- this.getProjectBaseConfigList();
- this.getClfConfigList()
- this.yanjiuzx()
- this.getObtain()
- this.getProjectList()
- this.getGroupTemplate()
- // this.getRoleList()
- // 判断是否有供应商字段
- if(this.user.company.packageProvider == 1){
- this.getSupplierList()
- // this.getPhase()
- }
- if(this.user.company.packageProject == 1) {
- this.obtainPhase()
- }
- // this.getSupplierList()
- if(this.user.timeType.mainProjectState == 1){
- this.getMainProject()
- }
- if(this.user.timeType.projectLevelState == 1){
- this.getProjectLevel()
- }
- // 判断释放为专业版
- if(this.user.company.packageProject == 1) {
- 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')}]
- } else {
- 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')}]
- }
- // 获取部门
- if(this.user.timeType.projectWithDept) {
- this.getDepartmentList()
- }
- if(this.user.companyId == '936') {
- this.getkeyNodes()
- }
- if (this.user.timeType.projectManDay == 1) {
- this.getManDaySetting();
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .synchronization {
- display: flex;
- justify-content: space-between;
- // align-items: center;
- .synchronizationLabel {
- width: 140px;
- }
- }
- .rg_span{
- display: inline-block;
- }
- .rg_span span {
- text-align: right;
- box-sizing: border-box;
- padding-right: 10px;
- }
- .el-dialog__title {
- display: inline-table;
- margin-top: 20px;
- }
- .addss {
- width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .keyNodes {
- display: flex;
- width: 100%;
- box-sizing: border-box;
- padding: 10px 30px;
- }
- .keyNodes .keyNodesTime {
- width: 190px;
- display: flex;
- justify-content: center;
- }
- .keyNodes .keyNodesName {
- width: 260px;
- display: flex;
- align-items: center;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .dialogSwitch {
-
- }
- // 111
- </style>
- <style>
- .managePopperClass{
- width: 190px;
- }
- .el-dropdown-link {
- color: #409EFF;
- }
- .customdropdown{
- margin-left: 10px;
- }
- .customdropdown .el-dropdown__caret-button{
- height: 27px;
- }
- .customdropdown .el-button--mini:nth-child(1){
- height: 27px;
- }
- .customdropdown_menu{
- padding: 0;
- }
- .customdropdown_menu_btn{
- border-color: transparent;
- }
- .ganttdialog .el-dialog__body{
- height: 550px;
- }
- .toolbar_formitem_n1{
- margin-right: 0 !important;
- }
- .wpgCssClass .el-form-item__label{
- font-weight: 600;
- }
- .gongcheng .el-table .cell{
- overflow: inherit !important;
- }
- </style>
|