projectInside.vue 111 KB

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