yanzili 3 years ago
commit 36099a299b

@ -108,10 +108,12 @@ export default {
chartProperties: this.chartProperties, chartProperties: this.chartProperties,
contextData contextData
}; };
console.log(params);
const { code, data } = await getData(params); const { code, data } = await getData(params);
const analysisData = this.analysisChartsData(data); const analysisData = this.analysisChartsData(data);
console.log(analysisData); console.log(analysisData);
this.$emit("input", analysisData); this.$emit("input", analysisData);
this.$emit("change", params);
if (code != "200") return; if (code != "200") return;
}, },
selectParams(val, key) { selectParams(val, key) {
@ -168,7 +170,6 @@ export default {
// console.log(ananysicData, '') // console.log(ananysicData, '')
return ananysicData; return ananysicData;
}, },
// //
piechartFn(data) { piechartFn(data) {
const ananysicData = []; const ananysicData = [];

@ -117,12 +117,19 @@
width="50%" width="50%"
:before-close="handleClose" :before-close="handleClose"
> >
<codemirror <!-- <codemirror-->
v-model.trim="formData[item.name]" <!-- v-model.trim="formData[item.name]"-->
class="code-mirror" <!-- class="code-mirror"-->
:options="optionsJavascript" <!-- :options="optionsJavascript"-->
style="height: 190px" <!-- style="height: 190px"-->
/> <!-- />-->
<vue-json-editor v-model="formData[item.name]"
:show-btns="false"
:mode="'code'"
lang="zh"
class="my-editor"
@json-change="onJsonChange"
@json-save="onJsonSave" />
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisibleStaticData = false" <el-button @click="dialogVisibleStaticData = false"
> </el-button > </el-button
@ -135,6 +142,7 @@
v-if="item.type == 'dycustComponents' && inputShow[item.name]" v-if="item.type == 'dycustComponents' && inputShow[item.name]"
v-model="formData[item.name]" v-model="formData[item.name]"
:chart-type="item.chartType" :chart-type="item.chartType"
@change="changed($event, item.name)"
/> />
</div> </div>
<div v-else-if="isShowForm(item, '[object Array]')" :key="'a-' + index"> <div v-else-if="isShowForm(item, '[object Array]')" :key="'a-' + index">
@ -255,7 +263,7 @@
<script> <script>
import ColorPicker from "./colorPicker.vue"; import ColorPicker from "./colorPicker.vue";
import { codemirror } from "vue-codemirror"; // codeMirror import vueJsonEditor from 'vue-json-editor'
import "codemirror/lib/codemirror.css"; // import "codemirror/lib/codemirror.css"; //
import "codemirror/theme/cobalt.css"; // options import "codemirror/theme/cobalt.css"; // options
// language // language
@ -269,7 +277,7 @@ export default {
name: "DynamicForm", name: "DynamicForm",
components: { components: {
ColorPicker, ColorPicker,
codemirror, vueJsonEditor,
dynamicComponents, dynamicComponents,
customColorComponents customColorComponents
}, },
@ -336,6 +344,8 @@ export default {
} }
} }
}, },
onJsonChange (value) { },
onJsonSave (value) { },
saveData() { saveData() {
this.$emit("onChanged", this.formData); this.$emit("onChanged", this.formData);
this.dialogVisibleStaticData = false; this.dialogVisibleStaticData = false;

@ -2367,7 +2367,8 @@ const widgetTools = [
value: 10, value: 10,
}, },
], ],
}, { },
{
name: '图例操作', name: '图例操作',
list: [ list: [
{ {
@ -2439,7 +2440,8 @@ const widgetTools = [
value: '' value: ''
}, },
], ],
}, { },
{
name: '自定义配色', name: '自定义配色',
list: [ list: [
{ {
@ -2447,7 +2449,7 @@ const widgetTools = [
label: '', label: '',
name: 'customColor', name: 'customColor',
required: false, required: false,
value: [{ color: '#ED0E0E' }, { color: '#6CCD17' }, { color: '#172CCD' }, { color: '#B817CD' }, { color: '#AFCD17' }], value: [{ color: '#1E90FF' }],
}, },
], ],
}, },

Loading…
Cancel
Save