Controltree.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. <template>
  2. <div class="controltree-box">
  3. <div class="controltree-w">
  4. <div class="controltree-ul" >
  5. <div class="controltree-li" v-for="(item,index) in treeData" :key="index">
  6. {{item.label}}
  7. <div v-if="item.children" class="second-ul">
  8. <div class="second-ul-haed">
  9. <div>版块步骤</div>
  10. <div>预计完成时间</div>
  11. <div>完成时间</div>
  12. </div>
  13. <div v-if="item.panduan=='wu'">
  14. <div v-for="(seconditem,index) in item.children" :key="index" class="li-steps-li">
  15. <div :style="filter_color(seconditem.state)">{{seconditem.label}}</div>
  16. <div>{{seconditem.date}}</div>
  17. <div>{{seconditem.enddate}}</div>
  18. </div>
  19. </div>
  20. <div v-if="item.panduan=='you'" style="padding:5px">
  21. <div v-for="(seconditem,index) in item.children" :key="index" class="second-li">
  22. <span>{{seconditem.label}}</span>
  23. <div class="li-steps-ul">
  24. <div class="zanwu" v-if="!seconditem.children">暂无事件</div>
  25. <div v-for="(stepsitem,index) in seconditem.children" :key="index" class="li-steps-li">
  26. <div :style="filter_color(stepsitem.state)">{{stepsitem.label}}</div>
  27. <div>{{stepsitem.date}}</div>
  28. <div>{{stepsitem.enddate}}</div>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. treeData: [{
  44. id: 1,
  45. label: "团组出行",
  46. },
  47. {
  48. id: 2,
  49. label: "确认出团",
  50. },
  51. {
  52. id: 3,
  53. label: "经费预算",
  54. panduan:"wu",
  55. children:[
  56. {
  57. id:15,
  58. label: "完成经费预算",
  59. date:"2023-01-12 ~ 2023-02-10",
  60. enddate:'2023-02-10'
  61. }
  62. ]
  63. },
  64. {
  65. id: 4,
  66. label: " 市场部人员报价对接/反馈",
  67. panduan:"wu",
  68. children:[
  69. {
  70. id:18,
  71. label: "完成报价对接/反馈",
  72. date:"2023-01-12 ~ 2023-02-10",
  73. enddate:'2023-02-10'
  74. },
  75. {
  76. id:19,
  77. label: "录入最终总经费预算",
  78. date:"2023-01-12 ~ 2023-02-10",
  79. enddate:'2023-02-10'
  80. },
  81. {
  82. id:20,
  83. label: "上传明细单",
  84. date:"2023-01-12 ~ 2023-02-10",
  85. enddate:'2023-02-10'
  86. }
  87. ]
  88. },
  89. {
  90. id: 5,
  91. label: "报批流程"
  92. },
  93. {
  94. id: 6,
  95. label: "护照/签证",
  96. panduan:"wu",
  97. children:[
  98. {
  99. id:22,
  100. label: "签证费用录入",
  101. date:"2023-01-12 ~ 2023-02-10",
  102. enddate:'2023-02-10',
  103. state:1
  104. },
  105. {
  106. id:23,
  107. label: "归还护照",
  108. date:"2023-01-12 ~ 2023-02-10",
  109. enddate:'2023-02-10',
  110. state:2
  111. },
  112. {
  113. id:24,
  114. label: "出签+取护照",
  115. date:"2023-01-12 ~ 2023-02-10",
  116. enddate:'2023-02-10',
  117. state:3
  118. },
  119. {
  120. id:25,
  121. label: "送签",
  122. date:"2023-01-12 ~ 2023-02-10",
  123. enddate:'2023-02-10',
  124. state:3
  125. },
  126. {
  127. id:26,
  128. label: "填资料",
  129. date:"2023-01-12 ~ 2023-02-10",
  130. enddate:'2023-02-10',
  131. state:1
  132. },
  133. {
  134. id:27,
  135. label: "取护照资料",
  136. date:"2023-01-12 ~ 2023-02-10",
  137. enddate:'2023-02-10',
  138. state:1
  139. },
  140. {
  141. id:28,
  142. label: "收集资料",
  143. date:"2023-01-12 ~ 2023-02-10",
  144. enddate:'2023-02-10',
  145. state:1
  146. }
  147. ]
  148. },
  149. {
  150. id: 7,
  151. label: "各版块操作",
  152. panduan:"you",
  153. children:[
  154. {
  155. id:29,
  156. label: "机票",
  157. children:[
  158. {
  159. id:42,
  160. label: "询价并导入黑屏代码",
  161. date:"2023-01-12 ~ 2023-02-10",
  162. enddate:'2023-02-10',
  163. state:1
  164. },
  165. {
  166. id:43,
  167. label: "机票已占位",
  168. date:"2023-01-12 ~ 2023-02-10",
  169. enddate:'2023-02-10',
  170. state:1
  171. },
  172. {
  173. id:44,
  174. label: "已出票",
  175. date:"2023-01-12 ~ 2023-02-10",
  176. enddate:'2023-02-10',
  177. state:2
  178. },
  179. {
  180. id:45,
  181. label: "机票费用录入",
  182. date:"2023-01-12 ~ 2023-02-10",
  183. enddate:'',
  184. state:3
  185. }
  186. ]
  187. },
  188. {
  189. id:30,
  190. label: "酒店",
  191. children:[
  192. {
  193. id:46,
  194. label: "酒店费用录入",
  195. date:"2023-01-12 ~ 2023-02-10",
  196. enddate:'2023-02-10'
  197. }
  198. ]
  199. },
  200. {
  201. id:31,
  202. label: "OP",
  203. children:[
  204. {
  205. id:47,
  206. label: "OP费用录入",
  207. date:"2023-01-12 ~ 2023-02-10",
  208. enddate:'2023-02-10'
  209. }
  210. ]
  211. },
  212. {
  213. id:32,
  214. label: "商邀",
  215. children:[
  216. {
  217. id:48,
  218. label: "报批/商邀费用录入",
  219. date:"2023-01-12 ~ 2023-02-10",
  220. enddate:'2023-02-10'
  221. }
  222. ]
  223. },
  224. {
  225. id:33,
  226. label: "其他",
  227. children:[
  228. {
  229. id:49,
  230. label: "增减款项录入",
  231. date:"2023-01-12 ~ 2023-02-10",
  232. enddate:'2023-02-10'
  233. }
  234. ]
  235. }
  236. ]
  237. },
  238. {
  239. id: 8,
  240. label: "费用审批",
  241. panduan:"wu",
  242. children:[
  243. {
  244. id:34,
  245. label: "机票费用审批",
  246. date:"2023-01-12 ~ 2023-02-10",
  247. enddate:'2023-02-10',
  248. state:1
  249. },
  250. {
  251. id:35,
  252. label: "酒店费用审批",
  253. date:"2023-01-12 ~ 2023-02-10",
  254. enddate:'2023-02-10',
  255. state:1
  256. },
  257. {
  258. id:36,
  259. label: "OP费用审批",
  260. date:"2023-01-12 ~ 2023-02-10",
  261. enddate:'2023-02-10',
  262. state:1
  263. },
  264. {
  265. id:37,
  266. label: "商邀费用审批",
  267. date:"2023-01-12 ~ 2023-02-10",
  268. enddate:'2023-02-10',
  269. state:1
  270. },
  271. {
  272. id:38,
  273. label: "增减款项审批",
  274. date:"2023-01-12 ~ 2023-02-10",
  275. enddate:'2023-02-10',
  276. state:1
  277. }
  278. ]
  279. },
  280. {
  281. id: 9,
  282. label: "付款给供应商",
  283. panduan:"wu",
  284. children:[
  285. {
  286. id:39,
  287. label: "OP费用付款",
  288. date:"2023-01-12 ~ 2023-02-10",
  289. enddate:'2023-02-10',
  290. state:1
  291. },
  292. {
  293. id:40,
  294. label: "商邀费用付款",
  295. date:"2023-01-12 ~ 2023-02-10",
  296. enddate:'2023-02-10',
  297. state:1
  298. },
  299. {
  300. id:41,
  301. label: "增减款项付款",
  302. date:"2023-01-12 ~ 2023-02-10",
  303. enddate:'2023-02-10',
  304. state:1
  305. }
  306. ]
  307. },
  308. {
  309. id: 10,
  310. label: "开行前会"
  311. },
  312. {
  313. id: 11,
  314. label: "送机"
  315. },
  316. {
  317. id: 12,
  318. label: "数据/附件归档"
  319. },
  320. {
  321. id: 13,
  322. label: "接机"
  323. },
  324. {
  325. id: 14,
  326. label: "客户意见表"
  327. }
  328. ]
  329. }
  330. },
  331. created(){
  332. },
  333. methods:{
  334. filter_color(val){
  335. if(val==1){
  336. return "color:green"
  337. }
  338. if(val==3){
  339. return "color:red"
  340. }
  341. if(val==2){
  342. return "color:#8f8383"
  343. }
  344. }
  345. },
  346. filters:{
  347. }
  348. }
  349. </script>
  350. <style>
  351. ul li{
  352. list-style: none;
  353. }
  354. .controltree-box{
  355. background-color: #fff;
  356. box-shadow: 0 0 5px #0005;
  357. border-radius: 10px;
  358. display: flex;
  359. justify-content: center;
  360. padding: 100px 0;
  361. }
  362. .controltree-ul{
  363. display: flex;
  364. flex-direction: column;
  365. }
  366. .controltree-w{
  367. display: inline-block;
  368. margin: 0 auto;
  369. }
  370. .controltree-li{
  371. display: inline-block;
  372. padding: 10px 20px;
  373. box-shadow: 0 0 5px #0005;
  374. border-radius: 5px;
  375. text-align: center;
  376. position: relative;
  377. }
  378. .controltree-li:not(:last-child){
  379. margin-bottom: 250px;
  380. }
  381. .controltree-li:not(:last-child)::after{
  382. content: "";
  383. display: inline-block;
  384. width: 1px;
  385. height: 245px;
  386. position: absolute;
  387. left: 50%;
  388. top: 44px;
  389. background-color: #F1B72C;
  390. }
  391. .controltree-li:nth-child(2n) .second-ul::before{
  392. content: "";
  393. display: inline-block;
  394. width: 75px;
  395. height: 1px;
  396. position: absolute;
  397. left: -75px;
  398. top: 20px;
  399. background-color: #F1B72C;
  400. }
  401. .controltree-li:nth-child(2n+1) .second-ul::before{
  402. content: "";
  403. display: inline-block;
  404. width: 75px;
  405. height: 1px;
  406. position: absolute;
  407. right: -75px;
  408. top: 20px;
  409. background-color: #1E5DA5;
  410. }
  411. .second-ul{
  412. width: 480px;
  413. position: absolute;
  414. top: 0px;
  415. box-shadow: 0 0 5px #0005;
  416. border-radius: 5px;
  417. }
  418. .second-li{
  419. text-align: left;
  420. position: relative;
  421. margin-bottom: 10px;
  422. }
  423. .controltree-li:nth-child(2n+1) .second-ul{
  424. flex-direction: row-reverse;
  425. color: #1E5DA5;
  426. }
  427. .controltree-li:nth-child(2n+1) .second-ul .second-ul-haed{
  428. background-color: #1E5DA5;
  429. }
  430. .controltree-li:nth-child(2n) .second-ul .second-ul-haed{
  431. background-color: #F1B72C;
  432. }
  433. .second-ul-haed{
  434. display: flex;
  435. justify-content: space-between;
  436. color: #fff;
  437. border-radius: 5px 5px 0px 0px;
  438. }
  439. .second-ul-haed>div{
  440. padding: 10px 0;
  441. }
  442. .second-ul-haed>div:nth-child(1){
  443. width: 30%;
  444. }
  445. .second-ul-haed>div:nth-child(2){
  446. border-left: 1px solid #fff;
  447. border-right:1px solid #fff ;
  448. width: 50%;
  449. }
  450. .second-ul-haed>div:nth-child(3){
  451. width: 20%;
  452. }
  453. /*.controltree-li:nth-child(2n+1) .second-ul .second-li::after{
  454. content: "";
  455. display: inline-block;
  456. width: 24px;
  457. height: 2px;
  458. position: absolute;
  459. left: 21px;
  460. top: 10px;
  461. background-color: #1E5DA5;
  462. }*/
  463. .controltree-li:nth-child(2n) .second-ul{
  464. left: 300px;
  465. color: #F1B72C;
  466. }
  467. .controltree-li:nth-child(2n+1) .second-ul{
  468. right: 300px;
  469. color: #1E5DA5;
  470. }
  471. .controltree-li:nth-child(2n){
  472. background-color: #F1B72C;
  473. color: #fff;
  474. }
  475. .controltree-li:nth-child(2n+1){
  476. background-color: #1E5DA5;
  477. color: #fff;
  478. }
  479. /*.controltree-li:nth-child(2n) .second-ul .second-li::after{
  480. content: "";
  481. display: inline-block;
  482. width: 24px;
  483. height: 2px;
  484. position: absolute;
  485. right: 21px;
  486. top: 10px;
  487. background-color: #F1B72C;
  488. }*/
  489. .second-li span{
  490. display: inline-block;
  491. width: 30%;
  492. color: #555;
  493. font-size: 17px;
  494. font-weight: 600;
  495. margin-bottom: 5px;
  496. }
  497. .li-steps-li{
  498. display: flex;
  499. align-items: center;
  500. color: #8f8383;
  501. }
  502. .li-steps-li>div{
  503. font-size: 13px;
  504. padding: 5px 0;
  505. text-align: center;
  506. height: 100%;
  507. padding: 11px 0;
  508. }
  509. .li-steps-li{
  510. border: 1px solid #f7f7f7;
  511. }
  512. .li-steps-li:not(:first-child){
  513. border-top: none;
  514. }
  515. .li-steps-li>div:not(:first-child){
  516. border-left:1px solid #f7f7f7 ;
  517. }
  518. .li-steps-li>div:nth-child(1){
  519. width: 30%;
  520. }
  521. .li-steps-li>div:nth-child(2){
  522. width: 50%;
  523. }
  524. .li-steps-li>div:nth-child(3){
  525. width: 20%;
  526. }
  527. .zanwu{
  528. font-size: 12px;
  529. color: #8f8383;
  530. width: 30%;
  531. text-align: center;
  532. padding: 5px;
  533. }
  534. </style>