Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AmosBankPatrolView
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
bank
AmosBankPatrolView
Commits
91e763fb
Commit
91e763fb
authored
Dec 10, 2020
by
吴俊凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
巡检增加业务报表导出功能
parent
8d497755
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
128 deletions
+151
-128
amos.config.js
amos.config.js
+3
-0
urlConsts.js
src/consts/urlConsts.js
+46
-45
CatalogTreeTable.js
src/view/patrol/catalogTree/CatalogTreeTable.js
+20
-29
CheckTable.js
src/view/patrol/check/CheckTable.js
+53
-41
index.js
src/view/patrol/check/index.js
+29
-13
No files found.
amos.config.js
View file @
91e763fb
...
...
@@ -14,6 +14,9 @@
securityBaseURI
:
'http://172.16.10.72:10005/'
,
//APP图片
picURI
:
'http://172.16.11.20:8080'
,
//业务表导出地址
ureportURI
:
' http://172.16.11.41:8099/renren-admin/ureport/excel'
,
},
// websocket 地址
wsURI
:
{
...
...
src/consts/urlConsts.js
View file @
91e763fb
...
...
@@ -12,6 +12,7 @@ const mockURI = AmosConfig.httpURI.baseURI;
const
fileURI
=
AmosConfig
.
httpURI
.
fileURI
;
const
baseURI
=
AmosConfig
.
httpURI
.
baseURI
;
const
picURI
=
AmosConfig
.
httpURI
.
picURI
;
const
ureportURI
=
AmosConfig
.
httpURI
.
ureportURI
;
const
preControl
=
AmosConfig
.
httpURI
.
baseURI
;
const
secExVerson
=
'v1'
;
...
...
@@ -21,15 +22,15 @@ export const SecurityUrl = completeSecurityUrl(securityBaseURI);
export
const
SecurityWsUrl
=
completeSecurityWsUrl
(
securityBaseWsURI
);
export
const
XJBaseURI
=
baseURI
;
export
const
PICURI
=
picURI
;
export
const
UREPORTURI
=
ureportURI
;
export
const
secExtUrl
=
{
//*************************************
// op 内置接口url
//*************************************
opMenusUrl
:
completePrefix
(
securityBaseURI
,
'permissionItem/allPermission-tree'
),
opSearchMenusUrl
:
completePrefix
(
securityBaseURI
,
'permissionItem/searchPermission-tree?nodeName={nodeName}&type={type}'
),
orgManageTreeUrl
:
completePrefix
(
securityBaseURI
,
'company/manage-tree'
),
//组织机构树
allRoleUrl
:
completePrefix
(
securityBaseURI
,
'role/all-roles'
),
//所有角色
opSearchMenusUrl
:
completePrefix
(
securityBaseURI
,
'permissionItem/searchPermission-tree?nodeName={nodeName}&type={type}'
),
orgManageTreeUrl
:
completePrefix
(
securityBaseURI
,
'company/manage-tree'
),
//组织机构树
allRoleUrl
:
completePrefix
(
securityBaseURI
,
'role/all-roles'
),
//所有角色
// 新权限接口
...
...
@@ -48,28 +49,26 @@ export const secExtUrl = {
loginOutUrl
:
completePrefix
(
securityBaseURI
,
`
${
secExVerson
}
/system/loginOutr`
),
// 登陆用户系统权限菜单
curUserMenusUrl
:
completePrefix
(
securityBaseURI
,
'privilege/v1/permission/tree/me'
),
//查询当前用户菜单
curRoleMenusUrl
:
completePrefix
(
securityBaseURI
,
'privilege/v1/permission/tree/role?roleSeq={roleSeq}'
),
//查询当前角色菜单树
curUserInfoUrl
:
completePrefix
(
securityBaseURI
,
'privilege/v1/agencyuser/me'
),
//查询当前用户信息
curUserMenusUrl
:
completePrefix
(
securityBaseURI
,
'privilege/v1/permission/tree/me'
),
//查询当前用户菜单
curRoleMenusUrl
:
completePrefix
(
securityBaseURI
,
'privilege/v1/permission/tree/role?roleSeq={roleSeq}'
),
//查询当前角色菜单树
curUserInfoUrl
:
completePrefix
(
securityBaseURI
,
'privilege/v1/agencyuser/me'
),
//查询当前用户信息
//searchCompanysUrl: completePrefix(securityBaseURI,'/privilege/v1/company/tree'),//查询公司
searchCompanysUrl
:
completePrefix
(
securityBaseURI
,
`
${
secExVerson
}
/user/me`
),
// 获取当前登陆用户信息
searchDepartmentUrl
:
completePrefix
(
securityBaseURI
,
'/privilege/v1/department/tree?companySeq={companySeq}'
),
//查询部门
searchRolesUrl
:
completePrefix
(
securityBaseURI
,
'privilege/v1/role/list'
),
//查询角色
searchDepartmentUrl
:
completePrefix
(
securityBaseURI
,
'/privilege/v1/department/tree?companySeq={companySeq}'
),
//查询部门
searchRolesUrl
:
completePrefix
(
securityBaseURI
,
'privilege/v1/role/list'
),
//查询角色
//currentUserUrl: completePrefix(securityBaseURI, `${secExVerson}/user/me`), // 获取当前登陆用户信息
currentUserUrl
:
completePrefix
(
securityBaseURI
,
`privilege/
${
secExVerson
}
/agencyuser/me`
)
,
// 获取当前登陆用户信息(新)
currentUserUrl
:
completePrefix
(
securityBaseURI
,
`privilege/
${
secExVerson
}
/agencyuser/me`
)
// 获取当前登陆用户信息(新)
};
export
const
filePrifixUrl
=
(
url
)
=>
completePrefix
(
fileURI
,
url
);
export
const
filePrifixUrl
=
url
=>
completePrefix
(
fileURI
,
url
);
export
const
fileSystemUrl
=
(
url
,
defaultUrl
)
=>
{
return
url
?
completePrefix
(
fileURI
,
url
)
:
defaultUrl
;
};
export
const
patrolUrls
=
{
regionSelectUrl
:
completePrefix
(
baseURI
,
'safe/save/curCompany'
),
//保存登录用户信息
inputItemTablesUrl
:
completePrefix
(
baseURI
,
'api/inputItem/queryItemByPage?pageNumber={page}&pageSize={size}'
),
...
...
@@ -88,7 +87,7 @@ export const patrolUrls = {
deptByOrgCodeUrl1
:
completePrefix
(
baseURI
,
'api/group/queryDept1'
),
deptByOrgCodeUrl2
:
completePrefix
(
baseURI
,
'api/group/queryDept2'
),
userInfoByDeptIdUrl
:
completePrefix
(
baseURI
,
'api/user/queryDeptUser?deptId={deptId}'
),
userTreeGetByCompanyIdUrl
:
completePrefix
(
securityBaseURI
,
'/user/user-tree/{companyId}?roleType={roleType}'
),
// 获取公司下属所有部门及部门下的用户构建的树(可指定角色类型)
userTreeGetByCompanyIdUrl
:
completePrefix
(
securityBaseURI
,
'/user/user-tree/{companyId}?roleType={roleType}'
),
// 获取公司下属所有部门及部门下的用户构建的树(可指定角色类型)
taskPageUrl
:
completePrefix
(
baseURI
,
'api/task/queryTaskByPage?pageNumber={page}&pageSize={size}'
),
taskBatchDelUrl
:
completePrefix
(
baseURI
,
'api/task/batchDelTask?taskIDs={ids}'
),
taskHandleUrl
:
completePrefix
(
baseURI
,
'api/task/handleTask?taskIds={ids}&status={status}'
),
...
...
@@ -123,7 +122,7 @@ export const patrolUrls = {
pointQueryByIdUrl
:
completePrefix
(
baseURI
,
'api/point/queryPointById/{pointId}'
),
planInfoNoPageUrl
:
completePrefix
(
baseURI
,
'api/plan/queryPlanByOrgCode'
),
taskPrintUrl
:
completePrefix
(
baseURI
,
'api/task/printTask?taskID={taskID}'
),
// pointInputItemQueryUrl: completePrefix(baseURI, 'api/point/queryPointInputItem?pointId={pointId}'), // pointInputItemUrl
// pointInputItemQueryUrl: completePrefix(baseURI, 'api/point/queryPointInputItem?pointId={pointId}'), // pointInputItemUrl
pointClassifyWithInputItemQueryUrl
:
completePrefix
(
baseURI
,
'api/point/queryPointClassifyWithInputItem?pointId={pointId}'
),
routePointInputItemUrl
:
completePrefix
(
baseURI
,
'api/route/listRoutePointInputItem'
),
routePointInputItemUpdateUrl
:
completePrefix
(
baseURI
,
'/api/route/updateRoutePointInputItem?routeId={routeId}&pointId={pointId}&inputItemIds={inputItemIds}'
),
...
...
@@ -155,37 +154,40 @@ export const patrolUrls = {
itemNoQueryUrl
:
completePrefix
(
baseURI
,
'api/inputItem/queryItemNo/{itemId}'
),
exchangeOrderNumberUrl
:
completePrefix
(
baseURI
,
'/api/route/exchangeOrderNumber?src={src}&target={target}'
),
//消息提醒
getNewsListUrl
:
completePrefix
(
baseURI
,
'api/msgSubscribe/list?pageNumber={page}&pageSize={size}'
),
//分页获取消息提醒集合
sendNewsUrl
:
completePrefix
(
baseURI
,
'api/msgSubscribe/noticePublish'
),
//发送消息通知
repeatNewsUrl
:
completePrefix
(
baseURI
,
''
),
//重发消息
deleteNewsUrl
:
completePrefix
(
baseURI
,
''
),
//删除消息提醒
newsTypeListUrl
:
completePrefix
(
baseURI
,
'api/msgSubscribe/MsgType'
),
//获取消息类型集合
newsPersonDataUrl
:
completePrefix
(
baseURI
,
'api/user/queryDeptUserTree'
),
//获取消息接受人员
newsPersonDataUrl2
:
completePrefix
(
baseURI
,
'api/user/queryDeptUserTree1'
),
//获取消息接受人员
newsPersonDataUrl3
:
completePrefix
(
baseURI
,
'api/user/queryDeptUserTree2'
),
//获取消息接受人员
getNewsListUrl
:
completePrefix
(
baseURI
,
'api/msgSubscribe/list?pageNumber={page}&pageSize={size}'
),
//分页获取消息提醒集合
sendNewsUrl
:
completePrefix
(
baseURI
,
'api/msgSubscribe/noticePublish'
),
//发送消息通知
repeatNewsUrl
:
completePrefix
(
baseURI
,
''
),
//重发消息
deleteNewsUrl
:
completePrefix
(
baseURI
,
''
),
//删除消息提醒
newsTypeListUrl
:
completePrefix
(
baseURI
,
'api/msgSubscribe/MsgType'
),
//获取消息类型集合
newsPersonDataUrl
:
completePrefix
(
baseURI
,
'api/user/queryDeptUserTree'
),
//获取消息接受人员
newsPersonDataUrl2
:
completePrefix
(
baseURI
,
'api/user/queryDeptUserTree1'
),
//获取消息接受人员
newsPersonDataUrl3
:
completePrefix
(
baseURI
,
'api/user/queryDeptUserTree2'
),
//获取消息接受人员
//查询统计
completionSituationUrl
:
completePrefix
(
baseURI
,
'api/task/report/{statistical}?startDate={startDate}&endDate={endDate}&planId={planId}&routeId={routeId}'
),
completionSituationExportUrl
:
completePrefix
(
baseURI
,
'api/excel/task/{statistical}?startDate={startDate}&endDate={endDate}&planId={planId}&routeId={routeId}'
),
//巡检完成情况月报表-表格导出
caliberListUrl
:
completePrefix
(
baseURI
,
'api/common/checkStatisticsType'
),
//巡检完成情况月报表-获取统计口径集合
planListUrl
:
completePrefix
(
baseURI
,
'api/plan/queryPlanList'
),
//巡检完成情况月报表-获取所属计划集合
lineListUrl
:
completePrefix
(
baseURI
,
'api/route/routeList'
),
//巡检完成情况月报表-所属线路集合
executeStateListUrl
:
completePrefix
(
baseURI
,
'api/common/planTaskExecution'
),
//巡检情况统计分析-执行情况集合
inspectionSituationListUrl
:
completePrefix
(
baseURI
,
'api/check/statisticalAnalysis'
),
//巡检情况统计分析-表格
inspectionSituationExportUrl
:
completePrefix
(
baseURI
,
'api/check/exportStatisticalAnalysis'
),
//巡检情况统计分析-表格导出
taskArrangementListUrl
:
completePrefix
(
baseURI
,
'api/task/getStatisticsData'
),
//任务安排统计分析-表格
taskArrangementExportUrl
:
completePrefix
(
baseURI
,
'api/task/exportStatisticsData'
),
//任务安排统计分析-表格导出
taskCaliberListUrl
:
completePrefix
(
baseURI
,
'api/common/taskgetStatisticsType'
),
//任务安排统计分析-获取任务统计口径集合
personStatisticsUrl
:
completePrefix
(
baseURI
,
'api/task/report/comprehensive/user?startTime={startTime}&endTime={endTime}'
),
//人员综合统计分析-表格
personStatisticsExportUrl
:
completePrefix
(
baseURI
,
'api/excel/comprehensive/user?startTime={startTime}&endTime={endTime}'
),
//人员综合统计分析-表格导出
monthSituationUrl
:
completePrefix
(
baseURI
,
'api/check/statisticalByMonth'
),
//月度巡检情况-表格
monthSituationExportUrl
:
completePrefix
(
baseURI
,
'api/check/exportStatisticalByMonth'
),
//月度巡检情况-表格导出
daySituationExportUrl
:
completePrefix
(
baseURI
,
'api/check/exportByDept'
),
//每日巡检情况-表格导出
homeNumberUrl
:
completePrefix
(
baseURI
,
'api/home/overviewData'
),
//巡检首页-获取公司名、巡检点数、完成/计划、累计巡检次数、未完/已完任务数和巡检点数
homeChartUrl
:
completePrefix
(
baseURI
,
'api/home/getCheckData'
),
//巡检首页-获取12日内 实际巡检、计划巡检和漏检次数每天的数值
currentCompanyUrl
:
completePrefix
(
baseURI
,
'api/user/queryLoginUserAndCompany'
),
//当前系统公司信息
SpecCheckDetailUrl
:
completePrefix
(
baseURI
,
'api/spc/check-detail'
),
//查询检查项详情
completionSituationExportUrl
:
completePrefix
(
baseURI
,
'api/excel/task/{statistical}?startDate={startDate}&endDate={endDate}&planId={planId}&routeId={routeId}'
),
//巡检完成情况月报表-表格导出
caliberListUrl
:
completePrefix
(
baseURI
,
'api/common/checkStatisticsType'
),
//巡检完成情况月报表-获取统计口径集合
planListUrl
:
completePrefix
(
baseURI
,
'api/plan/queryPlanList'
),
//巡检完成情况月报表-获取所属计划集合
lineListUrl
:
completePrefix
(
baseURI
,
'api/route/routeList'
),
//巡检完成情况月报表-所属线路集合
executeStateListUrl
:
completePrefix
(
baseURI
,
'api/common/planTaskExecution'
),
//巡检情况统计分析-执行情况集合
inspectionSituationListUrl
:
completePrefix
(
baseURI
,
'api/check/statisticalAnalysis'
),
//巡检情况统计分析-表格
inspectionSituationExportUrl
:
completePrefix
(
baseURI
,
'api/check/exportStatisticalAnalysis'
),
//巡检情况统计分析-表格导出
taskArrangementListUrl
:
completePrefix
(
baseURI
,
'api/task/getStatisticsData'
),
//任务安排统计分析-表格
taskArrangementExportUrl
:
completePrefix
(
baseURI
,
'api/task/exportStatisticsData'
),
//任务安排统计分析-表格导出
taskCaliberListUrl
:
completePrefix
(
baseURI
,
'api/common/taskgetStatisticsType'
),
//任务安排统计分析-获取任务统计口径集合
personStatisticsUrl
:
completePrefix
(
baseURI
,
'api/task/report/comprehensive/user?startTime={startTime}&endTime={endTime}'
),
//人员综合统计分析-表格
personStatisticsExportUrl
:
completePrefix
(
baseURI
,
'api/excel/comprehensive/user?startTime={startTime}&endTime={endTime}'
),
//人员综合统计分析-表格导出
monthSituationUrl
:
completePrefix
(
baseURI
,
'api/check/statisticalByMonth'
),
//月度巡检情况-表格
monthSituationExportUrl
:
completePrefix
(
baseURI
,
'api/check/exportStatisticalByMonth'
),
//月度巡检情况-表格导出
daySituationExportUrl
:
completePrefix
(
baseURI
,
'api/check/exportByDept'
),
//每日巡检情况-表格导出
homeNumberUrl
:
completePrefix
(
baseURI
,
'api/home/overviewData'
),
//巡检首页-获取公司名、巡检点数、完成/计划、累计巡检次数、未完/已完任务数和巡检点数
homeChartUrl
:
completePrefix
(
baseURI
,
'api/home/getCheckData'
),
//巡检首页-获取12日内 实际巡检、计划巡检和漏检次数每天的数值
currentCompanyUrl
:
completePrefix
(
baseURI
,
'api/user/queryLoginUserAndCompany'
),
//当前系统公司信息
SpecCheckDetailUrl
:
completePrefix
(
baseURI
,
'api/spc/check-detail'
),
//查询检查项详情
SpecCheckInputById
:
completePrefix
(
baseURI
,
'api/spc/check-input'
),
//根据ID查询巡检记录项
searchCheckShortUrl
:
completePrefix
(
baseURI
,
'api/check/getCheckPic?checkId={checkId}&checkInputId={checkInputId}&classifyId={classifyId}'
),
//根据检查项ID和检查项输入ID查询图片
riskLevelUrl
:
completePrefix
(
baseURI
,
'api/user/listDictionaryByDictCode/FXDJ_TYPE'
)
...
...
@@ -197,4 +199,3 @@ export const patrolUrls = {
export
const
preControlUrls
=
{
riskSourceSecondLevelUrl
:
completePrefix
(
preControl
,
'api/risksource/riskSourceSecondLevel'
)
//获取二级风险源信息(用户巡检点风险区域选择)
};
src/view/patrol/catalogTree/CatalogTreeTable.js
View file @
91e763fb
...
...
@@ -6,13 +6,13 @@ import { browserHistory } from 'amos-react-router';
import
PropTypes
from
'prop-types'
;
import
{
pathMapping
}
from
'./../../../routes/customRoutes'
;
import
ToolBar
from
'./../../component/toolbar'
;
import
{
batDelCatalogTreeAction
,
btnAuthAction
}
from
'../../../services/checkService'
;
import
{
batDelCatalogTreeAction
,
btnAuthAction
}
from
'../../../services/checkService'
;
const
inputUrl
=
()
=>
pathMapping
.
catalogTreeInput
;
const
dropnavs1
=
{
key
:
'1'
,
text
:
'添加'
,
icon
:
'add'
,
href
:
'jacascript::void(0)'
,
permissionCode
:
'catalogtree'
,
isWriteable
:
true
};
const
dropnavs2
=
{
key
:
'2'
,
text
:
'修改'
,
icon
:
'edit'
,
href
:
'jacascript::void(0)'
,
permissionCode
:
'catalogtree'
,
isWriteable
:
true
};
const
dropnavs3
=
{
key
:
'3'
,
text
:
'删除'
,
icon
:
'delete'
,
href
:
'jacascript::void(0)'
,
permissionCode
:
'catalogtree'
,
isWriteable
:
true
};
const
dropnavs1
=
{
key
:
'1'
,
text
:
'添加'
,
icon
:
'add'
,
href
:
'jacascript::void(0)'
,
permissionCode
:
'catalogtree'
,
isWriteable
:
true
};
const
dropnavs2
=
{
key
:
'2'
,
text
:
'修改'
,
icon
:
'edit'
,
href
:
'jacascript::void(0)'
,
permissionCode
:
'catalogtree'
,
isWriteable
:
true
};
const
dropnavs3
=
{
key
:
'3'
,
text
:
'删除'
,
icon
:
'delete'
,
href
:
'jacascript::void(0)'
,
permissionCode
:
'catalogtree'
,
isWriteable
:
true
};
const
getColumns
=
()
=>
{
return
[
...
...
@@ -80,7 +80,7 @@ class CheckTable extends Component {
selectedRows
:
[],
selectedRowKeys
:
[],
data
:
[],
dropnavs
:[]
dropnavs
:
[]
};
}
...
...
@@ -89,34 +89,26 @@ class CheckTable extends Component {
*/
componentWillMount
=
()
=>
{
this
.
reloadButtonAuth
();
};
reloadButtonAuth
=
()
=>
{
// const _path = this.calcRoutes();
btnAuthAction
(
'/main/patrol/catalogtree'
).
then
(
data
=>
{
let
{
dropnavs
}
=
this
.
state
;
if
(
data
){
if
(
"tj"
in
data
&&
data
.
tj
.
hasPermission
){
dropnavs
.
push
(
dropnavs1
);
}
if
(
"xg"
in
data
&&
data
.
xg
.
hasPermission
){
dropnavs
.
push
(
dropnavs2
);
}
if
(
"sc"
in
data
&&
data
.
sc
.
hasPermission
){
dropnavs
.
push
(
dropnavs3
);
if
(
data
)
{
if
(
'tj'
in
data
&&
data
.
tj
.
hasPermission
)
{
dropnavs
.
push
(
dropnavs1
);
}
if
(
'xg'
in
data
&&
data
.
xg
.
hasPermission
)
{
dropnavs
.
push
(
dropnavs2
);
}
if
(
'sc'
in
data
&&
data
.
sc
.
hasPermission
)
{
dropnavs
.
push
(
dropnavs3
);
}
}
}
this
.
setState
({
dropnavs
});
this
.
setState
({
dropnavs
});
});
}
}
;
/**
* 分页设置参数
*/
...
...
@@ -182,8 +174,7 @@ class CheckTable extends Component {
// 确定删除
batDelCatalogTreeAction
(
ids
).
then
(
data
=>
{
debugger
if
(
data
===
null
){
if
(
data
===
null
)
{
AmosAlert
.
success
(
'提示'
,
'删除成功'
);
}
else
{
AmosAlert
.
error
(
'提示'
,
'删除分类失败:请先删除子节点'
);
...
...
@@ -238,7 +229,7 @@ class CheckTable extends Component {
};
render
()
{
let
{
pagination
,
isChecked
,
modal
,
selectedRowKeys
,
dropnavs
}
=
this
.
state
;
let
{
pagination
,
isChecked
,
modal
,
selectedRowKeys
,
dropnavs
}
=
this
.
state
;
let
{
dataList
,
fetchData
,
count
}
=
this
.
props
;
let
defaultPageConfig
=
this
.
pageConfig
;
return
(
...
...
src/view/patrol/check/CheckTable.js
View file @
91e763fb
...
...
@@ -11,8 +11,6 @@ import { patrolUrls } from './../../../consts/urlConsts';
import
ToolBar
from
'./../../component/toolbar'
;
import
{
batchDeCheckAction
,
queryCheckDetailAction
,
btnAuthAction
}
from
'../../../services/checkService'
;
const
ls
=
_amosTool
.
Store
.
lsTool
;
const
apiKey
=
SysConsts
.
api_key
;
const
token
=
SysConsts
.
token
;
...
...
@@ -36,6 +34,7 @@ const dropnavs3 = {
{
key
:
'3-4'
,
text
:
'导出全部图片'
,
href
:
'jacascript::void(0)'
,
permissionCode
:
'check'
,
isWriteable
:
false
}
]
};
const
dropnavs4
=
{
key
:
'4'
,
text
:
'业务报表'
,
icon
:
'file'
,
href
:
'jacascript::void(0)'
,
permissionCode
:
'check'
,
isWriteable
:
true
};
const
getColumns
=
()
=>
{
return
[
...
...
@@ -155,11 +154,11 @@ const getHeaders = () => {
'Content-Type'
:
'application/json; charset=utf-8'
,
'X-Api-Key'
:
_amosTool
.
Store
.
getCookieByName
(
apiKey
),
'X-Access-Token'
:
ls
.
read
(
token
),
'token'
:
ls
.
read
(
token
),
'appKey'
:
'YH-PATROL'
,
'product'
:
'YH-PATROL_WEB'
}
}
token
:
ls
.
read
(
token
),
appKey
:
'YH-PATROL'
,
product
:
'YH-PATROL_WEB'
}
;
}
;
/**
* 计划执行
...
...
@@ -202,7 +201,6 @@ class CheckTable extends Component {
this
.
reloadButtonAuth
();
};
/****按钮权限 */
reloadButtonAuth
=
()
=>
{
...
...
@@ -210,20 +208,23 @@ class CheckTable extends Component {
btnAuthAction
(
'/main/patrol/check'
).
then
(
data
=>
{
let
{
dropnavs
}
=
this
.
state
;
if
(
data
)
{
if
(
"jiancha"
in
data
&&
data
.
jiancha
.
hasPermission
)
{
if
(
'jiancha'
in
data
&&
data
.
jiancha
.
hasPermission
)
{
dropnavs
.
push
(
dropnavs1
);
}
if
(
"delete"
in
data
&&
data
.
delete
.
hasPermission
)
{
if
(
'delete'
in
data
&&
data
.
delete
.
hasPermission
)
{
dropnavs
.
push
(
dropnavs2
);
}
if
(
"user"
in
data
&&
data
.
user
.
hasPermission
)
{
if
(
'user'
in
data
&&
data
.
user
.
hasPermission
)
{
dropnavs
.
push
(
dropnavs3
);
}
if
(
'ureport'
in
data
&&
data
.
ureport
.
hasPermission
)
{
dropnavs
.
push
(
dropnavs4
);
}
}
this
.
setState
({
dropnavs
});
});
}
}
;
/**
* 分页设置参数
...
...
@@ -316,6 +317,8 @@ class CheckTable extends Component {
this
.
exportSelectImgs
();
}
else
if
(
type
===
'3-4'
)
{
this
.
exportAllDataImgs
();
}
else
if
(
type
===
'4'
)
{
this
.
onClickIcon
(
'check'
);
}
window
.
setLoading
&&
window
.
setLoading
(
false
);
};
...
...
@@ -331,18 +334,19 @@ class CheckTable extends Component {
fetch
(
url
,
{
method
:
'get'
,
headers
:
getHeaders
()
}).
then
(
e
=>
{
e
.
blob
().
then
(
blob
=>
{
const
a
=
window
.
document
.
createElement
(
'a'
);
const
downUrl
=
window
.
URL
.
createObjectURL
(
blob
);
let
currDate
=
new
Date
();
const
filename
=
[
currDate
.
getTime
(),
'xls'
];
a
.
href
=
downUrl
;
a
.
download
=
`
${
decodeURI
(
filename
[
0
])}
.
${
filename
[
1
]}
`
;
a
.
click
();
window
.
URL
.
revokeObjectURL
(
downUrl
);
});
})
.
then
(
e
=>
{
e
.
blob
().
then
(
blob
=>
{
const
a
=
window
.
document
.
createElement
(
'a'
);
const
downUrl
=
window
.
URL
.
createObjectURL
(
blob
);
let
currDate
=
new
Date
();
const
filename
=
[
currDate
.
getTime
(),
'xls'
];
a
.
href
=
downUrl
;
a
.
download
=
`
${
decodeURI
(
filename
[
0
])}
.
${
filename
[
1
]}
`
;
a
.
click
();
window
.
URL
.
revokeObjectURL
(
downUrl
);
});
})
.
catch
(
e
=>
{
_amosTool
.
Log
.
error
(
e
.
message
);
});
...
...
@@ -359,18 +363,19 @@ class CheckTable extends Component {
fetch
(
url
,
{
method
:
'get'
,
headers
:
getHeaders
()
}).
then
(
e
=>
{
e
.
blob
().
then
(
blob
=>
{
const
a
=
window
.
document
.
createElement
(
'a'
);
const
downUrl
=
window
.
URL
.
createObjectURL
(
blob
);
let
currDate
=
new
Date
();
const
filename
=
[
currDate
.
getTime
(),
'zip'
];
a
.
href
=
downUrl
;
a
.
download
=
`
${
decodeURI
(
filename
[
0
])}
.
${
filename
[
1
]}
`
;
a
.
click
();
window
.
URL
.
revokeObjectURL
(
downUrl
);
});
})
.
then
(
e
=>
{
e
.
blob
().
then
(
blob
=>
{
const
a
=
window
.
document
.
createElement
(
'a'
);
const
downUrl
=
window
.
URL
.
createObjectURL
(
blob
);
let
currDate
=
new
Date
();
const
filename
=
[
currDate
.
getTime
(),
'zip'
];
a
.
href
=
downUrl
;
a
.
download
=
`
${
decodeURI
(
filename
[
0
])}
.
${
filename
[
1
]}
`
;
a
.
click
();
window
.
URL
.
revokeObjectURL
(
downUrl
);
});
})
.
catch
(
e
=>
{
_amosTool
.
Log
.
error
(
e
.
message
);
});
...
...
@@ -476,12 +481,14 @@ class CheckTable extends Component {
// });
};
onClickIcon
=
(
value
)
=>
{
onClickIcon
=
value
=>
{
const
{
showType
}
=
this
.
state
;
if
(
showType
===
value
){
value
=
''
;}
if
(
showType
===
value
)
{
value
=
''
;
}
this
.
props
.
setShowType
(
value
);
this
.
setState
({
showType
:
value
});
}
}
;
render
()
{
let
{
pagination
,
dropnavs
,
isChecked
,
selectedRowKeys
}
=
this
.
state
;
...
...
@@ -491,12 +498,18 @@ class CheckTable extends Component {
return
(
<
div
className
=
"patrol-page-table"
>
<
ToolBar
dropnavs
=
{
dropnavs
}
callBack
=
{
this
.
onClickBootBar
}
/
>
<
div
className
=
'right-btn'
>
<
div
className
=
"right-btn"
>
{
/* <div className="row-btn">
<img src="/src/assets/fsc/check/export.png" onClick={() => this.onClickIcon('check')} />
<span> 业务报表</span>
</div> */
}
<
div
className
=
"row-btn"
>
<
img
src
=
"/src/assets/fsc/check/export.png"
onClick
=
{()
=>
this
.
onClickIcon
(
'export'
)}
/><span> 报表生成</
span
>
<
img
src
=
"/src/assets/fsc/check/export.png"
onClick
=
{()
=>
this
.
onClickIcon
(
'export'
)}
/
>
<
span
>&
nbsp
;
&
nbsp
;
报表生成
<
/span
>
<
/div
>
<
div
className
=
"row-btn"
>
<
img
src
=
"/src/assets/fsc/check/filter.png"
onClick
=
{()
=>
this
.
onClickIcon
(
'search'
)}
/><span> 筛选条件</
span
>
<
img
src
=
"/src/assets/fsc/check/filter.png"
onClick
=
{()
=>
this
.
onClickIcon
(
'search'
)}
/
>
<
span
>&
nbsp
;
&
nbsp
;
筛选条件
<
/span
>
<
/div
>
<
/div
>
<
AmosGridTable
...
...
@@ -524,5 +537,4 @@ CheckTable.propTypes = {
setShowType
:
PropTypes
.
func
};
export
default
CheckTable
;
src/view/patrol/check/index.js
View file @
91e763fb
...
...
@@ -3,6 +3,8 @@ import moment from 'moment';
import
CheckTable
from
'./CheckTable'
;
import
CheckSearch
from
'./CheckSearch'
;
import
ExportSearch
from
'./ExportSearch'
;
import
ExportCheckSearch
from
'./ExportCheckSearch'
;
import
{
queryCheckInfoAction
}
from
'../../../services/checkService'
;
import
SplitterLayout
from
'./SplitLayout'
;
...
...
@@ -37,7 +39,7 @@ class Check extends Component {
}
if
(
pointNo
)
{
searchParam
.
push
({
name
:
'pointNo'
,
value
:
pointNo
});
this
.
setState
({
searchParam
,
pointNo
});
this
.
setState
({
searchParam
,
pointNo
});
}
};
...
...
@@ -75,24 +77,38 @@ class Check extends Component {
});
}
setShowType
=
(
value
)
=>
{
setShowType
=
value
=>
{
this
.
setState
({
showType
:
value
});
}
}
;
render
()
{
let
{
statisticsData
,
totalCount
,
planId
,
pointNo
,
searchParam
,
showType
}
=
this
.
state
;
console
.
log
(
showType
);
return
(
<
div
className
=
"patrol-page-content"
>
{
showType
===
'search'
&&
<
SplitterLayout
title
=
'查询条件'
>
<
CheckSearch
search
=
{
this
.
onSearchDataSyn
}
planId
=
{
planId
}
pointNo
=
{
pointNo
}
/
>
<
/SplitterLayout>
}
{
showType
===
'export'
&&
<
SplitterLayout
title
=
'报表生成'
>
<
ExportSearch
search
=
{
this
.
onSearchDataSyn
}
planId
=
{
planId
}
pointNo
=
{
pointNo
}
/
>
<
/SplitterLayout
>
}
<
CheckTable
count
=
{
totalCount
}
fetchData
=
{
this
.
questStatistiscData
}
searchParam
=
{
searchParam
}
dataList
=
{
statisticsData
}
planId
=
{
planId
}
setShowType
=
{
this
.
setShowType
}
/
>
{
showType
===
'search'
&&
(
<
SplitterLayout
title
=
"查询条件"
>
<
CheckSearch
search
=
{
this
.
onSearchDataSyn
}
planId
=
{
planId
}
pointNo
=
{
pointNo
}
/
>
<
/SplitterLayout
>
)}
{
showType
===
'export'
&&
(
<
SplitterLayout
title
=
"报表生成"
>
<
ExportSearch
search
=
{
this
.
onSearchDataSyn
}
planId
=
{
planId
}
pointNo
=
{
pointNo
}
/
>
<
/SplitterLayout
>
)}
{
showType
===
'check'
&&
(
<
SplitterLayout
title
=
"业务报表"
>
<
ExportCheckSearch
/>
<
/SplitterLayout
>
)}
<
CheckTable
count
=
{
totalCount
}
fetchData
=
{
this
.
questStatistiscData
}
searchParam
=
{
searchParam
}
dataList
=
{
statisticsData
}
planId
=
{
planId
}
setShowType
=
{
this
.
setShowType
}
/
>
<
/div
>
);
}
...
...
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