bottomRight.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <div class="txtSize">
  3. <div class="title">
  4. <span>采购返单时长</span>
  5. <!-- <span style="width"></span> -->
  6. <div style="display: flex">
  7. <span style="width: 100px">
  8. <el-select v-model="region" size="mini">
  9. <el-option label="不限部门" value="1"></el-option>
  10. <el-option label="网络部" value="2"></el-option>
  11. </el-select>
  12. </span>
  13. <span style="width: 60px">
  14. <el-select v-model="region1" size="mini">
  15. <el-option label="日" value="1"></el-option>
  16. <el-option label="月" value="2"></el-option>
  17. <el-option label="年" value="3"></el-option>
  18. </el-select>
  19. </span>
  20. <span style="width: 140px">
  21. <el-date-picker
  22. style="width:100%"
  23. size="mini"
  24. :clearable="false"
  25. v-model="region2"
  26. :type="region1 == 1 ? 'date' : region1 == 2 ? 'month' : 'year'"
  27. placeholder="选择日期">
  28. </el-date-picker>
  29. </span>
  30. </div>
  31. </div>
  32. <div class="dv">
  33. <p style="font-size: 12px">平均时长(分钟)</p>
  34. <dv-decoration-9>10</dv-decoration-9>
  35. </div>
  36. <!-- <div id="bottomRight" style="width: auto; height: 400px"></div> -->
  37. <Echart
  38. :options="options"
  39. id="bottomRight"
  40. height="400px"
  41. width="100%"
  42. ></Echart>
  43. </div>
  44. </template>
  45. <script>
  46. import Echart from "@/common/echart";
  47. export default {
  48. components: {
  49. Echart,
  50. },
  51. props: {
  52. cdata: {
  53. type: Object,
  54. default: () => ({}),
  55. },
  56. },
  57. data() {
  58. return {
  59. region: "1",
  60. region1: "1",
  61. region2: "1",
  62. options: {
  63. label: {
  64. show: true,
  65. position: 'inside'
  66. },
  67. legend: {},
  68. tooltip: {},
  69. dataset: {
  70. source: [
  71. ['product', '返单商品数', '中标商品数'],
  72. ['1小时以内', 43.3, 85.8],
  73. ['1-2小时', 83.1, 73.4],
  74. ['2-4小时', 86.4, 65.2],
  75. ['4-24小时', 72.4, 53.9],
  76. ['24小时以上', 72.4, 53.9]
  77. ]
  78. },
  79. xAxis: { type: 'category' },
  80. yAxis: {},
  81. // Declare several bar series, each will be mapped
  82. // to a column of dataset.source by default.
  83. series: [{ type: 'bar' }, { type: 'bar' }]
  84. },
  85. };
  86. },
  87. mounted() {
  88. // this.cinit();
  89. },
  90. methods: {
  91. cinit() {
  92. this.$echarts
  93. .init(document.getElementById("bottomRight"))
  94. .setOption(this.options);
  95. },
  96. },
  97. };
  98. </script>
  99. <style lang="scss" scoped>
  100. .txtSize {
  101. // font-size: 0px;
  102. position: relative;
  103. }
  104. .title {
  105. font-size: 18px;
  106. margin: 20px 0;
  107. display: flex;
  108. justify-content: space-between;
  109. align-items: center;
  110. }
  111. .dv{
  112. width: 100px;
  113. height: 100px;
  114. position: absolute;
  115. z-index: 99;
  116. left: -86px;
  117. }
  118. .dv>p{
  119. text-align: center;
  120. padding-bottom: 5px;
  121. }
  122. </style>