projectInside.vue 115 KB

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