qianlishi 2 years ago
parent ff65c73271
commit bf55365313

@ -3,7 +3,7 @@
* @Author: qianlishi qianlishi@anji-plus.com * @Author: qianlishi qianlishi@anji-plus.com
* @Date: 2023-01-09 13:02:59 * @Date: 2023-01-09 13:02:59
* @LastEditors: qianlishi qianlishi@anji-plus.com * @LastEditors: qianlishi qianlishi@anji-plus.com
* @LastEditTime: 2023-03-06 15:33:39 * @LastEditTime: 2023-03-24 10:27:23
*/ */
export const widgetSelect = { export const widgetSelect = {
@ -58,7 +58,19 @@ export const widgetSelect = {
{ code: 'focus', name: 'focus' }, { code: 'focus', name: 'focus' },
], ],
value: 'change', value: 'change',
} },
[{
name: '组件联动',
list: [
{
type: 'componentLinkage',
label: '',
name: 'componentLinkage',
required: false,
value: []
}
]
}]
], ],
data: [ data: [
{ {

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetBarCompareChart", name: "WidgetBarCompareChart",
// https://www.makeapie.com/editor.html?c=xrJwcCF3NZ // https://www.makeapie.com/editor.html?c=xrJwcCF3NZ
@ -278,14 +277,6 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetBarStackchart", name: "WidgetBarStackchart",
components: {}, components: {},
@ -90,14 +89,6 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -6,7 +6,6 @@
<script> <script>
import { originWidgetLinkageLogic, targetWidgetLinkageLogic } from '@/views/bigscreenDesigner/designer/linkageLogic' import { originWidgetLinkageLogic, targetWidgetLinkageLogic } from '@/views/bigscreenDesigner/designer/linkageLogic'
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetBarchart", name: "WidgetBarchart",
components: {}, components: {},
@ -100,14 +99,6 @@ export default {
targetWidgetLinkageLogic(this) // - targetWidgetLinkageLogic(this) // -
originWidgetLinkageLogic(this) // - originWidgetLinkageLogic(this) // -
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -6,7 +6,6 @@
<script> <script>
import echarts from "echarts"; import echarts from "echarts";
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetGradientColorBarchart", //https://www.makeapie.com/editor.html?c=x0oZWoncE name: "WidgetGradientColorBarchart", //https://www.makeapie.com/editor.html?c=x0oZWoncE
components: {}, components: {},
@ -163,14 +162,6 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "widgetBarLineStackChart", name: "widgetBarLineStackChart",
components: {}, components: {},
@ -125,14 +124,6 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetBarlinechart", name: "WidgetBarlinechart",
components: {}, components: {},
@ -128,14 +127,6 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -6,7 +6,6 @@
<script> <script>
import echarts from "echarts"; import echarts from "echarts";
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "widgetMoreBarLineChart", name: "widgetMoreBarLineChart",
components: {}, components: {},
@ -187,14 +186,6 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "widgetRotatePieChart", name: "widgetRotatePieChart",
components: {}, components: {},
@ -240,14 +239,6 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
editorOptions() { editorOptions() {

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetFunnel", name: "WidgetFunnel",
components: {}, components: {},
@ -108,14 +107,6 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "widgetHeatmap", name: "widgetHeatmap",
components: {}, components: {},
@ -136,14 +135,6 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetBarCompareChart", name: "WidgetBarCompareChart",
// https://www.makeapie.com/editor.html?c=xOjLyozu2W // https://www.makeapie.com/editor.html?c=xOjLyozu2W
@ -279,14 +278,6 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetBarStackchart", name: "WidgetBarStackchart",
components: {}, components: {},
@ -90,14 +89,6 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,8 +5,10 @@
</template> </template>
<script> <script>
import { originWidgetLinkageLogic, targetWidgetLinkageLogic } from '@/views/bigscreenDesigner/designer/linkageLogic' import {
import { eventBusParams } from "@/utils/screen"; originWidgetLinkageLogic,
targetWidgetLinkageLogic,
} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default { export default {
name: "WidgetLinechart", name: "WidgetLinechart",
components: {}, components: {},
@ -15,7 +17,7 @@ export default {
ispreview: Boolean, ispreview: Boolean,
widgetIndex: { widgetIndex: {
type: Number, type: Number,
default: 0 default: 0,
}, // widgetInWorkbench }, // widgetInWorkbench
}, },
data() { data() {
@ -82,8 +84,8 @@ export default {
}; };
}, },
allComponentLinkage() { allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage return this.$store.state.designer.allComponentLinkage;
} },
}, },
watch: { watch: {
value: { value: {
@ -103,16 +105,8 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this) // - targetWidgetLinkageLogic(this); // -
originWidgetLinkageLogic(this) // - originWidgetLinkageLogic(this); // -
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options
@ -311,16 +305,20 @@ export default {
// //
setOptionsData(e, paramsConfig) { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
optionsData.dynamicData = optionsData.dynamicData || {} // dynamicData undefined optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter) // clearInterval(this.flagInter); //
if (e && optionsData.dataType !== 'staticData' && Object.keys(myDynamicData.contextData).length) { if (
const keyArr = Object.keys(myDynamicData.contextData) e &&
paramsConfig.forEach(conf => { optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) { if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey] myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
} }
}) });
} }
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData) ? this.staticDataFn(optionsData.staticData)

@ -4,7 +4,6 @@
</div> </div>
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
import "echarts/map/js/china.js"; import "echarts/map/js/china.js";
import echarts from "echarts"; import echarts from "echarts";
import { conversionCity } from "@/utils/china"; import { conversionCity } from "@/utils/china";
@ -323,14 +322,6 @@ export default {
}, },
mounted() { mounted() {
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
convertData(data) { convertData(data) {

@ -6,7 +6,6 @@
<script> <script>
import echarts from "echarts"; import echarts from "echarts";
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetGauge", name: "WidgetGauge",
components: {}, components: {},
@ -158,14 +157,6 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
editorOptions() { editorOptions() {

@ -5,8 +5,7 @@
</template> </template>
<script> <script>
import { targetWidgetLinkageLogic } from '@/views/bigscreenDesigner/designer/linkageLogic' import { targetWidgetLinkageLogic } from "@/views/bigscreenDesigner/designer/linkageLogic";
import { eventBusParams } from "@/utils/screen";
let per = 60; let per = 60;
export default { export default {
name: "widgetPiePercentageChart", //https://www.makeapie.com/editor.html?c=xFkzKG-bpl name: "widgetPiePercentageChart", //https://www.makeapie.com/editor.html?c=xFkzKG-bpl
@ -16,7 +15,7 @@ export default {
ispreview: Boolean, ispreview: Boolean,
widgetIndex: { widgetIndex: {
type: Number, type: Number,
default: 0 default: 0,
}, // widgetInWorkbench }, // widgetInWorkbench
}, },
data() { data() {
@ -331,8 +330,8 @@ export default {
}; };
}, },
allComponentLinkage() { allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage return this.$store.state.designer.allComponentLinkage;
} },
}, },
watch: { watch: {
value: { value: {
@ -352,21 +351,13 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
mounted() { mounted() {
/* setInterval(() => { /* setInterval(() => {
this.angle = this.angle + 3 this.angle = this.angle + 3
myChart.setOption(options,true) myChart.setOption(options,true)
}, 1000);*/ }, 1000);*/
targetWidgetLinkageLogic(this) // - targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
//point //point
@ -448,17 +439,21 @@ export default {
// //
setOptionsData(e, paramsConfig) { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
optionsData.dynamicData = optionsData.dynamicData || {} // dynamicData undefined optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter) // clearInterval(this.flagInter); //
if (e && optionsData.dataType !== 'staticData' && Object.keys(myDynamicData.contextData).length) { if (
const keyArr = Object.keys(myDynamicData.contextData) e &&
paramsConfig.forEach(conf => { optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) { if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey] myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
} }
}) });
} }
optionsData.dataType == "staticData" optionsData.dataType == "staticData"

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetPieNightingaleRoseArea", // https://echarts.apache.org/examples/zh/editor.html?c=pie-roseType-simple name: "WidgetPieNightingaleRoseArea", // https://echarts.apache.org/examples/zh/editor.html?c=pie-roseType-simple
components: {}, components: {},
@ -75,14 +74,6 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "WidgetPiechart", name: "WidgetPiechart",
components: {}, components: {},
@ -81,14 +80,6 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -6,7 +6,6 @@
<script> <script>
import vue from "vue"; import vue from "vue";
import VueSuperSlide from "vue-superslide"; import VueSuperSlide from "vue-superslide";
import { eventBusParams } from "@/utils/screen";
vue.use(VueSuperSlide); vue.use(VueSuperSlide);
export default { export default {
props: { props: {
@ -58,14 +57,6 @@ export default {
this.optionsPosition = this.value.position; this.optionsPosition = this.value.position;
this.optionsData = this.value.data; this.optionsData = this.value.data;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
editorOptions() { editorOptions() {

@ -6,7 +6,6 @@
<script> <script>
import echarts from "echarts"; import echarts from "echarts";
import {eventBusParams} from "@/utils/screen";
let scale = []; let scale = [];
let max; let max;
@ -223,13 +222,6 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import wordCloud from "../../../../../../static/wordCloud/echarts-wordcloud.min.js"; import wordCloud from "../../../../../../static/wordCloud/echarts-wordcloud.min.js";
import { eventBusParams } from "@/utils/screen";
export default { export default {
name: "widgetWordCloud", name: "widgetWordCloud",
components: {}, components: {},
@ -87,14 +86,6 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
eventBusParams(
this.optionsSetup,
this.optionsData,
(dynamicData, optionsSetup) => {
console.log("dynamicData", dynamicData);
this.getEchartData(dynamicData, optionsSetup);
}
);
}, },
methods: { methods: {
// options // options

Loading…
Cancel
Save