You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1120 lines
29 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <section class="page-container">
  3. <div class="page-main">
  4. <div class="row_1">
  5. <div class="r r1">
  6. <span style="color: #4779F6">{{xmBranchState.projectCnt || 0}}</span>
  7. <p>项目数</p>
  8. </div>
  9. <div class="r r2">
  10. <span style="color: #4779F6">{{xmBranchState.budgetWorkload || 0}}</span>
  11. <p>项目总工时</p>
  12. </div>
  13. <div class="r r3">
  14. <span style="color: #F6AE47">{{xmBranchState.productCnt || 0}}</span>
  15. <p>产品数</p>
  16. </div>
  17. <div class="r r4">
  18. <span style="color: #F6AE47">{{xmBranchState.productBudgetWorkload || 0}}</span>
  19. <p>产品总工时</p>
  20. </div>
  21. <div class="r r5">
  22. <span style="color: #47CBF6">{{xmBranchState.phaseCnt || 0}}</span>
  23. <p>计划数</p>
  24. </div>
  25. <div class="r r6">
  26. <span style="color: #47CBF6">{{xmBranchState.iterationCnt || 0}}</span>
  27. <p>迭代数</p>
  28. </div>
  29. <div class="r r7">
  30. <span style="color: #F68D47">{{xmBranchState.totalStaffCnt || 0}}</span>
  31. <p>总人数</p>
  32. </div>
  33. <div class="r r8">
  34. <span style="color: #7D7D7D">{{xmBranchState.taskCnt || 0}}</span>
  35. <p>任务数</p>
  36. </div>
  37. <div class="r r9">
  38. <span style="color: #7D7D7D">{{xmBranchState.menuCnt || 0}}</span>
  39. <p>需求数</p>
  40. </div>
  41. </div>
  42. <div class="row_2">
  43. <div class="r1">
  44. <p class="r_text">项目进度</p>
  45. <div class="message">
  46. <div>
  47. <span>{{this.xmBranchState.estimateWorkload || 0}}h</span>
  48. <p>预估工时</p>
  49. </div>
  50. <div>
  51. <span>{{this.xmBranchState.actWorkload || 0}}h</span>
  52. <p>登记工时</p>
  53. </div>
  54. <div>
  55. <span>{{workloadProgress || 0}}%</span>
  56. <p>工时进度</p>
  57. </div>
  58. <div>
  59. <span>{{remainWorkload || 0}}h</span>
  60. <p>剩余工时</p>
  61. </div>
  62. <div>
  63. <span>{{deviation || 0}}h</span>
  64. <p>预估偏差</p>
  65. </div>
  66. <div>
  67. <span>{{deviationRate || 0}}%</span>
  68. <p>预估偏差率</p>
  69. </div>
  70. </div>
  71. <div style="padding: 0 40px">
  72. <el-divider></el-divider>
  73. </div>
  74. <div class="chart">
  75. <div class="desc">
  76. <span>项目预计进度</span>
  77. <span>项目实际进度</span>
  78. </div>
  79. <div class="process">
  80. <el-progress class="pc" :stroke-width="14" :percentage="planProgress"></el-progress>
  81. <el-progress class="pc" :stroke-width="14" color="#47CBF6" :percentage="realProgress"></el-progress>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="r2">
  86. <p class="r_text">工作量分布</p>
  87. <div class="chart">
  88. <div id="workloadDistribution" :style="{width: '100%', height: '250px'}"></div>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="row_3">
  93. <div class="r1">
  94. <p class="r_text">任务每日状态趋势</p>
  95. <div class="chart">
  96. <div id="taskChart" :style="{width: '100%', height: '320px'}"></div>
  97. </div>
  98. </div>
  99. <div class="r2">
  100. <p class="r_text">工作项数量分布</p>
  101. <div class="chart">
  102. <div id="allChart" :style="{width: '100%', height: '320px'}"></div>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="row_4">
  107. <div class="r4_1">
  108. <p class="r_text">总预算情况</p>
  109. <div class="chart">
  110. <div id="planTotalCostPie" :style="{width: '100%', height: '410px'}"></div>
  111. </div>
  112. </div>
  113. <div class="r4_2">
  114. <p class="r_text">总缺陷情况</p>
  115. <div class="chart">
  116. <div id="bugPieChart" :style="{width: '100%', height: '410px'}"></div>
  117. </div>
  118. </div>
  119. <div class="r4_3">
  120. <p class="r_text">所含产品和迭代情况</p>
  121. <div class="chart">
  122. <div id="iterationAndProduct" :style="{width: '100%', height: '320px'}"></div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </section>
  128. </template>
  129. <script>
  130. import util from "@/common/js/util"; // 全局公共库
  131. import { mapGetters } from "vuex";
  132. import { listOption } from '@/api/mdp/meta/itemOption';//下拉框数据查询
  133. import { listXmBranchState,loadProjectStateToXmBranchState } from '@/api/xm/core/xmBranchState';
  134. import Guider from '@/components/Guider/Index.js';
  135. export default {
  136. computed: {
  137. ...mapGetters(["userInfo"]),
  138. finish: function (){
  139. return this.xmBranchState.taskFinishCnt;
  140. },
  141. notStart: function() {
  142. return this.xmBranchState.taskCnt-this.xmBranchState.taskFinishCnt;
  143. },
  144. totalTask: function() {
  145. return this.xmBranchState.taskCnt;
  146. },
  147. taskProgress: function (){
  148. return this.xmBranchState.finishRate;
  149. },
  150. taskStartTime: function (){
  151. return this.xmBranchState.startTime.substring(0,10);
  152. },
  153. taskEndTime: function (){
  154. return this.xmBranchState.endTime.substring(0,10);
  155. },
  156. taskMng: function (){
  157. return this.xmBranchState.createUsername;
  158. },
  159. workloadProgress:function (){
  160. if(!this.xmBranchState.budgetWorkload){
  161. return 0;
  162. }
  163. if(this.xmBranchState.actWorkload < this.xmBranchState.budgetWorkload){
  164. return Math.round(this.xmBranchState.actWorkload/this.xmBranchState.budgetWorkload*100)
  165. }else{
  166. return 100;
  167. }
  168. },
  169. deviation:function (){
  170. return Math.round(this.xmBranchState.actWorkload-this.xmBranchState.estimateWorkload);
  171. },
  172. deviationRate:function (){
  173. return Math.round((this.xmBranchState.actWorkload-this.xmBranchState.estimateWorkload)/this.xmBranchState.estimateWorkload*100);
  174. },
  175. remainWorkload:function (){
  176. return this.xmBranchState.budgetWorkload - this.xmBranchState.actWorkload;
  177. },
  178. planProgress:function (){
  179. if(!this.xmBranchState.budgetWorkload){
  180. return 0;
  181. }
  182. return Math.round( this.xmBranchState.estimateWorkload/this.xmBranchState.budgetWorkload*100)
  183. },
  184. realProgress:function (){
  185. if(!this.xmBranchState.budgetWorkload){
  186. return 0;
  187. }
  188. if(this.xmBranchState.actWorkload < this.xmBranchState.budgetWorkload){
  189. return Math.round(this.xmBranchState.actWorkload/this.xmBranchState.budgetWorkload*100)
  190. }else{
  191. return 100;
  192. }
  193. },
  194. xmBranchStateCpd(){
  195. return this.xmBranchState
  196. },
  197. },
  198. watch:{
  199. xmBranchStateCpd:function(){
  200. this.drawWorkload();
  201. this.drawTaskByDate();
  202. this.drawAllBar();
  203. this.drawCostPie();
  204. this.drawPieBug();
  205. this.drawIterationProduct();
  206. }
  207. },
  208. data() {
  209. return {
  210. isActive: true,
  211. xmBranchState:{},
  212. maxTableHeight:300,
  213. // options: getDefOptions(),//下拉选择框的所有静态数据 params=[{categoryId:'0001',itemCode:'sex'}] 返回结果 {'sex':[{optionValue:'1',optionName:'男',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'女',seqOrder:'2',fp:'',isDefault:'0'}]}
  214. };
  215. },
  216. methods:{
  217. drawAllBar() {
  218. // 基于准备好的dom,初始化echarts实例
  219. let allChart = this.$echarts.init(document.getElementById("allChart"));
  220. let option = {
  221. color:['#A3BCFA', '#A3BCFA', '#A3BCFA'],
  222. grid: {
  223. left: '3%',
  224. right: '4%',
  225. bottom: '3%',
  226. containLabel: true
  227. },
  228. yAxis: {
  229. type: 'value',
  230. axisLine: {
  231. show: false
  232. },
  233. axisTick: {
  234. show: false
  235. },
  236. },
  237. xAxis: {
  238. type: 'category',
  239. boundaryGap: false,
  240. data: ['需求', '任务', '缺陷'],
  241. },
  242. series: [
  243. {
  244. name: '需求',
  245. type: 'line',
  246. stack: 'Total',
  247. emphasis: {
  248. focus: 'series'
  249. },
  250. data: [this.xmBranchState.menuCnt],
  251. markPoint: {
  252. data: [{
  253. type: 'max',
  254. name: 'max'
  255. }],
  256. }
  257. },
  258. {
  259. name: '任务',
  260. type: 'line',
  261. stack: 'Total',
  262. emphasis: {
  263. focus: 'series'
  264. },
  265. data: [0, this.xmBranchState.taskCnt],
  266. markPoint: {
  267. data: [{
  268. type: 'max',
  269. name: 'max'
  270. }],
  271. },
  272. },
  273. {
  274. name: '缺陷',
  275. type: 'line',
  276. stack: 'Total',
  277. emphasis: {
  278. focus: 'series'
  279. },
  280. data: [0, 0, this.xmBranchState.bugCnt],
  281. markPoint: {
  282. data: [{
  283. type: 'max',
  284. name: 'max'
  285. }],
  286. },
  287. }
  288. ]
  289. };
  290. // 绘制图表
  291. allChart.setOption(option);
  292. },
  293. drawTaskByDate() {
  294. let taskChart = this.$echarts.init(document.getElementById("taskChart"));
  295. let option = {
  296. tooltip: {
  297. trigger: 'axis'
  298. },
  299. color:['#76AEF7', '#A8E5FA'],
  300. legend: {
  301. data: ['未开始', '进行中']
  302. },
  303. grid: {
  304. left: '1%',
  305. right: '3%',
  306. bottom: '5%',
  307. containLabel: true
  308. },
  309. xAxis: {
  310. type: 'category',
  311. boundaryGap: false,
  312. data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
  313. splitLine: {
  314. show: true,
  315. lineStyle: {
  316. color: 'rgba(0, 0, 0, .05)'
  317. }
  318. },
  319. axisLine: {
  320. lineStyle: {
  321. color: 'rgba(0, 0, 0, .1)'
  322. }
  323. },
  324. axisTick: {
  325. lineStyle: {
  326. color: 'rgba(0, 0, 0, .1)'
  327. }
  328. },
  329. axisLabel: {
  330. color: '#555'
  331. }
  332. },
  333. yAxis: {
  334. type: 'value',
  335. boundaryGap: false,
  336. axisLine: {
  337. show: false
  338. },
  339. axisTick: {
  340. show: false
  341. },
  342. splitLine: {
  343. lineStyle: {
  344. color: 'rgba(0, 0, 0, .05)'
  345. }
  346. }
  347. },
  348. series: [
  349. {
  350. name: '未开始',
  351. type: 'line',
  352. smooth: true,
  353. data: [120, 132, 101, 134, 90, 230, 210],
  354. areaStyle: {},
  355. label: {
  356. show: true,
  357. position: 'right',
  358. color: '#888',
  359. formatter: ({
  360. data
  361. }) => data == 0 ? '' : `${data}`
  362. },
  363. markPoint: {
  364. data: [
  365. {
  366. type: 'min',
  367. name: 'min'
  368. },
  369. {
  370. type: 'max',
  371. name: 'max'
  372. }
  373. ],
  374. },
  375. areaStyle: {
  376. normal: {
  377. color: {
  378. type: "linear",
  379. x: 0,
  380. y: 0,
  381. x2: 0,
  382. y2: 1,
  383. colorStops: [
  384. {
  385. offset: 0,
  386. color: "rgba(118,174,247,.4)"
  387. },
  388. {
  389. offset: 1,
  390. color: "rgba(118,174,247,0)"
  391. }
  392. ]
  393. }
  394. }
  395. },
  396. },
  397. {
  398. name: '进行中',
  399. type: 'line',
  400. smooth: true,
  401. data: [220, 182, 191, 234, 290, 330, 310],
  402. areaStyle: {
  403. opacity: 0.8,
  404. color: 'rgb(55, 162, 255)'
  405. },
  406. label: {
  407. show: true,
  408. position: 'right',
  409. color: '#888',
  410. formatter: ({
  411. data
  412. }) => data == 0 ? '' : `${data}`
  413. },
  414. markPoint: {
  415. data: [
  416. {
  417. type: 'min',
  418. name: 'min'
  419. },
  420. {
  421. type: 'max',
  422. name: 'max'
  423. }
  424. ],
  425. },
  426. areaStyle: {
  427. normal: {
  428. color: {
  429. type: "linear",
  430. x: 0,
  431. y: 0,
  432. x2: 0,
  433. y2: 1,
  434. colorStops: [
  435. {
  436. offset: 0,
  437. color: "rgba(35,184,210,.2)"
  438. },
  439. {
  440. offset: 1,
  441. color: "rgba(35,184,210,0)"
  442. }
  443. ]
  444. }
  445. }
  446. },
  447. },
  448. ],
  449. };
  450. // 绘制图表
  451. taskChart.setOption(option);
  452. },
  453. drawPieBug() {
  454. let bugPieChart = this.$echarts.init(document.getElementById("bugPieChart"));
  455. let option = {
  456. tooltip: {
  457. trigger: 'item',
  458. formatter: '{b} : {c} ({d}%)'
  459. },
  460. legend: {
  461. orient: 'horizontal',
  462. bottom: '80',
  463. data: ['已关闭', '已解决', '已激活', '已确认'],
  464. itemGap: 30,
  465. },
  466. series: [
  467. {
  468. center:['48%','40%'],//饼图位置
  469. type: 'pie',
  470. radius: '50%',//饼图半径大小
  471. label:{ //饼图图形上的文本标签
  472. normal:{
  473. show:true,
  474. position:'outer', //标签的位置:内部
  475. textStyle : {
  476. fontWeight : 100 ,
  477. fontSize: document.body.clientWidth / 120, //标签字体大小
  478. color: "#000000"
  479. },
  480. formatter:'{b}\n{c}({d}%)',//b:name,c:value,d:占比
  481. alignTo:'edge',
  482. margin:10
  483. }
  484. },
  485. data: [
  486. {value: this.xmBranchState.closedBugs,
  487. itemStyle: {
  488. normal:{
  489. color: '#47CBF6'
  490. }
  491. },
  492. name: '已关闭',
  493. label: {
  494. normal: {
  495. color: '#47CBF6'
  496. }
  497. },
  498. labelLine: {
  499. normal: {
  500. position: "inner",
  501. show: false
  502. }
  503. }
  504. },
  505. {value: this.xmBranchState.resolvedBugs,
  506. itemStyle: {
  507. normal:{
  508. color: '#88B0BA'
  509. }
  510. },
  511. name: '已解决',
  512. label: {
  513. normal: {
  514. color: '#88B0BA'
  515. }
  516. },
  517. labelLine: {
  518. normal: {
  519. position: "inner",
  520. show: false
  521. }
  522. }
  523. },
  524. {value: this.xmBranchState.activeBugs,
  525. itemStyle: {
  526. normal:{
  527. color: '#F6AD48'
  528. }
  529. },
  530. name: '已激活',
  531. label: {
  532. normal: {
  533. color: '#F6AD48'
  534. }
  535. },
  536. labelLine: {
  537. normal: {
  538. position: "inner",
  539. show: false
  540. }
  541. }
  542. },
  543. {value: this.xmBranchState.confirmedBugs,
  544. itemStyle: {
  545. normal:{
  546. color: '#467AF6'
  547. }
  548. },
  549. name: '已确认',
  550. label: {
  551. normal: {
  552. color: '#467AF6'
  553. }
  554. },
  555. labelLine: {
  556. normal: {
  557. position: "inner",
  558. show: false
  559. }
  560. }
  561. },
  562. ],
  563. emphasis: {
  564. itemStyle: {
  565. shadowBlur: 10,
  566. shadowOffsetX: 0,
  567. shadowColor: 'rgba(0, 0, 0, 0.5)'
  568. }
  569. }
  570. }
  571. ]
  572. };
  573. // 绘制图表
  574. bugPieChart.setOption(option);
  575. },
  576. drawCostPie() {
  577. let planTotalCostPie = this.$echarts.init(document.getElementById("planTotalCostPie"));
  578. let option = {
  579. tooltip: {
  580. trigger: 'item',
  581. formatter: '{b} : {c} ({d}%)'
  582. },
  583. legend: {
  584. orient: 'horizontal',
  585. bottom: '80',
  586. data: ['非人力', '内部人力', '外购人力'],
  587. itemGap: 30,
  588. },
  589. series: [
  590. {
  591. center:['48%','40%'],//饼图位置
  592. type: 'pie',
  593. radius: '50%',//饼图半径大小
  594. label:{ //饼图图形上的文本标签
  595. normal:{
  596. show:true,
  597. position:'outer', //标签的位置:外部
  598. textStyle : {
  599. fontWeight : 100 ,
  600. fontSize: document.body.clientWidth / 120, //标签字体大小
  601. color: "#000000"
  602. },
  603. formatter:'{b}\n{c}({d}%)',//b:name,c:value,d:占比
  604. alignTo:'edge',
  605. margin:10
  606. }
  607. },
  608. data: [
  609. {
  610. value: this.xmBranchState.budgetNouserAt,
  611. itemStyle: {
  612. normal:{
  613. color: '#46CBF6'
  614. }
  615. },
  616. name: '非人力',
  617. label: {
  618. normal: {
  619. color: '#46CBF6'
  620. },
  621. },
  622. labelLine: {
  623. normal: {
  624. position: "inner",
  625. show: false
  626. }
  627. }
  628. },
  629. {value: this.xmBranchState.budgetIuserAt,
  630. itemStyle: {
  631. normal:{
  632. color: '#F7AE48'
  633. }
  634. },
  635. name: '内部人力',
  636. label: {
  637. normal: {
  638. color: '#F7AE48'
  639. },
  640. },
  641. labelLine: {
  642. normal: {
  643. position: "inner",
  644. show: false
  645. }
  646. }
  647. },
  648. {value: this.xmBranchState.budgetOuserAt,
  649. itemStyle: {
  650. normal:{
  651. color: '#4679F6'
  652. }
  653. },
  654. name: '外购人力',
  655. label: {
  656. normal: {
  657. color: '#4679F6'
  658. }
  659. },
  660. labelLine: {
  661. normal: {
  662. position: "inner",
  663. show: false
  664. }
  665. }
  666. },
  667. ],
  668. emphasis: {
  669. itemStyle: {
  670. shadowBlur: 10,
  671. shadowOffsetX: 0,
  672. shadowColor: 'rgba(0, 0, 0, 0.5)'
  673. }
  674. }
  675. }
  676. ]
  677. };
  678. // 绘制图表
  679. planTotalCostPie.setOption(option);
  680. },
  681. drawWorkload() {
  682. let workloadDistribution = this.$echarts.init(document.getElementById("workloadDistribution"));
  683. let that = this;
  684. let option = {
  685. tooltip: {
  686. trigger: 'item',
  687. formatter: '{b} :<br/> {c} ({d}%)'
  688. },
  689. legend: {
  690. orient: 'vertical',
  691. top: '20',
  692. right: '60',
  693. data: ['内部人力', '外购人力'],
  694. itemGap: 30,
  695. textStyle: {
  696. rich: {
  697. name: {
  698. color: '#7D7D7D',
  699. fontWeight: 'bold',
  700. fontSize: 18
  701. },
  702. val: {
  703. fontSize: '14',
  704. color: '#7D7D7D'
  705. },
  706. desc: {
  707. lineHeight: 20,
  708. color: '#7D7D7D'
  709. }
  710. }
  711. },
  712. formatter(params) {
  713. console.log(params);
  714. let total = that.xmBranchState.budgetIuserWorkload + that.xmBranchState.budgetOuserWorkload;
  715. if(params == '内部人力') {
  716. let p = ((that.xmBranchState.budgetIuserWorkload / total) * 100).toFixed(2)
  717. return [
  718. `{name|${that.xmBranchState.budgetIuserWorkload}}/{val|${p}%}`,
  719. `{desc|${params}}`
  720. ].join('\n')
  721. }
  722. if(params == '外购人力') {
  723. let p = ((that.xmBranchState.budgetOuserWorkload / total) * 100).toFixed(2)
  724. return [
  725. `{name|${that.xmBranchState.budgetOuserWorkload}}/{val|${p}%}`,
  726. `{desc|${params}}`
  727. ].join('\n')
  728. }
  729. return params;
  730. },
  731. },
  732. series: [
  733. {
  734. center:['30%','40%'],//饼图位置
  735. type: 'pie',
  736. radius: ['40%', '70%'],//饼图半径大小
  737. label:{ //饼图图形上的文本标签
  738. show: false,
  739. position: 'center'
  740. },
  741. data: [
  742. {
  743. value: this.xmBranchState.budgetIuserWorkload,
  744. itemStyle: {
  745. normal:{
  746. color: '#3AC2ED'
  747. }
  748. },
  749. name: '内部人力',
  750. label: {
  751. normal: {
  752. position: "inner",
  753. show: false
  754. }
  755. },
  756. labelLine: {
  757. normal: {
  758. position: "inner",
  759. show: false
  760. }
  761. }
  762. },
  763. {value: this.xmBranchState.budgetOuserWorkload,
  764. itemStyle: {
  765. normal:{
  766. color: '#4072F5'
  767. }
  768. },
  769. name: '外购人力',
  770. label: {
  771. normal: {
  772. position: "inner",
  773. show: false
  774. }
  775. },
  776. labelLine: {
  777. normal: {
  778. position: "inner",
  779. show: false
  780. }
  781. }
  782. },
  783. ],
  784. }
  785. ]
  786. };
  787. // 绘制图表
  788. workloadDistribution.setOption(option);
  789. },
  790. drawIterationProduct() {
  791. let iterationAndProduct = this.$echarts.init(document.getElementById("iterationAndProduct"));
  792. let option = {
  793. tooltip: {
  794. trigger: 'axis',
  795. formatter: '{b} : {c}',
  796. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  797. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  798. },
  799. },
  800. grid: {
  801. left: '1%',
  802. right: '3%',
  803. bottom: '5%',
  804. containLabel: true
  805. },
  806. xAxis: {
  807. type: 'value',
  808. boundaryGap: [0, 0.01],
  809. splitLine: {
  810. show: true,
  811. lineStyle: {
  812. color: 'rgba(0, 0, 0, .05)'
  813. }
  814. },
  815. axisLine: {
  816. lineStyle: {
  817. color: 'rgba(0, 0, 0, .1)'
  818. }
  819. },
  820. axisTick: {
  821. lineStyle: {
  822. color: 'rgba(0, 0, 0, .1)'
  823. }
  824. },
  825. axisLabel: {
  826. color: '#555'
  827. }
  828. },
  829. yAxis: {
  830. type: 'category',
  831. data: ['产品数', '迭代数'],
  832. splitLine: {
  833. show: true,
  834. lineStyle: {
  835. color: 'rgba(0, 0, 0, .05)'
  836. }
  837. },
  838. axisLine: {
  839. lineStyle: {
  840. color: 'rgba(0, 0, 0, .1)'
  841. }
  842. },
  843. axisTick: {
  844. lineStyle: {
  845. color: 'rgba(0, 0, 0, .1)'
  846. }
  847. },
  848. axisLabel: {
  849. color: '#555'
  850. }
  851. },
  852. series: [{
  853. label: {
  854. normal:{
  855. show: true,
  856. position: 'inside',
  857. color:'#fff',
  858. fontSize: '14'
  859. }
  860. },
  861. data: [this.xmBranchState.productCnt, this.xmBranchState.iterationCnt],
  862. type: 'bar',
  863. showBackground: true,
  864. itemStyle: {
  865. normal:{
  866. color: '#467AF6'
  867. }
  868. },
  869. backgroundStyle: {
  870. color: '#FFFFFF'
  871. }
  872. }]
  873. };
  874. // 绘制图表
  875. iterationAndProduct.setOption(option);
  876. },
  877. searchXmBranchState(callBack){
  878. listXmBranchState({branchId:this.userInfo.branchId}).then(res=>{
  879. var tips=res.data.tips;
  880. if(tips.isOk && res.data.data.length>0){
  881. this.xmBranchState=res.data.data[0]
  882. }
  883. if(callBack){
  884. this.$nextTick(()=>{
  885. callBack();
  886. })
  887. }
  888. });
  889. },
  890. //路由跳转
  891. gotolink(link) {
  892. this.$router.replace(link);
  893. },
  894. /**end 自定义函数请在上面加**/
  895. guiderStart(forceDisplayWhileClosed) { // 初始化引导页
  896. Guider.startByName('xmHomePage',forceDisplayWhileClosed);
  897. },
  898. },
  899. mounted() {
  900. //this.searchXmBranchState( this.guiderStart );
  901. this.searchXmBranchState();
  902. this.drawWorkload();
  903. this.drawTaskByDate();
  904. this.drawAllBar();
  905. this.drawCostPie();
  906. this.drawPieBug();
  907. this.drawIterationProduct();
  908. },
  909. };
  910. </script>
  911. <style scoped lang="scss">
  912. .page-container {
  913. width: 100%;
  914. height: 100%;
  915. background-color: #F4F5F8;
  916. .page-main {
  917. padding: 18px;
  918. overflow: hidden;
  919. h2 {
  920. margin-top: 16px;
  921. font-size: 24px;
  922. color: #7D7D7D;
  923. }
  924. h2:before {
  925. content: " ";
  926. border-left: 10px #AEB8CE solid;
  927. margin-right: 12px;
  928. }
  929. .row_1 {
  930. background-color: #fff;
  931. display: flex;
  932. flex-direction: row;
  933. height: 120px;
  934. margin-top: 10px;
  935. .r {
  936. flex: 1;
  937. display: flex;
  938. flex-direction: column;
  939. justify-content: center;
  940. align-items: center;
  941. span {
  942. margin-bottom: 14px;
  943. font-size: 24px;
  944. font-weight: bold;
  945. }
  946. p {
  947. font-size: 18px;
  948. color: #7D7D7D;
  949. font-weight: bold;
  950. opacity: 0.55;
  951. }
  952. }
  953. }
  954. .row_2 {
  955. height: 354px;
  956. margin-top: 22px;
  957. display: flex;
  958. flex-direction: row;
  959. .r1 {
  960. flex: 2;
  961. background-color: #fff;
  962. margin-right: 20px;
  963. .message {
  964. display: flex;
  965. margin: 0 43px;
  966. div {
  967. flex: 1;
  968. display: flex;
  969. flex-direction: column;
  970. align-items: center;
  971. justify-content: center;
  972. span {
  973. margin-bottom: 8px;
  974. font-weight: bold;
  975. color: #7D7D7D;
  976. }
  977. p {
  978. color: #7D7D7D;
  979. opacity: 0.55;
  980. }
  981. }
  982. }
  983. .chart {
  984. display: flex;
  985. flex-direction: row;
  986. margin: 0 47px 0 47px;
  987. height: 120px;
  988. .desc {
  989. display: flex;
  990. flex-direction: column;
  991. margin-right: 20px;
  992. font-size: 18px;
  993. color: #7D7D7D;
  994. justify-content: center;
  995. span:nth-child(1) {
  996. margin-bottom: 20px;
  997. }
  998. }
  999. .process {
  1000. display: flex;
  1001. flex-direction: column;
  1002. flex: 1;
  1003. justify-content: center;
  1004. .pc:nth-child(1) {
  1005. margin-bottom: 20px;
  1006. }
  1007. }
  1008. .tj {
  1009. display: flex;
  1010. flex: 1;
  1011. justify-content: center;
  1012. align-items: center;
  1013. }
  1014. .chart {
  1015. flex: 1;
  1016. }
  1017. }
  1018. }
  1019. .r2 {
  1020. width: 540px;
  1021. background-color: #fff;
  1022. .r2 {
  1023. width: 100%;
  1024. height: 100%;
  1025. display: flex;
  1026. align-items: center;
  1027. justify-content: center;
  1028. }
  1029. }
  1030. }
  1031. .row_3 {
  1032. height: 450px;
  1033. display: flex;
  1034. flex-direction: row;
  1035. margin-top: 24px;
  1036. .r1 {
  1037. display: flex;
  1038. flex: 1;
  1039. background-color: #fff;
  1040. flex-direction: column;
  1041. margin-right: 20px;
  1042. }
  1043. .r2 {
  1044. flex: 1;
  1045. background-color: #fff;
  1046. display: flex;
  1047. flex-direction: column;
  1048. }
  1049. }
  1050. .row_4 {
  1051. height: 445px;
  1052. display: flex;
  1053. margin-top: 21px;
  1054. .r4_1 {
  1055. flex: 1;
  1056. background-color: #fff;
  1057. margin-right: 25px;
  1058. display: flex;
  1059. flex-direction: column;
  1060. }
  1061. .r4_2 {
  1062. flex: 1;
  1063. background-color: #fff;
  1064. margin-right: 25px;
  1065. display: flex;
  1066. flex-direction: column;
  1067. }
  1068. .r4_3 {
  1069. display: flex;
  1070. flex-direction: column;
  1071. background-color: #fff;
  1072. flex: 1;
  1073. }
  1074. }
  1075. .r_text {
  1076. font-size: 20px;
  1077. color: #7D7D7D;
  1078. margin: 26px 0 50px 28px;
  1079. }
  1080. }
  1081. }
  1082. </style>