projectInside.vue 120 KB

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