Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
jml0128
/
xrk-bi
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3386169d
authored
Jul 04, 2021
by
jml0128
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
1 parent
24b7d192
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
55 additions
and
33 deletions
src/packages/bi/src/commonComponents/chart-block.vue
src/packages/bi/src/commonComponents/chart-choice-mixin-analysis.vue
src/packages/bi/src/commonComponents/chart-choice-mixin-toggle-axis.vue
src/packages/bi/src/commonComponents/chart-title.vue
src/packages/bi/src/commonComponents/table.vue
src/packages/bi/src/components/cover-end.vue
src/packages/bi/src/mock/index.js
src/packages/bi/src/project/20-configurable.vue
src/packages/bi/src/project/6-zone.vue
src/packages/bi/src/project/tools.js
src/packages/bi/src/commonComponents/chart-block.vue
View file @
3386169
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: jml
* @Author: jml
* @Date: 2021-03-24 10:22:27
* @Date: 2021-03-24 10:22:27
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-0
3 15:44:17
* @LastEditTime: 2021-07-0
4 12:16:45
-->
-->
<
template
>
<
template
>
<div
style=
"position:relative;"
class=
"bi-chart-block"
>
<div
style=
"position:relative;"
class=
"bi-chart-block"
>
...
@@ -27,7 +27,10 @@
...
@@ -27,7 +27,10 @@
<BiChartChoiceMinxinToggleAxis
<BiChartChoiceMinxinToggleAxis
v-if=
"(chart.axis || []).every(item => item.names.length > 0)"
v-if=
"(chart.axis || []).every(item => item.names.length > 0)"
:axis=
"chart.axis"
:axis=
"chart.axis"
:customGroupTitle=
"title.customGroupTitle"
:contenteditable=
"title.toggleAxisContenteditable"
@
toggle-axis=
"toggleAxis"
@
toggle-axis=
"toggleAxis"
@
change-title=
"changeGroupTitle"
></BiChartChoiceMinxinToggleAxis>
></BiChartChoiceMinxinToggleAxis>
<template
v-if=
"chart.show"
>
<template
v-if=
"chart.show"
>
<BiTable
<BiTable
...
@@ -115,8 +118,11 @@ export default {
...
@@ -115,8 +118,11 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
changeGroupTitle
(
title
)
{
this
.
chartConfig
.
title
[
'customGroupTitle'
]
=
title
;
console
.
log
(
`
${
this
.
title
.
name
}
-图表-副标题`
,
title
);
},
changeTitle
(
title
)
{
changeTitle
(
title
)
{
console
.
log
(
title
);
this
.
chartConfig
.
title
[
'name'
]
=
title
;
this
.
chartConfig
.
title
[
'name'
]
=
title
;
console
.
log
(
`
${
this
.
title
.
name
}
-图表-标题`
,
title
);
console
.
log
(
`
${
this
.
title
.
name
}
-图表-标题`
,
title
);
},
},
...
...
src/packages/bi/src/commonComponents/chart-choice-mixin-analysis.vue
View file @
3386169
...
@@ -73,12 +73,12 @@ export default {
...
@@ -73,12 +73,12 @@ export default {
}
=
this
.
data
;
}
=
this
.
data
;
const
_arr
=
arr
.
slice
(
0
,
-
1
);
const
_arr
=
arr
.
slice
(
0
,
-
1
);
const
c
=
[
const
c
=
[
[
''
,
''
,
title
[
0
].
n
ame
,
''
,
''
,
''
,
''
],
[
''
,
''
,
title
[
0
].
factorN
ame
,
''
,
''
,
''
,
''
],
[
'题目'
,
'名称'
,
...
title
[
0
].
axis
,
'总计'
,
'X²'
,
'p'
],
[
'题目'
,
'名称'
,
...
title
[
0
].
axis
,
'总计'
,
'X²'
,
'p'
],
...
_arr
.
map
((
item
,
index
)
=>
{
...
_arr
.
map
((
item
,
index
)
=>
{
if
(
index
===
0
)
{
if
(
index
===
0
)
{
return
[
return
[
title
[
1
].
n
ame
,
title
[
1
].
factorN
ame
,
title
[
1
].
axis
[
index
],
title
[
1
].
axis
[
index
],
...
_arr
[
index
],
...
_arr
[
index
],
''
,
''
,
...
...
src/packages/bi/src/commonComponents/chart-choice-mixin-toggle-axis.vue
View file @
3386169
...
@@ -5,8 +5,16 @@
...
@@ -5,8 +5,16 @@
<
template
>
<
template
>
<div
class=
"bi-chart-choice-mixin-toggle-axis"
>
<div
class=
"bi-chart-choice-mixin-toggle-axis"
>
<BiBlank
height=
"25"
:usePrint=
"true"
></BiBlank>
<BiBlank
height=
"25"
:usePrint=
"true"
></BiBlank>
<div
class=
"bi-chart-choice-mixin-toggle-axis_sub_title"
>
<div
{{
dealAxis
.
join
(
'与'
)
}}
class=
"bi-chart-choice-mixin-toggle-axis_sub_title"
:contenteditable=
"contenteditable"
@
input=
"
event =>
{
$emit('change-title', event.target.innerText);
}
"
>
{{
customGroupTitle
||
dealAxis
.
join
(
'与'
)
}}
</div>
</div>
<div
class=
"bi-chart-choice-mixin-toggle-axis_text"
>
<div
class=
"bi-chart-choice-mixin-toggle-axis_text"
>
<div>
<div>
...
@@ -36,6 +44,8 @@ export default {
...
@@ -36,6 +44,8 @@ export default {
BiBlank
BiBlank
},
},
props
:
{
props
:
{
customGroupTitle
:
String
,
contenteditable
:
Boolean
,
axis
:
{
axis
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
...
...
src/packages/bi/src/commonComponents/chart-title.vue
View file @
3386169
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<div
class=
"bi-chart-title_hr"
v-if=
"!hideHr"
></div>
<div
class=
"bi-chart-title_hr"
v-if=
"!hideHr"
></div>
<div
<div
class=
"bi-chart-title_name"
class=
"bi-chart-title_name"
contenteditable
:contenteditable=
"contenteditable"
@
input=
"
@
input=
"
event =>
{
event =>
{
$emit('change-title', event.target.innerText);
$emit('change-title', event.target.innerText);
...
@@ -118,6 +118,7 @@ export default {
...
@@ -118,6 +118,7 @@ export default {
BiTypesChart
BiTypesChart
}
,
}
,
props
:
{
props
:
{
contenteditable
:
Boolean
,
showGuide
:
Boolean
,
showGuide
:
Boolean
,
hideHr
:
Boolean
,
hideHr
:
Boolean
,
name
:
String
,
name
:
String
,
...
...
src/packages/bi/src/commonComponents/table.vue
View file @
3386169
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: jml
* @Author: jml
* @Date: 2021-03-24 10:22:27
* @Date: 2021-03-24 10:22:27
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-0
3 16:44:26
* @LastEditTime: 2021-07-0
4 13:13:05
-->
-->
<
template
>
<
template
>
<div
class=
"bi-table"
>
<div
class=
"bi-table"
>
...
@@ -20,10 +20,14 @@
...
@@ -20,10 +20,14 @@
>
>
<template
v-for=
"(cItem, cIndex) in item"
>
<template
v-for=
"(cItem, cIndex) in item"
>
<td
v-if=
"Array.isArray(cItem)"
id=
"lineTd"
:key=
"cIndex"
>
<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
]
}}
{{
cItem
[
0
]
}}
</span>
</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
]
}}
{{
cItem
[
1
]
}}
</span>
</span>
</td>
</td>
...
@@ -81,12 +85,12 @@ export default {
...
@@ -81,12 +85,12 @@ export default {
},
},
computed
:
{
computed
:
{
isSingle
()
{
isSingle
()
{
return
this
.
data
.
length
==
1
;
return
this
.
axis
[
1
].
names
.
length
===
0
;
},
},
dealData
()
{
dealData
()
{
const
{
data
,
isSingle
,
title
,
axis
}
=
this
;
const
{
data
,
isSingle
,
title
,
axis
}
=
this
;
return
[
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
)
=>
{
...
data
.
map
((
item
,
index
)
=>
{
return
[
isSingle
?
'数量'
:
axis
[
1
].
names
[
index
],
...
item
];
return
[
isSingle
?
'数量'
:
axis
[
1
].
names
[
index
],
...
item
];
})
})
...
...
src/packages/bi/src/components/cover-end.vue
View file @
3386169
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<p>
服务公司声明
</p>
<p>
服务公司声明
</p>
<div>
<div>
<p>
<p>
本公司以勤勉的职
=职
业态度,独立、客观地出具本报告。本报告所采用的数据和信息均来自项目采集,本公司不保证该等信息的准确性或完整性。分析逻辑基于团队的职业理解,清晰
本公司以勤勉的职业态度,独立、客观地出具本报告。本报告所采用的数据和信息均来自项目采集,本公司不保证该等信息的准确性或完整性。分析逻辑基于团队的职业理解,清晰
准确地反映了本公司的观点,结论不受任何第三方的授意或影响,特此声明。
准确地反映了本公司的观点,结论不受任何第三方的授意或影响,特此声明。
</p>
</p>
</div>
</div>
...
...
src/packages/bi/src/mock/index.js
View file @
3386169
...
@@ -99,7 +99,14 @@ export const chartConfig = () => {
...
@@ -99,7 +99,14 @@ export const chartConfig = () => {
znResultIsShow
,
znResultIsShow
,
summary
,
summary
,
resultX2
,
resultX2
,
resultP
resultP
,
customGroupTitle
,
dontContenteditable
,
toggleAxisContenteditable
,
xFactor
,
yFactor
}
=
options
;
}
=
options
;
const
title
=
blockTitle
;
const
title
=
blockTitle
;
const
{
x
,
y
,
data
}
=
dealAxis
(
arr
,
isGroup
);
const
{
x
,
y
,
data
}
=
dealAxis
(
arr
,
isGroup
);
...
@@ -121,8 +128,8 @@ export const chartConfig = () => {
...
@@ -121,8 +128,8 @@ export const chartConfig = () => {
colors
[
0
],
colors
[
0
],
data
:
data
,
data
:
data
,
axis
:
[
axis
:
[
{
name
:
xAxisName
,
names
:
x
},
{
factorName
:
xFactor
,
name
:
xAxisName
,
names
:
x
},
{
name
:
yAxisName
,
names
:
y
}
{
factorName
:
yFactor
,
name
:
yAxisName
,
names
:
y
}
],
],
width
:
width
,
width
:
width
,
height
:
height
,
height
:
height
,
...
@@ -134,7 +141,10 @@ export const chartConfig = () => {
...
@@ -134,7 +141,10 @@ export const chartConfig = () => {
name
:
title
,
name
:
title
,
hideColor
:
hideColor
,
hideColor
:
hideColor
,
hideDelete
:
hideDelete
,
hideDelete
:
hideDelete
,
hideChangeChart
:
hideTypes
hideChangeChart
:
hideTypes
,
contenteditable
:
!
dontContenteditable
,
toggleAxisContenteditable
:
toggleAxisContenteditable
,
customGroupTitle
:
customGroupTitle
},
},
legend
:
{
legend
:
{
show
:
!
hideLegend
,
show
:
!
hideLegend
,
...
@@ -160,14 +170,8 @@ export const chartConfig = () => {
...
@@ -160,14 +170,8 @@ export const chartConfig = () => {
setShow
:
true
,
setShow
:
true
,
data
:
{
data
:
{
title
:
[
title
:
[
{
{
factorName
:
xFactor
,
name
:
xAxisName
,
axis
:
x
},
name
:
xAxisName
,
{
factorName
:
yFactor
,
name
:
yAxisName
,
axis
:
y
}
axis
:
x
},
{
name
:
yAxisName
,
axis
:
y
}
],
],
arr
:
[
arr
:
[
...
analysisData
,
...
analysisData
,
...
...
src/packages/bi/src/project/20-configurable.vue
View file @
3386169
...
@@ -375,6 +375,8 @@ export default {
...
@@ -375,6 +375,8 @@ export default {
xAxisName
:
item
.
title
,
xAxisName
:
item
.
title
,
yAxisName
:
item
.
secondTitle
,
yAxisName
:
item
.
secondTitle
,
isGroup
:
true
,
isGroup
:
true
,
dontContenteditable
:
true
,
toggleAxisContenteditable
:
true
,
blockTitle
:
`
${
item
.
xFactor
}
因素与
${
item
.
yFactor
}
因素相关性分析`
,
blockTitle
:
`
${
item
.
xFactor
}
因素与
${
item
.
yFactor
}
因素相关性分析`
,
chartType
:
chartType
:
item
.
chartType
||
randomType
([
1
,
2
,
3
,
4
,
5
,
6
,
9
,
10
,
11
])
item
.
chartType
||
randomType
([
1
,
2
,
3
,
4
,
5
,
6
,
9
,
10
,
11
])
...
@@ -410,10 +412,7 @@ export default {
...
@@ -410,10 +412,7 @@ export default {
});
});
},
},
exportBi
()
{
exportBi
()
{
this
.
Bi
.
exportBi
({
window
.
open
(
this
.
Bi
.
exportBi
(),
'_blank'
);
commandType
:
1
,
type
:
1
});
}
}
},
},
created
()
{
created
()
{
...
...
src/packages/bi/src/project/6-zone.vue
View file @
3386169
...
@@ -452,10 +452,7 @@ export default {
...
@@ -452,10 +452,7 @@ export default {
});
});
},
},
exportBi
()
{
exportBi
()
{
this
.
Bi
.
exportBi
({
window
.
open
(
this
.
Bi
.
exportBi
(),
'_blank'
);
commandType
:
1
,
type
:
1
});
}
}
},
},
created
()
{
created
()
{
...
...
src/packages/bi/src/project/tools.js
View file @
3386169
...
@@ -45,6 +45,7 @@ export const chartConfigToSetInfo = (chartConfigs, biInfoId) => {
...
@@ -45,6 +45,7 @@ export const chartConfigToSetInfo = (chartConfigs, biInfoId) => {
type
:
type
,
type
:
type
,
chartType
:
+
chart
.
type
,
chartType
:
+
chart
.
type
,
customTitle
:
item
.
title
.
name
,
customTitle
:
item
.
title
.
name
,
customGroupTitle
:
item
.
title
.
customGroupTitle
,
colourGroup
:
Array
.
isArray
(
chart
.
colors
)
colourGroup
:
Array
.
isArray
(
chart
.
colors
)
?
chart
.
colors
.
join
(
','
)
?
chart
.
colors
.
join
(
','
)
:
chart
.
colors
,
:
chart
.
colors
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment