diff --git a/src/api/calendar/DateClass.ts b/src/api/calendar/DateClass.ts index a755360..bce4ba2 100644 --- a/src/api/calendar/DateClass.ts +++ b/src/api/calendar/DateClass.ts @@ -29,7 +29,7 @@ class DateClass { : date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); } getHolidays(date: number[]) { - console.log(`${date[0]}${clockFactory(date[1])}${clockFactory(date[2])}`,"<==>",config.Holidays.indexOf(`${date[0]}${clockFactory(date[1])}${clockFactory(date[2])}`)) + // console.log(`${date[0]}${clockFactory(date[1])}${clockFactory(date[2])}`,"<==>",config.Holidays.indexOf(`${date[0]}${clockFactory(date[1])}${clockFactory(date[2])}`)) return ( config.Holidays.indexOf(`${date[0]}${clockFactory(date[1])}${clockFactory(date[2])}`) > -1 diff --git a/src/components/DesignForm/app/calendar/calendar1/calendarItem.vue b/src/components/DesignForm/app/calendar/calendar1/calendarItem.vue index c9ae8c6..e8e9572 100644 --- a/src/components/DesignForm/app/calendar/calendar1/calendarItem.vue +++ b/src/components/DesignForm/app/calendar/calendar1/calendarItem.vue @@ -65,20 +65,29 @@ const lookPageInfo = (val:any) => { @ 功能: 判断是否有标题 */ const writeListTitle = (val:any) => { + console.log("判断是否有标题--"+props.viewSetup.form.title+"-->",props.viewSetup.form) 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]) - } + let titleInfo = item.split("|#|") + if(Array.isArray(titleInfo) && titleInfo.length > 1){ + titleAry.push(titleInfo[0]) + }else{ + if(val[item]){ + titleAry.push(val[item]) + } + } + }) } } + + if(titleAry.length > 0){ - return titleAry.join() + return titleAry.join("") }else{ let powerAry = ["id","creater_time","edit_time","masters_key","states","flow_id"]; for (let key in val) { diff --git a/src/components/DesignForm/app/calendar/calendar1/monthPage.vue b/src/components/DesignForm/app/calendar/calendar1/monthPage.vue index 6e4c2de..64d2345 100644 --- a/src/components/DesignForm/app/calendar/calendar1/monthPage.vue +++ b/src/components/DesignForm/app/calendar/calendar1/monthPage.vue @@ -106,7 +106,7 @@ const searchatMonthList = (val: any) => { console.log("获取每天数据条件", sendInfo); gainCalendarList(sendInfo) .then(({ data }) => { - // console.log("获取月份数据",data) + console.log("获取月份数据",data) TBody.value = data; }) .finally(() => { diff --git a/src/components/DesignForm/app/cardPage.vue b/src/components/DesignForm/app/cardPage.vue index ff9dcfb..cbbd3af 100644 --- a/src/components/DesignForm/app/cardPage.vue +++ b/src/components/DesignForm/app/cardPage.vue @@ -8,6 +8,8 @@ import type { ComponentSize } from 'element-plus' import { gainFormPageListCont } from '@/api/DesignForm/requestapi' import FormPageCont from '@/components/DesignForm/tableListPage/formPageCont.vue' +import LondIngImg from '@/assets/images/loading.gif' + const props = defineProps({ searchSend:{ type:Object, @@ -84,7 +86,11 @@ const cardInfoBox = computed(() => { cssStyle['width'] = (Math.round(24/props.viewSetup.form.ranks) - props.viewSetup.form.imgWidth) + "px"; return cssStyle }) +const pageSize = ref(props.searchSend.pagesize) onMounted(()=>{ + if(pageSize.value <= 30){ + pageSize.value = 30 + } lineRanks.value = Math.round(24/props.viewSetup.form.ranks) nextTick(()=>{ getCardList(props.searchSend) @@ -151,7 +157,7 @@ const imgSrcPath = (val:any) => { if(val[props.viewSetup.form.imgWork]){ return val[props.viewSetup.form.imgWork] } - return "" + return LondIngImg } /** @ 作者: 秦东 @@ -181,13 +187,18 @@ const cardInfo = (val:any,cla:string) => { 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]) + let titleInfo = item.split("|#|") + if(Array.isArray(titleInfo) && titleInfo.length > 1){ + titleAry.push(titleInfo[0]) + }else{ + if(val[item]){ + titleAry.push(val[item]) + } } }) } if(titleAry.length>0){ - return titleAry.join() + return titleAry.join("") }else{ let firstWord = "" let powerAry = ["id","creater_time","edit_time","masters_key","states","flow_id"]; @@ -208,8 +219,57 @@ const cardInfo = (val:any,cla:string) => { return val[props.viewSetup.form.titleWork] } }else if(cla=="content"){ - if(val[props.viewSetup.form.describe]){ - return val[props.viewSetup.form.describe] +console.log("判断是否有标题---->",props.columnsFilter) + + if(props.viewSetup.form.describe){ + var titleAry = []; + if(props.viewSetup.form.describe.length > 0){ + props.viewSetup.form.describe.forEach((item,index)=>{ + // console.log("判断是否有标题--"+index+"-->",val[item]) + let titleInfo = item.split("|#|") + if(Array.isArray(titleInfo) && titleInfo.length > 1){ + titleAry.push(titleInfo[0]) + }else{ + if(val[item]){ + if(Array.isArray(props.columnsFilter) && props.columnsFilter.length > 0){ + let mingCehgn = "" + props.columnsFilter.forEach((mItem:any) => { + if(mItem.field == item){ + if(mItem.label != ""){ + mingCehgn = mItem.label + ":" + val[item] + }else{ + mingCehgn = val[item] + } + + } + }) + titleAry.push(mingCehgn) + }else{ + titleAry.push(val[item]) + } + + } + } + }) + } + if(titleAry.length>0){ + return titleAry + 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 + } + } } return "" @@ -246,9 +306,12 @@ const lookPageInfo = (val:any) => { :initial-index="4" fit="cover" /> -