Browse Source

修复了未设置二维码表单显示字段时请求异常bug

lwx_v17
liwenxuan 10 months ago
parent
commit
e70628b88c
  1. 304
      src/components/DesignForm/app/index.vue
  2. 308
      src/components/DesignForm/tableListPage/index.vue

304
src/components/DesignForm/app/index.vue

@ -472,179 +472,189 @@ const setUpClick = (val: string, id: string) => {
//, //,
let idArray = state.selectionChecked.map(item => item.id); let idArray = state.selectionChecked.map(item => item.id);
if(idArray.length>0){ if(idArray.length>0){
const loadingInstance1 = ElLoading.service({ /* const loadingInstance1 = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '正在生成二维码,请稍候...' // text: '正在生成二维码,请稍候...' //
}); }); */
//console.log(props.formBasicConfig) console.log(props.formBasicConfig)
// if(props.formBasicConfig.qrCodeFlag==true){
let getDetailQrCodesData: any = {} if(props.formBasicConfig.qrCodeInside==true){
let currentFieldsMapArrObj: any = {} if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"&&props.formBasicConfig.qrCodeShowFields.length==0){
getDetailQrCodes(idArray).then(({ data }) => { alert("未选择表格展示字段")
getDetailQrCodesData = JSON.parse(JSON.stringify(data)); return
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){ }
let asfQueryParams1: any[] = []; //
for (let key in getDetailQrCodesData) { let getDetailQrCodesData: any = {}
currentFieldsMapArrObj[key] = getDetailQrCodesData[key] let currentFieldsMapArrObj: any = {}
if (getDetailQrCodesData.hasOwnProperty(key)) { getDetailQrCodes(idArray).then(({ data }) => {
let currentFieldsMap = getDetailQrCodesData[key].fieldsMap getDetailQrCodesData = JSON.parse(JSON.stringify(data));
//console.log(currentFieldsMap) if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){
// let asfQueryParams1: any[] = [];
for (let attr_name in currentFieldsMap) { for (let key in getDetailQrCodesData) {
if (currentFieldsMap.hasOwnProperty(attr_name)) { currentFieldsMapArrObj[key] = getDetailQrCodesData[key]
//console.log("attr_name------"+attr_name) if (getDetailQrCodesData.hasOwnProperty(key)) {
//console.log(`: ${attr_name}, : ${currentFieldsMap[attr_name]}`); let currentFieldsMap = getDetailQrCodesData[key].fieldsMap
radios.forEach(function(element) { //console.log(currentFieldsMap)
if(attr_name==element.name){ //
//,valueoptions for (let attr_name in currentFieldsMap) {
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] if (currentFieldsMap.hasOwnProperty(attr_name)) {
let optionsHasCurrentValue = false //console.log("attr_name------"+attr_name)
element.options.forEach((element1: any) => { //console.log(`: ${attr_name}, : ${currentFieldsMap[attr_name]}`);
if(toConvertValue==element1.value){ radios.forEach(function(element) {
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+element1.label if(attr_name==element.name){
optionsHasCurrentValue = true //,valueoptions
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){ //,valueoptions
//,valueoptions 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]+"!@#@!"+""
} }
} });
}); switchs.forEach(function(element) {
switchs.forEach(function(element) { if(attr_name==element.name){
if(attr_name==element.name){ //,valueoptions
//,valueoptions let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] if(toConvertValue=="0"){
if(toConvertValue=="0"){ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用"
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用" }else{
}else{ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用"
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用" }
}
});
checkboxs.forEach(function(element) {
if(attr_name==element.name){
//,valueoptions
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
let toConvertArr = convertStringToArray(toConvertValue);
let toAddStr = ""
if(toConvertArr.length>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
}
} }
} });
}); asfs.forEach(function(element) {
checkboxs.forEach(function(element) { if(attr_name==element.name){
if(attr_name==element.name){ //,valueoptions
//,valueoptions
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;//>0field
toConvertArr.forEach((element1: any) => { asfQueryParams1.forEach((item1: any) => {
element.options.forEach((element2: any) => { //field asfQueryParamsItem1,fieldasfQueryParamsItem1.asfToSelectIds1asfMasterAndAsfId1
if(element1==element2.value){ // pushasfQueryParamsItem1
toAddStr = toAddStr+element2.label+"," if(item1.field==element.name){
} fieldCount++
}); }
}); });
toAddStr = toAddStr.slice(0, -1) if(fieldCount>0){
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+toAddStr //
} //field
} asfQueryParams1.forEach((item1: any) => {
}); if(item1.field==element.name){
asfs.forEach(function(element) { let asfMasterAndAsfId1: any = {};
if(attr_name==element.name){ asfMasterAndAsfId1.asfId = toConvertValue+"";
//,valueoptions asfMasterAndAsfId1.asfMasterId = key+"";
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] item1.asfToSelectIds.push(asfMasterAndAsfId1)
if(toConvertValue.length>0){ }
//console.log(element) });
let fieldCount = 0;//>0field }else{
asfQueryParams1.forEach((item1: any) => { //
//field asfQueryParamsItem1,fieldasfQueryParamsItem1.asfToSelectIds1asfMasterAndAsfId1 let asfQueryParamsItem1: any = {};
// pushasfQueryParamsItem1 asfQueryParamsItem1.formId = element.control.formid;
if(item1.field==element.name){ asfQueryParamsItem1.field = element.name;
fieldCount++ let asfToSelectIds1: any[] = [];
} asfQueryParamsItem1.asfToSelectIds = asfToSelectIds1;
});
if(fieldCount>0){
//
//field
asfQueryParams1.forEach((item1: any) => {
if(item1.field==element.name){
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(()=>{ setTimeout(()=>{
tablesData.value = getDetailQrCodesData tablesData.value = getDetailQrCodesData
},810) },810)
setTimeout(()=>{ setTimeout(()=>{
loadingInstance1.close() //loadingInstance1.close()
qrCodesPrintDialogFlag.value = true qrCodesPrintDialogFlag.value = true
},820) },820)
}else if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="1"){ }else if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="1"){
//fieldsMap = null //fieldsMap = null
tablesData.value = getDetailQrCodesData tablesData.value = getDetailQrCodesData
qrCodesPrintDialogFlag.value = true qrCodesPrintDialogFlag.value = true
loadingInstance1.close() //loadingInstance1.close()
}
})
}else{
alert("内部二维码功能未启用")
} }
}else{
alert("请先为本表单开启二维码功能")
}
})/* .finally(()=>{
loadingInstance1.close()
qrCodesPrintDialogFlag.value = true
}) */
}else{ }else{
alert("未选中任何一条,请先选择") alert("未选中任何一条,请先选择")

308
src/components/DesignForm/tableListPage/index.vue

@ -462,179 +462,191 @@ const setUpClick = (val: string, id: string) => {
//, //,
let idArray = state.selectionChecked.map(item => item.id); let idArray = state.selectionChecked.map(item => item.id);
if(idArray.length>0){ if(idArray.length>0){
const loadingInstance1 = ElLoading.service({ /* const loadingInstance1 = ElLoading.service({
fullscreen: true, fullscreen: true,
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
//,valueoptions //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){
//,valueoptions
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){ //,valueoptions
//,valueoptions 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]+"!@#@!"+""
} }
} });
}); switchs.forEach(function(element) {
switchs.forEach(function(element) { if(attr_name==element.name){
if(attr_name==element.name){ //,valueoptions
//,valueoptions let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] if(toConvertValue=="0"){
if(toConvertValue=="0"){ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用"
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用" }else{
}else{ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用"
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用" }
} }
} });
}); checkboxs.forEach(function(element) {
checkboxs.forEach(function(element) { if(attr_name==element.name){
if(attr_name==element.name){ //,valueoptions
//,valueoptions let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
let toConvertArr = convertStringToArray(toConvertValue);
let toAddStr = ""
if(toConvertArr.length>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
}
}
});
asfs.forEach(function(element) {
if(attr_name==element.name){
//,valueoptions
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;//>0field
toConvertArr.forEach((element1: any) => { asfQueryParams1.forEach((item1: any) => {
element.options.forEach((element2: any) => { //field asfQueryParamsItem1,fieldasfQueryParamsItem1.asfToSelectIds1asfMasterAndAsfId1
if(element1==element2.value){ // pushasfQueryParamsItem1
toAddStr = toAddStr+element2.label+"," if(item1.field==element.name){
} fieldCount++
}); }
}); });
toAddStr = toAddStr.slice(0, -1) if(fieldCount>0){
currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+toAddStr //
} //field
} asfQueryParams1.forEach((item1: any) => {
}); if(item1.field==element.name){
asfs.forEach(function(element) { let asfMasterAndAsfId1: any = {};
if(attr_name==element.name){ asfMasterAndAsfId1.asfId = toConvertValue+"";
//,valueoptions asfMasterAndAsfId1.asfMasterId = key+"";
let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1] item1.asfToSelectIds.push(asfMasterAndAsfId1)
if(toConvertValue.length>0){ }
//console.log(element) });
let fieldCount = 0;//>0field }else{
asfQueryParams1.forEach((item1: any) => { //
//field asfQueryParamsItem1,fieldasfQueryParamsItem1.asfToSelectIds1asfMasterAndAsfId1 let asfQueryParamsItem1: any = {};
// pushasfQueryParamsItem1 asfQueryParamsItem1.formId = element.control.formid;
if(item1.field==element.name){ asfQueryParamsItem1.field = element.name;
fieldCount++ let asfToSelectIds1: any[] = [];
} asfQueryParamsItem1.asfToSelectIds = asfToSelectIds1;
});
if(fieldCount>0){
//
//field
asfQueryParams1.forEach((item1: any) => {
if(item1.field==element.name){
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(()=>{
loadingInstance1.close()
qrCodesPrintDialogFlag.value = true
},820)
}else if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="1"){ setTimeout(()=>{
//fieldsMap = null //loadingInstance1.close()
tablesData.value = getDetailQrCodesData qrCodesPrintDialogFlag.value = true
qrCodesPrintDialogFlag.value = true },820)
loadingInstance1.close()
} }else if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="1"){
//fieldsMap = null
tablesData.value = getDetailQrCodesData
qrCodesPrintDialogFlag.value = true
//loadingInstance1.close()
}
})/* .finally(()=>{ })
loadingInstance1.close()
qrCodesPrintDialogFlag.value = true }else{
}) */ alert("内部二维码功能未启用")
}
}else{
alert("请先为本表单开启二维码功能")
}
}else{ }else{
alert("未选中任何一条,请先选择") alert("未选中任何一条,请先选择")

Loading…
Cancel
Save