projectInside.vue 228 KB

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