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 492ca115
authored
Dec 06, 2021
by
jml0128
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改图表
1 parent
a33a97b5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
52 deletions
README.md
package.json
src/packages/bi/src/chart-type/line/createLine.js
src/packages/bi/src/components/mobile/base-info.vue
src/packages/bi/src/project/20-configurable.vue
src/packages/bi/src/project/6-zone.vue
src/packages/bi/src/project/tools.js
README.md
View file @
492ca11
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
*
@Date: 2021-09-08 15:26:40
*
@Date: 2021-09-08 15:26:40
-->
-->
# 0.1.25
1.
名称显示调整,折线图线段加粗
# 0.1.23
# 0.1.23
1.
图表数据大于 30 条后,禁止使用表格形式
1.
图表数据大于 30 条后,禁止使用表格形式
...
...
package.json
View file @
492ca11
{
{
"name"
:
"xrk-bi"
,
"name"
:
"xrk-bi"
,
"version"
:
"0.1.2
4
"
,
"version"
:
"0.1.2
5
"
,
"description"
:
"xrk-bi"
,
"description"
:
"xrk-bi"
,
"author"
:
"xrk"
,
"author"
:
"xrk"
,
"main"
:
"dist/bundler.js"
,
"main"
:
"dist/bundler.js"
,
...
...
src/packages/bi/src/chart-type/line/createLine.js
View file @
492ca11
...
@@ -71,14 +71,14 @@ export const createLine = (
...
@@ -71,14 +71,14 @@ export const createLine = (
type
:
'line'
,
type
:
'line'
,
data
:
item
,
data
:
item
,
barWidth
:
'28px'
,
barWidth
:
'28px'
,
symbolSize
:
7
,
symbolSize
:
10
,
lineStyle
:
{
lineStyle
:
{
color
:
isSingle
color
:
isSingle
?
colors
.
length
==
1
?
colors
.
length
==
1
?
colors
[
0
]
?
colors
[
0
]
:
'#D8E5F2'
:
'#D8E5F2'
:
colors
[
index
],
:
colors
[
index
],
width
:
3
width
:
5
// shadowColor: hexColorToRgba(colors[index], 0.6),
// shadowColor: hexColorToRgba(colors[index], 0.6),
// shadowBlur: isSingle ? 0 : 10
// shadowBlur: isSingle ? 0 : 10
},
},
...
@@ -102,7 +102,7 @@ export const createLine = (
...
@@ -102,7 +102,7 @@ export const createLine = (
?
colors
[
0
]
?
colors
[
0
]
:
'#D8E5F2'
:
'#D8E5F2'
:
colors
[
index
],
:
colors
[
index
],
width
:
3
width
:
5
}
}
}
}
};
};
...
@@ -159,14 +159,14 @@ export const createLineSmooth = (
...
@@ -159,14 +159,14 @@ export const createLineSmooth = (
type
:
'line'
,
type
:
'line'
,
data
:
item
,
data
:
item
,
smooth
:
true
,
smooth
:
true
,
symbolSize
:
7
,
symbolSize
:
10
,
lineStyle
:
{
lineStyle
:
{
color
:
isSingle
color
:
isSingle
?
colors
.
length
==
1
?
colors
.
length
==
1
?
colors
[
0
]
?
colors
[
0
]
:
'#D8E5F2'
:
'#D8E5F2'
:
colors
[
index
],
:
colors
[
index
],
width
:
3
width
:
5
// shadowColor: hexColorToRgba(colors[index], 0.6),
// shadowColor: hexColorToRgba(colors[index], 0.6),
// shadowBlur: isSingle ? 0 : 10
// shadowBlur: isSingle ? 0 : 10
},
},
...
@@ -190,7 +190,7 @@ export const createLineSmooth = (
...
@@ -190,7 +190,7 @@ export const createLineSmooth = (
?
colors
[
0
]
?
colors
[
0
]
:
'#D8E5F2'
:
'#D8E5F2'
:
colors
[
index
],
:
colors
[
index
],
width
:
3
width
:
5
}
}
}
}
};
};
...
...
src/packages/bi/src/components/mobile/base-info.vue
View file @
492ca11
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
value
:
'张三'
value
:
'张三'
},
},
{
{
label
:
'
发起
方:'
,
label
:
'
项目
方:'
,
value
:
'葵花医疗集团'
value
:
'葵花医疗集团'
},
},
{
{
...
...
src/packages/bi/src/project/20-configurable.vue
View file @
492ca11
...
@@ -229,7 +229,9 @@ export default {
...
@@ -229,7 +229,9 @@ export default {
isAuditCso
,
// 乙方可见
isAuditCso
,
// 乙方可见
isAuditGongye
,
// 甲方可见
isAuditGongye
,
// 甲方可见
csoAuditUser
// 审核人姓名
csoAuditUser
,
// 审核人姓名
nameShowType
//1:正常显示甲乙方 2:隐藏发起方,原"服务商"改为"项目方" 3:隐藏发起方
}
=
info
;
}
=
info
;
this
.
biInfo
=
{
this
.
biInfo
=
{
biInfoId
:
id
,
biInfoId
:
id
,
...
@@ -253,22 +255,29 @@ export default {
...
@@ -253,22 +255,29 @@ export default {
pos
:
aspNamePosition
pos
:
aspNamePosition
}
}
];
];
const
showReviewer
=
()
=>
{
switch
(
this
.
platform
)
{
case
'gongye'
:
return
isAuditGongye
==
1
;
case
'cso'
:
return
isAuditCso
==
1
;
}
return
false
;
};
const
_baseInfo
=
[
const
_baseInfo
=
[
[
{
{
name
:
'项目名称'
,
name
:
'项目名称'
,
value
:
projectName
value
:
projectName
},
},
{
{
name
:
'发起方'
,
hide
:
nameShowType
==
2
||
nameShowType
==
3
,
name
:
'项目方'
,
value
:
sendEnterpriseName
value
:
sendEnterpriseName
},
},
{
{
name
:
'服务商'
,
name
:
nameShowType
==
2
?
'项目方'
:
'服务商'
,
value
:
aspEnterpriseName
value
:
aspEnterpriseName
}
},
],
[
{
{
name
:
'提交时间'
,
name
:
'提交时间'
,
value
:
settlementTime
value
:
settlementTime
...
@@ -280,9 +289,7 @@ export default {
...
@@ -280,9 +289,7 @@ export default {
{
{
name
:
'项目执行人数'
,
name
:
'项目执行人数'
,
value
:
`
${
executePeopleNumber
}
人`
value
:
`
${
executePeopleNumber
}
人`
}
},
],
[
{
{
name
:
'数据收集数'
,
name
:
'数据收集数'
,
value
:
`
${
dataCollectNumber
}
条`
value
:
`
${
dataCollectNumber
}
条`
...
@@ -294,28 +301,24 @@ export default {
...
@@ -294,28 +301,24 @@ export default {
{
{
name
:
'报表生成时间'
,
name
:
'报表生成时间'
,
value
:
biCreateDt
value
:
biCreateDt
}
},
]
];
const
showReviewer
=
()
=>
{
switch
(
this
.
platform
)
{
case
'gongye'
:
return
isAuditGongye
==
1
;
case
'cso'
:
return
isAuditCso
==
1
;
}
return
false
;
};
this
.
baseInfo
=
showReviewer
()
?
_baseInfo
.
concat
([
[
{
{
hide
:
!
showReviewer
(),
name
:
'服务商审核人'
,
name
:
'服务商审核人'
,
value
:
csoAuditUser
||
'-'
value
:
csoAuditUser
||
'-'
}
}
]
];
])
this
.
baseInfo
=
_baseInfo
.
reduce
((
pre
,
cur
)
=>
{
:
_baseInfo
;
if
(
!
cur
.
hide
)
{
const
lastArr
=
pre
[
pre
.
length
-
1
];
if
(
Array
.
isArray
(
lastArr
)
&&
lastArr
.
length
<
3
)
{
lastArr
.
push
(
cur
);
}
else
{
pre
.
push
([
cur
]);
}
}
return
pre
;
},
[]);
this
.
textData
=
[
this
.
textData
=
[
[
[
{
{
...
@@ -385,7 +388,7 @@ export default {
...
@@ -385,7 +388,7 @@ export default {
hideChart
:
true
,
hideChart
:
true
,
hideTitle
:
true
hideTitle
:
true
}),
}),
ChartConfigFn
.
createConfig
(
dealAxis
(
group3
.
fixedCountInfos
),
{
ChartConfigFn
.
createConfig
(
dealAxis
(
group3
.
fixedCountInfos
,
'个'
),
{
...
group3
,
...
group3
,
resultIsShow
:
1
,
resultIsShow
:
1
,
hideBtn
:
true
,
hideBtn
:
true
,
...
...
src/packages/bi/src/project/6-zone.vue
View file @
492ca11
...
@@ -223,7 +223,9 @@ export default {
...
@@ -223,7 +223,9 @@ export default {
taskEndTime
,
taskEndTime
,
taskSum
,
taskSum
,
executePeopleNumber
,
executePeopleNumber
,
createDt
createDt
,
nameShowType
//1:正常显示甲乙方 2:隐藏发起方,原"服务商"改为"项目方" 3:隐藏发起方
}
=
info
;
}
=
info
;
this
.
biInfo
=
{
this
.
biInfo
=
{
biInfoId
:
biInfoId
,
biInfoId
:
biInfoId
,
...
@@ -248,21 +250,19 @@ export default {
...
@@ -248,21 +250,19 @@ export default {
}
}
];
];
this
.
baseInfo
=
[
this
.
baseInfo
=
[
[
{
{
name
:
'发起方'
,
hide
:
nameShowType
==
2
||
nameShowType
==
3
,
name
:
'项目方'
,
value
:
sendEnterpriseName
value
:
sendEnterpriseName
},
},
{
{
name
:
'服务商'
,
name
:
nameShowType
==
2
?
'项目方'
:
'服务商'
,
value
:
aspEnterpriseName
value
:
aspEnterpriseName
},
},
{
{
name
:
'任务时间'
,
name
:
'任务时间'
,
value
:
`
${
taskTime
}
天`
value
:
`
${
taskTime
}
天`
}
},
],
[
{
{
name
:
'任务开始时间'
,
name
:
'任务开始时间'
,
value
:
taskStartTime
value
:
taskStartTime
...
@@ -274,9 +274,7 @@ export default {
...
@@ -274,9 +274,7 @@ export default {
{
{
name
:
'报表生成时间'
,
name
:
'报表生成时间'
,
value
:
biCreateDt
value
:
biCreateDt
}
},
],
[
{
{
name
:
'本期个人数据数'
,
name
:
'本期个人数据数'
,
value
:
executePeopleNumber
value
:
executePeopleNumber
...
@@ -285,8 +283,17 @@ export default {
...
@@ -285,8 +283,17 @@ export default {
name
:
'累计个人数据总数'
,
name
:
'累计个人数据总数'
,
value
:
taskSum
value
:
taskSum
}
}
]
].
reduce
((
pre
,
cur
)
=>
{
];
if
(
!
cur
.
hide
)
{
const
lastArr
=
pre
[
pre
.
length
-
1
];
if
(
Array
.
isArray
(
lastArr
)
&&
lastArr
.
length
<
3
)
{
lastArr
.
push
(
cur
);
}
else
{
pre
.
push
([
cur
]);
}
}
return
pre
;
},
[]);
this
.
textData
=
[
this
.
textData
=
[
[
[
{
{
...
...
src/packages/bi/src/project/tools.js
View file @
492ca11
...
@@ -4,12 +4,21 @@
...
@@ -4,12 +4,21 @@
*/
*/
import
{
base
}
from
'../chart-type/common'
;
import
{
base
}
from
'../chart-type/common'
;
const
dealStr
=
(
str
,
unit
=
''
)
=>
{
const
length
=
unit
.
length
;
if
(
`
${
str
}
`
.
slice
(
0
-
length
)
===
unit
)
{
return
str
;
}
else
{
return
`
${
str
}${
unit
}
`
;
}
};
export
const
dealAxis
=
(
arr
=
[],
unit
=
''
,
lastUnit
=
''
)
=>
{
export
const
dealAxis
=
(
arr
=
[],
unit
=
''
,
lastUnit
=
''
)
=>
{
return
arr
.
map
((
item
,
index
)
=>
{
return
arr
.
map
((
item
,
index
)
=>
{
const
isLast
=
index
===
arr
.
length
-
1
;
const
isLast
=
index
===
arr
.
length
-
1
;
const
xName
=
item
.
genderType
||
item
.
xTopicName
;
const
xName
=
item
.
genderType
||
item
.
xTopicName
;
return
{
return
{
x
:
xName
?
(
isLast
?
`
${
xName
}${
lastUnit
}
`
:
`
${
xName
}${
unit
}
`
)
:
'-'
,
x
:
xName
?
dealStr
(
xName
,
isLast
?
lastUnit
:
unit
)
:
'-'
,
y
:
item
.
yTopicName
,
y
:
item
.
yTopicName
,
value
:
item
.
num
||
item
.
countNum
||
0
value
:
item
.
num
||
item
.
countNum
||
0
};
};
...
@@ -21,9 +30,10 @@ export const dealLegends = (arr = [], unit = '', lastUnit = '') => {
...
@@ -21,9 +30,10 @@ export const dealLegends = (arr = [], unit = '', lastUnit = '') => {
},
0
);
},
0
);
return
arr
.
reduce
((
pre
,
cur
,
index
)
=>
{
return
arr
.
reduce
((
pre
,
cur
,
index
)
=>
{
pre
.
push
(
pre
.
push
(
`
${
cur
.
genderType
||
cur
.
xTopicName
}${
`
${
dealStr
(
cur
.
genderType
||
cur
.
xTopicName
,
index
===
arr
.
length
-
1
?
lastUnit
:
unit
index
===
arr
.
length
-
1
?
lastUnit
:
unit
}
$
{
cur
.
num
||
cur
.
countNum
||
0
}
人,占比
${
base
.
numberFormat
(
)
}${
cur
.
num
||
cur
.
countNum
||
0
}
人,占比
${
base
.
numberFormat
(
total
?
(
cur
.
num
||
cur
.
countNum
||
0
)
/
total
:
0
,
total
?
(
cur
.
num
||
cur
.
countNum
||
0
)
/
total
:
0
,
0.01
0.01
)}
%`
)}
%`
...
...
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