diff --git a/src/views/hr/archives/index.vue b/src/views/hr/archives/index.vue index 3cafdfc..921f7c4 100644 --- a/src/views/hr/archives/index.vue +++ b/src/views/hr/archives/index.vue @@ -1017,7 +1017,7 @@ const systemMenuTreeProps = { width="800" :before-close="closeUploadTemp" > - + diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue index fa5b870..5bdc0d2 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue @@ -143,8 +143,11 @@ const seriesAnlay = (listVal: any[]) => { position: "top", }; }); + return listVal; + }else{ + return [] } - return listVal; + }; /** @ 作者: 秦东 @@ -261,7 +264,7 @@ const drawPictures = () => { // ], // }); console.log("画图完毕---->", props); - // myChart.value.resize(); + myChart.value.resize(); }else { myChart.value.setOption({ grid: { @@ -306,14 +309,14 @@ const controlData = computed(() => { // }, // { deep: true } // ); -// watch( -// () => props.data, -// (val: any) => { -// console.log("画图完毕--改变-->", val); -// drawPictures(); -// }, -// { deep: true } -// ); +watch( + () => props.data, + (val: any) => { + console.log("画图完毕--改变-->", props.data); + drawPictures(); + }, + { deep: true } +); /** @ 作者: 秦东 @ 时间: 2025-06-26 09:47:45 diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/right.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/right.vue index 82481a1..b963299 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/right.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/right.vue @@ -85,8 +85,17 @@ watch( list.push(valItem) } }) + let tableTitle = ""; + if(Array.isArray(props.sunDimAry) && props.sunDimAry.length > 0){ + props.sunDimAry.forEach((taItem:any)=>{ + if(taItem.tableKey == item){ + tableTitle = taItem.tableName + } + }) + } weiduSunList.value.push({ tableKey:item, + tableTitle:tableTitle, list:list }) }) @@ -127,8 +136,17 @@ watch( list.push(valItem) } }) + let tableTitle = ""; + if(Array.isArray(props.sunDimAry) && props.sunDimAry.length > 0){ + props.sunDimAry.forEach((taItem:any)=>{ + if(taItem.tableKey == item){ + tableTitle = taItem.tableName + } + }) + } duliangSunList.value.push({ tableKey:item, + tableTitle:tableTitle, list:list }) }) @@ -277,10 +295,119 @@ const shuxingmh = (val: any) => { } return titleVal; }; + +//初始化维度与度量子表数据 +const initDerStor = () => { + console.log("初始化维度-----xsun----->",controlData.value.xsun) + console.log("初始化维度-----ysun----->",controlData.value.ysun) + console.log("初始化维度-----sunDimAry----->",props.sunDimAry) + duliangSunList.value = [] + weiduSunList.value = [] + + + console.log("初始化维度-----sunDimAry--1--->",Array.isArray(props.sunDimAry) , props.sunDimAry.length > 0) + + if(Array.isArray(props.sunDimAry) && props.sunDimAry.length > 0){ + props.sunDimAry.forEach((taItem:any)=>{ + + console.log("初始化维度-----xsun--1--->",Array.isArray(controlData.value.xsun) , controlData.value.xsun.length > 0) + //x轴 + if(Array.isArray(controlData.value.xsun) && controlData.value.xsun.length > 0){ + let list = [] + controlData.value.xsun.forEach((xItem:any)=>{ + if(taItem.tableKey == xItem.tableKey){ + list.push(xItem) + } + }) + weiduSunList.value.push({ + tableKey:taItem.tableKey, + tableTitle:taItem.tableName, + list:list + }) + } + //y轴 + if(Array.isArray(controlData.value.ysun) && controlData.value.ysun.length > 0){ + let list = [] + controlData.value.ysun.forEach((yItem:any)=>{ + if(taItem.tableKey == yItem.tableKey){ + list.push(yItem) + } + }) + console.log("初始化维度-----ysun--1--->",list) + duliangSunList.value.push({ + tableKey:taItem.tableKey, + tableTitle:taItem.tableName, + list:list + }) + } + + + }) + } + console.log("初始化维度-----weiduSunList----->",weiduSunList.value) + console.log("初始化维度-----duliangSunList----->",duliangSunList.value) +} +const activeXName = ref(0) +const activeYName = ref(0) +//删除维度子表 +const delDimSun = (tableKey:string,fieldKey:string) => { + if(Array.isArray(controlData.value.xsun) && controlData.value.xsun.length > 0){ + let list = [] + controlData.value.xsun.forEach((xItem:any,index:number)=>{ + if(xItem.tableKey == tableKey && xItem.field == fieldKey ){ + list.push(index) + } + }) + if(list.length > 0){ + list.forEach((item:number) => { + controlData.value.xsun.splice(item, 1); + }) + } + if(Array.isArray(controlData.value.xsun)){ + if (controlData.value.xsun.length <= 0){ + controlData.value.ysun = [] + } + }else{ + controlData.value.xsun = [] + controlData.value.ysun = [] + } + }else{ + controlData.value.xsun = [] + controlData.value.ysun = [] + } +} +//删除度量子表 +const delDimSunDuliang = (tableKey:string,fieldKey:string) => { + if(Array.isArray(controlData.value.ysun) && controlData.value.ysun.length > 0){ + let list = [] + controlData.value.ysun.forEach((xItem:any,index:number)=>{ + if(xItem.tableKey == tableKey && xItem.field == fieldKey ){ + list.push(index) + } + }) + if(list.length > 0){ + list.forEach((item:number) => { + controlData.value.ysun.splice(item, 1); + }) + } + }else{ + controlData.value.ysun = [] + } +} + +onMounted(()=>{ + initDerStor() +}) +