list.vue 82 KB

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