|
|
@ -70,6 +70,7 @@ const props = withDefaults( |
|
|
viewPage?: viewPageType; |
|
|
viewPage?: viewPageType; |
|
|
formBasicConfig?: any; |
|
|
formBasicConfig?: any; |
|
|
fieldsDetailList?:any; |
|
|
fieldsDetailList?:any; |
|
|
|
|
|
orgAndManTree?:any; |
|
|
}>(), |
|
|
}>(), |
|
|
{ |
|
|
{ |
|
|
showPage: true, |
|
|
showPage: true, |
|
|
@ -112,6 +113,9 @@ const props = withDefaults( |
|
|
fieldsDetailList: () => { |
|
|
fieldsDetailList: () => { |
|
|
return {}; |
|
|
return {}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
orgAndManTree: () => { |
|
|
|
|
|
return {}; |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
const emits = defineEmits<{ |
|
|
const emits = defineEmits<{ |
|
|
@ -314,6 +318,8 @@ let checkboxs: any[] = []; |
|
|
let switchs: any[] = []; |
|
|
let switchs: any[] = []; |
|
|
let selects: any[] = []; |
|
|
let selects: any[] = []; |
|
|
let tables: any[] = []; |
|
|
let tables: any[] = []; |
|
|
|
|
|
let dofs: any[] = [];//deptOrgAndOrgCententAndFounderArr |
|
|
|
|
|
|
|
|
function getAsfs() { |
|
|
function getAsfs() { |
|
|
//setTimeout(() => { |
|
|
//setTimeout(() => { |
|
|
let dataList = ref({}); |
|
|
let dataList = ref({}); |
|
|
@ -330,7 +336,9 @@ function getAsfs() { |
|
|
switchs.push(dataList.value[i]) |
|
|
switchs.push(dataList.value[i]) |
|
|
} else if(dataList.value[i].type == "select"){ |
|
|
} else if(dataList.value[i].type == "select"){ |
|
|
selects.push(dataList.value[i]) |
|
|
selects.push(dataList.value[i]) |
|
|
} else if ( |
|
|
} else if(dataList.value[i].type == "deptOrg"||dataList.value[i].type == "orgCentent"||dataList.value[i].type == "founder"){//||dataList.value[i].type == "owner"拥有者,"expand-user"选择用户 |
|
|
|
|
|
dofs.push(dataList.value[i]) |
|
|
|
|
|
}else if ( |
|
|
dataList.value[i].type == "card" || |
|
|
dataList.value[i].type == "card" || |
|
|
dataList.value[i].type == "flex" || |
|
|
dataList.value[i].type == "flex" || |
|
|
dataList.value[i].type == "div" || |
|
|
dataList.value[i].type == "div" || |
|
|
@ -351,6 +359,8 @@ function getAsfs() { |
|
|
switchs.push(element) |
|
|
switchs.push(element) |
|
|
}else if(element.type == "select"){ |
|
|
}else if(element.type == "select"){ |
|
|
selects.push(element) |
|
|
selects.push(element) |
|
|
|
|
|
}else if(element.type == "deptOrg"||element.type == "orgCentent"||element.type == "founder"){ |
|
|
|
|
|
dofs.push(element) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} else if (dataList.value[i].type == "grid") { |
|
|
} else if (dataList.value[i].type == "grid") { |
|
|
@ -371,6 +381,8 @@ function getAsfs() { |
|
|
switchs.push(a) |
|
|
switchs.push(a) |
|
|
}else if(a.type == "select"){ |
|
|
}else if(a.type == "select"){ |
|
|
selects.push(a) |
|
|
selects.push(a) |
|
|
|
|
|
}else if(a.type == "deptOrg"||a.type == "orgCentent"||a.type == "founder"){ |
|
|
|
|
|
dofs.push(a) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -393,6 +405,8 @@ function getAsfs() { |
|
|
switchs.push(a) |
|
|
switchs.push(a) |
|
|
}else if(a.type == "select"){ |
|
|
}else if(a.type == "select"){ |
|
|
selects.push(a) |
|
|
selects.push(a) |
|
|
|
|
|
}else if(a.type == "deptOrg"||a.type == "orgCentent"||a.type == "founder"){ |
|
|
|
|
|
dofs.push(a) |
|
|
}else if (a.type == "flex" || a.type == "table") { |
|
|
}else if (a.type == "flex" || a.type == "table") { |
|
|
if (a.type == "table") { |
|
|
if (a.type == "table") { |
|
|
tables.push(dataList.value[i]); |
|
|
tables.push(dataList.value[i]); |
|
|
@ -412,6 +426,8 @@ function getAsfs() { |
|
|
switchs.push(q) |
|
|
switchs.push(q) |
|
|
}else if(q.type == "select"){ |
|
|
}else if(q.type == "select"){ |
|
|
selects.push(q) |
|
|
selects.push(q) |
|
|
|
|
|
}else if(q.type == "deptOrg"||q.type == "orgCentent"||q.type == "founder"){ |
|
|
|
|
|
dofs.push(q) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -425,7 +441,6 @@ function getAsfs() { |
|
|
//}, 500); |
|
|
//}, 500); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function convertStringToArray(str: string) { |
|
|
function convertStringToArray(str: string) { |
|
|
if (typeof str!== 'string') { |
|
|
if (typeof str!== 'string') { |
|
|
throw new Error('Input must be a string.'); |
|
|
throw new Error('Input must be a string.'); |
|
|
@ -442,6 +457,45 @@ function convertStringToArray(str: string) { |
|
|
return parts.map(part => parseFloat(part)); |
|
|
return parts.map(part => parseFloat(part)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
interface Tree { |
|
|
|
|
|
id?: string; |
|
|
|
|
|
label: string; |
|
|
|
|
|
disabled?: boolean; |
|
|
|
|
|
children?: Tree[]; |
|
|
|
|
|
parentId?: string; |
|
|
|
|
|
[key: string]: any; |
|
|
|
|
|
} |
|
|
|
|
|
function getLabelById(id: string): string | undefined { |
|
|
|
|
|
//console.log(id) |
|
|
|
|
|
const treeNodes = props.orgAndManTree; |
|
|
|
|
|
|
|
|
|
|
|
const findLabel = (nodes: Tree[]): string | undefined => { |
|
|
|
|
|
for (const node of nodes) { |
|
|
|
|
|
// 检查当前节点是否匹配目标id |
|
|
|
|
|
if (node.id === id) { |
|
|
|
|
|
return node.label; |
|
|
|
|
|
} |
|
|
|
|
|
// 递归遍历子节点 |
|
|
|
|
|
if (node.children?.length) { |
|
|
|
|
|
const found = findLabel(node.children); |
|
|
|
|
|
if (found) return found; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return undefined; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return findLabel(treeNodes); |
|
|
|
|
|
} |
|
|
|
|
|
function isAllCharactersNumbers(str: string) { |
|
|
|
|
|
// 遍历字符串中的每个字符 |
|
|
|
|
|
for (let i = 0; i < str.length; i++) { |
|
|
|
|
|
// 检查当前字符是否不是数字字符 |
|
|
|
|
|
if (isNaN(parseInt(str[i], 10))) { |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//liwenxuan 20250120 二维码 end |
|
|
//liwenxuan 20250120 二维码 end |
|
|
|
|
|
|
|
|
@ -467,174 +521,202 @@ const setUpClick = (val: string, id: string) => { |
|
|
text: '正在生成二维码,请稍候...' // 添加的文字内容,可根据需要修改 |
|
|
text: '正在生成二维码,请稍候...' // 添加的文字内容,可根据需要修改 |
|
|
}); |
|
|
}); |
|
|
//console.log(props.formBasicConfig) |
|
|
//console.log(props.formBasicConfig) |
|
|
//请求数据 |
|
|
|
|
|
let getDetailQrCodesData: any = {} |
|
|
if(props.formBasicConfig.qrCodeFlag==true){ |
|
|
let currentFieldsMapArrObj: any = {} |
|
|
if(props.formBasicConfig.qrCodeInside==true){ |
|
|
getDetailQrCodes(idArray).then(({ data }) => { |
|
|
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"&&props.formBasicConfig.qrCodeShowFields.length==0){ |
|
|
getDetailQrCodesData = JSON.parse(JSON.stringify(data)); |
|
|
alert("未选择表格展示字段") |
|
|
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){ |
|
|
return |
|
|
let asfQueryParams1: any[] = []; |
|
|
} |
|
|
for (let key in getDetailQrCodesData) { |
|
|
|
|
|
currentFieldsMapArrObj[key] = getDetailQrCodesData[key] |
|
|
//请求数据 |
|
|
if (getDetailQrCodesData.hasOwnProperty(key)) { |
|
|
let getDetailQrCodesData: any = {} |
|
|
let currentFieldsMap = getDetailQrCodesData[key].fieldsMap |
|
|
let currentFieldsMapArrObj: any = {} |
|
|
//console.log(currentFieldsMap) |
|
|
getDetailQrCodes(idArray).then(({ data }) => { |
|
|
// 遍历对象的属性 |
|
|
getDetailQrCodesData = JSON.parse(JSON.stringify(data)); |
|
|
for (let attr_name in currentFieldsMap) { |
|
|
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){ |
|
|
if (currentFieldsMap.hasOwnProperty(attr_name)) { |
|
|
let asfQueryParams1: any[] = []; |
|
|
//console.log("attr_name------"+attr_name) |
|
|
for (let key in getDetailQrCodesData) { |
|
|
//console.log(`属性名: ${attr_name}, 属性值: ${currentFieldsMap[attr_name]}`); |
|
|
currentFieldsMapArrObj[key] = getDetailQrCodesData[key] |
|
|
radios.forEach(function(element) { |
|
|
if (getDetailQrCodesData.hasOwnProperty(key)) { |
|
|
if(attr_name==element.name){ |
|
|
let currentFieldsMap = getDetailQrCodesData[key].fieldsMap |
|
|
//表格属性中存在此单选,将其value根据options替换为可读值 |
|
|
//console.log(currentFieldsMap) |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
// 遍历对象的属性 |
|
|
let optionsHasCurrentValue = false |
|
|
for (let attr_name in currentFieldsMap) { |
|
|
element.options.forEach((element1: any) => { |
|
|
if (currentFieldsMap.hasOwnProperty(attr_name)) { |
|
|
if(toConvertValue==element1.value){ |
|
|
//console.log("attr_name------"+attr_name) |
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+element1.label |
|
|
//console.log(`属性名: ${attr_name}, 属性值: ${currentFieldsMap[attr_name]}`); |
|
|
optionsHasCurrentValue = true |
|
|
radios.forEach(function(element) { |
|
|
|
|
|
if(attr_name==element.name){ |
|
|
|
|
|
//表格属性中存在此单选,将其value根据options替换为可读值 |
|
|
|
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
|
|
|
let optionsHasCurrentValue = false |
|
|
|
|
|
element.options.forEach((element1: any) => { |
|
|
|
|
|
if(toConvertValue==element1.value){ |
|
|
|
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+element1.label |
|
|
|
|
|
optionsHasCurrentValue = true |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
if(optionsHasCurrentValue==false){ |
|
|
|
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"" |
|
|
} |
|
|
} |
|
|
}); |
|
|
|
|
|
if(optionsHasCurrentValue==false){ |
|
|
|
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"" |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
selects.forEach(function(element) { |
|
|
selects.forEach(function(element) { |
|
|
if(attr_name==element.name){ |
|
|
if(attr_name==element.name){ |
|
|
//表格属性中存在此单选,将其value根据options替换为可读值 |
|
|
//表格属性中存在此单选,将其value根据options替换为可读值 |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
let optionsHasCurrentValue = false |
|
|
let optionsHasCurrentValue = false |
|
|
element.options.forEach((element1: any) => { |
|
|
element.options.forEach((element1: any) => { |
|
|
if(toConvertValue==element1.value){ |
|
|
if(toConvertValue==element1.value){ |
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+element1.label |
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+element1.label |
|
|
optionsHasCurrentValue = true |
|
|
optionsHasCurrentValue = true |
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
if(optionsHasCurrentValue==false){ |
|
|
|
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"" |
|
|
} |
|
|
} |
|
|
}); |
|
|
|
|
|
if(optionsHasCurrentValue==false){ |
|
|
|
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"" |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
//console.log(dofs) |
|
|
switchs.forEach(function(element) { |
|
|
dofs.forEach(function(element) { |
|
|
if(attr_name==element.name){ |
|
|
if(attr_name==element.name){ |
|
|
//表格属性中存在此单选,将其value根据options替换为可读值 |
|
|
//表格属性中存在此单选,将其value根据options替换为可读值 |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
if(toConvertValue=="0"){ |
|
|
//console.log(toConvertValue) |
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用" |
|
|
if(isAllCharactersNumbers(toConvertValue)){ |
|
|
}else{ |
|
|
let orgName = getLabelById(toConvertValue) |
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用" |
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+orgName |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
switchs.forEach(function(element) { |
|
|
checkboxs.forEach(function(element) { |
|
|
if(attr_name==element.name){ |
|
|
if(attr_name==element.name){ |
|
|
//表格属性中存在此单选,将其value根据options替换为可读值 |
|
|
//表格属性中存在此单选,将其value根据options替换为可读值 |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
if(toConvertValue=="0"){ |
|
|
let toConvertArr = convertStringToArray(toConvertValue); |
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用" |
|
|
let toAddStr = "" |
|
|
}else{ |
|
|
if(toConvertArr.length>0){ |
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用" |
|
|
toConvertArr.forEach((element1: any) => { |
|
|
} |
|
|
element.options.forEach((element2: any) => { |
|
|
|
|
|
if(element1==element2.value){ |
|
|
|
|
|
toAddStr = toAddStr+element2.label+"," |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
toAddStr = toAddStr.slice(0, -1) |
|
|
|
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+toAddStr |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
checkboxs.forEach(function(element) { |
|
|
asfs.forEach(function(element) { |
|
|
if(attr_name==element.name){ |
|
|
if(attr_name==element.name){ |
|
|
//表格属性中存在此单选,将其value根据options替换为可读值 |
|
|
//表格属性中存在此关联表单,将其value根据options替换为可读值 |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
let toConvertArr = convertStringToArray(toConvertValue); |
|
|
if(toConvertValue.length>0){ |
|
|
let toAddStr = "" |
|
|
//console.log(element) |
|
|
if(toConvertArr.length>0){ |
|
|
let fieldCount = 0;//如果>0则有此field名 |
|
|
toConvertArr.forEach((element1: any) => { |
|
|
asfQueryParams1.forEach((item1: any) => { |
|
|
element.options.forEach((element2: any) => { |
|
|
//如果参数数组中已存在同field的 关联表单asfQueryParamsItem1,则往已存在的如果参数数组中已存在同field的关联表单asfQueryParamsItem1.asfToSelectIds1中新增asfMasterAndAsfId1 |
|
|
if(element1==element2.value){ |
|
|
// 不存在则push一个新的关联表单asfQueryParamsItem1 |
|
|
toAddStr = toAddStr+element2.label+"," |
|
|
if(item1.field==element.name){ |
|
|
} |
|
|
fieldCount++ |
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
toAddStr = toAddStr.slice(0, -1) |
|
|
|
|
|
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+toAddStr |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
if(fieldCount>0){ |
|
|
asfs.forEach(function(element) { |
|
|
//已存在 |
|
|
if(attr_name==element.name){ |
|
|
//得到已存在的相关field参数对象 |
|
|
//表格属性中存在此关联表单,将其value根据options替换为可读值 |
|
|
asfQueryParams1.forEach((item1: any) => { |
|
|
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] |
|
|
if(item1.field==element.name){ |
|
|
if(toConvertValue.length>0){ |
|
|
|
|
|
//console.log(element) |
|
|
|
|
|
let fieldCount = 0;//如果>0则有此field名 |
|
|
|
|
|
asfQueryParams1.forEach((item1: any) => { |
|
|
|
|
|
//如果参数数组中已存在同field的 关联表单asfQueryParamsItem1,则往已存在的如果参数数组中已存在同field的关联表单asfQueryParamsItem1.asfToSelectIds1中新增asfMasterAndAsfId1 |
|
|
|
|
|
// 不存在则push一个新的关联表单asfQueryParamsItem1 |
|
|
|
|
|
if(item1.field==element.name){ |
|
|
|
|
|
fieldCount++ |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
if(fieldCount>0){ |
|
|
|
|
|
//已存在 |
|
|
|
|
|
//得到已存在的相关field参数对象 |
|
|
|
|
|
asfQueryParams1.forEach((item1: any) => { |
|
|
|
|
|
if(item1.field==element.name){ |
|
|
|
|
|
let asfMasterAndAsfId1: any = {}; |
|
|
|
|
|
asfMasterAndAsfId1.asfId = toConvertValue+""; |
|
|
|
|
|
asfMasterAndAsfId1.asfMasterId = key+""; |
|
|
|
|
|
item1.asfToSelectIds.push(asfMasterAndAsfId1) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}else{ |
|
|
|
|
|
//不存在 |
|
|
|
|
|
let asfQueryParamsItem1: any = {}; |
|
|
|
|
|
asfQueryParamsItem1.formId = element.control.formid; |
|
|
|
|
|
asfQueryParamsItem1.field = element.name; |
|
|
|
|
|
let asfToSelectIds1: any[] = []; |
|
|
|
|
|
asfQueryParamsItem1.asfToSelectIds = asfToSelectIds1; |
|
|
let asfMasterAndAsfId1: any = {}; |
|
|
let asfMasterAndAsfId1: any = {}; |
|
|
asfMasterAndAsfId1.asfId = toConvertValue+""; |
|
|
asfMasterAndAsfId1.asfId = toConvertValue+""; |
|
|
asfMasterAndAsfId1.asfMasterId = key+""; |
|
|
asfMasterAndAsfId1.asfMasterId = key+""; |
|
|
item1.asfToSelectIds.push(asfMasterAndAsfId1) |
|
|
asfToSelectIds1.push(asfMasterAndAsfId1) |
|
|
|
|
|
asfQueryParams1.push(asfQueryParamsItem1) |
|
|
} |
|
|
} |
|
|
}); |
|
|
} |
|
|
}else{ |
|
|
|
|
|
//不存在 |
|
|
|
|
|
let asfQueryParamsItem1: any = {}; |
|
|
|
|
|
asfQueryParamsItem1.formId = element.control.formid; |
|
|
|
|
|
asfQueryParamsItem1.field = element.name; |
|
|
|
|
|
let asfToSelectIds1: any[] = []; |
|
|
|
|
|
asfQueryParamsItem1.asfToSelectIds = asfToSelectIds1; |
|
|
|
|
|
let asfMasterAndAsfId1: any = {}; |
|
|
|
|
|
asfMasterAndAsfId1.asfId = toConvertValue+""; |
|
|
|
|
|
asfMasterAndAsfId1.asfMasterId = key+""; |
|
|
|
|
|
asfToSelectIds1.push(asfMasterAndAsfId1) |
|
|
|
|
|
asfQueryParams1.push(asfQueryParamsItem1) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
getDetailQrCodesData[key].fieldsMap = modifyFieldsMap4(currentFieldsMap) |
|
|
|
|
|
},800) |
|
|
} |
|
|
} |
|
|
setTimeout(()=>{ |
|
|
|
|
|
getDetailQrCodesData[key].fieldsMap = modifyFieldsMap4(currentFieldsMap) |
|
|
|
|
|
},800) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getAsfDataTitlesByIds(asfQueryParams1).then(({ data }) => { |
|
|
|
|
|
let getAsfDataTitlesByIdsData = JSON.parse(JSON.stringify(data)); |
|
|
|
|
|
for (let key in currentFieldsMapArrObj) { |
|
|
|
|
|
if (getDetailQrCodesData.hasOwnProperty(key)) { |
|
|
|
|
|
let currentFieldsMap = getDetailQrCodesData[key].fieldsMap |
|
|
|
|
|
getAsfDataTitlesByIdsData.forEach((element1: any) => { |
|
|
|
|
|
element1.list.forEach((element2: any) => { |
|
|
|
|
|
if(key==element2.asfMasterId){ |
|
|
|
|
|
currentFieldsMap[element1.field] = currentFieldsMap[element1.field].split("!@#@!")[0]+"!@#@!"+element2.label |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getAsfDataTitlesByIds(asfQueryParams1).then(({ data }) => { |
|
|
|
|
|
let getAsfDataTitlesByIdsData = JSON.parse(JSON.stringify(data)); |
|
|
|
|
|
for (let key in currentFieldsMapArrObj) { |
|
|
|
|
|
if (getDetailQrCodesData.hasOwnProperty(key)) { |
|
|
|
|
|
let currentFieldsMap = getDetailQrCodesData[key].fieldsMap |
|
|
|
|
|
getAsfDataTitlesByIdsData.forEach((element1: any) => { |
|
|
|
|
|
element1.list.forEach((element2: any) => { |
|
|
|
|
|
if(key==element2.asfMasterId){ |
|
|
|
|
|
currentFieldsMap[element1.field] = currentFieldsMap[element1.field].split("!@#@!")[0]+"!@#@!"+element2.label |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
tablesData.value = getDetailQrCodesData |
|
|
|
|
|
},810) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
tablesData.value = getDetailQrCodesData |
|
|
|
|
|
},810) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
loadingInstance1.close() |
|
|
|
|
|
qrCodesPrintDialogFlag.value = true |
|
|
|
|
|
},820) |
|
|
|
|
|
|
|
|
|
|
|
}else if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="1"){ |
|
|
|
|
|
//fieldsMap = null |
|
|
|
|
|
tablesData.value = getDetailQrCodesData |
|
|
|
|
|
qrCodesPrintDialogFlag.value = true |
|
|
|
|
|
loadingInstance1.close() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).finally(()=>{ |
|
|
loadingInstance1.close() |
|
|
loadingInstance1.close() |
|
|
qrCodesPrintDialogFlag.value = true |
|
|
}) |
|
|
},820) |
|
|
|
|
|
|
|
|
|
|
|
}else if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="1"){ |
|
|
|
|
|
//fieldsMap = null |
|
|
|
|
|
tablesData.value = getDetailQrCodesData |
|
|
|
|
|
qrCodesPrintDialogFlag.value = true |
|
|
|
|
|
loadingInstance1.close() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
})/* .finally(()=>{ |
|
|
}else{ |
|
|
loadingInstance1.close() |
|
|
alert("内部二维码功能未启用") |
|
|
qrCodesPrintDialogFlag.value = true |
|
|
} |
|
|
}) */ |
|
|
}else{ |
|
|
|
|
|
alert("请先为本表单开启二维码功能") |
|
|
|
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
alert("未选中任何一条,请先选择") |
|
|
alert("未选中任何一条,请先选择") |
|
|
|
|
|
|
|
|
@ -1952,9 +2034,9 @@ const diGuiJilian = (val: any, options: any[]) => { |
|
|
title="生成的二维码" |
|
|
title="生成的二维码" |
|
|
:show-close="false" |
|
|
:show-close="false" |
|
|
style="margin-top: 10px" |
|
|
style="margin-top: 10px" |
|
|
width="50%" |
|
|
width="40%" |
|
|
> |
|
|
> |
|
|
<div v-if="formBasicConfig.qrCodePrintStyle == '2'" style="min-height: 50px; max-height: 750px; overflow-y: auto"> |
|
|
<div v-if="formBasicConfig.qrCodePrintStyle == '2'" style="max-width: 600px;min-height: 50px; max-height: 750px; overflow-y: auto"> |
|
|
<div |
|
|
<div |
|
|
v-for="(tableData, tableKey) in tablesData" |
|
|
v-for="(tableData, tableKey) in tablesData" |
|
|
:id="tableKey" |
|
|
:id="tableKey" |
|
|
@ -1964,8 +2046,8 @@ const diGuiJilian = (val: any, options: any[]) => { |
|
|
> |
|
|
> |
|
|
<table> |
|
|
<table> |
|
|
<tr> |
|
|
<tr> |
|
|
<th style="font-weight: bold; font-size:medium;" colspan="2">{{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}</th> |
|
|
<th colspan="2">{{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }}</th> |
|
|
<th rowspan="6"><img :src="tableData.bufferedImage" alt="二维码" width="auto" height="100%"></th> |
|
|
<td rowspan="6" style="width: 240px;"><img :src="tableData.bufferedImage" alt="二维码" width="200px" style="margin-top: 5px;" ></td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr v-for="(item, fIndex) in tableData.fieldsMap" :key="fIndex"> |
|
|
<tr v-for="(item, fIndex) in tableData.fieldsMap" :key="fIndex"> |
|
|
<th>{{ item.key }}</th> |
|
|
<th>{{ item.key }}</th> |
|
|
@ -2087,11 +2169,15 @@ const diGuiJilian = (val: any, options: any[]) => { |
|
|
table { |
|
|
table { |
|
|
border-collapse: collapse; |
|
|
border-collapse: collapse; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
|
|
|
font-size: 13px; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
td, th { |
|
|
td, th { |
|
|
border: 1px solid black; |
|
|
border: 1px solid black; |
|
|
padding: 8px; |
|
|
padding: 8px; |
|
|
|
|
|
vertical-align: middle; /* 设置文字上下居中 */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |