list.vue 270 KB

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