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';
import
SearchDom
from
'@/highOrderComponent/SearchDom'
;
import
ButtonListDom
from
'../ButtonListDom'
;
import
Shell
from
'@/baseComponent/Shell'
;
import
ColumnsRender
from
'@/highOrderComponent/ColumnsRender'
;
import
*
as
services
from
'@/highOrderComponent/Service'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
PropTypes
from
'prop-types'
;
import
{
deepCopy
}
from
'@/baseComponent/utils'
;
import
{
date
,
format
,
text
}
from
'../../config'
;
import
moment
from
'moment'
;
import
{
handleAudit
}
from
'../publicApiService'
;
import
{
Tooltip
}
from
'antd'
;
import
{
handleColumns
}
from
'@/webPublic/FormInsertDiy/AffairPage/destruction'
;
export
default
class
List
extends
Component
{
...
...
FormInsertDiy/AffairPage/AuditPage/index.js
浏览文件 @
b7e22edf
...
...
@@ -5,7 +5,6 @@
*
* */
import
{
message
}
from
'antd'
;
import
React
,
{
}
from
'react'
;
import
*
as
service
from
'../publicApiService'
;
import
AuditPage
from
'./AuditPage'
;
...
...
FormInsertDiy/AffairPage/destruction.js
浏览文件 @
b7e22edf
...
...
@@ -314,9 +314,11 @@ export function handleColumns(columns){
if
(
item
.
dataType
)
{
if
(
text
.
indexOf
(
item
.
dataType
)
>
-
1
)
{
// 文本类型字段
item
.
render
=
(
text
)
=>
{
if
(
isJSON
(
text
)){
text
=
JSON
.
parse
(
text
);
}
if
(
item
.
extendType
===
'file'
&&
typeof
text
===
'string'
){
let
url
=
text
.
includes
(
'http'
)
?
text
:
config
.
sqlFormsServer
+
text
;
console
.
log
(
url
);
return
<
a
href
=
{
url
}
target
=
{
'_blank'
}
>
点击查看
<
/a>
;
}
else
if
(
typeof
text
===
'string'
&&
text
.
length
>
20
)
{
...
...
@@ -327,14 +329,22 @@ export function handleColumns(columns){
<
span
key
=
{
text
}
>
{
newTitle
}
<
/span
>
<
/Tooltip
>
);
}
else
if
(
item
.
extendType
===
'file'
&&
}
else
if
(
item
.
extendType
===
'file'
&&
text
&&
typeof
text
===
'object'
&&
Array
.
isArray
(
text
.
files
)
&&
text
.
files
.
length
)
{
let
url
=
text
.
files
[
0
].
path
.
includes
(
'http'
)
?
text
.
files
[
0
].
path
:
config
.
sqlFormsServer
+
text
.
files
[
0
].
path
;
return
<
a
href
=
{
url
}
target
=
{
'_blank'
}
>
点击查看
<
/a>
;
console
.
log
(
text
);
return
text
.
files
.
map
((
file
,
index
)
=>
{
let
url
=
file
.
path
.
includes
(
'http'
)
?
file
.
path
:
config
.
sqlFormsServer
+
file
.
path
;
return
<
a
href
=
{
url
}
target
=
{
'_blank'
}
key
=
{
file
.
name
}
style
=
{{
marginRight
:
'10px'
}}
>
{
file
.
name
}
<
/a>
;
});
}
else
{
return
text
;
}
...
...
FormInsertDiy/List/ExportAndDetail.js
浏览文件 @
b7e22edf
...
...
@@ -7,6 +7,7 @@ const ExportAndDetail = (props) => {
add
:
false
,
// 新增
delete
:
false
,
// 删除
detail
:
true
,
// 详情
auditDetail
:
true
,
// 审核详情
exportUtil
:
true
,
// 导出
importUtil
:
false
,
// 导入
};
...
...
FormInsertDiy/List/index.js
浏览文件 @
b7e22edf
import
React
,
{
Fragment
}
from
'react'
;
import
{
Divider
,
message
,
Modal
,
Popconfirm
}
from
'antd'
;
import
moment
from
'moment'
;
import
router
from
'umi/router'
;
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
Shell
from
'../Shell'
;
import
FormArray
from
'../AffairPage/component/FormArray'
;
...
...
@@ -11,7 +11,9 @@ import Edit from '../Edit/index';
// import ImportUtil from '../ImportUtil/ImportUtil';
import
SearchDom
from
'@/highOrderComponent/SearchDom'
;
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
=>
Object
.
keys
(
obj
)
...
...
@@ -77,30 +79,76 @@ class FormList extends React.Component {
this
.
columns
=
[];
}
// 渲染值
componentDidMount
()
{
this
.
getTableHead
();
}
getTableHead
=
()
=>
{
const
{
objId
,
Authority
}
=
this
.
props
;
getHead
({
dataObjId
:
objId
},
datas
=>
{
if
(
!
datas
)
return
;
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
)
{
datas
=
datas
.
filter
((
x
)
=>
{
return
x
.
isHidden
!==
true
;
});
for
(
let
item
of
datas
)
{
item
.
extendType
=
item
.
extendTypeId
;
item
.
dataIndex
=
item
.
name
;
item
.
dataType
=
item
.
type
;
if
(
item
.
isPrimaryKey
)
{
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
=
[];
for
(
let
item
of
datas
)
{
if
(
item
.
isShowQuery
)
{
...
...
@@ -131,7 +179,18 @@ class FormList extends React.Component {
this.columns.push(opt);*/
this
.
getPage
();
});
}
};
getIdByCode
=
(
code
)
=>
{
getDetailId
({
code
},
res
=>
{
router
.
push
({
pathname
:
'./Detail'
,
state
:
{
record
:
{
id
:
res
.
id
},
}
});
})
};
modify
=
record
=>
{
const
{
formItem
}
=
this
.
state
;
...
...
FormInsertDiy/List/services.js
浏览文件 @
b7e22edf
...
...
@@ -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
)
=>
{
uaaRequest
(
'/DataObjApi/getFormDataPage'
,
payload
).
then
(
res
=>
{
if
(
!
res
)
return
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论