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.

147 lines
3.5 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
  1. <template>
  2. <section>
  3. <el-dialog title="xxxxxxxxxxxxx" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
  4. <div>
  5. <div class="main" id="main"
  6. style="width:600px;height:400px;margin:0 auto;"></div>
  7. <div class="progress"></div>
  8. </div>
  9. </el-dialog>
  10. </section>
  11. </template>
  12. <script>
  13. import util from '@/common/js/util';//全局公共库
  14. import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询
  15. import { mapGetters } from 'vuex'
  16. import { listXmIterationStateHis } from '@/api/xm/core/xmIterationState';
  17. export default {
  18. components: {
  19. },
  20. props:['xmProduct','xmIteration','xmProject'],
  21. computed: {
  22. ...mapGetters([
  23. 'userInfo','roles'
  24. ]),
  25. },
  26. watch: {
  27. xmIterationStateHisList(){
  28. this.charts();
  29. }
  30. },
  31. data() {
  32. return {
  33. filters:{
  34. category:'',
  35. product:null,
  36. iteration:null,
  37. project:null,
  38. },
  39. dicts:{},//下拉选择框的所有静态数据 params=[{categoryId:'0001',itemCode:'sex'}] 返回结果 {'sex':[{optionValue:'1',optionName:'男',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'女',seqOrder:'2',fp:'',isDefault:'0'}]}
  40. load:{ list: false, edit: false, del: false, add: false },//查询中...
  41. dateRanger:[],
  42. maxTableHeight:300,
  43. visible:false,
  44. xmIterationStateHisList:[],
  45. }//end return
  46. },//end data
  47. methods: {
  48. listXmIterationStateHis(){
  49. listXmIterationStateHis({}).then(res=>{
  50. this.xmIterationStateHisList=res.data.tips.isOk?res.data.data:this.xmIterationStateHisList;
  51. })
  52. },
  53. open(params){
  54. this.visible=true;
  55. this.filters.product=params.xmProduct
  56. this.filters.project=params.xmProject
  57. this.filters.iteration=params.xmIteration
  58. this.$nextTick(()=>{
  59. this.listXmIterationStateHis();
  60. })
  61. },
  62. charts() {
  63. this.myChart = this.$echarts.init(document.getElementById("main"));
  64. this.myChart.setOption({
  65. title: {
  66. text: '燃尽图:',
  67. },
  68. tooltip: {
  69. trigger: 'axis'
  70. },
  71. legend: {
  72. right: 40,
  73. data: ['剩余工作量', '任务量']
  74. },
  75. xAxis: {
  76. type: 'category',
  77. boundaryGap: false,
  78. splitLine: {
  79. show: false
  80. },
  81. data: ['迭代一', '迭代二', '迭代三', '迭代四', '迭代五']
  82. },
  83. yAxis: {},
  84. series: [
  85. {
  86. name: '剩余工作量',
  87. type: 'line',
  88. // stack: '剩余工作量',
  89. data: [5, 4.6, 3.9, 2.7, 0.2],
  90. itemStyle: {
  91. normal: {
  92. // 折点颜色样式
  93. color: 'green',
  94. lineStyle: {
  95. // 折线颜色样式
  96. color: 'green'
  97. }
  98. }
  99. },
  100. // data: this.opinionData,
  101. },
  102. {
  103. name: '任务量',
  104. type: 'line',
  105. data: [5, 4, 3, 2, 0],
  106. itemStyle: {
  107. normal: {
  108. // 折点颜色样式
  109. color: 'orange',
  110. lineStyle: {
  111. // 折线颜色样式
  112. color: 'orange'
  113. }
  114. }
  115. },
  116. },
  117. ]
  118. })
  119. }
  120. },//end method
  121. mounted() {
  122. /**
  123. initSimpleDicts('all',['demandSource','demandLvl','demandType','priority','menuStatus'] ).then(res=>{
  124. this.dicts=res.data.data;
  125. })
  126. */
  127. //this.charts();
  128. }//end mounted
  129. }
  130. </script>
  131. <style scoped>
  132. .image {
  133. width: 100%;
  134. display: block;
  135. }
  136. </style>