projectInside.vue 163 KB

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