list.vue 82 KB

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