projectInside.vue 162 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621
  1. <template>
  2. <section class="sectionaa">
  3. <el-tabs v-model="activeName" @tab-click="handleClick">
  4. <el-tab-pane label="主要内容" name="project" @click="null" disabled=true>
  5. <template slot="label">
  6. <i type="default" size="mini" class="el-icon-arrow-left" @click="toList" style="margin-left:10px;cursor:pointer;"></i>
  7. <el-select v-model="curProjectId" size="mini" class="projectCls" @change="onProjectChange" filterable>
  8. <el-option v-for="item in projectList" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
  9. <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
  10. <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
  11. </el-option>
  12. </el-select>
  13. <el-dropdown trigger="click" style="margin-right:30px;color:#262626;cursor:pointer;">
  14. <i class="iconfont firerock-iconcaidan" ></i>
  15. <el-dropdown-menu slot="dropdown">
  16. <el-dropdown-item v-if="currentProject.status == 1" @click.native="finishPro()">
  17. <i class="iconfont firerock-iconwancheng"></i>完成项目
  18. </el-dropdown-item>
  19. <el-dropdown-item divided v-if="currentProject.status == 1" @click.native="cancelPro()">
  20. <i class="el-icon-refresh-left"></i>撤销项目
  21. </el-dropdown-item>
  22. <el-dropdown-item v-if="currentProject.status == 2 || currentProject.status == 3" @click.native="startPro()">
  23. <i class="iconfont firerock-iconqidong"></i>重启项目
  24. </el-dropdown-item>
  25. </el-dropdown-menu>
  26. </el-dropdown>
  27. </template>
  28. </el-tab-pane>
  29. <el-tab-pane label="任务看板" name="projectInside">
  30. <el-container style="padding: 0px;">
  31. <el-aside :style="'overflow:auto;padding-left:10px;padding-right:5px;height:'+tableHeight+'px;width:'+groupWidth+'px;'">
  32. <el-input v-model="groupSearch" size="small" placeholder="搜索分组" @input="startSearchGroup" style="margin-top:10px"/>
  33. <p ><span class="heavyTxt">任务分组</span> <i class="el-icon-plus pull-right" style="color:#666;margin-right:10px;" @click="createGroup" v-if="projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement"></i></p>
  34. <el-menu :default-active="defaultGroupId" ref="defaultMenu" class="el-menu-vertical-demo" @select="groupChange" style="border-right:none;">
  35. <el-menu-item :index="item.id" v-for="item in groupList" :key="item.id" class="group_style">
  36. <div slot="title">
  37. <!-- <span class="taskGroupClass">{{item.name}}</span> -->
  38. <div style="display: inline-block;">
  39. <el-tooltip effect="dark" :content="item.name" placement="top" v-if="item.name.length > 12">
  40. <span class="taskGroupClass">{{item.name}}</span>
  41. </el-tooltip>
  42. <span class="taskGroupClass" v-else>{{item.name}}</span>
  43. </div>
  44. <!-- <el-button size="mini" @click="test(item)">test</el-button> -->
  45. <el-dropdown trigger="click" style="float:right;margin-right:-10px;" :disabled="!(user.id == item.inchargerId || user.id == projectCreatorId || user.id == projectInchargerId || permissions.projectManagement)">
  46. <i class="iconfont firerock-iconcaidan" ></i>
  47. <el-dropdown-menu slot="dropdown">
  48. <el-dropdown-item @click.native="copyGroup(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement)">
  49. <i class="el-icon-document-copy"></i>
  50. 复制分组</el-dropdown-item>
  51. <el-dropdown-item divided @click.native="renameGroup(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement)">
  52. <i class="el-icon-edit"></i>
  53. 修改组名</el-dropdown-item>
  54. <el-dropdown-item divided @click.native="addToTemplate(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement)">
  55. <i class="el-icon-plus"></i>
  56. 设为模板</el-dropdown-item>
  57. <el-dropdown-item divided @click.native="editIncharger(item)"
  58. :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement)">
  59. <i class="el-icon-user"></i>
  60. 设负责人</el-dropdown-item>
  61. <el-dropdown-item divided @click.native="setupParticipants(item)"
  62. :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || item.inchargerId == user.id || permissions.projectManagement)">
  63. <i class="iconfont firerock-iconusers"></i>
  64. 设参与人</el-dropdown-item>
  65. <el-dropdown-item divided @click.native="deleteGroup(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement)">
  66. <i class="el-icon-delete"></i>
  67. 删除分组</el-dropdown-item>
  68. <!-- 设置参与人 0000 -->
  69. <el-dropdown-item divided @click.native="getGroupDetails(item)">
  70. <i class="el-icon-tickets"></i>
  71. 分组详情</el-dropdown-item>
  72. </el-dropdown-menu>
  73. </el-dropdown>
  74. </div>
  75. </el-menu-item>
  76. </el-menu>
  77. <!--视图 -->
  78. <p ><span class="heavyTxt">视图</span></p>
  79. <el-menu :default-active="1" class="el-menu-vertical-demo" @select="viewChange" style="border-right:none;">
  80. <el-menu-item :index="item.id" v-for="item in viewList" :key="item.id" class="group_style">
  81. <div slot="title">
  82. <span >{{item.name}}</span>
  83. </div>
  84. </el-menu-item>
  85. </el-menu>
  86. </el-aside>
  87. <!-- 分组详情 -->
  88. <el-dialog :title="groupDetailTil" :visible.sync="groupDetailsShow" width="500px" :before-close="handleClose">
  89. <div>
  90. <el-form label-width="80px">
  91. <el-form-item label="负责人:">
  92. {{groupDetailData.incharger}}
  93. </el-form-item>
  94. <el-form-item label="参与人:">
  95. <span v-for="(item, index) in groupDetailData.participators" :key="index">
  96. {{item.userName}} <span v-if="index < groupDetailData.participators.length - 1">、</span>
  97. </span>
  98. </el-form-item>
  99. </el-form>
  100. </div>
  101. <span slot="footer" class="dialog-footer">
  102. <el-button type="primary" @click="groupDetailsShow = false">确 定</el-button>
  103. </span>
  104. </el-dialog>
  105. <span :style="'background:#f0f0f0;width:1px;height:'+tableHeight+'px;'" @click="toggleGroup">
  106. </span>
  107. <!-- <span :style="'width:10px;height:'+tableHeight+'px;float:left;text-align:center;vertical-align:middle;'" @click="toggleGroup">
  108. <span :style="'width:1px;background:#20A0FF;height:'+tableHeight+'px;float:left;'"></span>
  109. <i class="el-icon-d-arrow-left" ></i>
  110. </span> -->
  111. <!-- 增加侧边栏的点击效果 -->
  112. <div class="sidebar" @click="retract()">
  113. <div class="etui">
  114. <i class="el-icon-arrow-left" ref="box"></i>
  115. </div>
  116. </div>
  117. <!-- 增加侧边栏的点击效果 -->
  118. <el-main style="background:#f7f7f7;padding:0px;position: relative;">
  119. <el-row style="color:#999;margin-top:10px;padding: 0px 10px;" :gutter="10">
  120. <el-col :span="12">
  121. <el-link @click="toggleGroup"><i v-if="selectedGroup != null" :class="groupWidth==0?'el-icon-d-arrow-right':'el-icon-d-arrow-left'" style="margin-top:10px;">{{selectedGroup.name}}</i></el-link>
  122. </el-col>
  123. <el-col :span="8" style="float:right;width:380px">
  124. <el-select v-model="order" size="small" style="background:#fff;display:inline-block;" @change="orderChange">
  125. <el-option v-for="item in orderList" :key="item.id" :label="item.name" :value="item.id">
  126. <span>{{item.name}}</span>
  127. </el-option>
  128. </el-select>
  129. <el-button icon="iconfont firerock-icondaochu" style="margin-left:10px" size="mini" @click="showExportDialog">导出</el-button>
  130. <el-button icon="iconfont firerock-icondaoru" size="mini" @click="importTaskDialog = true;importToStageId = stageList[0].id;">导入</el-button>
  131. </el-col>
  132. </el-row>
  133. <!-- <div style="color:#999;margin-top:10px;">
  134. <i v-if="selectedGroup != null" class="el-icon-arrow-left" style="margin-top:10px;">{{selectedGroup.name}}</i>
  135. </div> -->
  136. <div v-if="!displayTable">
  137. <div style="width: 100%;overflow-x: auto;">
  138. <draggable style="white-space:nowrap;" @update="onMoveStage"
  139. v-model="stageList" group="stage" @start="stageDrag=true" @end="stageDrag=false;" draggable=".taskStage" >
  140. <!--每个阶段的拖拽 -->
  141. <!-- <transition-group > -->
  142. <v-flex class="taskStage" v-for="stage in stageList" :key="stage.id" :style="'height:'+stageListHeight+'px;'">
  143. <div :id="stage.id"
  144. class="taskList" >
  145. <!--头部显示阶段名称,操作 -->
  146. <div slot="header" style="margin:10px 0px;cursor:move;width:300px" role="task">
  147. <span class="stage">{{stage.stagesName}}</span><span style="margin-left:10px;color:#303133;font-size:12px;">{{stage.taskList.length}}</span>
  148. <!-- <i class="el-icon-more" style="float:right;"></i> -->
  149. <el-dropdown trigger="click" style="float:right;cursor:pointer;">
  150. <i class="el-icon-more" ></i>
  151. <el-dropdown-menu slot="dropdown">
  152. <el-dropdown-item @click.native="addTask(stage)">
  153. <i class="el-icon-document-add"></i>
  154. 创建任务</el-dropdown-item>
  155. <el-dropdown-item @click.native="renameStage(stage)">
  156. <i class="el-icon-edit"></i>
  157. 重命名列表</el-dropdown-item>
  158. <el-dropdown-item divided @click.native="deleteStage(stage)">
  159. <i class="el-icon-delete"></i>删除列表</el-dropdown-item>
  160. </el-dropdown-menu>
  161. </el-dropdown>
  162. </div>
  163. <draggable class="taskListin" :style="'max-height:' + taskListinH + 'px;'" @start="drag=true" @end="drag=false" draggable=".taskCard" ghostClass="ghost" @update="onChange" @add="onChange" group="task1" :id="stage.id">
  164. <div v-for="element in stage.taskList" :id="element.id" :key="element.id" class="taskCard" ref="tasks" @click="editTask(element)" :style="element.taskStatus==0?'':'background:#eFeFeF;'">
  165. <!--任务卡片内容显示 -->
  166. <div>
  167. <div v-if="element.taskLevel == 2" class="taskImg hong"><img src="../../assets/image/hong.png" alt=""></div>
  168. <div v-if="element.taskLevel == 1" class="taskImg huang"><img src="../../assets/image/huang.png" alt=""></div>
  169. <div v-if="element.taskLevel == 0" class="taskImg hui"><img src="../../assets/image/hui.png" alt=""></div>
  170. <el-checkbox :disabled="element.taskStatus==2 || element.subTaskList.length > element.subTaskFinishNum" :checked="element.taskStatus==1?true:false" size="large" class="cb"
  171. @change="finishTask(element)"
  172. @click.stop.native=""
  173. ></el-checkbox>
  174. <el-tooltip class="item" effect="dark" :content="element.name" placement="top">
  175. <label class="task_name" :style="'background:'+(element.taskStatus==0?'#ffffff;':'#eFeFeF;')"><span>{{element.name}}</span></label>
  176. </el-tooltip>
  177. <i :class="taskTypeIcon[element.taskType]" :style="'float:right;color:'+taskTypeColor[element.taskType]+';margin-right:8px;margin-top:8px;'" ></i>
  178. </div>
  179. <div style="margin: 10px 0px;color:#666;" @click="timess(element.endDate)">
  180. <span v-if="element.endDate >= times || element.taskStatus == 1"><i v-if="element.endDate != null" class="el-icon-date" style="margin-left:5px">&nbsp;&nbsp;{{element.endDate}}</i></span>
  181. <span v-else><em v-if="element.endDate != null" style="display: inline-block;padding:3px 5px"><i v-if="element.endDate != null" class="el-icon-date"><span class="element_span"> &nbsp;&nbsp;{{element.endDate}} 截止</span></i></em></span>
  182. <span v-if="element.executorName">
  183. <span v-for="(exeItem, exeIndex) in element.executorName.split(',')" :key="exeIndex" :style="element.executorColor ? 'background:' + element.executorColor.split(',')[exeIndex] : ''" class="user_name_icon">{{exeItem.length>2?exeItem.substring(exeItem.length-2, exeItem.length):exeItem}}</span>
  184. </span>
  185. <el-button v-if="!element.executorName" type="primary" @click.stop.native="addAsMyTask(element)" size="mini" style="float:right;width:38px;padding:5px;position: absolute;z-index: 5;right: 5px;">认领</el-button>
  186. </div>
  187. <!--子任务 -->
  188. <div v-if="element.subTaskList.length > 0" class="taskCardCircleBox">
  189. <el-progress type="circle" :percentage="(element.subTaskFinishNum/element.subTaskList.length) * 100" width="16" :show-text="false" stroke-linecap="butt" stroke-width="8"></el-progress><span style="margin-left:5px;font-size:12px;">{{element.subTaskFinishNum}}/{{element.subTaskList.length}}</span>
  190. </div>
  191. <!-- <div v-if="element.taskType == 1 && element.refTaskList != null">
  192. <el-tooltip class="item" effect="dark" content="查看关联任务" placement="top">
  193. <el-link class="sub_task_num" @click.stop.native="showSubTaskList(element)"><i class="iconfont firerock-icontree" ></i><span style="margin-left:5px;">{{element.finishRefTaskCount}}/{{element.refTaskList.length}}</span></el-link>
  194. </el-tooltip>
  195. </div> -->
  196. <div v-if="element.taskType == 1 && !(element.refTaskList == null || element.refTaskList.length == 0)" class="taskCardCircleBox">
  197. <el-progress type="circle" :percentage="(element.finishRefTaskCount/(element.refTaskList ? element.refTaskList.length : 0)) * 100" width="16" :show-text="false" stroke-linecap="butt" stroke-width="8"></el-progress>
  198. <span style="margin-left:5px;font-size:12px">{{element.finishRefTaskCount}}/{{(element.refTaskList ? element.refTaskList.length : 0)}}</span>
  199. </div>
  200. </div>
  201. </draggable>
  202. <el-button v-if="canAddTask" slot="footer" role="people" @click="addTask(stage)" style="width:300px;" size="small" icon="el-icon-plus"></el-button>
  203. </div>
  204. </v-flex>
  205. <!-- </transition-group > -->
  206. <el-button slot="footer" v-if="selectedGroup != null" @click="addStage" class="taskList" icon="el-icon-plus" style="margin-top:30px;">新建任务列表</el-button>
  207. </draggable>
  208. </div>
  209. </div>
  210. <!--列表-->
  211. <el-table v-if="displayTable" :data="taskDataList"
  212. :header-cell-style="{'font-weight':'normal'}"
  213. highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  214. <el-table-column fixed label="完成" width="50">
  215. <template slot-scope="scope">
  216. <el-checkbox :disabled="scope.row.taskStatus==2" v-model="scope.row.isFinish" size="large" class="cb"
  217. @change="finishTask(scope.row)"
  218. @click.stop.native=""
  219. ></el-checkbox>
  220. </template>
  221. </el-table-column>
  222. <el-table-column prop="name" fixed label="标题" width="250">
  223. <template slot-scope="scope">
  224. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  225. <span class="single_line" > {{scope.row.name}}</span>
  226. </el-tooltip>
  227. </template>
  228. </el-table-column>
  229. <el-table-column prop="taskType" label="任务类型" width="100">
  230. <template slot-scope="scope">
  231. {{taskTypeList[scope.row.taskType].name}}
  232. </template>
  233. </el-table-column>
  234. <el-table-column prop="taskStatus" label="任务状态" width="100" >
  235. <template slot-scope="scope">
  236. {{taskStatusList[scope.row.taskStatus]}}
  237. </template>
  238. </el-table-column>
  239. <el-table-column prop="parentName" label="父任务" width="250">
  240. <template slot-scope="scope">
  241. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;"> {{scope.row.parentTname}}</span>
  242. </template>
  243. </el-table-column>
  244. <el-table-column prop="stagesName" label="任务列表" width="100" >
  245. </el-table-column>
  246. <el-table-column prop="executorName" label="执行人" width="100" >
  247. <template slot-scope="scope">
  248. {{scope.row.executorName == null?"待分配":scope.row.executorName}}
  249. </template>
  250. </el-table-column>
  251. <!-- <el-table-column prop="endDate" label="截止时间" width="100" ></el-table-column> -->
  252. <el-table-column prop="startDate" label="开始时间" width="100" >
  253. <template slot-scope="scope">
  254. <!-- <p v-if="scope.row.startDate >= times || scope.row.taskStatus != 0">{{scope.row.startDate}}</p>
  255. <p style="border-radius: 3px; text-align: center;background: #e62412; color: #fff;" v-else><span>{{scope.row.startDate}}</span></p> -->
  256. <p>{{scope.row.startDate}}</p>
  257. </template>
  258. </el-table-column>
  259. <el-table-column prop="endDate" label="截止时间" width="100" >
  260. <template slot-scope="scope">
  261. <p v-if="scope.row.endDate >= times || scope.row.taskStatus != 0">{{scope.row.endDate}}</p>
  262. <p style="border-radius: 3px; text-align: center;background: #e62412; color: #fff;" v-else><span>{{scope.row.endDate}}</span></p>
  263. </template>
  264. </el-table-column>
  265. <el-table-column prop="createDate" label="创建时间" width="100" ></el-table-column>
  266. <el-table-column prop="taskLevel" label="优先级" width="100" >
  267. <template slot-scope="scope">
  268. {{importanceList[scope.row.taskLevel].name}}
  269. </template>
  270. </el-table-column>
  271. </el-table>
  272. </el-main>
  273. </el-container>
  274. </el-tab-pane>
  275. <el-tab-pane label="文件中心" name="files"><FileCenter ref="fileCenter"></FileCenter></el-tab-pane>
  276. <el-tab-pane label="项目概览" name="info"><ProjectInfo ref="projectInfo" @basecost-change="changeBase"></ProjectInfo></el-tab-pane>
  277. <el-tab-pane label="数据统计" name="summary"><Summary ref="summary"></Summary></el-tab-pane>
  278. <el-tab-pane label="成本管理" name="costbaseline" v-if="permissions.projectBaseline"><CostBaseline ref="costbaseline"></CostBaseline></el-tab-pane>
  279. <el-tab-pane label="挣值分析" name="earning" v-if="user.id == currentProject.creator || user.id == currentProject.incharger_id ||permissions.projectBaseline"><Earning ref="earning"></Earning></el-tab-pane>
  280. </el-tabs>
  281. <!-- 设置参与人员界面 -->
  282. <el-dialog title="选择参与人员" v-if="participantsDialog" :visible.sync="participantsDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  283. <div class="tree" style="height:400px">
  284. <el-scrollbar style="height:100%">
  285. <el-input
  286. placeholder="输入关键字进行过滤"
  287. v-model="participantsFilterText">
  288. </el-input>
  289. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  290. ref="chooseMembTree2" @check-change="onTreeItemChange" :default-checked-keys="alreadyPartArray"
  291. highlight-current :filter-node-method="filterNode"></el-tree>
  292. </el-scrollbar>
  293. </div>
  294. <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>
  295. <div slot="footer" class="dialog-footer">
  296. <el-button @click="participantsDialog = false">取消</el-button>
  297. <el-button type="primary" @click="setParticipants()">确定</el-button>
  298. </div>
  299. </el-dialog>
  300. <!--新增任务界面-->
  301. <el-dialog :class="addForm.id==null?'':'jm'" :title="title" v-if="addFormVisible" :visible.sync="addFormVisible"
  302. :close-on-click-modal="false" customClass="customWidth" width="800px" ref="addDialog">
  303. <!-- <div style="width: 200%;height:80%;position: absolute;right:-100%;top:0;background:#000;opacity: 0;" @click="sss"></div> -->
  304. <el-form ref="form1" :model="addForm" :rules="taskRules" label-width="100px">
  305. <!--子任务需要选择任务列表 -->
  306. <el-form-item label="任务列表" prop="stages" v-if="addForm.parentTid != null">
  307. <el-select v-model="addForm.stagesId" style="width:100%;" >
  308. <el-option v-for="item in stageList" :key="item.id" :label="item.stagesName" :value="item.id"></el-option>
  309. </el-select>
  310. </el-form-item>
  311. <el-form-item label="类型">
  312. <!-- <el-button @click="test">test</el-button> -->
  313. <!-- 0011 -->
  314. <!-- {{groupResponsibleId == user.id}} -->
  315. <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) && !(groupResponsibleId == user.id)" @change="selchg()">
  316. <el-option v-for="item in taskTypeList" :key="item.id" :label="item.name" :value="item.id">
  317. <i :class="item.icon" ></i>
  318. <span>{{item.name}}</span>
  319. </el-option>
  320. </el-select>
  321. </el-form-item>
  322. <el-form-item label="任务内容" prop="name">
  323. <el-input v-model="addForm.name" :maxlength="40" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" placeholder="请输入任务内容" clearable></el-input>
  324. </el-form-item>
  325. <!-- {{timelabel}}{{mileageCup}} -->
  326. <el-form-item :label="!timelabel ? '开始时间' : '截至时间'" prop="startDate">
  327. <el-date-picker v-model="addForm.startDate" type="date" style="width:40%;" value-format="yyyy-MM-dd"
  328. placeholder="请选择日期" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" @change="DateChange()" v-if="!timelabel"></el-date-picker>
  329. <span style="margin-left:30px;margin-right:10px;" v-if="!timelabel">截止时间</span>
  330. <el-date-picker style="width:40%;" v-model="addForm.endDate" type="date" value-format="yyyy-MM-dd"
  331. placeholder="请选择日期" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" @change="DateChange()"></el-date-picker>
  332. <span style="margin-left:30px;margin-right:10px;" v-if="timelabel && mileageCup">完成时间</span>
  333. <el-date-picker style="width:40%;" v-if="timelabel && mileageCup" v-model="addForm.finishDate" type="date" value-format="yyyy-MM-dd"
  334. placeholder="请选择日期" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" @change="DateChange()"></el-date-picker>
  335. </el-form-item>
  336. <div style="border: 1px solid #ddd;margin:5px 0;padding:5px 0;">
  337. <el-form-item :label="'执行人'+(index+1)" v-for="(executorItem, index) in addForm.executorListFront" :key="index">
  338. <el-select v-model="executorItem.executorId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" size="small" filterable clearable placeholder="请选择执行人" style="width:40%;" @change="$forceUpdate()">
  339. <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
  340. <span style="float: left">{{ item.name }}</span>
  341. <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
  342. </el-option>
  343. </el-select>
  344. <span style="margin-left:30px;margin-right:10px;">计划工时</span>
  345. <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" v-model="gstimday[index]" style="width:16%;" :min="1" :max="100" placeholder="请输入计划工作时长,单位天" @change="chggstim(0,index)"></el-input-number ><span style="margin-left:5px;">天</span>
  346. <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" v-model="gstimhour[index]" style="width:16%;" :min="1" :max="100" placeholder="请输入计划工作时长,单位小时" @change="chggstim(1,index)"></el-input-number ><span style="margin-left:5px;">小时</span>
  347. <!--移除执行人 -->
  348. <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id|| permissions.projectManagement || groupResponsibleId == user.id)" style="margin-left:5px" @click="removeExecutorLine(index)"></i>
  349. </el-form-item>
  350. <el-link type="primary" v-if="(((addForm.executorListFront == null || addForm.executorListFront.length<10) &&
  351. (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id || permissions.projectManagement)) ||
  352. groupResponsibleId == user.id)"
  353. style="margin-left:35px;" @click="addExecutorLine">添加执行人</el-link>
  354. </div>
  355. <el-form-item label="优先级">
  356. <el-select v-model="addForm.taskLevel" style="width:100%;" >
  357. <el-option v-for="item in importanceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  358. </el-select>
  359. </el-form-item>
  360. <!-- 富文本 -->
  361. <el-form-item label="详细描述" style="height: 200px">
  362. <!-- <Editor id="tinymce" v-model="tinymceHtml" :init="editorInit"></Editor> -->
  363. <!-- <el-input type="textarea" v-model="addForm.taskDesc" :rows="3"></el-input> -->
  364. <!-- <quill-edito v-model="addForm.taskDesc"></quill-edito> -->
  365. <quill-editor style="height: 150px" ref="text" v-model="addForm.taskDesc" class="myQuillEditor" :options="editorOption" @blur="onEditorBlur($event)" @focus="onEditorFocus($event)"/>
  366. </el-form-item>
  367. <!-- 富文本 -->
  368. <div v-if="addForm.id != null">
  369. <el-divider ></el-divider>
  370. <!-- 任务进展 -->
  371. <template v-if="!timelabel || isRelationItem">
  372. <p ><i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">任务进展</i>
  373. <span ref="addPro" style="display: block; float:right;"><el-link @click="addprogress">添加任务进展</el-link></span>
  374. </p>
  375. <!-- 任务进展展示 -->
  376. <div style="display: none;" ref="proBox" class="progress">
  377. <!-- <el-form :model="> -->
  378. <el-radio-group v-model="radio">
  379. <el-radio :label="0" class="rala1">状态正常</el-radio>
  380. <el-radio :label="1" class="rala2">存在风险</el-radio>
  381. <el-radio :label="2" class="rala3">进展逾期</el-radio>
  382. </el-radio-group>
  383. <el-input
  384. type="textarea"
  385. border="0"
  386. :autosize="{ minRows: 2, maxRows: 6}"
  387. placeholder="请输入详细进展描述"
  388. v-model.trim="text2"
  389. style="margin:10px 0 0 0">
  390. </el-input>
  391. <h4 style="font-weight: normal;">提醒谁查看:{{checkLists.length}}</h4>
  392. <i class="el-icon-circle-plus pron_i" style="font-size: 28px;color: #409EFF;" @click="addI(0)"></i>
  393. <div class="remind" ref="addRem" style="display: none">
  394. <el-checkbox-group v-model="checkboxGrounp" v-for="item in users" :key="item.id">
  395. <p><el-checkbox :label="item.name" @change="kkk(item)"></el-checkbox></p>
  396. </el-checkbox-group>
  397. </div>
  398. <div class="ssp" @click="sss"></div>
  399. <!-- </el-form> -->
  400. <div class="pro_btn">
  401. <el-button size="mini" @click="shutPro">取消</el-button>
  402. <el-button size="mini" type="primary" @click="addTaskProgress">发布</el-button>
  403. </div>
  404. </div>
  405. <div class="ddl" v-if="recentProgressInfo != null && recentProgressInfo.id != null">
  406. <div class="elCard" style="margin-bottom: 10px; height:" >
  407. <i class="el-icon-success" style="color: #43d14f;" v-if="recentProgressInfo.status == 0"></i>
  408. <i class="el-icon-success" style="color: #fd7624;" v-else-if="recentProgressInfo.status == 1"></i>
  409. <i class="el-icon-success" style="color: #fd4d47;" v-else></i>
  410. <span v-if="recentProgressInfo.status == 0">状态正常</span>
  411. <span v-else-if="recentProgressInfo.status == 1">状态正常</span>
  412. <span v-else>进展逾期</span>
  413. <el-dropdown trigger="click" style="float:right;cursor:pointer; float: right;">
  414. <i class="el-icon-more" ></i>
  415. <el-dropdown-menu slot="dropdown">
  416. <el-dropdown-item divided>
  417. <span @click="deleteTaskProgress(recentProgressInfo.id)"><i class="el-icon-delete"></i>删除列表</span></el-dropdown-item>
  418. </el-dropdown-menu>
  419. </el-dropdown>
  420. <div class="elCard_qu">{{recentProgressInfo.creatorName}}更新于{{recentProgressInfo.indate | relativeTime}}</div>
  421. <p style="padding-left: 20px;">{{recentProgressInfo.content}}</p>
  422. <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">查看历史记录</el-button></div>
  423. </div>
  424. </div>
  425. <!-- 任务列表没有数据的时候展示 -->
  426. <div class="nones" v-if="ProgressList.length <= 0">
  427. 暂无数据
  428. </div>
  429. <!-- 任务进展完整状态 -->
  430. <el-dialog title="提示" :visible.sync="innerVisibless" append-to-body width="500px">
  431. <div class="integrity">
  432. <h3 style="font-weight: normal;display: inline-block;margin: 0 0 20px 0;">任务进展:{{ProgressList.length}}</h3>
  433. <!-- <span class="write"><i class="el-icon-circle-plus"></i>填写进展</span> -->
  434. <el-divider></el-divider>
  435. <!-- -->
  436. <div class="block" style="height: 200px;">
  437. <el-timeline style="padding:20px 0 0 0;">
  438. <el-timeline-item
  439. v-for="(activity, index) in ProgressList"
  440. :key="index">
  441. <div class="tb">
  442. <span v-if="activity.status == 0" style="color: #43D14F" class="icon"></span>
  443. <span v-if="activity.status == 1" style="color: #FD7624" class="icon"></span>
  444. <span v-if="activity.status == 2" style="color: red" class="icon"></span>
  445. <div>
  446. <span v-if="activity.status == 0" style="color: #43D14F">状态正常</span>
  447. <span v-if="activity.status == 1" style="color: #FD7624">存在风险</span>
  448. <span v-if="activity.status == 2" style="color: red">进展逾期</span>
  449. <span style="display: inline-block; float: right; color: #8C8C8C">{{activity.indate | relativeTime}}</span>
  450. </div>
  451. <p style="color: #8C8C8C">{{activity.content}}</p>
  452. </div>
  453. </el-timeline-item>
  454. </el-timeline>
  455. </div>
  456. <!-- -->
  457. </div>
  458. <span slot="footer" class="dialog-footer">
  459. <el-button type="primary" @click="innerVisibless = false">关闭</el-button>
  460. </span>
  461. </el-dialog>
  462. </template>
  463. <!-- 子任务/关联任务 -->
  464. <p ><i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">{{timelabel && !isRelationItem ? '关联任务' : '子任务'}}</i>
  465. <el-link style="float:right;" @click="addRelation" v-if="timelabel && !isRelationItem">添加关联任务</el-link>
  466. <el-link style="float:right;" @click="addSubTask" v-else>添加子任务</el-link>
  467. </p>
  468. <!-- 关联任务列表 -->
  469. <el-table key="guanlian" :data="relationSubTaskList" v-if="timelabel && !isRelationItem"
  470. :header-cell-style="{'font-weight':'normal'}"
  471. highlight-current-row
  472. v-loading="listLoading"
  473. style="width: 100%;margin-top:10px;"
  474. @row-click="relationTaskClick">
  475. <el-table-column prop="taskStatus" label="完成" width="50" >
  476. <template slot-scope="scope">
  477. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb" @change="relationFinishTask(scope.row)" @click.stop.native=""></el-checkbox>
  478. </template>
  479. </el-table-column>
  480. <el-table-column prop="taskName" label="标题" >
  481. <template slot-scope="scope">
  482. <el-tooltip class="item" effect="dark" :content="scope.row.taskName" placement="top" style="cursor:pointer;color:#409eff;">
  483. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.taskName}}</span>
  484. </el-tooltip>
  485. </template>
  486. </el-table-column>
  487. <el-table-column label="操作" width="130" align="left">
  488. <template slot-scope="scope">
  489. <el-button @click.stop.native="deleteRelationItem(scope.row.id)" size="mini">解除关联</el-button>
  490. </template>
  491. </el-table-column>
  492. </el-table>
  493. <!--子任务列表 -->
  494. <el-table key="zi" :data="addForm.subTaskList" v-else
  495. :header-cell-style="{'font-weight':'normal'}"
  496. highlight-current-row v-loading="listLoading" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  497. <el-table-column prop="taskStatus" label="完成" width="50" >
  498. <template slot-scope="scope">
  499. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb"
  500. @click.stop.native=""
  501. @change="finishTask(scope.row)"
  502. ></el-checkbox>
  503. </template>
  504. </el-table-column>
  505. <el-table-column prop="name" label="标题" >
  506. <template slot-scope="scope">
  507. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  508. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.name}}</span>
  509. </el-tooltip>
  510. </template>
  511. </el-table-column>
  512. <el-table-column prop="executorName" label="执行人" width="100" >
  513. <template slot-scope="scope">
  514. {{scope.row.executorName == null?"待分配":scope.row.executorName}}
  515. </template>
  516. </el-table-column>
  517. <el-table-column prop="endDate" label="截止时间" width="100" >
  518. <template slot-scope="scope">
  519. <p v-if="scope.row.endDate >= times">{{scope.row.endDate}}</p>
  520. <p v-else style="background: #e62412; color: #fff;text-align: center; border-radius: 3px;">{{scope.row.endDate}}</p>
  521. </template>
  522. </el-table-column>
  523. </el-table>
  524. </div>
  525. </el-form>
  526. <!-- 关联文件列表 -->
  527. <template v-if="isEditFile">
  528. <div style="width:100%;margin:1em 0;">
  529. <i class="iconfont firerock-icontree" style="color:#20A0ff;margin-left:10px;">相关文件/交付成果</i>
  530. <el-link @click="relationFileClick()" style="float:right;margin-left:10px">关联文件</el-link>
  531. <el-upload style="float:right;" action="#" :http-request="uploadFileClick" :show-file-list="false" :multiple="false">
  532. <el-link>上传文件</el-link>
  533. </el-upload>
  534. </div>
  535. <el-table
  536. v-loading="fileListLoading"
  537. ref="filetable"
  538. :data="taskFileList"
  539. :header-cell-style="{'font-weight':'normal'}"
  540. highlight-current-row
  541. max-height="240"
  542. style="width: 100%;margin-top:10px;margin-bottom:15px">
  543. <el-table-column label="序号" prop="documentType" min-width="40" align="center">
  544. <template slot-scope="scope">
  545. <div>
  546. {{scope.$index + 1}}
  547. </div>
  548. </template>
  549. </el-table-column>
  550. <el-table-column label="文件名称" prop="documentName" min-width="180"></el-table-column>
  551. <el-table-column label="文件大小" prop="size" min-width="60" align="center"></el-table-column>
  552. <el-table-column label="创建人" prop="creatorName" min-width="60" align="center"></el-table-column>
  553. <el-table-column label="创建时间" prop="indate" min-width="120" align="center">
  554. <template slot-scope="scope">
  555. <span>{{scope.row.indate[0] + '-' + scope.row.indate[1] + '-' + scope.row.indate[2] + '\u0020\u0020' + scope.row.indate[3] + ':' + scope.row.indate[4] + ':' + scope.row.indate[5]}}</span>
  556. </template>
  557. </el-table-column>
  558. <el-table-column label="操作" min-width="90">
  559. <template slot-scope="scope">
  560. <el-link :href="scope.row.url" :download="scope.row.documentName" type="primary" style="margin-right:7px">下载</el-link>
  561. <el-link @click="taskFileDelete(scope.row.id)">删除</el-link>
  562. </template>
  563. </el-table-column>
  564. </el-table>
  565. </template>
  566. <!-- 关联文件dialog -->
  567. <el-dialog v-if="relationFileDialog" :visible.sync="relationFileDialog" title="关联文件" append-to-body>
  568. <span>从文件中心选择已有文件进行关联</span>
  569. <div>
  570. <span>选择文件</span>
  571. <el-select v-model="addFileId">
  572. <el-option
  573. v-for="item in projectFileList"
  574. :key="item.id"
  575. :label="item.documentName"
  576. :value="item.id"
  577. ></el-option>
  578. </el-select>
  579. <el-button @click="addTaskFile()">确定</el-button>
  580. <!-- <el-button @click="relationFileDialog = false">取消</el-button> -->
  581. </div>
  582. </el-dialog>
  583. <el-dialog v-if="isRelationTab" :visible.sync="isRelationTab" title="添加关联任务" width="800px" append-to-body>
  584. <el-form ref="relationItemForm" label-width="100px">
  585. <el-form-item label="选择任务" prop="taskType">
  586. <el-select v-model="relationvalue" multiple style="width:80%">
  587. <el-option
  588. v-for="item in relationdata"
  589. :key="item.id"
  590. :label="item.name"
  591. :value="item.id"
  592. ></el-option>
  593. </el-select>
  594. </el-form-item>
  595. </el-form>
  596. <div slot="footer" class="dialog-footer">
  597. <el-button @click="isRelationTab = false">取消</el-button>
  598. <el-button type="primary" @click="addRelationTask()">确认</el-button>
  599. </div>
  600. </el-dialog>
  601. <div slot="footer" class="dialog-footer">
  602. <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;">删除</el-button>
  603. <el-button @click.native="addFormVisible = false">取消</el-button>
  604. <el-button type="primary" @click="submitInsert" :loading="addLoading">提交</el-button>
  605. </div>
  606. <div slot="title" v-if="addForm.parentTid != null || isRelationItem" >
  607. <!-- <el-link @click="backToParentTask"><i class="el-icon-arrow-left single_line">返回父级任务</i> | {{addForm.parentTname}}</el-link> -->
  608. <el-page-header @back="backToParentTask" :title="timelabel ? '返回里程碑' : '返回父任务'" :content="timelabel ? relationPar.name : addForm.parentTname"></el-page-header>
  609. </div>
  610. <!-- 评论 -->
  611. <div class="remark" v-show="addForm.id != null">
  612. <span class="zh">
  613. <span v-for="(pl, i) in critic" :key="i">
  614. <div class="player" v-if="pl">
  615. <p>参与人</p>
  616. <div class="bj">
  617. <span style="background: #778899">{{pl.length > 2 ? pl.substring(pl.length - 2, pl.length) : pl}}</span>
  618. <!-- <span style="background: #778899">{{pl.length}}</span> -->
  619. </div>
  620. </div>
  621. </span>
  622. <div class="subject">
  623. <div class="sub-all">所有动态</div>
  624. <div class="sub-details" ref="main">
  625. <ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto" ref="contRoll">
  626. <div style="width: 100%" v-if="commentList.length <= 0">
  627. <img src="../../assets/image/xiao.png" alt="">
  628. </div>
  629. <li v-for="i in count" class="infinite-list-item counli" :key="i">
  630. <p><i class="el-icon-s-fold"></i> <em>屈经理完成了依赖任务</em><span>4月20日</span></p>
  631. </li>
  632. <li class="carts" v-for="item in commentList" :key="item.id">
  633. <!-- <el-image style="width: 30px; height: 30px" :src="url" :fit="fit"></el-image> -->
  634. <!-- <i :style="'background' + item.userColor"> -->
  635. <i :style="'background' + item.userColor">
  636. {{item.userName.length > 2 ? item.userName.substring(item.userName.length - 2, item.userName.length) : item.userName}}
  637. </i>
  638. <div>
  639. <!-- <p>{{item.userName}}</p> -->
  640. <p>{{item.userName}}</p>
  641. <em>{{item.content}}</em>
  642. </div>
  643. <span>{{item.createTime | relativeTime}}</span>
  644. </li>
  645. </ul>
  646. </div>
  647. </div>
  648. <div class="issue">
  649. <!-- <el-input type="textarea" class="textareays" label-width="100%" label-height="140px"></el-input> -->
  650. <div class="issue_fixation">
  651. <div class="inputDeep"><el-input
  652. type="textarea"
  653. placeholder="请输入内容"
  654. :autosize="{ minRows: 6, maxRows: 6}"
  655. v-model.trim="textarea2"
  656. class="inputDeeps"
  657. >
  658. </el-input></div>
  659. <el-button class="issue-button" type="primary" @click="release()">发布</el-button>
  660. </div>
  661. </div>
  662. </span>
  663. </div>
  664. <!-- 评论 -->
  665. </el-dialog>
  666. <!-- 子任务列表 -->
  667. <el-dialog :title="addForm.taskType == 1 ? '查看关联任务' : '查看子任务'" v-if="subTaskVisible" :visible.sync="subTaskVisible" :close-on-click-modal="false" customClass="customWidth" width="800px">
  668. <el-table :data="addForm.subTaskList"
  669. :header-cell-style="{'font-weight':'normal'}"
  670. highlight-current-row v-loading="listLoading" style="width: 100%;margin-top:10px;" @row-click="taskLineClick">
  671. <el-table-column prop="taskStatus" label="完成" width="50" >
  672. <template slot-scope="scope">
  673. <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb"
  674. @click.stop.native="finishTask(scope.row)"
  675. ></el-checkbox>
  676. </template>
  677. </el-table-column>
  678. <el-table-column prop="name" label="标题" >
  679. <template slot-scope="scope">
  680. <el-tooltip class="item" effect="dark" :content="scope.row.name" placement="top">
  681. <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.name}}</span>
  682. </el-tooltip>
  683. </template>
  684. </el-table-column>
  685. <el-table-column prop="executorName" label="执行人" width="100" >
  686. <template slot-scope="scope">
  687. {{scope.row.executorName == null?"待分配":scope.row.executorName}}
  688. </template>
  689. </el-table-column>
  690. <el-table-column prop="endDate" label="截止时间" width="100" ></el-table-column>
  691. </el-table>
  692. </el-dialog>
  693. <!--用户详细信息弹出框-->
  694. <el-dialog title="查看详情" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
  695. <div class="line"><span>姓名</span><span>{{userDetail.name}}</span></div>
  696. <div class="line"><span>工号</span><span>{{userDetail.jobNumber}}</span></div>
  697. <div class="line"><span>手机号码</span><span>{{userDetail.phone}}</span></div>
  698. <div class="line"><span>部门</span><span>{{userDetail.departmentName}}</span></div>
  699. <div class="line"><span>成本</span><span>{{userDetail.cost}}元/小时</span></div>
  700. <div slot="footer" class="dialog-footer">
  701. <el-button type="primary" @click="userDetailVisible = false" >确定</el-button>
  702. </div>
  703. </el-dialog>
  704. <!-- 新增任务分组弹出框 -->
  705. <el-dialog v-if="addGroupDialog" :visible.sync="addGroupDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  706. <div slot="title" >
  707. <el-tabs v-model="createGroupWay">
  708. <el-tab-pane label="新建分组" name="new">
  709. <el-form ref="formGrouping" :model="groupForm" :rules="formGrouping" style="margin-top:40px;">
  710. <el-form-item prop="name">
  711. <el-input v-model.trim="groupForm.name" placeholder="请输入分组名称" maxlength="50"
  712. show-word-limit clearable></el-input>
  713. </el-form-item>
  714. <el-button type="primary" @click="addGroup('formGrouping')" style="width:100%;" >创建</el-button>
  715. </el-form>
  716. </el-tab-pane>
  717. <el-tab-pane label="从模板创建" name="template">
  718. <el-card class="template_box" :style="t.selected?'border: 1px solid #409eff;':''" v-for="(t,tIndex) in groupTemplateList" :key="t.id" @click.native="choseTemplate(tIndex)">
  719. <div>
  720. <el-row >
  721. <el-col :span="22">
  722. <div><span>{{t.name}}</span>
  723. <el-link :underline="false" type="primary" style="color:#aaa;margin-left:10px;"
  724. @click="deleteTemplate(t)"><i class="el-icon-delete" v-show="t.isSystem == 0" ></i>
  725. </el-link>
  726. </div>
  727. <div style="margin-top:10px;">
  728. <span style="color:#8c8c8c;font-size:12px;" v-for="(s,index) in t.stagesList" :key="s.id">
  729. <i class="el-icon-arrow-right" v-if="index>0"></i>
  730. {{s.stagesName}}</span>
  731. </div>
  732. </el-col>
  733. <el-col :span="2">
  734. <i class="el-icon-check" v-show="t.selected" style="font-size:20px;color:#409eff;margin-top:12px;"></i>
  735. </el-col>
  736. </el-row>
  737. </div>
  738. </el-card>
  739. <el-button type="primary" @click="addTemplateGroup" style="width:100%;" >创建</el-button>
  740. </el-tab-pane>
  741. </el-tabs>
  742. </div>
  743. </el-dialog>
  744. <el-dialog title="设置任务分组负责人" v-if="setInchargerDialog" :visible.sync="setInchargerDialog" :close-on-click-modal="false" customClass="customWidth" width="300px">
  745. <el-form ref="formIncharger" :model="groupForm" :rules="rules" style="margin-top:10px;">
  746. <el-form-item prop="taskGpIncharge">
  747. <el-select v-model="groupForm.inchargerId" placeholder="请选择任务分组负责人" style="width:100%;" clearable filterable>
  748. <el-option v-for="item in joinMembList" :key="item.id" :value="item.id" :label="item.name"></el-option>
  749. </el-select>
  750. </el-form-item>
  751. </el-form>
  752. <div slot="footer" class="dialog-footer">
  753. <el-button type="primary" @click="saveGroupIncharger" style="width:100%;" >保存</el-button>
  754. </div>
  755. </el-dialog>
  756. <el-dialog title="修改任务分组" v-if="modGroupDialog" :visible.sync="modGroupDialog" :close-on-click-modal="false" customClass="customWidth" width="400px">
  757. <el-form ref="form2" :model="groupForm" :rules="rules" style="margin-top:10px;">
  758. <el-form-item prop="name">
  759. <el-input type="textarea" :rows="3" v-model="groupForm.name" placeholder="请输入分组名称" maxlength="50"
  760. show-word-limit clearable></el-input>
  761. </el-form-item>
  762. <!-- <el-form-item label="编号">
  763. <el-input v-model="groupForm.code" placeholder="请输入分组编号" maxlength="20"
  764. show-word-limit clearable></el-input>
  765. </el-form-item> -->
  766. </el-form>
  767. <div slot="footer" class="dialog-footer">
  768. <el-button type="primary" @click="addGroup('form2')" style="width:100%;" >保存</el-button>
  769. </div>
  770. </el-dialog>
  771. <el-dialog title="添加为模板" v-if="addToTmpDialog" :visible.sync="addToTmpDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  772. <el-form ref="formTmp" :model="templateForm" :rules="rules" style="margin-top:10px;">
  773. <el-form-item prop="name">
  774. <el-input v-model="templateForm.name" placeholder="请输入模板名称" maxlength="12"
  775. show-word-limit clearable></el-input>
  776. <div>
  777. <span style="margin-right:20px">同时保存</span>
  778. <el-checkbox v-model="templateForm.saveTask" label="任务"></el-checkbox>
  779. <el-checkbox v-model="templateForm.saveMileStone" label="里程碑"></el-checkbox>
  780. <el-checkbox v-model="templateForm.saveRisk" label="风险"></el-checkbox>
  781. </div>
  782. </el-form-item>
  783. </el-form>
  784. <div slot="footer" class="dialog-footer">
  785. <el-button type="primary" @click="createTemplate" style="width:100%;" :loading="saveTemplateLoading">存为模板</el-button>
  786. </div>
  787. </el-dialog>
  788. <!-- 新增任务列表弹出框 -->
  789. <el-dialog title="新增/修改任务列表" v-if="addStageDialog" :visible.sync="addStageDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  790. <el-form ref="form2" :model="stageForm" :rules="rules2" >
  791. <el-form-item prop="stagesName">
  792. <el-input v-model="stageForm.stagesName" placeholder="请输入任务列表名称" maxlength="60"
  793. show-word-limit clearable></el-input>
  794. </el-form-item>
  795. </el-form>
  796. <div slot="footer" class="dialog-footer">
  797. <el-button type="primary" @click="addStagePost" style="width:100%;" >保存</el-button>
  798. </div>
  799. </el-dialog>
  800. <!--导出数据条件选择 -->
  801. <el-dialog title="工作计划导出" v-if="exportDialog" :visible.sync="exportDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  802. <el-form ref="form3" >
  803. <el-form-item label="选择类型">
  804. <el-select v-model="exportTaskType" placeholder="全部类型" clearable style="width:350px;">
  805. <el-option label="任务" value="0"></el-option>
  806. <el-option label="里程碑" value="1"></el-option>
  807. <el-option label="风险" value="2"></el-option>
  808. </el-select>
  809. </el-form-item>
  810. </el-form>
  811. <div slot="footer" class="dialog-footer">
  812. <el-button type="primary" @click="exportTask" style="width:100%;" :loading="loadingExport">导出</el-button>
  813. </div>
  814. </el-dialog>
  815. <!--导入数据,下载模板 -->
  816. <el-dialog title="工作计划导入" v-if="importTaskDialog" :visible.sync="importTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  817. <el-form ref="form4" >
  818. <el-form-item label="1. 请先下载模板并填写后上传" >
  819. <el-link type="primary" :underline="false" href="./upload/项目任务导入模板.xlsx" download="项目任务导入模板.xlsx">项目任务模板下载</el-link>
  820. </el-form-item>
  821. <!-- <el-form-item label="2. 选择要导入的任务列表" v-if="false">
  822. <el-select v-model="importToStageId" placeholder="任务列表" style="width:350px;">
  823. <el-option v-for="item in stageList" :label="item.stagesName" :value="item.id" :key="item.id"></el-option>
  824. </el-select>
  825. </el-form-item> -->
  826. <div><span style="font-size:12px;color:#999;">如导入的任务属于多个列表,可在导入后拖拽来更改所属列表</span></div>
  827. </el-form>
  828. <div slot="footer" class="dialog-footer">
  829. <el-upload ref="upload" action="#" :limit="1" :http-request="importTask" :show-file-list="false">
  830. <el-button type="primary" :underline="false" style="width:100%;" :loading="loadingExport">上传文件</el-button>
  831. </el-upload>
  832. </div>
  833. </el-dialog>
  834. </section>
  835. </template>
  836. <script>
  837. import util from "../../common/js/util";
  838. import draggable from 'vuedraggable';
  839. import tinymce from 'tinymce/tinymce'
  840. import 'tinymce/themes/silver/theme'
  841. import 'tinymce/skins/ui/oxide/skin.css';
  842. import FileCenter from './fileCenter.vue';
  843. import ProjectInfo from './info.vue';
  844. import Summary from './summary.vue';
  845. import Earning from './earning.vue';
  846. import CostBaseline from './CostBaseline.vue'
  847. // import editor from '@tinymce/tinymce-vue'
  848. // 富文本样式
  849. import 'quill/dist/quill.core.css'
  850. import 'quill/dist/quill.snow.css'
  851. import 'quill/dist/quill.bubble.css'
  852. // 导入富文本
  853. import { quillEditor } from 'vue-quill-editor'
  854. import { error } from 'dingtalk-jsapi';
  855. import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
  856. let id=1;
  857. export default {
  858. name: "two-list-headerslots",
  859. display: "Two list header slot",
  860. order: 14,
  861. components: {
  862. draggable,
  863. // editor,
  864. FileCenter,
  865. ProjectInfo,
  866. Summary,
  867. CostBaseline,
  868. Earning,
  869. quillEditor // 富文本
  870. },
  871. data() {
  872. return {
  873. mileageCup: false,
  874. loadingExport : false,
  875. saveTemplateLoading: false,
  876. joinMembList:[],
  877. setInchargerDialog: false,
  878. recentProgressInfo:{},
  879. addToTmpDialog:false,
  880. templateForm:{},
  881. importTaskDialog:false,
  882. importToStageId:null,
  883. exportDialog: false,
  884. exportTaskType:null,
  885. groupTemplateList:[],
  886. createGroupWay:'new',
  887. modGroupDialog:false,
  888. subTaskVisible:false,
  889. orderList:[{id:"seq",name:"手动拖拽顺序",isDesc:false},{id:"create_date",name:"创建时间最晚",isDesc:true},
  890. {id:"end_date",name:"截止时间最晚",isDesc:true},
  891. {id:"task_level",name:"优先级最高",isDesc:true}],
  892. order:"seq",
  893. isDesc:false,
  894. taskDataList:[],
  895. displayTable: false,
  896. viewList: [{id:1,name:"全部任务"},{id:2,name:"进行中的任务"},{id:3,name:"已完成的任务"},{id:4,name:"待安排任务"},
  897. {id:5,name:"我创建的任务"},{id:6,name:"我执行的任务"},{id:7,name:"今天的任务"},{id:8,name:"已超期的任务"}],
  898. importanceList:[{id:0,name:"一般"},{id:1,name:"重要"},{id:2,name:"紧急"},],
  899. taskTypeList:[{id:0,name:"任务", icon:"iconfont firerock-iconrenwu"},{id:1,name:"里程碑",icon:"iconfont firerock-iconicon-"},{id:2,name:"风险",icon:"iconfont firerock-iconfengxian"}],
  900. taskTypeColor:['#20A0FF','#8613ad','#bf0404'],
  901. taskTypeIcon:['iconfont firerock-iconrenwu','iconfont firerock-iconicon-','iconfont firerock-iconfengxian'],
  902. taskStatusList:['进行中','已完成','已撤销'],
  903. //优先级
  904. taskLevelColor:['#262626','#E6A23C','#F56C6C'],
  905. stageListHeight:0,
  906. taskListinH:0,
  907. groupWidth:260,
  908. drag: false,
  909. stageDrag: false,
  910. dragging: false,
  911. stageList:[],
  912. selectedGroup:{},
  913. allGroupData:[],
  914. defaultGroupId:null,
  915. addGroupDialog: false,
  916. addStageDialog: false,
  917. groupSearch:null,
  918. groupType:0,//0-分组,1-视图
  919. groupList: [],
  920. groupForm:{},
  921. stageForm:[],
  922. curProjectId:null,
  923. projectList:null,
  924. activeIndex:"1",
  925. activeName:"projectInside",
  926. searchField:null,
  927. keyword:null,
  928. user: JSON.parse(sessionStorage.getItem("user")),
  929. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  930. userDetailVisible: false,
  931. userDetail:{},
  932. date: new Date(),
  933. users: [],
  934. tableHeight: 0,
  935. listLoading: false,
  936. subProjectVisible: false,
  937. subProjectList: [],//子项目列表
  938. currentProject:{},
  939. addSubProject: false,
  940. addFormVisible: false,
  941. addLoading: false,
  942. title: "",
  943. addForm: {
  944. name: '',
  945. },
  946. rules: {
  947. name: [{ required: true, message: "请输入分组名称", trigger: "blur" }],
  948. },
  949. rules2: {
  950. stagesName: [{ required: true, message: "请输入任务列表名称", trigger: "blur" }],
  951. },
  952. taskRules : {
  953. name: [{ required: true, message: "请输入任务内容", trigger: "blur" }],
  954. },
  955. formGrouping: {
  956. name: [{ required: true, message: "请输入分组名称", trigger: "blur" }],
  957. },
  958. sleectId: null,
  959. sleectProjectId: null,
  960. sidebarIndex: 0, // 侧边栏索引
  961. url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
  962. count: 0,
  963. textarea2: '',
  964. taskId: null,
  965. commentList: [],
  966. radio: 0,
  967. critic: [], // 评论头像的数组
  968. editorOption: { // 富文本框里面的默认值
  969. placeholder: '请输入文本...',
  970. modules: {
  971. toolbar:[
  972. ['bold', 'italic', 'underline', 'strike'], //加粗,斜体,下划线,删除线
  973. // ['blockquote', 'code-block'], //引用,代码块
  974. [{ 'header': 1 }, { 'header': 2 }], // 标题,键值对的形式;1、2表示字体大小
  975. // [{ 'list': 'ordered'}, { 'list': 'bullet' }], //列表
  976. // [{ 'script': 'sub'}, { 'script': 'super' }], // 上下标
  977. // [{ 'indent': '-1'}, { 'indent': '+1' }], // 缩进
  978. // [{ 'direction': 'rtl' }], // 文本方向
  979. [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
  980. [{ 'header': [1, 2, 3, 4, 5, 6, false] }], //几级标题
  981. [{ 'color': [] }, { 'background': [] }], // 字体颜色,字体背景颜色
  982. // [{ 'font': [] }], //字体
  983. [{ 'align': [] }], //对齐方式
  984. ['clean'], //清除字体样式
  985. // ['image','video'] //上传图片、上传视频
  986. ['image'] //上传图片、上传视频
  987. ], //工具栏设置
  988. },
  989. theme: 'snow',
  990. },
  991. textContent: true, // 控制提交
  992. times: null,
  993. text2: '',
  994. innerVisibless: false, // 任务展示弹出层
  995. activities: [{
  996. content: '状态正常',
  997. timestamp: '7小时前',
  998. size: 'large',
  999. type: 'primary',
  1000. icon: 'el-icon-circle-check',
  1001. color: '#409EFF'
  1002. }, {
  1003. content: '进展逾期',
  1004. timestamp: '八小时前',
  1005. color: '#F87872'
  1006. }],
  1007. ProgressList: [],
  1008. checkboxGrounp: [], // 选中人的数据
  1009. checkLists: [], // 选中人数据的ID
  1010. taskIid: null,
  1011. gstimday:[],
  1012. gstimhour:[],
  1013. timelabel: false,
  1014. relationdata: [],
  1015. isRelationTab: false,
  1016. relationvalue:[],
  1017. relationSubTaskList:[],
  1018. relationItemData: null,
  1019. relationPar:{name: ''},
  1020. isRelationItem: false,
  1021. // 关联文件
  1022. fileListLoading:false,
  1023. projectFileList:[],
  1024. taskFileList:[],
  1025. relationFileDialog: false,
  1026. addFileId: null,
  1027. isEditFile: false,
  1028. // 设置项目参与人
  1029. participantsDialog: false,
  1030. participantsFilterText: '',
  1031. deptMembData: [
  1032. {
  1033. id: 0,
  1034. label: '未分配',
  1035. }
  1036. ],
  1037. defaultProps: {
  1038. children: 'children',
  1039. label: 'label'
  1040. },
  1041. chosenMembCount: 0,
  1042. ididid:null,
  1043. alreadyPartArray: [],
  1044. projectCreatorId: null,
  1045. projectInchargerId: null,
  1046. canAddTask: false, // 分组创建任务的判断
  1047. groupResponsibleId: '', // 分组负责人的id
  1048. groupDetailsShow: false,
  1049. groupDetailData: {},
  1050. groupDetailTil: ''
  1051. };
  1052. },
  1053. watch: {
  1054. participantsFilterText(val) {
  1055. this.$refs.chooseMembTree2.filter(val);
  1056. }
  1057. },
  1058. methods: {
  1059. test(item){
  1060. // let pro = this.$route
  1061. console.log('test',this.projectList);
  1062. },
  1063. setParticipants(){
  1064. let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  1065. let chose2 = chosenList.filter(item=>item.isUser == 1)
  1066. let chose3 = []
  1067. for(let i=0;i<chose2.length;i++){chose3.push(chose2[i].id)}
  1068. console.log('test',chose2,chose3);
  1069. this.http.post('/group-participator/save',{
  1070. groupId: this.ididid,
  1071. idsJson: JSON.stringify(chose3)
  1072. },res => {
  1073. if(res.code == 'ok'){
  1074. this.participantsDialog = false
  1075. this.$message({
  1076. message: '设置成功',
  1077. type: 'success'
  1078. })
  1079. }else {
  1080. this.$message({
  1081. message: res.msg,
  1082. type: 'error'
  1083. })
  1084. }
  1085. },error => {
  1086. this.$message({
  1087. message: error,
  1088. type: 'error'
  1089. })
  1090. })
  1091. },
  1092. // 设置项目参与人
  1093. setupParticipants(item){
  1094. this.ididid = item.id
  1095. this.participantsFilterText = ''
  1096. console.log(item);
  1097. this.participantsDialog = true
  1098. this.getAlreadyPartArray(item.id)
  1099. this.getDepartmentList()
  1100. },
  1101. // 获取用于设置参与人的列表
  1102. getDepartmentList(){
  1103. this.http.post('/department/listAllMemb',{
  1104. },res => {
  1105. if(res.code == 'ok'){
  1106. let list = res.data
  1107. this.haveUsersList(list)
  1108. this.deptMembData = JSON.parse(JSON.stringify(list))
  1109. console.log('123',this.deptMembData);
  1110. }else {
  1111. this.$message({
  1112. message: res.msg,
  1113. type: 'error'
  1114. })
  1115. }
  1116. },error => {
  1117. this.$message({
  1118. message: error,
  1119. type: 'error'
  1120. })
  1121. })
  1122. },
  1123. haveUsersList(list){
  1124. for (var i in list) {
  1125. if (list[i].children != null) {
  1126. this.haveUsersList(list[i].children);
  1127. }
  1128. if (list[i].userList != null) {
  1129. if (list[i].children == null) {
  1130. list[i].children = [];
  1131. }
  1132. list[i].userList.forEach(element => {
  1133. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  1134. list[i].children.push(obj);
  1135. });
  1136. }
  1137. }
  1138. },
  1139. // 获取已参与人员
  1140. getAlreadyPartArray(eid){
  1141. this.http.post('/group-participator/get',{
  1142. groupId: eid
  1143. },res => {
  1144. if(res.code == 'ok'){
  1145. this.alreadyPartArray = res.data
  1146. this.chosenMembCount = res.data.length
  1147. // console.log('get',res.data, this.alreadyPartArray)
  1148. }else {
  1149. this.$message({
  1150. message: res.msg,
  1151. type: 'error'
  1152. })
  1153. }
  1154. },error => {
  1155. this.$message({
  1156. message: error,
  1157. type: 'error'
  1158. })
  1159. })
  1160. },
  1161. // 筛选逻辑
  1162. filterNode(value, data) {
  1163. if (!value) return true;
  1164. return data.label.indexOf(value) !== -1;
  1165. },
  1166. // 选中改变
  1167. onTreeItemChange() {
  1168. var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  1169. var list = chosenList.filter(item=>item.isUser == 1);
  1170. this.chosenMembCount = list.length;
  1171. },
  1172. // 关联文件按钮
  1173. relationFileClick(){
  1174. this.relationFileDialog = true
  1175. this.addFileId = null
  1176. this.getProjectFileList()
  1177. },
  1178. // 确认关联文件
  1179. addTaskFile(){
  1180. if(this.addFileId == null){
  1181. this.$message({message: '请选择关联文件' , type: 'warning'})
  1182. return
  1183. }
  1184. this.http.post('/task-files/addDocumentRef',{
  1185. documentId: this.addFileId,
  1186. taskId: this.addForm.id,
  1187. projectId: this.curProjectId
  1188. },res => {
  1189. if(res.code == 'ok'){
  1190. this.$message({
  1191. message: '关联成功',
  1192. type: 'success'
  1193. })
  1194. this.relationFileDialog = false
  1195. this.getTaskFileList()
  1196. }else {
  1197. this.$message({
  1198. message: res.msg,
  1199. type: 'error'
  1200. })
  1201. }
  1202. },error => {
  1203. this.$message({
  1204. message: error,
  1205. type: 'error'
  1206. })
  1207. })
  1208. },
  1209. // 获取项目下的文档列表
  1210. getProjectFileList(){
  1211. this.http.post('/task-files/getDocumentList',{
  1212. projectId: this.curProjectId
  1213. },res => {
  1214. if(res.code == 'ok'){
  1215. this.projectFileList = res.data
  1216. console.log('list',res.data);
  1217. }else {
  1218. this.$message({
  1219. message: res.msg,
  1220. type: 'error'
  1221. })
  1222. }
  1223. },error => {
  1224. this.$message({
  1225. message: error,
  1226. type: 'error'
  1227. })
  1228. })
  1229. },
  1230. // 获取任务下的文档列表
  1231. getTaskFileList(e,eid){
  1232. let etaskId
  1233. if(e == 1){etaskId = eid}
  1234. else{etaskId = this.addForm.id}
  1235. this.fileListLoading = true
  1236. this.http.post('/task-files/getTaskFiles',{
  1237. taskId: etaskId
  1238. },res => {
  1239. if(res.code == 'ok'){
  1240. this.fileListLoading = false
  1241. this.taskFileList = res.data
  1242. console.log('taskFileList',res.data);
  1243. }else {
  1244. this.fileListLoading = false
  1245. this.$message({
  1246. message: res.msg,
  1247. type: 'error'
  1248. })
  1249. }
  1250. },error => {
  1251. this.fileListLoading = false
  1252. this.$message({
  1253. message: error,
  1254. type: 'error'
  1255. })
  1256. })
  1257. },
  1258. // 列表的删除按钮
  1259. taskFileDelete(eid){
  1260. this.$confirm('是否确定取消关联此文件?', '提示', {
  1261. confirmButtonText: '确定',
  1262. cancelButtonText: '取消',
  1263. type: 'warning'
  1264. }).then(()=>{
  1265. this.http.post('/task-files/delete',{
  1266. id: eid
  1267. },res => {
  1268. if(res.code == 'ok'){
  1269. this.$message({
  1270. message: res.data,
  1271. type: 'success'
  1272. })
  1273. this.getTaskFileList()
  1274. }else {
  1275. this.$message({
  1276. message: res.msg,
  1277. type: 'error'
  1278. })
  1279. }
  1280. },error => {
  1281. this.$message({
  1282. message: error,
  1283. type: 'error'
  1284. })
  1285. })
  1286. }).catch(()=>{
  1287. this.$message({
  1288. message: '已取消删除',
  1289. type: 'info'
  1290. })
  1291. })
  1292. },
  1293. // 列表的上传按钮
  1294. uploadFileClick(item){
  1295. console.log("upload",item.file);
  1296. let files = new FormData()
  1297. files.append("projectId",this.curProjectId);
  1298. files.append("taskId", this.addForm.id);
  1299. files.append("file", item.file);
  1300. this.http.uploadFile('/task-files/uploadFile',files,
  1301. res => {
  1302. if(res.code == 'ok'){
  1303. console.log(res);
  1304. this.$message({
  1305. message: '已上传',
  1306. type: 'success'
  1307. })
  1308. this.getTaskFileList()
  1309. }else {
  1310. this.$message({
  1311. message: res.msg,
  1312. type: 'error'
  1313. })
  1314. }
  1315. },error => {
  1316. this.$message({
  1317. message: error,
  1318. type: 'error'
  1319. })
  1320. })
  1321. },
  1322. selchg(){ //类型切换
  1323. if(this.addForm.taskType == 1){
  1324. this.timelabel = true
  1325. if(!this.addForm.executorListFront[0].executorId) {
  1326. console.log(this.currentProject)
  1327. this.addForm.executorListFront[0].executorId = this.currentProject.inchargerId
  1328. }
  1329. }else{
  1330. this.timelabel = false
  1331. }
  1332. },
  1333. addRelation(){ //关联任务卡片
  1334. this.relationvalue = []
  1335. this.isRelationTab = true
  1336. this.getrelation()
  1337. },
  1338. addRelationTask(){ //添加关联任务
  1339. this.http.post('/task/addMileStoneTask',{
  1340. milestoneId: this.addForm.id,
  1341. taskIds: JSON.stringify(this.relationvalue)
  1342. },
  1343. res =>{
  1344. if(res.code == "ok") {
  1345. this.isRelationTab = false
  1346. this.$message({
  1347. message: '添加成功',
  1348. type: 'success'
  1349. })
  1350. this.getRelationTaskList()
  1351. this.$forceUpdate()
  1352. }else {
  1353. this.$message({
  1354. message: res.msg,
  1355. type: 'error'
  1356. })
  1357. }
  1358. },
  1359. error => {
  1360. this.$message({
  1361. message: error,
  1362. type: 'error'
  1363. })
  1364. })
  1365. },
  1366. getRelationTaskList(i,e){ //获取关联任务列表
  1367. let eid = null
  1368. if(i){
  1369. eid = e
  1370. }else{
  1371. eid = this.addForm.id
  1372. }
  1373. this.http.post('/task/getMilestoneTaskList',{
  1374. milestoneId: eid
  1375. },res => {
  1376. if(res.code == 'ok') {
  1377. this.relationSubTaskList = res.data
  1378. // console.log('res',res.data);
  1379. }else {
  1380. this.$message({
  1381. message: res.msg,
  1382. type: 'error'
  1383. })
  1384. }
  1385. },error => {
  1386. this.$message({
  1387. message: error,
  1388. type: 'error'
  1389. })
  1390. })
  1391. },
  1392. getrelation(){ //获取选择关联列表
  1393. this.http.post('/task/getTaskOnlyList',{
  1394. projectId: this.curProjectId
  1395. },
  1396. res => {
  1397. if (res.code == "ok") {
  1398. this.relationdata = []
  1399. res.data.forEach( (item) =>{
  1400. if(item.taskType != 1){
  1401. this.relationdata.push(item)
  1402. }
  1403. })
  1404. // console.log('map',this.relationdata);
  1405. } else {
  1406. this.$message({
  1407. message: res.msg,
  1408. type: "error"
  1409. });
  1410. }
  1411. },
  1412. error => {
  1413. this.$message({
  1414. message: error,
  1415. type: "error"
  1416. });
  1417. });
  1418. },
  1419. // 里程碑关联任务列表
  1420. // 解除关联
  1421. deleteRelationItem(eid){
  1422. this.listLoading = true
  1423. this.http.post('/task/removeMileStoneTask',{
  1424. id: eid
  1425. },res => {
  1426. if(res.code == 'ok') {
  1427. this.getRelationTaskList()
  1428. this.listLoading = false
  1429. this.$message({
  1430. message: '解除成功',
  1431. type: 'success'
  1432. })
  1433. }else {
  1434. this.listLoading = false
  1435. this.$message({
  1436. message: res.msg,
  1437. type: 'error'
  1438. })
  1439. }
  1440. },error => {
  1441. this.listLoading = false
  1442. this.$message({
  1443. message: error,
  1444. type: 'error'
  1445. })
  1446. })
  1447. },
  1448. // 关联任务列表是否完成修改
  1449. relationFinishTask(row){
  1450. this.http.post('/task/finish',{
  1451. id: row.taskId,
  1452. taskStatus: row.taskStatus
  1453. },res => {
  1454. if(res.code == 'ok'){
  1455. if(this.groupType == 0){
  1456. this.getStageList();
  1457. }else {
  1458. this.getViewTaskList();
  1459. }
  1460. }else{
  1461. this.$message({
  1462. message: res.msg,
  1463. type: 'error'
  1464. })
  1465. }
  1466. },error => {
  1467. this.$message({
  1468. message: error,
  1469. type: 'error'
  1470. })
  1471. })
  1472. },
  1473. //保存分组负责人
  1474. saveGroupIncharger() {
  1475. this.http.post('/task-group/saveGroupIncharger', {id: this.groupForm.id, inchargerId: this.groupForm.inchargerId, projectId: this.curProjectId},
  1476. res => {
  1477. this.setInchargerDialog = false;
  1478. if (res.code == "ok") {
  1479. this.$message({
  1480. message: '设置成功',
  1481. type: "success"
  1482. });
  1483. //更新原始分组数据
  1484. this.groupList.filter(g=>g.id == this.groupForm.id)[0].inchargerId = this.groupForm.inchargerId;
  1485. } else {
  1486. this.$message({
  1487. message: res.msg,
  1488. type: "error"
  1489. });
  1490. }
  1491. }
  1492. );
  1493. },
  1494. //删除模板
  1495. deleteTemplate(t) {
  1496. var that = this;
  1497. this.$confirm("确认要删除["+t.name+"]吗?", "提示", {
  1498. //type: 'warning'
  1499. }).then(() => {
  1500. this.http.post('/group-template/deleteTemplate', {id: t.id},
  1501. res => {
  1502. if (res.code == "ok") {
  1503. this.getGroupTemplate();
  1504. this.$message({
  1505. message: '删除模板成功',
  1506. type: "success"
  1507. });
  1508. } else {
  1509. this.$message({
  1510. message: res.msg,
  1511. type: "error"
  1512. });
  1513. }
  1514. }
  1515. );
  1516. });
  1517. },
  1518. //创建模板
  1519. createTemplate() {
  1520. this.saveTemplateLoading = true;
  1521. this.http.post('/group-template/addTemplate', this.templateForm,
  1522. res => {
  1523. this.saveTemplateLoading = false;
  1524. if (res.code == "ok") {
  1525. this.addToTmpDialog = false;
  1526. this.getGroupTemplate();
  1527. this.$message({
  1528. message: '添加模板成功',
  1529. type: "success"
  1530. });
  1531. } else {
  1532. this.$message({
  1533. message: res.msg,
  1534. type: "error"
  1535. });
  1536. }
  1537. }
  1538. );
  1539. },
  1540. addToTemplate(item) {
  1541. this.addToTmpDialog = true;
  1542. this.templateForm = {groupId: item.id, name:item.name, saveTask:false, saveMileStone:false, saveRisk:false};
  1543. },
  1544. changeBase() {
  1545. this.$refs.earning.refreshPage();
  1546. },
  1547. // 批量导入人员
  1548. importTask(item) {
  1549. //首先判断文件类型
  1550. this.loadingExport = true
  1551. let str = item.file.name.split(".");
  1552. let format = str[str.length - 1];
  1553. if (format != "xls" && format != "xlsx") {
  1554. this.loadingExport = false
  1555. this.$message({
  1556. message: "请选择.xls或.xlsx文件",
  1557. type: "error"
  1558. });
  1559. } else {
  1560. this.listLoading = true;
  1561. let formData = new FormData();
  1562. formData.append("file", item.file);
  1563. formData.append("projectId", this.curProjectId);
  1564. formData.append("groupId", this.selectedGroup.id);
  1565. // formData.append("stagesId", this.importToStageId);
  1566. this.http.uploadFile('/task/importTask', formData,
  1567. res => {
  1568. this.$refs.upload.clearFiles();
  1569. this.listLoading = false;
  1570. this.loadingExport = false
  1571. if (res.code == "ok") {
  1572. this.$message({
  1573. message: "导入成功",
  1574. type: "success"
  1575. });
  1576. //重新读取列表
  1577. this.getStageList();
  1578. this.importTaskDialog = false;
  1579. } else {
  1580. this.$message({
  1581. message: res.msg,
  1582. type: "error"
  1583. });
  1584. }
  1585. },
  1586. error => {
  1587. this.$refs.upload.clearFiles();
  1588. this.listLoading = false;
  1589. this.loadingExport = false
  1590. this.$message({
  1591. message: error,
  1592. type: "error"
  1593. });
  1594. });
  1595. }
  1596. },
  1597. //删除任务进展
  1598. deleteTaskProgress(id) {
  1599. this.http.post('/task-progress/deleteProgress', {id: id},
  1600. res => {
  1601. if (res.code == "ok") {
  1602. this.getTaskProgressList(this.taskIid)
  1603. this.$message({
  1604. message: '删除成功',
  1605. type: "success"
  1606. });
  1607. } else {
  1608. this.$message({
  1609. message: res.msg,
  1610. type: "error"
  1611. });
  1612. }
  1613. }
  1614. );
  1615. },
  1616. //创建任务进展
  1617. addTaskProgress() {
  1618. var param = {
  1619. taskId: this.taskIid,
  1620. status: this.radio,
  1621. content: this.text2,
  1622. participatorIds: this.checkLists.toString()
  1623. };
  1624. this.http.post('/task-progress/addProgress', param,
  1625. res => {
  1626. if (res.code == "ok") {
  1627. this.shutPro()
  1628. this.getTaskProgressList(this.taskIid)
  1629. this.$message({
  1630. message: '发布成功',
  1631. type: "success"
  1632. });
  1633. this.checkboxGrounp = [],
  1634. this.checkLists = [],
  1635. this.text2 = '',
  1636. this.radio = 0
  1637. } else {
  1638. this.$message({
  1639. message: res.msg,
  1640. type: "error"
  1641. });
  1642. }
  1643. }
  1644. );
  1645. },
  1646. //获取任务进展列表
  1647. getTaskProgressList(taskId) {
  1648. this.taskIid = taskId
  1649. this.http.post('/task-progress/list', {taskId: taskId},
  1650. res => {
  1651. if (res.code == "ok") {
  1652. this.ProgressList = res.data;
  1653. this.recentProgressInfo = res.data[0]
  1654. } else {
  1655. this.$message({
  1656. message: res.msg,
  1657. type: "error"
  1658. });
  1659. }
  1660. }
  1661. );
  1662. },
  1663. kkk(el){
  1664. var k = this.checkLists.indexOf(el.id)
  1665. if (k == -1) {
  1666. this.checkLists.push(el.id)
  1667. } else {
  1668. this.checkLists.splice(k, 1)
  1669. }
  1670. },
  1671. showExportDialog() {
  1672. this.exportDialog = true;
  1673. },
  1674. exportTask() {
  1675. let _this = this;
  1676. this.loadingExport = true
  1677. this.http.post('/task/exportTask', {projectId: this.curProjectId, taskType: this.exportTaskType},
  1678. res => {
  1679. this.loadingExport = false
  1680. if (res.code == "ok") {
  1681. location.href = res.data;
  1682. } else {
  1683. this.$message({
  1684. message: res.msg,
  1685. type: "error"
  1686. });
  1687. }
  1688. }
  1689. );
  1690. },
  1691. sss(){
  1692. this.$refs.addRem.style.display="none"
  1693. },
  1694. addprogress(){ // 添加子任务进展事件
  1695. this.$refs.proBox.style.display="block"
  1696. this.$refs.addPro.style.display="none"
  1697. },
  1698. shutPro() { // 关闭任务进展
  1699. this.$refs.addPro.style.display="block"
  1700. this.$refs.addRem.style.display="none"
  1701. this.$refs.proBox.style.display="none"
  1702. },
  1703. addI() { // 打开选择查看
  1704. this.$refs.addRem.style.display="block"
  1705. },
  1706. load() {
  1707. if(this.count >= 0) return
  1708. this.count += 2
  1709. },
  1710. onEditorFocus() {
  1711. this.onEditorBlur()
  1712. },
  1713. subMission() { // 添加
  1714. },
  1715. handleCheckedCitiesChange(value) {
  1716. let checkedCount = value.length;
  1717. this.checkAll = checkedCount === this.cities.length;
  1718. this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
  1719. },
  1720. // 获得焦点时触发
  1721. onEditorBlur(){
  1722. let theEle = this.$refs.text; // 获取元素
  1723. var img = theEle.value.match(/<img[^>]+>/g); // 赛选 img 标签
  1724. var arrImg = ''
  1725. for (var j = 0; j < img.length; j++) {
  1726. // 正则匹配,摘出img标签下的src里的内容,即capture
  1727. img[j].replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
  1728. arrImg += capture
  1729. });
  1730. }
  1731. // 原来的字符流大小,单位为字节
  1732. var strLen = arrImg.length;
  1733. // 计算后得到的文件流大小,单位为字节
  1734. var fileSize=parseInt(strLen-(strLen/8)*2);
  1735. var size = "";
  1736. size = (fileSize/1024/1024).toFixed(2);
  1737. if (size > 2){
  1738. this.textContent = false
  1739. this.$message({
  1740. showClose: true,
  1741. message: '图片超过了2MB,请重新上传',
  1742. type: 'warning'
  1743. });
  1744. }
  1745. this.textContent = true
  1746. },
  1747. // 侧边栏的点击事件
  1748. retract() {
  1749. if (this.$refs.box.className == 'el-icon-arrow-left') {
  1750. this.$refs.box.className = 'el-icon-arrow-right'
  1751. } else {
  1752. this.$refs.box.className = 'el-icon-arrow-left'
  1753. }
  1754. // this.$refs.box.className === 'el-icon-arrow-left' ? this.$refs.box.className = 'el-icon-arrow-right' || this.$refs.box.className = 'el-icon-arrow-left'
  1755. this.toggleGroup()
  1756. },
  1757. //
  1758. choseTemplate(tIndex) {
  1759. // this.groupTemplateList.forEach((g)=>{
  1760. // g.selected = false;
  1761. // })
  1762. this.sidebarIndex = tIndex
  1763. // this.groupTemplateList[tIndex].selected = true;
  1764. this.groupTemplateList.forEach((g, i)=>{
  1765. if(tIndex == i) {
  1766. g.selected = !g.selected;
  1767. }
  1768. })
  1769. },
  1770. //获取分组模板列表
  1771. getGroupTemplate() {
  1772. this.http.post('/group-template/getList',{},
  1773. res => {
  1774. if (res.code == "ok") {
  1775. this.groupTemplateList = res.data;
  1776. this.groupTemplateList[0].selected = true;
  1777. } else {
  1778. this.$message({
  1779. message: res.msg,
  1780. type: "error"
  1781. });
  1782. }
  1783. },
  1784. error => {
  1785. this.$message({
  1786. message: error,
  1787. type: "error"
  1788. });
  1789. });
  1790. },
  1791. copyGroup(item) {
  1792. this.http.post('/task-group/copy',{id: item.id},
  1793. res => {
  1794. if (res.code == "ok") {
  1795. this.getTaskGroups();
  1796. } else {
  1797. this.$message({
  1798. message: res.msg,
  1799. type: "error"
  1800. });
  1801. }
  1802. },
  1803. error => {
  1804. this.$message({
  1805. message: error,
  1806. type: "error"
  1807. });
  1808. });
  1809. },
  1810. //重启项目
  1811. startPro() {
  1812. this.http.post('/project/start',{id: this.curProjectId},
  1813. res => {
  1814. if (res.code == "ok") {
  1815. this.$message({
  1816. message: '重启成功',
  1817. type: "success"
  1818. });
  1819. this.currentProject.status = 1;
  1820. } else {
  1821. this.$message({
  1822. message: res.msg,
  1823. type: "error"
  1824. });
  1825. }
  1826. },
  1827. error => {
  1828. this.$message({
  1829. message: error,
  1830. type: "error"
  1831. });
  1832. });
  1833. },
  1834. //撤销项目
  1835. cancelPro() {
  1836. this.http.post('/project/cancel',{id: this.curProjectId},
  1837. res => {
  1838. if (res.code == "ok") {
  1839. this.$message({
  1840. message: '撤销成功',
  1841. type: "success"
  1842. });
  1843. this.currentProject.status = 3;
  1844. } else {
  1845. this.$message({
  1846. message: res.msg,
  1847. type: "error"
  1848. });
  1849. }
  1850. },
  1851. error => {
  1852. this.$message({
  1853. message: error,
  1854. type: "error"
  1855. });
  1856. });
  1857. },
  1858. //完成项目
  1859. finishPro() {
  1860. this.http.post('/project/finish',{id: this.curProjectId},
  1861. res => {
  1862. if (res.code == "ok") {
  1863. this.$message({
  1864. message: '项目完成',
  1865. type: "success"
  1866. });
  1867. this.currentProject.status = 2;
  1868. } else {
  1869. this.$message({
  1870. message: res.msg,
  1871. type: "error"
  1872. });
  1873. }
  1874. },
  1875. error => {
  1876. this.$message({
  1877. message: error,
  1878. type: "error"
  1879. });
  1880. });
  1881. },
  1882. //删除当前编辑的任务
  1883. deleteTask() {
  1884. var warning='';
  1885. if (this.addForm.subTaskList.length > 0) {
  1886. warning='您确定要删除当前任务及其子任务吗?';
  1887. } else {
  1888. warning='您确定要删除当前任务吗?';
  1889. }
  1890. this.$confirm(warning, "提示", {
  1891. //type: 'warning'
  1892. }).then(() => {
  1893. this.http.post('/task/delete',{id: this.addForm.id},
  1894. res => {
  1895. if (res.code == "ok") {
  1896. this.addFormVisible = false;
  1897. this.getStageList();
  1898. } else {
  1899. this.$message({
  1900. message: res.msg,
  1901. type: "error"
  1902. });
  1903. }
  1904. },
  1905. error => {
  1906. this.$message({
  1907. message: error,
  1908. type: "error"
  1909. });
  1910. });
  1911. });
  1912. },
  1913. //tab页签切换
  1914. handleClick(tab, event) {
  1915. let pathModel = tab.name;
  1916. this.$router.push('/'+pathModel+'/'+this.curProjectId);
  1917. if(tab.name == 'costbaseline'){
  1918. this.$refs.costbaseline.refreshPage();
  1919. }
  1920. if(tab.name == 'info') {
  1921. this.$refs.projectInfo.getMileStoneList()
  1922. }
  1923. },
  1924. showSubTaskList(task) {
  1925. this.subTaskVisible = true;
  1926. this.addForm = task;
  1927. // console.log('click',task.subTaskList);
  1928. },
  1929. backToParentTask() {
  1930. // this.getTaskDetail(this.addForm.parentTid);
  1931. this.getTaskDetail(this.timelabel ? this.relationPar.id : this.addForm.parentTid);
  1932. if(this.timelabel){
  1933. this.isRelationItem = false
  1934. // this.relationPar = {name: ''}
  1935. this.getRelationTaskList(1, this.relationPar.id)
  1936. this.gain(this.relationPar)
  1937. }
  1938. },
  1939. //显示子任务创建卡片
  1940. addSubTask() {
  1941. if(this.isRelationItem){return}
  1942. this.addFormVisible = true;
  1943. this.addForm = {parentTname: this.addForm.name,parentTid: this.addForm.id,projectId: this.addForm.projectId, groupId: this.addForm.groupId, taskLevel:0, planHours: 8, taskType: 0};
  1944. this.addForm.executorListFront = [{executorId:null, planHours:8}];
  1945. this.addLoading = false;
  1946. },
  1947. //认领任务
  1948. addAsMyTask(task) {
  1949. this.http.post('/task/addAsMyTask',{id: task.id},
  1950. res => {
  1951. if (res.code == "ok") {
  1952. this.getStageList();
  1953. } else {
  1954. this.$message({
  1955. message: res.msg,
  1956. type: "error"
  1957. });
  1958. }
  1959. },
  1960. error => {
  1961. this.$message({
  1962. message: error,
  1963. type: "error"
  1964. });
  1965. });
  1966. },
  1967. taskLineClick(row, column, event) {
  1968. if(this.isRelationItem){return}
  1969. this.editTask(row);
  1970. },
  1971. //排序发生改变
  1972. orderChange() {
  1973. this.isDesc = this.orderList.filter(o=>o.id == this.order)[0].isDesc;
  1974. if (this.groupType == 0) {
  1975. this.getStageList();
  1976. } else {
  1977. this.getViewTaskList();
  1978. }
  1979. },
  1980. //加载视图任务列表
  1981. getViewTaskList() {
  1982. this.http.post('/task/list',{projectId: this.curProjectId, viewId: this.selectedGroup.id, order: this.order, isDesc: this.isDesc},
  1983. res => {
  1984. if (res.code == "ok") {
  1985. this.taskDataList = res.data;
  1986. this.taskDataList.forEach(t=>{
  1987. t.isFinish = t.taskStatus==1?true:false;
  1988. });
  1989. } else {
  1990. this.$message({
  1991. message: res.msg,
  1992. type: "error"
  1993. });
  1994. }
  1995. },
  1996. error => {
  1997. this.$message({
  1998. message: error,
  1999. type: "error"
  2000. });
  2001. });
  2002. },
  2003. //阶段拖拽
  2004. onMoveStage(e) {
  2005. var data = {
  2006. groupId:this.selectedGroup.id,
  2007. oldIndex: e.oldIndex,
  2008. newIndex: e.newIndex,};
  2009. this.http.post('/stages/changeStageOrder',data,
  2010. res => {
  2011. if (res.code == "ok") {
  2012. this.getStageList();
  2013. } else {
  2014. this.$message({
  2015. message: res.msg,
  2016. type: "error"
  2017. });
  2018. }
  2019. },
  2020. error => {
  2021. this.$message({
  2022. message: error,
  2023. type: "error"
  2024. });
  2025. });
  2026. },
  2027. onChange(e) {
  2028. var data = {
  2029. id:e.item.id,
  2030. oldIndex: e.oldIndex ,
  2031. newIndex: e.newIndex ,
  2032. oldStagesId: e.from.id,
  2033. newStagesId: e.to.id};
  2034. this.http.post('/task/changeOrder',data,
  2035. res => {
  2036. if (res.code == "ok") {
  2037. this.getStageList();
  2038. } else {
  2039. this.$message({
  2040. message: res.msg,
  2041. type: "error"
  2042. });
  2043. }
  2044. },
  2045. error => {
  2046. this.$message({
  2047. message: error,
  2048. type: "error"
  2049. });
  2050. });
  2051. },
  2052. toggleGroup() {
  2053. if (this.groupWidth == 0) {
  2054. this.groupWidth = 260;
  2055. } else {
  2056. this.groupWidth = 0;
  2057. }
  2058. },
  2059. finishTask(task) {
  2060. console.log(123)
  2061. this.http.post('/task/finish',{id: task.id, taskStatus: task.taskStatus},
  2062. res => {
  2063. if (res.code == "ok") {
  2064. if (this.groupType == 0) {
  2065. this.getStageList();
  2066. } else {
  2067. this.getViewTaskList();
  2068. }
  2069. } else {
  2070. this.$message({
  2071. message: res.msg,
  2072. type: "error"
  2073. });
  2074. }
  2075. },
  2076. error => {
  2077. this.$message({
  2078. message: error,
  2079. type: "error"
  2080. });
  2081. });
  2082. },
  2083. // 点击卡片事件
  2084. editTask(task) {
  2085. this.mileageCup = true
  2086. // console.log('editTask',task)
  2087. if(task.taskType == 1){
  2088. this.timelabel = true
  2089. this.isRelationItem = false
  2090. }else{
  2091. this.timelabel = false
  2092. }
  2093. this.addFormVisible = true;
  2094. this.isEditFile = true;
  2095. this.addLoading = false;
  2096. this.title = "编辑任务";
  2097. this.getTaskDetail(task.id);
  2098. this.getTaskProgressList(task.id); // 获取任务进展列表
  2099. this.getUsers(); // 获取名单数据
  2100. this.gain(task); // 获取评论列表
  2101. this.getRelationTaskList(1, task.id)
  2102. this.getTaskFileList(1,task.id)
  2103. },
  2104. // 关联任务点击事件
  2105. relationTaskClick(row,column,event){
  2106. // console.log('relationTaskClick',row);
  2107. this.relationPar = JSON.parse(JSON.stringify(this.addForm))
  2108. // console.log(this.relationPar);
  2109. this.addFormVisible = true;
  2110. this.addLoading = false;
  2111. this.isRelationItem = true;
  2112. this.isEditFile = true;
  2113. this.title = "编辑任务";
  2114. this.getTaskDetail(row.taskId);
  2115. this.getUsers();
  2116. this.gain(row,1);
  2117. this.getRelationTaskList(1, row.taskId)
  2118. this.getTaskFileList(1,row.taskId)
  2119. },
  2120. // 获取评论列表
  2121. gain (task,e) {
  2122. this.commentList = [];
  2123. this.taskId = e == 1 ? task.taskId : task.id;
  2124. this.http.post('/task-comment/getList', {taskId: e == 1 ? task.taskId : task.id},
  2125. res => {
  2126. if (res.code == "ok") {
  2127. this.commentList = res.data
  2128. this.sppk(this.commentList) // 获取参与人的方法
  2129. } else {
  2130. this.$message({
  2131. message: res.msg,
  2132. type: "error"
  2133. });
  2134. }
  2135. },
  2136. error => {
  2137. this.$message({
  2138. message: error,
  2139. type: "error"
  2140. });
  2141. });
  2142. },
  2143. // 获取评论参与人
  2144. sppk(comit) {
  2145. var sk = []
  2146. comit.forEach(function(e){
  2147. sk.push(e.userName)
  2148. })
  2149. this.critic = new Set(sk)
  2150. },
  2151. // 点击发布
  2152. release() {
  2153. if(this.textarea2.length <= 0) return this.$message({message: "请输入内容", type: "error"})
  2154. this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
  2155. res => {
  2156. if(res.code == "ok"){
  2157. this.commentList.push(res.data)
  2158. this.sppk(this.commentList)
  2159. this.textarea2 = ""
  2160. this.contRoll() // 滚动到底部
  2161. } else {
  2162. this.$message({
  2163. message: res.msg,
  2164. type: "error"
  2165. });
  2166. }
  2167. },
  2168. error => {
  2169. this.$message({
  2170. message: error,
  2171. type: "error"
  2172. });
  2173. })
  2174. },
  2175. // 滚动到底部
  2176. contRoll(){
  2177. this.$nextTick(() => {
  2178. this.$refs.main.scrollTop = this.$refs.contRoll.scrollHeight;
  2179. })
  2180. },
  2181. chggstim(e,i){
  2182. if(e){
  2183. this.gstimday[i] = Math.ceil(this.gstimhour[i] / this.user.timeType.allday)
  2184. }else{
  2185. this.gstimhour[i] = this.gstimday[i] * this.user.timeType.allday
  2186. }
  2187. },
  2188. getTaskDetail(id) {
  2189. this.http.post('/task/getTask',{id: id},
  2190. res => {
  2191. if (res.code == "ok") {
  2192. this.addForm = res.data;
  2193. this.addForm.createDate = null;
  2194. this.addForm.indate = null;
  2195. this.addLoading = false;
  2196. this.recentProgressInfo = this.addForm.progress;
  2197. this.addForm.executorListFront = this.addForm.executorList;
  2198. this.gstimday = []
  2199. this.gstimhour = []
  2200. for(let i=0;i<this.addForm.executorListFront.length;i++){
  2201. this.gstimhour.push(this.addForm.executorListFront[i].planHours),
  2202. this.gstimday.push(Math.ceil(this.addForm.executorListFront[i].planHours / this.user.timeType.allday))
  2203. }
  2204. //删除中间传值的变量数组
  2205. delete this.addForm.executorList;
  2206. } else {
  2207. this.$message({
  2208. message: res.msg,
  2209. type: "error"
  2210. });
  2211. }
  2212. },
  2213. error => {
  2214. this.$message({
  2215. message: error,
  2216. type: "error"
  2217. });
  2218. });
  2219. },
  2220. addTask(stage) {
  2221. this.mileageCup = false
  2222. this.addFormVisible = true;
  2223. this.addForm = {projectId: stage.projectId, groupId: stage.groupId, stagesId: stage.id, taskLevel:0, planHours: 8, taskType: 0};
  2224. this.addForm.executorListFront = [{executorId:null, planHours:this.user.timeType.allday}];
  2225. this.gstimhour = [this.user.timeType.allday]
  2226. this.gstimday = [1]
  2227. this.addLoading = false;
  2228. this.isEditFile = false;
  2229. this.title="创建任务";
  2230. this.commentList = [];
  2231. this.timelabel = false
  2232. },
  2233. addExecutorLine(e) {
  2234. if(e == 1){
  2235. if (this.relationItemData.executorList == null) {
  2236. this.relationItemData.executorList = [];//初始化
  2237. }
  2238. this.relationItemData.executorList.push({executorId:null, planHours:this.user.timeType.allday});
  2239. this.gstimday.push(1)
  2240. this.gstimhour.push(this.user.timeType.allday)
  2241. this.$forceUpdate();
  2242. }else{
  2243. if (this.addForm.executorListFront == null) {
  2244. this.addForm.executorListFront = [];//初始化
  2245. }
  2246. this.addForm.executorListFront.push({executorId:null, planHours:this.user.timeType.allday});
  2247. this.gstimday.push(1)
  2248. this.gstimhour.push(this.user.timeType.allday)
  2249. this.$forceUpdate();
  2250. }
  2251. },
  2252. removeExecutorLine(index,e) {
  2253. if(e == 1){
  2254. this.relationItemData.executorList.splice(index,1);
  2255. this.gstimday.splice(index,1)
  2256. this.gstimhour.splice(index,1)
  2257. this.$forceUpdate();
  2258. }else{
  2259. this.addForm.executorListFront.splice(index,1);
  2260. this.gstimday.splice(index,1)
  2261. this.gstimhour.splice(index,1)
  2262. this.$forceUpdate();
  2263. }
  2264. },
  2265. renameStage(item) {
  2266. this.stageForm = JSON.parse(JSON.stringify(item));
  2267. this.addStageDialog = true;
  2268. },
  2269. deleteStage(item) {
  2270. var _this = this;
  2271. var param = {id:item.id, groupId: item.groupId};
  2272. this.$confirm("确认删除吗?", "提示", {
  2273. //type: 'warning'
  2274. }).then(() => {
  2275. this.http.post('/stages/delete',param,
  2276. res => {
  2277. if (res.code == "ok") {
  2278. // this.stageList = res.data;
  2279. this.getStageList();
  2280. } else {
  2281. this.$message({
  2282. message: res.msg,
  2283. type: "error"
  2284. });
  2285. }
  2286. },
  2287. error => {
  2288. this.$message({
  2289. message: error,
  2290. type: "error"
  2291. });
  2292. });
  2293. });
  2294. },
  2295. //加载项目内的任务列表
  2296. getStageList() {
  2297. this.http.post('/stages/list',{groupId: this.selectedGroup.id, projectId: this.selectedGroup.projectId, order: this.order, isDesc: this.isDesc},
  2298. res => {
  2299. if (res.code == "ok") {
  2300. this.stageList = res.data.list;
  2301. this.canAddTask = res.data.canAddTask
  2302. this.timess() // 处理时间的方法
  2303. } else {
  2304. this.$message({
  2305. message: res.msg,
  2306. type: "error"
  2307. });
  2308. }
  2309. },
  2310. error => {
  2311. this.$message({
  2312. message: error,
  2313. type: "error"
  2314. });
  2315. });
  2316. },
  2317. timess(){
  2318. // console.log('timess');
  2319. var date = new Date()
  2320. let Y = date.getFullYear()
  2321. let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
  2322. let D = date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate()
  2323. this.times = `${Y}-${M}-${D}`
  2324. },
  2325. addStagePost() {
  2326. console.log('新增任务列表');
  2327. let param = JSON.parse(JSON.stringify(this.stageForm));
  2328. param.taskList = [];
  2329. this.http.post('/stages/save',param,
  2330. res => {
  2331. if (res.code == "ok") {
  2332. this.addStageDialog = false;
  2333. this.stageList = res.data;
  2334. } else {
  2335. this.$message({
  2336. message: res.msg,
  2337. type: "error"
  2338. });
  2339. }
  2340. },
  2341. error => {
  2342. this.$message({
  2343. message: error,
  2344. type: "error"
  2345. });
  2346. });
  2347. },
  2348. addStage() {
  2349. this.addStageDialog = true;
  2350. this.stageForm = {groupId: this.selectedGroup.id, projectId: this.curProjectId};
  2351. },
  2352. viewChange(index, indexPath) {
  2353. this.groupType = 1;
  2354. this.order = "create_date";
  2355. this.isDesc = true;
  2356. this.selectedGroup = this.viewList.filter(g=>g.id == index)[0];
  2357. this.getViewTaskList();
  2358. this.displayTable = true;
  2359. } ,
  2360. groupChange(index, indexPath) {
  2361. console.log('店家了')
  2362. this.groupType = 0;
  2363. this.order = "seq";
  2364. this.isDesc = false;
  2365. this.selectedGroup = this.groupList.filter(g=>g.id == index)[0];
  2366. this.groupResponsibleId = this.selectedGroup.inchargerId
  2367. this.getStageList();
  2368. this.displayTable = false;
  2369. this.$forceUpdate()
  2370. },
  2371. //本地搜索组
  2372. startSearchGroup() {
  2373. if (this.groupSearch != null || this.groupSearch.length > 0) {
  2374. this.groupList = this.allGroupData.filter(g=>g.name.indexOf(this.groupSearch) >= 0);
  2375. } else {
  2376. this.groupList = this.allGroupData;
  2377. }
  2378. },
  2379. editIncharger(item) {
  2380. this.groupForm = JSON.parse(JSON.stringify(item));
  2381. this.setInchargerDialog = true;
  2382. },
  2383. renameGroup(item) {
  2384. this.groupForm = JSON.parse(JSON.stringify(item));
  2385. this.modGroupDialog = true;
  2386. },
  2387. deleteGroup(item) {
  2388. var _this = this;
  2389. this.$confirm("分组下的任务也将一同删除,您确认删除该分组吗?", "提示", {
  2390. type: 'warning'
  2391. }).then(() => {
  2392. this.http.post('/task-group/delete',item,
  2393. res => {
  2394. if (res.code == "ok") {
  2395. this.groupList = res.data;
  2396. if (item.id == this.selectedGroup.id) {
  2397. //之前选中的分组被删除了
  2398. if (this.groupList.length > 0) {
  2399. this.defaultGroupId = this.groupList[0].id;
  2400. this.selectedGroup = this.groupList[0];
  2401. this.groupChange(this.defaultGroupId)
  2402. } else {
  2403. this.selectedGroup = {};
  2404. }
  2405. }
  2406. } else {
  2407. this.$message({
  2408. message: res.msg,
  2409. type: "error"
  2410. });
  2411. }
  2412. },
  2413. error => {
  2414. this.$message({
  2415. message: error,
  2416. type: "error"
  2417. });
  2418. });
  2419. });
  2420. },
  2421. getGroupDetails(obj) {
  2422. this.http.post('/task-group/detail',{
  2423. groupId: obj.id
  2424. },
  2425. res => {
  2426. if (res.code == "ok") {
  2427. this.groupDetailsShow = true
  2428. this.groupDetailData = res.data
  2429. this.groupDetailTil = obj.name + ' - 分组详情'
  2430. } else {
  2431. this.$message({
  2432. message: res.msg,
  2433. type: "error"
  2434. });
  2435. }
  2436. },
  2437. error => {
  2438. this.$message({
  2439. message: error,
  2440. type: "error"
  2441. });
  2442. });
  2443. },
  2444. addTemplateGroup() {
  2445. // var param = JSON.parse(JSON.stringify(this.groupTemplateList.filter(g=>g.selected)[0]));
  2446. // delete param.stagesList;
  2447. // param.projectId = this.curProjectId;
  2448. // var k = this.groupTemplateList[this.sidebarIndex].name
  2449. // var s = null;
  2450. // var xmz = this.groupList.forEach(function(a, b, c){
  2451. // if (a.name == k) {
  2452. // s = true
  2453. // return
  2454. // }
  2455. // })
  2456. // if (s){
  2457. // this.addGroupDialog = false;
  2458. // this.$message({
  2459. // message: '当前项目已存在分组['+k+'],请修改组名后重试。',
  2460. // type: "error"
  2461. // });
  2462. // return
  2463. // }
  2464. var param = JSON.parse(JSON.stringify(this.groupTemplateList.filter(g=>g.selected)))
  2465. console.log(param, '你看看啊')
  2466. for(var i in param) {
  2467. delete param[i].stagesList
  2468. }
  2469. if(param.length < 1) {
  2470. this.$message({
  2471. message: '请选择模板',
  2472. type: "error"
  2473. });
  2474. return
  2475. }
  2476. console.log(this.groupList)
  2477. var s = null
  2478. var k = ''
  2479. var xmz = this.groupList.forEach(function(a, b, c){
  2480. param.forEach((g, i) =>{
  2481. if(a.name == g.name) {
  2482. s = true
  2483. k = g.name
  2484. return
  2485. }
  2486. })
  2487. })
  2488. if (s){
  2489. this.addGroupDialog = false;
  2490. this.$message({
  2491. message: '当前项目已存在分组['+k+'],请修改组名后重试。',
  2492. type: "error"
  2493. });
  2494. return
  2495. }
  2496. console.log('将要闯过去的值', param)
  2497. // return
  2498. // this.http.post('/task-group/createFromTemplate',param,
  2499. this.http.post('/task-group/createFromTemplate',{
  2500. templateJson: JSON.stringify(param),
  2501. projectId: this.curProjectId
  2502. },
  2503. res => {
  2504. if (res.code == "ok") {
  2505. this.selectedGroup = res.data
  2506. this.sleectId = res.data.id
  2507. this.sleectProjectId = res.data.projectId
  2508. this.addGroupDialog = false;
  2509. // this.getTaskGroups();
  2510. this.getTaskGroup();
  2511. } else {
  2512. this.$message({
  2513. message: res.msg,
  2514. type: "error"
  2515. });
  2516. }
  2517. },
  2518. error => {
  2519. this.$message({
  2520. message: error,
  2521. type: "error"
  2522. });
  2523. });
  2524. },
  2525. // 重新定义了 addGroup 方法
  2526. addGroup(formName) {
  2527. // return
  2528. this.$refs[formName].validate((valid) => {
  2529. if (valid) {
  2530. this.http.post('/task-group/save',this.groupForm,
  2531. res => {
  2532. if (res.code == "ok") {
  2533. this.groupList = res.data;
  2534. this.addGroupDialog = false;
  2535. this.modGroupDialog = false;
  2536. if (this.selectedGroup.id !== this.groupForm.id) {
  2537. this.selectedGroup = this.groupList.filter(g=>g.new)[0];
  2538. }
  2539. this.defaultGroupId = this.groupList[this.groupList.length - 1].id
  2540. // this.getTaskGroup();
  2541. this.getStageList()
  2542. } else {
  2543. this.$message({
  2544. message: res.msg,
  2545. type: "error"
  2546. });
  2547. }
  2548. },
  2549. error => {
  2550. this.$message({
  2551. message: error,
  2552. type: "error"
  2553. });
  2554. });
  2555. } else {
  2556. console.log('error submit!!');
  2557. return false;
  2558. }
  2559. });
  2560. },
  2561. createGroup() {
  2562. this.addGroupDialog = true;
  2563. this.groupForm = {projectId: this.curProjectId};
  2564. },
  2565. getInsideData() {
  2566. this.getTaskGroups();
  2567. },
  2568. //加载项目内的任务分组
  2569. getTaskGroups() {
  2570. this.http.post('/task-group/list',{projectId: this.curProjectId},
  2571. res => {
  2572. if (res.code == "ok") {
  2573. this.allGroupData = res.data;
  2574. this.groupList = res.data;
  2575. console.log(this.groupList,'grouplist');
  2576. if (this.groupList.length > 0) {
  2577. this.defaultGroupId = this.groupList[0].id;
  2578. this.selectedGroup = this.groupList[0];
  2579. this.groupResponsibleId = this.groupList[0].inchargerId;
  2580. this.getStageList();
  2581. } else {
  2582. //清空任务列表
  2583. this.defaultGroupId = null;
  2584. this.selectedGroup = null;
  2585. this.stageList = [];
  2586. }
  2587. } else {
  2588. this.$message({
  2589. message: res.msg,
  2590. type: "error"
  2591. });
  2592. }
  2593. },
  2594. error => {
  2595. this.$message({
  2596. message: error,
  2597. type: "error"
  2598. });
  2599. });
  2600. },
  2601. // 额外加的
  2602. getTaskGroup() {
  2603. this.http.post('/task-group/list',{projectId: this.curProjectId},
  2604. res => {
  2605. if (res.code == "ok") {
  2606. this.allGroupData = res.data;
  2607. this.groupList = res.data;
  2608. if (this.groupList.length > 0) {
  2609. this.defaultGroupId = this.sleectId;
  2610. this.selectedGroup = this.groupList[res.data.length - 1];
  2611. this.getStageList();
  2612. } else {
  2613. //清空任务列表
  2614. this.defaultGroupId = null;
  2615. this.selectedGroup = null;
  2616. this.stageList = [];
  2617. }
  2618. } else {
  2619. this.$message({
  2620. message: res.msg,
  2621. type: "error"
  2622. });
  2623. }
  2624. },
  2625. error => {
  2626. this.$message({
  2627. message: error,
  2628. type: "error"
  2629. });
  2630. });
  2631. },
  2632. //切换项目
  2633. onProjectChange() {
  2634. let path = this.$route.path;
  2635. path = path.substring(0,path.lastIndexOf('/'))+'/'+this.curProjectId;
  2636. this.$router.push(path);
  2637. this.getTaskGroups();
  2638. this.getDetail()
  2639. this.$refs.fileCenter.refreshPage();
  2640. this.$refs.projectInfo.refreshPage();
  2641. this.$refs.summary.refreshPage();
  2642. this.$refs.costbaseline.refreshPage();
  2643. this.$refs.earning.refreshPage();
  2644. if(this.user.companyId == '936') {
  2645. this.$refs.projectInfo.getKeyNodes()
  2646. }
  2647. },
  2648. //获取我的项目列表
  2649. getMyProjectList() {
  2650. this.http.post('/project/getProjectList', {
  2651. },
  2652. res => {
  2653. if (res.code == "ok") {
  2654. this.projectList = res.data;
  2655. console.log('getprojectlist',res.data);
  2656. } else {
  2657. this.$message({
  2658. message: res.msg,
  2659. type: "error"
  2660. });
  2661. }
  2662. },
  2663. error => {
  2664. this.$message({
  2665. message: error,
  2666. type: "error"
  2667. });
  2668. });
  2669. },
  2670. menuSelect() {
  2671. },
  2672. toList() {
  2673. this.$router.push("/list");
  2674. },
  2675. searchList() {
  2676. this.page = 1;
  2677. this.getList();
  2678. },
  2679. //显示用户详情
  2680. showUser(userId) {
  2681. this.userDetailVisible = true;
  2682. this.http.post(this.port.manage.userDetail, {
  2683. userId: userId
  2684. },
  2685. res => {
  2686. if (res.code == "ok") {
  2687. this.userDetail = res.data;
  2688. } else {
  2689. this.$message({
  2690. message: res.msg,
  2691. type: "error"
  2692. });
  2693. }
  2694. },
  2695. error => {
  2696. this.$message({
  2697. message: error,
  2698. type: "error"
  2699. });
  2700. });
  2701. },
  2702. getUsers() {
  2703. // this.http.post(this.port.manage.list, {
  2704. // departmentId: -1,
  2705. // pageIndex: 1,
  2706. // pageSize: -1
  2707. // },
  2708. this.http.post('/user/getSimpleActiveUserList', {},
  2709. res => {
  2710. if (res.code == "ok") {
  2711. this.users = res.data;
  2712. } else {
  2713. this.$message({
  2714. message: res.msg,
  2715. type: "error"
  2716. });
  2717. }
  2718. },
  2719. error => {
  2720. this.$message({
  2721. message: error,
  2722. type: "error"
  2723. });
  2724. });
  2725. },
  2726. //获取项目列表
  2727. getList() {
  2728. this.listLoading = true;
  2729. this.http.post(this.port.project.listPage, {
  2730. pageIndex: this.page,
  2731. pageSize: this.size,
  2732. keyword:this.keyword,
  2733. searchField: this.searchField,
  2734. },
  2735. res => {
  2736. this.listLoading = false;
  2737. if (res.code == "ok") {
  2738. var list = res.data.records;
  2739. for(var i in list) {
  2740. var participator = list[i].participator , str = "";
  2741. for(var j in participator) {
  2742. if(j == participator.length-1) {
  2743. str += participator[j].name
  2744. } else {
  2745. str += participator[j].name + ','
  2746. }
  2747. }
  2748. list[i].userNames = str;
  2749. }
  2750. this.list = list;
  2751. this.total = res.data.total;
  2752. } else {
  2753. this.$message({
  2754. message: res.msg,
  2755. type: "error"
  2756. });
  2757. }
  2758. },
  2759. error => {
  2760. this.listLoading = false;
  2761. this.$message({
  2762. message: error,
  2763. type: "error"
  2764. });
  2765. });
  2766. },
  2767. submitInsert() {
  2768. if (this.textContent !== true) return this.$message({
  2769. showClose: true,
  2770. message: '图片太大,请重新上传',
  2771. type: 'warning'
  2772. });
  2773. //检查是有重名的执行人
  2774. var exeList = this.addForm.executorListFront;
  2775. // for(let i=0;i<this.gstimhour.length;i++){
  2776. // exeList[i].planHours = this.gstimhour[i]
  2777. // }
  2778. for (var i=0;i<exeList.length;i++) {
  2779. var findSameUser = false;
  2780. exeList[i].planHours = this.gstimhour[i]
  2781. for (var j=i+1;j<exeList.length; j++) {
  2782. if (exeList[i].executorId && exeList[j].executorId && exeList[i].executorId == exeList[j].executorId) {
  2783. findSameUser = true;
  2784. break;
  2785. }
  2786. }
  2787. if (findSameUser) {
  2788. return this.$message({
  2789. showClose: true,
  2790. message: '执行人存在重复',
  2791. type: 'error'
  2792. });
  2793. }
  2794. }
  2795. this.$refs.form1.validate(valid => {
  2796. if (valid) {
  2797. delete this.addForm.subTaskList;
  2798. delete this.addForm.refTaskList;
  2799. delete this.addForm.progress;
  2800. //去掉没有执行人的.(因为要有计划工时,执行人可以暂不设置)
  2801. // this.addForm.executorListFront = this.addForm.executorListFront.filter(exe=>exe.executorId);
  2802. this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
  2803. this.addLoading = true;
  2804. this.http.post('/task/save',this.addForm,
  2805. res => {
  2806. this.addLoading = false;
  2807. if (res.code == "ok") {
  2808. this.$message({
  2809. message: "提交成功",
  2810. type: "success"
  2811. });
  2812. if (this.addForm.parentTid == null) {
  2813. this.addFormVisible = false;
  2814. if (this.groupType == 0) {
  2815. this.getStageList();
  2816. } else {
  2817. this.getViewTaskList();
  2818. }
  2819. } else {
  2820. this.backToParentTask();
  2821. }
  2822. } else {
  2823. this.$message({
  2824. message: res.msg,
  2825. type: "error"
  2826. });
  2827. }
  2828. },
  2829. error => {
  2830. this.$message({
  2831. message: error,
  2832. type: "error"
  2833. });
  2834. }
  2835. );
  2836. }
  2837. });
  2838. },
  2839. DateChange(){
  2840. if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
  2841. let stdate = Date.parse(this.addForm.startDate)
  2842. let eddate = Date.parse(this.addForm.endDate)
  2843. if(stdate <= eddate){
  2844. let days = (eddate - stdate) / (1*24*60*60*1000) + 1
  2845. for (let i=0;i<this.gstimday.length;i++) {
  2846. this.gstimday[i] = days
  2847. this.gstimhour[i] = days * this.user.timeType.allday
  2848. }
  2849. this.$forceUpdate()
  2850. }
  2851. // console.log("gstimday",this.gstimday);
  2852. }
  2853. },
  2854. // 删除
  2855. deletePro(i, item) {
  2856. this.$confirm("确定要项目" + item.projectName + "吗?","删除项目", {
  2857. confirmButtonText: "确定",
  2858. cancelButtonText: "取消",
  2859. type: "warning"
  2860. })
  2861. .then(() => {
  2862. this.listLoading = true;
  2863. this.http.post(this.port.project.delete,{
  2864. id: item.id
  2865. },
  2866. res => {
  2867. this.listLoading = false;
  2868. if (res.code == "ok") {
  2869. this.$message({
  2870. message: "删除成功",
  2871. type: "success"
  2872. });
  2873. this.getList();
  2874. } else {
  2875. this.$message({
  2876. message: res.msg,
  2877. type: "error"
  2878. });
  2879. }
  2880. },
  2881. error => {
  2882. this.listLoading = false;
  2883. this.$message({
  2884. message: error,
  2885. type: "error"
  2886. });
  2887. }
  2888. );
  2889. })
  2890. .catch(() => {});
  2891. },
  2892. detail(i) {
  2893. this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
  2894. },
  2895. getDetail() {
  2896. this.http.post('/project/detail',{
  2897. id: this.curProjectId
  2898. },
  2899. res => {
  2900. if (res.code == "ok") {
  2901. console.log('触发更新试一下')
  2902. this.currentProject = res.data;
  2903. this.getjurisdictionIds(this.currentProject)
  2904. this.joinMembList = this.currentProject.participationList;
  2905. } else {
  2906. }
  2907. },
  2908. error => {
  2909. this.$message({
  2910. message: error,
  2911. type: "error"
  2912. });
  2913. }
  2914. );
  2915. },
  2916. getjurisdictionIds(pro){
  2917. console.log('pro',pro.creatorId);
  2918. this.projectCreatorId = pro.creatorId
  2919. this.projectInchargerId = pro.inchargerId
  2920. }
  2921. },
  2922. created() {
  2923. let height = window.innerHeight;
  2924. this.tableHeight = height - 135;
  2925. this.stageListHeight = this.tableHeight - 45;
  2926. this.taskListinH = this.stageListHeight - 75;
  2927. const that = this;
  2928. window.onresize = function temp() {
  2929. that.tableHeight = window.innerHeight - 135;
  2930. that.stageListHeight = that.tableHeight - 45;
  2931. that.taskListinH = that.stageListHeight - 75;
  2932. };
  2933. },
  2934. mounted() {
  2935. this.curProjectId = parseInt(this.$route.params.id);
  2936. this.activeName = this.$route.path.split("/")[1];
  2937. this.getDetail();
  2938. this.getUsers();
  2939. this.getMyProjectList();
  2940. this.getInsideData();
  2941. this.getGroupTemplate();
  2942. }
  2943. };
  2944. </script>
  2945. <style >
  2946. .taskCardCircleBox{
  2947. padding-left: 5px;
  2948. display: flex;
  2949. justify-content: left;
  2950. align-items: center;
  2951. }
  2952. .flip-list-move {
  2953. transition: transform 0.5s;
  2954. }
  2955. .no-move {
  2956. transition: transform 0s;
  2957. }
  2958. .taskStage {
  2959. margin:10px;
  2960. display:inline-block;
  2961. vertical-align:top;
  2962. width: 331px;
  2963. }
  2964. .taskList {
  2965. padding:7px;
  2966. width:331px;
  2967. }
  2968. .taskListin{
  2969. width: 317px;
  2970. overflow: auto;
  2971. }
  2972. .taskList .stage {
  2973. font-weight:bold;
  2974. display:block;
  2975. float:left;
  2976. width:260px;
  2977. overflow: auto;
  2978. }
  2979. .taskGroupClass {
  2980. width: 180px;
  2981. display: inline-block;
  2982. text-overflow: ellipsis;
  2983. overflow: hidden;
  2984. white-space: nowrap;
  2985. }
  2986. .taskCard {
  2987. background: #fff;
  2988. margin: 5px 0px;
  2989. padding:5px;
  2990. border: 1px solid #e6e6e6;
  2991. border-radius: 3px;
  2992. box-shadow: 3px 3px 3px #e6e6e6;
  2993. min-height:60px;
  2994. position: relative;
  2995. border-radius: 3px;
  2996. overflow: hidden;
  2997. width: 288px;
  2998. }
  2999. .taskImg {
  3000. position: absolute;
  3001. box-sizing: border-box;
  3002. width: 100%;
  3003. height: 100%;
  3004. top: 0;
  3005. left: 0;
  3006. }
  3007. .taskImg img{
  3008. position: absolute;
  3009. top: -1px;
  3010. }
  3011. .hong:hover {
  3012. border-top: 1px solid #ff0000;
  3013. }
  3014. .huang:hover {
  3015. border-top: 1px solid #ff9600;
  3016. }
  3017. .hui:hover {
  3018. border-top: 1px solid #c9c9c9;
  3019. }
  3020. .taskCard:hover {
  3021. cursor: move;
  3022. }
  3023. .chosen {
  3024. background-color: #000 !important;
  3025. color: #fff;
  3026. }
  3027. .ghost {
  3028. background-color: #fafafa !important;
  3029. }
  3030. .taskCard .cb {
  3031. margin-right:5px;
  3032. }
  3033. .item {
  3034. background:#fff;
  3035. }
  3036. .input-with-select .el-input-group__prepend {
  3037. background-color: #fff;
  3038. }
  3039. .el-tabs__item {
  3040. height:45px ;
  3041. }
  3042. .projectCls {
  3043. margin-left:10px;margin-right:10px;
  3044. }
  3045. .heavyTxt {
  3046. font-weight:bold;
  3047. }
  3048. .el-tabs__nav-wrap::after {
  3049. height:0.5px;
  3050. }
  3051. .user_name_icon {
  3052. text-align:center;border-radius:50%;color:white;float:right;font-size:10px;width:30px;height:30px;line-height:30px;
  3053. transform: scale(0.8);
  3054. }
  3055. .task_name {
  3056. color:#262626;
  3057. display:inline-block;
  3058. max-width: 235px;
  3059. height: 25px;
  3060. overflow: hidden;
  3061. white-space: nowrap;
  3062. text-overflow: ellipsis;
  3063. }
  3064. .task_name span{
  3065. position: relative;
  3066. top: 8px;
  3067. }
  3068. .cb {
  3069. position: relative;
  3070. top: -2px;
  3071. }
  3072. .group_style {
  3073. border-radius: 5px;margin:2px 0px 2px 0px;height:40px;line-height:40px;
  3074. }
  3075. .el-tabs__nav-wrap::after {
  3076. height:1px;
  3077. }
  3078. .el-tabs__header {
  3079. margin:0 !important;
  3080. }
  3081. .single_line {
  3082. overflow: hidden;text-overflow:ellipsis;white-space: nowrap;
  3083. }
  3084. .sub_task_num {
  3085. font-size:10px;
  3086. color:#666;
  3087. }
  3088. .template_box {
  3089. margin:20px 0px;
  3090. }
  3091. /* 项目阶段侧边栏样式 */
  3092. .sidebar {
  3093. width: 2px;
  3094. background: #dddddd;
  3095. position: relative;
  3096. }
  3097. .sidebar:hover {
  3098. background: #20a0ff;
  3099. }
  3100. .sidebar:hover .etui {
  3101. background: #20a0ff;
  3102. border: #20a0ff;
  3103. color: #fff;
  3104. }
  3105. .etui {
  3106. width: 15px;
  3107. height: 40px;
  3108. background: #fff;
  3109. border: 1px solid #dddddd;
  3110. position: absolute;
  3111. top: 50%;
  3112. left: 0%;
  3113. transform: translate(6%, -50%);
  3114. color: rgb(192, 191, 191);
  3115. box-sizing: border-box;
  3116. }
  3117. .etui i {
  3118. display: inline-block;
  3119. padding-top: 90%;
  3120. /* padding-left: 15%; */
  3121. font-weight: bold;
  3122. }
  3123. /* bug问题 */
  3124. .task {
  3125. box-sizing: border-box;
  3126. padding-left: 10px;
  3127. padding-right: 5px;
  3128. }
  3129. /* 评论部分 */
  3130. .remark {
  3131. width: 500px;
  3132. height: 100%;
  3133. background: #fff;
  3134. position: absolute;
  3135. top: 0;
  3136. right: -500px;
  3137. border-left: 3px solid #dddddd;
  3138. }
  3139. .jm {
  3140. margin-left: -500px;
  3141. }
  3142. .bj {
  3143. float: left;
  3144. width: 90%;
  3145. overflow: hidden;
  3146. height: 65px;
  3147. white-space: nowrap;
  3148. text-overflow: ellipsis;
  3149. }
  3150. .bj span {
  3151. width: 50px;
  3152. height: 50px;
  3153. display: inline-block;
  3154. border-radius: 50%;
  3155. color: #fff;
  3156. text-align: center;
  3157. float: left;
  3158. margin-right: 20px;
  3159. margin-top: 10px;
  3160. line-height: 50px;
  3161. }
  3162. .player {
  3163. height: 15%;
  3164. box-sizing: border-box;
  3165. padding-left: 15px;
  3166. border-bottom: 1px solid #dddddd;
  3167. }
  3168. .player p {
  3169. margin: 0;
  3170. padding: 2% 0;
  3171. font-size: 18px;
  3172. }
  3173. .player .el-image {
  3174. border-radius: 50%;
  3175. margin-right: 10px;
  3176. }
  3177. .subject {
  3178. height: 60%;
  3179. box-sizing: border-box;
  3180. }
  3181. .sub-all {
  3182. font-size: 20px;
  3183. padding: 15px 0 15px 15px;
  3184. }
  3185. .sub-details {
  3186. width: 100%;
  3187. height: 87%;
  3188. padding-right: 15px;
  3189. box-sizing: border-box;
  3190. overflow: hidden;
  3191. overflow-y: scroll
  3192. }
  3193. .sub-details li {
  3194. list-style:none
  3195. }
  3196. /* 红色背景显示日期 */
  3197. .element_span {
  3198. display: inline-block;
  3199. background: #e62412;
  3200. color: #fff;
  3201. border-radius: 3px;
  3202. padding: 3px;
  3203. /* text-align: center; */
  3204. font-size: 12px;
  3205. margin-left: 5px;
  3206. }
  3207. .pro_btn{
  3208. display: inline-block;
  3209. float: right;
  3210. }
  3211. </style>
  3212. <style lang="scss" scoped>
  3213. .counli {
  3214. em {
  3215. font-style: normal;
  3216. display: inline-block;
  3217. margin-left: 9%;
  3218. }
  3219. span {
  3220. float: right;
  3221. }
  3222. }
  3223. .carts {
  3224. position: relative;
  3225. .el-image{
  3226. border-radius: 50%;
  3227. float: left;
  3228. width: 20%;
  3229. }
  3230. i {
  3231. width: 30px;
  3232. height: 30px;
  3233. // background: #778899;
  3234. display: inline-block;
  3235. float: left;
  3236. border-radius:50%;
  3237. font-style:normal;
  3238. font-size: 12px;
  3239. line-height: 30px;
  3240. text-align: center;
  3241. color: #fff;
  3242. background: #778899;
  3243. }
  3244. div {
  3245. text-align: left;
  3246. p {
  3247. text-align: left;
  3248. margin-left: 10px;
  3249. margin-left: 13%;
  3250. }
  3251. em {
  3252. display: block;
  3253. font-style: normal;
  3254. margin-left: 13%;
  3255. }
  3256. }
  3257. span {
  3258. font-size: 10px;
  3259. float: right;
  3260. margin-top: -40px;
  3261. }
  3262. }
  3263. .issue {
  3264. // height: 20%;
  3265. // position: relative;
  3266. // z-index: 4;
  3267. .zh{
  3268. position: relative;
  3269. width: 100%;
  3270. height: 100%;
  3271. }
  3272. .textareays {
  3273. background: #000;
  3274. height: 140px;
  3275. border: 0;
  3276. .el-textarea__inner {
  3277. height: 85%;
  3278. }
  3279. }
  3280. .issue-button {
  3281. position: absolute;
  3282. bottom: 20px;
  3283. right: 20px;
  3284. }
  3285. }
  3286. .inputDeep {
  3287. position: absolute;
  3288. bottom: 85px;
  3289. width: 95%;
  3290. margin: 0 12px;
  3291. }
  3292. .inputDeep .el-textarea .el-textarea__inner{
  3293. border: 0 !important;
  3294. resize: none !important;
  3295. }
  3296. .inputDeeps .el-textarea__inner {
  3297. border: 0 !important;
  3298. resize: none !important;
  3299. }
  3300. .scop_span {
  3301. display: inline-block;
  3302. padding: 2px 5px;
  3303. }
  3304. </style>
  3305. <style>
  3306. .ql-snow .ql-picker.ql-size .ql-picker-label::before,
  3307. .ql-snow .ql-picker.ql-size .ql-picker-item::before {
  3308. content: "14px" !important;
  3309. position: relative;
  3310. top: -8px;
  3311. }
  3312. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
  3313. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
  3314. content: "10px" !important;
  3315. }
  3316. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
  3317. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
  3318. content: "18px" !important;
  3319. }
  3320. .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
  3321. .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
  3322. content: "32px" !important;
  3323. }
  3324. .ql-snow .ql-picker.ql-header .ql-picker-label::before,
  3325. .ql-snow .ql-picker.ql-header .ql-picker-item::before {
  3326. content: "文本" !important;
  3327. position: relative;
  3328. top: -8px;
  3329. }
  3330. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
  3331. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
  3332. content: "标题1" !important;
  3333. }
  3334. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
  3335. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
  3336. content: "标题2" !important;
  3337. }
  3338. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
  3339. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
  3340. content: "标题3" !important;
  3341. }
  3342. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
  3343. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
  3344. content: "标题4" !important;
  3345. }
  3346. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
  3347. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
  3348. content: "标题5" !important;
  3349. }
  3350. .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
  3351. .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
  3352. content: "标题6" !important;
  3353. }
  3354. .ql-snow .ql-picker.ql-font .ql-picker-label::before,
  3355. .ql-snow .ql-picker.ql-font .ql-picker-item::before {
  3356. content: "标准字体" !important;
  3357. }
  3358. .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
  3359. .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
  3360. content: "衬线字体" !important;
  3361. }
  3362. .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
  3363. .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
  3364. content: "等宽字体" !important;
  3365. }
  3366. /* .ql-picker-label {
  3367. position: relative;
  3368. } */
  3369. .ql-picker-label svg {
  3370. position: relative;
  3371. top: -6px;
  3372. }
  3373. /* 任务进展 */
  3374. .progress {
  3375. border: 1px solid #ddd;
  3376. border-radius: 5px;
  3377. width: 100%;
  3378. box-sizing: border-box;
  3379. padding: 15px;
  3380. position: relative;
  3381. margin-bottom: 20px;
  3382. }
  3383. .remind {
  3384. width: 95px;
  3385. height: 60%;
  3386. overflow-y:auto;
  3387. position: absolute;
  3388. background: #fff;
  3389. padding: 10px;
  3390. left: 0;
  3391. top: 0;
  3392. border: 1px solid #ddd;
  3393. z-index: 999999;
  3394. }
  3395. .rala1 .el-radio__input.is-checked + .el-radio__label {
  3396. color: #43d14f !important;
  3397. }
  3398. .rala1 .el-radio__input.is-checked .el-radio__inner {
  3399. background: #43d14f !important;
  3400. border-color: #43d14f !important;
  3401. }
  3402. .rala2 .el-radio__input.is-checked + .el-radio__label {
  3403. color: #fd7624 !important;
  3404. }
  3405. .rala2 .el-radio__input.is-checked .el-radio__inner {
  3406. background: #fd7624 !important;
  3407. border-color: #fd7624 !important;
  3408. }
  3409. .rala3 .el-radio__input.is-checked + .el-radio__label {
  3410. color: #fd4d47 !important;
  3411. }
  3412. .rala3 .el-radio__input.is-checked .el-radio__inner {
  3413. background: #fd4d47 !important;
  3414. border-color: #fd4d47 !important;
  3415. }
  3416. /* 任务进展列表 */
  3417. .elCard {
  3418. width: 100%;
  3419. padding: 15px;
  3420. box-sizing: border-box;
  3421. border: 1px solid #EBEEF5;
  3422. }
  3423. .elCard_qu {
  3424. float: right;
  3425. margin-right: 15px;
  3426. }
  3427. .integrity {
  3428. padding: 15px;
  3429. }
  3430. .write {
  3431. float: right;
  3432. color: #1B9AEE;
  3433. }
  3434. .ssp {
  3435. position: absolute;
  3436. right: 140px;
  3437. top: 95px;
  3438. width: 66%;
  3439. height: 80%;
  3440. }
  3441. .examine {
  3442. width: 100%;
  3443. text-align: center;
  3444. }
  3445. .nones {
  3446. width: 100%;
  3447. height: 50px;
  3448. text-align: center;
  3449. color: #909399;
  3450. line-height: 50px;
  3451. border-top: 1px solid #EBEEF5;
  3452. border-bottom: 1px solid #EBEEF5;
  3453. font-size: 16px;
  3454. }
  3455. .icon {
  3456. /* color: rgb(67, 209, 79); */
  3457. display: block;
  3458. width: 12px;
  3459. height: 12px;
  3460. background: #fff;
  3461. position: absolute;
  3462. top: 0;
  3463. left: -33px;
  3464. border-radius: 50%;
  3465. border: 4px solid;
  3466. }
  3467. /* ddl */
  3468. .ddl {
  3469. height: 136px;
  3470. overflow: hidden;
  3471. border: 1px solid #EBEEF5
  3472. }
  3473. .tb{
  3474. position: relative;
  3475. }
  3476. .dpl{
  3477. position: absolute;
  3478. font-size: 20px;
  3479. left: -32px;
  3480. top: 0px;
  3481. }
  3482. </style>