projectInside.vue 113 KB

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