album.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <rx-layout>
  3. <div slot="center" style>
  4. <rx-fit>
  5. <div slot="toolheader" border="false" foldbtn="false">
  6. <top-nav title="知识专辑统计" time="2021-10-15 10:00:01"></top-nav>
  7. </div>
  8. <div class="echart-style">
  9. <div style="width:58%;">
  10. <div class="line-style">
  11. <div :style="{'border-bottom' : tabStatus ? '2px solid #1890ff' : 'none'}" @click="handleTabsChange">
  12. 用户访问总量-10000(uv)
  13. </div>
  14. <div :style="{'border-bottom' : !tabStatus ? '2px solid #1890ff' : 'none'}" @click="handleTabsChange">
  15. 专辑创建总量-20000
  16. </div>
  17. </div>
  18. <line-echart :barData="barData"></line-echart>
  19. </div>
  20. <div style="width:40%;">
  21. <div class="album-style">
  22. 专辑页面访问量TOP10
  23. <span>(pv)</span>
  24. </div>
  25. <pie-echart></pie-echart>
  26. </div>
  27. </div>
  28. <div class="bar-style">
  29. <div>各分类专辑及收录知识分布
  30. </div>
  31. <bar-echart></bar-echart>
  32. </div>
  33. <div class="table-style">
  34. <div>
  35. 组织创建和访问专辑数量TOP10
  36. </div>
  37. <rx-grid
  38. style="background: #fff;min-height: 400px;"
  39. :columns="columns"
  40. :url="api.findAllKnowledge"
  41. :queryParam="queryParam"
  42. data-field="result.data"
  43. :heightAuto="true"
  44. :showPage="false"
  45. idField="pkId"
  46. >
  47. </rx-grid>
  48. </div>
  49. </rx-fit>
  50. </div>
  51. </rx-layout>
  52. </template>
  53. <script>
  54. import topNav from './components/topNav'
  55. import lineEchart from './components/LineEchart';
  56. import pieEchart from './components/PieEchart';
  57. import barEchart from './components/BarEchart';
  58. import api from '@/api/knowledge/manage';
  59. export default {
  60. name: 'synthesize',
  61. components: {
  62. topNav,
  63. lineEchart,
  64. pieEchart,
  65. barEchart
  66. },
  67. data() {
  68. return {
  69. api,
  70. tabStatus: true,
  71. barData: [0, 200, 901, 300, 1290, 133,1, 200, 901, 300, 1290, 0],
  72. queryParam: {},
  73. columns: [
  74. {
  75. title: '公司名称',
  76. dataIndex: 'author',
  77. align: 'center',
  78. },
  79. {
  80. title: '专辑创建总量',
  81. dataIndex: 'author',
  82. align: 'center',
  83. sorter: true,
  84. sortField: 'author'
  85. },
  86. {
  87. title: '专辑访问量pv',
  88. dataIndex: 'author',
  89. align: 'center',
  90. sorter: true,
  91. sortField: 'author'
  92. }
  93. ]
  94. }
  95. },
  96. created() {
  97. },
  98. methods: {
  99. handleTabsChange() {
  100. this.tabStatus = !this.tabStatus
  101. }
  102. }
  103. }
  104. </script>
  105. <style lang="less" scoped>
  106. @gary: #f8f8f8;
  107. @white: #fff;
  108. .rx-fit {
  109. padding: 20px 40px!important;
  110. background: @gary;
  111. overflow-y: auto!important;
  112. display: block!important;
  113. .echart-style {
  114. width: 100%;
  115. height: 320px;
  116. display: flex;
  117. justify-content: space-between;
  118. margin: 10px 0 20px;
  119. >div {
  120. background-color: #fff;
  121. position: relative;
  122. display: flex;
  123. align-items: flex-end;
  124. .album-style {
  125. position: absolute;
  126. top: 8%;
  127. left: 4%;
  128. font-weight: bold;
  129. span {
  130. position: absolute;
  131. top: 25%;
  132. font-size: 12px;
  133. font-weight: 400;
  134. margin-left: 8px;
  135. }
  136. }
  137. .line-style {
  138. position: absolute;
  139. top: 8%;
  140. left: 4%;
  141. z-index: 1000;
  142. font-weight: bold;
  143. display:flex;
  144. div {
  145. cursor: pointer;
  146. }
  147. div+div {
  148. margin-left: 20px;
  149. }
  150. }
  151. // >div:last-child {
  152. // position: absolute;
  153. // top: 8%;
  154. // left: 4%;
  155. // font-weight: bold;
  156. // span {
  157. // position: absolute;
  158. // top: 25%;
  159. // font-size: 12px;
  160. // font-weight: 400;
  161. // margin-left: 8px;
  162. // }
  163. // }
  164. }
  165. }
  166. .bar-style {
  167. height: 400px;
  168. background:#fff;
  169. position: relative;
  170. display: flex;
  171. align-items: flex-end;
  172. margin: 10px 0 20px;
  173. >div:first-child {
  174. position: absolute;
  175. top: 8%;
  176. left: 2.3%;
  177. font-weight: bold;
  178. }
  179. }
  180. .table-style {
  181. width: 100%;
  182. background-color: #fff;
  183. margin-top: 20px;
  184. padding: 20px 30px;
  185. >div:first-child {
  186. position: relative;
  187. font-weight: bold;
  188. margin-bottom: 20px;
  189. }
  190. }
  191. }
  192. </style>
  193. <style scoped>
  194. /deep/ .divdefault {
  195. position: inherit!important;
  196. overflow: inherit!important;
  197. }
  198. /deep/ .gridContent{
  199. border: none;
  200. }
  201. /deep/.ant-table-thead > tr > th {
  202. text-align: center;
  203. height: 54px;
  204. }
  205. /deep/ .ant-table-tbody > tr > td {
  206. height: 54px;
  207. }
  208. </style>