list.vue 112 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443
  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="请输入项目名称关键字" 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-select>
  28. </el-form-item>
  29. <!-- 分类筛选 -->
  30. <el-form-item >
  31. <span style="margin-left:5px;margin-right:5px;color:#606266;">分类</span>
  32. <el-select v-model="statusClf" style="width:110px;" placeholder="请选择" clearable @change="searchClfList" size="small">
  33. <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
  34. </el-select>
  35. </el-form-item>
  36. <!-- 分类条目 -->
  37. <el-form-item style="float:right;" v-if="permissions.projectClassification">
  38. <el-link type="primary" :underline="false" @click="showClfDialog = true">分类管理</el-link>
  39. </el-form-item>
  40. <!-- 项目成本基线条目 -->
  41. <el-form-item style="float:right;" v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">
  42. <el-link type="primary" :underline="false" @click="showBaseCostItemDialog">基线成本项</el-link>
  43. </el-form-item>
  44. <el-form-item style="float:right;" v-if="permissions.projectExport">
  45. <el-link type="primary" style="margin-left:5px;" :underline="false" @click="exportProjectData" download="项目导出.xlsx">导出项目</el-link>
  46. </el-form-item>
  47. <el-form-item style="float:right;" v-if="permissions.projectImport">
  48. <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/项目导入模板.xlsx" download="项目导入模板.xlsx">模板下载</el-link>
  49. </el-form-item>
  50. <el-form-item style="float:right;" v-if="permissions.projectImport">
  51. <el-upload ref="upload" style="margin-left:5px;" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
  52. <el-link type="primary" :underline="false" >导入项目</el-link>
  53. </el-upload>
  54. </el-form-item>
  55. <!-- <el-form-item style="float:right;" v-if="user.role == 1||user.role == 2||user.role == 5"> -->
  56. <el-form-item style="float:right;" v-if="permissions.projectNew">
  57. <el-link type="primary" :underline="false" @click="handleAdd(-1,null)">新增项目</el-link>
  58. </el-form-item>
  59. <el-form-item style="float:right;" v-if="permissions.projectResources">
  60. <!-- <router-link to="/projectGantt"> -->
  61. <el-link type="primary" :underline="false" @click="isganttshow = true">资源分配</el-link>
  62. <!-- </router-link> -->
  63. <el-dialog v-if="isganttshow" :visible.sync="isganttshow" width="1480px" top="3vh" style="height:96%" class="ganttdialog">
  64. <projectgantt></projectgantt>
  65. </el-dialog>
  66. </el-form-item>
  67. </el-form>
  68. </el-col>
  69. <!--列表-->
  70. <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedWudulist">
  71. <el-table-column type="selection" width="60" v-if="user.timeType.customDegreeActive && permissions.projectManagement"></el-table-column>
  72. <el-table-column type="index" width="60" v-else>
  73. <template slot-scope="scope" >
  74. {{scope.$index+1+(page-1)*size}}
  75. </template>
  76. </el-table-column>
  77. <el-table-column prop="projectCode" label="项目编号" sortable width="120"></el-table-column>
  78. <el-table-column prop="categoryName" label="项目分类" sortable width="120"></el-table-column>
  79. <el-table-column prop="projectName" label="项目名称" width="250" sortable>
  80. <template slot-scope="scope">
  81. <!-- <div class="kans">
  82. <el-link type="primary" v-if="user.company.packageProject==1" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
  83. <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
  84. </div> -->
  85. <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectName.length > 15">
  86. <div>
  87. <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
  88. <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
  89. </div>
  90. <div slot="reference" class="kans">
  91. <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
  92. <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
  93. </div>
  94. </el-popover>
  95. <div v-else>
  96. <el-link type="primary" v-if="user.company.packageProject==1" :underline="false" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
  97. <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
  98. </div>
  99. </template>
  100. </el-table-column>
  101. <el-table-column prop="inchargerName" label="负责人" sortable width="150">
  102. <template slot-scope="scope">
  103. <el-link type="primary" :underline="false" @click="showUser(scope.row.inchargerId)">{{scope.row.inchargerName}}</el-link>
  104. </template>
  105. </el-table-column>
  106. <el-table-column prop="participator" label="参与者" :width="user.company.packageCustomer != 1 ? '' : '300'" sortable v-if="user.company.packageProject==0">
  107. <template slot-scope="scope">
  108. <!-- <v-for v-for="par in scope.row.participator" :key="par.id" >
  109. <el-link style="margin-right:10px;" type="primary" @click="showUser(par.id)">{{par.name}}</el-link>
  110. </v-for> -->
  111. <div v-if="scope.row.participator.length > 5">
  112. <el-popover placement="top" width="500" trigger="hover" v-if="scope.row.participator.length > 0">
  113. <span v-for="par in scope.row.participator" :key="par.id">
  114. <el-link style="margin-right:10px;" :underline="false" type="primary" @click="showUser(par.id)">{{par.name}}</el-link>
  115. </span>
  116. <div slot="reference" class="addss">
  117. <span v-for="par in scope.row.participator" :key="par.id">
  118. <el-link style="margin-right:10px;" :underline="false" type="primary" @click="showUser(par.id)">{{par.name}}</el-link>
  119. </span>
  120. </div>
  121. </el-popover>
  122. </div>
  123. <div v-else>
  124. <span v-for="par in scope.row.participator" :key="par.id" >
  125. <el-link style="margin-right:10px;" type="primary" :underline="false" @click="showUser(par.id)">{{par.name}}</el-link>
  126. </span>
  127. </div>
  128. </template>
  129. </el-table-column>
  130. <!-- 客户管理 -->
  131. <el-table-column prop="customerName" label="客户" v-if="user.company.packageCustomer == 1">
  132. </el-table-column>
  133. <el-table-column prop="status" label="状态" width="100" >
  134. <template slot-scope="scope">
  135. {{scope.row.status == null?"-":statusTxt[scope.row.status]}}
  136. </template>
  137. </el-table-column>
  138. <!--专业项目协作-->
  139. <el-table-column prop="planStartDate" label="开始日期" width="96" >
  140. </el-table-column>
  141. <el-table-column prop="planEndDate" label="截止日期" width="96" >
  142. </el-table-column>
  143. <el-table-column prop="progress" label="完成度" width="100" v-if="user.company.packageProject == 1">
  144. <template slot-scope="scope">
  145. {{scope.row.progress==null?"-":scope.row.progress}}%
  146. </template>
  147. </el-table-column>
  148. <el-table-column label="操作" width="350" align="left">
  149. <template slot-scope="scope">
  150. <el-button v-if="permissions.projectManagement || user.id==scope.row.creatorId" size="mini" @click="subProject(scope.row)">子项目</el-button>
  151. <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>
  152. <el-button v-if="permissions.projectManagement || user.id==scope.row.creatorId" size="mini" @click="deletePro(scope.$index, scope.row)">删除</el-button>
  153. <!-- 111 -->
  154. <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">
  155. 完成
  156. <el-dropdown-menu slot="dropdown" class="customdropdown_menu">
  157. <el-button size="mini" @click="cancelPro(scope.row)" class="customdropdown_menu_btn">撤销</el-button>
  158. </el-dropdown-menu>
  159. </el-dropdown>
  160. <!-- <el-button v-if="permissions.projectManagement && scope.row.status == 1" size="mini" @click="cancelPro(scope.row)">撤销</el-button>
  161. <el-button v-if="permissions.projectManagement && scope.row.status == 1" size="mini" @click="finishPro(scope.row)">完成</el-button> -->
  162. <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>
  163. </template>
  164. </el-table-column>
  165. </el-table>
  166. <!--工具条-->
  167. <el-col :span="24" class="toolbar">
  168. <template v-if="user.timeType.customDegreeActive && permissions.projectManagement">
  169. <el-button size="small" @click="batchSetWudulistBtn1">取消</el-button>
  170. <el-button size="small" type="primary" @click="batchSetWudulistBtn2(true)">批量设置{{user.timeType.customDegreeName}}</el-button>
  171. <el-button size="small" type="primary" @click="batchSetWudulistBtn2(false)">批量添加{{user.timeType.customDegreeName}}</el-button>
  172. <el-button size="small" type="primary" @click="addGroupPerson()" :loading="addGroupPersonBtnLoading">批量添加分组参与人</el-button>
  173. </template>
  174. <el-pagination
  175. @size-change="handleSizeChange"
  176. @current-change="handleCurrentChange"
  177. :page-sizes="[20 , 50 , 80 , 100]"
  178. :page-size="20"
  179. layout="total, sizes, prev, pager, next"
  180. :total="total"
  181. style="float:right;"
  182. ></el-pagination>
  183. </el-col>
  184. <!--新增界面-->
  185. <el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="960px">
  186. <el-form ref="form1" :model="addForm" :rules="rules" label-width="120px">
  187. <el-form-item label="项目编号" >
  188. <el-input v-model="addForm.code" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目编号" clearable></el-input>
  189. </el-form-item>
  190. <el-form-item label="项目分类">
  191. <el-select v-model="addForm.category" style="width:32%;" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id">
  192. <el-option v-for="(item) in baseClfList" :key="item.id" :value="item.id" :label="item.name"></el-option>
  193. </el-select>
  194. </el-form-item>
  195. <el-form-item label="项目名称" prop="name">
  196. <el-input v-model="addForm.name" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目名称" clearable></el-input>
  197. </el-form-item>
  198. <el-form-item label="项目描述" prop="projectDesc">
  199. <el-input v-model="addForm.projectDesc" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目描述" clearable maxlength="50" show-word-limit></el-input>
  200. </el-form-item>
  201. <el-form-item label="项目类型" prop="isPublic">
  202. <el-select v-model="addForm.isPublic" style="width:32%;" @change="selectPublic" :disabled="!permissions.projectManagement && addForm.creatorId != user.id">
  203. <el-option :value="0" label="普通项目"></el-option>
  204. <el-option :value="1" label="公共项目"></el-option>
  205. </el-select>
  206. <el-tooltip effect="dark" content="普通项目只对参与人员开放,公共项目对所有成员开放" placement="top-start">
  207. <i class="el-icon-question"></i>
  208. </el-tooltip>
  209. <div v-if="user.company.packageCustomer == 1" style="display: inline-block;width: 50%">
  210. <span style="margin-left:63px;margin-right:10px;" >客户</span>
  211. <el-select v-model="addForm.customerId" clearable="true" filterable placeholder="请选择客户" style="width:70%;" >
  212. <el-option v-for="item in customerList" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
  213. </el-select>
  214. </div>
  215. </el-form-item>
  216. <el-form-item :label="yonghuUser.customDegreeName" v-if="yonghuUser.customDegreeActive == 1">
  217. <el-select v-model="auseList" multiple placeholder="请选择" filterable="true" style="width: 100%">
  218. <span v-for="(item, index) in ause" :key="index">
  219. <el-option :label="item.name" :value="item.id"></el-option>
  220. </span>
  221. </el-select>
  222. </el-form-item>
  223. <!-- <el-form-item label="客户" v-if="user.company.packageCustomer == 1">
  224. <el-select v-model="addForm.customerId" clearable="true" filterable placeholder="请选择客户" style="width:100%;" >
  225. <el-option v-for="item in customerList" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
  226. </el-select>
  227. </el-form-item> -->
  228. <el-form-item label="全部参与者" v-show="addForm.isPublic == 0">
  229. <el-tooltip placement="top" effect="light">
  230. <div slot="content" style="width:780px">{{addForm.userNames}}</div>
  231. <el-input @focus="showChooseMembTree" v-model="addForm.userNames"></el-input>
  232. </el-tooltip>
  233. </el-form-item>
  234. <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%;" >
  235. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
  236. </el-select>
  237. </el-form-item>
  238. <!--非建筑工程专业版设置 -->
  239. <el-form-item label="日报审核权限" v-if="user.company.packageProject==1 && user.company.packageEngineering == 0">
  240. <el-radio-group v-model="addForm.taskGpIncharge" >
  241. <el-radio :label="0">由项目设置的审核人审核</el-radio>
  242. <el-radio :label="1">由各任务分组负责人审核</el-radio>
  243. </el-radio-group>
  244. </el-form-item>
  245. <el-form-item label="日报审核人" v-show="addForm.taskGpIncharge==0">
  246. <el-select v-model="addForm.auditUserIds" multiple="true" :disabled=" !(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable placeholder="默认为项目负责人" style="width:100%;" >
  247. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
  248. </el-select>
  249. </el-form-item>
  250. <!--专业项目协作版本功能 -->
  251. <el-form-item label="级别" v-if="user.company.packageProject==1">
  252. <el-select v-model="addForm.level" placeholder="请选择级别" style="width:32%;" >
  253. <el-option v-for="item in importanceList" :key="item.id" :label="item.label" :value="item.id"></el-option>
  254. </el-select>
  255. <!-- 增加合同金额字段 -->
  256. <span style="margin-left:63px;margin-right:10px;" v-if="user.company.packageProject==1">合同金额</span>
  257. <el-input id="contractAmount" v-model="addForm.contractAmount" style="width:33%;"
  258. placeholder="整数" clearable @keyup.native="restrictNumber('contractAmount')" ></el-input><span style="margin-left:10px;">元</span>
  259. <!-- 增加合同金额字段 -->
  260. </el-form-item>
  261. <el-form-item label="开始日期" prop="planStartDate" >
  262. <el-date-picker v-model="addForm.planStartDate"
  263. :editable="false" style="width:32%;"
  264. format="yyyy-MM-dd"
  265. value-format="yyyy-MM-dd"
  266. :clearable="false" type="date"
  267. placeholder="选择日期"></el-date-picker>
  268. <span style="margin-left:63px;margin-right:10px;" >截止日期</span>
  269. <el-date-picker v-model="addForm.planEndDate" style="width:33%;"
  270. :editable="false"
  271. format="yyyy-MM-dd"
  272. value-format="yyyy-MM-dd"
  273. :clearable="false" type="date"
  274. placeholder="选择日期"></el-date-picker>
  275. </el-form-item>
  276. <!-- 项目基线 -->
  277. <div style="margin: 10px 0 30px 0;min-height:200px;" v-if="user.company.packageProject == 1">
  278. <el-tabs v-model="activeName" @tab-click="handleClick">
  279. <el-tab-pane label="成本基线" name="baseCostPanel" >
  280. <div style="padding-top:10px;">
  281. <!--新版 -->
  282. <span class="rg_span" v-for="(item, index) in projectBaseCostData" :key="item.id">
  283. <span style="width:120px;display: inline-block;" v-if="user.company.packageProject==1">{{item.baseName}}</span>
  284. <el-input :id="'baseCost'+index" @input="addUpfun()" v-model="item.baseAmount" style="width:200px; margin-bottom: 20px"
  285. placeholder="整数" clearable @keyup.native="restrictNumber('baseCost'+index)"></el-input><span style="margin-left:10px;">元</span>
  286. </span>
  287. <!-- 合计 -->
  288. <div style="margin-top: 10px;float:right;">
  289. <span style="margin-right:50px;margin-right:10px;" v-if="user.company.packageProject==1">合计</span>
  290. <span v-if="addForm.budget <= 0 || addForm.budget == undefined">0</span>
  291. <span v-else>{{addForm.budget | numberToCurrency}}</span>
  292. <span style="margin-right:50px;margin-left:10px;">元</span>
  293. </div>
  294. </div>
  295. </el-tab-pane>
  296. <el-tab-pane label="工程专业" name="engineeringProfession" v-if="user.company.packageEngineering == 1">
  297. <div style="padding-top:10px;">
  298. <el-table :data="projectProfessionList" size="small" :key="Math.random()">
  299. <el-table-column prop="professionId" width="200">
  300. <template slot-scope="scope">
  301. <el-select v-model="scope.row.professionId" >
  302. <el-option v-for="item in professionList" :key="item.id" :label="item.name" :value="item.id"/>
  303. </el-select>
  304. </template>
  305. <template slot="header" >
  306. <span style="font-size:14px;font-weight:normal;">专业名称</span>
  307. </template>
  308. </el-table-column>
  309. <el-table-column prop="percentage" width="120" label="占比(%)">
  310. <template slot-scope="scope">
  311. <div><el-input type="number" v-model="scope.row.percentage"></el-input></div>
  312. </template>
  313. </el-table-column>
  314. <el-table-column prop="membNames" label="相关人员及占比">
  315. <template slot-scope="scope">
  316. <span style="margin:0 5px;" v-for="item in scope.row.membList" :key="item.membId">{{item.membName}}({{item.percentage}}%)</span>
  317. <el-link @click="showEditPpMembs(scope.row)">{{(scope.row.membList == null || scope.row.membList.length == 0)?'设置专业参与人员':'设置'}}</el-link>
  318. </template>
  319. </el-table-column>
  320. <el-table-column prop="inchargerName" width="120" label="负责人">
  321. <template slot-scope="scope">
  322. <el-select v-model="scope.row.inchargerId" >
  323. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id">
  324. </el-option>
  325. </el-select>
  326. </template>
  327. </el-table-column>
  328. <el-table-column width="80">
  329. <template slot-scope="scope">
  330. <el-button icon="el-icon-delete" size="mini" style="margin-left:10px;" @click.stop.native="deleteItem(scope.$index)"></el-button>
  331. </template>
  332. <template slot="header" >
  333. <el-link type="primary" :underline="false" @click="addItem">添加</el-link>
  334. </template>
  335. </el-table-column>
  336. </el-table>
  337. </div>
  338. </el-tab-pane>
  339. <el-tab-pane label="相关领导" name="leaders" >
  340. <div style="padding-top:10px;">
  341. <el-input @focus="showChooseLeaderTree" v-model="addForm.notifyUserNames" placeholder="请选择需要接收审核通知的相关领导"></el-input>
  342. </div>
  343. </el-tab-pane>
  344. </el-tabs>
  345. </div>
  346. </el-form>
  347. <div slot="footer" class="dialog-footer;">
  348. <el-button @click.native="addFormVisible = false">取消</el-button>
  349. <el-button type="primary" @click="submitInsert" :loading="addLoading">提交</el-button>
  350. </div>
  351. </el-dialog>
  352. <!--用户详细信息弹出框-->
  353. <el-dialog title="查看详情" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
  354. <div class="line"><span>姓名</span><span>{{userDetail.name}}</span></div>
  355. <div class="line"><span>手机号码</span><span>{{userDetail.phone}}</span></div>
  356. <div class="line"><span>角色</span><span>{{roleArray[userDetail.role]}}</span></div>
  357. <div class="line"><span>部门</span><span>{{userDetail.departmentName}}</span></div>
  358. <div slot="footer" class="dialog-footer">
  359. <el-button type="primary" @click="userDetailVisible = false" >确定</el-button>
  360. </div>
  361. </el-dialog>
  362. <!-- 子项目列表 -->
  363. <el-dialog title="子项目列表" show-header="false" v-if="subProjectVisible" :visible.sync="subProjectVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  364. <el-table :data="subProjectList" highlight-current-row height="400" style="width: 100%;">
  365. <!-- <el-table-column type="index" width="60" label="序号">
  366. <template slot-scope="scope" >
  367. {{scope.$index+1+(page-1)*size}}
  368. </template>
  369. </el-table-column> -->
  370. <el-table-column width="120" label="子项目编号" prop="code"></el-table-column>
  371. <el-table-column prop="name" label="名称" ></el-table-column>
  372. <el-table-column label="操作" width="150">
  373. <template slot-scope="scope" >
  374. <el-button size="small" type="primary" @click="addNewSubProject(scope.row)">编辑</el-button>
  375. <el-button size="small" type="danger" @click="deleteSubPro(scope.row)">删除</el-button>
  376. </template>
  377. </el-table-column>
  378. </el-table>
  379. <div slot="footer" class="dialog-footer">
  380. <el-button type="primary" @click="subProjectVisible = false" >关闭</el-button>
  381. <el-button type="primary" @click="addNewSubProject()" >新增子项目</el-button>
  382. </div>
  383. </el-dialog>
  384. <!-- 新增子项目弹出框 -->
  385. <el-dialog title="新增/修改子项目" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="500px">
  386. <el-form ref="form2" :model="temaddForm" :rules="rules" label-width="100px">
  387. <el-form-item label="项目编号" prop="code">
  388. <el-input v-model="temaddForm.code" placeholder="请输入项目编号" clearable></el-input>
  389. </el-form-item>
  390. <el-form-item label="项目名称" prop="name">
  391. <el-input v-model="temaddForm.name" placeholder="请输入项目名称" clearable></el-input>
  392. </el-form-item>
  393. </el-form>
  394. <div slot="footer" class="dialog-footer">
  395. <el-button @click.native="addSubProject = false">取消</el-button>
  396. <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">提交</el-button>
  397. </div>
  398. </el-dialog>
  399. <!-- 项目基线成本项配置弹出框 -->
  400. <el-dialog title="项目基线成本项管理" show-header="false" v-if="showBaseConfig" :visible.sync="showBaseConfig" :close-on-click-modal="false" customClass="customWidth" width="600px">
  401. <el-table :data="baseCostItemList" highlight-current-row height="400" style="width: 100%;">
  402. <el-table-column type="index" width="60" label="序号">
  403. <template slot-scope="scope" >
  404. {{scope.$index+1+(page-1)*size}}
  405. </template>
  406. </el-table-column>
  407. <el-table-column prop="name" label="名称" ></el-table-column>
  408. <el-table-column prop="alarmType" label="预警">
  409. <template slot-scope="scope">
  410. <span>{{scope.row.alarmType ? "工时成本预警" : "无预警"}}</span>
  411. </template>
  412. </el-table-column>
  413. <el-table-column label="操作" width="150">
  414. <template slot-scope="scope" >
  415. <el-button size="small" type="primary" @click="addNewBaseItem(scope.row)">编辑</el-button>
  416. <el-button size="small" type="danger" @click="deleteBaseItem(scope.row)">删除</el-button>
  417. </template>
  418. </el-table-column>
  419. </el-table>
  420. <div slot="footer" class="dialog-footer">
  421. <el-button type="primary" @click="showBaseConfig = false" >关闭</el-button>
  422. <el-button type="primary" @click="addNewBaseItem()" >新增成本项</el-button>
  423. </div>
  424. </el-dialog>
  425. <!-- 分类条目配置 -->
  426. <el-dialog title="项目分类条目管理" show-header="false" v-if="showClfDialog" :visible.sync="showClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  427. <el-table :data="baseClfList" highlight-current-row height="400" style="width: 100%;">
  428. <el-table-column type="index" width="60" label="序号">
  429. <template slot-scope="scope" >
  430. {{scope.$index+1+(page-1)*size}}
  431. </template>
  432. </el-table-column>
  433. <el-table-column prop="name" label="名称" ></el-table-column>
  434. <el-table-column label="操作" width="150">
  435. <template slot-scope="scope" >
  436. <el-button size="small" type="primary" @click="addNewClf(scope.row)">编辑</el-button>
  437. <el-button size="small" type="danger" @click="deleteClf(scope.row)">删除</el-button>
  438. </template>
  439. </el-table-column>
  440. </el-table>
  441. <div slot="footer" class="dialog-footer">
  442. <el-button type="primary" @click="showClfDialog = false" >关闭</el-button>
  443. <el-button type="primary" @click="addNewClf()" >新增分类项</el-button>
  444. </div>
  445. </el-dialog>
  446. <!-- 新增/编辑 分类条目 -->
  447. <el-dialog title="新增/修改分类条目" v-if="addClfDialog" :visible.sync="addClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  448. <el-form ref="form2" :model="addClf" :rules="rules" label-width="100px">
  449. <el-form-item label="分类名称" prop="name">
  450. <el-input v-model="addClf.name" placeholder="请输入名称" clearable></el-input>
  451. </el-form-item>
  452. </el-form>
  453. <div slot="footer" class="dialog-footer">
  454. <el-button @click.native="addClfDialog = false">取消</el-button>
  455. <el-button type="primary" @click="submitClf" :loading="addLoading">提交</el-button>
  456. </div>
  457. </el-dialog>
  458. <el-dialog title="新增/修改成本项" v-if="addBaseItemDialog" :visible.sync="addBaseItemDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
  459. <el-form ref="form2" :model="addForm" :rules="rules" label-width="100px">
  460. <el-form-item label="成本项名称" prop="name">
  461. <el-input v-model="addForm.name" placeholder="请输入名称" clearable></el-input>
  462. </el-form-item>
  463. <el-form-item label="预警" prop="alarmType">
  464. <el-radio v-model="addForm.alarmType" :label="0">无预警</el-radio>
  465. <el-radio v-model="addForm.alarmType" :label="1">工时成本预警</el-radio>
  466. </el-form-item>
  467. </el-form>
  468. <div slot="footer" class="dialog-footer">
  469. <el-button @click.native="addBaseItemDialog = false">取消</el-button>
  470. <el-button type="primary" @click="submitInsertBaseItem" :loading="addLoading">提交</el-button>
  471. </div>
  472. </el-dialog>
  473. <!-- 按部门选择人员 -->
  474. <el-dialog title="选择参与人员" v-if="chooseParticipVisible" :visible.sync="chooseParticipVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  475. <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
  476. <div class="tree" style="height:400px">
  477. <el-scrollbar style="height:100%">
  478. <el-input
  479. placeholder="输入关键字进行过滤"
  480. v-model="filterText">
  481. </el-input>
  482. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  483. ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
  484. highlight-current :filter-node-method="filterNode"></el-tree>
  485. </el-scrollbar>
  486. </div>
  487. <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>
  488. <div slot="footer" class="dialog-footer">
  489. <el-button @click="chooseParticipVisible = false" >取消</el-button>
  490. <el-button type="primary" @click="chooseParticip()" >确定</el-button>
  491. </div>
  492. </el-dialog>
  493. <!-- 按部门选择相关领导 -->
  494. <el-dialog title="选择相关领导" v-if="chooseLeaderVisible" :visible.sync="chooseLeaderVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
  495. <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
  496. <div class="tree" style="height:400px">
  497. <el-scrollbar style="height:100%">
  498. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  499. ref="chooseLeaderTree" @check-change="onLeaderTreeItemChange" :default-checked-keys="addForm.notifyUserIds"
  500. highlight-current ></el-tree>
  501. </el-scrollbar>
  502. </div>
  503. <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>
  504. <div slot="footer" class="dialog-footer">
  505. <el-button @click="chooseLeaderVisible = false" >取消</el-button>
  506. <el-button type="primary" @click="chooseLeader()" >确定</el-button>
  507. </div>
  508. </el-dialog>
  509. <!-- 项目专业人员的设置 -->
  510. <el-dialog title="设置项目专业人员" v-if="editPpMembDialog" :visible.sync="editPpMembDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
  511. <el-table :data="curProfessionRow.membList" height="400">
  512. <el-table-column prop="name" label="专业人员">
  513. <template slot-scope="scope">
  514. <el-select v-model="scope.row.membId" filterable placeholder="请选择专业参与人" style="width:100%;" >
  515. <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id">
  516. </el-option>
  517. </el-select>
  518. </template>
  519. </el-table-column>
  520. <el-table-column prop="percentage" width="120" label="占比(%)">
  521. <template slot-scope="scope">
  522. <el-input type="number" v-model="scope.row.percentage"></el-input>
  523. </template>
  524. </el-table-column>
  525. <el-table-column width="80">
  526. <template slot-scope="scope">
  527. <el-button icon="el-icon-delete" size="mini" style="margin-left:10px;" @click.stop.native="deleteMembItem(scope.$index)"></el-button>
  528. </template>
  529. <template slot="header" >
  530. <el-link @click="addMembItem">添加</el-link>
  531. </template>
  532. </el-table-column>
  533. </el-table>
  534. <div slot="footer" class="dialog-footer">
  535. <el-button @click="editPpMembDialog = false" >取消</el-button>
  536. <el-button type="primary" @click="addPpMemb" >确定</el-button>
  537. </div>
  538. </el-dialog>
  539. <!-- 批量修改自定义维度 -->
  540. <el-dialog :title="checkoradd ? '批量修改' : '批量添加'" :visible.sync="checkedWuduDialog" v-if="checkedWuduDialog" width="40%">
  541. <el-form model="" label-width="20%">
  542. <el-form-item :label="'设置' + user.timeType.customDegreeName">
  543. <el-select v-model="checkedWuduArr" value-key="id" :placeholder="'请选择' + user.timeType.customDegreeName" multiple style="width: 100%">
  544. <el-option v-for="item in ause" :key="item.id" :label="item.name" :value="item"></el-option>
  545. </el-select>
  546. </el-form-item>
  547. </el-form>
  548. <div slot="footer" class="dialog-footer">
  549. <el-button @click="checkedWuduDialog = false">取消</el-button>
  550. <el-button type="primary" @click="batchSetWudulistBtn3" v-if="checkoradd">确定</el-button>
  551. <el-button type="primary" @click="batchSetWudulistBtn4" v-if="!checkoradd">确定</el-button>
  552. </div>
  553. </el-dialog>
  554. <!-- 批量添加参与人 -->
  555. <el-dialog title="批量添加参与人" v-if="addGroupPersonDialog" :visible.sync="addGroupPersonDialog" width="40%">
  556. <el-form label-width="20%">
  557. <el-form-item label="选择人员">
  558. <el-tooltip placement="top" effect="light">
  559. <div slot="content" style="width:450px">{{addGroupPersonData.personNames}}</div>
  560. <el-input @focus="addGroupPersonP" v-model="addGroupPersonData.personNames"></el-input>
  561. </el-tooltip>
  562. </el-form-item>
  563. <el-form-item label="选择分组">
  564. <el-select v-model="addGroupPersonData.group" multiple placeholder="请选择分组" style="width:100%">
  565. <el-option v-for="item in addGroupList"
  566. :key="item.groupIds"
  567. :label="item.name"
  568. :value="item.groupIds"></el-option>
  569. </el-select>
  570. </el-form-item>
  571. </el-form>
  572. <div slot="footer" class="dialog-footer">
  573. <el-button @click="addGroupPersonDialog = false" >取消</el-button>
  574. <el-button type="primary" @click="addGroupPersonSure()" >确定</el-button>
  575. </div>
  576. <el-dialog append-to-body title="选择人员" v-if="addGroupPersonPdialog" :visible.sync="addGroupPersonPdialog" width="40%">
  577. <div class="tree" style="height:300px">
  578. <el-scrollbar style="height:100%">
  579. <el-input
  580. placeholder="输入关键字进行过滤"
  581. v-model="filterText2">
  582. </el-input>
  583. <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
  584. ref="chooseMembTree2" @check-change="addPersonCheck"
  585. highlight-current :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person"></el-tree>
  586. </el-scrollbar>
  587. </div>
  588. <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>
  589. <div slot="footer" class="dialog-footer">
  590. <el-button @click="addGroupPersonPdialog = false" >取消</el-button>
  591. <el-button type="primary" @click="addPersonSure()" >确定</el-button>
  592. </div>
  593. </el-dialog>
  594. </el-dialog>
  595. </section>
  596. </template>
  597. <style scoped>
  598. .input-with-select .el-input-group__prepend {
  599. background-color: #fff;
  600. }
  601. .line {
  602. padding:10px;
  603. }
  604. .line span{
  605. font-size:15px;
  606. }
  607. .line span:nth-child(even){
  608. float:right;
  609. }
  610. .kans {
  611. width: 230px;
  612. overflow:hidden;
  613. white-space:nowrap;
  614. text-overflow: ellipsis;
  615. }
  616. a {
  617. text-decoration: none;
  618. }
  619. .router-link-active {
  620. text-decoration: none;
  621. }
  622. </style>
  623. <script>
  624. import util from "../../common/js/util";
  625. import projectgantt from "./project_gantt.vue"
  626. export default {
  627. components:{projectgantt},
  628. data() {
  629. return {
  630. isganttshow: false,
  631. deleteAlertMsg: null,
  632. chosenLeaders:[],
  633. chooseLeaderVisible:false,
  634. projectProfessionItem:null,
  635. curProfessionRow:null,
  636. editPpMembDialog:false,
  637. professionList:[],
  638. projectProfessionList:[],
  639. activeName:"baseCostPanel",
  640. chosenMembCount:0,
  641. chosenMembList:[],//选中的人员
  642. allMembData:[],
  643. deptMembData: [
  644. {
  645. id: 0,
  646. label: '未分配',
  647. }
  648. ],
  649. option: [],
  650. depData: {
  651. id: -1,
  652. label: '全部人员',
  653. },
  654. defaultProps: {
  655. children: 'children',
  656. label: 'label'
  657. },
  658. filterName:null,
  659. chooseParticipVisible: false,
  660. projectBaseCostData:[],
  661. addBaseItemDialog:false,
  662. showBaseConfig:false,
  663. customerList:[],
  664. roleArray:["普通员工","超级管理员", "系统管理员", "公司高层","财务管理员", "项目管理员"],
  665. status:null,
  666. statusTxt:["-","进行中","已完成","已撤销"],
  667. importanceList:[{id:1,label:'正常'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}],
  668. searchField:null,
  669. keyword:null,
  670. user: JSON.parse(sessionStorage.getItem("user")),
  671. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  672. userDetailVisible: false,
  673. userDetail:{},
  674. date: new Date(),
  675. users: [],
  676. participator:[],
  677. tableHeight: 0,
  678. listLoading: false,
  679. total: 0,
  680. page: 1,
  681. size: 20,
  682. list: [],
  683. subProjectVisible: false,
  684. subProjectList: [],//子项目列表
  685. currentProject:{},
  686. addSubProject: false,
  687. addFormVisible: false,
  688. addLoading: false,
  689. addUp: 0, // 合计
  690. title: "",
  691. addForm: {
  692. name: '',
  693. userId: [],
  694. level:1,
  695. taskGpIncharge: 0,
  696. id: '',
  697. code: '',
  698. projectDesc: '',
  699. alarmType: 0
  700. },
  701. temaddForm: {},
  702. rules: {
  703. name: [{ required: true, message: "请输入名称", trigger: "blur" }]
  704. },
  705. ause: [],
  706. auseList: [],
  707. yonghuUser: [],
  708. filterText: '',
  709. filterText2: '',
  710. showClfDialog: false,
  711. addClfDialog:false,
  712. addClf:{name:'',id:''},
  713. statusClf:null,
  714. permissionsObj: {},
  715. checkedProjectArr: [],
  716. checkedWuduDialog: false,
  717. checkedWuduArr: [],
  718. checkoradd: true,
  719. addGroupPersonBtnLoading: false,
  720. addGroupPersonDialog: false,
  721. addGroupList: [],
  722. addGroupPersonData: {
  723. group: [],
  724. person: null,
  725. personNames: ''
  726. },
  727. addGroupPersonPdialog: false
  728. };
  729. },
  730. // 过滤器
  731. filters: {
  732. numberToCurrency(value) {
  733. if (!value) return '0.00'
  734. // 将数值截取,保留两位小数
  735. value = value.toFixed(2)
  736. // 获取整数部分
  737. const intPart = Math.trunc(value)
  738. // 整数部分处理,增加,
  739. const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  740. // 预定义小数部分
  741. let floatPart = '.00'
  742. // 将数值截取为小数部分和整数部分
  743. const valueArray = value.toString().split('.')
  744. if (valueArray.length === 2) { // 有小数部分
  745. floatPart = valueArray[1].toString() // 取得小数部分
  746. return intPartFormat + '.' + floatPart
  747. }
  748. return intPartFormat + floatPart
  749. },
  750. },
  751. watch: {
  752. filterText(val) {
  753. this.$refs.chooseMembTree.filter(val);
  754. },
  755. filterText2(val) {
  756. this.$refs.chooseMembTree2.filter(val);
  757. }
  758. },
  759. methods: {
  760. // 批量修改自定义维度
  761. checkedWudulist(e){
  762. console.log(e);
  763. this.checkedProjectArr = e
  764. },
  765. batchSetWudulistBtn1(){
  766. this.$refs.projectlistOfWudulist.clearSelection()
  767. this.checkedWuduArr = [],
  768. this.addGroupPersonData = {
  769. group: null,
  770. person: null,
  771. personNames: ''
  772. }
  773. },
  774. batchSetWudulistBtn2(e){
  775. if(this.checkedProjectArr.length == 0){
  776. this.$message('请选择项目')
  777. return
  778. }
  779. this.checkoradd = e
  780. this.checkedWuduDialog = true
  781. },
  782. batchSetWudulistBtn3(){
  783. if(this.checkedWuduArr.length == 0){
  784. this.$message('请选择' + this.user.timeType.customDegreeName)
  785. return
  786. }
  787. let projectIds = []
  788. for(let i=0; i<this.checkedProjectArr.length; i++){
  789. projectIds.push(this.checkedProjectArr[i].id)
  790. }
  791. let degreeIds = []
  792. let degreeNames = []
  793. for(let s=0; s<this.checkedWuduArr.length; s++){
  794. degreeIds.push(this.checkedWuduArr[s].id)
  795. degreeNames.push(this.checkedWuduArr[s].name)
  796. }
  797. this.http.post('/project/saveBatchAccoDegrees',{
  798. ids: JSON.stringify(projectIds),
  799. associateDegrees: degreeIds.toString(),
  800. associateDegreeNames: degreeNames.toString()
  801. },res => {
  802. if(res.code == 'ok'){
  803. this.checkedWuduDialog = false
  804. this.batchSetWudulistBtn1()
  805. this.$message({
  806. message: '设置成功',
  807. type: 'success'
  808. })
  809. this.getList()
  810. }else {
  811. this.$message({
  812. message: res.msg,
  813. type: 'error'
  814. })
  815. }
  816. },err => {
  817. this.$message({
  818. message: err,
  819. type: 'error'
  820. })
  821. })
  822. },
  823. batchSetWudulistBtn4(){
  824. if(this.checkedWuduArr.length == 0){
  825. this.$message('请选择' + this.user.timeType.customDegreeName)
  826. return
  827. }
  828. let projectIds = []
  829. for(let i=0; i<this.checkedProjectArr.length; i++){
  830. projectIds.push(this.checkedProjectArr[i].id)
  831. }
  832. let degreeIds = []
  833. let degreeNames = []
  834. for(let s=0; s<this.checkedWuduArr.length; s++){
  835. degreeIds.push(this.checkedWuduArr[s].id)
  836. degreeNames.push(this.checkedWuduArr[s].name)
  837. }
  838. this.http.post('/project/addBatchAccoDegrees',{
  839. ids: JSON.stringify(projectIds),
  840. associateDegrees: degreeIds.toString(),
  841. associateDegreeNames: degreeNames.toString()
  842. },res => {
  843. if(res.code == 'ok'){
  844. this.checkedWuduDialog = false
  845. this.batchSetWudulistBtn1()
  846. this.$message({
  847. message: '添加成功',
  848. type: 'success'
  849. })
  850. this.getList()
  851. }else {
  852. this.$message({
  853. message: res.msg,
  854. type: 'error'
  855. })
  856. }
  857. },err => {
  858. this.$message({
  859. message: err,
  860. type: 'error'
  861. })
  862. })
  863. },
  864. test(){
  865. console.log(this.addGroupPersonData.group);
  866. },
  867. // 批量添加参与人员
  868. addGroupPerson(){
  869. let proArr = []
  870. if(this.checkedProjectArr.length == 0){
  871. this.$message('请选择项目')
  872. return
  873. }
  874. this.addGroupPersonBtnLoading = true
  875. for(let i=0;i<this.checkedProjectArr.length;i++){
  876. proArr.push(this.checkedProjectArr[i].id)
  877. }
  878. this.http.post('/project/getProjectsGroups',{
  879. projectIdArray: JSON.stringify(proArr)
  880. },res => {
  881. if(res.code == 'ok'){
  882. console.log('分组',res.data);
  883. this.addGroupList = res.data
  884. this.addGroupPersonBtnLoading = false
  885. this.addGroupPersonDialog = true
  886. }else {
  887. this.$message({
  888. message: res.msg,
  889. type: 'error'
  890. })
  891. }
  892. },err => {
  893. this.$message({
  894. message: err,
  895. type: 'error'
  896. })
  897. })
  898. },
  899. addGroupPersonP(){
  900. this.filterText2 = ''
  901. this.addGroupPersonPdialog = true
  902. },
  903. addPersonCheck(){
  904. var chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  905. var list = chosenList.filter(item=>item.isUser == 1);
  906. this.chosenMembCount = list.length;
  907. console.log(list);
  908. },
  909. addPersonSure(){
  910. this.addGroupPersonPdialog = false
  911. let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
  912. let list = chosenList.filter(item=>item.isUser == 1);
  913. let listIDs = []
  914. let listNames = ''
  915. for(let i=0;i<list.length;i++){
  916. listIDs.push(list[i].id)
  917. listNames += list[i].label + ','
  918. }
  919. this.addGroupPersonData.person = listIDs
  920. this.addGroupPersonData.personNames = listNames
  921. },
  922. addGroupPersonSure(){
  923. if(this.addGroupPersonData.group.length == 0 || this.addGroupPersonData.person == null){
  924. this.$message({
  925. message: '请选择人员/分组',
  926. type: 'warning'
  927. })
  928. return
  929. }
  930. let groupList = []
  931. for(let i=0;i<this.addGroupPersonData.group.length;i++){
  932. groupList = [...groupList,...this.addGroupPersonData.group[i]]
  933. }
  934. this.http.post('/project/batchAddMembToGroup',{
  935. membIdArray: JSON.stringify(this.addGroupPersonData.person),
  936. groupIds: JSON.stringify(groupList)
  937. },res => {
  938. if(res.code == 'ok'){
  939. this.addGroupPersonDialog = false,
  940. this.batchSetWudulistBtn1()
  941. this.$message({
  942. message: '添加成功',
  943. type: 'success'
  944. })
  945. }else {
  946. this.$message({
  947. message: res.msg,
  948. type: 'error'
  949. })
  950. }
  951. },err => {
  952. this.$message({
  953. message: err,
  954. type: 'error'
  955. })
  956. })
  957. },
  958. filterNode(value, data) {
  959. if (!value) return true;
  960. return data.label.indexOf(value) !== -1;
  961. },
  962. //重启项目
  963. restartPro(row) {
  964. this.http.post('/project/start',{id: row.id},
  965. res => {
  966. if (res.code == "ok") {
  967. this.$message({
  968. message: '重启成功',
  969. type: "success"
  970. });
  971. row.status = 1;
  972. } else {
  973. this.$message({
  974. message: res.msg,
  975. type: "error"
  976. });
  977. }
  978. },
  979. error => {
  980. this.$message({
  981. message: error,
  982. type: "error"
  983. });
  984. });
  985. },
  986. //撤销项目
  987. cancelPro(row) {
  988. this.http.post('/project/cancel',{id: row.id},
  989. res => {
  990. if (res.code == "ok") {
  991. this.$message({
  992. message: '撤销成功',
  993. type: "success"
  994. });
  995. row.status = 3;
  996. } else {
  997. this.$message({
  998. message: res.msg,
  999. type: "error"
  1000. });
  1001. }
  1002. },
  1003. error => {
  1004. this.$message({
  1005. message: error,
  1006. type: "error"
  1007. });
  1008. });
  1009. },
  1010. //完成项目
  1011. finishPro(row) {
  1012. this.http.post('/project/finish',{id: row.id},
  1013. res => {
  1014. if (res.code == "ok") {
  1015. this.$message({
  1016. message: '项目完成',
  1017. type: "success"
  1018. });
  1019. row.status = 2;
  1020. } else {
  1021. this.$message({
  1022. message: res.msg,
  1023. type: "error"
  1024. });
  1025. }
  1026. },
  1027. error => {
  1028. this.$message({
  1029. message: error,
  1030. type: "error"
  1031. });
  1032. });
  1033. },
  1034. exportProjectData() {
  1035. //导出项目
  1036. this.http.post('/project/exportData',{},
  1037. res => {
  1038. if (res.code == "ok") {
  1039. var filePath = res.data;
  1040. const a = document.createElement('a'); // 创建a标签
  1041. a.setAttribute('download', '项目导出.xls');// download属性
  1042. a.setAttribute('href', filePath);// href链接
  1043. a.click(); //自执行点击事件
  1044. a.remove();
  1045. }
  1046. },
  1047. error => {
  1048. this.$message({
  1049. message: error,
  1050. type: "error"
  1051. });
  1052. }
  1053. );
  1054. },
  1055. userssHu() {
  1056. this.http.post('/time-type/getCompanyTimeSetting',{
  1057. companyId: this.user.companyId
  1058. },
  1059. res => {
  1060. if (res.code == "ok") {
  1061. this.yonghuUser = res.data
  1062. console.log(this.yonghuUser)
  1063. }
  1064. },
  1065. error => {
  1066. this.$message({
  1067. message: error,
  1068. type: "error"
  1069. });
  1070. }
  1071. );
  1072. },
  1073. yanjiuzx() {
  1074. this.http.post('/report-extra-degree/getAll ',{},
  1075. res => {
  1076. if (res.code == "ok") {
  1077. console.log(res, '过来的数据')
  1078. this.ause = res.data
  1079. } else {
  1080. this.$message({
  1081. message: res.msg,
  1082. type: "error"
  1083. });
  1084. }
  1085. },
  1086. error => {
  1087. this.$message({
  1088. message: error,
  1089. type: "error"
  1090. });
  1091. }
  1092. );
  1093. },
  1094. selectPublic() {
  1095. if (this.addForm.isPublic == 1) {
  1096. this.participator = this.users;
  1097. } else {
  1098. this.participator = [];
  1099. }
  1100. },
  1101. addPpMemb() {
  1102. //检查合计比例是否到达100%
  1103. let p = 0;
  1104. let hasNoMemb = false;
  1105. this.curProfessionRow.membList.forEach(m=>{
  1106. p += parseInt(m.percentage);
  1107. //检查人员是否选择
  1108. if (m.membId == null) {
  1109. hasNoMemb = true;
  1110. }
  1111. });
  1112. if (hasNoMemb) {
  1113. this.$message({
  1114. message: '专业人员不能为空',
  1115. type: "error"
  1116. });
  1117. return;
  1118. }
  1119. //检查人员不能重复
  1120. let hasDuplicate = false;
  1121. this.curProfessionRow.membList.forEach(m=>{
  1122. if (this.curProfessionRow.membList.filter(innerM=>innerM.membId == m.membId).length>1) {
  1123. hasDuplicate = true;
  1124. }
  1125. });
  1126. if (hasDuplicate) {
  1127. this.$message({
  1128. message: '专业人员不能重复',
  1129. type: "error"
  1130. });
  1131. return;
  1132. }
  1133. if (p != 100) {
  1134. this.$message({
  1135. message: '占比合计必须是100%',
  1136. type: "error"
  1137. });
  1138. return;
  1139. }
  1140. this.editPpMembDialog = false;
  1141. this.curProfessionRow.membList.forEach(m=>{
  1142. m.membName = this.participator.filter(p=>p.id == m.membId)[0].name;
  1143. });
  1144. this.projectProfessionItem.membList = JSON.parse(JSON.stringify(this.curProfessionRow.membList));
  1145. },
  1146. //删除专业人员
  1147. deleteMembItem(index) {
  1148. this.curProfessionRow.membList.splice(index,1);
  1149. },
  1150. //添加专业人员
  1151. addMembItem() {
  1152. if (this.curProfessionRow.membList == null) {
  1153. this.curProfessionRow.membList = [{membId:null, percentage:100}];
  1154. } else {
  1155. let p = 0;
  1156. this.curProfessionRow.membList.forEach(m=>{
  1157. p += parseInt(m.percentage);
  1158. });
  1159. this.curProfessionRow.membList.push({membId:null, percentage:100-p});
  1160. }
  1161. this.$forceUpdate();
  1162. },
  1163. showEditPpMembs(row) {
  1164. this.projectProfessionItem = row;
  1165. this.curProfessionRow = JSON.parse(JSON.stringify(row));
  1166. if (this.curProfessionRow.membList == null || this.curProfessionRow.membList.length == 0) {
  1167. this.curProfessionRow.membList = [{membId:null, percentage:100}];
  1168. }
  1169. this.editPpMembDialog = true;
  1170. },
  1171. getProjectNotifyUserList(projectId) {
  1172. this.http.post("/project-notify-user/get", {projectId: projectId},
  1173. res => {
  1174. if (res.code == "ok") {
  1175. var chosenLeaderIds = [];
  1176. var chosenLeaderNames = '';
  1177. var leaderList = res.data;
  1178. this.chosenLeaders = leaderList;
  1179. for(var j in leaderList) {
  1180. chosenLeaderIds.push(leaderList[j].userId)
  1181. chosenLeaderNames += leaderList[j].userName+',';
  1182. }
  1183. if (chosenLeaderNames.length > 0) {
  1184. chosenLeaderNames = chosenLeaderNames.substring(0, chosenLeaderNames.length -1);
  1185. }
  1186. this.addForm.notifyUserIds = chosenLeaderIds;
  1187. this.addForm.notifyUserNames = chosenLeaderNames;
  1188. } else {
  1189. this.$message({
  1190. message: res.msg,
  1191. type: "error"
  1192. });
  1193. }
  1194. },
  1195. error => {
  1196. this.$message({
  1197. message: error,
  1198. type: "error"
  1199. });
  1200. });
  1201. },
  1202. getProjectProfessions(projectId) {
  1203. this.http.post("/project-profession/get", {projectId: projectId},
  1204. res => {
  1205. if (res.code == "ok") {
  1206. this.projectProfessionList = res.data;
  1207. } else {
  1208. this.$message({
  1209. message: res.msg,
  1210. type: "error"
  1211. });
  1212. }
  1213. },
  1214. error => {
  1215. this.$message({
  1216. message: error,
  1217. type: "error"
  1218. });
  1219. });
  1220. },
  1221. checkProjectProfession() {
  1222. //检查合计比例是否到达100%
  1223. let p = 0;
  1224. let hasNoMemb = false;
  1225. let hasNoProfession = false;
  1226. let hasNoMembList = false;
  1227. this.projectProfessionList.forEach(m=>{
  1228. p += parseInt(m.percentage);
  1229. //检查人员是否选择
  1230. if (m.inchargerId == null) {
  1231. hasNoMemb = true;
  1232. }
  1233. if (m.professionId == null) {
  1234. hasNoProfession = true;
  1235. }
  1236. if (m.membList == null) {
  1237. hasNoMembList = true;
  1238. }
  1239. });
  1240. if (hasNoProfession) {
  1241. this.$message({
  1242. message: '专业不能为空',
  1243. type: "error"
  1244. });
  1245. return false;
  1246. }
  1247. if (hasNoMembList) {
  1248. this.$message({
  1249. message: '专业相关人员不能为空',
  1250. type: "error"
  1251. });
  1252. return false;
  1253. }
  1254. if (hasNoMemb) {
  1255. this.$message({
  1256. message: '专业负责人不能为空',
  1257. type: "error"
  1258. });
  1259. return false;
  1260. }
  1261. //检查专业不能重复
  1262. let hasDuplicate = false;
  1263. this.projectProfessionList.forEach(m=>{
  1264. if (this.projectProfessionList.filter(innerM=>innerM.professionId == m.professionId).length>1) {
  1265. hasDuplicate = true;
  1266. }
  1267. });
  1268. if (hasDuplicate) {
  1269. this.$message({
  1270. message: '专业不能重复',
  1271. type: "error"
  1272. });
  1273. return false;
  1274. }
  1275. if (this.projectProfessionList.length > 0 && p != 100) {
  1276. this.$message({
  1277. message: '专业占比合计必须是100%',
  1278. type: "error"
  1279. });
  1280. return false;
  1281. }
  1282. return true;
  1283. },
  1284. //保存项目专业
  1285. saveProjectProfessions(projectId) {
  1286. var list = this.projectProfessionList.filter(p=>p.professionId != null);
  1287. list.forEach(p=>p.inchargerName = this.participator.filter(m=>m.id == p.inchargerId)[0].name);
  1288. list.forEach(p=>p.professionName = this.professionList.filter(m=>m.id == p.professionId)[0].name);
  1289. this.http.post("/project-profession/modify", {projectId: projectId, json: JSON.stringify(list)},
  1290. res => {
  1291. if (res.code == "ok") {
  1292. return false;
  1293. } else {
  1294. this.$message({
  1295. message: res.msg,
  1296. type: "error"
  1297. });
  1298. }
  1299. },
  1300. error => {
  1301. this.$message({
  1302. message: error,
  1303. type: "error"
  1304. });
  1305. });
  1306. },
  1307. //删除项目专业
  1308. deleteItem(index) {
  1309. this.projectProfessionList.splice(index,1);
  1310. },
  1311. //添加项目专业
  1312. addItem() {
  1313. let p = 0;
  1314. this.projectProfessionList.forEach(m=>{
  1315. p += parseInt(m.percentage);
  1316. });
  1317. this.projectProfessionList.push( { professionId:null, inchargerId:null,membIds:[], percentage: 100-p});
  1318. },
  1319. getProfessionList() {
  1320. this.http.post("/profession/getAll", {},
  1321. res => {
  1322. if (res.code == "ok") {
  1323. var list = res.data;
  1324. this.professionList = list;
  1325. } else {
  1326. this.$message({
  1327. message: res.msg,
  1328. type: "error"
  1329. });
  1330. }
  1331. },
  1332. error => {
  1333. this.$message({
  1334. message: error,
  1335. type: "error"
  1336. });
  1337. });
  1338. },
  1339. restrictNumber(targetId) {
  1340. let inpu = document.getElementById(targetId);
  1341. inpu.value = inpu.value.replace(/[^\d.]/g, ""); //仅保留数字和"."
  1342. inpu.value = inpu.value.replace(/\.{2,}/g, "."); //两个连续的"."仅保留第一个"."
  1343. inpu.value = inpu.value.replace(".", "$#*").replace(/\./g,'').replace('$#*','.');//去除其他"."
  1344. inpu.value = inpu.value.replace(/^(\d+)\.(\d\d).*$/, '$1.$2');;//限制只能输入两个小数
  1345. if (inpu.value.indexOf(".") < 0 && inpu.value != "") { //首位是0的话去掉
  1346. inpu.value = parseFloat(inpu.value);
  1347. }
  1348. },
  1349. showChooseLeaderTree() {
  1350. this.chosenMembCount = this.chosenLeaders.length;
  1351. this.chooseLeaderVisible = true;
  1352. },
  1353. onLeaderTreeItemChange() {
  1354. var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
  1355. var list = chosenList.filter(item=>item.isUser == 1);
  1356. this.chosenMembCount = list.length;
  1357. },
  1358. showChooseMembTree() {
  1359. this.chosenMembCount = this.participator.length;
  1360. this.chooseParticipVisible = true;
  1361. this.filterText = ''
  1362. },
  1363. onTreeItemChange() {
  1364. var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
  1365. var list = chosenList.filter(item=>item.isUser == 1);
  1366. this.chosenMembCount = list.length;
  1367. },
  1368. findUserInTree() {
  1369. if (this.filterName == '') {
  1370. this.deptMembData = this.allMembData;
  1371. } else {
  1372. var list = this.findRecursively(this.filterName, this.allMembData);
  1373. this.deptMembData = list;
  1374. }
  1375. },
  1376. findRecursively(username, list) {
  1377. var filterList = [];
  1378. for (var i=0;i<list.length; i++) {
  1379. if (list[i].isUser == 1) {
  1380. if (list[i].label.indexOf(username) >= 0) {
  1381. //匹配上了
  1382. filterList.push(list[i]);
  1383. }
  1384. } else if (list[i].children != null && list[i].children.length > 0) {
  1385. var subList = this.findRecursively(username, list[i].children);
  1386. if (subList.length > 0) {
  1387. subList.forEach(s=>filterList.push(s));
  1388. }
  1389. }
  1390. }
  1391. return filterList;
  1392. },
  1393. //确定选择参与人
  1394. chooseParticip() {
  1395. this.chooseParticipVisible = false;
  1396. var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
  1397. this.chosenMembList = chosenList.filter(item=>item.isUser == 1);
  1398. this.addForm.userNames = '';
  1399. this.addForm.userId = [];
  1400. this.participator = [];
  1401. for (var i=0;i<this.chosenMembList.length; i++) {
  1402. this.addForm.userId.push(this.chosenMembList[i].id);
  1403. this.addForm.userNames += this.chosenMembList[i].label+',';
  1404. var item = {id:this.chosenMembList[i].id, name:this.chosenMembList[i].label};
  1405. this.participator.push(item);
  1406. }
  1407. if (this.addForm.userNames.length > 0) {
  1408. this.addForm.userNames = this.addForm.userNames.substring(0, this.addForm.userNames.length-1);
  1409. }
  1410. },
  1411. //选中相关领导
  1412. chooseLeader() {
  1413. this.chooseLeaderVisible = false;
  1414. var chosenList = this.$refs.chooseLeaderTree.getCheckedNodes();
  1415. var chosenMembList = chosenList.filter(item=>item.isUser == 1);
  1416. this.addForm.notifyUserNames = '';
  1417. this.addForm.notifyUserIds = [];
  1418. this.chosenLeaders = [];
  1419. for (var i=0;i<chosenMembList.length; i++) {
  1420. this.addForm.notifyUserIds.push(chosenMembList[i].id);
  1421. this.addForm.notifyUserNames += chosenMembList[i].label+',';
  1422. var item = {userId:chosenMembList[i].id, userName:chosenMembList[i].label};
  1423. this.chosenLeaders.push(item);
  1424. }
  1425. if (this.addForm.notifyUserNames.length > 0) {
  1426. this.addForm.notifyUserNames = this.addForm.notifyUserNames.substring(0, this.addForm.notifyUserNames.length-1);
  1427. }
  1428. },
  1429. // 获取部门列表
  1430. getDepartment() {
  1431. this.http.post("/department/listAllMemb", {},
  1432. res => {
  1433. if (res.code == "ok") {
  1434. var list = res.data;
  1435. //设置员工到部门下面
  1436. this.setUserToDept(list);
  1437. this.deptMembData = list;
  1438. //用于筛选过滤
  1439. this.allMembData = JSON.parse(JSON.stringify(this.deptMembData));
  1440. } else {
  1441. this.$message({
  1442. message: res.msg,
  1443. type: "error"
  1444. });
  1445. }
  1446. },
  1447. error => {
  1448. this.$message({
  1449. message: error,
  1450. type: "error"
  1451. });
  1452. });
  1453. },
  1454. setUserToDept(list) {
  1455. for (var i in list) {
  1456. if (list[i].children != null) {
  1457. this.setUserToDept(list[i].children);
  1458. }
  1459. if (list[i].userList != null) {
  1460. if (list[i].children == null) {
  1461. list[i].children = [];
  1462. }
  1463. list[i].userList.forEach(element => {
  1464. var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
  1465. list[i].children.push(obj);
  1466. });
  1467. }
  1468. }
  1469. },
  1470. // 获取分类条目
  1471. getClfConfigList() {
  1472. this.http.get('/project-category/list',
  1473. res => {
  1474. if (res.code == "ok") {
  1475. this.baseClfList = res.data;
  1476. console.log("获取分类条目",res.data);
  1477. this.$forceUpdate();
  1478. } else {
  1479. this.$message({
  1480. message: res.msg,
  1481. type: "error"
  1482. });
  1483. }
  1484. },
  1485. error => {
  1486. this.$message({
  1487. message: error,
  1488. type: "error"
  1489. });
  1490. }
  1491. );
  1492. },
  1493. // 新增/编辑 分类条目
  1494. addNewClf(row) {
  1495. this.addClfDialog = true;
  1496. if (row == null) {
  1497. this.addClf = {}
  1498. } else {
  1499. this.addClf = row;
  1500. }
  1501. },
  1502. // 提交
  1503. submitClf() {
  1504. this.http.post('/project-category/addOrMod',this.addClf,
  1505. res => {
  1506. if (res.code == "ok") {
  1507. this.addClfDialog = false;
  1508. this.baseClfList = res.data;
  1509. // this.$forceUpdate();
  1510. console.log(res.data);
  1511. } else {
  1512. this.$message({
  1513. message: res.msg,
  1514. type: "error"
  1515. });
  1516. }
  1517. },
  1518. error => {
  1519. this.$message({
  1520. message: error,
  1521. type: "error"
  1522. });
  1523. }
  1524. );
  1525. },
  1526. // 删除
  1527. deleteClf(row) {
  1528. this.$confirm("该操作可能造成已有数据丢失,确定要删除吗?","删除分类条目", {
  1529. confirmButtonText: "确定",
  1530. cancelButtonText: "取消",
  1531. type: "warning"
  1532. })
  1533. .then(() => {
  1534. this.listLoading = true;
  1535. this.http.post('/project-category/delete',{
  1536. id: row.id
  1537. },
  1538. res => {
  1539. this.listLoading = false;
  1540. if (res.code == "ok") {
  1541. this.$message({
  1542. message: "删除成功",
  1543. type: "success"
  1544. });
  1545. this.getClfConfigList();
  1546. } else {
  1547. this.$message({
  1548. message: res.msg,
  1549. type: "error"
  1550. });
  1551. }
  1552. },
  1553. error => {
  1554. this.listLoading = false;
  1555. this.$message({
  1556. message: error,
  1557. type: "error"
  1558. });
  1559. }
  1560. );
  1561. })
  1562. .catch(() => {});
  1563. },
  1564. // 分类筛选
  1565. searchClfList(){
  1566. this.page = 1;
  1567. this.getList();
  1568. },
  1569. getProjectBaseConfigList() {
  1570. this.http.post('/project-basecost-setting/list',{},
  1571. res => {
  1572. if (res.code == "ok") {
  1573. this.baseCostItemList = res.data;
  1574. this.$forceUpdate();
  1575. } else {
  1576. this.$message({
  1577. message: res.msg,
  1578. type: "error"
  1579. });
  1580. }
  1581. },
  1582. error => {
  1583. this.$message({
  1584. message: error,
  1585. type: "error"
  1586. });
  1587. }
  1588. );
  1589. },
  1590. deleteBaseItem(row) {
  1591. this.$confirm("该操作可能造成已有数据丢失,确定要删除吗?","删除成本基线项", {
  1592. confirmButtonText: "确定",
  1593. cancelButtonText: "取消",
  1594. type: "warning"
  1595. })
  1596. .then(() => {
  1597. this.listLoading = true;
  1598. this.http.post('/project-basecost-setting/delete',{
  1599. id: row.id
  1600. },
  1601. res => {
  1602. this.listLoading = false;
  1603. if (res.code == "ok") {
  1604. this.$message({
  1605. message: "删除成功",
  1606. type: "success"
  1607. });
  1608. this.getProjectBaseConfigList();
  1609. } else {
  1610. this.$message({
  1611. message: res.msg,
  1612. type: "error"
  1613. });
  1614. }
  1615. },
  1616. error => {
  1617. this.listLoading = false;
  1618. this.$message({
  1619. message: error,
  1620. type: "error"
  1621. });
  1622. }
  1623. );
  1624. })
  1625. .catch(() => {});
  1626. },
  1627. submitInsertBaseItem() {
  1628. this.http.post('/project-basecost-setting/addOrMod',this.addForm,
  1629. res => {
  1630. if (res.code == "ok") {
  1631. this.addBaseItemDialog = false;
  1632. this.baseCostItemList = res.data;
  1633. this.$forceUpdate();
  1634. } else {
  1635. this.$message({
  1636. message: res.msg,
  1637. type: "error"
  1638. });
  1639. }
  1640. },
  1641. error => {
  1642. this.$message({
  1643. message: error,
  1644. type: "error"
  1645. });
  1646. }
  1647. );
  1648. },
  1649. showBaseCostItemDialog() {
  1650. this.showBaseConfig = true;
  1651. },
  1652. addNewBaseItem(row) {
  1653. this.addBaseItemDialog = true;
  1654. if (row == null) {
  1655. this.addForm = {alarmType: 0}
  1656. } else {
  1657. this.addForm = row;
  1658. }
  1659. },
  1660. //获取客户列表
  1661. getCustomerList() {
  1662. this.http.post('/customer-info/getAll', {
  1663. },
  1664. res => {
  1665. if (res.code == "ok") {
  1666. this.customerList = res.data;
  1667. } else {
  1668. this.$message({
  1669. message: res.msg,
  1670. type: "error"
  1671. });
  1672. }
  1673. },
  1674. error => {
  1675. this.$message({
  1676. message: error,
  1677. type: "error"
  1678. });
  1679. });
  1680. },
  1681. importProject(item) {
  1682. //首先判断文件类型
  1683. let str = item.file.name.split(".");
  1684. let format = str[str.length - 1];
  1685. if (format != "xls" && format != "xlsx") {
  1686. this.$message({
  1687. message: "请选择.xls或.xlsx文件",
  1688. type: "error"
  1689. });
  1690. } else {
  1691. this.listLoading = true;
  1692. let formData = new FormData();
  1693. formData.append("file", item.file);
  1694. formData.append("userId", this.user.id);
  1695. this.http.uploadFile('/project/importData', formData,
  1696. res => {
  1697. this.$refs.upload.clearFiles();
  1698. this.listLoading = false;
  1699. if (res.code == "ok") {
  1700. this.$message({
  1701. message: "导入成功",
  1702. type: "success"
  1703. });
  1704. this.getList();
  1705. } else {
  1706. this.$message({
  1707. message: res.msg,
  1708. type: "error"
  1709. });
  1710. }
  1711. },
  1712. error => {
  1713. this.$refs.upload.clearFiles();
  1714. this.listLoading = false;
  1715. this.$message({
  1716. message: error,
  1717. type: "error"
  1718. });
  1719. });
  1720. }
  1721. },
  1722. number(){
  1723. //     this.addForm.budget = this.addForm.budget.replace(/[^\.\d]/g,'');
  1724. // this.addForm.budget = this.addForm.budget.replace('.','');
  1725. },
  1726. deleteSubPro(subProject) {
  1727. this.$confirm("确定要删除子项目" + subProject.name + "吗?","删除子项目", {
  1728. confirmButtonText: "确定",
  1729. cancelButtonText: "取消",
  1730. type: "warning"
  1731. })
  1732. .then(() => {
  1733. this.listLoading = true;
  1734. this.http.post('/sub-project/deleteProject',{
  1735. id: subProject.id
  1736. },
  1737. res => {
  1738. this.listLoading = false;
  1739. if (res.code == "ok") {
  1740. this.$message({
  1741. message: "删除成功",
  1742. type: "success"
  1743. });
  1744. this.subProject(this.currentProject);
  1745. } else {
  1746. this.$message({
  1747. message: res.msg,
  1748. type: "error"
  1749. });
  1750. }
  1751. },
  1752. error => {
  1753. this.listLoading = false;
  1754. this.$message({
  1755. message: error,
  1756. type: "error"
  1757. });
  1758. }
  1759. );
  1760. })
  1761. .catch(() => {});
  1762. },
  1763. searchList() {
  1764. this.page = 1;
  1765. this.getList();
  1766. },
  1767. addNewSubProject(subProject) {
  1768. if (subProject == null) {
  1769. this.temaddForm = {projectId: this.currentProject.id, level:1}
  1770. } else {
  1771. this.temaddForm = JSON.parse(JSON.stringify(subProject));
  1772. }
  1773. this.addSubProject = true;
  1774. },
  1775. //显示子项目
  1776. subProject(item) {
  1777. this.subProjectVisible = true;
  1778. this.currentProject = item;
  1779. this.http.post('/sub-project/list', {
  1780. projectId: item.id
  1781. },
  1782. res => {
  1783. if (res.code == "ok") {
  1784. this.subProjectList = res.data;
  1785. } else {
  1786. this.$message({
  1787. message: res.msg,
  1788. type: "error"
  1789. });
  1790. }
  1791. },
  1792. error => {
  1793. this.$message({
  1794. message: error,
  1795. type: "error"
  1796. });
  1797. });
  1798. },
  1799. //显示用户详情
  1800. showUser(userId) {
  1801. this.userDetailVisible = true;
  1802. this.http.post(this.port.manage.userDetail, {
  1803. userId: userId
  1804. },
  1805. res => {
  1806. if (res.code == "ok") {
  1807. this.userDetail = res.data;
  1808. } else {
  1809. this.$message({
  1810. message: res.msg,
  1811. type: "error"
  1812. });
  1813. }
  1814. },
  1815. error => {
  1816. this.$message({
  1817. message: error,
  1818. type: "error"
  1819. });
  1820. });
  1821. },
  1822. //选择参与人
  1823. changeParticipator() {
  1824. //检查是否在参与人中,如果没有需要加入到参与人中
  1825. this.participator = [];
  1826. this.addForm.userId.forEach(u=>{
  1827. var list = this.users.filter(au=>au.id == u);
  1828. if (list.length > 0) {
  1829. var findUser = list[0];
  1830. this.participator.push(findUser);
  1831. } else {
  1832. console.log('未找到用户: '+u);
  1833. }
  1834. })
  1835. },
  1836. getUsers() {
  1837. this.http.post(this.port.manage.list, {
  1838. departmentId: -1,
  1839. pageIndex: 1,
  1840. pageSize: 99999
  1841. },
  1842. res => {
  1843. if (res.code == "ok") {
  1844. this.users = res.data.records;
  1845. } else {
  1846. this.$message({
  1847. message: res.msg,
  1848. type: "error"
  1849. });
  1850. }
  1851. },
  1852. error => {
  1853. this.$message({
  1854. message: error,
  1855. type: "error"
  1856. });
  1857. });
  1858. },
  1859. //分页
  1860. handleCurrentChange(val) {
  1861. this.page = val;
  1862. this.getList();
  1863. },
  1864. handleSizeChange(val) {
  1865. this.size = val;
  1866. this.getList();
  1867. },
  1868. //获取项目列表
  1869. getList() {
  1870. this.listLoading = true;
  1871. this.http.post(this.port.project.listPage, {
  1872. pageIndex: this.page,
  1873. pageSize: this.size,
  1874. keyword:this.keyword,
  1875. searchField: this.searchField,
  1876. status: this.status,
  1877. category: this.statusClf
  1878. //
  1879. },
  1880. res => {
  1881. this.listLoading = false;
  1882. if (res.code == "ok") {
  1883. var list = res.data.records;
  1884. for(var i in list) {
  1885. var participator = list[i].participator , str = "";
  1886. for(var j in participator) {
  1887. if(j == participator.length-1) {
  1888. str += participator[j].name
  1889. } else {
  1890. str += participator[j].name + ','
  1891. }
  1892. }
  1893. list[i].userNames = str;
  1894. }
  1895. this.list = list;
  1896. this.total = res.data.total;
  1897. console.log("列表",res.data);
  1898. } else {
  1899. this.$message({
  1900. message: res.msg,
  1901. type: "error"
  1902. });
  1903. }
  1904. },
  1905. error => {
  1906. this.listLoading = false;
  1907. this.$message({
  1908. message: error,
  1909. type: "error"
  1910. });
  1911. });
  1912. },
  1913. //显示新增界面
  1914. handleAdd(i, item) {
  1915. if(i == -1) {
  1916. this.title = "新增项目";
  1917. this.addForm = {
  1918. name: '',
  1919. isPublic:0,
  1920. userId: [],
  1921. userNames:'',
  1922. code:'',
  1923. inchargerId:null,
  1924. level:1,
  1925. customerId:null,
  1926. notifyUserNames:'',
  1927. chosenLeaders:[],
  1928. taskGpIncharge: 0,
  1929. category:null,
  1930. creatorId: this.user.id
  1931. }
  1932. this.projectBaseCostData = [];
  1933. this.auseList = [];
  1934. for (var m=0;m<this.baseCostItemList.length; m++) {
  1935. this.projectBaseCostData.push({baseId: this.baseCostItemList[m].id, baseName:this.baseCostItemList[m].name, baseAmount:0});
  1936. }
  1937. } else {
  1938. this.title = "修改项目";
  1939. var list = item.participator;
  1940. if (item.isPublic == 1) {
  1941. list = this.users;
  1942. }
  1943. var arr = [];
  1944. var names = '';
  1945. for(var j in list) {
  1946. arr.push(list[j].id)
  1947. names += list[j].name+',';
  1948. }
  1949. if (names.length > 0) {
  1950. names = names.substring(0, names.length -1);
  1951. }
  1952. this.addForm = {
  1953. id: item.id,
  1954. name: item.projectName,
  1955. isPublic: item.isPublic,
  1956. userId: arr,
  1957. userNames:names,
  1958. code:item.projectCode,
  1959. inchargerId: item.inchargerId,
  1960. level: item.level,
  1961. planStartDate: item.planStartDate,
  1962. planEndDate: item.planEndDate,
  1963. budget: item.budget,
  1964. baseMan: item.baseMan,
  1965. contractAmount: item.contractAmount,
  1966. baseFee: item.baseFee,
  1967. baseRisk1: item.baseRisk1,
  1968. baseRisk2: item.baseRisk2,
  1969. baseOutsourcing: item.baseOutsourcing,
  1970. customerId:item.customerId==0?null:item.customerId,
  1971. taskGpIncharge: item.taskGpIncharge,
  1972. category:item.category,
  1973. projectDesc: item.projectDesc
  1974. }
  1975. console.log("handleadd",item)
  1976. if(item.associateDegrees != null && item.associateDegrees != 'null' && item.associateDegrees != '') {
  1977. var spli = item.associateDegrees.split(',')
  1978. var sl = []
  1979. for(var i in spli) {
  1980. var num = +spli[i] + 0
  1981. sl.push(num)
  1982. }
  1983. this.auseList = sl
  1984. console.log(this.auseList)
  1985. } else {
  1986. this.auseList = []
  1987. }
  1988. // var spli = item.associateDegrees.split(',')
  1989. // var sl = []
  1990. // for(var i in spli) {
  1991. // var num = +spli[i] + 0
  1992. // sl.push(num)
  1993. // }
  1994. // this.auseList = sl
  1995. // console.log(this.auseList)
  1996. this.changeParticipator();
  1997. this.getProjectBaseData(item.id);
  1998. if (this.user.company.packageEngineering == 1) {
  1999. this.getProjectProfessions(item.id);
  2000. }
  2001. //获取项目的相关领导
  2002. this.getProjectNotifyUserList(item.id);
  2003. this.getProjectAutorList(item.id);
  2004. }
  2005. this.addFormVisible = true;
  2006. if (this.user.company.packageEngineering == 1) {
  2007. if (this.professionList.length == 0) {
  2008. this.getProfessionList();
  2009. }
  2010. }
  2011. },
  2012. //获取项目审核人
  2013. getProjectAutorList(projectId) {
  2014. this.http.post('/project-auditor/getList',{projectId: projectId},
  2015. res => {
  2016. if (res.code == "ok") {
  2017. this.addForm.auditUserIds = res.data.map(function(item) {
  2018. return item.auditorId;
  2019. });
  2020. } else {
  2021. this.$message({
  2022. message: res.msg,
  2023. type: "error"
  2024. });
  2025. }
  2026. },
  2027. error => {
  2028. this.listLoading = false;
  2029. this.$message({
  2030. message: error,
  2031. type: "error"
  2032. });
  2033. }
  2034. );
  2035. },
  2036. getProjectBaseData(projectId) {
  2037. this.http.post('/project-basecost/get',{projectId: projectId},
  2038. res => {
  2039. if (res.code == "ok") {
  2040. this.projectBaseCostData = res.data;
  2041. } else {
  2042. this.$message({
  2043. message: res.msg,
  2044. type: "error"
  2045. });
  2046. }
  2047. },
  2048. error => {
  2049. this.listLoading = false;
  2050. this.$message({
  2051. message: error,
  2052. type: "error"
  2053. });
  2054. }
  2055. );
  2056. },
  2057. //提交子项目创建修改请求
  2058. submitInsertSubProject () {
  2059. this.$refs.form2.validate(valid => {
  2060. if (valid) {
  2061. this.http.post('/sub-project/saveOrUpdate',this.temaddForm,
  2062. res => {
  2063. if (res.code == "ok") {
  2064. this.$message({
  2065. message: "操作成功",
  2066. type: "success"
  2067. });
  2068. this.subProject(this.currentProject);
  2069. this.addSubProject = false;
  2070. } else {
  2071. this.$message({
  2072. message: res.msg,
  2073. type: "error"
  2074. });
  2075. }
  2076. },
  2077. error => {
  2078. this.listLoading = false;
  2079. this.$message({
  2080. message: error,
  2081. type: "error"
  2082. });
  2083. }
  2084. );
  2085. }
  2086. });
  2087. },
  2088. // 项目基线合计
  2089. addUpfun() {
  2090. var total = 0;
  2091. for (var i=0;i<this.projectBaseCostData.length; i++) {
  2092. total += parseFloat(this.projectBaseCostData[i].baseAmount);
  2093. }
  2094. this.addForm.budget = total;
  2095. // var a = '0'
  2096. // var q = '0'
  2097. // var w = '0'
  2098. // var e = '0'
  2099. // var r = '0'
  2100. // // this.addForm.baseMan === undefined || this.addForm.baseMan === NaN ? this.addForm.baseMa = '0' : this.addForm.baseMan
  2101. // if (this.addForm.baseMan == undefined || this.addForm.baseMan == NaN) {
  2102. // a = 0
  2103. // } else {
  2104. // a = this.addForm.baseMan
  2105. // }
  2106. // if (this.addForm.baseFee !== undefined) q = this.addForm.baseFee
  2107. // if (this.addForm.baseOutsourcing !== undefined) w = this.addForm.baseOutsourcing
  2108. // if (this.addForm.baseRisk1 !== undefined) e = this.addForm.baseRisk1
  2109. // if (this.addForm.baseRisk2 !== undefined) r = this.addForm.baseRisk2
  2110. // this.addForm.budget = +a + +q + +w + +e + +r
  2111. },
  2112. submitInsert() {
  2113. this.$refs.form1.validate(valid => {
  2114. if (valid) {
  2115. if (this.user.company.packageEngineering == 1) {
  2116. if (!this.checkProjectProfession()) {//检查不通过,直接返回
  2117. return;
  2118. }
  2119. }
  2120. this.addLoading = true;
  2121. let formData = new FormData();
  2122. formData.append("name", this.addForm.name);
  2123. if(this.addForm.projectDesc != null) {
  2124. formData.append("projectDesc", this.addForm.projectDesc);
  2125. }
  2126. if(this.addForm.id != null) {
  2127. formData.append("id", this.addForm.id);
  2128. }
  2129. if(this.addForm.isPublic != null) {
  2130. formData.append("isPublic", this.addForm.isPublic);
  2131. }
  2132. if(this.addForm.userId.length != 0 && this.addForm.isPublic == 0) {
  2133. for(var j in this.addForm.userId) {
  2134. formData.append("userId", this.addForm.userId[j]);
  2135. }
  2136. }
  2137. if(this.addForm.inchargerId != null) {
  2138. formData.append("inchargerId", this.addForm.inchargerId);
  2139. }
  2140. if(this.addForm.code != null) {
  2141. formData.append("code", this.addForm.code);
  2142. }
  2143. if(this.addForm.planStartDate != null) {
  2144. formData.append("planStartDate", this.addForm.planStartDate);
  2145. }
  2146. if(this.addForm.planEndDate != null) {
  2147. formData.append("planEndDate", this.addForm.planEndDate);
  2148. }
  2149. if(this.addForm.level != null) {
  2150. formData.append("level", this.addForm.level);
  2151. }
  2152. if(this.addForm.contractAmount != null) {
  2153. formData.append("contractAmount", this.addForm.contractAmount);
  2154. }
  2155. if (this.projectBaseCostData != null) {
  2156. formData.append("projectBaseCostData", JSON.stringify(this.projectBaseCostData));
  2157. //计算总预算成本
  2158. if (this.addForm.budget == null) {
  2159. this.addForm.budget = 0;
  2160. }
  2161. formData.append("budget", this.addForm.budget);
  2162. }
  2163. if (this.addForm.customerId == null) {
  2164. formData.append("customerId", 0);
  2165. } else {
  2166. formData.append("customerId", this.addForm.customerId);
  2167. }
  2168. if (this.chosenLeaders != null && this.chosenLeaders.length > 0) {
  2169. formData.append("chosenLeaders", JSON.stringify(this.chosenLeaders));
  2170. }
  2171. var listId = []
  2172. var listName = []
  2173. for(var i in this.auseList) {
  2174. for(var j in this.ause) {
  2175. if(this.auseList[i] == this.ause[j].id) {
  2176. listId.push(this.ause[j].id);
  2177. listName.push(this.ause[j].name);
  2178. break;
  2179. }
  2180. }
  2181. }
  2182. listId.toString()
  2183. listName.toString()
  2184. formData.append("associateDegrees", listId)
  2185. formData.append("associateDegreeNames", listName)
  2186. formData.append("taskGpIncharge", this.addForm.taskGpIncharge)
  2187. //日报审核人
  2188. formData.append("auditUserIds", JSON.stringify(this.addForm.auditUserIds));
  2189. if(this.addForm.category != null) {
  2190. formData.append("category", this.addForm.category);
  2191. }
  2192. // formData.append("associateDegreeNames", listName)
  2193. // console.log("addform",formData);
  2194. // return
  2195. this.http.uploadFile(this.port.project.add,formData,
  2196. res => {
  2197. this.addLoading = false;
  2198. if (res.code == "ok") {
  2199. this.$message({
  2200. message: (this.addForm.id!=null?'修改':'创建')+"成功",
  2201. type: "success"
  2202. });
  2203. this.addFormVisible = false;
  2204. this.getList();
  2205. if (this.user.company.packageEngineering == 1) {
  2206. this.saveProjectProfessions(res.data);
  2207. }
  2208. } else {
  2209. this.$message({
  2210. message: res.msg,
  2211. type: "error"
  2212. });
  2213. }
  2214. },
  2215. error => {
  2216. this.addLoading = false;
  2217. this.$message({
  2218. message: error,
  2219. type: "error"
  2220. });
  2221. });
  2222. }
  2223. });
  2224. },
  2225. // 删除
  2226. deletePro(i, item) {
  2227. this.$confirm("确定要删除项目[" + item.projectName + "]吗?","删除项目", {
  2228. confirmButtonText: "确定",
  2229. cancelButtonText: "取消",
  2230. type: "warning"
  2231. })
  2232. .then(() => {
  2233. this.listLoading = true;
  2234. this.http.post(this.port.project.delete,{
  2235. id: item.id
  2236. },
  2237. res => {
  2238. this.listLoading = false;
  2239. if (res.code == "ok") {
  2240. this.$message({
  2241. message: "删除成功",
  2242. type: "success"
  2243. });
  2244. this.getList();
  2245. } else if (res.code == 'reconfirm') {
  2246. this.deleteAlertMsg = res.msg;
  2247. this.forceDeletePro(item.id);
  2248. } else {
  2249. this.$message({
  2250. message: res.msg,
  2251. type: "error"
  2252. });
  2253. }
  2254. },
  2255. error => {
  2256. this.listLoading = false;
  2257. this.$message({
  2258. message: error,
  2259. type: "error"
  2260. });
  2261. }
  2262. );
  2263. })
  2264. .catch(() => {});
  2265. },
  2266. //强制删除项目
  2267. forceDeletePro(deleteProId) {
  2268. this.$confirm(this.deleteAlertMsg,"删除项目", {
  2269. confirmButtonText: "确定",
  2270. cancelButtonText: "取消",
  2271. type: "warning"
  2272. })
  2273. .then(() => {
  2274. this.listLoading = true;
  2275. this.http.post(this.port.project.delete,{
  2276. id: deleteProId ,force:1
  2277. },
  2278. res => {
  2279. this.listLoading = false;
  2280. if (res.code == "ok") {
  2281. this.$message({
  2282. message: "删除成功",
  2283. type: "success"
  2284. });
  2285. this.getList();
  2286. } else {
  2287. this.$message({
  2288. message: res.msg,
  2289. type: "error"
  2290. });
  2291. }
  2292. },
  2293. error => {
  2294. this.listLoading = false;
  2295. this.$message({
  2296. message: error,
  2297. type: "error"
  2298. });
  2299. }
  2300. );
  2301. })
  2302. .catch(() => {});
  2303. },
  2304. detail(i) {
  2305. this.$router.push("/list/" + this.list[i].id + "/" + this.list[i].projectName);
  2306. }
  2307. },
  2308. created() {
  2309. let height = window.innerHeight;
  2310. this.tableHeight = height - 195;
  2311. const that = this;
  2312. window.onresize = function temp() {
  2313. that.tableHeight = window.innerHeight - 195;
  2314. };
  2315. },
  2316. mounted() {
  2317. this.userssHu()
  2318. this.getDepartment();
  2319. this.getList();
  2320. this.getUsers();
  2321. this.getCustomerList();
  2322. this.getProjectBaseConfigList();
  2323. this.getClfConfigList()
  2324. this.yanjiuzx()
  2325. }
  2326. };
  2327. </script>
  2328. <style lang="scss" scoped>
  2329. .rg_span{
  2330. display: inline-block;
  2331. }
  2332. .rg_span span {
  2333. text-align: right;
  2334. box-sizing: border-box;
  2335. padding-right: 10px;
  2336. }
  2337. .el-dialog__title {
  2338. display: inline-table;
  2339. margin-top: 20px;
  2340. }
  2341. .addss {
  2342. width: 100%;
  2343. overflow: hidden;
  2344. white-space: nowrap;
  2345. text-overflow: ellipsis;
  2346. }
  2347. // 111
  2348. </style>
  2349. <style>
  2350. .customdropdown{
  2351. margin-left: 10px;
  2352. }
  2353. .customdropdown .el-dropdown__caret-button{
  2354. height: 27px;
  2355. }
  2356. .customdropdown .el-button--mini:nth-child(1){
  2357. height: 27px;
  2358. }
  2359. .customdropdown_menu{
  2360. padding: 0;
  2361. }
  2362. .customdropdown_menu_btn{
  2363. border-color: transparent;
  2364. }
  2365. .ganttdialog .el-dialog__body{
  2366. height: 550px;
  2367. }
  2368. .toolbar_formitem_n1{
  2369. margin-right: 0 !important;
  2370. }
  2371. </style>