Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
db36c054
提交
db36c054
authored
7月 29, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加code 的显示
上级
d9100e52
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
95 行增加
和
80 行删除
+95
-80
Detail.js
FormInsertDiy/AffairPage/Detail.js
+41
-27
DetailSplit.js
one_stop_public/DetailForAudit/DetailSplit.js
+1
-1
IframeForDetail.js
one_stop_public/DetailForAudit/IframeForDetail.js
+53
-52
没有找到文件。
FormInsertDiy/AffairPage/Detail.js
浏览文件 @
db36c054
...
...
@@ -37,16 +37,21 @@ export default class Detail extends Component {
super
(
props
);
const
{
state
}
=
this
.
props
.
location
;
let
id
=
''
;
if
(
state
&&
state
.
record
&&
state
.
record
.
id
)
{
const
{
record
}
=
state
;
id
=
record
.
id
;
let
code
=
''
;
if
(
state
&&
state
.
record
)
{
if
(
state
.
record
.
id
)
{
id
=
state
.
record
.
id
;
}
if
(
state
.
record
.
code
)
{
code
=
state
.
record
.
code
;
}
}
if
(
!
id
)
{
id
=
getUrlInfo
()?.
id
;
}
console
.
log
(
id
);
this
.
state
=
{
id
,
code
,
showAll
:
props
.
from
!==
'onestopApp2.0'
};
}
...
...
@@ -58,8 +63,8 @@ export default class Detail extends Component {
if
(
event
.
data
&&
event
.
data
.
indexOf
&&
event
.
data
.
indexOf
(
'iframeDetailHeight'
)
>
-
1
)
{
const
height
=
Number
(
event
.
data
.
split
(
'-'
)[
1
]);
const
dom
=
document
.
getElementById
(
'detailIframeId'
);
if
(
dom
)
{
document
.
getElementById
(
'detailIframeId'
).
height
=
height
+
50
;
if
(
dom
)
{
document
.
getElementById
(
'detailIframeId'
).
height
=
height
+
50
;
}
}
},
...
...
@@ -75,10 +80,14 @@ export default class Detail extends Component {
render
()
{
const
{
from
}
=
this
.
props
;
const
{
id
,
showAll
}
=
this
.
state
;
const
{
id
,
showAll
,
code
,
}
=
this
.
state
;
const
url
=
config
.
onestopPC
.
split
(
'/#/'
);
let
showPrint
=
this
.
props
.
location
?.
state
?.
showPrint
;
if
(
getIsGui_Jian
()
&&
!
showPrint
)
{
if
(
getIsGui_Jian
()
&&
!
showPrint
)
{
// 27590 寝室调整管理-寝室调整申请,详情的打印预览按钮不见了210301080119-122617
// 贵建把打印预览显示出来
showPrint
=
true
;
...
...
@@ -88,12 +97,12 @@ export default class Detail extends Component {
iframeUrl
=
iframeUrl
+
'&showPrint=true'
;
}
if
(
from
===
'onestopApp2.0'
)
{
iframeUrl
=
config
.
gateWayPort
+
`/portal/#/showAuditIframe?id=
${
id
}
&hasSingle=false&token=
${
getToken
()}
&isPrint=false`
;
iframeUrl
=
config
.
gateWayPort
+
`/portal/#/showAuditIframe?id=
${
id
}
&
code=
${
code
}
&
hasSingle=false&token=
${
getToken
()}
&isPrint=false`
;
}
// iframeUrl = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getToken()}`;
// console.log(showPrint);
return
(
<
PageHeaderWrapper
title
=
''
>
<
PageHeaderWrapper
title
=
""
>
<
Shell
>
<
div
style
=
{{
...
...
@@ -102,20 +111,21 @@ export default class Detail extends Component {
}}
>
{
showAll
?
(
<
ButtonDiy
name
=
'返回'
className
=
'defaultBlue'
name
=
"返回"
className
=
"defaultBlue"
handleClick
=
{()
=>
{
router
.
goBack
();
}}
icon
=
'arrow-left'
icon
=
"arrow-left"
/>
)
:
null
}
<
ButtonDiy
name
=
{
'全屏查看'
}
className
=
'defaultBlue'
className
=
"defaultBlue"
handleClick
=
{()
=>
{
document
.
getElementById
(
'detailIframeId'
).
requestFullscreen
();
}}
/
>
document
.
getElementById
(
'detailIframeId'
)
.
requestFullscreen
();
}}
/
>
<
/div
>
<
/Shell
>
<
Shell
>
...
...
@@ -124,12 +134,12 @@ export default class Detail extends Component {
<
iframe
src
=
{
iframeUrl
}
frameBorder
=
{
0
}
id
=
'detailIframeId'
name
=
'applyIframe'
marginWidth
=
'0'
marginHeight
=
'0'
id
=
"detailIframeId"
name
=
"applyIframe"
marginWidth
=
"0"
marginHeight
=
"0"
onLoad
=
{
this
.
showAll
}
allowtransparency
=
'yes'
allowtransparency
=
"yes"
seamless
scrolling
=
{
'no'
}
style
=
{{
...
...
@@ -139,7 +149,10 @@ export default class Detail extends Component {
}}
/>
:
<
div
id
=
{
'detailIframeId'
}
>
<
DetailOneStop
id
=
{
id
}
{...
this
.
props
}
showPrint
=
{
showPrint
||
false
}
/
>
<
DetailOneStop
id
=
{
id
}
{...
this
.
props
}
code
=
{
code
}
showPrint
=
{
showPrint
||
false
}
/
>
<
/div
>
}
...
...
@@ -152,12 +165,12 @@ export default class Detail extends Component {
}}
>
{
showAll
?
(
<
ButtonDiy
name
=
'返回'
className
=
'defaultBlue'
name
=
"返回"
className
=
"defaultBlue"
handleClick
=
{()
=>
{
router
.
goBack
();
}}
icon
=
'arrow-left'
icon
=
"arrow-left"
/>
)
:
null
}
<
ButtonDiy
...
...
@@ -165,8 +178,9 @@ export default class Detail extends Component {
type
=
{
'primary'
}
// className='primaryBlue'
handleClick
=
{()
=>
{
document
.
getElementById
(
'detailIframeId'
).
requestFullscreen
();
}}
/
>
document
.
getElementById
(
'detailIframeId'
)
.
requestFullscreen
();
}}
/
>
<
/div
>
<
/Shell
>
<
/PageHeaderWrapper
>
...
...
one_stop_public/DetailForAudit/DetailSplit.js
浏览文件 @
db36c054
...
...
@@ -144,7 +144,7 @@ class DetailSplit extends Component {
const
code
=
this
.
props
.
history
.
location
.
state
&&
this
.
props
.
history
.
location
.
state
.
code
;
const
queryId
=
this
.
props
.
history
.
location
.
query
&&
this
.
props
.
history
.
location
.
query
.
id
;
const
taskId
=
this
.
props
.
history
.
location
.
state
&&
this
.
props
.
history
.
location
.
state
.
taskId
;
if
(
!
id
)
{
if
(
!
id
&&
!
code
)
{
if
(
queryId
)
{
}
else
{
openToast
(
'error'
,
'数据已过期'
,
'当前页面数据已过期,请重新进入'
);
...
...
one_stop_public/DetailForAudit/IframeForDetail.js
浏览文件 @
db36c054
...
...
@@ -3,64 +3,65 @@
* 2019年12月11日 17:30:41
* 查看详情页面的iframe嵌套到中医大里面
*/
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
setToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getUrlInfo
}
from
'./utils'
;
import
{
getUrlInfo
}
from
'./utils'
;
import
DetailSplit
from
'./DetailSplit'
;
import
styles
from
'./styles.less'
;
import
{
getOneStopConfigList
}
from
'@/webPublic/one_stop_public/publicServices'
;
import
{
getOneStopConfigList
}
from
'@/webPublic/one_stop_public/publicServices'
;
export
default
class
GetDetail
extends
Component
{
constructor
(
props
)
{
super
(
props
);
const
token
=
getUrlInfo
().
token
;
if
(
token
&&
token
.
length
>
10
){
setToken
(
token
);
}
getOneStopConfigList
();
this
.
state
=
{
id
:
getUrlInfo
().
id
||
props
.
id
,
constructor
(
props
)
{
super
(
props
);
const
token
=
getUrlInfo
().
token
;
if
(
token
&&
token
.
length
>
10
)
{
setToken
(
token
);
}
getOneStopConfigList
();
this
.
state
=
{
id
:
getUrlInfo
().
id
||
props
.
id
,
code
:
getUrlInfo
().
code
||
props
.
code
,
};
}
};
}
componentDidMount
()
{}
componentDidMount
()
{
}
/***
* 需要加入跳转功能;
* 钟是志
* 在iframe中打开时 直接返回一个postMessage;
* */
/***
* 需要加入跳转功能;
* 钟是志
* 在iframe中打开时 直接返回一个postMessage;
* */
render
()
{
const
{
id
}
=
this
.
state
;
const
{
detailInfoDivStyle
=
{
backgroundColor
:
'#FFFFFF'
,
overflow
:
'auto'
,
height
:
'100%'
,
width
:
'calc(100vw - 300px)'
,
padding
:
0
,
}
}
=
this
.
props
;
let
{
location
}
=
this
.
props
.
history
;
location
=
{
...
location
,
state
:
{
id
,
fromIframe
:
false
,
},
};
return
(
<
div
className
=
{
styles
.
detail_div
}
id
=
{
'detailInfoDiv'
}
style
=
{
detailInfoDivStyle
}
>
<
DetailSplit
history
=
{{...
this
.
props
.
history
,
location
}}
showPrint
=
{
this
.
props
.
showPrint
||
false
}
/
>
<
/div
>
);
}
render
()
{
const
{
id
,
code
}
=
this
.
state
;
const
{
detailInfoDivStyle
=
{
backgroundColor
:
'#FFFFFF'
,
overflow
:
'auto'
,
height
:
'100%'
,
width
:
'calc(100vw - 300px)'
,
padding
:
0
,
},
}
=
this
.
props
;
let
{
location
}
=
this
.
props
.
history
;
location
=
{
...
location
,
state
:
{
id
,
code
,
fromIframe
:
false
,
},
};
return
(
<
div
className
=
{
styles
.
detail_div
}
id
=
{
'detailInfoDiv'
}
style
=
{
detailInfoDivStyle
}
>
<
DetailSplit
history
=
{{
...
this
.
props
.
history
,
location
,
}}
showPrint
=
{
this
.
props
.
showPrint
||
false
}
/
>
<
/div
>
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论