Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
3ca2ad82
提交
3ca2ad82
authored
6月 15, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
北电科删除部分字段
上级
018d04be
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
62 行增加
和
20 行删除
+62
-20
index.js
FormInsertDiy/AffairPage/ApplyPage/index.js
+62
-20
没有找到文件。
FormInsertDiy/AffairPage/ApplyPage/index.js
浏览文件 @
3ca2ad82
...
...
@@ -6,7 +6,7 @@
* */
import
{
message
}
from
'antd'
;
import
React
from
'react'
;
import
React
,
{
useEffect
,
useState
,
}
from
'react'
;
import
*
as
service
from
'../publicApiService'
;
import
*
as
destructionFunc
from
'../destruction'
;
import
{
Link
}
from
'dva/router'
;
...
...
@@ -24,6 +24,17 @@ import ApplyForZyd from '@/webPublic/one_stop_public/ForZydApply/index';
export
default
function
index
(
props
)
{
const
{
state
=
{}
}
=
props
.
location
;
const
[
show
,
setShow
]
=
useState
(
false
);
useEffect
(()
=>
{
setShow
(
false
);
setTimeout
(()
=>
{
setShow
(
true
);
},
100
);
},
[
props
.
location
.
pathname
]);
if
(
!
show
){
return
null
;
}
if
(
state
.
justApply
)
{
return
<
JustApply
{...
props
}
/>
;
}
else
{
...
...
@@ -35,7 +46,10 @@ class AffairPage extends React.Component {
constructor
(
props
)
{
super
(
props
);
let
pathname
=
this
.
props
.
location
.
pathname
;
const
{
dataBaseId
,
workId
}
=
this
.
props
;
const
{
dataBaseId
,
workId
}
=
this
.
props
;
this
.
state
=
{
showIframe
:
false
,
columns
:
[],
...
...
@@ -50,12 +64,18 @@ class AffairPage extends React.Component {
}
getFormDetail
=
(
workId
)
=>
{
service
.
getFormDetail
(
workId
).
then
((
response
)
=>
{
service
.
getFormDetail
(
workId
)
.
then
((
response
)
=>
{
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
return
false
;
}
destructionFunc
.
destructionGetDetail
(
response
).
then
((
x
)
=>
{
const
{
addFields
,
tableInfo
,
allConfigSetInfo
}
=
x
;
destructionFunc
.
destructionGetDetail
(
response
)
.
then
((
x
)
=>
{
const
{
addFields
,
tableInfo
,
allConfigSetInfo
}
=
x
;
this
.
setState
(
{
addFields
,
...
...
@@ -71,7 +91,12 @@ class AffairPage extends React.Component {
};
giveDetailColumns
=
()
=>
{
const
{
columns
,
workId
,
dataBaseId
,
addFields
}
=
this
.
state
;
const
{
columns
,
workId
,
dataBaseId
,
addFields
}
=
this
.
state
;
const
process_status
=
columns
.
find
((
x
)
=>
{
return
x
.
name
===
'process_status'
;
});
...
...
@@ -81,7 +106,7 @@ class AffairPage extends React.Component {
};
}
let
findCz
=
columns
.
find
((
g
)
=>
g
.
dataIndex
===
'operation'
);
if
(
!
findCz
)
{
if
(
!
findCz
)
{
columns
.
push
({
dataIndex
:
'operation'
,
title
:
'操作'
,
...
...
@@ -107,15 +132,16 @@ class AffairPage extends React.Component {
}
this
.
setState
({
columns
,
});
};
handleButtonSet
=
()
=>
{
const
{
canApply
,
otherButtons
=
[]
}
=
this
.
props
;
const
{
canApply
,
otherButtons
=
[]
}
=
this
.
props
;
const
{
allConfigSetInfo
}
=
this
.
state
;
if
(
!
allConfigSetInfo
)
{
return
[];
...
...
@@ -137,7 +163,8 @@ class AffairPage extends React.Component {
showIframe
:
true
,
renderIframe
:
true
,
},
()
=>
{},
()
=>
{
},
);
},
},
...
...
@@ -146,7 +173,10 @@ class AffairPage extends React.Component {
};
handleSearchSet
=
()
=>
{
const
{
columns
,
searchCondition
}
=
this
.
state
;
const
{
columns
,
searchCondition
}
=
this
.
state
;
const
{
onResponse
}
=
this
.
props
;
const
pageSearch
=
{
search
:
{
...
...
@@ -159,8 +189,14 @@ class AffairPage extends React.Component {
return
response
;
},
condition
:
searchCondition
,
nameSpan
:
{
big
:
8
,
small
:
9
},
fileSpan
:
{
big
:
4
,
small
:
4
},
nameSpan
:
{
big
:
8
,
small
:
9
},
fileSpan
:
{
big
:
4
,
small
:
4
},
},
tableRowKey
:
'id'
,
columns
,
...
...
@@ -170,8 +206,9 @@ class AffairPage extends React.Component {
getColumns
=
()
=>
{
const
{
workId
}
=
this
.
state
;
service
.
getColumns
(
workId
).
then
((
response
)
=>
{
if
(
response
&&
Array
.
isArray
(
response
)){
service
.
getColumns
(
workId
)
.
then
((
response
)
=>
{
if
(
response
&&
Array
.
isArray
(
response
))
{
response
=
response
.
filter
((
x
)
=>
{
return
x
.
title
!==
'流程进度'
;
});
...
...
@@ -197,7 +234,11 @@ class AffairPage extends React.Component {
return
false
;
}
const
{
pathname
}
=
this
.
state
;
const
{
dataBaseId
,
workId
,
iframeHeight
}
=
this
.
props
;
const
{
dataBaseId
,
workId
,
iframeHeight
}
=
this
.
props
;
if
(
dataBaseId
||
workId
)
{
this
.
setState
(
{
...
...
@@ -209,7 +250,8 @@ class AffairPage extends React.Component {
},
);
}
else
{
service
.
getId
(
pathname
).
then
((
x
)
=>
{
service
.
getId
(
pathname
)
.
then
((
x
)
=>
{
this
.
setState
(
{
workId
:
x
.
workId
,
...
...
@@ -241,14 +283,14 @@ class AffairPage extends React.Component {
);
return
true
;
}
}
;
componentDidMount
()
{
this
.
initData
();
}
componentDidUpdate
(
prevProps
,
prevState
)
{
if
(
prevProps
.
workId
!==
this
.
props
.
workId
)
{
if
(
prevProps
.
workId
!==
this
.
props
.
workId
)
{
// console.log('123123', prevProps, this.props);
this
.
initData
();
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论