projectInside.vue 92 KB

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