projectInside.vue 91 KB

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