Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-convertor-view
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
station
amos-convertor-view
Commits
2959f915
Commit
2959f915
authored
Oct 29, 2021
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
098457b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
24 deletions
+57
-24
urlConsts.js
src/consts/urlConsts.js
+1
-0
checkInfoService.js
src/services/checkInfoService.js
+27
-20
PointSearch.js
src/view/bizview/point/PointSearch.js
+29
-4
No files found.
src/consts/urlConsts.js
View file @
2959f915
...
@@ -105,6 +105,7 @@ export const FscSerUrl = {
...
@@ -105,6 +105,7 @@ export const FscSerUrl = {
fetchTaskList
:
completePrefix
(
patrolURI
,
'api/task/queryTaskByPage'
),
//月巡检情况统计
fetchTaskList
:
completePrefix
(
patrolURI
,
'api/task/queryTaskByPage'
),
//月巡检情况统计
fetchHidDangerCount
:
completePrefix
(
patrolURI
,
'api/task/hiddenDanger/count'
),
//隐患治理统计
fetchHidDangerCount
:
completePrefix
(
patrolURI
,
'api/task/hiddenDanger/count'
),
//隐患治理统计
SpecCheckInputByIdNewUrl
:
completePrefix
(
patrolURI
,
'api/spc/check-input-new'
),
//根据ID查询巡检记录项
SpecCheckInputByIdNewUrl
:
completePrefix
(
patrolURI
,
'api/spc/check-input-new'
),
//根据ID查询巡检记录项
queryAuthUsersUrl
:
completePrefix
(
patrolURI
,
'/api/user/queryAuthUsers'
),
// 根据ID查询巡检记录项
fetchPointDetail
:
completePrefix
(
patrolURI
,
'api/spc/queryPointById'
),
//风险点
fetchPointDetail
:
completePrefix
(
patrolURI
,
'api/spc/queryPointById'
),
//风险点
fetchPointMeasures
:
completePrefix
(
patrolURI
,
'api/spc/measures'
),
//巡检点措施
fetchPointMeasures
:
completePrefix
(
patrolURI
,
'api/spc/measures'
),
//巡检点措施
...
...
src/services/checkInfoService.js
View file @
2959f915
...
@@ -3,24 +3,24 @@ import {FscSerUrl} from './../consts/urlConsts';
...
@@ -3,24 +3,24 @@ import {FscSerUrl} from './../consts/urlConsts';
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
/**
/**
* 根据巡检点ID获取巡检人员信息
* 根据巡检点ID获取巡检人员信息
* @param {巡检点id} id
* @param {巡检点id} id
*/
*/
export
const
fetchXJUserInfoAction
=
(
pd
)
=>
{
export
const
fetchXJUserInfoAction
=
(
pd
)
=>
{
const
url
=
`
${
FscSerUrl
.
fetchUserByPd
}
/
${
pd
}
`
;
const
url
=
`
${
FscSerUrl
.
fetchUserByPd
}
/
${
pd
}
`
;
return
commonGet
(
url
);
return
commonGet
(
url
);
};
};
/**
/**
* 根据巡检点获取巡检记录
* 根据巡检点获取巡检记录
* @param {巡检点id} pd
* @param {巡检点id} pd
* @param {查询条件:pointID,status,checkTime} data
* @param {查询条件:pointID,status,checkTime} data
*/
*/
export
const
fetchXJCheckInfoAction
=
(
pd
,
data
)
=>
{
export
const
fetchXJCheckInfoAction
=
(
pd
,
data
)
=>
{
let
newCriteriasList
=
[];
let
newCriteriasList
=
[];
for
(
let
key
in
data
){
//遍历json对象的每个key/value对,p为key
for
(
let
key
in
data
){
//遍历json对象的每个key/value对,p为key
newCriteriasList
.
push
({
name
:
key
,
type
:
1
,
value
:
data
[
key
]});
newCriteriasList
.
push
({
name
:
key
,
type
:
1
,
value
:
data
[
key
]});
}
}
newCriteriasList
.
push
({
name
:
'pointID'
,
type
:
1
,
value
:
pd
});
newCriteriasList
.
push
({
name
:
'pointID'
,
type
:
1
,
value
:
pd
});
const
url
=
`
${
FscSerUrl
.
fetchCheckInfoByPd
}
?pageNumber=
${
data
[
'pageNumber'
]}
&pageSize=
${
data
[
'pageSize'
]}
`
;
const
url
=
`
${
FscSerUrl
.
fetchCheckInfoByPd
}
?pageNumber=
${
data
[
'pageNumber'
]}
&pageSize=
${
data
[
'pageSize'
]}
`
;
return
commonPost
(
url
,
newCriteriasList
);
return
commonPost
(
url
,
newCriteriasList
);
}
}
...
@@ -29,26 +29,26 @@ export const fetchXJCheckInfoAction =(pd,data)=>{
...
@@ -29,26 +29,26 @@ export const fetchXJCheckInfoAction =(pd,data)=>{
*/
*/
export
const
fetchPointQueryCriteria
=
()
=>
{
export
const
fetchPointQueryCriteria
=
()
=>
{
const
url
=
`
${
FscSerUrl
.
fetchPointQueryCriteria
}
`
;
const
url
=
`
${
FscSerUrl
.
fetchPointQueryCriteria
}
`
;
return
commonGet
(
url
);
return
commonGet
(
url
);
};
};
/**
/**
* 风险点信息列表查询
* 风险点信息列表查询
* @param {*} data
* @param {*} data
*/
*/
export
const
fetchPointListAction
=
(
data
)
=>
{
export
const
fetchPointListAction
=
(
data
)
=>
{
let
newCriteriasList
=
[];
let
newCriteriasList
=
[];
for
(
let
key
in
data
){
//遍历json对象的每个key/value对,p为key
for
(
let
key
in
data
){
//遍历json对象的每个key/value对,p为key
newCriteriasList
.
push
({
name
:
key
,
type
:
1
,
value
:
data
[
key
]});
newCriteriasList
.
push
({
name
:
key
,
type
:
1
,
value
:
data
[
key
]});
}
}
const
url
=
`
${
FscSerUrl
.
fetchPointList
}
?pageNumber=
${
data
[
'pageNumber'
]}
&pageSize=
${
data
[
'pageSize'
]}
`
;
const
url
=
`
${
FscSerUrl
.
fetchPointList
}
?pageNumber=
${
data
[
'pageNumber'
]}
&pageSize=
${
data
[
'pageSize'
]}
`
;
return
commonPost
(
url
,
newCriteriasList
);
return
commonPost
(
url
,
newCriteriasList
);
};
};
/**
/**
* 获取风险点详细信息
* 获取风险点详细信息
*/
*/
export
const
fetchPointDetailAction
=
(
id
)
=>
{
export
const
fetchPointDetailAction
=
(
id
)
=>
{
const
url
=
`
${
FscSerUrl
.
fetchPointDetail
}
/
${
id
}
`
;
const
url
=
`
${
FscSerUrl
.
fetchPointDetail
}
/
${
id
}
`
;
return
commonGet
(
url
);
return
commonGet
(
url
);
};
};
...
@@ -56,7 +56,7 @@ export const fetchPointDetailAction = (id) => {
...
@@ -56,7 +56,7 @@ export const fetchPointDetailAction = (id) => {
* 获取风险点明细
* 获取风险点明细
*/
*/
export
const
fetchPtDetailByIdAction
=
(
id
)
=>
{
export
const
fetchPtDetailByIdAction
=
(
id
)
=>
{
const
url
=
`
${
FscSerUrl
.
fetchPointDetailById
}
/
${
id
}
`
;
const
url
=
`
${
FscSerUrl
.
fetchPointDetailById
}
/
${
id
}
`
;
return
commonGet
(
url
);
return
commonGet
(
url
);
};
};
...
@@ -64,27 +64,27 @@ export const fetchPtDetailByIdAction = (id) => {
...
@@ -64,27 +64,27 @@ export const fetchPtDetailByIdAction = (id) => {
* 获取风险点措施
* 获取风险点措施
*/
*/
export
const
fetchPointMeasuresAction
=
(
id
)
=>
{
export
const
fetchPointMeasuresAction
=
(
id
)
=>
{
const
url
=
`
${
FscSerUrl
.
fetchPointMeasures
}
/
${
id
}
`
;
const
url
=
`
${
FscSerUrl
.
fetchPointMeasures
}
/
${
id
}
`
;
return
commonGet
(
url
);
return
commonGet
(
url
);
};
};
export
const
deletePointMeasuresAction
=
(
id
)
=>
{
export
const
deletePointMeasuresAction
=
(
id
)
=>
{
const
url
=
`
${
FscSerUrl
.
fetchPointMeasures
}
/
${
id
}
`
;
const
url
=
`
${
FscSerUrl
.
fetchPointMeasures
}
/
${
id
}
`
;
return
commonGet
(
url
);
return
commonGet
(
url
);
};
};
export
const
batchDeletePointMeasuresAction
=
(
data
)
=>
{
export
const
batchDeletePointMeasuresAction
=
(
data
)
=>
{
const
url
=
`
${
FscSerUrl
.
batchDeletePointMeasuresAction
}
`
;
const
url
=
`
${
FscSerUrl
.
batchDeletePointMeasuresAction
}
`
;
return
commonPost
(
url
,
data
);
return
commonPost
(
url
,
data
);
};
};
export
const
savePointMeasuresAction
=
(
data
)
=>
{
export
const
savePointMeasuresAction
=
(
data
)
=>
{
const
url
=
`
${
FscSerUrl
.
addPointMeasures
}
`
;
const
url
=
`
${
FscSerUrl
.
addPointMeasures
}
`
;
return
commonPost
(
url
,
data
);
return
commonPost
(
url
,
data
);
};
};
export
const
batchSavePointMeasuresAction
=
(
data
)
=>
{
export
const
batchSavePointMeasuresAction
=
(
data
)
=>
{
const
url
=
`
${
FscSerUrl
.
batchAddPointMeasuresAction
}
`
;
const
url
=
`
${
FscSerUrl
.
batchAddPointMeasuresAction
}
`
;
return
commonPost
(
url
,
data
);
return
commonPost
(
url
,
data
);
};
};
...
@@ -105,7 +105,7 @@ export const fetchXJChkExecuteAction = (data) => {
...
@@ -105,7 +105,7 @@ export const fetchXJChkExecuteAction = (data) => {
/**
/**
* 月巡检情况统计
* 月巡检情况统计
* @param {*yyyyMMdd,查询月所在日期} data
* @param {*yyyyMMdd,查询月所在日期} data
*/
*/
export
const
fetchMonthCountChkAction
=
(
data
)
=>
{
export
const
fetchMonthCountChkAction
=
(
data
)
=>
{
const
url
=
`
${
FscSerUrl
.
fetchMonthCountChk
}
/
${
data
}
`
;
const
url
=
`
${
FscSerUrl
.
fetchMonthCountChk
}
/
${
data
}
`
;
...
@@ -114,7 +114,7 @@ export const fetchMonthCountChkAction = (data) => {
...
@@ -114,7 +114,7 @@ export const fetchMonthCountChkAction = (data) => {
/**
/**
* 月巡检情况统计
* 月巡检情况统计
* @param {*yyyyMMdd,查询月所在日期} data
* @param {*yyyyMMdd,查询月所在日期} data
*/
*/
export
const
fetchTaskListAction
=
(
data
)
=>
{
export
const
fetchTaskListAction
=
(
data
)
=>
{
let
newCriteriasList
=
[];
let
newCriteriasList
=
[];
...
@@ -126,7 +126,7 @@ export const fetchTaskListAction = (data) => {
...
@@ -126,7 +126,7 @@ export const fetchTaskListAction = (data) => {
};
};
/**
/**
* 任务统计
* 任务统计
* @param {*yyyyMMdd,查询月所在日期} data
* @param {*yyyyMMdd,查询月所在日期} data
*/
*/
export
const
fetchHidDangerCountAction
=
(
data
)
=>
{
export
const
fetchHidDangerCountAction
=
(
data
)
=>
{
const
url
=
`
${
FscSerUrl
.
fetchHidDangerCount
}
/
${
data
}
`
;
const
url
=
`
${
FscSerUrl
.
fetchHidDangerCount
}
/
${
data
}
`
;
...
@@ -138,7 +138,7 @@ export const fetchHidDangerCountAction = (data) => {
...
@@ -138,7 +138,7 @@ export const fetchHidDangerCountAction = (data) => {
*/
*/
export
const
fetchTaskQueryCriteria
=
()
=>
{
export
const
fetchTaskQueryCriteria
=
()
=>
{
const
url
=
`
${
FscSerUrl
.
fetchTaskQueryCriteria
}
`
;
const
url
=
`
${
FscSerUrl
.
fetchTaskQueryCriteria
}
`
;
return
commonGet
(
url
);
return
commonGet
(
url
);
};
};
...
@@ -154,7 +154,7 @@ export const fetchRegionSelectAction = (orgCode) => {
...
@@ -154,7 +154,7 @@ export const fetchRegionSelectAction = (orgCode) => {
* 获取日期点所在月是否有巡检记录
* 获取日期点所在月是否有巡检记录
* @param {string,String} pointId,date
* @param {string,String} pointId,date
*/
*/
export
const
fetchCalCountPanelAction
=
(
data
)
=>
{
export
const
fetchCalCountPanelAction
=
(
data
)
=>
{
return
commonPost
(
FscSerUrl
.
fetchCalCountPanelUrl
,
data
);
return
commonPost
(
FscSerUrl
.
fetchCalCountPanelUrl
,
data
);
};
};
...
@@ -166,3 +166,10 @@ export const queryUserByDeptIdAction = (deptId) => {
...
@@ -166,3 +166,10 @@ export const queryUserByDeptIdAction = (deptId) => {
export
const
queryRoutePlanPointAction
=
(
filter
)
=>
{
export
const
queryRoutePlanPointAction
=
(
filter
)
=>
{
return
commonPost
(
formatUrl
(
FscSerUrl
.
routePlanPointPageUrl
),
filter
);
return
commonPost
(
formatUrl
(
FscSerUrl
.
routePlanPointPageUrl
),
filter
);
};
};
/**
* 获取人员列表
*/
export
const
queryAuthUsersAction
=
()
=>
{
return
commonGet
(
formatUrl
(
FscSerUrl
.
queryAuthUsersUrl
));
};
src/view/bizview/point/PointSearch.js
View file @
2959f915
...
@@ -4,6 +4,7 @@ import { Select,Input } from 'amos-antd';
...
@@ -4,6 +4,7 @@ import { Select,Input } from 'amos-antd';
import
{
MultiSelect
,
Icon
}
from
'amos-framework'
;
import
{
MultiSelect
,
Icon
}
from
'amos-framework'
;
import
{
import
{
fetchPointQueryCriteria
,
fetchPointQueryCriteria
,
queryAuthUsersAction
,
queryUserByDeptIdAction
queryUserByDeptIdAction
}
from
'./../../../services/checkInfoService'
;
}
from
'./../../../services/checkInfoService'
;
...
@@ -88,7 +89,7 @@ class PointSearch extends Component {
...
@@ -88,7 +89,7 @@ class PointSearch extends Component {
this
.
setState
({
searchParam
});
this
.
setState
({
searchParam
});
this
.
props
.
setSearchParam
(
searchParam
);
this
.
props
.
setSearchParam
(
searchParam
);
if
(
value
===
undefined
)
{
if
(
value
===
undefined
)
{
this
.
setState
({
userData
:
[],
checkUserOptions
:
[]
}
);
this
.
queryAuthUsers
(
);
this
.
props
.
setSearchParam
(
searchParam
);
this
.
props
.
setSearchParam
(
searchParam
);
}
else
{
}
else
{
this
.
setState
({
this
.
setState
({
...
@@ -130,6 +131,30 @@ class PointSearch extends Component {
...
@@ -130,6 +131,30 @@ class PointSearch extends Component {
this
.
setState
({
dataTypeOptions
:
typeList
,
this
.
setState
({
dataTypeOptions
:
typeList
,
departmentOptions
:
departmentList
,
statusOptions
:
statusList
,
pointLevelOptions
:
pointLevelList
,
statusData
:
data
.
status
});
departmentOptions
:
departmentList
,
statusOptions
:
statusList
,
pointLevelOptions
:
pointLevelList
,
statusData
:
data
.
status
});
});
});
// 请求人员
this
.
queryAuthUsers
();
}
/**
* 查询人员接口
*/
queryAuthUsers
=
()
=>
{
queryAuthUsersAction
().
then
((
res
)
=>
{
let
userData
=
res
;
let
userOptions
=
[];
if
(
res
&&
res
.
length
>
0
)
{
res
.
map
(
d
=>
{
if
(
d
)
{
userOptions
.
push
(
<
Option
key
=
{
d
.
id
}
>
{
d
.
name
}
<
/Option>
)
;
}
});
this
.
setState
({
checkUserOptions
:
userOptions
,
userData
});
}
});
}
}
queryUserByDept
=
(
deptId
)
=>
{
queryUserByDept
=
(
deptId
)
=>
{
...
@@ -159,9 +184,9 @@ class PointSearch extends Component {
...
@@ -159,9 +184,9 @@ class PointSearch extends Component {
}
}
render
()
{
render
()
{
let
{
userData
,
dataTypeOptions
,
departmentOptions
,
statusData
,
pointLevelOptions
,
selectData
,
searchParam
}
=
this
.
state
;
let
{
userData
,
dataTypeOptions
,
departmentOptions
,
statusData
,
pointLevelOptions
,
selectData
,
searchParam
,
checkUserOptions
}
=
this
.
state
;
const
checkUserOptions
=
userData
?
userData
.
map
(
d
=>
<
Option
key
=
{
d
.
id
}
>
{
d
.
name
}
<
/Option>
)
:
[]
;
//
const checkUserOptions = userData ? userData.map(d => <Option key={d.id}>{d.name}</Option>) : [];
console
.
log
(
checkUserOptions
);
//
console.log(checkUserOptions);
return
(
return
(
<
div
className
=
'create-device-search-root'
>
<
div
className
=
'create-device-search-root'
>
<
div
className
=
'catalog-select'
>
<
div
className
=
'catalog-select'
>
...
...
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