de6b25bd by renchao@pashanhoo.com

Merge branch 'dev'

2 parents 1d00e903 7a4e9519
......@@ -18,7 +18,7 @@
lpbData.xmmc
}}</el-checkbox>
</p>
<el-button type="primary" class="save-btn" v-if="!onlyShow && showSave" @click="saveLpb">保存</el-button>
<el-button type="primary" class="save-btn" v-if="!onlyShow && showSave" @click="saveLpb">选择确认</el-button>
<el-button type="primary" class="save-btn" v-if="!onlyShow && !showSave" @click="submitForm" :loading="loading">发起申请</el-button>
<!-- 右键菜单 -->
<ul
......@@ -36,7 +36,7 @@ import { getLpb } from "@/api/lpcx.js";
import chCpn from "./ch.vue";
import zdyCpn from "./zdys.vue";
import ljzsCpn from "./ljzs.vue";
import { startBusinessFlow, choiceBdcdy } from "@/api/workFlow.js";
import { startBusinessFlow, choiceBdcdy,againAddSldy } from "@/api/workFlow.js";
import jump from "../../ywbl/ywsq/components/mixin/jump";
import store from '@/store/index.js'
import { ywPopupCacel } from "@/utils/popup.js";
......@@ -132,10 +132,45 @@ export default {
* @author: renchao
*/
saveLpb(){
if (this.bsmList.length == 0) {
this.$message.error("请至少选择一条数据");
return;
}
this.loading = true;
againAddSldy({
bsmSqyw: this.sqywInfo.bsmSqyw,
bsmSlsq: this.sqywInfo.bsmSlsq,
bdcdysz: this.bsmList,
sjlx: "houses"
}).then((res) => {
this.loading = false
if (res.code == 200) {
this.$message({
showClose: true,
message: '添加成功',
type: 'success'
})
if (!this.isJump) {
this.jump(res.result, this.sqywInfo.djywbm)
} else {
store.dispatch('user/refreshPage', true);
}
//this.close();
this.$popupCacel();
} else {
if (res.result && res.result.length > 0) {
this.$popup("申请错误明细", "components/ywdialog", { width:'36%', formData:{result: res.result} })
} else {
this.$popup("申请错误明细", "components/ywdialog", { width:'36%', formData:{message: res.message} })
}
}
}).catch(() => {
this.loading = false
})
// todo 调用保存接口 传入参数待定
console.log(this.bsmList,'this.bsmList');
//console.log(this.bsmList,'this.bsmList');
// 保存成功后关闭弹框
this.$popupCacel()
//this.$popupCacel()
},
// 改变户选中状态
/**
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2024-01-24 17:33:35
* @LastEditTime: 2024-02-06 13:26:37
-->
<template>
<div>
......@@ -539,7 +539,7 @@
// context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
// 权利人
let qlrlines = this.bdcqz.qlr
if (getByteLen(this.bdcqz.qlr) > 36) {
if (getByteLen(this.bdcqz.qlr) > 32) {
let currentLine = '';
let arr = [];
for (let word of qlrlines) {
......@@ -564,7 +564,7 @@
// context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
let ywrlines = this.bdcqz.ywr
if (getByteLen(this.bdcqz.ywr) > 36) {
if (getByteLen(this.bdcqz.ywr) > 32) {
let currentLine = '';
let arr = [];
for (let word of ywrlines) {
......@@ -588,7 +588,7 @@
let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
if (getByteLen(this.bdcqz.zl) > 37) {
if (getByteLen(this.bdcqz.zl) > 32) {
lines2.forEach((line, index) => {
const y = 315 + (index * 20); // 每行文本的垂直位置
let currentLine = '';
......@@ -641,12 +641,60 @@
// 恢复原始字体设置
context.font = originalFont;
// qlqtzk
function getByteLenBdcdy (val) {
var encoder = new TextEncoder('utf-8');
return encoder.encode(val).length;
}
const maxWidth = 290; // 最大宽度限制
let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n').filter(i => i && i.trim()) : [];
for (let i = 0; i < lines.length; i++) {
console.log(getByteLen(lines[i]));
let num = Math.ceil(getByteLen(lines[i]) / 37)
if (getByteLen(lines[i]) > 37) {
let bdcdyNum = Math.ceil(getByteLenBdcdy(lines[0]) / 43)
// 单独处理不动产单元号
let linesBdcdy = lines[0] ? lines[0].split(' ') : [];
if (getByteLenBdcdy(lines[0]) > 43) {
linesBdcdy.forEach((line, index) => {
const y = 412 + (index * 17); // 每行文本的垂直位置
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, 770, y + (index * 17)); // 调整行高
})
})
} else {
linesBdcdy.forEach((line, index) => {
const y = 418 + (index * 17); // 每行文本的垂直位置
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, 770, y + (index * 17)); // 调整行高
})
})
}
for (let i = 1; i < lines.length; i++) {
let num = Math.ceil(getByteLen(lines[i]) / 32)
if (getByteLen(lines[i]) > 32) {
let currentLine = '';
let arr = [];
for (let word of lines[i]) {
......@@ -662,18 +710,18 @@
arr.push(currentLine);
if (i > 0) {
arr.forEach((line, index) => {
context.fillText(line, 770, 438 + (24 * (i - 1)) + 5 * num + (index * 17)); // 调整行高
context.fillText(line, 770, 408 + (bdcdyNum * 15) + (24 * (i - 1)) + 5 * num + (index * 17)); // 调整行高
})
} else {
arr.forEach((line, index) => {
context.fillText(line, 770, 438 + (24 * (i - 1)) + (index * 17)); // 调整行高
context.fillText(line, 770, 408 + (bdcdyNum * 15) + (24 * (i - 1)) + (index * 17)); // 调整行高
})
}
} else {
if (i > 0) {
context.fillText(lines[i] ? lines[i] : '', 770, 447 + 6 * num + (25 * (i - 1)));
context.fillText(lines[i] ? lines[i] : '', 770, 417 + (bdcdyNum * 15) + 6 * num + (25 * (i - 1)));
} else {
context.fillText(lines[i] ? lines[i] : '', 770, 447 + (25 * (i - 1)));
context.fillText(lines[i] ? lines[i] : '', 770, 417 + (bdcdyNum * 15) + (25 * (i - 1)));
}
}
}
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2024-01-30 16:29:37
* @LastEditTime: 2024-02-06 13:23:44
-->
<template>
<div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="text-align: center;">
......@@ -425,7 +425,6 @@
}
return len;
}
const canvas = this.$refs.zm;
const context = canvas.getContext('2d');
const image = new Image();
......@@ -444,7 +443,6 @@
}
context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 620, 125);
context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 665, 125);
console.log(getByteLen(this.bdcqz.sxqc));
if (getByteLen(this.bdcqz.sxqc) > 14) {
const originalFont = context.font;
// 设置新的字体大小
......@@ -462,7 +460,7 @@
// context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
// 权利人
let qlrlines = this.bdcqz.qlr
if (getByteLen(this.bdcqz.qlr) > 36) {
if (getByteLen(this.bdcqz.qlr) > 32) {
let currentLine = '';
let arr = [];
for (let word of qlrlines) {
......@@ -487,7 +485,7 @@
// 义务人
// context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
let ywrlines = this.bdcqz.ywr
if (getByteLen(this.bdcqz.ywr) > 36) {
if (getByteLen(this.bdcqz.ywr) > 32) {
let currentLine = '';
let arr = [];
for (let word of ywrlines) {
......@@ -510,9 +508,8 @@
}
// context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 775, 325);
let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
if (getByteLen(this.bdcqz.zl) > 37) {
if (getByteLen(this.bdcqz.zl) > 32) {
lines2.forEach((line, index) => {
const y = 315 + (index * 20); // 每行文本的垂直位置
let currentLine = '';
......@@ -567,11 +564,60 @@
// 恢复原始字体设置
context.font = originalFont;
// qlqtzk
function getByteLenBdcdy (val) {
var encoder = new TextEncoder('utf-8');
return encoder.encode(val).length;
}
const maxWidth = 295; // 最大宽度限制
let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n').filter(i => i && i.trim()) : [];
for (let i = 0; i < lines.length; i++) {
let num = Math.ceil(getByteLen(lines[i]) / 37)
if (getByteLen(lines[i]) > 37) {
let bdcdyNum = Math.ceil(getByteLenBdcdy(lines[0]) / 43)
// 单独处理不动产单元号
let linesBdcdy = lines[0] ? lines[0].split(' ') : [];
if (getByteLenBdcdy(lines[0]) > 43) {
linesBdcdy.forEach((line, index) => {
const y = 412 + (index * 17); // 每行文本的垂直位置
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, 770, y + (index * 17)); // 调整行高
})
})
} else {
linesBdcdy.forEach((line, index) => {
const y = 418 + (index * 17); // 每行文本的垂直位置
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, 770, y + (index * 17)); // 调整行高
})
})
}
for (let i = 1; i < lines.length; i++) {
let num = Math.ceil(getByteLen(lines[i]) / 32)
if (getByteLen(lines[i]) > 32) {
let currentLine = '';
let arr = [];
for (let word of lines[i]) {
......@@ -587,18 +633,18 @@
arr.push(currentLine);
if (i > 0) {
arr.forEach((line, index) => {
context.fillText(line, 770, 438 + (24 * (i - 1)) + 5 * num + (index * 17)); // 调整行高
context.fillText(line, 770, 408 + (bdcdyNum * 15) + (24 * (i - 1)) + 5 * num + (index * 17)); // 调整行高
})
} else {
arr.forEach((line, index) => {
context.fillText(line, 770, 438 + (24 * (i - 1)) + (index * 17)); // 调整行高
context.fillText(line, 770, 408 + (bdcdyNum * 15) + (24 * (i - 1)) + (index * 17)); // 调整行高
})
}
} else {
if (i > 0) {
context.fillText(lines[i] ? lines[i] : '', 770, 447 + 6 * num + (25 * (i - 1)));
context.fillText(lines[i] ? lines[i] : '', 770, 417 + (bdcdyNum * 15) + 6 * num + (25 * (i - 1)));
} else {
context.fillText(lines[i] ? lines[i] : '', 770, 447 + (25 * (i - 1)));
context.fillText(lines[i] ? lines[i] : '', 770, 417 + (bdcdyNum * 15) + (25 * (i - 1)));
}
}
}
......
......@@ -63,6 +63,9 @@ export function getForm (tabName) {
case "diyaqSlxx":
form = require("@/views/ywbl/slsqxx/diyaq/slxx.vue");
break;
case "batchDiyaq":
form = require("@/views/ywbl/slsqxx/diyaq/batchSlxx.vue");
break;
case "clxx":
form = require("@/views/workflow/components/clxx/clxxUnify.vue");
break;
......
......@@ -65,7 +65,7 @@
<div class="triangle"></div>
</div>
<cfBdcdyTable :tableData="ruleForm.qlxxList" v-if="ruleForm.slsq.djywbm.includes('400')" />
<qjhTable v-else :tableData="ruleForm.hlist" />
<cfBdcdyTable v-else :tableData="ruleForm.ztQlxxList" />
<div class="slxx_title title-block">
抵押信息
<div class="triangle"></div>
......@@ -307,7 +307,7 @@
import qjhTable from "@/views/workflow/components/qjhTable";
import cfBdcdyTable from "@/views/workflow/components/cfBdcdyTable";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import { bacthInit, saveBatchData } from "@/api/workflow/diyaqFlow.js";
import { batchInit, saveBatchData } from "@/api/workflow/diyaqFlow.js";
import { mapGetters } from "vuex";
export default {
mounted () {
......@@ -320,7 +320,7 @@
formdata.append("bsmSlsq", this.$route.query.bsmSlsq);
formdata.append("djlx", this.propsParam.djlx);
formdata.append("isEdit", this.viewEdit);
bacthInit(formdata).then((res) => {
batchInit(formdata).then((res) => {
setTimeout(() => {
that.loading = false
}, 200)
......