Browse Source

修改列表展示字段数据

qin_25
herenshan112 2 months ago
parent
commit
d2ec1faa0b
  1. 2
      src/api/calendar/DateClass.ts
  2. 17
      src/components/DesignForm/app/calendar/calendar1/calendarItem.vue
  3. 2
      src/components/DesignForm/app/calendar/calendar1/monthPage.vue
  4. 82
      src/components/DesignForm/app/cardPage.vue
  5. 6
      src/components/DesignForm/tableListPage/index.vue
  6. 2
      src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue

2
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

17
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) {

2
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(() => {

82
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"
/>
<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;

6
src/components/DesignForm/tableListPage/index.vue

@ -1631,7 +1631,7 @@ const readerColumn = (column: any, isSun: int) => {
}
};
const readerColumnSun = (column: any) => {
console.log("表头label长度------------------->", column.label,column.label.length);
// console.log("label------------------->", column.label,column.label.length);
let labelLong = 0; // label
if (column.label.length) {
labelLong = column.label.length;
@ -2228,7 +2228,7 @@ const isObject = (obj) => {
:search-send="searchSend"
:body-hight="265"
:drawer-with="drawerWith"
:view-setup="viewPage.card"
:view-setup="viewPage.date"
/>
</el-col>
<el-col v-if="viewType == 3" :span="24">
@ -2455,7 +2455,7 @@ const isObject = (obj) => {
v-model="asfShowDetailsFlag"
title="关联表单详情查看"
top="20px"
style="margin-top:70px,margin-left:270px"
style="margin-top:70px;margin-left:270px"
>
</el-dialog>
</div>

2
src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue

@ -640,7 +640,7 @@ defineExpose({
}
}
.suojing {
height: calc(100vh - 135px);
height: calc(100vh - 190px);
}
.demo-image__error {
margin-top: 15px;

Loading…
Cancel
Save