list.vue 113 KB

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