projectInside.vue 220 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497
  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(item)" 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. <ww-open-data type='userName' :openid='groupDetailData.incharger'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
  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. <ww-open-data type='userName' :openid='exeItem'></ww-open-data>
  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" 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. <ww-open-data type='userName' :openid='item'></ww-open-data>
  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. <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
  365. </span>
  366. <span v-else>
  367. <ww-open-data type='userName' :openid='node.label'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item.name'></ww-open-data>
  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. <ww-open-data type='userName' :openid='recentProgressInfo.creatorName'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item'></ww-open-data>
  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. <ww-open-data type='userName' :openid='scope.row.creatorName'></ww-open-data>
  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. <ww-open-data type='userName' :openid='pl'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item.content.msg2'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item2.userName'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
  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. <ww-open-data type='departmentName' :openid='item2.auditDeptName'></ww-open-data>
  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. <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
  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. <ww-open-data type='userName' :openid='scope.row.executorName'></ww-open-data>
  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"><ww-open-data type='userName' :openid='userDetail.name'></ww-open-data></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"><ww-open-data type='departmentName' :openid='userDetail.departmentName'></ww-open-data></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="500px">
  1097. <el-table :data="groupList" size="small" :key="Math.random()" :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" :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>
  1107. <p style="text-align:center;">当前项目预估工时为:{{ currentProject.manDay == null? 0:currentProject.manDay }}人天</p>
  1108. <div slot="footer" class="dialog-footer">
  1109. <el-button type="primary" @click="setManDayData()" style="width:100%;" >{{ $t('save') }}</el-button>
  1110. </div>
  1111. </el-dialog>
  1112. <el-dialog title="预估工时变更" v-if="changeBudgetDig" :visible.sync="changeBudgetDig" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1113. <el-form :model="groupBudgetData" label-width="120px">
  1114. <el-form-item :label="'原预估工时'"><span>{{groupBudgetData.manDay}}{{ '人天' }}</span></el-form-item>
  1115. <el-form-item :label="'预估工时修改'" prop="changeManDay">
  1116. <el-input v-model="groupBudgetData.changeManDay" type="number" @change="changeNowManDay(groupBudgetData)" :placeholder="$t('peaseenterthe')" maxlength="10" :max="99999" style="width:120px;"></el-input>&nbsp;人天
  1117. </el-form-item>
  1118. <el-form-item :label="'变更后预估工时'"><span>{{nowManDay}}{{'人天'}}</span></el-form-item>
  1119. </el-form>
  1120. <div slot="footer" class="dialog-footer">
  1121. <el-button @click.native="changeBudgetDig = false">{{ $t('btn.cancel') }}</el-button>
  1122. <el-button type="primary" @click="changeBudgetTrue(groupBudgetData)" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  1123. </div>
  1124. </el-dialog>
  1125. <el-dialog :title="$t('addtemplate')" v-if="addToTmpDialog" :visible.sync="addToTmpDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1126. <el-form ref="formTmp" :model="templateForm" :rules="rules" style="margin-top:10px;">
  1127. <el-form-item prop="name">
  1128. <el-input v-model="templateForm.name" :placeholder="$t('entertemplatename')" maxlength="12"
  1129. show-word-limit clearable></el-input>
  1130. <div>
  1131. <span style="margin-right:20px">{{ $t('sametimetosave') }}</span>
  1132. <el-checkbox v-model="templateForm.saveTask" :label="$t('other.task')"></el-checkbox>
  1133. <el-checkbox v-model="templateForm.saveMileStone" :label="$t('other.milestone')"></el-checkbox>
  1134. <el-checkbox v-model="templateForm.saveRisk" :label="$t('risk')"></el-checkbox>
  1135. <el-checkbox v-model="templateForm.automatically" :label="$t('suixiangmuzidongchuangjian')"></el-checkbox>
  1136. </div>
  1137. </el-form-item>
  1138. </el-form>
  1139. <div slot="footer" class="dialog-footer">
  1140. <el-button type="primary" @click="createTemplate" style="width:100%;" :loading="saveTemplateLoading">{{ $t('savetemplate') }}</el-button>
  1141. </div>
  1142. </el-dialog>
  1143. <!-- 新增任务列表弹出框 -->
  1144. <el-dialog :title="$t('modifyingtheTaskList')" v-if="addStageDialog" :visible.sync="addStageDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1145. <el-form ref="form2" :model="stageForm" :rules="rules2" >
  1146. <el-form-item prop="stagesName">
  1147. <el-input v-model="stageForm.stagesName" :placeholder="$t('pleaseenteratasklistname')" maxlength="60"
  1148. show-word-limit clearable>
  1149. <template slot="prepend">
  1150. <div style="width:90px">{{ $t('ren-wu-lie-biao-ming-cheng') }}</div>
  1151. </template></el-input>
  1152. <el-input v-if="user.timeType.stageHasEvtime == 1" id="stageForm_ysgs" v-model="stageForm.stagesTime" style="margin-top:5px" @keyup.native="restrictNumber('stageForm_ysgs')">
  1153. <template slot="prepend">
  1154. <div style="width:90px">{{ $t('yu-suan-gong-shi') }}<span>(h)</span></div>
  1155. </template>
  1156. </el-input>
  1157. </el-form-item>
  1158. </el-form>
  1159. <div slot="footer" class="dialog-footer">
  1160. <el-button type="primary" @click="addStagePost" style="width:100%;" >{{ $t('save') }}</el-button>
  1161. </div>
  1162. </el-dialog>
  1163. <!--导出数据条件选择 -->
  1164. <el-dialog :title="$t('workplanexport')" v-if="exportDialog" :visible.sync="exportDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1165. <el-form ref="form3" >
  1166. <el-form-item :label="$t('choosetype')">
  1167. <el-select v-model="exportTaskType" :placeholder="$t('typesof')" clearable style="width:350px;">
  1168. <el-option :label="$t('other.task')" value="0"></el-option>
  1169. <el-option :label="$t('other.milestone')" value="1"></el-option>
  1170. <el-option :label="$t('risk')" value="2"></el-option>
  1171. </el-select>
  1172. </el-form-item>
  1173. </el-form>
  1174. <div slot="footer" class="dialog-footer">
  1175. <el-button type="primary" @click="exportTask" style="width:100%;" :loading="loadingExport">{{ $t('export.export') }}</el-button>
  1176. </div>
  1177. </el-dialog>
  1178. <!--导入数据,下载模板 -->
  1179. <el-dialog :title="$t('wdorkplanimport')" v-if="importTaskDialog" :visible.sync="importTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  1180. <el-form ref="form4" >
  1181. <el-form-item :label="'1. '+$t('qing-xian-xia-zai-mo-ban-bing-tian-xie-hou-shang-chuan')" >
  1182. <el-link type="primary" :underline="false" href="./upload/项目任务导入模板.xlsx" :download="$t('projectTaskTemplate') + '.xlsx'">{{ $t('projecttasktemplatedownload') }}</el-link>
  1183. </el-form-item>
  1184. <!-- <el-form-item label="2. 选择要导入的任务列表" v-if="false">
  1185. <el-select v-model="importToStageId" placeholder="任务列表" style="width:350px;">
  1186. <el-option v-for="item in stageList" :label="item.stagesName" :value="item.id" :key="item.id"></el-option>
  1187. </el-select>
  1188. </el-form-item> -->
  1189. <div><span style="font-size:12px;color:#999;">{{ $t('faoesgfavsbxjs') }}</span></div>
  1190. </el-form>
  1191. <div slot="footer" class="dialog-footer">
  1192. <el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
  1193. <el-button type="primary" :underline="false" style="width:100%;" :loading="loadingExport">{{ $t('uoloadFiles') }}</el-button>
  1194. </el-upload>
  1195. </div>
  1196. </el-dialog>
  1197. </div>
  1198. </div>
  1199. </section>
  1200. </template>
  1201. <script>
  1202. // 自定义select组件
  1203. import selectCat from "@/components/select.vue"
  1204. import util from "../../common/js/util";
  1205. import draggable from 'vuedraggable';
  1206. import tinymce from 'tinymce/tinymce'
  1207. import 'tinymce/themes/silver/theme'
  1208. import 'tinymce/skins/ui/oxide/skin.css';
  1209. import FileCenter from './fileCenter.vue';
  1210. import ProjectInfo from './info.vue';
  1211. import Summary from './summary.vue';
  1212. import Earning from './earning.vue';
  1213. import CostBaseline from './CostBaseline.vue'
  1214. import taskComponent from "@/components/taskComponent.vue"
  1215. // import editor from '@tinymce/tinymce-vue'
  1216. // 富文本样式
  1217. import 'quill/dist/quill.core.css'
  1218. import 'quill/dist/quill.snow.css'
  1219. import 'quill/dist/quill.bubble.css'
  1220. // 导入富文本
  1221. import { quillEditor } from 'vue-quill-editor'
  1222. import { error } from 'dingtalk-jsapi';
  1223. import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
  1224. let id=1;
  1225. export default {
  1226. name: "two-list-headerslots",
  1227. display: "Two list header slot",
  1228. order: 14,
  1229. components: {
  1230. draggable,
  1231. // editor,
  1232. FileCenter,
  1233. ProjectInfo,
  1234. Summary,
  1235. CostBaseline,
  1236. Earning,
  1237. quillEditor, // 富文本
  1238. selectCat,
  1239. taskComponent
  1240. },
  1241. data() {
  1242. return {
  1243. modGroupManDayDialog: false,
  1244. isManageDept: false,
  1245. componentFlg: false,
  1246. mileageCup: false,
  1247. loadingExport : false,
  1248. saveTemplateLoading: false,
  1249. joinMembList:[],
  1250. setInchargerDialog: false,
  1251. recentProgressInfo:{},
  1252. addToTmpDialog:false,
  1253. templateForm:{},
  1254. importTaskDialog:false,
  1255. importToStageId:null,
  1256. exportDialog: false,
  1257. exportTaskType:null,
  1258. groupTemplateList:[],
  1259. createGroupWay:'new',
  1260. modGroupDialog:false,
  1261. subTaskVisible:false,
  1262. orderList:[{id:"seq",name:this.$t('manuallydragthesequence'),isDesc:false},{id:"create_date",name:this.$t('creationtimeisthelatest'),isDesc:true},
  1263. {id:"end_date",name:this.$t('deadlineisthelatest'),isDesc:true},
  1264. {id:"task_level",name:this.$t('highestpriority'),isDesc:true}],
  1265. order:"seq",
  1266. isDesc:false,
  1267. taskDataList:[],
  1268. displayTable: false,
  1269. 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')},
  1270. {id:5,name:this.$t('createdthetask')},{id:6,name:this.$t('missionIwason')},{id:7,name:this.$t('todaytask')},{id:8,name:this.$t('taskthatisoverdue')}],
  1271. importanceList:[{id:0,name:this.$t('yi-ban')},{id:1,name:this.$t('zhong-yao')},{id:2,name:this.$t('jin-ji')},],
  1272. 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"}],
  1273. taskTypeColor:['#20A0FF','#8613ad','#bf0404'],
  1274. taskTypeIcon:['iconfont firerock-iconrenwu','iconfont firerock-iconicon-','iconfont firerock-iconfengxian'],
  1275. taskStatusList:[this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone')],
  1276. //优先级
  1277. taskLevelColor:['#262626','#E6A23C','#F56C6C'],
  1278. stageListHeight:0,
  1279. taskListinH:0,
  1280. groupWidth:260,
  1281. drag: false,
  1282. stageDrag: false,
  1283. dragging: false,
  1284. stageList:[],
  1285. selectedGroup:{},
  1286. allGroupData:[],
  1287. defaultGroupId:null,
  1288. addGroupDialog: false,
  1289. addStageDialog: false,
  1290. groupSearch:null,
  1291. groupType:0,//0-分组,1-视图
  1292. groupList: [],
  1293. groupForm:{},
  1294. stageForm:[],
  1295. curProjectId:null,
  1296. projectList:null,
  1297. activeIndex:"1",
  1298. activeName:"projectInside",
  1299. searchField:null,
  1300. keyword:null,
  1301. user: JSON.parse(sessionStorage.getItem("user")),
  1302. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  1303. userDetailVisible: false,
  1304. userDetail:{},
  1305. date: new Date(),
  1306. users: [],
  1307. tableHeight: 0,
  1308. listLoading: false,
  1309. subProjectVisible: false,
  1310. subProjectList: [],//子项目列表
  1311. currentProject:{},
  1312. addSubProject: false,
  1313. addFormVisible: false,
  1314. addLoading: false,
  1315. title: "",
  1316. addForm: {
  1317. name: '',
  1318. },
  1319. rules: {
  1320. name: [{ required: true, message: this.$t('pleaseenteragroupname'), trigger: "blur" }],
  1321. },
  1322. rulesManDay: {
  1323. manDay: [{ required: true, message: '请输入预估工时', trigger: "blur" }],
  1324. },
  1325. rules2: {
  1326. stagesName: [{ required: true, message: this.$t('pleaseenteratasklistname'), trigger: "blur" }],
  1327. },
  1328. taskRules : {
  1329. name: [{ required: true, message: this.$t('enterthetaskcontent'), trigger: "blur" }],
  1330. },
  1331. formGrouping: {
  1332. name: [{ required: true, message: this.$t('pleaseenteragroupname'), trigger: "blur" }],
  1333. },
  1334. sleectId: null,
  1335. sleectProjectId: null,
  1336. sidebarIndex: 0, // 侧边栏索引
  1337. url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
  1338. count: 0,
  1339. textarea2: '',
  1340. taskId: null,
  1341. commentList: [],
  1342. radio: 0,
  1343. critic: [], // 评论头像的数组
  1344. editorOption: { // 富文本框里面的默认值
  1345. placeholder: this.$t('pleaseentethetext'),
  1346. modules: {
  1347. toolbar:[
  1348. ['bold', 'italic', 'underline', 'strike'], //加粗,斜体,下划线,删除线
  1349. // ['blockquote', 'code-block'], //引用,代码块
  1350. [{ 'header': 1 }, { 'header': 2 }], // 标题,键值对的形式;1、2表示字体大小
  1351. // [{ 'list': 'ordered'}, { 'list': 'bullet' }], //列表
  1352. // [{ 'script': 'sub'}, { 'script': 'super' }], // 上下标
  1353. // [{ 'indent': '-1'}, { 'indent': '+1' }], // 缩进
  1354. // [{ 'direction': 'rtl' }], // 文本方向
  1355. [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
  1356. [{ 'header': [1, 2, 3, 4, 5, 6, false] }], //几级标题
  1357. [{ 'color': [] }, { 'background': [] }], // 字体颜色,字体背景颜色
  1358. // [{ 'font': [] }], //字体
  1359. [{ 'align': [] }], //对齐方式
  1360. ['clean'], //清除字体样式
  1361. // ['image','video'] //上传图片、上传视频
  1362. ['image'] //上传图片、上传视频
  1363. ], //工具栏设置
  1364. },
  1365. theme: 'snow',
  1366. },
  1367. textContent: true, // 控制提交
  1368. times: null,
  1369. text2: '',
  1370. innerVisibless: false, // 任务展示弹出层
  1371. activities: [{
  1372. content: this.$t('normals'),
  1373. timestamp: this.$t('hoursago'),
  1374. size: 'large',
  1375. type: 'primary',
  1376. icon: 'el-icon-circle-check',
  1377. color: '#409EFF'
  1378. }, {
  1379. content: this.$t('withinthetimelimit'),
  1380. timestamp: this.$t('hoursago8'),
  1381. color: '#F87872'
  1382. }],
  1383. ProgressList: [],
  1384. checkboxGrounp: [], // 选中人的数据
  1385. checkLists: [], // 选中人数据的ID
  1386. taskIid: null,
  1387. gstimday:[],
  1388. gstimhour:[],
  1389. timelabel: false,
  1390. relationdata: [],
  1391. isRelationTab: false,
  1392. relationvalue:[],
  1393. relationSubTaskList:[],
  1394. relationItemData: null,
  1395. relationPar:{name: ''},
  1396. isRelationItem: false,
  1397. // 关联文件
  1398. fileListLoading:false,
  1399. projectFileList:[],
  1400. taskFileList:[],
  1401. relationFileDialog: false,
  1402. addFileId: null,
  1403. isEditFile: false,
  1404. // 设置项目参与人
  1405. participantsDialog: false,
  1406. participantsFilterText: '',
  1407. deptMembData: [
  1408. {
  1409. id: 0,
  1410. label: this.$t('lable.unassigned'),
  1411. }
  1412. ],
  1413. defaultProps: {
  1414. children: 'children',
  1415. label: 'label'
  1416. },
  1417. chosenMembCount: 0,
  1418. ididid:null,
  1419. alreadyPartArray: [],
  1420. projectCreatorId: null,
  1421. projectInchargerId: null,
  1422. canAddTask: false, // 是否可创建任务的判断标志
  1423. canEditStageList: false, //是否可编辑列表的判断标志
  1424. groupResponsibleId: '', // 分组负责人的id
  1425. groupDetailsShow: false,
  1426. groupDetailData: {},
  1427. groupDetailTil: '',
  1428. setTemplateData: {},
  1429. setTemplateDialog: false,
  1430. taskListPage: 1,
  1431. taskListSize: 20,
  1432. taskListTotal: 0,
  1433. dynamicTab: true,
  1434. dailyList: [],
  1435. taskComponentFlg: false,
  1436. integrationTask: {},
  1437. integrationTaskNingwai: {},
  1438. hideCompleted: false,
  1439. wxFilterText: '',
  1440. filterNodeFlag: false,
  1441. filterNodePersonnel: [],
  1442. changeBudgetDig:false,
  1443. groupBudgetData:{},
  1444. nowManDay:0
  1445. };
  1446. },
  1447. watch: {
  1448. participantsFilterText(val) {
  1449. let { userNameNeedTranslate } = JSON.parse(sessionStorage.getItem("user"))
  1450. if(userNameNeedTranslate != 1) {
  1451. this.$refs.chooseMembTree2.filter(val);
  1452. }
  1453. if(!val) {
  1454. this.$refs.chooseMembTree2.filter(val);
  1455. }
  1456. }
  1457. },
  1458. methods: {
  1459. closeBounced(obj) {
  1460. console.log('触发了')
  1461. if(!obj.backToParentTaskSub) {
  1462. this.addFormVisible = false
  1463. this.taskComponentFlg = false
  1464. if(obj.submitInsert) {
  1465. if (this.groupType == 0) {
  1466. this.getStageList();
  1467. } else {
  1468. this.getViewTaskList();
  1469. }
  1470. }
  1471. if(obj.addSubTask) {
  1472. this.addSubTask()
  1473. }
  1474. if(obj.deleteTask) {
  1475. this.getStageList();
  1476. }
  1477. if(obj.taskLineClickAbs) {
  1478. this.taskLineClick(obj.items)
  1479. }
  1480. } else {
  1481. this.backToParentTask()
  1482. }
  1483. },
  1484. // 获取来自日报
  1485. getDailyList(id) {
  1486. this.http.post('/report/getTaskReportList',{
  1487. // taskId: '22131'
  1488. taskId: id
  1489. },
  1490. res => {
  1491. if (res.code == "ok") {
  1492. this.dailyList = res.data
  1493. } else {
  1494. this.$message({
  1495. message: res.msg,
  1496. type: "error"
  1497. });
  1498. }
  1499. },
  1500. error => {
  1501. this.$message({
  1502. message: error,
  1503. type: "error"
  1504. });
  1505. });
  1506. },
  1507. restrictNumber(targetId) {
  1508. let inpu = document.getElementById(targetId)
  1509. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  1510. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  1511. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g,'').replace('$#*','.');//去除其他"."
  1512. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  1513. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  1514. inpu.value = parseFloat(inpu.value);
  1515. }
  1516. },
  1517. test(item){
  1518. // let pro = this.$route
  1519. console.log('test',this.projectList);
  1520. },
  1521. setParticipants(){
  1522. let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  1523. let chose2 = chosenList.filter(item=>item.isUser == 1)
  1524. let chose3 = []
  1525. for(let i=0;i<chose2.length;i++){chose3.push(chose2[i].id)}
  1526. console.log('test',chose2,chose3);
  1527. this.http.post('/group-participator/save',{
  1528. groupId: this.ididid,
  1529. idsJson: JSON.stringify(chose3)
  1530. },res => {
  1531. if(res.code == 'ok'){
  1532. this.participantsDialog = false
  1533. this.$message({
  1534. message: this.$t('setupthesuccess'),
  1535. type: 'success'
  1536. })
  1537. }else {
  1538. this.$message({
  1539. message: res.msg,
  1540. type: 'error'
  1541. })
  1542. }
  1543. },error => {
  1544. this.$message({
  1545. message: error,
  1546. type: 'error'
  1547. })
  1548. })
  1549. },
  1550. // 设置项目参与人
  1551. setupParticipants(item){
  1552. this.ididid = item.id
  1553. this.participantsFilterText = ''
  1554. this.wxFilterText = ''
  1555. console.log(item);
  1556. this.participantsDialog = true
  1557. this.getAlreadyPartArray(item.id)
  1558. this.getDepartmentList()
  1559. },
  1560. // 获取用于设置参与人的列表
  1561. getDepartmentList(){
  1562. this.http.post('/department/listAllMemb',{
  1563. },res => {
  1564. if(res.code == 'ok'){
  1565. let list = res.data
  1566. this.haveUsersList(list)
  1567. this.deptMembData = JSON.parse(JSON.stringify(list))
  1568. console.log('123',this.deptMembData);
  1569. }else {
  1570. this.$message({
  1571. message: res.msg,
  1572. type: 'error'
  1573. })
  1574. }
  1575. },error => {
  1576. this.$message({
  1577. message: error,
  1578. type: 'error'
  1579. })
  1580. })
  1581. },
  1582. haveUsersList(list){
  1583. for (var i in list) {
  1584. if (list[i].children != null) {
  1585. this.haveUsersList(list[i].children);
  1586. }
  1587. if (list[i].userList != null) {
  1588. if (list[i].children == null) {
  1589. list[i].children = [];
  1590. }
  1591. list[i].userList.forEach(element => {
  1592. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  1593. list[i].children.push(obj);
  1594. });
  1595. }
  1596. }
  1597. },
  1598. // 获取已参与人员
  1599. getAlreadyPartArray(eid){
  1600. this.http.post('/group-participator/get',{
  1601. groupId: eid
  1602. },res => {
  1603. if(res.code == 'ok'){
  1604. this.alreadyPartArray = res.data
  1605. this.chosenMembCount = res.data.length
  1606. // console.log('get',res.data, this.alreadyPartArray)
  1607. }else {
  1608. this.$message({
  1609. message: res.msg,
  1610. type: 'error'
  1611. })
  1612. }
  1613. },error => {
  1614. this.$message({
  1615. message: error,
  1616. type: 'error'
  1617. })
  1618. })
  1619. },
  1620. // 筛选逻辑
  1621. filterNode(value, data) {
  1622. let { userNameNeedTranslate } = this.user
  1623. if (!value) return true;
  1624. if(userNameNeedTranslate != '1') {
  1625. return data.label.indexOf(value) !== -1;
  1626. } else {
  1627. return this.filterNodePersonnel.some(item => item.includes(data.label))
  1628. }
  1629. },
  1630. // 选中改变
  1631. onTreeItemChange() {
  1632. var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  1633. var list = chosenList.filter(item=>item.isUser == 1);
  1634. this.chosenMembCount = list.length;
  1635. },
  1636. // 关联文件按钮
  1637. relationFileClick(){
  1638. this.relationFileDialog = true
  1639. this.addFileId = null
  1640. this.getProjectFileList()
  1641. },
  1642. // 确认关联文件
  1643. addTaskFile(){
  1644. if(this.addFileId == null){
  1645. this.$message({message: this.$t('xuanzguanlianwenjian') , type: 'warning'})
  1646. return
  1647. }
  1648. this.http.post('/task-files/addDocumentRef',{
  1649. documentId: this.addFileId,
  1650. taskId: this.addForm.id,
  1651. projectId: this.curProjectId
  1652. },res => {
  1653. if(res.code == 'ok'){
  1654. this.$message({
  1655. message: this.$t('guan-lian-cheng-gong'),
  1656. type: 'success'
  1657. })
  1658. this.relationFileDialog = false
  1659. this.getTaskFileList()
  1660. }else {
  1661. this.$message({
  1662. message: res.msg,
  1663. type: 'error'
  1664. })
  1665. }
  1666. },error => {
  1667. this.$message({
  1668. message: error,
  1669. type: 'error'
  1670. })
  1671. })
  1672. },
  1673. // 获取项目下的文档列表
  1674. getProjectFileList(){
  1675. this.http.post('/task-files/getDocumentList',{
  1676. projectId: this.curProjectId
  1677. },res => {
  1678. if(res.code == 'ok'){
  1679. this.projectFileList = res.data
  1680. console.log('list',res.data);
  1681. }else {
  1682. this.$message({
  1683. message: res.msg,
  1684. type: 'error'
  1685. })
  1686. }
  1687. },error => {
  1688. this.$message({
  1689. message: error,
  1690. type: 'error'
  1691. })
  1692. })
  1693. },
  1694. // 获取任务下的文档列表
  1695. getTaskFileList(e,eid){
  1696. let etaskId
  1697. if(e == 1){etaskId = eid}
  1698. else{etaskId = this.addForm.id}
  1699. this.fileListLoading = true
  1700. this.http.post('/task-files/getTaskFiles',{
  1701. taskId: etaskId
  1702. },res => {
  1703. if(res.code == 'ok'){
  1704. this.fileListLoading = false
  1705. this.taskFileList = res.data
  1706. console.log('taskFileList',res.data);
  1707. }else {
  1708. this.fileListLoading = false
  1709. this.$message({
  1710. message: res.msg,
  1711. type: 'error'
  1712. })
  1713. }
  1714. },error => {
  1715. this.fileListLoading = false
  1716. this.$message({
  1717. message: error,
  1718. type: 'error'
  1719. })
  1720. })
  1721. },
  1722. // 列表的删除按钮
  1723. taskFileDelete(eid){
  1724. this.$confirm('是否移除此文件?', this.$t('other.prompts'), {
  1725. confirmButtonText: this.$t('btn.determine'),
  1726. cancelButtonText: this.$t('btn.cancel'),
  1727. type: 'warning'
  1728. }).then(()=>{
  1729. this.http.post('/task-files/delete',{
  1730. id: eid
  1731. },res => {
  1732. if(res.code == 'ok'){
  1733. this.$message({
  1734. message: res.data,
  1735. type: 'success'
  1736. })
  1737. this.getTaskFileList()
  1738. }else {
  1739. this.$message({
  1740. message: res.msg,
  1741. type: 'error'
  1742. })
  1743. }
  1744. },error => {
  1745. this.$message({
  1746. message: error,
  1747. type: 'error'
  1748. })
  1749. })
  1750. }).catch(()=>{
  1751. this.$message({
  1752. message: this.$t('thedeletionhasbeencancelled'),
  1753. type: 'info'
  1754. })
  1755. })
  1756. },
  1757. // 列表的上传按钮
  1758. uploadFileClick(item){
  1759. console.log("upload",item.file);
  1760. let files = new FormData()
  1761. files.append("projectId",this.curProjectId);
  1762. files.append("taskId", this.addForm.id);
  1763. files.append("file", item.file);
  1764. this.http.uploadFile('/task-files/uploadFile',files,
  1765. res => {
  1766. if(res.code == 'ok'){
  1767. console.log(res);
  1768. this.$message({
  1769. message: this.$t('yi-shang-chuan'),
  1770. type: 'success'
  1771. })
  1772. this.getTaskFileList()
  1773. }else {
  1774. this.$message({
  1775. message: res.msg,
  1776. type: 'error'
  1777. })
  1778. }
  1779. },error => {
  1780. this.$message({
  1781. message: error,
  1782. type: 'error'
  1783. })
  1784. })
  1785. },
  1786. selchg(){ //类型切换
  1787. if(this.addForm.taskType == 1){
  1788. this.timelabel = true
  1789. if(!this.addForm.executorListFront[0].executorId) {
  1790. console.log(this.currentProject)
  1791. this.addForm.executorListFront[0].executorId = this.currentProject.inchargerId
  1792. }
  1793. }else{
  1794. this.timelabel = false
  1795. }
  1796. },
  1797. addRelation(){ //关联任务卡片
  1798. this.relationvalue = []
  1799. this.isRelationTab = true
  1800. this.getrelation()
  1801. },
  1802. addRelationTask(){ //添加关联任务
  1803. this.http.post('/task/addMileStoneTask',{
  1804. milestoneId: this.addForm.id,
  1805. taskIds: JSON.stringify(this.relationvalue)
  1806. },
  1807. res =>{
  1808. if(res.code == "ok") {
  1809. this.isRelationTab = false
  1810. this.$message({
  1811. message: this.$t('addsuccessful'),
  1812. type: 'success'
  1813. })
  1814. this.getRelationTaskList()
  1815. this.$forceUpdate()
  1816. }else {
  1817. this.$message({
  1818. message: res.msg,
  1819. type: 'error'
  1820. })
  1821. }
  1822. },
  1823. error => {
  1824. this.$message({
  1825. message: error,
  1826. type: 'error'
  1827. })
  1828. })
  1829. },
  1830. getRelationTaskList(i,e){ //获取关联任务列表
  1831. let eid = null
  1832. if(i){
  1833. eid = e
  1834. }else{
  1835. eid = this.addForm.id
  1836. }
  1837. this.http.post('/task/getMilestoneTaskList',{
  1838. milestoneId: eid
  1839. },res => {
  1840. if(res.code == 'ok') {
  1841. this.relationSubTaskList = res.data
  1842. // console.log('res',res.data);
  1843. }else {
  1844. this.$message({
  1845. message: res.msg,
  1846. type: 'error'
  1847. })
  1848. }
  1849. },error => {
  1850. this.$message({
  1851. message: error,
  1852. type: 'error'
  1853. })
  1854. })
  1855. },
  1856. getrelation(){ //获取选择关联列表
  1857. this.http.post('/task/getTaskOnlyList',{
  1858. projectId: this.curProjectId
  1859. },
  1860. res => {
  1861. if (res.code == "ok") {
  1862. this.relationdata = []
  1863. res.data.forEach( (item) =>{
  1864. if(item.taskType != 1){
  1865. this.relationdata.push(item)
  1866. }
  1867. })
  1868. // console.log('map',this.relationdata);
  1869. } else {
  1870. this.$message({
  1871. message: res.msg,
  1872. type: "error"
  1873. });
  1874. }
  1875. },
  1876. error => {
  1877. this.$message({
  1878. message: error,
  1879. type: "error"
  1880. });
  1881. });
  1882. },
  1883. // 里程碑关联任务列表
  1884. // 解除关联
  1885. deleteRelationItem(eid){
  1886. this.listLoading = true
  1887. this.http.post('/task/removeMileStoneTask',{
  1888. id: eid
  1889. },res => {
  1890. if(res.code == 'ok') {
  1891. this.getRelationTaskList()
  1892. this.listLoading = false
  1893. this.$message({
  1894. message: this.$t('jie-chu-cheng-gong'),
  1895. type: 'success'
  1896. })
  1897. }else {
  1898. this.listLoading = false
  1899. this.$message({
  1900. message: res.msg,
  1901. type: 'error'
  1902. })
  1903. }
  1904. },error => {
  1905. this.listLoading = false
  1906. this.$message({
  1907. message: error,
  1908. type: 'error'
  1909. })
  1910. })
  1911. },
  1912. // 关联任务列表是否完成修改
  1913. relationFinishTask(row){
  1914. this.http.post('/task/finish',{
  1915. id: row.taskId,
  1916. taskStatus: row.taskStatus
  1917. },res => {
  1918. if(res.code == 'ok'){
  1919. if(this.groupType == 0){
  1920. this.getStageList();
  1921. }else {
  1922. this.getViewTaskList();
  1923. }
  1924. }else{
  1925. this.$message({
  1926. message: res.msg,
  1927. type: 'error'
  1928. })
  1929. }
  1930. },error => {
  1931. this.$message({
  1932. message: error,
  1933. type: 'error'
  1934. })
  1935. })
  1936. },
  1937. //保存分组负责人
  1938. saveGroupIncharger() {
  1939. this.http.post('/task-group/saveGroupIncharger', {id: this.groupForm.id, inchargerId: this.groupForm.inchargerId, projectId: this.curProjectId},
  1940. res => {
  1941. this.setInchargerDialog = false;
  1942. if (res.code == "ok") {
  1943. this.$message({
  1944. message: this.$t('setupthesuccess'),
  1945. type: "success"
  1946. });
  1947. //更新原始分组数据
  1948. this.groupList.filter(g=>g.id == this.groupForm.id)[0].inchargerId = this.groupForm.inchargerId;
  1949. } else {
  1950. this.$message({
  1951. message: res.msg,
  1952. type: "error"
  1953. });
  1954. }
  1955. }
  1956. );
  1957. },
  1958. // 编辑模板
  1959. setTemplate(t){
  1960. console.log(t);
  1961. this.setTemplateData = t
  1962. this.setTemplateData.needDelete = []
  1963. this.setTemplateDialog = true
  1964. },
  1965. setTemplateSave(){
  1966. if(this.setTemplateData.name == '' || this.setTemplateData.name == null){
  1967. this.$message({
  1968. message: this.$t('mo-ban-ming-cheng-bu-neng-wei-kong'),
  1969. type: 'error'
  1970. })
  1971. return
  1972. }
  1973. for(let i in this.setTemplateData.stagesList){
  1974. if(this.setTemplateData.stagesList[i].stagesName == '' || this.setTemplateData.stagesList[i].stagesName == null){
  1975. this.$message({
  1976. message: this.$t('ren-wu-lie-biao-ming-cheng-bu-neng-wei-kong'),
  1977. type: 'error'
  1978. })
  1979. return
  1980. }
  1981. }
  1982. this.http.post('/task-group/setTemplate',this.setTemplateData,
  1983. res => {
  1984. if(res.code == 'ok'){
  1985. this.$message({
  1986. message: this.$t('message.modifyTheSuccess'),
  1987. type: 'success'
  1988. })
  1989. this.getGroupTemplate()
  1990. this.setTemplateDialog = false
  1991. }else{
  1992. this.$message({
  1993. message: res.msg,
  1994. type: 'error'
  1995. })
  1996. }
  1997. },err => {
  1998. this.$message({
  1999. message: err,
  2000. type: 'error'
  2001. })
  2002. })
  2003. },
  2004. deleteStages(item,index){
  2005. this.setTemplateData.needDelete.push(item.id)
  2006. this.setTemplateData.stagesList.splice(index,1)
  2007. console.log('deletestages',item.id);
  2008. },
  2009. addStages(){
  2010. this.setTemplateData.stagesList.push({
  2011. stagesName: '',
  2012. templateId: this.setTemplateData.id
  2013. })
  2014. },
  2015. //删除模板
  2016. deleteTemplate(t) {
  2017. var that = this;
  2018. this.$confirm(this.$t('que-ren-yao-shan-chu')+"["+t.name+"]"+this.$t('ma'), this.$t('other.prompts'), {
  2019. //type: 'warning'
  2020. }).then(() => {
  2021. this.http.post('/group-template/deleteTemplate', {id: t.id},
  2022. res => {
  2023. if (res.code == "ok") {
  2024. this.getGroupTemplate();
  2025. this.$message({
  2026. message: this.$t('deletingTemplateSuccessfully'),
  2027. type: "success"
  2028. });
  2029. } else {
  2030. this.$message({
  2031. message: res.msg,
  2032. type: "error"
  2033. });
  2034. }
  2035. }
  2036. );
  2037. });
  2038. },
  2039. //创建模板
  2040. createTemplate() {
  2041. this.saveTemplateLoading = true;
  2042. this.http.post('/group-template/addTemplate', this.templateForm,
  2043. res => {
  2044. this.saveTemplateLoading = false;
  2045. if (res.code == "ok") {
  2046. this.addToTmpDialog = false;
  2047. this.getGroupTemplate();
  2048. this.$message({
  2049. message: this.$t('addTemplateSuccessfully'),
  2050. type: "success"
  2051. });
  2052. } else {
  2053. this.$message({
  2054. message: res.msg,
  2055. type: "error"
  2056. });
  2057. }
  2058. }
  2059. );
  2060. },
  2061. addToTemplate(item) {
  2062. this.addToTmpDialog = true;
  2063. this.templateForm = {groupId: item.id, name:item.name, saveTask:false, saveMileStone:false, saveRisk:false};
  2064. },
  2065. changeBase() {
  2066. // this.$refs.earning.refreshPage();
  2067. },
  2068. // 批量导入人员
  2069. importTask(item) {
  2070. //首先判断文件类型
  2071. this.loadingExport = true
  2072. let str = item.file.name.split(".");
  2073. let format = str[str.length - 1];
  2074. if (format != "xls" && format != "xlsx") {
  2075. this.loadingExport = false
  2076. this.$message({
  2077. message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
  2078. type: "error"
  2079. });
  2080. } else {
  2081. this.listLoading = true;
  2082. let formData = new FormData();
  2083. formData.append("file", item.file);
  2084. formData.append("projectId", this.curProjectId);
  2085. formData.append("groupId", this.selectedGroup.id);
  2086. // formData.append("stagesId", this.importToStageId);
  2087. this.http.uploadFile('/task/importTask', formData,
  2088. res => {
  2089. this.$refs.upload.clearFiles();
  2090. this.listLoading = false;
  2091. this.loadingExport = false
  2092. if (res.code == "ok") {
  2093. this.$message({
  2094. message: this.$t('other.importSuccess'),
  2095. type: "success"
  2096. });
  2097. //重新读取列表
  2098. this.getStageList();
  2099. this.importTaskDialog = false;
  2100. } else {
  2101. this.$message({
  2102. message: res.msg,
  2103. type: "error"
  2104. });
  2105. }
  2106. },
  2107. error => {
  2108. this.$refs.upload.clearFiles();
  2109. this.listLoading = false;
  2110. this.loadingExport = false
  2111. this.$message({
  2112. message: error,
  2113. type: "error"
  2114. });
  2115. });
  2116. }
  2117. },
  2118. //删除任务进展
  2119. deleteTaskProgress(id) {
  2120. this.http.post('/task-progress/deleteProgress', {id: id},
  2121. res => {
  2122. if (res.code == "ok") {
  2123. this.getTaskProgressList(this.taskIid)
  2124. this.$message({
  2125. message: this.$t('message.successfullyDeleted'),
  2126. type: "success"
  2127. });
  2128. } else {
  2129. this.$message({
  2130. message: res.msg,
  2131. type: "error"
  2132. });
  2133. }
  2134. }
  2135. );
  2136. },
  2137. //创建任务进展
  2138. addTaskProgress() {
  2139. var param = {
  2140. taskId: this.taskIid,
  2141. status: this.radio,
  2142. content: this.text2,
  2143. participatorIds: this.checkLists.toString()
  2144. };
  2145. this.http.post('/task-progress/addProgress', param,
  2146. res => {
  2147. if (res.code == "ok") {
  2148. this.shutPro()
  2149. this.getTaskProgressList(this.taskIid)
  2150. this.$message({
  2151. message: this.$t('releasesuccess'),
  2152. type: "success"
  2153. });
  2154. this.checkboxGrounp = [],
  2155. this.checkLists = [],
  2156. this.text2 = '',
  2157. this.radio = 0
  2158. let obj = {
  2159. id: this.taskIid
  2160. }
  2161. this.gain(obj)
  2162. } else {
  2163. this.$message({
  2164. message: res.msg,
  2165. type: "error"
  2166. });
  2167. }
  2168. }
  2169. );
  2170. },
  2171. //获取任务进展列表
  2172. getTaskProgressList(taskId) {
  2173. this.taskIid = taskId
  2174. this.http.post('/task-progress/list', {taskId: taskId},
  2175. res => {
  2176. if (res.code == "ok") {
  2177. this.ProgressList = res.data;
  2178. this.recentProgressInfo = res.data[0]
  2179. } else {
  2180. this.$message({
  2181. message: res.msg,
  2182. type: "error"
  2183. });
  2184. }
  2185. }
  2186. );
  2187. },
  2188. kkk(el){
  2189. var k = this.checkLists.indexOf(el.id)
  2190. if (k == -1) {
  2191. this.checkLists.push(el.id)
  2192. } else {
  2193. this.checkLists.splice(k, 1)
  2194. }
  2195. },
  2196. showExportDialog() {
  2197. this.exportDialog = true;
  2198. },
  2199. exportTask() {
  2200. let _this = this;
  2201. this.loadingExport = true
  2202. this.http.post('/task/exportTask', {projectId: this.curProjectId, taskType: this.exportTaskType},
  2203. res => {
  2204. this.loadingExport = false
  2205. if (res.code == "ok") {
  2206. location.href = res.data;
  2207. } else {
  2208. this.$message({
  2209. message: res.msg,
  2210. type: "error"
  2211. });
  2212. }
  2213. }
  2214. );
  2215. },
  2216. sss(){
  2217. this.$refs.addRem.style.display="none"
  2218. },
  2219. addprogress(){ // 添加子任务进展事件
  2220. this.$refs.proBox.style.display="block"
  2221. this.$refs.addPro.style.display="none"
  2222. },
  2223. shutPro() { // 关闭任务进展
  2224. this.$refs.addPro.style.display="block"
  2225. this.$refs.addRem.style.display="none"
  2226. this.$refs.proBox.style.display="none"
  2227. },
  2228. addI() { // 打开选择查看
  2229. this.$refs.addRem.style.display="block"
  2230. },
  2231. load() {
  2232. if(this.count >= 0) return
  2233. this.count += 2
  2234. },
  2235. onEditorFocus() {
  2236. this.onEditorBlur()
  2237. },
  2238. subMission() { // 添加
  2239. },
  2240. handleCheckedCitiesChange(value) {
  2241. let checkedCount = value.length;
  2242. this.checkAll = checkedCount === this.cities.length;
  2243. this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
  2244. },
  2245. // 获得焦点时触发
  2246. onEditorBlur(){
  2247. let theEle = this.$refs.text; // 获取元素
  2248. var img = theEle.value.match(/<img[^>]+>/g); // 赛选 img 标签
  2249. var arrImg = ''
  2250. for (var j = 0; j < img.length; j++) {
  2251. // 正则匹配,摘出img标签下的src里的内容,即capture
  2252. img[j].replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
  2253. arrImg += capture
  2254. });
  2255. }
  2256. // 原来的字符流大小,单位为字节
  2257. var strLen = arrImg.length;
  2258. // 计算后得到的文件流大小,单位为字节
  2259. var fileSize=parseInt(strLen-(strLen/8)*2);
  2260. var size = "";
  2261. size = (fileSize/1024/1024).toFixed(2);
  2262. if (size > 2){
  2263. this.textContent = false
  2264. this.$message({
  2265. showClose: true,
  2266. message: this.$t('imageexceeds2MBpleaseuploaditagain'),
  2267. type: 'warning'
  2268. });
  2269. }
  2270. this.textContent = true
  2271. },
  2272. // 侧边栏的点击事件
  2273. retract() {
  2274. if (this.$refs.box.className == 'el-icon-arrow-left') {
  2275. this.$refs.box.className = 'el-icon-arrow-right'
  2276. } else {
  2277. this.$refs.box.className = 'el-icon-arrow-left'
  2278. }
  2279. // this.$refs.box.className === 'el-icon-arrow-left' ? this.$refs.box.className = 'el-icon-arrow-right' || this.$refs.box.className = 'el-icon-arrow-left'
  2280. this.toggleGroup()
  2281. },
  2282. //
  2283. choseTemplate(tIndex) {
  2284. // this.groupTemplateList.forEach((g)=>{
  2285. // g.selected = false;
  2286. // })
  2287. this.sidebarIndex = tIndex
  2288. // this.groupTemplateList[tIndex].selected = true;
  2289. this.groupTemplateList.forEach((g, i)=>{
  2290. if(tIndex == i) {
  2291. g.selected = !g.selected;
  2292. }
  2293. })
  2294. },
  2295. //获取分组模板列表
  2296. getGroupTemplate() {
  2297. this.http.post('/group-template/getList',{},
  2298. res => {
  2299. if (res.code == "ok") {
  2300. this.groupTemplateList = res.data;
  2301. this.groupTemplateList[0].selected = true;
  2302. } else {
  2303. this.$message({
  2304. message: res.msg,
  2305. type: "error"
  2306. });
  2307. }
  2308. },
  2309. error => {
  2310. this.$message({
  2311. message: error,
  2312. type: "error"
  2313. });
  2314. });
  2315. },
  2316. copyGroup(item) {
  2317. this.http.post('/task-group/copy',{id: item.id},
  2318. res => {
  2319. if (res.code == "ok") {
  2320. this.getTaskGroups();
  2321. } else {
  2322. this.$message({
  2323. message: res.msg,
  2324. type: "error"
  2325. });
  2326. }
  2327. },
  2328. error => {
  2329. this.$message({
  2330. message: error,
  2331. type: "error"
  2332. });
  2333. });
  2334. },
  2335. //重启项目
  2336. startPro() {
  2337. this.http.post('/project/start',{id: this.curProjectId},
  2338. res => {
  2339. if (res.code == "ok") {
  2340. this.$message({
  2341. message: this.$t('restartthesuccess'),
  2342. type: "success"
  2343. });
  2344. this.currentProject.status = 1;
  2345. } else {
  2346. this.$message({
  2347. message: res.msg,
  2348. type: "error"
  2349. });
  2350. }
  2351. },
  2352. error => {
  2353. this.$message({
  2354. message: error,
  2355. type: "error"
  2356. });
  2357. });
  2358. },
  2359. //撤销项目
  2360. cancelPro() {
  2361. this.http.post('/project/cancel',{id: this.curProjectId},
  2362. res => {
  2363. if (res.code == "ok") {
  2364. this.$message({
  2365. message: this.$t('Revocationofsuccess'),
  2366. type: "success"
  2367. });
  2368. this.currentProject.status = 3;
  2369. } else {
  2370. this.$message({
  2371. message: res.msg,
  2372. type: "error"
  2373. });
  2374. }
  2375. },
  2376. error => {
  2377. this.$message({
  2378. message: error,
  2379. type: "error"
  2380. });
  2381. });
  2382. },
  2383. //完成项目
  2384. finishPro() {
  2385. this.http.post('/project/finish',{id: this.curProjectId},
  2386. res => {
  2387. if (res.code == "ok") {
  2388. this.$message({
  2389. message: this.$t('projectcompletion'),
  2390. type: "success"
  2391. });
  2392. this.currentProject.status = 2;
  2393. } else {
  2394. this.$message({
  2395. message: res.msg,
  2396. type: "error"
  2397. });
  2398. }
  2399. },
  2400. error => {
  2401. this.$message({
  2402. message: error,
  2403. type: "error"
  2404. });
  2405. });
  2406. },
  2407. //删除当前编辑的任务
  2408. deleteTask() {
  2409. var warning='';
  2410. if (this.addForm.subTaskList.length > 0) {
  2411. warning=this.$t('currenttaskanditssubtasks');
  2412. } else {
  2413. warning=this.$t('wanttodeletethecurrent task');
  2414. }
  2415. this.$confirm(warning, this.$t('other.prompts'), {
  2416. //type: 'warning'
  2417. }).then(() => {
  2418. this.http.post('/task/delete',{id: this.addForm.id},
  2419. res => {
  2420. if (res.code == "ok") {
  2421. this.addFormVisible = false;
  2422. this.getStageList();
  2423. } else {
  2424. this.$message({
  2425. message: res.msg,
  2426. type: "error"
  2427. });
  2428. }
  2429. },
  2430. error => {
  2431. this.$message({
  2432. message: error,
  2433. type: "error"
  2434. });
  2435. });
  2436. });
  2437. },
  2438. //tab页签切换
  2439. handleClick(tab, event) {
  2440. let pathModel = tab.name;
  2441. this.$router.push('/'+pathModel+'/'+this.curProjectId);
  2442. if(tab.name == 'costbaseline'){
  2443. this.$refs.costbaseline.refreshPage();
  2444. }
  2445. if(tab.name == 'info') {
  2446. this.$refs.projectInfo.getMileStoneList()
  2447. }
  2448. },
  2449. showSubTaskList(task) {
  2450. this.subTaskVisible = true;
  2451. this.addForm = task;
  2452. // console.log('click',task.subTaskList);
  2453. },
  2454. backToParentTask() {
  2455. // this.getTaskDetail(this.addForm.parentTid);
  2456. this.getTaskDetail(this.timelabel ? this.relationPar.id : this.addForm.parentTid);
  2457. this.isEditFile = true;
  2458. this.$refs.thskComponents.backToParentTask()
  2459. if(this.timelabel){
  2460. this.isRelationItem = false
  2461. // this.relationPar = {name: ''}
  2462. this.getRelationTaskList(1, this.relationPar.id)
  2463. this.gain(this.relationPar)
  2464. }
  2465. },
  2466. //显示子任务创建卡片
  2467. addSubTask() {
  2468. if(this.isRelationItem){return}
  2469. this.addFormVisible = true;
  2470. this.addForm = {parentTname: this.addForm.name,parentTid: this.addForm.id,projectId: this.addForm.projectId, groupId: this.addForm.groupId, taskLevel:0, planHours: 8, taskType: 0};
  2471. this.addForm.executorListFront = [{executorId:null, planHours:8}];
  2472. this.addLoading = false;
  2473. //创建子任务,非编辑状态
  2474. this.isEditFile = false;
  2475. },
  2476. //认领任务
  2477. addAsMyTask(task) {
  2478. this.http.post('/task/addAsMyTask',{id: task.id},
  2479. res => {
  2480. if (res.code == "ok") {
  2481. this.getStageList();
  2482. } else {
  2483. this.$message({
  2484. message: res.msg,
  2485. type: "error"
  2486. });
  2487. }
  2488. },
  2489. error => {
  2490. this.$message({
  2491. message: error,
  2492. type: "error"
  2493. });
  2494. });
  2495. },
  2496. taskLineClick(row, column, event) {
  2497. if(this.isRelationItem){return}
  2498. this.editTask(row);
  2499. },
  2500. //排序发生改变
  2501. orderChange() {
  2502. this.isDesc = this.orderList.filter(o=>o.id == this.order)[0].isDesc;
  2503. if (this.groupType == 0) {
  2504. this.getStageList();
  2505. } else {
  2506. this.getViewTaskList();
  2507. }
  2508. },
  2509. taskListPageChange(val){
  2510. this.taskListPage = val
  2511. this.getViewTaskList()
  2512. },
  2513. taskListSizeChange(val){
  2514. this.taskListSize = val
  2515. this.taskListPage = 1
  2516. this.getViewTaskList()
  2517. },
  2518. //加载视图任务列表
  2519. getViewTaskList() {
  2520. this.http.post('/task/list',{projectId: this.curProjectId, viewId: this.selectedGroup.id, order: this.order, isDesc: this.isDesc,pageIndex: this.taskListPage,pageSize:this.taskListSize},
  2521. res => {
  2522. if (res.code == "ok") {
  2523. // this.taskDataList = res.data;
  2524. // console.log(this.taskDataList, '任务视图的列表')
  2525. for(var i in res.data.records) {
  2526. if(res.data.records[i].executorName != null) {
  2527. res.data.records[i].executorName = res.data.records[i].executorName.split(',')
  2528. }
  2529. }
  2530. this.taskDataList = res.data.records;
  2531. this.taskListTotal = res.data.total
  2532. console.log(this.taskDataList, '任务视图的列表')
  2533. this.taskDataList.forEach(t=>{
  2534. t.isFinish = t.taskStatus==1?true:false;
  2535. });
  2536. } else {
  2537. this.$message({
  2538. message: res.msg,
  2539. type: "error"
  2540. });
  2541. }
  2542. },
  2543. error => {
  2544. this.$message({
  2545. message: error,
  2546. type: "error"
  2547. });
  2548. });
  2549. },
  2550. //阶段拖拽
  2551. onMoveStage(e) {
  2552. var data = {
  2553. groupId:this.selectedGroup.id,
  2554. oldIndex: e.oldIndex,
  2555. newIndex: e.newIndex,};
  2556. this.http.post('/stages/changeStageOrder',data,
  2557. res => {
  2558. if (res.code == "ok") {
  2559. this.getStageList();
  2560. } else {
  2561. this.$message({
  2562. message: res.msg,
  2563. type: "error"
  2564. });
  2565. }
  2566. },
  2567. error => {
  2568. this.$message({
  2569. message: error,
  2570. type: "error"
  2571. });
  2572. });
  2573. },
  2574. onChange(e) {
  2575. var data = {
  2576. id:e.item.id,
  2577. oldIndex: e.oldIndex ,
  2578. newIndex: e.newIndex ,
  2579. oldStagesId: e.from.id,
  2580. newStagesId: e.to.id};
  2581. this.http.post('/task/changeOrder',data,
  2582. res => {
  2583. if (res.code == "ok") {
  2584. this.getStageList();
  2585. } else {
  2586. this.$message({
  2587. message: res.msg,
  2588. type: "error"
  2589. });
  2590. }
  2591. },
  2592. error => {
  2593. this.$message({
  2594. message: error,
  2595. type: "error"
  2596. });
  2597. });
  2598. },
  2599. toggleGroup() {
  2600. if (this.groupWidth == 0) {
  2601. this.groupWidth = 260;
  2602. } else {
  2603. this.groupWidth = 0;
  2604. }
  2605. },
  2606. finishTask(task) {
  2607. this.http.post('/task/finish',{id: task.id, taskStatus: task.taskStatus},
  2608. res => {
  2609. if (res.code == "ok") {
  2610. if (this.groupType == 0) {
  2611. this.getStageList();
  2612. } else {
  2613. this.getViewTaskList();
  2614. }
  2615. } else {
  2616. this.$message({
  2617. message: res.msg,
  2618. type: "error"
  2619. });
  2620. }
  2621. },
  2622. error => {
  2623. this.$message({
  2624. message: error,
  2625. type: "error"
  2626. });
  2627. });
  2628. },
  2629. // 点击卡片事件
  2630. editTask(task) {
  2631. this.mileageCup = true
  2632. // console.log('editTask',task)
  2633. if(task.taskType == 1){
  2634. this.timelabel = true
  2635. this.isRelationItem = false
  2636. }else{
  2637. this.timelabel = false
  2638. }
  2639. this.addFormVisible = true;
  2640. this.isEditFile = true;
  2641. this.addLoading = false;
  2642. this.title = this.$t('editingtasks');
  2643. // 自定义组件
  2644. this.integrationTask = {
  2645. id: task.id,
  2646. task: task,
  2647. num: 1,
  2648. curProjectId: this.curProjectId,
  2649. create: false,
  2650. integrationTaskNingwai: this.integrationTaskNingwai
  2651. }
  2652. this.taskComponentFlg = true
  2653. this.getTaskDetail(task.id);
  2654. this.getTaskProgressList(task.id); // 获取任务进展列表
  2655. this.getUsers(); // 获取名单数据
  2656. this.gain(task); // 获取评论列表
  2657. this.getDailyList(task.id) // 获取来自日报
  2658. this.getRelationTaskList(1, task.id)
  2659. this.getTaskFileList(1,task.id)
  2660. },
  2661. // 关联任务点击事件
  2662. relationTaskClick(row,column,event){
  2663. // console.log('relationTaskClick',row);
  2664. this.relationPar = JSON.parse(JSON.stringify(this.addForm))
  2665. // console.log(this.relationPar);
  2666. this.addFormVisible = true;
  2667. this.addLoading = false;
  2668. this.isRelationItem = true;
  2669. this.isEditFile = true;
  2670. this.title = this.$t('editingtasks');
  2671. this.getTaskDetail(row.taskId);
  2672. this.getUsers();
  2673. this.gain(row,1);
  2674. this.getRelationTaskList(1, row.taskId)
  2675. this.getTaskFileList(1,row.taskId)
  2676. },
  2677. // 获取评论列表
  2678. gain (task,e) {
  2679. this.commentList = [];
  2680. this.taskId = e == 1 ? task.taskId : task.id;
  2681. this.http.post('/task-comment/getList', {taskId: e == 1 ? task.taskId : task.id},
  2682. res => {
  2683. if (res.code == "ok") {
  2684. for(var i in res.data) {
  2685. if(res.data[i].content.indexOf('$userName=') != '-1') {
  2686. let obj = {
  2687. msg1: res.data[i].content.split('$')[0],
  2688. msg2: res.data[i].content.split('$')[1].split('=')[1],
  2689. msg3: res.data[i].content.split('$')[2]
  2690. }
  2691. res.data[i].content = obj
  2692. } else {
  2693. if(this.user.userNameNeedTranslate == 1) {
  2694. let obj = {
  2695. msg1: res.data[i].content,
  2696. msg2: '',
  2697. msg3: ''
  2698. }
  2699. res.data[i].content = obj
  2700. }
  2701. }
  2702. }
  2703. this.commentList = res.data
  2704. this.sppk(this.commentList) // 获取参与人的方法
  2705. } else {
  2706. this.$message({
  2707. message: res.msg,
  2708. type: "error"
  2709. });
  2710. }
  2711. },
  2712. error => {
  2713. this.$message({
  2714. message: error,
  2715. type: "error"
  2716. });
  2717. });
  2718. },
  2719. // 获取评论参与人
  2720. sppk(comit) {
  2721. var sk = []
  2722. comit.forEach(function(e){
  2723. sk.push(e.userName)
  2724. })
  2725. this.critic = new Set(sk)
  2726. console.log(this.critic, '参与人',this.critic.length)
  2727. },
  2728. // 点击发布
  2729. release() {
  2730. if(this.textarea2.length <= 0) return this.$message({message: this.$t('pleaseentercontent'), type: "error"})
  2731. this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
  2732. res => {
  2733. if(res.code == "ok"){
  2734. if(res.data.content.indexOf('$userName=') != '-1') {
  2735. let obj = {
  2736. msg1: res.data.content.split('$')[0],
  2737. msg2: res.data.content.split('$')[1].split('=')[1],
  2738. msg3: res.data.content.split('$')[2]
  2739. }
  2740. res.data.content = obj
  2741. } else {
  2742. if(this.user.userNameNeedTranslate == 1) {
  2743. let obj = {
  2744. msg1: res.data.content,
  2745. msg2: '',
  2746. msg3: ''
  2747. }
  2748. res.data.content = obj
  2749. }
  2750. }
  2751. this.commentList.push(res.data)
  2752. this.sppk(this.commentList)
  2753. this.textarea2 = ""
  2754. this.contRoll() // 滚动到底部
  2755. } else {
  2756. this.$message({
  2757. message: res.msg,
  2758. type: "error"
  2759. });
  2760. }
  2761. },
  2762. error => {
  2763. this.$message({
  2764. message: error,
  2765. type: "error"
  2766. });
  2767. })
  2768. },
  2769. // 滚动到底部
  2770. contRoll(){
  2771. this.$nextTick(() => {
  2772. this.$refs.main.scrollTop = this.$refs.contRoll.scrollHeight;
  2773. })
  2774. },
  2775. chggstim(e,i){
  2776. if(e){
  2777. this.gstimday[i] = Math.ceil(this.gstimhour[i] / this.user.timeType.allday)
  2778. }else{
  2779. this.gstimhour[i] = this.gstimday[i] * this.user.timeType.allday
  2780. }
  2781. },
  2782. getTaskDetail(id) {
  2783. this.http.post('/task/getTask',{id: id},
  2784. res => {
  2785. if (res.code == "ok") {
  2786. if(this.user.userNameNeedTranslate == 1) {
  2787. for(var i in res.data.subTaskList) {
  2788. if(res.data.subTaskList[i].executorName) {
  2789. res.data.subTaskList[i].executorName = res.data.subTaskList[i].executorName.split(',')
  2790. }
  2791. }
  2792. }
  2793. this.addForm = res.data;
  2794. this.addForm.createDate = null;
  2795. this.addForm.indate = null;
  2796. this.addLoading = false;
  2797. this.recentProgressInfo = this.addForm.progress;
  2798. this.addForm.executorListFront = this.addForm.executorList;
  2799. this.gstimday = []
  2800. this.gstimhour = []
  2801. for(let i=0;i<this.addForm.executorListFront.length;i++){
  2802. this.gstimhour.push(this.addForm.executorListFront[i].planHours),
  2803. this.gstimday.push(Math.ceil(this.addForm.executorListFront[i].planHours / this.user.timeType.allday))
  2804. }
  2805. //删除中间传值的变量数组
  2806. delete this.addForm.executorList;
  2807. } else {
  2808. this.$message({
  2809. message: res.msg,
  2810. type: "error"
  2811. });
  2812. }
  2813. },
  2814. error => {
  2815. this.$message({
  2816. message: error,
  2817. type: "error"
  2818. });
  2819. });
  2820. },
  2821. //预估工时变更
  2822. changeBudget(task){
  2823. this.changeBudgetDig=true,
  2824. this.groupBudgetData=task,
  2825. this.nowManDay=(this.groupBudgetData.changeManDay==null?0:parseInt(this.groupBudgetData.changeManDay))+(this.groupBudgetData.manDay==null?0:parseInt(this.groupBudgetData.manDay))
  2826. },
  2827. //预估工时变更
  2828. changeNowManDay(task){
  2829. console.log(task)
  2830. this.nowManDay=(this.groupBudgetData.changeManDay==null?0:parseInt(this.groupBudgetData.changeManDay))+(this.groupBudgetData.manDay==null?0:parseInt(this.groupBudgetData.manDay))
  2831. },
  2832. changeBudgetTrue(groupBudgetData){
  2833. let param;
  2834. if(groupBudgetData){
  2835. param={
  2836. groupId:groupBudgetData.id,
  2837. oldManDay:groupBudgetData.manDay,
  2838. changeManDay:groupBudgetData.changeManDay,
  2839. nowManDay:this.nowManDay,
  2840. }
  2841. }
  2842. this.http.post('/group-budget-review/add',param,
  2843. res => {
  2844. if (res.code == "ok") {
  2845. this.$message({
  2846. message: "操作成功",
  2847. type: "success"
  2848. });
  2849. this.changeBudgetDig=false
  2850. } else {
  2851. this.$message({
  2852. message: res.msg,
  2853. type: "error"
  2854. });
  2855. }
  2856. },
  2857. error => {
  2858. this.$message({
  2859. message: error,
  2860. type: "error"
  2861. });
  2862. });
  2863. },
  2864. addTask(stage) {
  2865. this.mileageCup = false
  2866. this.addFormVisible = true;
  2867. this.addForm = {projectId: stage.projectId, groupId: stage.groupId, stagesId: stage.id, taskLevel:0, planHours: 8, taskType: 0};
  2868. this.addForm.executorListFront = [{executorId:null, planHours:this.user.timeType.allday}];
  2869. this.gstimhour = [this.user.timeType.allday]
  2870. this.gstimday = [1]
  2871. this.addLoading = false;
  2872. this.isEditFile = false;
  2873. this.title=this.$t('createtask ');
  2874. this.commentList = [];
  2875. this.timelabel = false
  2876. let obj = {
  2877. create: true,
  2878. addForm: this.addForm,
  2879. executorListFront: [{executorId:null, planHours:8}],
  2880. stage: stage,
  2881. integrationTaskNingwai: this.integrationTaskNingwai
  2882. }
  2883. this.integrationTask = obj
  2884. this.taskComponentFlg = true
  2885. },
  2886. addExecutorLine(e) {
  2887. if(e == 1){
  2888. if (this.relationItemData.executorList == null) {
  2889. this.relationItemData.executorList = [];//初始化
  2890. }
  2891. this.relationItemData.executorList.push({executorId:null, planHours:this.user.timeType.allday});
  2892. this.gstimday.push(1)
  2893. this.gstimhour.push(this.user.timeType.allday)
  2894. this.$forceUpdate();
  2895. }else{
  2896. if (this.addForm.executorListFront == null) {
  2897. this.addForm.executorListFront = [];//初始化
  2898. }
  2899. this.addForm.executorListFront.push({executorId:null, planHours:this.user.timeType.allday});
  2900. this.gstimday.push(1)
  2901. this.gstimhour.push(this.user.timeType.allday)
  2902. this.$forceUpdate();
  2903. }
  2904. },
  2905. removeExecutorLine(index,e) {
  2906. if(e == 1){
  2907. this.relationItemData.executorList.splice(index,1);
  2908. this.gstimday.splice(index,1)
  2909. this.gstimhour.splice(index,1)
  2910. this.$forceUpdate();
  2911. }else{
  2912. this.addForm.executorListFront.splice(index,1);
  2913. this.gstimday.splice(index,1)
  2914. this.gstimhour.splice(index,1)
  2915. this.$forceUpdate();
  2916. }
  2917. },
  2918. renameStage(item) {
  2919. this.stageForm = JSON.parse(JSON.stringify(item));
  2920. this.addStageDialog = true;
  2921. },
  2922. deleteStage(item) {
  2923. var _this = this;
  2924. var param = {id:item.id, groupId: item.groupId};
  2925. this.$confirm(this.$t('detelecesTask'), this.$t('other.prompts'), {
  2926. //type: 'warning'
  2927. }).then(() => {
  2928. this.http.post('/stages/delete',param,
  2929. res => {
  2930. if (res.code == "ok") {
  2931. // this.stageList = res.data;
  2932. this.getStageList();
  2933. } else {
  2934. this.$message({
  2935. message: res.msg,
  2936. type: "error"
  2937. });
  2938. }
  2939. },
  2940. error => {
  2941. this.$message({
  2942. message: error,
  2943. type: "error"
  2944. });
  2945. });
  2946. });
  2947. },
  2948. //加载项目内的任务列表
  2949. getStageList() {
  2950. this.integrationTaskNingwai = {
  2951. groupId: this.selectedGroup.id,
  2952. projectId: this.selectedGroupprojectId,
  2953. order: this.order,
  2954. isDesc: this.isDesc
  2955. }
  2956. this.http.post('/stages/list',{groupId: this.selectedGroup.id, projectId: this.selectedGroup.projectId, order: this.order, isDesc: this.isDesc,hideCompleted: this.hideCompleted},
  2957. res => {
  2958. if (res.code == "ok") {
  2959. this.stageList = res.data.list;
  2960. this.canAddTask = res.data.canAddTask
  2961. this.canEditStageList = res.data.canEditStageList
  2962. this.timess() // 处理时间的方法
  2963. } else {
  2964. this.$message({
  2965. message: res.msg,
  2966. type: "error"
  2967. });
  2968. }
  2969. },
  2970. error => {
  2971. this.$message({
  2972. message: error,
  2973. type: "error"
  2974. });
  2975. });
  2976. },
  2977. timess(){
  2978. // console.log('timess');
  2979. var date = new Date()
  2980. let Y = date.getFullYear()
  2981. let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
  2982. let D = date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate()
  2983. this.times = `${Y}-${M}-${D}`
  2984. },
  2985. addStagePost() {
  2986. console.log('新增任务列表');
  2987. let param = JSON.parse(JSON.stringify(this.stageForm));
  2988. param.taskList = [];
  2989. this.http.post('/stages/save',param,
  2990. res => {
  2991. if (res.code == "ok") {
  2992. this.addStageDialog = false;
  2993. this.stageList = res.data;
  2994. } else {
  2995. this.$message({
  2996. message: res.msg,
  2997. type: "error"
  2998. });
  2999. }
  3000. },
  3001. error => {
  3002. this.$message({
  3003. message: error,
  3004. type: "error"
  3005. });
  3006. });
  3007. },
  3008. addStage() {
  3009. this.addStageDialog = true;
  3010. this.stageForm = {groupId: this.selectedGroup.id, projectId: this.curProjectId, stagesTime: 0};
  3011. },
  3012. viewChange(index, indexPath) {
  3013. this.groupType = 1;
  3014. this.order = "create_date";
  3015. this.isDesc = true;
  3016. this.selectedGroup = this.viewList.filter(g=>g.id == index)[0];
  3017. this.getViewTaskList();
  3018. this.displayTable = true;
  3019. this.taskListPage = 1
  3020. } ,
  3021. groupChange(index, indexPath) {
  3022. console.log('店家了')
  3023. this.groupType = 0;
  3024. this.order = "seq";
  3025. this.isDesc = false;
  3026. this.selectedGroup = this.groupList.filter(g=>g.id == index)[0];
  3027. this.groupResponsibleId = this.selectedGroup.inchargerId
  3028. this.getStageList();
  3029. this.displayTable = false;
  3030. this.$forceUpdate()
  3031. },
  3032. //本地搜索组
  3033. startSearchGroup() {
  3034. if (this.groupSearch != null || this.groupSearch.length > 0) {
  3035. this.groupList = this.allGroupData.filter(g=>g.name.indexOf(this.groupSearch) >= 0);
  3036. } else {
  3037. this.groupList = this.allGroupData;
  3038. }
  3039. },
  3040. editIncharger(item) {
  3041. this.groupForm = JSON.parse(JSON.stringify(item));
  3042. this.setInchargerDialog = true;
  3043. },
  3044. setManDay(item) {
  3045. this.groupForm = JSON.parse(JSON.stringify(item));
  3046. this.modGroupManDayDialog = true;
  3047. },
  3048. renameGroup(item) {
  3049. this.groupForm = JSON.parse(JSON.stringify(item));
  3050. this.modGroupDialog = true;
  3051. },
  3052. deleteGroup(item) {
  3053. var _this = this;
  3054. this.$confirm(this.$t('tasksgroupsDetalses'), this.$t('other.prompts'), {
  3055. type: 'warning'
  3056. }).then(() => {
  3057. this.http.post('/task-group/delete',item,
  3058. res => {
  3059. if (res.code == "ok") {
  3060. this.groupList = res.data;
  3061. if (item.id == this.selectedGroup.id) {
  3062. //之前选中的分组被删除了
  3063. if (this.groupList.length > 0) {
  3064. this.defaultGroupId = this.groupList[0].id;
  3065. this.selectedGroup = this.groupList[0];
  3066. this.groupChange(this.defaultGroupId)
  3067. } else {
  3068. this.selectedGroup = {};
  3069. }
  3070. }
  3071. } else {
  3072. this.$message({
  3073. message: res.msg,
  3074. type: "error"
  3075. });
  3076. }
  3077. },
  3078. error => {
  3079. this.$message({
  3080. message: error,
  3081. type: "error"
  3082. });
  3083. });
  3084. });
  3085. },
  3086. getGroupDetails(obj) {
  3087. this.http.post('/task-group/detail',{
  3088. groupId: obj.id
  3089. },
  3090. res => {
  3091. if (res.code == "ok") {
  3092. this.groupDetailsShow = true
  3093. this.groupDetailData = res.data
  3094. this.groupDetailTil = obj.name + ' - '+this.$t('groupdetails')
  3095. } else {
  3096. this.$message({
  3097. message: res.msg,
  3098. type: "error"
  3099. });
  3100. }
  3101. },
  3102. error => {
  3103. this.$message({
  3104. message: error,
  3105. type: "error"
  3106. });
  3107. });
  3108. },
  3109. addTemplateGroup() {
  3110. // var param = JSON.parse(JSON.stringify(this.groupTemplateList.filter(g=>g.selected)[0]));
  3111. // delete param.stagesList;
  3112. // param.projectId = this.curProjectId;
  3113. // var k = this.groupTemplateList[this.sidebarIndex].name
  3114. // var s = null;
  3115. // var xmz = this.groupList.forEach(function(a, b, c){
  3116. // if (a.name == k) {
  3117. // s = true
  3118. // return
  3119. // }
  3120. // })
  3121. // if (s){
  3122. // this.addGroupDialog = false;
  3123. // this.$message({
  3124. // message: '当前项目已存在分组['+k+'],请修改组名后重试。',
  3125. // type: "error"
  3126. // });
  3127. // return
  3128. // }
  3129. var param = JSON.parse(JSON.stringify(this.groupTemplateList.filter(g=>g.selected)))
  3130. console.log(param, '你看看啊')
  3131. for(var i in param) {
  3132. delete param[i].stagesList
  3133. }
  3134. if(param.length < 1) {
  3135. this.$message({
  3136. message: this.$t('qngxuanz'),
  3137. type: "error"
  3138. });
  3139. return
  3140. }
  3141. console.log(this.groupList)
  3142. var s = null
  3143. var k = ''
  3144. var xmz = this.groupList.forEach(function(a, b, c){
  3145. param.forEach((g, i) =>{
  3146. if(a.name == g.name) {
  3147. s = true
  3148. k = g.name
  3149. return
  3150. }
  3151. })
  3152. })
  3153. if (s){
  3154. this.addGroupDialog = false;
  3155. this.$message({
  3156. message: this.$t('projectalreadyhasgroup')+'['+k+'],'+this.$t('changethegroupname'),
  3157. type: "error"
  3158. });
  3159. return
  3160. }
  3161. console.log('将要闯过去的值', param)
  3162. // return
  3163. // this.http.post('/task-group/createFromTemplate',param,
  3164. this.http.post('/task-group/createFromTemplate',{
  3165. templateJson: JSON.stringify(param),
  3166. projectId: this.curProjectId
  3167. },
  3168. res => {
  3169. if (res.code == "ok") {
  3170. this.selectedGroup = res.data
  3171. this.sleectId = res.data.id
  3172. this.sleectProjectId = res.data.projectId
  3173. this.addGroupDialog = false;
  3174. // this.getTaskGroups();
  3175. this.getTaskGroup();
  3176. } else {
  3177. this.$message({
  3178. message: res.msg,
  3179. type: "error"
  3180. });
  3181. }
  3182. },
  3183. error => {
  3184. this.$message({
  3185. message: error,
  3186. type: "error"
  3187. });
  3188. });
  3189. },
  3190. setManDayData() {
  3191. this.http.post('/task-group/saveManDay',{data:JSON.stringify(this.groupList)},
  3192. res => {
  3193. if (res.code == "ok") {
  3194. this.modGroupManDayDialog = false;
  3195. this.groupList = res.data;
  3196. } else {
  3197. this.$message({
  3198. message: res.msg,
  3199. type: "error"
  3200. });
  3201. }
  3202. },
  3203. error => {
  3204. this.$message({
  3205. message: error,
  3206. type: "error"
  3207. });
  3208. });
  3209. },
  3210. // 重新定义了 addGroup 方法
  3211. addGroup(formName) {
  3212. // return
  3213. this.$refs[formName].validate((valid) => {
  3214. if (valid) {
  3215. this.http.post('/task-group/save',this.groupForm,
  3216. res => {
  3217. if (res.code == "ok") {
  3218. this.groupList = res.data;
  3219. this.addGroupDialog = false;
  3220. this.modGroupDialog = false;
  3221. if (this.selectedGroup.id !== this.groupForm.id) {
  3222. this.selectedGroup = this.groupList.filter(g=>g.new)[0];
  3223. }
  3224. this.defaultGroupId = this.groupList[this.groupList.length - 1].id
  3225. // this.getTaskGroup();
  3226. this.getStageList()
  3227. } else {
  3228. this.$message({
  3229. message: res.msg,
  3230. type: "error"
  3231. });
  3232. }
  3233. },
  3234. error => {
  3235. this.$message({
  3236. message: error,
  3237. type: "error"
  3238. });
  3239. });
  3240. } else {
  3241. console.log('error submit!!');
  3242. return false;
  3243. }
  3244. });
  3245. },
  3246. createGroup() {
  3247. this.addGroupDialog = true;
  3248. this.groupForm = {projectId: this.curProjectId};
  3249. },
  3250. getInsideData() {
  3251. this.getTaskGroups();
  3252. },
  3253. //加载项目内的任务分组
  3254. getTaskGroups() {
  3255. this.http.post('/task-group/list',{projectId: this.curProjectId},
  3256. res => {
  3257. if (res.code == "ok") {
  3258. const { companyId } = this.user
  3259. this.allGroupData = res.data;
  3260. // if(companyId == '3092') {
  3261. res.data.forEach(item => {
  3262. item.disabled = Boolean(item.manDay);
  3263. });
  3264. this.groupList = res.data;
  3265. // } else {
  3266. // this.groupList = res.data;
  3267. // }
  3268. console.log(this.groupList,'grouplist');
  3269. if (this.groupList.length > 0) {
  3270. this.defaultGroupId = this.groupList[0].id;
  3271. this.selectedGroup = this.groupList[0];
  3272. this.groupResponsibleId = this.groupList[0].inchargerId;
  3273. this.getUserConfig();
  3274. } else {
  3275. //清空任务列表
  3276. this.defaultGroupId = null;
  3277. this.selectedGroup = null;
  3278. this.stageList = [];
  3279. }
  3280. } else {
  3281. this.$message({
  3282. message: res.msg,
  3283. type: "error"
  3284. });
  3285. }
  3286. },
  3287. error => {
  3288. this.$message({
  3289. message: error,
  3290. type: "error"
  3291. });
  3292. });
  3293. },
  3294. // 获取用户配置
  3295. getUserConfig() {
  3296. this.http.post('/user-config/getUserConfig',{},
  3297. res => {
  3298. if (res.code == "ok") {
  3299. if(res.data != undefined){
  3300. if(res.data.hideCompletedTask == 0){
  3301. this.hideCompleted = false;
  3302. }else if(res.data.hideCompletedTask == 1){
  3303. this.hideCompleted = true;
  3304. }
  3305. }
  3306. this.getStageList();
  3307. }
  3308. },
  3309. error => {
  3310. this.$message({
  3311. message: error,
  3312. type: "error"
  3313. });
  3314. });
  3315. },
  3316. //更改隐藏已完成任务选项
  3317. editHideTask() {
  3318. this.getStageList();
  3319. var hideSwitch;
  3320. if(this.hideCompleted == false){
  3321. hideSwitch = 0;
  3322. }else if(this.hideCompleted == true){
  3323. hideSwitch = 1;
  3324. }
  3325. this.http.post('/user-config/editUserConfig',{hideCompletedTask: hideSwitch},
  3326. res => {
  3327. },
  3328. error => {
  3329. this.$message({
  3330. message: error,
  3331. type: "error"
  3332. });
  3333. });
  3334. },
  3335. // 额外加的
  3336. getTaskGroup() {
  3337. this.http.post('/task-group/list',{projectId: this.curProjectId},
  3338. res => {
  3339. if (res.code == "ok") {
  3340. this.allGroupData = res.data;
  3341. this.groupList = res.data;
  3342. if (this.groupList.length > 0) {
  3343. this.defaultGroupId = this.sleectId;
  3344. this.selectedGroup = this.groupList[res.data.length - 1];
  3345. this.getStageList();
  3346. } else {
  3347. //清空任务列表
  3348. this.defaultGroupId = null;
  3349. this.selectedGroup = null;
  3350. this.stageList = [];
  3351. }
  3352. } else {
  3353. this.$message({
  3354. message: res.msg,
  3355. type: "error"
  3356. });
  3357. }
  3358. },
  3359. error => {
  3360. this.$message({
  3361. message: error,
  3362. type: "error"
  3363. });
  3364. });
  3365. },
  3366. //切换项目
  3367. onProjectChange() {
  3368. let path = this.$route.path;
  3369. path = path.substring(0,path.lastIndexOf('/'))+'/'+this.curProjectId;
  3370. this.$router.push(path);
  3371. this.getTaskGroups();
  3372. this.getDetail()
  3373. this.$refs.fileCenter.refreshPage();
  3374. this.$refs.projectInfo.refreshPage();
  3375. this.$refs.summary.refreshPage();
  3376. this.$refs.costbaseline.refreshPage();
  3377. // this.$refs.earning.refreshPage();
  3378. if(this.user.companyId == '936') {
  3379. this.$refs.projectInfo.getKeyNodes()
  3380. }
  3381. },
  3382. //获取我的项目列表
  3383. getMyProjectList() {
  3384. this.http.post('/project/getProjectList', {
  3385. },
  3386. res => {
  3387. if (res.code == "ok") {
  3388. this.projectList = res.data;
  3389. console.log('getprojectlist',res.data);
  3390. } else {
  3391. this.$message({
  3392. message: res.msg,
  3393. type: "error"
  3394. });
  3395. }
  3396. },
  3397. error => {
  3398. this.$message({
  3399. message: error,
  3400. type: "error"
  3401. });
  3402. });
  3403. },
  3404. menuSelect() {
  3405. },
  3406. toList() {
  3407. this.$router.push("/list");
  3408. },
  3409. searchList() {
  3410. this.page = 1;
  3411. this.getList();
  3412. },
  3413. //显示用户详情
  3414. showUser(userId) {
  3415. this.userDetailVisible = true;
  3416. this.http.post(this.port.manage.userDetail, {
  3417. userId: userId
  3418. },
  3419. res => {
  3420. if (res.code == "ok") {
  3421. this.userDetail = res.data;
  3422. } else {
  3423. this.$message({
  3424. message: res.msg,
  3425. type: "error"
  3426. });
  3427. }
  3428. },
  3429. error => {
  3430. this.$message({
  3431. message: error,
  3432. type: "error"
  3433. });
  3434. });
  3435. },
  3436. getUsers() {
  3437. // this.http.post(this.port.manage.list, {
  3438. // departmentId: -1,
  3439. // pageIndex: 1,
  3440. // pageSize: -1
  3441. // },
  3442. this.http.post('/user/getSimpleActiveUserList', {},
  3443. res => {
  3444. if (res.code == "ok") {
  3445. this.users = res.data;
  3446. } else {
  3447. this.$message({
  3448. message: res.msg,
  3449. type: "error"
  3450. });
  3451. }
  3452. },
  3453. error => {
  3454. this.$message({
  3455. message: error,
  3456. type: "error"
  3457. });
  3458. });
  3459. },
  3460. //获取项目列表
  3461. getList() {
  3462. this.listLoading = true;
  3463. this.http.post(this.port.project.listPage, {
  3464. pageIndex: this.page,
  3465. pageSize: this.size,
  3466. keyword:this.keyword,
  3467. searchField: this.searchField,
  3468. },
  3469. res => {
  3470. this.listLoading = false;
  3471. if (res.code == "ok") {
  3472. var list = res.data.records;
  3473. for(var i in list) {
  3474. var participator = list[i].participator , str = "";
  3475. for(var j in participator) {
  3476. if(j == participator.length-1) {
  3477. str += participator[j].name
  3478. } else {
  3479. str += participator[j].name + ','
  3480. }
  3481. }
  3482. list[i].userNames = str;
  3483. }
  3484. this.list = list;
  3485. this.total = res.data.total;
  3486. } else {
  3487. this.$message({
  3488. message: res.msg,
  3489. type: "error"
  3490. });
  3491. }
  3492. },
  3493. error => {
  3494. this.listLoading = false;
  3495. this.$message({
  3496. message: error,
  3497. type: "error"
  3498. });
  3499. });
  3500. },
  3501. submitInsert() {
  3502. if (this.textContent !== true) return this.$message({
  3503. showClose: true,
  3504. message: this.$t('pictureistoolargepleaseuploaditagain'),
  3505. type: 'warning'
  3506. });
  3507. //检查是有重名的执行人
  3508. var exeList = this.addForm.executorListFront;
  3509. // for(let i=0;i<this.gstimhour.length;i++){
  3510. // exeList[i].planHours = this.gstimhour[i]
  3511. // }
  3512. for (var i=0;i<exeList.length;i++) {
  3513. var findSameUser = false;
  3514. exeList[i].planHours = this.gstimhour[i]
  3515. for (var j=i+1;j<exeList.length; j++) {
  3516. if (exeList[i].executorId && exeList[j].executorId && exeList[i].executorId == exeList[j].executorId) {
  3517. findSameUser = true;
  3518. break;
  3519. }
  3520. }
  3521. if (findSameUser) {
  3522. return this.$message({
  3523. showClose: true,
  3524. message: this.$t('executorhasduplication'),
  3525. type: 'error'
  3526. });
  3527. }
  3528. }
  3529. if(this.addForm.startDate && this.addForm.endDate) {
  3530. if(this.addForm.endDate < this.addForm.startDate) {
  3531. return this.$message({
  3532. showClose: true,
  3533. message: this.$t('ren-wu-jie-zhi-shi-jian-bu-neng-xiao-yu-kai-shi-shi-jian'),
  3534. type: 'error'
  3535. });
  3536. }
  3537. }
  3538. this.$refs.form1.validate(valid => {
  3539. if (valid) {
  3540. delete this.addForm.subTaskList;
  3541. delete this.addForm.refTaskList;
  3542. delete this.addForm.progress;
  3543. //去掉没有执行人的.(因为要有计划工时,执行人可以暂不设置)
  3544. // this.addForm.executorListFront = this.addForm.executorListFront.filter(exe=>exe.executorId);
  3545. this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
  3546. this.addLoading = true;
  3547. this.http.post('/task/save',this.addForm,
  3548. res => {
  3549. this.addLoading = false;
  3550. if (res.code == "ok") {
  3551. this.$message({
  3552. message: this.$t('message.submittedSuccessfully'),
  3553. type: "success"
  3554. });
  3555. if (this.addForm.parentTid == null) {
  3556. this.addFormVisible = false;
  3557. if (this.groupType == 0) {
  3558. this.getStageList();
  3559. } else {
  3560. this.getViewTaskList();
  3561. }
  3562. } else {
  3563. this.backToParentTask();
  3564. }
  3565. } else {
  3566. this.$message({
  3567. message: res.msg,
  3568. type: "error"
  3569. });
  3570. }
  3571. },
  3572. error => {
  3573. this.$message({
  3574. message: error,
  3575. type: "error"
  3576. });
  3577. }
  3578. );
  3579. }
  3580. });
  3581. },
  3582. DateChange(){
  3583. if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
  3584. let stdate = Date.parse(this.addForm.startDate)
  3585. let eddate = Date.parse(this.addForm.endDate)
  3586. if(stdate <= eddate){
  3587. let days = (eddate - stdate) / (1*24*60*60*1000) + 1
  3588. for (let i=0;i<this.gstimday.length;i++) {
  3589. this.gstimday[i] = days
  3590. this.gstimhour[i] = days * this.user.timeType.allday
  3591. }
  3592. this.$forceUpdate()
  3593. }
  3594. // console.log("gstimday",this.gstimday);
  3595. }
  3596. },
  3597. // 删除
  3598. deletePro(i, item) {
  3599. this.$confirm(this.$t('identifytheproject') + item.projectName + this.$t('ma'),this.$t('deletetheproject'), {
  3600. confirmButtonText: this.$t('btn.determine'),
  3601. cancelButtonText: this.$t('btn.cancel'),
  3602. type: "warning"
  3603. })
  3604. .then(() => {
  3605. this.listLoading = true;
  3606. this.http.post(this.port.project.delete,{
  3607. id: item.id
  3608. },
  3609. res => {
  3610. this.listLoading = false;
  3611. if (res.code == "ok") {
  3612. this.$message({
  3613. message: this.$t('message.successfullyDeleted'),
  3614. type: "success"
  3615. });
  3616. this.getList();
  3617. } else {
  3618. this.$message({
  3619. message: res.msg,
  3620. type: "error"
  3621. });
  3622. }
  3623. },
  3624. error => {
  3625. this.listLoading = false;
  3626. this.$message({
  3627. message: error,
  3628. type: "error"
  3629. });
  3630. }
  3631. );
  3632. })
  3633. .catch(() => {});
  3634. },
  3635. detail(i) {
  3636. this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
  3637. },
  3638. getDetail() {
  3639. this.http.post('/project/detail',{
  3640. id: this.curProjectId
  3641. },
  3642. res => {
  3643. if (res.code == "ok") {
  3644. this.currentProject = res.data;
  3645. this.getjurisdictionIds(this.currentProject)
  3646. this.joinMembList = this.currentProject.participationList;
  3647. this.isManageDept = this.currentProject.manageDept;
  3648. } else {
  3649. }
  3650. },
  3651. error => {
  3652. this.$message({
  3653. message: error,
  3654. type: "error"
  3655. });
  3656. }
  3657. );
  3658. },
  3659. getjurisdictionIds(pro){
  3660. console.log('pro',pro.creatorId);
  3661. this.projectCreatorId = pro.creatorId
  3662. this.projectInchargerId = pro.inchargerId
  3663. },
  3664. // 自定义组件事件
  3665. selectCal(obj) {
  3666. if(obj.distinction == '1') {
  3667. this.addForm.executorListFront[obj.index].executorId = obj.id
  3668. } else if(obj.distinction == '2') {
  3669. this.groupForm.inchargerId = obj.id
  3670. }
  3671. },
  3672. // 企业微信搜索
  3673. echartDepartment() {
  3674. console.log('我点击了搜索')
  3675. if(this.participantsFilterText != '') {
  3676. this.filterNodeFlag = true
  3677. this.http.post("/user/getEmployeeList", {
  3678. keyword: this.participantsFilterText,
  3679. cursor: '',
  3680. departmentId: -1,
  3681. pageIndex: 1,
  3682. pageSize: 1000
  3683. },
  3684. res => {
  3685. if (res.code == "ok") {
  3686. // var list = res.data.data;
  3687. // this.setUserToDept(list);
  3688. // this.deptMembData = list;
  3689. // this.$forceUpdate()
  3690. this.filterNodePersonnel = res.data.records.map(item => item.name)
  3691. this.$refs.chooseMembTree2.filter(this.participantsFilterText);
  3692. } else {
  3693. this.$message({
  3694. message: res.msg,
  3695. type: "error"
  3696. });
  3697. }
  3698. this.filterNodeFlag = false
  3699. },
  3700. error => {
  3701. this.filterNodeFlag = false
  3702. this.$message({
  3703. message: error,
  3704. type: "error"
  3705. });
  3706. });
  3707. }
  3708. },
  3709. setUserToDept(list) {
  3710. for (var i in list) {
  3711. if (list[i].children != null) {
  3712. this.setUserToDept(list[i].children);
  3713. }
  3714. if (list[i].userList != null) {
  3715. if (list[i].children == null) {
  3716. list[i].children = [];
  3717. }
  3718. list[i].userList.forEach(element => {
  3719. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  3720. list[i].children.push(obj);
  3721. });
  3722. }
  3723. }
  3724. }
  3725. },
  3726. created() {
  3727. let height = window.innerHeight;
  3728. this.tableHeight = height - 135;
  3729. this.stageListHeight = this.tableHeight - 45;
  3730. this.taskListinH = this.stageListHeight - 75;
  3731. const that = this;
  3732. window.onresize = function temp() {
  3733. that.tableHeight = window.innerHeight - 135;
  3734. that.stageListHeight = that.tableHeight - 45;
  3735. that.taskListinH = that.stageListHeight - 75;
  3736. };
  3737. setTimeout(function(){
  3738. that.componentFlg = true
  3739. }, 1000)
  3740. },
  3741. mounted() {
  3742. this.curProjectId = parseInt(this.$route.params.id);
  3743. this.activeName = this.$route.path.split("/")[1];
  3744. this.getDetail();
  3745. this.getUsers();
  3746. this.getMyProjectList();
  3747. this.getInsideData();
  3748. this.getGroupTemplate();
  3749. }
  3750. };
  3751. </script>
  3752. <style lang="scss" scoped>
  3753. .hideCompletedFelx {
  3754. display: flex;
  3755. align-items: center;
  3756. justify-content: flex-end;
  3757. }
  3758. .Daily p {
  3759. margin: 0 !important;
  3760. padding: 0 0 10px 0 !important;
  3761. }
  3762. .sub-all {
  3763. div {
  3764. display: inline-block;
  3765. padding: 0 20px;
  3766. font-size: 20px;
  3767. cursor: pointer;
  3768. }
  3769. .subOn {
  3770. color: #66b1ff;
  3771. }
  3772. }
  3773. .DailyBody {
  3774. margin: 0 20px;
  3775. }
  3776. .Daily{
  3777. height: 120%;
  3778. overflow: auto;
  3779. }
  3780. </style>
  3781. <style >
  3782. .taskCardCircleBox{
  3783. padding-left: 5px;
  3784. display: flex;
  3785. justify-content: left;
  3786. align-items: center;
  3787. }
  3788. .flip-list-move {
  3789. transition: transform 0.5s;
  3790. }
  3791. .no-move {
  3792. transition: transform 0s;
  3793. }
  3794. .taskStage {
  3795. margin:10px;
  3796. display:inline-block;
  3797. vertical-align:top;
  3798. width: 331px;
  3799. }
  3800. .taskList {
  3801. padding:7px;
  3802. width:331px;
  3803. }
  3804. .taskListin{
  3805. width: 317px;
  3806. overflow: auto;
  3807. }
  3808. .taskList .stage {
  3809. font-weight:bold;
  3810. display:block;
  3811. float:left;
  3812. width:260px;
  3813. overflow: auto;
  3814. }
  3815. .taskGroupClass {
  3816. width: 180px;
  3817. display: inline-block;
  3818. text-overflow: ellipsis;
  3819. overflow: hidden;
  3820. white-space: nowrap;
  3821. }
  3822. .taskCard {
  3823. background: #fff;
  3824. margin: 5px 0px;
  3825. padding:5px;
  3826. border: 1px solid #e6e6e6;
  3827. border-radius: 3px;
  3828. box-shadow: 3px 3px 3px #e6e6e6;
  3829. min-height:60px;
  3830. position: relative;
  3831. border-radius: 3px;
  3832. overflow: hidden;
  3833. width: 288px;
  3834. }
  3835. .taskImg {
  3836. position: absolute;
  3837. box-sizing: border-box;
  3838. width: 100%;
  3839. height: 100%;
  3840. top: 0;
  3841. left: 0;
  3842. }
  3843. .taskImg img{
  3844. position: absolute;
  3845. top: -1px;
  3846. }
  3847. .hong:hover {
  3848. border-top: 1px solid #ff0000;
  3849. }
  3850. .huang:hover {
  3851. border-top: 1px solid #ff9600;
  3852. }
  3853. .hui:hover {
  3854. border-top: 1px solid #c9c9c9;
  3855. }
  3856. .taskCard:hover {
  3857. cursor: move;
  3858. }
  3859. .chosen {
  3860. background-color: #000 !important;
  3861. color: #fff;
  3862. }
  3863. .ghost {
  3864. background-color: #fafafa !important;
  3865. }
  3866. .taskCard .cb {
  3867. margin-right:5px;
  3868. }
  3869. .item {
  3870. background:#fff;
  3871. }
  3872. .input-with-select .el-input-group__prepend {
  3873. background-color: #fff;
  3874. }
  3875. .el-tabs__item {
  3876. height:45px ;
  3877. }
  3878. .projectCls {
  3879. margin-left:10px;margin-right:10px;
  3880. }
  3881. .heavyTxt {
  3882. font-weight:bold;
  3883. }
  3884. .el-tabs__nav-wrap::after {
  3885. height:0.5px;
  3886. }
  3887. .user_name_icon {
  3888. text-align: right;
  3889. border-radius: 50%;
  3890. color: #fff;
  3891. float: right;
  3892. font-size: 10px;
  3893. width: 30px;
  3894. height: 30px;
  3895. line-height: 30px;
  3896. transform: scale(.8);
  3897. overflow: hidden;
  3898. letter-spacing: 1px;
  3899. box-sizing: border-box;
  3900. padding-right: 1.5px;
  3901. direction: rtl;
  3902. letter-spacing: 1.5px;
  3903. }
  3904. .task_name {
  3905. color:#262626;
  3906. display:inline-block;
  3907. max-width: 235px;
  3908. height: 25px;
  3909. overflow: hidden;
  3910. white-space: nowrap;
  3911. text-overflow: ellipsis;
  3912. }
  3913. .task_name span{
  3914. position: relative;
  3915. top: 8px;
  3916. }
  3917. .cb {
  3918. position: relative;
  3919. top: -2px;
  3920. }
  3921. .group_style {
  3922. border-radius: 5px;margin:2px 0px 2px 0px;height:40px;line-height:40px;
  3923. }
  3924. .el-tabs__nav-wrap::after {
  3925. height:1px;
  3926. }
  3927. .el-tabs__header {
  3928. margin:0 !important;
  3929. }
  3930. .single_line {
  3931. overflow: hidden;text-overflow:ellipsis;white-space: nowrap;
  3932. }
  3933. .sub_task_num {
  3934. font-size:10px;
  3935. color:#666;
  3936. }
  3937. .template_box {
  3938. margin:20px 0px;
  3939. }
  3940. /* 项目阶段侧边栏样式 */
  3941. .sidebar {
  3942. width: 2px;
  3943. background: #dddddd;
  3944. position: relative;
  3945. }
  3946. .sidebar:hover {
  3947. background: #20a0ff;
  3948. }
  3949. .sidebar:hover .etui {
  3950. background: #20a0ff;
  3951. border: #20a0ff;
  3952. color: #fff;
  3953. }
  3954. .etui {
  3955. width: 15px;
  3956. height: 40px;
  3957. background: #fff;
  3958. border: 1px solid #dddddd;
  3959. position: absolute;
  3960. top: 50%;
  3961. left: 0%;
  3962. transform: translate(6%, -50%);
  3963. color: rgb(192, 191, 191);
  3964. box-sizing: border-box;
  3965. }
  3966. .etui i {
  3967. display: inline-block;
  3968. padding-top: 90%;
  3969. /* padding-left: 15%; */
  3970. font-weight: bold;
  3971. }
  3972. /* bug问题 */
  3973. .task {
  3974. box-sizing: border-box;
  3975. padding-left: 10px;
  3976. padding-right: 5px;
  3977. }
  3978. /* 评论部分 */
  3979. .remark {
  3980. width: 500px;
  3981. height: 100%;
  3982. background: #fff;
  3983. position: absolute;
  3984. top: 0;
  3985. right: -500px;
  3986. border-left: 3px solid #dddddd;
  3987. }
  3988. .jm {
  3989. margin-left: -500px;
  3990. }
  3991. .bj {
  3992. float: left;
  3993. width: 90%;
  3994. overflow: hidden;
  3995. height: 65px;
  3996. white-space: nowrap;
  3997. text-overflow: ellipsis;
  3998. }
  3999. .bj span {
  4000. width: 50px;
  4001. height: 50px;
  4002. display: inline-block;
  4003. border-radius: 50%;
  4004. color: #fff;
  4005. text-align: center;
  4006. float: left;
  4007. margin-right: 20px;
  4008. /* margin-top: 10px; */
  4009. line-height: 50px;
  4010. }
  4011. .player {
  4012. height: 15%;
  4013. box-sizing: border-box;
  4014. padding-left: 15px;
  4015. border-bottom: 1px solid #dddddd;
  4016. }
  4017. .player p {
  4018. margin: 0;
  4019. padding: 2% 0;
  4020. font-size: 18px;
  4021. }
  4022. .player .el-image {
  4023. border-radius: 50%;
  4024. margin-right: 10px;
  4025. }
  4026. .subject {
  4027. height: 60%;
  4028. box-sizing: border-box;
  4029. }
  4030. .sub-all {
  4031. font-size: 20px;
  4032. padding: 15px 0 15px 15px;
  4033. }
  4034. .sub-details {
  4035. width: 100%;
  4036. height: 38vh;
  4037. padding-right: 15px;
  4038. box-sizing: border-box;
  4039. overflow: hidden;
  4040. overflow-y: scroll
  4041. }
  4042. .sub-details li {
  4043. list-style:none
  4044. }
  4045. /* 红色背景显示日期 */
  4046. .element_span {
  4047. display: inline-block;
  4048. background: #e62412;
  4049. color: #fff;
  4050. border-radius: 3px;
  4051. padding: 3px;
  4052. /* text-align: center; */
  4053. font-size: 12px;
  4054. margin-left: 5px;
  4055. }
  4056. .pro_btn{
  4057. display: inline-block;
  4058. float: right;
  4059. }
  4060. </style>
  4061. <style lang="scss" scoped>
  4062. .counli {
  4063. em {
  4064. font-style: normal;
  4065. display: inline-block;
  4066. margin-left: 9%;
  4067. }
  4068. span {
  4069. float: right;
  4070. }
  4071. }
  4072. .carts {
  4073. position: relative;
  4074. .el-image{
  4075. border-radius: 50%;
  4076. float: left;
  4077. width: 20%;
  4078. }
  4079. i {
  4080. width: 30px;
  4081. height: 30px;
  4082. // background: #778899;
  4083. display: inline-block;
  4084. float: left;
  4085. border-radius:50%;
  4086. font-style:normal;
  4087. font-size: 12px;
  4088. line-height: 30px;
  4089. text-align: center;
  4090. color: #fff;
  4091. background: #778899;
  4092. overflow: hidden;
  4093. direction: rtl;
  4094. }
  4095. div {
  4096. text-align: left;
  4097. p {
  4098. text-align: left;
  4099. margin-left: 10px;
  4100. margin-left: 13%;
  4101. }
  4102. em {
  4103. display: block;
  4104. font-style: normal;
  4105. margin-left: 13%;
  4106. }
  4107. }
  4108. span {
  4109. font-size: 10px;
  4110. float: right;
  4111. margin-top: -40px;
  4112. }
  4113. }
  4114. .issue {
  4115. // height: 20%;
  4116. // position: relative;
  4117. // z-index: 4;
  4118. .zh{
  4119. position: relative;
  4120. width: 100%;
  4121. height: 100%;
  4122. }
  4123. .textareays {
  4124. background: #000;
  4125. height: 140px;
  4126. border: 0;
  4127. .el-textarea__inner {
  4128. height: 85%;
  4129. }
  4130. }
  4131. .issue-button {
  4132. position: absolute;
  4133. bottom: 20px;
  4134. right: 20px;
  4135. }
  4136. }
  4137. .inputDeep {
  4138. position: absolute;
  4139. bottom: 85px;
  4140. width: 95%;
  4141. margin: 0 12px;
  4142. }
  4143. .inputDeep .el-textarea .el-textarea__inner{
  4144. border: 0 !important;
  4145. resize: none !important;
  4146. }
  4147. .inputDeeps .el-textarea__inner {
  4148. border: 0 !important;
  4149. resize: none !important;
  4150. }
  4151. .scop_span {
  4152. display: inline-block;
  4153. padding: 2px 5px;
  4154. }
  4155. </style>
  4156. <style>
  4157. .ql-snow .ql-picker.ql-size .ql-picker-label::before,
  4158. .ql-snow .ql-picker.ql-size .ql-picker-item::before {
  4159. content: "14px" !important;
  4160. position: relative;
  4161. top: -8px;
  4162. }
  4163. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
  4164. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
  4165. content: "10px" !important;
  4166. }
  4167. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
  4168. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
  4169. content: "18px" !important;
  4170. }
  4171. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
  4172. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
  4173. content: "32px" !important;
  4174. }
  4175. .ql-snow .ql-picker.ql-header .ql-picker-label::before,
  4176. .ql-snow .ql-picker.ql-header .ql-picker-item::before {
  4177. content: "文本" !important;
  4178. position: relative;
  4179. top: -8px;
  4180. }
  4181. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
  4182. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
  4183. content: "标题1" !important;
  4184. }
  4185. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
  4186. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
  4187. content: "标题2" !important;
  4188. }
  4189. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
  4190. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
  4191. content: "标题3" !important;
  4192. }
  4193. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
  4194. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
  4195. content: "标题4" !important;
  4196. }
  4197. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
  4198. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
  4199. content: "标题5" !important;
  4200. }
  4201. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
  4202. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
  4203. content: "标题6" !important;
  4204. }
  4205. .ql-snow .ql-picker.ql-font .ql-picker-label::before,
  4206. .ql-snow .ql-picker.ql-font .ql-picker-item::before {
  4207. content: "标准字体" !important;
  4208. }
  4209. .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
  4210. .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
  4211. content: "衬线字体" !important;
  4212. }
  4213. .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
  4214. .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
  4215. content: "等宽字体" !important;
  4216. }
  4217. /* .ql-picker-label {
  4218. position: relative;
  4219. } */
  4220. .ql-picker-label svg {
  4221. position: relative;
  4222. top: -6px;
  4223. }
  4224. /* 任务进展 */
  4225. .progress {
  4226. border: 1px solid #ddd;
  4227. border-radius: 5px;
  4228. width: 100%;
  4229. box-sizing: border-box;
  4230. padding: 15px;
  4231. position: relative;
  4232. margin-bottom: 20px;
  4233. }
  4234. .remind {
  4235. width: 95px;
  4236. height: 60%;
  4237. overflow-y:auto;
  4238. position: absolute;
  4239. background: #fff;
  4240. padding: 10px;
  4241. left: 0;
  4242. top: 0;
  4243. border: 1px solid #ddd;
  4244. z-index: 999999;
  4245. }
  4246. .rala1 .el-radio__input.is-checked + .el-radio__label {
  4247. color: #43d14f !important;
  4248. }
  4249. .rala1 .el-radio__input.is-checked .el-radio__inner {
  4250. background: #43d14f !important;
  4251. border-color: #43d14f !important;
  4252. }
  4253. .rala2 .el-radio__input.is-checked + .el-radio__label {
  4254. color: #fd7624 !important;
  4255. }
  4256. .rala2 .el-radio__input.is-checked .el-radio__inner {
  4257. background: #fd7624 !important;
  4258. border-color: #fd7624 !important;
  4259. }
  4260. .rala3 .el-radio__input.is-checked + .el-radio__label {
  4261. color: #fd4d47 !important;
  4262. }
  4263. .rala3 .el-radio__input.is-checked .el-radio__inner {
  4264. background: #fd4d47 !important;
  4265. border-color: #fd4d47 !important;
  4266. }
  4267. /* 任务进展列表 */
  4268. .elCard {
  4269. width: 100%;
  4270. padding: 15px;
  4271. box-sizing: border-box;
  4272. border: 1px solid #EBEEF5;
  4273. }
  4274. .elCard_qu {
  4275. float: right;
  4276. margin-right: 15px;
  4277. }
  4278. .integrity {
  4279. padding: 15px;
  4280. overflow-y: auto;
  4281. max-height: 300px;
  4282. }
  4283. .write {
  4284. float: right;
  4285. color: #1B9AEE;
  4286. }
  4287. .ssp {
  4288. position: absolute;
  4289. right: 140px;
  4290. top: 95px;
  4291. width: 66%;
  4292. height: 80%;
  4293. }
  4294. .examine {
  4295. width: 100%;
  4296. text-align: center;
  4297. }
  4298. .nones {
  4299. width: 100%;
  4300. height: 50px;
  4301. text-align: center;
  4302. color: #909399;
  4303. line-height: 50px;
  4304. border-top: 1px solid #EBEEF5;
  4305. border-bottom: 1px solid #EBEEF5;
  4306. font-size: 16px;
  4307. }
  4308. .icon {
  4309. /* color: rgb(67, 209, 79); */
  4310. display: block;
  4311. width: 12px;
  4312. height: 12px;
  4313. background: #fff;
  4314. position: absolute;
  4315. top: 0;
  4316. left: -33px;
  4317. border-radius: 50%;
  4318. border: 4px solid;
  4319. }
  4320. /* ddl */
  4321. .ddl {
  4322. height: 136px;
  4323. overflow: hidden;
  4324. border: 1px solid #EBEEF5
  4325. }
  4326. .tb{
  4327. position: relative;
  4328. }
  4329. .dpl{
  4330. position: absolute;
  4331. font-size: 20px;
  4332. left: -32px;
  4333. top: 0px;
  4334. }
  4335. </style>