projectInside.vue 96 KB

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