Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-composition-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宁路鹏
vue-composition-api
Commits
b910a8b3
Commit
b910a8b3
authored
Jul 07, 2023
by
唐玉峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
疾病分组
parent
e570dbf8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
56 deletions
+57
-56
src/utils/echarts.js
+57
-56
src/views/outHistorygrouping.vue
+0
-0
src/views/outpatientDetails.vue
+0
-0
No files found.
src/utils/echarts.js
View file @
b910a8b3
import
{
nextTick
}
from
'@vue/composition-api'
;
import
*
as
echarts
from
'echarts'
;
import
{
nextTick
}
from
"@vue/composition-api"
;
import
*
as
echarts
from
"echarts"
;
/**
* @param echarts初始化
...
...
@@ -11,79 +9,77 @@ import * as echarts from 'echarts';
export
function
initEcharts
(
option
,
panelId
)
{
var
svChart
;
return
nextTick
(()
=>
{
svChart
=
echarts
.
getInstanceByDom
(
document
.
getElementById
(
panelId
));
if
(
svChart
==
null
)
{
svChart
=
echarts
.
init
(
document
.
getElementById
(
panelId
));
}
document
.
getElementById
(
panelId
).
setAttribute
(
'_echarts_instance_'
,
''
);
document
.
getElementById
(
panelId
).
setAttribute
(
"_echarts_instance_"
,
""
);
svChart
.
clear
();
svChart
.
setOption
(
option
);
svChart
.
resize
();
// 屏幕大小改变
window
.
addEventListener
(
'resize'
,
()
=>
{
window
.
addEventListener
(
"resize"
,
()
=>
{
svChart
.
resize
();
});
return
svChart
;
})
});
}
//百分比图 智能分组
export
function
categoryChart
(
data
,
tcolor
)
{
const
option
=
{
title
:
[{
title
:
[
{
text
:
data
+
`%`
,
x
:
'center'
,
top
:
'38%'
,
x
:
"center"
,
top
:
"38%"
,
textStyle
:
{
fontSize
:
'16'
,
//百分比的样式
fontSize
:
"16"
,
//百分比的样式
color
:
tcolor
,
fontFamily
:
'Arial'
,
foontWeight
:
'600'
,
fontFamily
:
"Arial"
,
foontWeight
:
"600"
,
},
},
},
],
],
polar
:
{
radius
:
[
'100%'
,
'60%'
],
center
:
[
'50%'
,
'50%'
],
radius
:
[
"100%"
,
"60%"
],
center
:
[
"50%"
,
"50%"
],
},
angleAxis
:
{
max
:
100
,
show
:
false
,
},
radiusAxis
:
{
type
:
'category'
,
type
:
"category"
,
show
:
false
,
},
series
:
[{
name
:
''
,
type
:
'bar'
,
series
:
[
{
name
:
""
,
type
:
"bar"
,
roundCap
:
true
,
barWidth
:
6
,
showBackground
:
true
,
backgroundStyle
:
{
color
:
'#f3fafd'
,
//留白颜色
color
:
"#f3fafd"
,
//留白颜色
},
data
:
[
data
],
coordinateSystem
:
'polar'
,
coordinateSystem
:
"polar"
,
itemStyle
:
{
normal
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0
,
color
:
tcolor
,
//填色颜色
},]),
},
]),
},
},
},],
},
],
};
return
option
;
...
...
@@ -92,62 +88,67 @@ export function categoryChart(data, tcolor) {
//百分比图 病案入组
export
function
categoryChart11
(
text
,
data
,
tcolor
)
{
const
option
=
{
title
:
[{
title
:
[
{
text
:
text
,
x
:
'center'
,
top
:
'52%'
,
x
:
"center"
,
top
:
"52%"
,
textStyle
:
{
fontSize
:
'14'
,
//百分比的样式
fontSize
:
"14"
,
//百分比的样式
color
:
tcolor
,
fontFamily
:
'PingFang SC'
,
foontWeight
:
'300'
,
fontFamily
:
"PingFang SC"
,
foontWeight
:
"300"
,
},
},
{
text
:
data
+
`%`
,
x
:
'center'
,
top
:
'28%'
,
text
:
data
?
data
:
0
+
`%`
,
x
:
"center"
,
top
:
"28%"
,
textStyle
:
{
fontSize
:
'20'
,
//百分比的样式
fontSize
:
"20"
,
//百分比的样式
color
:
tcolor
,
fontFamily
:
'Arial'
,
foontWeight
:
'600'
,
fontFamily
:
"Arial"
,
foontWeight
:
"600"
,
},
},
],
polar
:
{
radius
:
[
'100%'
,
'60%'
],
center
:
[
'50%'
,
'50%'
],
radius
:
[
"100%"
,
"60%"
],
center
:
[
"50%"
,
"50%"
],
},
angleAxis
:
{
max
:
100
,
show
:
false
,
},
radiusAxis
:
{
type
:
'category'
,
type
:
"category"
,
show
:
false
,
},
series
:
[{
name
:
''
,
type
:
'bar'
,
series
:
[
{
name
:
""
,
type
:
"bar"
,
roundCap
:
true
,
barWidth
:
6
,
showBackground
:
true
,
backgroundStyle
:
{
color
:
'#f3fafd'
,
//留白颜色
color
:
"#f3fafd"
,
//留白颜色
},
data
:
[
data
],
coordinateSystem
:
'polar'
,
coordinateSystem
:
"polar"
,
itemStyle
:
{
normal
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
1
,
0
,
0
,
[
{
offset
:
0
,
color
:
tcolor
,
//填色颜色
},]),
},
]),
},
},],
},
},
],
};
return
option
;
...
...
src/views/outHistorygrouping.vue
View file @
b910a8b3
This diff is collapsed.
Click to expand it.
src/views/outpatientDetails.vue
View file @
b910a8b3
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment