From d10f4a790a3ee8eabb0d31ac2243062b2393183d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 24 Oct 2024 11:06:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E6=B5=8B=E8=AF=95=E9=A1=B5?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/testx.vue | 88 ++++++++++++++++++++++++---------------- 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/src/views/home/testx.vue b/src/views/home/testx.vue index 2efb0ea9..6b13dbc0 100644 --- a/src/views/home/testx.vue +++ b/src/views/home/testx.vue @@ -1,38 +1,58 @@ \ No newline at end of file + name: "testx", + components: {}, + data() { + return { + currentM: "", + apiObj: this.$API.system.dept.list, + x: "3607937377546706944", + x_name: "光芯科技", + // x:null, + apiObj2: this.$API.system.user.list, + x2: {}, + }; + }, + mounted() {}, + methods: {}, +}; + From 15db849fd6dcc6a307c37455e24f3eb41165d530 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 24 Oct 2024 11:25:04 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0vue-echarts?= =?UTF-8?q?=E5=B9=B6=E6=B3=A8=E5=86=8C=E5=88=B0=E5=85=A8=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- src/main.js | 4 ++++ src/views/home/testx.vue | 50 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1a17ce14..204bc5ef 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dagre": "^0.8.5", "dagre-d3": "^0.6.4", "dhtmlx-gantt": "^8.0.6", - "echarts": "5.4.1", + "echarts": "^5.5.1", "element-plus": "^2.7.4", "file-saver": "^2.0.5", "html2canvas": "^1.4.1", @@ -42,6 +42,7 @@ "three": "^0.155.0", "tinymce": "6.3.2", "vue": "3.2.47", + "vue-echarts": "^7.0.3", "vue-i18n": "9.2.2", "vue-router": "4.1.6", "vuedraggable": "4.0.3", diff --git a/src/main.js b/src/main.js index 04e3c147..c4954c90 100644 --- a/src/main.js +++ b/src/main.js @@ -18,6 +18,9 @@ import htmlToPdf from "./utils/htmlToPdf"; import * as Cesium from "cesium"; +import "echarts"; +import ECharts from 'vue-echarts'; + const app = createApp(App); app.use(store); @@ -33,6 +36,7 @@ app.use(Xlsx); app.use(htmlToPdf); app.use(jsBarCode); app.use(DataVVue3); +app.component('v-chart', ECharts); //挂载app app.mount("#app"); diff --git a/src/views/home/testx.vue b/src/views/home/testx.vue index 6b13dbc0..d524e3df 100644 --- a/src/views/home/testx.vue +++ b/src/views/home/testx.vue @@ -6,6 +6,7 @@ 带默认的选择 图标选择 表格选择 + vue-echarts @@ -34,6 +35,9 @@ > +
+ +
@@ -50,6 +54,52 @@ export default { // x:null, apiObj2: this.$API.system.user.list, x2: {}, + chartOption: { + textStyle: { + fontFamily: 'Inter, "Helvetica Neue", Arial, sans-serif', + }, + title: { + text: 'Traffic Sources', + left: 'center', + }, + tooltip: { + trigger: 'item', + formatter: '{a}
{b} : {c} ({d}%)', + }, + legend: { + orient: 'vertical', + left: 'left', + data: [ + 'Direct', + 'Email', + 'Ad Networks', + 'Video Ads', + 'Search Engines', + ], + }, + series: [ + { + name: 'Traffic Sources', + type: 'pie', + radius: '55%', + center: ['50%', '60%'], + data: [ + { value: 335, name: 'Direct' }, + { value: 310, name: 'Email' }, + { value: 234, name: 'Ad Networks' }, + { value: 135, name: 'Video Ads' }, + { value: 1548, name: 'Search Engines' }, + ], + emphasis: { + itemStyle: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)', + }, + }, + }, + ], + }, }; }, mounted() {}, From 733e3ba9bf346c479606fb02add7d9a51ec55a72 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 24 Oct 2024 16:03:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0xselect=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=B9=B6=E6=B3=A8=E5=86=8C=E5=88=B0=E5=85=A8=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ehsSelect/xselect.vue | 105 +++++++++++++++++++++++++++ src/ehs.js | 4 +- src/views/home/testx.vue | 25 ++++--- 3 files changed, 121 insertions(+), 13 deletions(-) create mode 100644 src/components/ehsSelect/xselect.vue diff --git a/src/components/ehsSelect/xselect.vue b/src/components/ehsSelect/xselect.vue new file mode 100644 index 00000000..ada217b6 --- /dev/null +++ b/src/components/ehsSelect/xselect.vue @@ -0,0 +1,105 @@ + + + diff --git a/src/ehs.js b/src/ehs.js index 601e3ef8..4ccca94b 100644 --- a/src/ehs.js +++ b/src/ehs.js @@ -1,12 +1,12 @@ import ehsUserSelect from './components/ehsSelect/userselect' import ehsEpSelect from './components/ehsSelect/epselect' import ehsSelect from './components/ehsSelect/select' -import ehsTableSelect from './components/ehsSelect/tableSelect' +import xSelect from './components/ehsSelect/xselect.vue' export default { install(app) { app.component('ehsUserSelect', ehsUserSelect); app.component('ehsEpSelect', ehsEpSelect); app.component('ehsSelect', ehsSelect); - app.component('ehsTableSelect', ehsTableSelect); + app.component('xSelect', xSelect); } } diff --git a/src/views/home/testx.vue b/src/views/home/testx.vue index d524e3df..9a0fff9d 100644 --- a/src/views/home/testx.vue +++ b/src/views/home/testx.vue @@ -5,7 +5,7 @@ 二维码 带默认的选择 图标选择 - 表格选择 + xselect vue-echarts @@ -26,14 +26,12 @@
-
- - - - +
+ + + + +
@@ -53,7 +51,8 @@ export default { x_name: "光芯科技", // x:null, apiObj2: this.$API.system.user.list, - x2: {}, + x2: "3347207082608115712", + x2_name: "烧成车间", chartOption: { textStyle: { fontFamily: 'Inter, "Helvetica Neue", Arial, sans-serif', @@ -103,6 +102,10 @@ export default { }; }, mounted() {}, - methods: {}, + methods: { + showx2(){ + // console.log(this.x2) + } + }, };