taskComponent.vue 119 KB

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