d48fc4a2 by tianhaohao@pashanhoo.com

修改证书打印缮证发证组件分类

1 parent 2017bf6c
1 <!--
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2023-11-15 15:41:43
5 -->
6 <template>
7 <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中...">
8 <!-- 表单部分 -->
9 <el-tabs v-model="activeName" @tab-click="handleClick" v-if="headTabBdcqz.length >1" style="margin-top:-15px">
10 <el-tab-pane :label="item.qlr + (item.bdcqzh !== null ? '(' + item.bdcqzh + ')' : '')" :name="item.bsmBdcqz"
11 v-for="(item, index) in headTabBdcqz" :key="index">
12 </el-tab-pane>
13 </el-tabs>
14 <el-empty description="暂无数据" v-if="headTabBdcqz.length == 0 && noData"></el-empty>
15 <div v-else>
16 <div style="height:540px">
17 <el-form class="zs" :model="bdcqz" v-if="this.bdcqz.bdcqzlx==1" ref="ruleForm" label-width="100px">
18 <el-row>
19 <el-col :span="24">
20 <el-form-item label="权利人">
21 <el-input v-model="bdcqz.qlr"></el-input>
22 </el-form-item>
23 </el-col>
24 </el-row>
25 <el-row>
26 <el-col :span="24">
27 <el-form-item label="共有情况">
28 <el-select v-model="bdcqz.gyqk" class="width100" placeholder="请选择">
29 <el-option
30 v-for="item in gyqkList"
31 :key="item.dcode"
32 :label="item.dname"
33 :value="item.dcode">
34 </el-option>
35 </el-select>
36 </el-form-item>
37 </el-col>
38 </el-row>
39 <el-row>
40 <el-col :span="24">
41 <el-form-item label="坐落">
42 <el-input v-model="bdcqz.zl"></el-input>
43 </el-form-item>
44 </el-col>
45 </el-row>
46 <el-row>
47 <el-col :span="24">
48 <el-form-item label="不动产单元号">
49 <el-input v-model="bdcqz.bdcdyh"></el-input>
50 </el-form-item>
51 </el-col>
52 </el-row>
53 <el-row>
54 <el-col :span="24">
55 <el-form-item label="权利类型">
56 <el-input v-model="bdcqz.qllx"></el-input>
57 </el-form-item>
58 </el-col>
59 </el-row>
60 <el-row>
61 <el-col :span="24">
62 <el-form-item label="权利性质 ">
63 <el-input v-model="bdcqz.qlxz"></el-input>
64 </el-form-item>
65 </el-col>
66 </el-row>
67 <el-row>
68 <el-col :span="24">
69 <el-form-item label="用途">
70 <el-input v-model="bdcqz.yt"></el-input>
71 </el-form-item>
72 </el-col>
73 </el-row>
74 <el-row>
75 <el-col :span="24">
76 <el-form-item label="面积">
77 <el-input v-model="bdcqz.mj"></el-input>
78 </el-form-item>
79 </el-col>
80 </el-row>
81 <el-row>
82 <el-col :span="24">
83 <el-form-item label="使用期限 ">
84 <el-input v-model="bdcqz.syqx"></el-input>
85 </el-form-item>
86 </el-col>
87 </el-row>
88 <el-row>
89 <el-col :span="24">
90 <el-form-item label="权利其他状况">
91 <el-input v-model="bdcqz.qlqtzk" :rows="4" type="textarea"></el-input>
92 </el-form-item>
93 </el-col>
94 </el-row>
95 <el-row>
96 <el-col :span="24">
97 <el-form-item label="附记">
98 <el-input v-model="bdcqz.fj" :rows="4" type="textarea"></el-input>
99 </el-form-item>
100 </el-col>
101 </el-row>
102 </el-form>
103 <el-form :model="bdcqz" class="zm" v-else ref="ruleForm" label-width="110px">
104 <el-row>
105 <el-col :span="24">
106 <el-form-item label="证明权利或事项">
107 <el-input v-model="bdcqz.zmqlhsx"></el-input>
108 </el-form-item>
109 </el-col>
110 </el-row>
111 <el-row>
112 <el-col :span="24">
113 <el-form-item label="权利人(申请人)">
114 <el-input v-model="bdcqz.qlr"></el-input>
115 </el-form-item>
116 </el-col>
117 </el-row>
118 <el-row>
119 <el-col :span="24">
120 <el-form-item label="义务人">
121 <el-input v-model="bdcqz.ywr"></el-input>
122 </el-form-item>
123 </el-col>
124 </el-row>
125 <el-row>
126 <el-col :span="24">
127 <el-form-item label="坐落">
128 <el-input v-model="bdcqz.zl"></el-input>
129 </el-form-item>
130 </el-col>
131 </el-row>
132 <el-row>
133 <el-col :span="24">
134 <el-form-item label="不动产单元号">
135 <el-input v-model="bdcqz.bdcdyh"></el-input>
136 </el-form-item>
137 </el-col>
138 </el-row>
139 <el-row>
140 <el-col :span="24">
141 <el-form-item label="其他状况">
142 <el-input v-model="bdcqz.qlqtzk" :rows="6" type="textarea"></el-input>
143 </el-form-item>
144 </el-col>
145 </el-row>
146 <el-row>
147 <el-col :span="24">
148 <el-form-item label="附记">
149 <el-input v-model="bdcqz.fj" :rows="6" type="textarea"></el-input>
150 </el-form-item>
151 </el-col>
152 </el-row>
153 </el-form>
154 </div>
155 <div style="text-align:center">
156 <el-button @click="$popupCacel">取消</el-button>
157 <el-button type="primary" @click="handleSubmit">保存</el-button>
158 </div>
159 </div>
160 </div>
161 </template>
162
163 <script>
164 import store from '@/store/index.js'
165 import { getSlsqBdcqzList, editBdcqz } from "@/api/bdcqz.js"
166 export default {
167 name: "zsxg",
168 props: {
169 formData: {
170 type: Object,
171 default: {}
172 }
173 },
174 data () {
175 return {
176 gyqkList: store.getters.dictData['A34'],
177 key: 0,
178 noData: false,
179 loading: false,
180 bdcqz: {},
181 //tab切换栏数组
182 headTabBdcqz: [],
183 //tab选择绑定值
184 activeName: '',
185 }
186 },
187 mounted () {
188 this.getHeadTabBdcqz()
189 },
190 methods: {
191 /**
192 * @description: 获取受理申请下全部不动产权证
193 * @author: renchao
194 */
195 getHeadTabBdcqz () {
196 this.loading = true
197 getSlsqBdcqzList({ bsmSlsq: this.formData.bsmSlsq }).then(res => {
198 if (res.code == 200) {
199 this.noData = true
200 if (res.result && res.result.length > 0) {
201 this.bdcqz = res.result[0]
202 this.headTabBdcqz = _.cloneDeep(res.result)
203 if (this.formData.bsmBdcqz) {
204 this.activeName = this.formData.bsmBdcqz
205 } else {
206 this.activeName = res.result[0].bsmBdcqz
207 }
208 }
209 }
210 this.loading = false
211 })
212 },
213 handleClick (tab) {
214 this.bdcqz = _.cloneDeep(this.headTabBdcqz[tab.index])
215 },
216 handleSubmit () {
217 editBdcqz(this.bdcqz).then(res => {
218 if (res.code == 200) {
219 this.$message.success('保存成功');
220 //刷新列表
221 this.$popupCacel()
222 } else {
223 this.$message.error(res.message)
224 }
225 })
226 }
227 }
228 }
229 </script>
230 <style scoped lang="scss">
231 @import "~@/styles/mixin.scss";
232 </style>
1 <!--
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2024-02-06 13:23:44
5 -->
6 <template>
7 <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="text-align: center;">
8 <!-- 表单部分 -->
9 <div style="margin-top:-20px">
10 <el-tabs v-model="activeName" @tab-click="handleClick" v-if="headTabBdcqz.length >1">
11 <el-tab-pane :label="item.qlr + (item.bdcqzh !== null ? '(' + item.bdcqzh + ')' : '')" :name="item.bsmBdcqz"
12 v-for="(item, index) in headTabBdcqz" :key="index">
13 </el-tab-pane>
14 </el-tabs>
15 </div>
16 <el-empty description="暂无数据" v-if="headTabBdcqz.length == 0 && noData"></el-empty>
17 <div style="max-height:89vh;overflow-y:auto">
18 <div v-show="this.bdcqz.bdcqzlx==1">
19 <el-tabs v-model="activeTitle">
20 <el-tab-pane label="第一页" name="title1"></el-tab-pane>
21 <el-tab-pane label="第二页" name="title2"></el-tab-pane>
22 </el-tabs>
23 <div style="width:1169px;overflow-x: hidden;">
24 <canvas ref="zs1" width="1024" v-show="activeTitle=='title1'" height="739"></canvas>
25 <canvas ref="zs" width="1024" v-show="activeTitle=='title2'" height="739"></canvas>
26 </div>
27 </div>
28 <div style="width:1169px;overflow-x: hidden;" v-show="this.bdcqz.bdcqzlx==2">
29 <canvas ref="zm" width="1169" height="828"></canvas>
30 </div>
31 </div>
32 </div>
33 </template>
34
35 <script>
36 import QRCode from 'qrcode'
37 import { datas } from "../../javascript/zsyl.js";
38 import { getSlsqBdcqzList } from "@/api/bdcqz.js"
39 export default {
40 name: "zsyl",
41 props: {
42 formData: {
43 type: Object,
44 default: {}
45 }
46 },
47 data () {
48 return {
49 activeTitle: 'title1',
50 key: 0,
51 noData: false,
52 imgSrc1: require('@/image/bdcqz/bdcqzs1.jpg'),
53 imgSrc: require('@/image/bdcqz/bdcqzs2.jpg'),
54 bdczmSrc: require('@/image/bdcqz/bdczm.jpg'),
55 loading: false,
56 //印刷序列号集合
57 ysxlh: [],
58 //列名称对象
59 columns: [],
60 //选择的不动产权证文件
61 bdcqz: '',
62 //证书打开类型 是否需要展示打印按钮
63 isToPrint: false,
64 //tab切换栏数组
65 headTabBdcqz: [],
66 //tab选择绑定值
67 activeName: '',
68 //证书图片预览
69 previewImage: '',
70 ruleForm: {
71 bsmBdcqz: '',
72 szmc: '不动产权证书',
73 szzh: '',
74 ysxlh: '',
75 },
76 }
77 },
78 mounted () {
79 this.columns = datas.columns();
80 if (this.formData.bdcqz) {
81 //从缮证进入
82 this.bdcqz = this.formData.bdcqz
83 } else {
84 //从按钮进入
85 this.getHeadTabBdcqz();
86 }
87
88 },
89 methods: {
90 /**
91 * @description: 获取证书内容
92 * @param {*} code
93 * @author: renchao
94 */
95 getRowValue (code) {
96 var value = this.bdcqz[code];
97 return value;
98 },
99 /**
100 * @description: 获取受理申请下全部不动产权证
101 * @author: renchao
102 */
103 getHeadTabBdcqz () {
104 this.loading = true
105 getSlsqBdcqzList({ bsmSlsq: this.formData.bsmSlsq }).then(res => {
106 if (res.code == 200) {
107 this.noData = true
108 if (res.result && res.result.length > 0) {
109 this.bdcqz = res.result[0]
110 this.headTabBdcqz = res.result
111 if (this.formData.bsmBdcqz) {
112 this.activeName = this.formData.bsmBdcqz
113 } else {
114 this.activeName = res.result[0].bsmBdcqz
115 }
116 if (this.bdcqz.bdcqzlx == 1) {
117 this.drawTextOnImage()
118 } else {
119 this.drawTextzmImage()
120 }
121 }
122 }
123 this.loading = false
124 })
125 },
126 /**
127 * @description: tab表头切换方法
128 * @param {*} e
129 * @author: renchao
130 */
131 handleClick (tab, event) {
132 this.bdcqz = this.headTabBdcqz[tab.index]
133 if (this.bdcqz.bdcqzlx == 1) {
134 this.drawTextOnImage()
135 } else {
136 this.drawTextzmImage()
137 }
138 },
139 /**
140 * @description: 不动产证书
141 * @author: renchao
142 */
143 drawTextOnImage1 () {
144 const canvas = this.$refs.zs1;
145 const context = canvas.getContext('2d');
146 const image = new Image();
147 image.onload = () => {
148 context.drawImage(image, 0, 0);
149 context.font = '18px 楷体';
150 context.fillStyle = '#000000';
151 let date = this.bdcqz.djsj.split(' ')[0].split('/');
152 let nian = date[0]
153 let yue = date[1]
154 let ri = date[2]
155 this.bdcqz.nian = nian
156 this.bdcqz.yue = yue
157 this.bdcqz.ri = ri
158 context.fillText(nian ? nian : '', 780, 499);
159 context.fillText(yue ? yue : '', 840, 499);
160 context.fillText(ri ? ri : '', 885, 499);
161 QRCode.toDataURL(this.bdcqz.bdcqzh, { margin: 0 })
162 .then(url => {
163 const qrImage = new Image();
164 this.bdcqz.qrImage = url; // 将二维码图片的 URL 存储到 bdcqz 对象的 qrImage 属性中
165 qrImage.onload = () => {
166 context.drawImage(qrImage, 670, 400, 100, 100);
167 };
168 qrImage.src = url;
169 })
170 .catch(error => {
171 console.error(error);
172 });
173 context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 745, 633);
174 };
175 image.src = this.imgSrc1;
176 },
177 drawTextOnImage () {
178 this.drawTextOnImage1()
179 function getByteLen (val) {
180 var len = 0;
181 if (!val) return len;
182 for (var i = 0; i < val.length; i++) {
183 var length = val.charCodeAt(i);
184 if (length >= 0 && length <= 128) {
185 len += 1;
186 } else {
187 len += 2;
188 }
189 }
190 return len;
191 }
192 const canvas = this.$refs.zs;
193 const context = canvas.getContext('2d');
194 const image = new Image();
195 image.onload = () => {
196 context.drawImage(image, 0, 0);
197 context.font = '18px 楷体';
198 context.fillStyle = '#000000';
199 context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 60, 56);
200 context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56);
201 if (getByteLen(this.bdcqz.sxqc) > 14) {
202 const originalFont = context.font;
203 // 设置新的字体大小
204 context.font = '14px 楷体'; // 替换为你想要的字体和大小
205 // 绘制 bdcdyh
206 context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 165, 56);
207 // 恢复原始字体设置
208 context.font = originalFont;
209 } else {
210 context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 170, 56);
211 }
212 context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56);
213 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 129, 97);
214 context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 129, 136);
215
216 this.bdcdyh = this.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.bdcqz.bdcdyh.slice(6, 12) + ' ' +
217 this.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.bdcqz.bdcdyh.slice(19, this.bdcqz.bdcdyh.length)
218 context.fillText(this.bdcdyh ? this.bdcdyh : '', 129, 223);
219
220 context.fillText(this.bdcqz.qllx ? this.bdcqz.qllx : '', 129, 263);
221 context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 129, 303);
222 context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 129, 346);
223 // context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 129, 386);
224 let lines6 = this.bdcqz.mj ? this.bdcqz.mj.split(' ') : [];
225 if (getByteLen(this.bdcqz.mj) > 37) {
226 lines6.forEach((line, index) => {
227 const y = 378 + (index * 27); // 每行文本的垂直位置
228 let currentLine = '';
229 let arr = [];
230 for (let word of line) {
231 const testLine = currentLine + word;
232 const lineWidth = context.measureText(testLine).width;
233 if (lineWidth <= 330) {
234 currentLine = testLine;
235 } else {
236 arr.push(currentLine);
237 currentLine = word;
238 }
239 }
240 arr.push(currentLine);
241 arr.forEach((line, index) => {
242 context.fillText(line, 129, y + (index * 20)); // 调整行高
243 })
244 })
245 } else {
246 lines6.forEach((line, index) => {
247 const y = 386 + (index * 27); // 每行文本的垂直位置
248 let currentLine = '';
249 let arr = [];
250 for (let word of line) {
251 const testLine = currentLine + word;
252 const lineWidth = context.measureText(testLine).width;
253 if (lineWidth <= 330) {
254 currentLine = testLine;
255 } else {
256 arr.push(currentLine);
257 currentLine = word;
258 }
259 }
260 arr.push(currentLine);
261 arr.forEach((line, index) => {
262 context.fillText(line, 129, y + (index * 20)); // 调整行高
263 })
264 })
265 }
266 // 权利其他状态
267 let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n').filter(i => i && i.trim()) : [];
268 for (let i = 0; i < lines.length; i++) {
269 let num = Math.ceil(getByteLen(lines[i]) / 38)
270 if (getByteLen(lines[i]) > 37) {
271 let currentLine = '';
272 let arr = [];
273 for (let word of lines[i]) {
274 const testLine = currentLine + word;
275 const lineWidth = context.measureText(testLine).width;
276 if (lineWidth <= 323) {
277 currentLine = testLine;
278 } else {
279 arr.push(currentLine);
280 currentLine = word;
281 }
282 }
283 arr.push(currentLine);
284 if (i > 0) {
285 arr.forEach((line, index) => {
286 context.fillText(line, 129, 495 + (29 * (i - 1)) + 4 * num + (index * 14)); // 调整行高
287 })
288 } else {
289 arr.forEach((line, index) => {
290 context.fillText(line, 129, 493 + (26 * (i - 1)) + (index * 14)); // 调整行高
291 })
292 }
293 } else {
294 if (i > 0) {
295 context.fillText(lines[i] ? lines[i] : '', 129, 500 + 4 * num + (29 * (i - 1)));
296 } else {
297 context.fillText(lines[i] ? lines[i] : '', 129, 505 + (27 * (i - 1)));
298 }
299 }
300 }
301
302 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n').filter(i => i && i.trim()) : [];
303 lines1.forEach((line, index) => {
304 const y = 100 + (index * 30); // 每行文本的垂直位置
305 let currentLine = '';
306 let arr = [];
307 for (let word of line) {
308 const testLine = currentLine + word;
309 const lineWidth = context.measureText(testLine).width;
310 if (lineWidth <= 395) {
311 currentLine = testLine;
312 } else {
313 arr.push(currentLine);
314 currentLine = word;
315 }
316 }
317 arr.push(currentLine);
318 arr.forEach((line, index) => {
319 context.fillText(line, 580, y + (index * 30)); // 调整行高
320 })
321 })
322 let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : [];
323 if (getByteLen(this.bdcqz.syqx) > 37) {
324 lines3.forEach((line, index) => {
325 const y = 423 + (index * 27); // 每行文本的垂直位置
326 let currentLine = '';
327 let arr = [];
328 for (let word of line) {
329 const testLine = currentLine + word;
330 const lineWidth = context.measureText(testLine).width;
331 if (lineWidth <= 330) {
332 currentLine = testLine;
333 } else {
334 arr.push(currentLine);
335 currentLine = word;
336 }
337 }
338 arr.push(currentLine);
339 arr.forEach((line, index) => {
340 context.fillText(line, 129, y + (index * 20)); // 调整行高
341 })
342 })
343 } else {
344 lines3.forEach((line, index) => {
345 const y = 430 + (index * 27); // 每行文本的垂直位置
346 let currentLine = '';
347 let arr = [];
348 for (let word of line) {
349 const testLine = currentLine + word;
350 const lineWidth = context.measureText(testLine).width;
351 if (lineWidth <= 315) {
352 currentLine = testLine;
353 } else {
354 arr.push(currentLine);
355 currentLine = word;
356 }
357 }
358 arr.push(currentLine);
359 arr.forEach((line, index) => {
360 context.fillText(line, 129, y + (index * 20)); // 调整行高
361 })
362 })
363 }
364
365 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
366 if (getByteLen(this.bdcqz.zl) > 37) {
367 lines2.forEach((line, index) => {
368 const y = 170 + (index * 20); // 每行文本的垂直位置
369 let currentLine = '';
370 let arr = [];
371 for (let word of line) {
372 const testLine = currentLine + word;
373 const lineWidth = context.measureText(testLine).width;
374 if (lineWidth <= 336) {
375 currentLine = testLine;
376 } else {
377 arr.push(currentLine);
378 currentLine = word;
379 }
380 }
381 arr.push(currentLine);
382 arr.forEach((line, index) => {
383 context.fillText(line, 129, y + (index * 20)); // 调整行高
384 })
385 })
386 } else {
387 lines2.forEach((line, index) => {
388 const y = 180 + (index * 20); // 每行文本的垂直位置
389 let currentLine = '';
390 let arr = [];
391 for (let word of line) {
392 const testLine = currentLine + word;
393 const lineWidth = context.measureText(testLine).width;
394 if (lineWidth <= 336) {
395 currentLine = testLine;
396 } else {
397 arr.push(currentLine);
398 currentLine = word;
399 }
400 }
401 arr.push(currentLine);
402 arr.forEach((line, index) => {
403 context.fillText(line, 129, y + (index * 20)); // 调整行高
404 })
405 })
406 }
407 }
408 image.src = this.imgSrc
409 },
410 /**
411 * @description: 不动产证明
412 * @author: renchao
413 */
414 drawTextzmImage () {
415 function getByteLen (val) {
416 var len = 0;
417 if (!val) return len;
418 for (var i = 0; i < val.length; i++) {
419 var length = val.charCodeAt(i);
420 if (length >= 0 && length <= 128) {
421 len += 1;
422 } else {
423 len += 2;
424 }
425 }
426 return len;
427 }
428 const canvas = this.$refs.zm;
429 const context = canvas.getContext('2d');
430 const image = new Image();
431 image.onload = () => {
432 context.drawImage(image, 0, 0);
433 context.font = '18px 楷体';
434 context.fillStyle = '#000000';
435 // ysxlh
436 context.fillText(this.bdcqz.ysxlh ? this.bdcqz.ysxlh : '', 280, 712);
437 // djsj
438 if (this.bdcqz.djsj) {
439 let djsjList = this.bdcqz.djsj.split(' ')[0].split('/')
440 context.fillText(djsjList[0] ? djsjList[0] : '', 327, 580);
441 context.fillText(djsjList[1] ? djsjList[1] : '', 393, 580);
442 context.fillText(djsjList[2] ? djsjList[2] : '', 443, 580);
443 }
444 context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 620, 125);
445 context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 665, 125);
446 if (getByteLen(this.bdcqz.sxqc) > 14) {
447 const originalFont = context.font;
448 // 设置新的字体大小
449 context.font = '14px 楷体'; // 替换为你想要的字体和大小
450 // 绘制 bdcdyh
451 context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 725, 125);
452 // 恢复原始字体设置
453 context.font = originalFont;
454 } else {
455 context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 755, 125);
456 }
457
458 context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 960, 123);
459 context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180);
460 // context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
461 // 权利人
462 let qlrlines = this.bdcqz.qlr
463 if (getByteLen(this.bdcqz.qlr) > 32) {
464 let currentLine = '';
465 let arr = [];
466 for (let word of qlrlines) {
467 const testLine = currentLine + word;
468 const lineWidth = context.measureText(testLine).width;
469 if (lineWidth <= 295) {
470 currentLine = testLine;
471 } else {
472 arr.push(currentLine);
473 currentLine = word;
474 }
475 }
476 arr.push(currentLine); // 将最后一行添加到数组
477 // 绘制所有行
478 for (let i = 0; i < arr.length; i++) {
479 context.fillText(arr[i], 775, 218 + i * 20); // lineHeight 为行高
480 }
481 } else {
482 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
483 }
484
485 // 义务人
486 // context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
487 let ywrlines = this.bdcqz.ywr
488 if (getByteLen(this.bdcqz.ywr) > 32) {
489 let currentLine = '';
490 let arr = [];
491 for (let word of ywrlines) {
492 const testLine = currentLine + word;
493 const lineWidth = context.measureText(testLine).width;
494 if (lineWidth <= 295) {
495 currentLine = testLine;
496 } else {
497 arr.push(currentLine);
498 currentLine = word;
499 }
500 }
501 arr.push(currentLine); // 将最后一行添加到数组
502 // 绘制所有行
503 for (let i = 0; i < arr.length; i++) {
504 context.fillText(arr[i], 775, 268 + i * 20); // lineHeight 为行高
505 }
506 } else {
507 context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
508 }
509
510 // context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 775, 325);
511 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
512 if (getByteLen(this.bdcqz.zl) > 32) {
513 lines2.forEach((line, index) => {
514 const y = 315 + (index * 20); // 每行文本的垂直位置
515 let currentLine = '';
516 let arr = [];
517 for (let word of line) {
518 const testLine = currentLine + word;
519 const lineWidth = context.measureText(testLine).width;
520 if (lineWidth <= 295) {
521 currentLine = testLine;
522 } else {
523 arr.push(currentLine);
524 currentLine = word;
525 }
526 }
527 arr.push(currentLine);
528 arr.forEach((line, index) => {
529 context.fillText(line, 775, y + (index * 20)); // 调整行高
530 })
531 })
532 } else {
533 lines2.forEach((line, index) => {
534 const y = 325 + (index * 20); // 每行文本的垂直位置
535 let currentLine = '';
536 let arr = [];
537 for (let word of line) {
538 const testLine = currentLine + word;
539 const lineWidth = context.measureText(testLine).width;
540 if (lineWidth <= 295) {
541 currentLine = testLine;
542 } else {
543 arr.push(currentLine);
544 currentLine = word;
545 }
546 }
547 arr.push(currentLine);
548 arr.forEach((line, index) => {
549 context.fillText(line, 775, y + (index * 20)); // 调整行高
550 })
551 })
552 }
553
554 // bdcdyh
555 this.bdcdyh = this.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.bdcqz.bdcdyh.slice(6, 12) + ' ' +
556 this.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.bdcqz.bdcdyh.slice(19, this.bdcqz.bdcdyh.length)
557 // context.fillText(this.bdcdyh ? this.bdcdyh : '', 775, 373);
558 // 保存当前字体设置
559 const originalFont = context.font;
560 // 设置新的字体大小
561 context.font = '16px 楷体'; // 替换为你想要的字体和大小
562 // 绘制 bdcdyh
563 context.fillText(this.bdcdyh ? this.bdcdyh : '', 775, 373);
564 // 恢复原始字体设置
565 context.font = originalFont;
566 // qlqtzk
567 function getByteLenBdcdy (val) {
568 var encoder = new TextEncoder('utf-8');
569 return encoder.encode(val).length;
570 }
571 const maxWidth = 295; // 最大宽度限制
572 let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n').filter(i => i && i.trim()) : [];
573 let bdcdyNum = Math.ceil(getByteLenBdcdy(lines[0]) / 43)
574 // 单独处理不动产单元号
575 let linesBdcdy = lines[0] ? lines[0].split(' ') : [];
576 if (getByteLenBdcdy(lines[0]) > 43) {
577 linesBdcdy.forEach((line, index) => {
578 const y = 412 + (index * 17); // 每行文本的垂直位置
579 let currentLine = '';
580 let arr = [];
581 for (let word of line) {
582 const testLine = currentLine + word;
583 const lineWidth = context.measureText(testLine).width;
584 if (lineWidth <= maxWidth) {
585 currentLine = testLine;
586 } else {
587 arr.push(currentLine);
588 currentLine = word;
589 }
590 }
591 arr.push(currentLine);
592 arr.forEach((line, index) => {
593 context.fillText(line, 770, y + (index * 17)); // 调整行高
594 })
595 })
596 } else {
597 linesBdcdy.forEach((line, index) => {
598 const y = 418 + (index * 17); // 每行文本的垂直位置
599 let currentLine = '';
600 let arr = [];
601 for (let word of line) {
602 const testLine = currentLine + word;
603 const lineWidth = context.measureText(testLine).width;
604 if (lineWidth <= maxWidth) {
605 currentLine = testLine;
606 } else {
607 arr.push(currentLine);
608 currentLine = word;
609 }
610 }
611 arr.push(currentLine);
612 arr.forEach((line, index) => {
613 context.fillText(line, 770, y + (index * 17)); // 调整行高
614 })
615 })
616 }
617
618 for (let i = 1; i < lines.length; i++) {
619 let num = Math.ceil(getByteLen(lines[i]) / 32)
620 if (getByteLen(lines[i]) > 32) {
621 let currentLine = '';
622 let arr = [];
623 for (let word of lines[i]) {
624 const testLine = currentLine + word;
625 const lineWidth = context.measureText(testLine).width;
626 if (lineWidth <= maxWidth) {
627 currentLine = testLine;
628 } else {
629 arr.push(currentLine);
630 currentLine = word;
631 }
632 }
633 arr.push(currentLine);
634 if (i > 0) {
635 arr.forEach((line, index) => {
636 context.fillText(line, 770, 408 + (bdcdyNum * 15) + (24 * (i - 1)) + 5 * num + (index * 17)); // 调整行高
637 })
638 } else {
639 arr.forEach((line, index) => {
640 context.fillText(line, 770, 408 + (bdcdyNum * 15) + (24 * (i - 1)) + (index * 17)); // 调整行高
641 })
642 }
643 } else {
644 if (i > 0) {
645 context.fillText(lines[i] ? lines[i] : '', 770, 417 + (bdcdyNum * 15) + 6 * num + (25 * (i - 1)));
646 } else {
647 context.fillText(lines[i] ? lines[i] : '', 770, 417 + (bdcdyNum * 15) + (25 * (i - 1)));
648 }
649 }
650 }
651 // fj
652 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n').filter(i => i && i.trim()) : [];
653 for (let i = 0; i < lines1.length; i++) {
654 let num = Math.ceil(getByteLen(lines1[i]) / 37)
655 if (getByteLen(lines1[i]) > 37) {
656 let currentLine = '';
657 let arr = [];
658 for (let word of lines1[i]) {
659 const testLine = currentLine + word;
660 const lineWidth = context.measureText(testLine).width;
661 if (lineWidth <= maxWidth) {
662 currentLine = testLine;
663 } else {
664 arr.push(currentLine);
665 currentLine = word;
666 }
667 }
668 arr.push(currentLine);
669 if (i > 0) {
670 arr.forEach((line, index) => {
671 context.fillText(line, 770, 605 + (24 * (i - 1)) + 5 * num + (index * 17)); // 调整行高
672 })
673 } else {
674 arr.forEach((line, index) => {
675 context.fillText(line, 770, 605 + (24 * (i - 1)) + (index * 17)); // 调整行高
676 })
677 }
678 } else {
679 if (i > 0) {
680 context.fillText(lines1[i] ? lines1[i] : '', 770, 616 + 6 * num + (25 * (i - 1)));
681 } else {
682 context.fillText(lines1[i] ? lines1[i] : '', 770, 616 + (25 * (i - 1)));
683 }
684 }
685 }
686 }
687
688 image.src = this.bdczmSrc;
689 }
690 }
691 }
692 </script>
693 <style scoped lang="scss">
694 @import "~@/styles/mixin.scss";
695 /deep/.el-tabs__nav-wrap::after {
696 display: none;
697 }
698 /deep/.el-tabs__header {
699 margin: 0;
700 }
701 /deep/.el-form-item--small.el-form-item {
702 margin-bottom: 0;
703 }
704 /deep/.mask-content {
705 padding-top: 10px !important;
706 }
707 .imgClass {
708 display: inline-block;
709 height: auto;
710 max-width: 100%;
711 }
712
713 .middle_padding {
714 padding-bottom: 10px;
715 }
716
717 .zsyl-button {
718 text-align: center;
719 margin-top: 20px;
720
721 .operation_button {
722 width: 100px;
723 border: 1px solid rgb(0, 121, 254);
724 }
725
726 .dy-button {
727 color: white;
728 background-color: rgb(0, 121, 254);
729 }
730 }
731
732 .table-column {
733 border-spacing: 1px;
734 width: 100%;
735
736 tr td {
737 border: 1px solid #ccc;
738 text-align: center;
739 height: 40px;
740 padding: 4px;
741 font-size: 13px;
742 background: rgb(251, 249, 229);
743 }
744 }
745
746 .zsyl-title {
747 background: #fafbe5;
748 text-align: center;
749 padding: 5px 0px;
750 font-size: 20px;
751 }
752
753 .no-data {
754 font-size: 18px;
755 display: flex;
756 text-align: center;
757 justify-content: center;
758 }
759 </style>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
97 */ 97 */
98 zslqClick () { 98 zslqClick () {
99 store.dispatch('user/reWorkFresh', false) 99 store.dispatch('user/reWorkFresh', false)
100 this.$popupDialog("不动产权证领取", "workflow/components/dialog/zslq", {}, '80%', true) 100 this.$popupDialog("不动产权证领取", "workflow/main/fzxx/zslq", {}, '80%', true)
101 } 101 }
102 } 102 }
103 } 103 }
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
132 if (type == 1) { 132 if (type == 1) {
133 this.$popupDialog( 133 this.$popupDialog(
134 "证书证明预览", 134 "证书证明预览",
135 "workflow/components/dialog/zsyl", 135 "workflow/top/zsyl/index",
136 { bdcqz: item, bsmSlsq: this.$route.query.bsmSlsq }, 136 { bdcqz: item, bsmSlsq: this.$route.query.bsmSlsq },
137 '1230px', 137 '1230px',
138 true 138 true
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
140 } else { 140 } else {
141 this.$popupDialog( 141 this.$popupDialog(
142 "证书证明打印", 142 "证书证明打印",
143 "workflow/components/dialog/zsdy", 143 "workflow/main/szxx/zsdy",
144 { ...item }, 144 { ...item },
145 "76%", 145 "76%",
146 true 146 true
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
155 openInvalidDiglog (item) { 155 openInvalidDiglog (item) {
156 this.$popupDialog( 156 this.$popupDialog(
157 "证书证明打印", 157 "证书证明打印",
158 "workflow/components/dialog/zsdy", 158 "workflow/main/szxx/zsdy",
159 { ...item }, 159 { ...item },
160 "76%", 160 "76%",
161 true 161 true
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
169 openRecordPop (item) { 169 openRecordPop (item) {
170 this.$popupDialog( 170 this.$popupDialog(
171 "缮证记录", 171 "缮证记录",
172 "workflow/components/dialog/szRecord", 172 "workflow/main/szxx/szRecord",
173 { bsmBdcqz: item.bsmBdcqz }, 173 { bsmBdcqz: item.bsmBdcqz },
174 "60%", 174 "60%",
175 true 175 true
......
...@@ -122,13 +122,13 @@ export default { ...@@ -122,13 +122,13 @@ export default {
122 this.$popupDialog("登记簿详情", "registerBook/djbFrame", this.currentSelectProps, '80%', true) 122 this.$popupDialog("登记簿详情", "registerBook/djbFrame", this.currentSelectProps, '80%', true)
123 break; 123 break;
124 case "B5": 124 case "B5":
125 this.$popupDialog("证书证明预览", "workflow/components/dialog/zsyl", { 125 this.$popupDialog("证书证明预览", "workflow/top/zsyl/index", {
126 bsmSlsq: this.bsmSlsq, 126 bsmSlsq: this.bsmSlsq,
127 entryType: '1' 127 entryType: '1'
128 }, '1230px', true) 128 }, '1230px', true)
129 break; 129 break;
130 case "B-ZSXG": 130 case "B-ZSXG":
131 this.$popupDialog("证书修改", "workflow/components/dialog/zsxg", { bsmSlsq: this.bsmSlsq, }, '55%', true) 131 this.$popupDialog("证书修改", "workflow/top/zsxg/index", { bsmSlsq: this.bsmSlsq, }, '55%', true)
132 break; 132 break;
133 case "B6": 133 case "B6":
134 this.$popupDialog("打印申请书", "workflow/components/dialog/sqs", 134 this.$popupDialog("打印申请书", "workflow/components/dialog/sqs",
......
1 <!--
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2023-11-23 17:20:01
5 -->
6 <template>
7 <iframe :src="ip +'/txdw/#/' + formData.bsmZd" frameborder="0" style="width: 100%; height:710px;"></iframe>
8 </template>
9 <script>
10 export default {
11 props: {
12 formData: {
13 type: Object,
14 default: () => {
15 return {}
16 }
17 }
18 },
19 data () {
20 return {
21 ip: window._config.services.management
22 }
23 }
24 }
25 </script>
...\ No newline at end of file ...\ No newline at end of file