list.vue 270 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462
  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. oldValue:null,
  1741. };
  1742. },
  1743. // 过滤器
  1744. filters: {
  1745. numberToCurrency(value) {
  1746. if (!value) return '0.00'
  1747. // 将数值截取,保留两位小数
  1748. value = value.toFixed(2)
  1749. // 获取整数部分
  1750. const intPart = Math.trunc(value)
  1751. // 整数部分处理,增加,
  1752. const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  1753. // 预定义小数部分
  1754. let floatPart = '.00'
  1755. // 将数值截取为小数部分和整数部分
  1756. const valueArray = value.toString().split('.')
  1757. if (valueArray.length === 2) { // 有小数部分
  1758. floatPart = valueArray[1].toString() // 取得小数部分
  1759. return intPartFormat + '.' + floatPart
  1760. }
  1761. return intPartFormat + floatPart
  1762. },
  1763. mobans(value, valueList) {
  1764. for(var i in valueList) {
  1765. if(valueList[i].providerCateGoryName == value) {
  1766. return valueList[i].providerInfoName
  1767. }
  1768. }
  1769. },
  1770. },
  1771. watch: {
  1772. filterText(val) {
  1773. this.$refs.chooseMembTree.filter(val);
  1774. },
  1775. filterText2(val) {
  1776. this.$refs.chooseMembTree2.filter(val);
  1777. }
  1778. },
  1779. updated () {
  1780. // console.log('执行upload生命周期')
  1781. this.$nextTick(()=>{
  1782. this.$refs.projectlistOfWudulist.doLayout();
  1783. })
  1784. },
  1785. methods: {
  1786. submitCopySubProject() {
  1787. //获取选中的项目
  1788. if (this.checkedPForSubArr.length == 0) {
  1789. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  1790. return
  1791. }
  1792. var targetPIds = JSON.stringify(this.checkedPForSubArr.map((a)=>{return a.id}));
  1793. //http post请求提交
  1794. this.http.post('/sub-project/copyToProjects', {
  1795. projectId: this.currentProject.id,
  1796. targetProjectIds: targetPIds,
  1797. },
  1798. res => {
  1799. if (res.code == "ok") {
  1800. this.$message({
  1801. message: '操作成功',
  1802. type: "success"
  1803. });
  1804. this.copySubPListVisible = false;
  1805. } else {
  1806. this.$message({
  1807. message: res.msg,
  1808. type: "error"
  1809. });
  1810. }
  1811. },
  1812. error => {
  1813. this.$message({
  1814. message: error,
  1815. type: "error"
  1816. });
  1817. });
  1818. },
  1819. confirmChangeStage() {
  1820. let currentStageName = ''
  1821. for(var i in this.phaseList) {
  1822. if(this.phaseList[i].id == this.curChangeProject.curStageId) {
  1823. currentStageName = this.phaseList[i].projectStageName
  1824. }
  1825. }
  1826. this.http.post('/project/changeCurrentStage', {
  1827. projectId: this.curChangeProject.projectId,
  1828. currentStageId: this.curChangeProject.curStageId,
  1829. currentStageName: currentStageName
  1830. },
  1831. res => {
  1832. if (res.code == "ok") {
  1833. this.getList()
  1834. this.changeStageDialogVisible = false;
  1835. } else {
  1836. this.$message({
  1837. message: res.msg,
  1838. type: "error"
  1839. });
  1840. }
  1841. },
  1842. error => {
  1843. this.$message({
  1844. message: error,
  1845. type: "error"
  1846. });
  1847. });
  1848. },
  1849. showChangeStageDialog(projectId, curStageId) {
  1850. this.curChangeProject = {projectId: projectId, curStageId: curStageId};
  1851. this.changeStageDialogVisible = true;
  1852. },
  1853. addNewkeyNodes(row) {
  1854. this.addBasekeyNodesialog = true
  1855. if(row) {
  1856. this.addFormkeyNodes = row
  1857. } else {
  1858. this.addFormkeyNodes = {
  1859. name: ''
  1860. }
  1861. }
  1862. },
  1863. // 获取关键节点
  1864. getkeyNodes() {
  1865. this.http.post('/project-key-nodes-setting/list', {},
  1866. res => {
  1867. if (res.code == "ok") {
  1868. // this.keyNodesIsShow = true
  1869. this.keyNodesList = res.data
  1870. } else {
  1871. this.$message({
  1872. message: res.msg,
  1873. type: "error"
  1874. });
  1875. }
  1876. },
  1877. error => {
  1878. this.$message({
  1879. message: error,
  1880. type: "error"
  1881. });
  1882. });
  1883. },
  1884. hoverCall(row) {
  1885. this.rowid=row.id
  1886. },
  1887. handCall() {
  1888. this.rowid = ''
  1889. },
  1890. // 获取阶段
  1891. obtainPhase(item) {
  1892. this.http.post('/project-stage/list', {},
  1893. res => {
  1894. if (res.code == "ok") {
  1895. // this.phaseList = res.data
  1896. this.$set(this, 'phaseList', res.data)
  1897. } else {
  1898. this.$message({
  1899. message: res.msg,
  1900. type: "error"
  1901. });
  1902. }
  1903. },
  1904. error => {
  1905. this.$message({
  1906. message: error,
  1907. type: "error"
  1908. });
  1909. });
  1910. },
  1911. // 获取级别
  1912. getProjectLevel(){
  1913. this.http.post('/project-level/list', {},
  1914. res => {
  1915. if (res.code == "ok") {
  1916. this.levelList = res.data
  1917. // this.$set(this, 'levelList', res.data)
  1918. } else {
  1919. this.$message({
  1920. message: res.msg,
  1921. type: "error"
  1922. });
  1923. }
  1924. },
  1925. error => {
  1926. this.$message({
  1927. message: error,
  1928. type: "error"
  1929. });
  1930. });
  1931. },
  1932. addProjectLevel(row){
  1933. this.addProjectLevelDialog = true
  1934. if(!row) {
  1935. this.addLevelForm = {
  1936. projectLevelName: '',
  1937. id: ''
  1938. // companyId:''
  1939. }
  1940. } else {
  1941. this.addLevelForm = {
  1942. id: row.id,
  1943. projectLevelName: row.projectLevelName
  1944. // companyId: row.companyId
  1945. }
  1946. }
  1947. },
  1948. deleteProjectLevel(row) {
  1949. this.$confirm($t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingprojectlevels'), {
  1950. confirmButtonText: this.$t('btn.determine'),
  1951. cancelButtonText: this.$t('btn.cancel'),
  1952. type: "warning"
  1953. })
  1954. .then(() => {
  1955. this.listLoading = true;
  1956. this.http.post('/project-level/delete',{
  1957. id: row.id
  1958. },
  1959. res => {
  1960. this.listLoading = false;
  1961. if (res.code == "ok") {
  1962. this.$message({
  1963. message: this.$t('message.successfullyDeleted'),
  1964. type: "success"
  1965. });
  1966. this.getProjectLevel();
  1967. } else {
  1968. this.$message({
  1969. message: res.msg,
  1970. type: "error"
  1971. });
  1972. }
  1973. },
  1974. error => {
  1975. this.listLoading = false;
  1976. this.$message({
  1977. message: error,
  1978. type: "error"
  1979. });
  1980. }
  1981. );
  1982. })
  1983. .catch(() => {});
  1984. },
  1985. submitLevelPro(){
  1986. this.http.post('/project-level/addOrMod',this.addLevelForm,
  1987. res => {
  1988. if (res.code == "ok") {
  1989. this.addProjectLevelDialog = false;
  1990. this.getProjectLevel()
  1991. } else {
  1992. this.$message({
  1993. message: res.msg,
  1994. type: "error"
  1995. });
  1996. }
  1997. },
  1998. error => {
  1999. this.$message({
  2000. message: error,
  2001. type: "error"
  2002. });
  2003. }
  2004. );
  2005. },
  2006. // 表格点击
  2007. tableCellClassName({row, column, rowIndex, columnIndex}) {
  2008. row.index=rowIndex;
  2009. column.index=columnIndex;
  2010. },
  2011. // clickCell(row,column) {
  2012. // // console.log('can can need',row,column)
  2013. // this.currentCell = row.index + ',' + column.index;
  2014. // this.phaseProjectValie = row.currentStageId ? row.currentStageId : ''
  2015. // if(this.permissions.projectManagement || this.user.id==row.inchargerId || this.user.id==row.creatorId) {
  2016. // this.phaseProjectId = row.id
  2017. // setTimeout(() => {
  2018. // // 获得焦点
  2019. // this.$refs[row.index + ',' + column.index].focus();
  2020. // })
  2021. // }
  2022. // },
  2023. // selectChange() {
  2024. // let currentStageName = ''
  2025. // for(var i in this.phaseList) {
  2026. // if(this.phaseList[i].id == this.phaseProjectValie) {
  2027. // currentStageName = this.phaseList[i].projectStageName
  2028. // }
  2029. // }
  2030. // this.http.post('/project/changeCurrentStage', {
  2031. // projectId: this.phaseProjectId,
  2032. // currentStageId: this.phaseProjectValie,
  2033. // currentStageName: currentStageName
  2034. // },
  2035. // res => {
  2036. // if (res.code == "ok") {
  2037. // this.getList()
  2038. // } else {
  2039. // this.$message({
  2040. // message: res.msg,
  2041. // type: "error"
  2042. // });
  2043. // }
  2044. // },
  2045. // error => {
  2046. // this.$message({
  2047. // message: error,
  2048. // type: "error"
  2049. // });
  2050. // });
  2051. // },
  2052. // hideSelect() {
  2053. // var that = this
  2054. // setTimeout(() => {
  2055. // that.currentCell = null
  2056. // }, 500)
  2057. // },
  2058. // 点击主项目事件
  2059. projectManagementChange() {
  2060. let categoryId = ''
  2061. for(var i in this.mainProjectList) {
  2062. if(this.mainProjectList[i].id == this.addForm.projectMainId) {
  2063. categoryId = this.mainProjectList[i].categoryId
  2064. }
  2065. }
  2066. categoryId == '' ? '' : this.addForm.category = categoryId
  2067. // console.log(this.addForm)
  2068. },
  2069. tableSort({column, prop, order}){
  2070. if(prop == 'inchargerName' || prop == 'customerName' || prop == 'projectCode' || prop == 'categoryName' || prop == 'projectName' || prop == 'status' || prop == 'currentStage' || prop == 'departmentName' || prop == 'associateDegreeNames'){
  2071. this.sortOrder = order
  2072. this.sortProp = prop
  2073. this.getList()
  2074. }
  2075. },
  2076. fileUpload(file) {
  2077. //首先判断文件类型
  2078. console.log(file)
  2079. let str = file.file.name.split(".");
  2080. let indexLi = file.action
  2081. let format = str[str.length - 1];
  2082. if (format != "jpg" && format != "jpeg" && format != "png") {
  2083. this.$message({
  2084. message: "请选择.jpg或.jpeg文件",
  2085. type: "error"
  2086. });
  2087. } else {
  2088. let formData = new FormData();
  2089. formData.append("multipartFile", file.file);
  2090. this.http.uploadFile('/common/uploadFile', formData,
  2091. res => {
  2092. if (res.code == "ok") {
  2093. this.dataList[indexLi].valuelist.push(res.data)
  2094. this.$forceUpdate()
  2095. this.$message({
  2096. message: "上传成功",
  2097. type: "success"
  2098. });
  2099. } else {
  2100. this.$message({
  2101. message: res.msg,
  2102. type: "error"
  2103. });
  2104. }
  2105. },
  2106. error => {
  2107. this.$message({
  2108. message: error,
  2109. type: "error"
  2110. });
  2111. });
  2112. }
  2113. },
  2114. handleRemove(file, index) {
  2115. let uploadFiles = this.$refs.upload[0].uploadFiles
  2116. for (var i = 0; i < uploadFiles.length; i++) {
  2117. if (uploadFiles[i]['url'] == file.url) {
  2118. uploadFiles.splice(i, 1)
  2119. this.dataList[index].valuelist.splice(i, 1)
  2120. }
  2121. }
  2122. },
  2123. handlePictureCardPreview(file) {
  2124. console.log(file)
  2125. this.imgUrlLists = file.url;
  2126. this.imgUrlListFlg = true;
  2127. // this.$set(this, 'imgUrlListFlg', true)
  2128. // console.log(this.imgUrlListFlg)
  2129. this.$forceUpdate()
  2130. },
  2131. xhutDown(done) {
  2132. this.imgUrlListFlg = false
  2133. done()
  2134. this.$forceUpdate()
  2135. },
  2136. ipts(i, item) {
  2137. this.$forceUpdate()
  2138. },
  2139. getObtain() {
  2140. this.http.post('/project-custom/getProjectCustom', {},
  2141. res => {
  2142. if(res.code == 'ok') {
  2143. var yaunz = []
  2144. for(var i in res.data) {
  2145. if(res.data[i].customType == '1') {
  2146. this.$set(res.data[i], 'value', [])
  2147. this.$set(res.data[i], 'valuelist', [])
  2148. } else {
  2149. this.$set(res.data[i], 'value', '')
  2150. this.$set(res.data[i], 'valuelist', [])
  2151. }
  2152. yaunz.push(res.data[i])
  2153. }
  2154. this.dataList = yaunz
  2155. this.dataListBf = yaunz
  2156. } else {
  2157. this.$message({
  2158. message: error,
  2159. type: "error"
  2160. });
  2161. }
  2162. },
  2163. error => {;
  2164. this.$message({
  2165. message: error,
  2166. type: "error"
  2167. });
  2168. });
  2169. },
  2170. //获取项目列表
  2171. getSupplierList() {
  2172. this.http.post('/provider-info/list', {
  2173. pageIndex: 1,
  2174. // pageSize: 999,
  2175. pageSize: -1,
  2176. keyword: ''
  2177. },
  2178. res => {
  2179. if (res.code == "ok") {
  2180. this.supplierList = res.data.records;
  2181. } else {
  2182. this.$message({
  2183. message: res.msg,
  2184. type: "error"
  2185. });
  2186. }
  2187. },
  2188. error => {
  2189. this.$message({
  2190. message: error,
  2191. type: "error"
  2192. });
  2193. });
  2194. },
  2195. addManPro(row) {
  2196. this.addFlgmainProjectDialog = true
  2197. if(!row) {
  2198. this.addMainForm = {
  2199. name: '',
  2200. id: '',
  2201. code: '',
  2202. categoryId: ''
  2203. }
  2204. } else {
  2205. this.addMainForm = {
  2206. id: row.id,
  2207. code: row.code,
  2208. name: row.name,
  2209. categoryId: row.categoryId,
  2210. }
  2211. }
  2212. },
  2213. addPanthPro(row) {
  2214. this.addFlgPanthProjectDialog = true
  2215. if(!row) {
  2216. this.addPanthForm = {
  2217. projectStageName: '',
  2218. id: '',
  2219. companyId:''
  2220. }
  2221. } else {
  2222. this.addPanthForm = {
  2223. id: row.id,
  2224. projectStageName: row.projectStageName,
  2225. companyId: row.companyId
  2226. }
  2227. }
  2228. },
  2229. // 获取主项目
  2230. getMainProject() {
  2231. this.http.post('/project-main/list',{},res => {
  2232. if(res.code == 'ok'){
  2233. this.mainProjectList = res.data
  2234. }else {
  2235. this.$message({
  2236. message: res.msg,
  2237. type: 'error'
  2238. })
  2239. }
  2240. },err => {
  2241. this.$message({
  2242. message: err,
  2243. type: 'error'
  2244. })
  2245. })
  2246. },
  2247. checkedProlistForSub(e) {
  2248. this.checkedPForSubArr = e;
  2249. },
  2250. // 批量修改自定义维度
  2251. checkedWudulist(e){
  2252. // console.log(e);
  2253. this.checkedProjectArr = e
  2254. },
  2255. batchSetWudulistBtn1(){
  2256. this.$refs.projectlistOfWudulist.clearSelection()
  2257. this.checkedWuduArr = [],
  2258. this.addGroupPersonData = {
  2259. group: null,
  2260. person: null,
  2261. personNames: ''
  2262. }
  2263. },
  2264. batchSetWudulistBtn2(e){
  2265. if(this.checkedProjectArr.length == 0){
  2266. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2267. return
  2268. }
  2269. this.checkoradd = e
  2270. this.checkedWuduDialog = true
  2271. },
  2272. batchSetWudulistBtn3(){
  2273. if(this.checkedWuduArr.length == 0){
  2274. this.$message(this.$t('defaultText.pleaseChoose') + this.user.timeType.customDegreeName)
  2275. return
  2276. }
  2277. let projectIds = []
  2278. for(let i=0; i<this.checkedProjectArr.length; i++){
  2279. projectIds.push(this.checkedProjectArr[i].id)
  2280. }
  2281. let degreeIds = []
  2282. let degreeNames = []
  2283. for(let s=0; s<this.checkedWuduArr.length; s++){
  2284. degreeIds.push(this.checkedWuduArr[s].id)
  2285. degreeNames.push(this.checkedWuduArr[s].name)
  2286. }
  2287. this.http.post('/project/saveBatchAccoDegrees',{
  2288. ids: JSON.stringify(projectIds),
  2289. associateDegrees: degreeIds.toString(),
  2290. associateDegreeNames: degreeNames.toString()
  2291. },res => {
  2292. if(res.code == 'ok'){
  2293. this.checkedWuduDialog = false
  2294. this.batchSetWudulistBtn1()
  2295. this.$message({
  2296. message: this.$t('setupthesuccess'),
  2297. type: 'success'
  2298. })
  2299. this.getList()
  2300. }else {
  2301. this.$message({
  2302. message: res.msg,
  2303. type: 'error'
  2304. })
  2305. }
  2306. },err => {
  2307. this.$message({
  2308. message: err,
  2309. type: 'error'
  2310. })
  2311. })
  2312. },
  2313. batchSetWudulistBtn4(){
  2314. if(this.checkedWuduArr.length == 0){
  2315. this.$message(this.$t('defaultText.pleaseChoose') + this.user.timeType.customDegreeName)
  2316. return
  2317. }
  2318. let projectIds = []
  2319. for(let i=0; i<this.checkedProjectArr.length; i++){
  2320. projectIds.push(this.checkedProjectArr[i].id)
  2321. }
  2322. let degreeIds = []
  2323. let degreeNames = []
  2324. for(let s=0; s<this.checkedWuduArr.length; s++){
  2325. degreeIds.push(this.checkedWuduArr[s].id)
  2326. degreeNames.push(this.checkedWuduArr[s].name)
  2327. }
  2328. this.http.post('/project/addBatchAccoDegrees',{
  2329. ids: JSON.stringify(projectIds),
  2330. associateDegrees: degreeIds.toString(),
  2331. associateDegreeNames: degreeNames.toString()
  2332. },res => {
  2333. if(res.code == 'ok'){
  2334. this.checkedWuduDialog = false
  2335. this.batchSetWudulistBtn1()
  2336. this.$message({
  2337. message: this.$t('addsuccessful'),
  2338. type: 'success'
  2339. })
  2340. this.getList()
  2341. }else {
  2342. this.$message({
  2343. message: res.msg,
  2344. type: 'error'
  2345. })
  2346. }
  2347. },err => {
  2348. this.$message({
  2349. message: err,
  2350. type: 'error'
  2351. })
  2352. })
  2353. },
  2354. isSelectable(row,index){
  2355. if(row.creatorId == this.user.id || row.inchargerId == this.user.id || this.permissions.projectManagement){
  2356. return true
  2357. }else{
  2358. return false
  2359. }
  2360. },
  2361. test(row){
  2362. // console.log(row);
  2363. },
  2364. // 批量添加分组参与人员
  2365. addGroupPerson(){
  2366. let proArr = []
  2367. if(this.checkedProjectArr.length == 0){
  2368. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2369. return
  2370. }
  2371. this.addGroupPersonBtnLoading = true
  2372. this.isAddGroupPerson = true
  2373. for(let i=0;i<this.checkedProjectArr.length;i++){
  2374. proArr.push(this.checkedProjectArr[i].id)
  2375. }
  2376. this.http.post('/project/getProjectsGroups',{
  2377. projectIdArray: JSON.stringify(proArr)
  2378. },res => {
  2379. if(res.code == 'ok'){
  2380. // console.log('分组',res.data);
  2381. this.addGroupList = res.data
  2382. this.addGroupPersonBtnLoading = false
  2383. this.addGroupPersonDialog = true
  2384. }else {
  2385. this.$message({
  2386. message: res.msg,
  2387. type: 'error'
  2388. })
  2389. }
  2390. },err => {
  2391. this.$message({
  2392. message: err,
  2393. type: 'error'
  2394. })
  2395. })
  2396. },
  2397. addGroupPersonP(){
  2398. this.filterText2 = ''
  2399. this.addGroupPersonPdialog = true
  2400. },
  2401. addPersonCheck(){
  2402. var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  2403. var list = chosenList.filter(item=>item.isUser == 1);
  2404. this.chosenMembCount = list.length;
  2405. // console.log(list);
  2406. },
  2407. addPersonSure(){
  2408. this.addGroupPersonPdialog = false
  2409. let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  2410. let list = chosenList.filter(item=>item.isUser == 1);
  2411. let listIDs = []
  2412. let listNames = ''
  2413. let listNamesList = []
  2414. for(let i=0;i<list.length;i++){
  2415. listIDs.push(list[i].id)
  2416. listNames += list[i].label + ','
  2417. listNamesList.push(list[i].label)
  2418. }
  2419. this.addGroupPersonData.person = listIDs
  2420. this.addGroupPersonData.personNames = listNames
  2421. this.addGroupPersonDataPersonNames = listNamesList
  2422. console.log('触发', this.addGroupPersonDataPersonNames)
  2423. },
  2424. addGroupPersonSure(){
  2425. if(this.addGroupPersonData.group.length == 0 || this.addGroupPersonData.person == null){
  2426. this.$message({
  2427. message: this.$t('pleaseselectpersonnelasd'),
  2428. type: 'warning'
  2429. })
  2430. return
  2431. }
  2432. let groupList = []
  2433. for(let i=0;i<this.addGroupPersonData.group.length;i++){
  2434. groupList = [...groupList,...this.addGroupPersonData.group[i]]
  2435. }
  2436. this.http.post('/project/batchAddMembToGroup',{
  2437. membIdArray: JSON.stringify(this.addGroupPersonData.person),
  2438. groupIds: JSON.stringify(groupList)
  2439. },res => {
  2440. if(res.code == 'ok'){
  2441. this.addGroupPersonDialog = false,
  2442. this.batchSetWudulistBtn1()
  2443. this.$message({
  2444. message: this.$t('addsuccessful'),
  2445. type: 'success'
  2446. })
  2447. this.getList()
  2448. }else {
  2449. this.$message({
  2450. message: res.msg,
  2451. type: 'error'
  2452. })
  2453. }
  2454. },err => {
  2455. this.$message({
  2456. message: err,
  2457. type: 'error'
  2458. })
  2459. })
  2460. },
  2461. batchDelete(){
  2462. if(this.checkedProjectArr.length == 0){
  2463. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2464. return
  2465. }
  2466. let proArr = []
  2467. for(let i=0;i<this.checkedProjectArr.length;i++){
  2468. proArr.push(this.checkedProjectArr[i].id)
  2469. // proArr += this.checkedProjectArr[i].id + ','
  2470. }
  2471. this.isDeleting = true;
  2472. // proArr = proArr.substring(0,proArr.length - 1)
  2473. this.http.post('/project/batchDeleteProject',{
  2474. projectIdArray: JSON.stringify(proArr)
  2475. },res => {
  2476. this.isDeleting = false;
  2477. if(res.code == 'ok'){
  2478. this.$message({
  2479. message: this.$t('message.successfullyDeleted'),
  2480. type: 'success'
  2481. })
  2482. this.getList()
  2483. }else {
  2484. this.$message({
  2485. message: res.msg,
  2486. type: 'error'
  2487. })
  2488. }
  2489. },err => {
  2490. this.$message({
  2491. message: err,
  2492. type: 'error'
  2493. })
  2494. })
  2495. },
  2496. // 批量设置项目经理
  2497. batchIncharger(){
  2498. if(this.checkedProjectArr.length == 0){
  2499. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2500. return
  2501. }
  2502. this.batchInchargerDialog = true
  2503. this.paramInchargerId = ''
  2504. },
  2505. batchInchargerSure(){
  2506. if(!this.paramInchargerId){
  2507. this.$message({
  2508. message: this.$t('pleaseselecttheprojectmanager'),
  2509. type: 'warning'
  2510. })
  2511. return
  2512. }
  2513. let proArr = ''
  2514. for(let i=0;i<this.checkedProjectArr.length;i++){
  2515. // proArr.push(this.checkedProjectArr[i].id)
  2516. proArr += this.checkedProjectArr[i].id + ','
  2517. }
  2518. proArr = proArr.substring(0,proArr.length - 1)
  2519. this.http.post('/project/batchExchangeIncharger',{
  2520. inchargerId: this.paramInchargerId,
  2521. projectIds: proArr
  2522. },res => {
  2523. if(res.code == 'ok'){
  2524. this.batchInchargerDialog = false
  2525. this.$message({
  2526. message: this.$t('setupthesuccess'),
  2527. type: 'success'
  2528. })
  2529. this.getList()
  2530. }else {
  2531. this.$message({
  2532. message: res.msg,
  2533. type: 'error'
  2534. })
  2535. }
  2536. },err => {
  2537. this.$message({
  2538. message: err,
  2539. type: 'error'
  2540. })
  2541. })
  2542. },
  2543. // 批量添加项目参与人
  2544. addProPreson(){
  2545. if(this.checkedProjectArr.length == 0){
  2546. this.$message(this.$t('defaultText.pleaseSelectSnItem'))
  2547. return
  2548. }
  2549. this.addGroupPersonDialog = true
  2550. this.isAddGroupPerson = false
  2551. },
  2552. addProPersonSure(){
  2553. if(this.addGroupPersonData.person == null){
  2554. this.$message({
  2555. message: this.$t('pleaseselectpersonnel'),
  2556. type: 'warning'
  2557. })
  2558. return
  2559. }
  2560. let proArr = []
  2561. for(let i=0;i<this.checkedProjectArr.length;i++){
  2562. proArr.push(this.checkedProjectArr[i].id)
  2563. // proArr += this.checkedProjectArr[i].id + ','
  2564. }
  2565. // proArr = proArr.substring(0,proArr.length - 1)
  2566. this.http.post('/project/batchSetParticipation',{
  2567. userIds: JSON.stringify(this.addGroupPersonData.person),
  2568. projectIdArray: JSON.stringify(proArr)
  2569. },res => {
  2570. if(res.code == 'ok'){
  2571. this.addGroupPersonDialog = false,
  2572. this.batchSetWudulistBtn1()
  2573. this.$message({
  2574. message: this.$t('addsuccessful'),
  2575. type: 'success'
  2576. })
  2577. this.getList()
  2578. }else {
  2579. this.$message({
  2580. message: res.msg,
  2581. type: 'error'
  2582. })
  2583. }
  2584. },err => {
  2585. this.$message({
  2586. message: err,
  2587. type: 'error'
  2588. })
  2589. })
  2590. },
  2591. filterNode(value, data) {
  2592. if (!value) return true;
  2593. return data.label.indexOf(value) !== -1;
  2594. },
  2595. //重启项目
  2596. restartPro(row) {
  2597. this.http.post('/project/start',{id: row.id},
  2598. res => {
  2599. if (res.code == "ok") {
  2600. this.$message({
  2601. message: this.$t('restartthesuccess'),
  2602. type: "success"
  2603. });
  2604. row.status = 1;
  2605. } else {
  2606. this.$message({
  2607. message: res.msg,
  2608. type: "error"
  2609. });
  2610. }
  2611. },
  2612. error => {
  2613. this.$message({
  2614. message: error,
  2615. type: "error"
  2616. });
  2617. });
  2618. },
  2619. //撤销项目
  2620. cancelPro(row) {
  2621. this.http.post('/project/cancel',{id: row.id},
  2622. res => {
  2623. if (res.code == "ok") {
  2624. this.$message({
  2625. message: this.$t('Revocationofsuccess'),
  2626. type: "success"
  2627. });
  2628. row.status = 3;
  2629. } else {
  2630. this.$message({
  2631. message: res.msg,
  2632. type: "error"
  2633. });
  2634. }
  2635. },
  2636. error => {
  2637. this.$message({
  2638. message: error,
  2639. type: "error"
  2640. });
  2641. });
  2642. },
  2643. // 暂停项目
  2644. suspendPro(row) {
  2645. this.http.post('/project/suspend',{id: row.id},
  2646. res => {
  2647. if (res.code == "ok") {
  2648. this.$message({
  2649. message: this.$t('suspensionofsuccess'),
  2650. type: "success"
  2651. });
  2652. row.status = 4;
  2653. } else {
  2654. this.$message({
  2655. message: res.msg,
  2656. type: "error"
  2657. });
  2658. }
  2659. },
  2660. error => {
  2661. this.$message({
  2662. message: error,
  2663. type: "error"
  2664. });
  2665. });
  2666. },
  2667. //完成项目
  2668. finishPro(row) {
  2669. this.http.post('/project/finish',{id: row.id},
  2670. res => {
  2671. if (res.code == "ok") {
  2672. this.$message({
  2673. message: this.$t('projectcompletion'),
  2674. type: "success"
  2675. });
  2676. row.status = 2;
  2677. } else {
  2678. this.$message({
  2679. message: res.msg,
  2680. type: "error"
  2681. });
  2682. }
  2683. },
  2684. error => {
  2685. this.$message({
  2686. message: error,
  2687. type: "error"
  2688. });
  2689. });
  2690. },
  2691. exportProjectData() {
  2692. let param = {
  2693. status: this.status,
  2694. }
  2695. if(this.keyword){param.searchField = this.searchField;param.keyword = this.keyword}
  2696. if(this.projectMainId){param.projectMainId = this.projectMainId}
  2697. if(this.statusClf){param.category = this.statusClf}
  2698. if(this.deptId.length){param.deptId = this.deptId[this.deptId.length-1]}
  2699. if(this.inchagerId){param.inchagerId = this.inchagerId}
  2700. if(this.participationId){param.participation = this.participationId}
  2701. this.exportDisabled = true
  2702. this.exportNotification = this.$notify({
  2703. title: '导出项目',
  2704. message: '项目导出中、请稍后...',
  2705. duration: 0,
  2706. showClose: false
  2707. });
  2708. //导出项目
  2709. this.http.post('/project/exportData',param,
  2710. res => {
  2711. this.exportDisabled = false
  2712. this.exportNotification.close()
  2713. if (res.code == "ok") {
  2714. var filePath = res.data;
  2715. const a = document.createElement('a'); // 创建a标签
  2716. a.setAttribute('download', this.$t('projectexport') + '.xlsx');// download属性
  2717. a.setAttribute('href', filePath);// href链接
  2718. a.click(); //自执行点击事件
  2719. a.remove();
  2720. }
  2721. },
  2722. error => {
  2723. this.exportDisabled = false
  2724. this.exportNotification.close()
  2725. this.$message({
  2726. message: error,
  2727. type: "error"
  2728. });
  2729. }
  2730. );
  2731. },
  2732. exportProjectGroup() {
  2733. //导出项目分组
  2734. this.http.post('/project/exportGroupData',{projectCategorySubId:this.projectCategorySubId},
  2735. res => {
  2736. if (res.code == "ok") {
  2737. var filePath = res.data;
  2738. const a = document.createElement('a'); // 创建a标签
  2739. a.setAttribute('download', this.$t('projecttaskgroupexport') + '.xlsx');// download属性
  2740. a.setAttribute('href', filePath);// href链接
  2741. a.click(); //自执行点击事件
  2742. a.remove();
  2743. }
  2744. },
  2745. error => {
  2746. this.$message({
  2747. message: error,
  2748. type: "error"
  2749. });
  2750. }
  2751. );
  2752. },
  2753. userssHu() {
  2754. this.http.post('/time-type/getCompanyTimeSetting',{
  2755. companyId: this.user.companyId
  2756. },
  2757. res => {
  2758. if (res.code == "ok") {
  2759. this.yonghuUser = res.data
  2760. // console.log(this.yonghuUser)
  2761. }
  2762. },
  2763. error => {
  2764. this.$message({
  2765. message: error,
  2766. type: "error"
  2767. });
  2768. }
  2769. );
  2770. },
  2771. yanjiuzx() {
  2772. this.http.post('/report-extra-degree/getAll ',{},
  2773. res => {
  2774. if (res.code == "ok") {
  2775. // console.log(res, '过来的数据')
  2776. this.ause = res.data
  2777. } else {
  2778. this.$message({
  2779. message: res.msg,
  2780. type: "error"
  2781. });
  2782. }
  2783. },
  2784. error => {
  2785. this.$message({
  2786. message: error,
  2787. type: "error"
  2788. });
  2789. }
  2790. );
  2791. },
  2792. selectPublic() {
  2793. if (this.addForm.isPublic == 1) {
  2794. this.participator = this.users;
  2795. } else {
  2796. this.participator = [];
  2797. }
  2798. },
  2799. addPpMemb() {
  2800. //检查合计比例是否到达100%
  2801. let p = 0;
  2802. let hasNoMemb = false;
  2803. this.curProfessionRow.membList.forEach(m=>{
  2804. p += parseInt(m.percentage);
  2805. //检查人员是否选择
  2806. if (m.membId == null) {
  2807. hasNoMemb = true;
  2808. }
  2809. });
  2810. if (hasNoMemb) {
  2811. this.$message({
  2812. message: this.$t('professionalscannotbeempty'),
  2813. type: "error"
  2814. });
  2815. return;
  2816. }
  2817. //检查人员不能重复
  2818. let hasDuplicate = false;
  2819. this.curProfessionRow.membList.forEach(m=>{
  2820. if (this.curProfessionRow.membList.filter(innerM=>innerM.membId == m.membId).length>1) {
  2821. hasDuplicate = true;
  2822. }
  2823. });
  2824. if (hasDuplicate) {
  2825. this.$message({
  2826. message: this.$t('professionalscannotrepeat'),
  2827. type: "error"
  2828. });
  2829. return;
  2830. }
  2831. if (p != 100) {
  2832. this.$message({
  2833. message: this.$t('totalproportionmust'),
  2834. type: "error"
  2835. });
  2836. return;
  2837. }
  2838. this.editPpMembDialog = false;
  2839. this.curProfessionRow.membList.forEach(m=>{
  2840. m.membName = this.participator.filter(p=>p.id == m.membId)[0].name;
  2841. });
  2842. this.projectProfessionItem.membList = JSON.parse(JSON.stringify(this.curProfessionRow.membList));
  2843. },
  2844. //删除专业人员
  2845. deleteMembItem(index) {
  2846. this.curProfessionRow.membList.splice(index,1);
  2847. },
  2848. //添加专业人员
  2849. addMembItem() {
  2850. if (this.curProfessionRow.membList == null) {
  2851. this.curProfessionRow.membList = [{membId:null, percentage:100}];
  2852. } else {
  2853. let p = 0;
  2854. this.curProfessionRow.membList.forEach(m=>{
  2855. p += parseInt(m.percentage);
  2856. });
  2857. this.curProfessionRow.membList.push({membId:null, percentage:100-p});
  2858. }
  2859. this.$forceUpdate();
  2860. },
  2861. showEditPpMembs(row) {
  2862. this.projectProfessionItem = row;
  2863. this.curProfessionRow = JSON.parse(JSON.stringify(row));
  2864. if (this.curProfessionRow.membList == null || this.curProfessionRow.membList.length == 0) {
  2865. this.curProfessionRow.membList = [{membId:null, percentage:100}];
  2866. }
  2867. this.editPpMembDialog = true;
  2868. },
  2869. getProjectNotifyUserList(projectId) {
  2870. this.http.post("/project-notify-user/get", {projectId: projectId},
  2871. res => {
  2872. if (res.code == "ok") {
  2873. var chosenLeaderIds = [];
  2874. var chosenLeaderNames = '';
  2875. var leaderList = res.data;
  2876. this.chosenLeaders = leaderList;
  2877. for(var j in leaderList) {
  2878. chosenLeaderIds.push(leaderList[j].userId)
  2879. chosenLeaderNames += leaderList[j].userName+',';
  2880. }
  2881. if (chosenLeaderNames.length > 0) {
  2882. chosenLeaderNames = chosenLeaderNames.substring(0, chosenLeaderNames.length -1);
  2883. }
  2884. this.addForm.notifyUserIds = chosenLeaderIds;
  2885. this.addForm.notifyUserNames = chosenLeaderNames;
  2886. } else {
  2887. this.$message({
  2888. message: res.msg,
  2889. type: "error"
  2890. });
  2891. }
  2892. },
  2893. error => {
  2894. this.$message({
  2895. message: error,
  2896. type: "error"
  2897. });
  2898. });
  2899. },
  2900. getProjectProfessions(projectId) {
  2901. this.http.post("/project-profession/get", {projectId: projectId},
  2902. res => {
  2903. if (res.code == "ok") {
  2904. this.projectProfessionList = res.data;
  2905. } else {
  2906. this.$message({
  2907. message: res.msg,
  2908. type: "error"
  2909. });
  2910. }
  2911. },
  2912. error => {
  2913. this.$message({
  2914. message: error,
  2915. type: "error"
  2916. });
  2917. });
  2918. },
  2919. checkProjectProfession() {
  2920. //检查合计比例是否到达100%
  2921. let p = 0;
  2922. let hasNoMemb = false;
  2923. let hasNoProfession = false;
  2924. let hasNoMembList = false;
  2925. this.projectProfessionList.forEach(m=>{
  2926. p += parseInt(m.percentage);
  2927. //检查人员是否选择
  2928. if (m.inchargerId == null) {
  2929. hasNoMemb = true;
  2930. }
  2931. if (m.professionId == null) {
  2932. hasNoProfession = true;
  2933. }
  2934. if (m.membList == null) {
  2935. hasNoMembList = true;
  2936. }
  2937. });
  2938. if (hasNoProfession) {
  2939. this.$message({
  2940. message: this.$t('majorcannotbeempty'),
  2941. type: "error"
  2942. });
  2943. return false;
  2944. }
  2945. if (hasNoMembList) {
  2946. this.$message({
  2947. message: this.$t('personnelcannotbeleftblank'),
  2948. type: "error"
  2949. });
  2950. return false;
  2951. }
  2952. if (hasNoMemb) {
  2953. this.$message({
  2954. message: this.$t('leadercannotbeblank'),
  2955. type: "error"
  2956. });
  2957. return false;
  2958. }
  2959. //检查专业不能重复
  2960. let hasDuplicate = false;
  2961. this.projectProfessionList.forEach(m=>{
  2962. if (this.projectProfessionList.filter(innerM=>innerM.professionId == m.professionId).length>1) {
  2963. hasDuplicate = true;
  2964. }
  2965. });
  2966. if (hasDuplicate) {
  2967. this.$message({
  2968. message: this.$t('shouldnotberepeated'),
  2969. type: "error"
  2970. });
  2971. return false;
  2972. }
  2973. if (this.projectProfessionList.length > 0 && p != 100) {
  2974. this.$message({
  2975. message: this.$t('numberomajorsmust'),
  2976. type: "error"
  2977. });
  2978. return false;
  2979. }
  2980. return true;
  2981. },
  2982. //保存项目专业
  2983. saveProjectProfessions(projectId) {
  2984. var list = this.projectProfessionList.filter(p=>p.professionId != null);
  2985. list.forEach(p=>p.inchargerName = this.participator.filter(m=>m.id == p.inchargerId)[0].name);
  2986. list.forEach(p=>p.professionName = this.professionList.filter(m=>m.id == p.professionId)[0].name);
  2987. this.http.post("/project-profession/modify", {projectId: projectId, json: JSON.stringify(list)},
  2988. res => {
  2989. if (res.code == "ok") {
  2990. return false;
  2991. } else {
  2992. this.$message({
  2993. message: res.msg,
  2994. type: "error"
  2995. });
  2996. }
  2997. },
  2998. error => {
  2999. this.$message({
  3000. message: error,
  3001. type: "error"
  3002. });
  3003. });
  3004. },
  3005. //删除项目专业
  3006. deleteItem(index) {
  3007. this.projectProfessionList.splice(index,1);
  3008. },
  3009. //添加项目专业
  3010. addItem() {
  3011. let p = 0;
  3012. this.projectProfessionList.forEach(m=>{
  3013. p += parseInt(m.percentage);
  3014. });
  3015. this.projectProfessionList.push( { professionId:null, inchargerId:null,membIds:[], percentage: 100-p});
  3016. },
  3017. getProfessionList() {
  3018. this.http.post("/profession/getAll", {},
  3019. res => {
  3020. if (res.code == "ok") {
  3021. var list = res.data;
  3022. this.professionList = list;
  3023. } else {
  3024. this.$message({
  3025. message: res.msg,
  3026. type: "error"
  3027. });
  3028. }
  3029. },
  3030. error => {
  3031. this.$message({
  3032. message: error,
  3033. type: "error"
  3034. });
  3035. });
  3036. },
  3037. restrictNumber(targetId) {
  3038. let inpu = document.getElementById(targetId);
  3039. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  3040. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  3041. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g,'').replace('$#*','.');//去除其他"."
  3042. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  3043. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  3044. inpu.value = parseFloat(inpu.value);
  3045. }
  3046. },
  3047. showChooseLeaderTree() {
  3048. this.chosenMembCount = this.chosenLeaders.length;
  3049. this.chooseLeaderVisible = true;
  3050. },
  3051. onLeaderTreeItemChange() {
  3052. var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
  3053. var list = chosenList.filter(item=>item.isUser == 1);
  3054. this.chosenMembCount = list.length;
  3055. },
  3056. showChooseMembTree() {
  3057. this.deptMembData = JSON.parse(JSON.stringify(this.allMembData))
  3058. this.chosenMembCount = this.participator.length;
  3059. this.chooseParticipVisible = true;
  3060. this.filterText = ''
  3061. this.wxFilterText = ''
  3062. if(this.user.userNameNeedTranslate == 1) {
  3063. this.getDepartment()
  3064. }
  3065. let that = this
  3066. setTimeout(()=>{
  3067. that.chosenListBackup = that.$refs.chooseMembTree.getCheckedNodes();
  3068. }, 500)
  3069. console.log(this.chosenListBackup, '备份的数据')
  3070. },
  3071. onTreeItemChange() {
  3072. var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
  3073. var list = chosenList.filter(item=>item.isUser == 1);
  3074. this.chosenMembCount = list.length;
  3075. },
  3076. findUserInTree() {
  3077. if (this.filterName == '') {
  3078. this.deptMembData = this.allMembData;
  3079. } else {
  3080. var list = this.findRecursively(this.filterName, this.allMembData);
  3081. this.deptMembData = list;
  3082. }
  3083. },
  3084. findRecursively(username, list) {
  3085. var filterList = [];
  3086. for (var i=0;i<list.length; i++) {
  3087. if (list[i].isUser == 1) {
  3088. if (list[i].label.indexOf(username) >= 0) {
  3089. //匹配上了
  3090. filterList.push(list[i]);
  3091. }
  3092. } else if (list[i].children != null && list[i].children.length > 0) {
  3093. var subList = this.findRecursively(username, list[i].children);
  3094. if (subList.length > 0) {
  3095. subList.forEach(s=>filterList.push(s));
  3096. }
  3097. }
  3098. }
  3099. return filterList;
  3100. },
  3101. //确定选择参与人
  3102. chooseParticip() {
  3103. this.chooseParticipVisible = false;
  3104. var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
  3105. if(this.searchPersonnelFlg) {
  3106. chosenList = [...chosenList, ...this.chosenListBackup]
  3107. }
  3108. this.chosenMembList = chosenList.filter(item=>item.isUser == 1);
  3109. this.addForm.userNames = '';
  3110. this.addFormUserNames = []
  3111. this.addForm.userId = [];
  3112. this.participator = [];
  3113. for (var i=0;i<this.chosenMembList.length; i++) {
  3114. this.addForm.userId.push(this.chosenMembList[i].id);
  3115. this.addForm.userNames += this.chosenMembList[i].label+',';
  3116. this.addFormUserNames.push(this.chosenMembList[i].label)
  3117. var item = {id:this.chosenMembList[i].id, name:this.chosenMembList[i].label};
  3118. this.participator.push(item);
  3119. }
  3120. if (this.addForm.userNames.length > 0) {
  3121. this.addForm.userNames = this.addForm.userNames.substring(0, this.addForm.userNames.length-1);
  3122. // this.addFormUserNames = this.addFormUserNames.substring(0, this.addFormUserNames.length-1);
  3123. }
  3124. console.log(this.addForm.userId)
  3125. console.log(this.addForm.userNames)
  3126. console.log(this.addFormUserNames)
  3127. },
  3128. //选中相关领导
  3129. // chooseLeader() {
  3130. // this.chooseLeaderVisible = false;
  3131. // var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
  3132. // var chosenMembList = chosenList.filter(item=>item.isUser == 1);
  3133. // this.addForm.notifyUserNames = '';
  3134. // this.addForm.notifyUserIds = [];
  3135. // this.chosenLeaders = [];
  3136. // for (var i=0;i<chosenMembList.length; i++) {
  3137. // this.addForm.notifyUserIds.push(chosenMembList[i].id);
  3138. // this.addForm.notifyUserNames += chosenMembList[i].label+',';
  3139. // var item = {userId:chosenMembList[i].id, userName:chosenMembList[i].label};
  3140. // this.chosenLeaders.push(item);
  3141. // }
  3142. // if (this.addForm.notifyUserNames.length > 0) {
  3143. // this.addForm.notifyUserNames = this.addForm.notifyUserNames.substring(0, this.addForm.notifyUserNames.length-1);
  3144. // }
  3145. // },
  3146. // 获取部门列表
  3147. getDepartment() {
  3148. this.http.post("/department/listAllMemb", {},
  3149. res => {
  3150. if (res.code == "ok") {
  3151. var list = res.data;
  3152. //设置员工到部门下面
  3153. this.setUserToDept(list);
  3154. this.deptMembData = list;
  3155. console.log(this.deptMembData, '看看数据')
  3156. //用于筛选过滤
  3157. this.allMembData = JSON.parse(JSON.stringify(this.deptMembData));
  3158. } else {
  3159. this.$message({
  3160. message: res.msg,
  3161. type: "error"
  3162. });
  3163. }
  3164. },
  3165. error => {
  3166. this.$message({
  3167. message: error,
  3168. type: "error"
  3169. });
  3170. });
  3171. },
  3172. // 获取部门列表
  3173. getDepartment2() {
  3174. this.http.post(
  3175. this.port.manage.depList,{},
  3176. (res) => {
  3177. if (res.code == "ok") {
  3178. var list = res.data
  3179. this.buOption = this.changeArr(JSON.parse(JSON.stringify(list)));
  3180. } else {
  3181. this.$message({
  3182. message: res.msg,
  3183. type: "error",
  3184. });
  3185. }
  3186. },
  3187. (error) => {
  3188. this.$message({
  3189. message: error,
  3190. type: "error",
  3191. });
  3192. }
  3193. );
  3194. },
  3195. // 修改数组
  3196. changeArr(arr) {
  3197. for (var i = 0; i < arr.length; i++) {
  3198. if(arr[i].id != -1 && arr[i].id != 0) {
  3199. // if(arr[i].userList) {
  3200. // if(arr[i].userList.length > 0) {
  3201. // arr[i].children = arr[i].userList
  3202. // }
  3203. // }
  3204. if (arr[i].children != null && arr[i].children.length>0) {
  3205. arr[i].children = this.changeArr(arr[i].children);
  3206. }
  3207. arr[i].id && (arr[i].value = arr[i].id);
  3208. delete arr[i].id;
  3209. }
  3210. }
  3211. for(var i in arr) {
  3212. if(arr[i].id == -1 || arr[i].id == 0) {
  3213. arr.splice(i,1)
  3214. }
  3215. }
  3216. return arr;
  3217. },
  3218. // 企业微信搜索
  3219. echartDepartment() {
  3220. console.log('我点击了搜索')
  3221. if(this.wxFilterText != '') {
  3222. this.http.post("/department/listAllMemb", {
  3223. keyword: this.wxFilterText,
  3224. cursor: ''
  3225. },
  3226. res => {
  3227. if (res.code == "ok") {
  3228. var list = res.data.data;
  3229. this.setUserToDept(list);
  3230. this.deptMembData = list;
  3231. this.$forceUpdate()
  3232. this.searchPersonnelFlgnum = +this.searchPersonnelFlgnum +1
  3233. this.searchPersonnelFlg = true
  3234. } else {
  3235. this.$message({
  3236. message: res.msg,
  3237. type: "error"
  3238. });
  3239. }
  3240. },
  3241. error => {
  3242. this.$message({
  3243. message: error,
  3244. type: "error"
  3245. });
  3246. });
  3247. } else {
  3248. this.searchPersonnelFlgnum = +this.searchPersonnelFlgnum +1
  3249. this.searchPersonnelFlg = false
  3250. this.getDepartment()
  3251. }
  3252. },
  3253. setUserToDept(list) {
  3254. for (var i in list) {
  3255. if (list[i].children != null) {
  3256. this.setUserToDept(list[i].children);
  3257. }
  3258. if (list[i].userList != null) {
  3259. if (list[i].children == null) {
  3260. list[i].children = [];
  3261. }
  3262. list[i].userList.forEach(element => {
  3263. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  3264. list[i].children.push(obj);
  3265. });
  3266. }
  3267. }
  3268. },
  3269. // 获取分类条目
  3270. getClfConfigList() {
  3271. this.http.get('/project-category/list',
  3272. res => {
  3273. if (res.code == "ok") {
  3274. this.baseClfList = res.data;
  3275. // console.log("获取分类条目",res.data);
  3276. this.$forceUpdate();
  3277. } else {
  3278. this.$message({
  3279. message: res.msg,
  3280. type: "error"
  3281. });
  3282. }
  3283. },
  3284. error => {
  3285. this.$message({
  3286. message: error,
  3287. type: "error"
  3288. });
  3289. }
  3290. );
  3291. },
  3292. // 新增/编辑 分类条目
  3293. addNewClf(row) {
  3294. this.addClfDialog = true;
  3295. if (row == null) {
  3296. this.addClf = {}
  3297. } else {
  3298. this.addClf = row;
  3299. }
  3300. },
  3301. // 提交
  3302. submitClf() {
  3303. this.addClf.proBuAudit ? this.addClf.proBuAudit =1 : this.addClf.proBuAudit = 0
  3304. this.addClf.proInchargerAudit ? this.addClf.proInchargerAudit = 1 : this.addClf.proInchargerAudit = 0
  3305. this.http.post('/project-category/addOrMod',this.addClf,
  3306. res => {
  3307. if (res.code == "ok") {
  3308. this.addClfDialog = false;
  3309. this.auditProcessDialog=false;
  3310. this.baseClfList = res.data;
  3311. // this.$forceUpdate();
  3312. // console.log(res.data);
  3313. } else {
  3314. this.$message({
  3315. message: res.msg,
  3316. type: "error"
  3317. });
  3318. }
  3319. },
  3320. error => {
  3321. this.$message({
  3322. message: error,
  3323. type: "error"
  3324. });
  3325. }
  3326. );
  3327. },
  3328. // 提交
  3329. submitManPro() {
  3330. this.http.post('/project-main/addOrMod',this.addMainForm,
  3331. res => {
  3332. if (res.code == "ok") {
  3333. this.addFlgmainProjectDialog = false;
  3334. this.getMainProject()
  3335. } else {
  3336. this.$message({
  3337. message: res.msg,
  3338. type: "error"
  3339. });
  3340. }
  3341. },
  3342. error => {
  3343. this.$message({
  3344. message: error,
  3345. type: "error"
  3346. });
  3347. }
  3348. );
  3349. },
  3350. // 分类绑定审核流程设置
  3351. auditProcess(row) {
  3352. this.auditProcessDialog = true;
  3353. row.proBuAudit ? row.proBuAudit = true : row.proBuAudit = false
  3354. row.proInchargerAudit ? row.proInchargerAudit = true : row.proInchargerAudit = false
  3355. if (row == null) {
  3356. this.addClf = {}
  3357. } else {
  3358. this.addClf = row;
  3359. }
  3360. },
  3361. // 提交项目阶段
  3362. submitPanthPro() {
  3363. this.http.post('/project-stage/addOrMod',this.addPanthForm,
  3364. res => {
  3365. if (res.code == "ok") {
  3366. this.addFlgPanthProjectDialog = false;
  3367. this.obtainPhase()
  3368. } else {
  3369. this.$message({
  3370. message: res.msg,
  3371. type: "error"
  3372. });
  3373. }
  3374. },
  3375. error => {
  3376. this.$message({
  3377. message: error,
  3378. type: "error"
  3379. });
  3380. }
  3381. );
  3382. },
  3383. // 删除
  3384. deleteClf(row) {
  3385. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingCategoryEntry'), {
  3386. confirmButtonText: this.$t('btn.determine'),
  3387. cancelButtonText: this.$t('btn.cancel'),
  3388. type: "warning"
  3389. })
  3390. .then(() => {
  3391. this.listLoading = true;
  3392. this.http.post('/project-category/delete',{
  3393. id: row.id
  3394. },
  3395. res => {
  3396. this.listLoading = false;
  3397. if (res.code == "ok") {
  3398. this.$message({
  3399. message: this.$t('message.successfullyDeleted'),
  3400. type: "success"
  3401. });
  3402. this.getClfConfigList();
  3403. } else {
  3404. this.$message({
  3405. message: res.msg,
  3406. type: "error"
  3407. });
  3408. }
  3409. },
  3410. error => {
  3411. this.listLoading = false;
  3412. this.$message({
  3413. message: error,
  3414. type: "error"
  3415. });
  3416. }
  3417. );
  3418. })
  3419. .catch(() => {});
  3420. },
  3421. // 删除主项目
  3422. deleteManPro(row) {
  3423. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletethemainproject'), {
  3424. confirmButtonText: this.$t('btn.determine'),
  3425. cancelButtonText: this.$t('btn.cancel'),
  3426. type: "warning"
  3427. })
  3428. .then(() => {
  3429. this.listLoading = true;
  3430. this.http.post('/project-main/delete',{
  3431. id: row.id
  3432. },
  3433. res => {
  3434. this.listLoading = false;
  3435. if (res.code == "ok") {
  3436. this.$message({
  3437. message: this.$t('message.successfullyDeleted'),
  3438. type: "success"
  3439. });
  3440. this.getMainProject();
  3441. } else {
  3442. this.$message({
  3443. message: res.msg,
  3444. type: "error"
  3445. });
  3446. }
  3447. },
  3448. error => {
  3449. this.listLoading = false;
  3450. this.$message({
  3451. message: error,
  3452. type: "error"
  3453. });
  3454. }
  3455. );
  3456. })
  3457. .catch(() => {});
  3458. },
  3459. // 删除项目阶段
  3460. deletePanthPro(row) {
  3461. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingprojectphases'), {
  3462. confirmButtonText: this.$t('btn.determine'),
  3463. cancelButtonText: this.$t('btn.cancel'),
  3464. type: "warning"
  3465. })
  3466. .then(() => {
  3467. this.listLoading = true;
  3468. this.http.post('/project-stage/delete ',{
  3469. id: row.id
  3470. },
  3471. res => {
  3472. this.listLoading = false;
  3473. if (res.code == "ok") {
  3474. this.$message({
  3475. message: this.$t('message.successfullyDeleted'),
  3476. type: "success"
  3477. });
  3478. this.obtainPhase();
  3479. } else {
  3480. this.$message({
  3481. message: res.msg,
  3482. type: "error"
  3483. });
  3484. }
  3485. },
  3486. error => {
  3487. this.listLoading = false;
  3488. this.$message({
  3489. message: error,
  3490. type: "error"
  3491. });
  3492. }
  3493. );
  3494. })
  3495. .catch(() => {});
  3496. },
  3497. // 分类筛选
  3498. searchClfList(){
  3499. this.page = 1;
  3500. this.getList();
  3501. },
  3502. manageSelect(){
  3503. this.page = 1
  3504. this.getList()
  3505. },
  3506. getProjectBaseConfigList() {
  3507. this.http.post('/project-basecost-setting/list',{},
  3508. res => {
  3509. if (res.code == "ok") {
  3510. this.baseCostItemList = res.data;
  3511. this.$forceUpdate();
  3512. } else {
  3513. this.$message({
  3514. message: res.msg,
  3515. type: "error"
  3516. });
  3517. }
  3518. },
  3519. error => {
  3520. this.$message({
  3521. message: error,
  3522. type: "error"
  3523. });
  3524. }
  3525. );
  3526. },
  3527. deletekeyNodes(row) {
  3528. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletingKeyNode'), {
  3529. confirmButtonText: this.$t('btn.determine'),
  3530. cancelButtonText: this.$t('btn.cancel'),
  3531. type: "warning"
  3532. })
  3533. .then(() => {
  3534. this.listLoading = true;
  3535. this.http.post('/project-key-nodes-setting/delete',{
  3536. id: row.id
  3537. },
  3538. res => {
  3539. this.listLoading = false;
  3540. if (res.code == "ok") {
  3541. this.$message({
  3542. message: this.$t('message.successfullyDeleted'),
  3543. type: "success"
  3544. });
  3545. this.getkeyNodes();
  3546. } else {
  3547. this.$message({
  3548. message: res.msg,
  3549. type: "error"
  3550. });
  3551. }
  3552. },
  3553. error => {
  3554. this.listLoading = false;
  3555. this.$message({
  3556. message: error,
  3557. type: "error"
  3558. });
  3559. }
  3560. );
  3561. })
  3562. .catch(() => {});
  3563. },
  3564. // 美莱德同步项目信息到泛微
  3565. syncProjectForFanWei(){
  3566. this.http.post('/project/syncProjectWithFanwei',{},
  3567. res => {
  3568. console.log(res, 'res')
  3569. if (res.code == "ok") {
  3570. this.$message({
  3571. message: '项目同步成功',
  3572. type: "success"
  3573. });
  3574. } else {
  3575. this.$message({
  3576. message: res.msg,
  3577. type: "error"
  3578. });
  3579. }
  3580. },
  3581. error => {
  3582. console.log(error, 'res')
  3583. this.$message({
  3584. message: error,
  3585. type: "error"
  3586. });
  3587. }
  3588. );
  3589. },
  3590. deleteBaseItem(row) {
  3591. this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('deletethecostbaselineitem'), {
  3592. confirmButtonText: this.$t('btn.determine'),
  3593. cancelButtonText: this.$t('btn.cancel'),
  3594. type: "warning"
  3595. })
  3596. .then(() => {
  3597. this.listLoading = true;
  3598. this.http.post('/project-basecost-setting/delete',{
  3599. id: row.id
  3600. },
  3601. res => {
  3602. this.listLoading = false;
  3603. if (res.code == "ok") {
  3604. this.$message({
  3605. message: this.$t('message.successfullyDeleted'),
  3606. type: "success"
  3607. });
  3608. this.getProjectBaseConfigList();
  3609. } else {
  3610. this.$message({
  3611. message: res.msg,
  3612. type: "error"
  3613. });
  3614. }
  3615. },
  3616. error => {
  3617. this.listLoading = false;
  3618. this.$message({
  3619. message: error,
  3620. type: "error"
  3621. });
  3622. }
  3623. );
  3624. })
  3625. .catch(() => {});
  3626. },
  3627. submitInsertBaseItem() {
  3628. this.http.post('/project-basecost-setting/addOrMod',this.addForm,
  3629. res => {
  3630. if (res.code == "ok") {
  3631. this.addBaseItemDialog = false;
  3632. this.baseCostItemList = res.data;
  3633. this.$forceUpdate();
  3634. } else {
  3635. this.$message({
  3636. message: res.msg,
  3637. type: "error"
  3638. });
  3639. }
  3640. },
  3641. error => {
  3642. this.$message({
  3643. message: error,
  3644. type: "error"
  3645. });
  3646. }
  3647. );
  3648. },
  3649. submitkeyNodes() {
  3650. // console.log(this.addForm, '提交的参数')
  3651. // return
  3652. this.http.post('/project-key-nodes-setting/addOrMod',this.addFormkeyNodes,
  3653. res => {
  3654. if (res.code == "ok") {
  3655. this.addBasekeyNodesialog = false;
  3656. this.keyNodesList = res.data;
  3657. this.$forceUpdate();
  3658. } else {
  3659. this.$message({
  3660. message: res.msg,
  3661. type: "error"
  3662. });
  3663. }
  3664. },
  3665. error => {
  3666. this.$message({
  3667. message: error,
  3668. type: "error"
  3669. });
  3670. }
  3671. );
  3672. },
  3673. showBaseCostItemDialog() {
  3674. this.showBaseConfig = true;
  3675. },
  3676. addNewBaseItem(row) {
  3677. this.addBaseItemDialog = true;
  3678. if (row == null) {
  3679. this.addForm = {alarmType: 0}
  3680. } else {
  3681. this.addForm = JSON.parse(JSON.stringify(row));
  3682. }
  3683. },
  3684. //获取客户列表
  3685. getCustomerList() {
  3686. this.http.post('/customer-info/getAll', {
  3687. },
  3688. res => {
  3689. if (res.code == "ok") {
  3690. this.customerList = res.data;
  3691. } else {
  3692. this.$message({
  3693. message: res.msg,
  3694. type: "error"
  3695. });
  3696. }
  3697. },
  3698. error => {
  3699. this.$message({
  3700. message: error,
  3701. type: "error"
  3702. });
  3703. });
  3704. },
  3705. importProjectBefore(){
  3706. this.paramData1 = false
  3707. this.importProjectBeforeDialog = true
  3708. },
  3709. importProject(item) {
  3710. //首先判断文件类型
  3711. let str = item.file.name.split(".");
  3712. let format = str[str.length - 1];
  3713. if (format != "xls" && format != "xlsx") {
  3714. this.$message({
  3715. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  3716. type: "error"
  3717. });
  3718. } else {
  3719. this.listLoading = true;
  3720. let formData = new FormData();
  3721. formData.append("file", item.file);
  3722. formData.append("userId", this.user.id);
  3723. formData.append('key',this.paramData1 ? 1 : 0)
  3724. this.http.uploadFile('/project/importData', formData,
  3725. res => {
  3726. this.$refs.upload.clearFiles();
  3727. this.listLoading = false;
  3728. if (res.code == "ok") {
  3729. // this.$message({
  3730. // message: res.data,
  3731. // type: "success"
  3732. // },5000);
  3733. //弹窗显示
  3734. this.showImportResult = true;
  3735. this.importProjectBeforeDialog = false
  3736. this.importResultMsg = res.data;
  3737. this.getList();
  3738. } else {
  3739. this.$message({
  3740. message: res.msg,
  3741. type: "error"
  3742. });
  3743. }
  3744. },
  3745. error => {
  3746. this.$refs.upload.clearFiles();
  3747. this.listLoading = false;
  3748. this.$message({
  3749. message: error,
  3750. type: "error"
  3751. });
  3752. });
  3753. }
  3754. },
  3755. number(){
  3756. //     this.addForm.budget = this.addForm.budget.replace(/[^\.\d]/g,'');
  3757. // this.addForm.budget = this.addForm.budget.replace('.','');
  3758. },
  3759. deleteSubPro(subProject) {
  3760. this.$confirm(this.$t('makesuretodeletethesubproject') + subProject.name + this.$t('ma'),this.$t('deletesubproject'), {
  3761. confirmButtonText: this.$t('btn.determine'),
  3762. cancelButtonText: this.$t('btn.cancel'),
  3763. type: "warning"
  3764. })
  3765. .then(() => {
  3766. this.listLoading = true;
  3767. this.http.post('/sub-project/deleteProject',{
  3768. id: subProject.id
  3769. },
  3770. res => {
  3771. this.listLoading = false;
  3772. if (res.code == "ok") {
  3773. this.$message({
  3774. message: this.$t('message.successfullyDeleted'),
  3775. type: "success"
  3776. });
  3777. this.subProject(this.currentProject);
  3778. } else {
  3779. this.$message({
  3780. message: res.msg,
  3781. type: "error"
  3782. });
  3783. }
  3784. },
  3785. error => {
  3786. this.listLoading = false;
  3787. this.$message({
  3788. message: error,
  3789. type: "error"
  3790. });
  3791. }
  3792. );
  3793. })
  3794. .catch(() => {});
  3795. },
  3796. searchList() {
  3797. this.page = 1;
  3798. this.getList();
  3799. },
  3800. addNewSubProject(subProject) {
  3801. if (subProject == null) {
  3802. this.temaddForm = {projectId: this.currentProject.id, level:1}
  3803. } else {
  3804. let aac = JSON.parse(JSON.stringify(subProject))
  3805. aac.status=aac.status==true?1:0
  3806. this.temaddForm = JSON.parse(JSON.stringify(aac));
  3807. }
  3808. this.addSubProject = true;
  3809. },
  3810. //显示子项目
  3811. subProject(item) {
  3812. this.subProjectVisible = true;
  3813. this.currentProject = item;
  3814. this.http.post('/sub-project/list', {
  3815. projectId: item.id
  3816. },
  3817. res => {
  3818. if (res.code == "ok") {
  3819. for(let i = 0; i < res.data.length; i++){
  3820. res.data[i].status=res.data[i].status==1?true:false
  3821. }
  3822. this.subProjectList = res.data
  3823. } else {
  3824. this.$message({
  3825. message: res.msg,
  3826. type: "error"
  3827. });
  3828. }
  3829. },
  3830. error => {
  3831. this.$message({
  3832. message: error,
  3833. type: "error"
  3834. });
  3835. });
  3836. },
  3837. //显示用户详情
  3838. showUser(userId) {
  3839. this.userDetailVisible = true;
  3840. this.http.post(this.port.manage.userDetail, {
  3841. userId: userId
  3842. },
  3843. res => {
  3844. if (res.code == "ok") {
  3845. this.userDetail = res.data;
  3846. } else {
  3847. this.$message({
  3848. message: res.msg,
  3849. type: "error"
  3850. });
  3851. }
  3852. },
  3853. error => {
  3854. this.$message({
  3855. message: error,
  3856. type: "error"
  3857. });
  3858. });
  3859. },
  3860. //选择参与人
  3861. changeParticipator() {
  3862. //检查是否在参与人中,如果没有需要加入到参与人中
  3863. // console.log('addform',this.addForm.userId,this.users);
  3864. this.participator = [];
  3865. this.addForm.userId.forEach(u=>{
  3866. var list = this.users.filter(au=>au.id == u);
  3867. if (list.length > 0) {
  3868. var findUser = list[0];
  3869. this.participator.push(findUser);
  3870. } else {
  3871. console.log('未找到用户: '+u);
  3872. }
  3873. })
  3874. },
  3875. getUsers() {
  3876. // this.http.post(this.port.manage.list, {
  3877. // departmentId: -1,
  3878. // pageIndex: 1,
  3879. // // pageSize: 99999
  3880. // pageSize: -1
  3881. // },
  3882. this.http.post('/user/getSimpleActiveUserList', {},
  3883. res => {
  3884. if (res.code == "ok") {
  3885. this.users = res.data;
  3886. } else {
  3887. this.$message({
  3888. message: res.msg,
  3889. type: "error"
  3890. });
  3891. }
  3892. },
  3893. error => {
  3894. this.$message({
  3895. message: error,
  3896. type: "error"
  3897. });
  3898. });
  3899. },
  3900. //分页
  3901. handleCurrentChange(val) {
  3902. this.page = val;
  3903. this.getList();
  3904. },
  3905. handleSizeChange(val) {
  3906. this.size = val;
  3907. localStorage.projectPageSize = this.size;
  3908. this.page = 1
  3909. this.getList();
  3910. },
  3911. participationSelect(){
  3912. this.page = 1
  3913. this.getList()
  3914. },
  3915. //获取项目列表
  3916. getList() {
  3917. localStorage.projectPageIndex = this.page;
  3918. this.listLoading = true;
  3919. let parameter = {
  3920. pageIndex: this.page,
  3921. pageSize: this.size,
  3922. keyword:this.keyword,
  3923. searchField: this.searchField,
  3924. status: this.status,
  3925. category: this.statusClf,
  3926. projectMainId: this.projectMainId,
  3927. inchagerId: this.inchagerId,
  3928. participation: this.participationId,
  3929. }
  3930. if(this.createDate) {
  3931. parameter.startDate = this.createDate[0]
  3932. parameter.endDate = this.createDate[1]
  3933. }
  3934. if(this.sortOrder){
  3935. if(this.sortProp == 'inchargerName'){
  3936. parameter.sortProp = "incharger_id"
  3937. }else if(this.sortProp == 'customerName'){
  3938. parameter.sortProp = "customer_id"
  3939. }else if(this.sortProp == 'projectCode'){
  3940. parameter.sortProp = 'project_code'
  3941. }else if(this.sortProp == 'categoryName'){
  3942. parameter.sortProp = 'category'
  3943. }else if(this.sortProp == 'projectName'){
  3944. parameter.sortProp = 'project_name'
  3945. }else if(this.sortProp == 'status'){
  3946. parameter.sortProp = 'status'
  3947. }else if(this.sortProp == 'currentStage'){
  3948. parameter.sortProp = 'current_stage_name'
  3949. }else if(this.sortProp == 'departmentName'){
  3950. parameter.sortProp = 'dept_id'
  3951. }else if(this.sortProp == 'associateDegreeNames'){
  3952. parameter.sortProp = 'associate_degrees'
  3953. }
  3954. if(this.sortOrder == 'descending'){
  3955. parameter.sortOrder = 0
  3956. }else if(this.sortOrder == 'ascending'){
  3957. parameter.sortOrder = 1
  3958. }
  3959. }
  3960. if(this.deptId.length > 0) {
  3961. parameter.deptId = this.deptId[this.deptId.length - 1]
  3962. } else {
  3963. parameter.deptId = ''
  3964. }
  3965. this.http.post(this.port.project.listPage, parameter,
  3966. res => {
  3967. this.listLoading = false;
  3968. if (res.code == "ok") {
  3969. var list = res.data.records;
  3970. for(var i in list) {
  3971. var participator = list[i].participator , str = "";
  3972. for(var j in participator) {
  3973. if(j == participator.length-1) {
  3974. str += participator[j].name
  3975. } else {
  3976. str += participator[j].name + ','
  3977. }
  3978. }
  3979. list[i].userNames = str;
  3980. }
  3981. this.centerNameDegree = res.data.degrees
  3982. this.showColumnWidth = this.showColumn(list)
  3983. this.list = list;
  3984. this.total = res.data.total;
  3985. // this.$nextTick(()=>{
  3986. // this.$refs.projectlistOfWudulist.doLayout();
  3987. // })
  3988. this.listHeader = res.data.nameList;
  3989. } else {
  3990. this.$message({
  3991. message: res.msg,
  3992. type: "error"
  3993. });
  3994. }
  3995. },
  3996. error => {
  3997. this.listLoading = false;
  3998. this.$message({
  3999. message: error,
  4000. type: "error"
  4001. });
  4002. });
  4003. },
  4004. showColumn(list){
  4005. if(!this.permissions.projectManagement){
  4006. let creat = false
  4007. let incha = false
  4008. for(let i in list){
  4009. if(this.user.id == list[i].creatorId){
  4010. creat = true
  4011. }
  4012. if(this.user.id == list[i].inchargerId){
  4013. incha = true
  4014. }
  4015. }
  4016. if(creat){
  4017. return '300'
  4018. }else {
  4019. if(incha){
  4020. return '210'
  4021. } else if (this.permissions.projectParticipator) {//编辑参与人权限
  4022. return '110'
  4023. } else {
  4024. return '0'
  4025. }
  4026. }
  4027. }else {
  4028. return '300'
  4029. }
  4030. },
  4031. // 合同金额发生改变,需弹出修改原因的输入框
  4032. contractAmountChange(value){
  4033. if(this.contractAmountOld != value){
  4034. this.contractAmountReasonShow = true
  4035. }else{
  4036. this.contractAmountReasonShow = false
  4037. this.addForm.changeContractReason = ''
  4038. }
  4039. },
  4040. // 处理数据
  4041. chulishuju(data) {
  4042. console.log(data, 12345)
  4043. console.log(this.dataListBf, '看看')
  4044. let arrLists = JSON.parse(JSON.stringify(this.dataListBf))
  4045. var arr = []
  4046. for(var s in arrLists) {
  4047. for(var p in data.plateMap) {
  4048. if(arrLists[s].customName == p && arrLists[s].customType != '1') {
  4049. arrLists[s].value = data.plateMap[p]
  4050. }
  4051. if(arrLists[s].customName == p && arrLists[s].customType == '1' && data.plateMap[p] != null && data.plateMap[p] != ''){
  4052. var sel = data.plateMap[p].split(',')
  4053. var live = []
  4054. for(var dd in sel) {
  4055. var obj = {}
  4056. obj.name = p
  4057. // obj.url = this.pictureAddress + '/upload/' + sel[dd]
  4058. obj.url = '/upload/' + sel[dd]
  4059. live.push(obj)
  4060. }
  4061. console.log('值值hi', this.pictureAddress)
  4062. arrLists[s].value = live
  4063. arrLists[s].valuelist = sel
  4064. }
  4065. }
  4066. }
  4067. this.dataList = arrLists
  4068. console.log(this.form, 9999)
  4069. console.log(this.dataList, 8888)
  4070. this.dialogVisible = true
  4071. },
  4072. //显示新增界面
  4073. handleAdd(i, item) {
  4074. this.canOnlyModParticipator = false;
  4075. this.projectManagerEdit = false
  4076. this.contractAmountReasonShow = false
  4077. if(i == -1) {
  4078. if(this.user.companyId == '936') {
  4079. this.isShowProjectName = false
  4080. }
  4081. this.title = this.$t('newproject');
  4082. this.addForm = {
  4083. name: '',
  4084. isPublic:0,
  4085. userId: [],
  4086. userNames:'',
  4087. code:'',
  4088. inchargerId:null,
  4089. level: this.user.timeType.projectLevelState == 1 ? (this.levelList.length > 0 ? this.levelList[0].id : null) : 1,
  4090. customerId:null,
  4091. notifyUserNames:'',
  4092. chosenLeaders:[],
  4093. category:null,
  4094. creatorId: this.user.id,
  4095. projectMainId: '',
  4096. outputValue: '',
  4097. bu: [],
  4098. manDay:0
  4099. // deptId: []
  4100. }
  4101. this.estimatedWorkTime=''
  4102. for(var i in this.dataList) {
  4103. var str = 'plate' + (+i + 1)
  4104. this.$set(this.addForm,str, '')
  4105. }
  4106. if(this.user.timeType.projectWithDept) {
  4107. this.$set(this.addForm, 'deptId', [])
  4108. }
  4109. if(this.user.companyId == '936') {
  4110. this.$set(this.addForm, 'contractCode', '')
  4111. this.$set(this.addForm, 'warrantyStartDate', '')
  4112. this.$set(this.addForm, 'warrantyEndDate', '')
  4113. this.$set(this.addForm, 'projectCategorySub', '')
  4114. this.$set(this.addForm, 'region', '')
  4115. this.$set(this.addForm, 'bu', '')
  4116. }
  4117. if(this.user.timeType.projectManDay){
  4118. this.$set(this.addForm, 'manDay',0)
  4119. this.$set(this.addForm, 'manDayStartDate','')
  4120. }
  4121. // if(this.user.companyId == '428') {
  4122. // this.$set(this.addForm, 'projectCategorySub', '')
  4123. // }
  4124. this.projectBaseCostData = [];
  4125. this.auseList = [];
  4126. for (var m=0;m<this.baseCostItemList.length; m++) {
  4127. this.projectBaseCostData.push({baseId: this.baseCostItemList[m].id, baseName:this.baseCostItemList[m].name, baseAmount:0});
  4128. }
  4129. // 关键节点
  4130. if(this.user.companyId == '936') {
  4131. this.projectKeyNodesData = []
  4132. for (var m=0;m<this.keyNodesList.length; m++) {
  4133. this.projectKeyNodesData.push({nodesId: this.keyNodesList[m].id, nodesName:this.keyNodesList[m].name, planCompleteDate: null, actualCompleteDate: null, states: '0'});
  4134. }
  4135. // console.log(this.projectKeyNodesData, '节点值')
  4136. }
  4137. } else {
  4138. console.log('点击来编辑执行')
  4139. const usersJson = JSON.parse(sessionStorage.getItem("user"))
  4140. if(usersJson.companyId == '936') {
  4141. if(usersJson.roleName != '超级管理员' && usersJson.roleName != '系统管理员') {
  4142. this.isShowProjectName = true
  4143. } else {
  4144. this.isShowProjectName = false
  4145. }
  4146. }
  4147. console.log(this.isShowProjectName, '看看值')
  4148. this.http.post('/project/detailTwo', {id: item.id},
  4149. res => {
  4150. if (res.code == "ok") {
  4151. this.chulishuju(res.data)
  4152. this.estimatedWorkTime=res.data.estimatedWorkTime==null?0:res.data.estimatedWorkTime
  4153. }
  4154. });
  4155. //编辑时,非 (管理全部项目,项目创建人,项目经理),有编辑项目参与人权限的人,可以进行参与人的修改
  4156. if (!(this.permissions.projectManagement || this.user.id==item.inchargerId || this.user.id == item.creatorId) && this.permissions.projectParticipator) {
  4157. this.canOnlyModParticipator = true;
  4158. }
  4159. if(this.permissions.projectManagement || this.user.id == item.creatorId) {
  4160. this.projectManagerEdit = false
  4161. } else {
  4162. this.projectManagerEdit = true
  4163. }
  4164. this.title = this.$t('modifytheproject');
  4165. var list = item.participator;
  4166. if (item.isPublic == 1) {
  4167. list = this.users;
  4168. }
  4169. var arr = [];
  4170. var names = '';
  4171. let namesLiss = [] // 企业微信用到的参与者
  4172. for(var j in list) {
  4173. arr.push(list[j].id)
  4174. names += list[j].name+',';
  4175. namesLiss.push(list[j].name)
  4176. }
  4177. if (names.length > 0) {
  4178. names = names.substring(0, names.length -1);
  4179. }
  4180. this.addFormUserNames = namesLiss
  4181. var listList = JSON.parse(JSON.stringify(item)),
  4182. arrList = [],
  4183. array = [];
  4184. if (listList.deptCascade != "0" && listList.deptCascade != null) {
  4185. if (listList.deptCascade.indexOf(",") > -1) {
  4186. arrList = listList.deptCascade.split(",");
  4187. } else {
  4188. arrList = [].concat(listList.deptCascade);
  4189. }
  4190. }
  4191. for (var i in arrList) {
  4192. array.push(parseInt(arrList[i]));
  4193. }
  4194. let buascaderList = []
  4195. if(item.buId) {
  4196. let buArrList = item.buId.split(',')
  4197. for(var i in buArrList) {
  4198. buArrList[i] = +buArrList[i]
  4199. }
  4200. buascaderList = buArrList
  4201. }
  4202. // console.log(array, '转换', listList)
  4203. this.addForm = {
  4204. id: item.id,
  4205. name: item.projectName,
  4206. isPublic: item.isPublic,
  4207. userId: arr,
  4208. userNames:names,
  4209. code:item.projectCode,
  4210. inchargerId: item.inchargerId,
  4211. level: item.level,
  4212. planStartDate: item.planStartDate,
  4213. planEndDate: item.planEndDate,
  4214. budget: item.budget,
  4215. baseMan: item.baseMan,
  4216. contractAmount: item.contractAmount,
  4217. baseFee: item.baseFee,
  4218. baseRisk1: item.baseRisk1,
  4219. baseRisk2: item.baseRisk2,
  4220. baseOutsourcing: item.baseOutsourcing,
  4221. customerId:item.customerId==0?null:item.customerId,
  4222. category:item.category,
  4223. projectDesc: item.projectDesc,
  4224. projectMainId: item.projectMainId,
  4225. creatorId: item.creatorId,
  4226. outputValue: item.outputValue,
  4227. // deptId: array.reverse(),
  4228. changeContractReason: '',
  4229. bu: buascaderList,
  4230. manDay:item.manDay==null?0:item.manDay,
  4231. manDayStartDate:item.manDayStartDate,
  4232. manDayDisable:item.manDay
  4233. }
  4234. for(var i in this.dataList) {
  4235. var str = 'plate' + (+i + 1)
  4236. if(this.dataList[i].customType != '1') {
  4237. this.$set(this.addForm,str, this.dataList[i].value==null?'':this.dataList[i].value)
  4238. } else {
  4239. this.$set(this.addForm,str,this.dataList[i].valuelist.join('@'))
  4240. }
  4241. }
  4242. this.contractAmountOld = item.contractAmount ? item.contractAmount : 0
  4243. // console.log(this.addForm, '数据')
  4244. if(this.user.timeType.projectWithDept) {
  4245. this.$set(this.addForm, 'deptId', array.reverse())
  4246. }
  4247. // 判断公司id是否等于936
  4248. if(this.user.companyId == '936') {
  4249. if(item.projectSeparate) {
  4250. this.$set(this.addForm, 'contractCode', item.projectSeparate.contractCode)
  4251. this.$set(this.addForm, 'warrantyStartDate', item.projectSeparate.warrantyStartDate)
  4252. this.$set(this.addForm, 'warrantyEndDate', item.projectSeparate.warrantyEndDate)
  4253. this.$set(this.addForm, 'projectCategorySub', item.projectSeparate.projectCategorySub)
  4254. this.$set(this.addForm, 'region', item.projectSeparate.region)
  4255. this.$set(this.addForm, 'bu', item.projectSeparate.bu)
  4256. } else {
  4257. this.$set(this.addForm, 'contractCode', '')
  4258. this.$set(this.addForm, 'warrantyStartDate', '')
  4259. this.$set(this.addForm, 'warrantyEndDate', '')
  4260. this.$set(this.addForm, 'projectCategorySub', '')
  4261. this.$set(this.addForm, 'region', '')
  4262. this.$set(this.addForm, 'bu', '')
  4263. }
  4264. }
  4265. // if(this.user.companyId == '428') {
  4266. // if(item.projectSeparate) {
  4267. // this.$set(this.addForm, 'projectCategorySub', item.projectSeparate.projectCategorySub)
  4268. // } else {
  4269. // this.$set(this.addForm, 'projectCategorySub', '')
  4270. // }
  4271. // }
  4272. // 判断是否有供应商
  4273. if(this.user.company.packageProvider) {
  4274. // this.addForm.supplierId = item.providerIds.split(',')
  4275. if(item.providerIds) {
  4276. let arr = []
  4277. let zhhi = item.providerIds.split(',')
  4278. for(let i in zhhi) {
  4279. arr.push(+zhhi[i] + 0)
  4280. }
  4281. this.$set(this.addForm, 'supplierId', arr)
  4282. // console.log( this.addForm.supplierId)
  4283. } else {
  4284. this.$set(this.addForm, 'supplierId', [])
  4285. }
  4286. }
  4287. // 判断是否有供应商结尾
  4288. this.deleteVif = item.creatorId
  4289. // console.log("handleadd",this.deleteVif,this.addForm)
  4290. if(item.associateDegrees != null && item.associateDegrees != 'null' && item.associateDegrees != '') {
  4291. var spli = item.associateDegrees.split(',')
  4292. var sl = []
  4293. for(var i in spli) {
  4294. var num = +spli[i] + 0
  4295. sl.push(num)
  4296. }
  4297. this.auseList = sl
  4298. // console.log(this.auseList)
  4299. } else {
  4300. this.auseList = []
  4301. }
  4302. // var spli = item.associateDegrees.split(',')
  4303. // var sl = []
  4304. // for(var i in spli) {
  4305. // var num = +spli[i] + 0
  4306. // sl.push(num)
  4307. // }
  4308. // this.auseList = sl
  4309. // console.log(this.auseList)
  4310. this.changeParticipator();
  4311. this.getProjectBaseData(item.id);
  4312. this.getProjectKeyNodeData(item.id)
  4313. if (this.user.company.packageEngineering == 1) {
  4314. this.getProjectProfessions(item.id);
  4315. }
  4316. //获取项目的相关领导
  4317. // this.getProjectNotifyUserList(item.id);
  4318. this.getProjectAutorList(item.id);
  4319. if (this.user.timeType.reportCc == 1) {
  4320. this.getProjectCcUserList(item.id);
  4321. }
  4322. // this.findUserInTree()
  4323. }
  4324. this.addFormVisible = true;
  4325. if (this.user.company.packageEngineering == 1) {
  4326. if (this.professionList.length == 0) {
  4327. this.getProfessionList();
  4328. }
  4329. }
  4330. },
  4331. //获取项目日报抄送人
  4332. getProjectCcUserList(projectId) {
  4333. this.http.post('/project-ccuser/getList',{projectId: projectId},
  4334. res => {
  4335. if (res.code == "ok") {
  4336. this.addForm.ccUserIds = res.data.map(function(item) {
  4337. return item.userId;
  4338. });
  4339. this.$forceUpdate()
  4340. } else {
  4341. this.$message({
  4342. message: res.msg,
  4343. type: "error"
  4344. });
  4345. }
  4346. },
  4347. error => {
  4348. this.listLoading = false;
  4349. this.$message({
  4350. message: error,
  4351. type: "error"
  4352. });
  4353. }
  4354. );
  4355. },
  4356. //获取项目审核人
  4357. getProjectAutorList(projectId) {
  4358. this.http.post('/project-auditor/getList',{projectId: projectId},
  4359. res => {
  4360. if (res.code == "ok") {
  4361. if (this.user.timeType.reportAuditType == 6) {
  4362. //单个日报审核人,单选
  4363. var arr = res.data.map(function(item) {
  4364. return item.auditorId;
  4365. });
  4366. if (arr.length > 0) {
  4367. this.addForm.auditUserIds = arr[0];
  4368. } else {
  4369. this.addForm.auditUserIds = null;
  4370. }
  4371. } else {
  4372. this.addForm.auditUserIds = res.data.map(function(item) {
  4373. return item.auditorId;
  4374. });
  4375. }
  4376. this.$forceUpdate()
  4377. } else {
  4378. this.$message({
  4379. message: res.msg,
  4380. type: "error"
  4381. });
  4382. }
  4383. },
  4384. error => {
  4385. this.listLoading = false;
  4386. this.$message({
  4387. message: error,
  4388. type: "error"
  4389. });
  4390. }
  4391. );
  4392. },
  4393. getProjectBaseData(projectId) {
  4394. this.http.post('/project-basecost/get',{projectId: projectId},
  4395. res => {
  4396. if (res.code == "ok") {
  4397. this.projectBaseCostData = res.data;
  4398. } else {
  4399. this.$message({
  4400. message: res.msg,
  4401. type: "error"
  4402. });
  4403. }
  4404. },
  4405. error => {
  4406. this.listLoading = false;
  4407. this.$message({
  4408. message: error,
  4409. type: "error"
  4410. });
  4411. }
  4412. );
  4413. },
  4414. getProjectKeyNodeData(projectId) {
  4415. this.http.post('/project-key-nodes/get',{projectId: projectId},
  4416. res => {
  4417. if (res.code == "ok") {
  4418. this.projectKeyNodesData = res.data;
  4419. } else {
  4420. this.$message({
  4421. message: res.msg,
  4422. type: "error"
  4423. });
  4424. }
  4425. },
  4426. error => {
  4427. this.listLoading = false;
  4428. this.$message({
  4429. message: error,
  4430. type: "error"
  4431. });
  4432. }
  4433. );
  4434. },
  4435. //提交子项目创建修改请求
  4436. submitInsertSubProject () {
  4437. this.$refs.form2.validate(valid => {
  4438. if (valid) {
  4439. this.http.post('/sub-project/saveOrUpdate',this.temaddForm,
  4440. res => {
  4441. if (res.code == "ok") {
  4442. this.$message({
  4443. message: this.$t('operationissuccessful'),
  4444. type: "success"
  4445. });
  4446. this.subProject(this.currentProject);
  4447. this.addSubProject = false;
  4448. } else {
  4449. this.$message({
  4450. message: res.msg,
  4451. type: "error"
  4452. });
  4453. }
  4454. },
  4455. error => {
  4456. this.listLoading = false;
  4457. this.$message({
  4458. message: error,
  4459. type: "error"
  4460. });
  4461. }
  4462. );
  4463. }
  4464. });
  4465. },
  4466. // 项目基线合计
  4467. addUpfun() {
  4468. var total = 0;
  4469. for (var i=0;i<this.projectBaseCostData.length; i++) {
  4470. if (this.projectBaseCostData[i].baseAmount) {
  4471. total += parseFloat(this.projectBaseCostData[i].baseAmount);
  4472. }
  4473. }
  4474. this.addForm.budget = total;
  4475. // var a = '0'
  4476. // var q = '0'
  4477. // var w = '0'
  4478. // var e = '0'
  4479. // var r = '0'
  4480. // // this.addForm.baseMan === undefined || this.addForm.baseMan === NaN ? this.addForm.baseMa = '0' : this.addForm.baseMan
  4481. // if (this.addForm.baseMan == undefined || this.addForm.baseMan == NaN) {
  4482. // a = 0
  4483. // } else {
  4484. // a = this.addForm.baseMan
  4485. // }
  4486. // if (this.addForm.baseFee !== undefined) q = this.addForm.baseFee
  4487. // if (this.addForm.baseOutsourcing !== undefined) w = this.addForm.baseOutsourcing
  4488. // if (this.addForm.baseRisk1 !== undefined) e = this.addForm.baseRisk1
  4489. // if (this.addForm.baseRisk2 !== undefined) r = this.addForm.baseRisk2
  4490. // this.addForm.budget = +a + +q + +w + +e + +r
  4491. },
  4492. submitInsert() {
  4493. this.$refs.form1.validate(valid => {
  4494. if (valid) {
  4495. if (this.user.company.packageEngineering == 1) {
  4496. if (!this.checkProjectProfession()) {//检查不通过,直接返回
  4497. return;
  4498. }
  4499. }
  4500. this.addLoading = true;
  4501. let formData = new FormData();
  4502. formData.append("name", this.addForm.name);
  4503. if(this.addForm.projectDesc != null) {
  4504. formData.append("projectDesc", this.addForm.projectDesc);
  4505. }
  4506. if(this.addForm.id != null) {
  4507. formData.append("id", this.addForm.id);
  4508. }
  4509. if(this.addForm.isPublic != null) {
  4510. formData.append("isPublic", this.addForm.isPublic);
  4511. }
  4512. if(this.addForm.userId.length != 0 && this.addForm.isPublic == 0) {
  4513. for(var j in this.addForm.userId) {
  4514. formData.append("userId", this.addForm.userId[j]);
  4515. }
  4516. }
  4517. if(this.addForm.inchargerId != null) {
  4518. formData.append("inchargerId", this.addForm.inchargerId);
  4519. }
  4520. if(this.addForm.code != null) {
  4521. formData.append("code", this.addForm.code);
  4522. }
  4523. if(this.addForm.planStartDate != null) {
  4524. formData.append("planStartDate", this.addForm.planStartDate);
  4525. }
  4526. if(this.addForm.planEndDate != null) {
  4527. formData.append("planEndDate", this.addForm.planEndDate);
  4528. }
  4529. if(this.addForm.level != null) {
  4530. formData.append("level", this.addForm.level);
  4531. }
  4532. if(this.addForm.contractAmount != null) {
  4533. formData.append("contractAmount", this.addForm.contractAmount);
  4534. }
  4535. if(this.contractAmountReasonShow){
  4536. formData.append("changeContractReason", this.addForm.changeContractReason);
  4537. }
  4538. if (this.projectBaseCostData != null) {
  4539. formData.append("projectBaseCostData", JSON.stringify(this.projectBaseCostData));
  4540. //计算总预算成本
  4541. if (this.addForm.budget == null) {
  4542. this.addForm.budget = 0;
  4543. }
  4544. formData.append("budget", this.addForm.budget);
  4545. }
  4546. if (this.addForm.customerId == null) {
  4547. formData.append("customerId", 0);
  4548. } else {
  4549. formData.append("customerId", this.addForm.customerId);
  4550. }
  4551. if (this.addForm.contractAmount) {
  4552. formData.append("contractAmount", this.addForm.contractAmount);
  4553. } else {
  4554. formData.append("contractAmount", 0);
  4555. }
  4556. if (this.chosenLeaders != null && this.chosenLeaders.length > 0) {
  4557. formData.append("chosenLeaders", JSON.stringify(this.chosenLeaders));
  4558. }
  4559. if (this.user.timeType.outputValueStatus == 1){
  4560. formData.append("outputValue",this.addForm.outputValue ? this.addForm.outputValue : 0)
  4561. }
  4562. var listId = []
  4563. var listName = []
  4564. for(var i in this.auseList) {
  4565. for(var j in this.ause) {
  4566. if(this.auseList[i] == this.ause[j].id) {
  4567. listId.push(this.ause[j].id);
  4568. listName.push(this.ause[j].name);
  4569. break;
  4570. }
  4571. }
  4572. }
  4573. listId.toString()
  4574. listName.toString()
  4575. formData.append("associateDegrees", listId)
  4576. formData.append("associateDegreeNames", listName)
  4577. //日报审核人
  4578. if (this.addForm.auditUserIds) {
  4579. if (this.user.timeType.reportAuditType == 6) {
  4580. formData.append("auditUserIds", this.addForm.auditUserIds);
  4581. } else {
  4582. formData.append("auditUserIds", JSON.stringify(this.addForm.auditUserIds));
  4583. }
  4584. }
  4585. //日报抄送人
  4586. if (this.addForm.ccUserIds) {
  4587. formData.append("ccUserIds", JSON.stringify(this.addForm.ccUserIds));
  4588. }
  4589. if(this.addForm.category != null) {
  4590. formData.append("category", this.addForm.category);
  4591. }
  4592. if(this.user.timeType.mainProjectState == '1' && this.addForm.projectMainId) {
  4593. formData.append("projectMainId", this.addForm.projectMainId);
  4594. }
  4595. // 提交供应商
  4596. // 线判断是否有供应商
  4597. if(this.user.company.packageProvider) {
  4598. let suppStrName = []
  4599. for(let is in this.addForm.supplierId) {
  4600. for(let js in this.supplierList) {
  4601. if(this.addForm.supplierId[is] == this.supplierList[js].id) {
  4602. suppStrName.push(this.supplierList[js].providerName)
  4603. }
  4604. }
  4605. }
  4606. formData.append("providerNames", suppStrName.toString());
  4607. formData.append("providerIds", this.addForm.supplierId.toString());
  4608. }
  4609. // 判断公司id是否等于 936
  4610. if(this.user.companyId == '936') {
  4611. formData.append("contractCode", this.addForm.contractCode ? this.addForm.contractCode : '');
  4612. formData.append("warrantyStartDate", this.addForm.warrantyStartDate ? this.addForm.warrantyStartDate : '');
  4613. formData.append("warrantyEndDate", this.addForm.warrantyEndDate ? this.addForm.warrantyEndDate : '');
  4614. formData.append("projectCategorySub", this.addForm.projectCategorySub ? this.addForm.projectCategorySub : '');
  4615. formData.append("region", this.addForm.region ? this.addForm.region : '');
  4616. // 关键节点
  4617. formData.append("projectKeyNodesData", JSON.stringify(this.projectKeyNodesData));
  4618. }
  4619. // if(this.user.companyId == '428') {
  4620. // formData.append("projectCategorySub", this.addForm.projectCategorySub ? this.addForm.projectCategorySub : '');
  4621. // }
  4622. if(this.user.timeType.projectWithDept) {
  4623. if(this.addForm.deptId != null && this.addForm.deptId != '') {
  4624. formData.append("deptId", this.addForm.deptId[this.addForm.deptId.length - 1])
  4625. }
  4626. }
  4627. formData.append("buId", this.addForm.bu ? this.addForm.bu : '');
  4628. if(this.user.timeType.projectManDay){
  4629. formData.append("manDay", this.addForm.manDay ? this.addForm.manDay : '');
  4630. formData.append("manDayStartDate", this.addForm.manDayStartDate ? this.addForm.manDayStartDate : '');
  4631. }
  4632. for(var i in this.dataList) {
  4633. var str = 'plate' + (+i + 1)
  4634. if(this.dataList[i].customType != '1') {
  4635. formData.append(str,this.dataList[i].value==null?'':this.dataList[i].value);
  4636. } else {
  4637. formData.append(str,this.dataList[i].valuelist.join('@'));
  4638. }
  4639. }
  4640. // formData.append("associateDegreeNames", listName)
  4641. //console.log("addform",this.addForm);
  4642. //return
  4643. this.http.uploadFile(this.port.project.add,formData,
  4644. res => {
  4645. this.addLoading = false;
  4646. if (res.code == "ok") {
  4647. this.$message({
  4648. message: (this.addForm.id!=null?this.$t('xiu-gai'):this.$t('create'))+this.$t('other.successful'),
  4649. type: "success"
  4650. });
  4651. this.addFormVisible = false;
  4652. this.getList();
  4653. if (this.user.company.packageEngineering == 1) {
  4654. this.saveProjectProfessions(res.data);
  4655. }
  4656. } else {
  4657. this.$message({
  4658. message: res.msg,
  4659. type: "error"
  4660. });
  4661. }
  4662. },
  4663. error => {
  4664. this.addLoading = false;
  4665. this.$message({
  4666. message: error,
  4667. type: "error"
  4668. });
  4669. });
  4670. }
  4671. });
  4672. },
  4673. cascaderChange(e) {
  4674. // console.log(e)
  4675. // console.log(this.addForm)
  4676. // if(e.length )
  4677. // console.log(e)
  4678. },
  4679. // 删除
  4680. deletePro(i, item) {
  4681. this.$confirm(this.$t('makesuretodeletetheitem')+"[" + item.name + "]"+this.$t('ma'),this.$t('deletetheproject'), {
  4682. confirmButtonText: this.$t('btn.determine'),
  4683. cancelButtonText: this.$t('btn.cancel'),
  4684. type: "warning"
  4685. })
  4686. .then(() => {
  4687. this.listLoading = true;
  4688. this.http.post(this.port.project.delete,{
  4689. id: item.id
  4690. },
  4691. res => {
  4692. this.listLoading = false;
  4693. if (res.code == "ok") {
  4694. this.$message({
  4695. message: this.$t('message.successfullyDeleted'),
  4696. type: "success"
  4697. });
  4698. this.getList();
  4699. this.addFormVisible = false
  4700. } else if (res.code == 'reconfirm') {
  4701. this.deleteAlertMsg = res.msg;
  4702. this.forceDeletePro(item.id);
  4703. } else {
  4704. this.$message({
  4705. message: res.msg,
  4706. type: "error"
  4707. });
  4708. }
  4709. },
  4710. error => {
  4711. this.listLoading = false;
  4712. this.$message({
  4713. message: error,
  4714. type: "error"
  4715. });
  4716. }
  4717. );
  4718. })
  4719. .catch(() => {});
  4720. },
  4721. // 模板下载
  4722. downloadmb(){
  4723. this.http.post('/project/getTemplate',{
  4724. companyId: this.user.companyId
  4725. },res => {
  4726. if(res.code == 'ok'){
  4727. var filePath = res.data;
  4728. const a = document.createElement('a'); // 创建a标签
  4729. var fileName = filePath.split('/')[2];
  4730. a.setAttribute('download', fileName);// download属性
  4731. a.setAttribute('href', filePath);// href链接
  4732. a.click(); //自执行点击事件
  4733. a.remove();
  4734. }else{
  4735. this.$message({
  4736. message: res.msg,
  4737. type: 'error'
  4738. })
  4739. }
  4740. },err => {
  4741. this.$message({
  4742. message: err,
  4743. type: 'error'
  4744. })
  4745. })
  4746. },
  4747. //强制删除项目
  4748. forceDeletePro(deleteProId) {
  4749. this.$confirm(this.deleteAlertMsg,this.$t('deletetheproject'), {
  4750. confirmButtonText: this.$t('btn.determine'),
  4751. cancelButtonText: this.$t('btn.cancel'),
  4752. type: "warning"
  4753. })
  4754. .then(() => {
  4755. this.listLoading = true;
  4756. this.http.post(this.port.project.delete,{
  4757. id: deleteProId ,force:1
  4758. },
  4759. res => {
  4760. this.listLoading = false;
  4761. if (res.code == "ok") {
  4762. this.$message({
  4763. message: this.$t('message.successfullyDeleted'),
  4764. type: "success"
  4765. });
  4766. this.getList();
  4767. this.addFormVisible = false;
  4768. } else {
  4769. this.$message({
  4770. message: res.msg,
  4771. type: "error"
  4772. });
  4773. }
  4774. },
  4775. error => {
  4776. this.listLoading = false;
  4777. this.$message({
  4778. message: error,
  4779. type: "error"
  4780. });
  4781. }
  4782. );
  4783. })
  4784. .catch(() => {});
  4785. },
  4786. detail(i) {
  4787. this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
  4788. },
  4789. // 获取部门
  4790. getDepartmentList() {
  4791. this.http.post( this.port.manage.depList, {},
  4792. res => {
  4793. if (res.code == "ok") {
  4794. let dptlist = JSON.parse(JSON.stringify(res.data));
  4795. this.departmentList = this.changeArr(dptlist);
  4796. } else {
  4797. this.$message({
  4798. message: res.msg,
  4799. type: "error"
  4800. });
  4801. }
  4802. },error => {
  4803. this.$message({
  4804. message: error,
  4805. type: "error"
  4806. });
  4807. });
  4808. },
  4809. changeArr(arr) {
  4810. for (var i = 0; i < arr.length; i++) {
  4811. if(arr[i].id != -1 && arr[i].id != 0) {
  4812. if (arr[i].children != null && arr[i].children.length>0) {
  4813. arr[i].children = this.changeArr(arr[i].children);
  4814. }
  4815. arr[i].id && (arr[i].value = arr[i].id);
  4816. delete arr[i].id;
  4817. }
  4818. }
  4819. for(var i in arr) {
  4820. if(arr[i].id == -1 || arr[i].id == 0) {
  4821. arr.splice(i,1)
  4822. }
  4823. }
  4824. return arr;
  4825. },
  4826. // 自定义组件事件
  4827. selectCal(obj) {
  4828. if(obj.distinction == '1') {
  4829. this.inchagerId = obj.id
  4830. this.manageSelect()
  4831. } else if(obj.distinction == '2') {
  4832. this.participationId = obj.id
  4833. this.participationSelect()
  4834. } else if(obj.distinction == '3') {
  4835. this.addForm.inchargerId = obj.id
  4836. // console.log(this.participator)
  4837. this.participator = JSON.parse(JSON.stringify(this.participator))
  4838. } else if(obj.distinction =='4') {
  4839. this.projectProfessionList[obj.other].inchargerId = obj.id
  4840. } else if(obj.distinction =='5') {
  4841. this.paramInchargerId = obj.id
  4842. } else if(obj.distinction == '10') {
  4843. let userList = obj.arrUserList
  4844. let arr = []
  4845. for(var i in userList) {
  4846. arr.push(userList[i].id)
  4847. }
  4848. this.addForm.auditUserIds = arr
  4849. } else if(obj.distinction == '11') {
  4850. let userList = obj.id
  4851. console.log(obj)
  4852. this.curProfessionRow.membList[obj.other].membId = userList
  4853. }
  4854. },
  4855. vueCasader(obj) {
  4856. if(obj.distinction == '32') {
  4857. let arr = []
  4858. arr.push(obj.id)
  4859. this.addForm.bu = arr.join(",")
  4860. }
  4861. },
  4862. changSubStatus(subProject) {
  4863. this.http.post('/sub-project/updateStatus',{
  4864. id: subProject.id,
  4865. status: subProject.status?1:0
  4866. },
  4867. res => {
  4868. this.listLoading = false;
  4869. if (res.code == "ok") {
  4870. this.$message({
  4871. message: subProject.status?"开启成功":"关闭成功",
  4872. type: "success"
  4873. });
  4874. this.subProject(this.currentProject);
  4875. } else {
  4876. this.$message({
  4877. message: res.msg,
  4878. type: "error"
  4879. });
  4880. }
  4881. },
  4882. error => {
  4883. this.$message({
  4884. message: error,
  4885. type: "error"
  4886. });
  4887. }
  4888. );
  4889. },
  4890. //计算预估工时
  4891. jisuanEstimatedWorkTime(manDay){
  4892. this.estimatedWorkTime=manDay*this.user.timeType.allday
  4893. },
  4894. //点击添加
  4895. addFunctional(type){
  4896. if(type=="functional"){
  4897. this.functionalList.push({
  4898. "id":null,
  4899. 'timeType': '项目工时',
  4900. 'role': 'CRC&LM',
  4901. 'jobRespon': '',
  4902. "companyId":this.user.companyId,
  4903. 'editFlag': true, // 可编辑标识
  4904. 'isSubmit': false, // 是否点击确定标识
  4905. })
  4906. }else if(type=="workContext"){
  4907. this.workContextList.push({
  4908. "id":null,
  4909. "proFunId":this.functionalId,
  4910. 'workContext':null,
  4911. 'editFlag': true, // 可编辑标识
  4912. 'isSubmit': false, // 是否点击确定标识
  4913. })
  4914. }
  4915. },
  4916. // 确定
  4917. functionalSubmit(row){
  4918. row.editFlag = false
  4919. row.isSubmit = true
  4920. },
  4921. // 取消
  4922. functionalCancel(row, index,type){
  4923. row.editFlag = false
  4924. if (row.isSubmit) {
  4925. if(type=="functional"){
  4926. // this.functionalList[index]=this.oldValue
  4927. this.$set(this.functionalList,index,this.oldValue);
  4928. }else if(type=="workContext"){
  4929. this.workContextList[index] = this.oldValue
  4930. }
  4931. }
  4932. else if(!row.id){
  4933. if(type=="functional"){
  4934. this.functionalDelVersion(row,index);
  4935. }else if(type=="workContext"){
  4936. this.workContextDelVersion(row,index);
  4937. }
  4938. }
  4939. },
  4940. // 编辑
  4941. functionalEditVersion(row){
  4942. // v.value = JSON.parse(JSON.stringify(row));
  4943. this.oldValue= Object.assign({}, row);;
  4944. console.log("row",row,"old",this.oldValue)
  4945. row.editFlag = true;
  4946. },
  4947. // 删除
  4948. functionalDelVersion (row,index){
  4949. console.log("index",index,'row',row)
  4950. if(row.id==null){
  4951. this.functionalList.splice(index, 1)
  4952. return
  4953. }
  4954. this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  4955. confirmButtonText: '确定',
  4956. cancelButtonText: '取消',
  4957. type: 'warning'
  4958. }).then(() => {
  4959. this.functionalList.splice(index, 1)
  4960. this.http.post('/project/deleteFunctionalDivision',{
  4961. id:row.id,
  4962. },
  4963. res => {
  4964. if (res.code == "ok") {
  4965. this.$message({
  4966. message: '删除成功',
  4967. type: "success"
  4968. });
  4969. } else {
  4970. this.$message({
  4971. message: res.msg,
  4972. type: "error"
  4973. });
  4974. }
  4975. },
  4976. error => {
  4977. this.$message({
  4978. message: error,
  4979. type: "error"
  4980. });
  4981. }
  4982. );
  4983. }).catch(() => {
  4984. this.$message({
  4985. type: 'info',
  4986. message: '已取消删除'
  4987. });
  4988. });
  4989. },
  4990. // 删除
  4991. workContextDelVersion (row,index){
  4992. if(row.id==null){
  4993. this.workContextList.splice(index, 1)
  4994. return
  4995. }
  4996. this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
  4997. confirmButtonText: '确定',
  4998. cancelButtonText: '取消',
  4999. type: 'warning'
  5000. }).then(() => {
  5001. this.workContextList.splice(index, 1)
  5002. this.http.post('/project/deleteFunWorkContext',{
  5003. id:row.id,
  5004. },
  5005. res => {
  5006. if (res.code == "ok") {
  5007. this.$message({
  5008. message: '删除成功',
  5009. type: "success"
  5010. });
  5011. } else {
  5012. this.$message({
  5013. message: res.msg,
  5014. type: "error"
  5015. });
  5016. }
  5017. },
  5018. error => {
  5019. this.$message({
  5020. message: error,
  5021. type: "error"
  5022. });
  5023. }
  5024. );
  5025. }).catch(() => {
  5026. this.$message({
  5027. type: 'info',
  5028. message: '已取消删除'
  5029. });
  5030. });
  5031. },
  5032. //保存职能分工
  5033. submitFunctional(){
  5034. this.http.post('/project/editFunctionalDivision',{
  5035. json:JSON.stringify(this.functionalList),
  5036. },
  5037. res => {
  5038. if (res.code == "ok") {
  5039. this.$message({
  5040. message: '操作成功',
  5041. type: "success"
  5042. });
  5043. this.getFunctionalList()
  5044. } else {
  5045. this.$message({
  5046. message: res.msg,
  5047. type: "error"
  5048. });
  5049. }
  5050. },
  5051. error => {
  5052. this.$message({
  5053. message: error,
  5054. type: "error"
  5055. });
  5056. }
  5057. );
  5058. },
  5059. //保存工作内容
  5060. submitWorkContext(){
  5061. for(var index in this.workContextList){
  5062. if(!this.workContextList[index].workContext){
  5063. this.$message({
  5064. message: "请填写工作内容",
  5065. type: "error"
  5066. });
  5067. return
  5068. }
  5069. }
  5070. this.http.post('/project/editFunWorkContext',{
  5071. json:JSON.stringify(this.workContextList),
  5072. },
  5073. res => {
  5074. if (res.code == "ok") {
  5075. this.$message({
  5076. message: '操作成功',
  5077. type: "success"
  5078. });
  5079. // this.workContextDig = false
  5080. this.getWorkContextList()
  5081. } else {
  5082. this.$message({
  5083. message: res.msg,
  5084. type: "error"
  5085. });
  5086. }
  5087. },
  5088. error => {
  5089. this.$message({
  5090. message: error,
  5091. type: "error"
  5092. });
  5093. }
  5094. );
  5095. },
  5096. //获取职能列表
  5097. getFunctionalList(){
  5098. this.http.post('/project/getFunctionalDivisionList',{},
  5099. res => {
  5100. if (res.code == "ok") {
  5101. this.functionalList=res.data
  5102. } else {
  5103. this.$message({
  5104. message: res.msg,
  5105. type: "error"
  5106. });
  5107. }
  5108. },
  5109. error => {
  5110. this.$message({
  5111. message: error,
  5112. type: "error"
  5113. });
  5114. }
  5115. );
  5116. },
  5117. //获取工作内容
  5118. getWorkContextList(item){
  5119. if(item){
  5120. this.functionalId=item
  5121. }
  5122. this.http.post('/project/getFunWorkContextList',{
  5123. id:this.functionalId
  5124. },
  5125. res => {
  5126. if (res.code == "ok") {
  5127. this.workContextList=res.data
  5128. } else {
  5129. this.$message({
  5130. message: res.msg,
  5131. type: "error"
  5132. });
  5133. }
  5134. },
  5135. error => {
  5136. this.$message({
  5137. message: error,
  5138. type: "error"
  5139. });
  5140. }
  5141. );
  5142. },
  5143. //获取角色列表
  5144. getRoleList(){
  5145. this.http.post('/permission/getRoleList',{
  5146. companyId:this.user.companyId,
  5147. },
  5148. res => {
  5149. if (res.code == "ok") {
  5150. this.roleList=res.data
  5151. } else {
  5152. this.$message({
  5153. message: res.msg,
  5154. type: "error"
  5155. });
  5156. }
  5157. },
  5158. error => {
  5159. this.$message({
  5160. message: error,
  5161. type: "error"
  5162. });
  5163. }
  5164. );
  5165. }
  5166. },
  5167. created() {
  5168. let height = window.innerHeight;
  5169. this.tableHeight = height - 225;
  5170. const that = this;
  5171. window.onresize = function temp() {
  5172. that.tableHeight = window.innerHeight - 195;
  5173. };
  5174. },
  5175. mounted() {
  5176. this.userssHu()
  5177. this.getDepartment();
  5178. this.getDepartment2();
  5179. this.projectListPageComponentKey++;
  5180. //localStorage中为string类型,需转化为int类型才会发生渲染
  5181. if (localStorage.projectPageIndex) {
  5182. this.page = parseInt(localStorage.projectPageIndex);
  5183. }
  5184. this.getList();
  5185. this.getUsers();
  5186. this.getCustomerList();
  5187. this.getProjectBaseConfigList();
  5188. this.getClfConfigList()
  5189. this.yanjiuzx()
  5190. this.getObtain()
  5191. // this.getRoleList()
  5192. // 判断是否有供应商字段
  5193. if(this.user.company.packageProvider == 1){
  5194. this.getSupplierList()
  5195. // this.getPhase()
  5196. }
  5197. if(this.user.company.packageProject == 1) {
  5198. this.obtainPhase()
  5199. }
  5200. // this.getSupplierList()
  5201. if(this.user.timeType.mainProjectState == 1){
  5202. this.getMainProject()
  5203. }
  5204. if(this.user.timeType.projectLevelState == 1){
  5205. this.getProjectLevel()
  5206. }
  5207. // 判断释放为专业版
  5208. if(this.user.company.packageProject == 1) {
  5209. 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')}]
  5210. } else {
  5211. 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')}]
  5212. }
  5213. // 获取部门
  5214. if(this.user.timeType.projectWithDept) {
  5215. this.getDepartmentList()
  5216. }
  5217. if(this.user.companyId == '936') {
  5218. this.getkeyNodes()
  5219. }
  5220. }
  5221. };
  5222. </script>
  5223. <style lang="scss" scoped>
  5224. .rg_span{
  5225. display: inline-block;
  5226. }
  5227. .rg_span span {
  5228. text-align: right;
  5229. box-sizing: border-box;
  5230. padding-right: 10px;
  5231. }
  5232. .el-dialog__title {
  5233. display: inline-table;
  5234. margin-top: 20px;
  5235. }
  5236. .addss {
  5237. width: 100%;
  5238. overflow: hidden;
  5239. white-space: nowrap;
  5240. text-overflow: ellipsis;
  5241. }
  5242. .keyNodes {
  5243. display: flex;
  5244. width: 100%;
  5245. box-sizing: border-box;
  5246. padding: 10px 30px;
  5247. }
  5248. .keyNodes .keyNodesTime {
  5249. width: 190px;
  5250. display: flex;
  5251. justify-content: center;
  5252. }
  5253. .keyNodes .keyNodesName {
  5254. width: 260px;
  5255. display: flex;
  5256. align-items: center;
  5257. overflow: hidden;
  5258. text-overflow: ellipsis;
  5259. }
  5260. .dialogSwitch {
  5261. }
  5262. // 111
  5263. </style>
  5264. <style>
  5265. .managePopperClass{
  5266. width: 190px;
  5267. }
  5268. .el-dropdown-link {
  5269. color: #409EFF;
  5270. }
  5271. .customdropdown{
  5272. margin-left: 10px;
  5273. }
  5274. .customdropdown .el-dropdown__caret-button{
  5275. height: 27px;
  5276. }
  5277. .customdropdown .el-button--mini:nth-child(1){
  5278. height: 27px;
  5279. }
  5280. .customdropdown_menu{
  5281. padding: 0;
  5282. }
  5283. .customdropdown_menu_btn{
  5284. border-color: transparent;
  5285. }
  5286. .ganttdialog .el-dialog__body{
  5287. height: 550px;
  5288. }
  5289. .toolbar_formitem_n1{
  5290. margin-right: 0 !important;
  5291. }
  5292. .wpgCssClass .el-form-item__label{
  5293. font-weight: 600;
  5294. }
  5295. .gongcheng .el-table .cell{
  5296. overflow: inherit !important;
  5297. }
  5298. </style>