qianlishi 2 years ago
parent ff65c73271
commit bf55365313

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save