projectInside.vue 82 KB

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