3b0b3407 by renchao@pashanhoo.com

Merge branch 'dev'

2 parents e5b57396 cc616e46
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 * @LastEditTime: 2023-05-04 11:13:36 4 * @LastEditTime: 2023-05-04 11:13:36
5 */ 5 */
6 const state = { 6 const state = {
7 yjsqOptions: "", 7 yjsqOptions: {},
8 } 8 }
9 9
10 const mutations = { 10 const mutations = {
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
64 watch: { 64 watch: {
65 yjsqOptions: { 65 yjsqOptions: {
66 handler(val) { 66 handler(val) {
67 this.add(val); 67 this.add(val.opinion);
68 }, 68 },
69 deep: true, 69 deep: true,
70 immediate: true, 70 immediate: true,
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
102 this.add(""); 102 this.add("");
103 this.monitor=false 103 this.monitor=false
104 }else{ 104 }else{
105 this.add(val); 105 this.add(val.opinion);
106 } 106 }
107 }, 107 },
108 deep: true, 108 deep: true,
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
142 this.defaultNode = getNode( 142 this.defaultNode = getNode(
143 this.formData.qllx, 143 this.formData.qllx,
144 { linShi: 0, xianShi: 0, liShi: 0 }, 144 { linShi: 0, xianShi: 0, liShi: 0 },
145 this.formData.bdcdylx || "" 145 res.result.bdcdylx|| ""
146 ); 146 );
147 this.sfqdata[0].children.forEach((item, index) => { 147 this.sfqdata[0].children.forEach((item, index) => {
148 if (item.id == this.defaultNode.id) { 148 if (item.id == this.defaultNode.id) {
...@@ -229,7 +229,6 @@ ...@@ -229,7 +229,6 @@
229 * @author: renchao 229 * @author: renchao
230 */ 230 */
231 loadComponent (form) { 231 loadComponent (form) {
232 console.log(form, 'form');
233 this.componentTag = (r) => 232 this.componentTag = (r) =>
234 require.ensure([], () => r(require("@/views/registerBook/" + form))); 233 require.ensure([], () => r(require("@/views/registerBook/" + form)));
235 }, 234 },
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
40 .xxTable { 40 .xxTable {
41 //border-spacing: 1px; 41 //border-spacing: 1px;
42 width: 100%; 42 width: 100%;
43 border-collapse: collapse;
43 // table-layout: fixed; 44 // table-layout: fixed;
44 45
45 tr { 46 tr {
...@@ -59,12 +60,34 @@ ...@@ -59,12 +60,34 @@
59 top: 0px; 60 top: 0px;
60 z-index: 3; 61 z-index: 3;
61 margin-top: -2px; 62 margin-top: -2px;
63 &:after{
64 content: "";
65 display: inline-block;
66 width: 100%;
67 height: 2px;
68 background-color: rgb(227, 226, 226);
69 position: absolute;
70 bottom: -1px;
71 left: 0;
72 z-index: 3;
73 }
62 } 74 }
63 75
64 tr:nth-child(2) { 76 tr:nth-child(2) {
65 position: sticky; 77 position: sticky;
66 top: 40px; 78 top: 40px;
67 z-index: 3; 79 z-index: 3;
80 &:after{
81 content: "";
82 display: inline-block;
83 width: 100%;
84 height: 2px;
85 background-color: rgb(227, 226, 226);
86 position: absolute;
87 bottom: -1px;
88 left: 0;
89 z-index: 3;
90 }
68 } 91 }
69 92
70 tr:nth-child(3) { 93 tr:nth-child(3) {
...@@ -79,6 +102,28 @@ ...@@ -79,6 +102,28 @@
79 left: 0; 102 left: 0;
80 z-index: 2; 103 z-index: 2;
81 margin-left: -2px; 104 margin-left: -2px;
105 &:before{
106 content: "";
107 display: inline-block;
108 width: 2px;
109 height: 43px;
110 background-color: #e3e2e2;
111 position: absolute;
112 top: 0;
113 left: -2px;
114 z-index: 3;
115 }
116 &:after{
117 content: "";
118 display: inline-block;
119 width: 2px;
120 height: 43px;
121 background-color: #e3e2e2;
122 position: absolute;
123 top: 0;
124 right: -2px;
125 z-index: 3;
126 }
82 } 127 }
83 128
84 th.linshi, 129 th.linshi,
...@@ -166,27 +211,27 @@ ...@@ -166,27 +211,27 @@
166 211
167 212
168 tr { 213 tr {
169 display: flex; 214 // display: flex;
170 } 215 }
171 216
172 tr td { 217 tr td {
173 border: 1px solid rgb(227, 226, 226); 218 border: 2px solid rgb(227, 226, 226);
174 text-align: center; 219 text-align: center;
175 height: 40px; 220 height: 40px;
176 font-size: 13px; 221 font-size: 13px;
177 width: 140px; 222 width: 140px;
178 flex: 1; 223 // flex: 1;
179 width: 100%; 224 width: 100%;
180 display: flex; 225 // display: flex;
181 align-items: center; 226 // align-items: center;
182 justify-content: center; 227 // justify-content: center;
183 min-width: 360px; 228 min-width: 340px;
184 z-index: 1; 229 z-index: 1;
185 } 230 }
186 td:first-child{ 231 td:first-child{
187 flex: inherit !important; 232 flex: inherit !important;
188 width: 200px !important; 233 // width: 200px !important;
189 min-width: auto !important; 234 min-width: 180px !important;
190 } 235 }
191 >tr:nth-child(odd) td { 236 >tr:nth-child(odd) td {
192 background: #f2f2f2; 237 background: #f2f2f2;
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
144 * @author: renchao 144 * @author: renchao
145 */ 145 */
146 useCommonOpinion (item) { 146 useCommonOpinion (item) {
147 store.dispatch('workflow/setOptions', item.opinion); 147 store.dispatch('workflow/setOptions', item);
148 this.$popupCacel() 148 this.$popupCacel()
149 }, 149 },
150 //删除常用意见 150 //删除常用意见
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-08-25 09:21:38 4 * @LastEditTime: 2023-08-25 10:34:46
5 --> 5 -->
6 <template> 6 <template>
7 <div> 7 <div>
...@@ -106,12 +106,23 @@ ...@@ -106,12 +106,23 @@
106 this.loading = false 106 this.loading = false
107 }) 107 })
108 }, 108 },
109 // 不动产证书
110 /** 109 /**
111 * @description: 不动产证书 110 * @description: 不动产证书
112 * @author: renchao 111 * @author: renchao
113 */ 112 */
114 drawTextOnImage () { 113 drawTextOnImage () {
114 function getByteLen (val) {
115 var len = 0;
116 for (var i = 0; i < val.length; i++) {
117 var length = val.charCodeAt(i);
118 if (length >= 0 && length <= 128) {
119 len += 1;
120 } else {
121 len += 2;
122 }
123 }
124 return len;
125 }
115 const canvas = this.$refs.zs; 126 const canvas = this.$refs.zs;
116 const context = canvas.getContext('2d'); 127 const context = canvas.getContext('2d');
117 const image = new Image(); 128 const image = new Image();
...@@ -123,30 +134,29 @@ ...@@ -123,30 +134,29 @@
123 context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56); 134 context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 113, 56);
124 context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 180, 56); 135 context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 180, 56);
125 context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56); 136 context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 370, 56);
126 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 138, 97); 137 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 129, 97);
127 context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 138, 138); 138 context.fillText(this.bdcqz.gyqk ? this.bdcqz.gyqk : '', 129, 136);
128 context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 138, 180); 139
129 // 不动产单元号
130 this.bdcdyh = this.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.bdcqz.bdcdyh.slice(6, 12) + ' ' + 140 this.bdcdyh = this.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.bdcqz.bdcdyh.slice(6, 12) + ' ' +
131 this.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.bdcqz.bdcdyh.slice(19, this.bdcqz.bdcdyh.length) 141 this.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.bdcqz.bdcdyh.slice(19, this.bdcqz.bdcdyh.length)
132 context.fillText(this.bdcdyh ? this.bdcdyh : '', 138, 223); 142 context.fillText(this.bdcdyh ? this.bdcdyh : '', 129, 223);
133 143
134 144
135 context.fillText(this.bdcqz.qllx ? this.bdcqz.qllx : '', 138, 263); 145
136 context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 138, 303); 146 context.fillText(this.bdcqz.qllx ? this.bdcqz.qllx : '', 129, 263);
137 context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 138, 346); 147 context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 129, 303);
138 context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 138, 386); 148 context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 129, 346);
139 // 使用期限 149 // context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 129, 386);
140 if (this.bdcqz.syqx && this.bdcqz.syqx.length > 28) { 150 let lines6 = this.bdcqz.mj ? this.bdcqz.mj.split(' ') : [];
141 let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : []; 151 if (getByteLen(this.bdcqz.mj) > 41) {
142 lines3.forEach((line, index) => { 152 lines6.forEach((line, index) => {
143 const y = 427 + (index * 27); // 每行文本的垂直位置 153 const y = 378 + (index * 27); // 每行文本的垂直位置
144 let currentLine = ''; 154 let currentLine = '';
145 let arr = []; 155 let arr = [];
146 for (let word of line) { 156 for (let word of line) {
147 const testLine = currentLine + word; 157 const testLine = currentLine + word;
148 const lineWidth = context.measureText(testLine).width; 158 const lineWidth = context.measureText(testLine).width;
149 if (lineWidth <= 315) { 159 if (lineWidth <= 330) {
150 currentLine = testLine; 160 currentLine = testLine;
151 } else { 161 } else {
152 arr.push(currentLine); 162 arr.push(currentLine);
...@@ -155,21 +165,58 @@ ...@@ -155,21 +165,58 @@
155 } 165 }
156 arr.push(currentLine); 166 arr.push(currentLine);
157 arr.forEach((line, index) => { 167 arr.forEach((line, index) => {
158 context.fillText(line, 138, y + (index * 20)); // 调整行高 168 context.fillText(line, 129, y + (index * 20)); // 调整行高
159 }) 169 })
160 }) 170 })
161 } else { 171 } else {
162 context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 138, 429); 172 lines6.forEach((line, index) => {
173 const y = 386 + (index * 27); // 每行文本的垂直位置
174 let currentLine = '';
175 let arr = [];
176 for (let word of line) {
177 const testLine = currentLine + word;
178 const lineWidth = context.measureText(testLine).width;
179 if (lineWidth <= 330) {
180 currentLine = testLine;
181 } else {
182 arr.push(currentLine);
183 currentLine = word;
163 } 184 }
164 185 }
165 // qlqtzk 186 arr.push(currentLine);
166 const maxWidth = 305; // 最大宽度限制 187 arr.forEach((line, index) => {
188 context.fillText(line, 129, y + (index * 20)); // 调整行高
189 })
190 })
191 }
192 // context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 129, 429);
193 // 权利其他状态
194 const maxWidth = 332; // 最大宽度限制
167 let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; 195 let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : [];
168 lines.forEach((line, index) => { 196 // lines.forEach((line, index) => {
169 const y = 469 + (index * 37); // 每行文本的垂直位置 197 // const y = 463 + (index * 33); // 每行文本的垂直位置
198 // let currentLine = '';
199 // let arr = [];
200 // for (let word of line) {
201 // const testLine = currentLine + word;
202 // const lineWidth = context.measureText(testLine).width;
203 // if (lineWidth <= maxWidth) {
204 // currentLine = testLine;
205 // } else {
206 // arr.push(currentLine);
207 // currentLine = word;
208 // }
209 // }
210 // arr.push(currentLine);
211 // arr.forEach((line, index) => {
212 // context.fillText(line, 129, y + (index * 17)); // 调整行高
213 // })
214 // })
215 for (let i = 0; i < lines.length; i++) {
216 if (getByteLen(lines[i]) > 41) {
170 let currentLine = ''; 217 let currentLine = '';
171 let arr = []; 218 let arr = [];
172 for (let word of line) { 219 for (let word of lines[i]) {
173 const testLine = currentLine + word; 220 const testLine = currentLine + word;
174 const lineWidth = context.measureText(testLine).width; 221 const lineWidth = context.measureText(testLine).width;
175 if (lineWidth <= maxWidth) { 222 if (lineWidth <= maxWidth) {
...@@ -181,13 +228,16 @@ ...@@ -181,13 +228,16 @@
181 } 228 }
182 arr.push(currentLine); 229 arr.push(currentLine);
183 arr.forEach((line, index) => { 230 arr.forEach((line, index) => {
184 context.fillText(line, 138, y + (index * 20)); // 调整行高 231 context.fillText(line, 129, 490 + (28 * (i - 1)) + (index * 14)); // 调整行高
185 })
186 }) 232 })
233 } else {
234 context.fillText(lines[i] ? lines[i] : '', 129, 495 + (30 * (i - 1)));
235 }
236 }
187 237
188 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; 238 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : [];
189 lines1.forEach((line, index) => { 239 lines1.forEach((line, index) => {
190 const y = 100 + (index * 37); // 每行文本的垂直位置 240 const y = 100 + (index * 30); // 每行文本的垂直位置
191 let currentLine = ''; 241 let currentLine = '';
192 let arr = []; 242 let arr = [];
193 for (let word of line) { 243 for (let word of line) {
...@@ -202,9 +252,94 @@ ...@@ -202,9 +252,94 @@
202 } 252 }
203 arr.push(currentLine); 253 arr.push(currentLine);
204 arr.forEach((line, index) => { 254 arr.forEach((line, index) => {
205 context.fillText(line, 580, y + (index * 20)); // 调整行高 255 context.fillText(line, 580, y + (index * 30)); // 调整行高
206 }) 256 })
207 }) 257 })
258 let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : [];
259 if (getByteLen(this.bdcqz.syqx) > 41) {
260 lines3.forEach((line, index) => {
261 const y = 423 + (index * 27); // 每行文本的垂直位置
262 let currentLine = '';
263 let arr = [];
264 for (let word of line) {
265 const testLine = currentLine + word;
266 const lineWidth = context.measureText(testLine).width;
267 if (lineWidth <= 330) {
268 currentLine = testLine;
269 } else {
270 arr.push(currentLine);
271 currentLine = word;
272 }
273 }
274 arr.push(currentLine);
275 arr.forEach((line, index) => {
276 context.fillText(line, 129, y + (index * 20)); // 调整行高
277 })
278 })
279 } else {
280 lines3.forEach((line, index) => {
281 const y = 430 + (index * 27); // 每行文本的垂直位置
282 let currentLine = '';
283 let arr = [];
284 for (let word of line) {
285 const testLine = currentLine + word;
286 const lineWidth = context.measureText(testLine).width;
287 if (lineWidth <= 315) {
288 currentLine = testLine;
289 } else {
290 arr.push(currentLine);
291 currentLine = word;
292 }
293 }
294 arr.push(currentLine);
295 arr.forEach((line, index) => {
296 context.fillText(line, 129, y + (index * 20)); // 调整行高
297 })
298 })
299 }
300
301 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
302 if (getByteLen(this.bdcqz.zl) > 41) {
303 lines2.forEach((line, index) => {
304 const y = 170 + (index * 20); // 每行文本的垂直位置
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 <= 336) {
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, 129, y + (index * 20)); // 调整行高
320 })
321 })
322 } else {
323 lines2.forEach((line, index) => {
324 const y = 180 + (index * 20); // 每行文本的垂直位置
325 let currentLine = '';
326 let arr = [];
327 for (let word of line) {
328 const testLine = currentLine + word;
329 const lineWidth = context.measureText(testLine).width;
330 if (lineWidth <= 336) {
331 currentLine = testLine;
332 } else {
333 arr.push(currentLine);
334 currentLine = word;
335 }
336 }
337 arr.push(currentLine);
338 arr.forEach((line, index) => {
339 context.fillText(line, 129, y + (index * 20)); // 调整行高
340 })
341 })
342 }
208 } 343 }
209 image.src = this.imgSrc 344 image.src = this.imgSrc
210 }, 345 },
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-08-25 09:31:57 4 * @LastEditTime: 2023-08-25 12:21:10
5 --> 5 -->
6 <template> 6 <template>
7 <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="height:720px;text-align: center;"> 7 <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="height:720px;text-align: center;">
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
22 <script> 22 <script>
23 import { datas } from "../../javascript/zsyl.js"; 23 import { datas } from "../../javascript/zsyl.js";
24 import { getSlsqBdcqzList } from "@/api/bdcqz.js" 24 import { getSlsqBdcqzList } from "@/api/bdcqz.js"
25 import { log } from 'bpmn-js-token-simulation';
25 export default { 26 export default {
26 name: "zsyl", 27 name: "zsyl",
27 props: { 28 props: {
...@@ -122,6 +123,18 @@ ...@@ -122,6 +123,18 @@
122 * @author: renchao 123 * @author: renchao
123 */ 124 */
124 drawTextOnImage () { 125 drawTextOnImage () {
126 function getByteLen (val) {
127 var len = 0;
128 for (var i = 0; i < val.length; i++) {
129 var length = val.charCodeAt(i);
130 if (length >= 0 && length <= 128) {
131 len += 1;
132 } else {
133 len += 2;
134 }
135 }
136 return len;
137 }
125 const canvas = this.$refs.zs; 138 const canvas = this.$refs.zs;
126 const context = canvas.getContext('2d'); 139 const context = canvas.getContext('2d');
127 const image = new Image(); 140 const image = new Image();
...@@ -145,19 +158,17 @@ ...@@ -145,19 +158,17 @@
145 context.fillText(this.bdcqz.qllx ? this.bdcqz.qllx : '', 129, 263); 158 context.fillText(this.bdcqz.qllx ? this.bdcqz.qllx : '', 129, 263);
146 context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 129, 303); 159 context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 129, 303);
147 context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 129, 346); 160 context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 129, 346);
148 context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 129, 386); 161 // context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 129, 386);
149 // context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 129, 429); 162 let lines6 = this.bdcqz.mj ? this.bdcqz.mj.split(' ') : [];
150 // qlqtzk 163 if (getByteLen(this.bdcqz.mj) > 41) {
151 const maxWidth = 333; // 最大宽度限制 164 lines6.forEach((line, index) => {
152 let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; 165 const y = 378 + (index * 27); // 每行文本的垂直位置
153 lines.forEach((line, index) => {
154 const y = 463 + (index * 40); // 每行文本的垂直位置
155 let currentLine = ''; 166 let currentLine = '';
156 let arr = []; 167 let arr = [];
157 for (let word of line) { 168 for (let word of line) {
158 const testLine = currentLine + word; 169 const testLine = currentLine + word;
159 const lineWidth = context.measureText(testLine).width; 170 const lineWidth = context.measureText(testLine).width;
160 if (lineWidth <= maxWidth) { 171 if (lineWidth <= 330) {
161 currentLine = testLine; 172 currentLine = testLine;
162 } else { 173 } else {
163 arr.push(currentLine); 174 arr.push(currentLine);
...@@ -169,6 +180,73 @@ ...@@ -169,6 +180,73 @@
169 context.fillText(line, 129, y + (index * 20)); // 调整行高 180 context.fillText(line, 129, y + (index * 20)); // 调整行高
170 }) 181 })
171 }) 182 })
183 } else {
184 lines6.forEach((line, index) => {
185 const y = 386 + (index * 27); // 每行文本的垂直位置
186 let currentLine = '';
187 let arr = [];
188 for (let word of line) {
189 const testLine = currentLine + word;
190 const lineWidth = context.measureText(testLine).width;
191 if (lineWidth <= 330) {
192 currentLine = testLine;
193 } else {
194 arr.push(currentLine);
195 currentLine = word;
196 }
197 }
198 arr.push(currentLine);
199 arr.forEach((line, index) => {
200 context.fillText(line, 129, y + (index * 20)); // 调整行高
201 })
202 })
203 }
204 // context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 129, 429);
205 // 权利其他状态
206 const maxWidth = 332; // 最大宽度限制
207 let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : [];
208 // lines.forEach((line, index) => {
209 // const y = 463 + (index * 33); // 每行文本的垂直位置
210 // let currentLine = '';
211 // let arr = [];
212 // for (let word of line) {
213 // const testLine = currentLine + word;
214 // const lineWidth = context.measureText(testLine).width;
215 // if (lineWidth <= maxWidth) {
216 // currentLine = testLine;
217 // } else {
218 // arr.push(currentLine);
219 // currentLine = word;
220 // }
221 // }
222 // arr.push(currentLine);
223 // arr.forEach((line, index) => {
224 // context.fillText(line, 129, y + (index * 17)); // 调整行高
225 // })
226 // })
227 for (let i = 0; i < lines.length; i++) {
228 if (getByteLen(lines[i]) > 41) {
229 let currentLine = '';
230 let arr = [];
231 for (let word of lines[i]) {
232 const testLine = currentLine + word;
233 const lineWidth = context.measureText(testLine).width;
234 if (lineWidth <= maxWidth) {
235 currentLine = testLine;
236 } else {
237 arr.push(currentLine);
238 currentLine = word;
239 }
240 }
241 arr.push(currentLine);
242 arr.forEach((line, index) => {
243 context.fillText(line, 129, 490 + (28 * (i - 1)) + (index * 14)); // 调整行高
244 })
245 } else {
246 context.fillText(lines[i] ? lines[i] : '', 129, 495 + (30 * (i - 1)));
247 }
248 }
249
172 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; 250 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : [];
173 lines1.forEach((line, index) => { 251 lines1.forEach((line, index) => {
174 const y = 100 + (index * 30); // 每行文本的垂直位置 252 const y = 100 + (index * 30); // 每行文本的垂直位置
...@@ -190,7 +268,7 @@ ...@@ -190,7 +268,7 @@
190 }) 268 })
191 }) 269 })
192 let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : []; 270 let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : [];
193 if (lines3.length >= 22) { 271 if (getByteLen(this.bdcqz.syqx) > 41) {
194 lines3.forEach((line, index) => { 272 lines3.forEach((line, index) => {
195 const y = 423 + (index * 27); // 每行文本的垂直位置 273 const y = 423 + (index * 27); // 每行文本的垂直位置
196 let currentLine = ''; 274 let currentLine = '';
...@@ -198,7 +276,7 @@ ...@@ -198,7 +276,7 @@
198 for (let word of line) { 276 for (let word of line) {
199 const testLine = currentLine + word; 277 const testLine = currentLine + word;
200 const lineWidth = context.measureText(testLine).width; 278 const lineWidth = context.measureText(testLine).width;
201 if (lineWidth <= 315) { 279 if (lineWidth <= 330) {
202 currentLine = testLine; 280 currentLine = testLine;
203 } else { 281 } else {
204 arr.push(currentLine); 282 arr.push(currentLine);
...@@ -233,7 +311,7 @@ ...@@ -233,7 +311,7 @@
233 } 311 }
234 312
235 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; 313 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
236 if (lines2.length >= 22) { 314 if (getByteLen(this.bdcqz.zl) > 41) {
237 lines2.forEach((line, index) => { 315 lines2.forEach((line, index) => {
238 const y = 170 + (index * 20); // 每行文本的垂直位置 316 const y = 170 + (index * 20); // 每行文本的垂直位置
239 let currentLine = ''; 317 let currentLine = '';
...@@ -282,6 +360,19 @@ ...@@ -282,6 +360,19 @@
282 * @author: renchao 360 * @author: renchao
283 */ 361 */
284 drawTextzmImage () { 362 drawTextzmImage () {
363 function getByteLen (val) {
364 var len = 0;
365 for (var i = 0; i < val.length; i++) {
366 var length = val.charCodeAt(i);
367 if (length >= 0 && length <= 128) {
368 len += 1;
369 } else {
370 len += 2;
371 }
372 }
373 return len;
374 }
375
285 const canvas = this.$refs.zm; 376 const canvas = this.$refs.zm;
286 const context = canvas.getContext('2d'); 377 const context = canvas.getContext('2d');
287 const image = new Image(); 378 const image = new Image();
...@@ -399,7 +490,6 @@ ...@@ -399,7 +490,6 @@
399 context.fillText(line, 775, y + (index * 16)); // 调整行高 490 context.fillText(line, 775, y + (index * 16)); // 调整行高
400 }) 491 })
401 }) 492 })
402
403 // fj 493 // fj
404 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; 494 let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : [];
405 lines1.forEach((line, index) => { 495 lines1.forEach((line, index) => {
......
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
93 watch: { 93 watch: {
94 yjsqOptions: { 94 yjsqOptions: {
95 handler(val) { 95 handler(val) {
96 this.add(val); 96 this.add(val.opinion);
97 }, 97 },
98 deep: true, 98 deep: true,
99 immediate: true, 99 immediate: true,
......
...@@ -107,12 +107,12 @@ ...@@ -107,12 +107,12 @@
107 <el-row :gutter="10" v-if="ruleForm.fdcq1"> 107 <el-row :gutter="10" v-if="ruleForm.fdcq1">
108 <el-col :span="8"> 108 <el-col :span="8">
109 <el-form-item label="独用土地面积:"> 109 <el-form-item label="独用土地面积:">
110 <el-input v-model="ruleForm.fdcq1.dytdmj"></el-input> 110 <el-input :disabled="!viewEdit" v-model="ruleForm.fdcq1.dytdmj"></el-input>
111 </el-form-item> 111 </el-form-item>
112 </el-col> 112 </el-col>
113 <el-col :span="8"> 113 <el-col :span="8">
114 <el-form-item label="分摊土地面积:"> 114 <el-form-item label="分摊土地面积:">
115 <el-input v-model="ruleForm.fdcq1.fttdmj"></el-input> 115 <el-input :disabled="!viewEdit" v-model="ruleForm.fdcq1.fttdmj"></el-input>
116 </el-form-item> 116 </el-form-item>
117 </el-col> 117 </el-col>
118 118
...@@ -120,11 +120,12 @@ ...@@ -120,11 +120,12 @@
120 <el-form-item label="房地产交易价格:"> 120 <el-form-item label="房地产交易价格:">
121 <div class="flex"> 121 <div class="flex">
122 <el-input 122 <el-input
123 :disabled="!viewEdit"
123 v-model="ruleForm.fdcq1.fdcjyjg" 124 v-model="ruleForm.fdcq1.fdcjyjg"
124 style="width: 500%" 125 style="width: 500%"
125 oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null" 126 oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
126 ></el-input> 127 ></el-input>
127 <el-select v-model="ruleForm.fdcq1.jedw"> 128 <el-select :disabled="!viewEdit" v-model="ruleForm.fdcq1.jedw">
128 <el-option 129 <el-option
129 v-for="item in dictData['A57']" 130 v-for="item in dictData['A57']"
130 :key="item.dcode" 131 :key="item.dcode"
...@@ -140,6 +141,7 @@ ...@@ -140,6 +141,7 @@
140 <el-col :span="24"> 141 <el-col :span="24">
141 <el-form-item label="附记:"> 142 <el-form-item label="附记:">
142 <el-input 143 <el-input
144 :disabled="!viewEdit"
143 v-model="ruleForm.fdcq1.fj" 145 v-model="ruleForm.fdcq1.fj"
144 type="textarea" 146 type="textarea"
145 maxlength="500" 147 maxlength="500"
......