Commit 3386169d by jml0128

fix

1 parent 24b7d192
......@@ -3,7 +3,7 @@
* @Author: jml
* @Date: 2021-03-24 10:22:27
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-03 15:44:17
* @LastEditTime: 2021-07-04 12:16:45
-->
<template>
<div style="position:relative;" class="bi-chart-block">
......@@ -27,7 +27,10 @@
<BiChartChoiceMinxinToggleAxis
v-if="(chart.axis || []).every(item => item.names.length > 0)"
:axis="chart.axis"
:customGroupTitle="title.customGroupTitle"
:contenteditable="title.toggleAxisContenteditable"
@toggle-axis="toggleAxis"
@change-title="changeGroupTitle"
></BiChartChoiceMinxinToggleAxis>
<template v-if="chart.show">
<BiTable
......@@ -115,8 +118,11 @@ export default {
}
},
methods: {
changeGroupTitle(title) {
this.chartConfig.title['customGroupTitle'] = title;
console.log(`${this.title.name}-图表-副标题`, title);
},
changeTitle(title) {
console.log(title);
this.chartConfig.title['name'] = title;
console.log(`${this.title.name}-图表-标题`, title);
},
......
......@@ -73,12 +73,12 @@ export default {
} = this.data;
const _arr = arr.slice(0, -1);
const c = [
['', '', title[0].name, '', '', '', ''],
['', '', title[0].factorName, '', '', '', ''],
['题目', '名称', ...title[0].axis, '总计', 'X²', 'p'],
..._arr.map((item, index) => {
if (index === 0) {
return [
title[1].name,
title[1].factorName,
title[1].axis[index],
..._arr[index],
'',
......
......@@ -5,8 +5,16 @@
<template>
<div class="bi-chart-choice-mixin-toggle-axis">
<BiBlank height="25" :usePrint="true"></BiBlank>
<div class="bi-chart-choice-mixin-toggle-axis_sub_title">
{{ dealAxis.join('与') }}
<div
class="bi-chart-choice-mixin-toggle-axis_sub_title"
:contenteditable="contenteditable"
@input="
event => {
$emit('change-title', event.target.innerText);
}
"
>
{{ customGroupTitle || dealAxis.join('与') }}
</div>
<div class="bi-chart-choice-mixin-toggle-axis_text">
<div>
......@@ -36,6 +44,8 @@ export default {
BiBlank
},
props: {
customGroupTitle: String,
contenteditable: Boolean,
axis: {
type: Array,
default: () => []
......
......@@ -7,7 +7,7 @@
<div class="bi-chart-title_hr" v-if="!hideHr"></div>
<div
class="bi-chart-title_name"
contenteditable
:contenteditable="contenteditable"
@input="
event => {
$emit('change-title', event.target.innerText);
......@@ -118,6 +118,7 @@ export default {
BiTypesChart
},
props: {
contenteditable: Boolean,
showGuide: Boolean,
hideHr: Boolean,
name: String,
......
......@@ -3,7 +3,7 @@
* @Author: jml
* @Date: 2021-03-24 10:22:27
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-03 16:44:26
* @LastEditTime: 2021-07-04 13:13:05
-->
<template>
<div class="bi-table">
......@@ -20,10 +20,14 @@
>
<template v-for="(cItem, cIndex) in item">
<td v-if="Array.isArray(cItem)" id="lineTd" :key="cIndex">
<span style="float:left;margin-top:20px;padding-left:5px;">
<span
style="float:left;margin-top:20px;padding-left:5px;width:150px;"
>
{{ cItem[0] }}
</span>
<span style="float:right;margin-top:-15px;padding-right:5px;">
<span
style="float:right;margin-top:-15px;padding-right:5px;width:150px;"
>
{{ cItem[1] }}
</span>
</td>
......@@ -81,12 +85,12 @@ export default {
},
computed: {
isSingle() {
return this.data.length == 1;
return this.axis[1].names.length === 0;
},
dealData() {
const { data, isSingle, title, axis } = this;
return [
[isSingle ? title : [axis[0].name, axis[1].name], ...axis[0].names],
[isSingle ? title : [axis[1].name, axis[0].name], ...axis[0].names],
...data.map((item, index) => {
return [isSingle ? '数量' : axis[1].names[index], ...item];
})
......
......@@ -10,7 +10,7 @@
<p>服务公司声明</p>
<div>
<p>
本公司以勤勉的职=职业态度,独立、客观地出具本报告。本报告所采用的数据和信息均来自项目采集,本公司不保证该等信息的准确性或完整性。分析逻辑基于团队的职业理解,清晰
本公司以勤勉的职业态度,独立、客观地出具本报告。本报告所采用的数据和信息均来自项目采集,本公司不保证该等信息的准确性或完整性。分析逻辑基于团队的职业理解,清晰
准确地反映了本公司的观点,结论不受任何第三方的授意或影响,特此声明。
</p>
</div>
......
......@@ -99,7 +99,14 @@ export const chartConfig = () => {
znResultIsShow,
summary,
resultX2,
resultP
resultP,
customGroupTitle,
dontContenteditable,
toggleAxisContenteditable,
xFactor,
yFactor
} = options;
const title = blockTitle;
const { x, y, data } = dealAxis(arr, isGroup);
......@@ -121,8 +128,8 @@ export const chartConfig = () => {
colors[0],
data: data,
axis: [
{ name: xAxisName, names: x },
{ name: yAxisName, names: y }
{ factorName: xFactor, name: xAxisName, names: x },
{ factorName: yFactor, name: yAxisName, names: y }
],
width: width,
height: height,
......@@ -134,7 +141,10 @@ export const chartConfig = () => {
name: title,
hideColor: hideColor,
hideDelete: hideDelete,
hideChangeChart: hideTypes
hideChangeChart: hideTypes,
contenteditable: !dontContenteditable,
toggleAxisContenteditable: toggleAxisContenteditable,
customGroupTitle: customGroupTitle
},
legend: {
show: !hideLegend,
......@@ -160,14 +170,8 @@ export const chartConfig = () => {
setShow: true,
data: {
title: [
{
name: xAxisName,
axis: x
},
{
name: yAxisName,
axis: y
}
{ factorName: xFactor, name: xAxisName, axis: x },
{ factorName: yFactor, name: yAxisName, axis: y }
],
arr: [
...analysisData,
......
......@@ -375,6 +375,8 @@ export default {
xAxisName: item.title,
yAxisName: item.secondTitle,
isGroup: true,
dontContenteditable: true,
toggleAxisContenteditable: true,
blockTitle: `${item.xFactor}因素与${item.yFactor}因素相关性分析`,
chartType:
item.chartType || randomType([1, 2, 3, 4, 5, 6, 9, 10, 11])
......@@ -410,10 +412,7 @@ export default {
});
},
exportBi() {
this.Bi.exportBi({
commandType: 1,
type: 1
});
window.open(this.Bi.exportBi(), '_blank');
}
},
created() {
......
......@@ -452,10 +452,7 @@ export default {
});
},
exportBi() {
this.Bi.exportBi({
commandType: 1,
type: 1
});
window.open(this.Bi.exportBi(), '_blank');
}
},
created() {
......
......@@ -45,6 +45,7 @@ export const chartConfigToSetInfo = (chartConfigs, biInfoId) => {
type: type,
chartType: +chart.type,
customTitle: item.title.name,
customGroupTitle: item.title.customGroupTitle,
colourGroup: Array.isArray(chart.colors)
? chart.colors.join(',')
: chart.colors,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!