Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
huaxin-rq
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
huaxin-rq
Commits
6ee1e780
Commit
6ee1e780
authored
Jun 06, 2026
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工商业安检量统计
parent
409ca0e0
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
447 additions
and
2 deletions
+447
-2
TTaskInspectController.java
...hong/web/controller/checktask/TTaskInspectController.java
+24
-0
TTaskInspectMapper.java
...ain/java/com/zehong/system/mapper/TTaskInspectMapper.java
+8
-0
ITTaskInspectService.java
.../java/com/zehong/system/service/ITTaskInspectService.java
+16
-0
TTaskInspectServiceImpl.java
...m/zehong/system/service/impl/TTaskInspectServiceImpl.java
+45
-0
TTaskInspectMapper.xml
...m/src/main/resources/mapper/system/TTaskInspectMapper.xml
+56
-2
inspect.js
huaxin-web/src/api/checktask/inspect.js
+20
-0
index.vue
...hecktask/businessInspectnumstatisticbyinspector/index.vue
+139
-0
index.vue
...hecktask/industryInspectnumstatisticbyinspector/index.vue
+139
-0
No files found.
huaxin-admin/src/main/java/com/zehong/web/controller/checktask/TTaskInspectController.java
View file @
6ee1e780
...
@@ -290,4 +290,28 @@ public class TTaskInspectController extends BaseController
...
@@ -290,4 +290,28 @@ public class TTaskInspectController extends BaseController
public
AjaxResult
inspectNumStatisticByInspectorForWeiXin
(
@RequestBody
Map
<
String
,
String
>
param
){
public
AjaxResult
inspectNumStatisticByInspectorForWeiXin
(
@RequestBody
Map
<
String
,
String
>
param
){
return
AjaxResult
.
success
(
tTaskInspectService
.
inspectNumStatisticByInspectorForWeiXin
(
param
));
return
AjaxResult
.
success
(
tTaskInspectService
.
inspectNumStatisticByInspectorForWeiXin
(
param
));
}
}
/**
* 工商业安检量统计
* @param param 入参
* @return
*/
@PostMapping
(
"/inspectNumStatisticByInspectorAndType"
)
public
AjaxResult
inspectNumStatisticByInspectorAndType
(
@RequestBody
Map
<
String
,
String
>
param
){
return
AjaxResult
.
success
(
tTaskInspectService
.
inspectNumStatisticByInspectorAndType
(
param
));
}
/**
* 根据安检人统计安检量导出
* @param param
* @return
*/
@PostMapping
(
"/inspectNumStatisticByInspectorAndTypeExport"
)
public
AjaxResult
inspectNumStatisticByInspectorAndTypeExport
(
@RequestBody
Map
<
String
,
String
>
param
){
List
<
InspectNumStatisticByInspectorExportVo
>
list
=
tTaskInspectService
.
inspectNumStatisticByInspectorAndTypeExport
(
param
);
ExcelUtil
<
InspectNumStatisticByInspectorExportVo
>
util
=
new
ExcelUtil
<>(
InspectNumStatisticByInspectorExportVo
.
class
);
return
util
.
exportExcel
(
list
,
"安检量统计数据"
);
}
}
}
huaxin-system/src/main/java/com/zehong/system/mapper/TTaskInspectMapper.java
View file @
6ee1e780
...
@@ -129,4 +129,12 @@ public interface TTaskInspectMapper
...
@@ -129,4 +129,12 @@ public interface TTaskInspectMapper
* @return
* @return
*/
*/
Map
<
String
,
Object
>
inspectNumStatisticByTask
(
Map
<
String
,
String
>
param
);
Map
<
String
,
Object
>
inspectNumStatisticByTask
(
Map
<
String
,
String
>
param
);
/**
* 工商业安检量统计
* @param param 入参
* @return
*/
List
<
Map
<
String
,
Object
>>
inspectNumStatisticByInspectorAndType
(
Map
<
String
,
String
>
param
);
}
}
huaxin-system/src/main/java/com/zehong/system/service/ITTaskInspectService.java
View file @
6ee1e780
...
@@ -121,4 +121,20 @@ public interface ITTaskInspectService
...
@@ -121,4 +121,20 @@ public interface ITTaskInspectService
* @return
* @return
*/
*/
Map
<
String
,
Object
>
inspectNumStatisticByInspectorForWeiXin
(
Map
<
String
,
String
>
param
);
Map
<
String
,
Object
>
inspectNumStatisticByInspectorForWeiXin
(
Map
<
String
,
String
>
param
);
/**
* 工商业安检量统计
* @param param 入参
* @return
*/
List
<
Map
<
String
,
Object
>>
inspectNumStatisticByInspectorAndType
(
Map
<
String
,
String
>
param
);
/**
* 安检量统计导出
* @param param 入参
* @return
*/
List
<
InspectNumStatisticByInspectorExportVo
>
inspectNumStatisticByInspectorAndTypeExport
(
Map
<
String
,
String
>
param
);
}
}
huaxin-system/src/main/java/com/zehong/system/service/impl/TTaskInspectServiceImpl.java
View file @
6ee1e780
...
@@ -356,4 +356,49 @@ public class TTaskInspectServiceImpl implements ITTaskInspectService
...
@@ -356,4 +356,49 @@ public class TTaskInspectServiceImpl implements ITTaskInspectService
result
.
put
(
"taskStatisticInfo"
,
tTaskInspectMapper
.
inspectNumStatisticByTask
(
param
));
result
.
put
(
"taskStatisticInfo"
,
tTaskInspectMapper
.
inspectNumStatisticByTask
(
param
));
return
result
;
return
result
;
}
}
/**
* 工商业安检量统计
* @param param 入参
* @return
*/
@Override
public
List
<
Map
<
String
,
Object
>>
inspectNumStatisticByInspectorAndType
(
Map
<
String
,
String
>
param
){
return
tTaskInspectMapper
.
inspectNumStatisticByInspectorAndType
(
param
);
}
/**
* 安检量统计导出
* @param param 入参
* @return
*/
@Override
public
List
<
InspectNumStatisticByInspectorExportVo
>
inspectNumStatisticByInspectorAndTypeExport
(
Map
<
String
,
String
>
param
){
List
<
InspectNumStatisticByInspectorExportVo
>
export
=
new
ArrayList
<>();
//获取汇总信息
List
<
Map
<
String
,
Object
>>
result
=
inspectNumStatisticByInspectorAndType
(
param
);
InspectNumStatisticByInspectorExportVo
statisticInfo
=
new
InspectNumStatisticByInspectorExportVo
();
statisticInfo
.
setInspector
(
"汇总"
);
statisticInfo
.
setNoInspectNum
(
"-"
);
export
.
add
(
statisticInfo
);
for
(
Map
info
:
result
){
ObjectMapper
objectMapper
=
new
ObjectMapper
();
InspectNumStatisticByInspectorExportVo
exportInfo
=
objectMapper
.
convertValue
(
info
,
InspectNumStatisticByInspectorExportVo
.
class
);
int
total
=
(
int
)
info
.
get
(
"normalInspectNum"
)
+
(
int
)
info
.
get
(
"refuseInspectNum"
)
+
(
int
)
info
.
get
(
"stopInspectNum"
)
+
(
int
)
info
.
get
(
"missInspectNum"
);
exportInfo
.
setTotal
(
total
);
//statisticInfo.setNoInspectNum(statisticInfo.getNoInspectNum() + (int) info.get("noInspectNum"));
statisticInfo
.
setNormalInspectNum
(
statisticInfo
.
getNormalInspectNum
()
+
(
int
)
info
.
get
(
"normalInspectNum"
));
statisticInfo
.
setRefuseInspectNum
(
statisticInfo
.
getRefuseInspectNum
()
+
(
int
)
info
.
get
(
"refuseInspectNum"
));
statisticInfo
.
setStopInspectNum
(
statisticInfo
.
getStopInspectNum
()
+
(
int
)
info
.
get
(
"stopInspectNum"
));
statisticInfo
.
setMissInspectNum
(
statisticInfo
.
getMissInspectNum
()
+
(
int
)
info
.
get
(
"missInspectNum"
));
statisticInfo
.
setDangerNum
(
statisticInfo
.
getDangerNum
()
+
(
int
)
info
.
get
(
"dangerNum"
));
statisticInfo
.
setNoDangerNum
(
statisticInfo
.
getNoDangerNum
()
+
(
int
)
info
.
get
(
"noDangerNum"
));
statisticInfo
.
setTotal
(
statisticInfo
.
getTotal
()
+
total
);
export
.
add
(
exportInfo
);
}
return
export
;
}
}
}
huaxin-system/src/main/resources/mapper/system/TTaskInspectMapper.xml
View file @
6ee1e780
...
@@ -472,7 +472,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -472,7 +472,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
INNER JOIN (
INNER JOIN (
SELECT receive_id, MAX(id) AS max_id
SELECT receive_id, MAX(id) AS max_id
FROM t_task_inspect
FROM t_task_inspect
WHERE `status` != -1
WHERE `status` != -1
and `type` = '1'
GROUP BY receive_id
GROUP BY receive_id
) latest ON i.id = latest.max_id
) latest ON i.id = latest.max_id
) inspect
) inspect
...
@@ -556,7 +556,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -556,7 +556,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN t_user u ON u.id = inspect.receive_id
LEFT JOIN t_user u ON u.id = inspect.receive_id
</if>
</if>
<where>
<where>
task.status = 0
task.status = 0
and task.type = '1'
<if
test=
"village != null"
>
and u.village = #{village}
</if>
<if
test=
"village != null"
>
and u.village = #{village}
</if>
<if
test=
"street != null"
>
and u.street = #{street}
</if>
<if
test=
"street != null"
>
and u.street = #{street}
</if>
<if
test=
"memberId != null"
>
and gr.user_id = #{memberId}
</if>
<if
test=
"memberId != null"
>
and gr.user_id = #{memberId}
</if>
...
@@ -564,4 +564,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -564,4 +564,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY task.id
GROUP BY task.id
)statistic
)statistic
</select>
</select>
<!-- 工商业安检量统计 -->
<select
id=
"inspectNumStatisticByInspectorAndType"
parameterType=
"Map"
resultType=
"Map"
>
SELECT
COUNT(inspect.id) AS totalInspectNum,
SUM(IF(inspect. STATUS = 0, 1, 0)) AS missInspectNum,
SUM(IF(inspect. STATUS = 1, 1, 0)) AS refuseInspectNum,
SUM(IF(inspect. STATUS = 2, 1, 0)) AS normalInspectNum,
SUM(IF(inspect. STATUS = 3, 1, 0)) AS stopInspectNum,
SUM(IF(inspect.danger = 1, 1, 0)) AS dangerNum,
SUM(IF(inspect.danger = 1, 0, 1)) AS noDangerNum,
inspect.member_id AS memberId,
inspect.task_id AS taskId,
(
SELECT
nick_name
FROM
sys_user
WHERE
user_id = inspect.member_id
) AS inspector
FROM
(
SELECT
i.id,
i.task_id,
i.member_id,
i. STATUS,
i.danger,
i.create_time,
i.receive_id
FROM
t_task_inspect i
INNER JOIN (
SELECT
receive_id,
MAX(id) AS max_id
FROM
t_task_inspect
WHERE
`status` != - 1 and type = #{type}
GROUP BY
receive_id
) latest ON i.id = latest.max_id
) inspect
LEFT JOIN t_task task ON task.id = inspect.task_id
<where>
task.status = 0
<if
test=
"beginTime != null and endTime != null"
>
and inspect.create_time between #{beginTime} and #{endTime}
</if>
<if
test=
"memberId != null"
>
and inspect.member_id = #{memberId}
</if>
</where>
GROUP BY inspect.member_id,inspect.task_id;
</select>
</mapper>
</mapper>
\ No newline at end of file
huaxin-web/src/api/checktask/inspect.js
View file @
6ee1e780
...
@@ -149,3 +149,23 @@ export function inspectNumStatisticByInspectorExport(data) {
...
@@ -149,3 +149,23 @@ export function inspectNumStatisticByInspectorExport(data) {
data
:
data
data
:
data
})
})
}
}
//工商业安检人统计安检量
export
function
inspectNumStatisticByInspectorAndType
(
data
)
{
return
request
({
url
:
'/checktask/inspect/inspectNumStatisticByInspectorAndType'
,
method
:
'post'
,
data
:
data
})
}
//工商业安检人统计安检量导出
export
function
inspectNumStatisticByInspectorAndTypeExport
(
data
)
{
return
request
({
url
:
'/checktask/inspect/inspectNumStatisticByInspectorAndTypeExport'
,
method
:
'post'
,
data
:
data
})
}
huaxin-web/src/views/checktask/businessInspectnumstatisticbyinspector/index.vue
0 → 100644
View file @
6ee1e780
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
label-width=
"130px"
>
<el-form-item
label=
"起止时间"
>
<el-date-picker
v-model=
"time"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
size=
"small"
@
change=
"timeChange"
value-format=
"yyyy-MM-dd"
:clearable=
"false"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"inspectStatisticInfoList"
>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"inspector"
/>
<!--
<el-table-column
label=
"待安检单数"
align=
"center"
prop=
"noInspectNum"
/>
-->
<el-table-column
label=
"正常安检"
align=
"center"
prop=
"normalInspectNum"
/>
<el-table-column
label=
"拒绝安检"
align=
"center"
prop=
"refuseInspectNum"
/>
<el-table-column
label=
"燃气停用"
align=
"center"
prop=
"stopInspectNum"
/>
<el-table-column
label=
"到访不遇"
align=
"center"
prop=
"missInspectNum"
/>
<el-table-column
label=
"有隐患单数"
align=
"center"
prop=
"dangerNum"
/>
<el-table-column
label=
"无隐患单数"
align=
"center"
prop=
"noDangerNum"
/>
<el-table-column
label=
"汇总"
align=
"center"
prop=
"total"
/>
</el-table>
</div>
</
template
>
<
script
>
import
{
inspectNumStatisticByInspectorAndType
,
inspectNumStatisticByInspectorAndTypeExport
}
from
"@/api/checktask/inspect"
;
import
moment
from
'moment'
;
export
default
{
name
:
"inspect-statistic-index"
,
data
(){
return
{
queryParams
:{
beginTime
:
moment
(
moment
().
startOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
),
endTime
:
moment
(
moment
().
endOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
),
type
:
'2'
,
},
loading
:
true
,
inspectStatisticInfoList
:
[],
time
:
[
moment
(
moment
().
startOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
),
moment
(
moment
().
endOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
)],
communityData
:
[],
streetData
:
[],
exportLoading
:
false
}
},
created
(){
this
.
getList
();
},
methods
:{
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
queryParams
.
beginTime
=
moment
(
moment
().
startOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
queryParams
.
endTime
=
moment
(
moment
().
endOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
time
=
[
moment
(
moment
().
startOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
),
moment
(
moment
().
endOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
)];
this
.
handleQuery
();
},
getList
(){
this
.
loading
=
true
;
inspectNumStatisticByInspectorAndType
(
this
.
queryParams
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
inspectStatisticInfoList
=
res
.
data
;
let
statistic
=
{
inspector
:
"汇总"
,
noInspectNum
:
"-"
,
normalInspectNum
:
0
,
refuseInspectNum
:
0
,
stopInspectNum
:
0
,
missInspectNum
:
0
,
dangerNum
:
0
,
noDangerNum
:
0
,
total
:
0
};
this
.
inspectStatisticInfoList
.
forEach
(
item
=>
{
let
total
=
item
.
normalInspectNum
+
item
.
refuseInspectNum
+
item
.
stopInspectNum
+
item
.
missInspectNum
;
//statistic.noInspectNum += item.noInspectNum;
statistic
.
normalInspectNum
+=
item
.
normalInspectNum
;
statistic
.
refuseInspectNum
+=
item
.
refuseInspectNum
;
statistic
.
stopInspectNum
+=
item
.
stopInspectNum
;
statistic
.
missInspectNum
+=
item
.
missInspectNum
;
statistic
.
dangerNum
+=
item
.
dangerNum
;
statistic
.
noDangerNum
+=
item
.
noDangerNum
;
statistic
.
total
+=
total
;
item
.
total
=
total
;
})
this
.
inspectStatisticInfoList
.
unshift
(
statistic
);
}
})
},
timeChange
(
val
){
this
.
queryParams
.
beginTime
=
val
[
0
]
+
" 00:00:00"
;
this
.
queryParams
.
endTime
=
val
[
1
]
+
" 23:59:59"
;
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有安检量统计数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
inspectNumStatisticByInspectorAndTypeExport
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
}
}
</
script
>
<
style
scoped
>
</
style
>
huaxin-web/src/views/checktask/industryInspectnumstatisticbyinspector/index.vue
0 → 100644
View file @
6ee1e780
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
label-width=
"130px"
>
<el-form-item
label=
"起止时间"
>
<el-date-picker
v-model=
"time"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
size=
"small"
@
change=
"timeChange"
value-format=
"yyyy-MM-dd"
:clearable=
"false"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"inspectStatisticInfoList"
>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"inspector"
/>
<!--
<el-table-column
label=
"待安检单数"
align=
"center"
prop=
"noInspectNum"
/>
-->
<el-table-column
label=
"正常安检"
align=
"center"
prop=
"normalInspectNum"
/>
<el-table-column
label=
"拒绝安检"
align=
"center"
prop=
"refuseInspectNum"
/>
<el-table-column
label=
"燃气停用"
align=
"center"
prop=
"stopInspectNum"
/>
<el-table-column
label=
"到访不遇"
align=
"center"
prop=
"missInspectNum"
/>
<el-table-column
label=
"有隐患单数"
align=
"center"
prop=
"dangerNum"
/>
<el-table-column
label=
"无隐患单数"
align=
"center"
prop=
"noDangerNum"
/>
<el-table-column
label=
"汇总"
align=
"center"
prop=
"total"
/>
</el-table>
</div>
</
template
>
<
script
>
import
{
inspectNumStatisticByInspectorAndType
,
inspectNumStatisticByInspectorAndTypeExport
}
from
"@/api/checktask/inspect"
;
import
moment
from
'moment'
;
export
default
{
name
:
"inspect-statistic-index"
,
data
(){
return
{
queryParams
:{
beginTime
:
moment
(
moment
().
startOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
),
endTime
:
moment
(
moment
().
endOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
),
type
:
'3'
,
},
loading
:
true
,
inspectStatisticInfoList
:
[],
time
:
[
moment
(
moment
().
startOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
),
moment
(
moment
().
endOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
)],
communityData
:
[],
streetData
:
[],
exportLoading
:
false
}
},
created
(){
this
.
getList
();
},
methods
:{
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
queryParams
.
beginTime
=
moment
(
moment
().
startOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
queryParams
.
endTime
=
moment
(
moment
().
endOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
time
=
[
moment
(
moment
().
startOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
),
moment
(
moment
().
endOf
(
'day'
).
toDate
()).
format
(
"YYYY-MM-DD HH:mm:ss"
)];
this
.
handleQuery
();
},
getList
(){
this
.
loading
=
true
;
inspectNumStatisticByInspectorAndType
(
this
.
queryParams
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
inspectStatisticInfoList
=
res
.
data
;
let
statistic
=
{
inspector
:
"汇总"
,
noInspectNum
:
"-"
,
normalInspectNum
:
0
,
refuseInspectNum
:
0
,
stopInspectNum
:
0
,
missInspectNum
:
0
,
dangerNum
:
0
,
noDangerNum
:
0
,
total
:
0
};
this
.
inspectStatisticInfoList
.
forEach
(
item
=>
{
let
total
=
item
.
normalInspectNum
+
item
.
refuseInspectNum
+
item
.
stopInspectNum
+
item
.
missInspectNum
;
//statistic.noInspectNum += item.noInspectNum;
statistic
.
normalInspectNum
+=
item
.
normalInspectNum
;
statistic
.
refuseInspectNum
+=
item
.
refuseInspectNum
;
statistic
.
stopInspectNum
+=
item
.
stopInspectNum
;
statistic
.
missInspectNum
+=
item
.
missInspectNum
;
statistic
.
dangerNum
+=
item
.
dangerNum
;
statistic
.
noDangerNum
+=
item
.
noDangerNum
;
statistic
.
total
+=
total
;
item
.
total
=
total
;
})
this
.
inspectStatisticInfoList
.
unshift
(
statistic
);
}
})
},
timeChange
(
val
){
this
.
queryParams
.
beginTime
=
val
[
0
]
+
" 00:00:00"
;
this
.
queryParams
.
endTime
=
val
[
1
]
+
" 23:59:59"
;
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有安检量统计数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
inspectNumStatisticByInspectorAndTypeExport
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
}
}
</
script
>
<
style
scoped
>
</
style
>
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