|
|
|
@ -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" |
|
|
|
/> |
|
|
|
<div class="cardInfo" :style="'width: calc(100% - '+props.viewSetup.form.imgWidth+'px); height:'+props.viewSetup.form.imgHeight+'px; overflow: hidden;' "> |
|
|
|
<div class="cardInfo" :style="'width: calc(100% - '+props.viewSetup.form.imgWidth+'px); min-height:'+props.viewSetup.form.imgHeight+'px; ' "> |
|
|
|
<div class="title">{{ cardInfo(item,"title") }}</div> |
|
|
|
<div class="content">{{ cardInfo(item,"content") }}</div> |
|
|
|
<div class="content"> |
|
|
|
<div v-for="item in cardInfo(item,'content')">{{ item }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
@ -261,7 +324,7 @@ const lookPageInfo = (val:any) => { |
|
|
|
<div class="pageBox"> |
|
|
|
<el-pagination |
|
|
|
v-model:current-page="props.searchSend.page" |
|
|
|
v-model:page-size="props.searchSend.pagesize" |
|
|
|
v-model:page-size="pageSize" |
|
|
|
:page-sizes="[3, 9, 12, 30, 50, 100]" |
|
|
|
:size="size" |
|
|
|
:background="true" |
|
|
|
@ -310,6 +373,7 @@ const lookPageInfo = (val:any) => { |
|
|
|
display: flex; |
|
|
|
width: 100%; |
|
|
|
justify-content: flex-start; |
|
|
|
padding: 0 5px; |
|
|
|
} |
|
|
|
.cardInfo{ |
|
|
|
padding-left: 5px; |
|
|
|
|