Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
da83bbf3
authored
2023-08-25 14:55:11 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:打印
1 parent
cadfcb73
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
30 deletions
src/views/workflow/components/dialog/zsdy.vue
src/views/workflow/components/dialog/zsyl.vue
src/views/workflow/components/szxx.vue
src/views/workflow/components/dialog/zsdy.vue
View file @
da83bbf
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-25 1
0:34:46
* @LastEditTime: 2023-08-25 1
4:43:39
-->
<
template
>
<div>
...
...
@@ -26,6 +26,10 @@
<canvas
ref=
"zs"
width=
"1000"
class=
"zsyl"
height=
"700"
></canvas>
</div>
</div>
<!-- 打印模板需要此模块 -->
<object
id=
"LODOP_OB"
classid=
"clsid:2105C259-1E0C-4534-8141-A753534CB4CA"
v-show=
"false"
>
<embed
id=
"LODOP_EM"
type=
"application/x-print-lodop"
width=
"1180"
height=
"720"
pluginspage=
"install_lodop32.exe"
/>
</object>
<div
class=
"text-center pt-10"
>
<el-button
@
click=
"$popupCacel"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
确定
</el-button>
...
...
@@ -36,6 +40,8 @@
<
script
>
import
store
from
'@/store/index.js'
import
{
datas
}
from
"../../javascript/zsyl.js"
;
import
{
getPrintTemplateByCode
}
from
"@/api/print"
;
import
{
getLodop
}
from
"@/utils/LodopFuncs"
import
{
readYsxlh
,
certificate
,
getSlsqBdcqzList
}
from
"@/api/bdcqz.js"
;
export
default
{
props
:
{
...
...
@@ -89,7 +95,6 @@
}
})
},
//获取受理申请下全部不动产权证
/**
* @description: 获取受理申请下全部不动产权证
* @author: renchao
...
...
@@ -189,29 +194,9 @@
})
})
}
// context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 129, 429);
// 权利其他状态
const
maxWidth
=
332
;
// 最大宽度限制
let
lines
=
this
.
bdcqz
.
qlqtzk
?
this
.
bdcqz
.
qlqtzk
.
split
(
'\n'
)
:
[];
// lines.forEach((line, index) => {
// const y = 463 + (index * 33); // 每行文本的垂直位置
// let currentLine = '';
// let arr = [];
// for (let word of line) {
// const testLine = currentLine + word;
// const lineWidth = context.measureText(testLine).width;
// if (lineWidth <= maxWidth) {
// currentLine = testLine;
// } else {
// arr.push(currentLine);
// currentLine = word;
// }
// }
// arr.push(currentLine);
// arr.forEach((line, index) => {
// context.fillText(line, 129, y + (index * 17)); // 调整行高
// })
// })
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
if
(
getByteLen
(
lines
[
i
])
>
41
)
{
let
currentLine
=
''
;
...
...
@@ -350,19 +335,44 @@
handleSubmit
()
{
this
.
savePrintRecord
()
},
//保存打印记录
/**
* @description: 保存打印记录
* @author: renchao
*/
savePrintRecord
()
{
let
that
=
this
this
.
ruleForm
.
bsmBdcqz
=
this
.
formData
.
bdcqz
.
bsmBdcqz
;
this
.
ruleForm
.
bdcqzlx
=
this
.
formData
.
bdcqz
.
bdcqzlx
;
this
.
ruleForm
.
szzh
=
this
.
formData
.
bdcqz
.
bdcqzh
;
certificate
(
this
.
ruleForm
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
$popupCacel
()
this
.
$message
.
success
(
"提交成功"
)
that
.
$popupCacel
()
// this.$message.success("提交成功")
getPrintTemplateByCode
({
tmpno
:
'zsdy'
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
getSlsqBdcqzList
({
bsmSlsq
:
this
.
formData
.
bsmSlsq
}).
then
(
infoRes
=>
{
if
(
infoRes
.
code
==
200
)
{
if
(
infoRes
.
result
&&
infoRes
.
result
.
length
>
0
)
{
//打开模板设计
let
LODOP
=
getLodop
(
document
.
getElementById
(
'LODOP_OB'
),
document
.
getElementById
(
'LODOP_EM'
));
LODOP
.
ADD_PRINT_DATA
(
"ProgramData"
,
res
.
result
.
tmpcontent
);
//装载模板
infoRes
.
result
[
0
].
bdcdyh1
=
infoRes
.
result
[
0
].
bdcdyh
.
slice
(
0
,
6
)
+
' '
+
infoRes
.
result
[
0
].
bdcdyh
.
slice
(
6
,
12
)
+
' '
+
infoRes
.
result
[
0
].
bdcdyh
.
slice
(
12
,
19
)
+
' '
+
infoRes
.
result
[
0
].
bdcdyh
.
slice
(
19
,
infoRes
.
result
[
0
].
bdcdyh
.
length
)
//todo 调取后端接口获取数据 循环set
for
(
let
key
in
infoRes
.
result
[
0
])
{
LODOP
.
SET_PRINT_STYLEA
(
key
,
"CONTENT"
,
infoRes
.
result
[
0
][
key
]);
}
LODOP
.
PREVIEW
();
that
.
$popupCacel
()
}
}
})
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
})
//刷新列表
store
.
dispatch
(
'user/reWorkFresh'
,
true
)
}
else
{
...
...
src/views/workflow/components/dialog/zsyl.vue
View file @
da83bbf
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-25 1
3:19:1
4
* @LastEditTime: 2023-08-25 1
4:10:5
4
-->
<
template
>
<div
class=
"from-clues loadingtext"
v-Loading=
"loading"
element-loading-text=
"拼命加载中..."
style=
"height:720px;text-align: center;"
>
...
...
@@ -406,7 +406,7 @@
let
lines
=
this
.
bdcqz
.
qlqtzk
?
this
.
bdcqz
.
qlqtzk
.
split
(
'\n'
)
:
[];
if
(
lines
[
0
])
{
lines
[
0
].
split
(
' '
).
forEach
((
line
,
index
)
=>
{
const
y
=
415
+
(
index
*
6
0
);
// 每行文本的垂直位置
const
y
=
415
+
(
index
*
3
0
);
// 每行文本的垂直位置
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
line
)
{
...
...
@@ -421,13 +421,13 @@
}
arr
.
push
(
currentLine
);
arr
.
forEach
((
line
,
index
)
=>
{
context
.
fillText
(
line
,
775
,
y
+
(
index
*
23
));
// 调整行高
context
.
fillText
(
line
,
775
,
y
+
(
index
*
14
));
// 调整行高
});
});
}
lines
.
slice
(
1
).
forEach
((
line
,
index
)
=>
{
const
y
=
((
parseInt
(
lines
[
0
].
length
)
/
19
)
*
22
)
+
415
+
(
index
*
3
0
);
// 每行文本的垂直位置
const
y
=
((
parseInt
(
lines
[
0
].
length
)
/
19
)
*
22
)
+
415
+
(
index
*
2
0
);
// 每行文本的垂直位置
let
currentLine
=
''
;
let
arr
=
[];
for
(
let
word
of
line
)
{
...
...
src/views/workflow/components/szxx.vue
View file @
da83bbf
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-2
4 15:38:52
* @LastEditTime: 2023-08-2
5 14:03:00
-->
<
template
>
<div
class=
"szxx"
>
...
...
@@ -75,6 +75,7 @@
<
script
>
import
{
mapGetters
}
from
'vuex'
import
store
from
'@/store/index.js'
import
{
getPrintTemplateByCode
}
from
"@/api/print"
;
import
{
getSlsqBdcqzList
,
invalidCertificate
}
from
"@/api/bdcqz.js"
;
export
default
{
props
:
{},
...
...
Please
register
or
sign in
to post a comment