projectInside.vue 228 KB

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