projectInside.vue 121 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747
  1. <template>
  2. <section>
  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">
  8. <el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
  9. </el-select>
  10. <el-dropdown trigger="click" style="margin-right:30px;color:#262626;cursor:pointer;">
  11. <i class="iconfont firerock-iconcaidan" ></i>
  12. <el-dropdown-menu slot="dropdown">
  13. <el-dropdown-item v-if="currentProject.status == 1" @click.native="finishPro()">
  14. <i class="iconfont firerock-iconwancheng"></i>完成项目
  15. </el-dropdown-item>
  16. <el-dropdown-item divided v-if="currentProject.status == 1" @click.native="cancelPro()">
  17. <i class="el-icon-refresh-left"></i>撤销项目
  18. </el-dropdown-item>
  19. <el-dropdown-item v-if="currentProject.status == 2 || currentProject.status == 3" @click.native="startPro()">
  20. <i class="iconfont firerock-iconqidong"></i>重启项目
  21. </el-dropdown-item>
  22. </el-dropdown-menu>
  23. </el-dropdown>
  24. </template>
  25. </el-tab-pane>
  26. <el-tab-pane label="任务看板" name="projectInside">
  27. <el-container style="padding: 0px;">
  28. <el-aside :style="'padding-left:10px;padding-right:5px;height:'+tableHeight+'px;width:'+groupWidth+'px;'">
  29. <el-input v-model="groupSearch" size="small" placeholder="搜索分组" @input="startSearchGroup" style="margin-top:10px"/>
  30. <p ><span class="heavyTxt">任务分组</span> <i class="el-icon-plus pull-right" style="color:#666;margin-right:10px;" @click="createGroup"></i></p>
  31. <el-menu :default-active="defaultGroupId" ref="defaultMenu" class="el-menu-vertical-demo" @select="groupChange" style="border-right:none;">
  32. <el-menu-item :index="item.id" v-for="item in groupList" :key="item.id" class="group_style">
  33. <div slot="title">
  34. <span >{{item.name}}</span>
  35. <el-dropdown trigger="click" style="float:right;margin-right:-10px;">
  36. <i class="iconfont firerock-iconcaidan" ></i>
  37. <el-dropdown-menu slot="dropdown">
  38. <el-dropdown-item @click.native="copyGroup(item)">
  39. <i class="el-icon-document-copy"></i>
  40. 复制分组</el-dropdown-item>
  41. <el-dropdown-item divided @click.native="renameGroup(item)">
  42. <i class="el-icon-edit"></i>
  43. 修改组名</el-dropdown-item>
  44. <el-dropdown-item divided @click.native="addToTemplate(item)">
  45. <i class="el-icon-plus"></i>
  46. 设为模板</el-dropdown-item>
  47. <el-dropdown-item divided @click.native="editIncharger(item)">
  48. <i class="el-icon-user"></i>
  49. 设负责人</el-dropdown-item>
  50. <el-dropdown-item divided @click.native="deleteGroup(item)">
  51. <i class="el-icon-delete"></i>
  52. 删除分组</el-dropdown-item>
  53. </el-dropdown-menu>
  54. </el-dropdown>
  55. </div>
  56. </el-menu-item>
  57. </el-menu>
  58. <!--视图 -->
  59. <p ><span class="heavyTxt">视图</span></p>
  60. <el-menu :default-active="1" class="el-menu-vertical-demo" @select="viewChange" style="border-right:none;">
  61. <el-menu-item :index="item.id" v-for="item in viewList" :key="item.id" class="group_style">
  62. <div slot="title">
  63. <span >{{item.name}}</span>
  64. </div>
  65. </el-menu-item>
  66. </el-menu>
  67. </el-aside>
  68. <span :style="'background:#f0f0f0;width:1px;height:'+tableHeight+'px;'" @click="toggleGroup">
  69. </span>
  70. <!-- <span :style="'width:10px;height:'+tableHeight+'px;float:left;text-align:center;vertical-align:middle;'" @click="toggleGroup">
  71. <span :style="'width:1px;background:#20A0FF;height:'+tableHeight+'px;float:left;'"></span>
  72. <i class="el-icon-d-arrow-left" ></i>
  73. </span> -->
  74. <!-- 增加侧边栏的点击效果 -->
  75. <div class="sidebar" @click="retract()">
  76. <div class="etui">
  77. <i class="el-icon-arrow-left" ref="box"></i>
  78. </div>
  79. </div>
  80. <!-- 增加侧边栏的点击效果 -->
  81. <el-main style="background:#f7f7f7;padding:0px;">
  82. <el-row style="color:#999;margin-top:10px;padding: 0px 10px;" :gutter="10">
  83. <el-col :span="16">
  84. <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>
  85. </el-col>
  86. <el-col :span="4">
  87. <el-select v-model="order" size="small" style="background:#fff;display:inline-block;" @change="orderChange">
  88. <el-option v-for="item in orderList" :key="item.id" :label="item.name" :value="item.id">
  89. <span>{{item.name}}</span>
  90. </el-option>
  91. </el-select>
  92. </el-col>
  93. <el-col :span="4">
  94. <el-button icon="iconfont firerock-icondaochu" size="mini" @click="showExportDialog">导出</el-button>
  95. <el-button icon="iconfont firerock-icondaoru" size="mini" @click="importTaskDialog = true;importToStageId = stageList[0].id;">导入</el-button>
  96. </el-col>
  97. </el-row>
  98. <!-- <div style="color:#999;margin-top:10px;">
  99. <i v-if="selectedGroup != null" class="el-icon-arrow-left" style="margin-top:10px;">{{selectedGroup.name}}</i>
  100. </div> -->
  101. <div v-if="!displayTable">
  102. <draggable style="overflow-x:auto;white-space:nowrap;" @update="onMoveStage"
  103. v-model="stageList" group="stage" @start="stageDrag=true" @end="stageDrag=false;" draggable=".taskStage" >
  104. <!--每个阶段的拖拽 -->
  105. <!-- <transition-group > -->
  106. <v-flex class="taskStage" v-for="stage in stageList" :key="stage.id" :style="'height:'+stageListHeight+'px;'">
  107. <draggable group="task"
  108. class="taskList"
  109. :id="stage.id"
  110. dragClass="dragClass"
  111. ghostClass="ghost"
  112. @start="drag=true" @end="drag=false"
  113. @update="onChange" @add="onChange"
  114. draggable=".taskCard">
  115. <!--头部显示阶段名称,操作 -->
  116. <div slot="header" style="margin:10px 0px;cursor:move;" role="task">
  117. <span class="stage">{{stage.stagesName}}</span><span style="margin-left:10px;color:#303133;font-size:12px;">{{stage.taskList.length}}</span>
  118. <!-- <i class="el-icon-more" style="float:right;"></i> -->
  119. <el-dropdown trigger="click" style="float:right;cursor:pointer;">
  120. <i class="el-icon-more" ></i>
  121. <el-dropdown-menu slot="dropdown">
  122. <el-dropdown-item @click.native="addTask(stage)">
  123. <i class="el-icon-document-add"></i>
  124. 创建任务</el-dropdown-item>
  125. <el-dropdown-item @click.native="renameStage(stage)">
  126. <i class="el-icon-edit"></i>
  127. 重命名列表</el-dropdown-item>
  128. <el-dropdown-item divided @click.native="deleteStage(stage)">
  129. <i class="el-icon-delete"></i>删除列表</el-dropdown-item>
  130. </el-dropdown-menu>
  131. </el-dropdown>
  132. </div>
  133. <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;'">
  134. <!--任务卡片内容显示 -->
  135. <div>
  136. <div v-if="element.taskLevel == 2" class="taskImg hong"><img src="../../assets/image/hong.png" alt=""></div>
  137. <div v-if="element.taskLevel == 1" class="taskImg huang"><img src="../../assets/image/huang.png" alt=""></div>
  138. <div v-if="element.taskLevel == 0" class="taskImg hui"><img src="../../assets/image/hui.png" alt=""></div>
  139. <el-checkbox :disabled="element.taskStatus==2 || element.subTaskList.length > element.subTaskFinishNum" :checked="element.taskStatus==1?true:false" size="large" class="cb"
  140. @change="finishTask(element)"
  141. @click.stop.native=""
  142. ></el-checkbox>
  143. <el-tooltip class="item" effect="dark" :content="element.name" placement="top">
  144. <label class="task_name" :style="'background:'+(element.taskStatus==0?'#ffffff;':'#eFeFeF;')"><span>{{element.name}}</span></label>
  145. </el-tooltip>
  146. <i :class="taskTypeIcon[element.taskType]" :style="'float:right;color:'+taskTypeColor[element.taskType]+';margin-right:8px;margin-top:8px;'" ></i>
  147. </div>
  148. <div style="margin: 10px 0px;color:#666;" @click="timess(element.endDate)">
  149. <span v-if="element.endDate >= times || element.taskStatus == 1"><i v-if="element.endDate != null" class="el-icon-date">&nbsp;&nbsp;{{element.endDate}}</i></span>
  150. <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>
  151. <span v-if="element.executorName">
  152. <span v-for="(exeItem, exeIndex) in element.executorName.split(',')" :key="exeIndex" :style="'background:'+element.executorColor.split(',')[exeIndex]" class="user_name_icon">{{exeItem.length>2?exeItem.substring(exeItem.length-2, exeItem.length):exeItem}}</span>
  153. </span>
  154. <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>
  155. </div>
  156. <!--子任务 -->
  157. <div v-if="element.subTaskList.length > 0">
  158. <el-tooltip class="item" effect="dark" content="查看子任务" placement="top">
  159. <el-link class="sub_task_num" @click.stop.native="showSubTaskList(element)"><i class="iconfont firerock-icontree" ></i><span style="margin-left:5px;">{{element.subTaskFinishNum}}/{{element.subTaskList.length}}</span></el-link>
  160. </el-tooltip>
  161. </div>
  162. </div>
  163. <el-button slot="footer" role="people" @click="addTask(stage)" style="width:100%;" size="small" icon="el-icon-plus"></el-button>
  164. </draggable>
  165. </v-flex>
  166. <!-- </transition-group > -->
  167. <el-button slot="footer" v-if="selectedGroup != null" @click="addStage" class="taskList" icon="el-icon-plus" style="margin-top:30px;">新建任务列表</el-button>
  168. </draggable>
  169. </div>
  170. <!--列表-->
  171. <el-table v-if="displayTable" :data="taskDataList"
  172. :header-cell-style="{'font-weight':'normal'}"
  173. highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  174. <el-table-column fixed label="完成" width="50">
  175. <template slot-scope="scope">
  176. <el-checkbox :disabled="scope.row.taskStatus==2" v-model="scope.row.isFinish" size="large" class="cb"
  177. @change="finishTask(scope.row)"
  178. @click.stop.native=""
  179. ></el-checkbox>
  180. </template>
  181. </el-table-column>
  182. <el-table-column prop="name" fixed label="标题" width="250">
  183. <template slot-scope="scope">
  184. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  185. <span class="single_line" > {{scope.row.name}}</span>
  186. </el-tooltip>
  187. </template>
  188. </el-table-column>
  189. <el-table-column prop="taskType" label="任务类型" width="100">
  190. <template slot-scope="scope">
  191. {{taskTypeList[scope.row.taskType].name}}
  192. </template>
  193. </el-table-column>
  194. <el-table-column prop="taskStatus" label="任务状态" width="100" >
  195. <template slot-scope="scope">
  196. {{taskStatusList[scope.row.taskStatus]}}
  197. </template>
  198. </el-table-column>
  199. <el-table-column prop="parentName" label="父任务" width="250">
  200. <template slot-scope="scope">
  201. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;"> {{scope.row.parentTname}}</span>
  202. </template>
  203. </el-table-column>
  204. <el-table-column prop="stagesName" label="任务列表" width="100" >
  205. </el-table-column>
  206. <el-table-column prop="executorName" label="执行人" width="100" >
  207. <template slot-scope="scope">
  208. {{scope.row.executorName == null?"待分配":scope.row.executorName}}
  209. </template>
  210. </el-table-column>
  211. <!-- <el-table-column prop="endDate" label="截止时间" width="100" ></el-table-column> -->
  212. <el-table-column prop="startDate" label="开始时间" width="100" >
  213. <template slot-scope="scope">
  214. <!-- <p v-if="scope.row.startDate >= times || scope.row.taskStatus != 0">{{scope.row.startDate}}</p>
  215. <p style="border-radius: 3px; text-align: center;background: #e62412; color: #fff;" v-else><span>{{scope.row.startDate}}</span></p> -->
  216. <p>{{scope.row.startDate}}</p>
  217. </template>
  218. </el-table-column>
  219. <el-table-column prop="endDate" label="截止时间" width="100" >
  220. <template slot-scope="scope">
  221. <p v-if="scope.row.endDate >= times || scope.row.taskStatus != 0">{{scope.row.endDate}}</p>
  222. <p style="border-radius: 3px; text-align: center;background: #e62412; color: #fff;" v-else><span>{{scope.row.endDate}}</span></p>
  223. </template>
  224. </el-table-column>
  225. <el-table-column prop="createDate" label="创建时间" width="100" ></el-table-column>
  226. <el-table-column prop="taskLevel" label="优先级" width="100" >
  227. <template slot-scope="scope">
  228. {{importanceList[scope.row.taskLevel].name}}
  229. </template>
  230. </el-table-column>
  231. </el-table>
  232. </el-main>
  233. </el-container>
  234. </el-tab-pane>
  235. <el-tab-pane label="文件中心" name="files"><FileCenter ref="fileCenter"></FileCenter></el-tab-pane>
  236. <el-tab-pane label="项目概览" name="info"><ProjectInfo ref="projectInfo" @basecost-change="changeBase"></ProjectInfo></el-tab-pane>
  237. <el-tab-pane label="数据统计" name="summary"><Summary ref="summary"></Summary></el-tab-pane>
  238. <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>
  239. </el-tabs>
  240. <!--新增任务界面-->
  241. <el-dialog :class="addForm.id==null?'':'jm'" :title="title" v-if="addFormVisible" :visible.sync="addFormVisible"
  242. :close-on-click-modal="false" customClass="customWidth" width="800px">
  243. <!-- <div style="width: 200%;height:80%;position: absolute;right:-100%;top:0;background:#000;opacity: 0;" @click="sss"></div> -->
  244. <el-form ref="form1" :model="addForm" :rules="taskRules" label-width="100px">
  245. <!--子任务需要选择任务列表 -->
  246. <el-form-item label="任务列表" prop="stages" v-if="addForm.parentTid != null">
  247. <el-select v-model="addForm.stagesId" style="width:100%;" >
  248. <el-option v-for="item in stageList" :key="item.id" :label="item.stagesName" :value="item.id"></el-option>
  249. </el-select>
  250. </el-form-item>
  251. <el-form-item label="类型">
  252. <el-select v-model="addForm.taskType" style="width:100%;" :disabled="this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id">
  253. <el-option v-for="item in taskTypeList" :key="item.id" :label="item.name" :value="item.id">
  254. <i :class="item.icon" ></i>
  255. <span>{{item.name}}</span>
  256. </el-option>
  257. </el-select>
  258. </el-form-item>
  259. <el-form-item label="任务内容" prop="name">
  260. <el-input v-model="addForm.name" :maxlength="40" :disabled="this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id" placeholder="请输入任务内容" clearable></el-input>
  261. </el-form-item>
  262. <el-form-item label="开始时间" prop="startDate">
  263. <el-date-picker v-model="addForm.startDate" type="date" style="width:40%;" value-format="yyyy-MM-dd"
  264. placeholder="请选择日期" :disabled="this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id" @change="DateChange()"></el-date-picker>
  265. <span style="margin-left:30px;margin-right:10px;">截止时间</span>
  266. <el-date-picker v-model="addForm.endDate" type="date" value-format="yyyy-MM-dd"
  267. placeholder="请选择日期" :disabled="this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id" @change="DateChange()"></el-date-picker>
  268. </el-form-item>
  269. <div style="border: 1px solid #ddd;margin:5px 0;padding:5px 0;">
  270. <el-form-item :label="'执行人'+(index+1)" v-for="(executorItem, index) in addForm.executorListFront" :key="index">
  271. <el-select v-model="executorItem.executorId" :disabled="addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id" size="small" filterable placeholder="请选择执行人" style="width:40%;" @change="$forceUpdate()">
  272. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
  273. </el-select>
  274. <span style="margin-left:30px;margin-right:10px;">计划工时</span>
  275. <el-input-number size="small" :disabled="addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != 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>
  276. <el-input-number size="small" :disabled="addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != 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>
  277. <!--移除执行人 -->
  278. <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id)" style="margin-left:5px" @click="removeExecutorLine(index)"></i>
  279. </el-form-item>
  280. <el-link type="primary" v-if="(addForm.executorListFront == null || addForm.executorListFront.length<10)&& (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id)" style="margin-left:35px;" @click="addExecutorLine">添加执行人</el-link>
  281. </div>
  282. <el-form-item label="优先级">
  283. <el-select v-model="addForm.taskLevel" style="width:100%;" >
  284. <el-option v-for="item in importanceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  285. </el-select>
  286. </el-form-item>
  287. <!-- 富文本 -->
  288. <el-form-item label="详细描述" style="height: 200px">
  289. <!-- <Editor id="tinymce" v-model="tinymceHtml" :init="editorInit"></Editor> -->
  290. <!-- <el-input type="textarea" v-model="addForm.taskDesc" :rows="3"></el-input> -->
  291. <!-- <quill-edito v-model="addForm.taskDesc"></quill-edito> -->
  292. <quill-editor style="height: 150px" ref="text" v-model="addForm.taskDesc" class="myQuillEditor" :options="editorOption" @blur="onEditorBlur($event)" @focus="onEditorFocus($event)"/>
  293. </el-form-item>
  294. <!-- 富文本 -->
  295. <div v-if="addForm.id != null">
  296. <el-divider ></el-divider>
  297. <!-- 任务进展 -->
  298. <p ><i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">任务进展</i>
  299. <span ref="addPro" style="display: block; float:right;"><el-link @click="addprogress">添加任务进展</el-link></span>
  300. </p>
  301. <!-- 任务进展展示 -->
  302. <div style="display: none;" ref="proBox" class="progress">
  303. <!-- <el-form :model="> -->
  304. <el-radio-group v-model="radio">
  305. <el-radio :label="0" class="rala1">状态正常</el-radio>
  306. <el-radio :label="1" class="rala2">存在风险</el-radio>
  307. <el-radio :label="2" class="rala3">进展逾期</el-radio>
  308. </el-radio-group>
  309. <el-input
  310. type="textarea"
  311. border="0"
  312. :autosize="{ minRows: 2, maxRows: 6}"
  313. placeholder="请输入详细进展描述"
  314. v-model.trim="text2"
  315. style="margin:10px 0 0 0">
  316. </el-input>
  317. <h4 style="font-weight: normal;">提醒谁查看:{{checkLists.length}}</h4>
  318. <i class="el-icon-circle-plus pron_i" style="font-size: 28px;color: #409EFF;" @click="addI(0)"></i>
  319. <div class="remind" ref="addRem" style="display: none">
  320. <el-checkbox-group v-model="checkboxGrounp" v-for="item in users" :key="item.id">
  321. <p><el-checkbox :label="item.name" @change="kkk(item)"></el-checkbox></p>
  322. </el-checkbox-group>
  323. </div>
  324. <div class="ssp" @click="sss"></div>
  325. <!-- </el-form> -->
  326. <div class="pro_btn">
  327. <el-button size="mini" @click="shutPro">取消</el-button>
  328. <el-button size="mini" type="primary" @click="addTaskProgress">发布</el-button>
  329. </div>
  330. </div>
  331. <div class="ddl" v-if="recentProgressInfo != null && recentProgressInfo.id != null">
  332. <div class="elCard" style="margin-bottom: 10px; height:" >
  333. <i class="el-icon-success" style="color: #43d14f;" v-if="recentProgressInfo.status == 0"></i>
  334. <i class="el-icon-success" style="color: #fd7624;" v-else-if="recentProgressInfo.status == 1"></i>
  335. <i class="el-icon-success" style="color: #fd4d47;" v-else></i>
  336. <span v-if="recentProgressInfo.status == 0">状态正常</span>
  337. <span v-else-if="recentProgressInfo.status == 1">状态正常</span>
  338. <span v-else>进展逾期</span>
  339. <el-dropdown trigger="click" style="float:right;cursor:pointer; float: right;">
  340. <i class="el-icon-more" ></i>
  341. <el-dropdown-menu slot="dropdown">
  342. <el-dropdown-item divided>
  343. <span @click="deleteTaskProgress(recentProgressInfo.id)"><i class="el-icon-delete"></i>删除列表</span></el-dropdown-item>
  344. </el-dropdown-menu>
  345. </el-dropdown>
  346. <div class="elCard_qu">{{recentProgressInfo.creatorName}}更新于{{recentProgressInfo.indate | relativeTime}}</div>
  347. <p style="padding-left: 20px;">{{recentProgressInfo.content}}</p>
  348. <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">查看历史记录</el-button></div>
  349. </div>
  350. </div>
  351. <!-- 任务列表没有数据的时候展示 -->
  352. <div class="nones" v-if="ProgressList.length <= 0">
  353. 暂无数据
  354. </div>
  355. <!-- 任务进展完整状态 -->
  356. <el-dialog title="提示" :visible.sync="innerVisibless" append-to-body width="500px">
  357. <div class="integrity">
  358. <h3 style="font-weight: normal;display: inline-block;margin: 0 0 20px 0;">任务进展:{{ProgressList.length}}</h3>
  359. <!-- <span class="write"><i class="el-icon-circle-plus"></i>填写进展</span> -->
  360. <el-divider></el-divider>
  361. <!-- -->
  362. <div class="block" style="height: 200px;">
  363. <el-timeline style="padding:20px 0 0 0;">
  364. <el-timeline-item
  365. v-for="(activity, index) in ProgressList"
  366. :key="index">
  367. <div class="tb">
  368. <span v-if="activity.status == 0" style="color: #43D14F" class="icon"></span>
  369. <span v-if="activity.status == 1" style="color: #FD7624" class="icon"></span>
  370. <span v-if="activity.status == 2" style="color: red" class="icon"></span>
  371. <div>
  372. <span v-if="activity.status == 0" style="color: #43D14F">状态正常</span>
  373. <span v-if="activity.status == 1" style="color: #FD7624">存在风险</span>
  374. <span v-if="activity.status == 2" style="color: red">进展逾期</span>
  375. <span style="display: inline-block; float: right; color: #8C8C8C">{{activity.indate | relativeTime}}</span>
  376. </div>
  377. <p style="color: #8C8C8C">{{activity.content}}</p>
  378. </div>
  379. </el-timeline-item>
  380. </el-timeline>
  381. </div>
  382. <!-- -->
  383. </div>
  384. <span slot="footer" class="dialog-footer">
  385. <el-button type="primary" @click="innerVisibless = false">关闭</el-button>
  386. </span>
  387. </el-dialog>
  388. <!-- 子任务 -->
  389. <p ><i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">子任务</i>
  390. <el-link style="float:right;" @click="addSubTask">添加子任务</el-link>
  391. </p>
  392. <!--子任务列表 -->
  393. <el-table :data="addForm.subTaskList"
  394. :header-cell-style="{'font-weight':'normal'}"
  395. highlight-current-row v-loading="listLoading" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  396. <el-table-column prop="taskStatus" label="完成" width="50" >
  397. <template slot-scope="scope">
  398. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb"
  399. @click.stop.native=""
  400. @change="finishTask(scope.row)"
  401. ></el-checkbox>
  402. </template>
  403. </el-table-column>
  404. <el-table-column prop="name" label="标题" >
  405. <template slot-scope="scope">
  406. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  407. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.name}}</span>
  408. </el-tooltip>
  409. </template>
  410. </el-table-column>
  411. <el-table-column prop="executorName" label="执行人" width="100" >
  412. <template slot-scope="scope">
  413. {{scope.row.executorName == null?"待分配":scope.row.executorName}}
  414. </template>
  415. </el-table-column>
  416. <el-table-column prop="endDate" label="截止时间" width="100" >
  417. <template slot-scope="scope">
  418. <p v-if="scope.row.endDate >= times">{{scope.row.endDate}}</p>
  419. <p v-else style="background: #e62412; color: #fff;text-align: center; border-radius: 3px;">{{scope.row.endDate}}</p>
  420. </template>
  421. </el-table-column>
  422. </el-table>
  423. </div>
  424. </el-form>
  425. <div slot="footer" class="dialog-footer">
  426. <el-button v-if="user.id == this.addForm.createrId || currentProject.inchargerId == user.id" @click.native="deleteTask" style="float:left;">删除</el-button>
  427. <el-button @click.native="addFormVisible = false">取消</el-button>
  428. <el-button type="primary" @click="submitInsert" :loading="addLoading">提交</el-button>
  429. </div>
  430. <div slot="title" v-if="addForm.parentTid != null" >
  431. <!-- <el-link @click="backToParentTask"><i class="el-icon-arrow-left single_line">返回父级任务</i> | {{addForm.parentTname}}</el-link> -->
  432. <el-page-header @back="backToParentTask" title="返回父任务" :content="addForm.parentTname"></el-page-header>
  433. </div>
  434. <!-- 评论 -->
  435. <div class="remark" v-show="addForm.id != null">
  436. <span class="zh">
  437. <span v-for="(pl, i) in critic" :key="i">
  438. <div class="player" v-if="pl">
  439. <p>参与人</p>
  440. <div class="bj">
  441. <span style="background: #778899">{{pl.length > 2 ? pl.substring(pl.length - 2, pl.length) : pl}}</span>
  442. <!-- <span style="background: #778899">{{pl.length}}</span> -->
  443. </div>
  444. </div>
  445. </span>
  446. <div class="subject">
  447. <div class="sub-all">所有动态</div>
  448. <div class="sub-details" ref="main">
  449. <ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto" ref="contRoll">
  450. <div style="width: 100%" v-if="commentList.length <= 0">
  451. <img src="../../assets/image/xiao.png" alt="">
  452. </div>
  453. <li v-for="i in count" class="infinite-list-item counli" :key="i">
  454. <p><i class="el-icon-s-fold"></i> <em>屈经理完成了依赖任务</em><span>4月20日</span></p>
  455. </li>
  456. <li class="carts" v-for="item in commentList" :key="item.id">
  457. <!-- <el-image style="width: 30px; height: 30px" :src="url" :fit="fit"></el-image> -->
  458. <!-- <i :style="'background' + item.userColor"> -->
  459. <i :style="'background' + item.userColor">
  460. {{item.userName.length > 2 ? item.userName.substring(item.userName.length - 2, item.userName.length) : item.userName}}
  461. </i>
  462. <div>
  463. <!-- <p>{{item.userName}}</p> -->
  464. <p>{{item.userName}}</p>
  465. <em>{{item.content}}</em>
  466. </div>
  467. <span>{{item.createTime | relativeTime}}</span>
  468. </li>
  469. </ul>
  470. </div>
  471. </div>
  472. <div class="issue">
  473. <!-- <el-input type="textarea" class="textareays" label-width="100%" label-height="140px"></el-input> -->
  474. <div class="issue_fixation">
  475. <div class="inputDeep"><el-input
  476. type="textarea"
  477. placeholder="请输入内容"
  478. :autosize="{ minRows: 6, maxRows: 6}"
  479. v-model.trim="textarea2"
  480. class="inputDeeps"
  481. >
  482. </el-input></div>
  483. <el-button class="issue-button" type="primary" @click="release()">发布</el-button>
  484. </div>
  485. </div>
  486. </span>
  487. </div>
  488. <!-- 评论 -->
  489. </el-dialog>
  490. <!-- 子任务列表 -->
  491. <el-dialog title="查看子任务" v-if="subTaskVisible" :visible.sync="subTaskVisible" :close-on-click-modal="false" customClass="customWidth" width="800px">
  492. <el-table :data="addForm.subTaskList"
  493. :header-cell-style="{'font-weight':'normal'}"
  494. highlight-current-row v-loading="listLoading" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  495. <el-table-column prop="taskStatus" label="完成" width="50" >
  496. <template slot-scope="scope">
  497. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb"
  498. @click.stop.native="finishTask(scope.row)"
  499. ></el-checkbox>
  500. </template>
  501. </el-table-column>
  502. <el-table-column prop="name" label="标题" >
  503. <template slot-scope="scope">
  504. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  505. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.name}}</span>
  506. </el-tooltip>
  507. </template>
  508. </el-table-column>
  509. <el-table-column prop="executorName" label="执行人" width="100" >
  510. <template slot-scope="scope">
  511. {{scope.row.executorName == null?"待分配":scope.row.executorName}}
  512. </template>
  513. </el-table-column>
  514. <el-table-column prop="endDate" label="截止时间" width="100" ></el-table-column>
  515. </el-table>
  516. </el-dialog>
  517. <!--用户详细信息弹出框-->
  518. <el-dialog title="查看详情" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
  519. <div class="line"><span>姓名</span><span>{{userDetail.name}}</span></div>
  520. <div class="line"><span>手机号码</span><span>{{userDetail.phone}}</span></div>
  521. <div class="line"><span>部门</span><span>{{userDetail.departmentName}}</span></div>
  522. <div class="line"><span>成本</span><span>{{userDetail.cost}}元/小时</span></div>
  523. <div slot="footer" class="dialog-footer">
  524. <el-button type="primary" @click="userDetailVisible = false" >确定</el-button>
  525. </div>
  526. </el-dialog>
  527. <!-- 新增任务分组弹出框 -->
  528. <el-dialog v-if="addGroupDialog" :visible.sync="addGroupDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  529. <div slot="title" >
  530. <el-tabs v-model="createGroupWay">
  531. <el-tab-pane label="新建分组" name="new">
  532. <el-form ref="form2" :model="groupForm" :rules="rules" style="margin-top:40px;">
  533. <el-form-item prop="name">
  534. <el-input v-model="groupForm.name" placeholder="请输入分组名称" maxlength="12"
  535. show-word-limit clearable></el-input>
  536. </el-form-item>
  537. <el-button type="primary" @click="addGroup" style="width:100%;" >创建</el-button>
  538. </el-form>
  539. </el-tab-pane>
  540. <el-tab-pane label="从模板创建" name="template">
  541. <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)">
  542. <div>
  543. <el-row >
  544. <el-col :span="22">
  545. <div><span>{{t.name}}</span>
  546. <el-link :underline="false" type="primary" style="color:#aaa;margin-left:10px;"
  547. @click="deleteTemplate(t)"><i class="el-icon-delete" v-show="t.isSystem == 0" ></i>
  548. </el-link>
  549. </div>
  550. <div style="margin-top:10px;">
  551. <span style="color:#8c8c8c;font-size:12px;" v-for="(s,index) in t.stagesList" :key="s.id">
  552. <i class="el-icon-arrow-right" v-if="index>0"></i>
  553. {{s.stagesName}}</span>
  554. </div>
  555. </el-col>
  556. <el-col :span="2">
  557. <i class="el-icon-check" v-show="t.selected" style="font-size:20px;color:#409eff;margin-top:12px;"></i>
  558. </el-col>
  559. </el-row>
  560. </div>
  561. </el-card>
  562. <el-button type="primary" @click="addTemplateGroup" style="width:100%;" >创建</el-button>
  563. </el-tab-pane>
  564. </el-tabs>
  565. </div>
  566. </el-dialog>
  567. <el-dialog title="设置任务分组负责人" v-if="setInchargerDialog" :visible.sync="setInchargerDialog" :close-on-click-modal="false" customClass="customWidth" width="300px">
  568. <el-form ref="formIncharger" :model="groupForm" :rules="rules" style="margin-top:10px;">
  569. <el-form-item prop="taskGpIncharge">
  570. <el-select v-model="groupForm.inchargerId" placeholder="请选择任务分组负责人" style="width:100%;" clearable filterable>
  571. <el-option v-for="item in joinMembList" :key="item.id" :value="item.id" :label="item.name"></el-option>
  572. </el-select>
  573. </el-form-item>
  574. </el-form>
  575. <div slot="footer" class="dialog-footer">
  576. <el-button type="primary" @click="saveGroupIncharger" style="width:100%;" >保存</el-button>
  577. </div>
  578. </el-dialog>
  579. <el-dialog title="修改任务分组" v-if="modGroupDialog" :visible.sync="modGroupDialog" :close-on-click-modal="false" customClass="customWidth" width="300px">
  580. <el-form ref="form2" :model="groupForm" :rules="rules" style="margin-top:10px;">
  581. <el-form-item prop="name">
  582. <el-input v-model="groupForm.name" placeholder="请输入分组名称" maxlength="12"
  583. show-word-limit clearable></el-input>
  584. </el-form-item>
  585. </el-form>
  586. <div slot="footer" class="dialog-footer">
  587. <el-button type="primary" @click="addGroup" style="width:100%;" >保存</el-button>
  588. </div>
  589. </el-dialog>
  590. <el-dialog title="添加为模板" v-if="addToTmpDialog" :visible.sync="addToTmpDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  591. <el-form ref="formTmp" :model="templateForm" :rules="rules" style="margin-top:10px;">
  592. <el-form-item prop="name">
  593. <el-input v-model="templateForm.name" placeholder="请输入模板名称" maxlength="12"
  594. show-word-limit clearable></el-input>
  595. <div>
  596. <span style="margin-right:20px">同时保存</span>
  597. <el-checkbox v-model="templateForm.saveTask" label="任务"></el-checkbox>
  598. <el-checkbox v-model="templateForm.saveMileStone" label="里程碑"></el-checkbox>
  599. <el-checkbox v-model="templateForm.saveRisk" label="风险"></el-checkbox>
  600. </div>
  601. </el-form-item>
  602. </el-form>
  603. <div slot="footer" class="dialog-footer">
  604. <el-button type="primary" @click="createTemplate" style="width:100%;" :loading="saveTemplateLoading">存为模板</el-button>
  605. </div>
  606. </el-dialog>
  607. <!-- 新增任务列表弹出框 -->
  608. <el-dialog title="新增/修改任务列表" v-if="addStageDialog" :visible.sync="addStageDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  609. <el-form ref="form2" :model="stageForm" :rules="rules2" >
  610. <el-form-item prop="stagesName">
  611. <el-input v-model="stageForm.stagesName" placeholder="请输入任务列表名称" maxlength="60"
  612. show-word-limit clearable></el-input>
  613. </el-form-item>
  614. </el-form>
  615. <div slot="footer" class="dialog-footer">
  616. <el-button type="primary" @click="addStagePost" style="width:100%;" >保存</el-button>
  617. </div>
  618. </el-dialog>
  619. <!--导出数据条件选择 -->
  620. <el-dialog title="工作计划导出" v-if="exportDialog" :visible.sync="exportDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  621. <el-form ref="form3" >
  622. <el-form-item label="选择类型">
  623. <el-select v-model="exportTaskType" placeholder="全部类型" clearable style="width:350px;">
  624. <el-option label="任务" value="0"></el-option>
  625. <el-option label="里程碑" value="1"></el-option>
  626. <el-option label="风险" value="2"></el-option>
  627. </el-select>
  628. </el-form-item>
  629. </el-form>
  630. <div slot="footer" class="dialog-footer">
  631. <el-button type="primary" @click="exportTask" style="width:100%;" >导出</el-button>
  632. </div>
  633. </el-dialog>
  634. <!--导入数据,下载模板 -->
  635. <el-dialog title="工作计划导入" v-if="importTaskDialog" :visible.sync="importTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  636. <el-form ref="form4" >
  637. <el-form-item label="1. 请先下载模板并填写后上传" >
  638. <el-link type="primary" :underline="false" href="./upload/项目任务导入模板.xlsx" download="项目任务导入模板.xlsx">项目任务模板下载</el-link>
  639. </el-form-item>
  640. <el-form-item label="2. 选择要导入的任务列表">
  641. <el-select v-model="importToStageId" placeholder="任务列表" style="width:350px;">
  642. <el-option v-for="item in stageList" :label="item.stagesName" :value="item.id" :key="item.id"></el-option>
  643. </el-select>
  644. </el-form-item>
  645. <div><span style="font-size:12px;color:#999;">如导入的任务属于多个列表,可在导入后拖拽来更改所属列表</span></div>
  646. </el-form>
  647. <div slot="footer" class="dialog-footer">
  648. <el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
  649. <el-button type="primary" :underline="false" style="width:100%;">上传文件</el-button>
  650. </el-upload>
  651. </div>
  652. </el-dialog>
  653. </section>
  654. </template>
  655. <script>
  656. import util from "../../common/js/util";
  657. import draggable from 'vuedraggable';
  658. import tinymce from 'tinymce/tinymce'
  659. import 'tinymce/themes/silver/theme'
  660. import 'tinymce/skins/ui/oxide/skin.css';
  661. import FileCenter from './fileCenter.vue';
  662. import ProjectInfo from './info.vue';
  663. import Summary from './summary.vue';
  664. import Earning from './earning.vue';
  665. // import editor from '@tinymce/tinymce-vue'
  666. // 富文本样式
  667. import 'quill/dist/quill.core.css'
  668. import 'quill/dist/quill.snow.css'
  669. import 'quill/dist/quill.bubble.css'
  670. // 导入富文本
  671. import { quillEditor } from 'vue-quill-editor'
  672. let id=1;
  673. export default {
  674. name: "two-list-headerslots",
  675. display: "Two list header slot",
  676. order: 14,
  677. components: {
  678. draggable,
  679. // editor,
  680. FileCenter,
  681. ProjectInfo,
  682. Summary,
  683. Earning,
  684. quillEditor // 富文本
  685. },
  686. data() {
  687. return {
  688. saveTemplateLoading: false,
  689. joinMembList:[],
  690. setInchargerDialog: false,
  691. recentProgressInfo:{},
  692. addToTmpDialog:false,
  693. templateForm:{},
  694. importTaskDialog:false,
  695. importToStageId:null,
  696. exportDialog: false,
  697. exportTaskType:null,
  698. groupTemplateList:[],
  699. createGroupWay:'new',
  700. modGroupDialog:false,
  701. subTaskVisible:false,
  702. orderList:[{id:"seq",name:"手动拖拽顺序",isDesc:false},{id:"create_date",name:"创建时间最晚",isDesc:true},
  703. {id:"end_date",name:"截止时间最晚",isDesc:true},
  704. {id:"task_level",name:"优先级最高",isDesc:true}],
  705. order:"seq",
  706. isDesc:false,
  707. taskDataList:[],
  708. displayTable: false,
  709. viewList: [{id:1,name:"全部任务"},{id:2,name:"进行中的任务"},{id:3,name:"已完成的任务"},{id:4,name:"待安排任务"},
  710. {id:5,name:"我创建的任务"},{id:6,name:"我执行的任务"},{id:7,name:"今天的任务"},{id:8,name:"已超期的任务"}],
  711. importanceList:[{id:0,name:"一般"},{id:1,name:"重要"},{id:2,name:"紧急"},],
  712. taskTypeList:[{id:0,name:"任务", icon:"iconfont firerock-iconrenwu"},{id:1,name:"里程碑",icon:"iconfont firerock-iconicon-"},{id:2,name:"风险",icon:"iconfont firerock-iconfengxian"}],
  713. taskTypeColor:['#20A0FF','#8613ad','#bf0404'],
  714. taskTypeIcon:['iconfont firerock-iconrenwu','iconfont firerock-iconicon-','iconfont firerock-iconfengxian'],
  715. taskStatusList:['进行中','已完成','已撤销'],
  716. //优先级
  717. taskLevelColor:['#262626','#E6A23C','#F56C6C'],
  718. stageListHeight:0,
  719. groupWidth:260,
  720. drag: false,
  721. stageDrag: false,
  722. dragging: false,
  723. stageList:[],
  724. selectedGroup:{},
  725. allGroupData:[],
  726. defaultGroupId:null,
  727. addGroupDialog: false,
  728. addStageDialog: false,
  729. groupSearch:null,
  730. groupType:0,//0-分组,1-视图
  731. groupList: [],
  732. groupForm:{},
  733. stageForm:[],
  734. curProjectId:null,
  735. projectList:null,
  736. activeIndex:"1",
  737. activeName:"projectInside",
  738. searchField:null,
  739. keyword:null,
  740. user: JSON.parse(sessionStorage.getItem("user")),
  741. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  742. userDetailVisible: false,
  743. userDetail:{},
  744. date: new Date(),
  745. users: [],
  746. tableHeight: 0,
  747. listLoading: false,
  748. subProjectVisible: false,
  749. subProjectList: [],//子项目列表
  750. currentProject:{},
  751. addSubProject: false,
  752. addFormVisible: false,
  753. addLoading: false,
  754. title: "",
  755. addForm: {
  756. name: '',
  757. },
  758. rules: {
  759. name: [{ required: true, message: "请输入分组名称", trigger: "blur" }],
  760. },
  761. rules2: {
  762. stagesName: [{ required: true, message: "请输入任务列表名称", trigger: "blur" }],
  763. },
  764. taskRules : {
  765. name: [{ required: true, message: "请输入任务内容", trigger: "blur" }],
  766. },
  767. sleectId: null,
  768. sleectProjectId: null,
  769. sidebarIndex: 0, // 侧边栏索引
  770. url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
  771. count: 0,
  772. textarea2: '',
  773. taskId: null,
  774. commentList: [],
  775. radio: 0,
  776. critic: [], // 评论头像的数组
  777. editorOption: { // 富文本框里面的默认值
  778. placeholder: '请输入文本...',
  779. modules: {
  780. toolbar:[
  781. ['bold', 'italic', 'underline', 'strike'], //加粗,斜体,下划线,删除线
  782. // ['blockquote', 'code-block'], //引用,代码块
  783. [{ 'header': 1 }, { 'header': 2 }], // 标题,键值对的形式;1、2表示字体大小
  784. // [{ 'list': 'ordered'}, { 'list': 'bullet' }], //列表
  785. // [{ 'script': 'sub'}, { 'script': 'super' }], // 上下标
  786. // [{ 'indent': '-1'}, { 'indent': '+1' }], // 缩进
  787. // [{ 'direction': 'rtl' }], // 文本方向
  788. [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
  789. [{ 'header': [1, 2, 3, 4, 5, 6, false] }], //几级标题
  790. [{ 'color': [] }, { 'background': [] }], // 字体颜色,字体背景颜色
  791. // [{ 'font': [] }], //字体
  792. [{ 'align': [] }], //对齐方式
  793. ['clean'], //清除字体样式
  794. // ['image','video'] //上传图片、上传视频
  795. ['image'] //上传图片、上传视频
  796. ], //工具栏设置
  797. },
  798. theme: 'snow',
  799. },
  800. textContent: true, // 控制提交
  801. times: null,
  802. text2: '',
  803. innerVisibless: false, // 任务展示弹出层
  804. activities: [{
  805. content: '状态正常',
  806. timestamp: '7小时前',
  807. size: 'large',
  808. type: 'primary',
  809. icon: 'el-icon-circle-check',
  810. color: '#409EFF'
  811. }, {
  812. content: '进展逾期',
  813. timestamp: '八小时前',
  814. color: '#F87872'
  815. }],
  816. ProgressList: [],
  817. checkboxGrounp: [], // 选中人的数据
  818. checkLists: [], // 选中人数据的ID
  819. taskIid: null,
  820. gstimday:[],
  821. gstimhour:[]
  822. };
  823. },
  824. methods: {
  825. //保存分组负责人
  826. saveGroupIncharger() {
  827. this.http.post('/task-group/saveGroupIncharger', {id: this.groupForm.id, inchargerId: this.groupForm.inchargerId},
  828. res => {
  829. this.setInchargerDialog = false;
  830. if (res.code == "ok") {
  831. this.$message({
  832. message: '设置成功',
  833. type: "success"
  834. });
  835. //更新原始分组数据
  836. this.groupList.filter(g=>g.id == this.groupForm.id)[0].inchargerId = this.groupForm.inchargerId;
  837. } else {
  838. this.$message({
  839. message: res.msg,
  840. type: "error"
  841. });
  842. }
  843. }
  844. );
  845. },
  846. //删除模板
  847. deleteTemplate(t) {
  848. var that = this;
  849. this.$confirm("确认要删除["+t.name+"]吗?", "提示", {
  850. //type: 'warning'
  851. }).then(() => {
  852. this.http.post('/group-template/deleteTemplate', {id: t.id},
  853. res => {
  854. if (res.code == "ok") {
  855. this.getGroupTemplate();
  856. this.$message({
  857. message: '删除模板成功',
  858. type: "success"
  859. });
  860. } else {
  861. this.$message({
  862. message: res.msg,
  863. type: "error"
  864. });
  865. }
  866. }
  867. );
  868. });
  869. },
  870. //创建模板
  871. createTemplate() {
  872. this.saveTemplateLoading = true;
  873. this.http.post('/group-template/addTemplate', this.templateForm,
  874. res => {
  875. this.saveTemplateLoading = false;
  876. if (res.code == "ok") {
  877. this.addToTmpDialog = false;
  878. this.getGroupTemplate();
  879. this.$message({
  880. message: '添加模板成功',
  881. type: "success"
  882. });
  883. } else {
  884. this.$message({
  885. message: res.msg,
  886. type: "error"
  887. });
  888. }
  889. }
  890. );
  891. },
  892. addToTemplate(item) {
  893. this.addToTmpDialog = true;
  894. this.templateForm = {groupId: item.id, name:item.name, saveTask:false, saveMileStone:false, saveRisk:false};
  895. },
  896. changeBase() {
  897. this.$refs.earning.refreshPage();
  898. },
  899. // 批量导入人员
  900. importTask(item) {
  901. //首先判断文件类型
  902. let str = item.file.name.split(".");
  903. let format = str[str.length - 1];
  904. if (format != "xls" && format != "xlsx") {
  905. this.$message({
  906. message: "请选择.xls或.xlsx文件",
  907. type: "error"
  908. });
  909. } else {
  910. this.listLoading = true;
  911. let formData = new FormData();
  912. formData.append("file", item.file);
  913. formData.append("projectId", this.curProjectId);
  914. formData.append("groupId", this.selectedGroup.id);
  915. formData.append("stagesId", this.importToStageId);
  916. this.http.uploadFile('/task/importTask', formData,
  917. res => {
  918. this.$refs.upload.clearFiles();
  919. this.listLoading = false;
  920. if (res.code == "ok") {
  921. this.$message({
  922. message: "导入成功",
  923. type: "success"
  924. });
  925. //重新读取列表
  926. this.getStageList();
  927. this.importTaskDialog = false;
  928. } else {
  929. this.$message({
  930. message: res.msg,
  931. type: "error"
  932. });
  933. }
  934. },
  935. error => {
  936. this.$refs.upload.clearFiles();
  937. this.listLoading = false;
  938. this.$message({
  939. message: error,
  940. type: "error"
  941. });
  942. });
  943. }
  944. },
  945. //删除任务进展
  946. deleteTaskProgress(id) {
  947. this.http.post('/task-progress/deleteProgress', {id: id},
  948. res => {
  949. if (res.code == "ok") {
  950. this.getTaskProgressList(this.taskIid)
  951. this.$message({
  952. message: '删除成功',
  953. type: "success"
  954. });
  955. } else {
  956. this.$message({
  957. message: res.msg,
  958. type: "error"
  959. });
  960. }
  961. }
  962. );
  963. },
  964. //创建任务进展
  965. addTaskProgress() {
  966. var param = {
  967. taskId: this.taskIid,
  968. status: this.radio,
  969. content: this.text2,
  970. participatorIds: this.checkLists.toString()
  971. };
  972. this.http.post('/task-progress/addProgress', param,
  973. res => {
  974. if (res.code == "ok") {
  975. this.shutPro()
  976. this.getTaskProgressList(this.taskIid)
  977. this.$message({
  978. message: '发布成功',
  979. type: "success"
  980. });
  981. this.checkboxGrounp = [],
  982. this.checkLists = [],
  983. this.text2 = '',
  984. this.radio = 0
  985. } else {
  986. this.$message({
  987. message: res.msg,
  988. type: "error"
  989. });
  990. }
  991. }
  992. );
  993. },
  994. //获取任务进展列表
  995. getTaskProgressList(taskId) {
  996. this.taskIid = taskId
  997. this.http.post('/task-progress/list', {taskId: taskId},
  998. res => {
  999. if (res.code == "ok") {
  1000. this.ProgressList = res.data;
  1001. this.recentProgressInfo = res.data[0]
  1002. } else {
  1003. this.$message({
  1004. message: res.msg,
  1005. type: "error"
  1006. });
  1007. }
  1008. }
  1009. );
  1010. },
  1011. kkk(el){
  1012. var k = this.checkLists.indexOf(el.id)
  1013. if (k == -1) {
  1014. this.checkLists.push(el.id)
  1015. } else {
  1016. this.checkLists.splice(k, 1)
  1017. }
  1018. },
  1019. showExportDialog() {
  1020. this.exportDialog = true;
  1021. },
  1022. exportTask() {
  1023. let _this = this;
  1024. this.http.post('/task/exportTask', {projectId: this.curProjectId, taskType: this.exportTaskType},
  1025. res => {
  1026. if (res.code == "ok") {
  1027. location.href = res.data;
  1028. } else {
  1029. this.$message({
  1030. message: res.msg,
  1031. type: "error"
  1032. });
  1033. }
  1034. }
  1035. );
  1036. },
  1037. sss(){
  1038. this.$refs.addRem.style.display="none"
  1039. },
  1040. addprogress(){ // 添加子任务进展事件
  1041. this.$refs.proBox.style.display="block"
  1042. this.$refs.addPro.style.display="none"
  1043. },
  1044. shutPro() { // 关闭任务进展
  1045. this.$refs.addPro.style.display="block"
  1046. this.$refs.addRem.style.display="none"
  1047. this.$refs.proBox.style.display="none"
  1048. },
  1049. addI() { // 打开选择查看
  1050. this.$refs.addRem.style.display="block"
  1051. },
  1052. load() {
  1053. if(this.count >= 0) return
  1054. this.count += 2
  1055. },
  1056. onEditorFocus() {
  1057. this.onEditorBlur()
  1058. },
  1059. subMission() { // 添加
  1060. },
  1061. handleCheckedCitiesChange(value) {
  1062. let checkedCount = value.length;
  1063. this.checkAll = checkedCount === this.cities.length;
  1064. this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
  1065. },
  1066. // 获得焦点时触发
  1067. onEditorBlur(){
  1068. let theEle = this.$refs.text; // 获取元素
  1069. var img = theEle.value.match(/<img[^>]+>/g); // 赛选 img 标签
  1070. var arrImg = ''
  1071. for (var j = 0; j < img.length; j++) {
  1072. // 正则匹配,摘出img标签下的src里的内容,即capture
  1073. img[j].replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
  1074. arrImg += capture
  1075. });
  1076. }
  1077. // 原来的字符流大小,单位为字节
  1078. var strLen = arrImg.length;
  1079. // 计算后得到的文件流大小,单位为字节
  1080. var fileSize=parseInt(strLen-(strLen/8)*2);
  1081. var size = "";
  1082. size = (fileSize/1024/1024).toFixed(2);
  1083. if (size > 2){
  1084. this.textContent = false
  1085. this.$message({
  1086. showClose: true,
  1087. message: '图片超过了2MB,请重新上传',
  1088. type: 'warning'
  1089. });
  1090. }
  1091. this.textContent = true
  1092. },
  1093. // 侧边栏的点击事件
  1094. retract() {
  1095. if (this.$refs.box.className == 'el-icon-arrow-left') {
  1096. this.$refs.box.className = 'el-icon-arrow-right'
  1097. } else {
  1098. this.$refs.box.className = 'el-icon-arrow-left'
  1099. }
  1100. // this.$refs.box.className === 'el-icon-arrow-left' ? this.$refs.box.className = 'el-icon-arrow-right' || this.$refs.box.className = 'el-icon-arrow-left'
  1101. this.toggleGroup()
  1102. },
  1103. //
  1104. choseTemplate(tIndex) {
  1105. this.groupTemplateList.forEach(g=>{
  1106. g.selected = false;
  1107. })
  1108. this.sidebarIndex = tIndex
  1109. this.groupTemplateList[tIndex].selected = true;
  1110. },
  1111. //获取分组模板列表
  1112. getGroupTemplate() {
  1113. this.http.post('/group-template/getList',{},
  1114. res => {
  1115. if (res.code == "ok") {
  1116. this.groupTemplateList = res.data;
  1117. this.groupTemplateList[0].selected = true;
  1118. } else {
  1119. this.$message({
  1120. message: res.msg,
  1121. type: "error"
  1122. });
  1123. }
  1124. },
  1125. error => {
  1126. this.$message({
  1127. message: error,
  1128. type: "error"
  1129. });
  1130. });
  1131. },
  1132. copyGroup(item) {
  1133. this.http.post('/task-group/copy',{id: item.id},
  1134. res => {
  1135. if (res.code == "ok") {
  1136. this.getTaskGroups();
  1137. } else {
  1138. this.$message({
  1139. message: res.msg,
  1140. type: "error"
  1141. });
  1142. }
  1143. },
  1144. error => {
  1145. this.$message({
  1146. message: error,
  1147. type: "error"
  1148. });
  1149. });
  1150. },
  1151. //重启项目
  1152. startPro() {
  1153. this.http.post('/project/start',{id: this.curProjectId},
  1154. res => {
  1155. if (res.code == "ok") {
  1156. this.$message({
  1157. message: '重启成功',
  1158. type: "success"
  1159. });
  1160. this.currentProject.status = 1;
  1161. } else {
  1162. this.$message({
  1163. message: res.msg,
  1164. type: "error"
  1165. });
  1166. }
  1167. },
  1168. error => {
  1169. this.$message({
  1170. message: error,
  1171. type: "error"
  1172. });
  1173. });
  1174. },
  1175. //撤销项目
  1176. cancelPro() {
  1177. this.http.post('/project/cancel',{id: this.curProjectId},
  1178. res => {
  1179. if (res.code == "ok") {
  1180. this.$message({
  1181. message: '撤销成功',
  1182. type: "success"
  1183. });
  1184. this.currentProject.status = 3;
  1185. } else {
  1186. this.$message({
  1187. message: res.msg,
  1188. type: "error"
  1189. });
  1190. }
  1191. },
  1192. error => {
  1193. this.$message({
  1194. message: error,
  1195. type: "error"
  1196. });
  1197. });
  1198. },
  1199. //完成项目
  1200. finishPro() {
  1201. this.http.post('/project/finish',{id: this.curProjectId},
  1202. res => {
  1203. if (res.code == "ok") {
  1204. this.$message({
  1205. message: '项目完成',
  1206. type: "success"
  1207. });
  1208. this.currentProject.status = 2;
  1209. } else {
  1210. this.$message({
  1211. message: res.msg,
  1212. type: "error"
  1213. });
  1214. }
  1215. },
  1216. error => {
  1217. this.$message({
  1218. message: error,
  1219. type: "error"
  1220. });
  1221. });
  1222. },
  1223. //删除当前编辑的任务
  1224. deleteTask() {
  1225. var warning='';
  1226. if (this.addForm.subTaskList.length > 0) {
  1227. warning='您确定要删除当前任务及其子任务吗?';
  1228. } else {
  1229. warning='您确定要删除当前任务吗?';
  1230. }
  1231. this.$confirm(warning, "提示", {
  1232. //type: 'warning'
  1233. }).then(() => {
  1234. this.http.post('/task/delete',{id: this.addForm.id},
  1235. res => {
  1236. if (res.code == "ok") {
  1237. this.addFormVisible = false;
  1238. this.getStageList();
  1239. } else {
  1240. this.$message({
  1241. message: res.msg,
  1242. type: "error"
  1243. });
  1244. }
  1245. },
  1246. error => {
  1247. this.$message({
  1248. message: error,
  1249. type: "error"
  1250. });
  1251. });
  1252. });
  1253. },
  1254. //tab页签切换
  1255. handleClick(tab, event) {
  1256. let pathModel = tab.name;
  1257. this.$router.push('/'+pathModel+'/'+this.curProjectId);
  1258. },
  1259. showSubTaskList(task) {
  1260. this.subTaskVisible = true;
  1261. this.addForm = task;
  1262. },
  1263. backToParentTask() {
  1264. this.getTaskDetail(this.addForm.parentTid);
  1265. },
  1266. //显示子任务创建卡片
  1267. addSubTask() {
  1268. this.addFormVisible = true;
  1269. this.addForm = {parentTname: this.addForm.name,parentTid: this.addForm.id,projectId: this.addForm.projectId, groupId: this.addForm.groupId, taskLevel:0, planHours: 8, taskType: 0};
  1270. this.addForm.executorListFront = [{executorId:null, planHours:8}];
  1271. this.addLoading = false;
  1272. },
  1273. //认领任务
  1274. addAsMyTask(task) {
  1275. this.http.post('/task/addAsMyTask',{id: task.id},
  1276. res => {
  1277. if (res.code == "ok") {
  1278. this.getStageList();
  1279. } else {
  1280. this.$message({
  1281. message: res.msg,
  1282. type: "error"
  1283. });
  1284. }
  1285. },
  1286. error => {
  1287. this.$message({
  1288. message: error,
  1289. type: "error"
  1290. });
  1291. });
  1292. },
  1293. taskLineClick(row, column, event) {
  1294. this.editTask(row);
  1295. },
  1296. //排序发生改变
  1297. orderChange() {
  1298. this.isDesc = this.orderList.filter(o=>o.id == this.order)[0].isDesc;
  1299. if (this.groupType == 0) {
  1300. this.getStageList();
  1301. } else {
  1302. this.getViewTaskList();
  1303. }
  1304. },
  1305. //加载视图任务列表
  1306. getViewTaskList() {
  1307. this.http.post('/task/list',{projectId: this.curProjectId, viewId: this.selectedGroup.id, order: this.order, isDesc: this.isDesc},
  1308. res => {
  1309. if (res.code == "ok") {
  1310. this.taskDataList = res.data;
  1311. this.taskDataList.forEach(t=>{
  1312. t.isFinish = t.taskStatus==1?true:false;
  1313. });
  1314. } else {
  1315. this.$message({
  1316. message: res.msg,
  1317. type: "error"
  1318. });
  1319. }
  1320. },
  1321. error => {
  1322. this.$message({
  1323. message: error,
  1324. type: "error"
  1325. });
  1326. });
  1327. },
  1328. //阶段拖拽
  1329. onMoveStage(e) {
  1330. var data = {
  1331. groupId:this.selectedGroup.id,
  1332. oldIndex: e.oldIndex,
  1333. newIndex: e.newIndex,};
  1334. this.http.post('/stages/changeStageOrder',data,
  1335. res => {
  1336. if (res.code == "ok") {
  1337. this.getStageList();
  1338. } else {
  1339. this.$message({
  1340. message: res.msg,
  1341. type: "error"
  1342. });
  1343. }
  1344. },
  1345. error => {
  1346. this.$message({
  1347. message: error,
  1348. type: "error"
  1349. });
  1350. });
  1351. },
  1352. onChange(e) {
  1353. var data = {
  1354. id:e.item.id,
  1355. oldIndex: e.oldIndex -1,
  1356. newIndex: e.newIndex -1,
  1357. oldStagesId: e.from.id,
  1358. newStagesId: e.to.id};
  1359. this.http.post('/task/changeOrder',data,
  1360. res => {
  1361. if (res.code == "ok") {
  1362. this.getStageList();
  1363. } else {
  1364. this.$message({
  1365. message: res.msg,
  1366. type: "error"
  1367. });
  1368. }
  1369. },
  1370. error => {
  1371. this.$message({
  1372. message: error,
  1373. type: "error"
  1374. });
  1375. });
  1376. },
  1377. toggleGroup() {
  1378. if (this.groupWidth == 0) {
  1379. this.groupWidth = 260;
  1380. } else {
  1381. this.groupWidth = 0;
  1382. }
  1383. },
  1384. finishTask(task) {
  1385. this.http.post('/task/finish',{id: task.id, taskStatus: task.taskStatus},
  1386. res => {
  1387. if (res.code == "ok") {
  1388. if (this.groupType == 0) {
  1389. this.getStageList();
  1390. } else {
  1391. this.getViewTaskList();
  1392. }
  1393. } else {
  1394. this.$message({
  1395. message: res.msg,
  1396. type: "error"
  1397. });
  1398. }
  1399. },
  1400. error => {
  1401. this.$message({
  1402. message: error,
  1403. type: "error"
  1404. });
  1405. });
  1406. },
  1407. // 点击卡片事件
  1408. editTask(task) {
  1409. console.log(task)
  1410. this.addFormVisible = true;
  1411. this.addLoading = false;
  1412. this.title = "编辑任务";
  1413. this.getTaskDetail(task.id);
  1414. this.getTaskProgressList(task.id); // 获取任务进展列表
  1415. this.getUsers(); // 获取名单数据
  1416. this.gain(task); // 获取评论列表
  1417. },
  1418. // 获取评论列表
  1419. gain (task) {
  1420. this.commentList = [];
  1421. this.taskId = task.id;
  1422. this.http.post('/task-comment/getList', {taskId: task.id},
  1423. res => {
  1424. if (res.code == "ok") {
  1425. this.commentList = res.data
  1426. this.sppk(this.commentList) // 获取参与人的方法
  1427. } else {
  1428. this.$message({
  1429. message: res.msg,
  1430. type: "error"
  1431. });
  1432. }
  1433. },
  1434. error => {
  1435. this.$message({
  1436. message: error,
  1437. type: "error"
  1438. });
  1439. });
  1440. },
  1441. // 获取评论参与人
  1442. sppk(comit) {
  1443. var sk = []
  1444. comit.forEach(function(e){
  1445. sk.push(e.userName)
  1446. })
  1447. this.critic = new Set(sk)
  1448. },
  1449. // 点击发布
  1450. release() {
  1451. if(this.textarea2.length <= 0) return this.$message({message: "请输入内容", type: "error"})
  1452. this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
  1453. res => {
  1454. if(res.code == "ok"){
  1455. this.commentList.push(res.data)
  1456. this.sppk(this.commentList)
  1457. this.textarea2 = ""
  1458. this.contRoll() // 滚动到底部
  1459. } else {
  1460. this.$message({
  1461. message: res.msg,
  1462. type: "error"
  1463. });
  1464. }
  1465. },
  1466. error => {
  1467. this.$message({
  1468. message: error,
  1469. type: "error"
  1470. });
  1471. })
  1472. },
  1473. // 滚动到底部
  1474. contRoll(){
  1475. this.$nextTick(() => {
  1476. this.$refs.main.scrollTop = this.$refs.contRoll.scrollHeight;
  1477. })
  1478. },
  1479. chggstim(e,i){
  1480. if(e){
  1481. this.gstimday[i] = Math.ceil(this.gstimhour[i] / this.user.timeType.allday)
  1482. }else{
  1483. this.gstimhour[i] = this.gstimday[i] * this.user.timeType.allday
  1484. }
  1485. },
  1486. getTaskDetail(id) {
  1487. this.http.post('/task/getTask',{id: id},
  1488. res => {
  1489. if (res.code == "ok") {
  1490. this.addForm = res.data;
  1491. this.addForm.createDate = null;
  1492. this.addForm.indate = null;
  1493. this.addLoading = false;
  1494. this.recentProgressInfo = this.addForm.progress;
  1495. this.addForm.executorListFront = this.addForm.executorList;
  1496. this.gstimday = []
  1497. this.gstimhour = []
  1498. for(let i=0;i<this.addForm.executorListFront.length;i++){
  1499. this.gstimhour.push(this.addForm.executorListFront[i].planHours),
  1500. this.gstimday.push(Math.ceil(this.addForm.executorListFront[i].planHours / this.user.timeType.allday))
  1501. }
  1502. //删除中间传值的变量数组
  1503. delete this.addForm.executorList;
  1504. } else {
  1505. this.$message({
  1506. message: res.msg,
  1507. type: "error"
  1508. });
  1509. }
  1510. },
  1511. error => {
  1512. this.$message({
  1513. message: error,
  1514. type: "error"
  1515. });
  1516. });
  1517. },
  1518. addTask(stage) {
  1519. this.addFormVisible = true;
  1520. this.addForm = {projectId: stage.projectId, groupId: stage.groupId, stagesId: stage.id, taskLevel:0, planHours: 8, taskType: 0};
  1521. this.addForm.executorListFront = [{executorId:null, planHours:this.user.timeType.allday}];
  1522. this.gstimhour = [this.user.timeType.allday]
  1523. this.gstimday = [1]
  1524. this.addLoading = false;
  1525. this.title="创建任务";
  1526. this.commentList = [];
  1527. },
  1528. addExecutorLine() {
  1529. if (this.addForm.executorListFront == null) {
  1530. this.addForm.executorListFront = [];//初始化
  1531. }
  1532. this.addForm.executorListFront.push({executorId:null, planHours:this.user.timeType.allday});
  1533. this.gstimday.push(1)
  1534. this.gstimhour.push(this.user.timeType.allday)
  1535. this.$forceUpdate();
  1536. },
  1537. removeExecutorLine(index) {
  1538. this.addForm.executorListFront.splice(index,1);
  1539. this.gstimday.splice(index,1)
  1540. this.gstimhour.splice(index,1)
  1541. this.$forceUpdate();
  1542. },
  1543. renameStage(item) {
  1544. this.stageForm = JSON.parse(JSON.stringify(item));
  1545. this.addStageDialog = true;
  1546. },
  1547. deleteStage(item) {
  1548. var _this = this;
  1549. var param = {id:item.id, groupId: item.groupId};
  1550. this.$confirm("确认删除吗?", "提示", {
  1551. //type: 'warning'
  1552. }).then(() => {
  1553. this.http.post('/stages/delete',param,
  1554. res => {
  1555. if (res.code == "ok") {
  1556. // this.stageList = res.data;
  1557. this.getStageList();
  1558. } else {
  1559. this.$message({
  1560. message: res.msg,
  1561. type: "error"
  1562. });
  1563. }
  1564. },
  1565. error => {
  1566. this.$message({
  1567. message: error,
  1568. type: "error"
  1569. });
  1570. });
  1571. });
  1572. },
  1573. //加载项目内的任务列表
  1574. getStageList() {
  1575. this.http.post('/stages/list',{groupId: this.selectedGroup.id, projectId: this.selectedGroup.projectId, order: this.order, isDesc: this.isDesc},
  1576. res => {
  1577. if (res.code == "ok") {
  1578. this.stageList = res.data;
  1579. this.timess() // 处理时间的方法
  1580. } else {
  1581. this.$message({
  1582. message: res.msg,
  1583. type: "error"
  1584. });
  1585. }
  1586. },
  1587. error => {
  1588. this.$message({
  1589. message: error,
  1590. type: "error"
  1591. });
  1592. });
  1593. },
  1594. timess(){
  1595. var date = new Date()
  1596. let Y = date.getFullYear()
  1597. let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
  1598. let D = date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate()
  1599. this.times = `${Y}-${M}-${D}`
  1600. },
  1601. addStagePost() {
  1602. let param = JSON.parse(JSON.stringify(this.stageForm));
  1603. param.taskList = [];
  1604. this.http.post('/stages/save',param,
  1605. res => {
  1606. if (res.code == "ok") {
  1607. this.stageList = res.data;
  1608. this.addStageDialog = false;
  1609. } else {
  1610. this.$message({
  1611. message: res.msg,
  1612. type: "error"
  1613. });
  1614. }
  1615. },
  1616. error => {
  1617. this.$message({
  1618. message: error,
  1619. type: "error"
  1620. });
  1621. });
  1622. },
  1623. addStage() {
  1624. this.addStageDialog = true;
  1625. this.stageForm = {groupId: this.selectedGroup.id, projectId: this.curProjectId};
  1626. },
  1627. viewChange(index, indexPath) {
  1628. this.groupType = 1;
  1629. this.order = "create_date";
  1630. this.isDesc = true;
  1631. this.selectedGroup = this.viewList.filter(g=>g.id == index)[0];
  1632. this.getViewTaskList();
  1633. this.displayTable = true;
  1634. } ,
  1635. groupChange(index, indexPath) {
  1636. this.groupType = 0;
  1637. this.order = "seq";
  1638. this.isDesc = false;
  1639. this.selectedGroup = this.groupList.filter(g=>g.id == index)[0];
  1640. this.getStageList();
  1641. this.displayTable = false;
  1642. console.log("1223");
  1643. this.$forceUpdate()
  1644. },
  1645. //本地搜索组
  1646. startSearchGroup() {
  1647. if (this.groupSearch != null || this.groupSearch.length > 0) {
  1648. this.groupList = this.allGroupData.filter(g=>g.name.indexOf(this.groupSearch) >= 0);
  1649. } else {
  1650. this.groupList = this.allGroupData;
  1651. }
  1652. },
  1653. editIncharger(item) {
  1654. this.groupForm = JSON.parse(JSON.stringify(item));
  1655. this.setInchargerDialog = true;
  1656. },
  1657. renameGroup(item) {
  1658. this.groupForm = JSON.parse(JSON.stringify(item));
  1659. this.modGroupDialog = true;
  1660. },
  1661. deleteGroup(item) {
  1662. var _this = this;
  1663. this.$confirm("分组下的任务也将一同删除,您确认删除该分组吗?", "提示", {
  1664. type: 'warning'
  1665. }).then(() => {
  1666. this.http.post('/task-group/delete',item,
  1667. res => {
  1668. if (res.code == "ok") {
  1669. this.groupList = res.data;
  1670. if (item.id == this.selectedGroup.id) {
  1671. //之前选中的分组被删除了
  1672. if (this.groupList.length > 0) {
  1673. this.defaultGroupId = this.groupList[0].id;
  1674. this.selectedGroup = this.groupList[0];
  1675. this.groupChange(this.defaultGroupId)
  1676. } else {
  1677. this.selectedGroup = {};
  1678. }
  1679. }
  1680. } else {
  1681. this.$message({
  1682. message: res.msg,
  1683. type: "error"
  1684. });
  1685. }
  1686. },
  1687. error => {
  1688. this.$message({
  1689. message: error,
  1690. type: "error"
  1691. });
  1692. });
  1693. });
  1694. },
  1695. addTemplateGroup() {
  1696. var param = JSON.parse(JSON.stringify(this.groupTemplateList.filter(g=>g.selected)[0]));
  1697. delete param.stagesList;
  1698. param.projectId = this.curProjectId;
  1699. var k = this.groupTemplateList[this.sidebarIndex].name
  1700. var s = null;
  1701. var xmz = this.groupList.forEach(function(a, b, c){
  1702. if (a.name == k) {
  1703. s = true
  1704. return
  1705. }
  1706. })
  1707. if (s){
  1708. this.addGroupDialog = false;
  1709. this.$message({
  1710. message: '当前项目已存在分组['+k+'],请修改组名后重试。',
  1711. type: "error"
  1712. });
  1713. return
  1714. }
  1715. //
  1716. this.http.post('/task-group/createFromTemplate',param,
  1717. res => {
  1718. if (res.code == "ok") {
  1719. this.selectedGroup = res.data
  1720. this.sleectId = res.data.id
  1721. this.sleectProjectId = res.data.projectId
  1722. this.addGroupDialog = false;
  1723. // this.getTaskGroups();
  1724. this.getTaskGroup();
  1725. } else {
  1726. this.$message({
  1727. message: res.msg,
  1728. type: "error"
  1729. });
  1730. }
  1731. },
  1732. error => {
  1733. this.$message({
  1734. message: error,
  1735. type: "error"
  1736. });
  1737. });
  1738. },
  1739. // 重新定义了 addGroup 方法
  1740. addGroup() {
  1741. this.http.post('/task-group/save',this.groupForm,
  1742. res => {
  1743. if (res.code == "ok") {
  1744. this.groupList = res.data;
  1745. this.addGroupDialog = false;
  1746. this.modGroupDialog = false;
  1747. if (this.selectedGroup.id !== this.groupForm.id) {
  1748. this.selectedGroup = this.groupList.filter(g=>g.new)[0];
  1749. }
  1750. this.defaultGroupId = this.groupList[this.groupList.length - 1].id
  1751. // this.getTaskGroup();
  1752. this.getStageList()
  1753. } else {
  1754. this.$message({
  1755. message: res.msg,
  1756. type: "error"
  1757. });
  1758. }
  1759. },
  1760. error => {
  1761. this.$message({
  1762. message: error,
  1763. type: "error"
  1764. });
  1765. });
  1766. },
  1767. createGroup() {
  1768. this.addGroupDialog = true;
  1769. this.groupForm = {projectId: this.curProjectId};
  1770. },
  1771. getInsideData() {
  1772. this.getTaskGroups();
  1773. },
  1774. //加载项目内的任务分组
  1775. getTaskGroups() {
  1776. this.http.post('/task-group/list',{projectId: this.curProjectId},
  1777. res => {
  1778. if (res.code == "ok") {
  1779. this.allGroupData = res.data;
  1780. this.groupList = res.data;
  1781. if (this.groupList.length > 0) {
  1782. this.defaultGroupId = this.groupList[0].id;
  1783. this.selectedGroup = this.groupList[0];
  1784. this.getStageList();
  1785. } else {
  1786. //清空任务列表
  1787. this.defaultGroupId = null;
  1788. this.selectedGroup = null;
  1789. this.stageList = [];
  1790. }
  1791. } else {
  1792. this.$message({
  1793. message: res.msg,
  1794. type: "error"
  1795. });
  1796. }
  1797. },
  1798. error => {
  1799. this.$message({
  1800. message: error,
  1801. type: "error"
  1802. });
  1803. });
  1804. },
  1805. // 额外加的
  1806. getTaskGroup() {
  1807. this.http.post('/task-group/list',{projectId: this.curProjectId},
  1808. res => {
  1809. if (res.code == "ok") {
  1810. this.allGroupData = res.data;
  1811. this.groupList = res.data;
  1812. if (this.groupList.length > 0) {
  1813. this.defaultGroupId = this.sleectId;
  1814. this.selectedGroup = this.groupList[res.data.length - 1];
  1815. this.getStageList();
  1816. } else {
  1817. //清空任务列表
  1818. this.defaultGroupId = null;
  1819. this.selectedGroup = null;
  1820. this.stageList = [];
  1821. }
  1822. } else {
  1823. this.$message({
  1824. message: res.msg,
  1825. type: "error"
  1826. });
  1827. }
  1828. },
  1829. error => {
  1830. this.$message({
  1831. message: error,
  1832. type: "error"
  1833. });
  1834. });
  1835. },
  1836. //切换项目
  1837. onProjectChange() {
  1838. let path = this.$route.path;
  1839. path = path.substring(0,path.lastIndexOf('/'))+'/'+this.curProjectId;
  1840. this.$router.push(path);
  1841. this.getTaskGroups();
  1842. this.$refs.fileCenter.refreshPage();
  1843. this.$refs.projectInfo.refreshPage();
  1844. this.$refs.summary.refreshPage();
  1845. this.$refs.earning.refreshPage();
  1846. },
  1847. //获取我的项目列表
  1848. getMyProjectList() {
  1849. this.http.post('/project/getProjectList', {
  1850. },
  1851. res => {
  1852. if (res.code == "ok") {
  1853. this.projectList = res.data;
  1854. } else {
  1855. this.$message({
  1856. message: res.msg,
  1857. type: "error"
  1858. });
  1859. }
  1860. },
  1861. error => {
  1862. this.$message({
  1863. message: error,
  1864. type: "error"
  1865. });
  1866. });
  1867. },
  1868. menuSelect() {
  1869. },
  1870. toList() {
  1871. this.$router.push("/list");
  1872. },
  1873. searchList() {
  1874. this.page = 1;
  1875. this.getList();
  1876. },
  1877. //显示用户详情
  1878. showUser(userId) {
  1879. this.userDetailVisible = true;
  1880. this.http.post(this.port.manage.userDetail, {
  1881. userId: userId
  1882. },
  1883. res => {
  1884. if (res.code == "ok") {
  1885. this.userDetail = res.data;
  1886. } else {
  1887. this.$message({
  1888. message: res.msg,
  1889. type: "error"
  1890. });
  1891. }
  1892. },
  1893. error => {
  1894. this.$message({
  1895. message: error,
  1896. type: "error"
  1897. });
  1898. });
  1899. },
  1900. getUsers() {
  1901. this.http.post(this.port.manage.list, {
  1902. departmentId: -1,
  1903. pageIndex: 1,
  1904. pageSize: 99999
  1905. },
  1906. res => {
  1907. if (res.code == "ok") {
  1908. this.users = res.data.records;
  1909. } else {
  1910. this.$message({
  1911. message: res.msg,
  1912. type: "error"
  1913. });
  1914. }
  1915. },
  1916. error => {
  1917. this.$message({
  1918. message: error,
  1919. type: "error"
  1920. });
  1921. });
  1922. },
  1923. //获取项目列表
  1924. getList() {
  1925. this.listLoading = true;
  1926. this.http.post(this.port.project.listPage, {
  1927. pageIndex: this.page,
  1928. pageSize: this.size,
  1929. keyword:this.keyword,
  1930. searchField: this.searchField,
  1931. },
  1932. res => {
  1933. this.listLoading = false;
  1934. if (res.code == "ok") {
  1935. var list = res.data.records;
  1936. for(var i in list) {
  1937. var participator = list[i].participator , str = "";
  1938. for(var j in participator) {
  1939. if(j == participator.length-1) {
  1940. str += participator[j].name
  1941. } else {
  1942. str += participator[j].name + ','
  1943. }
  1944. }
  1945. list[i].userNames = str;
  1946. }
  1947. this.list = list;
  1948. this.total = res.data.total;
  1949. } else {
  1950. this.$message({
  1951. message: res.msg,
  1952. type: "error"
  1953. });
  1954. }
  1955. },
  1956. error => {
  1957. this.listLoading = false;
  1958. this.$message({
  1959. message: error,
  1960. type: "error"
  1961. });
  1962. });
  1963. },
  1964. submitInsert() {
  1965. if (this.textContent !== true) return this.$message({
  1966. showClose: true,
  1967. message: '图片太大,请重新上传',
  1968. type: 'warning'
  1969. });
  1970. //检查是有重名的执行人
  1971. var exeList = this.addForm.executorListFront;
  1972. // for(let i=0;i<this.gstimhour.length;i++){
  1973. // exeList[i].planHours = this.gstimhour[i]
  1974. // }
  1975. for (var i=0;i<exeList.length;i++) {
  1976. var findSameUser = false;
  1977. exeList[i].planHours = this.gstimhour[i]
  1978. for (var j=i+1;j<exeList.length; j++) {
  1979. if (exeList[i].executorId && exeList[j].executorId && exeList[i].executorId == exeList[j].executorId) {
  1980. findSameUser = true;
  1981. break;
  1982. }
  1983. }
  1984. if (findSameUser) {
  1985. return this.$message({
  1986. showClose: true,
  1987. message: '执行人存在重复',
  1988. type: 'error'
  1989. });
  1990. }
  1991. }
  1992. this.$refs.form1.validate(valid => {
  1993. if (valid) {
  1994. delete this.addForm.subTaskList;
  1995. delete this.addForm.progress;
  1996. this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
  1997. this.addLoading = true;
  1998. this.http.post('/task/save',this.addForm,
  1999. res => {
  2000. this.addLoading = false;
  2001. if (res.code == "ok") {
  2002. this.$message({
  2003. message: "提交成功",
  2004. type: "success"
  2005. });
  2006. if (this.addForm.parentTid == null) {
  2007. this.addFormVisible = false;
  2008. if (this.groupType == 0) {
  2009. this.getStageList();
  2010. } else {
  2011. this.getViewTaskList();
  2012. }
  2013. } else {
  2014. this.backToParentTask();
  2015. }
  2016. } else {
  2017. this.$message({
  2018. message: res.msg,
  2019. type: "error"
  2020. });
  2021. }
  2022. },
  2023. error => {
  2024. this.$message({
  2025. message: error,
  2026. type: "error"
  2027. });
  2028. }
  2029. );
  2030. }
  2031. });
  2032. },
  2033. DateChange(){
  2034. if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
  2035. let stdate = Date.parse(this.addForm.startDate)
  2036. let eddate = Date.parse(this.addForm.endDate)
  2037. if(stdate <= eddate){
  2038. let days = (eddate - stdate) / (1*24*60*60*1000) + 1
  2039. for (let i=0;i<this.gstimday.length;i++) {
  2040. this.gstimday[i] = days
  2041. this.gstimhour[i] = days * this.user.timeType.allday
  2042. }
  2043. this.$forceUpdate()
  2044. }
  2045. console.log("gstimday",this.gstimday);
  2046. }
  2047. },
  2048. // 删除
  2049. deletePro(i, item) {
  2050. this.$confirm("确定要项目" + item.projectName + "吗?","删除项目", {
  2051. confirmButtonText: "确定",
  2052. cancelButtonText: "取消",
  2053. type: "warning"
  2054. })
  2055. .then(() => {
  2056. this.listLoading = true;
  2057. this.http.post(this.port.project.delete,{
  2058. id: item.id
  2059. },
  2060. res => {
  2061. this.listLoading = false;
  2062. if (res.code == "ok") {
  2063. this.$message({
  2064. message: "删除成功",
  2065. type: "success"
  2066. });
  2067. this.getList();
  2068. } else {
  2069. this.$message({
  2070. message: res.msg,
  2071. type: "error"
  2072. });
  2073. }
  2074. },
  2075. error => {
  2076. this.listLoading = false;
  2077. this.$message({
  2078. message: error,
  2079. type: "error"
  2080. });
  2081. }
  2082. );
  2083. })
  2084. .catch(() => {});
  2085. },
  2086. detail(i) {
  2087. this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
  2088. },
  2089. getDetail() {
  2090. this.http.post('/project/detail',{
  2091. id: this.curProjectId
  2092. },
  2093. res => {
  2094. if (res.code == "ok") {
  2095. this.currentProject = res.data;
  2096. this.joinMembList = this.currentProject.participationList;
  2097. } else {
  2098. }
  2099. },
  2100. error => {
  2101. this.$message({
  2102. message: error,
  2103. type: "error"
  2104. });
  2105. }
  2106. );
  2107. },
  2108. },
  2109. created() {
  2110. let height = window.innerHeight;
  2111. this.tableHeight = height - 135;
  2112. this.stageListHeight = this.tableHeight - 45;
  2113. const that = this;
  2114. window.onresize = function temp() {
  2115. that.tableHeight = window.innerHeight - 135;
  2116. that.stageListHeight = that.tableHeight - 45;
  2117. };
  2118. },
  2119. mounted() {
  2120. this.curProjectId = parseInt(this.$route.params.id);
  2121. this.activeName = this.$route.path.split("/")[1];
  2122. this.getDetail();
  2123. this.getUsers();
  2124. this.getMyProjectList();
  2125. this.getInsideData();
  2126. this.getGroupTemplate();
  2127. }
  2128. };
  2129. </script>
  2130. <style >
  2131. .flip-list-move {
  2132. transition: transform 0.5s;
  2133. }
  2134. .no-move {
  2135. transition: transform 0s;
  2136. }
  2137. .taskStage {
  2138. margin:10px;
  2139. display:inline-block;
  2140. vertical-align:top;
  2141. }
  2142. .taskList {
  2143. padding:7px;
  2144. width:300px;
  2145. }
  2146. .taskList .stage {
  2147. font-weight:bold;
  2148. display:block;
  2149. float:left;
  2150. width:260px;
  2151. overflow: auto;
  2152. }
  2153. .taskCard {
  2154. background: #fff;
  2155. margin: 5px 0px;
  2156. padding:5px;
  2157. border: 1px solid #e6e6e6;
  2158. border-radius: 3px;
  2159. box-shadow: 3px 3px 3px #e6e6e6;
  2160. min-height:60px;
  2161. position: relative;
  2162. border-radius: 3px;
  2163. overflow: hidden;
  2164. }
  2165. .taskImg {
  2166. position: absolute;
  2167. box-sizing: border-box;
  2168. width: 100%;
  2169. height: 100%;
  2170. top: 0;
  2171. left: 0;
  2172. }
  2173. .taskImg img{
  2174. position: absolute;
  2175. top: -1px;
  2176. }
  2177. .hong:hover {
  2178. border-top: 1px solid #ff0000;
  2179. }
  2180. .huang:hover {
  2181. border-top: 1px solid #ff9600;
  2182. }
  2183. .hui:hover {
  2184. border-top: 1px solid #c9c9c9;
  2185. }
  2186. .taskCard:hover {
  2187. cursor: move;
  2188. }
  2189. .chosen {
  2190. background-color: #000 !important;
  2191. color: #fff;
  2192. }
  2193. .ghost {
  2194. background-color: #fafafa !important;
  2195. }
  2196. .taskCard .cb {
  2197. margin-right:5px;
  2198. }
  2199. .item {
  2200. background:#fff;
  2201. }
  2202. .input-with-select .el-input-group__prepend {
  2203. background-color: #fff;
  2204. }
  2205. .el-tabs__item {
  2206. height:45px ;
  2207. }
  2208. .projectCls {
  2209. margin-left:10px;margin-right:10px;
  2210. }
  2211. .heavyTxt {
  2212. font-weight:bold;
  2213. }
  2214. .el-tabs__nav-wrap::after {
  2215. height:0.5px;
  2216. }
  2217. .user_name_icon {
  2218. text-align:center;border-radius:50%;color:white;float:right;font-size:10px;width:30px;height:30px;line-height:30px;
  2219. transform: scale(0.8);
  2220. }
  2221. .task_name {
  2222. color:#262626;
  2223. display:inline-block;
  2224. max-width: 235px;
  2225. height: 25px;
  2226. overflow: hidden;
  2227. white-space: nowrap;
  2228. text-overflow: ellipsis;
  2229. }
  2230. .task_name span{
  2231. position: relative;
  2232. top: 8px;
  2233. }
  2234. .cb {
  2235. position: relative;
  2236. top: -2px;
  2237. }
  2238. .group_style {
  2239. border-radius: 5px;margin:2px 0px 2px 0px;height:40px;line-height:40px;
  2240. }
  2241. .el-tabs__nav-wrap::after {
  2242. height:1px;
  2243. }
  2244. .el-tabs__header {
  2245. margin:0 !important;
  2246. }
  2247. .single_line {
  2248. overflow: hidden;text-overflow:ellipsis;white-space: nowrap;
  2249. }
  2250. .sub_task_num {
  2251. font-size:10px;
  2252. color:#666;
  2253. }
  2254. .template_box {
  2255. margin:20px 0px;
  2256. }
  2257. /* 项目阶段侧边栏样式 */
  2258. .sidebar {
  2259. width: 2px;
  2260. background: #dddddd;
  2261. position: relative;
  2262. }
  2263. .sidebar:hover {
  2264. background: #20a0ff;
  2265. }
  2266. .sidebar:hover .etui {
  2267. background: #20a0ff;
  2268. border: #20a0ff;
  2269. color: #fff;
  2270. }
  2271. .etui {
  2272. width: 15px;
  2273. height: 40px;
  2274. background: #fff;
  2275. border: 1px solid #dddddd;
  2276. position: absolute;
  2277. top: 50%;
  2278. left: 0%;
  2279. transform: translate(6%, -50%);
  2280. color: rgb(192, 191, 191);
  2281. box-sizing: border-box;
  2282. }
  2283. .etui i {
  2284. display: inline-block;
  2285. padding-top: 90%;
  2286. /* padding-left: 15%; */
  2287. font-weight: bold;
  2288. }
  2289. /* bug问题 */
  2290. .task {
  2291. box-sizing: border-box;
  2292. padding-left: 10px;
  2293. padding-right: 5px;
  2294. }
  2295. /* 评论部分 */
  2296. .remark {
  2297. width: 500px;
  2298. height: 100%;
  2299. background: #fff;
  2300. position: absolute;
  2301. top: 0;
  2302. right: -500px;
  2303. border-left: 3px solid #dddddd;
  2304. }
  2305. .jm {
  2306. margin-left: -500px;
  2307. }
  2308. .bj {
  2309. float: left;
  2310. width: 90%;
  2311. overflow: hidden;
  2312. height: 65px;
  2313. white-space: nowrap;
  2314. text-overflow: ellipsis;
  2315. }
  2316. .bj span {
  2317. width: 50px;
  2318. height: 50px;
  2319. display: inline-block;
  2320. border-radius: 50%;
  2321. color: #fff;
  2322. text-align: center;
  2323. float: left;
  2324. margin-right: 20px;
  2325. margin-top: 10px;
  2326. line-height: 50px;
  2327. }
  2328. .player {
  2329. height: 15%;
  2330. box-sizing: border-box;
  2331. padding-left: 15px;
  2332. border-bottom: 1px solid #dddddd;
  2333. }
  2334. .player p {
  2335. margin: 0;
  2336. padding: 2% 0;
  2337. font-size: 18px;
  2338. }
  2339. .player .el-image {
  2340. border-radius: 50%;
  2341. margin-right: 10px;
  2342. }
  2343. .subject {
  2344. height: 60%;
  2345. box-sizing: border-box;
  2346. }
  2347. .sub-all {
  2348. font-size: 20px;
  2349. padding: 15px 0 15px 15px;
  2350. }
  2351. .sub-details {
  2352. width: 100%;
  2353. height: 87%;
  2354. padding-right: 15px;
  2355. box-sizing: border-box;
  2356. overflow: hidden;
  2357. overflow-y: scroll
  2358. }
  2359. .sub-details li {
  2360. list-style:none
  2361. }
  2362. /* 红色背景显示日期 */
  2363. .element_span {
  2364. display: inline-block;
  2365. background: #e62412;
  2366. color: #fff;
  2367. border-radius: 5px;
  2368. padding: 3px;
  2369. /* text-align: center; */
  2370. font-size: 12px;
  2371. margin-left: 5px;
  2372. }
  2373. .pro_btn{
  2374. display: inline-block;
  2375. float: right;
  2376. }
  2377. </style>
  2378. <style lang="scss" scoped>
  2379. .counli {
  2380. em {
  2381. font-style: normal;
  2382. display: inline-block;
  2383. margin-left: 9%;
  2384. }
  2385. span {
  2386. float: right;
  2387. }
  2388. }
  2389. .carts {
  2390. position: relative;
  2391. .el-image{
  2392. border-radius: 50%;
  2393. float: left;
  2394. width: 20%;
  2395. }
  2396. i {
  2397. width: 30px;
  2398. height: 30px;
  2399. // background: #778899;
  2400. display: inline-block;
  2401. float: left;
  2402. border-radius:50%;
  2403. font-style:normal;
  2404. font-size: 12px;
  2405. line-height: 30px;
  2406. text-align: center;
  2407. color: #fff;
  2408. background: #778899;
  2409. }
  2410. div {
  2411. text-align: left;
  2412. p {
  2413. text-align: left;
  2414. margin-left: 10px;
  2415. margin-left: 13%;
  2416. }
  2417. em {
  2418. display: block;
  2419. font-style: normal;
  2420. margin-left: 13%;
  2421. }
  2422. }
  2423. span {
  2424. font-size: 10px;
  2425. float: right;
  2426. margin-top: -40px;
  2427. }
  2428. }
  2429. .issue {
  2430. // height: 20%;
  2431. // position: relative;
  2432. // z-index: 4;
  2433. .zh{
  2434. position: relative;
  2435. width: 100%;
  2436. height: 100%;
  2437. }
  2438. .textareays {
  2439. background: #000;
  2440. height: 140px;
  2441. border: 0;
  2442. .el-textarea__inner {
  2443. height: 85%;
  2444. }
  2445. }
  2446. .issue-button {
  2447. position: absolute;
  2448. bottom: 20px;
  2449. right: 20px;
  2450. }
  2451. }
  2452. .inputDeep {
  2453. position: absolute;
  2454. bottom: 85px;
  2455. width: 95%;
  2456. margin: 0 12px;
  2457. }
  2458. .inputDeep .el-textarea .el-textarea__inner{
  2459. border: 0 !important;
  2460. resize: none !important;
  2461. }
  2462. .inputDeeps .el-textarea__inner {
  2463. border: 0 !important;
  2464. resize: none !important;
  2465. }
  2466. .scop_span {
  2467. display: inline-block;
  2468. padding: 2px 5px;
  2469. }
  2470. </style>
  2471. <style>
  2472. .ql-snow .ql-picker.ql-size .ql-picker-label::before,
  2473. .ql-snow .ql-picker.ql-size .ql-picker-item::before {
  2474. content: "14px" !important;
  2475. position: relative;
  2476. top: -8px;
  2477. }
  2478. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
  2479. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
  2480. content: "10px" !important;
  2481. }
  2482. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
  2483. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
  2484. content: "18px" !important;
  2485. }
  2486. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
  2487. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
  2488. content: "32px" !important;
  2489. }
  2490. .ql-snow .ql-picker.ql-header .ql-picker-label::before,
  2491. .ql-snow .ql-picker.ql-header .ql-picker-item::before {
  2492. content: "文本" !important;
  2493. position: relative;
  2494. top: -8px;
  2495. }
  2496. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
  2497. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
  2498. content: "标题1" !important;
  2499. }
  2500. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
  2501. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
  2502. content: "标题2" !important;
  2503. }
  2504. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
  2505. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
  2506. content: "标题3" !important;
  2507. }
  2508. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
  2509. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
  2510. content: "标题4" !important;
  2511. }
  2512. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
  2513. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
  2514. content: "标题5" !important;
  2515. }
  2516. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
  2517. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
  2518. content: "标题6" !important;
  2519. }
  2520. .ql-snow .ql-picker.ql-font .ql-picker-label::before,
  2521. .ql-snow .ql-picker.ql-font .ql-picker-item::before {
  2522. content: "标准字体" !important;
  2523. }
  2524. .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
  2525. .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
  2526. content: "衬线字体" !important;
  2527. }
  2528. .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
  2529. .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
  2530. content: "等宽字体" !important;
  2531. }
  2532. /* .ql-picker-label {
  2533. position: relative;
  2534. } */
  2535. .ql-picker-label svg {
  2536. position: relative;
  2537. top: -6px;
  2538. }
  2539. /* 任务进展 */
  2540. .progress {
  2541. border: 1px solid #ddd;
  2542. border-radius: 5px;
  2543. width: 100%;
  2544. box-sizing: border-box;
  2545. padding: 15px;
  2546. position: relative;
  2547. margin-bottom: 20px;
  2548. }
  2549. .remind {
  2550. width: 95px;
  2551. height: 60%;
  2552. overflow-y:auto;
  2553. position: absolute;
  2554. background: #fff;
  2555. padding: 10px;
  2556. left: 0;
  2557. top: 0;
  2558. border: 1px solid #ddd;
  2559. z-index: 999999;
  2560. }
  2561. .rala1 .el-radio__input.is-checked + .el-radio__label {
  2562. color: #43d14f !important;
  2563. }
  2564. .rala1 .el-radio__input.is-checked .el-radio__inner {
  2565. background: #43d14f !important;
  2566. border-color: #43d14f !important;
  2567. }
  2568. .rala2 .el-radio__input.is-checked + .el-radio__label {
  2569. color: #fd7624 !important;
  2570. }
  2571. .rala2 .el-radio__input.is-checked .el-radio__inner {
  2572. background: #fd7624 !important;
  2573. border-color: #fd7624 !important;
  2574. }
  2575. .rala3 .el-radio__input.is-checked + .el-radio__label {
  2576. color: #fd4d47 !important;
  2577. }
  2578. .rala3 .el-radio__input.is-checked .el-radio__inner {
  2579. background: #fd4d47 !important;
  2580. border-color: #fd4d47 !important;
  2581. }
  2582. /* 任务进展列表 */
  2583. .elCard {
  2584. width: 100%;
  2585. padding: 15px;
  2586. box-sizing: border-box;
  2587. border: 1px solid #EBEEF5;
  2588. }
  2589. .elCard_qu {
  2590. float: right;
  2591. margin-right: 15px;
  2592. }
  2593. .integrity {
  2594. padding: 15px;
  2595. }
  2596. .write {
  2597. float: right;
  2598. color: #1B9AEE;
  2599. }
  2600. .ssp {
  2601. position: absolute;
  2602. right: 140px;
  2603. top: 95px;
  2604. width: 66%;
  2605. height: 80%;
  2606. }
  2607. .examine {
  2608. width: 100%;
  2609. text-align: center;
  2610. }
  2611. .nones {
  2612. width: 100%;
  2613. height: 50px;
  2614. text-align: center;
  2615. color: #909399;
  2616. line-height: 50px;
  2617. border-top: 1px solid #EBEEF5;
  2618. border-bottom: 1px solid #EBEEF5;
  2619. font-size: 16px;
  2620. }
  2621. .icon {
  2622. /* color: rgb(67, 209, 79); */
  2623. display: block;
  2624. width: 12px;
  2625. height: 12px;
  2626. background: #fff;
  2627. position: absolute;
  2628. top: 0;
  2629. left: -33px;
  2630. border-radius: 50%;
  2631. border: 4px solid;
  2632. }
  2633. /* ddl */
  2634. .ddl {
  2635. height: 136px;
  2636. overflow: hidden;
  2637. border: 1px solid #EBEEF5
  2638. }
  2639. .tb{
  2640. position: relative;
  2641. }
  2642. .dpl{
  2643. position: absolute;
  2644. font-size: 20px;
  2645. left: -32px;
  2646. top: 0px;
  2647. }
  2648. </style>