Showing
6 changed files
with
0 additions
and
120 deletions
| ... | @@ -38,7 +38,6 @@ | ... | @@ -38,7 +38,6 @@ |
| 38 | "dependencies": { | 38 | "dependencies": { |
| 39 | "axios": "0.21.1", | 39 | "axios": "0.21.1", |
| 40 | "core-js": "3.8.3", | 40 | "core-js": "3.8.3", |
| 41 | - "echarts": "^5.4.3", | ||
| 42 | "element-ui": "2.15.3", | 41 | "element-ui": "2.15.3", |
| 43 | "sortablejs": "^1.15.0", | 42 | "sortablejs": "^1.15.0", |
| 44 | "vue": "2.6.14", | 43 | "vue": "2.6.14", | ... | ... |
src/assets/languages/echarts.js
deleted
100644 → 0
| 1 | -// echarts按需引入 | ||
| 2 | -// 引入 echarts API | ||
| 3 | -import * as echarts from "echarts/core"; | ||
| 4 | -// 引入echarts图表类型 | ||
| 5 | -import { BarChart } from "echarts/charts"; | ||
| 6 | -// 引入echarts图表配置项 | ||
| 7 | -import { | ||
| 8 | - GridComponent, | ||
| 9 | - PolarComponent, | ||
| 10 | - GeoComponent, | ||
| 11 | - SingleAxisComponent, | ||
| 12 | - ParallelComponent, | ||
| 13 | - CalendarComponent, | ||
| 14 | - GraphicComponent, | ||
| 15 | - ToolboxComponent, | ||
| 16 | - TooltipComponent, | ||
| 17 | - AxisPointerComponent, | ||
| 18 | - BrushComponent, | ||
| 19 | - TitleComponent, | ||
| 20 | - TimelineComponent, | ||
| 21 | - MarkPointComponent, | ||
| 22 | - MarkLineComponent, | ||
| 23 | - MarkAreaComponent, | ||
| 24 | - LegendComponent, | ||
| 25 | - DataZoomComponent, | ||
| 26 | - DataZoomInsideComponent, | ||
| 27 | - DataZoomSliderComponent, | ||
| 28 | - VisualMapComponent, | ||
| 29 | - VisualMapContinuousComponent, | ||
| 30 | - VisualMapPiecewiseComponent, | ||
| 31 | - AriaComponent, | ||
| 32 | - DatasetComponent, | ||
| 33 | - TransformComponent, | ||
| 34 | -} from "echarts/components"; | ||
| 35 | -// 引入 Canvas 渲染器渲染 | ||
| 36 | -import { CanvasRenderer } from "echarts/renderers"; | ||
| 37 | -// 将以上引入的组件使用use()方法注册 | ||
| 38 | -echarts.use([ | ||
| 39 | - BarChart, | ||
| 40 | - GridComponent, | ||
| 41 | - PolarComponent, | ||
| 42 | - GeoComponent, | ||
| 43 | - SingleAxisComponent, | ||
| 44 | - ParallelComponent, | ||
| 45 | - CalendarComponent, | ||
| 46 | - GraphicComponent, | ||
| 47 | - ToolboxComponent, | ||
| 48 | - TooltipComponent, | ||
| 49 | - AxisPointerComponent, | ||
| 50 | - BrushComponent, | ||
| 51 | - TitleComponent, | ||
| 52 | - TimelineComponent, | ||
| 53 | - MarkPointComponent, | ||
| 54 | - MarkLineComponent, | ||
| 55 | - MarkAreaComponent, | ||
| 56 | - LegendComponent, | ||
| 57 | - DataZoomComponent, | ||
| 58 | - DataZoomInsideComponent, | ||
| 59 | - DataZoomSliderComponent, | ||
| 60 | - VisualMapComponent, | ||
| 61 | - VisualMapContinuousComponent, | ||
| 62 | - VisualMapPiecewiseComponent, | ||
| 63 | - AriaComponent, | ||
| 64 | - DatasetComponent, | ||
| 65 | - TransformComponent, | ||
| 66 | - CanvasRenderer, | ||
| 67 | -]); | ||
| 68 | -export default echarts; |
| 1 | -<template> | ||
| 2 | - <div ref="barEcharts" class="yl-echarts-container bar-echarts"></div> | ||
| 3 | -</template> | ||
| 4 | -<script> | ||
| 5 | -import { optionBar } from "./optionConfig" | ||
| 6 | -export default { | ||
| 7 | - data() { | ||
| 8 | - return {}; | ||
| 9 | - }, | ||
| 10 | - computed: {}, | ||
| 11 | - watch: {}, | ||
| 12 | - created() {}, | ||
| 13 | - mounted() { | ||
| 14 | - // 初始化echarts实例 | ||
| 15 | - const myChart = this.$echarts.init(this.$refs.barEcharts); | ||
| 16 | - console.log(myChart); | ||
| 17 | - // 绘制图表 | ||
| 18 | - myChart.setOption(optionBar); | ||
| 19 | - }, | ||
| 20 | - methods: {}, | ||
| 21 | -}; | ||
| 22 | -</script> | ||
| 23 | -<style lang='scss'> | ||
| 24 | -.yl-echarts-container{ | ||
| 25 | - // height: 200px; | ||
| 26 | -} | ||
| 27 | -</style> |
| 1 | -export const optionBar = { | ||
| 2 | - xAxis: { | ||
| 3 | - type: "category", | ||
| 4 | - data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], | ||
| 5 | - }, | ||
| 6 | - yAxis: { | ||
| 7 | - type: "value", | ||
| 8 | - }, | ||
| 9 | - series: [ | ||
| 10 | - { | ||
| 11 | - data: [120, 200, 150, 80, 70, 110, 130], | ||
| 12 | - type: "bar", | ||
| 13 | - showBackground: true, | ||
| 14 | - backgroundStyle: { | ||
| 15 | - color: "rgba(180, 180, 180, 0.2)", | ||
| 16 | - }, | ||
| 17 | - }, | ||
| 18 | - ], | ||
| 19 | -}; |
| ... | @@ -27,7 +27,6 @@ import tableHeaders from '@/assets/languages/tableHeaders' | ... | @@ -27,7 +27,6 @@ import tableHeaders from '@/assets/languages/tableHeaders' |
| 27 | import dictLabels from "@/assets/languages/dictLabels.js" | 27 | import dictLabels from "@/assets/languages/dictLabels.js" |
| 28 | import settings from './settings.js' | 28 | import settings from './settings.js' |
| 29 | import * as filters from "./utils/filters.js"; | 29 | import * as filters from "./utils/filters.js"; |
| 30 | -import echarts from "@/assets/languages/echarts"; | ||
| 31 | 30 | ||
| 32 | // 全局方法挂载 | 31 | // 全局方法挂载 |
| 33 | Vue.prototype.parseTime = parseTime | 32 | Vue.prototype.parseTime = parseTime |
| ... | @@ -44,7 +43,6 @@ Vue.prototype.isArray = isArray | ... | @@ -44,7 +43,6 @@ Vue.prototype.isArray = isArray |
| 44 | Vue.prototype.tableHeaders = tableHeaders | 43 | Vue.prototype.tableHeaders = tableHeaders |
| 45 | Vue.prototype.dictLabels = dictLabels | 44 | Vue.prototype.dictLabels = dictLabels |
| 46 | Vue.prototype.settings = settings | 45 | Vue.prototype.settings = settings |
| 47 | -Vue.prototype.$echarts = echarts; | ||
| 48 | Vue.prototype.msgSuccess = function (msg) { | 46 | Vue.prototype.msgSuccess = function (msg) { |
| 49 | this.$message({ showClose: true, message: msg, type: "success" }); | 47 | this.$message({ showClose: true, message: msg, type: "success" }); |
| 50 | } | 48 | } | ... | ... |
| ... | @@ -67,7 +67,6 @@ | ... | @@ -67,7 +67,6 @@ |
| 67 | <Chart :className="'chart' + index.toString()" :chartData="item" height="350px" style="margin-bottom:10px" | 67 | <Chart :className="'chart' + index.toString()" :chartData="item" height="350px" style="margin-bottom:10px" |
| 68 | :loading="loading" /> | 68 | :loading="loading" /> |
| 69 | </div> | 69 | </div> |
| 70 | - <!-- <yl-echarts-bar></yl-echarts-bar> --> | ||
| 71 | </div> | 70 | </div> |
| 72 | </div> | 71 | </div> |
| 73 | </template> | 72 | </template> |
| ... | @@ -75,11 +74,9 @@ | ... | @@ -75,11 +74,9 @@ |
| 75 | <script> | 74 | <script> |
| 76 | import Chart from '@/components/echarts/echarts-series.vue' | 75 | import Chart from '@/components/echarts/echarts-series.vue' |
| 77 | import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig"; | 76 | import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig"; |
| 78 | -// import YlEchartsBar from "@/components/YlEcharts/YlEchartsBar" | ||
| 79 | export default { | 77 | export default { |
| 80 | components: { | 78 | components: { |
| 81 | Chart, | 79 | Chart, |
| 82 | - // YlEchartsBar | ||
| 83 | }, | 80 | }, |
| 84 | data() { | 81 | data() { |
| 85 | return { | 82 | return { | ... | ... |
-
Please register or login to post a comment