list.vue 166 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528
  1. <template>
  2. <section>
  3. <!--工具条-->
  4. <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
  5. <el-form :inline="true">
  6. <el-form-item label="项目列表" class="toolbar_formitem_n1">
  7. </el-form-item>
  8. <el-form-item >
  9. <!-- <div style="display: flex;align-items: center;height: 40px;"> -->
  10. <div style="display: flex;align-items: center;height: 40px;">
  11. <el-input v-model="keyword" class="input-with-select" :placeholder="searchField == '1' ? '请输入项目名称关键字' : '请输入项目编号关键字'" clearable="true" size="small">
  12. <el-select v-model="searchField" style="width:120px;" slot="prepend" placeholder="请选择">
  13. <el-option label="项目名称" value=1 ></el-option>
  14. <el-option label="项目编号" value=2></el-option>
  15. </el-select>
  16. <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
  17. </el-input>
  18. </div>
  19. </el-form-item>
  20. <el-form-item >
  21. <span style="margin-left:5px;margin-right:5px;color:#606266;">状态</span>
  22. <el-select v-model="status" style="width:110px;" placeholder="请选择" @change="searchList" size="small">
  23. <el-option label="全部" value=0 ></el-option>
  24. <el-option label="进行中" value=1 ></el-option>
  25. <el-option label="已完成" value=2 ></el-option>
  26. <el-option label="已撤销" value=3 ></el-option>
  27. <el-option label="已暂停" value=4 ></el-option>
  28. </el-select>
  29. </el-form-item>
  30. <!-- 主项目筛选 -->
  31. <el-form-item v-if="user.timeType.mainProjectState == '1'">
  32. <span style="margin-left:5px;margin-right:5px;color:#606266;">主项目</span>
  33. <el-select v-model="projectMainId" style="width:110px;" placeholder="请选择" clearable @change="searchClfList" size="small">
  34. <el-option v-for="item in mainProjectList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
  35. </el-select>
  36. </el-form-item>
  37. <!-- 分类筛选 -->
  38. <el-form-item >
  39. <span style="margin-left:5px;margin-right:5px;color:#606266;">分类</span>
  40. <el-select v-model="statusClf" style="width:110px;" placeholder="请选择" clearable @change="searchClfList" size="small">
  41. <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
  42. </el-select>
  43. </el-form-item>
  44. <!-- 分类条目 -->
  45. <!-- <el-form-item style="float:right;" v-if="permissions.projectClassification">
  46. <el-link type="primary" :underline="false" @click="showClfDialog = true">分类管理</el-link>
  47. </el-form-item>
  48. <el-form-item style="float:right;" v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">
  49. <el-link type="primary" :underline="false" @click="showBaseCostItemDialog">基线成本项</el-link>
  50. </el-form-item>
  51. <el-form-item style="float:right;" v-if="permissions.projectExport">
  52. <el-link type="primary" style="margin-left:5px;" :underline="false" @click="exportProjectData" download="项目导出.xlsx">导出项目</el-link>
  53. </el-form-item>
  54. <el-form-item style="float:right;" v-if="permissions.projectImport">
  55. <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/项目导入模板.xlsx" download="项目导入模板.xlsx">模板下载</el-link>
  56. </el-form-item>
  57. <el-form-item style="float:right;" v-if="permissions.projectImport">
  58. <el-upload ref="upload" style="margin-left:5px;" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
  59. <el-link type="primary" :underline="false" >导入项目</el-link>
  60. </el-upload>
  61. </el-form-item> -->
  62. <el-form-item style="float:right;" v-if="permissions.projectImport || permissions.projectExport || permissions.projectClassification || (user.company.packageProject == 1 && permissions.projectCostOfItems)">
  63. <el-dropdown>
  64. <el-link type="primary" :underline="false">查看更多<i class="el-icon-arrow-down el-icon--right"></i></el-link>
  65. <el-dropdown-menu slot="dropdown">
  66. <el-dropdown-item v-if="permissions.projectImport">
  67. <el-upload ref="upload" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
  68. <el-link type="primary" :underline="false" >导入项目</el-link>
  69. </el-upload>
  70. </el-dropdown-item>
  71. <el-dropdown-item v-if="permissions.projectImport">
  72. <el-link type="primary" :underline="false" @click="downloadmb" v-if="user.company.packageCustomer == 1 || user.company.packageProvider == 1 || user.timeType.mainProjectState == 1 || user.companyId == '936'">模板下载</el-link>
  73. <el-link type="primary" :underline="false" href="./upload/项目导入模板.xlsx" download="项目导入模板.xlsx" v-else>模板下载</el-link>
  74. </el-dropdown-item>
  75. <el-dropdown-item v-if="permissions.projectExport">
  76. <el-link type="primary" :underline="false" @click="exportProjectData" download="项目导出.xlsx">导出项目</el-link>
  77. </el-dropdown-item>
  78. <el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">
  79. <el-link type="primary" :underline="false" @click="showBaseCostItemDialog">基线成本项</el-link>
  80. </el-dropdown-item>
  81. <el-dropdown-item v-if="permissions.projectClassification">
  82. <el-link type="primary" :underline="false" @click="showClfDialog = true">分类管理</el-link>
  83. </el-dropdown-item>
  84. <!-- <el-dropdown-item v-if="user.timeType.mainProjectState == 1 && !permissions.projectClassification"> -->
  85. <el-dropdown-item v-if="user.timeType.mainProjectState == 1">
  86. <el-link type="primary" :underline="false" @click="mainProjectDialog = true">主项目管理</el-link>
  87. </el-dropdown-item>
  88. <el-dropdown-item v-if="permissions.projectPhase && user.company.packageProject == 1">
  89. <el-link type="primary" :underline="false" @click="phaseProjectDialog = true">项目阶段管理</el-link>
  90. </el-dropdown-item>
  91. <el-dropdown-item v-if="user.timeType.projectLevelState == 1">
  92. <el-link type="primary" :underline="false" @click="projectLevelDialog = true">项目级别管理</el-link>
  93. </el-dropdown-item>
  94. </el-dropdown-menu>
  95. </el-dropdown>
  96. </el-form-item>
  97. <!-- <el-form-item style="float:right;" v-if="user.role == 1||user.role == 2||user.role == 5"> -->
  98. <el-form-item style="float:right;" v-if="permissions.projectNew">
  99. <el-link type="primary" :underline="false" @click="handleAdd(-1,null)">新增项目</el-link>
  100. </el-form-item>
  101. <el-form-item style="float:right;" v-if="permissions.projectResources">
  102. <!-- <router-link to="/projectGantt"> -->
  103. <el-link type="primary" :underline="false" @click="isganttshow = true">资源分配</el-link>
  104. <!-- </router-link> -->
  105. <el-dialog v-if="isganttshow" :visible.sync="isganttshow" width="90vw" top="3vh" style="height:96%" class="ganttdialog">
  106. <projectgantt></projectgantt>
  107. </el-dialog>
  108. </el-form-item>
  109. </el-form>
  110. </el-col>
  111. <!--列表-->
  112. <el-table ref="projectlistOfWudulist" @cell-mouse-enter="hoverCall" @cell-mouse-leave="handCall" @cell-click="clickCell" :cell-class-name="tableCellClassName" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedWudulist" @sort-change="tableSort">
  113. <el-table-column type="selection" width="60" :selectable="isSelectable">
  114. <!-- creator 项目创建人 incharger 项目负责人 -->
  115. </el-table-column>
  116. <!-- <el-table-column type="index" width="60" v-else>
  117. <template slot-scope="scope" >
  118. {{scope.$index+1+(page-1)*size}}
  119. </template>
  120. </el-table-column> -->
  121. <el-table-column prop="projectCode" label="项目编号" sortable="custom" width="150"></el-table-column>
  122. <el-table-column prop="contractCode" label="合同编号" width="200" v-if="user.companyId == '936'">
  123. <template slot-scope="scope">
  124. <!-- <div v-if="scope.row.projectSeparate">
  125. {{scope.row.projectSeparate.contractCode}}
  126. </div> -->
  127. <div v-if="scope.row.projectSeparate">
  128. <div v-if="scope.row.projectSeparate.contractCode">
  129. <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectSeparate.contractCode.length > 15">
  130. <div>
  131. <span>{{scope.row.projectSeparate.contractCode}}</span>
  132. </div>
  133. <div slot="reference" class="kans">
  134. <span>{{scope.row.projectSeparate.contractCode}}...</span>
  135. </div>
  136. </el-popover>
  137. <div v-else>
  138. <span>{{scope.row.projectSeparate.contractCode}}</span>
  139. </div>
  140. </div>
  141. </div>
  142. </template>
  143. </el-table-column>
  144. <el-table-column prop="projectCategorySub" label="项目分组" width="200" v-if="user.companyId == '428'">
  145. <template slot-scope="scope">
  146. <div v-if="scope.row.projectSeparate">
  147. <div v-if="scope.row.projectSeparate.projectCategorySub">
  148. <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectSeparate.projectCategorySub.length > 15">
  149. <div>
  150. <span>{{scope.row.projectSeparate.projectCategorySub}}</span>
  151. </div>
  152. <div slot="reference" class="kans">
  153. <span>{{scope.row.projectSeparate.projectCategorySub}}...</span>
  154. </div>
  155. </el-popover>
  156. <div v-else>
  157. <span>{{scope.row.projectSeparate.projectCategorySub}}</span>
  158. </div>
  159. </div>
  160. </div>
  161. </template>
  162. </el-table-column>
  163. <el-table-column prop="categoryName" label="项目分类" sortable="custom" width="120"></el-table-column>
  164. <el-table-column prop="projectName" label="项目名称" width="250" sortable="custom">
  165. <template slot-scope="scope">
  166. <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectName.length > 15">
  167. <div>
  168. <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
  169. <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
  170. </div>
  171. <div slot="reference" class="kans">
  172. <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName.substring(0,15)}}...</el-link>
  173. <span v-if="user.company.packageProject==0" >{{scope.row.projectName.substring(0,15)}}...</span>
  174. </div>
  175. </el-popover>
  176. <div v-else>
  177. <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
  178. <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
  179. </div>
  180. </template>
  181. </el-table-column>
  182. <el-table-column prop="projectMainName" label="主项目" sortable="custom" min-width="250" v-if="user.timeType.mainProjectState == '1'">
  183. </el-table-column>
  184. <el-table-column prop="inchargerName" label="项目经理" sortable="custom" min-width="150">
  185. <template slot-scope="scope">
  186. <el-link type="primary" :underline="false" @click="showUser(scope.row.inchargerId)">{{scope.row.inchargerName}}</el-link>
  187. </template>
  188. </el-table-column>
  189. <!-- 项目阶段 -->
  190. <!-- 换位置之前看下项目阶段发起的请求 -->
  191. <el-table-column prop="currentStage" label="项目阶段" sortable="custom" min-width="150" width="220" v-if="user.company.packageProject == 1 && permissions.projectPhase">
  192. <template slot-scope="scope">
  193. <span style="display: inline-block; width: 150px">
  194. <el-select v-model="phaseProjectValie" v-if="scope.row.index + ',' + scope.column.index == currentCell" :ref="scope.row.index + ',' + scope.column.index" filterable placeholder="请选择项目阶段" size="mini" @blur="hideSelect" @change="selectChange">
  195. <el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
  196. </el-select>
  197. <el-link v-else type="primary" :underline="false">{{scope.row.currentStageId == null ? '暂无' : scope.row.currentStageName}}</el-link>
  198. </span>
  199. <el-link v-if="(permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId) && scope.row.index + ',' + scope.column.index != currentCell && rowid == scope.row.id" type="primary" :underline="false"><i class="el-icon-edit"></i></el-link>
  200. </template>
  201. </el-table-column>
  202. <el-table-column prop="participator" label="参与者" :min-width="user.company.packageCustomer != 1 ? '100' : '300'" sortable v-if="user.company.packageProject==0">
  203. <template slot-scope="scope">
  204. <!-- <v-for v-for="par in scope.row.participator" :key="par.id" >
  205. <el-link style="margin-right:10px;" type="primary" @click="showUser(par.id)">{{par.name}}</el-link>
  206. </v-for> -->
  207. <div v-if="scope.row.participator.length > 5">
  208. <el-popover placement="top" width="500" trigger="hover" v-if="scope.row.participator.length > 0">
  209. <span v-for="par in scope.row.participator" :key="par.id">
  210. <el-link style="margin-right:10px;" :underline="false" type="primary" @click="showUser(par.id)">{{par.name}}</el-link>
  211. </span>
  212. <div slot="reference" class="addss">
  213. <span v-for="par in scope.row.participator" :key="par.id">
  214. <el-link style="margin-right:10px;" :underline="false" type="primary" @click="showUser(par.id)">{{par.name}}</el-link>
  215. </span>
  216. </div>
  217. </el-popover>
  218. </div>
  219. <div v-else>
  220. <span v-for="par in scope.row.participator" :key="par.id" >
  221. <el-link style="margin-right:10px;" type="primary" :underline="false" @click="showUser(par.id)">{{par.name}}</el-link>
  222. </span>
  223. </div>
  224. </template>
  225. </el-table-column>
  226. <!-- 客户管理 -->
  227. <el-table-column prop="customerName" label="客户" min-width="190" v-if="user.company.packageCustomer == 1" sortable="custom">
  228. <template slot-scope="scope">
  229. <el-popover placement="top" width="250" trigger="hover" v-if="scope.row.customerName&&scope.row.customerName.length > 12">
  230. <div slot="reference" class="kans">
  231. <span >{{scope.row.customerName.substring(0,12)}}...</span>
  232. </div>
  233. <span >{{scope.row.customerName}}</span>
  234. </el-popover>
  235. <div v-else>
  236. <span >{{scope.row.customerName}}</span>
  237. </div>
  238. </template>
  239. </el-table-column>
  240. <!-- 级别 -->
  241. <el-table-column :prop="user.timeType.projectLevelState == 1 ? 'levelName' : 'level'" label="级别" min-width="190" v-if="user.company.packageProject == 1">
  242. <template slot-scope="scope">
  243. <span v-if="user.timeType.projectLevelState == 1">{{scope.row.levelName}}</span>
  244. <span v-else>{{importanceListLable[scope.row.level - 1]}}</span>
  245. </template>
  246. </el-table-column>
  247. <!-- 供应商 -->
  248. <!-- <el-table-column prop="providerNames" label="供应商" min-width="190" v-if="user.company.packageProvider">
  249. </el-table-column> -->
  250. <!-- <div v-if="user.company.packageProvider"> -->
  251. <template>
  252. <div v-for="(item, index) in listHeader" :key="index">
  253. <el-table-column prop="providerNames" :label="item" min-width="190" v-if="user.company.packageProvider">
  254. <template slot-scope="scope">
  255. <div>
  256. {{item | mobans(scope.row.providerInfoList)}}
  257. </div>
  258. </template>
  259. </el-table-column>
  260. </div>
  261. </template>
  262. <el-table-column prop="status" label="状态" min-width="100" sortable="custom">
  263. <template slot-scope="scope">
  264. {{scope.row.status == null?"-":statusTxt[scope.row.status]}}
  265. </template>
  266. </el-table-column>
  267. <!--专业项目协作-->
  268. <el-table-column prop="planStartDate" label="开始日期" min-width="96" >
  269. </el-table-column>
  270. <el-table-column prop="planEndDate" label="截止日期" min-width="96" >
  271. </el-table-column>
  272. <el-table-column prop="progress" label="完成度" min-width="100" v-if="user.company.packageProject == 1">
  273. <template slot-scope="scope">
  274. {{scope.row.progress==null?"-":scope.row.progress}}%
  275. </template>
  276. </el-table-column>
  277. <el-table-column label="操作" :width="showColumnWidth" align="left" fixed="right" v-if="showColumnWidth != '0' || permissions.projectManagement">
  278. <template slot-scope="scope">
  279. <el-button v-if="(permissions.projectManagement || user.id==scope.row.creatorId) && user.timeType.mainProjectState != '1'" size="mini" @click="subProject(scope.row)">子项目</el-button>
  280. <el-button size="mini" v-if="permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId" type="primary" @click="handleAdd(scope.$index, scope.row)">编辑</el-button>
  281. <!-- <el-button v-if="permissions.projectManagement || user.id==scope.row.creatorId" size="mini" @click="deletePro(scope.$index, scope.row)">删除</el-button> -->
  282. <el-dropdown class="customdropdown" split-button size="mini" @click="finishPro(scope.row)" v-if="(permissions.projectManagement || user.id==scope.row.creatorId || user.id==scope.row.inchargerId) && scope.row.status == 1" placement="bottom-start">
  283. 完成
  284. <el-dropdown-menu slot="dropdown" class="customdropdown_menu">
  285. <el-button size="mini" @click="cancelPro(scope.row)" class="customdropdown_menu_btn">撤销</el-button><br>
  286. <el-button size="mini" @click="suspendPro(scope.row)" class="customdropdown_menu_btn">暂停</el-button><br>
  287. </el-dropdown-menu>
  288. </el-dropdown>
  289. <el-button v-if="(permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId) && scope.row.status >= 2" size="mini" @click="restartPro(scope.row)">重启</el-button>
  290. </template>
  291. </el-table-column>
  292. </el-table>
  293. <!--工具条-->
  294. <el-col :span="24" class="toolbar">
  295. <el-button size="small" @click="batchSetWudulistBtn1" v-if="(user.timeType.customDegreeActive || user.company.packageProject) && (showColumnWidth != '0' || permissions.projectManagement)">取消</el-button>
  296. <template v-if="user.timeType.customDegreeActive && (showColumnWidth != '0' || permissions.projectManagement)">
  297. <el-button size="small" type="primary" @click="batchSetWudulistBtn2(true)">批量设置{{user.timeType.customDegreeName}}</el-button>
  298. <el-button size="small" type="primary" @click="batchSetWudulistBtn2(false)">批量添加{{user.timeType.customDegreeName}}</el-button>
  299. </template>
  300. <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
  301. <el-button size="small" type="primary" @click="addGroupPerson()" :loading="addGroupPersonBtnLoading">批量添加分组参与人</el-button>
  302. <el-button size="small" type="primary" @click="addProPreson()">批量添加项目参与人</el-button>
  303. </template>
  304. <el-pagination
  305. @size-change="handleSizeChange"
  306. @current-change="handleCurrentChange"
  307. :page-sizes="[20 , 50 , 80 , 100]"
  308. :page-size="size"
  309. layout="total, sizes, prev, pager, next"
  310. :total="total"
  311. style="float:right;"
  312. ></el-pagination>
  313. </el-col>
  314. <!--新增界面-->
  315. <el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="960px">
  316. <el-form ref="form1" :model="addForm" :rules="rules" label-width="120px">
  317. <el-form-item label="项目编号" >
  318. <el-input v-model="addForm.code" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目编号" clearable></el-input>
  319. </el-form-item>
  320. <el-form-item label="主项目" v-if="user.timeType.mainProjectState == '1'">
  321. <el-select v-model="addForm.projectMainId" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id" @change="projectManagementChange">
  322. <el-option v-for="(item) in mainProjectList" :key="item.id" :value="item.id" :label="item.name + '\u3000' + item.code">
  323. <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.code }}</span>
  324. <span style="float: right;margin-left: 20px">{{ item.name }}</span>
  325. </el-option>
  326. </el-select>
  327. </el-form-item>
  328. <el-form-item label="项目分类" v-if="user.timeType.mainProjectState != '1'">
  329. <el-select v-model="addForm.category" style="width:32%;" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id">
  330. <el-option v-for="(item) in baseClfList" :key="item.id" :value="item.id" :label="item.name"></el-option>
  331. </el-select>
  332. </el-form-item>
  333. <el-form-item label="项目名称" prop="name">
  334. <el-input v-model="addForm.name" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目名称" clearable></el-input>
  335. </el-form-item>
  336. <el-form-item label="项目描述" prop="projectDesc">
  337. <el-input v-model="addForm.projectDesc" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目描述" clearable maxlength="4000"></el-input>
  338. </el-form-item>
  339. <el-form-item label="项目类型" prop="isPublic">
  340. <el-select v-model="addForm.isPublic" style="width:32%;" @change="selectPublic" :disabled="!permissions.projectManagement && addForm.creatorId != user.id">
  341. <el-option :value="0" label="普通项目"></el-option>
  342. <el-option :value="1" label="公共项目"></el-option>
  343. </el-select>
  344. <el-tooltip effect="dark" content="普通项目只对参与人员开放,公共项目对所有成员开放" placement="top-start">
  345. <i class="el-icon-question"></i>
  346. </el-tooltip>
  347. <div v-if="user.company.packageCustomer == 1" style="display: inline-block;width: 50%">
  348. <span style="margin-left:63px;margin-right:10px;" >客户</span>
  349. <el-select v-model="addForm.customerId" clearable="true" filterable placeholder="请选择客户" style="width:70%;" >
  350. <el-option v-for="item in customerList" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
  351. </el-select>
  352. </div>
  353. </el-form-item>
  354. <!-- 供应商 -->
  355. <!-- <el-form-item label="供应商" v-if="user.company.packageProvider">
  356. <el-select v-model="addForm.supplierId" multiple collapse-tags style="width:32%;" placeholder="请选择供应商">
  357. <el-option v-for="item in supplierList" :key="item.id" :label="item.providerName" :value="item.id">
  358. </el-option>
  359. </el-select>
  360. </el-form-item> -->
  361. <el-form-item label="供应商" v-if="user.company.packageProvider">
  362. <el-select v-model="addForm.supplierId" multiple placeholder="请选择" filterable="true" style="width: 100%">
  363. <span v-for="(item, index) in supplierList" :key="index">
  364. <el-option :label="item.providerName" :value="item.id"></el-option>
  365. </span>
  366. </el-select>
  367. </el-form-item>
  368. <el-form-item :label="yonghuUser.customDegreeName" v-if="yonghuUser.customDegreeActive == 1">
  369. <el-select v-model="auseList" multiple placeholder="请选择" filterable="true" style="width: 100%">
  370. <span v-for="(item, index) in ause" :key="index">
  371. <el-option :label="item.name" :value="item.id"></el-option>
  372. </span>
  373. </el-select>
  374. </el-form-item>
  375. <!-- <el-form-item label="客户" v-if="user.company.packageCustomer == 1">
  376. <el-select v-model="addForm.customerId" clearable="true" filterable placeholder="请选择客户" style="width:100%;" >
  377. <el-option v-for="item in customerList" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
  378. </el-select>
  379. </el-form-item> -->
  380. <el-form-item label="全部参与者" v-show="addForm.isPublic == 0">
  381. <el-tooltip placement="top" effect="light">
  382. <div slot="content" style="width:780px">{{addForm.userNames}}</div>
  383. <el-input @focus="showChooseMembTree" v-model="addForm.userNames"></el-input>
  384. </el-tooltip>
  385. </el-form-item>
  386. <el-form-item label="项目经理" ><el-select v-model="addForm.inchargerId" :disabled="(addForm.userId.length==0 && addForm.isPublic == 0) || (!permissions.projectManagement && user.id != addForm.creatorId)" filterable placeholder="请选择项目经理" style="width:32%;" >
  387. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
  388. </el-select>
  389. </el-form-item>
  390. <el-form-item label="日报审核人" v-show="user.timeType.reportAuditType==0">
  391. <el-select v-model="addForm.auditUserIds" multiple="true" :disabled=" !(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable placeholder="默认为项目负责人" style="width:100%;" >
  392. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
  393. </el-select>
  394. </el-form-item>
  395. <!--专业项目协作版本功能 -->
  396. <el-form-item label="级别" v-if="user.company.packageProject==1">
  397. <el-select v-model="addForm.level" placeholder="请选择级别" style="width:32%;" v-if="user.timeType.projectLevelState == 1">
  398. <el-option v-for="item in levelList" :key="item.id" :label="item.projectLevelName" :value="item.id"></el-option>
  399. </el-select>
  400. <el-select v-model="addForm.level" placeholder="请选择级别" style="width:32%;" v-else>
  401. <el-option v-for="item in importanceList" :key="item.id" :label="item.label" :value="item.id"></el-option>
  402. </el-select>
  403. <!-- 增加合同金额字段 -->
  404. <span style="margin-left:63px;margin-right:10px;" v-if="user.company.packageProject==1">合同金额</span>
  405. <el-input id="contractAmount" v-model="addForm.contractAmount" style="width:33%;"
  406. placeholder="整数" clearable @keyup.native="restrictNumber('contractAmount')" :disabled="title == '新增项目' ? false : true"></el-input><span style="margin-left:10px;">元</span>
  407. <!-- 增加合同金额字段 -->
  408. </el-form-item>
  409. <el-form-item label="开始日期" prop="planStartDate" >
  410. <el-date-picker v-model="addForm.planStartDate"
  411. :editable="false" style="width:32%;"
  412. format="yyyy-MM-dd"
  413. value-format="yyyy-MM-dd"
  414. :clearable="false" type="date"
  415. placeholder="选择日期"></el-date-picker>
  416. <span style="margin-left:63px;margin-right:10px;" >截止日期</span>
  417. <el-date-picker v-model="addForm.planEndDate" style="width:33%;"
  418. :editable="false"
  419. format="yyyy-MM-dd"
  420. value-format="yyyy-MM-dd"
  421. :clearable="false" type="date"
  422. placeholder="选择日期"></el-date-picker>
  423. </el-form-item>
  424. <el-form-item label="项目产值" prop="outputValue" v-if="user.timeType.outputValueStatus == 1">
  425. <el-input id="outputValue" v-model="addForm.outputValue" style="width:32%;"
  426. placeholder="" clearable @keyup.native="restrictNumber('outputValue')">
  427. </el-input><span style="margin-left:10px;">元</span>
  428. </el-form-item>
  429. <!-- 单个公司的固定字段 -->
  430. <div v-if="user.companyId == '936'">
  431. <el-form-item label="合同编号" >
  432. <el-input v-model="addForm.contractCode" maxlength="50" show-word-limit placeholder="请输入合同编号" clearable></el-input>
  433. </el-form-item>
  434. <el-form-item label="质保开始时间">
  435. <el-date-picker v-model="addForm.warrantyStartDate"
  436. :editable="false" style="width:32%;"
  437. format="yyyy-MM-dd"
  438. value-format="yyyy-MM-dd"
  439. :clearable="false" type="date"
  440. placeholder="选择日期"></el-date-picker>
  441. <span style="margin-left:63px;margin-right:10px;" >质保截止时间</span>
  442. <el-date-picker v-model="addForm.warrantyEndDate" style="width:33%;"
  443. :editable="false"
  444. format="yyyy-MM-dd"
  445. value-format="yyyy-MM-dd"
  446. :clearable="false" type="date"
  447. placeholder="选择日期"></el-date-picker>
  448. </el-form-item>
  449. <el-form-item label="自主项目类别" >
  450. <el-input v-model="addForm.projectCategorySub" placeholder="请输入自主项目类别" clearable></el-input>
  451. </el-form-item>
  452. <el-form-item label="所属大区" >
  453. <el-input v-model="addForm.region" placeholder="请输入 所属大区" clearable></el-input>
  454. </el-form-item>
  455. <el-form-item label="所属BU" >
  456. <el-input v-model="addForm.bu" placeholder="所属BU" clearable></el-input>
  457. </el-form-item>
  458. </div>
  459. <div v-if="user.companyId == '428'">
  460. <el-form-item label="项目分组" >
  461. <el-input v-model="addForm.projectCategorySub" maxlength="50" show-word-limit placeholder="请输入项目分组" clearable></el-input>
  462. </el-form-item>
  463. </div>
  464. <!-- 项目基线 -->
  465. <div style="margin: 10px 0 30px 0;min-height:200px;" v-if="user.company.packageProject == 1">
  466. <el-tabs v-model="activeName" @tab-click="handleClick">
  467. <el-tab-pane label="成本基线" name="baseCostPanel" >
  468. <div style="padding-top:10px;">
  469. <!--新版 -->
  470. <span class="rg_span" v-for="(item, index) in projectBaseCostData" :key="item.id">
  471. <span style="width:120px;display: inline-block;" v-if="user.company.packageProject==1">{{item.baseName}}</span>
  472. <el-input :id="'baseCost'+index" @input="addUpfun()" v-model="item.baseAmount" style="width:200px; margin-bottom: 20px"
  473. placeholder="整数" clearable @keyup.native="restrictNumber('baseCost'+index)"></el-input><span style="margin-left:10px;">元</span>
  474. </span>
  475. <!-- 合计 -->
  476. <div style="margin-top: 10px;float:right;">
  477. <span style="margin-right:50px;margin-right:10px;" v-if="user.company.packageProject==1">合计</span>
  478. <span v-if="addForm.budget <= 0 || addForm.budget == undefined">0</span>
  479. <span v-else>{{addForm.budget | numberToCurrency}}</span>
  480. <span style="margin-right:50px;margin-left:10px;">元</span>
  481. </div>
  482. </div>
  483. </el-tab-pane>
  484. <el-tab-pane label="工程专业" name="engineeringProfession" v-if="user.company.packageEngineering == 1">
  485. <div style="padding-top:10px;">
  486. <el-table :data="projectProfessionList" size="small" :key="Math.random()">
  487. <el-table-column prop="professionId" width="200">
  488. <template slot-scope="scope">
  489. <el-select v-model="scope.row.professionId" >
  490. <el-option v-for="item in professionList" :key="item.id" :label="item.name" :value="item.id"/>
  491. </el-select>
  492. </template>
  493. <template slot="header" >
  494. <span style="font-size:14px;font-weight:normal;">专业名称</span>
  495. </template>
  496. </el-table-column>
  497. <el-table-column prop="percentage" width="120" label="占比(%)">
  498. <template slot-scope="scope">
  499. <div><el-input type="number" v-model="scope.row.percentage"></el-input></div>
  500. </template>
  501. </el-table-column>
  502. <el-table-column prop="membNames" label="相关人员及占比">
  503. <template slot-scope="scope">
  504. <span style="margin:0 5px;" v-for="item in scope.row.membList" :key="item.membId">{{item.membName}}({{item.percentage}}%)</span>
  505. <el-link @click="showEditPpMembs(scope.row)">{{(scope.row.membList == null || scope.row.membList.length == 0)?'设置专业参与人员':'设置'}}</el-link>
  506. </template>
  507. </el-table-column>
  508. <el-table-column prop="inchargerName" width="120" label="负责人">
  509. <template slot-scope="scope">
  510. <el-select v-model="scope.row.inchargerId" >
  511. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id">
  512. </el-option>
  513. </el-select>
  514. </template>
  515. </el-table-column>
  516. <el-table-column width="80">
  517. <template slot-scope="scope">
  518. <el-button icon="el-icon-delete" size="mini" style="margin-left:10px;" @click.stop.native="deleteItem(scope.$index)"></el-button>
  519. </template>
  520. <template slot="header" >
  521. <el-link type="primary" :underline="false" @click="addItem">添加</el-link>
  522. </template>
  523. </el-table-column>
  524. </el-table>
  525. </div>
  526. </el-tab-pane>
  527. <el-tab-pane label="相关领导" name="leaders" >
  528. <div style="padding-top:10px;">
  529. <el-input @focus="showChooseLeaderTree" v-model="addForm.notifyUserNames" placeholder="请选择需要接收审核通知的相关领导"></el-input>
  530. </div>
  531. </el-tab-pane>
  532. </el-tabs>
  533. </div>
  534. </el-form>
  535. <div slot="footer" class="dialog-footer;">
  536. <el-button @click.native="deletePro(1, addForm)" v-if="(permissions.projectManagement || user.id==deleteVif) && addForm.id" style="float:left">删除</el-button>
  537. <el-button @click.native="addFormVisible = false">取消</el-button>
  538. <el-button type="primary" @click="submitInsert" :loading="addLoading">提交</el-button>
  539. </div>
  540. </el-dialog>
  541. <!--用户详细信息弹出框-->
  542. <el-dialog title="查看详情" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
  543. <div class="line"><span>姓名</span><span>{{userDetail.name}}</span></div>
  544. <div class="line"><span>手机号码</span><span>{{userDetail.phone}}</span></div>
  545. <div class="line"><span>角色</span><span>{{roleArray[userDetail.role]}}</span></div>
  546. <div class="line"><span>部门</span><span>{{userDetail.departmentName}}</span></div>
  547. <div slot="footer" class="dialog-footer">
  548. <el-button type="primary" @click="userDetailVisible = false" >确定</el-button>
  549. </div>
  550. </el-dialog>
  551. <!-- 子项目列表 -->
  552. <el-dialog title="子项目列表" show-header="false" v-if="subProjectVisible" :visible.sync="subProjectVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  553. <el-table :data="subProjectList" highlight-current-row height="400" style="width: 100%;">
  554. <!-- <el-table-column type="index" width="60" label="序号">
  555. <template slot-scope="scope" >
  556. {{scope.$index+1+(page-1)*size}}
  557. </template>
  558. </el-table-column> -->
  559. <el-table-column width="120" label="子项目编号" prop="code"></el-table-column>
  560. <el-table-column prop="name" label="名称" ></el-table-column>
  561. <el-table-column label="操作" width="150">
  562. <template slot-scope="scope" >
  563. <el-button size="small" type="primary" @click="addNewSubProject(scope.row)">编辑</el-button>
  564. <el-button size="small" type="danger" @click="deleteSubPro(scope.row)">删除</el-button>
  565. </template>
  566. </el-table-column>
  567. </el-table>
  568. <div slot="footer" class="dialog-footer">
  569. <el-button type="primary" @click="subProjectVisible = false" >关闭</el-button>
  570. <el-button type="primary" @click="addNewSubProject()" >新增子项目</el-button>
  571. </div>
  572. </el-dialog>
  573. <!-- 新增子项目弹出框 -->
  574. <el-dialog title="新增/修改子项目" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="500px">
  575. <el-form ref="form2" :model="temaddForm" :rules="rules" label-width="100px">
  576. <!-- <el-form-item label="项目编号" prop="code"> -->
  577. <el-form-item label="项目编号">
  578. <el-input v-model="temaddForm.code" placeholder="请输入项目编号" clearable></el-input>
  579. </el-form-item>
  580. <el-form-item label="项目名称" prop="name">
  581. <el-input v-model="temaddForm.name" placeholder="请输入项目名称" clearable></el-input>
  582. </el-form-item>
  583. </el-form>
  584. <div slot="footer" class="dialog-footer">
  585. <el-button @click.native="addSubProject = false">取消</el-button>
  586. <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">提交</el-button>
  587. </div>
  588. </el-dialog>
  589. <!-- 项目基线成本项配置弹出框 -->
  590. <el-dialog title="项目基线成本项管理" show-header="false" v-if="showBaseConfig" :visible.sync="showBaseConfig" :close-on-click-modal="false" customClass="customWidth" width="600px">
  591. <el-table :data="baseCostItemList" highlight-current-row height="400" style="width: 100%;">
  592. <el-table-column type="index" width="60" label="序号">
  593. <template slot-scope="scope" >
  594. {{scope.$index+1+(page-1)*size}}
  595. </template>
  596. </el-table-column>
  597. <el-table-column prop="name" label="名称" ></el-table-column>
  598. <el-table-column prop="alarmType" label="预警">
  599. <template slot-scope="scope">
  600. <span>{{scope.row.alarmType ? "工时成本预警" : "无预警"}}</span>
  601. </template>
  602. </el-table-column>
  603. <el-table-column label="操作" width="150">
  604. <template slot-scope="scope" >
  605. <el-button size="small" type="primary" @click="addNewBaseItem(scope.row)">编辑</el-button>
  606. <el-button size="small" type="danger" @click="deleteBaseItem(scope.row)">删除</el-button>
  607. </template>
  608. </el-table-column>
  609. </el-table>
  610. <div slot="footer" class="dialog-footer">
  611. <el-button type="primary" @click="showBaseConfig = false" >关闭</el-button>
  612. <el-button type="primary" @click="addNewBaseItem()" >新增成本项</el-button>
  613. </div>
  614. </el-dialog>
  615. <!-- 分类条目配置 -->
  616. <el-dialog title="项目分类条目管理" show-header="false" v-if="showClfDialog" :visible.sync="showClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  617. <el-table :data="baseClfList" highlight-current-row height="400" style="width: 100%;">
  618. <el-table-column type="index" width="60" label="序号">
  619. <template slot-scope="scope" >
  620. {{scope.$index+1+(page-1)*size}}
  621. </template>
  622. </el-table-column>
  623. <el-table-column prop="name" label="名称" ></el-table-column>
  624. <el-table-column label="操作" width="150">
  625. <template slot-scope="scope" >
  626. <el-button size="small" type="primary" @click="addNewClf(scope.row)">编辑</el-button>
  627. <el-button size="small" type="danger" @click="deleteClf(scope.row)">删除</el-button>
  628. </template>
  629. </el-table-column>
  630. </el-table>
  631. <div slot="footer" class="dialog-footer">
  632. <el-button type="primary" @click="showClfDialog = false" >关闭</el-button>
  633. <el-button type="primary" @click="addNewClf()" >新增分类项</el-button>
  634. </div>
  635. </el-dialog>
  636. <!-- 主项目配置 -->
  637. <el-dialog title="主项目管理" show-header="false" v-if="mainProjectDialog" :visible.sync="mainProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="800px">
  638. <el-table :data="mainProjectList" highlight-current-row height="400" style="width: 100%;">
  639. <el-table-column type="index" width="60" label="序号">
  640. <template slot-scope="scope" >
  641. {{scope.$index+1+(page-1)*size}}
  642. </template>
  643. </el-table-column>
  644. <el-table-column prop="code" label="编号" ></el-table-column>
  645. <el-table-column prop="name" label="名称" ></el-table-column>
  646. <el-table-column prop="categoryName" label="分类名称" ></el-table-column>
  647. <el-table-column label="操作" width="150">
  648. <template slot-scope="scope" >
  649. <el-button size="small" type="primary" @click="addManPro(scope.row)">编辑</el-button>
  650. <el-button size="small" type="danger" @click="deleteManPro(scope.row)">删除</el-button>
  651. </template>
  652. </el-table-column>
  653. </el-table>
  654. <div slot="footer" class="dialog-footer">
  655. <el-button type="primary" @click="mainProjectDialog = false" >关闭</el-button>
  656. <el-button type="primary" @click="addManPro()" >新增主项目</el-button>
  657. </div>
  658. </el-dialog>
  659. <!-- 项目阶段配置 -->
  660. <el-dialog title="项目阶段管理" show-header="false" v-if="phaseProjectDialog" :visible.sync="phaseProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  661. <el-table :data="phaseList" highlight-current-row height="400" style="width: 100%;">
  662. <el-table-column type="index" width="60" label="序号">
  663. <template slot-scope="scope" >
  664. {{scope.$index+1+(page-1)*size}}
  665. </template>
  666. </el-table-column>
  667. <el-table-column prop="projectStageName" label="阶段名称" ></el-table-column>
  668. <el-table-column label="操作" width="150">
  669. <template slot-scope="scope" >
  670. <el-button size="small" type="primary" @click="addPanthPro(scope.row)">编辑</el-button>
  671. <el-button size="small" type="danger" @click="deletePanthPro(scope.row)">删除</el-button>
  672. </template>
  673. </el-table-column>
  674. </el-table>
  675. <div slot="footer" class="dialog-footer">
  676. <el-button type="primary" @click="phaseProjectDialog = false" >关闭</el-button>
  677. <el-button type="primary" @click="addPanthPro()" >新增项目阶段</el-button>
  678. </div>
  679. </el-dialog>
  680. <!-- 项目级别管理 -->
  681. <el-dialog title="项目级别管理" show-header="false" v-if="projectLevelDialog" :visible.sync="projectLevelDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  682. <el-table :data="levelList" highlight-current-row height="400" style="width: 100%;" >
  683. <el-table-column type="index" width="60" label="序号">
  684. <template slot-scope="scope" >
  685. {{scope.$index+1+(page-1)*size}}
  686. </template>
  687. </el-table-column>
  688. <el-table-column prop="projectLevelName" label="级别名称" ></el-table-column>
  689. <el-table-column label="操作" width="150">
  690. <template slot-scope="scope" >
  691. <el-button size="small" type="primary" @click="addProjectLevel(scope.row)">编辑</el-button>
  692. <el-button size="small" type="danger" @click="deleteProjectLevel(scope.row)">删除</el-button>
  693. </template>
  694. </el-table-column>
  695. </el-table>
  696. <div slot="footer" class="dialog-footer">
  697. <el-button type="primary" @click="projectLevelDialog = false" >关闭</el-button>
  698. <el-button type="primary" @click="addProjectLevel()" >新增项目级别</el-button>
  699. </div>
  700. </el-dialog>
  701. <!-- 新增/编辑项目级别 -->
  702. <el-dialog title="新增/修改项目级别" v-if="addProjectLevelDialog" :visible.sync="addProjectLevelDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  703. <el-form ref="form2" :model="addLevelForm" :rules="rules" label-width="120px">
  704. <el-form-item label="项目级别名称" prop="projectLevelName">
  705. <el-input v-model="addLevelForm.projectLevelName" placeholder="请输入名称" clearable></el-input>
  706. </el-form-item>
  707. </el-form>
  708. <div slot="footer" class="dialog-footer">
  709. <el-button @click="addProjectLevelDialog = false">取消</el-button>
  710. <el-button type="primary" @click="submitLevelPro" :loading="addLoading">提交</el-button>
  711. </div>
  712. </el-dialog>
  713. <!-- 新增/编辑 分类条目 -->
  714. <el-dialog title="新增/修改分类条目" v-if="addClfDialog" :visible.sync="addClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  715. <el-form ref="form2" :model="addClf" :rules="rules" label-width="100px">
  716. <el-form-item label="主项目名称" prop="name">
  717. <el-input v-model="addClf.name" placeholder="请输入主项目名称" clearable></el-input>
  718. </el-form-item>
  719. </el-form>
  720. <div slot="footer" class="dialog-footer">
  721. <el-button @click.native="addClfDialog = false">取消</el-button>
  722. <el-button type="primary" @click="submitClf" :loading="addLoading">提交</el-button>
  723. </div>
  724. </el-dialog>
  725. <!-- 新增/编辑主项目 -->
  726. <el-dialog title="新增/修改主项目" v-if="addFlgmainProjectDialog" :visible.sync="addFlgmainProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  727. <el-form ref="form2" :model="addMainForm" :rules="rules" label-width="100px">
  728. <!-- <el-form-item label="主项目编号" prop="code"> -->
  729. <el-form-item label="主项目编号">
  730. <el-input v-model="addMainForm.code" placeholder="请输入编号" clearable></el-input>
  731. </el-form-item>
  732. <el-form-item label="主项目名称" prop="name">
  733. <el-input v-model="addMainForm.name" placeholder="请输入名称" clearable></el-input>
  734. </el-form-item>
  735. <el-form-item label="项目分类">
  736. <el-select v-model="addMainForm.categoryId" placeholder="请选择分类" clearable >
  737. <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id"></el-option>
  738. </el-select>
  739. </el-form-item>
  740. </el-form>
  741. <div slot="footer" class="dialog-footer">
  742. <el-button @click.native="addFlgmainProjectDialog = false">取消</el-button>
  743. <el-button type="primary" @click="submitManPro" :loading="addLoading">提交</el-button>
  744. </div>
  745. </el-dialog>
  746. <!-- 新增/编辑项目阶段 -->
  747. <el-dialog title="新增/修改项目阶段" v-if="addFlgPanthProjectDialog" :visible.sync="addFlgPanthProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  748. <el-form ref="form2" :model="addPanthForm" :rules="rules" label-width="120px">
  749. <el-form-item label="项目阶段名称" prop="name">
  750. <el-input v-model="addPanthForm.projectStageName" placeholder="请输入名称" clearable></el-input>
  751. </el-form-item>
  752. </el-form>
  753. <div slot="footer" class="dialog-footer">
  754. <el-button @click.native="addFlgPanthProjectDialog = false">取消</el-button>
  755. <el-button type="primary" @click="submitPanthPro" :loading="addLoading">提交</el-button>
  756. </div>
  757. </el-dialog>
  758. <el-dialog title="新增/修改成本项" v-if="addBaseItemDialog" :visible.sync="addBaseItemDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  759. <el-form ref="form2" :model="addForm" :rules="rules" label-width="100px">
  760. <el-form-item label="成本项名称" prop="name">
  761. <el-input v-model="addForm.name" placeholder="请输入名称" clearable></el-input>
  762. </el-form-item>
  763. <el-form-item label="预警" prop="alarmType">
  764. <el-radio v-model="addForm.alarmType" :label="0">无预警</el-radio>
  765. <el-radio v-model="addForm.alarmType" :label="1">工时成本预警</el-radio>
  766. </el-form-item>
  767. </el-form>
  768. <div slot="footer" class="dialog-footer">
  769. <el-button @click.native="addBaseItemDialog = false">取消</el-button>
  770. <el-button type="primary" @click="submitInsertBaseItem" :loading="addLoading">提交</el-button>
  771. </div>
  772. </el-dialog>
  773. <!-- 按部门选择人员 -->
  774. <el-dialog title="选择参与人员" v-if="chooseParticipVisible" :visible.sync="chooseParticipVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  775. <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
  776. <div class="tree" style="height:400px">
  777. <el-scrollbar style="height:100%">
  778. <el-input
  779. placeholder="输入关键字进行过滤"
  780. v-model="filterText">
  781. </el-input>
  782. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  783. ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
  784. highlight-current :filter-node-method="filterNode"></el-tree>
  785. </el-scrollbar>
  786. </div>
  787. <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>
  788. <div slot="footer" class="dialog-footer">
  789. <el-button @click="chooseParticipVisible = false" >取消</el-button>
  790. <el-button type="primary" @click="chooseParticip()" >确定</el-button>
  791. </div>
  792. </el-dialog>
  793. <!-- 按部门选择相关领导 -->
  794. <el-dialog title="选择相关领导" v-if="chooseLeaderVisible" :visible.sync="chooseLeaderVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  795. <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
  796. <div class="tree" style="height:400px">
  797. <el-scrollbar style="height:100%">
  798. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  799. ref="chooseLeaderTree" @check-change="onLeaderTreeItemChange" :default-checked-keys="addForm.notifyUserIds"
  800. highlight-current ></el-tree>
  801. </el-scrollbar>
  802. </div>
  803. <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>
  804. <div slot="footer" class="dialog-footer">
  805. <el-button @click="chooseLeaderVisible = false" >取消</el-button>
  806. <el-button type="primary" @click="chooseLeader()" >确定</el-button>
  807. </div>
  808. </el-dialog>
  809. <!-- 项目专业人员的设置 -->
  810. <el-dialog title="设置项目专业人员" v-if="editPpMembDialog" :visible.sync="editPpMembDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  811. <el-table :data="curProfessionRow.membList" height="400">
  812. <el-table-column prop="name" label="专业人员">
  813. <template slot-scope="scope">
  814. <el-select v-model="scope.row.membId" filterable placeholder="请选择专业参与人" style="width:100%;" >
  815. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id">
  816. </el-option>
  817. </el-select>
  818. </template>
  819. </el-table-column>
  820. <el-table-column prop="percentage" width="120" label="占比(%)">
  821. <template slot-scope="scope">
  822. <el-input type="number" v-model="scope.row.percentage"></el-input>
  823. </template>
  824. </el-table-column>
  825. <el-table-column width="80">
  826. <template slot-scope="scope">
  827. <el-button icon="el-icon-delete" size="mini" style="margin-left:10px;" @click.stop.native="deleteMembItem(scope.$index)"></el-button>
  828. </template>
  829. <template slot="header" >
  830. <el-link @click="addMembItem">添加</el-link>
  831. </template>
  832. </el-table-column>
  833. </el-table>
  834. <div slot="footer" class="dialog-footer">
  835. <el-button @click="editPpMembDialog = false" >取消</el-button>
  836. <el-button type="primary" @click="addPpMemb" >确定</el-button>
  837. </div>
  838. </el-dialog>
  839. <!-- 批量修改自定义维度 -->
  840. <el-dialog :title="checkoradd ? '批量修改' : '批量添加'" :visible.sync="checkedWuduDialog" v-if="checkedWuduDialog" width="40%">
  841. <el-form model="" label-width="20%">
  842. <el-form-item :label="'设置' + user.timeType.customDegreeName">
  843. <el-select v-model="checkedWuduArr" value-key="id" :placeholder="'请选择' + user.timeType.customDegreeName" multiple style="width: 100%">
  844. <el-option v-for="item in ause" :key="item.id" :label="item.name" :value="item"></el-option>
  845. </el-select>
  846. </el-form-item>
  847. </el-form>
  848. <div slot="footer" class="dialog-footer">
  849. <el-button @click="checkedWuduDialog = false">取消</el-button>
  850. <el-button type="primary" @click="batchSetWudulistBtn3" v-if="checkoradd">确定</el-button>
  851. <el-button type="primary" @click="batchSetWudulistBtn4" v-if="!checkoradd">确定</el-button>
  852. </div>
  853. </el-dialog>
  854. <!-- 批量添加参与人 -->
  855. <el-dialog :title="isAddGroupPerson ? '批量添加分组参与人' : '批量添加项目参与人'" v-if="addGroupPersonDialog" :visible.sync="addGroupPersonDialog" width="40%">
  856. <el-form label-width="20%">
  857. <el-form-item label="选择人员">
  858. <el-tooltip placement="top" effect="light">
  859. <div slot="content" style="width:450px">{{addGroupPersonData.personNames}}</div>
  860. <el-input @focus="addGroupPersonP" v-model="addGroupPersonData.personNames"></el-input>
  861. </el-tooltip>
  862. </el-form-item>
  863. <el-form-item label="选择分组" v-if="isAddGroupPerson">
  864. <el-select v-model="addGroupPersonData.group" multiple placeholder="请选择分组" style="width:100%">
  865. <el-option v-for="item in addGroupList"
  866. :key="item.groupIds"
  867. :label="item.name"
  868. :value="item.groupIds"></el-option>
  869. </el-select>
  870. </el-form-item>
  871. </el-form>
  872. <div slot="footer" class="dialog-footer">
  873. <el-button @click="addGroupPersonDialog = false" >取消</el-button>
  874. <el-button type="primary" @click="addGroupPersonSure()" v-if="isAddGroupPerson">确定</el-button>
  875. <el-button type="primary" @click="addProPersonSure()" v-else>确定</el-button>
  876. </div>
  877. <el-dialog append-to-body title="选择人员" v-if="addGroupPersonPdialog" :visible.sync="addGroupPersonPdialog" width="40%">
  878. <div class="tree" style="height:300px">
  879. <el-scrollbar style="height:100%">
  880. <el-input
  881. placeholder="输入关键字进行过滤"
  882. v-model="filterText2">
  883. </el-input>
  884. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  885. ref="chooseMembTree2" @check-change="addPersonCheck"
  886. highlight-current :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person"></el-tree>
  887. </el-scrollbar>
  888. </div>
  889. <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>
  890. <div slot="footer" class="dialog-footer">
  891. <el-button @click="addGroupPersonPdialog = false" >取消</el-button>
  892. <el-button type="primary" @click="addPersonSure()" >确定</el-button>
  893. </div>
  894. </el-dialog>
  895. </el-dialog>
  896. <el-dialog append-to-body title="项目导入结果" v-if="showImportResult" :visible.sync="showImportResult" width="40%">
  897. <div >
  898. {{importResultMsg}}
  899. </div>
  900. </el-dialog>
  901. </section>
  902. </template>
  903. <style scoped>
  904. .input-with-select .el-input-group__prepend {
  905. background-color: #fff;
  906. }
  907. .line {
  908. padding:10px;
  909. }
  910. .line span{
  911. font-size:15px;
  912. }
  913. .line span:nth-child(even){
  914. float:right;
  915. }
  916. .kans {
  917. width: 230px;
  918. overflow:hidden;
  919. white-space:nowrap;
  920. text-overflow: ellipsis;
  921. }
  922. a {
  923. text-decoration: none;
  924. }
  925. .router-link-active {
  926. text-decoration: none;
  927. }
  928. </style>
  929. <script>
  930. import util from "../../common/js/util";
  931. import projectgantt from "./project_gantt.vue"
  932. export default {
  933. components:{projectgantt},
  934. data() {
  935. return {
  936. addFlgmainProjectDialog: false,
  937. addFlgPanthProjectDialog: false,
  938. addProjectLevelDialog: false,
  939. mainProjectList: [],
  940. mainProjectDialog: false,
  941. projectLevelDialog: false,
  942. showImportResult: false,
  943. importResultMsg:null,
  944. isganttshow: false,
  945. deleteAlertMsg: null,
  946. chosenLeaders:[],
  947. chooseLeaderVisible:false,
  948. projectProfessionItem:null,
  949. curProfessionRow:null,
  950. editPpMembDialog:false,
  951. professionList:[],
  952. projectProfessionList:[],
  953. activeName:"baseCostPanel",
  954. chosenMembCount:0,
  955. chosenMembList:[],//选中的人员
  956. allMembData:[],
  957. deptMembData: [
  958. {
  959. id: 0,
  960. label: '未分配',
  961. }
  962. ],
  963. option: [],
  964. depData: {
  965. id: -1,
  966. label: '全部人员',
  967. },
  968. defaultProps: {
  969. children: 'children',
  970. label: 'label'
  971. },
  972. filterName:null,
  973. chooseParticipVisible: false,
  974. projectBaseCostData:[],
  975. addBaseItemDialog:false,
  976. showBaseConfig:false,
  977. customerList:[],
  978. roleArray:["普通员工","超级管理员", "系统管理员", "公司高层","财务管理员", "项目管理员"],
  979. status:"1",
  980. statusTxt:["-","进行中","已完成","已撤销","已暂停"],
  981. importanceList:[{id:1,label:'正常'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}],
  982. importanceListLable:['正常', '紧急', '重要', '重要且紧急', '低风险', '中风险', '高风险'],
  983. searchField:'1',
  984. keyword:null,
  985. user: JSON.parse(sessionStorage.getItem("user")),
  986. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  987. userDetailVisible: false,
  988. userDetail:{},
  989. date: new Date(),
  990. users: [],
  991. participator:[],
  992. tableHeight: 0,
  993. listLoading: false,
  994. total: 0,
  995. page: 1,
  996. size: localStorage.getItem("projectPageSize")==null?20:parseInt(localStorage.getItem("projectPageSize")),
  997. list: [],
  998. subProjectVisible: false,
  999. subProjectList: [],//子项目列表
  1000. currentProject:{},
  1001. addSubProject: false,
  1002. addFormVisible: false,
  1003. addLoading: false,
  1004. addUp: 0, // 合计
  1005. title: "",
  1006. addForm: {
  1007. name: '',
  1008. userId: [],
  1009. level:1,
  1010. id: '',
  1011. code: '',
  1012. projectDesc: '',
  1013. alarmType: 0
  1014. },
  1015. temaddForm: {},
  1016. rules: {
  1017. name: [{ required: true, message: "请输入名称", trigger: "blur" }],
  1018. code: [{ required: true, message: "请输入编号", trigger: "blur" }],
  1019. projectStageName: [{ required: true, message: "请输入名称", trigger: "blur" }],
  1020. projectLevelName: [{ required: true, message: "请输入名称", trigger: "blur" }],
  1021. },
  1022. ause: [],
  1023. auseList: [],
  1024. yonghuUser: [],
  1025. filterText: '',
  1026. filterText2: '',
  1027. showClfDialog: false,
  1028. addClfDialog:false,
  1029. addClf:{name:'',id:''},
  1030. addMainForm:{
  1031. name:'',
  1032. id:'',
  1033. code: '',
  1034. categoryId: ''
  1035. },
  1036. addPanthForm: {
  1037. id: '',
  1038. projectStageName: ''
  1039. },
  1040. addLevelForm: {
  1041. id: '',
  1042. projectStageName: ''
  1043. },
  1044. statusClf:null,
  1045. permissionsObj: {},
  1046. checkedProjectArr: [],
  1047. checkedWuduDialog: false,
  1048. checkedWuduArr: [],
  1049. checkoradd: true,
  1050. addGroupPersonBtnLoading: false,
  1051. addGroupPersonDialog: false,
  1052. addGroupList: [],
  1053. addGroupPersonData: {
  1054. group: [],
  1055. person: null,
  1056. personNames: ''
  1057. },
  1058. addGroupPersonPdialog: false,
  1059. showColumnWidth: '300',
  1060. deleteVif: null,
  1061. isAddGroupPerson: true,
  1062. projectMainId: '',
  1063. supplierList: '',
  1064. sortProp: '',
  1065. sortOrder: null,
  1066. currentCell: null, // 当前单击的是哪一个单元格
  1067. phaseList: [],
  1068. phaseProjectId: '', // 阶段项目id
  1069. phaseProjectValie: null, // 阶段项目值
  1070. listHeader: [], // 列表表头
  1071. rowid: '',
  1072. phaseProjectDialog: false, // 项目阶段
  1073. levelList: [], // 项目级别
  1074. };
  1075. },
  1076. // 过滤器
  1077. filters: {
  1078. numberToCurrency(value) {
  1079. if (!value) return '0.00'
  1080. // 将数值截取,保留两位小数
  1081. value = value.toFixed(2)
  1082. // 获取整数部分
  1083. const intPart = Math.trunc(value)
  1084. // 整数部分处理,增加,
  1085. const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  1086. // 预定义小数部分
  1087. let floatPart = '.00'
  1088. // 将数值截取为小数部分和整数部分
  1089. const valueArray = value.toString().split('.')
  1090. if (valueArray.length === 2) { // 有小数部分
  1091. floatPart = valueArray[1].toString() // 取得小数部分
  1092. return intPartFormat + '.' + floatPart
  1093. }
  1094. return intPartFormat + floatPart
  1095. },
  1096. mobans(value, valueList) {
  1097. for(var i in valueList) {
  1098. if(valueList[i].providerCateGoryName == value) {
  1099. return valueList[i].providerInfoName
  1100. }
  1101. }
  1102. },
  1103. },
  1104. watch: {
  1105. filterText(val) {
  1106. this.$refs.chooseMembTree.filter(val);
  1107. },
  1108. filterText2(val) {
  1109. this.$refs.chooseMembTree2.filter(val);
  1110. }
  1111. },
  1112. methods: {
  1113. hoverCall(row) {
  1114. this.rowid=row.id
  1115. },
  1116. handCall() {
  1117. this.rowid = ''
  1118. },
  1119. // 获取阶段
  1120. obtainPhase(item) {
  1121. this.http.post('/project-stage/list', {},
  1122. res => {
  1123. if (res.code == "ok") {
  1124. // this.phaseList = res.data
  1125. this.$set(this, 'phaseList', res.data)
  1126. } else {
  1127. this.$message({
  1128. message: res.msg,
  1129. type: "error"
  1130. });
  1131. }
  1132. },
  1133. error => {
  1134. this.$message({
  1135. message: error,
  1136. type: "error"
  1137. });
  1138. });
  1139. },
  1140. // 获取级别
  1141. getProjectLevel(){
  1142. this.http.post('/project-level/list', {},
  1143. res => {
  1144. if (res.code == "ok") {
  1145. this.levelList = res.data
  1146. // this.$set(this, 'levelList', res.data)
  1147. } else {
  1148. this.$message({
  1149. message: res.msg,
  1150. type: "error"
  1151. });
  1152. }
  1153. },
  1154. error => {
  1155. this.$message({
  1156. message: error,
  1157. type: "error"
  1158. });
  1159. });
  1160. },
  1161. addProjectLevel(row){
  1162. this.addProjectLevelDialog = true
  1163. if(!row) {
  1164. this.addLevelForm = {
  1165. projectLevelName: '',
  1166. id: ''
  1167. // companyId:''
  1168. }
  1169. } else {
  1170. this.addLevelForm = {
  1171. id: row.id,
  1172. projectLevelName: row.projectLevelName
  1173. // companyId: row.companyId
  1174. }
  1175. }
  1176. },
  1177. deleteProjectLevel(row) {
  1178. this.$confirm("该操作可能造成已有数据丢失,确定要删除吗?","删除项目级别", {
  1179. confirmButtonText: "确定",
  1180. cancelButtonText: "取消",
  1181. type: "warning"
  1182. })
  1183. .then(() => {
  1184. this.listLoading = true;
  1185. this.http.post('/project-level/delete',{
  1186. id: row.id
  1187. },
  1188. res => {
  1189. this.listLoading = false;
  1190. if (res.code == "ok") {
  1191. this.$message({
  1192. message: "删除成功",
  1193. type: "success"
  1194. });
  1195. this.getProjectLevel();
  1196. } else {
  1197. this.$message({
  1198. message: res.msg,
  1199. type: "error"
  1200. });
  1201. }
  1202. },
  1203. error => {
  1204. this.listLoading = false;
  1205. this.$message({
  1206. message: error,
  1207. type: "error"
  1208. });
  1209. }
  1210. );
  1211. })
  1212. .catch(() => {});
  1213. },
  1214. submitLevelPro(){
  1215. this.http.post('/project-level/addOrMod',this.addLevelForm,
  1216. res => {
  1217. if (res.code == "ok") {
  1218. this.addProjectLevelDialog = false;
  1219. this.getProjectLevel()
  1220. } else {
  1221. this.$message({
  1222. message: res.msg,
  1223. type: "error"
  1224. });
  1225. }
  1226. },
  1227. error => {
  1228. this.$message({
  1229. message: error,
  1230. type: "error"
  1231. });
  1232. }
  1233. );
  1234. },
  1235. // 表格点击
  1236. tableCellClassName({row, column, rowIndex, columnIndex}) {
  1237. row.index=rowIndex;
  1238. column.index=columnIndex;
  1239. },
  1240. clickCell(row,column) {
  1241. // console.log('can can need',row,column)
  1242. if(this.permissions.projectManagement || this.user.id==row.inchargerId || this.user.id==row.creatorId) {
  1243. this.phaseProjectValie = row.currentStageId ? row.currentStageId : ''
  1244. this.currentCell = row.index + ',' + column.index;
  1245. // if(column.label == '项目阶段') {
  1246. this.phaseProjectId = row.id
  1247. // this.obtainPhase(row)
  1248. // }
  1249. setTimeout(() => {
  1250. // 获得焦点
  1251. this.$refs[row.index + ',' + column.index].focus();
  1252. })
  1253. }
  1254. },
  1255. selectChange() {
  1256. let currentStageName = ''
  1257. for(var i in this.phaseList) {
  1258. if(this.phaseList[i].id == this.phaseProjectValie) {
  1259. currentStageName = this.phaseList[i].projectStageName
  1260. }
  1261. }
  1262. this.http.post('/project/changeCurrentStage', {
  1263. projectId: this.phaseProjectId,
  1264. currentStageId: this.phaseProjectValie,
  1265. currentStageName: currentStageName
  1266. },
  1267. res => {
  1268. if (res.code == "ok") {
  1269. this.getList()
  1270. } else {
  1271. this.$message({
  1272. message: res.msg,
  1273. type: "error"
  1274. });
  1275. }
  1276. },
  1277. error => {
  1278. this.$message({
  1279. message: error,
  1280. type: "error"
  1281. });
  1282. });
  1283. },
  1284. hideSelect() {
  1285. var that = this
  1286. setTimeout(() => {
  1287. that.currentCell = null
  1288. }, 500)
  1289. },
  1290. // 点击主项目事件
  1291. projectManagementChange() {
  1292. let categoryId = ''
  1293. for(var i in this.mainProjectList) {
  1294. if(this.mainProjectList[i].id == this.addForm.projectMainId) {
  1295. categoryId = this.mainProjectList[i].categoryId
  1296. }
  1297. }
  1298. categoryId == '' ? '' : this.addForm.category = categoryId
  1299. console.log(this.addForm)
  1300. },
  1301. tableSort({column, prop, order}){
  1302. if(prop == 'inchargerName' || prop == 'customerName' || prop == 'projectCode' || prop == 'categoryName' || prop == 'projectName' || prop == 'status' || prop == 'currentStage'){
  1303. this.sortOrder = order
  1304. this.sortProp = prop
  1305. this.getList()
  1306. }
  1307. },
  1308. //获取项目列表
  1309. getSupplierList() {
  1310. this.http.post('/provider-info/list', {
  1311. pageIndex: 1,
  1312. // pageSize: 999,
  1313. pageSize: -1,
  1314. keyword: ''
  1315. },
  1316. res => {
  1317. if (res.code == "ok") {
  1318. this.supplierList = res.data.records;
  1319. } else {
  1320. this.$message({
  1321. message: res.msg,
  1322. type: "error"
  1323. });
  1324. }
  1325. },
  1326. error => {
  1327. this.$message({
  1328. message: error,
  1329. type: "error"
  1330. });
  1331. });
  1332. },
  1333. addManPro(row) {
  1334. this.addFlgmainProjectDialog = true
  1335. if(!row) {
  1336. this.addMainForm = {
  1337. name: '',
  1338. id: '',
  1339. code: '',
  1340. categoryId: ''
  1341. }
  1342. } else {
  1343. this.addMainForm = {
  1344. id: row.id,
  1345. code: row.code,
  1346. name: row.name,
  1347. categoryId: row.categoryId,
  1348. }
  1349. }
  1350. },
  1351. addPanthPro(row) {
  1352. this.addFlgPanthProjectDialog = true
  1353. if(!row) {
  1354. this.addPanthForm = {
  1355. projectStageName: '',
  1356. id: '',
  1357. companyId:''
  1358. }
  1359. } else {
  1360. this.addPanthForm = {
  1361. id: row.id,
  1362. projectStageName: row.projectStageName,
  1363. companyId: row.companyId
  1364. }
  1365. }
  1366. },
  1367. // 获取主项目
  1368. getMainProject() {
  1369. this.http.post('/project-main/list',{},res => {
  1370. if(res.code == 'ok'){
  1371. this.mainProjectList = res.data
  1372. }else {
  1373. this.$message({
  1374. message: res.msg,
  1375. type: 'error'
  1376. })
  1377. }
  1378. },err => {
  1379. this.$message({
  1380. message: err,
  1381. type: 'error'
  1382. })
  1383. })
  1384. },
  1385. // 批量修改自定义维度
  1386. checkedWudulist(e){
  1387. console.log(e);
  1388. this.checkedProjectArr = e
  1389. },
  1390. batchSetWudulistBtn1(){
  1391. this.$refs.projectlistOfWudulist.clearSelection()
  1392. this.checkedWuduArr = [],
  1393. this.addGroupPersonData = {
  1394. group: null,
  1395. person: null,
  1396. personNames: ''
  1397. }
  1398. },
  1399. batchSetWudulistBtn2(e){
  1400. if(this.checkedProjectArr.length == 0){
  1401. this.$message('请选择项目')
  1402. return
  1403. }
  1404. this.checkoradd = e
  1405. this.checkedWuduDialog = true
  1406. },
  1407. batchSetWudulistBtn3(){
  1408. if(this.checkedWuduArr.length == 0){
  1409. this.$message('请选择' + this.user.timeType.customDegreeName)
  1410. return
  1411. }
  1412. let projectIds = []
  1413. for(let i=0; i<this.checkedProjectArr.length; i++){
  1414. projectIds.push(this.checkedProjectArr[i].id)
  1415. }
  1416. let degreeIds = []
  1417. let degreeNames = []
  1418. for(let s=0; s<this.checkedWuduArr.length; s++){
  1419. degreeIds.push(this.checkedWuduArr[s].id)
  1420. degreeNames.push(this.checkedWuduArr[s].name)
  1421. }
  1422. this.http.post('/project/saveBatchAccoDegrees',{
  1423. ids: JSON.stringify(projectIds),
  1424. associateDegrees: degreeIds.toString(),
  1425. associateDegreeNames: degreeNames.toString()
  1426. },res => {
  1427. if(res.code == 'ok'){
  1428. this.checkedWuduDialog = false
  1429. this.batchSetWudulistBtn1()
  1430. this.$message({
  1431. message: '设置成功',
  1432. type: 'success'
  1433. })
  1434. this.getList()
  1435. }else {
  1436. this.$message({
  1437. message: res.msg,
  1438. type: 'error'
  1439. })
  1440. }
  1441. },err => {
  1442. this.$message({
  1443. message: err,
  1444. type: 'error'
  1445. })
  1446. })
  1447. },
  1448. batchSetWudulistBtn4(){
  1449. if(this.checkedWuduArr.length == 0){
  1450. this.$message('请选择' + this.user.timeType.customDegreeName)
  1451. return
  1452. }
  1453. let projectIds = []
  1454. for(let i=0; i<this.checkedProjectArr.length; i++){
  1455. projectIds.push(this.checkedProjectArr[i].id)
  1456. }
  1457. let degreeIds = []
  1458. let degreeNames = []
  1459. for(let s=0; s<this.checkedWuduArr.length; s++){
  1460. degreeIds.push(this.checkedWuduArr[s].id)
  1461. degreeNames.push(this.checkedWuduArr[s].name)
  1462. }
  1463. this.http.post('/project/addBatchAccoDegrees',{
  1464. ids: JSON.stringify(projectIds),
  1465. associateDegrees: degreeIds.toString(),
  1466. associateDegreeNames: degreeNames.toString()
  1467. },res => {
  1468. if(res.code == 'ok'){
  1469. this.checkedWuduDialog = false
  1470. this.batchSetWudulistBtn1()
  1471. this.$message({
  1472. message: '添加成功',
  1473. type: 'success'
  1474. })
  1475. this.getList()
  1476. }else {
  1477. this.$message({
  1478. message: res.msg,
  1479. type: 'error'
  1480. })
  1481. }
  1482. },err => {
  1483. this.$message({
  1484. message: err,
  1485. type: 'error'
  1486. })
  1487. })
  1488. },
  1489. isSelectable(row,index){
  1490. if(row.creatorId == this.user.id || row.inchargerId == this.user.id || this.permissions.projectManagement){
  1491. return true
  1492. }else{
  1493. return false
  1494. }
  1495. },
  1496. test(row){
  1497. console.log(row);
  1498. },
  1499. // 批量添加分组参与人员
  1500. addGroupPerson(){
  1501. let proArr = []
  1502. if(this.checkedProjectArr.length == 0){
  1503. this.$message('请选择项目')
  1504. return
  1505. }
  1506. this.addGroupPersonBtnLoading = true
  1507. for(let i=0;i<this.checkedProjectArr.length;i++){
  1508. proArr.push(this.checkedProjectArr[i].id)
  1509. }
  1510. this.http.post('/project/getProjectsGroups',{
  1511. projectIdArray: JSON.stringify(proArr)
  1512. },res => {
  1513. if(res.code == 'ok'){
  1514. console.log('分组',res.data);
  1515. this.addGroupList = res.data
  1516. this.addGroupPersonBtnLoading = false
  1517. this.addGroupPersonDialog = true
  1518. }else {
  1519. this.$message({
  1520. message: res.msg,
  1521. type: 'error'
  1522. })
  1523. }
  1524. },err => {
  1525. this.$message({
  1526. message: err,
  1527. type: 'error'
  1528. })
  1529. })
  1530. },
  1531. addGroupPersonP(){
  1532. this.filterText2 = ''
  1533. this.addGroupPersonPdialog = true
  1534. },
  1535. addPersonCheck(){
  1536. var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  1537. var list = chosenList.filter(item=>item.isUser == 1);
  1538. this.chosenMembCount = list.length;
  1539. console.log(list);
  1540. },
  1541. addPersonSure(){
  1542. this.addGroupPersonPdialog = false
  1543. let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  1544. let list = chosenList.filter(item=>item.isUser == 1);
  1545. let listIDs = []
  1546. let listNames = ''
  1547. for(let i=0;i<list.length;i++){
  1548. listIDs.push(list[i].id)
  1549. listNames += list[i].label + ','
  1550. }
  1551. this.addGroupPersonData.person = listIDs
  1552. this.addGroupPersonData.personNames = listNames
  1553. },
  1554. addGroupPersonSure(){
  1555. if(this.addGroupPersonData.group.length == 0 || this.addGroupPersonData.person == null){
  1556. this.$message({
  1557. message: '请选择人员/分组',
  1558. type: 'warning'
  1559. })
  1560. return
  1561. }
  1562. let groupList = []
  1563. for(let i=0;i<this.addGroupPersonData.group.length;i++){
  1564. groupList = [...groupList,...this.addGroupPersonData.group[i]]
  1565. }
  1566. this.http.post('/project/batchAddMembToGroup',{
  1567. membIdArray: JSON.stringify(this.addGroupPersonData.person),
  1568. groupIds: JSON.stringify(groupList)
  1569. },res => {
  1570. if(res.code == 'ok'){
  1571. this.addGroupPersonDialog = false,
  1572. this.batchSetWudulistBtn1()
  1573. this.$message({
  1574. message: '添加成功',
  1575. type: 'success'
  1576. })
  1577. this.getList()
  1578. }else {
  1579. this.$message({
  1580. message: res.msg,
  1581. type: 'error'
  1582. })
  1583. }
  1584. },err => {
  1585. this.$message({
  1586. message: err,
  1587. type: 'error'
  1588. })
  1589. })
  1590. },
  1591. batchDelete(){
  1592. if(this.checkedProjectArr.length == 0){
  1593. this.$message('请选择项目')
  1594. return
  1595. }
  1596. let proArr = []
  1597. for(let i=0;i<this.checkedProjectArr.length;i++){
  1598. proArr.push(this.checkedProjectArr[i].id)
  1599. // proArr += this.checkedProjectArr[i].id + ','
  1600. }
  1601. // proArr = proArr.substring(0,proArr.length - 1)
  1602. this.http.post('/project/batchDeleteProject',{
  1603. projectIdArray: JSON.stringify(proArr)
  1604. },res => {
  1605. if(res.code == 'ok'){
  1606. this.$message({
  1607. message: '删除成功',
  1608. type: 'success'
  1609. })
  1610. this.getList()
  1611. }else {
  1612. this.$message({
  1613. message: res.msg,
  1614. type: 'error'
  1615. })
  1616. }
  1617. },err => {
  1618. this.$message({
  1619. message: err,
  1620. type: 'error'
  1621. })
  1622. })
  1623. },
  1624. // 批量添加项目参与人
  1625. addProPreson(){
  1626. if(this.checkedProjectArr.length == 0){
  1627. this.$message('请选择项目')
  1628. return
  1629. }
  1630. this.addGroupPersonDialog = true
  1631. this.isAddGroupPerson = false
  1632. },
  1633. addProPersonSure(){
  1634. if(this.addGroupPersonData.person == null){
  1635. this.$message({
  1636. message: '请选择人员',
  1637. type: 'warning'
  1638. })
  1639. return
  1640. }
  1641. let proArr = []
  1642. for(let i=0;i<this.checkedProjectArr.length;i++){
  1643. proArr.push(this.checkedProjectArr[i].id)
  1644. // proArr += this.checkedProjectArr[i].id + ','
  1645. }
  1646. // proArr = proArr.substring(0,proArr.length - 1)
  1647. this.http.post('/project/batchSetParticipation',{
  1648. userIds: JSON.stringify(this.addGroupPersonData.person),
  1649. projectIdArray: JSON.stringify(proArr)
  1650. },res => {
  1651. if(res.code == 'ok'){
  1652. this.addGroupPersonDialog = false,
  1653. this.batchSetWudulistBtn1()
  1654. this.$message({
  1655. message: '添加成功',
  1656. type: 'success'
  1657. })
  1658. this.getList()
  1659. }else {
  1660. this.$message({
  1661. message: res.msg,
  1662. type: 'error'
  1663. })
  1664. }
  1665. },err => {
  1666. this.$message({
  1667. message: err,
  1668. type: 'error'
  1669. })
  1670. })
  1671. },
  1672. filterNode(value, data) {
  1673. if (!value) return true;
  1674. return data.label.indexOf(value) !== -1;
  1675. },
  1676. //重启项目
  1677. restartPro(row) {
  1678. this.http.post('/project/start',{id: row.id},
  1679. res => {
  1680. if (res.code == "ok") {
  1681. this.$message({
  1682. message: '重启成功',
  1683. type: "success"
  1684. });
  1685. row.status = 1;
  1686. } else {
  1687. this.$message({
  1688. message: res.msg,
  1689. type: "error"
  1690. });
  1691. }
  1692. },
  1693. error => {
  1694. this.$message({
  1695. message: error,
  1696. type: "error"
  1697. });
  1698. });
  1699. },
  1700. //撤销项目
  1701. cancelPro(row) {
  1702. this.http.post('/project/cancel',{id: row.id},
  1703. res => {
  1704. if (res.code == "ok") {
  1705. this.$message({
  1706. message: '撤销成功',
  1707. type: "success"
  1708. });
  1709. row.status = 3;
  1710. } else {
  1711. this.$message({
  1712. message: res.msg,
  1713. type: "error"
  1714. });
  1715. }
  1716. },
  1717. error => {
  1718. this.$message({
  1719. message: error,
  1720. type: "error"
  1721. });
  1722. });
  1723. },
  1724. // 暂停项目
  1725. suspendPro(row) {
  1726. this.http.post('/project/suspend',{id: row.id},
  1727. res => {
  1728. if (res.code == "ok") {
  1729. this.$message({
  1730. message: '暂停成功',
  1731. type: "success"
  1732. });
  1733. row.status = 4;
  1734. } else {
  1735. this.$message({
  1736. message: res.msg,
  1737. type: "error"
  1738. });
  1739. }
  1740. },
  1741. error => {
  1742. this.$message({
  1743. message: error,
  1744. type: "error"
  1745. });
  1746. });
  1747. },
  1748. //完成项目
  1749. finishPro(row) {
  1750. this.http.post('/project/finish',{id: row.id},
  1751. res => {
  1752. if (res.code == "ok") {
  1753. this.$message({
  1754. message: '项目完成',
  1755. type: "success"
  1756. });
  1757. row.status = 2;
  1758. } else {
  1759. this.$message({
  1760. message: res.msg,
  1761. type: "error"
  1762. });
  1763. }
  1764. },
  1765. error => {
  1766. this.$message({
  1767. message: error,
  1768. type: "error"
  1769. });
  1770. });
  1771. },
  1772. exportProjectData() {
  1773. //导出项目
  1774. this.http.post('/project/exportData',{},
  1775. res => {
  1776. if (res.code == "ok") {
  1777. var filePath = res.data;
  1778. const a = document.createElement('a'); // 创建a标签
  1779. a.setAttribute('download', '项目导出.xls');// download属性
  1780. a.setAttribute('href', filePath);// href链接
  1781. a.click(); //自执行点击事件
  1782. a.remove();
  1783. }
  1784. },
  1785. error => {
  1786. this.$message({
  1787. message: error,
  1788. type: "error"
  1789. });
  1790. }
  1791. );
  1792. },
  1793. userssHu() {
  1794. this.http.post('/time-type/getCompanyTimeSetting',{
  1795. companyId: this.user.companyId
  1796. },
  1797. res => {
  1798. if (res.code == "ok") {
  1799. this.yonghuUser = res.data
  1800. console.log(this.yonghuUser)
  1801. }
  1802. },
  1803. error => {
  1804. this.$message({
  1805. message: error,
  1806. type: "error"
  1807. });
  1808. }
  1809. );
  1810. },
  1811. yanjiuzx() {
  1812. this.http.post('/report-extra-degree/getAll ',{},
  1813. res => {
  1814. if (res.code == "ok") {
  1815. console.log(res, '过来的数据')
  1816. this.ause = res.data
  1817. } else {
  1818. this.$message({
  1819. message: res.msg,
  1820. type: "error"
  1821. });
  1822. }
  1823. },
  1824. error => {
  1825. this.$message({
  1826. message: error,
  1827. type: "error"
  1828. });
  1829. }
  1830. );
  1831. },
  1832. selectPublic() {
  1833. if (this.addForm.isPublic == 1) {
  1834. this.participator = this.users;
  1835. } else {
  1836. this.participator = [];
  1837. }
  1838. },
  1839. addPpMemb() {
  1840. //检查合计比例是否到达100%
  1841. let p = 0;
  1842. let hasNoMemb = false;
  1843. this.curProfessionRow.membList.forEach(m=>{
  1844. p += parseInt(m.percentage);
  1845. //检查人员是否选择
  1846. if (m.membId == null) {
  1847. hasNoMemb = true;
  1848. }
  1849. });
  1850. if (hasNoMemb) {
  1851. this.$message({
  1852. message: '专业人员不能为空',
  1853. type: "error"
  1854. });
  1855. return;
  1856. }
  1857. //检查人员不能重复
  1858. let hasDuplicate = false;
  1859. this.curProfessionRow.membList.forEach(m=>{
  1860. if (this.curProfessionRow.membList.filter(innerM=>innerM.membId == m.membId).length>1) {
  1861. hasDuplicate = true;
  1862. }
  1863. });
  1864. if (hasDuplicate) {
  1865. this.$message({
  1866. message: '专业人员不能重复',
  1867. type: "error"
  1868. });
  1869. return;
  1870. }
  1871. if (p != 100) {
  1872. this.$message({
  1873. message: '占比合计必须是100%',
  1874. type: "error"
  1875. });
  1876. return;
  1877. }
  1878. this.editPpMembDialog = false;
  1879. this.curProfessionRow.membList.forEach(m=>{
  1880. m.membName = this.participator.filter(p=>p.id == m.membId)[0].name;
  1881. });
  1882. this.projectProfessionItem.membList = JSON.parse(JSON.stringify(this.curProfessionRow.membList));
  1883. },
  1884. //删除专业人员
  1885. deleteMembItem(index) {
  1886. this.curProfessionRow.membList.splice(index,1);
  1887. },
  1888. //添加专业人员
  1889. addMembItem() {
  1890. if (this.curProfessionRow.membList == null) {
  1891. this.curProfessionRow.membList = [{membId:null, percentage:100}];
  1892. } else {
  1893. let p = 0;
  1894. this.curProfessionRow.membList.forEach(m=>{
  1895. p += parseInt(m.percentage);
  1896. });
  1897. this.curProfessionRow.membList.push({membId:null, percentage:100-p});
  1898. }
  1899. this.$forceUpdate();
  1900. },
  1901. showEditPpMembs(row) {
  1902. this.projectProfessionItem = row;
  1903. this.curProfessionRow = JSON.parse(JSON.stringify(row));
  1904. if (this.curProfessionRow.membList == null || this.curProfessionRow.membList.length == 0) {
  1905. this.curProfessionRow.membList = [{membId:null, percentage:100}];
  1906. }
  1907. this.editPpMembDialog = true;
  1908. },
  1909. getProjectNotifyUserList(projectId) {
  1910. this.http.post("/project-notify-user/get", {projectId: projectId},
  1911. res => {
  1912. if (res.code == "ok") {
  1913. var chosenLeaderIds = [];
  1914. var chosenLeaderNames = '';
  1915. var leaderList = res.data;
  1916. this.chosenLeaders = leaderList;
  1917. for(var j in leaderList) {
  1918. chosenLeaderIds.push(leaderList[j].userId)
  1919. chosenLeaderNames += leaderList[j].userName+',';
  1920. }
  1921. if (chosenLeaderNames.length > 0) {
  1922. chosenLeaderNames = chosenLeaderNames.substring(0, chosenLeaderNames.length -1);
  1923. }
  1924. this.addForm.notifyUserIds = chosenLeaderIds;
  1925. this.addForm.notifyUserNames = chosenLeaderNames;
  1926. } else {
  1927. this.$message({
  1928. message: res.msg,
  1929. type: "error"
  1930. });
  1931. }
  1932. },
  1933. error => {
  1934. this.$message({
  1935. message: error,
  1936. type: "error"
  1937. });
  1938. });
  1939. },
  1940. getProjectProfessions(projectId) {
  1941. this.http.post("/project-profession/get", {projectId: projectId},
  1942. res => {
  1943. if (res.code == "ok") {
  1944. this.projectProfessionList = res.data;
  1945. } else {
  1946. this.$message({
  1947. message: res.msg,
  1948. type: "error"
  1949. });
  1950. }
  1951. },
  1952. error => {
  1953. this.$message({
  1954. message: error,
  1955. type: "error"
  1956. });
  1957. });
  1958. },
  1959. checkProjectProfession() {
  1960. //检查合计比例是否到达100%
  1961. let p = 0;
  1962. let hasNoMemb = false;
  1963. let hasNoProfession = false;
  1964. let hasNoMembList = false;
  1965. this.projectProfessionList.forEach(m=>{
  1966. p += parseInt(m.percentage);
  1967. //检查人员是否选择
  1968. if (m.inchargerId == null) {
  1969. hasNoMemb = true;
  1970. }
  1971. if (m.professionId == null) {
  1972. hasNoProfession = true;
  1973. }
  1974. if (m.membList == null) {
  1975. hasNoMembList = true;
  1976. }
  1977. });
  1978. if (hasNoProfession) {
  1979. this.$message({
  1980. message: '专业不能为空',
  1981. type: "error"
  1982. });
  1983. return false;
  1984. }
  1985. if (hasNoMembList) {
  1986. this.$message({
  1987. message: '专业相关人员不能为空',
  1988. type: "error"
  1989. });
  1990. return false;
  1991. }
  1992. if (hasNoMemb) {
  1993. this.$message({
  1994. message: '专业负责人不能为空',
  1995. type: "error"
  1996. });
  1997. return false;
  1998. }
  1999. //检查专业不能重复
  2000. let hasDuplicate = false;
  2001. this.projectProfessionList.forEach(m=>{
  2002. if (this.projectProfessionList.filter(innerM=>innerM.professionId == m.professionId).length>1) {
  2003. hasDuplicate = true;
  2004. }
  2005. });
  2006. if (hasDuplicate) {
  2007. this.$message({
  2008. message: '专业不能重复',
  2009. type: "error"
  2010. });
  2011. return false;
  2012. }
  2013. if (this.projectProfessionList.length > 0 && p != 100) {
  2014. this.$message({
  2015. message: '专业占比合计必须是100%',
  2016. type: "error"
  2017. });
  2018. return false;
  2019. }
  2020. return true;
  2021. },
  2022. //保存项目专业
  2023. saveProjectProfessions(projectId) {
  2024. var list = this.projectProfessionList.filter(p=>p.professionId != null);
  2025. list.forEach(p=>p.inchargerName = this.participator.filter(m=>m.id == p.inchargerId)[0].name);
  2026. list.forEach(p=>p.professionName = this.professionList.filter(m=>m.id == p.professionId)[0].name);
  2027. this.http.post("/project-profession/modify", {projectId: projectId, json: JSON.stringify(list)},
  2028. res => {
  2029. if (res.code == "ok") {
  2030. return false;
  2031. } else {
  2032. this.$message({
  2033. message: res.msg,
  2034. type: "error"
  2035. });
  2036. }
  2037. },
  2038. error => {
  2039. this.$message({
  2040. message: error,
  2041. type: "error"
  2042. });
  2043. });
  2044. },
  2045. //删除项目专业
  2046. deleteItem(index) {
  2047. this.projectProfessionList.splice(index,1);
  2048. },
  2049. //添加项目专业
  2050. addItem() {
  2051. let p = 0;
  2052. this.projectProfessionList.forEach(m=>{
  2053. p += parseInt(m.percentage);
  2054. });
  2055. this.projectProfessionList.push( { professionId:null, inchargerId:null,membIds:[], percentage: 100-p});
  2056. },
  2057. getProfessionList() {
  2058. this.http.post("/profession/getAll", {},
  2059. res => {
  2060. if (res.code == "ok") {
  2061. var list = res.data;
  2062. this.professionList = list;
  2063. } else {
  2064. this.$message({
  2065. message: res.msg,
  2066. type: "error"
  2067. });
  2068. }
  2069. },
  2070. error => {
  2071. this.$message({
  2072. message: error,
  2073. type: "error"
  2074. });
  2075. });
  2076. },
  2077. restrictNumber(targetId) {
  2078. let inpu = document.getElementById(targetId);
  2079. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  2080. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  2081. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g,'').replace('$#*','.');//去除其他"."
  2082. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  2083. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  2084. inpu.value = parseFloat(inpu.value);
  2085. }
  2086. },
  2087. showChooseLeaderTree() {
  2088. this.chosenMembCount = this.chosenLeaders.length;
  2089. this.chooseLeaderVisible = true;
  2090. },
  2091. onLeaderTreeItemChange() {
  2092. var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
  2093. var list = chosenList.filter(item=>item.isUser == 1);
  2094. this.chosenMembCount = list.length;
  2095. },
  2096. showChooseMembTree() {
  2097. this.chosenMembCount = this.participator.length;
  2098. this.chooseParticipVisible = true;
  2099. this.filterText = ''
  2100. },
  2101. onTreeItemChange() {
  2102. var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
  2103. var list = chosenList.filter(item=>item.isUser == 1);
  2104. this.chosenMembCount = list.length;
  2105. },
  2106. findUserInTree() {
  2107. if (this.filterName == '') {
  2108. this.deptMembData = this.allMembData;
  2109. } else {
  2110. var list = this.findRecursively(this.filterName, this.allMembData);
  2111. this.deptMembData = list;
  2112. }
  2113. },
  2114. findRecursively(username, list) {
  2115. var filterList = [];
  2116. for (var i=0;i<list.length; i++) {
  2117. if (list[i].isUser == 1) {
  2118. if (list[i].label.indexOf(username) >= 0) {
  2119. //匹配上了
  2120. filterList.push(list[i]);
  2121. }
  2122. } else if (list[i].children != null && list[i].children.length > 0) {
  2123. var subList = this.findRecursively(username, list[i].children);
  2124. if (subList.length > 0) {
  2125. subList.forEach(s=>filterList.push(s));
  2126. }
  2127. }
  2128. }
  2129. return filterList;
  2130. },
  2131. //确定选择参与人
  2132. chooseParticip() {
  2133. this.chooseParticipVisible = false;
  2134. var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
  2135. this.chosenMembList = chosenList.filter(item=>item.isUser == 1);
  2136. this.addForm.userNames = '';
  2137. this.addForm.userId = [];
  2138. this.participator = [];
  2139. for (var i=0;i<this.chosenMembList.length; i++) {
  2140. this.addForm.userId.push(this.chosenMembList[i].id);
  2141. this.addForm.userNames += this.chosenMembList[i].label+',';
  2142. var item = {id:this.chosenMembList[i].id, name:this.chosenMembList[i].label};
  2143. this.participator.push(item);
  2144. }
  2145. if (this.addForm.userNames.length > 0) {
  2146. this.addForm.userNames = this.addForm.userNames.substring(0, this.addForm.userNames.length-1);
  2147. }
  2148. },
  2149. //选中相关领导
  2150. chooseLeader() {
  2151. this.chooseLeaderVisible = false;
  2152. var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
  2153. var chosenMembList = chosenList.filter(item=>item.isUser == 1);
  2154. this.addForm.notifyUserNames = '';
  2155. this.addForm.notifyUserIds = [];
  2156. this.chosenLeaders = [];
  2157. for (var i=0;i<chosenMembList.length; i++) {
  2158. this.addForm.notifyUserIds.push(chosenMembList[i].id);
  2159. this.addForm.notifyUserNames += chosenMembList[i].label+',';
  2160. var item = {userId:chosenMembList[i].id, userName:chosenMembList[i].label};
  2161. this.chosenLeaders.push(item);
  2162. }
  2163. if (this.addForm.notifyUserNames.length > 0) {
  2164. this.addForm.notifyUserNames = this.addForm.notifyUserNames.substring(0, this.addForm.notifyUserNames.length-1);
  2165. }
  2166. },
  2167. // 获取部门列表
  2168. getDepartment() {
  2169. this.http.post("/department/listAllMemb", {},
  2170. res => {
  2171. if (res.code == "ok") {
  2172. var list = res.data;
  2173. //设置员工到部门下面
  2174. this.setUserToDept(list);
  2175. this.deptMembData = list;
  2176. //用于筛选过滤
  2177. this.allMembData = JSON.parse(JSON.stringify(this.deptMembData));
  2178. } else {
  2179. this.$message({
  2180. message: res.msg,
  2181. type: "error"
  2182. });
  2183. }
  2184. },
  2185. error => {
  2186. this.$message({
  2187. message: error,
  2188. type: "error"
  2189. });
  2190. });
  2191. },
  2192. setUserToDept(list) {
  2193. for (var i in list) {
  2194. if (list[i].children != null) {
  2195. this.setUserToDept(list[i].children);
  2196. }
  2197. if (list[i].userList != null) {
  2198. if (list[i].children == null) {
  2199. list[i].children = [];
  2200. }
  2201. list[i].userList.forEach(element => {
  2202. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  2203. list[i].children.push(obj);
  2204. });
  2205. }
  2206. }
  2207. },
  2208. // 获取分类条目
  2209. getClfConfigList() {
  2210. this.http.get('/project-category/list',
  2211. res => {
  2212. if (res.code == "ok") {
  2213. this.baseClfList = res.data;
  2214. console.log("获取分类条目",res.data);
  2215. this.$forceUpdate();
  2216. } else {
  2217. this.$message({
  2218. message: res.msg,
  2219. type: "error"
  2220. });
  2221. }
  2222. },
  2223. error => {
  2224. this.$message({
  2225. message: error,
  2226. type: "error"
  2227. });
  2228. }
  2229. );
  2230. },
  2231. // 新增/编辑 分类条目
  2232. addNewClf(row) {
  2233. this.addClfDialog = true;
  2234. if (row == null) {
  2235. this.addClf = {}
  2236. } else {
  2237. this.addClf = row;
  2238. }
  2239. },
  2240. // 提交
  2241. submitClf() {
  2242. this.http.post('/project-category/addOrMod',this.addClf,
  2243. res => {
  2244. if (res.code == "ok") {
  2245. this.addClfDialog = false;
  2246. this.baseClfList = res.data;
  2247. // this.$forceUpdate();
  2248. // console.log(res.data);
  2249. } else {
  2250. this.$message({
  2251. message: res.msg,
  2252. type: "error"
  2253. });
  2254. }
  2255. },
  2256. error => {
  2257. this.$message({
  2258. message: error,
  2259. type: "error"
  2260. });
  2261. }
  2262. );
  2263. },
  2264. // 提交
  2265. submitManPro() {
  2266. this.http.post('/project-main/addOrMod',this.addMainForm,
  2267. res => {
  2268. if (res.code == "ok") {
  2269. this.addFlgmainProjectDialog = false;
  2270. this.getMainProject()
  2271. } else {
  2272. this.$message({
  2273. message: res.msg,
  2274. type: "error"
  2275. });
  2276. }
  2277. },
  2278. error => {
  2279. this.$message({
  2280. message: error,
  2281. type: "error"
  2282. });
  2283. }
  2284. );
  2285. },
  2286. // 提交项目阶段
  2287. submitPanthPro() {
  2288. this.http.post('/project-stage/addOrMod',this.addPanthForm,
  2289. res => {
  2290. if (res.code == "ok") {
  2291. this.addFlgPanthProjectDialog = false;
  2292. this.obtainPhase()
  2293. } else {
  2294. this.$message({
  2295. message: res.msg,
  2296. type: "error"
  2297. });
  2298. }
  2299. },
  2300. error => {
  2301. this.$message({
  2302. message: error,
  2303. type: "error"
  2304. });
  2305. }
  2306. );
  2307. },
  2308. // 删除
  2309. deleteClf(row) {
  2310. this.$confirm("该操作可能造成已有数据丢失,确定要删除吗?","删除分类条目", {
  2311. confirmButtonText: "确定",
  2312. cancelButtonText: "取消",
  2313. type: "warning"
  2314. })
  2315. .then(() => {
  2316. this.listLoading = true;
  2317. this.http.post('/project-category/delete',{
  2318. id: row.id
  2319. },
  2320. res => {
  2321. this.listLoading = false;
  2322. if (res.code == "ok") {
  2323. this.$message({
  2324. message: "删除成功",
  2325. type: "success"
  2326. });
  2327. this.getClfConfigList();
  2328. } else {
  2329. this.$message({
  2330. message: res.msg,
  2331. type: "error"
  2332. });
  2333. }
  2334. },
  2335. error => {
  2336. this.listLoading = false;
  2337. this.$message({
  2338. message: error,
  2339. type: "error"
  2340. });
  2341. }
  2342. );
  2343. })
  2344. .catch(() => {});
  2345. },
  2346. // 删除主项目
  2347. deleteManPro(row) {
  2348. this.$confirm("该操作可能造成已有数据丢失,确定要删除吗?","删除主项目", {
  2349. confirmButtonText: "确定",
  2350. cancelButtonText: "取消",
  2351. type: "warning"
  2352. })
  2353. .then(() => {
  2354. this.listLoading = true;
  2355. this.http.post('/project-main/delete',{
  2356. id: row.id
  2357. },
  2358. res => {
  2359. this.listLoading = false;
  2360. if (res.code == "ok") {
  2361. this.$message({
  2362. message: "删除成功",
  2363. type: "success"
  2364. });
  2365. this.getMainProject();
  2366. } else {
  2367. this.$message({
  2368. message: res.msg,
  2369. type: "error"
  2370. });
  2371. }
  2372. },
  2373. error => {
  2374. this.listLoading = false;
  2375. this.$message({
  2376. message: error,
  2377. type: "error"
  2378. });
  2379. }
  2380. );
  2381. })
  2382. .catch(() => {});
  2383. },
  2384. // 删除项目阶段
  2385. deletePanthPro(row) {
  2386. this.$confirm("该操作可能造成已有数据丢失,确定要删除吗?","删除项目阶段", {
  2387. confirmButtonText: "确定",
  2388. cancelButtonText: "取消",
  2389. type: "warning"
  2390. })
  2391. .then(() => {
  2392. this.listLoading = true;
  2393. this.http.post('/project-stage/delete ',{
  2394. id: row.id
  2395. },
  2396. res => {
  2397. this.listLoading = false;
  2398. if (res.code == "ok") {
  2399. this.$message({
  2400. message: "删除成功",
  2401. type: "success"
  2402. });
  2403. this.obtainPhase();
  2404. } else {
  2405. this.$message({
  2406. message: res.msg,
  2407. type: "error"
  2408. });
  2409. }
  2410. },
  2411. error => {
  2412. this.listLoading = false;
  2413. this.$message({
  2414. message: error,
  2415. type: "error"
  2416. });
  2417. }
  2418. );
  2419. })
  2420. .catch(() => {});
  2421. },
  2422. // 分类筛选
  2423. searchClfList(){
  2424. this.page = 1;
  2425. this.getList();
  2426. },
  2427. getProjectBaseConfigList() {
  2428. this.http.post('/project-basecost-setting/list',{},
  2429. res => {
  2430. if (res.code == "ok") {
  2431. this.baseCostItemList = res.data;
  2432. this.$forceUpdate();
  2433. } else {
  2434. this.$message({
  2435. message: res.msg,
  2436. type: "error"
  2437. });
  2438. }
  2439. },
  2440. error => {
  2441. this.$message({
  2442. message: error,
  2443. type: "error"
  2444. });
  2445. }
  2446. );
  2447. },
  2448. deleteBaseItem(row) {
  2449. this.$confirm("该操作可能造成已有数据丢失,确定要删除吗?","删除成本基线项", {
  2450. confirmButtonText: "确定",
  2451. cancelButtonText: "取消",
  2452. type: "warning"
  2453. })
  2454. .then(() => {
  2455. this.listLoading = true;
  2456. this.http.post('/project-basecost-setting/delete',{
  2457. id: row.id
  2458. },
  2459. res => {
  2460. this.listLoading = false;
  2461. if (res.code == "ok") {
  2462. this.$message({
  2463. message: "删除成功",
  2464. type: "success"
  2465. });
  2466. this.getProjectBaseConfigList();
  2467. } else {
  2468. this.$message({
  2469. message: res.msg,
  2470. type: "error"
  2471. });
  2472. }
  2473. },
  2474. error => {
  2475. this.listLoading = false;
  2476. this.$message({
  2477. message: error,
  2478. type: "error"
  2479. });
  2480. }
  2481. );
  2482. })
  2483. .catch(() => {});
  2484. },
  2485. submitInsertBaseItem() {
  2486. this.http.post('/project-basecost-setting/addOrMod',this.addForm,
  2487. res => {
  2488. if (res.code == "ok") {
  2489. this.addBaseItemDialog = false;
  2490. this.baseCostItemList = res.data;
  2491. this.$forceUpdate();
  2492. } else {
  2493. this.$message({
  2494. message: res.msg,
  2495. type: "error"
  2496. });
  2497. }
  2498. },
  2499. error => {
  2500. this.$message({
  2501. message: error,
  2502. type: "error"
  2503. });
  2504. }
  2505. );
  2506. },
  2507. showBaseCostItemDialog() {
  2508. this.showBaseConfig = true;
  2509. },
  2510. addNewBaseItem(row) {
  2511. this.addBaseItemDialog = true;
  2512. if (row == null) {
  2513. this.addForm = {alarmType: 0}
  2514. } else {
  2515. this.addForm = row;
  2516. }
  2517. },
  2518. //获取客户列表
  2519. getCustomerList() {
  2520. this.http.post('/customer-info/getAll', {
  2521. },
  2522. res => {
  2523. if (res.code == "ok") {
  2524. this.customerList = res.data;
  2525. } else {
  2526. this.$message({
  2527. message: res.msg,
  2528. type: "error"
  2529. });
  2530. }
  2531. },
  2532. error => {
  2533. this.$message({
  2534. message: error,
  2535. type: "error"
  2536. });
  2537. });
  2538. },
  2539. importProject(item) {
  2540. //首先判断文件类型
  2541. let str = item.file.name.split(".");
  2542. let format = str[str.length - 1];
  2543. if (format != "xls" && format != "xlsx") {
  2544. this.$message({
  2545. message: "请选择.xls或.xlsx文件",
  2546. type: "error"
  2547. });
  2548. } else {
  2549. this.listLoading = true;
  2550. let formData = new FormData();
  2551. formData.append("file", item.file);
  2552. formData.append("userId", this.user.id);
  2553. this.http.uploadFile('/project/importData', formData,
  2554. res => {
  2555. this.$refs.upload.clearFiles();
  2556. this.listLoading = false;
  2557. if (res.code == "ok") {
  2558. // this.$message({
  2559. // message: res.data,
  2560. // type: "success"
  2561. // },5000);
  2562. //弹窗显示
  2563. this.showImportResult = true;
  2564. this.importResultMsg = res.data;
  2565. this.getList();
  2566. } else {
  2567. this.$message({
  2568. message: res.msg,
  2569. type: "error"
  2570. });
  2571. }
  2572. },
  2573. error => {
  2574. this.$refs.upload.clearFiles();
  2575. this.listLoading = false;
  2576. this.$message({
  2577. message: error,
  2578. type: "error"
  2579. });
  2580. });
  2581. }
  2582. },
  2583. number(){
  2584. //     this.addForm.budget = this.addForm.budget.replace(/[^\.\d]/g,'');
  2585. // this.addForm.budget = this.addForm.budget.replace('.','');
  2586. },
  2587. deleteSubPro(subProject) {
  2588. this.$confirm("确定要删除子项目" + subProject.name + "吗?","删除子项目", {
  2589. confirmButtonText: "确定",
  2590. cancelButtonText: "取消",
  2591. type: "warning"
  2592. })
  2593. .then(() => {
  2594. this.listLoading = true;
  2595. this.http.post('/sub-project/deleteProject',{
  2596. id: subProject.id
  2597. },
  2598. res => {
  2599. this.listLoading = false;
  2600. if (res.code == "ok") {
  2601. this.$message({
  2602. message: "删除成功",
  2603. type: "success"
  2604. });
  2605. this.subProject(this.currentProject);
  2606. } else {
  2607. this.$message({
  2608. message: res.msg,
  2609. type: "error"
  2610. });
  2611. }
  2612. },
  2613. error => {
  2614. this.listLoading = false;
  2615. this.$message({
  2616. message: error,
  2617. type: "error"
  2618. });
  2619. }
  2620. );
  2621. })
  2622. .catch(() => {});
  2623. },
  2624. searchList() {
  2625. this.page = 1;
  2626. this.getList();
  2627. },
  2628. addNewSubProject(subProject) {
  2629. if (subProject == null) {
  2630. this.temaddForm = {projectId: this.currentProject.id, level:1}
  2631. } else {
  2632. this.temaddForm = JSON.parse(JSON.stringify(subProject));
  2633. }
  2634. this.addSubProject = true;
  2635. },
  2636. //显示子项目
  2637. subProject(item) {
  2638. this.subProjectVisible = true;
  2639. this.currentProject = item;
  2640. this.http.post('/sub-project/list', {
  2641. projectId: item.id
  2642. },
  2643. res => {
  2644. if (res.code == "ok") {
  2645. this.subProjectList = res.data;
  2646. } else {
  2647. this.$message({
  2648. message: res.msg,
  2649. type: "error"
  2650. });
  2651. }
  2652. },
  2653. error => {
  2654. this.$message({
  2655. message: error,
  2656. type: "error"
  2657. });
  2658. });
  2659. },
  2660. //显示用户详情
  2661. showUser(userId) {
  2662. this.userDetailVisible = true;
  2663. this.http.post(this.port.manage.userDetail, {
  2664. userId: userId
  2665. },
  2666. res => {
  2667. if (res.code == "ok") {
  2668. this.userDetail = res.data;
  2669. } else {
  2670. this.$message({
  2671. message: res.msg,
  2672. type: "error"
  2673. });
  2674. }
  2675. },
  2676. error => {
  2677. this.$message({
  2678. message: error,
  2679. type: "error"
  2680. });
  2681. });
  2682. },
  2683. //选择参与人
  2684. changeParticipator() {
  2685. //检查是否在参与人中,如果没有需要加入到参与人中
  2686. this.participator = [];
  2687. this.addForm.userId.forEach(u=>{
  2688. var list = this.users.filter(au=>au.id == u);
  2689. if (list.length > 0) {
  2690. var findUser = list[0];
  2691. this.participator.push(findUser);
  2692. } else {
  2693. console.log('未找到用户: '+u);
  2694. }
  2695. })
  2696. },
  2697. getUsers() {
  2698. // this.http.post(this.port.manage.list, {
  2699. // departmentId: -1,
  2700. // pageIndex: 1,
  2701. // // pageSize: 99999
  2702. // pageSize: -1
  2703. // },
  2704. this.http.post('/user/getSimpleActiveUserList', {},
  2705. res => {
  2706. if (res.code == "ok") {
  2707. this.users = res.data;
  2708. } else {
  2709. this.$message({
  2710. message: res.msg,
  2711. type: "error"
  2712. });
  2713. }
  2714. },
  2715. error => {
  2716. this.$message({
  2717. message: error,
  2718. type: "error"
  2719. });
  2720. });
  2721. },
  2722. //分页
  2723. handleCurrentChange(val) {
  2724. this.page = val;
  2725. this.getList();
  2726. },
  2727. handleSizeChange(val) {
  2728. this.size = val;
  2729. localStorage.projectPageSize = this.size;
  2730. this.getList();
  2731. },
  2732. //获取项目列表
  2733. getList() {
  2734. this.listLoading = true;
  2735. let parameter = {
  2736. pageIndex: this.page,
  2737. pageSize: this.size,
  2738. keyword:this.keyword,
  2739. searchField: this.searchField,
  2740. status: this.status,
  2741. category: this.statusClf,
  2742. projectMainId: this.projectMainId
  2743. }
  2744. if(this.sortOrder){
  2745. if(this.sortProp == 'inchargerName'){
  2746. parameter.sortProp = "incharger_id"
  2747. }else if(this.sortProp == 'customerName'){
  2748. parameter.sortProp = "customer_id"
  2749. }else if(this.sortProp == 'projectCode'){
  2750. parameter.sortProp = 'project_code'
  2751. }else if(this.sortProp == 'categoryName'){
  2752. parameter.sortProp = 'category'
  2753. }else if(this.sortProp == 'projectName'){
  2754. parameter.sortProp = 'project_name'
  2755. }else if(this.sortProp == 'status'){
  2756. parameter.sortProp = 'status'
  2757. }else if(this.sortProp == 'currentStage'){
  2758. parameter.sortProp = 'current_stage_name'
  2759. }
  2760. if(this.sortOrder == 'descending'){
  2761. parameter.sortOrder = 0
  2762. }else if(this.sortOrder == 'ascending'){
  2763. parameter.sortOrder = 1
  2764. }
  2765. }
  2766. this.http.post(this.port.project.listPage, parameter,
  2767. res => {
  2768. this.listLoading = false;
  2769. if (res.code == "ok") {
  2770. var list = res.data.records;
  2771. for(var i in list) {
  2772. var participator = list[i].participator , str = "";
  2773. for(var j in participator) {
  2774. if(j == participator.length-1) {
  2775. str += participator[j].name
  2776. } else {
  2777. str += participator[j].name + ','
  2778. }
  2779. }
  2780. list[i].userNames = str;
  2781. }
  2782. this.showColumnWidth = this.showColumn(list)
  2783. this.list = list;
  2784. this.total = res.data.total;
  2785. this.$nextTick(()=>{
  2786. this.$refs.projectlistOfWudulist.doLayout();
  2787. })
  2788. this.listHeader = res.data.nameList
  2789. } else {
  2790. this.$message({
  2791. message: res.msg,
  2792. type: "error"
  2793. });
  2794. }
  2795. },
  2796. error => {
  2797. this.listLoading = false;
  2798. this.$message({
  2799. message: error,
  2800. type: "error"
  2801. });
  2802. });
  2803. },
  2804. showColumn(list){
  2805. if(!this.permissions.projectManagement){
  2806. let creat = false
  2807. let incha = false
  2808. for(let i in list){
  2809. if(this.user.id == list[i].creatorId){
  2810. creat = true
  2811. }
  2812. if(this.user.id == list[i].inchargerId){
  2813. incha = true
  2814. }
  2815. }
  2816. if(creat){
  2817. return '300'
  2818. }else {
  2819. if(incha){
  2820. return '210'
  2821. }else {
  2822. return '0'
  2823. }
  2824. }
  2825. }else {
  2826. return '300'
  2827. }
  2828. },
  2829. //显示新增界面
  2830. handleAdd(i, item) {
  2831. if(i == -1) {
  2832. this.title = "新增项目";
  2833. this.addForm = {
  2834. name: '',
  2835. isPublic:0,
  2836. userId: [],
  2837. userNames:'',
  2838. code:'',
  2839. inchargerId:null,
  2840. level:1,
  2841. customerId:null,
  2842. notifyUserNames:'',
  2843. chosenLeaders:[],
  2844. category:null,
  2845. creatorId: this.user.id,
  2846. projectMainId: ''
  2847. }
  2848. if(this.user.companyId == '936') {
  2849. this.$set(this.addForm, 'contractCode', '')
  2850. this.$set(this.addForm, 'warrantyStartDate', '')
  2851. this.$set(this.addForm, 'warrantyEndDate', '')
  2852. this.$set(this.addForm, 'projectCategorySub', '')
  2853. this.$set(this.addForm, 'region', '')
  2854. this.$set(this.addForm, 'bu', '')
  2855. }
  2856. if(this.user.companyId == '428') {
  2857. this.$set(this.addForm, 'projectCategorySub', '')
  2858. }
  2859. this.projectBaseCostData = [];
  2860. this.auseList = [];
  2861. for (var m=0;m<this.baseCostItemList.length; m++) {
  2862. this.projectBaseCostData.push({baseId: this.baseCostItemList[m].id, baseName:this.baseCostItemList[m].name, baseAmount:0});
  2863. }
  2864. } else {
  2865. this.title = "修改项目";
  2866. var list = item.participator;
  2867. if (item.isPublic == 1) {
  2868. list = this.users;
  2869. }
  2870. var arr = [];
  2871. var names = '';
  2872. for(var j in list) {
  2873. arr.push(list[j].id)
  2874. names += list[j].name+',';
  2875. }
  2876. if (names.length > 0) {
  2877. names = names.substring(0, names.length -1);
  2878. }
  2879. this.addForm = {
  2880. id: item.id,
  2881. name: item.projectName,
  2882. isPublic: item.isPublic,
  2883. userId: arr,
  2884. userNames:names,
  2885. code:item.projectCode,
  2886. inchargerId: item.inchargerId,
  2887. level: item.level,
  2888. planStartDate: item.planStartDate,
  2889. planEndDate: item.planEndDate,
  2890. budget: item.budget,
  2891. baseMan: item.baseMan,
  2892. contractAmount: item.contractAmount,
  2893. baseFee: item.baseFee,
  2894. baseRisk1: item.baseRisk1,
  2895. baseRisk2: item.baseRisk2,
  2896. baseOutsourcing: item.baseOutsourcing,
  2897. customerId:item.customerId==0?null:item.customerId,
  2898. category:item.category,
  2899. projectDesc: item.projectDesc,
  2900. projectMainId: item.projectMainId,
  2901. creatorId: item.creatorId
  2902. }
  2903. // 判断公司id是否等于936
  2904. if(this.user.companyId == '936') {
  2905. if(item.projectSeparate) {
  2906. this.$set(this.addForm, 'contractCode', item.projectSeparate.contractCode)
  2907. this.$set(this.addForm, 'warrantyStartDate', item.projectSeparate.warrantyStartDate)
  2908. this.$set(this.addForm, 'warrantyEndDate', item.projectSeparate.warrantyEndDate)
  2909. this.$set(this.addForm, 'projectCategorySub', item.projectSeparate.projectCategorySub)
  2910. this.$set(this.addForm, 'region', item.projectSeparate.region)
  2911. this.$set(this.addForm, 'bu', item.projectSeparate.bu)
  2912. } else {
  2913. this.$set(this.addForm, 'contractCode', '')
  2914. this.$set(this.addForm, 'warrantyStartDate', '')
  2915. this.$set(this.addForm, 'warrantyEndDate', '')
  2916. this.$set(this.addForm, 'projectCategorySub', '')
  2917. this.$set(this.addForm, 'region', '')
  2918. this.$set(this.addForm, 'bu', '')
  2919. }
  2920. }
  2921. if(this.user.companyId == '428') {
  2922. if(item.projectSeparate) {
  2923. this.$set(this.addForm, 'projectCategorySub', item.projectSeparate.projectCategorySub)
  2924. } else {
  2925. this.$set(this.addForm, 'projectCategorySub', '')
  2926. }
  2927. }
  2928. // 判断是否有供应商
  2929. if(this.user.company.packageProvider) {
  2930. // this.addForm.supplierId = item.providerIds.split(',')
  2931. if(item.providerIds) {
  2932. let arr = []
  2933. let zhhi = item.providerIds.split(',')
  2934. for(let i in zhhi) {
  2935. arr.push(+zhhi[i] + 0)
  2936. }
  2937. this.$set(this.addForm, 'supplierId', arr)
  2938. console.log( this.addForm.supplierId)
  2939. } else {
  2940. this.$set(this.addForm, 'supplierId', [])
  2941. }
  2942. }
  2943. // 判断是否有供应商结尾
  2944. this.deleteVif = item.creatorId
  2945. console.log("handleadd",this.deleteVif,this.addForm.id)
  2946. if(item.associateDegrees != null && item.associateDegrees != 'null' && item.associateDegrees != '') {
  2947. var spli = item.associateDegrees.split(',')
  2948. var sl = []
  2949. for(var i in spli) {
  2950. var num = +spli[i] + 0
  2951. sl.push(num)
  2952. }
  2953. this.auseList = sl
  2954. // console.log(this.auseList)
  2955. } else {
  2956. this.auseList = []
  2957. }
  2958. // var spli = item.associateDegrees.split(',')
  2959. // var sl = []
  2960. // for(var i in spli) {
  2961. // var num = +spli[i] + 0
  2962. // sl.push(num)
  2963. // }
  2964. // this.auseList = sl
  2965. // console.log(this.auseList)
  2966. this.changeParticipator();
  2967. this.getProjectBaseData(item.id);
  2968. if (this.user.company.packageEngineering == 1) {
  2969. this.getProjectProfessions(item.id);
  2970. }
  2971. //获取项目的相关领导
  2972. this.getProjectNotifyUserList(item.id);
  2973. this.getProjectAutorList(item.id);
  2974. }
  2975. this.addFormVisible = true;
  2976. if (this.user.company.packageEngineering == 1) {
  2977. if (this.professionList.length == 0) {
  2978. this.getProfessionList();
  2979. }
  2980. }
  2981. },
  2982. //获取项目审核人
  2983. getProjectAutorList(projectId) {
  2984. this.http.post('/project-auditor/getList',{projectId: projectId},
  2985. res => {
  2986. if (res.code == "ok") {
  2987. this.addForm.auditUserIds = res.data.map(function(item) {
  2988. return item.auditorId;
  2989. });
  2990. } else {
  2991. this.$message({
  2992. message: res.msg,
  2993. type: "error"
  2994. });
  2995. }
  2996. },
  2997. error => {
  2998. this.listLoading = false;
  2999. this.$message({
  3000. message: error,
  3001. type: "error"
  3002. });
  3003. }
  3004. );
  3005. },
  3006. getProjectBaseData(projectId) {
  3007. this.http.post('/project-basecost/get',{projectId: projectId},
  3008. res => {
  3009. if (res.code == "ok") {
  3010. this.projectBaseCostData = res.data;
  3011. } else {
  3012. this.$message({
  3013. message: res.msg,
  3014. type: "error"
  3015. });
  3016. }
  3017. },
  3018. error => {
  3019. this.listLoading = false;
  3020. this.$message({
  3021. message: error,
  3022. type: "error"
  3023. });
  3024. }
  3025. );
  3026. },
  3027. //提交子项目创建修改请求
  3028. submitInsertSubProject () {
  3029. this.$refs.form2.validate(valid => {
  3030. if (valid) {
  3031. this.http.post('/sub-project/saveOrUpdate',this.temaddForm,
  3032. res => {
  3033. if (res.code == "ok") {
  3034. this.$message({
  3035. message: "操作成功",
  3036. type: "success"
  3037. });
  3038. this.subProject(this.currentProject);
  3039. this.addSubProject = false;
  3040. } else {
  3041. this.$message({
  3042. message: res.msg,
  3043. type: "error"
  3044. });
  3045. }
  3046. },
  3047. error => {
  3048. this.listLoading = false;
  3049. this.$message({
  3050. message: error,
  3051. type: "error"
  3052. });
  3053. }
  3054. );
  3055. }
  3056. });
  3057. },
  3058. // 项目基线合计
  3059. addUpfun() {
  3060. var total = 0;
  3061. for (var i=0;i<this.projectBaseCostData.length; i++) {
  3062. total += parseFloat(this.projectBaseCostData[i].baseAmount);
  3063. }
  3064. this.addForm.budget = total;
  3065. // var a = '0'
  3066. // var q = '0'
  3067. // var w = '0'
  3068. // var e = '0'
  3069. // var r = '0'
  3070. // // this.addForm.baseMan === undefined || this.addForm.baseMan === NaN ? this.addForm.baseMa = '0' : this.addForm.baseMan
  3071. // if (this.addForm.baseMan == undefined || this.addForm.baseMan == NaN) {
  3072. // a = 0
  3073. // } else {
  3074. // a = this.addForm.baseMan
  3075. // }
  3076. // if (this.addForm.baseFee !== undefined) q = this.addForm.baseFee
  3077. // if (this.addForm.baseOutsourcing !== undefined) w = this.addForm.baseOutsourcing
  3078. // if (this.addForm.baseRisk1 !== undefined) e = this.addForm.baseRisk1
  3079. // if (this.addForm.baseRisk2 !== undefined) r = this.addForm.baseRisk2
  3080. // this.addForm.budget = +a + +q + +w + +e + +r
  3081. },
  3082. submitInsert() {
  3083. this.$refs.form1.validate(valid => {
  3084. if (valid) {
  3085. if (this.user.company.packageEngineering == 1) {
  3086. if (!this.checkProjectProfession()) {//检查不通过,直接返回
  3087. return;
  3088. }
  3089. }
  3090. this.addLoading = true;
  3091. let formData = new FormData();
  3092. formData.append("name", this.addForm.name);
  3093. if(this.addForm.projectDesc != null) {
  3094. formData.append("projectDesc", this.addForm.projectDesc);
  3095. }
  3096. if(this.addForm.id != null) {
  3097. formData.append("id", this.addForm.id);
  3098. }
  3099. if(this.addForm.isPublic != null) {
  3100. formData.append("isPublic", this.addForm.isPublic);
  3101. }
  3102. if(this.addForm.userId.length != 0 && this.addForm.isPublic == 0) {
  3103. for(var j in this.addForm.userId) {
  3104. formData.append("userId", this.addForm.userId[j]);
  3105. }
  3106. }
  3107. if(this.addForm.inchargerId != null) {
  3108. formData.append("inchargerId", this.addForm.inchargerId);
  3109. }
  3110. if(this.addForm.code != null) {
  3111. formData.append("code", this.addForm.code);
  3112. }
  3113. if(this.addForm.planStartDate != null) {
  3114. formData.append("planStartDate", this.addForm.planStartDate);
  3115. }
  3116. if(this.addForm.planEndDate != null) {
  3117. formData.append("planEndDate", this.addForm.planEndDate);
  3118. }
  3119. if(this.addForm.level != null) {
  3120. formData.append("level", this.addForm.level);
  3121. }
  3122. if(this.addForm.contractAmount != null) {
  3123. formData.append("contractAmount", this.addForm.contractAmount);
  3124. }
  3125. if (this.projectBaseCostData != null) {
  3126. formData.append("projectBaseCostData", JSON.stringify(this.projectBaseCostData));
  3127. //计算总预算成本
  3128. if (this.addForm.budget == null) {
  3129. this.addForm.budget = 0;
  3130. }
  3131. formData.append("budget", this.addForm.budget);
  3132. }
  3133. if (this.addForm.customerId == null) {
  3134. formData.append("customerId", 0);
  3135. } else {
  3136. formData.append("customerId", this.addForm.customerId);
  3137. }
  3138. if (this.chosenLeaders != null && this.chosenLeaders.length > 0) {
  3139. formData.append("chosenLeaders", JSON.stringify(this.chosenLeaders));
  3140. }
  3141. if (this.user.timeType.outputValueStatus == 1){
  3142. formData.append("outputValue",this.addForm.outputValue)
  3143. }
  3144. var listId = []
  3145. var listName = []
  3146. for(var i in this.auseList) {
  3147. for(var j in this.ause) {
  3148. if(this.auseList[i] == this.ause[j].id) {
  3149. listId.push(this.ause[j].id);
  3150. listName.push(this.ause[j].name);
  3151. break;
  3152. }
  3153. }
  3154. }
  3155. listId.toString()
  3156. listName.toString()
  3157. formData.append("associateDegrees", listId)
  3158. formData.append("associateDegreeNames", listName)
  3159. //日报审核人
  3160. formData.append("auditUserIds", JSON.stringify(this.addForm.auditUserIds));
  3161. if(this.addForm.category != null) {
  3162. formData.append("category", this.addForm.category);
  3163. }
  3164. if(this.user.timeType.mainProjectState == '1' && this.addForm.projectMainId) {
  3165. formData.append("projectMainId", this.addForm.projectMainId);
  3166. }
  3167. // 提交供应商
  3168. // 线判断是否有供应商
  3169. if(this.user.company.packageProvider) {
  3170. let suppStrName = []
  3171. for(let is in this.addForm.supplierId) {
  3172. for(let js in this.supplierList) {
  3173. if(this.addForm.supplierId[is] == this.supplierList[js].id) {
  3174. suppStrName.push(this.supplierList[js].providerName)
  3175. }
  3176. }
  3177. }
  3178. formData.append("providerNames", suppStrName.toString());
  3179. formData.append("providerIds", this.addForm.supplierId.toString());
  3180. }
  3181. // 判断公司id是否等于 936
  3182. if(this.user.companyId == '936') {
  3183. formData.append("contractCode", this.addForm.contractCode ? this.addForm.contractCode : '');
  3184. formData.append("warrantyStartDate", this.addForm.warrantyStartDate ? this.addForm.warrantyStartDate : '');
  3185. formData.append("warrantyEndDate", this.addForm.warrantyEndDate ? this.addForm.warrantyEndDate : '');
  3186. formData.append("projectCategorySub", this.addForm.projectCategorySub ? this.addForm.projectCategorySub : '');
  3187. formData.append("region", this.addForm.region ? this.addForm.region : '');
  3188. formData.append("bu", this.addForm.bu ? this.addForm.bu : '');
  3189. }
  3190. if(this.user.companyId == '428') {
  3191. formData.append("projectCategorySub", this.addForm.projectCategorySub ? this.addForm.projectCategorySub : '');
  3192. }
  3193. // formData.append("associateDegreeNames", listName)
  3194. // console.log("addform",this.addForm);
  3195. // return
  3196. this.http.uploadFile(this.port.project.add,formData,
  3197. res => {
  3198. this.addLoading = false;
  3199. if (res.code == "ok") {
  3200. this.$message({
  3201. message: (this.addForm.id!=null?'修改':'创建')+"成功",
  3202. type: "success"
  3203. });
  3204. this.addFormVisible = false;
  3205. this.getList();
  3206. if (this.user.company.packageEngineering == 1) {
  3207. this.saveProjectProfessions(res.data);
  3208. }
  3209. } else {
  3210. this.$message({
  3211. message: res.msg,
  3212. type: "error"
  3213. });
  3214. }
  3215. },
  3216. error => {
  3217. this.addLoading = false;
  3218. this.$message({
  3219. message: error,
  3220. type: "error"
  3221. });
  3222. });
  3223. }
  3224. });
  3225. },
  3226. // 删除
  3227. deletePro(i, item) {
  3228. this.$confirm("确定要删除项目[" + item.name + "]吗?","删除项目", {
  3229. confirmButtonText: "确定",
  3230. cancelButtonText: "取消",
  3231. type: "warning"
  3232. })
  3233. .then(() => {
  3234. this.listLoading = true;
  3235. this.http.post(this.port.project.delete,{
  3236. id: item.id
  3237. },
  3238. res => {
  3239. this.listLoading = false;
  3240. if (res.code == "ok") {
  3241. this.$message({
  3242. message: "删除成功",
  3243. type: "success"
  3244. });
  3245. this.getList();
  3246. this.addFormVisible = false
  3247. } else if (res.code == 'reconfirm') {
  3248. this.deleteAlertMsg = res.msg;
  3249. this.forceDeletePro(item.id);
  3250. } else {
  3251. this.$message({
  3252. message: res.msg,
  3253. type: "error"
  3254. });
  3255. }
  3256. },
  3257. error => {
  3258. this.listLoading = false;
  3259. this.$message({
  3260. message: error,
  3261. type: "error"
  3262. });
  3263. }
  3264. );
  3265. })
  3266. .catch(() => {});
  3267. },
  3268. // 模板下载
  3269. downloadmb(){
  3270. this.http.post('/project/getTemplate',{
  3271. companyId: this.user.companyId
  3272. },res => {
  3273. if(res.code == 'ok'){
  3274. var filePath = res.data;
  3275. const a = document.createElement('a'); // 创建a标签
  3276. var fileName = filePath.split('/')[2];
  3277. a.setAttribute('download', fileName);// download属性
  3278. a.setAttribute('href', filePath);// href链接
  3279. a.click(); //自执行点击事件
  3280. a.remove();
  3281. }else{
  3282. this.$message({
  3283. message: res.msg,
  3284. type: 'error'
  3285. })
  3286. }
  3287. },err => {
  3288. this.$message({
  3289. message: err,
  3290. type: 'error'
  3291. })
  3292. })
  3293. },
  3294. //强制删除项目
  3295. forceDeletePro(deleteProId) {
  3296. this.$confirm(this.deleteAlertMsg,"删除项目", {
  3297. confirmButtonText: "确定",
  3298. cancelButtonText: "取消",
  3299. type: "warning"
  3300. })
  3301. .then(() => {
  3302. this.listLoading = true;
  3303. this.http.post(this.port.project.delete,{
  3304. id: deleteProId ,force:1
  3305. },
  3306. res => {
  3307. this.listLoading = false;
  3308. if (res.code == "ok") {
  3309. this.$message({
  3310. message: "删除成功",
  3311. type: "success"
  3312. });
  3313. this.getList();
  3314. this.addFormVisible = false;
  3315. } else {
  3316. this.$message({
  3317. message: res.msg,
  3318. type: "error"
  3319. });
  3320. }
  3321. },
  3322. error => {
  3323. this.listLoading = false;
  3324. this.$message({
  3325. message: error,
  3326. type: "error"
  3327. });
  3328. }
  3329. );
  3330. })
  3331. .catch(() => {});
  3332. },
  3333. detail(i) {
  3334. this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
  3335. }
  3336. },
  3337. created() {
  3338. let height = window.innerHeight;
  3339. this.tableHeight = height - 195;
  3340. const that = this;
  3341. window.onresize = function temp() {
  3342. that.tableHeight = window.innerHeight - 195;
  3343. };
  3344. },
  3345. mounted() {
  3346. this.userssHu()
  3347. this.getDepartment();
  3348. this.getList();
  3349. this.getUsers();
  3350. this.getCustomerList();
  3351. this.getProjectBaseConfigList();
  3352. this.getClfConfigList()
  3353. this.yanjiuzx()
  3354. // 判断是否有供应商字段
  3355. if(this.user.company.packageProvider == 1){
  3356. this.getSupplierList()
  3357. // this.getPhase()
  3358. }
  3359. if(this.user.company.packageProject == 1) {
  3360. this.obtainPhase()
  3361. }
  3362. // this.getSupplierList()
  3363. if(this.user.timeType.mainProjectState == 1){
  3364. this.getMainProject()
  3365. }
  3366. if(this.user.timeType.projectLevelState == 1){
  3367. this.getProjectLevel()
  3368. }
  3369. // 判断释放为专业版
  3370. if(this.user.company.packageProject == 1) {
  3371. this.importanceList = [{id:1,label:'正常'},{id:5,label:'低风险'},{id:6,label:'中风险'},{id:7,label:'高风险'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}]
  3372. } else {
  3373. this.importanceList = [{id:1,label:'正常'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}]
  3374. }
  3375. }
  3376. };
  3377. </script>
  3378. <style lang="scss" scoped>
  3379. .rg_span{
  3380. display: inline-block;
  3381. }
  3382. .rg_span span {
  3383. text-align: right;
  3384. box-sizing: border-box;
  3385. padding-right: 10px;
  3386. }
  3387. .el-dialog__title {
  3388. display: inline-table;
  3389. margin-top: 20px;
  3390. }
  3391. .addss {
  3392. width: 100%;
  3393. overflow: hidden;
  3394. white-space: nowrap;
  3395. text-overflow: ellipsis;
  3396. }
  3397. // 111
  3398. </style>
  3399. <style>
  3400. .el-dropdown-link {
  3401. color: #409EFF;
  3402. }
  3403. .customdropdown{
  3404. margin-left: 10px;
  3405. }
  3406. .customdropdown .el-dropdown__caret-button{
  3407. height: 27px;
  3408. }
  3409. .customdropdown .el-button--mini:nth-child(1){
  3410. height: 27px;
  3411. }
  3412. .customdropdown_menu{
  3413. padding: 0;
  3414. }
  3415. .customdropdown_menu_btn{
  3416. border-color: transparent;
  3417. }
  3418. .ganttdialog .el-dialog__body{
  3419. height: 550px;
  3420. }
  3421. .toolbar_formitem_n1{
  3422. margin-right: 0 !important;
  3423. }
  3424. </style>