|
@@ -20,17 +20,40 @@
|
|
|
<el-tooltip
|
|
|
content="添加纬度"
|
|
|
placement="bottom-start"
|
|
|
- v-if="curEdit.type === 'scatter' || curEdit.type === 'radar'"
|
|
|
+ v-if="
|
|
|
+ curEdit.type === 'scatter' ||
|
|
|
+ curEdit.type === 'radar' ||
|
|
|
+ curEdit.type === 'sankeyDiagram' ||
|
|
|
+ curEdit.type === 'Heatmap'
|
|
|
+ "
|
|
|
>
|
|
|
<i
|
|
|
- @click="
|
|
|
- formLabelAlign.Xdata.push({ lable: '', data: [], id: '' })
|
|
|
- "
|
|
|
+ @click="handleLatitude('init')"
|
|
|
class="el-icon-circle-plus-outline"
|
|
|
style="font-size: 20px"
|
|
|
></i>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
+ <el-tooltip
|
|
|
+ content="按顺序添加纬度,不添加则不显示图表"
|
|
|
+ placement="bottom-start"
|
|
|
+ v-if="
|
|
|
+ curEdit.type === 'sankeyDiagram' || curEdit.type === 'Heatmap'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-if="curEdit.type === 'sankeyDiagram'"
|
|
|
+ style="color: red; font-size: 12px"
|
|
|
+ >
|
|
|
+ 源纬度-目标纬度
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="curEdit.type === 'Heatmap'"
|
|
|
+ style="color: red; font-size: 12px"
|
|
|
+ >
|
|
|
+ 横轴纬度-纵轴纬度
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
<template v-for="(item, ind) in formLabelAlign.Xdata">
|
|
|
<div class="attributeItemData">
|
|
|
<el-select
|
|
@@ -49,7 +72,12 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
<el-tooltip
|
|
|
- v-if="curEdit.type === 'scatter' || curEdit.type === 'radar'"
|
|
|
+ v-if="
|
|
|
+ curEdit.type === 'scatter' ||
|
|
|
+ curEdit.type === 'radar' ||
|
|
|
+ curEdit.type === 'sankeyDiagram' ||
|
|
|
+ curEdit.type === 'Heatmap'
|
|
|
+ "
|
|
|
:content="
|
|
|
formLabelAlign.Xdata.length <= 1
|
|
|
? '该指标不可删除,最少存在一组指标'
|
|
@@ -84,7 +112,12 @@
|
|
|
<el-tooltip
|
|
|
content="添加指标值"
|
|
|
placement="bottom-start"
|
|
|
- v-if="curEdit.type !== 'roseChart' && curEdit.type !== 'pie'"
|
|
|
+ v-if="
|
|
|
+ curEdit.type !== 'roseChart' &&
|
|
|
+ curEdit.type !== 'pie' &&
|
|
|
+ curEdit.type !== 'sankeyDiagram' &&
|
|
|
+ curEdit.type !== 'Heatmap'
|
|
|
+ "
|
|
|
>
|
|
|
<i
|
|
|
@click="handleMetrics('init')"
|
|
@@ -121,7 +154,12 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
<el-tooltip
|
|
|
- v-if="curEdit.type !== 'roseChart' && curEdit.type !== 'pie'"
|
|
|
+ v-if="
|
|
|
+ curEdit.type !== 'roseChart' &&
|
|
|
+ curEdit.type !== 'pie' &&
|
|
|
+ curEdit.type !== 'sankeyDiagram' &&
|
|
|
+ curEdit.type !== 'Heatmap'
|
|
|
+ "
|
|
|
:content="
|
|
|
formLabelAlign.Ydata.length <= 1
|
|
|
? '该指标不可删除,最少存在一组指标'
|
|
@@ -525,7 +563,8 @@
|
|
|
v-if="
|
|
|
curEdit.type !== 'pie' &&
|
|
|
curEdit.type !== 'radar' &&
|
|
|
- curEdit.type !== 'roseChart'
|
|
|
+ curEdit.type !== 'roseChart' &&
|
|
|
+ curEdit.type !== 'sankeyDiagram'
|
|
|
"
|
|
|
>
|
|
|
<el-input v-model="formLabelAlign.Xlable"></el-input>
|
|
@@ -536,7 +575,8 @@
|
|
|
curEdit.type !== 'pie' &&
|
|
|
curEdit.type !== 'radar' &&
|
|
|
curEdit.type !== 'roseChart' &&
|
|
|
- curEdit.type !== 'pareto'
|
|
|
+ curEdit.type !== 'pareto' &&
|
|
|
+ curEdit.type !== 'sankeyDiagram'
|
|
|
"
|
|
|
>
|
|
|
<el-input v-model="formLabelAlign.Ylable"></el-input>
|
|
@@ -647,8 +687,11 @@ import {
|
|
|
handlestackedBarChartLogic,
|
|
|
handleParetoChartLogic,
|
|
|
handleBoxPlotChartLogic,
|
|
|
+ handleSankeyDiagramPlotChartLogic,
|
|
|
+ handleHeatmapPlotChartLogic,
|
|
|
} from "./chartLogic/index";
|
|
|
import Vue from "vue";
|
|
|
+import { constructNow } from "date-fns";
|
|
|
export default {
|
|
|
name: "title",
|
|
|
props: {
|
|
@@ -780,6 +823,8 @@ export default {
|
|
|
"roseChart",
|
|
|
"stackedBar",
|
|
|
"boxPlot",
|
|
|
+ "sankeyDiagram",
|
|
|
+ "Heatmap",
|
|
|
].includes(type)
|
|
|
) {
|
|
|
return Ydata;
|
|
@@ -818,6 +863,24 @@ export default {
|
|
|
"setCurEdit",
|
|
|
"setFormFilterAlignData",
|
|
|
]),
|
|
|
+ handleLatitude(type) {
|
|
|
+ switch (type) {
|
|
|
+ case "init":
|
|
|
+ console.log(this.curEdit.type, this.formLabelAlign.Xdata.length);
|
|
|
+ if (
|
|
|
+ (this.curEdit.type === "sankeyDiagram" ||
|
|
|
+ this.curEdit.type === "Heatmap") &&
|
|
|
+ this.formLabelAlign.Xdata.length >= 2
|
|
|
+ ) {
|
|
|
+ this.$message.warning(
|
|
|
+ "纬度请根据上方红色字提示的进行添加且只能添加两个纬度标签"
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.formLabelAlign.Xdata.push({ lable: "", data: [], id: "" });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
handleMetrics(type) {
|
|
|
console.log(type, "tianjia yige");
|
|
|
switch (type) {
|
|
@@ -831,6 +894,7 @@ export default {
|
|
|
);
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
this.formLabelAlign.Ydata.push({ lable: "", data: [], id: "" });
|
|
|
this.formFilterAlign.push({
|
|
|
filters: [],
|
|
@@ -1285,6 +1349,22 @@ export default {
|
|
|
isFilter,
|
|
|
this.curEdit.type
|
|
|
);
|
|
|
+ } else if (this.curEdit.type === "sankeyDiagram") {
|
|
|
+ handleSankeyDiagramPlotChartLogic(
|
|
|
+ item,
|
|
|
+ this.formLabelAlign,
|
|
|
+ this.formFilterAlign,
|
|
|
+ isFilter,
|
|
|
+ this.curEdit.type
|
|
|
+ );
|
|
|
+ } else if (this.curEdit.type === "Heatmap") {
|
|
|
+ handleHeatmapPlotChartLogic(
|
|
|
+ item,
|
|
|
+ this.formLabelAlign,
|
|
|
+ this.formFilterAlign,
|
|
|
+ isFilter,
|
|
|
+ this.curEdit.type
|
|
|
+ );
|
|
|
}
|
|
|
//设置仓库
|
|
|
this.setFormFilterAlignData({
|