list.vue 85 KB

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