From 57faef7304f71b52d5cc3c71f4d8e8936e146cad Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Thu, 9 Jan 2025 15:54:54 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=89=AB=E7=A0=81=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/DesignForm/tableButton.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/DesignForm/tableButton.ts b/src/api/DesignForm/tableButton.ts index 1b67385..950c26f 100644 --- a/src/api/DesignForm/tableButton.ts +++ b/src/api/DesignForm/tableButton.ts @@ -41,7 +41,7 @@ export const tableButtonList :attrButton[] = [ icon: "delete" }, { - label: "显示二维码", + label: "生成二维码", key: "showQrCode", type: "primary", size: "small", From 4d5b82255608219e0306825c527e2da902765fa3 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Mon, 13 Jan 2025 15:06:03 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=89=93=E5=8D=B0=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/DesignForm/types.ts | 2 + .../DesignForm/formControlPropertiNew.vue | 69 +++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/src/api/DesignForm/types.ts b/src/api/DesignForm/types.ts index 9a5d84a..c3aecee 100644 --- a/src/api/DesignForm/types.ts +++ b/src/api/DesignForm/types.ts @@ -110,6 +110,8 @@ export interface formData{ qrCodeFlag: boolean, qrCodeInside:boolean, qrCodeOutside:boolean, + qrCodePrintStyle:any, + qrCodeShowFields:any, }; config: any; events?:any; diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index 882d83e..bbaaaea 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -2151,6 +2151,19 @@ function getQrCodeImgInside() { }, }); } +/* const qrCodeOutPrintConfigFlag = ref(false) +function showQrCodeOutPrintConfig(){ + qrCodeOutPrintConfigFlag.value = true +} */ +function handleMaxSelect(){ + console.log(formData.value.qrCodeShowFields.length) + if(formData.value.qrCodeShowFields.length>5){ + alert("最多可选择5个字段") + } + while (formData.value.qrCodeShowFields.length > 5) { + formData.value.qrCodeShowFields.pop(); + } +} //liwenxuan20250103 qrCode end //liwenxuan20240403 associatedForms start import AssociatedFormsTinyace from "@/widget/associatedforms/associatedFormsTinyace.vue"; @@ -4624,6 +4637,39 @@ const radioChangeSet = (val: any) => { 查看外部二维码图片 + + + + + + 图片 + 表格卡片 + + + + + + + + 表单整体布局 @@ -4997,6 +5043,29 @@ const radioChangeSet = (val: any) => { + + From 6fd0640423189b4594b3fb56dba69ad957737d2c Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Thu, 16 Jan 2025 14:56:54 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E9=A1=B5=E8=A1=A8=E6=A0=BC=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignForm/formControlPropertiNew.vue | 10 +- .../DesignForm/tableListPage/index.vue | 132 +++++++++++++++++- .../appPage/appPageForm/openAppFormPage.vue | 1 + 3 files changed, 136 insertions(+), 7 deletions(-) diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index bbaaaea..930bb6d 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -2156,11 +2156,11 @@ function showQrCodeOutPrintConfig(){ qrCodeOutPrintConfigFlag.value = true } */ function handleMaxSelect(){ - console.log(formData.value.qrCodeShowFields.length) + //console.log(formData.value.qrCodeShowFields.length) if(formData.value.qrCodeShowFields.length>5){ alert("最多可选择5个字段") } - while (formData.value.qrCodeShowFields.length > 5) { + while (formData.value.qrCodeShowFields.length > 5) {// formData.value.qrCodeShowFields.pop(); } } @@ -2175,7 +2175,7 @@ const treeDefaultProps = {// children: "children", label: "label", }; -//拿到子组件AssociatedFormsTinyace的实例 +//拿到子组件AssociatedFormsTinyace的实例 const aft = ref(); const aftRange = ref(); @@ -2406,6 +2406,7 @@ let currentFormChildTableFieldsForFillRole = ref(); let associatedFormsCurrentFormFieldTree = ref(); let associatedFormsCurrentFormFieldTree1 = ref(); let associatedFormsCurrentFormFieldTreeNoTable = ref(); +let associatedFormsCurrentFormFieldTreeNoTable1 = ref<[]>(); let associatedFormsCurrentFormFieldTreeForGlxxsz = ref(); let associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref(); let resDataForGlxxszExceptself: any[] = []; @@ -2480,6 +2481,7 @@ function getAssociatedFormsCurrentFieldTree1() { treeAttrs: data.treeAttrs, }, ]; + associatedFormsCurrentFormFieldTreeNoTable1.value = [...resDataNoTable] let resDataForGlxxsz = ref(data.children.slice(8)); @@ -4663,7 +4665,7 @@ const radioChangeSet = (val: any) => { > (), { showPage: true, @@ -101,6 +102,9 @@ const props = withDefaults( viewPage: () => { return []; }, + formBasicConfig: () => { + return {}; + }, } ); 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 @@ -219,8 +253,42 @@ const setUpClick = (val: string, id: string) => { drawerWith.value = container.value?.clientWidth; openTaskDrawer.value = true; } else if(val.key == "showQrCode"){ - //alert(val) - console.log(idList) + //liwenxuan 20250114 二维码打印弹窗 start + //在此组装参数,以生成二维码图片 + + 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 { if (idList.value.length > 0) { ElMessageBox.confirm("确认删除此数据项?删除后不可恢复!", "警告", { @@ -1510,6 +1578,52 @@ const diGuiJilian = (val: any, options: any[]) => { :drawerwith="drawerWith" @searchquery="getListData" /> + + +
+
+ + + + + + + + + + +
{{tableData.groupName}}-{{qrCodesPrintDialogData[index].appName}}-{{qrCodesPrintDialogData[index].formName}}-{{ index }}二维码
{{ item.key }}{{ item.value }}
+
+
+ + +
{ .demo-image__error .image-slot .el-icon { font-size: 30px; } - + +table { + border-collapse: collapse; + width: 100%; + } + + td, th { + border: 1px solid black; + padding: 8px; + } + + + \ No newline at end of file diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue index dbac92e..7194dcc 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue @@ -483,6 +483,7 @@ defineExpose({ :versiontitle="versionTitle" v-model:look-page-is-show="lookPageIsShow" :viewPage="stateList.view" + :form-basic-config="stateForm.formData.form" @optionsValue5Get5="optionsValue5Get5" /> Date: Thu, 16 Jan 2025 15:10:06 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E9=A1=B5=E8=A1=A8=E6=A0=BC=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignForm/tableListPage/index.vue | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/src/components/DesignForm/tableListPage/index.vue b/src/components/DesignForm/tableListPage/index.vue index a9f4b79..d6c5ecc 100644 --- a/src/components/DesignForm/tableListPage/index.vue +++ b/src/components/DesignForm/tableListPage/index.vue @@ -1590,7 +1590,7 @@ const diGuiJilian = (val: any, options: any[]) => { width="50%" >
-
+
@@ -1600,25 +1600,13 @@ const diGuiJilian = (val: any, options: any[]) => { - -
{{tableData.groupName}}-{{qrCodesPrintDialogData[index].appName}}-{{qrCodesPrintDialogData[index].formName}}-{{ index }}{{ item.key }} {{ item.value }}
+ +
-
-