projectInside.vue 225 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572
  1. <template>
  2. <section class="sectionaa">
  3. <div v-loading="!componentFlg" :style="'width: 100%;height:'+tableHeight+'px'" id="components">
  4. <div v-if="componentFlg">
  5. <el-tabs v-model="activeName" @tab-click="handleClick">
  6. <el-tab-pane :label="$t('maincontent')" name="project" @click="null" disabled=true>
  7. <template slot="label">
  8. <i type="default" size="mini" class="el-icon-arrow-left" @click="toList" style="margin-left:10px;cursor:pointer;"></i>
  9. <el-select v-model="curProjectId" size="mini" class="projectCls" @change="onProjectChange" filterable>
  10. <el-option v-for="item in projectList" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
  11. <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
  12. <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
  13. </el-option>
  14. </el-select>
  15. <el-dropdown trigger="click" style="margin-right:30px;color:#262626;cursor:pointer;" v-if="projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept">
  16. <i class="iconfont firerock-iconcaidan" ></i>
  17. <el-dropdown-menu slot="dropdown">
  18. <el-dropdown-item v-if="currentProject.status == 1" @click.native="finishPro()">
  19. <i class="iconfont firerock-iconwancheng"></i>{{ $t('completeproject') }}
  20. </el-dropdown-item>
  21. <el-dropdown-item divided v-if="currentProject.status == 1" @click.native="cancelPro()">
  22. <i class="el-icon-refresh-left"></i>{{ $t('cancelproject') }}
  23. </el-dropdown-item>
  24. <el-dropdown-item v-if="currentProject.status == 2 || currentProject.status == 3" @click.native="startPro()">
  25. <i class="iconfont firerock-iconqidong"></i>{{ $t('restarttheproject') }}
  26. </el-dropdown-item>
  27. </el-dropdown-menu>
  28. </el-dropdown>
  29. </template>
  30. </el-tab-pane>
  31. <el-tab-pane :label="$t('taskkanban')" name="projectInside">
  32. <el-container style="padding: 0px;">
  33. <el-aside :style="'overflow:auto;padding-left:10px;padding-right:5px;height:'+tableHeight+'px;width:'+groupWidth+'px;'">
  34. <el-input v-model="groupSearch" size="small" :placeholder="$t('searchgroup')" @input="startSearchGroup" style="margin-top:10px"/>
  35. <p ><span class="heavyTxt">{{ $t('other.taskGroup') }}</span>
  36. <i class="el-icon-plus pull-right" style="color:#666;margin-right:10px;" @click="createGroup" v-if="projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept"></i>
  37. </p>
  38. <p style="color: #ff0b0b;font-size: 18px;font-weight: 700;" v-if="user.companyId == '936'">如需修改,请先联系管理员</p>
  39. <el-menu :default-active="defaultGroupId" ref="defaultMenu" class="el-menu-vertical-demo" @select="groupChange" style="border-right:none;">
  40. <el-menu-item :index="item.id" v-for="item in groupList" :key="item.id" class="group_style">
  41. <div slot="title">
  42. <!-- <span class="taskGroupClass">{{item.name}}</span> -->
  43. <div style="display: inline-block;">
  44. <el-tooltip effect="dark" :content="item.name" placement="top" v-if="item.name.length > 12">
  45. <span class="taskGroupClass">{{item.name}}</span>
  46. </el-tooltip>
  47. <span class="taskGroupClass" v-else>{{item.name}}</span>
  48. </div>
  49. <!-- <el-button size="mini" @click="test(item)">test</el-button> -->
  50. <el-dropdown trigger="click" style="float:right;margin-right:-10px;" :disabled="!(user.id == item.inchargerId || user.id == projectCreatorId || user.id == projectInchargerId || permissions.projectManagement || isManageDept)">
  51. <i class="iconfont firerock-iconcaidan" ></i>
  52. <el-dropdown-menu slot="dropdown">
  53. <el-dropdown-item @click.native="copyGroup(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
  54. <i class="el-icon-document-copy"></i>
  55. {{ $t('replicationgroup') }}</el-dropdown-item>
  56. <el-dropdown-item divided @click.native="renameGroup(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
  57. <i class="el-icon-edit"></i>
  58. {{ $t('changegroups') }}</el-dropdown-item>
  59. <el-dropdown-item divided @click.native="setManDay()" v-if="user.timeType.projectManDay==1" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
  60. <i class="el-icon-time"></i>
  61. 预估工时</el-dropdown-item>
  62. <el-dropdown-item divided @click.native="addToTemplate(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
  63. <i class="el-icon-plus"></i>
  64. {{ $t('settemplate') }}</el-dropdown-item>
  65. <el-dropdown-item divided @click.native="editIncharger(item)"
  66. :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
  67. <i class="el-icon-user"></i>
  68. {{ $t('sethead') }} </el-dropdown-item>
  69. <el-dropdown-item divided @click.native="setupParticipants(item)"
  70. :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || item.inchargerId == user.id || permissions.projectManagement || isManageDept)">
  71. <i class="iconfont firerock-iconusers"></i>
  72. {{ $t('aparticipant') }} </el-dropdown-item>
  73. <el-dropdown-item divided @click.native="deleteGroup(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
  74. <i class="el-icon-delete"></i>
  75. {{ $t('deletethegroup') }} </el-dropdown-item>
  76. <el-dropdown-item divided @click.native="getGroupDetails(item)">
  77. <i class="el-icon-tickets"></i>
  78. {{ $t('groupdetails') }} </el-dropdown-item>
  79. </el-dropdown-menu>
  80. </el-dropdown>
  81. </div>
  82. </el-menu-item>
  83. </el-menu>
  84. <!--视图 -->
  85. <p ><span class="heavyTxt">{{ $t('shi-tu') }}</span></p>
  86. <el-menu :default-active="1" class="el-menu-vertical-demo" @select="viewChange" style="border-right:none;">
  87. <el-menu-item :index="item.id" v-for="item in viewList" :key="item.id" class="group_style">
  88. <div slot="title">
  89. <span >{{item.name}}</span>
  90. </div>
  91. </el-menu-item>
  92. </el-menu>
  93. </el-aside>
  94. <!-- 分组详情 -->
  95. <el-dialog :title="groupDetailTil" :visible.sync="groupDetailsShow" width="500px" :before-close="handleClose">
  96. <div>
  97. <el-form label-width="90px">
  98. <el-form-item :label="$t('head') + ':'">
  99. <span v-if="user.userNameNeedTranslate != '1'">{{groupDetailData.incharger}}</span>
  100. <span v-if="user.userNameNeedTranslate == '1'">
  101. <TranslationOpenDataText type='userName' :openid='groupDetailData.incharger'></TranslationOpenDataText>
  102. </span>
  103. </el-form-item>
  104. <el-form-item :label="$t('participantin') + ':'">
  105. <span v-for="(item, index) in groupDetailData.participators" :key="index">
  106. <span v-if="user.userNameNeedTranslate != '1'">
  107. {{item.userName}}
  108. </span>
  109. <span v-if="user.userNameNeedTranslate == '1'">
  110. <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
  111. </span>
  112. <span v-if="index < groupDetailData.participators.length - 1">、</span>
  113. </span>
  114. </el-form-item>
  115. <el-form-item label="wbsCode:" v-if="user.companyId == 936">
  116. <span>{{groupDetailData.wbsCode}}</span>
  117. </el-form-item>
  118. <el-form-item label="预估工时:" v-if="user.timeType.projectManDay">
  119. <span>{{groupDetailData.manDay}}人天 ({{ (groupDetailData.manDay==null?0:groupDetailData.manDay)*user.timeType.allday }}小时)</span>
  120. </el-form-item>
  121. </el-form>
  122. </div>
  123. <span slot="footer" class="dialog-footer">
  124. <el-button type="primary" @click="groupDetailsShow = false">{{ $t('btn.determine') }}</el-button>
  125. </span>
  126. </el-dialog>
  127. <span :style="'background:#f0f0f0;width:1px;height:'+tableHeight+'px;'" @click="toggleGroup">
  128. </span>
  129. <!-- <span :style="'width:10px;height:'+tableHeight+'px;float:left;text-align:center;vertical-align:middle;'" @click="toggleGroup">
  130. <span :style="'width:1px;background:#20A0FF;height:'+tableHeight+'px;float:left;'"></span>
  131. <i class="el-icon-d-arrow-left" ></i>
  132. </span> -->
  133. <!-- 增加侧边栏的点击效果 -->
  134. <div class="sidebar" @click="retract()">
  135. <div class="etui">
  136. <i class="el-icon-arrow-left" ref="box"></i>
  137. </div>
  138. </div>
  139. <!-- 增加侧边栏的点击效果 -->
  140. <el-main style="background:#f7f7f7;padding:0px;position: relative;">
  141. <el-row style="color:#999;margin-top:10px;padding: 0px 10px;" :gutter="10">
  142. <el-col :span="8">
  143. <el-link @click="toggleGroup"><i v-if="selectedGroup != null" :class="groupWidth==0?'el-icon-d-arrow-right':'el-icon-d-arrow-left'" style="margin-top:10px;">{{selectedGroup.name}}</i></el-link>
  144. </el-col>
  145. <el-col :span="16" style="float:right;" class="hideCompletedFelx">
  146. <!-- 隐藏已完成任务 -->
  147. <el-checkbox v-model="hideCompleted" style="margin-right: 10px" @change="editHideTask">隐藏已完成任务</el-checkbox>
  148. <el-select v-model="order" size="small" style="background:#fff;display:inline-block;" @change="orderChange">
  149. <el-option v-for="item in orderList" :key="item.id" :label="item.name" :value="item.id">
  150. <span>{{item.name}}</span>
  151. </el-option>
  152. </el-select>
  153. <el-button icon="iconfont firerock-icondaochu" style="margin-left:10px" size="mini" @click="showExportDialog">{{ $t('export.export') }}</el-button>
  154. <el-button icon="iconfont firerock-icondaoru" size="mini" @click="importTaskDialog = true;importToStageId = stageList[0].id;">{{ $t('dao-ru') }}</el-button>
  155. </el-col>
  156. </el-row>
  157. <!-- <div style="color:#999;margin-top:10px;">
  158. <i v-if="selectedGroup != null" class="el-icon-arrow-left" style="margin-top:10px;">{{selectedGroup.name}}</i>
  159. </div> -->
  160. <div v-if="!displayTable">
  161. <div style="width: 100%;overflow-x: auto;">
  162. <draggable style="white-space:nowrap;" @update="onMoveStage"
  163. v-model="stageList" group="stage" @start="stageDrag=true" @end="stageDrag=false;" draggable=".taskStage" >
  164. <!--每个阶段的拖拽 -->
  165. <!-- <transition-group > -->
  166. <v-flex class="taskStage" v-for="stage in stageList" :key="stage.id" :style="'height:'+stageListHeight+'px;'">
  167. <div :id="stage.id"
  168. class="taskList" >
  169. <!--头部显示阶段名称,操作 -->
  170. <div slot="header" style="margin:10px 0px;cursor:move;width:300px" role="task">
  171. <span class="stage">{{stage.stagesName}}</span><span style="margin-left:10px;color:#303133;font-size:12px;">{{stage.taskList.length}}</span>
  172. <!-- <i class="el-icon-more" style="float:right;"></i> -->
  173. <el-dropdown trigger="click" style="float:right;cursor:pointer;" v-if="canEditStageList">
  174. <i class="el-icon-more" ></i>
  175. <el-dropdown-menu slot="dropdown">
  176. <el-dropdown-item @click.native="addTask(stage)">
  177. <i class="el-icon-document-add"></i>
  178. {{ $t('createtask ') }}</el-dropdown-item>
  179. <el-dropdown-item @click.native="renameStage(stage)">
  180. <i class="el-icon-edit"></i>
  181. {{ $t('renamingalist') }} </el-dropdown-item>
  182. <el-dropdown-item divided @click.native="deleteStage(stage)">
  183. <i class="el-icon-delete"></i>{{$t('deleteList ')}} </el-dropdown-item>
  184. </el-dropdown-menu>
  185. </el-dropdown>
  186. </div>
  187. <draggable class="taskListin" :style="'max-height:' + taskListinH + 'px;'" @start="drag=true" @end="drag=false" draggable=".taskCard" ghostClass="ghost" @update="onChange" @add="onChange" group="task1" :id="stage.id">
  188. <div v-for="element in stage.taskList" :id="element.id" :key="element.id" class="taskCard" ref="tasks" @click="editTask(element)" :style="element.taskStatus==0?'':'background:#eFeFeF;'">
  189. <!--任务卡片内容显示 -->
  190. <div>
  191. <div v-if="element.taskLevel == 2" class="taskImg hong"><img src="../../assets/image/hong.png" alt=""></div>
  192. <div v-if="element.taskLevel == 1" class="taskImg huang"><img src="../../assets/image/huang.png" alt=""></div>
  193. <div v-if="element.taskLevel == 0" class="taskImg hui"><img src="../../assets/image/hui.png" alt=""></div>
  194. <el-checkbox :disabled="element.taskStatus==2 || element.subTaskList.length > element.subTaskFinishNum" :checked="element.taskStatus==1?true:false" size="large" class="cb"
  195. @change="finishTask(element)"
  196. @click.stop.native=""
  197. ></el-checkbox>
  198. <el-tooltip class="item" effect="dark" :content="element.name" placement="top">
  199. <label class="task_name" :style="'background:'+(element.taskStatus==0?'#ffffff;':'#eFeFeF;')"><span>{{element.name}}</span></label>
  200. </el-tooltip>
  201. <i :class="taskTypeIcon[element.taskType]" :style="'float:right;color:'+taskTypeColor[element.taskType]+';margin-right:8px;margin-top:8px;'" ></i>
  202. </div>
  203. <div style="margin: 10px 0px;color:#666;" @click="timess(element.endDate)">
  204. <span v-if="element.endDate >= times || element.taskStatus == 1"><i v-if="element.endDate != null" class="el-icon-date" style="margin-left:5px">&nbsp;&nbsp;{{element.endDate}}</i></span>
  205. <span v-else><em v-if="element.endDate != null" style="display: inline-block;padding:3px 5px"><i v-if="element.endDate != null" class="el-icon-date"><span class="element_span"> &nbsp;&nbsp;{{element.endDate}}{{ $t('jie-zhi') }}</span></i></em></span>
  206. <span v-if="element.executorName">
  207. <span v-for="(exeItem, exeIndex) in element.executorName.split(',')" :key="exeIndex" :style="element.executorColor ? 'background:' + element.executorColor.split(',')[exeIndex] : ''" class="user_name_icon">
  208. <span v-if="user.userNameNeedTranslate != '1'">
  209. {{exeItem.length>2?exeItem.substring(exeItem.length-2, exeItem.length):exeItem}}
  210. </span>
  211. <span v-if="user.userNameNeedTranslate == '1'">
  212. <TranslationOpenDataText type='userName' :openid='exeItem'></TranslationOpenDataText>
  213. </span>
  214. </span>
  215. </span>
  216. <el-button v-if="!element.executorName" type="primary" @click.stop.native="addAsMyTask(element)" size="mini" style="float:right;width:38px;padding:5px;position: absolute;z-index: 5;right: 5px;">{{ $t('ren-ling') }}</el-button>
  217. </div>
  218. <!--子任务 -->
  219. <div v-if="element.subTaskList.length > 0" class="taskCardCircleBox">
  220. <el-progress type="circle" :percentage="(element.subTaskFinishNum/element.subTaskList.length) * 100" width="16" :show-text="false" stroke-linecap="butt" stroke-width="8"></el-progress><span style="margin-left:5px;font-size:12px;">{{element.subTaskFinishNum}}/{{element.subTaskList.length}}</span>
  221. </div>
  222. <!-- <div v-if="element.taskType == 1 && element.refTaskList != null">
  223. <el-tooltip class="item" effect="dark" content="查看关联任务" placement="top">
  224. <el-link class="sub_task_num" @click.stop.native="showSubTaskList(element)"><i class="iconfont firerock-icontree" ></i><span style="margin-left:5px;">{{element.finishRefTaskCount}}/{{element.refTaskList.length}}</span></el-link>
  225. </el-tooltip>
  226. </div> -->
  227. <div v-if="element.taskType == 1 && !(element.refTaskList == null || element.refTaskList.length == 0)" class="taskCardCircleBox">
  228. <el-progress type="circle" :percentage="(element.finishRefTaskCount/(element.refTaskList ? element.refTaskList.length : 0)) * 100" width="16" :show-text="false" stroke-linecap="butt" stroke-width="8"></el-progress>
  229. <span style="margin-left:5px;font-size:12px">{{element.finishRefTaskCount}}/{{(element.refTaskList ? element.refTaskList.length : 0)}}</span>
  230. </div>
  231. </div>
  232. </draggable>
  233. <el-button v-if="canAddTask && user.companyId != '3092'" slot="footer" role="people" @click="addTask(stage)" style="width:300px;" size="small" icon="el-icon-plus"></el-button>
  234. <el-label v-if="!canAddTask && (stage.taskList.length == 0)" style="width:300px;color:#666;">{{ $t('zan-wu-ren-wu') }}</el-label>
  235. </div>
  236. </v-flex>
  237. <!-- </transition-group > -->
  238. <el-button slot="footer" v-if="(selectedGroup != null && canEditStageList)" @click="addStage" class="taskList" icon="el-icon-plus" style="margin-top:30px;">{{ $t('creatingTaskList') }}</el-button>
  239. </draggable>
  240. </div>
  241. </div>
  242. <!--列表-->
  243. <el-table v-if="displayTable" :data="taskDataList"
  244. :header-cell-style="{'font-weight':'normal'}" border
  245. highlight-current-row v-loading="listLoading" :height="tableHeight - 85" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  246. <el-table-column fixed :label="$t('wan-cheng')" width="50">
  247. <template slot-scope="scope">
  248. <el-checkbox :disabled="scope.row.taskStatus==2" v-model="scope.row.isFinish" size="large" class="cb"
  249. @change="finishTask(scope.row)"
  250. @click.stop.native=""
  251. ></el-checkbox>
  252. </template>
  253. </el-table-column>
  254. <el-table-column prop="name" fixed :label="$t('biao-ti')" width="250">
  255. <template slot-scope="scope">
  256. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  257. <span class="single_line" > {{scope.row.name}}</span>
  258. </el-tooltip>
  259. </template>
  260. </el-table-column>
  261. <el-table-column prop="taskType" :label="$t('ren-wu-lei-xing')" width="100">
  262. <template slot-scope="scope">
  263. {{taskTypeList[scope.row.taskType].name}}
  264. </template>
  265. </el-table-column>
  266. <el-table-column prop="taskStatus" :label="$t('taskstatus')" width="100" >
  267. <template slot-scope="scope">
  268. {{taskStatusList[scope.row.taskStatus]}}
  269. </template>
  270. </el-table-column>
  271. <el-table-column prop="parentName" :label="$t('parentsstask')" width="250">
  272. <template slot-scope="scope">
  273. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;"> {{scope.row.parentTname}}</span>
  274. </template>
  275. </el-table-column>
  276. <el-table-column prop="stagesName" :label="$t('tasklist')" width="100" >
  277. </el-table-column>
  278. <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" width="100" >
  279. <template slot-scope="scope">
  280. <span v-if="user.userNameNeedTranslate != '1'">
  281. <!-- {{scope.row.executorName == null?$t('dai-fen-pei'):scope.row.executorName}} -->
  282. <span v-if="scope.row.executorName == null">{{$t('dai-fen-pei')}}</span>
  283. <span v-else>
  284. <span v-for="(item, index) in scope.row.executorName" :key="index">
  285. {{item}}
  286. <span v-if="index < scope.row.executorName.length - 1">,</span>
  287. </span>
  288. </span>
  289. </span>
  290. <span v-if="user.userNameNeedTranslate == '1'">
  291. <span v-if="scope.row.executorName == null">
  292. {{$t('dai-fen-pei')}}
  293. </span>
  294. <span v-else>
  295. <span v-for="(item, index) in scope.row.executorName" :key="index">
  296. <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
  297. <span v-if="index < scope.row.executorName.length - 1">,</span>
  298. </span>
  299. </span>
  300. </span>
  301. </template>
  302. </el-table-column>
  303. <!-- <el-table-column prop="endDate" label="截止时间" width="100" ></el-table-column> -->
  304. <el-table-column prop="startDate" :label="$t('starttimes')" width="100" >
  305. <template slot-scope="scope">
  306. <!-- <p v-if="scope.row.startDate >= times || scope.row.taskStatus != 0">{{scope.row.startDate}}</p>
  307. <p style="border-radius: 3px; text-align: center;background: #e62412; color: #fff;" v-else><span>{{scope.row.startDate}}</span></p> -->
  308. <p>{{scope.row.startDate}}</p>
  309. </template>
  310. </el-table-column>
  311. <el-table-column prop="endDate" :label="$t('deadline')" width="100" >
  312. <template slot-scope="scope">
  313. <p v-if="scope.row.endDate >= times || scope.row.taskStatus != 0">{{scope.row.endDate}}</p>
  314. <p style="border-radius: 3px; text-align: center;background: #e62412; color: #fff;" v-else><span>{{scope.row.endDate}}</span></p>
  315. </template>
  316. </el-table-column>
  317. <el-table-column prop="createDate" :label="$t('creationtime')" width="100" ></el-table-column>
  318. <el-table-column prop="taskLevel" :label="$t('priority')" width="100" >
  319. <template slot-scope="scope">
  320. {{importanceList[scope.row.taskLevel].name}}
  321. </template>
  322. </el-table-column>
  323. </el-table>
  324. <el-col :span="24" class="toolbar" v-if="displayTable">
  325. <el-pagination
  326. @size-change="taskListSizeChange"
  327. @current-change="taskListPageChange"
  328. :page-sizes="[20 , 50 , 80 , 100]"
  329. :page-size="taskListSize"
  330. layout="total, sizes, prev, pager, next"
  331. :total="taskListTotal"
  332. style="float:right;"
  333. ></el-pagination>
  334. </el-col>
  335. </el-main>
  336. </el-container>
  337. </el-tab-pane>
  338. <el-tab-pane :label="$t('fileCenter')" name="files"><FileCenter ref="fileCenter"></FileCenter></el-tab-pane>
  339. <el-tab-pane :label="$t('overviewoftheproject')" name="info"><ProjectInfo ref="projectInfo" @basecost-change="changeBase"></ProjectInfo></el-tab-pane>
  340. <el-tab-pane :label="$t('datastatistics')" name="summary"><Summary ref="summary"></Summary></el-tab-pane>
  341. <el-tab-pane :label="$t('costmanagement')" name="costbaseline" v-if="permissions.projectBaseline"><CostBaseline ref="costbaseline"></CostBaseline></el-tab-pane>
  342. <!--去掉挣值分析模块-->
  343. <!-- <el-tab-pane :label="$t('valueanalysis')" name="earning" v-if="user.id == currentProject.creator || user.id == currentProject.incharger_id ||permissions.projectBaseline"><Earning ref="earning"></Earning></el-tab-pane> -->
  344. </el-tabs>
  345. <!-- 设置参与人员界面 -->
  346. <el-dialog :title="$t('selectingParticipants')" v-if="participantsDialog" :visible.sync="participantsDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  347. <div class="tree" style="height:400px">
  348. <el-scrollbar style="height:100%">
  349. <el-input v-if="user.userNameNeedTranslate != 1"
  350. :placeholder="$t('keywordfiltering')"
  351. v-model="participantsFilterText">
  352. </el-input>
  353. <div v-if="user.userNameNeedTranslate == '1'">
  354. <el-input placeholder="请输输入关键字过滤" v-model.trim="participantsFilterText" class="input-with-select">
  355. <el-button slot="append" icon="el-icon-search" @click="echartDepartment()"></el-button>
  356. </el-input>
  357. </div>
  358. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  359. ref="chooseMembTree2" @check-change="onTreeItemChange" :default-checked-keys="alreadyPartArray"
  360. highlight-current :filter-node-method="filterNode" v-loading="filterNodeFlag">
  361. <span class="custom-tree-node" slot-scope="{ node, data }">
  362. <span v-if="user.userNameNeedTranslate == '1'">
  363. <span v-if="node.data.children">
  364. <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
  365. </span>
  366. <span v-else>
  367. <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
  368. </span>
  369. </span>
  370. <span v-if="user.userNameNeedTranslate != '1'">
  371. {{ node.label }}
  372. </span>
  373. </span>
  374. </el-tree>
  375. </el-scrollbar>
  376. </div>
  377. <div>{{ $t('btn.choose') }}&nbsp;{{chosenMembCount}}&nbsp;{{ $t('other.people') }}</div>
  378. <div slot="footer" class="dialog-footer">
  379. <el-button @click="participantsDialog = false">{{ $t('btn.cancel') }}</el-button>
  380. <el-button type="primary" @click="setParticipants()">{{ $t('btn.determine') }}</el-button>
  381. </div>
  382. </el-dialog>
  383. <!--新增任务界面-->
  384. <el-dialog :class="addForm.id==null?'':'jm'" :title="title" v-if="addFormVisible" :visible.sync="addFormVisible"
  385. :close-on-click-modal="false" customClass="customWidth" width="840px" ref="addDialog" :top="'6vh'">
  386. <!-- 整合 -->
  387. <taskComponent ref="thskComponents" :integrationTask="integrationTask" @closeBounced="closeBounced"></taskComponent>
  388. <div slot="title" v-if="addForm.parentTid != null || isRelationItem" >
  389. <!-- <el-link @click="backToParentTask"><i class="el-icon-arrow-left single_line">返回父级任务</i> | {{addForm.parentTname}}</el-link> -->
  390. <el-page-header @back="backToParentTask" :title="timelabel ? $t('returnmilestone') : $t('parenttask')" :content="timelabel ? relationPar.name : addForm.parentTname"></el-page-header>
  391. </div>
  392. <!-- 未整合 -->
  393. <div v-if="false">
  394. <div style="height: 72vh;overflow: auto;">
  395. <el-form ref="form1" :model="addForm" :rules="taskRules" label-width="100px">
  396. <!--子任务需要选择任务列表 -->
  397. <el-form-item :label="$t('tasklist')" prop="stages" v-if="addForm.parentTid != null">
  398. <el-select v-model="addForm.stagesId" style="width:100%;" >
  399. <el-option v-for="item in stageList" :key="item.id" :label="item.stagesName" :value="item.id"></el-option>
  400. </el-select>
  401. </el-form-item>
  402. <el-form-item :label="$t('types')">
  403. <!-- <el-button @click="test">test</el-button> -->
  404. <!-- 0011 -->
  405. <!-- {{groupResponsibleId == user.id}} -->
  406. <el-select v-model="addForm.taskType" style="width:100%;" :disabled="((this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement) && !(groupResponsibleId == user.id)" @change="selchg()">
  407. <el-option v-for="item in taskTypeList" :key="item.id" :label="item.name" :value="item.id">
  408. <i :class="item.icon" ></i>
  409. <span>{{item.name}}</span>
  410. </el-option>
  411. </el-select>
  412. </el-form-item>
  413. <el-form-item :label="$t('taskdefinition')" prop="name">
  414. <el-input v-model="addForm.name" :maxlength="40" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" :placeholder="$t('enterthetaskcontent')" clearable></el-input>
  415. </el-form-item>
  416. <!-- {{timelabel}}{{mileageCup}} -->
  417. <el-form-item :label="!timelabel ? $t('starttimes') : $t('jie-zhi-shi-jian')" prop="startDate">
  418. <el-date-picker v-model="addForm.startDate" type="date" style="width:40%;" value-format="yyyy-MM-dd"
  419. :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" @change="DateChange()" v-if="!timelabel"></el-date-picker>
  420. <span style="margin-left:30px;margin-right:10px;" v-if="!timelabel">{{ $t('deadline') }}</span>
  421. <el-date-picker style="width:40%;" v-model="addForm.endDate" type="date" value-format="yyyy-MM-dd"
  422. :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" @change="DateChange()"></el-date-picker>
  423. <span style="margin-left:30px;margin-right:10px;" v-if="timelabel && mileageCup">{{ $t('wan-cheng-shi-jian') }}</span>
  424. <el-date-picker style="width:40%;" v-if="timelabel && mileageCup" v-model="addForm.finishDate" type="date" value-format="yyyy-MM-dd"
  425. :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" @change="DateChange()"></el-date-picker>
  426. </el-form-item>
  427. <div style="border: 1px solid #ddd;margin:5px 0;padding:5px 0;">
  428. <el-form-item :label="$t('zhi-hang-ren') + (index+1)" v-for="(executorItem, index) in addForm.executorListFront" :key="index">
  429. <el-select v-if="user.userNameNeedTranslate != 1" v-model="executorItem.executorId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" size="small" filterable clearable :placeholder="$t('pleaseselectanexecutor')" style="width:40%;" @change="$forceUpdate()">
  430. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  431. <span style="float: left">{{ item.name }}</span>
  432. <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
  433. </el-option>
  434. </el-select>
  435. <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="users" :subjectId="executorItem.executorId" :distinction="'1'" @selectCal="selectCal" :index="index" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)"></selectCat>
  436. <!-- <selectCat v-if="user.userNameNeedTranslate == '1'" :wxCope="true" :size="'size'" :subjectId="executorItem.executorId" :distinction="'1'" :subject="users" @selectCal="selectCal" :index="index" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)"></selectCat> -->
  437. <span style="margin-left:30px;margin-right:10px;">{{ $t('plantime') }} {{gstimday}} {{gstimhour}} {{index}}</span>
  438. <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" v-model="gstimday[index]" style="width:16%;" :min="1" :max="100" :placeholder="$t('danweitian')" @change="chggstim(0,index)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.day') }}</span>
  439. <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" v-model="gstimhour[index]" style="width:16%;" :min="1" :max="100" :placeholder="$t('pleaseentertheplannedworking')" @change="chggstim(1,index)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.hour') }}</span>
  440. <!--移除执行人 -->
  441. <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id|| permissions.projectManagement || groupResponsibleId == user.id)" style="margin-left:5px" @click="removeExecutorLine(index)"></i>
  442. </el-form-item>
  443. <el-link type="primary" v-if="(((addForm.executorListFront == null || addForm.executorListFront.length<10) &&
  444. (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id || permissions.projectManagement)) ||
  445. groupResponsibleId == user.id)"
  446. style="margin-left:35px;" @click="addExecutorLine">{{ $t('addinganexecutor') }}</el-link>
  447. </div>
  448. <el-form-item :label="$t('priority')">
  449. <el-select v-model="addForm.taskLevel" style="width:100%;" >
  450. <el-option v-for="item in importanceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  451. </el-select>
  452. </el-form-item>
  453. <!-- 富文本 -->
  454. <el-form-item :label="$t('detaileddescription')" style="height: 200px">
  455. <!-- <Editor id="tinymce" v-model="tinymceHtml" :init="editorInit"></Editor> -->
  456. <!-- <el-input type="textarea" v-model="addForm.taskDesc" :rows="3"></el-input> -->
  457. <!-- <quill-edito v-model="addForm.taskDesc"></quill-edito> -->
  458. <quill-editor style="height: 150px" ref="text" v-model="addForm.taskDesc" class="myQuillEditor" :options="editorOption" @blur="onEditorBlur($event)" @focus="onEditorFocus($event)"/>
  459. </el-form-item>
  460. <!-- 富文本 -->
  461. <div v-if="addForm.id != null">
  462. <el-divider ></el-divider>
  463. <!-- 任务进展 -->
  464. <template v-if="!timelabel || isRelationItem">
  465. <p ><i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">{{ $t('taskprogress') }}</i>
  466. <span ref="addPro" style="display: block; float:right;"><el-link @click="addprogress">{{ $t('addtaskprogress') }}</el-link></span>
  467. </p>
  468. <!-- 任务进展展示 -->
  469. <div style="display: none;" ref="proBox" class="progress">
  470. <!-- <el-form :model="> -->
  471. <el-radio-group v-model="radio">
  472. <el-radio :label="0" class="rala1">{{ $t('normals') }}</el-radio>
  473. <el-radio :label="1" class="rala2">{{ $t('atrisk') }}</el-radio>
  474. <el-radio :label="2" class="rala3">{{ $t('withinthetimelimit') }}</el-radio>
  475. </el-radio-group>
  476. <el-input
  477. type="textarea"
  478. border="0"
  479. :autosize="{ minRows: 2, maxRows: 6}"
  480. :placeholder="$t('detailedprogressdescription')"
  481. v-model="text2"
  482. style="margin:10px 0 0 0">
  483. </el-input>
  484. <h4 style="font-weight: normal;">{{ $t('tixiang') }}{{checkLists.length}}</h4>
  485. <i class="el-icon-circle-plus pron_i" style="font-size: 28px;color: #409EFF;" @click="addI(0)"></i>
  486. <div class="remind" ref="addRem" style="display: none">
  487. <el-checkbox-group v-model="checkboxGrounp" v-for="item in users" :key="item.id">
  488. <p>
  489. <el-checkbox :label="item.name" @change="kkk(item)">
  490. <span>
  491. <span v-if="user.userNameNeedTranslate != '1'">
  492. {{item.name}}
  493. </span>
  494. <span v-if="user.userNameNeedTranslate == '1'">
  495. <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
  496. </span>
  497. </span>
  498. </el-checkbox>
  499. </p>
  500. </el-checkbox-group>
  501. </div>
  502. <div class="ssp" @click="sss"></div>
  503. <!-- </el-form> -->
  504. <div class="pro_btn">
  505. <el-button size="mini" @click="shutPro">{{ $t('btn.cancel') }}</el-button>
  506. <el-button size="mini" type="primary" @click="addTaskProgress">{{ $t('fa-bu') }}</el-button>
  507. </div>
  508. </div>
  509. <div class="ddl" v-if="recentProgressInfo != null && recentProgressInfo.id != null">
  510. <div class="elCard" style="margin-bottom: 10px; height:" >
  511. <i class="el-icon-success" style="color: #43d14f;" v-if="recentProgressInfo.status == 0"></i>
  512. <i class="el-icon-success" style="color: #fd7624;" v-else-if="recentProgressInfo.status == 1"></i>
  513. <i class="el-icon-success" style="color: #fd4d47;" v-else></i>
  514. <span v-if="recentProgressInfo.status == 0">{{ $t('normals') }}</span>
  515. <span v-else-if="recentProgressInfo.status == 1">{{ $t('normals') }}</span>
  516. <span v-else>{{ $t('withinthetimelimit') }}</span>
  517. <el-dropdown trigger="click" style="float:right;cursor:pointer; float: right;">
  518. <i class="el-icon-more" ></i>
  519. <el-dropdown-menu slot="dropdown">
  520. <el-dropdown-item divided>
  521. <span @click="deleteTaskProgress(recentProgressInfo.id)"><i class="el-icon-delete"></i>{{ $t('deleteList ') }}</span></el-dropdown-item>
  522. </el-dropdown-menu>
  523. </el-dropdown>
  524. <!-- <div class="elCard_qu">{{recentProgressInfo.creatorName}}{{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}</div> -->
  525. <div class="elCard_qu">
  526. <span>
  527. <span v-if="user.userNameNeedTranslate != '1'">
  528. {{recentProgressInfo.creatorName}}
  529. </span>
  530. <span v-if="user.userNameNeedTranslate == '1'">
  531. <TranslationOpenDataText type='userName' :openid='recentProgressInfo.creatorName'></TranslationOpenDataText>
  532. </span>
  533. </span>
  534. {{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}
  535. </div>
  536. <p style="padding-left: 20px;">{{recentProgressInfo.content}}</p>
  537. <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">{{ $t('viewingHistory') }}</el-button></div>
  538. </div>
  539. </div>
  540. <!-- 任务列表没有数据的时候展示 -->
  541. <div class="nones" v-if="ProgressList.length <= 0">
  542. {{ $t('nodata') }}
  543. </div>
  544. <!-- 任务进展完整状态 -->
  545. <el-dialog :title="$t('other.prompts')" :visible.sync="innerVisibless" append-to-body width="500px">
  546. <div class="integrity">
  547. <h3 style="font-weight: normal;display: inline-block;margin: 0 0 20px 0;">{{ $t('taskprogress') }} :{{ProgressList.length}}</h3>
  548. <!-- <span class="write"><i class="el-icon-circle-plus"></i>填写进展</span> -->
  549. <el-divider></el-divider>
  550. <!-- -->
  551. <div class="block" style="height: 200px;">
  552. <el-timeline style="padding:20px 0 0 0;">
  553. <el-timeline-item
  554. v-for="(activity, index) in ProgressList"
  555. :key="index">
  556. <div class="tb">
  557. <span v-if="activity.status == 0" style="color: #43D14F" class="icon"></span>
  558. <span v-if="activity.status == 1" style="color: #FD7624" class="icon"></span>
  559. <span v-if="activity.status == 2" style="color: red" class="icon"></span>
  560. <div>
  561. <span v-if="activity.status == 0" style="color: #43D14F">{{ $t('normals') }}</span>
  562. <span v-if="activity.status == 1" style="color: #FD7624">{{ $t('atrisk') }}</span>
  563. <span v-if="activity.status == 2" style="color: red">{{ $t('withinthetimelimit') }}</span>
  564. <span style="display: inline-block; float: right; color: #8C8C8C">{{activity.indate | relativeTime}}</span>
  565. </div>
  566. <p style="color: #8C8C8C">{{activity.content}}</p>
  567. </div>
  568. </el-timeline-item>
  569. </el-timeline>
  570. </div>
  571. <!-- -->
  572. </div>
  573. <span slot="footer" class="dialog-footer">
  574. <el-button type="primary" @click="innerVisibless = false">{{ $t('Shutdown') }}</el-button>
  575. </span>
  576. </el-dialog>
  577. </template>
  578. <!-- 子任务/关联任务 -->
  579. <p ><i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">{{timelabel && !isRelationItem ? $t('guanlian') : $t('zirwu')}}</i>
  580. <el-link style="float:right;" @click="addRelation" v-if="timelabel && !isRelationItem">{{ $t('associatedTask') }}</el-link>
  581. <el-link style="float:right;" @click="addSubTask" v-else>{{ $t('addingsubtask') }}</el-link>
  582. </p>
  583. <!-- 关联任务列表 -->
  584. <el-table key="guanlian" :data="relationSubTaskList" v-if="timelabel && !isRelationItem"
  585. :header-cell-style="{'font-weight':'normal'}"
  586. highlight-current-row
  587. v-loading="listLoading"
  588. style="width: 100%;margin-top:10px;"
  589. @row-click="relationTaskClick">
  590. <el-table-column prop="taskStatus" :label="$t('wan-cheng')" width="50" >
  591. <template slot-scope="scope">
  592. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb" @change="relationFinishTask(scope.row)" @click.stop.native=""></el-checkbox>
  593. </template>
  594. </el-table-column>
  595. <el-table-column prop="taskName" :label="$t('biao-ti')" >
  596. <template slot-scope="scope">
  597. <el-tooltip class="item" effect="dark" :content="scope.row.taskName" placement="top" style="cursor:pointer;color:#409eff;">
  598. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.taskName}}</span>
  599. </el-tooltip>
  600. </template>
  601. </el-table-column>
  602. <el-table-column :label="$t('operation')" width="130" align="left">
  603. <template slot-scope="scope">
  604. <el-button @click.stop.native="deleteRelationItem(scope.row.id)" size="mini">{{ $t('dissociated') }}</el-button>
  605. </template>
  606. </el-table-column>
  607. </el-table>
  608. <!--子任务列表 -->
  609. <el-table key="zi" :data="addForm.subTaskList" v-else
  610. :header-cell-style="{'font-weight':'normal'}"
  611. highlight-current-row v-loading="listLoading" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  612. <el-table-column prop="taskStatus" :label="$t('wan-cheng')" width="50" >
  613. <template slot-scope="scope">
  614. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb"
  615. @click.stop.native=""
  616. @change="finishTask(scope.row)"
  617. ></el-checkbox>
  618. </template>
  619. </el-table-column>
  620. <el-table-column prop="name" :label="$t('biao-ti')" >
  621. <template slot-scope="scope">
  622. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  623. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.name}}</span>
  624. </el-tooltip>
  625. </template>
  626. </el-table-column>
  627. <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" width="100" >
  628. <template slot-scope="scope">
  629. <span v-if="user.userNameNeedTranslate != 1">
  630. {{scope.row.executorName == null?$t('dai-fen-pei'):scope.row.executorName}}
  631. </span>
  632. <span v-if="user.userNameNeedTranslate == 1">
  633. <span v-if="scope.row.executorName == null">
  634. {{$t('dai-fen-pei')}}
  635. </span>
  636. <span v-else>
  637. <span v-for="item,index in scope.row.executorName" :key="index">
  638. <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
  639. <span v-if="index < scope.row.executorName.length - 1">,</span>
  640. </span>
  641. </span>
  642. </span>
  643. </template>
  644. </el-table-column>
  645. <el-table-column prop="endDate" :label="$t('deadline')" width="100" >
  646. <template slot-scope="scope">
  647. <p v-if="scope.row.endDate >= times">{{scope.row.endDate}}</p>
  648. <p v-else style="background: #e62412; color: #fff;text-align: center; border-radius: 3px;">{{scope.row.endDate}}</p>
  649. </template>
  650. </el-table-column>
  651. </el-table>
  652. </div>
  653. </el-form>
  654. <!-- 关联文件列表 -->
  655. <template v-if="isEditFile">
  656. <div style="width:100%;margin:1em 0;">
  657. <i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">{{ $t('jiafuchengguo') }}</i>
  658. <el-link @click="relationFileClick()" style="float:right;margin-left:10px">{{ $t('associatedfiles') }}</el-link>
  659. <el-upload style="float:right;" action="#" :http-request="uploadFileClick" :show-file-list="false" :multiple="false">
  660. <el-link>{{ $t('uoloadFiles') }}</el-link>
  661. </el-upload>
  662. </div>
  663. <el-table
  664. v-loading="fileListLoading"
  665. ref="filetable"
  666. :data="taskFileList"
  667. :header-cell-style="{'font-weight':'normal'}"
  668. highlight-current-row
  669. max-height="240"
  670. style="width: 100%;margin-top:10px;margin-bottom:15px">
  671. <el-table-column :label="$t('headerTop.serialNumber')" prop="documentType" min-width="40" align="center">
  672. <template slot-scope="scope">
  673. <div>
  674. {{scope.$index + 1}}
  675. </div>
  676. </template>
  677. </el-table-column>
  678. <el-table-column :label="$t('filenames')" prop="documentName" min-width="180"></el-table-column>
  679. <el-table-column :label="$t('filesize')" prop="size" min-width="60" align="center"></el-table-column>
  680. <el-table-column :label="$t('founder')" prop="creatorName" min-width="60" align="center">
  681. <template slot-scope="scope">
  682. <div>
  683. <span v-if="user.userNameNeedTranslate != 1">{{scope.row.creatorName}}</span>
  684. <span v-if="user.userNameNeedTranslate == 1">
  685. <TranslationOpenDataText type='userName' :openid='scope.row.creatorName'></TranslationOpenDataText>
  686. </span>
  687. </div>
  688. </template>
  689. </el-table-column>
  690. <el-table-column :label="$t('creationtime')" prop="indate" min-width="120" align="center">
  691. <template slot-scope="scope">
  692. <span>{{scope.row.indate[0] + '-' + scope.row.indate[1] + '-' + scope.row.indate[2] + '\u0020\u0020' + scope.row.indate[3] + ':' + scope.row.indate[4] + ':' + scope.row.indate[5]}}</span>
  693. </template>
  694. </el-table-column>
  695. <el-table-column :label="$t('operation')" min-width="90">
  696. <template slot-scope="scope">
  697. <el-link :href="scope.row.url" :download="scope.row.documentName" type="primary" style="margin-right:7px">{{ $t('other.download') }}</el-link>
  698. <el-link @click="taskFileDelete(scope.row.id)">{{ $t('btn.delete') }}</el-link>
  699. </template>
  700. </el-table-column>
  701. </el-table>
  702. </template>
  703. <!-- 关联文件dialog -->
  704. <el-dialog v-if="relationFileDialog" :visible.sync="relationFileDialog" :title="$t('associatedfiles')" append-to-body>
  705. <span>{{ $t('wenjian1guanli') }}</span>
  706. <div>
  707. <span>{{ $t('xuanzwenjian') }}</span>
  708. <el-select v-model="addFileId" filterable >
  709. <el-option
  710. v-for="item in projectFileList"
  711. :key="item.id"
  712. :label="item.documentName"
  713. :value="item.id"
  714. ></el-option>
  715. </el-select>
  716. <el-button @click="addTaskFile()">{{ $t('btn.determine') }}</el-button>
  717. <!-- <el-button @click="relationFileDialog = false">取消</el-button> -->
  718. </div>
  719. </el-dialog>
  720. <el-dialog v-if="isRelationTab" :visible.sync="isRelationTab" :title="$t('associatedTask')" width="800px" append-to-body>
  721. <el-form ref="relationItemForm" label-width="100px">
  722. <el-form-item :label="$t('selecttask')" prop="taskType">
  723. <el-select v-model="relationvalue" multiple style="width:80%">
  724. <el-option
  725. v-for="item in relationdata"
  726. :key="item.id"
  727. :label="item.name"
  728. :value="item.id"
  729. ></el-option>
  730. </el-select>
  731. </el-form-item>
  732. </el-form>
  733. <div slot="footer" class="dialog-footer">
  734. <el-button @click="isRelationTab = false">{{ $t('btn.cancel') }}</el-button>
  735. <el-button type="primary" @click="addRelationTask()">{{ $t('btn.determine') }}</el-button>
  736. </div>
  737. </el-dialog>
  738. </div>
  739. <div slot="footer" class="dialog-footer">
  740. <el-button v-if="(user.id == addForm.createrId || currentProject.inchargerId == user.id || currentProject.creatorId == user.id || permissions.projectManagement) && canAddTask" @click.native="deleteTask()" style="float:left;">{{ $t('btn.delete') }}</el-button>
  741. <el-button @click.native="addFormVisible = false">{{ $t('btn.cancel') }}</el-button>
  742. <el-button type="primary" @click="submitInsert" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  743. </div>
  744. <div slot="title" v-if="addForm.parentTid != null || isRelationItem" >
  745. <!-- <el-link @click="backToParentTask"><i class="el-icon-arrow-left single_line">返回父级任务</i> | {{addForm.parentTname}}</el-link> -->
  746. <el-page-header @back="backToParentTask" :title="timelabel ? $t('returnmilestone') : $t('parenttask')" :content="timelabel ? relationPar.name : addForm.parentTname"></el-page-header>
  747. </div>
  748. <!-- 评论 -->
  749. <div class="remark" v-show="addForm.id != null">
  750. <span class="zh">
  751. <div class="player">
  752. <p>{{ $t('participantin') }}</p>
  753. <div class="bj">
  754. <span v-for="(pl, i) in critic" :key="i">
  755. <span style="background: #778899" v-if="user.userNameNeedTranslate != 1">{{pl.length > 2 ? pl.substring(pl.length - 2, pl.length) : pl}}</span>
  756. <span v-if="user.userNameNeedTranslate == 1">
  757. <TranslationOpenDataText type='userName' :openid='pl'></TranslationOpenDataText>
  758. </span>
  759. </span>
  760. <!-- <span style="background: #778899">{{pl.length}}</span> -->
  761. </div>
  762. </div>
  763. <div class="subject">
  764. <div class="sub-all">
  765. <div :class="dynamicTab ? 'subOn' : ''" @click="dynamicTab = true">{{ $t('alldynamic') }}</div>
  766. <div :class="dynamicTab ? '' : 'subOn'" @click="dynamicTab = false">{{ $t('xiang-guan-ri-bao') }}</div>
  767. </div>
  768. <div class="sub-details" ref="main" v-if="dynamicTab">
  769. <ul class="infinite-list" v-infinite-scroll="load" ref="contRoll">
  770. <div style="width: 100%" v-if="commentList.length <= 0">
  771. <img src="../../assets/image/xiao.png" alt="">
  772. </div>
  773. <li v-for="i in count" class="infinite-list-item counli" :key="i">
  774. <p><i class="el-icon-s-fold"></i> <em>{{ $t('managerQucompletedthedependencytask') }}</em><span>{{ $t('onApril20') }}</span></p>
  775. </li>
  776. <li class="carts" v-for="item in commentList" :key="item.id">
  777. <!-- <el-image style="width: 30px; height: 30px" :src="url" :fit="fit"></el-image> -->
  778. <!-- <i :style="'background' + item.userColor"> -->
  779. <i :style="'background' + item.userColor">
  780. <i v-if="user.userNameNeedTranslate != 1">
  781. {{item.userName.length > 2 ? item.userName.substring(item.userName.length - 2, item.userName.length) : item.userName}}
  782. </i>
  783. <i v-if="user.userNameNeedTranslate == 1">
  784. <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
  785. </i>
  786. </i>
  787. <div>
  788. <!-- <p>{{item.userName}}</p> -->
  789. <!-- <p> -->
  790. <p v-if="user.userNameNeedTranslate != 1">
  791. {{item.userName}}
  792. </p>
  793. <p v-if="user.userNameNeedTranslate == 1">
  794. <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
  795. </p>
  796. <!-- </p> -->
  797. <em>
  798. <!-- {{item.content}} -->
  799. <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate == 1">
  800. {{item.content.msg1}}
  801. <TranslationOpenDataText type='userName' :openid='item.content.msg2'></TranslationOpenDataText>
  802. {{item.content.msg3}}
  803. </p>
  804. <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate != 1">{{item.content}}</p>
  805. </em>
  806. </div>
  807. <span>{{item.createTime | relativeTime}}</span>
  808. </li>
  809. </ul>
  810. </div>
  811. <div class="Daily" v-if="!dynamicTab">
  812. <div class="one_daily_body DailyBody">
  813. <el-card shadow="never" v-for="(item2,index2) in dailyList" :key="index2" style="margin-bottom: 20px;">
  814. <p>
  815. {{ $t('tian-bao-ren') }}: <span v-if="user.userNameNeedTranslate != 1">{{item2.userName}}</span>
  816. <span v-if="user.userNameNeedTranslate == 1">
  817. <TranslationOpenDataText type='userName' :openid='item2.userName'></TranslationOpenDataText>
  818. </span>
  819. <span style="float: right;">{{item2.createDate}}</span>
  820. </p>
  821. <p>{{ $t('other.approvalStatus') }}:
  822. <span v-if="user.company.packageEngineering == 0">
  823. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0">
  824. <span v-if="item2.isDeptAudit==0">
  825. <span v-if="item2.projectAuditState==0">
  826. <!-- 待项目审核人 --> {{$t('other.waitForTheProjectReviewer')}}
  827. <span v-if="item2.projectAuditorName != null">(
  828. <span v-if="user.userNameNeedTranslate == '1'">
  829. <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
  830. </span>
  831. <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
  832. )</span>
  833. <!-- 审核 --> {{$t('other.audit')}}
  834. </span>
  835. <span style="color:#32CD32;" v-else-if="item2.projectAuditState==1">
  836. <!-- 项目审核人 --> {{$t('other.projectAuditor')}}
  837. <span v-if="item2.projectAuditorName != null">(
  838. <!-- {{item2.projectAuditorName}} -->
  839. <span v-if="user.userNameNeedTranslate == '1'">
  840. <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
  841. </span>
  842. <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
  843. )</span>
  844. <!-- 审核通过 --> {{$t('state.approved')}}
  845. </span>
  846. </span>
  847. <span v-else-if="item2.isDeptAudit==1">
  848. ({{$t('other.await')}}
  849. <span v-if="user.userNameNeedTranslate == '1'">
  850. <TranslationOpenDataText type='departmentName' :openid='item2.auditDeptName'></TranslationOpenDataText>
  851. </span>
  852. <span v-if="user.userNameNeedTranslate != '1'">{{item2.auditDeptName}}</span>
  853. {{$t('other.audit')}})
  854. </span>
  855. </span>
  856. <span style="margin-left:15px;color:#DAA520;" v-else-if="item2.state == -1">{{$t('other.importWaitingForReview')}}</span>
  857. <span style="margin-left:15px;color:#32CD32;" v-else-if="item2.state == 1">{{$t('state.alreadyPassed')}}
  858. <span style="color:#c7e944" v-if="item2.reportAutoApprove == 1">{{$t('other.automaticReview')}}</span>
  859. </span>
  860. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 2">{{$t('state.rejected')}} {{$t('other.reason')}}:{{item2.rejectReason}}</span>
  861. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 3">{{$t('state.waitingsubmit')}}</span>
  862. </span>
  863. <span v-if="user.company.packageEngineering == 1">
  864. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == -1">{{$t('other.importWaitingForReview')}}</span>
  865. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == -1">{{$t('other.waitingForProfessionalReview')}}</span>
  866. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 0">{{$t('other.waitingForDepartmentReview')}}</span>
  867. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 1">{{$t('other.waitForTheProjectReviewer')}}<span v-if="item2.projectAuditorName != null">
  868. (
  869. <span v-if="user.userNameNeedTranslate != 1">
  870. {{item2.projectAuditorName}}
  871. </span>
  872. <span v-if="user.userNameNeedTranslate == 1">
  873. <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
  874. </span>
  875. )
  876. </span>{{$t('other.audit')}}</span>
  877. <span style="margin-left:15px;color:#32CD32;" v-else-if="item2.state == 1">{{$t('state.alreadyPassed')}}</span>
  878. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 2">{{$t('state.rejected')}} {{$t('other.reason')}}:{{item2.rejectReason}}</span>
  879. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 3">{{$t('state.waitingsubmit')}}</span>
  880. </span>
  881. </p>
  882. <p v-if="user.timeType.customDegreeActive==1 && item2.degree_id != null && item2.degree_id != -1">{{user.timeType.customDegreeName}}:{{item2.degreeName}}</p>
  883. <p v-if="user.timeType.customDataActive==1">{{user.timeType.customDataName}}:{{item2.customData}}</p>
  884. <!-- 自定义日报文本 -->
  885. <p v-if="user.timeType.customTextActive==1">{{user.timeType.customTextName}}:{{item2.customText}}</p>
  886. <p v-if="user.company.packageEngineering == 1">
  887. {{$t('other.professionalProgress')}}:
  888. <span style="margin-right:10px;" v-for="progressItem in item2.professionProgress" :key="progressItem.id">{{progressItem.professionName}}({{progressItem.progress}}%)
  889. <el-tooltip v-if="progressItem.auditState == 0" :content="$t('state.WaitingAudit')" effect="light" placement="top">
  890. <i class="iconfont firerock-icondaibandengdaishenhe"></i>
  891. </el-tooltip>
  892. <el-tooltip v-if="progressItem.auditState == 1" :content="$t('state.alreadyPassed')" effect="light" placement="top">
  893. <i class="iconfont firerock-iconshenhetongguo"></i>
  894. </el-tooltip>
  895. <el-tooltip v-if="progressItem.auditState == 2" :content="$t('state.notThrough')" effect="light" placement="top">
  896. <i class="iconfont firerock-iconshenhebohui"></i>
  897. </el-tooltip>
  898. </span>
  899. </p>
  900. <div v-if="item2.multiWorktime==0">
  901. <p style="display: inline-block;">{{$t('time.duration')}}:
  902. <span v-if="item2.reportTimeType == 0" style="margin-right:10px;">{{typeList[item2.timeType]}}</span>
  903. <span v-if="item2.reportTimeType == 2" style="margin-right:10px;">{{item2.startTime+'-'+item2.endTime}}</span>
  904. {{item2.time.toFixed(1)}}h
  905. <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">{{$t('other.WorkOvertime')}}<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag>
  906. </p>
  907. <p>{{$t('other.matters')}}:<span v-html="item2.content"></span></p>
  908. </div>
  909. <div v-if="item2.multiWorktime==1" >
  910. <p>{{$t('other.projectDuration')}}:{{item2.time.toFixed(1)}}h <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">{{ $t('other.WorkOvertime') }}<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag></p>
  911. <div v-for="(timeItem, tIndex) in item2.worktimeList" :key="tIndex"
  912. style="border: 0.5px #ddd solid;margin-bottom:5px;padding:5px;">
  913. <p style="display: inline-block;">{{$t('time.duration')}}:
  914. <span v-if="item2.reportTimeType == 2" style="margin-right:10px;">{{timeItem.startTime+'-'+timeItem.endTime}}</span>
  915. {{timeItem.time.toFixed(1)}}h
  916. </p>
  917. <p>{{$t('other.matters')}}:<span v-html="timeItem.content"></span></p>
  918. </div>
  919. </div>
  920. <p v-if="item2.state == 1 && user.timeType.needEvaluate == 1">{{$t('other.evaluation')}}:<span v-html="item2.evaluate"></span></p>
  921. <!--照片的显示 -->
  922. <p v-if="item2.pics != null && item2.pics.length > 0">
  923. <el-image v-for="(pic, index) in item2.pics" :key="index"
  924. style="width: 100px; height: 100px; margin-right:10px;"
  925. :src="pic"
  926. :preview-src-list="item2.pics">
  927. </el-image>
  928. </p>
  929. </el-card>
  930. </div>
  931. </div>
  932. </div>
  933. <div class="issue" v-if="dynamicTab">
  934. <!-- <el-input type="textarea" class="textareays" label-width="100%" label-height="140px"></el-input> -->
  935. <div class="issue_fixation">
  936. <div class="inputDeep"><el-input
  937. type="textarea"
  938. :placeholder="$t('pleaseentercontent')"
  939. :autosize="{ minRows: 6, maxRows: 6}"
  940. v-model="textarea2"
  941. class="inputDeeps"
  942. >
  943. </el-input></div>
  944. <el-button class="issue-button" type="primary" @click="release()">{{ $t('fa-bu') }}</el-button>
  945. </div>
  946. </div>
  947. </span>
  948. </div>
  949. </div>
  950. </el-dialog>
  951. <!-- 子任务列表 -->
  952. <el-dialog :title="addForm.taskType == 1 ? $t('cha-kan-guan-lian-ren-wu') : $t('cha-kan-zi-ren-wu')" v-if="subTaskVisible" :visible.sync="subTaskVisible" :close-on-click-modal="false" customClass="customWidth" width="800px">
  953. <el-table :data="addForm.subTaskList"
  954. :header-cell-style="{'font-weight':'normal'}"
  955. highlight-current-row v-loading="listLoading" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  956. <el-table-column prop="taskStatus" label="$t('wan-cheng')" width="50" >
  957. <template slot-scope="scope">
  958. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb"
  959. @click.stop.native="finishTask(scope.row)"
  960. ></el-checkbox>
  961. </template>
  962. </el-table-column>
  963. <el-table-column prop="name" :label="$t('biao-ti')" >
  964. <template slot-scope="scope">
  965. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  966. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.name}}</span>
  967. </el-tooltip>
  968. </template>
  969. </el-table-column>
  970. <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" width="100" >
  971. <template slot-scope="scope">
  972. <span v-if="user.userNameNeedTranslate != 1">
  973. {{scope.row.executorName == null?$t('dai-fen-pei'):scope.row.executorName}}
  974. </span>
  975. <span v-if="user.userNameNeedTranslate == 1">
  976. <span v-if="scope.row.executorName == null">
  977. {{$t('dai-fen-pei')}}
  978. </span>
  979. <span v-else>
  980. <TranslationOpenDataText type='userName' :openid='scope.row.executorName'></TranslationOpenDataText>
  981. </span>
  982. </span>
  983. </template>
  984. </el-table-column>
  985. <el-table-column prop="endDate" :label="$t('deadline')" width="100" ></el-table-column>
  986. </el-table>
  987. </el-dialog>
  988. <!--用户详细信息弹出框-->
  989. <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
  990. <div class="line"><span>{{ $t('lable.name') }}</span>
  991. <span v-if="user.userNameNeedTranslate != 1">{{userDetail.name}}</span>
  992. <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='userName' :openid='userDetail.name'></TranslationOpenDataText></span>
  993. </div>
  994. <div class="line"><span>{{ $t('Worknumber') }}</span><span>{{userDetail.jobNumber}}</span></div>
  995. <div class="line"><span>{{ $t('lable.phone') }}</span><span>{{userDetail.phone}}</span></div>
  996. <div class="line"><span>{{ $t('lable.department') }}</span>
  997. <span v-if="user.userNameNeedTranslate != 1">{{userDetail.departmentName}}</span>
  998. <span v-if="user.userNameNeedTranslate == 1"><TranslationOpenDataText type='departmentName' :openid='userDetail.departmentName'></TranslationOpenDataText></span>
  999. </div>
  1000. <div class="line"><span>{{ $t('costof') }}</span><span>{{userDetail.cost}}{{ $t('Yuananhour') }}</span></div>
  1001. <div slot="footer" class="dialog-footer">
  1002. <el-button type="primary" @click="userDetailVisible = false" >{{ $t('btn.determine') }}</el-button>
  1003. </div>
  1004. </el-dialog>
  1005. <!-- 新增任务分组弹出框 -->
  1006. <el-dialog v-if="addGroupDialog" :visible.sync="addGroupDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  1007. <div slot="title" >
  1008. <el-tabs v-model="createGroupWay">
  1009. <el-tab-pane :label="$t('newgrouping')" name="new">
  1010. <el-form ref="formGrouping" :model="groupForm" :rules="formGrouping" style="margin-top:40px;">
  1011. <el-form-item prop="name">
  1012. <el-input v-model.trim="groupForm.name" :placeholder="$t('pleaseenteragroupname')" maxlength="50"
  1013. show-word-limit clearable></el-input>
  1014. </el-form-item>
  1015. <el-button type="primary" @click="addGroup('formGrouping')" style="width:100%;" >{{ $t('create') }}</el-button>
  1016. </el-form>
  1017. </el-tab-pane>
  1018. <el-tab-pane :label="$t('creatintemplate')" name="template">
  1019. <el-card class="template_box" :style="t.selected?'border: 1px solid #409eff;':''" v-for="(t,tIndex) in groupTemplateList" :key="t.id" @click.native="choseTemplate(tIndex)">
  1020. <div>
  1021. <el-row >
  1022. <el-col :span="22">
  1023. <div><span>{{t.name}}</span>
  1024. <el-link :underline="false" type="primary" style="color:#aaa;margin-left:10px;"
  1025. @click="setTemplate(t)"><i class="el-icon-setting" v-show="t.isSystem == 0" ></i>
  1026. </el-link>
  1027. <el-link :underline="false" type="primary" style="color:#aaa;margin-left:10px;"
  1028. @click="deleteTemplate(t)"><i class="el-icon-delete" v-show="t.isSystem == 0" ></i>
  1029. </el-link>
  1030. </div>
  1031. <div style="margin-top:10px;">
  1032. <span style="color:#8c8c8c;font-size:12px;" v-for="(s,index) in t.stagesList" :key="s.id">
  1033. <i class="el-icon-arrow-right" v-if="index>0"></i>
  1034. {{s.stagesName}}</span>
  1035. </div>
  1036. </el-col>
  1037. <el-col :span="2">
  1038. <i class="el-icon-check" v-show="t.selected" style="font-size:20px;color:#409eff;margin-top:12px;"></i>
  1039. </el-col>
  1040. </el-row>
  1041. </div>
  1042. </el-card>
  1043. <el-button type="primary" @click="addTemplateGroup" style="width:100%;" >{{ $t('create') }}</el-button>
  1044. </el-tab-pane>
  1045. </el-tabs>
  1046. </div>
  1047. <el-dialog :title="$t('bian-ji-mo-ban')" append-to-body v-if="setTemplateDialog" :visible.sync="setTemplateDialog" width="500px">
  1048. <el-form label-width="20%">
  1049. <el-form-item :label="$t('mo-ban-ming-cheng')"><el-input v-model="setTemplateData.name" style="width:80%" clearable></el-input></el-form-item>
  1050. <el-form-item label=""><el-checkbox v-model="setTemplateData.creWithPro">{{ $t('suixiangmuzidongchuangjian') }}</el-checkbox></el-form-item>
  1051. <el-form-item v-for="item,index in setTemplateData.stagesList" :key="item.id" :label="index == 0 ? '任务列表' : ''">
  1052. <el-input v-model="item.stagesName" style="width:70%" clearable></el-input>
  1053. <el-link :underline="false" type="primary" style="color:#aaa;" @click="deleteStages(item,index)" v-if="index != 0">
  1054. <i class="el-icon-delete"></i>
  1055. </el-link>
  1056. </el-form-item>
  1057. <el-link style="margin-left:20%" :underline="false" type="primary" @click="addStages()">{{ $t('xin-zeng-ren-wu-lie-biao') }}</el-link>
  1058. </el-form>
  1059. <div slot="footer" class="dialog-footer">
  1060. <el-button type="primary" @click="setTemplateDialog = false">{{ $t('btn.cancel') }}</el-button>
  1061. <el-button type="primary" @click="setTemplateSave()">{{ $t('save') }}</el-button>
  1062. </div>
  1063. </el-dialog>
  1064. </el-dialog>
  1065. <el-dialog :title="$t('taskgroupleader')" v-if="setInchargerDialog" :visible.sync="setInchargerDialog" :close-on-click-modal="false" customClass="customWidth" width="300px">
  1066. <el-form ref="formIncharger" :model="groupForm" :rules="rules" style="margin-top:10px;">
  1067. <el-form-item prop="taskGpIncharge">
  1068. <el-select v-if="user.userNameNeedTranslate != 1" v-model="groupForm.inchargerId" :placeholder="$t('defaultText.pleaseChoose')" style="width:100%;" clearable filterable>
  1069. <el-option v-for="item in joinMembList" :key="item.id" :value="item.id" :label="item.name">
  1070. <span style="float: left">{{ item.name }}</span>
  1071. <span style="float: right; color: #8492a6; font-size: 13px">{{ item.jobNumber }}</span>
  1072. </el-option>
  1073. </el-select>
  1074. <selectCat v-if="user.userNameNeedTranslate == 1" :filterable="true" :size="'mini'" @selectCal="selectCal" :subject="joinMembList" :subjectId="groupForm.inchargerId" :clearable="true" :distinction="'2'"></selectCat>
  1075. </el-form-item>
  1076. </el-form>
  1077. <div slot="footer" class="dialog-footer">
  1078. <el-button type="primary" @click="saveGroupIncharger" style="width:100%;" >{{ $t('save') }}</el-button>
  1079. </div>
  1080. </el-dialog>
  1081. <el-dialog :title="$t('modifyingTaskGroup')" v-if="modGroupDialog" :visible.sync="modGroupDialog" :close-on-click-modal="false" customClass="customWidth" width="450px">
  1082. <el-form ref="form2" :model="groupForm" :rules="rules" style="margin-top:10px;">
  1083. <el-form-item :label="$t('bian-hao')" label-width="50px">
  1084. <el-input v-model="groupForm.taskGroupCode" :placeholder="$t('peaseenterthe')" maxlength="20"
  1085. show-word-limit clearable></el-input>
  1086. </el-form-item>
  1087. <el-form-item prop="name" :label="$t('names')" label-width="50px">
  1088. <el-input type="textarea" :rows="3" v-model="groupForm.name" :placeholder="$t('peaseenterthe')" maxlength="50"
  1089. show-word-limit clearable></el-input>
  1090. </el-form-item>
  1091. </el-form>
  1092. <div slot="footer" class="dialog-footer">
  1093. <el-button type="primary" @click="addGroup('form2')" style="width:100%;" >{{ $t('save') }}</el-button>
  1094. </div>
  1095. </el-dialog>
  1096. <el-dialog title="设置分组预估工时" v-if="modGroupManDayDialog" :visible.sync="modGroupManDayDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  1097. <el-table :data="groupList" :key="modGroupManDayKey" size="small" :height="'400px'" show-summary="true">
  1098. <el-table-column prop="name" label="分组名称">
  1099. </el-table-column>
  1100. <el-table-column prop="manDay" width="200" label="预估工时(人天)" >
  1101. <template slot-scope="scope">
  1102. <el-input v-model="scope.row.manDay" type="number" @input="jisuanEstimatedWorkTime(scope.row.manDay,scope.row.id)" :placeholder="$t('peaseenterthe')" maxlength="10" :max="99999" style="width:120px;" :disabled="scope.row.disabled"></el-input>&nbsp;人天&nbsp;
  1103. <!-- <i v-if="user.companyId=3092 && scope.row.disabled" @click="changeBudget(scope.row)" class="el-icon-circle-plus-outline"></i> -->
  1104. </template>
  1105. </el-table-column>
  1106. <el-table-column prop="estimatedWorkTime" width="200" label="预估工时(小时)" >
  1107. <template slot-scope="scope">
  1108. <el-input v-model="scope.row.estimatedWorkTime" type="number" @input="jisuanManDay(scope.row.estimatedWorkTime,scope.row.id)" :placeholder="$t('peaseenterthe')" maxlength="10" :max="99999" style="width:120px;" :disabled="scope.row.disabled"></el-input>&nbsp;小时&nbsp;
  1109. <i v-if="user.companyId=3092 && scope.row.disabled" @click="changeBudget(scope.row)" class="el-icon-circle-plus-outline"></i>
  1110. </template>
  1111. </el-table-column>
  1112. </el-table>
  1113. <p style="text-align:center;">当前项目预估工时为:{{ currentProject.manDay == null? 0:currentProject.manDay }}人天 {{ currentProject.estimatedWorkTime == null? 0:currentProject.estimatedWorkTime }}小时</p>
  1114. <div slot="footer" class="dialog-footer">
  1115. <el-button type="primary" @click="setManDayData()" style="width:100%;" >{{ $t('save') }}</el-button>
  1116. </div>
  1117. </el-dialog>
  1118. <el-dialog title="预估工时变更" v-if="changeBudgetDig" :visible.sync="changeBudgetDig" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1119. <el-form :model="groupBudgetData" label-width="120px">
  1120. <el-form-item :label="'原预估工时'"><span>{{groupBudgetData.manDay}}{{ '人天' }} / {{groupBudgetData.estimatedWorkTime}}{{ '小时' }}</span></el-form-item>
  1121. <el-form-item :label="'预估工时修改'" prop="changeManDay">
  1122. <el-input v-model="groupBudgetData.changeManDay" type="number" @input="changeNowManDay(groupBudgetData)" :placeholder="$t('peaseenterthe')" maxlength="10" :max="99999" style="width:120px;"></el-input>&nbsp;人天
  1123. <el-input v-model="groupBudgetData.changeEstimatedWorkTime" type="number" @input="changeEstimatedWorkTime(groupBudgetData)" :placeholder="$t('peaseenterthe')" maxlength="10" :max="99999" style="width:120px;"></el-input>&nbsp;小时
  1124. </el-form-item>
  1125. <el-form-item :label="'变更后预估工时'"><span>{{nowManDay}}{{'人天'}} / {{nowEstimatedWorkTime}}{{'小时'}}</span></el-form-item>
  1126. <el-form-item :label="'变更理由'">
  1127. <el-input
  1128. type="textarea"
  1129. :rows="2"
  1130. placeholder="请输入内容"
  1131. v-model="groupBudgetData.remark">
  1132. </el-input>
  1133. </el-form-item>
  1134. </el-form>
  1135. <div slot="footer" class="dialog-footer">
  1136. <el-button @click.native="changeBudgetDig = false">{{ $t('btn.cancel') }}</el-button>
  1137. <el-button type="primary" @click="changeBudgetTrue(groupBudgetData)" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  1138. </div>
  1139. </el-dialog>
  1140. <el-dialog :title="$t('addtemplate')" v-if="addToTmpDialog" :visible.sync="addToTmpDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1141. <el-form ref="formTmp" :model="templateForm" :rules="rules" style="margin-top:10px;">
  1142. <el-form-item prop="name">
  1143. <el-input v-model="templateForm.name" :placeholder="$t('entertemplatename')" maxlength="12"
  1144. show-word-limit clearable></el-input>
  1145. <div>
  1146. <span style="margin-right:20px">{{ $t('sametimetosave') }}</span>
  1147. <el-checkbox v-model="templateForm.saveTask" :label="$t('other.task')"></el-checkbox>
  1148. <el-checkbox v-model="templateForm.saveMileStone" :label="$t('other.milestone')"></el-checkbox>
  1149. <el-checkbox v-model="templateForm.saveRisk" :label="$t('risk')"></el-checkbox>
  1150. <el-checkbox v-model="templateForm.automatically" :label="$t('suixiangmuzidongchuangjian')"></el-checkbox>
  1151. </div>
  1152. </el-form-item>
  1153. </el-form>
  1154. <div slot="footer" class="dialog-footer">
  1155. <el-button type="primary" @click="createTemplate" style="width:100%;" :loading="saveTemplateLoading">{{ $t('savetemplate') }}</el-button>
  1156. </div>
  1157. </el-dialog>
  1158. <!-- 新增任务列表弹出框 -->
  1159. <el-dialog :title="$t('modifyingtheTaskList')" v-if="addStageDialog" :visible.sync="addStageDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1160. <el-form ref="form2" :model="stageForm" :rules="rules2" >
  1161. <el-form-item prop="stagesName">
  1162. <el-input v-model="stageForm.stagesName" :placeholder="$t('pleaseenteratasklistname')" maxlength="60"
  1163. show-word-limit clearable>
  1164. <template slot="prepend">
  1165. <div style="width:90px">{{ $t('ren-wu-lie-biao-ming-cheng') }}</div>
  1166. </template></el-input>
  1167. <el-input v-if="user.timeType.stageHasEvtime == 1" id="stageForm_ysgs" v-model="stageForm.stagesTime" style="margin-top:5px" @keyup.native="restrictNumber('stageForm_ysgs')">
  1168. <template slot="prepend">
  1169. <div style="width:90px">{{ $t('yu-suan-gong-shi') }}<span>(h)</span></div>
  1170. </template>
  1171. </el-input>
  1172. </el-form-item>
  1173. </el-form>
  1174. <div slot="footer" class="dialog-footer">
  1175. <el-button type="primary" @click="addStagePost" style="width:100%;" >{{ $t('save') }}</el-button>
  1176. </div>
  1177. </el-dialog>
  1178. <!--导出数据条件选择 -->
  1179. <el-dialog :title="$t('workplanexport')" v-if="exportDialog" :visible.sync="exportDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1180. <el-form ref="form3" >
  1181. <el-form-item :label="$t('choosetype')">
  1182. <el-select v-model="exportTaskType" :placeholder="$t('typesof')" clearable style="width:350px;">
  1183. <el-option :label="$t('other.task')" value="0"></el-option>
  1184. <el-option :label="$t('other.milestone')" value="1"></el-option>
  1185. <el-option :label="$t('risk')" value="2"></el-option>
  1186. </el-select>
  1187. </el-form-item>
  1188. </el-form>
  1189. <div slot="footer" class="dialog-footer">
  1190. <el-button type="primary" @click="exportTask" style="width:100%;" :loading="loadingExport">{{ $t('export.export') }}</el-button>
  1191. </div>
  1192. </el-dialog>
  1193. <!--导入数据,下载模板 -->
  1194. <el-dialog :title="$t('wdorkplanimport')" v-if="importTaskDialog" :visible.sync="importTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1195. <el-form ref="form4" >
  1196. <el-form-item :label="'1. '+$t('qing-xian-xia-zai-mo-ban-bing-tian-xie-hou-shang-chuan')" >
  1197. <el-link type="primary" :underline="false" href="./upload/项目任务导入模板.xlsx" :download="$t('projectTaskTemplate') + '.xlsx'">{{ $t('projecttasktemplatedownload') }}</el-link>
  1198. </el-form-item>
  1199. <!-- <el-form-item label="2. 选择要导入的任务列表" v-if="false">
  1200. <el-select v-model="importToStageId" placeholder="任务列表" style="width:350px;">
  1201. <el-option v-for="item in stageList" :label="item.stagesName" :value="item.id" :key="item.id"></el-option>
  1202. </el-select>
  1203. </el-form-item> -->
  1204. <div><span style="font-size:12px;color:#999;">{{ $t('faoesgfavsbxjs') }}</span></div>
  1205. </el-form>
  1206. <div slot="footer" class="dialog-footer">
  1207. <el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
  1208. <el-button type="primary" :underline="false" style="width:100%;" :loading="loadingExport">{{ $t('uoloadFiles') }}</el-button>
  1209. </el-upload>
  1210. </div>
  1211. </el-dialog>
  1212. </div>
  1213. </div>
  1214. </section>
  1215. </template>
  1216. <script>
  1217. // 自定义select组件
  1218. import selectCat from "@/components/select.vue"
  1219. import util from "../../common/js/util";
  1220. import draggable from 'vuedraggable';
  1221. import tinymce from 'tinymce/tinymce'
  1222. import 'tinymce/themes/silver/theme'
  1223. import 'tinymce/skins/ui/oxide/skin.css';
  1224. import FileCenter from './fileCenter.vue';
  1225. import ProjectInfo from './info.vue';
  1226. import Summary from './summary.vue';
  1227. import Earning from './earning.vue';
  1228. import CostBaseline from './CostBaseline.vue'
  1229. import taskComponent from "@/components/taskComponent.vue"
  1230. // import editor from '@tinymce/tinymce-vue'
  1231. // 富文本样式
  1232. import 'quill/dist/quill.core.css'
  1233. import 'quill/dist/quill.snow.css'
  1234. import 'quill/dist/quill.bubble.css'
  1235. // 导入富文本
  1236. import { quillEditor } from 'vue-quill-editor'
  1237. import { error } from 'dingtalk-jsapi';
  1238. import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
  1239. let id=1;
  1240. export default {
  1241. name: "two-list-headerslots",
  1242. display: "Two list header slot",
  1243. order: 14,
  1244. components: {
  1245. draggable,
  1246. // editor,
  1247. FileCenter,
  1248. ProjectInfo,
  1249. Summary,
  1250. CostBaseline,
  1251. Earning,
  1252. quillEditor, // 富文本
  1253. selectCat,
  1254. taskComponent
  1255. },
  1256. data() {
  1257. return {
  1258. modGroupManDayDialog: false,
  1259. isManageDept: false,
  1260. componentFlg: false,
  1261. mileageCup: false,
  1262. loadingExport : false,
  1263. saveTemplateLoading: false,
  1264. joinMembList:[],
  1265. setInchargerDialog: false,
  1266. recentProgressInfo:{},
  1267. addToTmpDialog:false,
  1268. templateForm:{},
  1269. importTaskDialog:false,
  1270. importToStageId:null,
  1271. exportDialog: false,
  1272. exportTaskType:null,
  1273. groupTemplateList:[],
  1274. createGroupWay:'new',
  1275. modGroupDialog:false,
  1276. subTaskVisible:false,
  1277. orderList:[{id:"seq",name:this.$t('manuallydragthesequence'),isDesc:false},{id:"create_date",name:this.$t('creationtimeisthelatest'),isDesc:true},
  1278. {id:"end_date",name:this.$t('deadlineisthelatest'),isDesc:true},
  1279. {id:"task_level",name:this.$t('highestpriority'),isDesc:true}],
  1280. order:"seq",
  1281. isDesc:false,
  1282. taskDataList:[],
  1283. displayTable: false,
  1284. viewList: [{id:1,name:this.$t('alltaskss')},{id:2,name:this.$t('taskinprogress')},{id:3,name:this.$t('missionscompleted')},{id:4,name:this.$t('taskscheduled')},
  1285. {id:5,name:this.$t('createdthetask')},{id:6,name:this.$t('missionIwason')},{id:7,name:this.$t('todaytask')},{id:8,name:this.$t('taskthatisoverdue')}],
  1286. importanceList:[{id:0,name:this.$t('yi-ban')},{id:1,name:this.$t('zhong-yao')},{id:2,name:this.$t('jin-ji')},],
  1287. taskTypeList:[{id:0,name:this.$t('other.task'), icon:"iconfont firerock-iconrenwu"},{id:1,name:this.$t('other.milestone'),icon:"iconfont firerock-iconicon-"},{id:2,name:this.$t('risk'),icon:"iconfont firerock-iconfengxian"}],
  1288. taskTypeColor:['#20A0FF','#8613ad','#bf0404'],
  1289. taskTypeIcon:['iconfont firerock-iconrenwu','iconfont firerock-iconicon-','iconfont firerock-iconfengxian'],
  1290. taskStatusList:[this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone')],
  1291. //优先级
  1292. taskLevelColor:['#262626','#E6A23C','#F56C6C'],
  1293. stageListHeight:0,
  1294. taskListinH:0,
  1295. groupWidth:260,
  1296. drag: false,
  1297. stageDrag: false,
  1298. dragging: false,
  1299. stageList:[],
  1300. selectedGroup:{},
  1301. allGroupData:[],
  1302. defaultGroupId:null,
  1303. addGroupDialog: false,
  1304. addStageDialog: false,
  1305. groupSearch:null,
  1306. groupType:0,//0-分组,1-视图
  1307. groupList: [],
  1308. groupForm:{},
  1309. stageForm:[],
  1310. curProjectId:null,
  1311. projectList:null,
  1312. activeIndex:"1",
  1313. activeName:"projectInside",
  1314. searchField:null,
  1315. keyword:null,
  1316. user: JSON.parse(sessionStorage.getItem("user")),
  1317. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  1318. userDetailVisible: false,
  1319. userDetail:{},
  1320. date: new Date(),
  1321. users: [],
  1322. tableHeight: 0,
  1323. listLoading: false,
  1324. subProjectVisible: false,
  1325. subProjectList: [],//子项目列表
  1326. currentProject:{},
  1327. addSubProject: false,
  1328. addFormVisible: false,
  1329. addLoading: false,
  1330. title: "",
  1331. addForm: {
  1332. name: '',
  1333. },
  1334. rules: {
  1335. name: [{ required: true, message: this.$t('pleaseenteragroupname'), trigger: "blur" }],
  1336. },
  1337. rulesManDay: {
  1338. manDay: [{ required: true, message: '请输入预估工时', trigger: "blur" }],
  1339. },
  1340. rules2: {
  1341. stagesName: [{ required: true, message: this.$t('pleaseenteratasklistname'), trigger: "blur" }],
  1342. },
  1343. taskRules : {
  1344. name: [{ required: true, message: this.$t('enterthetaskcontent'), trigger: "blur" }],
  1345. },
  1346. formGrouping: {
  1347. name: [{ required: true, message: this.$t('pleaseenteragroupname'), trigger: "blur" }],
  1348. },
  1349. sleectId: null,
  1350. sleectProjectId: null,
  1351. sidebarIndex: 0, // 侧边栏索引
  1352. url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
  1353. count: 0,
  1354. textarea2: '',
  1355. taskId: null,
  1356. commentList: [],
  1357. radio: 0,
  1358. critic: [], // 评论头像的数组
  1359. editorOption: { // 富文本框里面的默认值
  1360. placeholder: this.$t('pleaseentethetext'),
  1361. modules: {
  1362. toolbar:[
  1363. ['bold', 'italic', 'underline', 'strike'], //加粗,斜体,下划线,删除线
  1364. // ['blockquote', 'code-block'], //引用,代码块
  1365. [{ 'header': 1 }, { 'header': 2 }], // 标题,键值对的形式;1、2表示字体大小
  1366. // [{ 'list': 'ordered'}, { 'list': 'bullet' }], //列表
  1367. // [{ 'script': 'sub'}, { 'script': 'super' }], // 上下标
  1368. // [{ 'indent': '-1'}, { 'indent': '+1' }], // 缩进
  1369. // [{ 'direction': 'rtl' }], // 文本方向
  1370. [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
  1371. [{ 'header': [1, 2, 3, 4, 5, 6, false] }], //几级标题
  1372. [{ 'color': [] }, { 'background': [] }], // 字体颜色,字体背景颜色
  1373. // [{ 'font': [] }], //字体
  1374. [{ 'align': [] }], //对齐方式
  1375. ['clean'], //清除字体样式
  1376. // ['image','video'] //上传图片、上传视频
  1377. ['image'] //上传图片、上传视频
  1378. ], //工具栏设置
  1379. },
  1380. theme: 'snow',
  1381. },
  1382. textContent: true, // 控制提交
  1383. times: null,
  1384. text2: '',
  1385. innerVisibless: false, // 任务展示弹出层
  1386. activities: [{
  1387. content: this.$t('normals'),
  1388. timestamp: this.$t('hoursago'),
  1389. size: 'large',
  1390. type: 'primary',
  1391. icon: 'el-icon-circle-check',
  1392. color: '#409EFF'
  1393. }, {
  1394. content: this.$t('withinthetimelimit'),
  1395. timestamp: this.$t('hoursago8'),
  1396. color: '#F87872'
  1397. }],
  1398. ProgressList: [],
  1399. checkboxGrounp: [], // 选中人的数据
  1400. checkLists: [], // 选中人数据的ID
  1401. taskIid: null,
  1402. gstimday:[],
  1403. gstimhour:[],
  1404. timelabel: false,
  1405. relationdata: [],
  1406. isRelationTab: false,
  1407. relationvalue:[],
  1408. relationSubTaskList:[],
  1409. relationItemData: null,
  1410. relationPar:{name: ''},
  1411. isRelationItem: false,
  1412. // 关联文件
  1413. fileListLoading:false,
  1414. projectFileList:[],
  1415. taskFileList:[],
  1416. relationFileDialog: false,
  1417. addFileId: null,
  1418. isEditFile: false,
  1419. // 设置项目参与人
  1420. participantsDialog: false,
  1421. participantsFilterText: '',
  1422. deptMembData: [
  1423. {
  1424. id: 0,
  1425. label: this.$t('lable.unassigned'),
  1426. }
  1427. ],
  1428. defaultProps: {
  1429. children: 'children',
  1430. label: 'label'
  1431. },
  1432. chosenMembCount: 0,
  1433. ididid:null,
  1434. alreadyPartArray: [],
  1435. projectCreatorId: null,
  1436. projectInchargerId: null,
  1437. canAddTask: false, // 是否可创建任务的判断标志
  1438. canEditStageList: false, //是否可编辑列表的判断标志
  1439. groupResponsibleId: '', // 分组负责人的id
  1440. groupDetailsShow: false,
  1441. groupDetailData: {},
  1442. groupDetailTil: '',
  1443. setTemplateData: {},
  1444. setTemplateDialog: false,
  1445. taskListPage: 1,
  1446. taskListSize: 20,
  1447. taskListTotal: 0,
  1448. dynamicTab: true,
  1449. dailyList: [],
  1450. taskComponentFlg: false,
  1451. integrationTask: {},
  1452. integrationTaskNingwai: {},
  1453. hideCompleted: false,
  1454. wxFilterText: '',
  1455. filterNodeFlag: false,
  1456. filterNodePersonnel: [],
  1457. changeBudgetDig:false,
  1458. groupBudgetData:{},
  1459. nowManDay:0,
  1460. nowEstimatedWorkTime:0,
  1461. modGroupManDayKey: 1
  1462. };
  1463. },
  1464. watch: {
  1465. participantsFilterText(val) {
  1466. let { userNameNeedTranslate } = JSON.parse(sessionStorage.getItem("user"))
  1467. if(userNameNeedTranslate != 1) {
  1468. this.$refs.chooseMembTree2.filter(val);
  1469. }
  1470. if(!val) {
  1471. this.$refs.chooseMembTree2.filter(val);
  1472. }
  1473. }
  1474. },
  1475. methods: {
  1476. closeBounced(obj) {
  1477. console.log('触发了')
  1478. if(!obj.backToParentTaskSub) {
  1479. this.addFormVisible = false
  1480. this.taskComponentFlg = false
  1481. if(obj.submitInsert) {
  1482. if (this.groupType == 0) {
  1483. this.getStageList();
  1484. } else {
  1485. this.getViewTaskList();
  1486. }
  1487. }
  1488. if(obj.addSubTask) {
  1489. this.addSubTask()
  1490. }
  1491. if(obj.deleteTask) {
  1492. this.getStageList();
  1493. }
  1494. if(obj.taskLineClickAbs) {
  1495. this.taskLineClick(obj.items)
  1496. }
  1497. } else {
  1498. this.backToParentTask()
  1499. }
  1500. },
  1501. // 获取来自日报
  1502. getDailyList(id) {
  1503. this.http.post('/report/getTaskReportList',{
  1504. // taskId: '22131'
  1505. taskId: id
  1506. },
  1507. res => {
  1508. if (res.code == "ok") {
  1509. this.dailyList = res.data
  1510. } else {
  1511. this.$message({
  1512. message: res.msg,
  1513. type: "error"
  1514. });
  1515. }
  1516. },
  1517. error => {
  1518. this.$message({
  1519. message: error,
  1520. type: "error"
  1521. });
  1522. });
  1523. },
  1524. restrictNumber(targetId) {
  1525. let inpu = document.getElementById(targetId)
  1526. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  1527. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  1528. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g,'').replace('$#*','.');//去除其他"."
  1529. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  1530. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  1531. inpu.value = parseFloat(inpu.value);
  1532. }
  1533. },
  1534. test(item){
  1535. // let pro = this.$route
  1536. console.log('test',this.projectList);
  1537. },
  1538. setParticipants(){
  1539. let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  1540. let chose2 = chosenList.filter(item=>item.isUser == 1)
  1541. let chose3 = []
  1542. for(let i=0;i<chose2.length;i++){chose3.push(chose2[i].id)}
  1543. console.log('test',chose2,chose3);
  1544. this.http.post('/group-participator/save',{
  1545. groupId: this.ididid,
  1546. idsJson: JSON.stringify(chose3)
  1547. },res => {
  1548. if(res.code == 'ok'){
  1549. this.participantsDialog = false
  1550. this.$message({
  1551. message: this.$t('setupthesuccess'),
  1552. type: 'success'
  1553. })
  1554. }else {
  1555. this.$message({
  1556. message: res.msg,
  1557. type: 'error'
  1558. })
  1559. }
  1560. },error => {
  1561. this.$message({
  1562. message: error,
  1563. type: 'error'
  1564. })
  1565. })
  1566. },
  1567. // 设置项目参与人
  1568. setupParticipants(item){
  1569. this.ididid = item.id
  1570. this.participantsFilterText = ''
  1571. this.wxFilterText = ''
  1572. console.log(item);
  1573. this.participantsDialog = true
  1574. this.getAlreadyPartArray(item.id)
  1575. this.getDepartmentList()
  1576. },
  1577. // 获取用于设置参与人的列表
  1578. getDepartmentList(){
  1579. this.http.post('/department/listAllMemb',{
  1580. },res => {
  1581. if(res.code == 'ok'){
  1582. let list = res.data
  1583. this.haveUsersList(list)
  1584. this.deptMembData = JSON.parse(JSON.stringify(list))
  1585. console.log('123',this.deptMembData);
  1586. }else {
  1587. this.$message({
  1588. message: res.msg,
  1589. type: 'error'
  1590. })
  1591. }
  1592. },error => {
  1593. this.$message({
  1594. message: error,
  1595. type: 'error'
  1596. })
  1597. })
  1598. },
  1599. haveUsersList(list){
  1600. for (var i in list) {
  1601. if (list[i].children != null) {
  1602. this.haveUsersList(list[i].children);
  1603. }
  1604. if (list[i].userList != null) {
  1605. if (list[i].children == null) {
  1606. list[i].children = [];
  1607. }
  1608. list[i].userList.forEach(element => {
  1609. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  1610. list[i].children.push(obj);
  1611. });
  1612. }
  1613. }
  1614. },
  1615. // 获取已参与人员
  1616. getAlreadyPartArray(eid){
  1617. this.http.post('/group-participator/get',{
  1618. groupId: eid
  1619. },res => {
  1620. if(res.code == 'ok'){
  1621. this.alreadyPartArray = res.data
  1622. this.chosenMembCount = res.data.length
  1623. // console.log('get',res.data, this.alreadyPartArray)
  1624. }else {
  1625. this.$message({
  1626. message: res.msg,
  1627. type: 'error'
  1628. })
  1629. }
  1630. },error => {
  1631. this.$message({
  1632. message: error,
  1633. type: 'error'
  1634. })
  1635. })
  1636. },
  1637. // 筛选逻辑
  1638. filterNode(value, data) {
  1639. let { userNameNeedTranslate } = this.user
  1640. if (!value) return true;
  1641. if(userNameNeedTranslate != '1') {
  1642. return data.label.indexOf(value) !== -1;
  1643. } else {
  1644. return this.filterNodePersonnel.some(item => item.includes(data.label))
  1645. }
  1646. },
  1647. // 选中改变
  1648. onTreeItemChange() {
  1649. var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  1650. var list = chosenList.filter(item=>item.isUser == 1);
  1651. this.chosenMembCount = list.length;
  1652. },
  1653. // 关联文件按钮
  1654. relationFileClick(){
  1655. this.relationFileDialog = true
  1656. this.addFileId = null
  1657. this.getProjectFileList()
  1658. },
  1659. // 确认关联文件
  1660. addTaskFile(){
  1661. if(this.addFileId == null){
  1662. this.$message({message: this.$t('xuanzguanlianwenjian') , type: 'warning'})
  1663. return
  1664. }
  1665. this.http.post('/task-files/addDocumentRef',{
  1666. documentId: this.addFileId,
  1667. taskId: this.addForm.id,
  1668. projectId: this.curProjectId
  1669. },res => {
  1670. if(res.code == 'ok'){
  1671. this.$message({
  1672. message: this.$t('guan-lian-cheng-gong'),
  1673. type: 'success'
  1674. })
  1675. this.relationFileDialog = false
  1676. this.getTaskFileList()
  1677. }else {
  1678. this.$message({
  1679. message: res.msg,
  1680. type: 'error'
  1681. })
  1682. }
  1683. },error => {
  1684. this.$message({
  1685. message: error,
  1686. type: 'error'
  1687. })
  1688. })
  1689. },
  1690. // 获取项目下的文档列表
  1691. getProjectFileList(){
  1692. this.http.post('/task-files/getDocumentList',{
  1693. projectId: this.curProjectId
  1694. },res => {
  1695. if(res.code == 'ok'){
  1696. this.projectFileList = res.data
  1697. console.log('list',res.data);
  1698. }else {
  1699. this.$message({
  1700. message: res.msg,
  1701. type: 'error'
  1702. })
  1703. }
  1704. },error => {
  1705. this.$message({
  1706. message: error,
  1707. type: 'error'
  1708. })
  1709. })
  1710. },
  1711. // 获取任务下的文档列表
  1712. getTaskFileList(e,eid){
  1713. let etaskId
  1714. if(e == 1){etaskId = eid}
  1715. else{etaskId = this.addForm.id}
  1716. this.fileListLoading = true
  1717. this.http.post('/task-files/getTaskFiles',{
  1718. taskId: etaskId
  1719. },res => {
  1720. if(res.code == 'ok'){
  1721. this.fileListLoading = false
  1722. this.taskFileList = res.data
  1723. console.log('taskFileList',res.data);
  1724. }else {
  1725. this.fileListLoading = false
  1726. this.$message({
  1727. message: res.msg,
  1728. type: 'error'
  1729. })
  1730. }
  1731. },error => {
  1732. this.fileListLoading = false
  1733. this.$message({
  1734. message: error,
  1735. type: 'error'
  1736. })
  1737. })
  1738. },
  1739. // 列表的删除按钮
  1740. taskFileDelete(eid){
  1741. this.$confirm('是否移除此文件?', this.$t('other.prompts'), {
  1742. confirmButtonText: this.$t('btn.determine'),
  1743. cancelButtonText: this.$t('btn.cancel'),
  1744. type: 'warning'
  1745. }).then(()=>{
  1746. this.http.post('/task-files/delete',{
  1747. id: eid
  1748. },res => {
  1749. if(res.code == 'ok'){
  1750. this.$message({
  1751. message: res.data,
  1752. type: 'success'
  1753. })
  1754. this.getTaskFileList()
  1755. }else {
  1756. this.$message({
  1757. message: res.msg,
  1758. type: 'error'
  1759. })
  1760. }
  1761. },error => {
  1762. this.$message({
  1763. message: error,
  1764. type: 'error'
  1765. })
  1766. })
  1767. }).catch(()=>{
  1768. this.$message({
  1769. message: this.$t('thedeletionhasbeencancelled'),
  1770. type: 'info'
  1771. })
  1772. })
  1773. },
  1774. // 列表的上传按钮
  1775. uploadFileClick(item){
  1776. console.log("upload",item.file);
  1777. let files = new FormData()
  1778. files.append("projectId",this.curProjectId);
  1779. files.append("taskId", this.addForm.id);
  1780. files.append("file", item.file);
  1781. this.http.uploadFile('/task-files/uploadFile',files,
  1782. res => {
  1783. if(res.code == 'ok'){
  1784. console.log(res);
  1785. this.$message({
  1786. message: this.$t('yi-shang-chuan'),
  1787. type: 'success'
  1788. })
  1789. this.getTaskFileList()
  1790. }else {
  1791. this.$message({
  1792. message: res.msg,
  1793. type: 'error'
  1794. })
  1795. }
  1796. },error => {
  1797. this.$message({
  1798. message: error,
  1799. type: 'error'
  1800. })
  1801. })
  1802. },
  1803. selchg(){ //类型切换
  1804. if(this.addForm.taskType == 1){
  1805. this.timelabel = true
  1806. if(!this.addForm.executorListFront[0].executorId) {
  1807. console.log(this.currentProject)
  1808. this.addForm.executorListFront[0].executorId = this.currentProject.inchargerId
  1809. }
  1810. }else{
  1811. this.timelabel = false
  1812. }
  1813. },
  1814. addRelation(){ //关联任务卡片
  1815. this.relationvalue = []
  1816. this.isRelationTab = true
  1817. this.getrelation()
  1818. },
  1819. addRelationTask(){ //添加关联任务
  1820. this.http.post('/task/addMileStoneTask',{
  1821. milestoneId: this.addForm.id,
  1822. taskIds: JSON.stringify(this.relationvalue)
  1823. },
  1824. res =>{
  1825. if(res.code == "ok") {
  1826. this.isRelationTab = false
  1827. this.$message({
  1828. message: this.$t('addsuccessful'),
  1829. type: 'success'
  1830. })
  1831. this.getRelationTaskList()
  1832. this.$forceUpdate()
  1833. }else {
  1834. this.$message({
  1835. message: res.msg,
  1836. type: 'error'
  1837. })
  1838. }
  1839. },
  1840. error => {
  1841. this.$message({
  1842. message: error,
  1843. type: 'error'
  1844. })
  1845. })
  1846. },
  1847. getRelationTaskList(i,e){ //获取关联任务列表
  1848. let eid = null
  1849. if(i){
  1850. eid = e
  1851. }else{
  1852. eid = this.addForm.id
  1853. }
  1854. this.http.post('/task/getMilestoneTaskList',{
  1855. milestoneId: eid
  1856. },res => {
  1857. if(res.code == 'ok') {
  1858. this.relationSubTaskList = res.data
  1859. // console.log('res',res.data);
  1860. }else {
  1861. this.$message({
  1862. message: res.msg,
  1863. type: 'error'
  1864. })
  1865. }
  1866. },error => {
  1867. this.$message({
  1868. message: error,
  1869. type: 'error'
  1870. })
  1871. })
  1872. },
  1873. getrelation(){ //获取选择关联列表
  1874. this.http.post('/task/getTaskOnlyList',{
  1875. projectId: this.curProjectId
  1876. },
  1877. res => {
  1878. if (res.code == "ok") {
  1879. this.relationdata = []
  1880. res.data.forEach( (item) =>{
  1881. if(item.taskType != 1){
  1882. this.relationdata.push(item)
  1883. }
  1884. })
  1885. // console.log('map',this.relationdata);
  1886. } else {
  1887. this.$message({
  1888. message: res.msg,
  1889. type: "error"
  1890. });
  1891. }
  1892. },
  1893. error => {
  1894. this.$message({
  1895. message: error,
  1896. type: "error"
  1897. });
  1898. });
  1899. },
  1900. // 里程碑关联任务列表
  1901. // 解除关联
  1902. deleteRelationItem(eid){
  1903. this.listLoading = true
  1904. this.http.post('/task/removeMileStoneTask',{
  1905. id: eid
  1906. },res => {
  1907. if(res.code == 'ok') {
  1908. this.getRelationTaskList()
  1909. this.listLoading = false
  1910. this.$message({
  1911. message: this.$t('jie-chu-cheng-gong'),
  1912. type: 'success'
  1913. })
  1914. }else {
  1915. this.listLoading = false
  1916. this.$message({
  1917. message: res.msg,
  1918. type: 'error'
  1919. })
  1920. }
  1921. },error => {
  1922. this.listLoading = false
  1923. this.$message({
  1924. message: error,
  1925. type: 'error'
  1926. })
  1927. })
  1928. },
  1929. // 关联任务列表是否完成修改
  1930. relationFinishTask(row){
  1931. this.http.post('/task/finish',{
  1932. id: row.taskId,
  1933. taskStatus: row.taskStatus
  1934. },res => {
  1935. if(res.code == 'ok'){
  1936. if(this.groupType == 0){
  1937. this.getStageList();
  1938. }else {
  1939. this.getViewTaskList();
  1940. }
  1941. }else{
  1942. this.$message({
  1943. message: res.msg,
  1944. type: 'error'
  1945. })
  1946. }
  1947. },error => {
  1948. this.$message({
  1949. message: error,
  1950. type: 'error'
  1951. })
  1952. })
  1953. },
  1954. //保存分组负责人
  1955. saveGroupIncharger() {
  1956. this.http.post('/task-group/saveGroupIncharger', {id: this.groupForm.id, inchargerId: this.groupForm.inchargerId, projectId: this.curProjectId},
  1957. res => {
  1958. this.setInchargerDialog = false;
  1959. if (res.code == "ok") {
  1960. this.$message({
  1961. message: this.$t('setupthesuccess'),
  1962. type: "success"
  1963. });
  1964. //更新原始分组数据
  1965. this.groupList.filter(g=>g.id == this.groupForm.id)[0].inchargerId = this.groupForm.inchargerId;
  1966. } else {
  1967. this.$message({
  1968. message: res.msg,
  1969. type: "error"
  1970. });
  1971. }
  1972. }
  1973. );
  1974. },
  1975. // 编辑模板
  1976. setTemplate(t){
  1977. console.log(t);
  1978. this.setTemplateData = t
  1979. this.setTemplateData.needDelete = []
  1980. this.setTemplateDialog = true
  1981. },
  1982. setTemplateSave(){
  1983. if(this.setTemplateData.name == '' || this.setTemplateData.name == null){
  1984. this.$message({
  1985. message: this.$t('mo-ban-ming-cheng-bu-neng-wei-kong'),
  1986. type: 'error'
  1987. })
  1988. return
  1989. }
  1990. for(let i in this.setTemplateData.stagesList){
  1991. if(this.setTemplateData.stagesList[i].stagesName == '' || this.setTemplateData.stagesList[i].stagesName == null){
  1992. this.$message({
  1993. message: this.$t('ren-wu-lie-biao-ming-cheng-bu-neng-wei-kong'),
  1994. type: 'error'
  1995. })
  1996. return
  1997. }
  1998. }
  1999. this.http.post('/task-group/setTemplate',this.setTemplateData,
  2000. res => {
  2001. if(res.code == 'ok'){
  2002. this.$message({
  2003. message: this.$t('message.modifyTheSuccess'),
  2004. type: 'success'
  2005. })
  2006. this.getGroupTemplate()
  2007. this.setTemplateDialog = false
  2008. }else{
  2009. this.$message({
  2010. message: res.msg,
  2011. type: 'error'
  2012. })
  2013. }
  2014. },err => {
  2015. this.$message({
  2016. message: err,
  2017. type: 'error'
  2018. })
  2019. })
  2020. },
  2021. deleteStages(item,index){
  2022. this.setTemplateData.needDelete.push(item.id)
  2023. this.setTemplateData.stagesList.splice(index,1)
  2024. console.log('deletestages',item.id);
  2025. },
  2026. addStages(){
  2027. this.setTemplateData.stagesList.push({
  2028. stagesName: '',
  2029. templateId: this.setTemplateData.id
  2030. })
  2031. },
  2032. //删除模板
  2033. deleteTemplate(t) {
  2034. var that = this;
  2035. this.$confirm(this.$t('que-ren-yao-shan-chu')+"["+t.name+"]"+this.$t('ma'), this.$t('other.prompts'), {
  2036. //type: 'warning'
  2037. }).then(() => {
  2038. this.http.post('/group-template/deleteTemplate', {id: t.id},
  2039. res => {
  2040. if (res.code == "ok") {
  2041. this.getGroupTemplate();
  2042. this.$message({
  2043. message: this.$t('deletingTemplateSuccessfully'),
  2044. type: "success"
  2045. });
  2046. } else {
  2047. this.$message({
  2048. message: res.msg,
  2049. type: "error"
  2050. });
  2051. }
  2052. }
  2053. );
  2054. });
  2055. },
  2056. //创建模板
  2057. createTemplate() {
  2058. this.saveTemplateLoading = true;
  2059. this.http.post('/group-template/addTemplate', this.templateForm,
  2060. res => {
  2061. this.saveTemplateLoading = false;
  2062. if (res.code == "ok") {
  2063. this.addToTmpDialog = false;
  2064. this.getGroupTemplate();
  2065. this.$message({
  2066. message: this.$t('addTemplateSuccessfully'),
  2067. type: "success"
  2068. });
  2069. } else {
  2070. this.$message({
  2071. message: res.msg,
  2072. type: "error"
  2073. });
  2074. }
  2075. }
  2076. );
  2077. },
  2078. addToTemplate(item) {
  2079. this.addToTmpDialog = true;
  2080. this.templateForm = {groupId: item.id, name:item.name, saveTask:false, saveMileStone:false, saveRisk:false};
  2081. },
  2082. changeBase() {
  2083. // this.$refs.earning.refreshPage();
  2084. },
  2085. // 批量导入人员
  2086. importTask(item) {
  2087. //首先判断文件类型
  2088. this.loadingExport = true
  2089. let str = item.file.name.split(".");
  2090. let format = str[str.length - 1];
  2091. if (format != "xls" && format != "xlsx") {
  2092. this.loadingExport = false
  2093. this.$message({
  2094. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  2095. type: "error"
  2096. });
  2097. } else {
  2098. this.listLoading = true;
  2099. let formData = new FormData();
  2100. formData.append("file", item.file);
  2101. formData.append("projectId", this.curProjectId);
  2102. formData.append("groupId", this.selectedGroup.id);
  2103. // formData.append("stagesId", this.importToStageId);
  2104. this.http.uploadFile('/task/importTask', formData,
  2105. res => {
  2106. this.$refs.upload.clearFiles();
  2107. this.listLoading = false;
  2108. this.loadingExport = false
  2109. if (res.code == "ok") {
  2110. this.$message({
  2111. message: this.$t('other.importSuccess'),
  2112. type: "success"
  2113. });
  2114. //重新读取列表
  2115. this.getStageList();
  2116. this.importTaskDialog = false;
  2117. } else {
  2118. this.$message({
  2119. message: res.msg,
  2120. type: "error"
  2121. });
  2122. }
  2123. },
  2124. error => {
  2125. this.$refs.upload.clearFiles();
  2126. this.listLoading = false;
  2127. this.loadingExport = false
  2128. this.$message({
  2129. message: error,
  2130. type: "error"
  2131. });
  2132. });
  2133. }
  2134. },
  2135. //删除任务进展
  2136. deleteTaskProgress(id) {
  2137. this.http.post('/task-progress/deleteProgress', {id: id},
  2138. res => {
  2139. if (res.code == "ok") {
  2140. this.getTaskProgressList(this.taskIid)
  2141. this.$message({
  2142. message: this.$t('message.successfullyDeleted'),
  2143. type: "success"
  2144. });
  2145. } else {
  2146. this.$message({
  2147. message: res.msg,
  2148. type: "error"
  2149. });
  2150. }
  2151. }
  2152. );
  2153. },
  2154. //创建任务进展
  2155. addTaskProgress() {
  2156. var param = {
  2157. taskId: this.taskIid,
  2158. status: this.radio,
  2159. content: this.text2,
  2160. participatorIds: this.checkLists.toString()
  2161. };
  2162. this.http.post('/task-progress/addProgress', param,
  2163. res => {
  2164. if (res.code == "ok") {
  2165. this.shutPro()
  2166. this.getTaskProgressList(this.taskIid)
  2167. this.$message({
  2168. message: this.$t('releasesuccess'),
  2169. type: "success"
  2170. });
  2171. this.checkboxGrounp = [],
  2172. this.checkLists = [],
  2173. this.text2 = '',
  2174. this.radio = 0
  2175. let obj = {
  2176. id: this.taskIid
  2177. }
  2178. this.gain(obj)
  2179. } else {
  2180. this.$message({
  2181. message: res.msg,
  2182. type: "error"
  2183. });
  2184. }
  2185. }
  2186. );
  2187. },
  2188. //获取任务进展列表
  2189. getTaskProgressList(taskId) {
  2190. this.taskIid = taskId
  2191. this.http.post('/task-progress/list', {taskId: taskId},
  2192. res => {
  2193. if (res.code == "ok") {
  2194. this.ProgressList = res.data;
  2195. this.recentProgressInfo = res.data[0]
  2196. } else {
  2197. this.$message({
  2198. message: res.msg,
  2199. type: "error"
  2200. });
  2201. }
  2202. }
  2203. );
  2204. },
  2205. kkk(el){
  2206. var k = this.checkLists.indexOf(el.id)
  2207. if (k == -1) {
  2208. this.checkLists.push(el.id)
  2209. } else {
  2210. this.checkLists.splice(k, 1)
  2211. }
  2212. },
  2213. showExportDialog() {
  2214. this.exportDialog = true;
  2215. },
  2216. exportTask() {
  2217. let _this = this;
  2218. this.loadingExport = true
  2219. this.http.post('/task/exportTask', {projectId: this.curProjectId, taskType: this.exportTaskType},
  2220. res => {
  2221. this.loadingExport = false
  2222. if (res.code == "ok") {
  2223. location.href = res.data;
  2224. } else {
  2225. this.$message({
  2226. message: res.msg,
  2227. type: "error"
  2228. });
  2229. }
  2230. }
  2231. );
  2232. },
  2233. sss(){
  2234. this.$refs.addRem.style.display="none"
  2235. },
  2236. addprogress(){ // 添加子任务进展事件
  2237. this.$refs.proBox.style.display="block"
  2238. this.$refs.addPro.style.display="none"
  2239. },
  2240. shutPro() { // 关闭任务进展
  2241. this.$refs.addPro.style.display="block"
  2242. this.$refs.addRem.style.display="none"
  2243. this.$refs.proBox.style.display="none"
  2244. },
  2245. addI() { // 打开选择查看
  2246. this.$refs.addRem.style.display="block"
  2247. },
  2248. load() {
  2249. if(this.count >= 0) return
  2250. this.count += 2
  2251. },
  2252. onEditorFocus() {
  2253. this.onEditorBlur()
  2254. },
  2255. subMission() { // 添加
  2256. },
  2257. handleCheckedCitiesChange(value) {
  2258. let checkedCount = value.length;
  2259. this.checkAll = checkedCount === this.cities.length;
  2260. this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
  2261. },
  2262. // 获得焦点时触发
  2263. onEditorBlur(){
  2264. let theEle = this.$refs.text; // 获取元素
  2265. var img = theEle.value.match(/<img[^>]+>/g); // 赛选 img 标签
  2266. var arrImg = ''
  2267. for (var j = 0; j < img.length; j++) {
  2268. // 正则匹配,摘出img标签下的src里的内容,即capture
  2269. img[j].replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
  2270. arrImg += capture
  2271. });
  2272. }
  2273. // 原来的字符流大小,单位为字节
  2274. var strLen = arrImg.length;
  2275. // 计算后得到的文件流大小,单位为字节
  2276. var fileSize=parseInt(strLen-(strLen/8)*2);
  2277. var size = "";
  2278. size = (fileSize/1024/1024).toFixed(2);
  2279. if (size > 2){
  2280. this.textContent = false
  2281. this.$message({
  2282. showClose: true,
  2283. message: this.$t('imageexceeds2MBpleaseuploaditagain'),
  2284. type: 'warning'
  2285. });
  2286. }
  2287. this.textContent = true
  2288. },
  2289. // 侧边栏的点击事件
  2290. retract() {
  2291. if (this.$refs.box.className == 'el-icon-arrow-left') {
  2292. this.$refs.box.className = 'el-icon-arrow-right'
  2293. } else {
  2294. this.$refs.box.className = 'el-icon-arrow-left'
  2295. }
  2296. // this.$refs.box.className === 'el-icon-arrow-left' ? this.$refs.box.className = 'el-icon-arrow-right' || this.$refs.box.className = 'el-icon-arrow-left'
  2297. this.toggleGroup()
  2298. },
  2299. //
  2300. choseTemplate(tIndex) {
  2301. // this.groupTemplateList.forEach((g)=>{
  2302. // g.selected = false;
  2303. // })
  2304. this.sidebarIndex = tIndex
  2305. // this.groupTemplateList[tIndex].selected = true;
  2306. this.groupTemplateList.forEach((g, i)=>{
  2307. if(tIndex == i) {
  2308. g.selected = !g.selected;
  2309. }
  2310. })
  2311. },
  2312. //获取分组模板列表
  2313. getGroupTemplate() {
  2314. this.http.post('/group-template/getList',{},
  2315. res => {
  2316. if (res.code == "ok") {
  2317. this.groupTemplateList = res.data;
  2318. this.groupTemplateList[0].selected = true;
  2319. } else {
  2320. this.$message({
  2321. message: res.msg,
  2322. type: "error"
  2323. });
  2324. }
  2325. },
  2326. error => {
  2327. this.$message({
  2328. message: error,
  2329. type: "error"
  2330. });
  2331. });
  2332. },
  2333. copyGroup(item) {
  2334. this.http.post('/task-group/copy',{id: item.id},
  2335. res => {
  2336. if (res.code == "ok") {
  2337. this.getTaskGroups();
  2338. } else {
  2339. this.$message({
  2340. message: res.msg,
  2341. type: "error"
  2342. });
  2343. }
  2344. },
  2345. error => {
  2346. this.$message({
  2347. message: error,
  2348. type: "error"
  2349. });
  2350. });
  2351. },
  2352. //重启项目
  2353. startPro() {
  2354. this.http.post('/project/start',{id: this.curProjectId},
  2355. res => {
  2356. if (res.code == "ok") {
  2357. this.$message({
  2358. message: this.$t('restartthesuccess'),
  2359. type: "success"
  2360. });
  2361. this.currentProject.status = 1;
  2362. } else {
  2363. this.$message({
  2364. message: res.msg,
  2365. type: "error"
  2366. });
  2367. }
  2368. },
  2369. error => {
  2370. this.$message({
  2371. message: error,
  2372. type: "error"
  2373. });
  2374. });
  2375. },
  2376. //撤销项目
  2377. cancelPro() {
  2378. this.http.post('/project/cancel',{id: this.curProjectId},
  2379. res => {
  2380. if (res.code == "ok") {
  2381. this.$message({
  2382. message: this.$t('Revocationofsuccess'),
  2383. type: "success"
  2384. });
  2385. this.currentProject.status = 3;
  2386. } else {
  2387. this.$message({
  2388. message: res.msg,
  2389. type: "error"
  2390. });
  2391. }
  2392. },
  2393. error => {
  2394. this.$message({
  2395. message: error,
  2396. type: "error"
  2397. });
  2398. });
  2399. },
  2400. //完成项目
  2401. finishPro() {
  2402. this.http.post('/project/finish',{id: this.curProjectId},
  2403. res => {
  2404. if (res.code == "ok") {
  2405. this.$message({
  2406. message: this.$t('projectcompletion'),
  2407. type: "success"
  2408. });
  2409. this.currentProject.status = 2;
  2410. } else {
  2411. this.$message({
  2412. message: res.msg,
  2413. type: "error"
  2414. });
  2415. }
  2416. },
  2417. error => {
  2418. this.$message({
  2419. message: error,
  2420. type: "error"
  2421. });
  2422. });
  2423. },
  2424. //删除当前编辑的任务
  2425. deleteTask() {
  2426. var warning='';
  2427. if (this.addForm.subTaskList.length > 0) {
  2428. warning=this.$t('currenttaskanditssubtasks');
  2429. } else {
  2430. warning=this.$t('wanttodeletethecurrent task');
  2431. }
  2432. this.$confirm(warning, this.$t('other.prompts'), {
  2433. //type: 'warning'
  2434. }).then(() => {
  2435. this.http.post('/task/delete',{id: this.addForm.id},
  2436. res => {
  2437. if (res.code == "ok") {
  2438. this.addFormVisible = false;
  2439. this.getStageList();
  2440. } else {
  2441. this.$message({
  2442. message: res.msg,
  2443. type: "error"
  2444. });
  2445. }
  2446. },
  2447. error => {
  2448. this.$message({
  2449. message: error,
  2450. type: "error"
  2451. });
  2452. });
  2453. });
  2454. },
  2455. //tab页签切换
  2456. handleClick(tab, event) {
  2457. let pathModel = tab.name;
  2458. this.$router.push('/'+pathModel+'/'+this.curProjectId);
  2459. if(tab.name == 'costbaseline'){
  2460. this.$refs.costbaseline.refreshPage();
  2461. }
  2462. if(tab.name == 'info') {
  2463. this.$refs.projectInfo.getMileStoneList()
  2464. }
  2465. },
  2466. showSubTaskList(task) {
  2467. this.subTaskVisible = true;
  2468. this.addForm = task;
  2469. // console.log('click',task.subTaskList);
  2470. },
  2471. backToParentTask() {
  2472. // this.getTaskDetail(this.addForm.parentTid);
  2473. this.getTaskDetail(this.timelabel ? this.relationPar.id : this.addForm.parentTid);
  2474. this.isEditFile = true;
  2475. this.$refs.thskComponents.backToParentTask()
  2476. if(this.timelabel){
  2477. this.isRelationItem = false
  2478. // this.relationPar = {name: ''}
  2479. this.getRelationTaskList(1, this.relationPar.id)
  2480. this.gain(this.relationPar)
  2481. }
  2482. },
  2483. //显示子任务创建卡片
  2484. addSubTask() {
  2485. if(this.isRelationItem){return}
  2486. this.addFormVisible = true;
  2487. this.addForm = {parentTname: this.addForm.name,parentTid: this.addForm.id,projectId: this.addForm.projectId, groupId: this.addForm.groupId, taskLevel:0, planHours: 8, taskType: 0};
  2488. this.addForm.executorListFront = [{executorId:null, planHours:8}];
  2489. this.addLoading = false;
  2490. //创建子任务,非编辑状态
  2491. this.isEditFile = false;
  2492. },
  2493. //认领任务
  2494. addAsMyTask(task) {
  2495. this.http.post('/task/addAsMyTask',{id: task.id},
  2496. res => {
  2497. if (res.code == "ok") {
  2498. this.getStageList();
  2499. } else {
  2500. this.$message({
  2501. message: res.msg,
  2502. type: "error"
  2503. });
  2504. }
  2505. },
  2506. error => {
  2507. this.$message({
  2508. message: error,
  2509. type: "error"
  2510. });
  2511. });
  2512. },
  2513. taskLineClick(row, column, event) {
  2514. if(this.isRelationItem){return}
  2515. this.editTask(row);
  2516. },
  2517. //排序发生改变
  2518. orderChange() {
  2519. this.isDesc = this.orderList.filter(o=>o.id == this.order)[0].isDesc;
  2520. if (this.groupType == 0) {
  2521. this.getStageList();
  2522. } else {
  2523. this.getViewTaskList();
  2524. }
  2525. },
  2526. taskListPageChange(val){
  2527. this.taskListPage = val
  2528. this.getViewTaskList()
  2529. },
  2530. taskListSizeChange(val){
  2531. this.taskListSize = val
  2532. this.taskListPage = 1
  2533. this.getViewTaskList()
  2534. },
  2535. //加载视图任务列表
  2536. getViewTaskList() {
  2537. this.http.post('/task/list',{projectId: this.curProjectId, viewId: this.selectedGroup.id, order: this.order, isDesc: this.isDesc,pageIndex: this.taskListPage,pageSize:this.taskListSize},
  2538. res => {
  2539. if (res.code == "ok") {
  2540. // this.taskDataList = res.data;
  2541. // console.log(this.taskDataList, '任务视图的列表')
  2542. for(var i in res.data.records) {
  2543. if(res.data.records[i].executorName != null) {
  2544. res.data.records[i].executorName = res.data.records[i].executorName.split(',')
  2545. }
  2546. }
  2547. this.taskDataList = res.data.records;
  2548. this.taskListTotal = res.data.total
  2549. console.log(this.taskDataList, '任务视图的列表')
  2550. this.taskDataList.forEach(t=>{
  2551. t.isFinish = t.taskStatus==1?true:false;
  2552. });
  2553. } else {
  2554. this.$message({
  2555. message: res.msg,
  2556. type: "error"
  2557. });
  2558. }
  2559. },
  2560. error => {
  2561. this.$message({
  2562. message: error,
  2563. type: "error"
  2564. });
  2565. });
  2566. },
  2567. //阶段拖拽
  2568. onMoveStage(e) {
  2569. var data = {
  2570. groupId:this.selectedGroup.id,
  2571. oldIndex: e.oldIndex,
  2572. newIndex: e.newIndex,};
  2573. this.http.post('/stages/changeStageOrder',data,
  2574. res => {
  2575. if (res.code == "ok") {
  2576. this.getStageList();
  2577. } else {
  2578. this.$message({
  2579. message: res.msg,
  2580. type: "error"
  2581. });
  2582. }
  2583. },
  2584. error => {
  2585. this.$message({
  2586. message: error,
  2587. type: "error"
  2588. });
  2589. });
  2590. },
  2591. onChange(e) {
  2592. var data = {
  2593. id:e.item.id,
  2594. oldIndex: e.oldIndex ,
  2595. newIndex: e.newIndex ,
  2596. oldStagesId: e.from.id,
  2597. newStagesId: e.to.id};
  2598. this.http.post('/task/changeOrder',data,
  2599. res => {
  2600. if (res.code == "ok") {
  2601. this.getStageList();
  2602. } else {
  2603. this.$message({
  2604. message: res.msg,
  2605. type: "error"
  2606. });
  2607. }
  2608. },
  2609. error => {
  2610. this.$message({
  2611. message: error,
  2612. type: "error"
  2613. });
  2614. });
  2615. },
  2616. //计算预估工时
  2617. jisuanEstimatedWorkTime(manDay,groupId){
  2618. if(groupId){
  2619. this.groupList.forEach(item=>{
  2620. if(item.id==groupId){
  2621. item.estimatedWorkTime=manDay*this.user.timeType.allday
  2622. }
  2623. })
  2624. }
  2625. },
  2626. //计算预估工时
  2627. jisuanManDay(estimatedWorkTime,groupId){
  2628. if(groupId){
  2629. this.groupList.forEach(item=>{
  2630. if(item.id==groupId){
  2631. item.manDay=estimatedWorkTime/this.user.timeType.allday
  2632. }
  2633. })
  2634. }
  2635. },
  2636. toggleGroup() {
  2637. if (this.groupWidth == 0) {
  2638. this.groupWidth = 260;
  2639. } else {
  2640. this.groupWidth = 0;
  2641. }
  2642. },
  2643. finishTask(task) {
  2644. this.http.post('/task/finish',{id: task.id, taskStatus: task.taskStatus},
  2645. res => {
  2646. if (res.code == "ok") {
  2647. if (this.groupType == 0) {
  2648. this.getStageList();
  2649. } else {
  2650. this.getViewTaskList();
  2651. }
  2652. } else {
  2653. this.$message({
  2654. message: res.msg,
  2655. type: "error"
  2656. });
  2657. }
  2658. },
  2659. error => {
  2660. this.$message({
  2661. message: error,
  2662. type: "error"
  2663. });
  2664. });
  2665. },
  2666. // 点击卡片事件
  2667. editTask(task) {
  2668. this.mileageCup = true
  2669. // console.log('editTask',task)
  2670. if(task.taskType == 1){
  2671. this.timelabel = true
  2672. this.isRelationItem = false
  2673. }else{
  2674. this.timelabel = false
  2675. }
  2676. this.addFormVisible = true;
  2677. this.isEditFile = true;
  2678. this.addLoading = false;
  2679. this.title = this.$t('editingtasks');
  2680. // 自定义组件
  2681. this.integrationTask = {
  2682. id: task.id,
  2683. task: task,
  2684. num: 1,
  2685. curProjectId: this.curProjectId,
  2686. create: false,
  2687. integrationTaskNingwai: this.integrationTaskNingwai
  2688. }
  2689. this.taskComponentFlg = true
  2690. this.getTaskDetail(task.id);
  2691. this.getTaskProgressList(task.id); // 获取任务进展列表
  2692. this.getUsers(); // 获取名单数据
  2693. this.gain(task); // 获取评论列表
  2694. this.getDailyList(task.id) // 获取来自日报
  2695. this.getRelationTaskList(1, task.id)
  2696. this.getTaskFileList(1,task.id)
  2697. },
  2698. // 关联任务点击事件
  2699. relationTaskClick(row,column,event){
  2700. // console.log('relationTaskClick',row);
  2701. this.relationPar = JSON.parse(JSON.stringify(this.addForm))
  2702. // console.log(this.relationPar);
  2703. this.addFormVisible = true;
  2704. this.addLoading = false;
  2705. this.isRelationItem = true;
  2706. this.isEditFile = true;
  2707. this.title = this.$t('editingtasks');
  2708. this.getTaskDetail(row.taskId);
  2709. this.getUsers();
  2710. this.gain(row,1);
  2711. this.getRelationTaskList(1, row.taskId)
  2712. this.getTaskFileList(1,row.taskId)
  2713. },
  2714. // 获取评论列表
  2715. gain (task,e) {
  2716. this.commentList = [];
  2717. this.taskId = e == 1 ? task.taskId : task.id;
  2718. this.http.post('/task-comment/getList', {taskId: e == 1 ? task.taskId : task.id},
  2719. res => {
  2720. if (res.code == "ok") {
  2721. for(var i in res.data) {
  2722. if(res.data[i].content.indexOf('$userName=') != '-1') {
  2723. let obj = {
  2724. msg1: res.data[i].content.split('$')[0],
  2725. msg2: res.data[i].content.split('$')[1].split('=')[1],
  2726. msg3: res.data[i].content.split('$')[2]
  2727. }
  2728. res.data[i].content = obj
  2729. } else {
  2730. if(this.user.userNameNeedTranslate == 1) {
  2731. let obj = {
  2732. msg1: res.data[i].content,
  2733. msg2: '',
  2734. msg3: ''
  2735. }
  2736. res.data[i].content = obj
  2737. }
  2738. }
  2739. }
  2740. this.commentList = res.data
  2741. this.sppk(this.commentList) // 获取参与人的方法
  2742. } else {
  2743. this.$message({
  2744. message: res.msg,
  2745. type: "error"
  2746. });
  2747. }
  2748. },
  2749. error => {
  2750. this.$message({
  2751. message: error,
  2752. type: "error"
  2753. });
  2754. });
  2755. },
  2756. // 获取评论参与人
  2757. sppk(comit) {
  2758. var sk = []
  2759. comit.forEach(function(e){
  2760. sk.push(e.userName)
  2761. })
  2762. this.critic = new Set(sk)
  2763. console.log(this.critic, '参与人',this.critic.length)
  2764. },
  2765. // 点击发布
  2766. release() {
  2767. if(this.textarea2.length <= 0) return this.$message({message: this.$t('pleaseentercontent'), type: "error"})
  2768. this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
  2769. res => {
  2770. if(res.code == "ok"){
  2771. if(res.data.content.indexOf('$userName=') != '-1') {
  2772. let obj = {
  2773. msg1: res.data.content.split('$')[0],
  2774. msg2: res.data.content.split('$')[1].split('=')[1],
  2775. msg3: res.data.content.split('$')[2]
  2776. }
  2777. res.data.content = obj
  2778. } else {
  2779. if(this.user.userNameNeedTranslate == 1) {
  2780. let obj = {
  2781. msg1: res.data.content,
  2782. msg2: '',
  2783. msg3: ''
  2784. }
  2785. res.data.content = obj
  2786. }
  2787. }
  2788. this.commentList.push(res.data)
  2789. this.sppk(this.commentList)
  2790. this.textarea2 = ""
  2791. this.contRoll() // 滚动到底部
  2792. } else {
  2793. this.$message({
  2794. message: res.msg,
  2795. type: "error"
  2796. });
  2797. }
  2798. },
  2799. error => {
  2800. this.$message({
  2801. message: error,
  2802. type: "error"
  2803. });
  2804. })
  2805. },
  2806. // 滚动到底部
  2807. contRoll(){
  2808. this.$nextTick(() => {
  2809. this.$refs.main.scrollTop = this.$refs.contRoll.scrollHeight;
  2810. })
  2811. },
  2812. chggstim(e,i){
  2813. if(e){
  2814. this.gstimday[i] = Math.ceil(this.gstimhour[i] / this.user.timeType.allday)
  2815. }else{
  2816. this.gstimhour[i] = this.gstimday[i] * this.user.timeType.allday
  2817. }
  2818. },
  2819. getTaskDetail(id) {
  2820. this.http.post('/task/getTask',{id: id},
  2821. res => {
  2822. if (res.code == "ok") {
  2823. if(this.user.userNameNeedTranslate == 1) {
  2824. for(var i in res.data.subTaskList) {
  2825. if(res.data.subTaskList[i].executorName) {
  2826. res.data.subTaskList[i].executorName = res.data.subTaskList[i].executorName.split(',')
  2827. }
  2828. }
  2829. }
  2830. this.addForm = res.data;
  2831. this.addForm.createDate = null;
  2832. this.addForm.indate = null;
  2833. this.addLoading = false;
  2834. this.recentProgressInfo = this.addForm.progress;
  2835. this.addForm.executorListFront = this.addForm.executorList;
  2836. this.gstimday = []
  2837. this.gstimhour = []
  2838. for(let i=0;i<this.addForm.executorListFront.length;i++){
  2839. this.gstimhour.push(this.addForm.executorListFront[i].planHours),
  2840. this.gstimday.push(Math.ceil(this.addForm.executorListFront[i].planHours / this.user.timeType.allday))
  2841. }
  2842. //删除中间传值的变量数组
  2843. delete this.addForm.executorList;
  2844. } else {
  2845. this.$message({
  2846. message: res.msg,
  2847. type: "error"
  2848. });
  2849. }
  2850. },
  2851. error => {
  2852. this.$message({
  2853. message: error,
  2854. type: "error"
  2855. });
  2856. });
  2857. },
  2858. //预估工时变更
  2859. changeBudget(task){
  2860. this.changeBudgetDig=true,
  2861. this.groupBudgetData=task,
  2862. this.nowManDay=(this.groupBudgetData.changeManDay==null?0:parseInt(this.groupBudgetData.changeManDay))+(this.groupBudgetData.manDay==null?0:parseInt(this.groupBudgetData.manDay))
  2863. this.nowEstimatedWorkTime=(this.groupBudgetData.changeEstimatedWorkTime==null?0:parseInt(this.groupBudgetData.changeEstimatedWorkTime))+(this.groupBudgetData.estimatedWorkTime==null?0:parseInt(this.groupBudgetData.estimatedWorkTime))
  2864. },
  2865. //预估工时变更
  2866. changeNowManDay(task){
  2867. this.nowManDay=(this.groupBudgetData.changeManDay==null||this.groupBudgetData.changeManDay==''?0:parseInt(this.groupBudgetData.changeManDay))+(this.groupBudgetData.manDay==null||this.groupBudgetData.manDay==''?0:parseInt(this.groupBudgetData.manDay))
  2868. this.groupBudgetData.changeEstimatedWorkTime=(this.groupBudgetData.changeManDay==null||this.groupBudgetData.changeManDay==''?0:this.groupBudgetData.changeManDay)*this.user.timeType.allday
  2869. this.nowEstimatedWorkTime=this.nowManDay*this.user.timeType.allday
  2870. },
  2871. //预估工时变更
  2872. changeEstimatedWorkTime(task){
  2873. this.nowEstimatedWorkTime=(this.groupBudgetData.changeEstimatedWorkTime==null||this.groupBudgetData.changeEstimatedWorkTime==''?0:parseInt(this.groupBudgetData.changeEstimatedWorkTime))+(this.groupBudgetData.estimatedWorkTime==null||this.groupBudgetData.estimatedWorkTime==''?0:parseInt(this.groupBudgetData.estimatedWorkTime))
  2874. this.groupBudgetData.changeManDay=(this.groupBudgetData.changeEstimatedWorkTime==null||this.groupBudgetData.changeEstimatedWorkTime==''?0:this.groupBudgetData.changeEstimatedWorkTime)/this.user.timeType.allday
  2875. this.nowManDay=this.nowEstimatedWorkTime/this.user.timeType.allday
  2876. },
  2877. changeBudgetTrue(groupBudgetData){
  2878. let param;
  2879. if(groupBudgetData){
  2880. param={
  2881. groupId:groupBudgetData.id,
  2882. oldManDay:groupBudgetData.manDay,
  2883. changeManDay:groupBudgetData.changeManDay,
  2884. nowManDay:this.nowManDay,
  2885. remark:groupBudgetData.remark,
  2886. }
  2887. }
  2888. if(!groupBudgetData.remark) {
  2889. this.$message({
  2890. message: '请输入变更理由',
  2891. type: "error"
  2892. });
  2893. return
  2894. }
  2895. this.http.post('/group-budget-review/add',param,
  2896. res => {
  2897. if (res.code == "ok") {
  2898. this.$message({
  2899. message: "操作成功",
  2900. type: "success"
  2901. });
  2902. this.changeBudgetDig=false
  2903. } else {
  2904. this.$message({
  2905. message: res.msg,
  2906. type: "error"
  2907. });
  2908. }
  2909. },
  2910. error => {
  2911. this.$message({
  2912. message: error,
  2913. type: "error"
  2914. });
  2915. });
  2916. },
  2917. addTask(stage) {
  2918. this.mileageCup = false
  2919. this.addFormVisible = true;
  2920. this.addForm = {projectId: stage.projectId, groupId: stage.groupId, stagesId: stage.id, taskLevel:0, planHours: 8, taskType: 0};
  2921. this.addForm.executorListFront = [{executorId:null, planHours:this.user.timeType.allday}];
  2922. this.gstimhour = [this.user.timeType.allday]
  2923. this.gstimday = [1]
  2924. this.addLoading = false;
  2925. this.isEditFile = false;
  2926. this.title=this.$t('createtask ');
  2927. this.commentList = [];
  2928. this.timelabel = false
  2929. let obj = {
  2930. create: true,
  2931. addForm: this.addForm,
  2932. executorListFront: [{executorId:null, planHours:8}],
  2933. stage: stage,
  2934. integrationTaskNingwai: this.integrationTaskNingwai
  2935. }
  2936. this.integrationTask = obj
  2937. this.taskComponentFlg = true
  2938. },
  2939. addExecutorLine(e) {
  2940. if(e == 1){
  2941. if (this.relationItemData.executorList == null) {
  2942. this.relationItemData.executorList = [];//初始化
  2943. }
  2944. this.relationItemData.executorList.push({executorId:null, planHours:this.user.timeType.allday});
  2945. this.gstimday.push(1)
  2946. this.gstimhour.push(this.user.timeType.allday)
  2947. this.$forceUpdate();
  2948. }else{
  2949. if (this.addForm.executorListFront == null) {
  2950. this.addForm.executorListFront = [];//初始化
  2951. }
  2952. this.addForm.executorListFront.push({executorId:null, planHours:this.user.timeType.allday});
  2953. this.gstimday.push(1)
  2954. this.gstimhour.push(this.user.timeType.allday)
  2955. this.$forceUpdate();
  2956. }
  2957. },
  2958. removeExecutorLine(index,e) {
  2959. if(e == 1){
  2960. this.relationItemData.executorList.splice(index,1);
  2961. this.gstimday.splice(index,1)
  2962. this.gstimhour.splice(index,1)
  2963. this.$forceUpdate();
  2964. }else{
  2965. this.addForm.executorListFront.splice(index,1);
  2966. this.gstimday.splice(index,1)
  2967. this.gstimhour.splice(index,1)
  2968. this.$forceUpdate();
  2969. }
  2970. },
  2971. renameStage(item) {
  2972. this.stageForm = JSON.parse(JSON.stringify(item));
  2973. this.addStageDialog = true;
  2974. },
  2975. deleteStage(item) {
  2976. var _this = this;
  2977. var param = {id:item.id, groupId: item.groupId};
  2978. this.$confirm(this.$t('detelecesTask'), this.$t('other.prompts'), {
  2979. //type: 'warning'
  2980. }).then(() => {
  2981. this.http.post('/stages/delete',param,
  2982. res => {
  2983. if (res.code == "ok") {
  2984. // this.stageList = res.data;
  2985. this.getStageList();
  2986. } else {
  2987. this.$message({
  2988. message: res.msg,
  2989. type: "error"
  2990. });
  2991. }
  2992. },
  2993. error => {
  2994. this.$message({
  2995. message: error,
  2996. type: "error"
  2997. });
  2998. });
  2999. });
  3000. },
  3001. //加载项目内的任务列表
  3002. getStageList() {
  3003. this.integrationTaskNingwai = {
  3004. groupId: this.selectedGroup.id,
  3005. projectId: this.selectedGroupprojectId,
  3006. order: this.order,
  3007. isDesc: this.isDesc
  3008. }
  3009. this.http.post('/stages/list',{groupId: this.selectedGroup.id, projectId: this.selectedGroup.projectId, order: this.order, isDesc: this.isDesc,hideCompleted: this.hideCompleted},
  3010. res => {
  3011. if (res.code == "ok") {
  3012. this.stageList = res.data.list;
  3013. this.canAddTask = res.data.canAddTask
  3014. this.canEditStageList = res.data.canEditStageList
  3015. this.timess() // 处理时间的方法
  3016. } else {
  3017. this.$message({
  3018. message: res.msg,
  3019. type: "error"
  3020. });
  3021. }
  3022. },
  3023. error => {
  3024. this.$message({
  3025. message: error,
  3026. type: "error"
  3027. });
  3028. });
  3029. },
  3030. timess(){
  3031. // console.log('timess');
  3032. var date = new Date()
  3033. let Y = date.getFullYear()
  3034. let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
  3035. let D = date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate()
  3036. this.times = `${Y}-${M}-${D}`
  3037. },
  3038. addStagePost() {
  3039. console.log('新增任务列表');
  3040. let param = JSON.parse(JSON.stringify(this.stageForm));
  3041. param.taskList = [];
  3042. this.http.post('/stages/save',param,
  3043. res => {
  3044. if (res.code == "ok") {
  3045. this.addStageDialog = false;
  3046. this.stageList = res.data;
  3047. } else {
  3048. this.$message({
  3049. message: res.msg,
  3050. type: "error"
  3051. });
  3052. }
  3053. },
  3054. error => {
  3055. this.$message({
  3056. message: error,
  3057. type: "error"
  3058. });
  3059. });
  3060. },
  3061. addStage() {
  3062. this.addStageDialog = true;
  3063. this.stageForm = {groupId: this.selectedGroup.id, projectId: this.curProjectId, stagesTime: 0};
  3064. },
  3065. viewChange(index, indexPath) {
  3066. this.groupType = 1;
  3067. this.order = "create_date";
  3068. this.isDesc = true;
  3069. this.selectedGroup = this.viewList.filter(g=>g.id == index)[0];
  3070. this.getViewTaskList();
  3071. this.displayTable = true;
  3072. this.taskListPage = 1
  3073. } ,
  3074. groupChange(index, indexPath) {
  3075. console.log('店家了')
  3076. this.groupType = 0;
  3077. this.order = "seq";
  3078. this.isDesc = false;
  3079. this.selectedGroup = this.groupList.filter(g=>g.id == index)[0];
  3080. this.groupResponsibleId = this.selectedGroup.inchargerId
  3081. this.getStageList();
  3082. this.displayTable = false;
  3083. this.$forceUpdate()
  3084. },
  3085. //本地搜索组
  3086. startSearchGroup() {
  3087. if (this.groupSearch != null || this.groupSearch.length > 0) {
  3088. this.groupList = this.allGroupData.filter(g=>g.name.indexOf(this.groupSearch) >= 0);
  3089. } else {
  3090. this.groupList = this.allGroupData;
  3091. }
  3092. },
  3093. editIncharger(item) {
  3094. this.groupForm = JSON.parse(JSON.stringify(item));
  3095. this.setInchargerDialog = true;
  3096. },
  3097. setManDay() {
  3098. this.modGroupManDayKey++
  3099. // this.groupForm = JSON.parse(JSON.stringify(item));
  3100. this.modGroupManDayDialog = true;
  3101. },
  3102. renameGroup(item) {
  3103. this.groupForm = JSON.parse(JSON.stringify(item));
  3104. this.modGroupDialog = true;
  3105. },
  3106. deleteGroup(item) {
  3107. var _this = this;
  3108. this.$confirm(this.$t('tasksgroupsDetalses'), this.$t('other.prompts'), {
  3109. type: 'warning'
  3110. }).then(() => {
  3111. this.http.post('/task-group/delete',item,
  3112. res => {
  3113. if (res.code == "ok") {
  3114. this.groupList = res.data;
  3115. if (item.id == this.selectedGroup.id) {
  3116. //之前选中的分组被删除了
  3117. if (this.groupList.length > 0) {
  3118. this.defaultGroupId = this.groupList[0].id;
  3119. this.selectedGroup = this.groupList[0];
  3120. this.groupChange(this.defaultGroupId)
  3121. } else {
  3122. this.selectedGroup = {};
  3123. }
  3124. }
  3125. } else {
  3126. this.$message({
  3127. message: res.msg,
  3128. type: "error"
  3129. });
  3130. }
  3131. },
  3132. error => {
  3133. this.$message({
  3134. message: error,
  3135. type: "error"
  3136. });
  3137. });
  3138. });
  3139. },
  3140. getGroupDetails(obj) {
  3141. this.http.post('/task-group/detail',{
  3142. groupId: obj.id
  3143. },
  3144. res => {
  3145. if (res.code == "ok") {
  3146. this.groupDetailsShow = true
  3147. this.groupDetailData = res.data
  3148. this.groupDetailTil = obj.name + ' - '+this.$t('groupdetails')
  3149. } else {
  3150. this.$message({
  3151. message: res.msg,
  3152. type: "error"
  3153. });
  3154. }
  3155. },
  3156. error => {
  3157. this.$message({
  3158. message: error,
  3159. type: "error"
  3160. });
  3161. });
  3162. },
  3163. addTemplateGroup() {
  3164. // var param = JSON.parse(JSON.stringify(this.groupTemplateList.filter(g=>g.selected)[0]));
  3165. // delete param.stagesList;
  3166. // param.projectId = this.curProjectId;
  3167. // var k = this.groupTemplateList[this.sidebarIndex].name
  3168. // var s = null;
  3169. // var xmz = this.groupList.forEach(function(a, b, c){
  3170. // if (a.name == k) {
  3171. // s = true
  3172. // return
  3173. // }
  3174. // })
  3175. // if (s){
  3176. // this.addGroupDialog = false;
  3177. // this.$message({
  3178. // message: '当前项目已存在分组['+k+'],请修改组名后重试。',
  3179. // type: "error"
  3180. // });
  3181. // return
  3182. // }
  3183. var param = JSON.parse(JSON.stringify(this.groupTemplateList.filter(g=>g.selected)))
  3184. console.log(param, '你看看啊')
  3185. for(var i in param) {
  3186. delete param[i].stagesList
  3187. }
  3188. if(param.length < 1) {
  3189. this.$message({
  3190. message: this.$t('qngxuanz'),
  3191. type: "error"
  3192. });
  3193. return
  3194. }
  3195. console.log(this.groupList)
  3196. var s = null
  3197. var k = ''
  3198. var xmz = this.groupList.forEach(function(a, b, c){
  3199. param.forEach((g, i) =>{
  3200. if(a.name == g.name) {
  3201. s = true
  3202. k = g.name
  3203. return
  3204. }
  3205. })
  3206. })
  3207. if (s){
  3208. this.addGroupDialog = false;
  3209. this.$message({
  3210. message: this.$t('projectalreadyhasgroup')+'['+k+'],'+this.$t('changethegroupname'),
  3211. type: "error"
  3212. });
  3213. return
  3214. }
  3215. console.log('将要闯过去的值', param)
  3216. // return
  3217. // this.http.post('/task-group/createFromTemplate',param,
  3218. this.http.post('/task-group/createFromTemplate',{
  3219. templateJson: JSON.stringify(param),
  3220. projectId: this.curProjectId
  3221. },
  3222. res => {
  3223. if (res.code == "ok") {
  3224. this.selectedGroup = res.data
  3225. this.sleectId = res.data.id
  3226. this.sleectProjectId = res.data.projectId
  3227. this.addGroupDialog = false;
  3228. // this.getTaskGroups();
  3229. this.getTaskGroup();
  3230. } else {
  3231. this.$message({
  3232. message: res.msg,
  3233. type: "error"
  3234. });
  3235. }
  3236. },
  3237. error => {
  3238. this.$message({
  3239. message: error,
  3240. type: "error"
  3241. });
  3242. });
  3243. },
  3244. setManDayData() {
  3245. this.http.post('/task-group/saveManDay',{data:JSON.stringify(this.groupList)},
  3246. res => {
  3247. if (res.code == "ok") {
  3248. this.modGroupManDayDialog = false;
  3249. const { companyId } = JSON.parse(sessionStorage.getItem("user"))
  3250. console.log(companyId)
  3251. if(companyId == '3092') {
  3252. res.data.forEach(item => {
  3253. item.disabled = Boolean(item.manDay);
  3254. });
  3255. this.groupList = res.data;
  3256. } else {
  3257. this.groupList = res.data;
  3258. }
  3259. console.log(this.groupList, '返回的值')
  3260. } else {
  3261. this.$message({
  3262. message: res.msg,
  3263. type: "error"
  3264. });
  3265. }
  3266. },
  3267. error => {
  3268. this.$message({
  3269. message: error,
  3270. type: "error"
  3271. });
  3272. });
  3273. },
  3274. // 重新定义了 addGroup 方法
  3275. addGroup(formName) {
  3276. // return
  3277. this.$refs[formName].validate((valid) => {
  3278. if (valid) {
  3279. this.http.post('/task-group/save',this.groupForm,
  3280. res => {
  3281. if (res.code == "ok") {
  3282. this.groupList = res.data;
  3283. this.addGroupDialog = false;
  3284. this.modGroupDialog = false;
  3285. if (this.selectedGroup.id !== this.groupForm.id) {
  3286. this.selectedGroup = this.groupList.filter(g=>g.new)[0];
  3287. }
  3288. this.defaultGroupId = this.groupList[this.groupList.length - 1].id
  3289. // this.getTaskGroup();
  3290. this.getStageList()
  3291. } else {
  3292. this.$message({
  3293. message: res.msg,
  3294. type: "error"
  3295. });
  3296. }
  3297. },
  3298. error => {
  3299. this.$message({
  3300. message: error,
  3301. type: "error"
  3302. });
  3303. });
  3304. } else {
  3305. console.log('error submit!!');
  3306. return false;
  3307. }
  3308. });
  3309. },
  3310. createGroup() {
  3311. this.addGroupDialog = true;
  3312. this.groupForm = {projectId: this.curProjectId};
  3313. },
  3314. getInsideData(action) {
  3315. var targetGpId = null;
  3316. if (action) {
  3317. targetGpId = action.split('-')[1];
  3318. }
  3319. this.getTaskGroups(targetGpId);
  3320. },
  3321. //加载项目内的任务分组
  3322. getTaskGroups(errorGroupId) {
  3323. this.http.post('/task-group/list',{projectId: this.curProjectId},
  3324. res => {
  3325. if (res.code == "ok") {
  3326. const { companyId } = this.user
  3327. this.allGroupData = res.data;
  3328. if(companyId == '3092') {
  3329. res.data.forEach(item => {
  3330. item.disabled = Boolean(item.manDay);
  3331. });
  3332. this.groupList = res.data;
  3333. } else {
  3334. this.groupList = res.data;
  3335. }
  3336. if (errorGroupId != null) {
  3337. //需要修正分组工时
  3338. this.setManDay();
  3339. }
  3340. console.log(this.groupList, '返回的数据')
  3341. console.log(this.groupList,'grouplist');
  3342. if (this.groupList.length > 0) {
  3343. this.defaultGroupId = this.groupList[0].id;
  3344. this.selectedGroup = this.groupList[0];
  3345. this.groupResponsibleId = this.groupList[0].inchargerId;
  3346. this.getUserConfig();
  3347. } else {
  3348. //清空任务列表
  3349. this.defaultGroupId = null;
  3350. this.selectedGroup = null;
  3351. this.stageList = [];
  3352. }
  3353. } else {
  3354. this.$message({
  3355. message: res.msg,
  3356. type: "error"
  3357. });
  3358. }
  3359. },
  3360. error => {
  3361. this.$message({
  3362. message: error,
  3363. type: "error"
  3364. });
  3365. });
  3366. },
  3367. // 获取用户配置
  3368. getUserConfig() {
  3369. this.http.post('/user-config/getUserConfig',{},
  3370. res => {
  3371. if (res.code == "ok") {
  3372. if(res.data != undefined){
  3373. if(res.data.hideCompletedTask == 0){
  3374. this.hideCompleted = false;
  3375. }else if(res.data.hideCompletedTask == 1){
  3376. this.hideCompleted = true;
  3377. }
  3378. }
  3379. this.getStageList();
  3380. }
  3381. },
  3382. error => {
  3383. this.$message({
  3384. message: error,
  3385. type: "error"
  3386. });
  3387. });
  3388. },
  3389. //更改隐藏已完成任务选项
  3390. editHideTask() {
  3391. this.getStageList();
  3392. var hideSwitch;
  3393. if(this.hideCompleted == false){
  3394. hideSwitch = 0;
  3395. }else if(this.hideCompleted == true){
  3396. hideSwitch = 1;
  3397. }
  3398. this.http.post('/user-config/editUserConfig',{hideCompletedTask: hideSwitch},
  3399. res => {
  3400. },
  3401. error => {
  3402. this.$message({
  3403. message: error,
  3404. type: "error"
  3405. });
  3406. });
  3407. },
  3408. // 额外加的
  3409. getTaskGroup() {
  3410. this.http.post('/task-group/list',{projectId: this.curProjectId},
  3411. res => {
  3412. if (res.code == "ok") {
  3413. this.allGroupData = res.data;
  3414. this.groupList = res.data;
  3415. if (this.groupList.length > 0) {
  3416. this.defaultGroupId = this.sleectId;
  3417. this.selectedGroup = this.groupList[res.data.length - 1];
  3418. this.getStageList();
  3419. } else {
  3420. //清空任务列表
  3421. this.defaultGroupId = null;
  3422. this.selectedGroup = null;
  3423. this.stageList = [];
  3424. }
  3425. } else {
  3426. this.$message({
  3427. message: res.msg,
  3428. type: "error"
  3429. });
  3430. }
  3431. },
  3432. error => {
  3433. this.$message({
  3434. message: error,
  3435. type: "error"
  3436. });
  3437. });
  3438. },
  3439. //切换项目
  3440. onProjectChange() {
  3441. let path = this.$route.path;
  3442. path = path.substring(0,path.lastIndexOf('/'))+'/'+this.curProjectId;
  3443. this.$router.push(path);
  3444. this.getTaskGroups();
  3445. this.getDetail()
  3446. this.$refs.fileCenter.refreshPage();
  3447. this.$refs.projectInfo.refreshPage();
  3448. this.$refs.summary.refreshPage();
  3449. this.$refs.costbaseline.refreshPage();
  3450. // this.$refs.earning.refreshPage();
  3451. if(this.user.companyId == '936') {
  3452. this.$refs.projectInfo.getKeyNodes()
  3453. }
  3454. },
  3455. //获取我的项目列表
  3456. getMyProjectList() {
  3457. this.http.post('/project/getProjectList', {
  3458. },
  3459. res => {
  3460. if (res.code == "ok") {
  3461. this.projectList = res.data;
  3462. console.log('getprojectlist',res.data);
  3463. } else {
  3464. this.$message({
  3465. message: res.msg,
  3466. type: "error"
  3467. });
  3468. }
  3469. },
  3470. error => {
  3471. this.$message({
  3472. message: error,
  3473. type: "error"
  3474. });
  3475. });
  3476. },
  3477. menuSelect() {
  3478. },
  3479. toList() {
  3480. this.$router.push("/list");
  3481. },
  3482. searchList() {
  3483. this.page = 1;
  3484. this.getList();
  3485. },
  3486. //显示用户详情
  3487. showUser(userId) {
  3488. this.userDetailVisible = true;
  3489. this.http.post(this.port.manage.userDetail, {
  3490. userId: userId
  3491. },
  3492. res => {
  3493. if (res.code == "ok") {
  3494. this.userDetail = res.data;
  3495. } else {
  3496. this.$message({
  3497. message: res.msg,
  3498. type: "error"
  3499. });
  3500. }
  3501. },
  3502. error => {
  3503. this.$message({
  3504. message: error,
  3505. type: "error"
  3506. });
  3507. });
  3508. },
  3509. getUsers() {
  3510. // this.http.post(this.port.manage.list, {
  3511. // departmentId: -1,
  3512. // pageIndex: 1,
  3513. // pageSize: -1
  3514. // },
  3515. this.http.post('/user/getSimpleActiveUserList', {},
  3516. res => {
  3517. if (res.code == "ok") {
  3518. this.users = res.data;
  3519. } else {
  3520. this.$message({
  3521. message: res.msg,
  3522. type: "error"
  3523. });
  3524. }
  3525. },
  3526. error => {
  3527. this.$message({
  3528. message: error,
  3529. type: "error"
  3530. });
  3531. });
  3532. },
  3533. //获取项目列表
  3534. getList() {
  3535. this.listLoading = true;
  3536. this.http.post(this.port.project.listPage, {
  3537. pageIndex: this.page,
  3538. pageSize: this.size,
  3539. keyword:this.keyword,
  3540. searchField: this.searchField,
  3541. },
  3542. res => {
  3543. this.listLoading = false;
  3544. if (res.code == "ok") {
  3545. var list = res.data.records;
  3546. for(var i in list) {
  3547. var participator = list[i].participator , str = "";
  3548. for(var j in participator) {
  3549. if(j == participator.length-1) {
  3550. str += participator[j].name
  3551. } else {
  3552. str += participator[j].name + ','
  3553. }
  3554. }
  3555. list[i].userNames = str;
  3556. }
  3557. this.list = list;
  3558. this.total = res.data.total;
  3559. } else {
  3560. this.$message({
  3561. message: res.msg,
  3562. type: "error"
  3563. });
  3564. }
  3565. },
  3566. error => {
  3567. this.listLoading = false;
  3568. this.$message({
  3569. message: error,
  3570. type: "error"
  3571. });
  3572. });
  3573. },
  3574. submitInsert() {
  3575. if (this.textContent !== true) return this.$message({
  3576. showClose: true,
  3577. message: this.$t('pictureistoolargepleaseuploaditagain'),
  3578. type: 'warning'
  3579. });
  3580. //检查是有重名的执行人
  3581. var exeList = this.addForm.executorListFront;
  3582. // for(let i=0;i<this.gstimhour.length;i++){
  3583. // exeList[i].planHours = this.gstimhour[i]
  3584. // }
  3585. for (var i=0;i<exeList.length;i++) {
  3586. var findSameUser = false;
  3587. exeList[i].planHours = this.gstimhour[i]
  3588. for (var j=i+1;j<exeList.length; j++) {
  3589. if (exeList[i].executorId && exeList[j].executorId && exeList[i].executorId == exeList[j].executorId) {
  3590. findSameUser = true;
  3591. break;
  3592. }
  3593. }
  3594. if (findSameUser) {
  3595. return this.$message({
  3596. showClose: true,
  3597. message: this.$t('executorhasduplication'),
  3598. type: 'error'
  3599. });
  3600. }
  3601. }
  3602. if(this.addForm.startDate && this.addForm.endDate) {
  3603. if(this.addForm.endDate < this.addForm.startDate) {
  3604. return this.$message({
  3605. showClose: true,
  3606. message: this.$t('ren-wu-jie-zhi-shi-jian-bu-neng-xiao-yu-kai-shi-shi-jian'),
  3607. type: 'error'
  3608. });
  3609. }
  3610. }
  3611. this.$refs.form1.validate(valid => {
  3612. if (valid) {
  3613. delete this.addForm.subTaskList;
  3614. delete this.addForm.refTaskList;
  3615. delete this.addForm.progress;
  3616. //去掉没有执行人的.(因为要有计划工时,执行人可以暂不设置)
  3617. // this.addForm.executorListFront = this.addForm.executorListFront.filter(exe=>exe.executorId);
  3618. this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
  3619. this.addLoading = true;
  3620. this.http.post('/task/save',this.addForm,
  3621. res => {
  3622. this.addLoading = false;
  3623. if (res.code == "ok") {
  3624. this.$message({
  3625. message: this.$t('message.submittedSuccessfully'),
  3626. type: "success"
  3627. });
  3628. if (this.addForm.parentTid == null) {
  3629. this.addFormVisible = false;
  3630. if (this.groupType == 0) {
  3631. this.getStageList();
  3632. } else {
  3633. this.getViewTaskList();
  3634. }
  3635. } else {
  3636. this.backToParentTask();
  3637. }
  3638. } else {
  3639. this.$message({
  3640. message: res.msg,
  3641. type: "error"
  3642. });
  3643. }
  3644. },
  3645. error => {
  3646. this.$message({
  3647. message: error,
  3648. type: "error"
  3649. });
  3650. }
  3651. );
  3652. }
  3653. });
  3654. },
  3655. DateChange(){
  3656. if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
  3657. let stdate = Date.parse(this.addForm.startDate)
  3658. let eddate = Date.parse(this.addForm.endDate)
  3659. if(stdate <= eddate){
  3660. let days = (eddate - stdate) / (1*24*60*60*1000) + 1
  3661. for (let i=0;i<this.gstimday.length;i++) {
  3662. this.gstimday[i] = days
  3663. this.gstimhour[i] = days * this.user.timeType.allday
  3664. }
  3665. this.$forceUpdate()
  3666. }
  3667. // console.log("gstimday",this.gstimday);
  3668. }
  3669. },
  3670. // 删除
  3671. deletePro(i, item) {
  3672. this.$confirm(this.$t('identifytheproject') + item.projectName + this.$t('ma'),this.$t('deletetheproject'), {
  3673. confirmButtonText: this.$t('btn.determine'),
  3674. cancelButtonText: this.$t('btn.cancel'),
  3675. type: "warning"
  3676. })
  3677. .then(() => {
  3678. this.listLoading = true;
  3679. this.http.post(this.port.project.delete,{
  3680. id: item.id
  3681. },
  3682. res => {
  3683. this.listLoading = false;
  3684. if (res.code == "ok") {
  3685. this.$message({
  3686. message: this.$t('message.successfullyDeleted'),
  3687. type: "success"
  3688. });
  3689. this.getList();
  3690. } else {
  3691. this.$message({
  3692. message: res.msg,
  3693. type: "error"
  3694. });
  3695. }
  3696. },
  3697. error => {
  3698. this.listLoading = false;
  3699. this.$message({
  3700. message: error,
  3701. type: "error"
  3702. });
  3703. }
  3704. );
  3705. })
  3706. .catch(() => {});
  3707. },
  3708. detail(i) {
  3709. this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
  3710. },
  3711. getDetail() {
  3712. this.http.post('/project/detail',{
  3713. id: this.curProjectId
  3714. },
  3715. res => {
  3716. if (res.code == "ok") {
  3717. this.currentProject = res.data;
  3718. this.getjurisdictionIds(this.currentProject)
  3719. this.joinMembList = this.currentProject.participationList;
  3720. this.isManageDept = this.currentProject.manageDept;
  3721. } else {
  3722. }
  3723. },
  3724. error => {
  3725. this.$message({
  3726. message: error,
  3727. type: "error"
  3728. });
  3729. }
  3730. );
  3731. },
  3732. getjurisdictionIds(pro){
  3733. console.log('pro',pro.creatorId);
  3734. this.projectCreatorId = pro.creatorId
  3735. this.projectInchargerId = pro.inchargerId
  3736. },
  3737. // 自定义组件事件
  3738. selectCal(obj) {
  3739. if(obj.distinction == '1') {
  3740. this.addForm.executorListFront[obj.index].executorId = obj.id
  3741. } else if(obj.distinction == '2') {
  3742. this.groupForm.inchargerId = obj.id
  3743. }
  3744. },
  3745. // 企业微信搜索
  3746. echartDepartment() {
  3747. if(this.participantsFilterText != '') {
  3748. this.filterNodeFlag = true
  3749. this.http.post("/user/getEmployeeList", {
  3750. keyword: this.participantsFilterText,
  3751. cursor: '',
  3752. departmentId: -1,
  3753. pageIndex: 1,
  3754. pageSize: 1000
  3755. },
  3756. res => {
  3757. if (res.code == "ok") {
  3758. // var list = res.data.data;
  3759. // this.setUserToDept(list);
  3760. // this.deptMembData = list;
  3761. // this.$forceUpdate()
  3762. this.filterNodePersonnel = res.data.records.map(item => item.name)
  3763. this.$refs.chooseMembTree2.filter(this.participantsFilterText);
  3764. } else {
  3765. this.$message({
  3766. message: res.msg,
  3767. type: "error"
  3768. });
  3769. }
  3770. this.filterNodeFlag = false
  3771. },
  3772. error => {
  3773. this.filterNodeFlag = false
  3774. this.$message({
  3775. message: error,
  3776. type: "error"
  3777. });
  3778. });
  3779. }
  3780. },
  3781. setUserToDept(list) {
  3782. for (var i in list) {
  3783. if (list[i].children != null) {
  3784. this.setUserToDept(list[i].children);
  3785. }
  3786. if (list[i].userList != null) {
  3787. if (list[i].children == null) {
  3788. list[i].children = [];
  3789. }
  3790. list[i].userList.forEach(element => {
  3791. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  3792. list[i].children.push(obj);
  3793. });
  3794. }
  3795. }
  3796. }
  3797. },
  3798. created() {
  3799. let height = window.innerHeight;
  3800. this.tableHeight = height - 135;
  3801. this.stageListHeight = this.tableHeight - 45;
  3802. this.taskListinH = this.stageListHeight - 75;
  3803. const that = this;
  3804. window.onresize = function temp() {
  3805. that.tableHeight = window.innerHeight - 135;
  3806. that.stageListHeight = that.tableHeight - 45;
  3807. that.taskListinH = that.stageListHeight - 75;
  3808. };
  3809. setTimeout(function(){
  3810. that.componentFlg = true
  3811. }, 1000)
  3812. },
  3813. mounted() {
  3814. this.curProjectId = parseInt(this.$route.params.id);
  3815. this.activeName = this.$route.path.split("/")[1];
  3816. this.getDetail();
  3817. this.getUsers();
  3818. this.getMyProjectList();
  3819. console.log('action==params='+sessionStorage.action);
  3820. var action = sessionStorage.action
  3821. this.getInsideData(action);
  3822. sessionStorage.removeItem('action');
  3823. this.getGroupTemplate();
  3824. }
  3825. };
  3826. </script>
  3827. <style lang="scss" scoped>
  3828. .hideCompletedFelx {
  3829. display: flex;
  3830. align-items: center;
  3831. justify-content: flex-end;
  3832. }
  3833. .Daily p {
  3834. margin: 0 !important;
  3835. padding: 0 0 10px 0 !important;
  3836. }
  3837. .sub-all {
  3838. div {
  3839. display: inline-block;
  3840. padding: 0 20px;
  3841. font-size: 20px;
  3842. cursor: pointer;
  3843. }
  3844. .subOn {
  3845. color: #66b1ff;
  3846. }
  3847. }
  3848. .DailyBody {
  3849. margin: 0 20px;
  3850. }
  3851. .Daily{
  3852. height: 120%;
  3853. overflow: auto;
  3854. }
  3855. </style>
  3856. <style >
  3857. .taskCardCircleBox{
  3858. padding-left: 5px;
  3859. display: flex;
  3860. justify-content: left;
  3861. align-items: center;
  3862. }
  3863. .flip-list-move {
  3864. transition: transform 0.5s;
  3865. }
  3866. .no-move {
  3867. transition: transform 0s;
  3868. }
  3869. .taskStage {
  3870. margin:10px;
  3871. display:inline-block;
  3872. vertical-align:top;
  3873. width: 331px;
  3874. }
  3875. .taskList {
  3876. padding:7px;
  3877. width:331px;
  3878. }
  3879. .taskListin{
  3880. width: 317px;
  3881. overflow: auto;
  3882. }
  3883. .taskList .stage {
  3884. font-weight:bold;
  3885. display:block;
  3886. float:left;
  3887. width:260px;
  3888. overflow: auto;
  3889. }
  3890. .taskGroupClass {
  3891. width: 180px;
  3892. display: inline-block;
  3893. text-overflow: ellipsis;
  3894. overflow: hidden;
  3895. white-space: nowrap;
  3896. }
  3897. .taskCard {
  3898. background: #fff;
  3899. margin: 5px 0px;
  3900. padding:5px;
  3901. border: 1px solid #e6e6e6;
  3902. border-radius: 3px;
  3903. box-shadow: 3px 3px 3px #e6e6e6;
  3904. min-height:60px;
  3905. position: relative;
  3906. border-radius: 3px;
  3907. overflow: hidden;
  3908. width: 288px;
  3909. }
  3910. .taskImg {
  3911. position: absolute;
  3912. box-sizing: border-box;
  3913. width: 100%;
  3914. height: 100%;
  3915. top: 0;
  3916. left: 0;
  3917. }
  3918. .taskImg img{
  3919. position: absolute;
  3920. top: -1px;
  3921. }
  3922. .hong:hover {
  3923. border-top: 1px solid #ff0000;
  3924. }
  3925. .huang:hover {
  3926. border-top: 1px solid #ff9600;
  3927. }
  3928. .hui:hover {
  3929. border-top: 1px solid #c9c9c9;
  3930. }
  3931. .taskCard:hover {
  3932. cursor: move;
  3933. }
  3934. .chosen {
  3935. background-color: #000 !important;
  3936. color: #fff;
  3937. }
  3938. .ghost {
  3939. background-color: #fafafa !important;
  3940. }
  3941. .taskCard .cb {
  3942. margin-right:5px;
  3943. }
  3944. .item {
  3945. background:#fff;
  3946. }
  3947. .input-with-select .el-input-group__prepend {
  3948. background-color: #fff;
  3949. }
  3950. .el-tabs__item {
  3951. height:45px ;
  3952. }
  3953. .projectCls {
  3954. margin-left:10px;margin-right:10px;
  3955. }
  3956. .heavyTxt {
  3957. font-weight:bold;
  3958. }
  3959. .el-tabs__nav-wrap::after {
  3960. height:0.5px;
  3961. }
  3962. .user_name_icon {
  3963. text-align: right;
  3964. border-radius: 50%;
  3965. color: #fff;
  3966. float: right;
  3967. font-size: 10px;
  3968. width: 30px;
  3969. height: 30px;
  3970. line-height: 30px;
  3971. transform: scale(.8);
  3972. overflow: hidden;
  3973. letter-spacing: 1px;
  3974. box-sizing: border-box;
  3975. padding-right: 1.5px;
  3976. direction: rtl;
  3977. letter-spacing: 1.5px;
  3978. }
  3979. .task_name {
  3980. color:#262626;
  3981. display:inline-block;
  3982. max-width: 235px;
  3983. height: 25px;
  3984. overflow: hidden;
  3985. white-space: nowrap;
  3986. text-overflow: ellipsis;
  3987. }
  3988. .task_name span{
  3989. position: relative;
  3990. top: 8px;
  3991. }
  3992. .cb {
  3993. position: relative;
  3994. top: -2px;
  3995. }
  3996. .group_style {
  3997. border-radius: 5px;margin:2px 0px 2px 0px;height:40px;line-height:40px;
  3998. }
  3999. .el-tabs__nav-wrap::after {
  4000. height:1px;
  4001. }
  4002. .el-tabs__header {
  4003. margin:0 !important;
  4004. }
  4005. .single_line {
  4006. overflow: hidden;text-overflow:ellipsis;white-space: nowrap;
  4007. }
  4008. .sub_task_num {
  4009. font-size:10px;
  4010. color:#666;
  4011. }
  4012. .template_box {
  4013. margin:20px 0px;
  4014. }
  4015. /* 项目阶段侧边栏样式 */
  4016. .sidebar {
  4017. width: 2px;
  4018. background: #dddddd;
  4019. position: relative;
  4020. }
  4021. .sidebar:hover {
  4022. background: #20a0ff;
  4023. }
  4024. .sidebar:hover .etui {
  4025. background: #20a0ff;
  4026. border: #20a0ff;
  4027. color: #fff;
  4028. }
  4029. .etui {
  4030. width: 15px;
  4031. height: 40px;
  4032. background: #fff;
  4033. border: 1px solid #dddddd;
  4034. position: absolute;
  4035. top: 50%;
  4036. left: 0%;
  4037. transform: translate(6%, -50%);
  4038. color: rgb(192, 191, 191);
  4039. box-sizing: border-box;
  4040. }
  4041. .etui i {
  4042. display: inline-block;
  4043. padding-top: 90%;
  4044. /* padding-left: 15%; */
  4045. font-weight: bold;
  4046. }
  4047. /* bug问题 */
  4048. .task {
  4049. box-sizing: border-box;
  4050. padding-left: 10px;
  4051. padding-right: 5px;
  4052. }
  4053. /* 评论部分 */
  4054. .remark {
  4055. width: 500px;
  4056. height: 100%;
  4057. background: #fff;
  4058. position: absolute;
  4059. top: 0;
  4060. right: -500px;
  4061. border-left: 3px solid #dddddd;
  4062. }
  4063. .jm {
  4064. margin-left: -500px;
  4065. }
  4066. .bj {
  4067. float: left;
  4068. width: 90%;
  4069. overflow: hidden;
  4070. height: 65px;
  4071. white-space: nowrap;
  4072. text-overflow: ellipsis;
  4073. }
  4074. .bj span {
  4075. width: 50px;
  4076. height: 50px;
  4077. display: inline-block;
  4078. border-radius: 50%;
  4079. color: #fff;
  4080. text-align: center;
  4081. float: left;
  4082. margin-right: 20px;
  4083. /* margin-top: 10px; */
  4084. line-height: 50px;
  4085. }
  4086. .player {
  4087. height: 15%;
  4088. box-sizing: border-box;
  4089. padding-left: 15px;
  4090. border-bottom: 1px solid #dddddd;
  4091. }
  4092. .player p {
  4093. margin: 0;
  4094. padding: 2% 0;
  4095. font-size: 18px;
  4096. }
  4097. .player .el-image {
  4098. border-radius: 50%;
  4099. margin-right: 10px;
  4100. }
  4101. .subject {
  4102. height: 60%;
  4103. box-sizing: border-box;
  4104. }
  4105. .sub-all {
  4106. font-size: 20px;
  4107. padding: 15px 0 15px 15px;
  4108. }
  4109. .sub-details {
  4110. width: 100%;
  4111. height: 38vh;
  4112. padding-right: 15px;
  4113. box-sizing: border-box;
  4114. overflow: hidden;
  4115. overflow-y: scroll
  4116. }
  4117. .sub-details li {
  4118. list-style:none
  4119. }
  4120. /* 红色背景显示日期 */
  4121. .element_span {
  4122. display: inline-block;
  4123. background: #e62412;
  4124. color: #fff;
  4125. border-radius: 3px;
  4126. padding: 3px;
  4127. /* text-align: center; */
  4128. font-size: 12px;
  4129. margin-left: 5px;
  4130. }
  4131. .pro_btn{
  4132. display: inline-block;
  4133. float: right;
  4134. }
  4135. </style>
  4136. <style lang="scss" scoped>
  4137. .counli {
  4138. em {
  4139. font-style: normal;
  4140. display: inline-block;
  4141. margin-left: 9%;
  4142. }
  4143. span {
  4144. float: right;
  4145. }
  4146. }
  4147. .carts {
  4148. position: relative;
  4149. .el-image{
  4150. border-radius: 50%;
  4151. float: left;
  4152. width: 20%;
  4153. }
  4154. i {
  4155. width: 30px;
  4156. height: 30px;
  4157. // background: #778899;
  4158. display: inline-block;
  4159. float: left;
  4160. border-radius:50%;
  4161. font-style:normal;
  4162. font-size: 12px;
  4163. line-height: 30px;
  4164. text-align: center;
  4165. color: #fff;
  4166. background: #778899;
  4167. overflow: hidden;
  4168. direction: rtl;
  4169. }
  4170. div {
  4171. text-align: left;
  4172. p {
  4173. text-align: left;
  4174. margin-left: 10px;
  4175. margin-left: 13%;
  4176. }
  4177. em {
  4178. display: block;
  4179. font-style: normal;
  4180. margin-left: 13%;
  4181. }
  4182. }
  4183. span {
  4184. font-size: 10px;
  4185. float: right;
  4186. margin-top: -40px;
  4187. }
  4188. }
  4189. .issue {
  4190. // height: 20%;
  4191. // position: relative;
  4192. // z-index: 4;
  4193. .zh{
  4194. position: relative;
  4195. width: 100%;
  4196. height: 100%;
  4197. }
  4198. .textareays {
  4199. background: #000;
  4200. height: 140px;
  4201. border: 0;
  4202. .el-textarea__inner {
  4203. height: 85%;
  4204. }
  4205. }
  4206. .issue-button {
  4207. position: absolute;
  4208. bottom: 20px;
  4209. right: 20px;
  4210. }
  4211. }
  4212. .inputDeep {
  4213. position: absolute;
  4214. bottom: 85px;
  4215. width: 95%;
  4216. margin: 0 12px;
  4217. }
  4218. .inputDeep .el-textarea .el-textarea__inner{
  4219. border: 0 !important;
  4220. resize: none !important;
  4221. }
  4222. .inputDeeps .el-textarea__inner {
  4223. border: 0 !important;
  4224. resize: none !important;
  4225. }
  4226. .scop_span {
  4227. display: inline-block;
  4228. padding: 2px 5px;
  4229. }
  4230. </style>
  4231. <style>
  4232. .ql-snow .ql-picker.ql-size .ql-picker-label::before,
  4233. .ql-snow .ql-picker.ql-size .ql-picker-item::before {
  4234. content: "14px" !important;
  4235. position: relative;
  4236. top: -8px;
  4237. }
  4238. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
  4239. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
  4240. content: "10px" !important;
  4241. }
  4242. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
  4243. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
  4244. content: "18px" !important;
  4245. }
  4246. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
  4247. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
  4248. content: "32px" !important;
  4249. }
  4250. .ql-snow .ql-picker.ql-header .ql-picker-label::before,
  4251. .ql-snow .ql-picker.ql-header .ql-picker-item::before {
  4252. content: "文本" !important;
  4253. position: relative;
  4254. top: -8px;
  4255. }
  4256. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
  4257. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
  4258. content: "标题1" !important;
  4259. }
  4260. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
  4261. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
  4262. content: "标题2" !important;
  4263. }
  4264. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
  4265. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
  4266. content: "标题3" !important;
  4267. }
  4268. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
  4269. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
  4270. content: "标题4" !important;
  4271. }
  4272. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
  4273. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
  4274. content: "标题5" !important;
  4275. }
  4276. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
  4277. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
  4278. content: "标题6" !important;
  4279. }
  4280. .ql-snow .ql-picker.ql-font .ql-picker-label::before,
  4281. .ql-snow .ql-picker.ql-font .ql-picker-item::before {
  4282. content: "标准字体" !important;
  4283. }
  4284. .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
  4285. .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
  4286. content: "衬线字体" !important;
  4287. }
  4288. .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
  4289. .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
  4290. content: "等宽字体" !important;
  4291. }
  4292. /* .ql-picker-label {
  4293. position: relative;
  4294. } */
  4295. .ql-picker-label svg {
  4296. position: relative;
  4297. top: -6px;
  4298. }
  4299. /* 任务进展 */
  4300. .progress {
  4301. border: 1px solid #ddd;
  4302. border-radius: 5px;
  4303. width: 100%;
  4304. box-sizing: border-box;
  4305. padding: 15px;
  4306. position: relative;
  4307. margin-bottom: 20px;
  4308. }
  4309. .remind {
  4310. width: 95px;
  4311. height: 60%;
  4312. overflow-y:auto;
  4313. position: absolute;
  4314. background: #fff;
  4315. padding: 10px;
  4316. left: 0;
  4317. top: 0;
  4318. border: 1px solid #ddd;
  4319. z-index: 999999;
  4320. }
  4321. .rala1 .el-radio__input.is-checked + .el-radio__label {
  4322. color: #43d14f !important;
  4323. }
  4324. .rala1 .el-radio__input.is-checked .el-radio__inner {
  4325. background: #43d14f !important;
  4326. border-color: #43d14f !important;
  4327. }
  4328. .rala2 .el-radio__input.is-checked + .el-radio__label {
  4329. color: #fd7624 !important;
  4330. }
  4331. .rala2 .el-radio__input.is-checked .el-radio__inner {
  4332. background: #fd7624 !important;
  4333. border-color: #fd7624 !important;
  4334. }
  4335. .rala3 .el-radio__input.is-checked + .el-radio__label {
  4336. color: #fd4d47 !important;
  4337. }
  4338. .rala3 .el-radio__input.is-checked .el-radio__inner {
  4339. background: #fd4d47 !important;
  4340. border-color: #fd4d47 !important;
  4341. }
  4342. /* 任务进展列表 */
  4343. .elCard {
  4344. width: 100%;
  4345. padding: 15px;
  4346. box-sizing: border-box;
  4347. border: 1px solid #EBEEF5;
  4348. }
  4349. .elCard_qu {
  4350. float: right;
  4351. margin-right: 15px;
  4352. }
  4353. .integrity {
  4354. padding: 15px;
  4355. overflow-y: auto;
  4356. max-height: 300px;
  4357. }
  4358. .write {
  4359. float: right;
  4360. color: #1B9AEE;
  4361. }
  4362. .ssp {
  4363. position: absolute;
  4364. right: 140px;
  4365. top: 95px;
  4366. width: 66%;
  4367. height: 80%;
  4368. }
  4369. .examine {
  4370. width: 100%;
  4371. text-align: center;
  4372. }
  4373. .nones {
  4374. width: 100%;
  4375. height: 50px;
  4376. text-align: center;
  4377. color: #909399;
  4378. line-height: 50px;
  4379. border-top: 1px solid #EBEEF5;
  4380. border-bottom: 1px solid #EBEEF5;
  4381. font-size: 16px;
  4382. }
  4383. .icon {
  4384. /* color: rgb(67, 209, 79); */
  4385. display: block;
  4386. width: 12px;
  4387. height: 12px;
  4388. background: #fff;
  4389. position: absolute;
  4390. top: 0;
  4391. left: -33px;
  4392. border-radius: 50%;
  4393. border: 4px solid;
  4394. }
  4395. /* ddl */
  4396. .ddl {
  4397. height: 136px;
  4398. overflow: hidden;
  4399. border: 1px solid #EBEEF5
  4400. }
  4401. .tb{
  4402. position: relative;
  4403. }
  4404. .dpl{
  4405. position: absolute;
  4406. font-size: 20px;
  4407. left: -32px;
  4408. top: 0px;
  4409. }
  4410. </style>