From 5b95cc85f035f464ef588d25f659791ef640f16c Mon Sep 17 00:00:00 2001 From: mll Date: Mon, 16 Mar 2026 13:20:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=88=E6=9C=9F=E5=89=A9=E4=BD=99=E6=97=B6?= =?UTF-8?q?=E9=97=B4(=E5=A4=A9)=E5=88=86=E7=B1=BB=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=20label=E5=AE=BD=E5=BA=A6=E5=92=8CsearchWidth=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LowDesign/src/LowReport/index.vue | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/components/LowDesign/src/LowReport/index.vue b/src/components/LowDesign/src/LowReport/index.vue index 48cd85f..6cc90ff 100644 --- a/src/components/LowDesign/src/LowReport/index.vue +++ b/src/components/LowDesign/src/LowReport/index.vue @@ -92,11 +92,13 @@ v-if="tableSearch['Group by']&&tableSearch['Group by'].includes(key)||!tableSear import * as ReportApi from '@/api/design/report' import { InputNumberRange,InputDateRange ,InputDateTimeRange,InputTimeRange} from '../shareControl/index' import download from '@/utils/download' +import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { cloneDeep } from 'lodash-es' import { useWindowSize } from '@vueuse/core' import { assembleLengObj } from '@/utils/lowDesign' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import Avue from '@smallwei/avue' +import { Console } from 'console' defineOptions({ name: 'LowReport' }) interface Props { @@ -261,7 +263,6 @@ const initTable = async () => { // 处理动态列(暂不构建children,等数据返回后动态生成) dynamicFields.forEach((item, index) => { if (item.parentFieldCode && item.parentFieldCode !== '') return - const config: any = { prop: item.fieldCode, label: t(`${props.reportCode}.${item.fieldCode}`), @@ -285,9 +286,9 @@ const initTable = async () => { tableSearch.value[config.prop]=item.searchDefaultValue } } + if(['年','年度','年份','月','月度','月份','年月'].includes(item.fieldName)&&config.search){ config.searchSpan=3 - config.searchLabelWidth=60 if(item.fieldName.includes('年')){ config.searchType='year' config.valueFormat = 'YYYY' @@ -296,28 +297,33 @@ const initTable = async () => { config.dicData=[{label:'1月',value:'1'},{label:'2月',value:'2'},{label:'3月',value:'3'},{label:'4月',value:'4'},{label:'5月',value:'5'},{label:'6月',value:'6'},{label:'7月',value:'7'},{label:'8月',value:'8'},{label:'9月',value:'9'},{label:'10月',value:'10'},{label:'11月',value:'11'},{label:'12月',value:'12'}] } } + if(item.fieldName=='效期剩余时间(天)分类') config.searchSpan=5 + + if(config.search) config.searchLabelWidth=item.fieldName.length*12 +40 if(['货品名称','货品','剂型','产品','产品名称','剂型名称','客户名称','客户','业务员'].includes(item.fieldName)&&config.search){ config.dataType= 'string' - config.dictType= 'defaultTable' + config.dictType= 'defaultTable' config.dicUrl= `/lideeyunji/report-data/list/${item.fieldName.includes('客户') ?'khxx':(item.fieldName.includes('业务员')?'ywyxx': 'hpmx')}` config.dicMethod= 'post' config.dicQuery= { //请求参数 pageSize: 1000000, pageNo:1 - } - config.filterable= true - - config.collapseTags=true + } config.dicFormatter= (res) => { //请求数据格式化 const arr=[...new Set(res.records.map(item=>item[config.prop]))] return arr.map(item=>({label:item,value:item})) } config.searchType='select' } - + if(item.dictCode){ + const dictData=getStrDictOptions(item.dictCode) + config.dicData=dictData + config.searchType= 'select' + config.dataType= 'string' + } const moreIn="MORE_IN".includes(item.queryMode) config.searchType=moreIn?'select':config.searchType - config.multiple=moreIn + config.multiple=config.filterable=config.collapseTags=moreIn if(!!item.isAmount){ index==0?amountFieds.value.fistField=config.prop:''