projectInside.vue 202 KB

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