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
21d9c31e
Commit
21d9c31e
authored
Feb 28, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
Mer
parents
44864e25
0e40d767
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
15 deletions
+55
-15
urlConsts.js
src/consts/urlConsts.js
+1
-1
AssociatedPointTable.js
...view/bizview/preControl/riskModel/AssociatedPointTable.js
+54
-14
No files found.
src/consts/urlConsts.js
View file @
21d9c31e
...
@@ -219,7 +219,7 @@ export const FasSerUrl = {
...
@@ -219,7 +219,7 @@ export const FasSerUrl = {
uploadTextPlan
:
completePrefix
(
baseURI
,
'file/plan/{appId}/texts'
),
uploadTextPlan
:
completePrefix
(
baseURI
,
'file/plan/{appId}/texts'
),
getTreeNodeTypeUrl
:
completePrefix
(
baseURI
,
'api/riskModel/riskSource/getChildTypeByPid?riskSourceId={riskSourceId}'
),
// 根据节点ID获取子节点可能的类型
getTreeNodeTypeUrl
:
completePrefix
(
baseURI
,
'api/riskModel/riskSource/getChildTypeByPid?riskSourceId={riskSourceId}'
),
// 根据节点ID获取子节点可能的类型
getAllUserUrl
:
completePrefix
(
baseURI
,
'api/common/user/list'
),
//获取所有用户
getAllUserUrl
:
completePrefix
(
baseURI
,
'api/common/user/list'
),
//获取所有用户
queryFmeaControlObjUrl
:
endConf
.
completePri
fix
(
baseURI
,
'api/riskModel/fmea/{ids}/controlObjCount'
)
//根据fmea id查询关联对象个数
queryFmeaControlObjUrl
:
completePre
fix
(
baseURI
,
'api/riskModel/fmea/{ids}/controlObjCount'
)
//根据fmea id查询关联对象个数
};
};
...
...
src/view/bizview/preControl/riskModel/AssociatedPointTable.js
View file @
21d9c31e
...
@@ -3,6 +3,9 @@ import PropTypes from 'prop-types';
...
@@ -3,6 +3,9 @@ import PropTypes from 'prop-types';
import
AmosGridTable
from
'./../../common/tableComponent/table/AmosGridTable'
;
import
AmosGridTable
from
'./../../common/tableComponent/table/AmosGridTable'
;
const
html_string
=
"<span style='color':red;'>不合格</span>"
;
const
getColumns
=
()
=>
{
const
getColumns
=
()
=>
{
return
[
return
[
// {
// {
...
@@ -18,35 +21,71 @@ const getColumns = () => {
...
@@ -18,35 +21,71 @@ const getColumns = () => {
key
:
'pointName'
,
key
:
'pointName'
,
width
:
'18%'
,
width
:
'18%'
,
className
:
'uant-table-thead'
className
:
'uant-table-thead'
},{
},
{
title
:
'责任部门/区域'
,
title
:
'责任部门/区域'
,
dataIndex
:
'depName'
,
dataIndex
:
'depName'
,
key
:
'depName'
,
key
:
'depName'
,
width
:
'15%'
,
width
:
'15%'
,
className
:
'uant-table-thead'
className
:
'uant-table-thead'
},{
},
{
title
:
'责任人'
,
title
:
'责任人'
,
dataIndex
:
'username'
,
dataIndex
:
'username'
,
key
:
'username'
,
key
:
'username'
,
width
:
'10%'
,
width
:
'10%'
,
className
:
'uant-table-thead'
className
:
'uant-table-thead'
},{
},
{
title
:
'联系电话'
,
title
:
'联系电话'
,
dataIndex
:
'tel'
,
dataIndex
:
'tel'
,
key
:
'tel'
,
key
:
'tel'
,
width
:
'12%'
,
width
:
'12%'
,
className
:
'uant-table-thead'
className
:
'uant-table-thead'
},{
},
{
title
:
'检查项'
,
title
:
'检查项'
,
dataIndex
:
'inputItems'
,
dataIndex
:
'inputItems'
,
key
:
'inputItems'
,
key
:
'inputItems'
,
width
:
'40%'
,
width
:
'40%'
,
className
:
'uant-table-thead'
className
:
'uant-table-thead'
,
render
:
(
text
,
record
)
=>
{
//根据换行符分隔
let
arr
=
text
.
split
(
"
\
n"
);
let
p
=
document
.
createElement
(
'span'
)
if
(
arr
&&
arr
!=
null
){
arr
.
map
(
e
=>
{
if
(
e
.
endsWith
(
"##0"
)){
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
a
=
e
.
replace
(
"##0"
,
""
);
grandChildItem
.
innerText
=
a
;
let
font
=
document
.
createElement
(
'font'
);
font
.
innerText
=
" 不合格"
;
font
.
style
.
color
=
"red"
;
grandChildItem
.
append
(
font
);
p
.
append
(
grandChildItem
)
}
else
{
let
grandChildItem
=
document
.
createElement
(
'p'
);
let
b
=
e
.
replace
(
"##1"
,
""
);
grandChildItem
.
innerText
=
b
;
let
font
=
document
.
createElement
(
'font'
);
font
.
innerText
=
" 合格"
;
font
.
style
.
color
=
"green"
;
grandChildItem
.
append
(
font
);
p
.
append
(
grandChildItem
)
}
})
return
<
div
dangerouslySetInnerHTML
=
{{
__html
:
p
.
outerHTML
}}
><
/div
>
}
}
}
}
];
];
};
};
/**
/**
* 关联对象-巡检点
* 关联对象-巡检点
*/
*/
...
@@ -66,9 +105,9 @@ class AssociatedPointTable extends Component {
...
@@ -66,9 +105,9 @@ class AssociatedPointTable extends Component {
};
};
}
}
/**
/**
* 分页设置参数
* 分页设置参数
*/
*/
setPageConfig
=
({
pageSize
,
current
})
=>
{
setPageConfig
=
({
pageSize
,
current
})
=>
{
if
(
pageSize
!==
undefined
)
{
if
(
pageSize
!==
undefined
)
{
this
.
pageConfig
.
pageSize
=
pageSize
;
this
.
pageConfig
.
pageSize
=
pageSize
;
...
@@ -78,9 +117,9 @@ class AssociatedPointTable extends Component {
...
@@ -78,9 +117,9 @@ class AssociatedPointTable extends Component {
}
}
};
};
/**
/**
* 获取表格所选则的行数据
* 获取表格所选则的行数据
*/
*/
getSelectedRows
=
(
selectedRows
,
selectedRowKeys
)
=>
{
getSelectedRows
=
(
selectedRows
,
selectedRowKeys
)
=>
{
this
.
setState
({
selectedRows
,
selectedRowKeys
});
this
.
setState
({
selectedRows
,
selectedRowKeys
});
};
};
...
@@ -115,9 +154,9 @@ class AssociatedPointTable extends Component {
...
@@ -115,9 +154,9 @@ class AssociatedPointTable extends Component {
});
});
}
}
/**
/**
* 获取表格刷新方法
* 获取表格刷新方法
*/
*/
reload
=
r
=>
{
reload
=
r
=>
{
this
.
setState
(
this
.
setState
(
{
{
...
@@ -139,6 +178,7 @@ class AssociatedPointTable extends Component {
...
@@ -139,6 +178,7 @@ class AssociatedPointTable extends Component {
this
.
state
.
reload
();
this
.
state
.
reload
();
};
};
render
()
{
render
()
{
let
{
pagination
,
isChecked
,
selectedRowKeys
}
=
this
.
state
;
let
{
pagination
,
isChecked
,
selectedRowKeys
}
=
this
.
state
;
let
{
dataList
,
fetchData
,
totalCount
}
=
this
.
props
;
let
{
dataList
,
fetchData
,
totalCount
}
=
this
.
props
;
...
...
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