About.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <div class="about">
  3. <template v-if="false">
  4. <h1 @click="showDialog">This is an about page</h1>
  5. <HealthReport
  6. :show="show"
  7. :params="{ wtId: 'QG01_11', recorddate: '2021-06-19' }"
  8. @closed="
  9. (res) => {
  10. this.show = false;
  11. }
  12. "
  13. />
  14. <div class="fjBox1">
  15. <!-- 风机 SVG 使用方法 -->
  16. <FJ id="fj-1" speed="5s" color="red" width="43px" height="46px" />
  17. <FJ :speed="0.1" color="#1890ff" width="200px" height="210px" />
  18. <FJ id="fj-3" speed="2s" width="80px" height="82px" />
  19. <FJ />
  20. <FJ :speed="1" />
  21. <clock style="display: inline-block" />
  22. </div>
  23. <el-table
  24. :data="tableData"
  25. :span-method="arraySpanMethod"
  26. border
  27. style="width: 100%"
  28. >
  29. <el-table-column prop="name" label="部件"> </el-table-column>
  30. <el-table-column
  31. prop="amount1"
  32. sortable
  33. label="隐患类新"
  34. ></el-table-column>
  35. <el-table-column
  36. prop="amount2"
  37. sortable
  38. label="频次1"
  39. ></el-table-column>
  40. <el-table-column
  41. prop="amount2"
  42. sortable
  43. label="频次2"
  44. ></el-table-column>
  45. <el-table-column
  46. prop="amount2"
  47. sortable
  48. label="频次3"
  49. ></el-table-column>
  50. <el-table-column
  51. prop="amount2"
  52. sortable
  53. label="频次4"
  54. ></el-table-column>
  55. </el-table>
  56. <!-- <list-bar-chart /> -->
  57. </template>
  58. <cesium />
  59. </div>
  60. </template>
  61. <script>
  62. import ListBarChart from "../components/chart/bar/list-bar-chart.vue";
  63. import HealthReport from "@com/other/healthReport/index.vue";
  64. import FJ from "@com/other/fj/index.vue";
  65. import clock from "@com/other/clock/index.vue";
  66. import cesium from "@com/other/cesium/index.vue";
  67. // 导入header.vue文件
  68. export default {
  69. data() {
  70. return {
  71. show: true,
  72. tableData: [],
  73. };
  74. },
  75. components: {
  76. // ListBarChart,
  77. HealthReport,
  78. FJ,
  79. clock,
  80. cesium,
  81. },
  82. created() {
  83. let tableData = [];
  84. let item = {
  85. id: "12987122",
  86. name: "王小虎",
  87. amount1: "234",
  88. amount2: "3.2",
  89. amount3: 10,
  90. };
  91. for (let i = 0; i < 100; i++) {
  92. tableData.push(item);
  93. }
  94. this.tableData = tableData;
  95. },
  96. mounted() {
  97. let thArray = [
  98. [
  99. { field: "name", name: "表1姓名" },
  100. { field: "age", name: "表1年龄" },
  101. { field: "sex", name: "表1性别" },
  102. ],
  103. [
  104. { field: "name", name: "表2姓名" },
  105. { field: "age", name: "表2年龄" },
  106. { field: "sex", name: "表2性别" },
  107. ],
  108. [
  109. { field: "name", name: "表3姓名" },
  110. { field: "age", name: "表3年龄" },
  111. { field: "sex", name: "表3性别" },
  112. ],
  113. ];
  114. let dataArray = [
  115. [
  116. { name: "张三", age: 12, sex: "男" },
  117. { name: "李四", age: 19, sex: "男" },
  118. ],
  119. [
  120. { name: "王五", age: 9, sex: "女" },
  121. { name: "赵六", age: 21, sex: "男" },
  122. ],
  123. [
  124. { name: "吴七", age: 26, sex: "男" },
  125. { name: "沈八", age: 17, sex: "女" },
  126. { name: "刘九", age: 18, sex: "女" },
  127. ],
  128. ];
  129. let sheetNameArray=["这是sheet-1","这是sheet-2","这是sheet-3"]
  130. this.BASE.exportMultiple(thArray, dataArray, sheetNameArray, "单表格多sheet示例");
  131. },
  132. methods: {
  133. showDialog() {
  134. this.show = true;
  135. },
  136. arraySpanMethod({ row, column, rowIndex, columnIndex }) {
  137. if (!rowIndex && !columnIndex) {
  138. return [1, 3];
  139. } else if (rowIndex === 5 && !columnIndex) {
  140. return [10, 1];
  141. }
  142. },
  143. },
  144. };
  145. </script>
  146. <style lang="less" scoped>
  147. .fjBox {
  148. display: flex;
  149. justify-content: start;
  150. align-items: center;
  151. flex-wrap: wrap;
  152. }
  153. </style>