Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
b7e22edf
提交
b7e22edf
authored
4月 22, 2020
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
评奖评优增加汇总页面
上级
41c0930b
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
104 行增加
和
33 行删除
+104
-33
List.js
FormInsertDiy/AffairPage/AuditPage/List.js
+0
-5
index.js
FormInsertDiy/AffairPage/AuditPage/index.js
+0
-1
destruction.js
FormInsertDiy/AffairPage/destruction.js
+18
-8
ExportAndDetail.js
FormInsertDiy/List/ExportAndDetail.js
+1
-0
index.js
FormInsertDiy/List/index.js
+78
-19
services.js
FormInsertDiy/List/services.js
+7
-0
没有找到文件。
FormInsertDiy/AffairPage/AuditPage/List.js
浏览文件 @
b7e22edf
...
@@ -2,15 +2,10 @@ import React, { Component, Fragment } from 'react';
...
@@ -2,15 +2,10 @@ import React, { Component, Fragment } from 'react';
import
SearchDom
from
'@/highOrderComponent/SearchDom'
;
import
SearchDom
from
'@/highOrderComponent/SearchDom'
;
import
ButtonListDom
from
'../ButtonListDom'
;
import
ButtonListDom
from
'../ButtonListDom'
;
import
Shell
from
'@/baseComponent/Shell'
;
import
Shell
from
'@/baseComponent/Shell'
;
import
ColumnsRender
from
'@/highOrderComponent/ColumnsRender'
;
import
*
as
services
from
'@/highOrderComponent/Service'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
PropTypes
from
'prop-types'
;
import
PropTypes
from
'prop-types'
;
import
{
deepCopy
}
from
'@/baseComponent/utils'
;
import
{
deepCopy
}
from
'@/baseComponent/utils'
;
import
{
date
,
format
,
text
}
from
'../../config'
;
import
moment
from
'moment'
;
import
{
handleAudit
}
from
'../publicApiService'
;
import
{
handleAudit
}
from
'../publicApiService'
;
import
{
Tooltip
}
from
'antd'
;
import
{
handleColumns
}
from
'@/webPublic/FormInsertDiy/AffairPage/destruction'
;
import
{
handleColumns
}
from
'@/webPublic/FormInsertDiy/AffairPage/destruction'
;
export
default
class
List
extends
Component
{
export
default
class
List
extends
Component
{
...
...
FormInsertDiy/AffairPage/AuditPage/index.js
浏览文件 @
b7e22edf
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
*
*
* */
* */
import
{
message
}
from
'antd'
;
import
React
,
{
}
from
'react'
;
import
React
,
{
}
from
'react'
;
import
*
as
service
from
'../publicApiService'
;
import
*
as
service
from
'../publicApiService'
;
import
AuditPage
from
'./AuditPage'
;
import
AuditPage
from
'./AuditPage'
;
...
...
FormInsertDiy/AffairPage/destruction.js
浏览文件 @
b7e22edf
...
@@ -314,9 +314,11 @@ export function handleColumns(columns){
...
@@ -314,9 +314,11 @@ export function handleColumns(columns){
if
(
item
.
dataType
)
{
if
(
item
.
dataType
)
{
if
(
text
.
indexOf
(
item
.
dataType
)
>
-
1
)
{
// 文本类型字段
if
(
text
.
indexOf
(
item
.
dataType
)
>
-
1
)
{
// 文本类型字段
item
.
render
=
(
text
)
=>
{
item
.
render
=
(
text
)
=>
{
if
(
isJSON
(
text
)){
text
=
JSON
.
parse
(
text
);
}
if
(
item
.
extendType
===
'file'
&&
typeof
text
===
'string'
){
if
(
item
.
extendType
===
'file'
&&
typeof
text
===
'string'
){
let
url
=
text
.
includes
(
'http'
)
?
text
:
config
.
sqlFormsServer
+
text
;
let
url
=
text
.
includes
(
'http'
)
?
text
:
config
.
sqlFormsServer
+
text
;
console
.
log
(
url
);
return
<
a
href
=
{
url
}
target
=
{
'_blank'
}
>
点击查看
<
/a>
;
return
<
a
href
=
{
url
}
target
=
{
'_blank'
}
>
点击查看
<
/a>
;
}
}
else
if
(
typeof
text
===
'string'
&&
text
.
length
>
20
)
{
else
if
(
typeof
text
===
'string'
&&
text
.
length
>
20
)
{
...
@@ -327,14 +329,22 @@ export function handleColumns(columns){
...
@@ -327,14 +329,22 @@ export function handleColumns(columns){
<
span
key
=
{
text
}
>
{
newTitle
}
<
/span
>
<
span
key
=
{
text
}
>
{
newTitle
}
<
/span
>
<
/Tooltip
>
<
/Tooltip
>
);
);
}
else
if
(
item
.
extendType
===
'file'
&&
}
else
if
(
item
.
extendType
===
'file'
&&
text
&&
typeof
text
===
'object'
&&
Array
.
isArray
(
text
.
files
)
&&
text
.
files
.
length
)
{
typeof
text
===
'object'
&&
Array
.
isArray
(
text
.
files
)
&&
text
.
files
.
length
)
{
let
url
=
text
.
files
[
0
].
path
.
includes
(
'http'
)
?
console
.
log
(
text
);
text
.
files
[
0
].
path
:
return
text
.
files
.
map
((
file
,
index
)
=>
{
config
.
sqlFormsServer
+
text
.
files
[
0
].
path
;
let
url
=
file
.
path
.
includes
(
'http'
)
?
return
<
a
href
=
{
url
}
target
=
{
'_blank'
}
>
file
.
path
:
点击查看
config
.
sqlFormsServer
+
file
.
path
;
<
/a>
;
return
<
a
href
=
{
url
}
target
=
{
'_blank'
}
key
=
{
file
.
name
}
style
=
{{
marginRight
:
'10px'
}}
>
{
file
.
name
}
<
/a>
;
});
}
else
{
}
else
{
return
text
;
return
text
;
}
}
...
...
FormInsertDiy/List/ExportAndDetail.js
浏览文件 @
b7e22edf
...
@@ -7,6 +7,7 @@ const ExportAndDetail = (props) => {
...
@@ -7,6 +7,7 @@ const ExportAndDetail = (props) => {
add
:
false
,
// 新增
add
:
false
,
// 新增
delete
:
false
,
// 删除
delete
:
false
,
// 删除
detail
:
true
,
// 详情
detail
:
true
,
// 详情
auditDetail
:
true
,
// 审核详情
exportUtil
:
true
,
// 导出
exportUtil
:
true
,
// 导出
importUtil
:
false
,
// 导入
importUtil
:
false
,
// 导入
};
};
...
...
FormInsertDiy/List/index.js
浏览文件 @
b7e22edf
import
React
,
{
Fragment
}
from
'react'
;
import
React
,
{
Fragment
}
from
'react'
;
import
{
Divider
,
message
,
Modal
,
Popconfirm
}
from
'antd'
;
import
{
Divider
,
message
,
Modal
,
Popconfirm
}
from
'antd'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
router
from
'umi/router'
;
import
ExportInfo
from
'../Export/index'
;
import
ExportInfo
from
'../Export/index'
;
import
{
text
,
number
,
date
,
getFormArrayConfig
}
from
'../config/index'
;
import
{
date
,
getFormArrayConfig
}
from
'../config/index'
;
import
{
handleColumns
}
from
'../AffairPage/destruction'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
Shell
from
'../Shell'
;
import
Shell
from
'../Shell'
;
import
FormArray
from
'../AffairPage/component/FormArray'
;
import
FormArray
from
'../AffairPage/component/FormArray'
;
...
@@ -11,7 +11,9 @@ import Edit from '../Edit/index';
...
@@ -11,7 +11,9 @@ import Edit from '../Edit/index';
// import ImportUtil from '../ImportUtil/ImportUtil';
// import ImportUtil from '../ImportUtil/ImportUtil';
import
SearchDom
from
'@/highOrderComponent/SearchDom'
;
import
SearchDom
from
'@/highOrderComponent/SearchDom'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
getHead
,
fetchData
,
deleteItem
,
add
}
from
'./services'
;
import
{
getHead
,
fetchData
,
deleteItem
,
add
,
getDetailId
}
from
'./services'
;
import
router
from
'umi/router'
;
const
getValue
=
obj
=>
const
getValue
=
obj
=>
Object
.
keys
(
obj
)
Object
.
keys
(
obj
)
...
@@ -77,30 +79,76 @@ class FormList extends React.Component {
...
@@ -77,30 +79,76 @@ class FormList extends React.Component {
this
.
columns
=
[];
this
.
columns
=
[];
}
}
// 渲染值
// 渲染值
componentDidMount
()
{
componentDidMount
()
{
this
.
getTableHead
();
}
getTableHead
=
()
=>
{
const
{
objId
,
Authority
}
=
this
.
props
;
const
{
objId
,
Authority
}
=
this
.
props
;
getHead
({
dataObjId
:
objId
},
datas
=>
{
getHead
({
dataObjId
:
objId
},
datas
=>
{
if
(
!
datas
)
return
;
if
(
!
datas
)
return
;
this
.
setState
({
formItem
:
datas
});
datas
=
datas
.
filter
((
x
)
=>
{
let
i
=
0
;
return
x
.
isHidden
!==
true
;
for
(
let
t
in
datas
)
{
});
if
(
i
<
10
)
{
for
(
let
item
of
datas
)
{
let
column
=
{};
item
.
extendType
=
item
.
extendTypeId
;
column
.
title
=
datas
[
t
].
title
;
item
.
dataIndex
=
item
.
name
;
column
.
dataIndex
=
datas
[
t
].
name
;
item
.
dataType
=
item
.
type
;
if
(
date
.
includes
(
datas
[
t
].
type
))
{
if
(
item
.
isPrimaryKey
)
{
column
.
render
=
val
=>
val
&&
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
this
.
columns
.
push
(
column
);
i
++
;
}
if
(
datas
[
t
].
isPrimaryKey
)
{
this
.
setState
({
this
.
setState
({
primaryKey
:
datas
[
t
]
.
name
,
primaryKey
:
item
.
name
,
});
});
}
}
}
}
datas
=
handleColumns
(
datas
);
if
(
Authority
&&
Authority
.
auditDetail
)
{
datas
.
push
(
{
dataIndex
:
'operation'
,
title
:
'操作'
,
fixed
:
datas
.
length
>
12
?
'right'
:
false
,
render
:
(
text
,
record
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
this
.
getIdByCode
(
record
.
process_biz_key
)}}
>
流程审核详情
<
/a>
)
;
/*return (<Link to={
{
pathname: './Detail',
state: {
record: {
id: record.process_biz_key,
},
},
}}>
详情
</Link>);*/
},
},
);
}
this
.
columns
=
datas
;
this
.
setState
({
formItem
:
datas
});
/* let i = 0;
for (let t in datas) {
/!* if (i < 10) {
let column = {};
column.title = datas[t].title;
column.dataIndex = datas[t].name;
if (date.includes(datas[t].type)) {
column.render = val => val && moment(val).format('YYYY-MM-DD HH:mm:ss');
}
this.columns.push(column);
i++;
}*!/
if (datas[t].isPrimaryKey) {
}
}*/
let
searchConfig
=
[];
let
searchConfig
=
[];
for
(
let
item
of
datas
)
{
for
(
let
item
of
datas
)
{
if
(
item
.
isShowQuery
)
{
if
(
item
.
isShowQuery
)
{
...
@@ -131,7 +179,18 @@ class FormList extends React.Component {
...
@@ -131,7 +179,18 @@ class FormList extends React.Component {
this.columns.push(opt);*/
this.columns.push(opt);*/
this
.
getPage
();
this
.
getPage
();
});
});
}
};
getIdByCode
=
(
code
)
=>
{
getDetailId
({
code
},
res
=>
{
router
.
push
({
pathname
:
'./Detail'
,
state
:
{
record
:
{
id
:
res
.
id
},
}
});
})
};
modify
=
record
=>
{
modify
=
record
=>
{
const
{
formItem
}
=
this
.
state
;
const
{
formItem
}
=
this
.
state
;
...
...
FormInsertDiy/List/services.js
浏览文件 @
b7e22edf
...
@@ -7,6 +7,13 @@ export const getHead = (payload, callback) => {
...
@@ -7,6 +7,13 @@ export const getHead = (payload, callback) => {
});
});
};
};
export
const
getDetailId
=
(
payload
,
callback
)
=>
{
uaaRequest
(
'/UnifiedAppFormApi/getDetailByCode'
,
payload
).
then
(
res
=>
{
if
(
!
res
)
return
;
if
(
callback
)
callback
(
res
);
});
};
export
const
fetchData
=
(
payload
,
callback
)
=>
{
export
const
fetchData
=
(
payload
,
callback
)
=>
{
uaaRequest
(
'/DataObjApi/getFormDataPage'
,
payload
).
then
(
res
=>
{
uaaRequest
(
'/DataObjApi/getFormDataPage'
,
payload
).
then
(
res
=>
{
if
(
!
res
)
return
;
if
(
!
res
)
return
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论