projectInside.vue 161 KB

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