projectInside.vue 210 KB

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