projectInside.vue 210 KB

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