From 5e9d7dc755fb36d13d0712f4bcbbcb0b446ab205 Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Tue, 29 Jun 2021 11:07:10 +0800 Subject: [PATCH 1/2] mirror --- .../bigscreen/designer/form/dynamicForm.vue | 25 +++++++++++++------ .../views/report/bigscreen/designer/tools.js | 8 +++--- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue b/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue index 3daf4c38..1b44f6d5 100644 --- a/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue +++ b/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue @@ -117,12 +117,19 @@ width="50%" :before-close="handleClose" > - + + + + + + + 取 消 import ColorPicker from "./colorPicker.vue"; -import { codemirror } from "vue-codemirror"; // 引入codeMirror全局实例 +import vueJsonEditor from 'vue-json-editor' import "codemirror/lib/codemirror.css"; // 核心样式 import "codemirror/theme/cobalt.css"; // 引入主题后还需要在 options 中指定主题才会生效 // language @@ -269,7 +276,7 @@ export default { name: "DynamicForm", components: { ColorPicker, - codemirror, + vueJsonEditor, dynamicComponents, customColorComponents }, @@ -336,6 +343,8 @@ export default { } } }, + onJsonChange (value) { }, + onJsonSave (value) { }, saveData() { this.$emit("onChanged", this.formData); this.dialogVisibleStaticData = false; diff --git a/report-ui/src/views/report/bigscreen/designer/tools.js b/report-ui/src/views/report/bigscreen/designer/tools.js index 66fbf3a6..2d40c1ab 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools.js +++ b/report-ui/src/views/report/bigscreen/designer/tools.js @@ -2319,7 +2319,8 @@ const widgetTools = [ value: 10, }, ], - }, { + }, + { name: '图例操作', list: [ { @@ -2391,7 +2392,8 @@ const widgetTools = [ value: '' }, ], - }, { + }, + { name: '自定义配色', list: [ { @@ -2399,7 +2401,7 @@ const widgetTools = [ label: '', name: 'customColor', required: false, - value: [{ color: '#ED0E0E' }, { color: '#6CCD17' }, { color: '#172CCD' }, { color: '#B817CD' }, { color: '#AFCD17' }], + value: [{ color: '#1E90FF' }], }, ], }, From 3971886a88c517cd2b6f55f48678321f23907d7a Mon Sep 17 00:00:00 2001 From: qianlishi <1432731663@qq.com> Date: Tue, 29 Jun 2021 11:09:18 +0800 Subject: [PATCH 2/2] update --- .../views/report/bigscreen/designer/form/dynamicComponents.vue | 3 ++- .../src/views/report/bigscreen/designer/form/dynamicForm.vue | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/report-ui/src/views/report/bigscreen/designer/form/dynamicComponents.vue b/report-ui/src/views/report/bigscreen/designer/form/dynamicComponents.vue index 0944b6d7..af0e78c7 100644 --- a/report-ui/src/views/report/bigscreen/designer/form/dynamicComponents.vue +++ b/report-ui/src/views/report/bigscreen/designer/form/dynamicComponents.vue @@ -108,10 +108,12 @@ export default { chartProperties: this.chartProperties, contextData }; + console.log(params); const { code, data } = await getData(params); const analysisData = this.analysisChartsData(data); console.log(analysisData); this.$emit("input", analysisData); + this.$emit("change", params); if (code != "200") return; }, selectParams(val, key) { @@ -168,7 +170,6 @@ export default { // console.log(ananysicData, '结果数据') return ananysicData; }, - // 饼图或者空心饼图或者漏斗图 piechartFn(data) { const ananysicData = []; diff --git a/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue b/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue index 3daf4c38..09467880 100644 --- a/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue +++ b/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue @@ -135,6 +135,7 @@ v-if="item.type == 'dycustComponents' && inputShow[item.name]" v-model="formData[item.name]" :chart-type="item.chartType" + @change="changed($event, item.name)" />