graphDataStatistics.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>知识图谱系统</title>
  7. <!-- <link rel="stylesheet" href="./elementUI/theme-chalk/index.css"> -->
  8. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  9. <style>
  10. /*vue未加载好使隐藏页面*/
  11. </style>
  12. </head>
  13. <body>
  14. <div id="app" v-cloak>
  15. <header>
  16. <div v-for="item in countInfo.infos" class="label-item" v-show="item['name'] !== '实体属性'">
  17. <div class="label-category">
  18. {{ item["name"] }}
  19. </div>
  20. <div class="label-count">{{ item["num"] }}</div>
  21. </div>
  22. </header>
  23. <main>
  24. <el-table :data="tableData" border style="width: 100%" show-summary :max-height="MAX_TABLE_HEIGHT">
  25. <el-table-column type="index" :index="(currentPage-1)*selectPageSize+1" align="center" label="序号"
  26. width="100"></el-table-column>
  27. <el-table-column prop="nodeType" align="center" label="实体类型"></el-table-column>
  28. <el-table-column align="center" prop="nodeNum" sortable label="实体数量"></el-table-column>
  29. <el-table-column prop="relationType" align="center" sortable label="相关关系类型"></el-table-column>
  30. <el-table-column prop="relationNum" align="center" sortable label="相关关系数量"></el-table-column>
  31. </el-table>
  32. </main>
  33. <footer>
  34. <div class="pagination" v-if="total>10">
  35. <el-pagination background layout="total,sizes,prev, pager, next, jumper, ->" :total="total"
  36. @size-change="handleSizeChange" @current-change="handleCurrentChang"
  37. :page-sizes="[10, 20, 30, 40, 50, 100]"></el-pagination>
  38. </div>
  39. </footer>
  40. </div>
  41. </body>
  42. <!-- 引入 Vue -->
  43. <script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
  44. <!-- 引入 Element UI -->
  45. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  46. <script>
  47. new Vue({
  48. el: '#app',
  49. data: {
  50. countInfo: {
  51. infos: []
  52. },
  53. tableData: [],
  54. currentPage: 1,
  55. selectPageSize: 10,
  56. MAX_TABLE_HEIGHT: 500,
  57. total: 0
  58. },
  59. methods: {
  60. handleSizeChange(newSize) {
  61. this.selectPageSize = newSize;
  62. },
  63. handleCurrentChang(newPage) {
  64. this.currentPage = newPage;
  65. }
  66. }
  67. });
  68. </script>
  69. </html>