1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581 |
- <template>
- <div>
- <div style="height: 72vh;overflow: auto;">
- <el-form ref="form1" :model="addForm" :rules="taskRules" label-width="120px">
- <el-form-item :label="$t('subordinatetotheproject')" v-if="showOrNot" prop="projectId">
- <el-select v-model="addForm.projectId" :placeholder="$t('defaultText.pleaseChoose')" @change="agentCreatesEvents(1)" filterable="true" style="width:100%;">
- <el-option-group v-for="group in integrationProjectList" :key="group.label" :label="group.label">
- <el-option v-for="item in group.peojectList" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
- <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
- <span style="float: right;">{{ item.projectName }}</span>
- </el-option>
- </el-option-group>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('suoShuRenWuFenZu')" v-if="showOrNot" prop="groupId">
- <el-select v-model="addForm.groupId" :placeholder="$t('defaultText.pleaseChoose')" @change="agentCreatesEvents(2)" filterable="true" style="width:100%;">
- <el-option v-for="item in groupList" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('suoShuRenWuLieBiao')" v-if="showOrNot" prop="stagesId">
- <el-select v-model="addForm.stagesId" :placeholder="$t('defaultText.pleaseChoose')" filterable="true" style="width:100%;">
- <el-option v-for="item in stageList" :key="item.id" :label="item.stagesName" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- <!--子任务需要选择任务列表 -->
- <el-form-item :label="$t('tasklist')" prop="stages" v-if="addForm.parentTid != null">
- <el-select v-model="addForm.stagesId" style="width:100%;" >
- <el-option v-for="item in stageList" :key="item.id" :label="item.stagesName" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('qianZhiRenWu')" prop="aheadTidList" >
- <el-select v-model="addForm.aheadTidList" style="width:100%;" multiple filterable @change="$forceUpdate()">
- <el-option v-for="item in relationdata" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('types')">
- <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()">
- <el-option v-for="item in taskTypeList" :key="item.id" :label="item.name" :value="item.id">
- <i :class="item.icon" ></i>
- <span>{{item.name}}</span>
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="任务完成校验" v-if="user.timeType.taskFileCharge">
- <el-checkbox v-model="addForm.attachFileRequired" >是否必须上传成果文件</el-checkbox>
- </el-form-item>
- <el-form-item :label="$t('taskdefinition')" prop="name">
- <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>
- </el-form-item>
- <el-form-item :label="$t('planCost')" prop="planCost" v-if="user.timeType.taskPlanCost">
- <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>
- </el-form-item>
- <!-- {{timelabel}}{{mileageCup}} -->
- <el-form-item :label="!timelabel ? $t('starttimes') : $t('jie-zhi-shi-jian')" prop="startDate">
- <el-date-picker v-model="addForm.startDate" type="date" style="width:40%;" value-format="yyyy-MM-dd"
- :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>
- <span style="margin-left:30px;margin-right:10px;" v-if="!timelabel">{{ $t('deadline') }}</span>
- <el-date-picker style="width:40%;" v-model="addForm.endDate" type="date" value-format="yyyy-MM-dd"
- :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>
- <span style="margin-left:30px;margin-right:10px;" v-if="timelabel && mileageCup">{{ $t('wan-cheng-shi-jian') }}</span>
- <el-date-picker style="width:40%;" v-if="timelabel && mileageCup" v-model="addForm.finishDate" type="date" value-format="yyyy-MM-dd"
- :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>
- </el-form-item>
- <div style="border: 1px solid #ddd;margin:5px 0;padding:5px 0;">
- <div class="container" :style="{ height: containerHeight }" @scroll="handleScroll" ref="container">
- <div class="list" :style="{ top: listTop }">
- <el-form-item :label="$t('zhi-hang-ren') + (executorItem.indexList + 1)" v-for="(executorItem, index) in showData" :key="index">
- <div class="editingTask">
- <div style="margin-right: 30px">
- <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()">
- <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
- <span style="float: left">{{ item.name }}</span>
- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
- </el-option>
- </el-select>
- <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :filterable="true" :subject="users" :subjectId="executorItem.executorId" :distinction="'1'" @selectCal="selectCal" :index="executorItem.indexList" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :key="executorItem.indexList"></selectCat>
- <!-- <selectPersonnel v-if="user.userNameNeedTranslate == 1" v-model="executorItem.executorId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="$forceUpdate()" :key="executorItem.indexList" /> -->
- </div>
- <!-- 项目服务 -->
- <div v-if="user.companyId==3092">
- <span style="margin-left:30px;margin-right:10px;">{{ $t('xiangMuFuWu') }}</span>
- <el-select clearable collapse-tags filterable v-model="executorItem.serviceId" size="small" :placeholder="$t('qingXuanZeXiangMuFuWu')" style="width: 300px" @change="serviceIdChange()" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)">
- <el-option
- v-for="item in sapServiceList"
- :key="item.id"
- :label="item.serviceName+'-'+item.serviceCode"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <!-- 计划工时 -->
- <div>
- <span style="margin-right:10px;">{{ $t('plantime') }}</span>
- <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" :max="100" :placeholder="$t('danweitian')" @change="chggstim(0,executorItem.indexList)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.day') }}</span>
- <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" :max="999" :placeholder="$t('pleaseentertheplannedworking')" @change="chggstim(1,executorItem.indexList)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.hour') }}</span>
- <!-- <el-input-number v-model="numnnumnum" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number> -->
- <!-- 移除执行人 -->
- <!-- <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id|| permissions.projectManagement || permissions.editAnyTask|| groupResponsibleId == user.id)" style="margin-left:5px" @click="removeExecutorLine(index)"></i> -->
- <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>
- </div>
- <template v-if="user.timeType.taskFileCharge == 2">
- <div class="reviewerClass">
- <div class="reviewerTitles">审核人1</div>
- <div>
- <el-select v-if="user.userNameNeedTranslate != 1" v-model="executorItem.fileChargeOneId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" size="small" filterable clearable :placeholder="$t('pleaseselectanexecutor')" style="width: 150px" @change="$forceUpdate()">
- <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
- <span style="float: left">{{ item.name }}</span>
- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
- </el-option>
- </el-select>
- <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :filterable="true" :subject="users" :subjectId="executorItem.fileChargeOneId" :distinction="'101'" @selectCal="selectCal" :index="executorItem.indexList" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :key="executorItem.indexList"></selectCat>
- </div>
- </div>
- <div class="reviewerClass">
- <div class="reviewerTitles">审核人2</div>
- <div>
- <el-select v-if="user.userNameNeedTranslate != 1" v-model="executorItem.fileChargeTwoId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" size="small" filterable clearable :placeholder="$t('pleaseselectanexecutor')" style="width: 150px" @change="$forceUpdate()">
- <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
- <span style="float: left">{{ item.name }}</span>
- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
- </el-option>
- </el-select>
- <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :filterable="true" :subject="users" :subjectId="executorItem.fileChargeTwoId" :distinction="'102'" @selectCal="selectCal" :index="executorItem.indexList" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :key="executorItem.indexList"></selectCat>
- </div>
- </div>
- </template>
- </div>
- </el-form-item>
- </div>
- <div class="bar" :style="{ height: barHeight }"></div>
- </div>
- <el-link type="primary" v-if="(((addForm.executorListFront == null || addForm.executorListFront.length<100) &&
- (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id || permissions.projectManagement || permissions.editAnyTask)) ||
- groupResponsibleId == user.id)"
- style="margin:0 0 10px 35px;position: relative;z-index: 999;" @click.stop="addExecutorLine">{{ $t('addinganexecutor') }}</el-link>
- </div>
- <el-form-item :label="$t('priority')">
- <el-select v-model="addForm.taskLevel" style="width:100%;" >
- <el-option v-for="item in importanceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- <!-- 富文本 -->
- <el-form-item :label="$t('detaileddescription')" style="height: 200px">
- <!-- <Editor id="tinymce" v-model="tinymceHtml" :init="editorInit"></Editor> -->
- <!-- <el-input type="textarea" v-model="addForm.taskDesc" :rows="3"></el-input> -->
- <!-- <quill-edito v-model="addForm.taskDesc"></quill-edito> -->
- <quill-editor style="height: 150px" ref="text" v-model="addForm.taskDesc" class="myQuillEditor" :options="editorOption" @blur="onEditorBlur($event)" @focus="onEditorFocus($event)"/>
- </el-form-item>
- <!-- 富文本 -->
- <div v-if="addForm.id != null">
- <el-divider ></el-divider>
- <!-- 任务进展 -->
- <template v-if="!timelabel || isRelationItem">
-
- <p ><i class="iconfont firerock-icontree themeFontColor" style="margin-left:10px;">{{ $t('taskprogress') }}</i>
- <span ref="addPro" style="display: block; float:right;"><el-link @click="addprogress">{{ $t('addtaskprogress') }}</el-link></span>
- </p>
- <!-- 任务进展展示 -->
- <div style="display: none;" ref="proBox" class="progress">
- <!-- <el-form :model="> -->
- <el-radio-group v-model="radio">
- <el-radio :label="0" class="rala1">{{ $t('normals') }}</el-radio>
- <el-radio :label="1" class="rala2">{{ $t('atrisk') }}</el-radio>
- <el-radio :label="2" class="rala3">{{ $t('withinthetimelimit') }}</el-radio>
- </el-radio-group>
- <el-input
- type="textarea"
- border="0"
- :autosize="{ minRows: 2, maxRows: 6}"
- :placeholder="$t('detailedprogressdescription')"
- v-model="text2"
- style="margin:10px 0 0 0">
- </el-input>
- <h4 style="font-weight: normal;">{{ $t('tixiang') }}{{checkLists.length}}</h4>
- <i class="el-icon-circle-plus pron_i themeFontColor" style="font-size: 28px;" @click="addI(0)"></i>
- <div class="remind" ref="addRem" style="display: none">
- <el-checkbox-group v-model="checkboxGrounp" v-for="item in users" :key="item.id">
- <p>
- <el-checkbox :label="item.name" @change="kkk(item)">
- <span>
- <span v-if="user.userNameNeedTranslate != '1'">
- {{item.name}}
- </span>
- <span v-if="user.userNameNeedTranslate == '1'">
- <TranslationOpenDataText type='userName' :openid='item.name'></TranslationOpenDataText>
- </span>
- </span>
- </el-checkbox>
- </p>
- </el-checkbox-group>
- </div>
- <div class="ssp" @click="sss"></div>
- <!-- </el-form> -->
- <div class="pro_btn">
- <el-button size="mini" @click="shutPro">{{ $t('btn.cancel') }}</el-button>
- <el-button size="mini" type="primary" @click="addTaskProgress">{{ $t('fa-bu') }}</el-button>
- </div>
- </div>
-
- <div class="ddl" v-if="recentProgressInfo != null && recentProgressInfo.id != null">
- <div class="elCard" style="margin-bottom: 10px; height:" >
- <i class="el-icon-success" style="color: #43d14f;" v-if="recentProgressInfo.status == 0"></i>
- <i class="el-icon-success" style="color: #fd7624;" v-else-if="recentProgressInfo.status == 1"></i>
- <i class="el-icon-success" style="color: #fd4d47;" v-else></i>
- <span v-if="recentProgressInfo.status == 0">{{ $t('normals') }}</span>
- <span v-else-if="recentProgressInfo.status == 1">{{ $t('normals') }}</span>
- <span v-else>{{ $t('withinthetimelimit') }}</span>
- <el-dropdown trigger="click" style="float:right;cursor:pointer; float: right;">
- <i class="el-icon-more" ></i>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item divided>
- <span @click="deleteTaskProgress(recentProgressInfo.id)"><i class="el-icon-delete"></i>{{ $t('deleteList ') }}</span></el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- <!-- <div class="elCard_qu">{{recentProgressInfo.creatorName}}{{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}</div> -->
- <div class="elCard_qu">
- <span>
- <span v-if="user.userNameNeedTranslate != '1'">
- {{recentProgressInfo.creatorName}}
- </span>
- <span v-if="user.userNameNeedTranslate == '1'">
- <TranslationOpenDataText type='userName' :openid='recentProgressInfo.creatorName'></TranslationOpenDataText>
- </span>
- </span>
- {{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}
- </div>
- <p style="padding-left: 20px;">{{recentProgressInfo.content}}</p>
- <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">{{ $t('viewingHistory') }}</el-button></div>
- </div>
- </div>
- <!-- 任务列表没有数据的时候展示 -->
- <div class="nones" v-if="ProgressList.length <= 0">
- {{ $t('nodata') }}
- </div>
- <!-- 任务进展完整状态 -->
- <el-dialog :title="$t('other.prompts')" :visible.sync="innerVisibless" append-to-body width="500px">
- <div class="integrity">
- <h3 style="font-weight: normal;display: inline-block;margin: 0 0 20px 0;">{{ $t('taskprogress') }} :{{ProgressList.length}}</h3>
- <!-- <span class="write"><i class="el-icon-circle-plus"></i>填写进展</span> -->
- <el-divider></el-divider>
- <!-- -->
- <div class="block" style="height: 200px;">
- <el-timeline style="padding:20px 0 0 0;">
- <el-timeline-item
- v-for="(activity, index) in ProgressList"
- :key="index">
- <div class="tb">
- <span v-if="activity.status == 0" style="color: #43D14F" class="icon"></span>
- <span v-if="activity.status == 1" style="color: #FD7624" class="icon"></span>
- <span v-if="activity.status == 2" style="color: red" class="icon"></span>
- <div>
- <span v-if="activity.status == 0" style="color: #43D14F">{{ $t('normals') }}</span>
- <span v-if="activity.status == 1" style="color: #FD7624">{{ $t('atrisk') }}</span>
- <span v-if="activity.status == 2" style="color: red">{{ $t('withinthetimelimit') }}</span>
- <span style="display: inline-block; float: right; color: #8C8C8C">{{activity.indate | relativeTime}}</span>
- </div>
- <p style="color: #8C8C8C">{{activity.content}}</p>
-
- </div>
- </el-timeline-item>
- </el-timeline>
- </div>
- <!-- -->
- </div>
- <span slot="footer" class="dialog-footer foooot">
- <el-button type="primary" @click="innerVisibless = false">{{ $t('Shutdown') }}</el-button>
- </span>
- </el-dialog>
- </template>
- <!-- 子任务/关联任务 -->
- <p ><i class="iconfont firerock-icontree themeFontColor" style="margin-left:10px;">{{timelabel && !isRelationItem ? $t('guanlian') : $t('zirwu')}}</i>
- <el-link style="float:right;" @click="addRelation" v-if="timelabel && !isRelationItem">{{ $t('associatedTask') }}</el-link>
- <el-link style="float:right;" @click="addSubTask" v-else>{{ $t('addingsubtask') }}</el-link>
- </p>
- <!-- 关联任务列表 -->
- <el-table key="guanlian" :data="relationSubTaskList" v-if="timelabel && !isRelationItem"
- :header-cell-style="{'font-weight':'normal'}"
- highlight-current-row
- v-loading="listLoading"
- style="width: 100%;margin-top:10px;"
- @row-click="relationTaskClick">
- <el-table-column prop="taskStatus" :label="$t('wan-cheng')" width="50" >
- <template slot-scope="scope">
- <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb" @change="relationFinishTask(scope.row)"></el-checkbox>
- </template>
- </el-table-column>
- <el-table-column prop="taskName" :label="$t('biao-ti')" >
- <template slot-scope="scope">
- <el-tooltip class="item themeFontColor" effect="dark" :content="scope.row.taskName" placement="top" style="cursor:pointer;">
- <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.taskName}}</span>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column :label="$t('operation')" width="130" align="left">
- <template slot-scope="scope">
- <el-button @click.stop.native="deleteRelationItem(scope.row.id)" size="mini">{{ $t('dissociated') }}</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!--子任务列表 -->
- <el-table key="zi" :data="addForm.subTaskList" v-else
- :header-cell-style="{'font-weight':'normal'}"
- highlight-current-row v-loading="listLoading" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
- <el-table-column prop="taskStatus" :label="$t('wan-cheng')" width="50" >
- <template slot-scope="scope">
- <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb"
- @change="finishTask(scope.row)"
- ></el-checkbox>
- </template>
- </el-table-column>
- <el-table-column prop="name" :label="$t('biao-ti')" >
- <template slot-scope="scope">
- <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
- <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.name}}</span>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" width="100" >
- <template slot-scope="scope">
- <span v-if="user.userNameNeedTranslate != 1">
- {{scope.row.executorName == null?$t('dai-fen-pei'):scope.row.executorName}}
- </span>
- <span v-if="user.userNameNeedTranslate == 1">
- <span v-if="scope.row.executorName == null">
- {{$t('dai-fen-pei')}}
- </span>
- <span v-else>
- <span v-for="item,index in scope.row.executorName" :key="index">
- <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
- <span v-if="index < scope.row.executorName.length - 1">,</span>
- </span>
- </span>
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="endDate" :label="$t('deadline')" width="100" >
- <template slot-scope="scope">
- <p v-if="scope.row.endDate >= times">{{scope.row.endDate}}</p>
- <p v-else style="background: #e62412; color: #fff;text-align: center; border-radius: 3px;">{{scope.row.endDate}}</p>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-form>
- <!-- 关联文件列表 -->
- <template v-if="isEditFile">
- <div style="width:100%;margin:1em 0;">
- <i class="iconfont firerock-icontree themeFontColor" style="margin-left:10px;">{{ $t('jiafuchengguo') }}</i>
- <el-link @click="relationFileClick()" style="float:right;margin-left:10px">{{ $t('associatedfiles') }}</el-link>
- <el-upload style="float:right;" action="#" :http-request="uploadFileClick" :show-file-list="false" :multiple="false">
- <el-link>{{ $t('uoloadFiles') }}</el-link>
- </el-upload>
-
- </div>
- <el-table
- v-loading="fileListLoading"
- ref="filetable"
- :data="taskFileList"
- :header-cell-style="{'font-weight':'normal'}"
- highlight-current-row
- max-height="240"
- style="width: 100%;margin-top:10px;margin-bottom:15px">
- <el-table-column :label="$t('headerTop.serialNumber')" prop="documentType" min-width="60" align="center">
- <template slot-scope="scope">
- <div>
- {{scope.$index + 1}}
- </div>
- </template>
- </el-table-column>
- <el-table-column :label="$t('filenames')" prop="documentName" min-width="180">
- <template slot-scope="scope">
- <el-link @click.stop.native="viewOnline(scope.row)">
- {{scope.row.documentName}}
- </el-link>
- </template>
- </el-table-column>
- <el-table-column :label="$t('filesize')" prop="size" min-width="80" align="center"></el-table-column>
- <el-table-column :label="$t('founder')" prop="creatorName" min-width="60" align="center">
- <template slot-scope="scope">
- <div>
- <span v-if="user.userNameNeedTranslate != 1">{{scope.row.creatorName}}</span>
- <span v-if="user.userNameNeedTranslate == 1">
- <TranslationOpenDataText type='userName' :openid='scope.row.creatorName'></TranslationOpenDataText>
- </span>
- </div>
- </template>
- </el-table-column>
- <el-table-column :label="$t('creationtime')" prop="indate" min-width="150" align="center">
- <template slot-scope="scope">
- <span>{{scope.row.indate}}</span>
- </template>
- </el-table-column>
- <el-table-column :label="$t('operation')" min-width="150" fixed="right">
- <template slot-scope="scope">
- <el-link :href="scope.row.url" :download="scope.row.documentName" type="primary" style="margin-right:7px">{{ $t('other.download') }}</el-link>
- <el-link @click="taskFileDelete(scope.row.id)">{{ $t('btn.delete') }}</el-link>
- <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">
- <el-link type="primary">重新上传</el-link>
- </el-upload>
- </template>
- </el-table-column>
- <el-table-column label="状态" min-width="140" v-if="user.timeType.taskFileCharge == 1 || user.timeType.taskFileCharge == 2" fixed="right">
- <template slot-scope="scope">
- <template v-if="scope.row.fileChargeStatus != 2">
- <el-link :type="{'0': 'warning', '1': 'info', '2': 'danger'}[scope.row.fileChargeStatus]" :underline="false">
- {{ scope.row.fileChargeStatusTextList[0] || '' }}
- <template v-if="(scope.row.fileChargeStatusTextList || []).length > 1">
- <TranslationOpenDataText :openid='scope.row.fileChargeStatusTextList[1]'></TranslationOpenDataText>
- {{ scope.row.fileChargeStatusTextList[2] || '' }}
- </template>
- </el-link>
- </template>
- <template v-else>
- <el-tooltip class="item" effect="dark" content="点击查看" placement="top">
- <el-link :type="'danger'" :underline="false" @click="showReasonForRejection(scope.row)">
- {{ scope.row.fileChargeStatusTextList[0] || '' }}
- <template v-if="(scope.row.fileChargeStatusTextList || []).length > 1">
- <TranslationOpenDataText :openid='scope.row.fileChargeStatusTextList[1]'></TranslationOpenDataText>
- {{ scope.row.fileChargeStatusTextList[2] || '' }}
- </template>
- </el-link>
- </el-tooltip>
- </template>
- </template>
- </el-table-column>
- </el-table>
- </template>
- <!-- 关联文件dialog -->
- <el-dialog v-if="relationFileDialog" :visible.sync="relationFileDialog" :title="$t('associatedfiles')" append-to-body>
- <span>{{ $t('wenjian1guanli') }}</span>
- <div>
- <span>{{ $t('xuanzwenjian') }}</span>
- <el-select v-model="addFileId" filterable >
- <el-option
- v-for="item in projectFileList"
- :key="item.id"
- :label="item.documentName"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-button @click="addTaskFile()">{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- <el-dialog v-if="isRelationTab" :visible.sync="isRelationTab" :title="$t('associatedTask')" width="800px" append-to-body>
- <el-form ref="relationItemForm" label-width="100px">
- <el-form-item :label="$t('selecttask')" prop="taskType">
- <el-select v-model="relationvalue" multiple style="width:80%">
- <el-option
- v-for="item in relationdata"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer foooot">
- <el-button @click="isRelationTab = false">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="addRelationTask()">{{ $t('btn.determine') }}</el-button>
- </div>
- </el-dialog>
- </div>
- <div slot="footer" class="dialog-footer foooot">
- <el-button v-if="(user.id == addForm.createrId || currentProject.inchargerId == user.id || currentProject.creatorId == user.id || permissions.projectManagement) && canAddTask" @click.native="deleteTask()" style="float:left;">{{ $t('btn.delete') }}</el-button>
- <el-button type="primary" v-if="user.userNameNeedTranslate == 1 && !meetingId && !integrationTask.stage && addForm.executorListFront[0].executorId" @click="meetingCli()">{{ $t('faQiHuiYi') }}</el-button>
- <el-button @click.native="closeBounceds()">{{ $t('btn.cancel') }}</el-button>
- <el-button type="primary" @click="submitInsert" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
- </div>
-
- <!-- <div slot="title" v-if="addForm.parentTid != null || isRelationItem" >
- <el-page-header @back="backToParentTask" :title="timelabel ? $t('returnmilestone') : $t('parenttask')" :content="timelabel ? relationPar.name : addForm.parentTname"></el-page-header>
- </div> -->
- <!-- 评论 -->
- <div class="remark" v-show="addForm.id != null">
- <span class="zh">
- <div class="player">
- <p>{{ $t('participantin') }}</p>
- <div class="bj">
- <span v-for="(pl, i) in critic" :key="i">
- <span style="background: #778899" v-if="user.userNameNeedTranslate != 1">{{pl.length > 2 ? pl.substring(pl.length - 2, pl.length) : pl}}</span>
- <span v-if="user.userNameNeedTranslate == 1">
- <TranslationOpenDataText type='userName' :openid='pl'></TranslationOpenDataText>
- </span>
- </span>
- <!-- <span style="background: #778899">{{pl.length}}</span> -->
- </div>
- </div>
- <div class="subject">
- <div class="sub-all">
- <div :class="dynamicTab ? 'subOn' : ''" @click="dynamicTab = true">{{ $t('alldynamic') }}</div>
- <div :class="dynamicTab ? '' : 'subOn'" @click="dynamicTab = false">{{ $t('xiang-guan-ri-bao') }}</div>
- </div>
- <div class="sub-details" ref="main" v-if="dynamicTab">
- <ul class="infinite-list" v-infinite-scroll="load" ref="contRoll">
- <div style="width: 100%" v-if="commentList.length <= 0">
- <img src="../assets/image/xiao.png" alt="">
- </div>
- <li v-for="i in count" class="infinite-list-item counli" :key="i">
- <p><i class="el-icon-s-fold"></i> <em>{{ $t('managerQucompletedthedependencytask') }}</em><span>{{ $t('onApril20') }}</span></p>
- </li>
- <li class="carts" v-for="item in commentList" :key="item.id">
- <!-- <el-image style="width: 30px; height: 30px" :src="url" :fit="fit"></el-image> -->
- <!-- <i :style="'background' + item.userColor"> -->
- <i :style="'background' + item.userColor">
- <i v-if="user.userNameNeedTranslate != 1">
- {{item.userName.length > 2 ? item.userName.substring(item.userName.length - 2, item.userName.length) : item.userName}}
- </i>
- <i v-if="user.userNameNeedTranslate == 1">
- <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
- </i>
- </i>
- <div>
- <!-- <p>{{item.userName}}</p> -->
- <!-- <p> -->
- <p v-if="user.userNameNeedTranslate != 1">
- {{item.userName}}
- </p>
- <p v-if="user.userNameNeedTranslate == 1">
- <TranslationOpenDataText type='userName' :openid='item.userName'></TranslationOpenDataText>
- </p>
- <!-- </p> -->
- <em>
- <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate == 1">
- <template v-for="listItem in item.newContent">
- <template v-if="listItem.type == 'user'">
- <TranslationOpenDataText type='userName' :openid='listItem.value'></TranslationOpenDataText>
- </template>
- <template v-if="listItem.type == 'text'">{{ listItem.value }}</template>
- </template>
- </p>
- <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate != 1">{{item.content}}</p>
- <!-- 重启原因和责任人 -->
- <span class="commentSpan" v-if="user.timeType.restartTaskNeedReason == 1 && item.reason != ''">{{ $t('zhongQiYuanYin') }}:{{item.reason}}</span>
- <span class="commentSpan" v-if="user.timeType.restartTaskNeedReason == 1 && item.taskPersonLiableList.length > 0">{{ $t('zeRenRen') }}
- <span v-for="responsibility, responsibilityIndex in item.taskPersonLiableList" :key="responsibilityIndex">
- <span v-if="user.userNameNeedTranslate == 1">
- <TranslationOpenDataText type='userName' :openid='responsibility.userName'></TranslationOpenDataText>
- </span>
- <span v-if="user.userNameNeedTranslate != 1">{{responsibility.userName}}</span>
- <span v-if="responsibilityIndex < item.taskPersonLiableList.length - 1">,</span>
- </span>
- </span>
- </em>
- </div>
- <span>{{item.createTime | relativeTime}}</span>
- </li>
- </ul>
- </div>
- <div class="Daily" v-if="!dynamicTab">
- <div class="one_daily_body DailyBody">
- <el-card shadow="never" v-for="(item2,index2) in dailyList" :key="index2" style="margin-bottom: 20px;">
- <p>
- {{ $t('tian-bao-ren') }}: <span v-if="user.userNameNeedTranslate != 1">{{item2.userName}}</span>
- <span v-if="user.userNameNeedTranslate == 1">
- <TranslationOpenDataText type='userName' :openid='item2.userName'></TranslationOpenDataText>
- </span>
- <span style="float: right;">{{item2.createDate}}</span>
- </p>
- <p>{{ $t('other.approvalStatus') }}:
- <span v-if="user.company.packageEngineering == 0">
- <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0">
- <span v-if="item2.isDeptAudit==0">
- <span v-if="item2.projectAuditState==0">
- <!-- 待项目审核人 --> {{$t('other.waitForTheProjectReviewer')}}
- <span v-if="item2.projectAuditorName != null">(
- <span v-if="user.userNameNeedTranslate == '1'">
- <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
- </span>
- <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
- )</span>
- <!-- 审核 --> {{$t('other.audit')}}
- </span>
- <span style="color:#32CD32;" v-else-if="item2.projectAuditState==1">
- <!-- 项目审核人 --> {{$t('other.projectAuditor')}}
- <span v-if="item2.projectAuditorName != null">(
- <!-- {{item2.projectAuditorName}} -->
- <span v-if="user.userNameNeedTranslate == '1'">
- <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
- </span>
- <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
- )</span>
- <!-- 审核通过 --> {{$t('state.approved')}}
- </span>
- </span>
- <span v-else-if="item2.isDeptAudit==1">
- ({{$t('other.await')}}
- <span v-if="user.userNameNeedTranslate == '1'">
- <TranslationOpenDataText type='departmentName' :openid='item2.auditDeptName'></TranslationOpenDataText>
- </span>
- <span v-if="user.userNameNeedTranslate != '1'">{{item2.auditDeptName}}</span>
- {{$t('other.audit')}})
- </span>
- </span>
- <span style="margin-left:15px;color:#DAA520;" v-else-if="item2.state == -1">{{$t('other.importWaitingForReview')}}</span>
- <span style="margin-left:15px;color:#32CD32;" v-else-if="item2.state == 1">{{$t('state.alreadyPassed')}}
- <span style="color:#c7e944" v-if="item2.reportAutoApprove == 1">{{$t('other.automaticReview')}}</span>
- </span>
-
- <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 2">{{$t('state.rejected')}} {{$t('other.reason')}}:{{item2.rejectReason}}</span>
- <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 3">{{$t('state.waitingsubmit')}}</span>
- </span>
- <span v-if="user.company.packageEngineering == 1">
- <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == -1">{{$t('other.importWaitingForReview')}}</span>
- <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == -1">{{$t('other.waitingForProfessionalReview')}}</span>
- <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 0">{{$t('other.waitingForDepartmentReview')}}</span>
- <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 1">{{$t('other.waitForTheProjectReviewer')}}<span v-if="item2.projectAuditorName != null">
- (
- <span v-if="user.userNameNeedTranslate != 1">
- {{item2.projectAuditorName}}
- </span>
- <span v-if="user.userNameNeedTranslate == 1">
- <TranslationOpenDataText type='userName' :openid='item2.projectAuditorName'></TranslationOpenDataText>
- </span>
- )
- </span>{{$t('other.audit')}}</span>
- <span style="margin-left:15px;color:#32CD32;" v-else-if="item2.state == 1">{{$t('state.alreadyPassed')}}</span>
- <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 2">{{$t('state.rejected')}} {{$t('other.reason')}}:{{item2.rejectReason}}</span>
- <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 3">{{$t('state.waitingsubmit')}}</span>
- </span>
- </p>
- <p v-if="user.timeType.customDegreeActive==1 && item2.degree_id != null && item2.degree_id != -1">{{user.timeType.customDegreeName}}:{{item2.degreeName}}</p>
- <p v-if="user.timeType.customDataActive==1">{{user.timeType.customDataName}}:{{item2.customData}}</p>
- <!-- 自定义日报文本 -->
- <p v-if="user.timeType.customTextActive==1">{{user.timeType.customTextName}}:{{item2.customText}}</p>
- <p v-if="user.company.packageEngineering == 1">
- {{$t('other.professionalProgress')}}:
- <span style="margin-right:10px;" v-for="progressItem in item2.professionProgress" :key="progressItem.id">{{progressItem.professionName}}({{progressItem.progress}}%)
- <el-tooltip v-if="progressItem.auditState == 0" :content="$t('state.WaitingAudit')" effect="light" placement="top">
- <i class="iconfont firerock-icondaibandengdaishenhe"></i>
- </el-tooltip>
- <el-tooltip v-if="progressItem.auditState == 1" :content="$t('state.alreadyPassed')" effect="light" placement="top">
- <i class="iconfont firerock-iconshenhetongguo"></i>
- </el-tooltip>
- <el-tooltip v-if="progressItem.auditState == 2" :content="$t('state.notThrough')" effect="light" placement="top">
- <i class="iconfont firerock-iconshenhebohui"></i>
- </el-tooltip>
- </span>
- </p>
- <div v-if="item2.multiWorktime==0">
- <p style="display: inline-block;">{{$t('time.duration')}}:
- <span v-if="item2.reportTimeType == 0" style="margin-right:10px;">{{typeList[item2.timeType]}}</span>
- <span v-if="item2.reportTimeType == 2" style="margin-right:10px;">{{item2.startTime+'-'+item2.endTime}}</span>
- {{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>
- <p>{{$t('other.matters')}}:<span v-html="item2.content"></span></p>
- </div>
- <div v-if="item2.multiWorktime==1" >
- <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>
- <div v-for="(timeItem, tIndex) in item2.worktimeList" :key="tIndex"
- style="border: 0.5px #ddd solid;margin-bottom:5px;padding:5px;">
- <p style="display: inline-block;">{{$t('time.duration')}}:
- <span v-if="item2.reportTimeType == 2" style="margin-right:10px;">{{timeItem.startTime+'-'+timeItem.endTime}}</span>
- {{timeItem.time.toFixed(1)}}h
- </p>
- <p>{{$t('other.matters')}}:<span v-html="timeItem.content"></span></p>
- </div>
- </div>
- <p v-if="item2.state == 1 && user.timeType.needEvaluate == 1">{{$t('other.evaluation')}}:<span v-html="item2.evaluate"></span></p>
-
- <!--照片的显示 -->
- <p v-if="item2.pics != null && item2.pics.length > 0">
- <el-image v-for="(pic, index) in item2.pics" :key="index"
- style="width: 100px; height: 100px; margin-right:10px;"
- :src="pic"
- :preview-src-list="item2.pics">
- </el-image>
- </p>
- </el-card>
- </div>
- </div>
- </div>
- <div class="issue" v-if="dynamicTab">
- <!-- <el-input type="textarea" class="textareays" label-width="100%" label-height="140px"></el-input> -->
- <div class="issue_fixation">
- <div class="inputDeep"><el-input
- type="textarea"
- :placeholder="$t('pleaseentercontent')"
- :autosize="{ minRows: 6, maxRows: 6}"
- v-model="textarea2"
- class="inputDeeps"
- >
- </el-input></div>
- <el-button class="issue-button" type="primary" @click="release()">{{ $t('fa-bu') }}</el-button>
- </div>
- </div>
- </span>
- </div>
- <!-- 发起会议 -->
- <el-dialog :title="$t('faQiHuiYi')" :visible.sync="meetingVisable" width="500px" :before-close="handleClose" append-to-body>
- <div class="block">
- <div>
- <span class="demonstration">{{ $t('huiYiKaiShiShiJian') }}</span>
- <el-date-picker
- v-model="initiateAMeetingForm.startTime"
- type="datetime"
- :placeholder="$t('xuanZeRiQiShiJian')"
- value-format="yyyy-MM-dd HH:mm:ss"
- clearable
- default-time="10:00:00">
- </el-date-picker>
- </div>
- <div style="margin-top: 20px">
- <span class="demonstration">{{ $t('huiYiJieShuShiJian') }}</span>
- <el-date-picker
- v-model="initiateAMeetingForm.endTime"
- type="datetime"
- :placeholder="$t('xuanZeRiQiShiJian')"
- value-format="yyyy-MM-dd HH:mm:ss"
- clearable.
- default-time="11:00:00">
- </el-date-picker>
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="meetingVisable = false">{{ $t('quXiao') }}</el-button>
- <el-button type="primary" @click="confirmMeeting()">{{ $t('queDing') }}</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import selectCat from "@/components/select.vue"
- import selectPersonnel from "@/components/selectPersonnel.vue"
- // 富文本样式
- import 'quill/dist/quill.core.css'
- import 'quill/dist/quill.snow.css'
- import 'quill/dist/quill.bubble.css'
- // 导入富文本
- import { quillEditor } from 'vue-quill-editor'
- import { getThemeColor } from '@/utils/commonMethod.js'
- export default {
- props: {
- integrationTask:{
- type: Object,
- default: {}
- },
- // 是否显示选择任务
- showOrNot: {
- type: Boolean,
- default: false
- }
- },
- components: {
- quillEditor, // 富文本
- selectCat,
- selectPersonnel
- },
- data() {
- return {
- startNum: 0,
- endNum: 5,
- shownumber: 5,
- sizeNum: JSON.parse(sessionStorage.getItem("user")).companyId == '3092' ? 105 : JSON.parse(sessionStorage.getItem("user")).timeType.taskFileCharge == '2' ? 105 : 65,
- meeting: false,
- numnnumnum: 2,
- componentFlg: false,
- mileageCup: false,
- loadingExport : false,
- saveTemplateLoading: false,
- joinMembList:[],
- setInchargerDialog: false,
- recentProgressInfo:{},
- addToTmpDialog:false,
- templateForm:{},
- importTaskDialog:false,
- importToStageId:null,
- exportDialog: false,
- exportTaskType:null,
- groupTemplateList:[],
- createGroupWay:'new',
- modGroupDialog:false,
- subTaskVisible:false,
- orderList:[{id:"seq",name:this.$t('manuallydragthesequence'),isDesc:false},{id:"create_date",name:this.$t('creationtimeisthelatest'),isDesc:true},
- {id:"end_date",name:this.$t('deadlineisthelatest'),isDesc:true},
- {id:"task_level",name:this.$t('highestpriority'),isDesc:true}],
- order:"seq",
- isDesc:false,
- taskDataList:[],
- displayTable: false,
- 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')},
- {id:5,name:this.$t('createdthetask')},{id:6,name:this.$t('missionIwason')},{id:7,name:this.$t('todaytask')},{id:8,name:this.$t('taskthatisoverdue')}],
- importanceList:[{id:0,name:this.$t('yi-ban')},{id:1,name:this.$t('zhong-yao')},{id:2,name:this.$t('jin-ji')},],
- 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"}],
- taskTypeColor:[getThemeColor(),'#8613ad','#bf0404'],
- taskTypeIcon:['iconfont firerock-iconrenwu','iconfont firerock-iconicon-','iconfont firerock-iconfengxian'],
- taskStatusList:[this.$t('ongoing'),this.$t('state.completed'),this.$t('state.undone')],
- //优先级
- taskLevelColor:['#262626','#E6A23C','#F56C6C'],
- stageListHeight:0,
- taskListinH:0,
- groupWidth:260,
- drag: false,
- stageDrag: false,
- dragging: false,
- stageList:[],
- selectedGroup:{},
- allGroupData:[],
- defaultGroupId:null,
- addGroupDialog: false,
- addStageDialog: false,
- groupSearch:null,
- groupType:0,//0-分组,1-视图
- groupList: [],
- groupForm:{},
- stageForm:[],
- curProjectId:null,
- projectList:null,
- activeIndex:"1",
- activeName:"projectInside",
- searchField:null,
- keyword:null,
- user: JSON.parse(sessionStorage.getItem("user")),
- permissions: JSON.parse(sessionStorage.getItem("permissions")),
- userDetailVisible: false,
- userDetail:{},
- date: new Date(),
- users: [],
- tableHeight: 0,
- listLoading: false,
-
- subProjectVisible: false,
- subProjectList: [],//子项目列表
- currentProject:{},
- addSubProject: false,
- addFormVisible: false,
- addLoading: false,
- title: "",
- addForm: {
- name: '',
- executorListFront: [
- {
- executorId:null
- }
- ]
- },
- rules: {
- name: [{ required: true, message: this.$t('pleaseenteragroupname'), trigger: "blur" }],
- },
- rules2: {
- stagesName: [{ required: true, message: this.$t('pleaseenteratasklistname'), trigger: "blur" }],
- },
- taskRules : {
- name: [{ required: true, message: this.$t('enterthetaskcontent'), trigger: "blur" }],
- serviceId: [{ required: true, message: this.$t('qingXuanZeFuWu'), trigger: "blur" }],
- projectId: [{ required: true, message: this.$t('qingXuanZeSuoShuXiangMu'), trigger: "blur" }],
- groupId: [{ required: true, message: this.$t('qingXuanZeSuoShuRenWuFenZu'), trigger: "blur" }],
- stagesId: [{ required: true, message: this.$t('qingXuanZeSuoShuRenWuLieBiao'), trigger: "blur" }],
- planCost: [{ required: true, message: this.$t('planCostHint'), trigger: "blur" }],
- },
- formGrouping: {
- name: [{ required: true, message: this.$t('pleaseenteragroupname'), trigger: "blur" }],
- },
- sleectId: null,
- sleectProjectId: null,
- sidebarIndex: 0, // 侧边栏索引
- url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
- count: 0,
- textarea2: '',
- taskId: null,
- commentList: [],
- radio: 0,
- critic: [], // 评论头像的数组
- editorOption: { // 富文本框里面的默认值
- placeholder: this.$t('pleaseentethetext'),
- modules: {
- toolbar:[
- ['bold', 'italic', 'underline', 'strike'], //加粗,斜体,下划线,删除线
- // ['blockquote', 'code-block'], //引用,代码块
-
- [{ 'header': 1 }, { 'header': 2 }], // 标题,键值对的形式;1、2表示字体大小
- // [{ 'list': 'ordered'}, { 'list': 'bullet' }], //列表
- // [{ 'script': 'sub'}, { 'script': 'super' }], // 上下标
- // [{ 'indent': '-1'}, { 'indent': '+1' }], // 缩进
- // [{ 'direction': 'rtl' }], // 文本方向
-
- [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
- [{ 'header': [1, 2, 3, 4, 5, 6, false] }], //几级标题
-
- [{ 'color': [] }, { 'background': [] }], // 字体颜色,字体背景颜色
- // [{ 'font': [] }], //字体
- [{ 'align': [] }], //对齐方式
-
- ['clean'], //清除字体样式
- // ['image','video'] //上传图片、上传视频
- ['image'] //上传图片、上传视频
- ], //工具栏设置
- },
- theme: 'snow',
- },
- textContent: true, // 控制提交
- times: null,
- text2: '',
- innerVisibless: false, // 任务展示弹出层
- activities: [{
- content: this.$t('normals'),
- timestamp: this.$t('hoursago'),
- size: 'large',
- type: 'primary',
- icon: 'el-icon-circle-check',
- color: '#409EFF'
- }, {
- content: this.$t('withinthetimelimit'),
- timestamp: this.$t('hoursago8'),
- color: '#F87872'
- }],
- ProgressList: [],
- checkboxGrounp: [], // 选中人的数据
- checkLists: [], // 选中人数据的ID
- taskIid: null,
- gstimday:[1],
- gstimhour:[8],
- timelabel: false,
- relationdata: [],
- isRelationTab: false,
- relationvalue:[],
- relationSubTaskList:[],
- relationItemData: null,
- relationPar:{name: ''},
- isRelationItem: false,
- // 关联文件
- fileListLoading:false,
- projectFileList:[],
- taskFileList:[],
- relationFileDialog: false,
- addFileId: null,
- isEditFile: false,
- // 设置项目参与人
- participantsDialog: false,
- participantsFilterText: '',
- deptMembData: [
- {
- id: 0,
- label: this.$t('lable.unassigned'),
- }
- ],
- defaultProps: {
- children: 'children',
- label: 'label'
- },
- chosenMembCount: 0,
- ididid:null,
- alreadyPartArray: [],
- projectCreatorId: null,
- projectInchargerId: null,
- canAddTask: false, // 是否可创建任务的判断标志
- canEditStageList: false, //是否可编辑列表的判断标志
- groupResponsibleId: '', // 分组负责人的id
- groupDetailsShow: false,
- groupDetailData: {},
- groupDetailTil: '',
- setTemplateData: {},
- setTemplateDialog: false,
-
- taskListPage: 1,
- taskListSize: 20,
- taskListTotal: 0,
- dynamicTab: true,
- dailyList: [],
- meetingId: '',
- integrationProjectList: [],
- sapServiceList:[],
- meetingVisable: false,
- initiateAMeetingForm: {
- startTime: '',
- endTime: '',
- taskId: ''
- }
- };
- },
- computed: {
- showData() {
- // return this.addForm.executorListFront.slice(this.startNum, this.endNum)
- let newList = this.addForm.executorListFront
- newList.forEach((item, index) => {
- item.indexList = index
- })
- console.log(newList.slice(this.startNum, this.endNum), '<==== newList')
- return newList.slice(this.startNum, this.endNum)
- },
- containerHeight() {
- if(this.addForm.executorListFront.length < this.shownumber) {
- return this.sizeNum * this.addForm.executorListFront.length + 'px'
- } else {
- return (this.sizeNum * this.shownumber) - 20 + 'px'
- }
- },
- barHeight() {
- return this.sizeNum * (this.addForm.executorListFront || []).length + 'px'
- },
- listTop() {
- return this.startNum * this.sizeNum + 'px'
- }
- },
- watch: {},
- created() {},
- mounted() {
- console.log('我获取到的数据', this.integrationTask, this.showOrNot)
- this.triggerEvent(this.integrationTask)
- this.gstimhour = [this.user.timeType.allday]
- this.gstimday = [1]
- this.getSapServiceList()
- this.timess();
- },
- methods: {
- viewOnline(row) {
- sessionStorage.setItem("fileName",row.documentName);
- sessionStorage.setItem("fileUrl",row.url);
- let routeUrl;
- if (row.documentName.endsWith('.doc') || row.documentName.endsWith('.docx')) {
- routeUrl = this.$router.resolve({
- path: "/viewWord",
- params: {}
- });
- } else if (row.documentName.endsWith('.xls') || row.documentName.endsWith('.xlsx')) {
- routeUrl = this.$router.resolve({
- path: "/viewExcel",
- params: {}
- });
- }
- if (routeUrl != null) {
- console.log(routeUrl.href);
- window.open(routeUrl.href, '_blank');
- } else {
- window.open(row.url, '_blank');
- }
- },
- // 容器的滚动事件
- handleScroll() {
- const scrollTop = this.$refs.container.scrollTop
- this.startNum = Math.floor(scrollTop / this.sizeNum)
- console.log(this.startNum, this.shownumber, '<==== 计算')
- this.endNum = this.startNum + this.shownumber
- },
- bottomScrollClick(val) {
- this.$nextTick(() => {
- let scrollEl = this.$refs.container;
- let bum = scrollEl.scrollHeight
- let current = scrollEl.scrollTop + 1
- scrollEl.scrollTo({ top: val ? current : bum, behavior: 'smooth' });
- });
- },
- // 刷新数据
- refreshData() {
- this.$forceUpdate()
- },
- serviceIdChange() {
- this.refreshData()
- },
- confirmMeeting() {
- this.http.post('/task//operateMeeting',{...this.initiateAMeetingForm},
- res => {
- if (res.code == "ok") {
- this.meetingVisable=false,
- this.$message({
- message: this.$t('chengGongFaQiHuiYi'),
- type: "success"
- });
- } else {
- this.meetingVisable=false,
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.meetingVisable=false,
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- // 触发外层的会议
- meetingCli() {
- // this.$parent.$parent.parentMeetingCli(this.integrationTask.id)
- this.initiateAMeetingForm = {
- startTime: '',
- endTime: '',
- taskId: this.integrationTask.id
- }
- this.meetingVisable = true
- },
- // 触发事件
- triggerEvent(obj) {
- console.log(obj, '触发事件')
- this.curProjectId = obj.curProjectId
- this.getProjectList()
- if(!obj.taskVue) {
- this.getStageList(obj.integrationTaskNingwai)
- }
- if(obj.create) {
- this.getUsers(); // 获取名单数据
- this.mileageCup = false
- this.addFormVisible = true;
- this.curProjectId = obj.stage.projectId;
- this.addForm = {projectId: obj.stage.projectId, groupId: obj.stage.groupId, stagesId: obj.stage.id, taskLevel:0, planHours: 8, taskType: 0};
- this.addForm.executorListFront = [{executorId:null, planHours:this.user.timeType.allday}];
- this.gstimhour = [this.user.timeType.allday]
- this.gstimday = [1]
- this.addLoading = false;
- this.isEditFile = false;
- this.title=this.$t('createtask ');
- this.commentList = [];
- this.timelabel = false
- } else {
- if(!obj.taskVue) {
- this.isEditFile = true;
- this.getDetail(obj.curProjectId)
- }
- this.curProjectId = obj.task.projectId;
- // this.getTaskDetail(obj.id);
- this.getTaskProgressList(obj.id); // 获取任务进展列表
- this.gain(obj.task); // 获取评论列表
- this.getDailyList(obj.id) // 获取来自日报
- this.getRelationTaskList(obj.num, obj.id)
- this.getTaskFileList(obj.num,obj.id)
- setTimeout(() => {
- this.getTaskDetail(obj.id);
- }, 200)
- }
- this.getrelation();
- },
- // 代办任务创建事件
- agentCreatesEvents(num) {
- if(num == 1) {
- this.addForm.groupId = ''
- this.addForm.stagesId = ''
- this.getTaskGrouping()
- this.getrelation();
- } else if(num == 2) {
- this.addForm.stagesId = ''
- this.getTaskList()
- }
- },
- //获取项目列表
- getProjectList() {
- this.http.post(this.port.project.list, {},
- res => {
- if (res.code == "ok") {
- this.projectList = res.data;
- this.getRecentlyProject()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- // 获取最近项目列表
- getRecentlyProject() {
- this.http.post('/project/nearProject',{},res => {
- if(res.code == 'ok'){
- let topObj = {
- label: this.$t('zuiJinXuanZeXiangMu'),
- peojectList: res.data
- }
- let botomObj = {
- label: this.$t('other.allProject'),
- peojectList: this.projectList
- }
- this.integrationProjectList = [topObj, botomObj]
- console.log(this.integrationProjectList, '整合')
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },err => {
- this.$message({
- message: err,
- type: 'error'
- })
- })
- },
- // 获取任务分组
- getTaskGrouping() {
- this.http.post('/task-group/list', {projectId:this.addForm.projectId},
- res => {
- if (res.code == "ok") {
- this.groupList = res.data;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- getTaskList() {
- let obj = {
- groupId: this.addForm.groupId,
- projectId: this.addForm.projectId,
- order: 'seq',
- isDesc: false
- }
- this.getStageList(obj)
- },
- // 关闭最外层弹窗
- closeBounceds() {
- console.log('我被触发了')
- this.$emit('closeBounced', {})
- },
- chggstim(e,i){
- if(e){
- this.gstimday[i] = Math.ceil(this.gstimhour[i] / this.user.timeType.allday)
- }else{
- this.gstimhour[i] = this.gstimday[i] * this.user.timeType.allday
- }
- },
- removeExecutorLine(index,e) {
- if(e == 1){
- this.relationItemData.executorList.splice(index,1);
- this.gstimday.splice(index,1)
- this.gstimhour.splice(index,1)
- this.$forceUpdate();
- }else{
- this.addForm.executorListFront.splice(index,1);
- this.gstimday.splice(index,1)
- this.gstimhour.splice(index,1)
- this.$forceUpdate();
- }
- },
- removeExecutorLineNew(item, e) {
- let index = item.indexList
- if(e == 1){
- this.relationItemData.executorList.splice(index,1);
- this.gstimday.splice(index,1)
- this.gstimhour.splice(index,1)
- this.$forceUpdate();
- }else{
- this.addForm.executorListFront.splice(index,1);
- this.gstimday.splice(index,1)
- this.gstimhour.splice(index,1)
- this.$forceUpdate();
- }
- this.replacementResult()
- setTimeout(() => {
- this.bottomScrollClick(true)
- }, 100)
- },
- addExecutorLine(e) {
- if(e == 1){
- if (this.relationItemData.executorList == null) {
- this.relationItemData.executorList = [];//初始化
- }
- this.relationItemData.executorList.push({executorId:null, planHours:this.user.timeType.allday});
- this.gstimday.push(1)
- this.gstimhour.push(this.user.timeType.allday)
- this.$forceUpdate();
- }else{
- if (this.addForm.executorListFront == null) {
- this.addForm.executorListFront = [];//初始化
- }
- this.addForm.executorListFront.push({executorId:null, planHours:this.user.timeType.allday});
- this.gstimday.push(1)
- this.gstimhour.push(this.user.timeType.allday)
- this.$forceUpdate();
- this.replacementResult()
- setTimeout(() => {
- this.bottomScrollClick()
- }, 100)
- }
- },
- replacementResult() {
- let lengths = (this.addForm.executorListFront || []).length
- if(lengths > this.shownumber) {
- this.startNum = lengths - this.shownumber
- this.endNum = lengths
- } else {
- this.startNum = 0
- this.endNum = lengths
- }
- this.sizeNum = typeof this.sizeNum == 'number' ? this.sizeNum+'' : +this.sizeNum
- },
- getTaskDetail(id) {
- this.http.post('/task/getTask',{id: id},
- res => {
- if (res.code == "ok") {
- this.meetingId = res.data.meetingId
- console.log(this.meetingId, '看看打印纸')
- if(this.user.userNameNeedTranslate == 1) {
- for(var i in res.data.subTaskList) {
- if(res.data.subTaskList[i].executorName) {
- res.data.subTaskList[i].executorName = res.data.subTaskList[i].executorName.split(',')
- }
- }
- }
- this.addForm = res.data;
- if (this.addForm.aheadTid) {
- this.addForm.aheadTidList = JSON.parse(this.addForm.aheadTid);
- } else {
- this.addForm.aheadTidList = [];
- }
-
- this.addForm.createDate = null;
- this.addForm.indate = null;
- this.addLoading = false;
- this.canAddTask = res.data.canAddTask
- this.recentProgressInfo = res.data.progress;
-
- if(res.data.executorList.length > 0) {
- for(var i in res.data.executorList){
- if(res.data.executorList[i].serviceId) {
- res.data.executorList[i].serviceId = JSON.parse(res.data.executorList[i].serviceId)
- }
- }
- console.log("==================",res.data.executorList)
- this.addForm.executorListFront = res.data.executorList;
- } else {
- this.addForm.executorListFront = [{executorId: null, planHours: 8}];
- }
- this.gstimday = []
- this.gstimhour = []
- for(let i=0;i<this.addForm.executorListFront.length;i++){
- this.gstimhour.push(this.addForm.executorListFront[i].planHours)
- this.gstimday.push(Math.ceil(this.addForm.executorListFront[i].planHours / this.user.timeType.allday))
- }
- console.log(this.gstimday, this.gstimhour)
- // //删除中间传值的变量数组
- delete this.addForm.executorList;
-
- //人员处理
- this.users = res.data.userList;
- // 触发类型切换事件
- this.selchg()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //获取任务进展列表
- getTaskProgressList(taskId) {
- this.taskIid = taskId
- this.http.post('/task-progress/list', {taskId: taskId},
- res => {
- if (res.code == "ok") {
- this.ProgressList = res.data;
- this.recentProgressInfo = res.data[0]
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- }
- );
- },
- getUsers() {
- this.http.post('/user/getSimpleActiveUserList', {},
- res => {
- if (res.code == "ok") {
- this.users = res.data;
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- // 获取评论列表
- gain(task,e) {
- this.commentList = [];
- this.taskId = e == 1 ? task.taskId : task.id;
- this.http.post('/task-comment/getList', {taskId: e == 1 ? task.taskId : task.id},
- res => {
- if (res.code == "ok") {
- if(this.user.userNameNeedTranslate == 1) {
- for (let i = 0; i < res.data.length; i++) {
- const originalString = res.data[i].content;
- const regex = /\$userName=[^$]*\$|[^$]+/g;
- const parts = originalString.match(regex);
- let newArrList = [];
- for (let j = 0; j < parts.length; j++) {
- const newStr = parts[j];
- if (newStr.startsWith('$userName=')) {
- const userName = newStr.slice(10, -1);
- newArrList.push({ type: 'user', value: userName });
- } else {
- newArrList.push({ type: 'text', value: newStr });
- }
- }
- res.data[i].newContent = newArrList;
- }
- }
- this.commentList = res.data
- this.sppk(this.commentList) // 获取参与人的方法
- this.contRoll()
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- // 获取评论参与人
- sppk(comit) {
- var sk = []
- comit.forEach(function(e){
- sk.push(e.userName)
- })
- this.critic = new Set(sk)
- },
- getRelationTaskList(i,e){ //获取关联任务列表
- let eid = null
- if(i){
- eid = e
- }else{
- eid = this.addForm.id
- }
- this.http.post('/task/getMilestoneTaskList',{
- milestoneId: eid
- },res => {
- if(res.code == 'ok') {
- this.relationSubTaskList = res.data
- // console.log('res',res.data);
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },error => {
- this.$message({
- message: error,
- type: 'error'
- })
- })
- },
- // 获取来自日报
- getDailyList(id) {
- this.http.post('/report/getTaskReportList',{
- // taskId: '22131'
- taskId: id
- },
- res => {
- if (res.code == "ok") {
- this.dailyList = res.data
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- objectSpanMethod({ row, column, rowIndex, columnIndex }) {
- const { timeType } = this.user
- if (columnIndex === 6 && timeType.taskFileCharge == 1) {
- return [this.taskFileList.length, 1];
- }
- return [1, 1];
- },
- // 获取任务下的文档列表
- getTaskFileList(e,eid){
- let etaskId
- if(e == 1){etaskId = eid}
- else{etaskId = this.addForm.id}
- this.fileListLoading = true
- this.http.post('/task-files/getTaskFiles',{
- taskId: etaskId
- },res => {
- if(res.code == 'ok'){
- this.fileListLoading = false
- this.taskFileList = res.data.map(item => {
- let str = item.fileChargeStatusText || ''
- let arr = str.split(/\$|=/).filter(item => item && item !== 'userName');
- return {
- ...item,
- fileChargeStatusTextList: arr || []
- }
- })
- console.log(this.taskFileList, '<+======this.taskFileList')
- }else {
- this.fileListLoading = false
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },error => {
- this.fileListLoading = false
- this.$message({
- message: error,
- type: 'error'
- })
- })
- },
- DateChange(){
- if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
- let stdate = Date.parse(this.addForm.startDate)
- let eddate = Date.parse(this.addForm.endDate)
- if(stdate <= eddate){
- let days = (eddate - stdate) / (1*24*60*60*1000) + 1
- for (let i=0;i<this.gstimday.length;i++) {
- this.gstimday[i] = days
- this.gstimhour[i] = days * this.user.timeType.allday
- }
- this.$forceUpdate()
- }
- }
-
- },
- // 自定义组件事件
- selectCal(obj) {
- if(obj.distinction == '1') {
- this.addForm.executorListFront[obj.index].executorId = obj.id
- } else if(obj.distinction == '2') {
- this.groupForm.inchargerId = obj.id
- } else if(obj.distinction == '101') {
- this.addForm.executorListFront[obj.index].fileChargeOneId = obj.id
- } else if(obj.distinction == '102') {
- this.addForm.executorListFront[obj.index].fileChargeTwoId = obj.id
- }
- },
- getDetail(id) {
- this.http.post('/project/detail',{
- id: id
- },
- res => {
- if (res.code == "ok") {
- console.log('触发更新试一下')
- this.currentProject = res.data;
- this.getjurisdictionIds(this.currentProject)
- this.joinMembList = this.currentProject.participationList;
- } else {
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- },
- getjurisdictionIds(pro){
- console.log('pro',pro.creatorId);
- this.projectCreatorId = pro.creatorId
- this.projectInchargerId = pro.inchargerId
- },
- //加载项目内的任务列表
- getStageList(obj) {
- this.http.post('/stages/list', {
- groupId: obj.groupId,
- projectId: obj.projectId,
- order: obj.order,
- isDesc: obj.isDesc
- },
- res => {
- if (res.code == "ok") {
- this.stageList = res.data.list;
- this.canAddTask = res.data.canAddTask
- this.canEditStageList = res.data.canEditStageList
- this.timess() // 处理时间的方法
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- timess(){
- // console.log('timess');
- var date = new Date()
- let Y = date.getFullYear()
- let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
- let D = date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate()
- this.times = `${Y}-${M}-${D}`
- console.log(this.times, '时间')
- },
- // 提交按钮
- submitInsert() {
- if (this.textContent !== true) return this.$message({
- showClose: true,
- message: this.$t('pictureistoolargepleaseuploaditagain'),
- type: 'warning'
- });
- //检查是有重名的执行人
- var exeList = this.addForm.executorListFront;
- // for(let i=0;i<this.gstimhour.length;i++){
- // exeList[i].planHours = this.gstimhour[i]
- // }
- console.log(this.addForm.executorListFront)
- for (var i=0;i<exeList.length;i++) {
- if(this.user.companyId==3092){
- var findSameUser = false;
- exeList[i].planHours = this.gstimhour[i]
- for (var j=i+1;j<exeList.length; j++) {
- if ((exeList[i].executorId && exeList[j].executorId && exeList[i].executorId == exeList[j].executorId)
- &&(exeList[i].serviceId && exeList[j].serviceId && exeList[i].serviceId == exeList[j].serviceId)) {
- findSameUser = true;
- break;
- }
- }
- if (findSameUser) {
- return this.$message({
- showClose: true,
- message: this.$t('tongYiGeZhiHangRenFuWuBuNengXiangTong'),
- type: 'error'
- });
- }
- } else if (this.user.timeType.taskFileCharge == 2) {
- var findSameUser = false;
- exeList[i].planHours = this.gstimhour[i]
- for (var j = 0; j < exeList.length; j++) {
- if (exeList[i].executorId && (!exeList[i].fileChargeOneId || !exeList[i].fileChargeTwoId)) {
- findSameUser = true;
- break;
- }
- }
- if (findSameUser) {
- return this.$message({
- showClose: true,
- message: `审核人必填`,
- type: 'error'
- });
- }
- } else{
- var findSameUser = false;
- exeList[i].planHours = this.gstimhour[i]
- for (var j=i+1;j<exeList.length; j++) {
- if (exeList[i].executorId && exeList[j].executorId && exeList[i].executorId == exeList[j].executorId) {
- findSameUser = true;
- break;
- }
- }
- if (findSameUser) {
- return this.$message({
- showClose: true,
- message: this.$t('executorhasduplication'),
- type: 'error'
- });
- }
- }
- }
- if(this.addForm.startDate && this.addForm.endDate) {
- if(this.addForm.endDate < this.addForm.startDate) {
- return this.$message({
- showClose: true,
- message: this.$t('ren-wu-jie-zhi-shi-jian-bu-neng-xiao-yu-kai-shi-shi-jian'),
- type: 'error'
- });
- }
- }
- this.$refs.form1.validate(valid => {
- if (valid) {
- delete this.addForm.subTaskList;
- delete this.addForm.refTaskList;
- delete this.addForm.progress;
- delete this.addForm.userList;
- //去掉没有执行人的.(因为要有计划工时,执行人可以暂不设置)
- // this.addForm.executorListFront = this.addForm.executorListFront.filter(exe=>exe.executorId);
- if(this.addForm.executorListFront.serviceId){
- this.addForm.executorListFront.serviceId= this.addForm.executorListFront.serviceId;
- }
- this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
- this.addForm.aheadTid = JSON.stringify(this.addForm.aheadTidList);
- this.addLoading = true;
- this.http.post('/task/save',this.addForm,
- res => {
- this.addLoading = false;
- if (res.code == "ok") {
- this.$message({
- message: this.$t('message.submittedSuccessfully'),
- type: "success"
- });
-
- if (this.addForm.parentTid == null) {
- let obj = {
- submitInsert: true,
- showOrNot: this.showOrNot
- }
- this.$emit('closeBounced', obj)
- } else {
- // this.backToParentTask();
- this.$emit('closeBounced', {backToParentTaskSub: true})
- }
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- }
- );
- }
- });
- },
- backToParentTask() {
- this.getTaskDetail(this.timelabel ? this.relationPar.id : this.addForm.parentTid);
- this.isEditFile = true;
- if(this.timelabel){
- this.isRelationItem = false
- this.getRelationTaskList(1, this.relationPar.id)
- this.gain(this.relationPar)
- }
- },
- onEditorFocus() {
- this.onEditorBlur()
- },
- // 获得焦点时触发
- onEditorBlur(){
- let theEle = this.$refs.text; // 获取元素
- if(!theEle.value) {
- return
- }
- var img = theEle.value.match(/<img[^>]+>/g); // 赛选 img 标签
- var arrImg = ''
- for (var j = 0; j < img.length; j++) {
- // 正则匹配,摘出img标签下的src里的内容,即capture
- img[j].replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
- arrImg += capture
- });
- }
- // 原来的字符流大小,单位为字节
- var strLen = arrImg.length;
- // 计算后得到的文件流大小,单位为字节
- var fileSize=parseInt(strLen-(strLen/8)*2);
- var size = "";
- size = (fileSize/1024/1024).toFixed(2);
- if (size > 2){
- this.textContent = false
- this.$message({
- showClose: true,
- message: this.$t('imageexceeds2MBpleaseuploaditagain'),
- type: 'warning'
- });
- }
- this.textContent = true
- },
- //删除当前编辑的任务
- deleteTask() {
- var warning='';
- if (this.addForm.subTaskList.length > 0) {
- warning=this.$t('currenttaskanditssubtasks');
- } else {
- warning=this.$t('wanttodeletethecurrent task');
- }
- this.$confirm(warning, this.$t('other.prompts'), {
- //type: 'warning'
- }).then(() => {
- this.http.post('/task/delete',{id: this.addForm.id},
- res => {
- if (res.code == "ok") {
- this.$emit('closeBounced', {deleteTask: true})
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- });
- },
- addprogress(){ // 添加子任务进展事件
- this.$refs.proBox.style.display="block"
- this.$refs.addPro.style.display="none"
- },
- shutPro() { // 关闭任务进展
- this.$refs.addPro.style.display="block"
- this.$refs.addRem.style.display="none"
- this.$refs.proBox.style.display="none"
- },
- //创建任务进展
- addTaskProgress() {
- var param = {
- taskId: this.taskIid,
- status: this.radio,
- content: this.text2,
- participatorIds: this.checkLists.toString()
- };
- this.http.post('/task-progress/addProgress', param,
- res => {
- if (res.code == "ok") {
- this.shutPro()
- this.getTaskProgressList(this.taskIid)
- this.$message({
- message: this.$t('releasesuccess'),
- type: "success"
- });
- this.checkboxGrounp = [],
- this.checkLists = [],
- this.text2 = '',
- this.radio = 0
- let obj = {
- id: this.taskIid
- }
- this.gain(obj)
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- }
- );
- },
- addI() { // 打开选择查看
- this.$refs.addRem.style.display="block"
- },
- selchg(){ //类型切换
- if(this.addForm.taskType == 1){
- this.timelabel = true
- if(!this.addForm.executorListFront[0].executorId) {
- console.log(this.currentProject)
- this.addForm.executorListFront[0].executorId = this.currentProject.inchargerId
- }
- }else{
- this.timelabel = false
- }
- },
- DateChange(){
- if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
- let stdate = Date.parse(this.addForm.startDate)
- let eddate = Date.parse(this.addForm.endDate)
- if(stdate <= eddate){
- let days = (eddate - stdate) / (1*24*60*60*1000) + 1
- for (let i=0;i<this.gstimday.length;i++) {
- this.gstimday[i] = days
- this.gstimhour[i] = days * this.user.timeType.allday
- }
- this.$forceUpdate()
- }
- // console.log("gstimday",this.gstimday);
-
- }
-
- },
- kkk(el){
- var k = this.checkLists.indexOf(el.id)
- if (k == -1) {
- this.checkLists.push(el.id)
- } else {
- this.checkLists.splice(k, 1)
- }
- },
- //删除任务进展
- deleteTaskProgress(id) {
- this.http.post('/task-progress/deleteProgress', {id: id},
- res => {
- if (res.code == "ok") {
- this.getTaskProgressList(this.taskIid)
- this.$message({
- message: this.$t('message.successfullyDeleted'),
- type: "success"
- });
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- }
- );
- },
- addRelation(){ //关联任务卡片
- this.relationvalue = []
- this.isRelationTab = true
- this.getrelation()
- },
- getrelation(){
- //获取选择关联列表
- this.http.post('/task/getTaskOnlyList',{
- projectId: this.curProjectId?this.curProjectId:this.addForm.projectId
- },
- res => {
- if (res.code == "ok") {
- this.relationdata = []
- res.data.forEach( (item) =>{
- if(item.taskType != 1){
- if (item.id != this.addForm.id) {
- this.relationdata.push(item)
- }
- }
- })
-
- // console.log('map',this.relationdata);
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- //显示子任务创建卡片
- addSubTask() {
- if(this.isRelationItem){return}
- this.addFormVisible = true;
- this.addForm = {parentTname: this.addForm.name,parentTid: this.addForm.id,projectId: this.addForm.projectId, groupId: this.addForm.groupId, taskLevel:0, planHours: 8, taskType: 0};
- // this.addForm.executorListFront = [{executorId:null, planHours:8}];
- this.addForm.executorListFront = [{executorId:null, planHours:8, serviceId: null}];
- this.addLoading = false;
- //创建子任务,非编辑状态
- this.isEditFile = false;
- // 触发外界子任务事件
- this.$emit('closeBounced', {addSubTask: true, addForms: this.addForm})
- },
- // 关联任务点击事件
- relationTaskClick(row,column,event){
- // console.log('relationTaskClick',row);
- this.relationPar = JSON.parse(JSON.stringify(this.addForm))
- // console.log(this.relationPar);
- this.addFormVisible = true;
- this.addLoading = false;
- this.isRelationItem = true;
- this.isEditFile = true;
- this.title = this.$t('editingtasks');
- this.getTaskDetail(row.taskId);
- // this.getUsers();
- this.gain(row,1);
- this.getRelationTaskList(1, row.taskId)
- this.getTaskFileList(1,row.taskId)
- },
- // 解除关联
- deleteRelationItem(eid){
- this.listLoading = true
- this.http.post('/task/removeMileStoneTask',{
- id: eid
- },res => {
- if(res.code == 'ok') {
- this.getRelationTaskList()
- this.listLoading = false
- this.$message({
- message: this.$t('jie-chu-cheng-gong'),
- type: 'success'
- })
- }else {
- this.listLoading = false
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },error => {
- this.listLoading = false
- this.$message({
- message: error,
- type: 'error'
- })
- })
- },
- // 关联任务列表是否完成修改
- relationFinishTask(row){
- this.http.post('/task/finish',{
- id: row.taskId,
- taskStatus: row.taskStatus
- },res => {
- if(res.code == 'ok'){
- // if(this.groupType == 0){
- // this.getStageList();
- // }else {
- // this.getViewTaskList();
- let obj = {
- submitInsert: true
- }
- this.$emit('closeBounced', obj)
- // }
- }else{
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },error => {
- this.$message({
- message: error,
- type: 'error'
- })
- })
- },
- finishTask(task) {
- this.http.post('/task/finish',{id: task.id, taskStatus: task.taskStatus},
- res => {
- if (res.code == "ok") {
- // if (this.groupType == 0) {
- // this.getStageList();
- // } else {
- // this.getViewTaskList();
- // }
- let obj = {
- submitInsert: true
- }
- this.$emit('closeBounced', obj)
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- });
- },
- // 关联文件按钮
- relationFileClick(){
- this.relationFileDialog = true
- this.addFileId = null
- this.getProjectFileList()
- },
- // 获取项目下的文档列表
- getProjectFileList(){
- this.http.post('/task-files/getDocumentList',{
- projectId: this.curProjectId
- },res => {
- if(res.code == 'ok'){
- this.projectFileList = res.data
- console.log('list',res.data);
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },error => {
- this.$message({
- message: error,
- type: 'error'
- })
- })
- },
- // 列表的删除按钮
- taskFileDelete(eid){
- this.$confirm(this.$t('shiFouYiChuCiWenJian'), this.$t('other.prompts'), {
- confirmButtonText: this.$t('btn.determine'),
- cancelButtonText: this.$t('btn.cancel'),
- type: 'warning'
- }).then(()=>{
- this.http.post('/task-files/delete',{
- id: eid
- },res => {
- if(res.code == 'ok'){
- this.$message({
- message: res.data,
- type: 'success'
- })
- this.getTaskFileList()
- this.gain({ taskId: this.taskId }, 1)
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },error => {
- this.$message({
- message: error,
- type: 'error'
- })
- })
- }).catch(()=>{
- this.$message({
- message: this.$t('thedeletionhasbeencancelled'),
- type: 'info'
- })
- })
- },
- showReasonForRejection(item) {
- const taskId = this.taskId
- const {id} = item
- this.http.post('/task/getFileRejectReason',{
- taskId
- },res => {
- if(res.code == 'ok'){
- let text = res.data.find(item => item.id == id)
- console.log(text)
- this.$alert(text.fileRejectReason, '驳回原因');
- }else {
- this.$message.error(res.msg)
- }
- },error => { this.$message.error(error) })
- },
- // 确认关联文件
- addTaskFile(){
- if(this.addFileId == null){
- this.$message({message: this.$t('xuanzguanlianwenjian') , type: 'warning'})
- return
- }
- this.http.post('/task-files/addDocumentRef',{
- documentId: this.addFileId,
- taskId: this.addForm.id,
- projectId: this.curProjectId
- },res => {
- if(res.code == 'ok'){
- this.$message({
- message: this.$t('guan-lian-cheng-gong'),
- type: 'success'
- })
- this.relationFileDialog = false
- this.getTaskFileList()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },error => {
- this.$message({
- message: error,
- type: 'error'
- })
- })
- },
- addRelationTask(){ //添加关联任务
- this.http.post('/task/addMileStoneTask',{
- milestoneId: this.addForm.id,
- taskIds: JSON.stringify(this.relationvalue)
- },
- res =>{
- if(res.code == "ok") {
- this.isRelationTab = false
- this.$message({
- message: this.$t('addsuccessful'),
- type: 'success'
- })
- this.getRelationTaskList()
- this.$forceUpdate()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },
- error => {
- this.$message({
- message: error,
- type: 'error'
- })
- })
- },
- backToParentTask() {
- // this.getTaskDetail(this.addForm.parentTid);
- this.getTaskDetail(this.timelabel ? this.relationPar.id : this.addForm.parentTid);
- this.isEditFile = true;
- if(this.timelabel){
- this.isRelationItem = false
- // this.relationPar = {name: ''}
- this.getRelationTaskList(1, this.relationPar.id)
- this.gain(this.relationPar)
- }
- },
- // 点击评论发布
- release() {
- if(this.textarea2.length <= 0) return this.$message({message: this.$t('pleaseentercontent'), type: "error"})
- this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
- res => {
- if(res.code == "ok"){
- if(res.data.content.indexOf('$userName=') != '-1') {
- let obj = {
- msg1: res.data.content.split('$')[0],
- msg2: res.data.content.split('$')[1].split('=')[1],
- msg3: res.data.content.split('$')[2]
- }
- res.data.content = obj
- } else {
- if(this.user.userNameNeedTranslate == 1) {
- let obj = {
- msg1: res.data.content,
- msg2: '',
- msg3: ''
- }
- res.data.content = obj
- }
- }
- this.commentList.push(res.data)
- console.log(this.commentList, '值☞')
- this.sppk(this.commentList)
- let obj = {
- id: this.taskIid
- }
- this.gain(obj)
- this.textarea2 = ""
- // this.contRoll() // 滚动到底部
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- })
- },
- // 滚动到底部
- contRoll(){
- // this.$nextTick(() => {
- // this.$refs.main.scrollTop = this.$refs.contRoll.scrollHeight;
- // })
- this.$nextTick(() => {
- let scrollElem = this.$refs.main;
- scrollElem.scrollTo({ top: scrollElem.scrollHeight});
- });
- console.log('最后执行')
- },
- sss(){
- this.$refs.addRem.style.display="none"
- },
- taskLineClick(row, column, event) {
- if(this.isRelationItem){return}
- this.mileageCup = true
- if(row.taskType == 1){
- this.timelabel = true
- this.isRelationItem = false
- }else{
- this.timelabel = false
- }
- this.addFormVisible = true;
- this.isEditFile = true;
- this.addLoading = false;
- this.getTaskDetail(row.id);
- this.getTaskProgressList(row.id); // 获取任务进展列表
- // this.getUsers(); // 获取名单数据
- this.gain(row); // 获取评论列表
- this.getDailyList(row.id) // 获取来自日报
- this.getRelationTaskList(1, row.id)
- this.getTaskFileList(1,row.id)
- this.$emit('closeBounced', {taskLineClickAbs: true, items: row})
- },
- //获取SAP项目服务数据列表
- getSapServiceList(){
- this.http.post('/sap-project-service/sapServiceList', {},
- res => {
- if(res.code == "ok"){
- this.sapServiceList=res.data
- } else {
- this.$message({
- message: res.msg,
- type: "error"
- });
- }
- },
- error => {
- this.$message({
- message: error,
- type: "error"
- });
- })
- },
- // 列表的上传按钮
- uploadFileClick(item){
- console.log("upload",item.file);
- let files = new FormData()
- files.append("projectId",this.curProjectId);
- files.append("taskId", this.addForm.id);
- files.append("file", item.file);
- this.http.uploadFile('/task-files/uploadFile', files,
- res => {
- if(res.code == 'ok'){
- console.log(res);
- this.$message({
- message: this.$t('yi-shang-chuan'),
- type: 'success'
- })
- this.gain({ taskId: this.taskId }, 1)
- this.getTaskFileList()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },error => {
- this.$message({
- message: error,
- type: 'error'
- })
- })
- },
- uploadFileClickTwo(item, row) {
- let files = new FormData()
- files.append("projectId",this.curProjectId);
- files.append("taskId", this.addForm.id);
- files.append("taskFileId", row.id);
- files.append("file", item.file);
- this.http.uploadFile('/task-files/reUploadFile', files,
- res => {
- if(res.code == 'ok'){
- console.log(res);
- this.$message({
- message: this.$t('yi-shang-chuan'),
- type: 'success'
- })
- this.gain({ taskId: this.taskId }, 1)
- this.getTaskFileList()
- }else {
- this.$message({
- message: res.msg,
- type: 'error'
- })
- }
- },error => {
- this.$message({
- message: error,
- type: 'error'
- })
- })
- }
- },
- };
- </script>
- <style lang="scss" scoped>
- @import "../assets/scss/handle";
- .themeFontColor {
- @include font_color("color");
- }
- .editingTask {
- display: flex;
- flex-wrap: wrap;
- }
- .carts .commentSpan {
- float: none;
- display: block;
- margin-top: 0;
- font-size: 14px;
- span {
- float: none;
- display: inline-block;
- margin-top: 0;
- font-size: 14px;
- }
- }
- .foooot {
- padding: 10px 20px 20px;
- text-align: right;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- }
- .Daily p {
- margin: 0 !important;
- padding: 0 0 10px 0 !important;
- }
- .sub-all {
- div {
- display: inline-block;
- padding: 0 20px;
- font-size: 20px;
- cursor: pointer;
- }
- .subOn {
- color: #66b1ff;
- }
- }
- .DailyBody {
- margin: 0 20px;
- }
- .Daily{
- height: 120%;
- overflow: auto;
- }
- .inputDeep {
- position: absolute;
- bottom: 85px;
- width: 95%;
- margin: 0 12px;
- }
- .inputDeep .el-textarea .el-textarea__inner{
- border: 0 !important;
- resize: none !important;
- }
- .inputDeeps .el-textarea__inner {
- border: 0 !important;
- resize: none !important;
- }
- .scop_span {
- display: inline-block;
- padding: 2px 5px;
- }
- .counli {
- em {
- font-style: normal;
- display: inline-block;
- margin-left: 9%;
- }
- span {
- float: right;
- }
- }
- .carts {
- position: relative;
- .el-image{
- border-radius: 50%;
- float: left;
- width: 20%;
- }
- i {
- width: 30px;
- height: 30px;
- // background: #778899;
- display: inline-block;
- float: left;
- border-radius:50%;
- font-style:normal;
- font-size: 12px;
- line-height: 30px;
- text-align: center;
- color: #fff;
- background: #778899;
- overflow: hidden;
- direction: rtl;
- }
- div {
- text-align: left;
- p {
- text-align: left;
- margin-left: 10px;
- margin-left: 13%;
- }
- em {
- display: block;
- font-style: normal;
- margin-left: 13%;
- }
- }
- span {
- font-size: 10px;
- float: right;
- margin-top: -40px;
- }
- }
- .issue {
- // height: 20%;
- // position: relative;
- // z-index: 4;
- .zh{
- position: relative;
- width: 100%;
- height: 100%;
- }
- .textareays {
- background: #000;
- height: 140px;
- border: 0;
- .el-textarea__inner {
- height: 85%;
- }
- }
- .issue-button {
- position: absolute;
- bottom: 20px;
- right: 20px;
- }
- }
- .inputDeep {
- position: absolute;
- bottom: 85px;
- width: 95%;
- margin: 0 12px;
- }
- .inputDeep .el-textarea .el-textarea__inner{
- border: 0 !important;
- resize: none !important;
- }
- .inputDeeps .el-textarea__inner {
- border: 0 !important;
- resize: none !important;
- }
- .scop_span {
- display: inline-block;
- padding: 2px 5px;
- }
- .container {
- position: relative;
- overflow-y: scroll;
- }
- .list {
- position: absolute;
- top: 0;
- width: 100%;
- }
- .reviewerClass {
- display: flex;
- align-items: center;
- margin-right: 20px;
- .reviewerTitles {
- margin-right: 10px;
- }
- }
- </style>
|