Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
262a3730
提交
262a3730
authored
10月 31, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
30305 所有申请应用--学生填错后,在审核前可以撤回一次
上级
5fbdea9d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
365 行增加
和
370 行删除
+365
-370
ReBackButton.js
FormInsertDiy/AffairPage/ApplyPage/ReBackButton.js
+2
-2
index.js
FormInsertDiy/AffairPage/ApplyPage/index.js
+349
-368
publicApiService.js
FormInsertDiy/AffairPage/publicApiService.js
+14
-0
没有找到文件。
FormInsertDiy/AffairPage/ApplyPage/ReBackButton.js
浏览文件 @
262a3730
...
@@ -2,9 +2,9 @@ import { getIsBei_Dian } from '@/webPublic/zyd_public/utils/getSchoolType';
...
@@ -2,9 +2,9 @@ import { getIsBei_Dian } from '@/webPublic/zyd_public/utils/getSchoolType';
import
{
message
,
Modal
}
from
'antd'
;
import
{
message
,
Modal
}
from
'antd'
;
import
{
uaaRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
import
{
uaaRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
export
default
function
rebackButton
(){
export
default
function
rebackButton
(
serviceInfo
){
let
reBack
=
[];
let
reBack
=
[];
if
(
getIsBei_Dian
())
{
if
(
getIsBei_Dian
()
&&
serviceInfo
.
isCanRecall
)
{
reBack
.
push
({
reBack
.
push
({
type
:
'chehui'
,
type
:
'chehui'
,
name
:
'撤回'
,
name
:
'撤回'
,
...
...
FormInsertDiy/AffairPage/ApplyPage/index.js
浏览文件 @
262a3730
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* */
* */
import
{
message
,
Modal
}
from
'antd'
;
import
{
message
,
Modal
}
from
'antd'
;
import
React
,
{
useEffect
,
useState
,
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
*
as
service
from
'../publicApiService'
;
import
*
as
service
from
'../publicApiService'
;
import
*
as
destructionFunc
from
'../destruction'
;
import
*
as
destructionFunc
from
'../destruction'
;
import
{
Link
}
from
'dva/router'
;
import
{
Link
}
from
'dva/router'
;
...
@@ -23,392 +23,373 @@ import ApplyForZyd from '@/webPublic/one_stop_public/ForZydApply/index';
...
@@ -23,392 +23,373 @@ import ApplyForZyd from '@/webPublic/one_stop_public/ForZydApply/index';
import
{
uaaRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
import
{
uaaRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
import
rebackButton
from
'@/webPublic/FormInsertDiy/AffairPage/ApplyPage/ReBackButton'
;
import
rebackButton
from
'@/webPublic/FormInsertDiy/AffairPage/ApplyPage/ReBackButton'
;
export
default
function
index
(
props
)
{
export
default
function
index
(
props
)
{
const
{
state
=
{}
}
=
props
.
location
;
const
{
state
=
{}
}
=
props
.
location
;
const
[
show
,
setShow
]
=
useState
(
false
);
const
[
show
,
setShow
]
=
useState
(
false
);
useEffect
(()
=>
{
useEffect
(
setShow
(
false
);
()
=>
{
setTimeout
(()
=>
{
setShow
(
false
);
setShow
(
true
);
setTimeout
(()
=>
{
},
100
);
setShow
(
true
);
},
100
);
},
[
props
.
location
.
pathname
]);
},
if
(
!
show
)
{
[
props
.
location
.
pathname
],
return
null
;
);
}
if
(
!
show
)
{
if
(
state
.
justApply
)
{
return
null
;
return
<
JustApply
{...
props
}
/>
;
}
}
else
{
if
(
state
.
justApply
)
{
return
<
AffairPage
{...
props
}
/>
;
return
<
JustApply
{...
props
}
/>
;
}
}
else
{
return
<
AffairPage
{...
props
}
/>
;
}
}
}
class
AffairPage
extends
React
.
Component
{
class
AffairPage
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
let
pathname
=
this
.
props
.
location
.
pathname
;
let
pathname
=
this
.
props
.
location
.
pathname
;
const
{
const
{
dataBaseId
,
workId
}
=
this
.
props
;
dataBaseId
,
this
.
state
=
{
workId
showIframe
:
false
,
}
=
this
.
props
;
columns
:
[],
this
.
state
=
{
pathname
,
showIframe
:
false
,
workId
:
workId
||
''
,
columns
:
[],
searchCondition
:
[],
pathname
,
dataBaseId
:
''
,
workId
:
workId
||
''
,
addFields
:
[],
// 新增时填写的字段。
searchCondition
:
[],
renderIframe
:
false
,
dataBaseId
:
''
,
allConfigSetInfo
:
null
,
addFields
:
[],
// 新增时填写的字段。
serviceInfo
:
null
,
renderIframe
:
false
,
};
allConfigSetInfo
:
null
,
}
};
}
getFormDetail
=
(
workId
)
=>
{
service
.
getFormDetail
(
workId
)
.
then
((
response
)
=>
{
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
return
false
;
}
destructionFunc
.
destructionGetDetail
(
response
)
.
then
((
x
)
=>
{
const
{
addFields
,
tableInfo
,
allConfigSetInfo
}
=
x
;
this
.
setState
(
{
addFields
,
tableInfo
,
allConfigSetInfo
,
},
()
=>
{
this
.
giveDetailColumns
();
},
);
});
});
};
giveDetailColumns
=
()
=>
{
const
{
columns
,
workId
,
dataBaseId
,
addFields
}
=
this
.
state
;
const
process_status
=
columns
.
find
((
x
)
=>
{
return
x
.
name
===
'process_status'
;
});
if
(
process_status
&&
process_status
.
dataIndex
)
{
process_status
.
render
=
(
text
,
record
)
=>
{
return
record
.
statusName
||
record
[
process_status
.
dataIndex
];
};
}
let
findCz
=
columns
.
find
((
g
)
=>
g
.
dataIndex
===
'operation'
);
if
(
!
findCz
)
{
columns
.
push
({
dataIndex
:
'operation'
,
title
:
'操作'
,
fixed
:
columns
.
length
>
12
?
'right'
:
false
,
render
:
(
text
,
record
)
=>
{
return
(
<
Link
to
=
{{
pathname
:
'./Detail'
,
state
:
{
workId
,
dataBaseId
,
record
,
addFields
,
},
}}
>
详情
<
/Link
>
);
},
});
}
getServiceDetail
=
(
serviceId
)
=>
{
service
.
getServiceDetail
(
serviceId
).
then
((
res
)
=>
{
this
.
setState
({
serviceInfo
:
res
,
});
});
};
this
.
setState
({
getFormDetail
=
(
workId
)
=>
{
columns
,
service
.
getFormDetail
(
workId
).
then
((
response
)
=>
{
});
console
.
log
(
response
);
};
if
(
typeof
response
.
unifiedServicePatternModel
===
'undefined'
)
{
return
false
;
}
if
(
response
.
serviceId
){
this
.
getServiceDetail
(
response
.
serviceId
);
}
destructionFunc
.
destructionGetDetail
(
response
).
then
((
x
)
=>
{
const
{
addFields
,
tableInfo
,
allConfigSetInfo
}
=
x
;
this
.
setState
(
{
addFields
,
tableInfo
,
allConfigSetInfo
,
},
()
=>
{
this
.
giveDetailColumns
();
},
);
});
});
};
handleButtonSet
=
()
=>
{
giveDetailColumns
=
()
=>
{
const
{
const
{
columns
,
workId
,
dataBaseId
,
addFields
}
=
this
.
state
;
canApply
,
const
process_status
=
columns
.
find
((
x
)
=>
{
otherButtons
=
[],
return
x
.
name
===
'process_status'
;
}
=
this
.
props
;
});
const
{
allConfigSetInfo
}
=
this
.
state
;
if
(
process_status
&&
process_status
.
dataIndex
)
{
if
(
!
allConfigSetInfo
)
{
process_status
.
render
=
(
text
,
record
)
=>
{
return
[];
return
record
.
statusName
||
record
[
process_status
.
dataIndex
];
}
};
const
isCloseStart
=
allConfigSetInfo
?.
isCloseStart
;
}
let
findCz
=
columns
.
find
((
g
)
=>
g
.
dataIndex
===
'operation'
);
if
(
!
findCz
)
{
columns
.
push
({
dataIndex
:
'operation'
,
title
:
'操作'
,
fixed
:
columns
.
length
>
12
?
'right'
:
false
,
render
:
(
text
,
record
)
=>
{
return
(
<
Link
to
=
{{
pathname
:
'./Detail'
,
state
:
{
workId
,
dataBaseId
,
record
,
addFields
,
},
}}
>
详情
<
/Link
>
);
},
});
}
if
(
canApply
===
false
||
isCloseStart
)
{
this
.
setState
({
return
[...
otherButtons
];
columns
,
}
});
};
handleButtonSet
=
()
=>
{
const
{
canApply
,
otherButtons
=
[]
}
=
this
.
props
;
const
{
allConfigSetInfo
,
serviceInfo
}
=
this
.
state
;
if
(
!
allConfigSetInfo
)
{
return
[];
}
const
isCloseStart
=
allConfigSetInfo
?.
isCloseStart
;
return
[
if
(
canApply
===
false
||
isCloseStart
)
{
{
return
[...
otherButtons
];
type
:
'add'
,
}
name
:
'申请'
,
component
:
'Normal'
,
handleClick
:
()
=>
{
this
.
setState
(
{
showIframe
:
true
,
renderIframe
:
true
,
},
()
=>
{
},
);
},
},
...
rebackButton
(),
...
otherButtons
,
];
};
handleSearchSet
=
()
=>
{
return
[
const
{
{
columns
,
type
:
'add'
,
searchCondition
name
:
'申请'
,
}
=
this
.
state
;
component
:
'Normal'
,
const
{
onResponse
}
=
this
.
props
;
handleClick
:
()
=>
{
const
pageSearch
=
{
this
.
setState
(
search
:
{
{
field
:
{},
showIframe
:
true
,
getPageService
:
getApplyPage
,
renderIframe
:
true
,
responseCallBack
:
(
response
)
=>
{
},
if
(
onResponse
)
{
()
=>
{},
onResponse
(
response
);
);
}
},
return
response
;
},
},
...
rebackButton
(
serviceInfo
),
condition
:
searchCondition
,
...
otherButtons
,
nameSpan
:
{
];
big
:
8
,
};
small
:
9
},
fileSpan
:
{
big
:
4
,
small
:
4
},
},
tableRowKey
:
'id'
,
columns
,
};
return
pageSearch
;
};
getColumns
=
()
=>
{
handleSearchSet
=
()
=>
{
const
{
workId
}
=
this
.
state
;
const
{
columns
,
searchCondition
}
=
this
.
state
;
service
.
getColumns
(
workId
)
const
{
onResponse
}
=
this
.
props
;
.
then
((
response
)
=>
{
const
pageSearch
=
{
if
(
response
&&
Array
.
isArray
(
response
))
{
search
:
{
response
=
response
.
filter
((
x
)
=>
{
field
:
{},
return
x
.
title
!==
'流程进度'
;
getPageService
:
getApplyPage
,
});
responseCallBack
:
(
response
)
=>
{
}
if
(
onResponse
)
{
onResponse
(
response
);
}
return
response
;
},
condition
:
searchCondition
,
nameSpan
:
{
big
:
8
,
small
:
9
,
},
fileSpan
:
{
big
:
4
,
small
:
4
,
},
},
tableRowKey
:
'id'
,
columns
,
};
return
pageSearch
;
};
if
(
response
)
{
getColumns
=
()
=>
{
this
.
setState
(
const
{
workId
}
=
this
.
state
;
{
service
.
getColumns
(
workId
).
then
((
response
)
=>
{
columns
:
response
,
if
(
response
&&
Array
.
isArray
(
response
))
{
},
response
=
response
.
filter
((
x
)
=>
{
()
=>
{
return
x
.
title
!==
'流程进度'
;
this
.
getFormDetail
(
workId
);
});
},
}
);
}
});
};
if
(
response
)
{
this
.
setState
(
{
columns
:
response
,
},
()
=>
{
this
.
getFormDetail
(
workId
);
},
);
}
});
};
initData
=
()
=>
{
initData
=
()
=>
{
if
(
!
getToken
())
{
if
(
!
getToken
())
{
message
.
error
(
'您的数据未同步,请联系管理员!'
);
message
.
error
(
'您的数据未同步,请联系管理员!'
);
return
false
;
return
false
;
}
}
const
{
pathname
}
=
this
.
state
;
const
{
pathname
}
=
this
.
state
;
const
{
const
{
dataBaseId
,
workId
,
iframeHeight
}
=
this
.
props
;
dataBaseId
,
if
(
dataBaseId
||
workId
)
{
workId
,
this
.
setState
(
iframeHeight
{
}
=
this
.
props
;
workId
,
if
(
dataBaseId
||
workId
)
{
dataBaseId
,
this
.
setState
(
},
{
()
=>
{
workId
,
this
.
getColumns
();
dataBaseId
,
},
},
);
()
=>
{
}
else
{
this
.
getColumns
();
service
.
getId
(
pathname
).
then
((
x
)
=>
{
},
this
.
setState
(
);
{
}
else
{
workId
:
x
.
workId
,
service
.
getId
(
pathname
)
dataBaseId
:
x
.
dataBaseId
,
.
then
((
x
)
=>
{
},
this
.
setState
(
()
=>
{
{
this
.
getColumns
();
workId
:
x
.
workId
,
},
dataBaseId
:
x
.
dataBaseId
,
);
},
});
()
=>
{
}
this
.
getColumns
();
},
);
});
}
window
.
addEventListener
(
window
.
addEventListener
(
'message'
,
'message'
,
(
event
)
=>
{
(
event
)
=>
{
if
(
event
.
data
===
'returnList'
)
{
if
(
event
.
data
===
'returnList'
)
{
this
.
returnList
(
true
);
this
.
returnList
(
true
);
}
}
if
(
event
&&
event
.
data
&&
event
.
data
.
indexOf
&&
event
.
data
.
indexOf
(
'iframeHeight'
)
>
-
1
)
{
if
(
event
&&
event
.
data
&&
event
.
data
.
indexOf
&&
event
.
data
.
indexOf
(
'iframeHeight'
)
>
-
1
)
{
console
.
log
(
event
.
data
);
console
.
log
(
event
.
data
);
let
height
=
Number
(
event
.
data
.
split
(
'-'
)[
1
]);
let
height
=
Number
(
event
.
data
.
split
(
'-'
)[
1
]);
const
iframe
=
document
.
getElementById
(
'applyIframeId'
);
const
iframe
=
document
.
getElementById
(
'applyIframeId'
);
if
(
iframe
)
{
if
(
iframe
)
{
iframe
.
height
=
height
+
(
iframeHeight
||
50
);
iframe
.
height
=
height
+
(
iframeHeight
||
50
);
}
}
}
}
},
},
false
,
false
,
);
);
return
true
;
return
true
;
};
};
componentDidMount
()
{
componentDidMount
()
{
this
.
initData
();
this
.
initData
();
}
}
componentDidUpdate
(
prevProps
,
prevState
)
{
componentDidUpdate
(
prevProps
,
prevState
)
{
if
(
prevProps
.
workId
!==
this
.
props
.
workId
)
{
if
(
prevProps
.
workId
!==
this
.
props
.
workId
)
{
// console.log('123123', prevProps, this.props);
// console.log('123123', prevProps, this.props);
this
.
initData
();
this
.
initData
();
}
}
}
}
returnList
=
(
needSearchList
=
false
)
=>
{
returnList
=
(
needSearchList
=
false
)
=>
{
console
.
log
(
needSearchList
);
console
.
log
(
needSearchList
);
const
{
workId
}
=
this
.
state
;
const
{
workId
}
=
this
.
state
;
this
.
setState
(
this
.
setState
(
{
{
renderIframe
:
false
,
renderIframe
:
false
,
},
},
()
=>
{
()
=>
{
if
(
needSearchList
)
{
if
(
needSearchList
)
{
this
.
ListComponent
.
getPage
();
this
.
ListComponent
.
getPage
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getFormDetail
(
workId
);
this
.
getFormDetail
(
workId
);
},
2000
);
},
2000
);
}
}
this
.
setState
({
this
.
setState
({
showIframe
:
false
,
showIframe
:
false
,
});
});
},
},
);
);
};
};
render
()
{
render
()
{
const
{
iframeUrlDiy
}
=
this
.
props
;
const
{
iframeUrlDiy
}
=
this
.
props
;
const
{
const
{
workId
,
workId
,
dataBaseId
,
dataBaseId
,
addFields
,
addFields
,
showIframe
,
showIframe
,
renderIframe
,
renderIframe
,
allConfigSetInfo
,
allConfigSetInfo
,
}
=
this
.
state
;
}
=
this
.
state
;
if
(
!
workId
||
!
allConfigSetInfo
)
{
if
(
!
workId
||
!
allConfigSetInfo
)
{
return
null
;
return
null
;
}
}
// console.log(allConfigSetInfo.isCloseStart);
// console.log(allConfigSetInfo.isCloseStart);
// const url = config.onestopPC.split('/#/');
// const url = config.onestopPC.split('/#/');
// let iframeUrl = iframeUrlDiy || `${url[0]}/#/IFrameForApply?id=${workId}&token=${getToken()}`;
// let iframeUrl = iframeUrlDiy || `${url[0]}/#/IFrameForApply?id=${workId}&token=${getToken()}`;
let
buttons
=
this
.
handleButtonSet
({});
let
buttons
=
this
.
handleButtonSet
({});
let
listConfig
=
pageSetting
.
listConfig
;
let
listConfig
=
pageSetting
.
listConfig
;
if
(
!
buttons
.
length
)
{
if
(
!
buttons
.
length
)
{
listConfig
=
deepCopy
(
listConfig
);
listConfig
=
deepCopy
(
listConfig
);
listConfig
.
buttonArea
=
false
;
listConfig
.
buttonArea
=
false
;
}
}
return
(
return
(
<
PageHeaderWrapper
title
=
""
>
<
PageHeaderWrapper
title
=
""
>
<
div
<
div
style
=
{{
style
=
{{
display
:
showIframe
?
'none'
:
'block'
,
display
:
showIframe
?
'none'
:
'block'
,
}}
>
}}
>
<
List
<
List
listConfig
=
{
listConfig
}
listConfig
=
{
listConfig
}
pageButton
=
{
buttons
}
pageButton
=
{
buttons
}
pageSearch
=
{
this
.
handleSearchSet
({})}
pageSearch
=
{
this
.
handleSearchSet
({})}
addFields
=
{
addFields
}
addFields
=
{
addFields
}
ref
=
{(
ListComponent
)
=>
(
this
.
ListComponent
=
ListComponent
)}
ref
=
{(
ListComponent
)
=>
(
this
.
ListComponent
=
ListComponent
)}
workId
=
{
workId
}
workId
=
{
workId
}
dataBaseId
=
{
dataBaseId
}
dataBaseId
=
{
dataBaseId
}
/
>
/
>
<
/div
>
<
/div
>
<
div
<
div
style
=
{{
style
=
{{
visibility
:
showIframe
?
'visible'
:
'hidden'
,
visibility
:
showIframe
?
'visible'
:
'hidden'
,
height
:
showIframe
?
'auto'
:
'0px'
,
height
:
showIframe
?
'auto'
:
'0px'
,
width
:
'100%'
,
width
:
'100%'
,
backgroundColor
:
'#fff'
,
backgroundColor
:
'#fff'
,
paddingLeft
:
'24px'
,
paddingLeft
:
'24px'
,
}}
>
}}
>
<
Shell
>
<
Shell
>
<
div
<
div
style
=
{{
style
=
{{
height
:
'54px'
,
height
:
'54px'
,
padding
:
'12px 0 12px 12px'
,
padding
:
'12px 0 12px 12px'
,
display
:
showIframe
?
'block'
:
'none'
,
display
:
showIframe
?
'block'
:
'none'
,
}}
>
}}
>
<
ButtonDiy
<
ButtonDiy
name
=
"返回"
name
=
"返回"
className
=
"defaultBlue"
className
=
"defaultBlue"
handleClick
=
{
this
.
returnList
}
handleClick
=
{
this
.
returnList
}
icon
=
"arrow-left"
icon
=
"arrow-left"
/>
/>
<
/div
>
<
/div
>
<
/Shell
>
<
/Shell
>
{
renderIframe
?
(
{
renderIframe
?
(
iframeUrlDiy
?
iframeUrlDiy
?
(
<
iframe
<
iframe
src
=
{
iframeUrlDiy
}
src
=
{
iframeUrlDiy
}
frameBorder
=
{
0
}
frameBorder
=
{
0
}
id
=
"applyIframeId"
id
=
"applyIframeId"
name
=
"applyIframe"
name
=
"applyIframe"
marginWidth
=
"0"
marginWidth
=
"0"
marginHeight
=
"0"
marginHeight
=
"0"
allowTransparency
=
"yes"
allowTransparency
=
"yes"
seamless
seamless
scrolling
=
{
'auto'
}
scrolling
=
{
'auto'
}
style
=
{{
style
=
{{
width
:
'100%'
,
width
:
'100%'
,
minHeight
:
'800px'
,
minHeight
:
'800px'
,
overflowY
:
'hidden'
,
overflowY
:
'hidden'
,
backgroundColor
:
'#fff'
,
backgroundColor
:
'#fff'
,
}}
}}
/>
:
/
>
<
ApplyForZyd
)
:
(
{...
this
.
props
}
<
ApplyForZyd
{...
this
.
props
}
returnList
=
{
this
.
returnList
}
id
=
{
workId
}
/
>
returnList
=
{
this
.
returnList
}
)
id
=
{
workId
}
)
:
null
}
/
>
<
/div
>
)
:
null
}
<
/PageHeaderWrapper
>
<
/div
>
);
<
/PageHeaderWrapper
>
}
);
}
}
}
FormInsertDiy/AffairPage/publicApiService.js
浏览文件 @
262a3730
...
@@ -144,6 +144,19 @@ const getFormDetail = (id) => {
...
@@ -144,6 +144,19 @@ const getFormDetail = (id) => {
});
});
};
};
/**
*
* */
const
getServiceDetail
=
(
id
)
=>
{
return
apiRequest
(
'/UnifiedServiceApi/getDetail'
,
{
id
}).
then
((
x
)
=>
{
if
(
x
)
{
return
x
;
}
else
{
return
{};
}
});
};
/**
/**
* 发起流程
* 发起流程
* */
* */
...
@@ -248,6 +261,7 @@ export {
...
@@ -248,6 +261,7 @@ export {
getColumns
,
getColumns
,
getPages
,
getPages
,
getFormDetail
,
getFormDetail
,
getServiceDetail
,
getOptions
,
getOptions
,
getBatchOptions
,
getBatchOptions
,
startProcess
,
startProcess
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论