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 {
...
@@ -37,16 +37,21 @@ export default class Detail extends Component {
super
(
props
);
super
(
props
);
const
{
state
}
=
this
.
props
.
location
;
const
{
state
}
=
this
.
props
.
location
;
let
id
=
''
;
let
id
=
''
;
if
(
state
&&
state
.
record
&&
state
.
record
.
id
)
{
let
code
=
''
;
const
{
record
}
=
state
;
if
(
state
&&
state
.
record
)
{
id
=
record
.
id
;
if
(
state
.
record
.
id
)
{
id
=
state
.
record
.
id
;
}
if
(
state
.
record
.
code
)
{
code
=
state
.
record
.
code
;
}
}
}
if
(
!
id
)
{
if
(
!
id
)
{
id
=
getUrlInfo
()?.
id
;
id
=
getUrlInfo
()?.
id
;
}
}
console
.
log
(
id
);
this
.
state
=
{
this
.
state
=
{
id
,
id
,
code
,
showAll
:
props
.
from
!==
'onestopApp2.0'
showAll
:
props
.
from
!==
'onestopApp2.0'
};
};
}
}
...
@@ -58,8 +63,8 @@ export default class Detail extends Component {
...
@@ -58,8 +63,8 @@ export default class Detail extends Component {
if
(
event
.
data
&&
event
.
data
.
indexOf
&&
event
.
data
.
indexOf
(
'iframeDetailHeight'
)
>
-
1
)
{
if
(
event
.
data
&&
event
.
data
.
indexOf
&&
event
.
data
.
indexOf
(
'iframeDetailHeight'
)
>
-
1
)
{
const
height
=
Number
(
event
.
data
.
split
(
'-'
)[
1
]);
const
height
=
Number
(
event
.
data
.
split
(
'-'
)[
1
]);
const
dom
=
document
.
getElementById
(
'detailIframeId'
);
const
dom
=
document
.
getElementById
(
'detailIframeId'
);
if
(
dom
)
{
if
(
dom
)
{
document
.
getElementById
(
'detailIframeId'
).
height
=
height
+
50
;
document
.
getElementById
(
'detailIframeId'
).
height
=
height
+
50
;
}
}
}
}
},
},
...
@@ -75,10 +80,14 @@ export default class Detail extends Component {
...
@@ -75,10 +80,14 @@ export default class Detail extends Component {
render
()
{
render
()
{
const
{
from
}
=
this
.
props
;
const
{
from
}
=
this
.
props
;
const
{
id
,
showAll
}
=
this
.
state
;
const
{
id
,
showAll
,
code
,
}
=
this
.
state
;
const
url
=
config
.
onestopPC
.
split
(
'/#/'
);
const
url
=
config
.
onestopPC
.
split
(
'/#/'
);
let
showPrint
=
this
.
props
.
location
?.
state
?.
showPrint
;
let
showPrint
=
this
.
props
.
location
?.
state
?.
showPrint
;
if
(
getIsGui_Jian
()
&&
!
showPrint
)
{
if
(
getIsGui_Jian
()
&&
!
showPrint
)
{
// 27590 寝室调整管理-寝室调整申请,详情的打印预览按钮不见了210301080119-122617
// 27590 寝室调整管理-寝室调整申请,详情的打印预览按钮不见了210301080119-122617
// 贵建把打印预览显示出来
// 贵建把打印预览显示出来
showPrint
=
true
;
showPrint
=
true
;
...
@@ -88,12 +97,12 @@ export default class Detail extends Component {
...
@@ -88,12 +97,12 @@ export default class Detail extends Component {
iframeUrl
=
iframeUrl
+
'&showPrint=true'
;
iframeUrl
=
iframeUrl
+
'&showPrint=true'
;
}
}
if
(
from
===
'onestopApp2.0'
)
{
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()}`;
// iframeUrl = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getToken()}`;
// console.log(showPrint);
// console.log(showPrint);
return
(
return
(
<
PageHeaderWrapper
title
=
''
>
<
PageHeaderWrapper
title
=
""
>
<
Shell
>
<
Shell
>
<
div
<
div
style
=
{{
style
=
{{
...
@@ -102,20 +111,21 @@ export default class Detail extends Component {
...
@@ -102,20 +111,21 @@ export default class Detail extends Component {
}}
>
}}
>
{
showAll
?
(
{
showAll
?
(
<
ButtonDiy
<
ButtonDiy
name
=
'返回'
name
=
"返回"
className
=
'defaultBlue'
className
=
"defaultBlue"
handleClick
=
{()
=>
{
handleClick
=
{()
=>
{
router
.
goBack
();
router
.
goBack
();
}}
}}
icon
=
'arrow-left'
icon
=
"arrow-left"
/>
/>
)
:
null
}
)
:
null
}
<
ButtonDiy
<
ButtonDiy
name
=
{
'全屏查看'
}
name
=
{
'全屏查看'
}
className
=
'defaultBlue'
className
=
"defaultBlue"
handleClick
=
{()
=>
{
handleClick
=
{()
=>
{
document
.
getElementById
(
'detailIframeId'
).
requestFullscreen
();
document
.
getElementById
(
'detailIframeId'
)
}}
/
>
.
requestFullscreen
();
}}
/
>
<
/div
>
<
/div
>
<
/Shell
>
<
/Shell
>
<
Shell
>
<
Shell
>
...
@@ -124,12 +134,12 @@ export default class Detail extends Component {
...
@@ -124,12 +134,12 @@ export default class Detail extends Component {
<
iframe
<
iframe
src
=
{
iframeUrl
}
src
=
{
iframeUrl
}
frameBorder
=
{
0
}
frameBorder
=
{
0
}
id
=
'detailIframeId'
id
=
"detailIframeId"
name
=
'applyIframe'
name
=
"applyIframe"
marginWidth
=
'0'
marginWidth
=
"0"
marginHeight
=
'0'
marginHeight
=
"0"
onLoad
=
{
this
.
showAll
}
onLoad
=
{
this
.
showAll
}
allowtransparency
=
'yes'
allowtransparency
=
"yes"
seamless
seamless
scrolling
=
{
'no'
}
scrolling
=
{
'no'
}
style
=
{{
style
=
{{
...
@@ -139,7 +149,10 @@ export default class Detail extends Component {
...
@@ -139,7 +149,10 @@ export default class Detail extends Component {
}}
}}
/>
:
/>
:
<
div
id
=
{
'detailIframeId'
}
>
<
div
id
=
{
'detailIframeId'
}
>
<
DetailOneStop
id
=
{
id
}
{...
this
.
props
}
showPrint
=
{
showPrint
||
false
}
/
>
<
DetailOneStop
id
=
{
id
}
{...
this
.
props
}
code
=
{
code
}
showPrint
=
{
showPrint
||
false
}
/
>
<
/div
>
<
/div
>
}
}
...
@@ -152,12 +165,12 @@ export default class Detail extends Component {
...
@@ -152,12 +165,12 @@ export default class Detail extends Component {
}}
>
}}
>
{
showAll
?
(
{
showAll
?
(
<
ButtonDiy
<
ButtonDiy
name
=
'返回'
name
=
"返回"
className
=
'defaultBlue'
className
=
"defaultBlue"
handleClick
=
{()
=>
{
handleClick
=
{()
=>
{
router
.
goBack
();
router
.
goBack
();
}}
}}
icon
=
'arrow-left'
icon
=
"arrow-left"
/>
/>
)
:
null
}
)
:
null
}
<
ButtonDiy
<
ButtonDiy
...
@@ -165,8 +178,9 @@ export default class Detail extends Component {
...
@@ -165,8 +178,9 @@ export default class Detail extends Component {
type
=
{
'primary'
}
type
=
{
'primary'
}
// className='primaryBlue'
// className='primaryBlue'
handleClick
=
{()
=>
{
handleClick
=
{()
=>
{
document
.
getElementById
(
'detailIframeId'
).
requestFullscreen
();
document
.
getElementById
(
'detailIframeId'
)
}}
/
>
.
requestFullscreen
();
}}
/
>
<
/div
>
<
/div
>
<
/Shell
>
<
/Shell
>
<
/PageHeaderWrapper
>
<
/PageHeaderWrapper
>
...
...
one_stop_public/DetailForAudit/DetailSplit.js
浏览文件 @
db36c054
...
@@ -144,7 +144,7 @@ class DetailSplit extends Component {
...
@@ -144,7 +144,7 @@ class DetailSplit extends Component {
const
code
=
this
.
props
.
history
.
location
.
state
&&
this
.
props
.
history
.
location
.
state
.
code
;
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
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
;
const
taskId
=
this
.
props
.
history
.
location
.
state
&&
this
.
props
.
history
.
location
.
state
.
taskId
;
if
(
!
id
)
{
if
(
!
id
&&
!
code
)
{
if
(
queryId
)
{
if
(
queryId
)
{
}
else
{
}
else
{
openToast
(
'error'
,
'数据已过期'
,
'当前页面数据已过期,请重新进入'
);
openToast
(
'error'
,
'数据已过期'
,
'当前页面数据已过期,请重新进入'
);
...
...
one_stop_public/DetailForAudit/IframeForDetail.js
浏览文件 @
db36c054
...
@@ -3,64 +3,65 @@
...
@@ -3,64 +3,65 @@
* 2019年12月11日 17:30:41
* 2019年12月11日 17:30:41
* 查看详情页面的iframe嵌套到中医大里面
* 查看详情页面的iframe嵌套到中医大里面
*/
*/
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
setToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
setToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getUrlInfo
}
from
'./utils'
;
import
{
getUrlInfo
}
from
'./utils'
;
import
DetailSplit
from
'./DetailSplit'
;
import
DetailSplit
from
'./DetailSplit'
;
import
styles
from
'./styles.less'
;
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
{
export
default
class
GetDetail
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
const
token
=
getUrlInfo
().
token
;
const
token
=
getUrlInfo
().
token
;
if
(
token
&&
token
.
length
>
10
){
if
(
token
&&
token
.
length
>
10
)
{
setToken
(
token
);
setToken
(
token
);
}
}
getOneStopConfigList
();
getOneStopConfigList
();
this
.
state
=
{
this
.
state
=
{
id
:
getUrlInfo
().
id
||
props
.
id
,
id
:
getUrlInfo
().
id
||
props
.
id
,
code
:
getUrlInfo
().
code
||
props
.
code
,
};
}
};
componentDidMount
()
{}
}
componentDidMount
()
{
/***
}
* 需要加入跳转功能;
* 钟是志
* 在iframe中打开时 直接返回一个postMessage;
* */
/***
render
()
{
* 需要加入跳转功能;
const
{
id
,
code
}
=
this
.
state
;
* 钟是志
const
{
* 在iframe中打开时 直接返回一个postMessage;
detailInfoDivStyle
=
{
* */
backgroundColor
:
'#FFFFFF'
,
overflow
:
'auto'
,
render
()
{
height
:
'100%'
,
const
{
id
}
=
this
.
state
;
width
:
'calc(100vw - 300px)'
,
const
{
padding
:
0
,
detailInfoDivStyle
=
{
},
backgroundColor
:
'#FFFFFF'
,
}
=
this
.
props
;
overflow
:
'auto'
,
let
{
location
}
=
this
.
props
.
history
;
height
:
'100%'
,
location
=
{
width
:
'calc(100vw - 300px)'
,
...
location
,
padding
:
0
,
state
:
{
}
id
,
}
=
this
.
props
;
code
,
let
{
location
}
=
this
.
props
.
history
;
fromIframe
:
false
,
location
=
{
},
...
location
,
};
state
:
{
return
(
id
,
<
div
className
=
{
styles
.
detail_div
}
id
=
{
'detailInfoDiv'
}
style
=
{
detailInfoDivStyle
}
>
fromIframe
:
false
,
<
DetailSplit
},
history
=
{{
};
...
this
.
props
.
history
,
return
(
location
,
<
div
className
=
{
styles
.
detail_div
}
}}
id
=
{
'detailInfoDiv'
}
showPrint
=
{
this
.
props
.
showPrint
||
false
}
style
=
{
detailInfoDivStyle
}
/
>
>
<
/div
>
<
DetailSplit
history
=
{{...
this
.
props
.
history
,
location
}}
);
showPrint
=
{
this
.
props
.
showPrint
||
false
}
}
/
>
<
/div
>
);
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论