projectInside.vue 118 KB

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