diff --git a/frontend/src/business/components/chart/Chart.vue b/frontend/src/business/components/chart/Chart.vue index bc27092c0b..8feeb9ab1f 100644 --- a/frontend/src/business/components/chart/Chart.vue +++ b/frontend/src/business/components/chart/Chart.vue @@ -34,12 +34,13 @@ .ms-aside-container { height: calc(100vh - 40px); padding: 15px; - min-width: 300px; - max-width: 500px; + min-width: 260px; + max-width: 460px; } .ms-main-container { height: calc(100vh - 40px); + padding: 0px; } diff --git a/frontend/src/business/components/chart/group/Group.vue b/frontend/src/business/components/chart/group/Group.vue index a08c349ba9..2e9d5f542a 100644 --- a/frontend/src/business/components/chart/group/Group.vue +++ b/frontend/src/business/components/chart/group/Group.vue @@ -253,12 +253,10 @@ export default { mounted() { this.groupTree(this.groupForm); this.chartTree(); - this.$router.push('/chart'); }, activated() { this.groupTree(this.groupForm); this.chartTree(); - this.$router.push('/chart'); }, watch: {}, methods: { @@ -494,8 +492,9 @@ export default { createChart() { console.log(this.table); this.selectTableFlag = false; - // TODO - this.$router.push("/chart"); + this.$store.commit("setTableId", null); + this.$store.commit("setTableId", this.table.id); + this.$router.push("/chart/chart-edit"); }, getTable(table) { diff --git a/frontend/src/business/components/chart/router.js b/frontend/src/business/components/chart/router.js index 579847c8fb..4121f93308 100644 --- a/frontend/src/business/components/chart/router.js +++ b/frontend/src/business/components/chart/router.js @@ -1,5 +1,6 @@ const Chart = () => import('@/business/components/chart/Chart'); const ChartHome = () => import('@/business/components/chart/data/ChartHome'); +const ChartEdit =() => import('@/business/components/chart/view/ChartEdit') export default { path: "/chart", @@ -13,6 +14,11 @@ export default { path: 'home', name: 'home', component: ChartHome, + }, + { + path: 'chart-edit', + name: 'chart-edit', + component: ChartEdit, } ] } diff --git a/frontend/src/business/components/chart/view/ChartEdit.vue b/frontend/src/business/components/chart/view/ChartEdit.vue index 466ff876b1..e57ba86941 100644 --- a/frontend/src/business/components/chart/view/ChartEdit.vue +++ b/frontend/src/business/components/chart/view/ChartEdit.vue @@ -1,14 +1,98 @@ diff --git a/frontend/src/business/components/dataset/data/ViewTable.vue b/frontend/src/business/components/dataset/data/ViewTable.vue index 00013ecfd4..b219d39693 100644 --- a/frontend/src/business/components/dataset/data/ViewTable.vue +++ b/frontend/src/business/components/dataset/data/ViewTable.vue @@ -10,9 +10,9 @@ {{$t('dataset.edit')}} - - {{$t('dataset.create_view')}} - + + + @@ -142,12 +142,10 @@ export default { this.initTableFields(); }, - createChart() { - console.log(this.table); - this.createViewDialog = true; - // TODO - this.$router.push("/chart"); - }, + // createChart() { + // console.log(this.table); + // this.createViewDialog = true; + // }, saveEdit() { console.log(this.tableFields); diff --git a/frontend/src/business/main.js b/frontend/src/business/main.js index bafc5c80d6..3e2ab6eb11 100644 --- a/frontend/src/business/main.js +++ b/frontend/src/business/main.js @@ -23,7 +23,9 @@ import VueFab from 'vue-float-action-button' import {left2RightDrag, bottom2TopDrag, right2LeftDrag} from "../common/js/directive"; import JsonSchemaEditor from './components/common/json-schema/schema/index'; import JSONPathPicker from 'vue-jsonpath-picker'; +import echarts from 'echarts' +Vue.prototype.$echarts = echarts; Vue.use(JsonSchemaEditor); import VuePapaParse from 'vue-papa-parse' Vue.use(VuePapaParse) diff --git a/frontend/src/business/store.js b/frontend/src/business/store.js index 630caf5c4b..ba7434ee24 100644 --- a/frontend/src/business/store.js +++ b/frontend/src/business/store.js @@ -21,7 +21,8 @@ const Dataset = { const Chart = { state: { chartSceneData: "", - chart: "" + chart: "", + tableId: "" }, mutations: { setChartSceneData(state, chartSceneData) { @@ -29,6 +30,9 @@ const Chart = { }, setChart(state, chart) { state.chart = chart; + }, + setTableId(state, tableId) { + state.tableId = tableId; } } }