projectInside.vue 201 KB

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