Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
d4c56d33
提交
d4c56d33
authored
6月 10, 2020
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
打印修改
上级
0705985e
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
23 行增加
和
22 行删除
+23
-22
DetailDom.js
zyd_private/DragAndPrint/ViewPrint/DetailDom.js
+5
-0
config.js
zyd_private/DragAndPrint/ViewPrint/config.js
+7
-7
index2.js
zyd_private/DragAndPrint/ViewPrint/index2.js
+11
-15
没有找到文件。
zyd_private/DragAndPrint/ViewPrint/DetailDom.js
浏览文件 @
d4c56d33
...
@@ -112,7 +112,12 @@ export default function DetailDom({ config, data }) {
...
@@ -112,7 +112,12 @@ export default function DetailDom({ config, data }) {
};
};
if
(
transform
)
{
if
(
transform
)
{
styleOutSide
.
transform
=
`rotate(
${
transform
}
deg)`
;
styleOutSide
.
transform
=
`rotate(
${
transform
}
deg)`
;
styleOutSide
.
WebkitTransform
=
`rotate(
${
transform
}
deg)`
;
styleOutSide
.
MozTransform
=
`rotate(
${
transform
}
deg)`
;
styleOutSide
.
MsTransform
=
`rotate(
${
transform
}
deg)`
;
// styleOutSide.MsFilter = "progid:DXImageTransform.Microsoft.Matrix(M11=-1, M12=1.2246467991473532e-16, M21=-1.2246467991473532e-16, M22=-1, SizingMethod='auto expand')";
}
}
const
outSideDom
=
(
children
)
=>
{
const
outSideDom
=
(
children
)
=>
{
return
(
return
(
<
div
<
div
...
...
zyd_private/DragAndPrint/ViewPrint/config.js
浏览文件 @
d4c56d33
...
@@ -2,23 +2,23 @@ import { message } from 'antd';
...
@@ -2,23 +2,23 @@ import { message } from 'antd';
import
{
ModalConfirm
,
ModalInfo
}
from
'@/baseComponent/Modal'
;
import
{
ModalConfirm
,
ModalInfo
}
from
'@/baseComponent/Modal'
;
import
*
as
lo
from
'./LodopFuncs'
;
import
*
as
lo
from
'./LodopFuncs'
;
export
const
A4Height
=
'2
8
.7cm'
;
export
const
A4Height
=
'2
9
.7cm'
;
export
const
A4Width
=
'
19.8
cm'
;
export
const
A4Width
=
'
21
cm'
;
export
const
imageStyleAll
=
{
export
const
imageStyleAll
=
{
width
:
'100%'
,
width
:
'100%'
,
// height: '100%',
// height: '100%',
};
};
export
const
defaultConfigInfo
=
{
paperHeight
:
A4Height
,
paperWidth
:
A4Width
,
};
export
function
getCLodopFuncJS
()
{
export
function
getCLodopFuncJS
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
true
);
resolve
(
true
);
});
});
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
window
.
LODOP
)
{
if
(
window
.
LODOP
)
{
console
.
log
(
'打印插件加载成功'
);
console
.
log
(
'打印插件加载成功'
);
...
...
zyd_private/DragAndPrint/ViewPrint/index2.js
浏览文件 @
d4c56d33
...
@@ -6,10 +6,11 @@ import Shell from '@/baseComponent/Shell';
...
@@ -6,10 +6,11 @@ import Shell from '@/baseComponent/Shell';
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
router
from
'umi/router'
;
import
router
from
'umi/router'
;
import
DetailDom
from
'./DetailDom'
;
import
DetailDom
from
'./DetailDom'
;
import
{
A4Width
,
A4Height
,
getCLodopFuncJS
,
templateCode
}
from
'./config'
;
import
{
A4Width
,
A4Height
,
getCLodopFuncJS
,
templateCode
,
defaultConfigInfo
}
from
'./config'
;
import
RenderAuthorized
from
'@/components/Authorized'
;
import
RenderAuthorized
from
'@/components/Authorized'
;
import
{
getAuthority
}
from
'@/utils/authority'
;
import
{
getAuthority
}
from
'@/utils/authority'
;
import
{
ModalInfo
}
from
'@/baseComponent/Modal'
;
import
{
ModalInfo
}
from
'@/baseComponent/Modal'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
const
Authorized
=
RenderAuthorized
(
getAuthority
());
const
Authorized
=
RenderAuthorized
(
getAuthority
());
...
@@ -93,6 +94,12 @@ export default class ViewPrint extends Component {
...
@@ -93,6 +94,12 @@ export default class ViewPrint extends Component {
printOne
=
(
optionType
=
0
)
=>
{
printOne
=
(
optionType
=
0
)
=>
{
const
{
printIndex
,
configAll
,
viewData
}
=
this
.
state
;
const
{
printIndex
,
configAll
,
viewData
}
=
this
.
state
;
let
{
info
}
=
configAll
;
if
(
isJSON
(
info
)){
info
=
JSON
.
parse
(
info
);
}
else
{
info
=
defaultConfigInfo
;
}
const
{
printMeth
}
=
configAll
;
const
{
printMeth
}
=
configAll
;
const
{
wide
,
high
}
=
configAll
;
const
{
wide
,
high
}
=
configAll
;
const
{
LODOP
}
=
window
;
const
{
LODOP
}
=
window
;
...
@@ -106,20 +113,9 @@ export default class ViewPrint extends Component {
...
@@ -106,20 +113,9 @@ export default class ViewPrint extends Component {
}
}
console
.
log
(
wide
,
high
);
console
.
log
(
wide
,
high
);
const
strHTML
=
dom
.
innerHTML
;
const
strHTML
=
dom
.
innerHTML
;
LODOP
.
PRINT_INITA
(
LODOP
.
PRINT_INITA
(
0
,
0
,
`
${
wide
}
cm`
,
`
${
high
}
cm`
,
`printDomId
${
printIndex
}
`
);
0
,
LODOP
.
SET_PRINT_PAGESIZE
(
printMeth
,
info
.
paperWidth
,
info
.
paperHeight
,
'CreateCustomPage'
);
// 打印方向 纸张大小.
0
,
LODOP
.
ADD_PRINT_HTML
(
0
,
0
,
'100%'
,
'100%'
,
strHTML
);
// HTML 打印
`
${
wide
}
cm`
,
`
${
high
}
cm`
,
`printDomId-djkfgjkdlfg`
,
);
LODOP
.
SET_PRINT_PAGESIZE
(
printMeth
,
`
${
wide
}
cm`
,
`
${
high
}
cm`
,
'CreateCustomPage'
,
);
// 打印方向
LODOP
.
ADD_PRINT_HTM
(
0
,
0
,
'100%'
,
'100%'
,
strHTML
);
// HTML 打印
console
.
log
(
strHTML
);
console
.
log
(
strHTML
);
switch
(
optionType
)
{
switch
(
optionType
)
{
case
1
:
case
1
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论