taskComponent.vue 129 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866
  1. <template>
  2. <div>
  3. <div style="height: 72vh;overflow: auto;">
  4. <el-form ref="form1" :model="addForm" :rules="taskRules" label-width="120px">
  5. <el-form-item :label="'类型'" v-if="showMmeiLaiDe" prop="taskPlanType">
  6. <el-select v-model="addForm.taskPlanType" :placeholder="$t('defaultText.pleaseChoose')" style="width:100%;" :disabled="doYouWantToDisableAll">
  7. <el-option label="出差" :value="1"></el-option>
  8. <el-option label="在办公事处" :value="2"></el-option>
  9. <el-option label="请假" :value="3"></el-option>
  10. </el-select>
  11. </el-form-item>
  12. <template v-if="addForm.taskPlanType != 3">
  13. <el-form-item :label="$t('subordinatetotheproject')" v-if="showOrNot" prop="projectId">
  14. <el-select v-model="addForm.projectId" :placeholder="$t('defaultText.pleaseChoose')" @change="agentCreatesEvents(1)" filterable="true" style="width:100%;" :disabled="doYouWantToDisableAll">
  15. <el-option-group v-for="group in integrationProjectList" :key="group.label" :label="group.label">
  16. <el-option v-for="item in group.peojectList" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
  17. <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
  18. <span style="float: right;">{{ item.projectName }}</span>
  19. </el-option>
  20. </el-option-group>
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item :label="$t('suoShuRenWuFenZu')" v-if="showOrNot" prop="groupId">
  24. <el-select v-model="addForm.groupId" :placeholder="$t('defaultText.pleaseChoose')" @change="agentCreatesEvents(2)" filterable="true" style="width:100%;" :disabled="doYouWantToDisableAll">
  25. <el-option v-for="item in groupList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  26. </el-select>
  27. </el-form-item>
  28. <el-form-item :label="$t('suoShuRenWuLieBiao')" v-if="showOrNot" prop="stagesId">
  29. <el-select v-model="addForm.stagesId" :placeholder="$t('defaultText.pleaseChoose')" filterable="true" style="width:100%;" :disabled="doYouWantToDisableAll">
  30. <el-option v-for="item in stageList" :key="item.id" :label="item.stagesName" :value="item.id"></el-option>
  31. </el-select>
  32. </el-form-item>
  33. <!--子任务需要选择任务列表 -->
  34. <el-form-item :label="$t('tasklist')" prop="stages" v-if="addForm.parentTid != null">
  35. <el-select v-model="addForm.stagesId" style="width:100%;" >
  36. <el-option v-for="item in stageList" :key="item.id" :label="item.stagesName" :value="item.id"></el-option>
  37. </el-select>
  38. </el-form-item>
  39. <el-form-item :label="$t('qianZhiRenWu')" prop="aheadTidList" >
  40. <el-select v-model="addForm.aheadTidList" style="width:100%;" multiple filterable @change="$forceUpdate()" :disabled="doYouWantToDisableAll">
  41. <el-option v-for="item in relationdata" :key="item.id" :label="item.name" :value="item.id"></el-option>
  42. </el-select>
  43. </el-form-item>
  44. <el-form-item :label="$t('types')" v-if="!showMmeiLaiDe">
  45. <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 && !permissions.editAnyTask) && !(groupResponsibleId == user.id)" @change="selchg()">
  46. <el-option v-for="item in taskTypeList" :key="item.id" :label="item.name" :value="item.id">
  47. <i :class="item.icon" ></i>
  48. <span>{{item.name}}</span>
  49. </el-option>
  50. </el-select>
  51. </el-form-item>
  52. <el-form-item label="任务完成校验" v-if="user.timeType.taskFileCharge">
  53. <el-checkbox v-model="addForm.attachFileRequired" >是否必须上传成果文件</el-checkbox>
  54. </el-form-item>
  55. <el-form-item label="第一审核人" v-if="showMmeiLaiDe" prop="checkSecondId">
  56. <el-select v-model="addForm.checkFirstId" :disabled="true" size="small">
  57. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item label="第二审核人" v-if="showMmeiLaiDe" prop="checkSecondId">
  61. <el-select v-model="addForm.checkSecondId" :disabled="!addForm.checkFirstId || doYouWantToDisableAll" size="small">
  62. <el-option v-for="item in pmUserList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  63. </el-select>
  64. </el-form-item>
  65. <el-form-item :label="$t('taskdefinition')" prop="name">
  66. <el-input v-model="addForm.name" :maxlength="40" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :placeholder="$t('enterthetaskcontent')" clearable></el-input>
  67. </el-form-item>
  68. <el-form-item :label="$t('planCost')" prop="planCost" v-if="user.timeType.taskPlanCost">
  69. <el-input v-model.number="addForm.planCost" :maxlength="40" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :placeholder="$t('planCostHint')" clearable></el-input>
  70. </el-form-item>
  71. </template>
  72. <!-- {{timelabel}}{{mileageCup}} -->
  73. <el-form-item :label="!timelabel ? $t('starttimes') : $t('jie-zhi-shi-jian')" prop="startDate">
  74. <el-date-picker v-model="addForm.startDate" type="date" style="width:40%;" value-format="yyyy-MM-dd"
  75. :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="DateChange()" v-if="!timelabel"></el-date-picker>
  76. <span style="margin-left:30px;margin-right:10px;" v-if="!timelabel">{{ $t('deadline') }}</span>
  77. <el-date-picker style="width:40%;" v-model="addForm.endDate" type="date" value-format="yyyy-MM-dd"
  78. :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="DateChange()"></el-date-picker>
  79. <span style="margin-left:30px;margin-right:10px;" v-if="timelabel && mileageCup">{{ $t('wan-cheng-shi-jian') }}</span>
  80. <el-date-picker style="width:40%;" v-if="timelabel && mileageCup" v-model="addForm.finishDate" type="date" value-format="yyyy-MM-dd"
  81. :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="DateChange()"></el-date-picker>
  82. </el-form-item>
  83. <div style="border: 1px solid #ddd;margin:5px 0;padding:5px 0;">
  84. <div class="container" :style="{ height: containerHeight }" @scroll="handleScroll" ref="container">
  85. <div class="list" :style="{ top: listTop }">
  86. <el-form-item :label="$t('zhi-hang-ren') + (executorItem.indexList + 1)" v-for="(executorItem, index) in showData" :key="index">
  87. <div class="editingTask">
  88. <div style="margin-right: 30px">
  89. <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 && !permissions.editAnyTask && !(groupResponsibleId == user.id)" size="small" filterable clearable :placeholder="$t('pleaseselectanexecutor')" style="width: 150px" @change="$forceUpdate()">
  90. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  91. <span style="float: left">{{ item.name }}</span>
  92. <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
  93. </el-option>
  94. </el-select>
  95. <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :filterable="true" :subject="users" :subjectId="executorItem.executorId" :distinction="'1'" @selectCal="selectCal" :index="executorItem.indexList" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :key="executorItem.indexList"></selectCat>
  96. <!-- <selectPersonnel v-if="user.userNameNeedTranslate == 1" v-model="executorItem.executorId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="$forceUpdate()" :key="executorItem.indexList" /> -->
  97. </div>
  98. <!-- 项目服务 -->
  99. <div v-if="user.companyId==3092">
  100. <span style="margin-left:30px;margin-right:10px;">{{ $t('xiangMuFuWu') }}</span>
  101. <el-select clearable collapse-tags filterable v-model="executorItem.serviceId" size="small" :placeholder="$t('qingXuanZeXiangMuFuWu')" style="width: 300px" @change="serviceIdChange()" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)">
  102. <el-option
  103. v-for="item in sapServiceList"
  104. :key="item.id"
  105. :label="item.serviceName+'-'+item.serviceCode"
  106. :value="item.id">
  107. </el-option>
  108. </el-select>
  109. </div>
  110. <!-- 计划工时 -->
  111. <div>
  112. <span style="margin-right:10px;">{{ $t('plantime') }}</span>
  113. <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" v-model="gstimday[executorItem.indexList]" style="width:120px;" :min="1" :placeholder="$t('danweitian')" @change="chggstim(0,executorItem.indexList)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.day') }}</span>
  114. <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" v-model="gstimhour[executorItem.indexList]" style="width:120px;" :min="1" :placeholder="$t('pleaseentertheplannedworking')" @change="chggstim(1,executorItem.indexList)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.hour') }}</span>
  115. <!-- <el-input-number v-model="numnnumnum" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number> -->
  116. <!-- 移除执行人 -->
  117. <!-- <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id|| permissions.projectManagement || permissions.editAnyTask|| groupResponsibleId == user.id)" style="margin-left:5px" @click="removeExecutorLine(index)"></i> -->
  118. <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id|| permissions.projectManagement || permissions.editAnyTask|| groupResponsibleId == user.id)" style="margin-left:5px" @click="removeExecutorLineNew(executorItem)"></i>
  119. </div>
  120. <template v-if="user.timeType.taskFileCharge == 2">
  121. <div class="reviewerClass">
  122. <div class="reviewerTitles">审核人1</div>
  123. <div>
  124. <el-select v-if="user.userNameNeedTranslate != 1" v-model="executorItem.fileChargeOneId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" size="small" filterable clearable :placeholder="$t('pleaseselectanexecutor')" style="width: 150px" @change="$forceUpdate()">
  125. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  126. <span style="float: left">{{ item.name }}</span>
  127. <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
  128. </el-option>
  129. </el-select>
  130. <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :filterable="true" :subject="users" :subjectId="executorItem.fileChargeOneId" :distinction="'101'" @selectCal="selectCal" :index="executorItem.indexList" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :key="executorItem.indexList"></selectCat>
  131. </div>
  132. </div>
  133. <div class="reviewerClass">
  134. <div class="reviewerTitles">审核人2</div>
  135. <div>
  136. <el-select v-if="user.userNameNeedTranslate != 1" v-model="executorItem.fileChargeTwoId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" size="small" filterable clearable :placeholder="$t('pleaseselectanexecutor')" style="width: 150px" @change="$forceUpdate()">
  137. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  138. <span style="float: left">{{ item.name }}</span>
  139. <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
  140. </el-option>
  141. </el-select>
  142. <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :filterable="true" :subject="users" :subjectId="executorItem.fileChargeTwoId" :distinction="'102'" @selectCal="selectCal" :index="executorItem.indexList" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :key="executorItem.indexList"></selectCat>
  143. </div>
  144. </div>
  145. </template>
  146. </div>
  147. </el-form-item>
  148. </div>
  149. <div class="bar" :style="{ height: barHeight }"></div>
  150. </div>
  151. <el-link type="primary" v-if="(((addForm.executorListFront == null || addForm.executorListFront.length<100) &&
  152. (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id || permissions.projectManagement || permissions.editAnyTask)) ||
  153. groupResponsibleId == user.id)"
  154. style="margin:0 0 10px 35px;position: relative;z-index: 999;" @click.stop="addExecutorLine">{{ $t('addinganexecutor') }}</el-link>
  155. </div>
  156. <template v-if="addForm.taskPlanType != 3">
  157. <el-form-item :label="$t('priority')">
  158. <el-select v-model="addForm.taskLevel" style="width:100%;" :disabled="doYouWantToDisableAll">
  159. <el-option v-for="item in importanceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  160. </el-select>
  161. </el-form-item>
  162. <!-- 富文本 -->
  163. <el-form-item :label="$t('detaileddescription')" style="height: 200px">
  164. <!-- <Editor id="tinymce" v-model="tinymceHtml" :init="editorInit"></Editor> -->
  165. <!-- <el-input type="textarea" v-model="addForm.taskDesc" :rows="3"></el-input> -->
  166. <!-- <quill-edito v-model="addForm.taskDesc"></quill-edito> -->
  167. <quill-editor style="height: 150px" ref="text" v-model="addForm.taskDesc" class="myQuillEditor" :options="editorOption" @blur="onEditorBlur($event)" @focus="onEditorFocus($event)" :disabled="doYouWantToDisableAll"/>
  168. </el-form-item>
  169. <!-- 富文本 -->
  170. <div v-if="addForm.id != null">
  171. <el-divider ></el-divider>
  172. <!-- 任务进展 -->
  173. <template v-if="!timelabel || isRelationItem">
  174. <p ><i class="iconfont firerock-icontree themeFontColor" style="margin-left:10px;">{{ $t('taskprogress') }}</i>
  175. <span ref="addPro" style="display: block; float:right;"><el-link @click="addprogress">{{ $t('addtaskprogress') }}</el-link></span>
  176. </p>
  177. <!-- 任务进展展示 -->
  178. <div style="display: none;" ref="proBox" class="progress">
  179. <!-- <el-form :model="> -->
  180. <el-radio-group v-model="radio">
  181. <el-radio :label="0" class="rala1">{{ $t('normals') }}</el-radio>
  182. <el-radio :label="1" class="rala2">{{ $t('atrisk') }}</el-radio>
  183. <el-radio :label="2" class="rala3">{{ $t('withinthetimelimit') }}</el-radio>
  184. </el-radio-group>
  185. <el-input
  186. type="textarea"
  187. border="0"
  188. :autosize="{ minRows: 2, maxRows: 6}"
  189. :placeholder="$t('detailedprogressdescription')"
  190. v-model="text2"
  191. style="margin:10px 0 0 0">
  192. </el-input>
  193. <h4 style="font-weight: normal;">{{ $t('tixiang') }}{{checkLists.length}}</h4>
  194. <i class="el-icon-circle-plus pron_i themeFontColor" style="font-size: 28px;" @click="addI(0)"></i>
  195. <div class="remind" ref="addRem" style="display: none">
  196. <el-checkbox-group v-model="checkboxGrounp" v-for="item in users" :key="item.id">
  197. <p>
  198. <el-checkbox :label="item.name" @change="kkk(item)">
  199. <span>
  200. <span v-if="user.userNameNeedTranslate != '1'">
  201. {{item.name}}
  202. </span>
  203. <span v-if="user.userNameNeedTranslate == '1'">
  204. <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
  205. </span>
  206. </span>
  207. </el-checkbox>
  208. </p>
  209. </el-checkbox-group>
  210. </div>
  211. <div class="ssp" @click="sss"></div>
  212. <!-- </el-form> -->
  213. <div class="pro_btn">
  214. <el-button size="mini" @click="shutPro">{{ $t('btn.cancel') }}</el-button>
  215. <el-button size="mini" type="primary" @click="addTaskProgress">{{ $t('fa-bu') }}</el-button>
  216. </div>
  217. </div>
  218. <div class="ddl" v-if="recentProgressInfo != null && recentProgressInfo.id != null">
  219. <div class="elCard" style="margin-bottom: 10px; height:" >
  220. <i class="el-icon-success" style="color: #43d14f;" v-if="recentProgressInfo.status == 0"></i>
  221. <i class="el-icon-success" style="color: #fd7624;" v-else-if="recentProgressInfo.status == 1"></i>
  222. <i class="el-icon-success" style="color: #fd4d47;" v-else></i>
  223. <span v-if="recentProgressInfo.status == 0">{{ $t('normals') }}</span>
  224. <span v-else-if="recentProgressInfo.status == 1">{{ $t('normals') }}</span>
  225. <span v-else>{{ $t('withinthetimelimit') }}</span>
  226. <el-dropdown trigger="click" style="float:right;cursor:pointer; float: right;">
  227. <i class="el-icon-more" ></i>
  228. <el-dropdown-menu slot="dropdown">
  229. <el-dropdown-item divided>
  230. <span @click="deleteTaskProgress(recentProgressInfo.id)"><i class="el-icon-delete"></i>{{ $t('deleteList ') }}</span></el-dropdown-item>
  231. </el-dropdown-menu>
  232. </el-dropdown>
  233. <!-- <div class="elCard_qu">{{recentProgressInfo.creatorName}}{{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}</div> -->
  234. <div class="elCard_qu">
  235. <span>
  236. <span v-if="user.userNameNeedTranslate != '1'">
  237. {{recentProgressInfo.creatorName}}
  238. </span>
  239. <span v-if="user.userNameNeedTranslate == '1'">
  240. <TranslationOpenDataText type='userName' :openid='recentProgressInfo.creatorName'></TranslationOpenDataText>
  241. </span>
  242. </span>
  243. {{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}
  244. </div>
  245. <p style="padding-left: 20px;">{{recentProgressInfo.content}}</p>
  246. <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">{{ $t('viewingHistory') }}</el-button></div>
  247. </div>
  248. </div>
  249. <!-- 任务列表没有数据的时候展示 -->
  250. <div class="nones" v-if="ProgressList.length <= 0">
  251. {{ $t('nodata') }}
  252. </div>
  253. <!-- 任务进展完整状态 -->
  254. <el-dialog :title="$t('other.prompts')" :visible.sync="innerVisibless" append-to-body width="500px">
  255. <div class="integrity">
  256. <h3 style="font-weight: normal;display: inline-block;margin: 0 0 20px 0;">{{ $t('taskprogress') }} :{{ProgressList.length}}</h3>
  257. <!-- <span class="write"><i class="el-icon-circle-plus"></i>填写进展</span> -->
  258. <el-divider></el-divider>
  259. <!-- -->
  260. <div class="block" style="height: 200px;">
  261. <el-timeline style="padding:20px 0 0 0;">
  262. <el-timeline-item
  263. v-for="(activity, index) in ProgressList"
  264. :key="index">
  265. <div class="tb">
  266. <span v-if="activity.status == 0" style="color: #43D14F" class="icon"></span>
  267. <span v-if="activity.status == 1" style="color: #FD7624" class="icon"></span>
  268. <span v-if="activity.status == 2" style="color: red" class="icon"></span>
  269. <div>
  270. <span v-if="activity.status == 0" style="color: #43D14F">{{ $t('normals') }}</span>
  271. <span v-if="activity.status == 1" style="color: #FD7624">{{ $t('atrisk') }}</span>
  272. <span v-if="activity.status == 2" style="color: red">{{ $t('withinthetimelimit') }}</span>
  273. <span style="display: inline-block; float: right; color: #8C8C8C">{{activity.indate | relativeTime}}</span>
  274. </div>
  275. <p style="color: #8C8C8C">{{activity.content}}</p>
  276. </div>
  277. </el-timeline-item>
  278. </el-timeline>
  279. </div>
  280. <!-- -->
  281. </div>
  282. <span slot="footer" class="dialog-footer foooot">
  283. <el-button type="primary" @click="innerVisibless = false">{{ $t('Shutdown') }}</el-button>
  284. </span>
  285. </el-dialog>
  286. </template>
  287. <!-- 子任务/关联任务 -->
  288. <p ><i class="iconfont firerock-icontree themeFontColor" style="margin-left:10px;">{{timelabel && !isRelationItem ? $t('guanlian') : $t('zirwu')}}</i>
  289. <el-link style="float:right;" @click="addRelation" v-if="timelabel && !isRelationItem">{{ $t('associatedTask') }}</el-link>
  290. <el-link style="float:right;" @click="addSubTask" v-else>{{ $t('addingsubtask') }}</el-link>
  291. </p>
  292. <!-- 关联任务列表 -->
  293. <el-table key="guanlian" :data="relationSubTaskList" v-if="timelabel && !isRelationItem"
  294. :header-cell-style="{'font-weight':'normal'}"
  295. highlight-current-row
  296. v-loading="listLoading"
  297. style="width: 100%;margin-top:10px;"
  298. @row-click="relationTaskClick">
  299. <el-table-column prop="taskStatus" :label="$t('wan-cheng')" width="50" >
  300. <template slot-scope="scope">
  301. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb" @change="relationFinishTask(scope.row)"></el-checkbox>
  302. </template>
  303. </el-table-column>
  304. <el-table-column prop="taskName" :label="$t('biao-ti')" >
  305. <template slot-scope="scope">
  306. <el-tooltip class="item themeFontColor" effect="dark" :content="scope.row.taskName" placement="top" style="cursor:pointer;">
  307. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.taskName}}</span>
  308. </el-tooltip>
  309. </template>
  310. </el-table-column>
  311. <el-table-column :label="$t('operation')" width="130" align="left">
  312. <template slot-scope="scope">
  313. <el-button @click.stop.native="deleteRelationItem(scope.row.id)" size="mini">{{ $t('dissociated') }}</el-button>
  314. </template>
  315. </el-table-column>
  316. </el-table>
  317. <!--子任务列表 -->
  318. <el-table key="zi" :data="addForm.subTaskList" v-else
  319. :header-cell-style="{'font-weight':'normal'}"
  320. highlight-current-row v-loading="listLoading" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  321. <el-table-column prop="taskStatus" :label="$t('wan-cheng')" width="50" >
  322. <template slot-scope="scope">
  323. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb"
  324. @change="finishTask(scope.row)"
  325. ></el-checkbox>
  326. </template>
  327. </el-table-column>
  328. <el-table-column prop="name" :label="$t('biao-ti')" >
  329. <template slot-scope="scope">
  330. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  331. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.name}}</span>
  332. </el-tooltip>
  333. </template>
  334. </el-table-column>
  335. <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" width="100" >
  336. <template slot-scope="scope">
  337. <span v-if="user.userNameNeedTranslate != 1">
  338. {{scope.row.executorName == null?$t('dai-fen-pei'):scope.row.executorName}}
  339. </span>
  340. <span v-if="user.userNameNeedTranslate == 1">
  341. <span v-if="scope.row.executorName == null">
  342. {{$t('dai-fen-pei')}}
  343. </span>
  344. <span v-else>
  345. <span v-for="item,index in scope.row.executorName" :key="index">
  346. <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
  347. <span v-if="index < scope.row.executorName.length - 1">,</span>
  348. </span>
  349. </span>
  350. </span>
  351. </template>
  352. </el-table-column>
  353. <el-table-column prop="endDate" :label="$t('deadline')" width="100" >
  354. <template slot-scope="scope">
  355. <p v-if="scope.row.endDate >= times">{{scope.row.endDate}}</p>
  356. <p v-else style="background: #e62412; color: #fff;text-align: center; border-radius: 3px;">{{scope.row.endDate}}</p>
  357. </template>
  358. </el-table-column>
  359. </el-table>
  360. </div>
  361. </template>
  362. </el-form>
  363. <!-- 关联文件列表 -->
  364. <template v-if="isEditFile && addForm.taskPlanType != 3">
  365. <div style="width:100%;margin:1em 0;">
  366. <i class="iconfont firerock-icontree themeFontColor" style="margin-left:10px;">{{ $t('jiafuchengguo') }}</i>
  367. <el-link @click="relationFileClick()" style="float:right;margin-left:10px">{{ $t('associatedfiles') }}</el-link>
  368. <el-upload style="float:right;" action="#" :http-request="uploadFileClick" :show-file-list="false" :multiple="false">
  369. <el-link>{{ $t('uoloadFiles') }}</el-link>
  370. </el-upload>
  371. </div>
  372. <el-table
  373. v-loading="fileListLoading"
  374. ref="filetable"
  375. :data="taskFileList"
  376. :header-cell-style="{'font-weight':'normal'}"
  377. highlight-current-row
  378. max-height="240"
  379. style="width: 100%;margin-top:10px;margin-bottom:15px">
  380. <el-table-column :label="$t('headerTop.serialNumber')" prop="documentType" min-width="60" align="center">
  381. <template slot-scope="scope">
  382. <div>
  383. {{scope.$index + 1}}
  384. </div>
  385. </template>
  386. </el-table-column>
  387. <el-table-column :label="$t('filenames')" prop="documentName" min-width="180">
  388. <template slot-scope="scope">
  389. <el-link @click.stop.native="viewOnline(scope.row)">
  390. {{scope.row.documentName}}
  391. </el-link>
  392. </template>
  393. </el-table-column>
  394. <el-table-column :label="$t('filesize')" prop="size" min-width="80" align="center"></el-table-column>
  395. <el-table-column :label="$t('founder')" prop="creatorName" min-width="60" align="center">
  396. <template slot-scope="scope">
  397. <div>
  398. <span v-if="user.userNameNeedTranslate != 1">{{scope.row.creatorName}}</span>
  399. <span v-if="user.userNameNeedTranslate == 1">
  400. <TranslationOpenDataText type='userName' :openid='scope.row.creatorName'></TranslationOpenDataText>
  401. </span>
  402. </div>
  403. </template>
  404. </el-table-column>
  405. <el-table-column :label="$t('creationtime')" prop="indate" min-width="150" align="center">
  406. <template slot-scope="scope">
  407. <span>{{scope.row.indate}}</span>
  408. </template>
  409. </el-table-column>
  410. <el-table-column :label="$t('operation')" min-width="150" fixed="right">
  411. <template slot-scope="scope">
  412. <el-link :href="scope.row.url" :download="scope.row.documentName" type="primary" style="margin-right:7px">{{ $t('other.download') }}</el-link>
  413. <el-link @click="taskFileDelete(scope.row.id)">{{ $t('btn.delete') }}</el-link>
  414. <el-upload style="display: inline-block;" action="#" :http-request="(row) => uploadFileClickTwo(row, scope.row)" :show-file-list="false" :multiple="false" v-if="scope.row.fileChargeStatus == 2">
  415. <el-link type="primary">重新上传</el-link>
  416. </el-upload>
  417. </template>
  418. </el-table-column>
  419. <el-table-column label="状态" min-width="140" v-if="user.timeType.taskFileCharge == 1 || user.timeType.taskFileCharge == 2" fixed="right">
  420. <template slot-scope="scope">
  421. <template v-if="scope.row.fileChargeStatus != 2">
  422. <el-link :type="{'0': 'warning', '1': 'info', '2': 'danger'}[scope.row.fileChargeStatus]" :underline="false">
  423. {{ scope.row.fileChargeStatusTextList[0] || '' }}
  424. <template v-if="(scope.row.fileChargeStatusTextList || []).length > 1">
  425. <TranslationOpenDataText :openid='scope.row.fileChargeStatusTextList[1]'></TranslationOpenDataText>
  426. {{ scope.row.fileChargeStatusTextList[2] || '' }}
  427. </template>
  428. </el-link>
  429. </template>
  430. <template v-else>
  431. <el-tooltip class="item" effect="dark" content="点击查看" placement="top">
  432. <el-link :type="'danger'" :underline="false" @click="showReasonForRejection(scope.row)">
  433. {{ scope.row.fileChargeStatusTextList[0] || '' }}
  434. <template v-if="(scope.row.fileChargeStatusTextList || []).length > 1">
  435. <TranslationOpenDataText :openid='scope.row.fileChargeStatusTextList[1]'></TranslationOpenDataText>
  436. {{ scope.row.fileChargeStatusTextList[2] || '' }}
  437. </template>
  438. </el-link>
  439. </el-tooltip>
  440. </template>
  441. </template>
  442. </el-table-column>
  443. </el-table>
  444. </template>
  445. <!-- 关联文件dialog -->
  446. <el-dialog v-if="relationFileDialog" :visible.sync="relationFileDialog" :title="$t('associatedfiles')" append-to-body>
  447. <span>{{ $t('wenjian1guanli') }}</span>
  448. <div>
  449. <span>{{ $t('xuanzwenjian') }}</span>
  450. <el-select v-model="addFileId" filterable >
  451. <el-option
  452. v-for="item in projectFileList"
  453. :key="item.id"
  454. :label="item.documentName"
  455. :value="item.id"
  456. ></el-option>
  457. </el-select>
  458. <el-button @click="addTaskFile()">{{ $t('btn.determine') }}</el-button>
  459. </div>
  460. </el-dialog>
  461. <el-dialog v-if="isRelationTab" :visible.sync="isRelationTab" :title="$t('associatedTask')" width="800px" append-to-body>
  462. <el-form ref="relationItemForm" label-width="100px">
  463. <el-form-item :label="$t('selecttask')" prop="taskType">
  464. <el-select v-model="relationvalue" multiple style="width:80%">
  465. <el-option
  466. v-for="item in relationdata"
  467. :key="item.id"
  468. :label="item.name"
  469. :value="item.id"
  470. ></el-option>
  471. </el-select>
  472. </el-form-item>
  473. </el-form>
  474. <div slot="footer" class="dialog-footer foooot">
  475. <el-button @click="isRelationTab = false">{{ $t('btn.cancel') }}</el-button>
  476. <el-button type="primary" @click="addRelationTask()">{{ $t('btn.determine') }}</el-button>
  477. </div>
  478. </el-dialog>
  479. </div>
  480. <div slot="footer" class="dialog-footer foooot">
  481. <template v-if="!showMmeiLaiDe">
  482. <el-button v-if="(user.id == addForm.createrId || currentProject.inchargerId == user.id || currentProject.creatorId == user.id || permissions.projectManagement) && canAddTask" @click.native="deleteTask()" style="float:left;">{{ $t('btn.delete') }}</el-button>
  483. <el-button type="primary" v-if="user.userNameNeedTranslate == 1 && !meetingId && !integrationTask.stage && addForm.executorListFront[0].executorId" @click="meetingCli()">{{ $t('faQiHuiYi') }}</el-button>
  484. <el-button @click.native="closeBounceds()">{{ $t('btn.cancel') }}</el-button>
  485. <el-button type="primary" @click="submitInsert" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
  486. </template>
  487. <template v-if="showMmeiLaiDe">
  488. <el-button v-if="(user.id == showMmeiLaiDeData.checkFirstId && showMmeiLaiDeData.taskStatus == 3) || (user.id == showMmeiLaiDeData.checkSecondId && [4, '4', '1', 1].includes(showMmeiLaiDeData.taskStatus))" @click.native="deleteTask()" style="float:left;">{{ $t('btn.delete') }}</el-button>
  489. <el-button v-if="showMmeiLaiDeData.taskPlan && showMmeiLaiDeData.taskStatus == 2" @click.native="deleteTask()" style="float:left;">删除</el-button>
  490. <el-button @click.native="closeBounceds()">{{ $t('btn.cancel') }}</el-button>
  491. <template v-if="(showMmeiLaiDeData.leaderIdList || []).includes(user.id) && showMmeiLaiDeData.taskStatus == 3">
  492. <el-button @click.native="planToWithdraw()">撤回</el-button>
  493. </template>
  494. <template v-if="addForm.id && millerSReviewer.includes(user.id) && [3, 4].includes(showMmeiLaiDeData.taskStatus)">
  495. <template v-if="(showMmeiLaiDeData.taskStatus == 3 && user.id == showMmeiLaiDeData.checkFirstId) || (showMmeiLaiDeData.taskStatus == 4 && user.id == showMmeiLaiDeData.checkSecondId)">
  496. <el-button type="danger" @click="planOperation(false)" :loading="addLoading">驳回</el-button>
  497. <el-button type="success" @click="planOperation(true)" :loading="addLoading">通过</el-button>
  498. </template>
  499. </template>
  500. <template>
  501. <el-button type="primary" @click="submitInsert" :loading="addLoading">
  502. {{ showMmeiLaiDeData.taskPlan == 1 && showMmeiLaiDeData.taskStatus == 2 ? '重新提交' : '提交' }}
  503. </el-button>
  504. </template>
  505. </template>
  506. </div>
  507. <!-- <div slot="title" v-if="addForm.parentTid != null || isRelationItem" >
  508. <el-page-header @back="backToParentTask" :title="timelabel ? $t('returnmilestone') : $t('parenttask')" :content="timelabel ? relationPar.name : addForm.parentTname"></el-page-header>
  509. </div> -->
  510. <!-- 评论 -->
  511. <div class="remark" v-show="addForm.id != null && !showMmeiLaiDe">
  512. <span class="zh">
  513. <div class="player">
  514. <p>{{ $t('participantin') }}</p>
  515. <div class="bj">
  516. <span v-for="(pl, i) in critic" :key="i">
  517. <span style="background: #778899" v-if="user.userNameNeedTranslate != 1">{{pl.length > 2 ? pl.substring(pl.length - 2, pl.length) : pl}}</span>
  518. <span v-if="user.userNameNeedTranslate == 1">
  519. <TranslationOpenDataText type='userName' :openid='pl'></TranslationOpenDataText>
  520. </span>
  521. </span>
  522. <!-- <span style="background: #778899">{{pl.length}}</span> -->
  523. </div>
  524. </div>
  525. <div class="subject">
  526. <div class="sub-all">
  527. <div :class="dynamicTab ? 'subOn' : ''" @click="dynamicTab = true">{{ $t('alldynamic') }}</div>
  528. <div :class="dynamicTab ? '' : 'subOn'" @click="dynamicTab = false">{{ $t('xiang-guan-ri-bao') }}</div>
  529. </div>
  530. <div class="sub-details" ref="main" v-if="dynamicTab">
  531. <ul class="infinite-list" v-infinite-scroll="load" ref="contRoll">
  532. <div style="width: 100%" v-if="commentList.length <= 0">
  533. <img src="../assets/image/xiao.png" alt="">
  534. </div>
  535. <li v-for="i in count" class="infinite-list-item counli" :key="i">
  536. <p><i class="el-icon-s-fold"></i> <em>{{ $t('managerQucompletedthedependencytask') }}</em><span>{{ $t('onApril20') }}</span></p>
  537. </li>
  538. <li class="carts" v-for="item in commentList" :key="item.id">
  539. <!-- <el-image style="width: 30px; height: 30px" :src="url" :fit="fit"></el-image> -->
  540. <!-- <i :style="'background' + item.userColor"> -->
  541. <i :style="'background' + item.userColor">
  542. <i v-if="user.userNameNeedTranslate != 1">
  543. {{item.userName.length > 2 ? item.userName.substring(item.userName.length - 2, item.userName.length) : item.userName}}
  544. </i>
  545. <i v-if="user.userNameNeedTranslate == 1">
  546. <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
  547. </i>
  548. </i>
  549. <div>
  550. <!-- <p>{{item.userName}}</p> -->
  551. <!-- <p> -->
  552. <p v-if="user.userNameNeedTranslate != 1">
  553. {{item.userName}}
  554. </p>
  555. <p v-if="user.userNameNeedTranslate == 1">
  556. <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
  557. </p>
  558. <!-- </p> -->
  559. <em>
  560. <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate == 1">
  561. <template v-for="listItem in item.newContent">
  562. <template v-if="listItem.type == 'user'">
  563. <TranslationOpenDataText type='userName' :openid='listItem.value'></TranslationOpenDataText>
  564. </template>
  565. <template v-if="listItem.type == 'text'">{{ listItem.value }}</template>
  566. </template>
  567. </p>
  568. <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate != 1">{{item.content}}</p>
  569. <!-- 重启原因和责任人 -->
  570. <span class="commentSpan" v-if="user.timeType.restartTaskNeedReason == 1 && item.reason != ''">{{ $t('zhongQiYuanYin') }}:{{item.reason}}</span>
  571. <span class="commentSpan" v-if="user.timeType.restartTaskNeedReason == 1 && item.taskPersonLiableList.length > 0">{{ $t('zeRenRen') }}
  572. <span v-for="responsibility, responsibilityIndex in item.taskPersonLiableList" :key="responsibilityIndex">
  573. <span v-if="user.userNameNeedTranslate == 1">
  574. <TranslationOpenDataText type='userName' :openid='responsibility.userName'></TranslationOpenDataText>
  575. </span>
  576. <span v-if="user.userNameNeedTranslate != 1">{{responsibility.userName}}</span>
  577. <span v-if="responsibilityIndex < item.taskPersonLiableList.length - 1">,</span>
  578. </span>
  579. </span>
  580. </em>
  581. </div>
  582. <span>{{item.createTime | relativeTime}}</span>
  583. </li>
  584. </ul>
  585. </div>
  586. <div class="Daily" v-if="!dynamicTab">
  587. <div class="one_daily_body DailyBody">
  588. <el-card shadow="never" v-for="(item2,index2) in dailyList" :key="index2" style="margin-bottom: 20px;">
  589. <p>
  590. {{ $t('tian-bao-ren') }}: <span v-if="user.userNameNeedTranslate != 1">{{item2.userName}}</span>
  591. <span v-if="user.userNameNeedTranslate == 1">
  592. <TranslationOpenDataText type='userName' :openid='item2.userName'></TranslationOpenDataText>
  593. </span>
  594. <span style="float: right;">{{item2.createDate}}</span>
  595. </p>
  596. <p>{{ $t('other.approvalStatus') }}:
  597. <span v-if="user.company.packageEngineering == 0">
  598. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0">
  599. <span v-if="item2.isDeptAudit==0">
  600. <span v-if="item2.projectAuditState==0">
  601. <!-- 待项目审核人 --> {{$t('other.waitForTheProjectReviewer')}}
  602. <span v-if="item2.projectAuditorName != null">(
  603. <span v-if="user.userNameNeedTranslate == '1'">
  604. <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
  605. </span>
  606. <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
  607. )</span>
  608. <!-- 审核 --> {{$t('other.audit')}}
  609. </span>
  610. <span style="color:#32CD32;" v-else-if="item2.projectAuditState==1">
  611. <!-- 项目审核人 --> {{$t('other.projectAuditor')}}
  612. <span v-if="item2.projectAuditorName != null">(
  613. <!-- {{item2.projectAuditorName}} -->
  614. <span v-if="user.userNameNeedTranslate == '1'">
  615. <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
  616. </span>
  617. <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
  618. )</span>
  619. <!-- 审核通过 --> {{$t('state.approved')}}
  620. </span>
  621. </span>
  622. <span v-else-if="item2.isDeptAudit==1">
  623. ({{$t('other.await')}}
  624. <span v-if="user.userNameNeedTranslate == '1'">
  625. <TranslationOpenDataText type='departmentName' :openid='item2.auditDeptName'></TranslationOpenDataText>
  626. </span>
  627. <span v-if="user.userNameNeedTranslate != '1'">{{item2.auditDeptName}}</span>
  628. {{$t('other.audit')}})
  629. </span>
  630. </span>
  631. <span style="margin-left:15px;color:#DAA520;" v-else-if="item2.state == -1">{{$t('other.importWaitingForReview')}}</span>
  632. <span style="margin-left:15px;color:#32CD32;" v-else-if="item2.state == 1">{{$t('state.alreadyPassed')}}
  633. <span style="color:#c7e944" v-if="item2.reportAutoApprove == 1">{{$t('other.automaticReview')}}</span>
  634. </span>
  635. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 2">{{$t('state.rejected')}} {{$t('other.reason')}}:{{item2.rejectReason}}</span>
  636. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 3">{{$t('state.waitingsubmit')}}</span>
  637. </span>
  638. <span v-if="user.company.packageEngineering == 1">
  639. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == -1">{{$t('other.importWaitingForReview')}}</span>
  640. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == -1">{{$t('other.waitingForProfessionalReview')}}</span>
  641. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 0">{{$t('other.waitingForDepartmentReview')}}</span>
  642. <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 1">{{$t('other.waitForTheProjectReviewer')}}<span v-if="item2.projectAuditorName != null">
  643. (
  644. <span v-if="user.userNameNeedTranslate != 1">
  645. {{item2.projectAuditorName}}
  646. </span>
  647. <span v-if="user.userNameNeedTranslate == 1">
  648. <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
  649. </span>
  650. )
  651. </span>{{$t('other.audit')}}</span>
  652. <span style="margin-left:15px;color:#32CD32;" v-else-if="item2.state == 1">{{$t('state.alreadyPassed')}}</span>
  653. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 2">{{$t('state.rejected')}} {{$t('other.reason')}}:{{item2.rejectReason}}</span>
  654. <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 3">{{$t('state.waitingsubmit')}}</span>
  655. </span>
  656. </p>
  657. <p v-if="user.timeType.customDegreeActive==1 && item2.degree_id != null && item2.degree_id != -1">{{user.timeType.customDegreeName}}:{{item2.degreeName}}</p>
  658. <p v-if="user.timeType.customDataActive==1">{{user.timeType.customDataName}}:{{item2.customData}}</p>
  659. <!-- 自定义日报文本 -->
  660. <p v-if="user.timeType.customTextActive==1">{{user.timeType.customTextName}}:{{item2.customText}}</p>
  661. <p v-if="user.company.packageEngineering == 1">
  662. {{$t('other.professionalProgress')}}:
  663. <span style="margin-right:10px;" v-for="progressItem in item2.professionProgress" :key="progressItem.id">{{progressItem.professionName}}({{progressItem.progress}}%)
  664. <el-tooltip v-if="progressItem.auditState == 0" :content="$t('state.WaitingAudit')" effect="light" placement="top">
  665. <i class="iconfont firerock-icondaibandengdaishenhe"></i>
  666. </el-tooltip>
  667. <el-tooltip v-if="progressItem.auditState == 1" :content="$t('state.alreadyPassed')" effect="light" placement="top">
  668. <i class="iconfont firerock-iconshenhetongguo"></i>
  669. </el-tooltip>
  670. <el-tooltip v-if="progressItem.auditState == 2" :content="$t('state.notThrough')" effect="light" placement="top">
  671. <i class="iconfont firerock-iconshenhebohui"></i>
  672. </el-tooltip>
  673. </span>
  674. </p>
  675. <div v-if="item2.multiWorktime==0">
  676. <p style="display: inline-block;">{{$t('time.duration')}}:
  677. <span v-if="item2.reportTimeType == 0" style="margin-right:10px;">{{typeList[item2.timeType]}}</span>
  678. <span v-if="item2.reportTimeType == 2" style="margin-right:10px;">{{item2.startTime+'-'+item2.endTime}}</span>
  679. {{item2.time.toFixed(1)}}h
  680. <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">{{$t('other.WorkOvertime')}}<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag>
  681. </p>
  682. <p>{{$t('other.matters')}}:<span v-html="item2.content"></span></p>
  683. </div>
  684. <div v-if="item2.multiWorktime==1" >
  685. <p>{{$t('other.projectDuration')}}:{{item2.time.toFixed(1)}}h <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">{{ $t('other.WorkOvertime') }}<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag></p>
  686. <div v-for="(timeItem, tIndex) in item2.worktimeList" :key="tIndex"
  687. style="border: 0.5px #ddd solid;margin-bottom:5px;padding:5px;">
  688. <p style="display: inline-block;">{{$t('time.duration')}}:
  689. <span v-if="item2.reportTimeType == 2" style="margin-right:10px;">{{timeItem.startTime+'-'+timeItem.endTime}}</span>
  690. {{timeItem.time.toFixed(1)}}h
  691. </p>
  692. <p>{{$t('other.matters')}}:<span v-html="timeItem.content"></span></p>
  693. </div>
  694. </div>
  695. <p v-if="item2.state == 1 && user.timeType.needEvaluate == 1">{{$t('other.evaluation')}}:<span v-html="item2.evaluate"></span></p>
  696. <!--照片的显示 -->
  697. <p v-if="item2.pics != null && item2.pics.length > 0">
  698. <el-image v-for="(pic, index) in item2.pics" :key="index"
  699. style="width: 100px; height: 100px; margin-right:10px;"
  700. :src="pic"
  701. :preview-src-list="item2.pics">
  702. </el-image>
  703. </p>
  704. </el-card>
  705. </div>
  706. </div>
  707. </div>
  708. <div class="issue" v-if="dynamicTab">
  709. <!-- <el-input type="textarea" class="textareays" label-width="100%" label-height="140px"></el-input> -->
  710. <div class="issue_fixation">
  711. <div class="inputDeep"><el-input
  712. type="textarea"
  713. :placeholder="$t('pleaseentercontent')"
  714. :autosize="{ minRows: 6, maxRows: 6}"
  715. v-model="textarea2"
  716. class="inputDeeps"
  717. >
  718. </el-input></div>
  719. <el-button class="issue-button" type="primary" @click="release()">{{ $t('fa-bu') }}</el-button>
  720. </div>
  721. </div>
  722. </span>
  723. </div>
  724. <!-- 发起会议 -->
  725. <el-dialog :title="$t('faQiHuiYi')" :visible.sync="meetingVisable" width="500px" :before-close="handleClose" append-to-body>
  726. <div class="block">
  727. <div>
  728. <span class="demonstration">{{ $t('huiYiKaiShiShiJian') }}</span>
  729. <el-date-picker
  730. v-model="initiateAMeetingForm.startTime"
  731. type="datetime"
  732. :placeholder="$t('xuanZeRiQiShiJian')"
  733. value-format="yyyy-MM-dd HH:mm:ss"
  734. clearable
  735. default-time="10:00:00">
  736. </el-date-picker>
  737. </div>
  738. <div style="margin-top: 20px">
  739. <span class="demonstration">{{ $t('huiYiJieShuShiJian') }}</span>
  740. <el-date-picker
  741. v-model="initiateAMeetingForm.endTime"
  742. type="datetime"
  743. :placeholder="$t('xuanZeRiQiShiJian')"
  744. value-format="yyyy-MM-dd HH:mm:ss"
  745. clearable.
  746. default-time="11:00:00">
  747. </el-date-picker>
  748. </div>
  749. </div>
  750. <span slot="footer" class="dialog-footer">
  751. <el-button @click="meetingVisable = false">{{ $t('quXiao') }}</el-button>
  752. <el-button type="primary" @click="confirmMeeting()">{{ $t('queDing') }}</el-button>
  753. </span>
  754. </el-dialog>
  755. </div>
  756. </template>
  757. <script>
  758. import selectCat from "@/components/select.vue"
  759. import selectPersonnel from "@/components/selectPersonnel.vue"
  760. // 富文本样式
  761. import 'quill/dist/quill.core.css'
  762. import 'quill/dist/quill.snow.css'
  763. import 'quill/dist/quill.bubble.css'
  764. // 导入富文本
  765. import { quillEditor } from 'vue-quill-editor'
  766. import { getThemeColor } from '@/utils/commonMethod.js'
  767. export default {
  768. props: {
  769. integrationTask:{
  770. type: Object,
  771. default: {}
  772. },
  773. // 是否显示选择任务
  774. showOrNot: {
  775. type: Boolean,
  776. default: false
  777. },
  778. // 是否属于美莱得定制化的工作计划
  779. showMmeiLaiDe: {
  780. type: Boolean,
  781. default: false
  782. },
  783. showMmeiLaiDeData: {
  784. type: Object,
  785. default: {}
  786. }
  787. },
  788. components: {
  789. quillEditor, // 富文本
  790. selectCat,
  791. selectPersonnel
  792. },
  793. data() {
  794. return {
  795. doYouWantToDisableAll: false,
  796. startNum: 0,
  797. endNum: 5,
  798. shownumber: 5,
  799. sizeNum: JSON.parse(sessionStorage.getItem("user")).companyId == '3092' ? 105 : JSON.parse(sessionStorage.getItem("user")).timeType.taskFileCharge == '2' ? 105 : 65,
  800. meeting: false,
  801. numnnumnum: 2,
  802. componentFlg: false,
  803. mileageCup: false,
  804. loadingExport : false,
  805. saveTemplateLoading: false,
  806. joinMembList:[],
  807. setInchargerDialog: false,
  808. recentProgressInfo:{},
  809. addToTmpDialog:false,
  810. templateForm:{},
  811. importTaskDialog:false,
  812. importToStageId:null,
  813. exportDialog: false,
  814. exportTaskType:null,
  815. groupTemplateList:[],
  816. createGroupWay:'new',
  817. modGroupDialog:false,
  818. subTaskVisible:false,
  819. orderList:[{id:"seq",name:this.$t('manuallydragthesequence'),isDesc:false},{id:"create_date",name:this.$t('creationtimeisthelatest'),isDesc:true},
  820. {id:"end_date",name:this.$t('deadlineisthelatest'),isDesc:true},
  821. {id:"task_level",name:this.$t('highestpriority'),isDesc:true}],
  822. order:"seq",
  823. isDesc:false,
  824. taskDataList:[],
  825. displayTable: false,
  826. 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')},
  827. {id:5,name:this.$t('createdthetask')},{id:6,name:this.$t('missionIwason')},{id:7,name:this.$t('todaytask')},{id:8,name:this.$t('taskthatisoverdue')}],
  828. importanceList:[{id:0,name:this.$t('yi-ban')},{id:1,name:this.$t('zhong-yao')},{id:2,name:this.$t('jin-ji')},],
  829. 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"}],
  830. taskTypeColor:[getThemeColor(),'#8613ad','#bf0404'],
  831. taskTypeIcon:['iconfont firerock-iconrenwu','iconfont firerock-iconicon-','iconfont firerock-iconfengxian'],
  832. taskStatusList:[this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone')],
  833. //优先级
  834. taskLevelColor:['#262626','#E6A23C','#F56C6C'],
  835. stageListHeight:0,
  836. taskListinH:0,
  837. groupWidth:260,
  838. drag: false,
  839. stageDrag: false,
  840. dragging: false,
  841. stageList:[],
  842. selectedGroup:{},
  843. allGroupData:[],
  844. defaultGroupId:null,
  845. addGroupDialog: false,
  846. addStageDialog: false,
  847. groupSearch:null,
  848. groupType:0,//0-分组,1-视图
  849. groupList: [],
  850. groupForm:{},
  851. stageForm:[],
  852. curProjectId:null,
  853. projectList:null,
  854. activeIndex:"1",
  855. activeName:"projectInside",
  856. searchField:null,
  857. keyword:null,
  858. user: JSON.parse(sessionStorage.getItem("user")),
  859. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  860. userDetailVisible: false,
  861. userDetail:{},
  862. date: new Date(),
  863. users: [],
  864. tableHeight: 0,
  865. listLoading: false,
  866. subProjectVisible: false,
  867. subProjectList: [],//子项目列表
  868. currentProject:{},
  869. addSubProject: false,
  870. addFormVisible: false,
  871. addLoading: false,
  872. title: "",
  873. addForm: {
  874. name: '',
  875. executorListFront: [
  876. {
  877. executorId:null
  878. }
  879. ]
  880. },
  881. rules: {
  882. name: [{ required: true, message: this.$t('pleaseenteragroupname'), trigger: "blur" }],
  883. },
  884. rules2: {
  885. stagesName: [{ required: true, message: this.$t('pleaseenteratasklistname'), trigger: "blur" }],
  886. },
  887. taskRules : {
  888. name: [{ required: true, message: this.$t('enterthetaskcontent'), trigger: "blur" }],
  889. serviceId: [{ required: true, message: this.$t('qingXuanZeFuWu'), trigger: "blur" }],
  890. projectId: [{ required: true, message: this.$t('qingXuanZeSuoShuXiangMu'), trigger: "blur" }],
  891. groupId: [{ required: true, message: this.$t('qingXuanZeSuoShuRenWuFenZu'), trigger: "blur" }],
  892. stagesId: [{ required: true, message: this.$t('qingXuanZeSuoShuRenWuLieBiao'), trigger: "blur" }],
  893. planCost: [{ required: true, message: this.$t('planCostHint'), trigger: "blur" }],
  894. taskPlanType: [{ required: true, message: '请选择类型', trigger: "blur" }],
  895. checkSecondId: [{ required: true, message: '请选择审核人', trigger: "blur" }]
  896. },
  897. formGrouping: {
  898. name: [{ required: true, message: this.$t('pleaseenteragroupname'), trigger: "blur" }],
  899. },
  900. sleectId: null,
  901. sleectProjectId: null,
  902. sidebarIndex: 0, // 侧边栏索引
  903. url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
  904. count: 0,
  905. textarea2: '',
  906. taskId: null,
  907. commentList: [],
  908. radio: 0,
  909. critic: [], // 评论头像的数组
  910. editorOption: { // 富文本框里面的默认值
  911. placeholder: this.$t('pleaseentethetext'),
  912. modules: {
  913. toolbar:[
  914. ['bold', 'italic', 'underline', 'strike'], //加粗,斜体,下划线,删除线
  915. // ['blockquote', 'code-block'], //引用,代码块
  916. [{ 'header': 1 }, { 'header': 2 }], // 标题,键值对的形式;1、2表示字体大小
  917. // [{ 'list': 'ordered'}, { 'list': 'bullet' }], //列表
  918. // [{ 'script': 'sub'}, { 'script': 'super' }], // 上下标
  919. // [{ 'indent': '-1'}, { 'indent': '+1' }], // 缩进
  920. // [{ 'direction': 'rtl' }], // 文本方向
  921. [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
  922. [{ 'header': [1, 2, 3, 4, 5, 6, false] }], //几级标题
  923. [{ 'color': [] }, { 'background': [] }], // 字体颜色,字体背景颜色
  924. // [{ 'font': [] }], //字体
  925. [{ 'align': [] }], //对齐方式
  926. ['clean'], //清除字体样式
  927. // ['image','video'] //上传图片、上传视频
  928. ['image'] //上传图片、上传视频
  929. ], //工具栏设置
  930. },
  931. theme: 'snow',
  932. },
  933. textContent: true, // 控制提交
  934. times: null,
  935. text2: '',
  936. innerVisibless: false, // 任务展示弹出层
  937. activities: [{
  938. content: this.$t('normals'),
  939. timestamp: this.$t('hoursago'),
  940. size: 'large',
  941. type: 'primary',
  942. icon: 'el-icon-circle-check',
  943. color: '#409EFF'
  944. }, {
  945. content: this.$t('withinthetimelimit'),
  946. timestamp: this.$t('hoursago8'),
  947. color: '#F87872'
  948. }],
  949. ProgressList: [],
  950. checkboxGrounp: [], // 选中人的数据
  951. checkLists: [], // 选中人数据的ID
  952. taskIid: null,
  953. gstimday:[1],
  954. gstimhour:[8],
  955. timelabel: false,
  956. relationdata: [],
  957. isRelationTab: false,
  958. relationvalue:[],
  959. relationSubTaskList:[],
  960. relationItemData: null,
  961. relationPar:{name: ''},
  962. isRelationItem: false,
  963. // 关联文件
  964. fileListLoading:false,
  965. projectFileList:[],
  966. taskFileList:[],
  967. relationFileDialog: false,
  968. addFileId: null,
  969. isEditFile: false,
  970. // 设置项目参与人
  971. participantsDialog: false,
  972. participantsFilterText: '',
  973. deptMembData: [
  974. {
  975. id: 0,
  976. label: this.$t('lable.unassigned'),
  977. }
  978. ],
  979. defaultProps: {
  980. children: 'children',
  981. label: 'label'
  982. },
  983. chosenMembCount: 0,
  984. ididid:null,
  985. alreadyPartArray: [],
  986. projectCreatorId: null,
  987. projectInchargerId: null,
  988. canAddTask: false, // 是否可创建任务的判断标志
  989. canEditStageList: false, //是否可编辑列表的判断标志
  990. groupResponsibleId: '', // 分组负责人的id
  991. groupDetailsShow: false,
  992. groupDetailData: {},
  993. groupDetailTil: '',
  994. setTemplateData: {},
  995. setTemplateDialog: false,
  996. taskListPage: 1,
  997. taskListSize: 20,
  998. taskListTotal: 0,
  999. dynamicTab: true,
  1000. dailyList: [],
  1001. meetingId: '',
  1002. integrationProjectList: [],
  1003. sapServiceList:[],
  1004. meetingVisable: false,
  1005. initiateAMeetingForm: {
  1006. startTime: '',
  1007. endTime: '',
  1008. taskId: ''
  1009. },
  1010. pmUserList: [],
  1011. millerSReviewer: [],
  1012. };
  1013. },
  1014. computed: {
  1015. showData() {
  1016. // return this.addForm.executorListFront.slice(this.startNum, this.endNum)
  1017. let newList = this.addForm.executorListFront
  1018. newList.forEach((item, index) => {
  1019. item.indexList = index
  1020. })
  1021. console.log(newList.slice(this.startNum, this.endNum), '<==== newList')
  1022. return newList.slice(this.startNum, this.endNum)
  1023. },
  1024. containerHeight() {
  1025. if(this.addForm.executorListFront.length < this.shownumber) {
  1026. return this.sizeNum * this.addForm.executorListFront.length + 'px'
  1027. } else {
  1028. return (this.sizeNum * this.shownumber) - 20 + 'px'
  1029. }
  1030. },
  1031. barHeight() {
  1032. return this.sizeNum * (this.addForm.executorListFront || []).length + 'px'
  1033. },
  1034. listTop() {
  1035. return this.startNum * this.sizeNum + 'px'
  1036. }
  1037. },
  1038. watch: {},
  1039. created() {},
  1040. mounted() {
  1041. console.log('我获取到的数据', this.integrationTask, this.showOrNot)
  1042. this.triggerEvent(this.integrationTask)
  1043. this.gstimhour = [this.user.timeType.allday]
  1044. this.gstimday = [1]
  1045. this.getSapServiceList()
  1046. this.timess();
  1047. if(this.showMmeiLaiDe) {
  1048. this.getPmUserList()
  1049. this.setDisabledPermission()
  1050. }
  1051. },
  1052. methods: {
  1053. planToWithdraw() {
  1054. this.$confirm(`确定撤回该计划吗?`, {
  1055. type: 'warning'
  1056. }).then(() => {
  1057. this.http.post('/task/withdrawalTaskPlan',{taskId: this.addForm.id},
  1058. res => {
  1059. if (res.code == "ok") {
  1060. this.$message({
  1061. message: '撤回成功',
  1062. type: 'success'
  1063. });
  1064. let obj = {
  1065. submitInsert: true,
  1066. showOrNot: this.showOrNot
  1067. }
  1068. this.$emit('closeBounced', obj)
  1069. } else {
  1070. this.$message({
  1071. message: res.msg,
  1072. type: "error"
  1073. });
  1074. }
  1075. },
  1076. error => {
  1077. this.$message({
  1078. message: error,
  1079. type: "error"
  1080. });
  1081. });
  1082. })
  1083. },
  1084. setDisabledPermission() {
  1085. const { taskStatus } = this.showMmeiLaiDeData
  1086. this.doYouWantToDisableAll = taskStatus == 3 || taskStatus == 4
  1087. if(this.millerSReviewer.includes(this.user.id)) {
  1088. this.doYouWantToDisableAll = false
  1089. }
  1090. },
  1091. viewOnline(row) {
  1092. sessionStorage.setItem("fileName",row.documentName);
  1093. sessionStorage.setItem("fileUrl",row.url);
  1094. let routeUrl;
  1095. if (row.documentName.endsWith('.doc') || row.documentName.endsWith('.docx')) {
  1096. routeUrl = this.$router.resolve({
  1097. path: "/viewWord",
  1098. params: {}
  1099. });
  1100. } else if (row.documentName.endsWith('.xls') || row.documentName.endsWith('.xlsx')) {
  1101. routeUrl = this.$router.resolve({
  1102. path: "/viewExcel",
  1103. params: {}
  1104. });
  1105. }
  1106. if (routeUrl != null) {
  1107. console.log(routeUrl.href);
  1108. window.open(routeUrl.href, '_blank');
  1109. } else {
  1110. window.open(row.url, '_blank');
  1111. }
  1112. },
  1113. // 容器的滚动事件
  1114. handleScroll() {
  1115. const scrollTop = this.$refs.container.scrollTop
  1116. this.startNum = Math.floor(scrollTop / this.sizeNum)
  1117. console.log(this.startNum, this.shownumber, '<==== 计算')
  1118. this.endNum = this.startNum + this.shownumber
  1119. },
  1120. bottomScrollClick(val) {
  1121. this.$nextTick(() => {
  1122. let scrollEl = this.$refs.container;
  1123. let bum = scrollEl.scrollHeight
  1124. let current = scrollEl.scrollTop + 1
  1125. scrollEl.scrollTo({ top: val ? current : bum, behavior: 'smooth' });
  1126. });
  1127. },
  1128. // 刷新数据
  1129. refreshData() {
  1130. this.$forceUpdate()
  1131. },
  1132. serviceIdChange() {
  1133. this.refreshData()
  1134. },
  1135. confirmMeeting() {
  1136. this.http.post('/task/operateMeeting',{...this.initiateAMeetingForm},
  1137. res => {
  1138. if (res.code == "ok") {
  1139. this.meetingVisable=false,
  1140. this.$message({
  1141. message: this.$t('chengGongFaQiHuiYi'),
  1142. type: "success"
  1143. });
  1144. } else {
  1145. this.meetingVisable=false,
  1146. this.$message({
  1147. message: res.msg,
  1148. type: "error"
  1149. });
  1150. }
  1151. },
  1152. error => {
  1153. this.meetingVisable=false,
  1154. this.$message({
  1155. message: error,
  1156. type: "error"
  1157. });
  1158. });
  1159. },
  1160. planOperation(type) {
  1161. this.$confirm(`确定${type ? '通过' : '驳回'}该计划吗?`, {
  1162. type: 'warning'
  1163. }).then(() => {
  1164. this.http.post('/task/taskPlanPassOrReject', {
  1165. taskId: this.addForm.id, type
  1166. },
  1167. res => {
  1168. if (res.code == "ok") {
  1169. this.$message({
  1170. message: '操作成功',
  1171. type: "success"
  1172. });
  1173. let obj = {
  1174. submitInsert: true,
  1175. showOrNot: this.showOrNot
  1176. }
  1177. this.$emit('closeBounced', obj)
  1178. } else {
  1179. this.$message({
  1180. message: res.msg,
  1181. type: "error"
  1182. });
  1183. }
  1184. },
  1185. error => {
  1186. this.$message({
  1187. message: error,
  1188. type: "error"
  1189. });
  1190. });
  1191. })
  1192. },
  1193. // 触发外层的会议
  1194. meetingCli() {
  1195. // this.$parent.$parent.parentMeetingCli(this.integrationTask.id)
  1196. this.initiateAMeetingForm = {
  1197. startTime: '',
  1198. endTime: '',
  1199. taskId: this.integrationTask.id
  1200. }
  1201. this.meetingVisable = true
  1202. },
  1203. // 触发事件
  1204. triggerEvent(obj) {
  1205. console.log(obj, '触发事件')
  1206. this.curProjectId = obj.curProjectId
  1207. if(!this.showMmeiLaiDe) {
  1208. this.getProjectList()
  1209. } else {
  1210. this.getProjectListTwo()
  1211. }
  1212. if(!obj.taskVue) {
  1213. this.getStageList(obj.integrationTaskNingwai)
  1214. }
  1215. if(obj.create) {
  1216. console.log(obj, '<=== 双击获取的')
  1217. this.getUsers(); // 获取名单数据
  1218. this.mileageCup = false
  1219. this.addFormVisible = true;
  1220. this.curProjectId = obj.stage.projectId;
  1221. this.addForm = {
  1222. projectId: obj.stage.projectId,
  1223. groupId: obj.stage.groupId,
  1224. stagesId: obj.stage.id,
  1225. startDate: obj.addForm.startDate,
  1226. taskLevel:0,
  1227. planHours: 8,
  1228. taskType: 0
  1229. };
  1230. // this.addForm.executorListFront = [
  1231. // {executorId:obj.executorListFront[0] && obj.executorListFront[0].executorId, planHours:this.user.timeType.allday}
  1232. // ];
  1233. this.addForm.executorListFront = (obj.executorListFront || []).map(em => {
  1234. return {
  1235. executorId: em.executorId,
  1236. planHours: this.user.timeType.allday
  1237. }
  1238. })
  1239. this.gstimhour = [this.user.timeType.allday]
  1240. this.gstimday = [1]
  1241. this.addLoading = false;
  1242. this.isEditFile = false;
  1243. this.title=this.$t('createtask ');
  1244. this.commentList = [];
  1245. this.timelabel = false
  1246. console.log(this.addForm, '<====== this.addForm')
  1247. } else {
  1248. if(!obj.taskVue) {
  1249. this.isEditFile = true;
  1250. this.getDetail(obj.curProjectId)
  1251. }
  1252. this.curProjectId = obj.task.projectId;
  1253. // this.getTaskDetail(obj.id);
  1254. this.getTaskProgressList(obj.id); // 获取任务进展列表
  1255. this.gain(obj.task); // 获取评论列表
  1256. this.getDailyList(obj.id) // 获取来自日报
  1257. this.getRelationTaskList(obj.num, obj.id)
  1258. this.getTaskFileList(obj.num,obj.id)
  1259. const { integrationTaskNingwai = {} } = obj
  1260. if(integrationTaskNingwai.groupId) {
  1261. this.getTaskGrouping(obj.curProjectId)
  1262. }
  1263. setTimeout(() => {
  1264. this.getTaskDetail(obj.id);
  1265. }, 200)
  1266. }
  1267. this.getrelation();
  1268. },
  1269. // 代办任务创建事件
  1270. agentCreatesEvents(num) {
  1271. if(num == 1) {
  1272. this.addForm.groupId = ''
  1273. this.addForm.stagesId = ''
  1274. this.getTaskGrouping()
  1275. this.getrelation();
  1276. if(this.showMmeiLaiDe) {
  1277. this.getProjectManager()
  1278. }
  1279. } else if(num == 2) {
  1280. this.addForm.stagesId = ''
  1281. this.getTaskList()
  1282. }
  1283. },
  1284. getProjectManager() {
  1285. const { projectId } = this.addForm
  1286. this.http.post('/user/getChargeUserByProjectId', { projectId },
  1287. res => {
  1288. if (res.code == "ok") {
  1289. if(!res.data.id) {
  1290. this.$message({
  1291. message: '当前项目没有项目经理',
  1292. type: "warning"
  1293. });
  1294. return
  1295. }
  1296. this.addForm.checkFirstId = res.data.id || '';
  1297. } else {
  1298. this.$message({
  1299. message: res.msg,
  1300. type: "error"
  1301. });
  1302. }
  1303. },
  1304. error => {
  1305. this.$message({
  1306. message: error,
  1307. type: "error"
  1308. });
  1309. });
  1310. },
  1311. getPmUserList() {
  1312. this.http.post('/user/getSecondCheckUser', { },
  1313. res => {
  1314. if (res.code == "ok") {
  1315. this.pmUserList = res.data || [];
  1316. } else {
  1317. this.$message({
  1318. message: res.msg,
  1319. type: "error"
  1320. });
  1321. }
  1322. },
  1323. error => {
  1324. this.$message({
  1325. message: error,
  1326. type: "error"
  1327. });
  1328. });
  1329. },
  1330. //获取项目列表
  1331. getProjectList() {
  1332. this.http.post(this.port.project.list, {},
  1333. res => {
  1334. if (res.code == "ok") {
  1335. this.projectList = res.data;
  1336. this.getRecentlyProject()
  1337. } else {
  1338. this.$message({
  1339. message: res.msg,
  1340. type: "error"
  1341. });
  1342. }
  1343. },
  1344. error => {
  1345. this.$message({
  1346. message: error,
  1347. type: "error"
  1348. });
  1349. });
  1350. },
  1351. getProjectListTwo() {
  1352. let obj = {}
  1353. if(this.curProjectId) {
  1354. obj.projectId = this.curProjectId
  1355. }
  1356. this.http.post(`/project/getProjectByLeader`, {
  1357. ...obj
  1358. },
  1359. res => {
  1360. if (res.code == "ok") {
  1361. this.projectList = res.data;
  1362. this.integrationProjectList = [
  1363. { label: '相关项目', peojectList: res.data }
  1364. ]
  1365. } else {
  1366. this.$message({
  1367. message: res.msg,
  1368. type: "error"
  1369. });
  1370. }
  1371. },
  1372. error => {
  1373. this.$message({
  1374. message: error,
  1375. type: "error"
  1376. });
  1377. });
  1378. },
  1379. // 获取最近项目列表
  1380. getRecentlyProject() {
  1381. this.http.post('/project/nearProject',{},res => {
  1382. if(res.code == 'ok'){
  1383. let topObj = {
  1384. label: this.$t('zuiJinXuanZeXiangMu'),
  1385. peojectList: res.data
  1386. }
  1387. let botomObj = {
  1388. label: this.$t('other.allProject'),
  1389. peojectList: this.projectList
  1390. }
  1391. this.integrationProjectList = [topObj, botomObj]
  1392. console.log(this.integrationProjectList, '整合')
  1393. }else {
  1394. this.$message({
  1395. message: res.msg,
  1396. type: 'error'
  1397. })
  1398. }
  1399. },err => {
  1400. this.$message({
  1401. message: err,
  1402. type: 'error'
  1403. })
  1404. })
  1405. },
  1406. // 获取任务分组
  1407. getTaskGrouping(projectId) {
  1408. this.http.post('/task-group/list', {projectId: projectId ? projectId : this.addForm.projectId},
  1409. res => {
  1410. if (res.code == "ok") {
  1411. this.groupList = res.data;
  1412. } else {
  1413. this.$message({
  1414. message: res.msg,
  1415. type: "error"
  1416. });
  1417. }
  1418. },
  1419. error => {
  1420. this.$message({
  1421. message: error,
  1422. type: "error"
  1423. });
  1424. });
  1425. },
  1426. getTaskList() {
  1427. let obj = {
  1428. groupId: this.addForm.groupId,
  1429. projectId: this.addForm.projectId,
  1430. order: 'seq',
  1431. isDesc: false
  1432. }
  1433. this.getStageList(obj)
  1434. },
  1435. // 关闭最外层弹窗
  1436. closeBounceds() {
  1437. console.log('我被触发了')
  1438. this.$emit('closeBounced', {})
  1439. },
  1440. chggstim(e,i){
  1441. if(e){
  1442. this.gstimday[i] = Math.ceil(this.gstimhour[i] / this.user.timeType.allday)
  1443. }else{
  1444. this.gstimhour[i] = this.gstimday[i] * this.user.timeType.allday
  1445. }
  1446. },
  1447. removeExecutorLine(index,e) {
  1448. if(e == 1){
  1449. this.relationItemData.executorList.splice(index,1);
  1450. this.gstimday.splice(index,1)
  1451. this.gstimhour.splice(index,1)
  1452. this.$forceUpdate();
  1453. }else{
  1454. this.addForm.executorListFront.splice(index,1);
  1455. this.gstimday.splice(index,1)
  1456. this.gstimhour.splice(index,1)
  1457. this.$forceUpdate();
  1458. }
  1459. },
  1460. removeExecutorLineNew(item, e) {
  1461. let index = item.indexList
  1462. if(e == 1){
  1463. this.relationItemData.executorList.splice(index,1);
  1464. this.gstimday.splice(index,1)
  1465. this.gstimhour.splice(index,1)
  1466. this.$forceUpdate();
  1467. }else{
  1468. this.addForm.executorListFront.splice(index,1);
  1469. this.gstimday.splice(index,1)
  1470. this.gstimhour.splice(index,1)
  1471. this.$forceUpdate();
  1472. }
  1473. this.replacementResult()
  1474. setTimeout(() => {
  1475. this.bottomScrollClick(true)
  1476. }, 100)
  1477. },
  1478. addExecutorLine(e) {
  1479. if(e == 1){
  1480. if (this.relationItemData.executorList == null) {
  1481. this.relationItemData.executorList = [];//初始化
  1482. }
  1483. this.relationItemData.executorList.push({executorId:null, planHours:this.user.timeType.allday});
  1484. this.gstimday.push(1)
  1485. this.gstimhour.push(this.user.timeType.allday)
  1486. this.$forceUpdate();
  1487. }else{
  1488. if (this.addForm.executorListFront == null) {
  1489. this.addForm.executorListFront = [];//初始化
  1490. }
  1491. this.addForm.executorListFront.push({executorId:null, planHours:this.user.timeType.allday});
  1492. this.gstimday.push(1)
  1493. this.gstimhour.push(this.user.timeType.allday)
  1494. this.$forceUpdate();
  1495. this.replacementResult()
  1496. setTimeout(() => {
  1497. this.bottomScrollClick()
  1498. }, 100)
  1499. }
  1500. },
  1501. replacementResult() {
  1502. let lengths = (this.addForm.executorListFront || []).length
  1503. if(lengths > this.shownumber) {
  1504. this.startNum = lengths - this.shownumber
  1505. this.endNum = lengths
  1506. } else {
  1507. this.startNum = 0
  1508. this.endNum = lengths
  1509. }
  1510. this.sizeNum = typeof this.sizeNum == 'number' ? this.sizeNum+'' : +this.sizeNum
  1511. },
  1512. getTaskDetail(id) {
  1513. this.http.post('/task/getTask',{id: id},
  1514. res => {
  1515. if (res.code == "ok") {
  1516. this.millerSReviewer = [res.data.checkFirstId, res.data.checkSecondId]
  1517. if(this.showMmeiLaiDe) {
  1518. this.setDisabledPermission()
  1519. }
  1520. this.meetingId = res.data.meetingId
  1521. console.log(this.meetingId, '看看打印纸')
  1522. if(this.user.userNameNeedTranslate == 1) {
  1523. for(var i in res.data.subTaskList) {
  1524. if(res.data.subTaskList[i].executorName) {
  1525. res.data.subTaskList[i].executorName = res.data.subTaskList[i].executorName.split(',')
  1526. }
  1527. }
  1528. }
  1529. this.addForm = res.data;
  1530. if (this.addForm.aheadTid) {
  1531. this.addForm.aheadTidList = JSON.parse(this.addForm.aheadTid);
  1532. } else {
  1533. this.addForm.aheadTidList = [];
  1534. }
  1535. this.addForm.createDate = null;
  1536. this.addForm.indate = null;
  1537. this.addLoading = false;
  1538. this.canAddTask = res.data.canAddTask
  1539. this.recentProgressInfo = res.data.progress;
  1540. if(res.data.executorList.length > 0) {
  1541. for(var i in res.data.executorList){
  1542. if(res.data.executorList[i].serviceId) {
  1543. res.data.executorList[i].serviceId = JSON.parse(res.data.executorList[i].serviceId)
  1544. }
  1545. }
  1546. console.log("==================",res.data.executorList)
  1547. this.addForm.executorListFront = res.data.executorList;
  1548. } else {
  1549. this.addForm.executorListFront = [{executorId: null, planHours: 8}];
  1550. }
  1551. this.gstimday = []
  1552. this.gstimhour = []
  1553. for(let i=0;i<this.addForm.executorListFront.length;i++){
  1554. this.gstimhour.push(this.addForm.executorListFront[i].planHours)
  1555. this.gstimday.push(Math.ceil(this.addForm.executorListFront[i].planHours / this.user.timeType.allday))
  1556. }
  1557. console.log(this.gstimday, this.gstimhour)
  1558. // //删除中间传值的变量数组
  1559. delete this.addForm.executorList;
  1560. //人员处理
  1561. this.users = res.data.userList;
  1562. // 触发类型切换事件
  1563. this.selchg()
  1564. } else {
  1565. this.$message({
  1566. message: res.msg,
  1567. type: "error"
  1568. });
  1569. }
  1570. },
  1571. error => {
  1572. this.$message({
  1573. message: error,
  1574. type: "error"
  1575. });
  1576. });
  1577. },
  1578. //获取任务进展列表
  1579. getTaskProgressList(taskId) {
  1580. this.taskIid = taskId
  1581. this.http.post('/task-progress/list', {taskId: taskId},
  1582. res => {
  1583. if (res.code == "ok") {
  1584. this.ProgressList = res.data;
  1585. this.recentProgressInfo = res.data[0]
  1586. } else {
  1587. this.$message({
  1588. message: res.msg,
  1589. type: "error"
  1590. });
  1591. }
  1592. }
  1593. );
  1594. },
  1595. getUsers() {
  1596. this.http.post('/user/getSimpleActiveUserList', {},
  1597. res => {
  1598. if (res.code == "ok") {
  1599. this.users = res.data;
  1600. } else {
  1601. this.$message({
  1602. message: res.msg,
  1603. type: "error"
  1604. });
  1605. }
  1606. },
  1607. error => {
  1608. this.$message({
  1609. message: error,
  1610. type: "error"
  1611. });
  1612. });
  1613. },
  1614. // 获取评论列表
  1615. gain(task,e) {
  1616. this.commentList = [];
  1617. this.taskId = e == 1 ? task.taskId : task.id;
  1618. this.http.post('/task-comment/getList', {taskId: e == 1 ? task.taskId : task.id},
  1619. res => {
  1620. if (res.code == "ok") {
  1621. if(this.user.userNameNeedTranslate == 1) {
  1622. for (let i = 0; i < res.data.length; i++) {
  1623. const originalString = res.data[i].content;
  1624. const regex = /\$userName=[^$]*\$|[^$]+/g;
  1625. const parts = originalString.match(regex);
  1626. let newArrList = [];
  1627. for (let j = 0; j < parts.length; j++) {
  1628. const newStr = parts[j];
  1629. if (newStr.startsWith('$userName=')) {
  1630. const userName = newStr.slice(10, -1);
  1631. newArrList.push({ type: 'user', value: userName });
  1632. } else {
  1633. newArrList.push({ type: 'text', value: newStr });
  1634. }
  1635. }
  1636. res.data[i].newContent = newArrList;
  1637. }
  1638. }
  1639. this.commentList = res.data
  1640. this.sppk(this.commentList) // 获取参与人的方法
  1641. this.contRoll()
  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. sppk(comit) {
  1658. var sk = []
  1659. comit.forEach(function(e){
  1660. sk.push(e.userName)
  1661. })
  1662. this.critic = new Set(sk)
  1663. },
  1664. getRelationTaskList(i,e){ //获取关联任务列表
  1665. let eid = null
  1666. if(i){
  1667. eid = e
  1668. }else{
  1669. eid = this.addForm.id
  1670. }
  1671. this.http.post('/task/getMilestoneTaskList',{
  1672. milestoneId: eid
  1673. },res => {
  1674. if(res.code == 'ok') {
  1675. this.relationSubTaskList = res.data
  1676. // console.log('res',res.data);
  1677. }else {
  1678. this.$message({
  1679. message: res.msg,
  1680. type: 'error'
  1681. })
  1682. }
  1683. },error => {
  1684. this.$message({
  1685. message: error,
  1686. type: 'error'
  1687. })
  1688. })
  1689. },
  1690. // 获取来自日报
  1691. getDailyList(id) {
  1692. this.http.post('/report/getTaskReportList',{
  1693. // taskId: '22131'
  1694. taskId: id
  1695. },
  1696. res => {
  1697. if (res.code == "ok") {
  1698. this.dailyList = res.data
  1699. } else {
  1700. this.$message({
  1701. message: res.msg,
  1702. type: "error"
  1703. });
  1704. }
  1705. },
  1706. error => {
  1707. this.$message({
  1708. message: error,
  1709. type: "error"
  1710. });
  1711. });
  1712. },
  1713. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  1714. const { timeType } = this.user
  1715. if (columnIndex === 6 && timeType.taskFileCharge == 1) {
  1716. return [this.taskFileList.length, 1];
  1717. }
  1718. return [1, 1];
  1719. },
  1720. // 获取任务下的文档列表
  1721. getTaskFileList(e,eid){
  1722. let etaskId
  1723. if(e == 1){etaskId = eid}
  1724. else{etaskId = this.addForm.id}
  1725. this.fileListLoading = true
  1726. this.http.post('/task-files/getTaskFiles',{
  1727. taskId: etaskId
  1728. },res => {
  1729. if(res.code == 'ok'){
  1730. this.fileListLoading = false
  1731. this.taskFileList = res.data.map(item => {
  1732. let str = item.fileChargeStatusText || ''
  1733. let arr = str.split(/\$|=/).filter(item => item && item !== 'userName');
  1734. return {
  1735. ...item,
  1736. fileChargeStatusTextList: arr || []
  1737. }
  1738. })
  1739. console.log(this.taskFileList, '<+======this.taskFileList')
  1740. }else {
  1741. this.fileListLoading = false
  1742. this.$message({
  1743. message: res.msg,
  1744. type: 'error'
  1745. })
  1746. }
  1747. },error => {
  1748. this.fileListLoading = false
  1749. this.$message({
  1750. message: error,
  1751. type: 'error'
  1752. })
  1753. })
  1754. },
  1755. DateChange(){
  1756. if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
  1757. let stdate = Date.parse(this.addForm.startDate)
  1758. let eddate = Date.parse(this.addForm.endDate)
  1759. if(stdate <= eddate){
  1760. let days = (eddate - stdate) / (1*24*60*60*1000) + 1
  1761. for (let i=0;i<this.gstimday.length;i++) {
  1762. this.gstimday[i] = days
  1763. this.gstimhour[i] = days * this.user.timeType.allday
  1764. }
  1765. this.$forceUpdate()
  1766. }
  1767. }
  1768. },
  1769. // 自定义组件事件
  1770. selectCal(obj) {
  1771. if(obj.distinction == '1') {
  1772. this.addForm.executorListFront[obj.index].executorId = obj.id
  1773. } else if(obj.distinction == '2') {
  1774. this.groupForm.inchargerId = obj.id
  1775. } else if(obj.distinction == '101') {
  1776. this.addForm.executorListFront[obj.index].fileChargeOneId = obj.id
  1777. } else if(obj.distinction == '102') {
  1778. this.addForm.executorListFront[obj.index].fileChargeTwoId = obj.id
  1779. }
  1780. },
  1781. getDetail(id) {
  1782. this.http.post('/project/detail',{
  1783. id: id
  1784. },
  1785. res => {
  1786. if (res.code == "ok") {
  1787. console.log('触发更新试一下')
  1788. this.currentProject = res.data;
  1789. this.getjurisdictionIds(this.currentProject)
  1790. this.joinMembList = this.currentProject.participationList;
  1791. } else {
  1792. }
  1793. },
  1794. error => {
  1795. this.$message({
  1796. message: error,
  1797. type: "error"
  1798. });
  1799. }
  1800. );
  1801. },
  1802. getjurisdictionIds(pro){
  1803. console.log('pro',pro.creatorId);
  1804. this.projectCreatorId = pro.creatorId
  1805. this.projectInchargerId = pro.inchargerId
  1806. },
  1807. //加载项目内的任务列表
  1808. getStageList(obj) {
  1809. this.http.post('/stages/list', {
  1810. groupId: obj.groupId,
  1811. projectId: obj.projectId,
  1812. order: obj.order,
  1813. isDesc: obj.isDesc
  1814. },
  1815. res => {
  1816. if (res.code == "ok") {
  1817. this.stageList = res.data.list;
  1818. this.canAddTask = res.data.canAddTask
  1819. this.canEditStageList = res.data.canEditStageList
  1820. this.timess() // 处理时间的方法
  1821. } else {
  1822. this.$message({
  1823. message: res.msg,
  1824. type: "error"
  1825. });
  1826. }
  1827. },
  1828. error => {
  1829. this.$message({
  1830. message: error,
  1831. type: "error"
  1832. });
  1833. });
  1834. },
  1835. timess(){
  1836. // console.log('timess');
  1837. var date = new Date()
  1838. let Y = date.getFullYear()
  1839. let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
  1840. let D = date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate()
  1841. this.times = `${Y}-${M}-${D}`
  1842. console.log(this.times, '时间')
  1843. },
  1844. // 提交按钮
  1845. submitInsert() {
  1846. if (this.textContent !== true) return this.$message({
  1847. showClose: true,
  1848. message: this.$t('pictureistoolargepleaseuploaditagain'),
  1849. type: 'warning'
  1850. });
  1851. //检查是有重名的执行人
  1852. var exeList = this.addForm.executorListFront;
  1853. // for(let i=0;i<this.gstimhour.length;i++){
  1854. // exeList[i].planHours = this.gstimhour[i]
  1855. // }
  1856. console.log(this.addForm.executorListFront)
  1857. for (var i=0;i<exeList.length;i++) {
  1858. if(this.user.companyId==3092){
  1859. var findSameUser = false;
  1860. exeList[i].planHours = this.gstimhour[i]
  1861. for (var j=i+1;j<exeList.length; j++) {
  1862. if ((exeList[i].executorId && exeList[j].executorId && exeList[i].executorId == exeList[j].executorId)
  1863. &&(exeList[i].serviceId && exeList[j].serviceId && exeList[i].serviceId == exeList[j].serviceId)) {
  1864. findSameUser = true;
  1865. break;
  1866. }
  1867. }
  1868. if (findSameUser) {
  1869. return this.$message({
  1870. showClose: true,
  1871. message: this.$t('tongYiGeZhiHangRenFuWuBuNengXiangTong'),
  1872. type: 'error'
  1873. });
  1874. }
  1875. } else if (this.user.timeType.taskFileCharge == 2) {
  1876. var findSameUser = false;
  1877. exeList[i].planHours = this.gstimhour[i]
  1878. for (var j = 0; j < exeList.length; j++) {
  1879. if (exeList[i].executorId && (!exeList[i].fileChargeOneId || !exeList[i].fileChargeTwoId)) {
  1880. findSameUser = true;
  1881. break;
  1882. }
  1883. }
  1884. if (findSameUser) {
  1885. return this.$message({
  1886. showClose: true,
  1887. message: `审核人必填`,
  1888. type: 'error'
  1889. });
  1890. }
  1891. } else{
  1892. var findSameUser = false;
  1893. exeList[i].planHours = this.gstimhour[i]
  1894. for (var j=i+1;j<exeList.length; j++) {
  1895. if (exeList[i].executorId && exeList[j].executorId && exeList[i].executorId == exeList[j].executorId) {
  1896. findSameUser = true;
  1897. break;
  1898. }
  1899. }
  1900. if (findSameUser) {
  1901. return this.$message({
  1902. showClose: true,
  1903. message: this.$t('executorhasduplication'),
  1904. type: 'error'
  1905. });
  1906. }
  1907. }
  1908. }
  1909. if(this.addForm.startDate && this.addForm.endDate) {
  1910. if(this.addForm.endDate < this.addForm.startDate) {
  1911. return this.$message({
  1912. showClose: true,
  1913. message: this.$t('ren-wu-jie-zhi-shi-jian-bu-neng-xiao-yu-kai-shi-shi-jian'),
  1914. type: 'error'
  1915. });
  1916. }
  1917. }
  1918. if(this.showMmeiLaiDe && !this.addForm.endDate) {
  1919. return this.$message({
  1920. showClose: true,
  1921. message: '请选择截止时间',
  1922. type: 'warning'
  1923. });
  1924. }
  1925. this.$refs.form1.validate(valid => {
  1926. if (valid) {
  1927. delete this.addForm.subTaskList;
  1928. delete this.addForm.refTaskList;
  1929. delete this.addForm.progress;
  1930. delete this.addForm.userList;
  1931. //去掉没有执行人的.(因为要有计划工时,执行人可以暂不设置)
  1932. // this.addForm.executorListFront = this.addForm.executorListFront.filter(exe=>exe.executorId);
  1933. if(this.addForm.executorListFront.serviceId){
  1934. this.addForm.executorListFront.serviceId= this.addForm.executorListFront.serviceId;
  1935. }
  1936. this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
  1937. // this.addForm.executorList = this.addForm.aheadTidList;
  1938. this.addForm.aheadTid = JSON.stringify(this.addForm.aheadTidList);
  1939. let addFormData = { ...this.addForm }
  1940. if(this.addForm.taskPlanType == 3) {
  1941. addFormData = {
  1942. taskPlanType: 3,
  1943. startDate: this.addForm.startDate,
  1944. endDate: this.addForm.endDate,
  1945. executorListStr: this.addForm.executorListStr
  1946. }
  1947. }
  1948. this.addLoading = true;
  1949. this.http.post('/task/save',{ ...addFormData, isTaskPlan: this.showMmeiLaiDe ? 1 : 0},
  1950. res => {
  1951. this.addLoading = false;
  1952. if (res.code == "ok") {
  1953. this.$message({
  1954. message: this.$t('message.submittedSuccessfully'),
  1955. type: "success"
  1956. });
  1957. if (this.addForm.parentTid == null) {
  1958. let obj = {
  1959. submitInsert: true,
  1960. showOrNot: this.showOrNot
  1961. }
  1962. this.$emit('closeBounced', obj)
  1963. } else {
  1964. // this.backToParentTask();
  1965. this.$emit('closeBounced', {backToParentTaskSub: true})
  1966. }
  1967. } else {
  1968. this.$message({
  1969. message: res.msg,
  1970. type: "error"
  1971. });
  1972. }
  1973. },
  1974. error => {
  1975. this.$message({
  1976. message: error,
  1977. type: "error"
  1978. });
  1979. }
  1980. );
  1981. }
  1982. });
  1983. },
  1984. backToParentTask() {
  1985. this.getTaskDetail(this.timelabel ? this.relationPar.id : this.addForm.parentTid);
  1986. this.isEditFile = true;
  1987. if(this.timelabel){
  1988. this.isRelationItem = false
  1989. this.getRelationTaskList(1, this.relationPar.id)
  1990. this.gain(this.relationPar)
  1991. }
  1992. },
  1993. onEditorFocus() {
  1994. this.onEditorBlur()
  1995. },
  1996. // 获得焦点时触发
  1997. onEditorBlur(){
  1998. let theEle = this.$refs.text; // 获取元素
  1999. if(!theEle.value) {
  2000. return
  2001. }
  2002. var img = theEle.value.match(/<img[^>]+>/g); // 赛选 img 标签
  2003. var arrImg = ''
  2004. for (var j = 0; j < img.length; j++) {
  2005. // 正则匹配,摘出img标签下的src里的内容,即capture
  2006. img[j].replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
  2007. arrImg += capture
  2008. });
  2009. }
  2010. // 原来的字符流大小,单位为字节
  2011. var strLen = arrImg.length;
  2012. // 计算后得到的文件流大小,单位为字节
  2013. var fileSize=parseInt(strLen-(strLen/8)*2);
  2014. var size = "";
  2015. size = (fileSize/1024/1024).toFixed(2);
  2016. if (size > 2){
  2017. this.textContent = false
  2018. this.$message({
  2019. showClose: true,
  2020. message: this.$t('imageexceeds2MBpleaseuploaditagain'),
  2021. type: 'warning'
  2022. });
  2023. }
  2024. this.textContent = true
  2025. },
  2026. //删除当前编辑的任务
  2027. deleteTask() {
  2028. var warning='';
  2029. if (this.addForm.subTaskList.length > 0) {
  2030. warning=this.$t('currenttaskanditssubtasks');
  2031. } else {
  2032. warning=this.$t('wanttodeletethecurrent task');
  2033. }
  2034. this.$confirm(warning, this.$t('other.prompts'), {
  2035. //type: 'warning'
  2036. }).then(() => {
  2037. this.http.post('/task/delete',{id: this.addForm.id},
  2038. res => {
  2039. if (res.code == "ok") {
  2040. this.$message({
  2041. message: '删除成功',
  2042. type: 'success'
  2043. });
  2044. this.$emit('closeBounced', {deleteTask: true})
  2045. } else {
  2046. this.$message({
  2047. message: res.msg,
  2048. type: "error"
  2049. });
  2050. }
  2051. },
  2052. error => {
  2053. this.$message({
  2054. message: error,
  2055. type: "error"
  2056. });
  2057. });
  2058. });
  2059. },
  2060. addprogress(){ // 添加子任务进展事件
  2061. this.$refs.proBox.style.display="block"
  2062. this.$refs.addPro.style.display="none"
  2063. },
  2064. shutPro() { // 关闭任务进展
  2065. this.$refs.addPro.style.display="block"
  2066. this.$refs.addRem.style.display="none"
  2067. this.$refs.proBox.style.display="none"
  2068. },
  2069. //创建任务进展
  2070. addTaskProgress() {
  2071. var param = {
  2072. taskId: this.taskIid,
  2073. status: this.radio,
  2074. content: this.text2,
  2075. participatorIds: this.checkLists.toString()
  2076. };
  2077. this.http.post('/task-progress/addProgress', param,
  2078. res => {
  2079. if (res.code == "ok") {
  2080. this.shutPro()
  2081. this.getTaskProgressList(this.taskIid)
  2082. this.$message({
  2083. message: this.$t('releasesuccess'),
  2084. type: "success"
  2085. });
  2086. this.checkboxGrounp = [],
  2087. this.checkLists = [],
  2088. this.text2 = '',
  2089. this.radio = 0
  2090. let obj = {
  2091. id: this.taskIid
  2092. }
  2093. this.gain(obj)
  2094. } else {
  2095. this.$message({
  2096. message: res.msg,
  2097. type: "error"
  2098. });
  2099. }
  2100. }
  2101. );
  2102. },
  2103. addI() { // 打开选择查看
  2104. this.$refs.addRem.style.display="block"
  2105. },
  2106. selchg(){ //类型切换
  2107. if(this.addForm.taskType == 1){
  2108. this.timelabel = true
  2109. if(!this.addForm.executorListFront[0].executorId) {
  2110. console.log(this.currentProject)
  2111. this.addForm.executorListFront[0].executorId = this.currentProject.inchargerId
  2112. }
  2113. }else{
  2114. this.timelabel = false
  2115. }
  2116. },
  2117. DateChange(){
  2118. if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
  2119. let stdate = Date.parse(this.addForm.startDate)
  2120. let eddate = Date.parse(this.addForm.endDate)
  2121. if(stdate <= eddate){
  2122. let days = (eddate - stdate) / (1*24*60*60*1000) + 1
  2123. for (let i=0;i<this.gstimday.length;i++) {
  2124. this.gstimday[i] = days
  2125. this.gstimhour[i] = days * this.user.timeType.allday
  2126. }
  2127. this.$forceUpdate()
  2128. }
  2129. // console.log("gstimday",this.gstimday);
  2130. }
  2131. },
  2132. kkk(el){
  2133. var k = this.checkLists.indexOf(el.id)
  2134. if (k == -1) {
  2135. this.checkLists.push(el.id)
  2136. } else {
  2137. this.checkLists.splice(k, 1)
  2138. }
  2139. },
  2140. //删除任务进展
  2141. deleteTaskProgress(id) {
  2142. this.http.post('/task-progress/deleteProgress', {id: id},
  2143. res => {
  2144. if (res.code == "ok") {
  2145. this.getTaskProgressList(this.taskIid)
  2146. this.$message({
  2147. message: this.$t('message.successfullyDeleted'),
  2148. type: "success"
  2149. });
  2150. } else {
  2151. this.$message({
  2152. message: res.msg,
  2153. type: "error"
  2154. });
  2155. }
  2156. }
  2157. );
  2158. },
  2159. addRelation(){ //关联任务卡片
  2160. this.relationvalue = []
  2161. this.isRelationTab = true
  2162. this.getrelation()
  2163. },
  2164. getrelation(){
  2165. //获取选择关联列表
  2166. this.http.post('/task/getTaskOnlyList',{
  2167. projectId: this.curProjectId?this.curProjectId:this.addForm.projectId
  2168. },
  2169. res => {
  2170. if (res.code == "ok") {
  2171. this.relationdata = []
  2172. res.data.forEach( (item) =>{
  2173. if(item.taskType != 1){
  2174. if (item.id != this.addForm.id) {
  2175. this.relationdata.push(item)
  2176. }
  2177. }
  2178. })
  2179. // console.log('map',this.relationdata);
  2180. } else {
  2181. this.$message({
  2182. message: res.msg,
  2183. type: "error"
  2184. });
  2185. }
  2186. },
  2187. error => {
  2188. this.$message({
  2189. message: error,
  2190. type: "error"
  2191. });
  2192. });
  2193. },
  2194. //显示子任务创建卡片
  2195. addSubTask() {
  2196. if(this.isRelationItem){return}
  2197. this.addFormVisible = true;
  2198. this.addForm = {parentTname: this.addForm.name,parentTid: this.addForm.id,projectId: this.addForm.projectId, groupId: this.addForm.groupId, taskLevel:0, planHours: 8, taskType: 0};
  2199. // this.addForm.executorListFront = [{executorId:null, planHours:8}];
  2200. this.addForm.executorListFront = [{executorId:null, planHours:8, serviceId: null}];
  2201. this.addLoading = false;
  2202. //创建子任务,非编辑状态
  2203. this.isEditFile = false;
  2204. // 触发外界子任务事件
  2205. this.$emit('closeBounced', {addSubTask: true, addForms: this.addForm})
  2206. },
  2207. // 关联任务点击事件
  2208. relationTaskClick(row,column,event){
  2209. // console.log('relationTaskClick',row);
  2210. this.relationPar = JSON.parse(JSON.stringify(this.addForm))
  2211. // console.log(this.relationPar);
  2212. this.addFormVisible = true;
  2213. this.addLoading = false;
  2214. this.isRelationItem = true;
  2215. this.isEditFile = true;
  2216. this.title = this.$t('editingtasks');
  2217. this.getTaskDetail(row.taskId);
  2218. // this.getUsers();
  2219. this.gain(row,1);
  2220. this.getRelationTaskList(1, row.taskId)
  2221. this.getTaskFileList(1,row.taskId)
  2222. },
  2223. // 解除关联
  2224. deleteRelationItem(eid){
  2225. this.listLoading = true
  2226. this.http.post('/task/removeMileStoneTask',{
  2227. id: eid
  2228. },res => {
  2229. if(res.code == 'ok') {
  2230. this.getRelationTaskList()
  2231. this.listLoading = false
  2232. this.$message({
  2233. message: this.$t('jie-chu-cheng-gong'),
  2234. type: 'success'
  2235. })
  2236. }else {
  2237. this.listLoading = false
  2238. this.$message({
  2239. message: res.msg,
  2240. type: 'error'
  2241. })
  2242. }
  2243. },error => {
  2244. this.listLoading = false
  2245. this.$message({
  2246. message: error,
  2247. type: 'error'
  2248. })
  2249. })
  2250. },
  2251. // 关联任务列表是否完成修改
  2252. relationFinishTask(row){
  2253. this.http.post('/task/finish',{
  2254. id: row.taskId,
  2255. taskStatus: row.taskStatus
  2256. },res => {
  2257. if(res.code == 'ok'){
  2258. // if(this.groupType == 0){
  2259. // this.getStageList();
  2260. // }else {
  2261. // this.getViewTaskList();
  2262. let obj = {
  2263. submitInsert: true
  2264. }
  2265. this.$emit('closeBounced', obj)
  2266. // }
  2267. }else{
  2268. this.$message({
  2269. message: res.msg,
  2270. type: 'error'
  2271. })
  2272. }
  2273. },error => {
  2274. this.$message({
  2275. message: error,
  2276. type: 'error'
  2277. })
  2278. })
  2279. },
  2280. finishTask(task) {
  2281. this.http.post('/task/finish',{id: task.id, taskStatus: task.taskStatus},
  2282. res => {
  2283. if (res.code == "ok") {
  2284. // if (this.groupType == 0) {
  2285. // this.getStageList();
  2286. // } else {
  2287. // this.getViewTaskList();
  2288. // }
  2289. let obj = {
  2290. submitInsert: true
  2291. }
  2292. this.$emit('closeBounced', obj)
  2293. } else {
  2294. this.$message({
  2295. message: res.msg,
  2296. type: "error"
  2297. });
  2298. }
  2299. },
  2300. error => {
  2301. this.$message({
  2302. message: error,
  2303. type: "error"
  2304. });
  2305. });
  2306. },
  2307. // 关联文件按钮
  2308. relationFileClick(){
  2309. this.relationFileDialog = true
  2310. this.addFileId = null
  2311. this.getProjectFileList()
  2312. },
  2313. // 获取项目下的文档列表
  2314. getProjectFileList(){
  2315. this.http.post('/task-files/getDocumentList',{
  2316. projectId: this.curProjectId
  2317. },res => {
  2318. if(res.code == 'ok'){
  2319. this.projectFileList = res.data
  2320. console.log('list',res.data);
  2321. }else {
  2322. this.$message({
  2323. message: res.msg,
  2324. type: 'error'
  2325. })
  2326. }
  2327. },error => {
  2328. this.$message({
  2329. message: error,
  2330. type: 'error'
  2331. })
  2332. })
  2333. },
  2334. // 列表的删除按钮
  2335. taskFileDelete(eid){
  2336. this.$confirm(this.$t('shiFouYiChuCiWenJian'), this.$t('other.prompts'), {
  2337. confirmButtonText: this.$t('btn.determine'),
  2338. cancelButtonText: this.$t('btn.cancel'),
  2339. type: 'warning'
  2340. }).then(()=>{
  2341. this.http.post('/task-files/delete',{
  2342. id: eid
  2343. },res => {
  2344. if(res.code == 'ok'){
  2345. this.$message({
  2346. message: res.data,
  2347. type: 'success'
  2348. })
  2349. this.getTaskFileList()
  2350. this.gain({ taskId: this.taskId }, 1)
  2351. }else {
  2352. this.$message({
  2353. message: res.msg,
  2354. type: 'error'
  2355. })
  2356. }
  2357. },error => {
  2358. this.$message({
  2359. message: error,
  2360. type: 'error'
  2361. })
  2362. })
  2363. }).catch(()=>{
  2364. this.$message({
  2365. message: this.$t('thedeletionhasbeencancelled'),
  2366. type: 'info'
  2367. })
  2368. })
  2369. },
  2370. showReasonForRejection(item) {
  2371. const taskId = this.taskId
  2372. const {id} = item
  2373. this.http.post('/task/getFileRejectReason',{
  2374. taskId
  2375. },res => {
  2376. if(res.code == 'ok'){
  2377. let text = res.data.find(item => item.id == id)
  2378. console.log(text)
  2379. this.$alert(text.fileRejectReason, '驳回原因');
  2380. }else {
  2381. this.$message.error(res.msg)
  2382. }
  2383. },error => { this.$message.error(error) })
  2384. },
  2385. // 确认关联文件
  2386. addTaskFile(){
  2387. if(this.addFileId == null){
  2388. this.$message({message: this.$t('xuanzguanlianwenjian') , type: 'warning'})
  2389. return
  2390. }
  2391. this.http.post('/task-files/addDocumentRef',{
  2392. documentId: this.addFileId,
  2393. taskId: this.addForm.id,
  2394. projectId: this.curProjectId
  2395. },res => {
  2396. if(res.code == 'ok'){
  2397. this.$message({
  2398. message: this.$t('guan-lian-cheng-gong'),
  2399. type: 'success'
  2400. })
  2401. this.relationFileDialog = false
  2402. this.getTaskFileList()
  2403. }else {
  2404. this.$message({
  2405. message: res.msg,
  2406. type: 'error'
  2407. })
  2408. }
  2409. },error => {
  2410. this.$message({
  2411. message: error,
  2412. type: 'error'
  2413. })
  2414. })
  2415. },
  2416. addRelationTask(){ //添加关联任务
  2417. this.http.post('/task/addMileStoneTask',{
  2418. milestoneId: this.addForm.id,
  2419. taskIds: JSON.stringify(this.relationvalue)
  2420. },
  2421. res =>{
  2422. if(res.code == "ok") {
  2423. this.isRelationTab = false
  2424. this.$message({
  2425. message: this.$t('addsuccessful'),
  2426. type: 'success'
  2427. })
  2428. this.getRelationTaskList()
  2429. this.$forceUpdate()
  2430. }else {
  2431. this.$message({
  2432. message: res.msg,
  2433. type: 'error'
  2434. })
  2435. }
  2436. },
  2437. error => {
  2438. this.$message({
  2439. message: error,
  2440. type: 'error'
  2441. })
  2442. })
  2443. },
  2444. backToParentTask() {
  2445. // this.getTaskDetail(this.addForm.parentTid);
  2446. this.getTaskDetail(this.timelabel ? this.relationPar.id : this.addForm.parentTid);
  2447. this.isEditFile = true;
  2448. if(this.timelabel){
  2449. this.isRelationItem = false
  2450. // this.relationPar = {name: ''}
  2451. this.getRelationTaskList(1, this.relationPar.id)
  2452. this.gain(this.relationPar)
  2453. }
  2454. },
  2455. // 点击评论发布
  2456. release() {
  2457. if(this.textarea2.length <= 0) return this.$message({message: this.$t('pleaseentercontent'), type: "error"})
  2458. this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
  2459. res => {
  2460. if(res.code == "ok"){
  2461. if(res.data.content.indexOf('$userName=') != '-1') {
  2462. let obj = {
  2463. msg1: res.data.content.split('$')[0],
  2464. msg2: res.data.content.split('$')[1].split('=')[1],
  2465. msg3: res.data.content.split('$')[2]
  2466. }
  2467. res.data.content = obj
  2468. } else {
  2469. if(this.user.userNameNeedTranslate == 1) {
  2470. let obj = {
  2471. msg1: res.data.content,
  2472. msg2: '',
  2473. msg3: ''
  2474. }
  2475. res.data.content = obj
  2476. }
  2477. }
  2478. this.commentList.push(res.data)
  2479. console.log(this.commentList, '值☞')
  2480. this.sppk(this.commentList)
  2481. let obj = {
  2482. id: this.taskIid
  2483. }
  2484. this.gain(obj)
  2485. this.textarea2 = ""
  2486. // this.contRoll() // 滚动到底部
  2487. } else {
  2488. this.$message({
  2489. message: res.msg,
  2490. type: "error"
  2491. });
  2492. }
  2493. },
  2494. error => {
  2495. this.$message({
  2496. message: error,
  2497. type: "error"
  2498. });
  2499. })
  2500. },
  2501. // 滚动到底部
  2502. contRoll(){
  2503. // this.$nextTick(() => {
  2504. // this.$refs.main.scrollTop = this.$refs.contRoll.scrollHeight;
  2505. // })
  2506. this.$nextTick(() => {
  2507. let scrollElem = this.$refs.main;
  2508. scrollElem.scrollTo({ top: scrollElem.scrollHeight});
  2509. });
  2510. console.log('最后执行')
  2511. },
  2512. sss(){
  2513. this.$refs.addRem.style.display="none"
  2514. },
  2515. taskLineClick(row, column, event) {
  2516. if(this.isRelationItem){return}
  2517. this.mileageCup = true
  2518. if(row.taskType == 1){
  2519. this.timelabel = true
  2520. this.isRelationItem = false
  2521. }else{
  2522. this.timelabel = false
  2523. }
  2524. this.addFormVisible = true;
  2525. this.isEditFile = true;
  2526. this.addLoading = false;
  2527. this.getTaskDetail(row.id);
  2528. this.getTaskProgressList(row.id); // 获取任务进展列表
  2529. // this.getUsers(); // 获取名单数据
  2530. this.gain(row); // 获取评论列表
  2531. this.getDailyList(row.id) // 获取来自日报
  2532. this.getRelationTaskList(1, row.id)
  2533. this.getTaskFileList(1,row.id)
  2534. this.$emit('closeBounced', {taskLineClickAbs: true, items: row})
  2535. },
  2536. //获取SAP项目服务数据列表
  2537. getSapServiceList(){
  2538. this.http.post('/sap-project-service/sapServiceList', {},
  2539. res => {
  2540. if(res.code == "ok"){
  2541. this.sapServiceList=res.data
  2542. } else {
  2543. this.$message({
  2544. message: res.msg,
  2545. type: "error"
  2546. });
  2547. }
  2548. },
  2549. error => {
  2550. this.$message({
  2551. message: error,
  2552. type: "error"
  2553. });
  2554. })
  2555. },
  2556. // 列表的上传按钮
  2557. uploadFileClick(item){
  2558. console.log("upload",item.file);
  2559. let files = new FormData()
  2560. files.append("projectId",this.curProjectId);
  2561. files.append("taskId", this.addForm.id);
  2562. files.append("file", item.file);
  2563. this.http.uploadFile('/task-files/uploadFile', files,
  2564. res => {
  2565. if(res.code == 'ok'){
  2566. console.log(res);
  2567. this.$message({
  2568. message: this.$t('yi-shang-chuan'),
  2569. type: 'success'
  2570. })
  2571. this.gain({ taskId: this.taskId }, 1)
  2572. this.getTaskFileList()
  2573. }else {
  2574. this.$message({
  2575. message: res.msg,
  2576. type: 'error'
  2577. })
  2578. }
  2579. },error => {
  2580. this.$message({
  2581. message: error,
  2582. type: 'error'
  2583. })
  2584. })
  2585. },
  2586. uploadFileClickTwo(item, row) {
  2587. let files = new FormData()
  2588. files.append("projectId",this.curProjectId);
  2589. files.append("taskId", this.addForm.id);
  2590. files.append("taskFileId", row.id);
  2591. files.append("file", item.file);
  2592. this.http.uploadFile('/task-files/reUploadFile', files,
  2593. res => {
  2594. if(res.code == 'ok'){
  2595. console.log(res);
  2596. this.$message({
  2597. message: this.$t('yi-shang-chuan'),
  2598. type: 'success'
  2599. })
  2600. this.gain({ taskId: this.taskId }, 1)
  2601. this.getTaskFileList()
  2602. }else {
  2603. this.$message({
  2604. message: res.msg,
  2605. type: 'error'
  2606. })
  2607. }
  2608. },error => {
  2609. this.$message({
  2610. message: error,
  2611. type: 'error'
  2612. })
  2613. })
  2614. }
  2615. },
  2616. };
  2617. </script>
  2618. <style lang="scss" scoped>
  2619. @import "../assets/scss/handle";
  2620. .reviewImages {
  2621. display: flex;
  2622. align-items: center;
  2623. margin: 0 25px;
  2624. img {
  2625. width: 100px
  2626. }
  2627. }
  2628. .themeFontColor {
  2629. @include font_color("color");
  2630. }
  2631. .customizedReviewer {
  2632. display: flex;
  2633. align-items: center;
  2634. }
  2635. .editingTask {
  2636. display: flex;
  2637. flex-wrap: wrap;
  2638. }
  2639. .carts .commentSpan {
  2640. float: none;
  2641. display: block;
  2642. margin-top: 0;
  2643. font-size: 14px;
  2644. span {
  2645. float: none;
  2646. display: inline-block;
  2647. margin-top: 0;
  2648. font-size: 14px;
  2649. }
  2650. }
  2651. .foooot {
  2652. padding: 10px 20px 20px;
  2653. text-align: right;
  2654. -webkit-box-sizing: border-box;
  2655. box-sizing: border-box;
  2656. }
  2657. .Daily p {
  2658. margin: 0 !important;
  2659. padding: 0 0 10px 0 !important;
  2660. }
  2661. .sub-all {
  2662. div {
  2663. display: inline-block;
  2664. padding: 0 20px;
  2665. font-size: 20px;
  2666. cursor: pointer;
  2667. }
  2668. .subOn {
  2669. color: #66b1ff;
  2670. }
  2671. }
  2672. .DailyBody {
  2673. margin: 0 20px;
  2674. }
  2675. .Daily{
  2676. height: 120%;
  2677. overflow: auto;
  2678. }
  2679. .inputDeep {
  2680. position: absolute;
  2681. bottom: 85px;
  2682. width: 95%;
  2683. margin: 0 12px;
  2684. }
  2685. .inputDeep .el-textarea .el-textarea__inner{
  2686. border: 0 !important;
  2687. resize: none !important;
  2688. }
  2689. .inputDeeps .el-textarea__inner {
  2690. border: 0 !important;
  2691. resize: none !important;
  2692. }
  2693. .scop_span {
  2694. display: inline-block;
  2695. padding: 2px 5px;
  2696. }
  2697. .counli {
  2698. em {
  2699. font-style: normal;
  2700. display: inline-block;
  2701. margin-left: 9%;
  2702. }
  2703. span {
  2704. float: right;
  2705. }
  2706. }
  2707. .carts {
  2708. position: relative;
  2709. .el-image{
  2710. border-radius: 50%;
  2711. float: left;
  2712. width: 20%;
  2713. }
  2714. i {
  2715. width: 30px;
  2716. height: 30px;
  2717. // background: #778899;
  2718. display: inline-block;
  2719. float: left;
  2720. border-radius:50%;
  2721. font-style:normal;
  2722. font-size: 12px;
  2723. line-height: 30px;
  2724. text-align: center;
  2725. color: #fff;
  2726. background: #778899;
  2727. overflow: hidden;
  2728. direction: rtl;
  2729. }
  2730. div {
  2731. text-align: left;
  2732. p {
  2733. text-align: left;
  2734. margin-left: 10px;
  2735. margin-left: 13%;
  2736. }
  2737. em {
  2738. display: block;
  2739. font-style: normal;
  2740. margin-left: 13%;
  2741. }
  2742. }
  2743. span {
  2744. font-size: 10px;
  2745. float: right;
  2746. margin-top: -40px;
  2747. }
  2748. }
  2749. .issue {
  2750. // height: 20%;
  2751. // position: relative;
  2752. // z-index: 4;
  2753. .zh{
  2754. position: relative;
  2755. width: 100%;
  2756. height: 100%;
  2757. }
  2758. .textareays {
  2759. background: #000;
  2760. height: 140px;
  2761. border: 0;
  2762. .el-textarea__inner {
  2763. height: 85%;
  2764. }
  2765. }
  2766. .issue-button {
  2767. position: absolute;
  2768. bottom: 20px;
  2769. right: 20px;
  2770. }
  2771. }
  2772. .inputDeep {
  2773. position: absolute;
  2774. bottom: 85px;
  2775. width: 95%;
  2776. margin: 0 12px;
  2777. }
  2778. .inputDeep .el-textarea .el-textarea__inner{
  2779. border: 0 !important;
  2780. resize: none !important;
  2781. }
  2782. .inputDeeps .el-textarea__inner {
  2783. border: 0 !important;
  2784. resize: none !important;
  2785. }
  2786. .scop_span {
  2787. display: inline-block;
  2788. padding: 2px 5px;
  2789. }
  2790. .container {
  2791. position: relative;
  2792. overflow-y: scroll;
  2793. }
  2794. .list {
  2795. position: absolute;
  2796. top: 0;
  2797. width: 100%;
  2798. }
  2799. .reviewerClass {
  2800. display: flex;
  2801. align-items: center;
  2802. margin-right: 20px;
  2803. .reviewerTitles {
  2804. margin-right: 10px;
  2805. }
  2806. }
  2807. </style>