hydro-graph 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -3
- package/src/App.vue +0 -103
- package/src/HydroGraph.vue +0 -2586
- package/src/api/index.js +0 -9
- package/src/assets/images/copy.png +0 -0
- package/src/assets/images/exportPng.png +0 -0
- package/src/assets/images/restore.png +0 -0
- package/src/index.js +0 -4
- package/src/index.scss +0 -86
- package/src/main.js +0 -6
- package/src/utils/ruoyi.js +0 -228
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hydro-graph",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A Vue 3 component for hydrograph visualization using ECharts",
|
|
5
5
|
"main": "dist/hydro-graph.umd.js",
|
|
6
6
|
"module": "dist/hydro-graph.es.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
"src"
|
|
9
|
+
"dist"
|
|
11
10
|
],
|
|
12
11
|
"scripts": {
|
|
13
12
|
"build": "vite build",
|
package/src/App.vue
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="app">
|
|
3
|
-
<h1>HydroGraph 组件测试</h1>
|
|
4
|
-
<div class="chart-container">
|
|
5
|
-
<HydroGraph
|
|
6
|
-
:chartOption="chartOption"
|
|
7
|
-
:legendList="legendList"
|
|
8
|
-
width="100%"
|
|
9
|
-
height="500px"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script setup>
|
|
16
|
-
import HydroGraph from './HydroGraph.vue'
|
|
17
|
-
|
|
18
|
-
const chartOption = {
|
|
19
|
-
title: '水位流量关系图',
|
|
20
|
-
xAxis: [
|
|
21
|
-
{
|
|
22
|
-
type: 'time',
|
|
23
|
-
name: '时间',
|
|
24
|
-
gridIndex: 0
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
yAxis: [
|
|
28
|
-
{
|
|
29
|
-
type: 'value',
|
|
30
|
-
name: '水位 (m)',
|
|
31
|
-
gridIndex: 0,
|
|
32
|
-
position: 'left'
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
type: 'value',
|
|
36
|
-
name: '流量 (m³/s)',
|
|
37
|
-
gridIndex: 0,
|
|
38
|
-
position: 'right'
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
series: [
|
|
42
|
-
{
|
|
43
|
-
name: '实测水位',
|
|
44
|
-
type: 'line',
|
|
45
|
-
yAxisIndex: 0,
|
|
46
|
-
data: [
|
|
47
|
-
['2024-01-01 00:00', 10.2],
|
|
48
|
-
['2024-01-01 01:00', 10.5],
|
|
49
|
-
['2024-01-01 02:00', 10.8],
|
|
50
|
-
['2024-01-01 03:00', 11.0],
|
|
51
|
-
['2024-01-01 04:00', 11.2],
|
|
52
|
-
['2024-01-01 05:00', 11.5],
|
|
53
|
-
['2024-01-01 06:00', 11.8],
|
|
54
|
-
['2024-01-01 07:00', 12.0]
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: '流量',
|
|
59
|
-
type: 'bar',
|
|
60
|
-
yAxisIndex: 1,
|
|
61
|
-
data: [
|
|
62
|
-
['2024-01-01 00:00', 120],
|
|
63
|
-
['2024-01-01 01:00', 150],
|
|
64
|
-
['2024-01-01 02:00', 180],
|
|
65
|
-
['2024-01-01 03:00', 200],
|
|
66
|
-
['2024-01-01 04:00', 220],
|
|
67
|
-
['2024-01-01 05:00', 250],
|
|
68
|
-
['2024-01-01 06:00', 280],
|
|
69
|
-
['2024-01-01 07:00', 300]
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const legendList = [
|
|
76
|
-
{
|
|
77
|
-
name: '实测水位',
|
|
78
|
-
isSelected: true
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: '流量',
|
|
82
|
-
isSelected: true
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
</script>
|
|
86
|
-
|
|
87
|
-
<style>
|
|
88
|
-
.app {
|
|
89
|
-
width: 100%;
|
|
90
|
-
max-width: 1200px;
|
|
91
|
-
margin: 0 auto;
|
|
92
|
-
padding: 20px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.chart-container {
|
|
96
|
-
width: 100%;
|
|
97
|
-
height: 500px;
|
|
98
|
-
margin-top: 20px;
|
|
99
|
-
border: 1px solid #e0e0e0;
|
|
100
|
-
border-radius: 4px;
|
|
101
|
-
padding: 20px;
|
|
102
|
-
}
|
|
103
|
-
</style>
|