|
|
@ -65,6 +65,7 @@ const props = withDefaults( |
|
|
versionid?: string; |
|
|
versionid?: string; |
|
|
versiontitle?: string; |
|
|
versiontitle?: string; |
|
|
viewPage?: viewPageType; |
|
|
viewPage?: viewPageType; |
|
|
|
|
|
formBasicConfig?: any; |
|
|
}>(), |
|
|
}>(), |
|
|
{ |
|
|
{ |
|
|
showPage: true, |
|
|
showPage: true, |
|
|
@ -101,6 +102,9 @@ const props = withDefaults( |
|
|
viewPage: () => { |
|
|
viewPage: () => { |
|
|
return []; |
|
|
return []; |
|
|
}, |
|
|
}, |
|
|
|
|
|
formBasicConfig: () => { |
|
|
|
|
|
return {}; |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
const emits = defineEmits<{ |
|
|
const emits = defineEmits<{ |
|
|
@ -208,6 +212,36 @@ const resetFields = (formEl: FormInstance | undefined) => { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
const qrCodesPrintDialogFlag = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const qrCodesPrintDialogData = ref({}) |
|
|
|
|
|
function getDetailQrCodes(val:any) { |
|
|
|
|
|
return request({ |
|
|
|
|
|
url: "/javasys/lowCode/QrCode/getDetailQrCodes", |
|
|
|
|
|
method: "post", |
|
|
|
|
|
data: { |
|
|
|
|
|
cfid: props.formId, |
|
|
|
|
|
idArray:val, |
|
|
|
|
|
settings:props.formBasicConfig, |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function modifyFieldsMap4(fieldsMap: any): Array<{ key: string, value: string }> { |
|
|
|
|
|
let result: Array<{ key: string, value: string }> = []; |
|
|
|
|
|
// 使用 Object.entries 获取键值对数组,保留原始顺序 |
|
|
|
|
|
for (const [key, value] of Object.entries(fieldsMap)) { |
|
|
|
|
|
let parts = value.split("!@#@!"); |
|
|
|
|
|
if (parts.length === 2) { |
|
|
|
|
|
result.push({ key: parts[0], value: parts[1] }); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 如果格式不符合,可进行错误处理,这里暂时不做处理,直接使用原属性名和属性值 |
|
|
|
|
|
result.push({ key, value }); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ 作者: 秦东 |
|
|
@ 作者: 秦东 |
|
|
@ 时间: 2024-04-01 11:36:07 |
|
|
@ 时间: 2024-04-01 11:36:07 |
|
|
@ -219,8 +253,42 @@ const setUpClick = (val: string, id: string) => { |
|
|
drawerWith.value = container.value?.clientWidth; |
|
|
drawerWith.value = container.value?.clientWidth; |
|
|
openTaskDrawer.value = true; |
|
|
openTaskDrawer.value = true; |
|
|
} else if(val.key == "showQrCode"){ |
|
|
} else if(val.key == "showQrCode"){ |
|
|
//alert(val) |
|
|
//liwenxuan 20250114 二维码打印弹窗 start |
|
|
console.log(idList) |
|
|
//在此组装参数,以生成二维码图片 |
|
|
|
|
|
|
|
|
|
|
|
let idArray = state.selectionChecked.map(item => item.id); |
|
|
|
|
|
if(idArray.length>0){ |
|
|
|
|
|
//console.log(props.formBasicConfig) |
|
|
|
|
|
//请求数据 |
|
|
|
|
|
getDetailQrCodes(idArray).then(({ data }) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){ |
|
|
|
|
|
|
|
|
|
|
|
for (let key in data) { |
|
|
|
|
|
if (data.hasOwnProperty(key)) { |
|
|
|
|
|
let currentFieldsMap = data[key].fieldsMap |
|
|
|
|
|
data[key].fieldsMap = modifyFieldsMap4(currentFieldsMap) |
|
|
|
|
|
//data[key].bufferedImage = "" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
qrCodesPrintDialogData.value = data |
|
|
|
|
|
//console.log(qrCodesPrintDialogData.value) |
|
|
|
|
|
qrCodesPrintDialogFlag.value = true |
|
|
|
|
|
}else if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="1"){ |
|
|
|
|
|
//fieldsMap = null |
|
|
|
|
|
qrCodesPrintDialogFlag.value = true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
alert("未选中任何一条,请先选择") |
|
|
|
|
|
} |
|
|
|
|
|
//liwenxuan 20250114 二维码打印弹窗 end |
|
|
|
|
|
|
|
|
}else { |
|
|
}else { |
|
|
if (idList.value.length > 0) { |
|
|
if (idList.value.length > 0) { |
|
|
ElMessageBox.confirm("确认删除此数据项?删除后不可恢复!", "警告", { |
|
|
ElMessageBox.confirm("确认删除此数据项?删除后不可恢复!", "警告", { |
|
|
@ -1510,6 +1578,52 @@ const diGuiJilian = (val: any, options: any[]) => { |
|
|
:drawerwith="drawerWith" |
|
|
:drawerwith="drawerWith" |
|
|
@searchquery="getListData" |
|
|
@searchquery="getListData" |
|
|
/> |
|
|
/> |
|
|
|
|
|
<!-- 2025 liwenxuan 二维码打印 --> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
v-model="qrCodesPrintDialogFlag" |
|
|
|
|
|
class="glxxsztc" |
|
|
|
|
|
top="150px" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
title="生成的二维码" |
|
|
|
|
|
:show-close="false" |
|
|
|
|
|
style="margin-top: 70px" |
|
|
|
|
|
width="50%" |
|
|
|
|
|
> |
|
|
|
|
|
<div style="min-height: 50px; max-height: 500px; overflow-y: auto"> |
|
|
|
|
|
<div v-for="(tableData, index) in qrCodesPrintDialogData" :key="index" style="margin-bottom: 30px; width: 95%;"> |
|
|
|
|
|
<table > |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th style="font-weight: bold; font-size:medium;" colspan="2">{{tableData.groupName}}-{{qrCodesPrintDialogData[index].appName}}-{{qrCodesPrintDialogData[index].formName}}-{{ index }}</th> |
|
|
|
|
|
<th rowspan="6"><img :src="tableData.bufferedImage" alt="二维码" width="auto" height="100%"></th> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr v-for="(item, fIndex) in tableData.fieldsMap" :key="fIndex"> |
|
|
|
|
|
<th>{{ item.key }}</th> |
|
|
|
|
|
<td>{{ item.value }}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<!-- <tr> |
|
|
|
|
|
<th>规格型号</th> |
|
|
|
|
|
<td>V=500m³</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th>设备类型</th> |
|
|
|
|
|
<td>A</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th>存放位置</th> |
|
|
|
|
|
<td>空分工序</td> |
|
|
|
|
|
</tr> --> |
|
|
|
|
|
</table> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- {{qrCodesPrintDialogData}} --> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click="qrCodesPrintDialogFlag = false"> |
|
|
|
|
|
确定 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<el-dialog |
|
|
<el-dialog |
|
|
v-model="asfShowDetailsFlag" |
|
|
v-model="asfShowDetailsFlag" |
|
|
@ -1591,4 +1705,16 @@ const diGuiJilian = (val: any, options: any[]) => { |
|
|
.demo-image__error .image-slot .el-icon { |
|
|
.demo-image__error .image-slot .el-icon { |
|
|
font-size: 30px; |
|
|
font-size: 30px; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
|
|
|
|
|
|
table { |
|
|
|
|
|
border-collapse: collapse; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
td, th { |
|
|
|
|
|
border: 1px solid black; |
|
|
|
|
|
padding: 8px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style> |