From e70628b88cc56331d1346d6bd512b2b74349a2a6 Mon Sep 17 00:00:00 2001
From: liwenxuan <1298531568@qq.com>
Date: Wed, 5 Feb 2025 09:38:30 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=9C=AA?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=BA=8C=E7=BB=B4=E7=A0=81=E8=A1=A8=E5=8D=95?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5=E6=97=B6=E8=AF=B7=E6=B1=82?=
=?UTF-8?q?=E5=BC=82=E5=B8=B8bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/DesignForm/app/index.vue | 316 +++++++++---------
.../DesignForm/tableListPage/index.vue | 316 +++++++++---------
2 files changed, 327 insertions(+), 305 deletions(-)
diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue
index 507bf98..1ce7ded 100644
--- a/src/components/DesignForm/app/index.vue
+++ b/src/components/DesignForm/app/index.vue
@@ -472,179 +472,189 @@ const setUpClick = (val: string, id: string) => {
//在此组装参数,以生成二维码图片
let idArray = state.selectionChecked.map(item => item.id);
if(idArray.length>0){
- const loadingInstance1 = ElLoading.service({
+ /* const loadingInstance1 = ElLoading.service({
fullscreen: true,
text: '正在生成二维码,请稍候...' // 添加的文字内容,可根据需要修改
- });
- //console.log(props.formBasicConfig)
- //请求数据
- let getDetailQrCodesData: any = {}
- let currentFieldsMapArrObj: any = {}
- getDetailQrCodes(idArray).then(({ data }) => {
- getDetailQrCodesData = JSON.parse(JSON.stringify(data));
- if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){
- let asfQueryParams1: any[] = [];
- for (let key in getDetailQrCodesData) {
- currentFieldsMapArrObj[key] = getDetailQrCodesData[key]
- if (getDetailQrCodesData.hasOwnProperty(key)) {
- let currentFieldsMap = getDetailQrCodesData[key].fieldsMap
- //console.log(currentFieldsMap)
- // 遍历对象的属性
- for (let attr_name in currentFieldsMap) {
- if (currentFieldsMap.hasOwnProperty(attr_name)) {
- //console.log("attr_name------"+attr_name)
- //console.log(`属性名: ${attr_name}, 属性值: ${currentFieldsMap[attr_name]}`);
- 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
+ }); */
+ console.log(props.formBasicConfig)
+ if(props.formBasicConfig.qrCodeFlag==true){
+ if(props.formBasicConfig.qrCodeInside==true){
+ if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"&&props.formBasicConfig.qrCodeShowFields.length==0){
+ alert("未选择表格展示字段")
+ return
+ }
+ //请求数据
+ let getDetailQrCodesData: any = {}
+ let currentFieldsMapArrObj: any = {}
+ getDetailQrCodes(idArray).then(({ data }) => {
+ getDetailQrCodesData = JSON.parse(JSON.stringify(data));
+ if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){
+ let asfQueryParams1: any[] = [];
+ for (let key in getDetailQrCodesData) {
+ currentFieldsMapArrObj[key] = getDetailQrCodesData[key]
+ if (getDetailQrCodesData.hasOwnProperty(key)) {
+ let currentFieldsMap = getDetailQrCodesData[key].fieldsMap
+ //console.log(currentFieldsMap)
+ // 遍历对象的属性
+ for (let attr_name in currentFieldsMap) {
+ if (currentFieldsMap.hasOwnProperty(attr_name)) {
+ //console.log("attr_name------"+attr_name)
+ //console.log(`属性名: ${attr_name}, 属性值: ${currentFieldsMap[attr_name]}`);
+ 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) {
- 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
+ });
+ selects.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]+"!@#@!"+""
}
- }
- });
- switchs.forEach(function(element) {
- if(attr_name==element.name){
- //表格属性中存在此单选,将其value根据options替换为可读值
- let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
- if(toConvertValue=="0"){
- currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用"
- }else{
- currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用"
+ });
+ switchs.forEach(function(element) {
+ if(attr_name==element.name){
+ //表格属性中存在此单选,将其value根据options替换为可读值
+ let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
+ if(toConvertValue=="0"){
+ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用"
+ }else{
+ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用"
+ }
+ }
+ });
+ checkboxs.forEach(function(element) {
+ if(attr_name==element.name){
+ //表格属性中存在此单选,将其value根据options替换为可读值
+ 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
+ }
}
- }
- });
- checkboxs.forEach(function(element) {
- if(attr_name==element.name){
- //表格属性中存在此单选,将其value根据options替换为可读值
+ });
+ asfs.forEach(function(element) {
+ if(attr_name==element.name){
+ //表格属性中存在此关联表单,将其value根据options替换为可读值
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+","
- }
- });
+ 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++
+ }
});
- toAddStr = toAddStr.slice(0, -1)
- currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+toAddStr
- }
- }
- });
- asfs.forEach(function(element) {
- if(attr_name==element.name){
- //表格属性中存在此关联表单,将其value根据options替换为可读值
- let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
- 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){
+ 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 = {};
asfMasterAndAsfId1.asfId = toConvertValue+"";
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(()=>{
+ //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()
}
+
})
-
-
-
- setTimeout(()=>{
- tablesData.value = getDetailQrCodesData
- },810)
-
-
-
- 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()
+ }else{
+ alert("内部二维码功能未启用")
}
-
- })/* .finally(()=>{
- loadingInstance1.close()
- qrCodesPrintDialogFlag.value = true
- }) */
+ }else{
+ alert("请先为本表单开启二维码功能")
+ }
+
}else{
alert("未选中任何一条,请先选择")
diff --git a/src/components/DesignForm/tableListPage/index.vue b/src/components/DesignForm/tableListPage/index.vue
index c734382..7e6caf2 100644
--- a/src/components/DesignForm/tableListPage/index.vue
+++ b/src/components/DesignForm/tableListPage/index.vue
@@ -462,179 +462,191 @@ const setUpClick = (val: string, id: string) => {
//在此组装参数,以生成二维码图片
let idArray = state.selectionChecked.map(item => item.id);
if(idArray.length>0){
- const loadingInstance1 = ElLoading.service({
+ /* const loadingInstance1 = ElLoading.service({
fullscreen: true,
text: '正在生成二维码,请稍候...' // 添加的文字内容,可根据需要修改
- });
- //console.log(props.formBasicConfig)
- //请求数据
- let getDetailQrCodesData: any = {}
- let currentFieldsMapArrObj: any = {}
- getDetailQrCodes(idArray).then(({ data }) => {
- getDetailQrCodesData = JSON.parse(JSON.stringify(data));
- if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){
- let asfQueryParams1: any[] = [];
- for (let key in getDetailQrCodesData) {
- currentFieldsMapArrObj[key] = getDetailQrCodesData[key]
- if (getDetailQrCodesData.hasOwnProperty(key)) {
- let currentFieldsMap = getDetailQrCodesData[key].fieldsMap
- //console.log(currentFieldsMap)
- // 遍历对象的属性
- for (let attr_name in currentFieldsMap) {
- if (currentFieldsMap.hasOwnProperty(attr_name)) {
- //console.log("attr_name------"+attr_name)
- //console.log(`属性名: ${attr_name}, 属性值: ${currentFieldsMap[attr_name]}`);
- 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
+ }); */
+ console.log(props.formBasicConfig)
+
+ if(props.formBasicConfig.qrCodeFlag==true){
+ if(props.formBasicConfig.qrCodeInside==true){
+ if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"&&props.formBasicConfig.qrCodeShowFields.length==0){
+ alert("未选择表格展示字段")
+ return
+ }
+
+ //请求数据
+ let getDetailQrCodesData: any = {}
+ let currentFieldsMapArrObj: any = {}
+ getDetailQrCodes(idArray).then(({ data }) => {
+ getDetailQrCodesData = JSON.parse(JSON.stringify(data));
+ if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"){
+ let asfQueryParams1: any[] = [];
+ for (let key in getDetailQrCodesData) {
+ currentFieldsMapArrObj[key] = getDetailQrCodesData[key]
+ if (getDetailQrCodesData.hasOwnProperty(key)) {
+ let currentFieldsMap = getDetailQrCodesData[key].fieldsMap
+ //console.log(currentFieldsMap)
+ // 遍历对象的属性
+ for (let attr_name in currentFieldsMap) {
+ if (currentFieldsMap.hasOwnProperty(attr_name)) {
+ //console.log("attr_name------"+attr_name)
+ //console.log(`属性名: ${attr_name}, 属性值: ${currentFieldsMap[attr_name]}`);
+ 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) {
- 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
+ });
+ selects.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]+"!@#@!"+""
}
- }
- });
- switchs.forEach(function(element) {
- if(attr_name==element.name){
- //表格属性中存在此单选,将其value根据options替换为可读值
- let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
- if(toConvertValue=="0"){
- currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用"
- }else{
- currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用"
+ });
+ switchs.forEach(function(element) {
+ if(attr_name==element.name){
+ //表格属性中存在此单选,将其value根据options替换为可读值
+ let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
+ if(toConvertValue=="0"){
+ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"禁用"
+ }else{
+ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+"启用"
+ }
}
- }
- });
- checkboxs.forEach(function(element) {
- if(attr_name==element.name){
- //表格属性中存在此单选,将其value根据options替换为可读值
+ });
+ checkboxs.forEach(function(element) {
+ if(attr_name==element.name){
+ //表格属性中存在此单选,将其value根据options替换为可读值
+ 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){
+ //表格属性中存在此关联表单,将其value根据options替换为可读值
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+","
- }
- });
+ 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++
+ }
});
- toAddStr = toAddStr.slice(0, -1)
- currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+toAddStr
- }
- }
- });
- asfs.forEach(function(element) {
- if(attr_name==element.name){
- //表格属性中存在此关联表单,将其value根据options替换为可读值
- let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
- 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){
+ 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 = {};
asfMasterAndAsfId1.asfId = toConvertValue+"";
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(()=>{
+ //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()
}
+
})
-
-
- setTimeout(()=>{
- tablesData.value = getDetailQrCodesData
- },810)
-
-
-
- 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()
+ }else{
+ alert("内部二维码功能未启用")
}
-
- })/* .finally(()=>{
- loadingInstance1.close()
- qrCodesPrintDialogFlag.value = true
- }) */
+ }else{
+ alert("请先为本表单开启二维码功能")
+ }
}else{
alert("未选中任何一条,请先选择")
From f7e2c64e43029cf1c2c1e8836d27b4b9d328f468 Mon Sep 17 00:00:00 2001
From: liwenxuan <1298531568@qq.com>
Date: Wed, 5 Feb 2025 14:37:35 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E8=A1=A8?=
=?UTF-8?q?=E6=A0=BC=E7=BB=84=E7=BB=87=E9=83=A8=E9=97=A8=E5=90=8D=E7=A7=B0?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/DesignForm/app/index.vue | 69 +++++++++++++--
.../DesignForm/tableListPage/index.vue | 84 +++++++++++++++++--
.../appPage/appPageForm/openAppFormPage.vue | 50 ++++++++++-
.../lowcodepage/runApp/runAppForm.vue | 35 ++++++++
4 files changed, 223 insertions(+), 15 deletions(-)
diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue
index 1ce7ded..c712391 100644
--- a/src/components/DesignForm/app/index.vue
+++ b/src/components/DesignForm/app/index.vue
@@ -74,6 +74,7 @@ const props = withDefaults(
viewPage?: viewPageType;
formBasicConfig?: any;
fieldsDetailList?:any;
+ orgAndManTree?:any;
}>(),
{
showPage: true,
@@ -119,6 +120,9 @@ const props = withDefaults(
fieldsDetailList: () => {
return {};
},
+ orgAndManTree: () => {
+ return {};
+ },
}
);
const emits = defineEmits<{
@@ -321,6 +325,7 @@ let checkboxs: any[] = [];
let switchs: any[] = [];
let selects: any[] = [];
let tables: any[] = [];
+let dofs: any[] = [];//deptOrgAndOrgCententAndFounderArr
function getAsfs() {
//setTimeout(() => {
let dataList = ref({});
@@ -337,7 +342,9 @@ function getAsfs() {
switchs.push(dataList.value[i])
} else if(dataList.value[i].type == "select"){
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 == "flex" ||
dataList.value[i].type == "div" ||
@@ -358,6 +365,8 @@ function getAsfs() {
switchs.push(element)
}else if(element.type == "select"){
selects.push(element)
+ }else if(element.type == "deptOrg"||element.type == "orgCentent"||element.type == "founder"){
+ dofs.push(element)
}
});
} else if (dataList.value[i].type == "grid") {
@@ -378,6 +387,8 @@ function getAsfs() {
switchs.push(a)
}else if(a.type == "select"){
selects.push(a)
+ }else if(a.type == "deptOrg"||a.type == "orgCentent"||a.type == "founder"){
+ dofs.push(a)
}
}
}
@@ -400,6 +411,8 @@ function getAsfs() {
switchs.push(a)
}else if(a.type == "select"){
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") {
if (a.type == "table") {
tables.push(dataList.value[i]);
@@ -419,6 +432,8 @@ function getAsfs() {
switchs.push(q)
}else if(q.type == "select"){
selects.push(q)
+ }else if(q.type == "deptOrg"||q.type == "orgCentent"||q.type == "founder"){
+ dofs.push(q)
}
}
}
@@ -448,6 +463,36 @@ function convertStringToArray(str: string) {
let parts = str.split(',');
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);
+}
+
//liwenxuan 20250120 二维码 end
@@ -472,11 +517,11 @@ const setUpClick = (val: string, id: string) => {
//在此组装参数,以生成二维码图片
let idArray = state.selectionChecked.map(item => item.id);
if(idArray.length>0){
- /* const loadingInstance1 = ElLoading.service({
+ const loadingInstance1 = ElLoading.service({
fullscreen: true,
text: '正在生成二维码,请稍候...' // 添加的文字内容,可根据需要修改
- }); */
- console.log(props.formBasicConfig)
+ });
+ //console.log(props.formBasicConfig)
if(props.formBasicConfig.qrCodeFlag==true){
if(props.formBasicConfig.qrCodeInside==true){
if(props.formBasicConfig.qrCodePrintStyle&&props.formBasicConfig.qrCodePrintStyle=="2"&&props.formBasicConfig.qrCodeShowFields.length==0){
@@ -532,6 +577,15 @@ const setUpClick = (val: string, id: string) => {
}
}
});
+ //console.log(dofs)
+ dofs.forEach(function(element) {
+ if(attr_name==element.name){
+ //表格属性中存在此单选,将其value根据options替换为可读值
+ let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
+ let orgName = getLabelById(toConvertValue)
+ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+orgName
+ }
+ });
switchs.forEach(function(element) {
if(attr_name==element.name){
//表格属性中存在此单选,将其value根据options替换为可读值
@@ -636,7 +690,7 @@ const setUpClick = (val: string, id: string) => {
setTimeout(()=>{
- //loadingInstance1.close()
+ loadingInstance1.close()
qrCodesPrintDialogFlag.value = true
},820)
@@ -644,9 +698,11 @@ const setUpClick = (val: string, id: string) => {
//fieldsMap = null
tablesData.value = getDetailQrCodesData
qrCodesPrintDialogFlag.value = true
- //loadingInstance1.close()
+ loadingInstance1.close()
}
+ }).finally(()=>{
+ loadingInstance1.close()
})
}else{
alert("内部二维码功能未启用")
@@ -899,6 +955,7 @@ const getPageData = () => {
switchs = [];
selects = [];
tables = [];
+ dofs = [];
getAsfs()
});
}
diff --git a/src/components/DesignForm/tableListPage/index.vue b/src/components/DesignForm/tableListPage/index.vue
index 7e6caf2..f51cecf 100644
--- a/src/components/DesignForm/tableListPage/index.vue
+++ b/src/components/DesignForm/tableListPage/index.vue
@@ -70,6 +70,7 @@ const props = withDefaults(
viewPage?: viewPageType;
formBasicConfig?: any;
fieldsDetailList?:any;
+ orgAndManTree?:any;
}>(),
{
showPage: true,
@@ -112,6 +113,9 @@ const props = withDefaults(
fieldsDetailList: () => {
return {};
},
+ orgAndManTree: () => {
+ return {};
+ },
}
);
const emits = defineEmits<{
@@ -314,6 +318,8 @@ let checkboxs: any[] = [];
let switchs: any[] = [];
let selects: any[] = [];
let tables: any[] = [];
+let dofs: any[] = [];//deptOrgAndOrgCententAndFounderArr
+
function getAsfs() {
//setTimeout(() => {
let dataList = ref({});
@@ -330,7 +336,9 @@ function getAsfs() {
switchs.push(dataList.value[i])
} else if(dataList.value[i].type == "select"){
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 == "flex" ||
dataList.value[i].type == "div" ||
@@ -351,6 +359,8 @@ function getAsfs() {
switchs.push(element)
}else if(element.type == "select"){
selects.push(element)
+ }else if(element.type == "deptOrg"||element.type == "orgCentent"||element.type == "founder"){
+ dofs.push(element)
}
});
} else if (dataList.value[i].type == "grid") {
@@ -371,6 +381,8 @@ function getAsfs() {
switchs.push(a)
}else if(a.type == "select"){
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)
}else if(a.type == "select"){
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") {
if (a.type == "table") {
tables.push(dataList.value[i]);
@@ -412,6 +426,8 @@ function getAsfs() {
switchs.push(q)
}else if(q.type == "select"){
selects.push(q)
+ }else if(q.type == "deptOrg"||q.type == "orgCentent"||q.type == "founder"){
+ dofs.push(q)
}
}
}
@@ -425,7 +441,6 @@ function getAsfs() {
//}, 500);
}
-
function convertStringToArray(str: string) {
if (typeof str!== 'string') {
throw new Error('Input must be a string.');
@@ -442,6 +457,45 @@ function convertStringToArray(str: string) {
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
@@ -462,11 +516,11 @@ const setUpClick = (val: string, id: string) => {
//在此组装参数,以生成二维码图片
let idArray = state.selectionChecked.map(item => item.id);
if(idArray.length>0){
- /* const loadingInstance1 = ElLoading.service({
+ const loadingInstance1 = ElLoading.service({
fullscreen: true,
text: '正在生成二维码,请稍候...' // 添加的文字内容,可根据需要修改
- }); */
- console.log(props.formBasicConfig)
+ });
+ //console.log(props.formBasicConfig)
if(props.formBasicConfig.qrCodeFlag==true){
if(props.formBasicConfig.qrCodeInside==true){
@@ -524,6 +578,20 @@ const setUpClick = (val: string, id: string) => {
}
}
});
+ //console.log(dofs)
+ dofs.forEach(function(element) {
+ if(attr_name==element.name){
+ //表格属性中存在此单选,将其value根据options替换为可读值
+ let toConvertValue = currentFieldsMap[attr_name].split("!@#@!")[1]
+ //console.log(toConvertValue)
+ if(isAllCharactersNumbers(toConvertValue)){
+ let orgName = getLabelById(toConvertValue)
+ currentFieldsMap[attr_name] = currentFieldsMap[attr_name].split("!@#@!")[0]+"!@#@!"+orgName
+ }
+
+
+ }
+ });
switchs.forEach(function(element) {
if(attr_name==element.name){
//表格属性中存在此单选,将其value根据options替换为可读值
@@ -628,7 +696,7 @@ const setUpClick = (val: string, id: string) => {
setTimeout(()=>{
- //loadingInstance1.close()
+ loadingInstance1.close()
qrCodesPrintDialogFlag.value = true
},820)
@@ -636,9 +704,11 @@ const setUpClick = (val: string, id: string) => {
//fieldsMap = null
tablesData.value = getDetailQrCodesData
qrCodesPrintDialogFlag.value = true
- //loadingInstance1.close()
+ loadingInstance1.close()
}
+ }).finally(()=>{
+ loadingInstance1.close()
})
}else{
diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue
index aaf993a..1dce546 100644
--- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue
+++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue
@@ -5,6 +5,7 @@
-->
@@ -357,6 +391,7 @@ function optionsValue3Get3(data: any, fieldName: string) {
:viewPage="stateList.view"
:form-basic-config="stateForm.formData.form"
:fields-detail-list="stateForm.formData.list"
+ :org-and-man-tree = "orgAndManTree"
/>
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
From 3d47e522f43afbf97f7a41b81e62d6d617664457 Mon Sep 17 00:00:00 2001
From: liwenxuan <1298531568@qq.com>
Date: Thu, 6 Feb 2025 11:06:44 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E8=A1=A8?=
=?UTF-8?q?=E6=A0=BC=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/DesignForm/app/index.vue | 11 +++++++----
src/components/DesignForm/tableListPage/index.vue | 11 +++++++----
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue
index c712391..70c1f26 100644
--- a/src/components/DesignForm/app/index.vue
+++ b/src/components/DesignForm/app/index.vue
@@ -2007,9 +2007,9 @@ const transformOption = (val: string | number, type?: string) => {
title="生成的二维码"
:show-close="false"
style="margin-top: 10px"
- width="50%"
+ width="40%"
>
-
+
{
>
- | {{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }} |
- ![二维码]() |
+ {{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }} |
+ ![二维码]() |
| {{ item.key }} |
@@ -2132,10 +2132,13 @@ const transformOption = (val: string | number, type?: string) => {
table {
border-collapse: collapse;
width: 100%;
+ font-size: 13px;
+ text-align: center
}
td, th {
border: 1px solid black;
padding: 8px;
+
}
diff --git a/src/components/DesignForm/tableListPage/index.vue b/src/components/DesignForm/tableListPage/index.vue
index f51cecf..65dc16f 100644
--- a/src/components/DesignForm/tableListPage/index.vue
+++ b/src/components/DesignForm/tableListPage/index.vue
@@ -2034,9 +2034,9 @@ const diGuiJilian = (val: any, options: any[]) => {
title="生成的二维码"
:show-close="false"
style="margin-top: 10px"
- width="50%"
+ width="40%"
>
-
+
{
>
- | {{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }} |
- ![二维码]() |
+ {{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }} |
+ ![二维码]() |
| {{ item.key }} |
@@ -2169,11 +2169,14 @@ const diGuiJilian = (val: any, options: any[]) => {
table {
border-collapse: collapse;
width: 100%;
+ font-size: 13px;
+ text-align: center
}
td, th {
border: 1px solid black;
padding: 8px;
+
}
\ No newline at end of file
From 1004264ebd5d2667efe12f8d8638dbada94423ee Mon Sep 17 00:00:00 2001
From: liwenxuan <1298531568@qq.com>
Date: Thu, 6 Feb 2025 16:11:48 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E5=8D=95=E8=A1=8C=E6=96=87=E6=9C=AC?=
=?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=89=AB=E6=8F=8F=E8=BE=93=E5=85=A5?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=BC=80=E5=85=B3=E5=8F=8A=E6=96=B9=E5=BC=8F?=
=?UTF-8?q?=E9=80=89=E6=8B=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/DesignForm/assembly/index.ts | 4 +-
.../DesignForm/formControlPropertiNew.vue | 51 +++++++++++++++++++
2 files changed, 54 insertions(+), 1 deletion(-)
diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts
index a5d0618..38bdf76 100644
--- a/src/components/DesignForm/assembly/index.ts
+++ b/src/components/DesignForm/assembly/index.ts
@@ -217,7 +217,9 @@ export default [
iconFont: 'fa-text-width',
control: {
// 组件所有属性
- modelValue: ''
+ modelValue: '',
+ scanInputFlag: false,
+ scanType:'',
},
config: {}, // 其他配置信息
styles: {
diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue
index 9d8aab2..e372ecd 100644
--- a/src/components/DesignForm/formControlPropertiNew.vue
+++ b/src/components/DesignForm/formControlPropertiNew.vue
@@ -527,6 +527,7 @@ const attrList = computed(() => {
path: "config.append",
vShow: ["input", "password", "digitpage"],
},
+
// {
// label: '状态打开时的值',
// value: control.activeValue,
@@ -733,6 +734,14 @@ const attrList = computed(() => {
vIf: state.isSearch,
vShow: ["associatedForms"],
},
+ {
+ label: "移动端扫描输入",
+ value: config.scanInput,
+ path: "config.scanInput",
+ type: "input",
+ vIf: state.isSearch,
+ vShow: ["input"],
+ },
{
label: "隐藏条件",
value: config.associatedForms,
@@ -3351,6 +3360,19 @@ const gainFormGroupList = () => {
}
});
};
+//liwenxuan 2025 移动端单选扫描输入功能 start
+const scanTypes = [
+ {
+ value: 'QrCode',
+ label: '二维码',
+ },
+ {
+ value: 'OCR',
+ label: '光学字符识别',
+ },
+]
+//liwenxuan 2025 移动端单选扫描输入功能 end
+
let asfs: any[] = [];
let asfsExpectCurrent: any[] = [];
@@ -4207,6 +4229,35 @@ const updataBase = (val: any) => {
>
+
+
+
+
+
+
Date: Fri, 14 Feb 2025 11:46:05 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E8=A1=A8?=
=?UTF-8?q?=E6=A0=BC=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/DesignForm/app/index.vue | 4 ++--
src/components/DesignForm/tableListPage/index.vue | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue
index 70c1f26..19d1b6e 100644
--- a/src/components/DesignForm/app/index.vue
+++ b/src/components/DesignForm/app/index.vue
@@ -2020,7 +2020,7 @@ const transformOption = (val: string | number, type?: string) => {
| {{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }} |
- ![二维码]() |
+ ![二维码]() |
| {{ item.key }} |
@@ -2139,6 +2139,6 @@ table {
td, th {
border: 1px solid black;
padding: 8px;
-
+ vertical-align: middle; /* 设置文字上下居中 */
}
diff --git a/src/components/DesignForm/tableListPage/index.vue b/src/components/DesignForm/tableListPage/index.vue
index 65dc16f..45167aa 100644
--- a/src/components/DesignForm/tableListPage/index.vue
+++ b/src/components/DesignForm/tableListPage/index.vue
@@ -2047,7 +2047,7 @@ const diGuiJilian = (val: any, options: any[]) => {
| {{ tablesData[tableKey].appName }}-{{ tablesData[tableKey].formName }} |
- ![二维码]() |
+ ![二维码]() |
| {{ item.key }} |
@@ -2170,13 +2170,14 @@ table {
border-collapse: collapse;
width: 100%;
font-size: 13px;
- text-align: center
+ text-align: center;
+
}
td, th {
border: 1px solid black;
padding: 8px;
-
+ vertical-align: middle; /* 设置文字上下居中 */
}
\ No newline at end of file