diff --git a/src/api/DesignForm/types.ts b/src/api/DesignForm/types.ts index 282ec46..278fc2a 100644 --- a/src/api/DesignForm/types.ts +++ b/src/api/DesignForm/types.ts @@ -231,6 +231,7 @@ export interface echatsViews { x:string[]; ysun?: string[]; xsun?: string[]; + sunFilter?: string[]; filter:string[]; timelength:number; search:searchInfo; diff --git a/src/components/DesignForm/app/index copy.vue b/src/components/DesignForm/app/index copy.vue new file mode 100644 index 0000000..fa3d145 --- /dev/null +++ b/src/components/DesignForm/app/index copy.vue @@ -0,0 +1,2614 @@ + + + + diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue index bc80084..0910546 100644 --- a/src/components/DesignForm/app/index.vue +++ b/src/components/DesignForm/app/index.vue @@ -860,7 +860,7 @@ const selectionChange = (row: any) => { @ 功能: 获取表格头内容 */ const columnsFilter = computed(() => { - console.log("props.data判断是否有标题", props.data); + // console.log("props.data判断是否有标题", props.data); if (!state.columnsCheck?.length) { // console.log("props.data判断是否有标题",props.data) return props.data.columns; @@ -870,7 +870,7 @@ const columnsFilter = computed(() => { return state.columnsCheck.includes(item.prop || item.type); }); } - console.log("获取表格头内容", props.data.columns); + // console.log("获取表格头内容", props.data.columns); }); const subTableFieldsFilter = computed(() => { @@ -961,14 +961,14 @@ const getPageData = () => { switch (viewType.value) { case 2: nextTick(() => { - console.log("获取列表详细信息-------555---------->", calendarPageRef.value); + // console.log("获取列表详细信息-------555---------->", calendarPageRef.value); calendarPageRef.value.calendarSearchData(sendData); }); // calendarPageRef.value.calendarSearchData() break; case 3: nextTick(() => { - console.log("获取列表详细信息-------222---------->", timeAxisRef.value); + // console.log("获取列表详细信息-------222---------->", timeAxisRef.value); timeAxisRef.value.searchTimeList(sendData, 1); }); @@ -1450,13 +1450,13 @@ const judjeRadio = (val: any, options: any[]) => { const judjeCascader = (val: any[], options: any[]) => { if (val.length < 0) return ""; let valAry = stringToObj(val); - console.log("获取级联选择值", stringToObj(val), val.length, options); + // console.log("获取级联选择值", stringToObj(val), val.length, options); if (!Array.isArray(valAry)) return ""; let title = ""; valAry.forEach((item: any) => { // console.log("item", item); - console.log(item + "=============:", item, diGuiJilian(item, options)); + // console.log(item + "=============:", item, diGuiJilian(item, options)); if (title == "") { title = title + diGuiJilian(item, options); } else { @@ -1774,24 +1774,65 @@ const transformOption = (val: string | number, type?: string) => { const readerColumnSun = (column: any) => { // console.log("表头label长度-11->", column); let labelLong = 0; // 表头label长度 - if (column.children) { - labelLong = column.children.length; + if (column.label.length) { + labelLong = column.label.length; } if (labelLong > 0) { - let countLenght = 3; - column.children.forEach((item: any) => { - if (item.label.length < 3) { - countLenght = countLenght + 15; - } else { - countLenght = countLenght + item.label.length * 15; - } - }); - // console.log("表头label长度-->", countLenght); - return countLenght; - } else { + if(labelLong > 6 ){ + return labelLong * 15; + }else{ + return labelLong * 30; + } + + }else{ return 100; } + // if (column.children) { + // labelLong = column.children.length; + // } + // if (labelLong > 0) { + // let countLenght = 3; + // column.children.forEach((item: any) => { + // if (item.label.length < 3) { + // countLenght = countLenght + 15; + // } else { + // countLenght = countLenght + item.label.length * 15; + // } + // }); + // // console.log("表头label长度-->", countLenght); + // return countLenght; + // } else { + // return 100; + // } }; +//shuju +const tableChildren = (field:string,dataList:any) => { + console.log("表头label长度-1->", field); + console.log("表头label长度-2->", dataList); + // console.log("表头label长度-->", isObject(dataList)); + let jieguo = "" + if(Array.isArray(dataList)){ + + dataList.forEach((item:any,key:string) => { + + if(isObject(item)){ + + for (let key in item) { + // console.log("表头label长度-->", key==field); + if (field == key){ + // console.log("表头label长度--结果>", item[key]); + // return item[key] + jieguo = item[key] + } + } + } + }) + } + return jieguo +} +const isObject = (obj) => { + return typeof obj === "object"; +}