Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Q
qualityTesting_studentHome
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
tobacco
qualityTesting_studentHome
Commits
f98ab859
提交
f98ab859
authored
7月 13, 2023
作者:
Yroc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
'趋势性分析'
上级
7da12731
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
876 行增加
和
12 行删除
+876
-12
trend.svg
public/image/trend.svg
+2
-0
user.js
src/api/user.js
+9
-1
SelectLineChart.vue
src/components/AnalyseModule/components/SelectLineChart.vue
+106
-0
SelectLineChartData.vue
...mponents/AnalyseModule/components/SelectLineChartData.vue
+100
-0
index.vue
src/components/AnalyseModule/index.vue
+34
-0
index.vue
src/components/ViewHeader/index.vue
+218
-3
overall_appraisal_view.vue
src/views/analysis/components/overall_appraisal_view.vue
+184
-3
index.vue
src/views/personal/index.vue
+223
-5
没有找到文件。
public/image/trend.svg
0 → 100644
浏览文件 @
f98ab859
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1689235220885"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"1566"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><path
d=
"M124.928 660.48h104.96v238.08h-104.96zM347.136 535.552h104.96v363.52h-104.96zM548.864 644.608h104.96v254.464h-104.96zM766.976 422.4h104.96v476.672h-104.96z"
fill=
"#038d6e"
p-id=
"1567"
></path><path
d=
"M666.112 124.928l110.592 118.784L535.04 473.6 351.744 307.2v-0.512l-0.512-0.512-1.536 2.048L61.44 536.576l32.768 41.472 254.976-202.752 186.368 169.472 1.024-1.024 0.512 0.512 275.456-262.144 100.864 108.544 12.8-260.096z"
fill=
"#038d6e"
p-id=
"1568"
></path></svg>
\ No newline at end of file
src/api/user.js
浏览文件 @
f98ab859
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: AnthonyD
* @Author: AnthonyD
* @Date: 2023-02-22 11:31:31
* @Date: 2023-02-22 11:31:31
* @Last Modified by: AnthonyD
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-0
4-19 19:19:24
* @Last Modified time: 2023-0
7-13 16:44:55
*/
*/
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
...
@@ -142,3 +142,11 @@ export function logout() {
...
@@ -142,3 +142,11 @@ export function logout() {
method
:
'post'
method
:
'post'
})
})
}
}
//获取个人趋势性统计信息
export
function
getUserAnalysisTrend
()
{
return
request
({
url
:
'/student/test_results/userAnalysis'
,
method
:
'get'
,
})
}
src/components/AnalyseModule/components/SelectLineChart.vue
0 → 100644
浏览文件 @
f98ab859
<
template
>
<div
class=
"chart_container"
:id=
"chart_id"
></div>
</
template
>
<
script
>
export
default
{
props
:
[
'chart_data'
,
'chart_id'
,
'labers'
,
'keys'
,
'position_data'
],
data
()
{
return
{
y_data
:
null
,
fake_data
:
'全部'
,
position_info
:
null
,
};
},
components
:
{},
computed
:
{},
watch
:
{
position_data
:
{
deep
:
true
,
handler
(
newData
,
oldDate
)
{
this
.
position_info
=
newData
;
this
.
y_data
=
this
.
chart_data
[
newData
];
this
.
initChart
();
},
},
},
created
()
{},
mounted
()
{
this
.
y_data
=
this
.
chart_data
.
all
;
this
.
initChart
();
},
methods
:
{
initChart
()
{
let
colors
=
[
'#47afa0'
];
let
x_data
=
this
.
chart_data
.
title
;
this
.
labers
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
position_info
==
item
.
key
)
{
this
.
fake_data
=
item
.
label
;
}
});
let
_that
=
this
;
let
dom
=
document
.
getElementById
(
`
${
this
.
chart_id
}
`
);
let
myChart
=
this
.
$echarts
.
init
(
dom
,
null
,
{
renderer
:
'canvas'
,
useDirtyRect
:
false
,
});
let
option
;
option
=
{
title
:
{
text
:
' '
,
subtext
:
this
.
fake_data
,
},
tooltip
:
{
axisPointer
:
{
type
:
'cross'
,
},
},
toolbox
:
{
show
:
true
,
},
color
:
colors
,
xAxis
:
[
{
type
:
'category'
,
axisTick
:
{
show
:
false
},
data
:
x_data
,
interval
:
0
,
axisLabel
:
{
show
:
true
,
rotate
:
-
15
,
},
},
],
yAxis
:
[
{
type
:
'value'
,
},
],
series
:
[
{
data
:
this
.
y_data
,
type
:
'line'
,
},
],
};
if
(
option
&&
typeof
option
===
'object'
)
{
myChart
.
setOption
(
option
);
}
window
.
addEventListener
(
'resize'
,
myChart
.
resize
);
},
},
};
</
script
>
<
style
scoped
>
.chart_container
{
width
:
100%
;
height
:
90%
;
}
</
style
>
src/components/AnalyseModule/components/SelectLineChartData.vue
0 → 100644
浏览文件 @
f98ab859
<!--
* @Author: czj
* @Date: 2023-03-21 10:14:46
* @Description:
* @FilePath: \AdministrationHome\src\components\AnalyseModule\components\table.vue
-->
<!-- -->
<
template
>
<div
class=
"container_box"
>
<div>
<el-select
v-model=
"select_value"
style=
"width: 100%"
@
change=
"selectChange"
>
<el-option
v-for=
"(e, i) in select_list"
:label=
"e.label"
:value=
"e.key"
:key=
"i"
>
</el-option>
</el-select>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
[
'labers'
],
data
()
{
return
{
select_list
:
[],
select_value
:
null
,
};
},
components
:
{},
computed
:
{},
created
()
{
this
.
select_list
=
[...
this
.
labers
];
this
.
select_value
=
this
.
labers
[
0
].
label
;
},
mounted
()
{},
methods
:
{
//选择监听
selectChange
(
val
)
{
// this.table_list = [...this.table_data.list[val]];
this
.
$emit
(
'selectChange'
,
val
);
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.container_box
{
width
:
100%
;
height
:
7%
;
position
:
relative
;
}
.el-icon-caret-bottom
{
position
:
absolute
;
top
:
81px
;
}
.el-icon-caret-top
{
position
:
absolute
;
top
:
74px
;
}
.table_box
{
width
:
100%
;
// min-height: 100%;
text-align
:
center
;
font-size
:
14px
;
border-top
:
1px
solid
#e4e7ed
;
border-left
:
1px
solid
#e4e7ed
;
border-collapse
:
collapse
;
th
,
td
{
margin
:
0
;
padding
:
0
;
font-size
:
14px
;
border-bottom
:
1px
solid
#e4e7ed
;
border-right
:
1px
solid
#e4e7ed
;
}
th
{
padding
:
15px
0
;
color
:
#909399
;
}
td
{
padding
:
5px
0
;
color
:
#303133
;
}
}
</
style
>
src/components/AnalyseModule/index.vue
浏览文件 @
f98ab859
...
@@ -75,6 +75,23 @@
...
@@ -75,6 +75,23 @@
:area_data=
"original_data.area_data"
:area_data=
"original_data.area_data"
></eye-stability-table>
></eye-stability-table>
</div>
</div>
<!-- 趋势性分析 -->
<div
class=
"content_container_trend"
v-if=
"original_data.type == 'trend_analysis'"
>
<SelectLineChartData
:labers=
"original_data.labers"
@
selectChange=
"selectChange"
></SelectLineChartData>
<SelectLineChart
:chart_id=
"original_data.chart_id"
:labers=
"original_data.labers"
:keys=
"original_data.keys"
:chart_data=
"original_data.obj"
:position_data=
"position_data"
></SelectLineChart>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -85,11 +102,14 @@ import BarChart from './components/BarChart.vue';
...
@@ -85,11 +102,14 @@ import BarChart from './components/BarChart.vue';
import
SimpleTable
from
'./components/SimpleTable.vue'
;
import
SimpleTable
from
'./components/SimpleTable.vue'
;
import
EyeStabilityTable
from
'./components/EyeStabilityTable.vue'
;
import
EyeStabilityTable
from
'./components/EyeStabilityTable.vue'
;
import
SelectTabe
from
'./components/SelectTabe.vue'
;
import
SelectTabe
from
'./components/SelectTabe.vue'
;
import
SelectLineChart
from
'./components/SelectLineChart'
;
import
SelectLineChartData
from
'./components/SelectLineChartData.vue'
;
export
default
{
export
default
{
props
:
[
'module_data'
],
props
:
[
'module_data'
],
data
()
{
data
()
{
return
{
return
{
original_data
:
{},
original_data
:
{},
position_data
:
'全部'
,
};
};
},
},
...
@@ -100,6 +120,8 @@ export default {
...
@@ -100,6 +120,8 @@ export default {
SimpleTable
,
SimpleTable
,
EyeStabilityTable
,
EyeStabilityTable
,
SelectTabe
,
SelectTabe
,
SelectLineChart
,
SelectLineChartData
,
},
},
computed
:
{},
computed
:
{},
...
@@ -113,6 +135,9 @@ export default {
...
@@ -113,6 +135,9 @@ export default {
changeSelect
()
{
changeSelect
()
{
this
.
$emit
(
'changeSelect'
,
this
.
original_data
.
is_show
);
this
.
$emit
(
'changeSelect'
,
this
.
original_data
.
is_show
);
},
},
selectChange
(
val
)
{
this
.
position_data
=
val
;
},
},
},
};
};
</
script
>
</
script
>
...
@@ -137,6 +162,15 @@ export default {
...
@@ -137,6 +162,15 @@ export default {
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
overflow-y
:
auto
;
overflow-y
:
auto
;
overflow-x
:
auto
;
white-space
:
nowrap
;
// 默认不换行;
}
.content_container_trend
{
width
:
100%
;
height
:
285px
;
margin
:
0
;
padding
:
0
;
}
}
}
}
...
...
src/components/ViewHeader/index.vue
浏览文件 @
f98ab859
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Author: AnthonyD
* @Date: 2023-02-23 16:03:00
* @Date: 2023-02-23 16:03:00
* @Last Modified by: AnthonyD
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-0
4-20 16:51:20
* @Last Modified time: 2023-0
7-13 18:56:35
*/
*/
</
script
><
template
>
</
script
><
template
>
<div
class=
"header_container"
>
<div
class=
"header_container"
>
...
@@ -22,6 +22,19 @@
...
@@ -22,6 +22,19 @@
>
>
个人中心
个人中心
</button>
</button>
<button
style=
"
background-color: #038d6e;
width: 100%;
color: #fff;
border: 1px solid #038d6e;
margin-bottom: 5px;
"
size=
"mini"
@
click=
"getTrend()"
>
个人分析
</button>
<button
<button
style=
"
style=
"
background-color: #038d6e;
background-color: #038d6e;
...
@@ -34,7 +47,6 @@
...
@@ -34,7 +47,6 @@
>
>
退出登录
退出登录
</button>
</button>
<el-button
<el-button
slot=
"reference"
slot=
"reference"
type=
"primary"
type=
"primary"
...
@@ -47,6 +59,7 @@
...
@@ -47,6 +59,7 @@
<div
class=
"logo"
@
click=
"goPersonalCenter()"
style=
"cursor: pointer"
>
<div
class=
"logo"
@
click=
"goPersonalCenter()"
style=
"cursor: pointer"
>
<img
src=
"/image/logo.svg"
alt=
""
/>
<img
src=
"/image/logo.svg"
alt=
""
/>
</div>
</div>
<div
class=
"header_box"
>
<div
class=
"header_box"
>
<h3>
国家烟草识别培训系统
</h3>
<h3>
国家烟草识别培训系统
</h3>
</div>
</div>
...
@@ -55,14 +68,75 @@
...
@@ -55,14 +68,75 @@
>
退出登录
</el-button
>
退出登录
</el-button
>
>
</div>
</div>
<el-dialog
title=
"个人分析"
:visible
.
sync=
"dialogVisible1"
center
fullscreen
>
<div
class=
"table_container"
>
<div>
<div>
<el-row
class=
"row_container"
>
<el-col
:span=
"24"
class=
"unit_container"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"holdTobacco_data"
v-if=
"holdTobacco_data"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"24"
class=
"unit_container"
style=
"margin-top: 10px"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"flakeTobacco_data"
v-if=
"flakeTobacco_data"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"24"
class=
"unit_container"
style=
"margin-top: 10px"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"swingHandle_data"
v-if=
"swingHandle_data"
>
</AnalyseModule>
</div>
</el-col>
</el-row>
</div>
</div>
</div>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
AnalyseModule
from
'@/components/AnalyseModule/index.vue'
;
import
{
getUserAnalysisTrend
}
from
'@/api/user'
;
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
AnalyseModule
},
data
()
{
data
()
{
return
{};
return
{
dialogVisible1
:
false
,
//把烟统计数据
holdTobacco_data
:
null
,
//片烟统计数据
flakeTobacco_data
:
null
,
//甩把统计数据
swingHandle_data
:
null
,
};
},
},
//退出页面
//退出页面
methods
:
{
methods
:
{
...
@@ -73,6 +147,147 @@ export default {
...
@@ -73,6 +147,147 @@ export default {
goPersonalCenter
()
{
goPersonalCenter
()
{
this
.
$router
.
push
(
'/personal'
);
this
.
$router
.
push
(
'/personal'
);
},
},
//获取个人趋势性分析
getTrend
()
{
this
.
dialogVisible1
=
true
;
getUserAnalysisTrend
().
then
((
res
)
=>
{
this
.
holdTobacco_data
=
this
.
changeHoldTobacco
(
res
.
analysis
.
holdTobacco
);
//把烟
this
.
flakeTobacco_data
=
this
.
changeFlakeTobacco
(
res
.
analysis
.
flakeTobacco
);
//片烟
this
.
swingHandle_data
=
this
.
changeSwingHandle
(
res
.
analysis
.
swingHandle
);
//甩把
});
},
//处理把烟
changeHoldTobacco
(
datas
)
{
if
(
!
datas
)
return
false
;
// if (!datas) {
// datas = [];
// }
let
keys
=
Object
.
keys
(
datas
);
let
labers
=
[
{
label
:
'全部'
,
key
:
'all'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
let
obj
=
{
all
:
datas
.
all
,
south
:
datas
.
south
,
north
:
datas
.
north
,
positive
:
datas
.
positive
,
deputy
:
datas
.
deputy
,
south_positive
:
datas
.
south_positive
,
south_deputy
:
datas
.
south_deputy
,
north_positive
:
datas
.
north_positive
,
north_deputy
:
datas
.
north_deputy
,
title
:
datas
.
title
,
};
return
{
type
:
'trend_analysis'
,
chart_id
:
'holdtobacco_bar_chart'
,
title
:
'把烟'
,
color
:
'#39c183f0'
,
// print_id: 'holdtobacco_bar_chart',
obj
,
labers
,
keys
,
};
},
//处理片烟
changeFlakeTobacco
(
datas
)
{
if
(
!
datas
)
return
false
;
// if (!datas) {
// datas = [];
// }
let
keys
=
Object
.
keys
(
datas
);
let
labers
=
[
{
label
:
'全部'
,
key
:
'all'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
let
obj
=
{
all
:
datas
.
all
,
south
:
datas
.
south
,
north
:
datas
.
north
,
positive
:
datas
.
positive
,
deputy
:
datas
.
deputy
,
south_positive
:
datas
.
south_positive
,
south_deputy
:
datas
.
south_deputy
,
north_positive
:
datas
.
north_positive
,
north_deputy
:
datas
.
north_deputy
,
title
:
datas
.
title
,
};
return
{
type
:
'trend_analysis'
,
chart_id
:
'flakeTobacco_bar_chart'
,
title
:
'片烟'
,
color
:
'#E6A23C'
,
// print_id: 'flakeTobacco_bar_chart',
obj
,
labers
,
keys
,
};
},
//处理甩把
changeSwingHandle
(
datas
)
{
if
(
!
datas
)
return
false
;
// if (!datas) {
// datas = [];
// }
let
keys
=
Object
.
keys
(
datas
);
let
labers
=
[
{
label
:
'全部'
,
key
:
'all'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
let
obj
=
{
all
:
datas
.
all
,
south
:
datas
.
south
,
north
:
datas
.
north
,
positive
:
datas
.
positive
,
deputy
:
datas
.
deputy
,
south_positive
:
datas
.
south_positive
,
south_deputy
:
datas
.
south_deputy
,
north_positive
:
datas
.
north_positive
,
north_deputy
:
datas
.
north_deputy
,
title
:
datas
.
title
,
};
return
{
type
:
'trend_analysis'
,
chart_id
:
'swingHandle_bar_chart'
,
title
:
'片烟'
,
color
:
'#E6A23C'
,
// print_id: 'flakeTobacco_bar_chart',
obj
,
labers
,
keys
,
};
},
},
},
};
};
</
script
>
</
script
>
...
...
src/views/analysis/components/overall_appraisal_view.vue
浏览文件 @
f98ab859
...
@@ -190,6 +190,41 @@
...
@@ -190,6 +190,41 @@
</el-row>
</el-row>
</div>
</div>
</div>
</div>
<!-- 趋势性分析 -->
<div>
<div
class=
"module_header"
>
趋势性分析
</div>
<div>
<el-row
class=
"row_container"
>
<el-col
:span=
"12"
class=
"unit_container"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"holdTobacco_data"
v-if=
"holdTobacco_data"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"12"
class=
"unit_container"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"flakeTobacco_data"
v-if=
"flakeTobacco_data"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"12"
class=
"unit_container"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"swingHandle_data"
v-if=
"swingHandle_data"
>
</AnalyseModule>
</div>
</el-col>
</el-row>
</div>
</div>
<div>
<div>
<div
class=
"module_header"
>
老师点评:
</div>
<div
class=
"module_header"
>
老师点评:
</div>
<div
style=
"padding: 0 10px; box-sizing: border-box"
>
<div
style=
"padding: 0 10px; box-sizing: border-box"
>
...
@@ -242,6 +277,12 @@ export default {
...
@@ -242,6 +277,12 @@ export default {
transcript_data
:
null
,
transcript_data
:
null
,
//老师点评
//老师点评
found_remark
:
null
,
found_remark
:
null
,
//把烟统计数据
holdTobacco_data
:
null
,
//片烟统计数据
flakeTobacco_data
:
null
,
//甩把统计数据
swingHandle_data
:
null
,
};
};
},
},
...
@@ -307,12 +348,144 @@ export default {
...
@@ -307,12 +348,144 @@ export default {
this
.
wrongG_group_data
=
this
.
changeWrongGroup
(
this
.
wrongG_group_data
=
this
.
changeWrongGroup
(
this
.
appraisal_data
.
WrongGroup
this
.
appraisal_data
.
WrongGroup
);
//错误组别
);
//错误组别
this
.
holdTobacco_data
=
this
.
changeHoldTobacco
(
console
.
log
(
'处理好的数据'
);
this
.
appraisal_data
.
holdTobacco
console
.
log
(
this
.
error_level_data
);
);
//把烟
this
.
flakeTobacco_data
=
this
.
changeFlakeTobacco
(
this
.
appraisal_data
.
flakeTobacco
);
//片烟
this
.
swingHandle_data
=
this
.
changeSwingHandle
(
this
.
appraisal_data
.
swingHandle
);
//甩把
},
},
//计算百分比
//计算百分比
toPercent
,
toPercent
,
//处理把烟
changeHoldTobacco
(
datas
)
{
if
(
!
datas
)
return
false
;
// if (!datas) {
// datas = [];
// }
let
keys
=
Object
.
keys
(
datas
);
let
labers
=
[
{
label
:
'全部'
,
key
:
'all'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
let
obj
=
{
all
:
datas
.
all
,
south
:
datas
.
south
,
north
:
datas
.
north
,
positive
:
datas
.
positive
,
deputy
:
datas
.
deputy
,
south_positive
:
datas
.
south_positive
,
south_deputy
:
datas
.
south_deputy
,
north_positive
:
datas
.
north_positive
,
north_deputy
:
datas
.
north_deputy
,
title
:
datas
.
title
,
};
return
{
type
:
'trend_analysis'
,
chart_id
:
'holdTobacco_data_bar_chart'
,
title
:
'把烟'
,
color
:
'#39c183f0'
,
obj
,
labers
,
keys
,
};
},
//处理甩把
changeSwingHandle
(
datas
)
{
if
(
!
datas
)
return
false
;
// if (!datas) {
// datas = [];
// }
let
keys
=
Object
.
keys
(
datas
);
let
labers
=
[
{
label
:
'全部'
,
key
:
'all'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
let
obj
=
{
all
:
datas
.
all
,
south
:
datas
.
south
,
north
:
datas
.
north
,
positive
:
datas
.
positive
,
deputy
:
datas
.
deputy
,
south_positive
:
datas
.
south_positive
,
south_deputy
:
datas
.
south_deputy
,
north_positive
:
datas
.
north_positive
,
north_deputy
:
datas
.
north_deputy
,
title
:
datas
.
title
,
};
return
{
type
:
'trend_analysis'
,
chart_id
:
'swingHandle_data_bar_chart'
,
title
:
'甩把'
,
color
:
'#39c183f0'
,
obj
,
labers
,
keys
,
};
},
//处理片烟
changeFlakeTobacco
(
datas
)
{
if
(
!
datas
)
return
false
;
// if (!datas) {
// datas = [];
// }
let
keys
=
Object
.
keys
(
datas
);
let
labers
=
[
{
label
:
'全部'
,
key
:
'all'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
let
obj
=
{
all
:
datas
.
all
,
south
:
datas
.
south
,
north
:
datas
.
north
,
positive
:
datas
.
positive
,
deputy
:
datas
.
deputy
,
south_positive
:
datas
.
south_positive
,
south_deputy
:
datas
.
south_deputy
,
north_positive
:
datas
.
north_positive
,
north_deputy
:
datas
.
north_deputy
,
title
:
datas
.
title
,
};
return
{
type
:
'trend_analysis'
,
chart_id
:
'flakeTobacco_bar_chart'
,
title
:
'片烟'
,
color
:
'#E6A23C'
,
obj
,
labers
,
keys
,
};
},
//处理分段值
//处理分段值
changeScore
(
datas
)
{
changeScore
(
datas
)
{
if
(
!
datas
)
return
false
;
if
(
!
datas
)
return
false
;
...
@@ -434,6 +607,14 @@ export default {
...
@@ -434,6 +607,14 @@ export default {
let
labers
=
[
let
labers
=
[
{
label
:
'姓名'
,
key
:
'name'
},
{
label
:
'姓名'
,
key
:
'name'
},
{
label
:
'分数'
,
key
:
'score'
},
{
label
:
'分数'
,
key
:
'score'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
];
let
select_list
=
Object
.
keys
(
datas
);
let
select_list
=
Object
.
keys
(
datas
);
return
{
return
{
...
...
src/views/personal/index.vue
浏览文件 @
f98ab859
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Author: AnthonyD
* @Date: 2023-02-23 15:52:52
* @Date: 2023-02-23 15:52:52
* @Last Modified by: AnthonyD
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-0
4-27 15:54:24
* @Last Modified time: 2023-0
7-13 17:58:38
*/
*/
</
script
><
template
>
</
script
><
template
>
<div
class=
"person_container"
>
<div
class=
"person_container"
>
...
@@ -32,7 +32,15 @@
...
@@ -32,7 +32,15 @@
</el-upload>
</el-upload>
</div>
</div>
</div>
</div>
<h3
style=
"text-align: center; font-weight: 900"
>
学员信息
</h3>
<div
class=
"title_box"
>
<span
style=
"font-weight: 900; font-size: 20px"
>
学员信息
</span>
<img
class=
"head_icon_box"
@
click=
"getTrend()"
src=
"image/trend.svg"
/>
</div>
<p
class=
"pointer"
>
姓名
</p>
<p
class=
"pointer"
>
姓名
</p>
<el-input
v-model=
"user_info.name"
disabled
></el-input>
<el-input
v-model=
"user_info.name"
disabled
></el-input>
<p
class=
"pointer"
>
学号
</p>
<p
class=
"pointer"
>
学号
</p>
...
@@ -48,6 +56,7 @@
...
@@ -48,6 +56,7 @@
</div>
</div>
</el-card>
</el-card>
</el-col>
</el-col>
<!-- 考试卡片 -->
<!-- 考试卡片 -->
<el-col
:span=
"18"
class=
"right_box"
>
<el-col
:span=
"18"
class=
"right_box"
>
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
...
@@ -252,23 +261,83 @@
...
@@ -252,23 +261,83 @@
</el-card>
</el-card>
</el-col>
</el-col>
</el-row>
</el-row>
<el-dialog
title=
"个人分析"
:visible
.
sync=
"dialogVisible"
width=
"60%"
center
>
<div
class=
"table_container"
>
<div>
<div>
<el-row
class=
"row_container"
:gutter=
"10"
>
<el-col
:span=
"12"
class=
"unit_container"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"holdTobacco_data"
v-if=
"holdTobacco_data"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"12"
class=
"unit_container"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"flakeTobacco_data"
v-if=
"flakeTobacco_data"
>
</AnalyseModule>
</div>
</el-col>
<el-col
:span=
"12"
class=
"unit_container"
style=
"margin-top: 10px"
>
<div
class=
"centenr_container"
>
<AnalyseModule
:module_data=
"swingHandle_data"
v-if=
"swingHandle_data"
>
</AnalyseModule>
</div>
</el-col>
</el-row>
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button
>
</span>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getResults
}
from
'@/api/user'
;
import
{
getResults
,
getUserAnalysisTrend
}
from
'@/api/user'
;
import
TestView
from
'./components/card-view'
;
import
TestView
from
'./components/card-view'
;
import
AnalyseModule
from
'@/components/AnalyseModule/index.vue'
;
export
default
{
export
default
{
name
:
''
,
name
:
''
,
components
:
{
TestView
},
components
:
{
TestView
,
AnalyseModule
},
data
()
{
data
()
{
return
{
return
{
imageUrl
:
''
,
imageUrl
:
''
,
upload_url
:
`
${
process
.
env
.
VUE_APP_BASE_API
}
`
,
upload_url
:
`
${
process
.
env
.
VUE_APP_BASE_API
}
`
,
user_info
:
{},
user_info
:
{},
test_results
:
[],
test_results
:
[],
dialogVisible
:
false
,
reverse
:
true
,
reverse
:
true
,
//把烟统计数据
holdTobacco_data
:
null
,
//片烟统计数据
flakeTobacco_data
:
null
,
//甩把统计数据
swingHandle_data
:
null
,
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -291,7 +360,146 @@ export default {
...
@@ -291,7 +360,146 @@ export default {
query
:
{
id
:
row
.
id
},
query
:
{
id
:
row
.
id
},
});
});
},
},
//获取个人趋势性分析
getTrend
()
{
this
.
dialogVisible
=
true
;
getUserAnalysisTrend
().
then
((
res
)
=>
{
this
.
holdTobacco_data
=
this
.
changeHoldTobacco
(
res
.
analysis
.
holdTobacco
);
//把烟
this
.
flakeTobacco_data
=
this
.
changeFlakeTobacco
(
res
.
analysis
.
flakeTobacco
);
//片烟
this
.
swingHandle_data
=
this
.
changeSwingHandle
(
res
.
analysis
.
swingHandle
);
//甩把
});
},
//处理把烟
changeHoldTobacco
(
datas
)
{
// if (!datas) return false;
if
(
!
datas
)
{
datas
=
[];
}
let
keys
=
Object
.
keys
(
datas
);
let
labers
=
[
{
label
:
'全部'
,
key
:
'all'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
let
obj
=
{
all
:
datas
.
all
,
south
:
datas
.
south
,
north
:
datas
.
north
,
positive
:
datas
.
positive
,
deputy
:
datas
.
deputy
,
south_positive
:
datas
.
south_positive
,
south_deputy
:
datas
.
south_deputy
,
north_positive
:
datas
.
north_positive
,
north_deputy
:
datas
.
north_deputy
,
title
:
datas
.
title
,
};
return
{
type
:
'trend_analysis'
,
chart_id
:
'holdtobacco_bar_chart'
,
title
:
'把烟'
,
color
:
'#39c183f0'
,
// print_id: 'holdtobacco_bar_chart',
obj
,
labers
,
keys
,
};
},
//处理片烟
changeFlakeTobacco
(
datas
)
{
// if (!datas) return false;
if
(
!
datas
)
{
datas
=
[];
}
let
keys
=
Object
.
keys
(
datas
);
let
labers
=
[
{
label
:
'全部'
,
key
:
'all'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
let
obj
=
{
all
:
datas
.
all
,
south
:
datas
.
south
,
north
:
datas
.
north
,
positive
:
datas
.
positive
,
deputy
:
datas
.
deputy
,
south_positive
:
datas
.
south_positive
,
south_deputy
:
datas
.
south_deputy
,
north_positive
:
datas
.
north_positive
,
north_deputy
:
datas
.
north_deputy
,
title
:
datas
.
title
,
};
return
{
type
:
'trend_analysis'
,
chart_id
:
'flakeTobacco_bar_chart'
,
title
:
'片烟'
,
color
:
'#E6A23C'
,
// print_id: 'flakeTobacco_bar_chart',
obj
,
labers
,
keys
,
};
},
//处理甩把
changeSwingHandle
(
datas
)
{
// if (!datas) return false;
if
(
!
datas
)
{
datas
=
[];
}
let
keys
=
Object
.
keys
(
datas
);
let
labers
=
[
{
label
:
'全部'
,
key
:
'all'
},
{
label
:
'南方'
,
key
:
'south'
},
{
label
:
'北方'
,
key
:
'north'
},
{
label
:
'正组'
,
key
:
'positive'
},
{
label
:
'副组'
,
key
:
'deputy'
},
{
label
:
'南方正组'
,
key
:
'south_positive'
},
{
label
:
'南方副组'
,
key
:
'south_deputy'
},
{
label
:
'北方正组'
,
key
:
'north_positive'
},
{
label
:
'北方副组'
,
key
:
'north_deputy'
},
];
let
obj
=
{
all
:
datas
.
all
,
south
:
datas
.
south
,
north
:
datas
.
north
,
positive
:
datas
.
positive
,
deputy
:
datas
.
deputy
,
south_positive
:
datas
.
south_positive
,
south_deputy
:
datas
.
south_deputy
,
north_positive
:
datas
.
north_positive
,
north_deputy
:
datas
.
north_deputy
,
title
:
datas
.
title
,
};
return
{
type
:
'trend_analysis'
,
chart_id
:
'swingHandle_bar_chart'
,
title
:
'甩把'
,
color
:
'#E6A23C'
,
obj
,
labers
,
keys
,
};
},
handleAvatarSuccess
(
res
,
file
)
{
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
},
},
...
@@ -551,4 +759,14 @@ export default {
...
@@ -551,4 +759,14 @@ export default {
width
:
100%
;
width
:
100%
;
}
}
}
}
.title_box
{
padding
:
10px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.head_icon_box
{
width
:
20px
;
cursor
:
pointer
;
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论