About.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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="部件" />
  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. <!-- <currentScatterChart
  60. width="100%"
  61. height="600px"
  62. chartTitle="可框选折线散点图"
  63. :xAxisData="xAxisData"
  64. :yAxisData="{ splitLine: { show: false } }"
  65. :seriesData="seriesData"
  66. :showLegend="true"
  67. :brushSelected="true"
  68. @getSelected="getSelected"
  69. /> -->
  70. </div>
  71. </template>
  72. <script>
  73. import ListBarChart from "../components/chart/bar/list-bar-chart.vue";
  74. import HealthReport from "@com/other/healthReport/index.vue";
  75. import FJ from "@com/other/fj/index.vue";
  76. import clock from "@com/other/clock/index.vue";
  77. import cesium from "@com/other/cesium/index.vue";
  78. import * as echarts from "echarts";
  79. import util from "@/helper/util.js";
  80. import currentScatterChart from "../components/chart/scatter/current-scatter-chart.vue";
  81. import partten from "@/helper/partten.js";
  82. // 导入header.vue文件
  83. export default {
  84. data() {
  85. return {
  86. show: true,
  87. tableData: [],
  88. xAxisData: [],
  89. seriesData: [],
  90. };
  91. },
  92. components: {
  93. // ListBarChart,
  94. HealthReport,
  95. FJ,
  96. clock,
  97. cesium,
  98. currentScatterChart,
  99. },
  100. created() {
  101. let tableData = [];
  102. let item = {
  103. id: "12987122",
  104. name: "王小虎",
  105. amount1: "234",
  106. amount2: "3.2",
  107. amount3: 10,
  108. };
  109. for (let i = 0; i < 100; i++) {
  110. tableData.push(item);
  111. }
  112. this.tableData = tableData;
  113. },
  114. mounted() {
  115. const that = this;
  116. that.API.requestData({
  117. method: "POST",
  118. baseURL: "http://192.168.1.18:9002/",
  119. subUrl: "scatter/list",
  120. data: {
  121. station: "NSS_FDC",
  122. wtId: "NG01_01",
  123. time: "2022-02",
  124. },
  125. success(res) {
  126. let sjgl = [];
  127. let zygl = [];
  128. let xAxisData = [];
  129. res.data.lineactual.forEach((ele, index) => {
  130. sjgl.push(ele[1]);
  131. xAxisData.push(index);
  132. });
  133. res.data.lineoptimal.forEach((ele) => {
  134. zygl.push(ele[1]);
  135. });
  136. that.seriesData = [
  137. {
  138. name: "风速功率",
  139. type: "effectScatter",
  140. showEffectOn: "emphasis",
  141. symbolSize: 5,
  142. data: res.data.scatter || [
  143. [174.0, 65.6],
  144. [175.3, 71.8],
  145. [193.5, 80.7],
  146. [186.5, 72.6],
  147. [187.2, 78.8],
  148. [181.5, 74.8],
  149. [184.0, 86.4],
  150. [184.5, 78.4],
  151. [175.0, 62.0],
  152. [184.0, 81.6],
  153. [180.0, 76.6],
  154. [177.8, 83.6],
  155. [192.0, 90.0],
  156. [176.0, 74.6],
  157. [174.0, 71.0],
  158. [184.0, 79.6],
  159. [192.7, 93.8],
  160. [171.5, 70.0],
  161. [173.0, 72.4],
  162. [176.0, 85.9],
  163. [176.0, 78.8],
  164. [180.5, 77.8],
  165. ],
  166. xAxisIndex: 1,
  167. },
  168. {
  169. name: "实际功率",
  170. type: "line",
  171. symbol: "circle", //设定为实心点
  172. symbolSize: 0, //设定实心点的大小
  173. smooth: true, //这个是把线变成曲线
  174. data: sjgl || [
  175. 10, 20, 30, 40, 30, 20, 50, 80, 50, 80, 50, 80, 60, 40, 20, 40,
  176. 60, 80, 60, 40, 20,
  177. ],
  178. itemStyle: {
  179. normal: {
  180. color: "#05bb4c",
  181. lineStyle: {
  182. color: "#05bb4c",
  183. },
  184. },
  185. },
  186. xAxisIndex: 0,
  187. },
  188. {
  189. name: "最优功率",
  190. type: "line",
  191. symbol: "circle", //设定为实心点
  192. symbolSize: 0, //设定实心点的大小
  193. smooth: true, //这个是把线变成曲线
  194. data: zygl || [
  195. 0, 10, 20, 30, 40, 50, 60, 70, 80, 80, 80, 80, 90, 90, 90, 95, 95,
  196. 100, 100, 100, 100,
  197. ],
  198. itemStyle: {
  199. normal: {
  200. color: "#f8de5b",
  201. lineStyle: {
  202. color: "#f8de5b",
  203. },
  204. },
  205. },
  206. xAxisIndex: 0,
  207. },
  208. ];
  209. that.xAxisData = xAxisData;
  210. },
  211. });
  212. return;
  213. let thArray = [
  214. [
  215. { field: "name", name: "表1姓名" },
  216. { field: "age", name: "表1年龄" },
  217. { field: "sex", name: "表1性别" },
  218. ],
  219. [
  220. { field: "name", name: "表2姓名" },
  221. { field: "age", name: "表2年龄" },
  222. { field: "sex", name: "表2性别" },
  223. ],
  224. [
  225. { field: "name", name: "表3姓名" },
  226. { field: "age", name: "表3年龄" },
  227. { field: "sex", name: "表3性别" },
  228. ],
  229. ];
  230. let dataArray = [
  231. [
  232. { name: "张三", age: 12, sex: "男" },
  233. { name: "李四", age: 19, sex: "男" },
  234. ],
  235. [
  236. { name: "王五", age: 9, sex: "女" },
  237. { name: "赵六", age: 21, sex: "男" },
  238. ],
  239. [
  240. { name: "吴七", age: 26, sex: "男" },
  241. { name: "沈八", age: 17, sex: "女" },
  242. { name: "刘九", age: 18, sex: "女" },
  243. ],
  244. ];
  245. let sheetNameArray = ["这是sheet-1", "这是sheet-2", "这是sheet-3"];
  246. // this.BASE.exportMultiple(thArray, dataArray, sheetNameArray, "单表格多sheet示例");
  247. },
  248. methods: {
  249. showDialog() {
  250. this.show = true;
  251. },
  252. arraySpanMethod({ row, column, rowIndex, columnIndex }) {
  253. if (!rowIndex && !columnIndex) {
  254. return [1, 3];
  255. } else if (rowIndex === 5 && !columnIndex) {
  256. return [10, 1];
  257. }
  258. },
  259. getSelected(res) {
  260. const seriesIndex = res[0]?.selected[0]?.seriesIndex;
  261. const selected = res[0]?.selected[0]?.dataIndex;
  262. selected?.forEach((seleIndex, timmerIndex) => {
  263. setTimeout(() => {
  264. const item = this.seriesData[seriesIndex].data[seleIndex];
  265. this.BASE.showMsg({
  266. type: "success",
  267. msg: `${item[0]}米风速时功率为:${item[1]}KW`,
  268. });
  269. }, timmerIndex * 50);
  270. });
  271. },
  272. },
  273. };
  274. </script>
  275. <style lang="less" scoped>
  276. .fjBox {
  277. display: flex;
  278. justify-content: start;
  279. align-items: center;
  280. flex-wrap: wrap;
  281. }
  282. </style>