diff --git a/src/api/DesignForm/requestapi.ts b/src/api/DesignForm/requestapi.ts index 45f5996..00de49b 100644 --- a/src/api/DesignForm/requestapi.ts +++ b/src/api/DesignForm/requestapi.ts @@ -589,3 +589,11 @@ export function setOftenApp(data: any) { data: data }); } +//获取表单地图翻页数据 +export function gainFormPageMapCont(data: any) { + return request({ + url: '/systemapi/customer_form/gainFormPageMapCont', + method: 'post', + data: data + }); +} diff --git a/src/components/DesignForm/app/calendar/calendar1/calendarItem.vue b/src/components/DesignForm/app/calendar/calendar1/calendarItem.vue index ee9db95..c9ae8c6 100644 --- a/src/components/DesignForm/app/calendar/calendar1/calendarItem.vue +++ b/src/components/DesignForm/app/calendar/calendar1/calendarItem.vue @@ -17,6 +17,12 @@ const props = defineProps({ drawerWith:{ type:Number, default:0 + }, + viewSetup:{ + type:Object, + default(){ + return {} + } } }); @@ -52,6 +58,43 @@ const lookPageInfo = (val:any) => { pageInfoCont.value = val lookPageInfoIsShow.value = true; } + +/** +@ 作者: 秦东 +@ 时间: 2024-07-25 08:30:49 +@ 功能: 判断是否有标题 +*/ +const writeListTitle = (val:any) => { + var titleAry = []; + let firstWord = "" + if(props.viewSetup.form && props.viewSetup.form.title){ + if(props.viewSetup.form.title.length > 0){ + props.viewSetup.form.title.forEach((item,index)=>{ + // console.log("判断是否有标题--"+index+"-->",val[item]) + if(val[item]){ + titleAry.push(val[item]) + } + }) + } + } + if(titleAry.length > 0){ + return titleAry.join() + }else{ + let powerAry = ["id","creater_time","edit_time","masters_key","states","flow_id"]; + for (let key in val) { + if (val.hasOwnProperty(key)) { + if(!powerAry.includes(key)){ + if(val[key] != '' && val[key] != null){ + firstWord = val[key] + } + } + } + } + return firstWord + } + +} + diff --git a/src/components/DesignForm/app/calendar/calendar1/dayPage.vue b/src/components/DesignForm/app/calendar/calendar1/dayPage.vue index 20d6223..5445a69 100644 --- a/src/components/DesignForm/app/calendar/calendar1/dayPage.vue +++ b/src/components/DesignForm/app/calendar/calendar1/dayPage.vue @@ -27,6 +27,12 @@ const props = defineProps({ drawerWith:{ type:Number, default:0 + }, + viewSetup:{ + type:Object, + default(){ + return {} + } } }); @@ -117,6 +123,7 @@ defineExpose({ diff --git a/src/components/DesignForm/app/calendar/calendar1/monthPage.vue b/src/components/DesignForm/app/calendar/calendar1/monthPage.vue index eaeb40d..cec6012 100644 --- a/src/components/DesignForm/app/calendar/calendar1/monthPage.vue +++ b/src/components/DesignForm/app/calendar/calendar1/monthPage.vue @@ -30,6 +30,12 @@ const props = defineProps({ drawerWith:{ type:Number, default:0 + }, + viewSetup:{ + type:Object, + default(){ + return {} + } } }); const TBody = ref([]) @@ -126,6 +132,7 @@ defineExpose({ :col="col" :time="selectedTime" :drawer-with="props.drawerWith" + :view-setup="props.viewSetup" @changeTargetDate="changeDate" > diff --git a/src/components/DesignForm/app/calendar/calendar1/weekPage.vue b/src/components/DesignForm/app/calendar/calendar1/weekPage.vue index b276b95..d11bdd1 100644 --- a/src/components/DesignForm/app/calendar/calendar1/weekPage.vue +++ b/src/components/DesignForm/app/calendar/calendar1/weekPage.vue @@ -27,6 +27,12 @@ const props = defineProps({ drawerWith:{ type:Number, default:0 + }, + viewSetup:{ + type:Object, + default(){ + return {} + } } }); @@ -120,6 +126,7 @@ defineExpose({ diff --git a/src/components/DesignForm/app/cardPage.vue b/src/components/DesignForm/app/cardPage.vue index 3fc285b..ff9dcfb 100644 --- a/src/components/DesignForm/app/cardPage.vue +++ b/src/components/DesignForm/app/cardPage.vue @@ -176,6 +176,34 @@ const imgSrcAry = (val:any) => { */ const cardInfo = (val:any,cla:string) => { if(cla=="title"){ + if(props.viewSetup.form.title){ + var titleAry = []; + if(props.viewSetup.form.title.length > 0){ + props.viewSetup.form.title.forEach((item,index)=>{ + // console.log("判断是否有标题--"+index+"-->",val[item]) + if(val[item]){ + titleAry.push(val[item]) + } + }) + } + if(titleAry.length>0){ + return titleAry.join() + }else{ + let firstWord = "" + let powerAry = ["id","creater_time","edit_time","masters_key","states","flow_id"]; + for (let key in val) { + if (val.hasOwnProperty(key)) { + if(!powerAry.includes(key)){ + if(val[key] != '' && val[key] != null){ + firstWord = val[key] + } + } + } + } + return firstWord + } + + } if(val[props.viewSetup.form.titleWork]){ return val[props.viewSetup.form.titleWork] } @@ -267,9 +295,11 @@ const lookPageInfo = (val:any) => { .title{ font-size:14px; font-weight:bold; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; } .content{ color: #909399; diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue index 56e1032..f39350b 100644 --- a/src/components/DesignForm/app/index.vue +++ b/src/components/DesignForm/app/index.vue @@ -254,9 +254,12 @@ const selectionChange = (row: any) => { @ 功能: 获取表格头内容 */ const columnsFilter = computed(() => { + if (!state.columnsCheck?.length) { + // console.log("props.data判断是否有标题",props.data) return props.data.columns } else { + // console.log("props.data.columns判断是否有标题",props.data) return props.data.columns.filter((item: any) => { return state.columnsCheck.includes(item.prop || item.type) }) @@ -791,6 +794,61 @@ const tabsView = (val:any,types:number) => { break; } } +/** +@ 作者: 秦东 +@ 时间: 2024-07-25 08:30:49 +@ 功能: 判断是否有标题 +*/ +const writeListTitle = (val:any,viewConfig:any) => { + // console.log("判断是否有标题--1-->",val) + // console.log("判断是否有标题--2-->",viewConfig) + var titleAry = []; + if(viewConfig.form && viewConfig.form.title){ + if(viewConfig.form.title.length > 0){ + viewConfig.form.title.forEach((item,index)=>{ + // console.log("判断是否有标题--"+index+"-->",val[item]) + if(val[item]){ + titleAry.push(val[item]) + } + }) + } + } + if(titleAry.length > 0){ + return titleAry.join() + }else{ + let firstWord = "" + let powerAry = ["id","creater_time","edit_time","masters_key","states","flow_id"]; + for (let key in val) { + if (val.hasOwnProperty(key)) { + if(!powerAry.includes(key)){ + if(val[key] != '' && val[key] != null){ + firstWord = val[key] + } + } + } + } + return firstWord + } + +} + +/** +@ 作者: 秦东 +@ 时间: 2024-07-25 10:27:21 +@ 功能: 判断是否有标题 +*/ +const judgeListTitle = (val:any,viewConfig:any) => { + // console.log("判断是否有标题--3-->",val) + // console.log("判断是否有标题--4-->",viewConfig) + if(val && val.fieldClass=='_lableTitle'){ + if(viewConfig.form && viewConfig.form.title){ + if(viewConfig.form.title.length > 0){ + return true + } + } + } + return false +} + + +