list.vue 84 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846
  1. <template>
  2. <section>
  3. <!--工具条-->
  4. <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
  5. <el-form :inline="true">
  6. <!-- <div style="margin-left: 20px;display: inline-block">
  7. <el-form-item label="任务列表">
  8. </el-form-item>
  9. </div> -->
  10. <el-form-item :label="$t('tasklist')">
  11. <div style="margin-left: 8px">
  12. <!-- <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入项目名称关键字" clearable="true"> -->
  13. <el-select v-model="searchField" style="width:120px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')">
  14. <el-option :label="$t('ongoing')" value="0" @click.native="hiddens()"></el-option>
  15. <el-option :label="$t('state.completed')" value="1" @click.native="hiddens()"></el-option>
  16. </el-select>
  17. <!-- <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button> -->
  18. <!-- </el-input> -->
  19. </div>
  20. </el-form-item>
  21. <!-- <el-form-item label="项目分组" v-if="user.companyId == '428'">
  22. <div style="margin-left: 8px">
  23. <el-select v-model="groupName" style="width:200px;" placeholder="请选择" clearable @change="hiddens()">
  24. <el-option v-for="(item, index) in groupNameList" :key="index" :label="item" :value="item"></el-option>
  25. </el-select>
  26. </div>
  27. </el-form-item> -->
  28. <el-form-item :label="$t('subordinatedepartments')" v-if="user.timeType.projectWithDept">
  29. <!-- <span style="margin-left:5px;margin-right:5px;color:#606266;">部门</span> -->
  30. <el-cascader v-model="deptId" :options="departmentList" size="small" :placeholder="$t('qing-xuan-ze-bu-men')"
  31. :props="{ checkStrictly: true, expandTrigger: 'hover' }" :show-all-levels="false" clearable filterable @change="hiddens"
  32. ></el-cascader>
  33. </el-form-item>
  34. <!-- <el-form-item style="float:right;">
  35. <el-link type="primary" :underline="false" @click="handleAdd(-1,null)">新增任务</el-link>
  36. </el-form-item> -->
  37. <!-- <div style="margin-left: 40px;display: inline-block">
  38. <el-form-item label="类型">
  39. </el-form-item>
  40. </div> -->
  41. <el-form-item :label="$t('types')">
  42. <div style="margin-left: 8px">
  43. <!-- <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入项目名称关键字" clearable="true"> -->
  44. <el-select v-model="typeField" style="width:120px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="hiddens()">
  45. <!-- <el-option label="任务" value="0" @click.native="hiddens()"></el-option>
  46. <el-option label="里程碑" value="1" @click.native="hiddens()"></el-option>
  47. <el-option label="风险" value="2" @click.native="hiddens()"></el-option> -->
  48. <el-option :label="$t('other.task')" value="0"></el-option>
  49. <el-option :label="$t('other.milestone')" value="1"></el-option>
  50. <el-option :label="$t('risk')" value="2"></el-option>
  51. </el-select>
  52. <!-- <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button> -->
  53. <!-- </el-input> -->
  54. </div>
  55. </el-form-item>
  56. <el-form-item >
  57. <div style="margin-left: 80px">
  58. <el-select v-model="dateType" style="width:120px;" size="small" slot="prepend" :placeholder="$t('defaultText.pleaseChoose')">
  59. <el-option :label="$t('starttimes')" :value="0" @click.native="hiddens(1)"></el-option>
  60. <el-option :label="$t('deadline')" :value="1" @click.native="hiddens(1)"></el-option>
  61. </el-select>
  62. </div>
  63. </el-form-item>
  64. <el-form-item >
  65. <div style="margin-left: 8px">
  66. <el-date-picker
  67. v-model="dateSelect"
  68. type="daterange"
  69. size="small"
  70. range-separator="-"
  71. :start-placeholder="$t('interval')"
  72. :end-placeholder="$t('interval')"
  73. value-format="yyyy-MM-dd"
  74. clearable
  75. @change="hiddens()">
  76. </el-date-picker>
  77. </div>
  78. </el-form-item>
  79. </el-form>
  80. </el-col>
  81. <div style="display: flex;width: 100%;">
  82. <div class="classification">
  83. <div>
  84. <p :class="idx == 0 ? 'on' : ''" @click="switchs(0)" v-if="permissions.projectView || permissions.projectManagement">{{ $t('alltaskss') }}</p>
  85. <p :class="idx == 1 ? 'on' : ''" @click="switchs(1)">{{ $t('perform') }}</p>
  86. <p :class="idx == 2 ? 'on' : ''" @click="switchs(2)">{{ $t('created') }}</p>
  87. </div>
  88. </div>
  89. <div style="max-width: 94%;min-width: 90%">
  90. <!--列表-->
  91. <el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
  92. <el-table-column type="index" width="60">
  93. <template slot-scope="scope" >
  94. {{scope.$index+1+(page-1)*size}}
  95. </template>
  96. </el-table-column>
  97. <el-table-column prop="stagesName" :label="$t('taskstage')" sortable width="180" @mouseover="mouseOver">
  98. </el-table-column>
  99. <el-table-column prop="name" :label="$t('nameofthetask')" sortable width="330">
  100. <template slot-scope="scope">
  101. <div v-if="scope.row.name.length > 20">
  102. <el-popover trigger="hover" placement="top" width="330" v-if="scope.row.name">
  103. <p id="caseContent">{{scope.row.name}}</p>
  104. <div slot="reference" class="name-wrapper">
  105. <div class="cal" >
  106. <el-link type="primary" @click="editTask(scope.row)">{{scope.row.name}}</el-link>
  107. </div>
  108. </div>
  109. </el-popover>
  110. </div>
  111. <div v-else>
  112. <div class="cal">
  113. <el-link type="primary" @click="editTask(scope.row)">{{scope.row.name}}</el-link>
  114. </div>
  115. </div>
  116. </template>
  117. </el-table-column>
  118. <!-- <el-table-column prop="projectCategorySub" label="项目分组" sortable width="300" v-if="user.companyId == '428'"></el-table-column> -->
  119. <el-table-column prop="departmentName" :label="$t('subordinatedepartments')" sortable width="300" v-if="user.timeType.projectWithDept">
  120. <template slot-scope="scope">
  121. <div>
  122. <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data></span>
  123. <span v-if="user.userNameNeedTranslate != '1'">{{departmentName}}</span>
  124. </div>
  125. </template>
  126. </el-table-column>
  127. <el-table-column prop="projectName" :label="$t('headerTop.projectName')" sortable width="260" show-overflow-tooltip>
  128. <template slot-scope="scope">
  129. <el-link type="primary" :href="'#/projectInside/'+scope.row.projectId">{{scope.row.projectName}}</el-link>
  130. </template>
  131. </el-table-column>
  132. <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" sortable width="130">
  133. <template slot-scope="scope">
  134. <!-- <el-link type="primary" @click="showUser(scope.row.executorId)">{{scope.row.executorName}}</el-link> -->
  135. <span v-if="user.userNameNeedTranslate == '1'">
  136. <span v-for="(item, index) in scope.row.executorNameList" :key="index">
  137. <ww-open-data type='userName' :openid='item'></ww-open-data>
  138. <span v-if="index < scope.row.executorNameList.length - 1">,</span>
  139. </span>
  140. </span>
  141. <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.executorName}}</span>
  142. </template>
  143. </el-table-column>
  144. <el-table-column prop="startDate" :label="$t('starttimes')" sortable width="180"></el-table-column>
  145. <el-table-column prop="endDate" :label="$t('deadline')" width="260" fixed="right" sortable>
  146. <template slot-scope="scope">
  147. <div style="display: flex;justify-content: space-between;padding-right: 40px">
  148. <span style="display: inline-block;margin-right: 55px">
  149. <span :class="judgedate(scope.row.endDate) && searchField == '0' && scope.row.taskStatus == 0 ? 'redwarningspan autodatespan' : 'autodatespan'">{{scope.row.endDate}}</span>
  150. </span>
  151. <el-button v-if="searchField == 0" size="small" type="primary" @click="completes(scope.row.id, 0)">{{ $t('wan-cheng') }}</el-button>
  152. <el-button v-if="searchField == 1" size="small" type="warning" @click="completes(scope.row.id, 1)">{{ $t('zhong-qi') }}</el-button>
  153. </div>
  154. </template>
  155. </el-table-column>
  156. </el-table>
  157. <!--工具条-->
  158. <el-col :span="24" class="toolbar">
  159. <el-pagination
  160. @size-change="handleSizeChange"
  161. @current-change="handleCurrentChange"
  162. :page-sizes="[20, 50 , 80 , 100]"
  163. :page-size="20"
  164. :current-page="page"
  165. layout="total, sizes, prev, pager, next"
  166. :total="total"
  167. style="float:right;"
  168. ></el-pagination>
  169. </el-col>
  170. </div>
  171. </div>
  172. <!--用户详细信息弹出框-->
  173. <el-dialog :title="$t('Checkthedetails')" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
  174. <div class="line"><span>{{ $t('lable.name') }}</span>
  175. <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='userDetail.name'></ww-open-data></span>
  176. <span v-if="user.userNameNeedTranslate != '1'">{{userDetail.name}}</span>
  177. </div>
  178. <div class="line"><span>{{ $t('Worknumber') }}</span><span>{{userDetail.jobNumber}}</span></div>
  179. <div class="line"><span>{{ $t('lable.phone') }}</span><span>{{userDetail.phone}}</span></div>
  180. <div class="line"><span>{{ $t('lable.department') }}</span>
  181. <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='userDetail.name'></ww-open-data></span>
  182. <span v-if="user.userNameNeedTranslate != '1'">{{userDetail.departmentName}}</span>
  183. </div>
  184. <div class="line"><span>{{ $t('costof') }}</span><span>{{userDetail.cost}}{{ $t('Yuananhour') }}</span></div>
  185. <div slot="footer" class="dialog-footer">
  186. <el-button type="primary" @click="userDetailVisible = false" >{{ $t('btn.determine') }}</el-button>
  187. </div>
  188. </el-dialog>
  189. <!-- 子项目列表 -->
  190. <el-dialog :title="$t('listofsubitems')" show-header="false" v-if="subProjectVisible" :visible.sync="subProjectVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  191. <el-table :data="subProjectList" highlight-current-row height="400" style="width: 100%;">
  192. <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
  193. <template slot-scope="scope" >
  194. {{scope.$index+1+(page-1)*size}}
  195. </template>
  196. </el-table-column>
  197. <el-table-column prop="name" :label="$t('names')" ></el-table-column>
  198. <el-table-column :label="$t('operation')" width="150">
  199. <template slot-scope="scope" >
  200. <el-button size="small" type="primary" @click="addNewSubProject(scope.row)">{{ $t('bian-ji') }}</el-button>
  201. <el-button size="small" type="danger" @click="deleteSubPro(scope.row)">{{ $t('btn.delete') }}</el-button>
  202. </template>
  203. </el-table-column>
  204. </el-table>
  205. <div slot="footer" class="dialog-footer">
  206. <el-button type="primary" @click="subProjectVisible = false" >{{ $t('Shutdown') }}</el-button>
  207. <el-button type="primary" @click="addNewSubProject()" >{{ $t('addsubitems') }}</el-button>
  208. </div>
  209. </el-dialog>
  210. <!-- 任务详情信息弹出框 -->
  211. <el-dialog :class="addForm.id==null?'':'jm'" :title="title" v-if="addFormVisible" :visible.sync="addFormVisible"
  212. :close-on-click-modal="false" customClass="customWidth" width="800px" :top="'6vh'">
  213. <!-- <div style="width: 200%;height:80%;position: absolute;right:-100%;top:0;background:#000;opacity: 0;" @click="sss"></div> -->
  214. <div style="height: 72vh;overflow: auto;">
  215. <el-form ref="form1" :model="addForm" :rules="taskRules" label-width="100px">
  216. <!--子任务需要选择任务列表 -->
  217. <el-form-item :label="$t('tasklist')" prop="stages" v-if="addForm.parentTid != null">
  218. <el-select v-model="addForm.stagesId" style="width:100%;" >
  219. <el-option v-for="item in stageList" :key="item.id" :label="item.stagesName" :value="item.id"></el-option>
  220. </el-select>
  221. </el-form-item>
  222. <el-form-item :label="$t('types')">
  223. <el-select v-model="addForm.taskType" style="width:100%;" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement">
  224. <el-option v-for="item in taskTypeList" :key="item.id" :label="item.name" :value="item.id">
  225. <i :class="item.icon" ></i>
  226. <span>{{item.name}}</span>
  227. </el-option>
  228. </el-select>
  229. </el-form-item>
  230. <el-form-item :label="$t('taskdefinition')" prop="name">
  231. <el-input v-model="addForm.name" :maxlength="40" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement" :placeholder="$t('enterthetaskcontent')" clearable></el-input>
  232. </el-form-item>
  233. <el-form-item :label="addForm.taskType == 1 ? $t('deadline') : $t('starttimes')" :prop="addForm.taskType == 1 ? 'endDate' : 'startDate'">
  234. <el-date-picker v-model="addForm.startDate" type="date" style="width:40%;" value-format="yyyy-MM-dd"
  235. :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement" v-if="addForm.taskType != 1"></el-date-picker>
  236. <span style="margin-left:30px;margin-right:10px;" v-if="addForm.taskType != 1">{{ $t('deadline') }}</span>
  237. <el-date-picker v-model="addForm.endDate" type="date" value-format="yyyy-MM-dd"
  238. :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement"></el-date-picker>
  239. </el-form-item>
  240. <div style="border: 1px solid #ddd;margin:5px 0;padding:5px 0;">
  241. <el-form-item :label="$t('zhi-hang-ren')+(index+1)" v-for="(executorItem, index) in addForm.executorListFront" :key="index">
  242. <el-select v-if="user.userNameNeedTranslate != '1'" v-model="executorItem.executorId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement" size="small" filterable clearable :placeholder="$t('pleaseselectanexecutor')" style="width:40%;" @change="$forceUpdate()">
  243. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  244. <span style="float: left">{{ item.name }}</span>
  245. <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
  246. </el-option>
  247. </el-select>
  248. <selectCat :subject="users" :subjectId="executorItem.executorId" :index="index" @selectCal="selectCal" :size="'mini'" v-if="user.userNameNeedTranslate == '1'"></selectCat>
  249. <span style="margin-left:30px;margin-right:10px;">{{ $t('plantime') }}</span>
  250. <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement" v-model="executorItem.planHours" style="width:30%;" :min="1" :max="100" :placeholder="$t('pleaseentertheplannedworking')" ></el-input-number ><span style="margin-left:10px;">{{ $t('time.hour') }}</span>
  251. <!--移除执行人 -->
  252. <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id|| permissions.projectManagement)" style="margin-left:5px" @click="removeExecutorLine(index)"></i>
  253. </el-form-item>
  254. <el-link type="primary" v-if="(addForm.executorListFront == null || addForm.executorListFront.length<10)&& (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id || permissions.projectManagement)" style="margin-left:35px;" @click="addExecutorLine">{{ $t('addinganexecutor') }}</el-link>
  255. </div>
  256. <el-form-item :label="$t('priority')">
  257. <el-select v-model="addForm.taskLevel" style="width:100%;" >
  258. <el-option v-for="item in importanceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  259. </el-select>
  260. </el-form-item>
  261. <!-- 富文本 -->
  262. <el-form-item :label="$t('detaileddescription')" style="height: 200px">
  263. <!-- <Editor id="tinymce" v-model="tinymceHtml" :init="editorInit"></Editor> -->
  264. <!-- <el-input type="textarea" v-model="addForm.taskDesc" :rows="3"></el-input> -->
  265. <!-- <quill-edito v-model="addForm.taskDesc"></quill-edito> -->
  266. <quill-editor style="height: 150px" ref="text" v-model="addForm.taskDesc" class="myQuillEditor" :options="editorOption" @blur="onEditorBlur($event)" @focus="onEditorFocus($event)"/>
  267. </el-form-item>
  268. <!-- 富文本 -->
  269. <div v-if="addForm.id != null">
  270. <el-divider ></el-divider>
  271. <!-- 任务进展 -->
  272. <p ><i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">{{ $t('taskprogress') }}</i>
  273. <span ref="addPro" style="display: block; float:right;"><el-link @click="addprogress">{{ $t('addtaskprogress') }}</el-link></span>
  274. </p>
  275. <!-- 任务进展展示 -->
  276. <div style="display: none;" ref="proBox" class="progress">
  277. <!-- <el-form :model="> -->
  278. <el-radio-group v-model="radio">
  279. <el-radio :label="0" class="rala1">{{ $t('normals') }}</el-radio>
  280. <el-radio :label="1" class="rala2">{{ $t('atrisk') }}</el-radio>
  281. <el-radio :label="2" class="rala3">{{ $t('withinthetimelimit') }}</el-radio>
  282. </el-radio-group>
  283. <el-input
  284. type="textarea"
  285. border="0"
  286. :autosize="{ minRows: 2, maxRows: 6}"
  287. :placeholder="$t('detailedprogressdescription')"
  288. v-model="text2"
  289. style="margin:10px 0 0 0">
  290. </el-input>
  291. <h4 style="font-weight: normal;">{{ $t('whotoremindtocheck') +':'}}{{checkLists.length}}</h4>
  292. <i class="el-icon-circle-plus pron_i" style="font-size: 28px;color: #409EFF;" @click="addI(0)"></i>
  293. <div class="remind" ref="addRem" style="display: none">
  294. <el-checkbox-group v-model="checkboxGrounp" v-for="item in users" :key="item.id">
  295. <p>
  296. <el-checkbox :label="item.name" @change="kkk(item)">
  297. <span>
  298. <span v-if="user.userNameNeedTranslate != '1'">
  299. {{item.name}}
  300. </span>
  301. <span v-if="user.userNameNeedTranslate == '1'">
  302. <ww-open-data type='userName' :openid='item.name'></ww-open-data>
  303. </span>
  304. </span>
  305. </el-checkbox>
  306. </p>
  307. </el-checkbox-group>
  308. </div>
  309. <div class="ssp" @click="sss"></div>
  310. <!-- </el-form> -->
  311. <div class="pro_btn">
  312. <el-button size="mini" @click="shutPro">{{ $t('btn.cancel') }}</el-button>
  313. <el-button size="mini" type="primary" @click="addTaskProgress">{{ $t('fa-bu') }}</el-button>
  314. </div>
  315. </div>
  316. <div class="ddl" v-if="recentProgressInfo != null && recentProgressInfo.id != null">
  317. <div class="elCard" style="margin-bottom: 10px; height:" >
  318. <i class="el-icon-success" style="color: #43d14f;" v-if="recentProgressInfo.status == 0"></i>
  319. <i class="el-icon-success" style="color: #fd7624;" v-else-if="recentProgressInfo.status == 1"></i>
  320. <i class="el-icon-success" style="color: #fd4d47;" v-else></i>
  321. <span v-if="recentProgressInfo.status == 0">{{ $t('normals') }}</span>
  322. <span v-else-if="recentProgressInfo.status == 1">{{ $t('normals') }}</span>
  323. <span v-else>{{ $t('withinthetimelimit') }}</span>
  324. <el-dropdown trigger="click" style="float:right;cursor:pointer; float: right;">
  325. <i class="el-icon-more" ></i>
  326. <el-dropdown-menu slot="dropdown">
  327. <el-dropdown-item divided>
  328. <span @click="deleteTaskProgress(recentProgressInfo.id)"><i class="el-icon-delete"></i>{{ $t('deleteList ') }}</span></el-dropdown-item>
  329. </el-dropdown-menu>
  330. </el-dropdown>
  331. <div class="elCard_qu">{{recentProgressInfo.creatorName}}{{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}</div>
  332. <p style="padding-left: 20px;">{{recentProgressInfo.content}}</p>
  333. <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">{{ $t('viewingHistory') }}</el-button></div>
  334. </div>
  335. </div>
  336. <!-- 任务列表没有数据的时候展示 -->
  337. <div class="nones" v-if="ProgressList.length <= 0">
  338. {{ $t('nodata') }}
  339. </div>
  340. <!-- 任务进展完整状态 -->
  341. <el-dialog :title="$t('other.prompts')" :visible.sync="innerVisibless" append-to-body width="500px">
  342. <div class="integrity">
  343. <h3 style="font-weight: normal;display: inline-block;margin: 0 0 20px 0;">{{ $t('taskprogress') }}:{{ProgressList.length}}</h3>
  344. <!-- <span class="write"><i class="el-icon-circle-plus"></i>填写进展</span> -->
  345. <el-divider></el-divider>
  346. <!-- -->
  347. <div class="block" style="height: 200px;">
  348. <el-timeline style="padding:20px 0 0 0;">
  349. <el-timeline-item
  350. v-for="(activity, index) in ProgressList"
  351. :key="index">
  352. <div class="tb">
  353. <span v-if="activity.status == 0" style="color: #43D14F" class="icon"></span>
  354. <span v-if="activity.status == 1" style="color: #FD7624" class="icon"></span>
  355. <span v-if="activity.status == 2" style="color: red" class="icon"></span>
  356. <div>
  357. <span v-if="activity.status == 0" style="color: #43D14F">{{ $t('normals') }}</span>
  358. <span v-if="activity.status == 1" style="color: #FD7624">{{ $t('atrisk') }}</span>
  359. <span v-if="activity.status == 2" style="color: red">{{ $t('withinthetimelimit') }}</span>
  360. <span style="display: inline-block; float: right; color: #8C8C8C">{{activity.indate | relativeTime}}</span>
  361. </div>
  362. <p style="color: #8C8C8C">{{activity.content}}</p>
  363. </div>
  364. </el-timeline-item>
  365. </el-timeline>
  366. </div>
  367. <!-- -->
  368. </div>
  369. <span slot="footer" class="dialog-footer">
  370. <el-button type="primary" @click="innerVisibless = false">{{ $t('Shutdown') }}</el-button>
  371. </span>
  372. </el-dialog>
  373. </div>
  374. </el-form>
  375. </div>
  376. <div slot="footer" class="dialog-footer">
  377. <el-button v-if="user.id == addForm.createrId || currentProject.inchargerId == user.id || currentProject.creatorId == user.id || permissions.projectManagement" @click.native="deleteTask" style="float:left;">{{ $t('btn.delete') }}</el-button>
  378. <el-button @click.native="addFormVisible = false">{{ $t('btn.cancel') }}</el-button>
  379. <el-button type="primary" @click="submitInsert" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  380. </div>
  381. <div slot="title" v-if="addForm.parentTid != null" >
  382. <!-- <el-link @click="backToParentTask"><i class="el-icon-arrow-left single_line">返回父级任务</i> | {{addForm.parentTname}}</el-link> -->
  383. <el-page-header @back="backToParentTask" :title="$t('parenttask')" :content="addForm.parentTname"></el-page-header>
  384. </div>
  385. <!-- 评论 -->
  386. <div class="remark" v-show="addForm.id != null">
  387. <span class="zh">
  388. <!-- <span v-for="(pl, i) in critic" :key="i"> -->
  389. <!-- <div class="player" v-if="pl"> -->
  390. <div class="player">
  391. <p @click="chan">{{ $t('participantin') }}</p>
  392. <span v-for="(pl, i) in critic" :key="i">
  393. <div class="bj" style="width: 14%">
  394. <span style="background: #778899" v-if="user.userNameNeedTranslate != '1'">{{pl.length > 2 ? pl.substring(pl.length - 2, pl.length) : pl}}</span>
  395. <span style="background: #778899" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='pl'></ww-open-data></span>
  396. </div>
  397. </span>
  398. </div>
  399. <!-- </span> -->
  400. <div class="subject">
  401. <div class="sub-all">{{ $t('alldynamic') }}</div>
  402. <div class="sub-details" ref="main">
  403. <ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto" ref="contRoll">
  404. <div style="width: 100%" v-if="commentList.length <= 0">
  405. <img src="../../assets/image/xiao.png" alt="">
  406. </div>
  407. <li v-for="i in count" class="infinite-list-item counli" :key="i">
  408. <p><i class="el-icon-s-fold"></i> <em>{{ $t('managerQucompletedthedependencytask') }}</em><span>{{ $t('onApril20') }}</span></p>
  409. </li>
  410. <li class="carts" v-for="item in commentList" :key="item.id">
  411. <!-- <el-image style="width: 30px; height: 30px" :src="url" :fit="fit"></el-image> -->
  412. <!-- <i :style="'background' + item.userColor"> -->
  413. <i :style="'background' + item.userColor">
  414. <i v-if="user.userNameNeedTranslate != '1'">
  415. {{item.userName.length > 2 ? item.userName.substring(item.userName.length - 2, item.userName.length) : item.userName}}
  416. </i>
  417. <i v-if="user.userNameNeedTranslate == '1'">
  418. <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
  419. </i>
  420. </i>
  421. <div>
  422. <!-- <p>{{item.userName}}</p> -->
  423. <p v-if="user.userNameNeedTranslate != '1'">{{item.userName}}</p>
  424. <p v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.userName'></ww-open-data></p>
  425. <em>
  426. <!-- {{item.content}} -->
  427. <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate == 1">
  428. {{item.content.msg1}}
  429. <ww-open-data type='userName' :openid='item.content.msg2'></ww-open-data>
  430. {{item.content.msg3}}
  431. </p>
  432. <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate != 1">{{item.content}}</p>
  433. </em>
  434. </div>
  435. <span>{{item.createTime | relativeTime}}</span>
  436. </li>
  437. </ul>
  438. </div>
  439. </div>
  440. <div class="issue">
  441. <!-- <el-input type="textarea" class="textareays" label-width="100%" label-height="140px"></el-input> -->
  442. <div class="issue_fixation">
  443. <div class="inputDeep"><el-input
  444. type="textarea"
  445. :placeholder="$t('pleaseentercontent')"
  446. :autosize="{ minRows: 6, maxRows: 6}"
  447. v-model="textarea2"
  448. class="inputDeeps"
  449. >
  450. </el-input></div>
  451. <el-button class="issue-button" type="primary" @click="release()">{{ $t('fa-bu') }}</el-button>
  452. </div>
  453. </div>
  454. </span>
  455. </div>
  456. <!-- 评论 -->
  457. </el-dialog>
  458. </section>
  459. </template>
  460. <style scoped>
  461. .input-with-select .el-input-group__prepend {
  462. background-color: #fff;
  463. }
  464. .line {
  465. padding:10px;
  466. }
  467. .line span{
  468. font-size:18px;
  469. }
  470. .line span:nth-child(even){
  471. float:right;
  472. }
  473. .classification {
  474. width: 120px;
  475. border-right: 1px solid #f2f2f2;
  476. display: flex;
  477. flex-wrap: wrap;
  478. padding-top: 20px;
  479. }
  480. .classification p{
  481. width: 120px;
  482. text-align: center;
  483. line-height: 50px;
  484. margin: 0;
  485. cursor: pointer;
  486. }
  487. .classification p:hover {
  488. background: #dddddd;
  489. }
  490. .on {
  491. color: #409EFF;
  492. }
  493. .acl{
  494. display: inline-block;
  495. width: 300px;
  496. height: 22px;
  497. overflow: hidden;
  498. white-space: nowrap;
  499. text-overflow: ellipsis;
  500. display: flex;
  501. align-items: center;
  502. margin: 0;
  503. padding: 0;
  504. line-height: 0;
  505. }
  506. .cal {
  507. color: #409EFF;
  508. width: 300px;
  509. overflow: hidden;
  510. white-space: nowrap;
  511. text-overflow: ellipsis;
  512. }
  513. .autodatespan{
  514. padding: 1.5px 2.5px;
  515. width: 73px;
  516. height: 16px;
  517. line-height: 16px;
  518. text-align: center;
  519. display: block;
  520. }
  521. .redwarningspan{
  522. background: #e62412;
  523. color: #fff;
  524. border-radius: 3px;
  525. }
  526. /* p {
  527. margin: 0 !important;
  528. } */
  529. </style>
  530. <style lang="scss" scoped>
  531. .counli {
  532. em {
  533. font-style: normal;
  534. display: inline-block;
  535. margin-left: 9%;
  536. }
  537. span {
  538. float: right;
  539. }
  540. }
  541. .carts {
  542. position: relative;
  543. .el-image{
  544. border-radius: 50%;
  545. float: left;
  546. width: 20%;
  547. }
  548. i {
  549. width: 30px;
  550. height: 30px;
  551. // background: #778899;
  552. display: inline-block;
  553. float: left;
  554. border-radius:50%;
  555. font-style:normal;
  556. font-size: 12px;
  557. line-height: 30px;
  558. text-align: center;
  559. color: #fff;
  560. background: #778899;
  561. }
  562. div {
  563. text-align: left;
  564. p {
  565. text-align: left;
  566. margin-left: 10px;
  567. margin-left: 13%;
  568. }
  569. em {
  570. display: block;
  571. font-style: normal;
  572. margin-left: 13%;
  573. }
  574. }
  575. span {
  576. font-size: 10px;
  577. float: right;
  578. margin-top: -40px;
  579. }
  580. }
  581. .issue {
  582. // height: 20%;
  583. // position: relative;
  584. // z-index: 4;
  585. .zh{
  586. position: relative;
  587. width: 100%;
  588. height: 100%;
  589. }
  590. .textareays {
  591. background: #000;
  592. height: 140px;
  593. border: 0;
  594. .el-textarea__inner {
  595. height: 85%;
  596. }
  597. }
  598. .issue-button {
  599. position: absolute;
  600. bottom: 20px;
  601. right: 20px;
  602. }
  603. }
  604. .inputDeep {
  605. position: absolute;
  606. bottom: 85px;
  607. width: 95%;
  608. margin: 0 12px;
  609. }
  610. .inputDeep .el-textarea .el-textarea__inner{
  611. border: 0 !important;
  612. resize: none !important;
  613. }
  614. .inputDeeps .el-textarea__inner {
  615. border: 0 !important;
  616. resize: none !important;
  617. }
  618. .scop_span {
  619. display: inline-block;
  620. padding: 2px 5px;
  621. }
  622. </style>
  623. <script>
  624. import { error } from 'dingtalk-jsapi';
  625. import util from "../../common/js/util";
  626. // 引入自定义组件
  627. import selectCat from "@/components/select.vue"
  628. // 富文本样式
  629. import 'quill/dist/quill.core.css'
  630. import 'quill/dist/quill.snow.css'
  631. import 'quill/dist/quill.bubble.css'
  632. // 导入富文本
  633. import { quillEditor } from 'vue-quill-editor'
  634. export default {
  635. name: "two-list-headerslots",
  636. display: "Two list header slot",
  637. order: 14,
  638. components: {
  639. // draggable,
  640. // // editor,
  641. // FileCenter,
  642. // ProjectInfo,
  643. // Summary,
  644. // Earning,
  645. quillEditor, // 富文本
  646. selectCat
  647. },
  648. data() {
  649. return {
  650. typeField: null,
  651. searchField: '0',
  652. keyword:null,
  653. user: JSON.parse(sessionStorage.getItem("user")),
  654. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  655. userDetailVisible: false,
  656. userDetail:{},
  657. date: new Date(),
  658. users: [],
  659. participator:[],
  660. tableHeight: 0,
  661. listLoading: false,
  662. total: 0,
  663. page: 1,
  664. size: 20,
  665. list: [],
  666. subProjectVisible: false,
  667. subProjectList: [],//子项目列表
  668. currentProject:{},
  669. addSubProject: false,
  670. addFormVisible: false,
  671. addLoading: false,
  672. title: "",
  673. addForm: {
  674. name: '',
  675. userId: [],
  676. },
  677. rules: {
  678. name: [{ required: true, message: this.$t('Pleaseenteraprojectname'), trigger: "blur" }],
  679. },
  680. idx: 1,
  681. taskDetails: false,
  682. addForm: {
  683. name: '',
  684. },
  685. rules: {
  686. name: [{ required: true, message: this.$t('pleaseenteragroupname'), trigger: "blur" }],
  687. },
  688. rules2: {
  689. stagesName: [{ required: true, message: this.$t('pleaseenteratasklistname'), trigger: "blur" }],
  690. },
  691. taskRules : {
  692. name: [{ required: true, message: this.$t('enterthetaskcontent'), trigger: "blur" }],
  693. },
  694. sleectId: null,
  695. sleectProjectId: null,
  696. sidebarIndex: null, // 侧边栏索引
  697. url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
  698. count: 0,
  699. textarea2: '',
  700. taskId: null,
  701. commentList: [],
  702. radio: 0,
  703. critic: [], // 评论头像的数组
  704. editorOption: { // 富文本框里面的默认值
  705. placeholder: this.$t('pleaseentethetext'),
  706. modules: {
  707. toolbar:[
  708. ['bold', 'italic', 'underline', 'strike'], //加粗,斜体,下划线,删除线
  709. // ['blockquote', 'code-block'], //引用,代码块
  710. [{ 'header': 1 }, { 'header': 2 }], // 标题,键值对的形式;1、2表示字体大小
  711. // [{ 'list': 'ordered'}, { 'list': 'bullet' }], //列表
  712. // [{ 'script': 'sub'}, { 'script': 'super' }], // 上下标
  713. // [{ 'indent': '-1'}, { 'indent': '+1' }], // 缩进
  714. // [{ 'direction': 'rtl' }], // 文本方向
  715. [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
  716. [{ 'header': [1, 2, 3, 4, 5, 6, false] }], //几级标题
  717. [{ 'color': [] }, { 'background': [] }], // 字体颜色,字体背景颜色
  718. // [{ 'font': [] }], //字体
  719. [{ 'align': [] }], //对齐方式
  720. ['clean'], //清除字体样式
  721. // ['image','video'] //上传图片、上传视频
  722. ['image'] //上传图片、上传视频
  723. ], //工具栏设置
  724. },
  725. theme: 'snow',
  726. },
  727. textContent: true, // 控制提交
  728. times: null,
  729. text2: '',
  730. innerVisibless: false, // 任务展示弹出层
  731. activities: [{
  732. content: this.$t('normals'),
  733. timestamp: this.$t('hoursago'),
  734. size: 'large',
  735. type: 'primary',
  736. icon: 'el-icon-circle-check',
  737. color: '#409EFF'
  738. }, {
  739. content: this.$t('withinthetimelimit'),
  740. timestamp: this.$t('hoursago8'),
  741. color: '#F87872'
  742. }],
  743. ProgressList: [],
  744. checkboxGrounp: [], // 选中人的数据
  745. checkLists: [], // 选中人数据的ID
  746. taskIid: null,
  747. viewList: [{id:1,name:this.$t('alltaskss')},{id:2,name:this.$t('taskinprogress')},{id:3,name:this.$t('missionscompleted')},{id:4,name:this.$t('taskscheduled')},
  748. {id:5,name:this.$t('createdthetask')},{id:6,name:this.$t('missionIwason')},{id:7,name:this.$t('todaytask')},{id:8,name:this.$t('taskthatisoverdue')}],
  749. importanceList:[{id:0,name:this.$t('yi-ban')},{id:1,name:this.$t('zhong-yao')},{id:2,name:this.$t('jin-ji')},],
  750. taskTypeList:[{id:0,name:this.$t('other.task'), icon:"iconfont firerock-iconrenwu"},{id:1,name:this.$t('other.milestone'),icon:"iconfont firerock-iconicon-"},{id:2,name:this.$t('risk'),icon:"iconfont firerock-iconfengxian"}],
  751. taskTypeColor:['#20A0FF','#8613ad','#bf0404'],
  752. taskTypeIcon:['iconfont firerock-iconrenwu','iconfont firerock-iconicon-','iconfont firerock-iconfengxian'],
  753. taskStatusList:[this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone')],
  754. //优先级
  755. taskLevelColor:['#262626','#E6A23C','#F56C6C'],
  756. stageList: '',
  757. selectedGroup:{},
  758. dateClass: true,
  759. dateType: 0,
  760. dateSelect: [],
  761. groupName: '',
  762. groupNameList: [],
  763. departmentList: [],
  764. deptId: []
  765. };
  766. },
  767. methods: {
  768. judgedate(itemD){
  769. let nowdate = new Date()
  770. let idate = new Date(itemD + " 23:59:59")
  771. return nowdate > idate ? true : false
  772. },
  773. deleteSubPro(subProject) {
  774. this.$confirm(this.$t('makesuretodeletethesubproject') + subProject.name + this.$t('ma'),this.$t('deletesubproject'), {
  775. confirmButtonText: this.$t('btn.determine'),
  776. cancelButtonText: this.$t('btn.cancel'),
  777. type: "warning"
  778. })
  779. .then(() => {
  780. this.listLoading = true;
  781. this.http.post('/sub-project/deleteProject',{
  782. id: subProject.id
  783. },
  784. res => {
  785. this.listLoading = false;
  786. if (res.code == "ok") {
  787. this.$message({
  788. message: this.$t('message.successfullyDeleted'),
  789. type: "success"
  790. });
  791. this.subProject(this.currentProject);
  792. } else {
  793. this.$message({
  794. message: res.msg,
  795. type: "error"
  796. });
  797. }
  798. },
  799. error => {
  800. this.listLoading = false;
  801. this.$message({
  802. message: error,
  803. type: "error"
  804. });
  805. }
  806. );
  807. })
  808. .catch(() => {});
  809. },
  810. searchList() {
  811. this.page = 1;
  812. this.getList();
  813. },
  814. addNewSubProject(subProject) {
  815. if (subProject == null) {
  816. this.addForm = {projectId: this.currentProject.id}
  817. } else {
  818. this.addForm = subProject;
  819. }
  820. this.addSubProject = true;
  821. },
  822. //显示子项目
  823. subProject(item) {
  824. this.subProjectVisible = true;
  825. this.currentProject = item;
  826. this.http.post('/sub-project/list', {
  827. projectId: item.id
  828. },
  829. res => {
  830. if (res.code == "ok") {
  831. this.subProjectList = res.data;
  832. } else {
  833. this.$message({
  834. message: res.msg,
  835. type: "error"
  836. });
  837. }
  838. },
  839. error => {
  840. this.$message({
  841. message: error,
  842. type: "error"
  843. });
  844. });
  845. },
  846. //显示用户详情
  847. showUser(userId) {
  848. this.userDetailVisible = true;
  849. this.http.post(this.port.manage.userDetail, {
  850. userId: userId
  851. },
  852. res => {
  853. if (res.code == "ok") {
  854. this.userDetail = res.data;
  855. } else {
  856. this.$message({
  857. message: res.msg,
  858. type: "error"
  859. });
  860. }
  861. },
  862. error => {
  863. this.$message({
  864. message: error,
  865. type: "error"
  866. });
  867. });
  868. },
  869. //选择参与人
  870. changeParticipator() {
  871. //检查是否在参与人中,如果没有需要加入到参与人中
  872. // console.log(this.addForm.userId);
  873. var find = false;
  874. this.participator = [];
  875. this.addForm.userId.forEach(u=>{
  876. var findUser = this.users.filter(au=>au.id == u)[0];
  877. this.participator.push(findUser);
  878. })
  879. },
  880. getUsers() {
  881. // this.http.post(this.port.manage.list, {
  882. // departmentId: -1,
  883. // pageIndex: 1,
  884. // // pageSize: 99999
  885. // pageSize: -1
  886. // },
  887. this.http.post('/user/getSimpleActiveUserList', {},
  888. res => {
  889. if (res.code == "ok") {
  890. this.users = res.data;
  891. } else {
  892. this.$message({
  893. message: res.msg,
  894. type: "error"
  895. });
  896. }
  897. },
  898. error => {
  899. this.$message({
  900. message: error,
  901. type: "error"
  902. });
  903. });
  904. },
  905. addStagePost() {
  906. let param = JSON.parse(JSON.stringify(this.stageForm));
  907. param.taskList = [];
  908. this.http.post('/stages/save',param,
  909. res => {
  910. if (res.code == "ok") {
  911. this.stageList = res.data;
  912. this.addStageDialog = false;
  913. } else {
  914. this.$message({
  915. message: res.msg,
  916. type: "error"
  917. });
  918. }
  919. },
  920. error => {
  921. this.$message({
  922. message: error,
  923. type: "error"
  924. });
  925. });
  926. },
  927. //分页
  928. handleCurrentChange(val) {
  929. this.page = val;
  930. this.getList();
  931. },
  932. handleSizeChange(val) {
  933. this.size = val;
  934. this.getList();
  935. },
  936. //获取项目列表
  937. getList() {
  938. this.listLoading = true;
  939. let parameter = {
  940. status: this.searchField,
  941. viewId: this.idx,
  942. pageIndex: this.page,
  943. pageSize: this.size,
  944. // type: this.typeField
  945. }
  946. if(this.typeField != 'null' && this.typeField != null && this.typeField != '') {
  947. parameter.type = this.typeField
  948. }
  949. if(this.dateSelect != null && this.dateSelect.length != 0){
  950. parameter.dateType = this.dateType
  951. parameter.startDate = this.dateSelect[0]
  952. parameter.endDate = this.dateSelect[1]
  953. }
  954. // if(this.user.companyId == '428') {
  955. // parameter.groupName = this.groupName
  956. // }
  957. if(this.deptId.length > 0) {
  958. parameter.deptId = this.deptId[this.deptId.length - 1]
  959. } else {
  960. parameter.deptId = ''
  961. }
  962. this.http.post('/task/listByPage', parameter,
  963. res => {
  964. this.listLoading = false;
  965. if(res.code == 'ok') {
  966. if(this.user.userNameNeedTranslate == 1) {
  967. for(var i in res.data.records) {
  968. let arr = []
  969. if(res.data.records[i].executorName) {
  970. arr = res.data.records[i].executorName.split(',')
  971. }
  972. res.data.records[i].executorNameList = arr
  973. }
  974. }
  975. this.list = res.data.records
  976. this.total = res.data.total
  977. } else {
  978. this.$message({
  979. message: res.msg,
  980. type: "error"
  981. });
  982. }
  983. // console.log(res)
  984. },
  985. error => {
  986. this.listLoading = false;
  987. this.$message({
  988. message: error,
  989. type: "error"
  990. });
  991. })
  992. },
  993. //显示新增界面
  994. handleAdd(i, item) {
  995. if(i == -1) {
  996. this.title = this.$t('addWork');
  997. this.addForm = {
  998. name: '',
  999. userId: [],
  1000. code:'',
  1001. inchargerId:null,
  1002. }
  1003. } else {
  1004. this.title = this.$t('modifytheproject');
  1005. var list = item.participator , arr = [];
  1006. for(var j in list) {
  1007. arr.push(list[j].id)
  1008. }
  1009. this.addForm = {
  1010. id: item.id,
  1011. name: item.projectName,
  1012. userId: arr,
  1013. code:item.projectCode,
  1014. inchargerId: item.inchargerId
  1015. }
  1016. this.changeParticipator();
  1017. }
  1018. this.addFormVisible = true;
  1019. },
  1020. //提交子项目创建修改请求
  1021. submitInsertSubProject () {
  1022. this.$refs.form2.validate(valid => {
  1023. if (valid) {
  1024. this.http.post('/sub-project/saveOrUpdate',this.addForm,
  1025. res => {
  1026. if (res.code == "ok") {
  1027. this.$message({
  1028. message: this.$t('operationissuccessful'),
  1029. type: "success"
  1030. });
  1031. this.subProject(this.currentProject);
  1032. this.addSubProject = false;
  1033. } else {
  1034. this.$message({
  1035. message: res.msg,
  1036. type: "error"
  1037. });
  1038. }
  1039. },
  1040. error => {
  1041. this.listLoading = false;
  1042. this.$message({
  1043. message: error,
  1044. type: "error"
  1045. });
  1046. }
  1047. );
  1048. }
  1049. });
  1050. },
  1051. // submitInsert() {
  1052. // console.log("111");
  1053. // this.$refs.form1.validate(valid => {
  1054. // if (valid) {
  1055. // this.addLoading = true;
  1056. // let formData = new FormData();
  1057. // formData.append("name", this.addForm.name);
  1058. // if(this.addForm.id != null) {
  1059. // formData.append("id", this.addForm.id);
  1060. // }
  1061. // if(this.addForm.userId.length != 0) {
  1062. // for(var j in this.addForm.userId) {
  1063. // formData.append("userId", this.addForm.userId[j]);
  1064. // }
  1065. // }
  1066. // if(this.addForm.inchargerId != null) {
  1067. // formData.append("inchargerId", this.addForm.inchargerId);
  1068. // }
  1069. // if(this.addForm.code != null) {
  1070. // formData.append("code", this.addForm.code);
  1071. // }
  1072. // formData.delete("refTaskList")
  1073. // console.log('走了')
  1074. // this.http.uploadFile(this.port.project.add,formData,
  1075. // res => {
  1076. // this.addLoading = false;
  1077. // if (res.code == "ok") {
  1078. // this.$message({
  1079. // message: this.addForm.id!=null?'修改':'创建'+"成功",
  1080. // type: "success"
  1081. // });
  1082. // this.addFormVisible = false;
  1083. // this.getList();
  1084. // } else {
  1085. // this.$message({
  1086. // message: res.msg,
  1087. // type: "error"
  1088. // });
  1089. // }
  1090. // },
  1091. // error => {
  1092. // this.addLoading = false;
  1093. // this.$message({
  1094. // message: error,
  1095. // type: "error"
  1096. // });
  1097. // });
  1098. // }
  1099. // });
  1100. // },
  1101. // 删除
  1102. deletePro(i, item) {
  1103. this.$confirm(this.$t('identifytheproject') + item.projectName + this.$t('ma'),this.$t('deletetheproject'), {
  1104. confirmButtonText: this.$t('btn.determine'),
  1105. cancelButtonText: this.$t('btn.cancel'),
  1106. type: "warning"
  1107. })
  1108. .then(() => {
  1109. this.listLoading = true;
  1110. this.http.post(this.port.project.delete,{
  1111. id: item.id
  1112. },
  1113. res => {
  1114. this.listLoading = false;
  1115. if (res.code == "ok") {
  1116. this.$message({
  1117. message: this.$t('message.successfullyDeleted'),
  1118. type: "success"
  1119. });
  1120. this.getList();
  1121. } else {
  1122. this.$message({
  1123. message: res.msg,
  1124. type: "error"
  1125. });
  1126. }
  1127. },
  1128. error => {
  1129. this.listLoading = false;
  1130. this.$message({
  1131. message: error,
  1132. type: "error"
  1133. });
  1134. }
  1135. );
  1136. })
  1137. .catch(() => {});
  1138. },
  1139. detail(i) {
  1140. this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
  1141. },
  1142. // 切换当前选项的索引
  1143. switchs(e) {
  1144. this.idx = e
  1145. this.page = 1
  1146. // console.log(this.searchField)
  1147. this.getList()
  1148. },
  1149. // 下拉框选择
  1150. hiddens(e) {
  1151. if(e == 1 && (this.dateSelect == null || this.dateSelect.length == 0)){
  1152. return
  1153. }
  1154. // console.log(this.searchField)
  1155. this.page = 1
  1156. this.getList()
  1157. },
  1158. // 完成
  1159. completes(e, el) {
  1160. this.http.post('/task/finish', {
  1161. id: e,
  1162. taskStatus: el
  1163. },
  1164. res => {
  1165. if (res.code == "ok") {
  1166. this.$message({
  1167. message: this.$t('operationissuccessful'),
  1168. type: "success"
  1169. });
  1170. this.getList();
  1171. } else {
  1172. this.$message({
  1173. message: res.msg,
  1174. type: "error"
  1175. });
  1176. }
  1177. },
  1178. error => {
  1179. this.listLoading = false;
  1180. this.$message({
  1181. message: error,
  1182. type: "error"
  1183. });
  1184. }
  1185. )
  1186. },
  1187. // 点击任务事件
  1188. editTask(task) {
  1189. // console.log(task)
  1190. this.addFormVisible = true;
  1191. // this.addLoading = false;
  1192. this.title = this.$t('editingtasks');
  1193. this.getTaskDetail(task.id);
  1194. this.getTaskProgressList(task.id); // 获取任务进展列表
  1195. this.getUsers(); // 获取名单数据
  1196. this.gain(task); // 获取评论列表
  1197. // this.getStageList()
  1198. },
  1199. addExecutorLine() {
  1200. this.addForm.executorListFront.push({executorId:null, planHours:8});
  1201. this.$forceUpdate();
  1202. },
  1203. removeExecutorLine(index) {
  1204. this.addForm.executorListFront.splice(index,1);
  1205. this.$forceUpdate();
  1206. },
  1207. getTaskDetail(id) {
  1208. this.http.post('/task/getTask',{id: id},
  1209. res => {
  1210. if (res.code == "ok") {
  1211. this.addForm = res.data;
  1212. this.addForm.createDate = null;
  1213. this.addForm.indate = null;
  1214. this.addLoading = false;
  1215. this.recentProgressInfo = this.addForm.progress;
  1216. this.addForm.executorListFront = this.addForm.executorList;
  1217. //删除中间传值的变量数组
  1218. delete this.addForm.executorList;
  1219. } else {
  1220. this.$message({
  1221. message: res.msg,
  1222. type: "error"
  1223. });
  1224. }
  1225. },
  1226. error => {
  1227. this.$message({
  1228. message: error,
  1229. type: "error"
  1230. });
  1231. });
  1232. },
  1233. //获取任务进展列表
  1234. getTaskProgressList(taskId) {
  1235. this.taskIid = taskId
  1236. this.http.post('/task-progress/list', {taskId: taskId},
  1237. res => {
  1238. if (res.code == "ok") {
  1239. this.ProgressList = res.data;
  1240. this.recentProgressInfo = res.data[0]
  1241. } else {
  1242. this.$message({
  1243. message: res.msg,
  1244. type: "error"
  1245. });
  1246. }
  1247. }
  1248. );
  1249. },
  1250. getUsers() {
  1251. // console.log(this.port.manage.list)
  1252. // this.http.post(this.port.manage.list, {
  1253. // departmentId: -1,
  1254. // pageIndex: 1,
  1255. // pageSize: 99999
  1256. // },
  1257. this.http.post('/user/getSimpleActiveUserList', {},
  1258. res => {
  1259. if (res.code == "ok") {
  1260. this.users = res.data;
  1261. } else {
  1262. this.$message({
  1263. message: res.msg,
  1264. type: "error"
  1265. });
  1266. }
  1267. },
  1268. error => {
  1269. this.$message({
  1270. message: error,
  1271. type: "error"
  1272. });
  1273. });
  1274. },
  1275. // 获取评论列表
  1276. gain (task) {
  1277. this.commentList = [];
  1278. this.taskId = task.id;
  1279. this.http.post('/task-comment/getList', {taskId: task.id},
  1280. res => {
  1281. if (res.code == "ok") {
  1282. for(var i in res.data) {
  1283. if(res.data[i].content.indexOf('$userName=') != '-1') {
  1284. let obj = {
  1285. msg1: res.data[i].content.split('$')[0],
  1286. msg2: res.data[i].content.split('$')[1].split('=')[1],
  1287. msg3: res.data[i].content.split('$')[2]
  1288. }
  1289. res.data[i].content = obj
  1290. } else {
  1291. if(this.user.userNameNeedTranslate == 1) {
  1292. let obj = {
  1293. msg1: res.data[i].content,
  1294. msg2: '',
  1295. msg3: ''
  1296. }
  1297. res.data[i].content = obj
  1298. }
  1299. // let obj = {
  1300. // name: '',
  1301. // con: res.data[i].content
  1302. // }
  1303. // res.data[i].content = obj
  1304. }
  1305. }
  1306. this.commentList = res.data
  1307. console.log(res.data, '数据')
  1308. this.sppk(this.commentList) // 获取参与人的方法
  1309. } else {
  1310. this.$message({
  1311. message: res.msg,
  1312. type: "error"
  1313. });
  1314. }
  1315. },
  1316. error => {
  1317. this.$message({
  1318. message: error,
  1319. type: "error"
  1320. });
  1321. });
  1322. },
  1323. // 获取评论参与人
  1324. sppk(comit) {
  1325. var sk = []
  1326. comit.forEach(function(e){
  1327. sk.push(e.userName)
  1328. })
  1329. this.critic = new Set(sk)
  1330. },
  1331. sss(){
  1332. this.$refs.addRem.style.display="none"
  1333. },
  1334. addprogress(){ // 添加子任务进展事件
  1335. this.$refs.proBox.style.display="block"
  1336. this.$refs.addPro.style.display="none"
  1337. },
  1338. shutPro() { // 关闭任务进展
  1339. this.$refs.addPro.style.display="block"
  1340. this.$refs.addRem.style.display="none"
  1341. this.$refs.proBox.style.display="none"
  1342. },
  1343. addI() { // 打开选择查看
  1344. this.$refs.addRem.style.display="block"
  1345. },
  1346. load() {
  1347. if(this.count >= 0) return
  1348. this.count += 2
  1349. },
  1350. onEditorFocus() {
  1351. this.onEditorBlur()
  1352. },
  1353. kkk(el){
  1354. var k = this.checkLists.indexOf(el.id)
  1355. if (k == -1) {
  1356. this.checkLists.push(el.id)
  1357. } else {
  1358. this.checkLists.splice(k, 1)
  1359. }
  1360. },
  1361. shutPro() { // 关闭任务进展
  1362. this.$refs.addPro.style.display="block"
  1363. this.$refs.addRem.style.display="none"
  1364. this.$refs.proBox.style.display="none"
  1365. },
  1366. addTaskProgress() { //创建任务进展
  1367. var param = {
  1368. taskId: this.taskIid,
  1369. status: this.radio,
  1370. content: this.text2,
  1371. participatorIds: this.checkLists.toString()
  1372. };
  1373. this.http.post('/task-progress/addProgress', param,
  1374. res => {
  1375. if (res.code == "ok") {
  1376. this.shutPro()
  1377. this.getTaskProgressList(this.taskIid)
  1378. this.$message({
  1379. message: this.$t('releasesuccess'),
  1380. type: "success"
  1381. });
  1382. this.checkboxGrounp = [],
  1383. this.checkLists = [],
  1384. this.text2 = '',
  1385. this.radio = 0
  1386. } else {
  1387. this.$message({
  1388. message: res.msg,
  1389. type: "error"
  1390. });
  1391. }
  1392. }
  1393. );
  1394. },
  1395. //删除任务进展
  1396. deleteTaskProgress(id) {
  1397. this.http.post('/task-progress/deleteProgress', {id: id},
  1398. res => {
  1399. if (res.code == "ok") {
  1400. this.getTaskProgressList(this.taskIid)
  1401. this.$message({
  1402. message: this.$t('message.successfullyDeleted'),
  1403. type: "success"
  1404. });
  1405. } else {
  1406. this.$message({
  1407. message: res.msg,
  1408. type: "error"
  1409. });
  1410. }
  1411. }
  1412. );
  1413. },
  1414. //显示子任务创建卡片
  1415. addSubTask() {
  1416. this.addFormVisible = true;
  1417. this.addForm = {parentTname: this.addForm.name,parentTid: this.addForm.id,projectId: this.addForm.projectId, groupId: this.addForm.groupId, taskLevel:0, planHours: 8, taskType: 0};
  1418. this.addLoading = false;
  1419. },
  1420. taskLineClick(row, column, event) {
  1421. this.editTask(row);
  1422. },
  1423. finishTask(task) {
  1424. this.http.post('/task/finish',{id: task.id, taskStatus: task.taskStatus},
  1425. res => {
  1426. if (res.code == "ok") {
  1427. if (this.groupType == 0) {
  1428. this.getStageList();
  1429. } else {
  1430. // this.getViewTaskList();
  1431. }
  1432. } else {
  1433. this.$message({
  1434. message: res.msg,
  1435. type: "error"
  1436. });
  1437. }
  1438. },
  1439. error => {
  1440. this.$message({
  1441. message: error,
  1442. type: "error"
  1443. });
  1444. });
  1445. },
  1446. //认领任务
  1447. addAsMyTask(task) {
  1448. this.http.post('/task/addAsMyTask',{id: task.id},
  1449. res => {
  1450. if (res.code == "ok") {
  1451. this.getStageList();
  1452. } else {
  1453. this.$message({
  1454. message: res.msg,
  1455. type: "error"
  1456. });
  1457. }
  1458. },
  1459. error => {
  1460. this.$message({
  1461. message: error,
  1462. type: "error"
  1463. });
  1464. });
  1465. },
  1466. timess(){
  1467. var date = new Date()
  1468. let Y = date.getFullYear()
  1469. let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
  1470. let D = date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate()
  1471. this.times = `${Y}-${M}-${D}`
  1472. },
  1473. showSubTaskList(task) {
  1474. this.subTaskVisible = true;
  1475. this.addForm = task;
  1476. },
  1477. addTask(stage) {
  1478. this.addFormVisible = true;
  1479. this.addForm = {projectId: stage.projectId, groupId: stage.groupId, stagesId: stage.id, taskLevel:0, planHours: 8, taskType: 0};
  1480. this.addLoading = false;
  1481. this.title=this.$t('createtask ');
  1482. this.commentList = [];
  1483. },
  1484. addStage() {
  1485. this.addStageDialog = true;
  1486. this.stageForm = {groupId: this.selectedGroup.id, projectId: this.curProjectId};
  1487. },
  1488. // 获得焦点时触发
  1489. onEditorBlur(){
  1490. let theEle = this.$refs.text; // 获取元素
  1491. var img = theEle.value.match(/<img[^>]+>/g); // 赛选 img 标签
  1492. var arrImg = ''
  1493. for (var j = 0; j < img.length; j++) {
  1494. // 正则匹配,摘出img标签下的src里的内容,即capture
  1495. img[j].replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
  1496. arrImg += capture
  1497. });
  1498. }
  1499. // 原来的字符流大小,单位为字节
  1500. var strLen = arrImg.length;
  1501. // 计算后得到的文件流大小,单位为字节
  1502. var fileSize=parseInt(strLen-(strLen/8)*2);
  1503. var size = "";
  1504. size = (fileSize/1024/1024).toFixed(2);
  1505. if (size > 2){
  1506. this.textContent = false
  1507. this.$message({
  1508. showClose: true,
  1509. message: this.$t('imageexceeds2MBpleaseuploaditagain'),
  1510. type: 'warning'
  1511. });
  1512. }
  1513. this.textContent = true
  1514. },
  1515. backToParentTask() {
  1516. this.getTaskDetail(this.addForm.parentTid);
  1517. },
  1518. // 点击发布
  1519. release() {
  1520. if(this.textarea2.length <= 0) return this.$message({message: this.$t('pleaseentercontent'), type: "error"})
  1521. this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
  1522. res => {
  1523. if(res.code == "ok"){
  1524. this.commentList.push(res.data)
  1525. this.sppk(this.commentList)
  1526. this.textarea2 = ""
  1527. this.contRoll() // 滚动到底部
  1528. } else {
  1529. this.$message({
  1530. message: res.msg,
  1531. type: "error"
  1532. });
  1533. }
  1534. },
  1535. error => {
  1536. this.$message({
  1537. message: error,
  1538. type: "error"
  1539. });
  1540. })
  1541. },
  1542. // 滚动到底部
  1543. contRoll(){
  1544. this.$nextTick(() => {
  1545. this.$refs.main.scrollTop = this.$refs.contRoll.scrollHeight;
  1546. })
  1547. },
  1548. submitInsert() {
  1549. if (this.textContent !== true) return this.$message({
  1550. showClose: true,
  1551. message: this.$t('pictureistoolargepleaseuploaditagain'),
  1552. type: 'warning'
  1553. });
  1554. //检查是有重名的执行人
  1555. var exeList = this.addForm.executorListFront;
  1556. for (var i=0;i<exeList.length;i++) {
  1557. var findSameUser = false;
  1558. for (var j=i+1;j<exeList.length; j++) {
  1559. if (exeList[i].executorId && exeList[j].executorId && exeList[i].executorId == exeList[j].executorId) {
  1560. findSameUser = true;
  1561. break;
  1562. }
  1563. }
  1564. if (findSameUser) {
  1565. return this.$message({
  1566. showClose: true,
  1567. message: this.$t('executorhasduplication'),
  1568. type: 'error'
  1569. });
  1570. }
  1571. }
  1572. this.$refs.form1.validate(valid => {
  1573. if (valid) {
  1574. delete this.addForm.subTaskList;
  1575. delete this.addForm.progress;
  1576. delete this.addForm.refTaskList;
  1577. this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
  1578. this.http.post('/task/save',this.addForm,
  1579. res => {
  1580. if (res.code == "ok") {
  1581. this.$message({
  1582. message: this.$t('message.submittedSuccessfully'),
  1583. type: "success"
  1584. });
  1585. if (this.addForm.parentTid == null) {
  1586. this.addFormVisible = false;
  1587. if (this.groupType == 0) {
  1588. this.getStageList();
  1589. } else {
  1590. // this.getViewTaskList();
  1591. }
  1592. } else {
  1593. this.backToParentTask();
  1594. }
  1595. this.getList()
  1596. } else {
  1597. this.$message({
  1598. message: res.msg,
  1599. type: "error"
  1600. });
  1601. }
  1602. },
  1603. error => {
  1604. this.$message({
  1605. message: error,
  1606. type: "error"
  1607. });
  1608. }
  1609. );
  1610. }
  1611. });
  1612. },
  1613. //加载项目内的任务列表
  1614. getStageList() {
  1615. // console.log('进来了')
  1616. this.http.post('/stages/list',{groupId: this.selectedGroup.id, projectId: this.selectedGroup.projectId, order: this.order, isDesc: this.isDesc},
  1617. res => {
  1618. if (res.code == "ok") {
  1619. this.stageList = res.data.list;
  1620. // console.log('触发获取任务列表函数')
  1621. this.timess() // 处理时间的方法
  1622. } else {
  1623. this.$message({
  1624. message: res.msg,
  1625. type: "error"
  1626. });
  1627. }
  1628. },
  1629. error => {
  1630. this.$message({
  1631. message: error,
  1632. type: "error"
  1633. });
  1634. });
  1635. },
  1636. //删除当前编辑的任务
  1637. deleteTask() {
  1638. var warning='';
  1639. if (this.addForm.subTaskList.length > 0) {
  1640. warning=this.$t('currenttaskanditssubtasks');
  1641. } else {
  1642. warning=this.$t('wanttodeletethecurrent task');
  1643. }
  1644. this.$confirm(warning, this.$t('other.prompts'), {
  1645. //type: 'warning'
  1646. }).then(() => {
  1647. this.http.post('/task/delete',{id: this.addForm.id},
  1648. res => {
  1649. if (res.code == "ok") {
  1650. this.addFormVisible = false;
  1651. // this.getStageList();
  1652. this.getList();
  1653. } else {
  1654. this.$message({
  1655. message: res.msg,
  1656. type: "error"
  1657. });
  1658. }
  1659. },
  1660. error => {
  1661. this.$message({
  1662. message: error,
  1663. type: "error"
  1664. });
  1665. });
  1666. });
  1667. },
  1668. chan() {
  1669. // console.log(this.critic)
  1670. },
  1671. getSthForSb() {
  1672. this.http.post('/task/getGroupNameList ',{},
  1673. res => {
  1674. if (res.code == "ok") {
  1675. console.log('看看是', res.data)
  1676. this.groupNameList = res.data
  1677. } else {
  1678. this.$message({
  1679. message: res.msg,
  1680. type: "error"
  1681. });
  1682. }
  1683. },
  1684. error => {
  1685. this.$message({
  1686. message: error,
  1687. type: "error"
  1688. });
  1689. });
  1690. },
  1691. // 获取部门
  1692. getDepartmentList() {
  1693. this.http.post( this.port.manage.depList, {},
  1694. res => {
  1695. if (res.code == "ok") {
  1696. let dptlist = JSON.parse(JSON.stringify(res.data));
  1697. this.departmentList = this.changeArr(dptlist);
  1698. } else {
  1699. this.$message({
  1700. message: res.msg,
  1701. type: "error"
  1702. });
  1703. }
  1704. },error => {
  1705. this.$message({
  1706. message: error,
  1707. type: "error"
  1708. });
  1709. });
  1710. },
  1711. changeArr(arr) {
  1712. for (var i = 0; i < arr.length; i++) {
  1713. if(arr[i].id != -1 && arr[i].id != 0) {
  1714. if (arr[i].children != null && arr[i].children.length>0) {
  1715. arr[i].children = this.changeArr(arr[i].children);
  1716. }
  1717. arr[i].id && (arr[i].value = arr[i].id);
  1718. delete arr[i].id;
  1719. }
  1720. }
  1721. for(var i in arr) {
  1722. if(arr[i].id == -1 || arr[i].id == 0) {
  1723. arr.splice(i,1)
  1724. }
  1725. }
  1726. return arr;
  1727. },
  1728. selectCal(obj) {
  1729. if(obj.distinction == '1') {
  1730. this.addForm.executorListFront[obj.index].executorId = obj.id
  1731. }
  1732. }
  1733. },
  1734. created() {
  1735. let height = window.innerHeight;
  1736. this.tableHeight = height - 195;
  1737. const that = this;
  1738. window.onresize = function temp() {
  1739. that.tableHeight = window.innerHeight - 195;
  1740. };
  1741. },
  1742. mounted() {
  1743. this.getList();
  1744. this.getUsers();
  1745. if(this.user.timeType.projectWithDept) {
  1746. this.getDepartmentList()
  1747. }
  1748. if(this.user.companyId == '428') {
  1749. this.getSthForSb()
  1750. }
  1751. },
  1752. };
  1753. </script>
  1754. <style lang="scss" scoped>
  1755. // .classification {
  1756. // width: 120px;
  1757. // // height: 100%;
  1758. // border-right: 1px solid #f2f2f2;
  1759. // display: flex;
  1760. // flex-wrap: wrap;
  1761. // // align-items: center;
  1762. // // justify-content: center;
  1763. // padding-top: 20px;
  1764. // }
  1765. // .classification p{
  1766. // width: 120px;
  1767. // text-align: center;
  1768. // line-height: 50px;
  1769. // margin: 0;
  1770. // cursor: pointer;
  1771. // }
  1772. // .classification p:hover {
  1773. // background: #dddddd;
  1774. // }
  1775. // .on {
  1776. // // background: #dddddd;
  1777. // color: #409EFF;
  1778. // }
  1779. // .acl{
  1780. // display: inline-block;
  1781. // width: 300px;
  1782. // height: 22px;
  1783. // // line-height: 22px;
  1784. // overflow: hidden;
  1785. // white-space: nowrap;
  1786. // text-overflow: ellipsis;
  1787. // margin: 0;
  1788. // padding: 0;
  1789. // line-height: 0;
  1790. // }
  1791. // .cal {
  1792. // width: 300px;
  1793. // overflow: hidden;
  1794. // white-space: nowrap;
  1795. // text-overflow: ellipsis;
  1796. // cursor: pointer;
  1797. // }
  1798. </style>