projectInside.vue 87 KB

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