Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
9a1746cb
提交
9a1746cb
编写于
12月 02, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
时间段导出查看
上级
3a13d02c
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
219 行增加
和
73 行删除
+219
-73
chartData.js
src/utils/learning/chartData.js
+55
-19
export-download.vue
src/views/learning/export-download.vue
+42
-15
item-data-all.vue
src/views/learning/item-data-all.vue
+1
-1
item-list.vue
src/views/learning/item-list.vue
+121
-38
未找到文件。
src/utils/learning/chartData.js
浏览文件 @
9a1746cb
...
...
@@ -46,7 +46,6 @@ export function recordOption(legendData, xAxisData, seriesData) {
tooltip
:
{
trigger
:
"axis"
,
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
"shadow"
,
// 默认为直线,可选为:'line' | 'shadow'
shadowStyle
:
{
shadowColor
:
'#E3EFED'
,
...
...
@@ -123,11 +122,18 @@ export function certificateOption(xAxisData, seriesJoin, seriesCert, seriesRate)
},
tooltip
:
{
trigger
:
"axis"
,
// axisPointer: {
// type: "cross",
// crossStyle: {
// color: "#999"
// }
// },
axisPointer
:
{
type
:
"cross"
,
crossStyle
:
{
color
:
"#999"
}
type
:
"shadow"
,
// 默认为直线,可选为:'line' | 'shadow'
shadowStyle
:
{
shadowColor
:
'#E3EFED'
,
width
:
36
,
},
},
backgroundColor
:
'rgba(0,0,0,0.7)'
,
formatter
:
function
(
params
)
{
...
...
@@ -285,13 +291,25 @@ export function durationOption(xAxisData, seriesData) {
data
:
xAxisData
,
axisTick
:
{
alignWithLabel
:
true
}
},
axisLine
:
{
//隐藏轴线
show
:
false
},
axisTick
:
{
// 隐藏刻度
show
:
false
},
}
],
yAxis
:
[
{
type
:
"value"
,
name
:
"完成时长 (天)"
name
:
"完成时长 (天)"
,
axisLine
:
{
//隐藏轴线
show
:
false
},
axisTick
:
{
// 隐藏刻度
show
:
false
},
}
],
series
:
[
...
...
@@ -532,9 +550,6 @@ export function examTimes(xAxisData, seriesData) {
},
xAxis
:
[
{
// splitLine: {
// show: false
// },
axisLabel
:
{
interval
:
0
,
},
...
...
@@ -542,7 +557,13 @@ export function examTimes(xAxisData, seriesData) {
data
:
xAxisData
,
axisTick
:
{
alignWithLabel
:
true
}
},
axisLine
:
{
//隐藏轴线
show
:
false
},
axisTick
:
{
// 隐藏刻度
show
:
false
},
}
],
yAxis
:
[
...
...
@@ -551,7 +572,13 @@ export function examTimes(xAxisData, seriesData) {
show
:
true
},
type
:
"value"
,
name
:
"人数 (名)"
name
:
"人数 (名)"
,
axisLine
:
{
//隐藏轴线
show
:
false
},
axisTick
:
{
// 隐藏刻度
show
:
false
},
}
],
series
:
[
...
...
@@ -599,9 +626,6 @@ export function examScore(xAxisData, seriesData) {
},
xAxis
:
[
{
// splitLine: {
// show: false
// },
axisLabel
:
{
interval
:
0
,
},
...
...
@@ -609,7 +633,13 @@ export function examScore(xAxisData, seriesData) {
data
:
xAxisData
,
axisTick
:
{
alignWithLabel
:
true
}
},
axisLine
:
{
//隐藏轴线
show
:
false
},
axisTick
:
{
// 隐藏刻度
show
:
false
},
}
],
yAxis
:
[
...
...
@@ -618,7 +648,13 @@ export function examScore(xAxisData, seriesData) {
show
:
true
},
type
:
"value"
,
name
:
"人数 (名)"
name
:
"人数 (名)"
,
axisLine
:
{
//隐藏轴线
show
:
false
},
axisTick
:
{
// 隐藏刻度
show
:
false
},
}
],
series
:
[
...
...
@@ -639,10 +675,10 @@ export function examScore(xAxisData, seriesData) {
};
return
option
;
}
export
function
ringOption
(
num
,
color
)
{
export
function
ringOption
(
num
,
color
)
{
let
option
=
{
title
:
{
text
:
num
+
'%'
,
text
:
num
+
'%'
,
x
:
'center'
,
y
:
'center'
,
textStyle
:
{
...
...
src/views/learning/export-download.vue
浏览文件 @
9a1746cb
...
...
@@ -4,8 +4,8 @@
<div
class=
"component-content screenSet"
id=
"screenSet"
>
<div
class=
"p-title"
>
任务列表
</div>
<el-tabs
v-model=
"listType"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"查看报告"
name=
"
1
"
></el-tab-pane>
<el-tab-pane
label=
"导出列表"
name=
"
2
"
></el-tab-pane>
<el-tab-pane
label=
"查看报告"
name=
"
2
"
></el-tab-pane>
<el-tab-pane
label=
"导出列表"
name=
"
1
"
></el-tab-pane>
</el-tabs>
<el-table
:data=
"tableData"
class=
"table-export"
style=
"width: 100%"
>
<el-table-column
...
...
@@ -20,7 +20,7 @@
</el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
align=
"left"
min-width=
"30"
>
<
template
slot-scope=
"scope"
>
<span
class=
"logo"
></span>
<span
class=
"logo"
v-bind:class=
"
{ 'logo_0': scope.row.status == 0, 'logo_1': scope.row.status == 1, 'logo_2': scope.row.status == 2 }"
>
</span>
<span
class=
"text"
>
{{
scope
.
row
.
status
|
exportStatus
}}
</span>
</
template
>
</el-table-column>
...
...
@@ -30,8 +30,10 @@
:disabled=
"scope.row.buttonStatus"
size=
"small"
type=
"text"
v-if=
"scope.row.status != 2"
@
click=
"update(scope.row)"
>
{{
scope
.
row
.
buttonText
}}
</el-button>
<div
v-if=
"scope.row.status == 2"
>
-
</div>
</
template
>
</el-table-column>
<div
slot=
"empty"
>
...
...
@@ -69,7 +71,7 @@ export default {
data
()
{
return
{
curmbFirst
:
"学情报告"
,
curmbSecond
:
"
导出下载
"
,
curmbSecond
:
"
任务列表
"
,
projectId
:
""
,
tableData
:
[],
param
:
{
...
...
@@ -79,7 +81,7 @@ export default {
totalRows
:
0
,
totalTime
:
3
,
queryData
:
{},
listType
:
"
1
"
listType
:
"
2
"
// buttonText: "刷新",
// buttonStatus: false,
};
...
...
@@ -89,7 +91,7 @@ export default {
this
.
projectId
=
vm
.
getUrlSearch
(
window
.
location
.
href
,
"projectId"
);
let
listType
=
vm
.
getUrlSearch
(
window
.
location
.
href
,
"listType"
);
if
(
listType
==
null
)
{
vm
.
listType
=
'
1
'
;
vm
.
listType
=
'
2
'
;
}
else
{
vm
.
listType
=
listType
;
}
...
...
@@ -107,7 +109,11 @@ export default {
for
(
let
i
=
0
;
i
<
vm
.
tableData
.
length
;
i
++
)
{
vm
.
tableData
[
i
].
index
=
i
;
if
(
vm
.
tableData
[
i
].
status
==
1
)
{
vm
.
tableData
[
i
].
buttonText
=
"下载"
;
if
(
vm
.
listType
==
'2'
)
{
vm
.
tableData
[
i
].
buttonText
=
"查看报告"
;
}
else
if
(
vm
.
listType
==
'1'
)
{
vm
.
tableData
[
i
].
buttonText
=
"下载"
;
}
vm
.
tableData
[
i
].
buttonStatus
=
false
;
}
else
if
(
vm
.
tableData
[
i
].
status
==
0
)
{
vm
.
tableData
[
i
].
buttonText
=
"刷新"
;
...
...
@@ -138,11 +144,6 @@ export default {
}
});
},
downLoad
(
row
)
{
setTimeout
(()
=>
{
window
.
open
(
row
.
fileUrl
);
},
500
);
},
getDownLoadStatus
(
row
)
{
// let req = {
// id: row.id
...
...
@@ -165,7 +166,12 @@ export default {
// console.log('res.data.data',res.data.data);
if
(
updateStatus
==
1
)
{
vm
.
tableData
[
row
.
index
].
title
=
vm
.
tableData
[
row
.
index
].
title
+
" "
;
vm
.
tableData
[
row
.
index
].
buttonText
=
"下载"
;
// vm.tableData[row.index].buttonText = "下载";
if
(
vm
.
listType
==
'2'
)
{
vm
.
tableData
[
row
.
index
].
buttonText
=
"查看报告"
;
}
else
if
(
vm
.
listType
==
'1'
)
{
vm
.
tableData
[
row
.
index
].
buttonText
=
"下载"
;
}
vm
.
tableData
[
row
.
index
].
fileUrl
=
res
.
data
.
list
[
0
].
url
;
}
else
if
(
updateStatus
==
0
)
{
vm
.
tableData
[
row
.
index
].
title
=
vm
.
tableData
[
row
.
index
].
title
+
" "
;
...
...
@@ -182,9 +188,22 @@ export default {
}
});
},
downLoad
(
row
)
{
setTimeout
(()
=>
{
window
.
open
(
row
.
fileUrl
);
},
500
);
},
exportTime
(
row
)
{
vm
.
$router
.
push
(
"item-list?downloadId="
+
row
.
id
);
},
update
(
row
)
{
if
(
vm
.
tableData
[
row
.
index
].
status
==
1
)
{
vm
.
downLoad
(
row
);
// vm.downLoad(row);
if
(
vm
.
listType
==
'2'
)
{
vm
.
exportTime
(
row
);
}
else
if
(
vm
.
listType
==
'1'
)
{
vm
.
downLoad
(
row
);
}
}
else
{
this
.
$nextTick
(
function
()
{
console
.
log
(
vm
.
tableData
[
row
.
index
]);
...
...
@@ -217,7 +236,7 @@ export default {
},
// 换页
handleCurrentChange
(
val
)
{
vm
.
param
.
pageNo
=
val
ue
;
vm
.
param
.
pageNo
=
val
;
vm
.
search
();
}
}
...
...
@@ -247,8 +266,16 @@ export default {
width
:
6px
;
height
:
6px
;
border-radius
:
50%
;
}
.logo_0
{
background
:
#1890ff
;
}
.logo_1
{
background
:
#52C41A
;
}
.logo_2
{
background
:
#F5222D
;
}
.text
{
float
:
left
;
}
...
...
src/views/learning/item-data-all.vue
浏览文件 @
9a1746cb
...
...
@@ -333,7 +333,7 @@ export default {
vm
.
dataType
=
0
;
}
}
console
.
log
(
'vm.hospitalCnt'
,
vm
.
hospitalCnt
);
//
console.log('vm.hospitalCnt',vm.hospitalCnt);
if
(
vm
.
dataType
==
0
)
{
vm
.
checkRange
=
"1"
;
vm
.
checkTime
=
"1"
,
...
...
src/views/learning/item-list.vue
浏览文件 @
9a1746cb
...
...
@@ -2,7 +2,17 @@
<div
class=
"item-list-wrap"
>
<bread-crumb
:curmbFirst=
"curmbFirst"
:curmbSecond=
"curmbSecond"
:curmbThird=
"curmbThird"
:jumPathThird=
"jumPathThird"
></bread-crumb>
<div
class=
"component-content screenSet"
id=
"screenSet"
>
<el-form
class=
"item-form"
ref=
"formInline"
:model=
"formInline"
label-width=
"80px"
>
<div
v-if=
"staticData == 1"
class=
"item-form"
>
<div
class=
"form-title"
>
查询条件
</div>
<div
class=
"form-p"
>
<p>
选择地区 全部
</p>
<p>
原始数据
</p>
<p>
选择机构 机构
</p>
<p>
选择时间 2018.9.10-2019.5.20
</p>
</div>
<div
class=
"buttom-line"
></div>
</div>
<el-form
v-if=
"staticData == 0"
class=
"item-form"
ref=
"formInline"
:model=
"formInline"
label-width=
"80px"
>
<div
class=
"form-title"
>
查询条件
</div>
<el-form-item
label=
"选择地区:"
>
<!-- :props="props" -->
...
...
@@ -21,7 +31,7 @@
></el-cascader>
</el-col>
<el-col
:span=
"6"
>
<el-checkbox
v-if=
"showOriginal
!
== 1"
size=
"small"
v-model=
"formInline.checked"
>
查看原始数据
</el-checkbox>
<el-checkbox
v-if=
"showOriginal == 1"
size=
"small"
v-model=
"formInline.checked"
>
查看原始数据
</el-checkbox>
</el-col>
</el-form-item>
<el-form-item
label=
"选择机构:"
>
...
...
@@ -53,12 +63,13 @@
>
{{
tag
.
label
}}
</el-tag>
</div>
<el-form-item
label=
"选择时间:"
>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
12
"
>
<el-select
size=
"small"
v-model=
"formInline.timeFlag"
placeholder=
"请选择"
style=
"width:330px;"
@
change=
"changeTimeFlag"
>
<el-option
v-for=
"item in timeFlagList"
...
...
@@ -74,23 +85,23 @@
v-model=
"formInline.during"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"
~
"
range-separator=
"
至
"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-col>
</el-form-item>
<div
class=
"buttom-line"
></div>
<!--
<el-form-item
label
v-if=
"showOriginal !== 1"
>
<el-checkbox
size=
"small"
v-model=
"formInline.checked"
>
查看原始数据
</el-checkbox>
</el-form-item>
-->
<div
class=
"form-button"
>
<div
v-if=
"staticData == 0"
class=
"form-button"
>
<el-button
size=
"small"
@
click=
"search()"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"resetForm()"
>
重置
</el-button>
</div>
</el-form>
<div
class=
"button-group"
>
<el-button
v-if=
"roleType == 1 || roleType == 2"
type=
"default"
size=
"small"
@
click=
"changeDate"
>
数据修改
</el-button>
<!--
<el-button
type=
"default"
size=
"small"
@
click=
"update"
v-else
>
修改范围
</el-button>
-->
<el-button
type=
"default"
size=
"small"
@
click=
"exportPDF"
>
导出PDF
</el-button>
<el-button
type=
"default"
size=
"small"
:disabled=
"exportStatus"
@
click=
"exportExcel"
>
导出明细
</el-button>
</div>
...
...
@@ -149,10 +160,17 @@
</el-tab-pane>
</el-tabs>
<el-dialog
title=
"提示"
:visible
.
sync=
"dialogVisible"
width=
"30%"
center
>
<p
style=
"text-align:center"
>
由于
查询数据较大,预估需要花费 5 小时左右。确定继续生成报告
吗?
</p>
<p
style=
"text-align:center"
>
由于
导出数据较大,预估需要花费 5 小时左右。确定继续导出
吗?
</p>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"exportHttp()"
>
继续生成
</el-button>
<el-button
type=
"primary"
@
click=
"exportHttp()"
>
继续导出
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"提示"
:visible
.
sync=
"dialogSearch"
width=
"30%"
center
>
<p
style=
"text-align:center"
>
由于查询数据较大,预估需要花费 5 小时左右。确定继续生成报告吗?
</p>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogSearch = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"exportTime()"
>
继续生成
</el-button>
</span>
</el-dialog>
<el-dialog
title
:visible
.
sync=
"dialogUpdate"
width=
"80%"
center
>
...
...
@@ -262,7 +280,7 @@ export default {
},
{
value
:
2
,
label
:
'
开始时间结束
时间'
,
label
:
'
自定义
时间'
,
}
],
areaLen
:
1
,
...
...
@@ -272,6 +290,9 @@ export default {
displayCourse
:
1
,
displayEffect
:
1
,
exportReq
:
{},
dialogSearch
:
false
,
downloadId
:
null
,
staticData
:
0
,
};
},
computed
:
{
...
...
@@ -287,7 +308,9 @@ export default {
this
.
projectId
=
vm
.
getUrlSearch
(
window
.
location
.
href
,
"id"
);
this
.
projectName
=
vm
.
getUrlSearch
(
window
.
location
.
href
,
"projectName"
);
this
.
curmbThird
=
vm
.
getUrlSearch
(
window
.
location
.
href
,
"projectName"
);
this
.
getDisplay
();
this
.
downloadId
=
vm
.
getUrlSearch
(
window
.
location
.
href
,
"downloadId"
);
this
.
checkShowType
();
// this.getDisplay();
// this.search();
// this.getRegionOption();
},
...
...
@@ -295,6 +318,26 @@ export default {
commonUtil
.
resizeHeight
();
},
methods
:
{
checkShowType
()
{
if
(
vm
.
downloadId
==
null
)
{
vm
.
getDisplay
();
}
if
(
vm
.
projectId
==
''
||
vm
.
projectId
==
null
)
{
vm
.
staticData
=
1
;
vm
.
exportTimeInfo
();
}
},
exportTimeInfo
()
{
let
req
=
vm
.
exportReq
;
openLoading
(
vm
);
vm
.
GET
(
"stats/export/time/info/"
+
vm
.
downloadId
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
if
(
res
.
code
==
"000000"
)
{
}
else
{
vm
.
$message
(
res
.
message
);
}
});
},
getDisplay
(
type
)
{
let
reqInfo
=
{
projectId
:
vm
.
projectId
,
...
...
@@ -486,18 +529,54 @@ export default {
originalFlag
:
vm
.
formInline
.
checked
==
false
?
0
:
1
,
regionId
:
vm
.
formInline
.
region
[
vm
.
formInline
.
region
.
length
-
1
],
timeFlag
:
vm
.
formInline
.
timeFlag
,
pageNo
:
vm
.
formTable
.
pageNo
,
pageSize
:
vm
.
formTable
.
pageSize
,
};
},
changeTimeFlag
(
value
)
{
if
(
value
==
1
)
{
vm
.
formInline
.
during
=
null
;
}
},
exportTime
()
{
let
req
=
{
projectId
:
vm
.
projectId
,
beginDate
:
operationData
.
setDuringTime
(
vm
.
formInline
.
during
,
"begin"
),
endDate
:
operationData
.
setDuringTime
(
vm
.
formInline
.
during
,
"end"
),
hospitalIdList
:
vm
.
formInline
.
organization
,
originalFlag
:
vm
.
formInline
.
checked
==
false
?
0
:
1
,
regionId
:
vm
.
formInline
.
region
[
vm
.
formInline
.
region
.
length
-
1
],
timeFlag
:
vm
.
formInline
.
timeFlag
,
hospitalNames
:
vm
.
dialogData
.
organization
,
regionNames
:
vm
.
dialogData
.
region
,
};
openLoading
(
vm
);
vm
.
POST
(
"stats/export/time"
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
if
(
res
.
code
==
"000000"
)
{
vm
.
$router
.
push
(
"export-download?projectId="
+
vm
.
projectId
+
'&listType=2'
);
}
else
{
vm
.
$message
(
res
.
message
)
}
vm
.
dialogSearch
=
false
;
});
},
search
()
{
vm
.
setExportReq
();
// console.log(vm.formInline.during);
this
.
$refs
.
childDataAll
.
$emit
(
"search"
);
this
.
$refs
.
childCrowd
.
$emit
(
"search"
);
this
.
$refs
.
childCourse
.
$emit
(
"search"
);
this
.
$refs
.
childExam
.
$emit
(
"search"
);
this
.
$refs
.
childEffect
.
$emit
(
"search"
);
console
.
log
(
vm
.
formInline
);
if
(
vm
.
formInline
.
timeFlag
==
1
)
{
//截止昨日
vm
.
setExportReq
();
this
.
$refs
.
childDataAll
.
$emit
(
"search"
);
this
.
$refs
.
childCrowd
.
$emit
(
"search"
);
this
.
$refs
.
childCourse
.
$emit
(
"search"
);
this
.
$refs
.
childExam
.
$emit
(
"search"
);
this
.
$refs
.
childEffect
.
$emit
(
"search"
);
}
else
if
(
vm
.
formInline
.
timeFlag
==
2
)
{
//开始时间结束时间
if
(
vm
.
formInline
.
during
==
null
)
{
vm
.
$message
(
'自定义时间,请选择时间段!'
)
}
else
{
vm
.
dialogSearch
=
true
;
}
}
// if (this.activeName == "first") {
// this.organizationNum = this.getOrganizationNum();
...
...
@@ -545,27 +624,18 @@ export default {
},
3000
);
this
.
dialogVisible
=
true
;
//download接口
// let checkAll = operationData.hasAll(vm.formInline.organization)
// let req = {
// projectId : vm.projectId,
// ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
// type: operationData.getSearchType(vm.formInline,checkAll),
// originalFlag: vm.formInline.checked == false ? 0 : 1,
// projectName: vm.$route.query.projectName,
// cityName: vm.getCityName(),
// };
// openLoading(vm);
// vm.reportGET("report/downLoad/downLoad", req).then(res => {
// closeLoading(vm);
// // console
// if (res.code == "000000") {
// }
// });
},
exportHttp
()
{
let
req
=
{}
;
let
req
=
vm
.
exportReq
;
openLoading
(
vm
);
vm
.
POST
(
"stats/export/current"
,
req
).
then
(
res
=>
{
closeLoading
(
vm
);
if
(
res
.
code
==
"000000"
)
{
vm
.
$router
.
push
(
"export-download?projectId="
+
vm
.
projectId
+
'&listType=1'
);
}
else
{
vm
.
$message
(
res
.
message
)
}
vm
.
dialogVisible
=
false
;
});
},
getCityName
()
{
...
...
@@ -586,8 +656,6 @@ export default {
};
vm
.
$router
.
push
({
path
:
"export-download"
,
query
:
routerData
});
},
update
()
{},
release
()
{},
setDialogData
()
{
//传递给dialog数据
this
.
dialogData
.
organization
=
""
;
...
...
@@ -683,6 +751,21 @@ export default {
background
:
#fff
;
width
:
100%
;
border-radius
:
4px
4px
0
0
;
.form-p
{
margin
:
17px
0
0
30px
;
line-height
:
20px
;
font-size
:
14px
;
color
:
#666666
;
p
{
margin-bottom
:
12px
;
}
}
.buttom-line
{
margin
:
30px
auto
10px
auto
;
height
:
1px
;
background
:
#E4E7ED
;
width
:
94
.66%
}
.form-title
{
position
:
relative
;
margin
:
20px
0
24px
30px
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录