ProjectDetailDialog.vue 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343
  1. <!-- 项目管理--项目信息 -->
  2. <template>
  3. <el-drawer
  4. :title="title"
  5. :visible.sync="visible"
  6. direction="rtl"
  7. :append-to-body="true"
  8. size="100%"
  9. >
  10. <el-row :gutter="5">
  11. <el-col :span="3">
  12. <el-card class="box-card" style="height: calc(100vh - 56px)">
  13. <AssetTree
  14. @handleNodeClick="handleNodeClick1"
  15. :defaultExpandAll="true"
  16. code="XM1"
  17. :isProjects="true"
  18. :isFirstRefreshTable="false"
  19. ref="treeList"
  20. :init="false"
  21. />
  22. </el-card>
  23. <!-- <div style="padding: 5px;">
  24. </div> -->
  25. </el-col>
  26. <el-col :span="21">
  27. <el-card class="box-card">
  28. <div style="width: 100%">
  29. <el-row style="font-size: 16px">
  30. <el-col :span="5" style="color: #1890ff"
  31. >项目名称:{{ rowData.name }}
  32. </el-col>
  33. <el-col :span="5"
  34. >项目预算:{{
  35. rowData.budget
  36. ? rowData.budget +
  37. this.getDictV('pro_projects_budget_unit', rowData.unit)
  38. : ''
  39. }}
  40. </el-col>
  41. <el-col :span="5"
  42. >项目经理:{{ rowData.responsibleUserName }}
  43. </el-col>
  44. <el-col :span="5">项目周期:{{ rowData.cycle }} </el-col>
  45. <el-col :span="4"
  46. >项目状态:{{
  47. getDictV('pro_projects_status', rowData.status)
  48. }}</el-col
  49. >
  50. </el-row>
  51. </div>
  52. </el-card>
  53. <el-card class="card_2_box card" style="height: calc(100vh - 130px)">
  54. <el-row :gutter="24">
  55. <el-col :span="3" style="padding: 0">
  56. <div class="el_tree_box">
  57. <div
  58. style="
  59. margin-bottom: 6px;
  60. display: flex;
  61. justify-items: flex-start;
  62. "
  63. >
  64. <el-button
  65. style="width: 50%"
  66. type="primary"
  67. :class="{ current_button: leftTreeActiveName == 'BOM维度' }"
  68. size="small"
  69. plain
  70. @click="handleLeftTreeActiveName('BOM维度')"
  71. >BOM维度
  72. </el-button>
  73. <el-button
  74. style="width: 50%"
  75. type="primary"
  76. :class="{
  77. current_button: leftTreeActiveName == '阶段维度'
  78. }"
  79. size="small"
  80. plain
  81. @click="handleLeftTreeActiveName('阶段维度')"
  82. >阶段维度
  83. </el-button>
  84. </div>
  85. <el-input
  86. v-model="filterText"
  87. placeholder="在结构中查找"
  88. size="small"
  89. clearable
  90. style="margin-bottom: 3px"
  91. >
  92. </el-input>
  93. <el-tree
  94. class="project_tree"
  95. ref="treeRef"
  96. :data="treeList"
  97. :default-expanded-keys="
  98. currentNodeData && currentNodeData.id
  99. ? [currentNodeData.id]
  100. : []
  101. "
  102. :expand-on-click-node="false"
  103. :highlight-current="true"
  104. :indent="0"
  105. :props="defaultProps"
  106. node-key="id"
  107. style="height: 100%"
  108. :filter-node-method="filterNode"
  109. @node-click="handleNodeClick"
  110. >
  111. <div
  112. style="width: 100%; height: 100%; display: flex"
  113. slot-scope="{ node, data }"
  114. @contextmenu.stop="(e) => showRightMenu(e, node, data)"
  115. >
  116. <span class="custom-tree-node">
  117. <span
  118. :style="fontSize(node, data)"
  119. class="label_img"
  120. :class="getIconClass(node, data)"
  121. ></span>
  122. <span :style="fontSize(node, data)" class="label">{{
  123. node.label
  124. }}</span>
  125. </span>
  126. <vue-context-menu
  127. :transferIndex="0"
  128. :class="
  129. 'vue-contextmenuName-' +
  130. data.id +
  131. '_' +
  132. data.name +
  133. '_rightMenu'
  134. "
  135. v-if="
  136. data.id + '_' + data.name + '_rightMenu' ==
  137. contextMenuData.menuName
  138. "
  139. :contextMenuData="contextMenuData"
  140. @updateProject="
  141. () => handleUpdateProject(node, data, 'edit')
  142. "
  143. @removeBom="() => bomRemove(node, data)"
  144. @stageRemove="() => stageRemove(node, data)"
  145. @addBOM="() => addOrEditBOM('add', node, data)"
  146. @editBOM="() => addOrEditBOM('edit', node, data)"
  147. @addChildProject="
  148. () => handleUpdateProject(node, data, 'add')
  149. "
  150. @addStage="() => handleAddStage(node, data, 'add')"
  151. @addPlan="() => handleAddPlan('add', node, data)"
  152. @addTask="() => handleAddTask('add', node, data)"
  153. @handleTermination="
  154. () =>
  155. handleStatus(
  156. projectsTerminationAPI,
  157. '确定终止该项目吗?',
  158. node,
  159. data
  160. )
  161. "
  162. @handlePause="
  163. () =>
  164. handleStatus(
  165. projectsPauseAPI,
  166. '确定暂停该项目吗',
  167. node,
  168. data
  169. )
  170. "
  171. @handleStartup="
  172. () =>
  173. handleStatus(
  174. projectsStartupAPI,
  175. '确定启动该项目吗',
  176. node,
  177. data
  178. )
  179. "
  180. @handleFinish="
  181. () =>
  182. handleStatus(
  183. projectsFinishAPI,
  184. '确定完成该项目吗',
  185. node,
  186. data
  187. )
  188. "
  189. @handleBomTermination="
  190. () =>
  191. handleStatus(
  192. projectsBomTerminationAPI,
  193. '确定终止该BOM吗?',
  194. node,
  195. data
  196. )
  197. "
  198. @handleBomPause="
  199. () =>
  200. handleStatus(
  201. projectsBomPauseAPI,
  202. '确定暂停该BOM吗',
  203. node,
  204. data
  205. )
  206. "
  207. @handleBomStartup="
  208. () =>
  209. handleStatus(
  210. projectsBomStartupAPI,
  211. '确定启动该BOM吗',
  212. node,
  213. data
  214. )
  215. "
  216. @handleBomFinish="
  217. () =>
  218. handleStatus(
  219. projectsBomFinishAPI,
  220. '确定完成该BOM吗',
  221. node,
  222. data
  223. )
  224. "
  225. @handleStageTermination="
  226. () =>
  227. handleStatus(
  228. projectsStageTerminationAPI,
  229. '确定终止该项目阶段吗?',
  230. node,
  231. data
  232. )
  233. "
  234. @handleStagePause="
  235. () =>
  236. handleStatus(
  237. projectsStagePauseAPI,
  238. '确定暂停该项目阶段吗',
  239. node,
  240. data
  241. )
  242. "
  243. @handleStageStartup="
  244. () =>
  245. handleStatus(
  246. projectsStageStartupAPI,
  247. '确定启动该项目阶段吗',
  248. node,
  249. data
  250. )
  251. "
  252. @handleStageFinish="
  253. () =>
  254. handleStatus(
  255. projectsStageFinishAPI,
  256. '确定完成该项目阶段吗',
  257. node,
  258. data
  259. )
  260. "
  261. ></vue-context-menu>
  262. </div>
  263. </el-tree>
  264. </div>
  265. </el-col>
  266. <el-col :span="21" style="height: calc(100vh - 170px)">
  267. <ele-split-layout
  268. :left-style="{
  269. overflow: 'hidden',
  270. width: '100%'
  271. }"
  272. :vertical="true"
  273. style="height: calc(100vh - 180px)"
  274. :min-size="1"
  275. :resizable="true"
  276. :responsive="true"
  277. :width="
  278. activeName == '任务' || activeName == '计划'
  279. ? '450px'
  280. : '100%'
  281. "
  282. :right-style="{ overflow: 'hidden' }"
  283. :allow-collapse="false"
  284. >
  285. <div class="card_2_layout_content">
  286. <el-tabs
  287. v-model="activeName"
  288. class="tab-box_1"
  289. type="border-card"
  290. @tab-click="handleTabs1"
  291. >
  292. <el-tab-pane label="基本信息" name="基本信息">
  293. <div style="padding: 0 10px">
  294. <attribute
  295. v-if="currentNodeData.type == 1"
  296. ref="attributeRef"
  297. :dialog-type="dialogType"
  298. ></attribute>
  299. <project-form
  300. v-if="[0, 2].includes(currentNodeData.type)"
  301. ref="projectForm"
  302. :deptList="deptList"
  303. :deptTreeList="deptTreeList"
  304. :dialogForm="dialogForm"
  305. :teamList="teamList"
  306. dialog-type="view"
  307. ></project-form>
  308. </div>
  309. </el-tab-pane>
  310. <el-tab-pane
  311. v-if="[0, 2].includes(currentNodeData.type)"
  312. label="项目阶段"
  313. name="项目阶段"
  314. class="el-tab-pane-tree"
  315. >
  316. <project-info-table
  317. v-if="[0, 2].includes(currentNodeData.type)"
  318. ref="projectInfoTable"
  319. :dialog-type="dialogType"
  320. :dialogForm="dialogForm"
  321. :deptList="deptList"
  322. :deptTreeList="deptTreeList"
  323. :userList="userList"
  324. :responsibleDeptId="responsibleDeptId"
  325. ></project-info-table>
  326. </el-tab-pane>
  327. <el-tab-pane
  328. label="计划"
  329. name="计划"
  330. class="el-tab-pane-tree"
  331. style="overflow: scroll"
  332. >
  333. <div style="padding: 0 10px">
  334. <planManageList
  335. :tableHeight="'300px'"
  336. :projectType="currentNodeData.type"
  337. :ids="currentNodeData.id"
  338. @handlePlanTableNodeClick="handlePlanTableNodeClick"
  339. v-if="refreshPlan"
  340. ></planManageList>
  341. </div>
  342. </el-tab-pane>
  343. <el-tab-pane
  344. label="任务"
  345. name="任务"
  346. class="el-tab-pane-tree"
  347. >
  348. <ele-pro-table
  349. class="el-table"
  350. ref="table"
  351. row-key="id"
  352. :columns="columns"
  353. :datasource="taskTree"
  354. height="100%"
  355. :max-height="500"
  356. @row-click="
  357. (row) => handleTableNodeClick({ ...row, type: 2 })
  358. "
  359. @row-contextmenu="
  360. (row, column, event) =>
  361. showTableRightMenu(
  362. { ...row, type: 2 },
  363. column,
  364. event
  365. )
  366. "
  367. :toolkit="[]"
  368. :default-expand-all="true"
  369. cache-key="project-initiationTable"
  370. :tree-props="{ children: 'children' }"
  371. :need-page="false"
  372. :indent="0"
  373. >
  374. <template v-slot:name="{ row }">
  375. <span
  376. v-if="!row.children.length && row.level == 1"
  377. style="margin-left: 25px; display: inline-block"
  378. ></span>
  379. <span class="dot" v-if="row.milepost == '1'"></span>
  380. <span class="name"> {{ row.name }}</span>
  381. </template>
  382. <template v-slot:type="{ row }">
  383. <el-tag type="info">任务</el-tag>
  384. </template>
  385. <template v-slot:speedPercent="{ row }">
  386. <el-progress
  387. style="padding: 0 5px"
  388. :stroke-width="20"
  389. text-color="#606266"
  390. :text-inside="true"
  391. :percentage="row.speedPercent || 0"
  392. :color="customColorMethod"
  393. ></el-progress>
  394. <vue-context-menu
  395. :transferIndex="0"
  396. :class="'vue-contextmenuName-' + row.name"
  397. v-if="row.name == contextTableMenuData.menuName"
  398. :contextMenuData="contextTableMenuData"
  399. @addTask="
  400. () =>
  401. handleAddTask(
  402. 'add',
  403. '',
  404. { ...row, type: 2 },
  405. 'plan'
  406. )
  407. "
  408. @updateTask="
  409. () =>
  410. handleAddTask(
  411. 'edit',
  412. '',
  413. { ...row, type: 2 },
  414. 'plan'
  415. )
  416. "
  417. @removeTask="() => handleRemoveTask([row.id])"
  418. @startTask="
  419. () =>
  420. handleStartTask(row, 1, '是否确定执行该任务?')
  421. "
  422. @finishTask="
  423. () =>
  424. handleStartTask(row, 3, '是否确定报工该任务?')
  425. "
  426. @pauseTask="
  427. () =>
  428. handleStartTask(row, 2, '是否确定暂停该任务?')
  429. "
  430. @terminationTask="
  431. () =>
  432. handleStartTask(row, 4, '是否确定终止该任务?')
  433. "
  434. @handleTransfer="() => handleTransfer(row)"
  435. @handleSubmitDeliverables="
  436. () => handleSubmitDeliverables(row)
  437. "
  438. ></vue-context-menu>
  439. </template>
  440. </ele-pro-table>
  441. </el-tab-pane>
  442. <el-tab-pane
  443. label="项目团队"
  444. name="项目团队"
  445. class="el-tab-pane-tree"
  446. >
  447. <team-info-table
  448. ref="deliverablesInfoTable"
  449. dialog-type="view"
  450. :dialogForm="teamForm"
  451. ></team-info-table>
  452. </el-tab-pane>
  453. <!-- <el-tab-pane
  454. label="项目看板"
  455. name="项目看板"
  456. class="el-tab-pane-tree"
  457. >
  458. <project-statistics></project-statistics>
  459. </el-tab-pane> -->
  460. <el-tab-pane
  461. label="项目审核流程"
  462. name="项目审核流程"
  463. class="el-tab-pane-tree"
  464. style="overflow: scroll; padding-bottom: 30px"
  465. >
  466. <bpmDetail
  467. v-if="dialogForm.processInstanceId && bpmDetailFlag"
  468. :id="dialogForm.processInstanceId"
  469. ></bpmDetail>
  470. </el-tab-pane>
  471. <el-tab-pane
  472. label="项目行事历"
  473. name="项目行事历"
  474. class="el-tab-pane-tree"
  475. >
  476. <projectCalendar
  477. ref="projectCalendarRef"
  478. ></projectCalendar>
  479. </el-tab-pane>
  480. </el-tabs>
  481. </div>
  482. <template v-slot:content>
  483. <el-tabs
  484. v-if="isShow"
  485. v-model="attrActiveName"
  486. class="tab-box_2"
  487. type="border-card"
  488. >
  489. <el-tab-pane label="属性" name="属性">
  490. <!--currentTableNodeData-->
  491. <plan-form
  492. ref="planForm"
  493. dialog-type="view"
  494. :dialogForm="rightForm"
  495. :deptList="deptList"
  496. :deptTreeList="deptTreeList"
  497. ></plan-form>
  498. <base-form
  499. ref="baseForm"
  500. v-if="[2].includes(currentTableNodeData.type)"
  501. dialog-type="view"
  502. :dialogForm="rightForm"
  503. :deptList="deptList"
  504. :deptTreeList="deptTreeList"
  505. ></base-form>
  506. </el-tab-pane>
  507. <el-tab-pane label="计划节点" name="计划节点">
  508. <plan-info-table
  509. ref="planInfoTable"
  510. dialog-type="view"
  511. :dialogForm="rightForm"
  512. :deptList="deptList"
  513. :deptTreeList="deptTreeList"
  514. ></plan-info-table>
  515. </el-tab-pane>
  516. <el-tab-pane
  517. v-if="[2].includes(currentTableNodeData.type)"
  518. label="交付物"
  519. name="交付物"
  520. class="el-tab-pane-tree"
  521. >
  522. <submit-deliverables-info-table
  523. ref="deliverablesInfoTable"
  524. :dictList="dictList"
  525. dialog-type="view"
  526. :dialogForm="rightForm"
  527. ></submit-deliverables-info-table>
  528. </el-tab-pane>
  529. </el-tabs>
  530. </template>
  531. </ele-split-layout>
  532. </el-col>
  533. </el-row>
  534. </el-card>
  535. </el-col>
  536. </el-row>
  537. <add-BOM-dialog
  538. v-if="addBOMDialogFlag"
  539. ref="addBOMDialogRef"
  540. :addBOMDialogFlag.sync="addBOMDialogFlag"
  541. :treeList="treeList"
  542. @reload="reload"
  543. ></add-BOM-dialog>
  544. <!-- 新增计划 -->
  545. <add-plan-dialog
  546. v-if="addPlanDialogFLag"
  547. @reload="reload"
  548. :addOrEditDialogFlag.sync="addPlanDialogFLag"
  549. ref="addPlanDialogRef"
  550. ></add-plan-dialog>
  551. <plan-detail-dialog
  552. v-if="planDetailDialogFlag"
  553. :detailDialogFlag.sync="planDetailDialogFlag"
  554. ref="planDetailDialogRef"
  555. ></plan-detail-dialog>
  556. <!-- 编辑弹窗 -->
  557. <add-task-dialog
  558. v-if="addTaskDialogFlag"
  559. @reload="reload"
  560. :addOrEditDialogFlag.sync="addTaskDialogFlag"
  561. ref="addTaskDialogRef"
  562. ></add-task-dialog>
  563. <task-detail-dialog
  564. v-if="taskDetailDialogFlag"
  565. :detailDialogFlag.sync="taskDetailDialogFlag"
  566. ref="taskDetailDialogRef"
  567. ></task-detail-dialog>
  568. <transfer-dialog
  569. ref="transferDialogRef"
  570. v-if="transferDialogFlag"
  571. @reload="reload"
  572. :transferDialogFlag.sync="transferDialogFlag"
  573. ></transfer-dialog>
  574. <submit-deliverables-dialog
  575. ref="submitDeliverablesDialogRef"
  576. v-if="submitDeliverablesDialogFlag"
  577. :submitDeliverablesDialogFlag.sync="submitDeliverablesDialogFlag"
  578. @reload="reload"
  579. ></submit-deliverables-dialog>
  580. <!-- 编辑弹窗 -->
  581. <addOrEditProjectDialog
  582. v-if="addOrEditProjectDialogFlag"
  583. @reload="reload"
  584. :addOrEditDialogFlag.sync="addOrEditProjectDialogFlag"
  585. ref="addOrEditProjectDialogRef"
  586. ></addOrEditProjectDialog>
  587. <!-- 阶段弹窗 -->
  588. <addOrEditStageDialog
  589. v-if="addOrEditDialogStageFlag"
  590. @reload="reload"
  591. :addOrEditDialogStageFlag.sync="addOrEditDialogStageFlag"
  592. ref="addOrEditStageDialogRef"
  593. ></addOrEditStageDialog>
  594. </el-drawer>
  595. </template>
  596. <script>
  597. import AssetTree from '@/components/AssetTree';
  598. import { getUserPage } from '@/api/system/organization';
  599. import p_search from './p_search.vue';
  600. import {
  601. projectsBomDeleteAPI,
  602. projectsBomFinishAPI,
  603. projectsBomPauseAPI,
  604. projectsBomStartupAPI,
  605. projectsBomTerminationAPI
  606. } from '@/api/project-manage/BOM.js';
  607. import Attribute from '@/views/BOMmanage/components/attribute.vue';
  608. import BOMBaseForm from '@/views/BOMmanage/components/BOMBaseForm.vue';
  609. import addBOMDialog from '@/views/BOMmanage/components/addBOMDialog.vue';
  610. import {
  611. getMyProjectsPage,
  612. getByBomTreeAPI,
  613. getPlanAndTaskTreeById,
  614. getProjectStageTree,
  615. getTaskTreeById,
  616. projectsFinishAPI,
  617. projectsGetByIdDetailsAPI,
  618. projectsPauseAPI,
  619. projectsStageDeleteAPI,
  620. projectsStageFinishAPI,
  621. projectsStagePauseAPI,
  622. projectsStageStartupAPI,
  623. projectsStageTerminationAPI,
  624. projectsStartupAPI,
  625. projectsTerminationAPI
  626. } from '@/api/project-manage';
  627. import projectForm from '@/views/project-manage/project-initiation/components/project-form.vue';
  628. import { listOrganizations } from '@/api/system/organization';
  629. import {
  630. projectsTeamGetByIdAPI,
  631. projectsTeamPageAPI
  632. } from '@/api/project-manage/team';
  633. import PlanCard from '@/views/BOMmanage/components/planCard.vue';
  634. import addPlanDialog from '@/views/project-manage/planManage/components/addOrEditDialog.vue';
  635. import planDetailDialog from '@/views/project-manage/planManage/components/detailDialog.vue';
  636. import taskDetailDialog from '@/views/project-manage/task-manage/components/detailDialog.vue';
  637. import projectStatistics from '@/views/project-manage/project-statistics/index.vue';
  638. import planForm from '@/views/project-manage/planManage/components/plan-form.vue';
  639. import {
  640. planFinishAPI,
  641. planPauseAPI,
  642. planStageFinishAPI,
  643. planStagePauseAPI,
  644. planStageStartupAPI,
  645. planStageTerminationAPI,
  646. planStartupAPI,
  647. planTerminationAPI,
  648. projectsPlanDeleteAPI,
  649. projectsPlanGetByIdAPI
  650. } from '@/api/project-manage/plan';
  651. import { deepClone } from '@/utils';
  652. import planInfoTable from '@/views/project-manage/planManage/components/planInfoTable.vue';
  653. import BaseForm from '@/views/project-manage/task-manage/components/base-form.vue';
  654. import {
  655. projectsTaskDeleteAPI,
  656. projectsTaskGetByIdAPI,
  657. projectsTaskOpRation
  658. } from '@/api/project-manage/task';
  659. import submitDeliverablesInfoTable from '@/views/project-manage/task-manage/components/submitDeliverablesInfoTable.vue';
  660. import { getByCode } from '@/api/system/dictionary-data';
  661. import teamInfoTable from '@/views/project-manage/team-manage/components/team-Info-table.vue';
  662. import addTaskDialog from '@/views/project-manage/task-manage/components/addOrEditDialog.vue';
  663. import { proStatusEnum, reviewStatusEnum } from '@/enum/dict';
  664. import transferDialog from '@/views/project-manage/task-manage/components/transferDialog.vue';
  665. import submitDeliverablesDialog from '@/views/project-manage/task-manage/components/submitDeliverablesDialog.vue';
  666. import addOrEditProjectDialog from '@/views/project-manage/project-initiation/components/addOrEditDialog.vue';
  667. import bpmDetail from '@/views/bpm/processInstance/detail.vue';
  668. import projectCalendar from '@/views/project-manage/project-calendar/index.vue';
  669. import planManageList from '@/views/project-manage/planManage/index.vue';
  670. import addOrEditStageDialog from '@/views/project-manage/project-initiation/components/addOrEditStageDialog.vue';
  671. import projectInfoTable from '@/views/project-manage/project-initiation/components/projectInfoTable.vue';
  672. export default {
  673. props: {},
  674. components: {
  675. p_search,
  676. bpmDetail,
  677. addOrEditProjectDialog,
  678. submitDeliverablesDialog,
  679. transferDialog,
  680. addTaskDialog,
  681. teamInfoTable,
  682. submitDeliverablesInfoTable,
  683. BaseForm,
  684. planInfoTable,
  685. planForm,
  686. taskDetailDialog,
  687. planDetailDialog,
  688. addPlanDialog,
  689. PlanCard,
  690. projectForm,
  691. BOMBaseForm,
  692. Attribute,
  693. addBOMDialog,
  694. AssetTree,
  695. planManageList,
  696. projectCalendar,
  697. projectInfoTable,
  698. addOrEditStageDialog,
  699. projectStatistics
  700. },
  701. data() {
  702. return {
  703. responsibleDeptId: '',
  704. userList: [],
  705. visible: false,
  706. title: '项目信息',
  707. projectsFinishAPI,
  708. projectsPauseAPI,
  709. projectsStartupAPI,
  710. projectsTerminationAPI,
  711. projectsBomFinishAPI,
  712. projectsBomPauseAPI,
  713. projectsBomStartupAPI,
  714. projectsBomTerminationAPI,
  715. projectsStageFinishAPI,
  716. projectsStagePauseAPI,
  717. projectsStageStartupAPI,
  718. projectsStageTerminationAPI,
  719. planFinishAPI,
  720. planPauseAPI,
  721. planStartupAPI,
  722. planTerminationAPI,
  723. planStageFinishAPI,
  724. planStagePauseAPI,
  725. planStageStartupAPI,
  726. planStageTerminationAPI,
  727. activeName: '基本信息',
  728. attrActiveName: '属性',
  729. leftTreeActiveName: 'BOM维度',
  730. active: 0,
  731. contextMenuData: {
  732. menuName: '',
  733. axis: {
  734. x: null,
  735. y: null
  736. }, // 鼠标位置
  737. menulists: []
  738. },
  739. contextTableMenuData: {
  740. menuName: '',
  741. axis: {
  742. x: null,
  743. y: null
  744. }, // 鼠标位置
  745. menulists: []
  746. },
  747. currentNodeData: {},
  748. planAndTaskTree: [],
  749. taskTree: [],
  750. deptList: [],
  751. deptTreeList: [],
  752. projectStepList: ['待立项', '审核中', '执行中', '已完成'],
  753. teamList: [],
  754. current: {},
  755. dialogForm: {},
  756. rightForm: {},
  757. teamForm: {},
  758. dictList: {},
  759. currentTableNodeData: {},
  760. treeList: [],
  761. addOrEditDialogStageFlag: false,
  762. bpmDetailFlag: false,
  763. isShow: false,
  764. treeLoading: false,
  765. addBOMDialogFlag: false,
  766. addPlanDialogFLag: false,
  767. addTaskDialogFlag: false,
  768. planDetailDialogFlag: false,
  769. taskDetailDialogFlag: false,
  770. transferDialogFlag: false,
  771. submitDeliverablesDialogFlag: false,
  772. addOrEditProjectDialogFlag: false,
  773. defaultProps: {
  774. children: 'children',
  775. label: 'name'
  776. },
  777. loading: false,
  778. filterText: null,
  779. categoryId: 1,
  780. loadingInstance: null,
  781. treeId: null,
  782. dialogType: null,
  783. rowData: {},
  784. refreshPlan: true
  785. };
  786. },
  787. watch: {
  788. filterText(val) {
  789. this.$refs.treeRef.filter(val);
  790. }
  791. },
  792. computed: {
  793. columns() {
  794. return [
  795. {
  796. columnKey: 'index',
  797. label: '序号',
  798. type: 'index',
  799. width: 55,
  800. align: 'center',
  801. showOverflowTooltip: true
  802. },
  803. {
  804. label: '名称',
  805. prop: 'name',
  806. showOverflowTooltip: true,
  807. minWidth: 180,
  808. slot: 'name'
  809. },
  810. {
  811. label: '类型名称',
  812. prop: 'type',
  813. showOverflowTooltip: true,
  814. minWidth: 80,
  815. align: 'center',
  816. slot: 'type'
  817. },
  818. {
  819. label: '预计开始时间',
  820. prop: 'planStartDate',
  821. formatter: (val) => {
  822. return val.planStartDate?.split(' ')[0];
  823. },
  824. showOverflowTooltip: true,
  825. minWidth: 150,
  826. align: 'center'
  827. },
  828. {
  829. label: '预计结束时间',
  830. prop: 'planEndDate',
  831. formatter: (val) => {
  832. return val.planEndDate?.split(' ')[0];
  833. },
  834. showOverflowTooltip: true,
  835. minWidth: 150,
  836. align: 'center'
  837. },
  838. {
  839. label: '预计工期(天)',
  840. prop: 'planDay',
  841. showOverflowTooltip: true,
  842. minWidth: 150,
  843. align: 'center'
  844. },
  845. {
  846. label: '实际开始时间',
  847. prop: 'realStartTime',
  848. // formatter: (val) => {
  849. // return val.realStartTime?.split(' ')[0]
  850. // },
  851. showOverflowTooltip: true,
  852. minWidth: 150,
  853. align: 'center'
  854. },
  855. {
  856. label: '实际结束时间',
  857. prop: 'realEndTime',
  858. // formatter: (val) => {
  859. // return val.realEndTime?.split(' ')[0]
  860. // },
  861. showOverflowTooltip: true,
  862. minWidth: 150,
  863. align: 'center'
  864. },
  865. {
  866. label: '实际工期(天)',
  867. prop: 'realDay',
  868. showOverflowTooltip: true,
  869. minWidth: 150,
  870. align: 'center'
  871. },
  872. {
  873. label: '负责人',
  874. prop: 'responsibleUserName',
  875. showOverflowTooltip: true,
  876. minWidth: 100,
  877. align: 'center'
  878. },
  879. {
  880. prop: 'processStatus',
  881. label: '审核状态',
  882. align: 'center',
  883. showOverflowTooltip: true,
  884. minWidth: 100,
  885. formatter: (_row, _column, cellValue) => {
  886. return reviewStatusEnum[_row.processStatus]?.label;
  887. }
  888. },
  889. {
  890. prop: 'status',
  891. label: '状态',
  892. align: 'center',
  893. showOverflowTooltip: true,
  894. minWidth: 100,
  895. formatter: (_row, _column, cellValue) => {
  896. return proStatusEnum[_row.status]?.label;
  897. }
  898. },
  899. {
  900. label: '进度',
  901. prop: 'speedPercent',
  902. showOverflowTooltip: false,
  903. minWidth: 120,
  904. align: 'center',
  905. slot: 'speedPercent'
  906. }
  907. ];
  908. }
  909. },
  910. mounted() {
  911. this.leftTreeActiveName = 'BOM维度';
  912. this.activeName = '基本信息';
  913. this.attrActiveName = '属性';
  914. this.isShow = false;
  915. /* if (this.$route.query.id) {
  916. this.initData();
  917. this.dialogType = this.$route.query.type;
  918. } */
  919. this.getDeptList();
  920. this.getTeamList();
  921. this.getDictList('pro_files_approve_type');
  922. this.getDictList('deliverables_type');
  923. this.getDictList('pro_projects_status');
  924. this.getDictList('pro_projects_budget_unit');
  925. },
  926. /* activated() {
  927. if (this.$route.query.id) {
  928. this.initData();
  929. this.dialogType = this.$route.query.type;
  930. }
  931. }, */
  932. methods: {
  933. getDictV(code, val) {
  934. if (!this.dictList[code]) return '';
  935. return this.dictList[code].find((item) => item.value == val)?.label;
  936. },
  937. async getDictList(code) {
  938. let { data: res } = await getByCode(code);
  939. this.dictList[code] = res.map((item) => {
  940. let values = Object.keys(item);
  941. return {
  942. value: values[0],
  943. label: item[values[0]]
  944. };
  945. });
  946. },
  947. async open(row) {
  948. this.rowData = row;
  949. this.visible = true;
  950. // 将负责人的列表带给新建项目阶段
  951. const { list: res } = await getUserPage({
  952. pageNum: 1,
  953. size: -1,
  954. groupId: row.responsibleDeptId
  955. });
  956. this.userList = res;
  957. this.responsibleDeptId = row.responsibleDeptId;
  958. // -----
  959. if (this.rowData.id) {
  960. this.$nextTick(() => {
  961. this.$refs.treeList.getTreeData('', this.rowData.id);
  962. this.$refs.projectCalendarRef.init(row.id);
  963. });
  964. this.initData();
  965. this.dialogType = this.rowData.type;
  966. }
  967. // this.getLeftData();
  968. },
  969. // async getLeftData(where) {
  970. // let pp = {
  971. // pageNum: 1,
  972. // size: 999,
  973. // parentId: parent?.id ?? '0',
  974. // /* name: this.rowData.name ?? '', */
  975. // ...where
  976. // };
  977. // const res = await getMyProjectsPage(pp);
  978. // this.leftTreeData = res.list;
  979. // },
  980. cancel() {
  981. this.$nextTick(() => {
  982. this.visible = false;
  983. });
  984. },
  985. handleTabs1(val) {
  986. this.activeName = val.label;
  987. this.attrActiveName = '属性';
  988. this.isShow = false;
  989. this.bpmDetailFlag = false;
  990. this.$nextTick(() => {
  991. this.bpmDetailFlag = true;
  992. });
  993. },
  994. filterNode(value, data) {
  995. if (!value) return true;
  996. return data.name.indexOf(value) !== -1;
  997. },
  998. async getDictList(code) {
  999. let { data: res } = await getByCode(code);
  1000. this.dictList[code] = res.map((item) => {
  1001. let values = Object.keys(item);
  1002. return {
  1003. value: values[0],
  1004. label: item[values[0]]
  1005. };
  1006. });
  1007. },
  1008. initData() {
  1009. this.getTreeData();
  1010. },
  1011. // 获取部门数据
  1012. getDeptList() {
  1013. listOrganizations().then((list) => {
  1014. this.deptList = list;
  1015. this.deptTreeList = this.$util.toTreeData({
  1016. data: list,
  1017. idField: 'id',
  1018. parentIdField: 'parentId'
  1019. });
  1020. console.log(this.deptTreeList);
  1021. });
  1022. },
  1023. getTeamList() {
  1024. projectsTeamPageAPI({
  1025. pageNum: 1,
  1026. size: 999
  1027. }).then((list) => {
  1028. this.teamList = list;
  1029. });
  1030. },
  1031. handleUpdateProject(node, data, type) {
  1032. this.addOrEditProjectDialogFlag = true;
  1033. this.$nextTick(() => {
  1034. this.$refs.addOrEditProjectDialogRef.init(data, type);
  1035. });
  1036. },
  1037. bomRemove(node, data) {
  1038. let message = data.children.length
  1039. ? '当前节点包含子节点,是否确认删除?'
  1040. : '是否确认删除?';
  1041. this.$confirm(message, '提示', {
  1042. confirmButtonText: '确定',
  1043. cancelButtonText: '取消',
  1044. type: 'warning'
  1045. })
  1046. .then(async () => {
  1047. const loading = this.$loading({ lock: true });
  1048. await projectsBomDeleteAPI([data.id]);
  1049. loading.close();
  1050. this.$message.success('删除成功');
  1051. await this.getTreeData();
  1052. })
  1053. .catch(() => {
  1054. this.$message({
  1055. type: 'info',
  1056. message: '已取消删除'
  1057. });
  1058. });
  1059. },
  1060. stageRemove(node, data) {
  1061. let message = data.children.length
  1062. ? '当前节点包含子节点,是否确认删除?'
  1063. : '是否确认删除?';
  1064. this.$confirm(message, '提示', {
  1065. confirmButtonText: '确定',
  1066. cancelButtonText: '取消',
  1067. type: 'warning'
  1068. })
  1069. .then(async () => {
  1070. const loading = this.$loading({ lock: true });
  1071. await projectsStageDeleteAPI([data.id]);
  1072. loading.close();
  1073. this.$message.success('删除成功');
  1074. await this.getTreeData();
  1075. })
  1076. .catch(() => {
  1077. this.$message({
  1078. type: 'info',
  1079. message: '已取消删除'
  1080. });
  1081. });
  1082. },
  1083. back() {
  1084. this.$router.go(-1);
  1085. },
  1086. async validateForm() {
  1087. return Promise.all([
  1088. new Promise((resolve, reject) => {
  1089. this.$refs.BOMBaseFormRef.getValidaValue((valid) => {
  1090. if (!valid) {
  1091. reject(false);
  1092. } else {
  1093. resolve(true);
  1094. }
  1095. });
  1096. })
  1097. ]).catch(() => {
  1098. this.$message.warning('请先填写完整信息');
  1099. return Promise.reject(false);
  1100. });
  1101. },
  1102. addChildProject() {},
  1103. addOrEditBOM(type, node, data) {
  1104. this.addBOMDialogFlag = true;
  1105. this.$nextTick(() => {
  1106. this.$refs.addBOMDialogRef.init(data, type);
  1107. });
  1108. },
  1109. handleAddStage(node, data, type) {
  1110. this.addOrEditDialogStageFlag = true;
  1111. this.$nextTick(() => {
  1112. this.$refs.addOrEditStageDialogRef.init(data, type);
  1113. });
  1114. },
  1115. handleAddPlan(type, node, data, sourceName = 'project') {
  1116. this.addPlanDialogFLag = true;
  1117. let params = {};
  1118. if (sourceName == 'plan') {
  1119. params = {
  1120. projectId: data.projectId,
  1121. projectStageId: data.projectStageId,
  1122. projectBomId: data.projectBomId,
  1123. parentPlanId: data.id,
  1124. id: data.id
  1125. };
  1126. } else {
  1127. switch (data.type) {
  1128. case 0:
  1129. params = {
  1130. projectId: data.id
  1131. };
  1132. break;
  1133. case 1:
  1134. params = {
  1135. projectId: data.projectId,
  1136. projectBomId: data.id
  1137. };
  1138. break;
  1139. case 2:
  1140. params = {
  1141. projectId: data.projectId,
  1142. projectStageId: data.id
  1143. };
  1144. break;
  1145. }
  1146. }
  1147. this.$nextTick(() => {
  1148. this.$refs.addPlanDialogRef.init(params, type);
  1149. this.$refs.refreshPlan.datasource();
  1150. });
  1151. },
  1152. async handleStatus(API, msg, node, row) {
  1153. this.$confirm(msg, '提示', {
  1154. type: 'warning'
  1155. })
  1156. .then(async () => {
  1157. await API(row.id);
  1158. this.$message.success('操作成功');
  1159. this.reload();
  1160. })
  1161. .catch(() => {});
  1162. },
  1163. //报工/执行
  1164. async handleStartTask(row, afterStatus, msg) {
  1165. this.$confirm(msg, '提示', {
  1166. confirmButtonText: '确定',
  1167. cancelButtonText: '取消',
  1168. type: 'warning'
  1169. })
  1170. .then(async () => {
  1171. let params = {
  1172. id: row.id,
  1173. afterStatus: afterStatus,
  1174. status: row.status
  1175. };
  1176. await projectsTaskOpRation(params);
  1177. this.$message.success('操作成功');
  1178. this.reload();
  1179. })
  1180. .catch(() => {});
  1181. },
  1182. handleRemovePlan(ids) {
  1183. this.$confirm('此操作将永久删除该计划, 是否继续?', '提示', {
  1184. confirmButtonText: '确定',
  1185. cancelButtonText: '取消',
  1186. type: 'warning'
  1187. }).then(async () => {
  1188. const loading = this.$loading({ lock: true });
  1189. projectsPlanDeleteAPI(ids)
  1190. .then((res) => {
  1191. loading.close();
  1192. this.$message.success('删除成功');
  1193. this.reload();
  1194. })
  1195. .catch((e) => {
  1196. loading.close();
  1197. // this.$message.error(e.message);
  1198. });
  1199. });
  1200. },
  1201. /* 删除 */
  1202. handleRemoveTask(ids) {
  1203. this.$confirm('此操作将永久删除该任务, 是否继续?', '提示', {
  1204. confirmButtonText: '确定',
  1205. cancelButtonText: '取消',
  1206. type: 'warning'
  1207. })
  1208. .then(async () => {
  1209. const loading = this.$loading({ lock: true });
  1210. projectsTaskDeleteAPI(ids)
  1211. .then((res) => {
  1212. loading.close();
  1213. this.$message.success('删除成功');
  1214. this.reload();
  1215. })
  1216. .catch((e) => {
  1217. loading.close();
  1218. // this.$message.error(e.message);
  1219. });
  1220. })
  1221. .catch(() => {});
  1222. },
  1223. /* */
  1224. handleAddTask(type, node, data, sourceName = 'project') {
  1225. this.addTaskDialogFlag = true;
  1226. let params = {};
  1227. if (sourceName == 'plan') {
  1228. switch (data.type) {
  1229. case 0:
  1230. params = {
  1231. targetPlanId: data.id,
  1232. projectId: data.projectId,
  1233. projectStageId: data.projectStageId
  1234. };
  1235. break;
  1236. case 1:
  1237. params = {
  1238. targetPlanId: data.parentId,
  1239. projectId: data.projectId,
  1240. projectStageId: data.projectStageId,
  1241. planStageId: data.id
  1242. };
  1243. break;
  1244. case 2:
  1245. params = {
  1246. targetPlanId: data.targetPlanId,
  1247. projectId: data.projectId,
  1248. projectStageId: data.projectStageId,
  1249. planStageId: data.planStageId,
  1250. taskId: data.id,
  1251. id: type !== 'add' ? data.id : ''
  1252. };
  1253. break;
  1254. }
  1255. } else {
  1256. switch (data.type) {
  1257. case 0:
  1258. params = {
  1259. projectId: data.id
  1260. };
  1261. break;
  1262. case 1:
  1263. params = {
  1264. projectId: data.projectId,
  1265. projectBomId: data.id
  1266. };
  1267. break;
  1268. case 2:
  1269. params = {
  1270. projectId: data.projectId,
  1271. projectStageId: data.id
  1272. };
  1273. break;
  1274. }
  1275. }
  1276. this.$nextTick(() => {
  1277. this.$refs.addTaskDialogRef.init(params, type);
  1278. });
  1279. },
  1280. async getTreeData() {
  1281. try {
  1282. this.treeLoading = true;
  1283. let API =
  1284. this.leftTreeActiveName == 'BOM维度'
  1285. ? getByBomTreeAPI
  1286. : getProjectStageTree;
  1287. const res = await API(this.rowData.id);
  1288. this.treeList = [res];
  1289. this.$nextTick(() => {
  1290. if (this.treeList.length) {
  1291. // 默认高亮第一个
  1292. this.$refs.treeRef.setCurrentKey(this.treeList[0]?.id);
  1293. this.handleNodeClick(this.treeList[0]);
  1294. }
  1295. });
  1296. } catch (error) {}
  1297. this.treeLoading = false;
  1298. },
  1299. async handleNodeClick1(data) {
  1300. if (data.type == 'projectType') {
  1301. this.rowData = this.dialogForm = await projectsGetByIdDetailsAPI(
  1302. data.id
  1303. );
  1304. this.getTreeData();
  1305. this.$nextTick(() => {
  1306. this.$refs.projectCalendarRef.init(data.id);
  1307. });
  1308. }
  1309. },
  1310. getIconClass(node, data) {
  1311. switch (data.type) {
  1312. case 2:
  1313. return node.expanded ? 'el-icon-document' : 'el-icon-tickets';
  1314. case 1:
  1315. return node.expanded ? 'el-icon-document' : 'el-icon-tickets';
  1316. case 0:
  1317. return node.expanded ? 'el-icon-folder-opened' : 'el-icon-folder';
  1318. default:
  1319. return '';
  1320. }
  1321. },
  1322. showRightMenu(event, node, data) {
  1323. if (this.dialogType == 'view') return;
  1324. this.contextMenuData.menuName = data.id + '_' + data.name + '_rightMenu';
  1325. this.$nextTick(() => {
  1326. let menuList = [
  1327. ...document.querySelectorAll('.vue-contextmenu-listWrapper')
  1328. ];
  1329. menuList.forEach((item) => {
  1330. item.style.display = 'none';
  1331. });
  1332. event.preventDefault();
  1333. const x = event.clientX;
  1334. const y = event.clientY;
  1335. this.contextMenuData.axis = { x, y };
  1336. switch (data.type) {
  1337. case 0:
  1338. this.contextMenuData.menulists = [
  1339. {
  1340. fnHandler: 'addChildProject',
  1341. icoName: 'fa el-icon-plus',
  1342. btnName: '新建子项目',
  1343. disabled:
  1344. this.disableToAddBOM(data) &&
  1345. this.$hasPermission('pro:projects:save')
  1346. },
  1347. {
  1348. fnHandler: 'addStage',
  1349. icoName: 'fa el-icon-plus',
  1350. btnName: '新建阶段',
  1351. disabled:
  1352. this.disableToAddBOM(data) &&
  1353. this.$hasPermission('pro:projects:save')
  1354. },
  1355. {
  1356. fnHandler: 'addBOM',
  1357. icoName: 'fa el-icon-plus',
  1358. btnName: '新建BOM',
  1359. disabled:
  1360. this.disableToAddBOM(data) &&
  1361. this.$hasPermission('pro:projects:save')
  1362. },
  1363. {
  1364. fnHandler: 'addPlan',
  1365. icoName: 'fa el-icon-plus',
  1366. btnName: '新建计划',
  1367. disabled: this.disableToAddPlan(data)
  1368. },
  1369. {
  1370. fnHandler: 'addTask',
  1371. icoName: 'fa el-icon-plus',
  1372. btnName: '新建任务',
  1373. disabled: this.disableToAddTask(data)
  1374. },
  1375. {
  1376. fnHandler: 'updateProject',
  1377. icoName: 'fa el-icon-edit',
  1378. btnName: '修改',
  1379. disabled:
  1380. [1, 2].includes(data.processStatus) &&
  1381. this.$hasPermission('pro:projects:update')
  1382. },
  1383. {
  1384. fnHandler: 'onRemove',
  1385. icoName: 'fa el-icon-delete',
  1386. btnName: '删除',
  1387. disabled:
  1388. [1, 2].includes(data.processStatus) &&
  1389. this.$hasPermission('pro:projects:delete')
  1390. },
  1391. {
  1392. fnHandler: 'handleFinish',
  1393. icoName: 'fa el-icon-success',
  1394. btnName: '完成',
  1395. disabled:
  1396. this.disableToFinish(data) &&
  1397. this.$hasPermission('pro:projects:update')
  1398. },
  1399. {
  1400. fnHandler: 'handlePause',
  1401. icoName: 'fa el-icon-video-pause',
  1402. btnName: '暂停',
  1403. disabled:
  1404. this.disableToPause(data) &&
  1405. this.$hasPermission('pro:projects:update')
  1406. },
  1407. {
  1408. fnHandler: 'handleStartup',
  1409. icoName: 'fa el-icon-video-play',
  1410. btnName: '启动',
  1411. disabled:
  1412. this.disableToStartup(data) &&
  1413. this.$hasPermission('pro:projects:update')
  1414. },
  1415. {
  1416. fnHandler: 'handleTermination',
  1417. icoName: 'fa el-icon-error',
  1418. btnName: '终止',
  1419. disabled:
  1420. this.disableToTermination(data) &&
  1421. this.$hasPermission('pro:projects:update')
  1422. }
  1423. ];
  1424. break;
  1425. case 1:
  1426. this.contextMenuData.menulists = [
  1427. {
  1428. fnHandler: 'addBOM',
  1429. icoName: 'fa el-icon-plus',
  1430. btnName: '新建BOM',
  1431. disabled:
  1432. this.disableToAddBOM(data) &&
  1433. this.$hasPermission('pro:projects:save')
  1434. },
  1435. {
  1436. fnHandler: 'addPlan',
  1437. icoName: 'fa el-icon-plus',
  1438. btnName: '新建计划',
  1439. disabled: this.disableToAddPlan(data)
  1440. },
  1441. {
  1442. fnHandler: 'addTask',
  1443. icoName: 'fa el-icon-plus',
  1444. btnName: '新建任务',
  1445. disabled: this.disableToAddTask(data)
  1446. },
  1447. {
  1448. fnHandler: 'editBOM',
  1449. icoName: 'fa el-icon-edit',
  1450. btnName: '修改',
  1451. disabled:
  1452. ![0].includes(data.status) &&
  1453. this.$hasPermission('pro:projects:update')
  1454. },
  1455. {
  1456. fnHandler: 'removeBom',
  1457. icoName: 'fa el-icon-delete',
  1458. btnName: '删除',
  1459. disabled:
  1460. ![0].includes(data.status) &&
  1461. this.$hasPermission('pro:projects:delete')
  1462. },
  1463. {
  1464. fnHandler: 'handleBomFinish',
  1465. icoName: 'fa el-icon-success',
  1466. btnName: '完成',
  1467. disabled:
  1468. this.disableToFinish(data) &&
  1469. this.$hasPermission('pro:projects:update')
  1470. },
  1471. {
  1472. fnHandler: 'handleBomPause',
  1473. icoName: 'fa el-icon-video-pause',
  1474. btnName: '暂停',
  1475. disabled:
  1476. this.disableToPause(data) &&
  1477. this.$hasPermission('pro:projects:update')
  1478. },
  1479. {
  1480. fnHandler: 'handleBomStartup',
  1481. icoName: 'fa el-icon-video-play',
  1482. btnName: '启动',
  1483. disabled:
  1484. this.disableToStartup(data) &&
  1485. this.$hasPermission('pro:projects:update')
  1486. },
  1487. {
  1488. fnHandler: 'handleBomTermination',
  1489. icoName: 'fa el-icon-error',
  1490. btnName: '终止',
  1491. disabled:
  1492. this.disableToTermination(data) &&
  1493. this.$hasPermission('pro:projects:update')
  1494. }
  1495. ];
  1496. break;
  1497. case 2:
  1498. this.contextMenuData.menulists = [
  1499. {
  1500. fnHandler: 'addPlan',
  1501. icoName: 'fa el-icon-plus',
  1502. btnName: '新建计划',
  1503. disabled: this.disableToAddPlan(data)
  1504. },
  1505. {
  1506. fnHandler: 'addTask',
  1507. icoName: 'fa el-icon-plus',
  1508. btnName: '新建任务',
  1509. disabled: this.disableToAddTask(data)
  1510. },
  1511. // {fnHandler: 'onSave',
  1512. // icoName: 'fa el-icon-edit',
  1513. // btnName: '修改'
  1514. // },
  1515. // {fnHandler: 'stageRemove',
  1516. // icoName: 'fa el-icon-delete',
  1517. // btnName: '删除'
  1518. // },
  1519. {
  1520. fnHandler: 'handleStageFinish',
  1521. icoName: 'fa el-icon-success',
  1522. btnName: '完成',
  1523. disabled: this.disableToFinish(data)
  1524. },
  1525. {
  1526. fnHandler: 'handleStagePause',
  1527. icoName: 'fa el-icon-video-pause',
  1528. btnName: '暂停',
  1529. disabled: this.disableToPause(data)
  1530. },
  1531. {
  1532. fnHandler: 'handleStageStartup',
  1533. icoName: 'fa el-icon-video-play',
  1534. btnName: '启动',
  1535. disabled: this.disableToStartup(data)
  1536. },
  1537. {
  1538. fnHandler: 'handleStageTermination',
  1539. icoName: 'fa el-icon-error',
  1540. btnName: '终止',
  1541. disabled: this.disableToTermination(data)
  1542. }
  1543. ];
  1544. break;
  1545. }
  1546. });
  1547. },
  1548. disableToAddBOM(row) {
  1549. return (
  1550. ![0, 1, 2, 3].includes(row.processStatus) ||
  1551. ![0, 1].includes(row.status)
  1552. );
  1553. },
  1554. disableToAddPlan(row) {
  1555. return (
  1556. ![0, 1, 2, 3].includes(row.processStatus) ||
  1557. ![0, 1].includes(row.status)
  1558. );
  1559. },
  1560. disableToAddTask(row) {
  1561. return (
  1562. ![0, 1, 2, 3].includes(row.processStatus) ||
  1563. ![0, 1].includes(row.status)
  1564. );
  1565. },
  1566. disableToFinish(row) {
  1567. return ![2].includes(row.processStatus) || [4, 2, 3].includes(row.status);
  1568. },
  1569. disableToPause(row) {
  1570. return ![2].includes(row.processStatus) || [4, 2, 3].includes(row.status);
  1571. },
  1572. disableToStartup(row) {
  1573. return (
  1574. ![2].includes(row.processStatus) || [4, 1, 0, 3].includes(row.status)
  1575. );
  1576. },
  1577. disableToTermination(row) {
  1578. return ![2].includes(row.processStatus) || [4, 3].includes(row.status);
  1579. },
  1580. handleNodeClick(data) {
  1581. console.log('点击');
  1582. this.treeId = data.id;
  1583. this.currentNodeData = data;
  1584. this.$nextTick(async () => {
  1585. // this.$refs.projectInfoTable.init();
  1586. switch (data.type) {
  1587. case 1:
  1588. await this.$refs.attributeRef.setAttributeFormData(
  1589. this.currentNodeData
  1590. );
  1591. break;
  1592. case 2:
  1593. this.dialogForm = await projectsGetByIdDetailsAPI(data.parentId);
  1594. break;
  1595. case 0:
  1596. this.dialogForm = await projectsGetByIdDetailsAPI(data.id);
  1597. this.dialogForm.type = this.dialogForm.type + '';
  1598. this.dialogForm.level = this.dialogForm.level + '';
  1599. this.dialogForm.parentId =
  1600. this.dialogForm.parentId == 0 ? '' : this.dialogForm.parentId;
  1601. this.projectStepList = ['待立项', '审核中', '执行中', '已完成'];
  1602. if (data.processStatus == 0) {
  1603. this.active = 0;
  1604. break;
  1605. }
  1606. if ([1, 3].includes(data.processStatus)) {
  1607. let stepName = data.processStatus == 3 ? '审核未通过' : '审核中';
  1608. this.projectStepList.splice(1, 1, stepName);
  1609. this.active = 1;
  1610. break;
  1611. }
  1612. if ([0, 1, 2].includes(data.status)) {
  1613. let stepName =
  1614. data.status == 1
  1615. ? '执行中'
  1616. : data.status == 2
  1617. ? '暂停中'
  1618. : '未开始';
  1619. this.projectStepList.splice(2, 1, stepName);
  1620. this.active = 2;
  1621. break;
  1622. }
  1623. if ([3, 4].includes(data.status)) {
  1624. let stepName = data.status == 3 ? '已完成' : '已终止';
  1625. this.projectStepList.splice(3, 1, stepName);
  1626. this.active = 4;
  1627. break;
  1628. }
  1629. break;
  1630. }
  1631. if ([0, 2].includes(data.type)) {
  1632. this.dialogForm.type = this.dialogForm.type + '';
  1633. this.dialogForm.level = this.dialogForm.level + '';
  1634. this.dialogForm.parentId =
  1635. this.dialogForm.parentId == 0 ? '' : this.dialogForm.parentId;
  1636. this.dialogForm.stageList = this.dialogForm.allStageList;
  1637. await this.getTeamInfo(this.dialogForm.teamId);
  1638. }
  1639. });
  1640. this.getPlanAndTaskTree(data);
  1641. this.getTaskTree(data);
  1642. },
  1643. async getPlanAndTaskTree(data) {
  1644. let paramAttr = '';
  1645. switch (data.type) {
  1646. case 1:
  1647. paramAttr = 'projectBomId';
  1648. break;
  1649. case 2:
  1650. paramAttr = 'projectStageId';
  1651. break;
  1652. default:
  1653. paramAttr = 'projectId';
  1654. }
  1655. let params = {
  1656. [paramAttr]: data.id
  1657. };
  1658. this.planAndTaskTree = await getPlanAndTaskTreeById(params);
  1659. },
  1660. async getTaskTree(data) {
  1661. let paramAttr = '';
  1662. switch (data.type) {
  1663. case 1:
  1664. paramAttr = 'projectBomId';
  1665. break;
  1666. case 2:
  1667. paramAttr = 'projectStageId';
  1668. break;
  1669. default:
  1670. paramAttr = 'projectId';
  1671. }
  1672. let params = {
  1673. [paramAttr]: data.id
  1674. };
  1675. this.taskTree = await getTaskTreeById(params);
  1676. },
  1677. reload(where) {
  1678. this.getTreeData();
  1679. },
  1680. setTableCell({ row }) {
  1681. console.log(row.level);
  1682. if (row.level === 1) return ''; //
  1683. return { marginLeft: row.level + 3 + 'px' }; //
  1684. },
  1685. handleTableNodeClick(row) {
  1686. this.isShow = true;
  1687. this.attrActiveName = '属性';
  1688. this.currentTableNodeData = row;
  1689. console.log(row, 'row.type');
  1690. switch (row.type) {
  1691. case 0:
  1692. this.getProjectPlanInfo(row.id);
  1693. break;
  1694. case 1:
  1695. this.getProjectPlanInfo(row.targetPlanId);
  1696. break;
  1697. case 2:
  1698. this.getProjectTaskInfo(row.id);
  1699. break;
  1700. }
  1701. },
  1702. handlePlanTableNodeClick(row) {
  1703. console.log(row, '点击计划某一行');
  1704. this.isShow = true;
  1705. this.attrActiveName = '属性';
  1706. this.currentTableNodeData = row;
  1707. this.getProjectPlanInfo(row.id);
  1708. },
  1709. showTableRightMenu(row, column, event) {
  1710. if (this.dialogType == 'view') return;
  1711. this.contextTableMenuData.menuName = row.name;
  1712. this.$nextTick(() => {
  1713. let menuList = [
  1714. ...document.querySelectorAll('.vue-contextmenu-listWrapper')
  1715. ];
  1716. menuList.forEach((item) => {
  1717. item.style.display = 'none';
  1718. });
  1719. event.preventDefault();
  1720. const x = event.clientX;
  1721. const y = event.clientY;
  1722. this.contextTableMenuData.axis = { x, y };
  1723. switch (row.type) {
  1724. case 0:
  1725. this.contextTableMenuData.menulists = [
  1726. {
  1727. fnHandler: 'addPlan',
  1728. icoName: 'fa el-icon-plus',
  1729. btnName: '新建计划',
  1730. disabled: this.disableToAddPlan(row)
  1731. },
  1732. {
  1733. fnHandler: 'addTask',
  1734. icoName: 'fa el-icon-plus',
  1735. btnName: '新建任务',
  1736. disabled: this.disableToAddTask(row)
  1737. },
  1738. {
  1739. fnHandler: 'editPlan',
  1740. icoName: 'fa el-icon-edit',
  1741. btnName: '修改',
  1742. disabled:
  1743. [1, 2].includes(row.processStatus) ||
  1744. ![0].includes(row.status)
  1745. },
  1746. {
  1747. fnHandler: 'removePlan',
  1748. icoName: 'fa el-icon-delete',
  1749. btnName: '删除',
  1750. disabled:
  1751. [1, 2].includes(row.processStatus) ||
  1752. ![0].includes(row.status)
  1753. },
  1754. {
  1755. fnHandler: 'finishPlan',
  1756. icoName: 'fa el-icon-success',
  1757. btnName: '完成',
  1758. disabled: this.disableToFinish(row)
  1759. },
  1760. {
  1761. fnHandler: 'pausePlan',
  1762. icoName: 'fa el-icon-video-pause',
  1763. btnName: '暂停',
  1764. disabled: this.disableToPause(row)
  1765. },
  1766. {
  1767. fnHandler: 'startupPlan',
  1768. icoName: 'fa el-icon-video-play',
  1769. btnName: '启动',
  1770. disabled: this.disableToStartup(row)
  1771. },
  1772. {
  1773. fnHandler: 'terminationPlan',
  1774. icoName: 'fa el-icon-error',
  1775. btnName: '终止',
  1776. disabled: this.disableToTermination(row)
  1777. }
  1778. ];
  1779. break;
  1780. case 1:
  1781. this.contextTableMenuData.menulists = [
  1782. {
  1783. fnHandler: 'addTask',
  1784. icoName: 'fa el-icon-plus',
  1785. btnName: '新建任务',
  1786. disabled: this.disableToAddTask(row)
  1787. },
  1788. // {fnHandler: 'editBOM', icoName: 'fa el-icon-edit', btnName: '修改'},
  1789. // {fnHandler: 'removeBom', icoName: 'fa el-icon-delete', btnName: '删除'},
  1790. {
  1791. fnHandler: 'finishPlanStage',
  1792. icoName: 'fa el-icon-success',
  1793. btnName: '完成',
  1794. disabled: this.disableToFinish(row)
  1795. },
  1796. {
  1797. fnHandler: 'pausePlanStage',
  1798. icoName: 'fa el-icon-video-pause',
  1799. btnName: '暂停',
  1800. disabled: this.disableToPause(row)
  1801. },
  1802. {
  1803. fnHandler: 'startupPlanStage',
  1804. icoName: 'fa el-icon-video-play',
  1805. btnName: '启动',
  1806. disabled: this.disableToStartup(row)
  1807. },
  1808. {
  1809. fnHandler: 'terminationPlanStage',
  1810. icoName: 'fa el-icon-error',
  1811. btnName: '终止',
  1812. disabled: this.disableToTermination(row)
  1813. }
  1814. ];
  1815. break;
  1816. case 2:
  1817. this.contextTableMenuData.menulists = [
  1818. {
  1819. fnHandler: 'addTask',
  1820. icoName: 'fa el-icon-plus',
  1821. btnName: '新建任务',
  1822. disabled: [4, 2, 3].includes(row.status)
  1823. },
  1824. {
  1825. fnHandler: 'updateTask',
  1826. icoName: 'fa el-icon-edit',
  1827. btnName: '修改',
  1828. disabled: [4, 2, 3, 1].includes(row.status)
  1829. },
  1830. {
  1831. fnHandler: 'removeTask',
  1832. icoName: 'fa el-icon-delete',
  1833. btnName: '删除',
  1834. disabled: [4, 2, 3, 1].includes(row.status)
  1835. },
  1836. {
  1837. fnHandler: 'startTask',
  1838. icoName: 'fa el-icon-video-play',
  1839. btnName: '执行',
  1840. disabled: [4, 3, 1].includes(row.status)
  1841. },
  1842. {
  1843. fnHandler: 'handleSubmitDeliverables',
  1844. icoName: 'fa el-icon-folder-add',
  1845. btnName: '交付物提交',
  1846. disabled: [4, 3, 0, 2].includes(row.status)
  1847. },
  1848. {
  1849. fnHandler: 'finishTask',
  1850. icoName: 'fa el-icon-success',
  1851. btnName: '报工',
  1852. disabled: !(
  1853. [1].includes(row.status) && row.ifFilesAllFinish == 1
  1854. )
  1855. },
  1856. {
  1857. fnHandler: 'pauseTask',
  1858. icoName: 'fa el-icon-video-pause',
  1859. btnName: '暂停',
  1860. disabled: this.disableToPause(row)
  1861. },
  1862. {
  1863. fnHandler: 'terminationTask',
  1864. icoName: 'fa el-icon-error',
  1865. btnName: '终止',
  1866. disabled: this.disableToTermination(row)
  1867. },
  1868. {
  1869. fnHandler: 'handleTransfer',
  1870. icoName: 'fa el-icon-position',
  1871. btnName: '转派',
  1872. disabled: ![1].includes(row.status)
  1873. }
  1874. ];
  1875. break;
  1876. }
  1877. });
  1878. },
  1879. //转派
  1880. handleTransfer(row) {
  1881. this.transferDialogFlag = true;
  1882. this.$nextTick(() => {
  1883. this.$refs.transferDialogRef.init(row);
  1884. });
  1885. },
  1886. /* 交付物提交 */
  1887. handleSubmitDeliverables(row = {}, type) {
  1888. this.submitDeliverablesDialogFlag = true;
  1889. this.$nextTick(() => {
  1890. this.$refs.submitDeliverablesDialogRef.init(row, type);
  1891. });
  1892. },
  1893. async getProjectTaskInfo(id = '') {
  1894. this.rightForm = await projectsTaskGetByIdAPI(id);
  1895. this.rightForm.type = this.rightForm.type + '';
  1896. this.rightForm.responsibleUserIds =
  1897. this.rightForm.responsibleUserList?.map((i) => i.userName) || [];
  1898. },
  1899. async getProjectPlanInfo(id = '') {
  1900. let res = await projectsPlanGetByIdAPI(id);
  1901. this.rightForm = deepClone(res);
  1902. this.rightForm.responsibleUserIds =
  1903. this.rightForm.responsibleUserList?.map((i) => i.userName) || [];
  1904. this.rightForm.planStageList?.forEach((item, index) => {
  1905. let userNames = item.responsibleUserList.map((i) => i.userName) || [];
  1906. this.$set(item, 'responsibleUserNames', userNames.join(','));
  1907. });
  1908. // await this.changeProject(this.dialogForm.projectId)
  1909. },
  1910. async getTeamInfo(teamId) {
  1911. if (teamId) {
  1912. this.teamForm = await projectsTeamGetByIdAPI(teamId);
  1913. }
  1914. },
  1915. // 每一级字体变小
  1916. fontSize(node, data) {
  1917. if (node.level === 1 || node.level === 2) return 'font-size:14px'; // 一二级字体
  1918. return 'font-size:' + 13 + 'px'; // 三级以下字号减小
  1919. },
  1920. uploadFile() {
  1921. this.$refs.importDialogRef.open();
  1922. },
  1923. handleLeftTreeActiveName(val) {
  1924. console.log(val);
  1925. this.leftTreeActiveName = val;
  1926. this.getTreeData();
  1927. },
  1928. customColorMethod(percentage) {
  1929. if (percentage < 30) {
  1930. return '#b6b6b6';
  1931. } else if (percentage < 70) {
  1932. return '#b3e496';
  1933. } else {
  1934. return '#67c23a';
  1935. }
  1936. }
  1937. },
  1938. created() {}
  1939. };
  1940. </script>
  1941. <style lang="scss" scoped>
  1942. :deep(.el-drawer__body) {
  1943. overflow: hidden;
  1944. }
  1945. .ele-body {
  1946. display: flex;
  1947. flex-direction: column;
  1948. height: 100%;
  1949. .card_2_box {
  1950. flex: 1;
  1951. ::v-deep .el-card__body {
  1952. height: 100%;
  1953. .card_2_box_content {
  1954. height: 100%;
  1955. .ele-split-panel {
  1956. height: 100%;
  1957. .el_tree_box {
  1958. padding: 0 4px 0 0;
  1959. height: 100%;
  1960. border: none;
  1961. border-right: 1px solid #e8eaec;
  1962. //border-radius: 3px;
  1963. .el-tree-node {
  1964. .el-tree-node__children {
  1965. height: 100%;
  1966. overflow: auto;
  1967. }
  1968. }
  1969. }
  1970. }
  1971. }
  1972. }
  1973. }
  1974. }
  1975. .card_2_layout_content {
  1976. display: flex;
  1977. flex-direction: column;
  1978. height: 100%;
  1979. ::v-deep .card_2_1_box {
  1980. height: 50px;
  1981. width: 100%;
  1982. margin-bottom: 10px;
  1983. .border-box-content {
  1984. height: 100%;
  1985. width: 100%;
  1986. background: rgba(203, 203, 203, 0.12);
  1987. border-radius: 3px;
  1988. display: flex;
  1989. flex-direction: row;
  1990. justify-content: space-between;
  1991. align-items: center;
  1992. .card_2_1_box_div_1 {
  1993. flex: 1;
  1994. height: 50px;
  1995. display: flex;
  1996. align-items: center;
  1997. .el-steps--simple {
  1998. border-radius: 0 !important;
  1999. background: none;
  2000. width: 100%;
  2001. padding: 10px 8%;
  2002. }
  2003. .is-success {
  2004. color: rgb(103, 103, 103) !important;
  2005. .el-step__icon {
  2006. border-color: rgb(103, 103, 103) !important;
  2007. }
  2008. .el-icon-check:before {
  2009. font-size: 14px;
  2010. line-height: 14px;
  2011. font-weight: bold;
  2012. color: rgb(103, 103, 103) !important;
  2013. }
  2014. }
  2015. .el-step__main {
  2016. .is-process:before {
  2017. content: '';
  2018. background: rgba(182, 182, 182, 0.26);
  2019. height: 30px;
  2020. width: 160px;
  2021. display: block;
  2022. position: absolute;
  2023. border-radius: 15px;
  2024. transform: translate(-40%, -18%);
  2025. }
  2026. }
  2027. .is-process {
  2028. border-color: #f8f8f8 !important;
  2029. font-weight: bold;
  2030. }
  2031. .is-success + .el-step__arrow:before {
  2032. background: rgb(202, 205, 212) !important;
  2033. }
  2034. .is-success + .el-step__arrow:after {
  2035. background: rgb(202, 205, 212) !important;
  2036. }
  2037. }
  2038. .card_2_1_box_div_2 {
  2039. width: 150px;
  2040. margin-right: 10px;
  2041. height: 100%;
  2042. display: flex;
  2043. align-items: center;
  2044. .dv-percent-pond text {
  2045. font-size: 20px !important;
  2046. transform: translate(0%, 10%);
  2047. }
  2048. }
  2049. }
  2050. }
  2051. ::v-deep .tab-box_1 {
  2052. flex: 1;
  2053. .el-tabs__content {
  2054. //padding: 10px;
  2055. height: calc(100% - 45px);
  2056. //overflow: auto;
  2057. padding: 0;
  2058. padding-top: 10px;
  2059. .el-tab-pane {
  2060. height: 100%;
  2061. }
  2062. }
  2063. }
  2064. }
  2065. ::v-deep .project_tree {
  2066. .custom-tree-node {
  2067. display: flex;
  2068. align-items: center;
  2069. .label_img {
  2070. width: 20px;
  2071. height: 20px;
  2072. margin-left: 5px;
  2073. }
  2074. }
  2075. .el-tree-node {
  2076. position: relative;
  2077. padding-left: 0px;
  2078. }
  2079. .el-tree-node__children {
  2080. padding-left: 22px;
  2081. }
  2082. // 自定义图标中隐藏自带箭头
  2083. //.el-tree-node__content > .el-tree-node__expand-icon {
  2084. // position: absolute;
  2085. // opacity: 0;
  2086. //}
  2087. .el-tree-node__content > .el-tree-node__expand-icon {
  2088. padding: 0;
  2089. }
  2090. // 禁止旋转
  2091. .el-tree .el-tree-node__expand-icon.expanded {
  2092. -webkit-transform: rotate(0deg);
  2093. transform: rotate(0deg);
  2094. }
  2095. // 节点高度与边距
  2096. .el-tree-node__content {
  2097. height: 30px;
  2098. }
  2099. .el-tree-node {
  2100. margin: 1px 0;
  2101. overflow: hidden;
  2102. text-overflow: ellipsis;
  2103. white-space: nowrap;
  2104. }
  2105. //高亮字体颜色
  2106. .el-tree--highlight-current
  2107. .el-tree-node.is-current
  2108. > .el-tree-node__content {
  2109. color: #ee7355 !important;
  2110. background-color: red !important; // 设置选中背景颜色
  2111. }
  2112. // 设置竖线
  2113. .el-tree-node .is-focusable:before {
  2114. content: '';
  2115. display: inline-block;
  2116. position: absolute;
  2117. left: -15px;
  2118. border-left: 1px solid #f8f8f8;
  2119. height: calc(100%);
  2120. }
  2121. .list-left {
  2122. width: 214px;
  2123. height: auto;
  2124. margin: 10px 0 20px 20px;
  2125. background-color: #fff;
  2126. border-radius: 10px;
  2127. padding: 20px;
  2128. }
  2129. // 鼠标移入高亮
  2130. .custom-tree-node:hover {
  2131. //color: #070a0c !important;
  2132. }
  2133. .el-icon-folder-opened,
  2134. .el-icon-folder,
  2135. .el-icon-document,
  2136. .el-icon-tickets {
  2137. display: flex;
  2138. align-items: center;
  2139. }
  2140. .el-icon-document,
  2141. .el-icon-folder-opened {
  2142. //color: #0e85fa;
  2143. }
  2144. //高亮字体颜色
  2145. .el-tree--highlight-current,
  2146. .el-tree-node.is-current > .el-tree-node__content {
  2147. color: #f8f8f8 !important;
  2148. background-color: #72b9ff !important; // 设置选中背景颜色
  2149. border-radius: 3px;
  2150. }
  2151. .el-tree-node__content:hover {
  2152. color: #f8f8f8 !important;
  2153. background-color: #b7d6f8 !important; // 设置选中背景颜色
  2154. border-radius: 3px;
  2155. }
  2156. }
  2157. ::v-deep .ele-table-tool-default {
  2158. display: none;
  2159. }
  2160. ::v-deep .ele-split-panel-body {
  2161. .ele-split-panel-side {
  2162. border-bottom: 1px solid #e8e8e8;
  2163. }
  2164. }
  2165. ::v-deep .ele-split-panel-side {
  2166. // border-bottom: 2px solid #e6e8ea;
  2167. height: 100%;
  2168. .tab-box_1 {
  2169. height: 100%;
  2170. .el-tabs__item {
  2171. background: rgba(246, 246, 247, 0.8);
  2172. border-bottom: 1px solid #e6e8ea;
  2173. }
  2174. .is-active.el-tabs__item {
  2175. background: #ffffff;
  2176. border-bottom: none;
  2177. }
  2178. .el-table {
  2179. height: calc(100% - 1px);
  2180. }
  2181. }
  2182. }
  2183. ::v-deep .tab-box_2 {
  2184. height: 100%;
  2185. overflow: auto;
  2186. display: flex;
  2187. flex-direction: column;
  2188. .el-tabs__content {
  2189. flex: 1;
  2190. .el-tab-pane {
  2191. height: 100%;
  2192. }
  2193. }
  2194. }
  2195. .current_button {
  2196. background: #096cd7;
  2197. border-color: #096cd7;
  2198. color: #ffffff;
  2199. }
  2200. ::v-deep .vue-contextmenu-listWrapper {
  2201. display: block;
  2202. background: #fff !important;
  2203. padding: 4px 0 !important;
  2204. border: 1px solid #dadada;
  2205. border-radius: 7px !important;
  2206. color: #606266;
  2207. .context-menu-list:hover {
  2208. background: rgba(156, 156, 156, 0.2) !important;
  2209. //color: #FFFFFF !important;
  2210. }
  2211. .context-menu-list {
  2212. background: #fff !important;
  2213. width: 100%;
  2214. height: 25px;
  2215. div {
  2216. display: flex;
  2217. flex-direction: row;
  2218. align-items: center;
  2219. justify-content: flex-start;
  2220. min-width: 120px;
  2221. width: 100%;
  2222. height: 100%;
  2223. i {
  2224. margin-left: 15px;
  2225. }
  2226. span {
  2227. margin: 0 !important;
  2228. margin-left: 25px !important;
  2229. }
  2230. }
  2231. }
  2232. }
  2233. ::v-deep tr[class^='el-table__row--level'] > td:nth-child(2) > .cell {
  2234. margin-left: 24px;
  2235. }
  2236. ::v-deep .el-table__header-wrapper .el-table__cell {
  2237. .cell {
  2238. text-align: center;
  2239. }
  2240. }
  2241. @for $i from 1 to 10 {
  2242. ::v-deep .el-table__row--level-#{$i} > td:nth-child(2) > .cell {
  2243. margin-left: #{$i * 4 +10}px;
  2244. display: flex;
  2245. flex-direction: row;
  2246. align-items: center;
  2247. }
  2248. }
  2249. .dot {
  2250. border-radius: 50%;
  2251. -webkit-background-clip: text;
  2252. color: #0e85fa;
  2253. display: inline-block;
  2254. width: 5px;
  2255. height: 5px;
  2256. margin-right: 2px;
  2257. text-align: center;
  2258. background: #0e85fa;
  2259. }
  2260. </style>