From 4c18b8b1b655d4caa5b6c3afc82c288dfd71bce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sat, 4 Feb 2023 18:26:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/rpt/CompsCard.vue | 54 ++++++++++++++++++------ src/views/xm/rpt/index.vue | 5 +-- src/views/xm/rpt/product/menuAgeDist.vue | 7 +-- 3 files changed, 42 insertions(+), 24 deletions(-) diff --git a/src/views/xm/rpt/CompsCard.vue b/src/views/xm/rpt/CompsCard.vue index 227a453d..8e445620 100644 --- a/src/views/xm/rpt/CompsCard.vue +++ b/src/views/xm/rpt/CompsCard.vue @@ -7,7 +7,13 @@ - + 查看报告 + 退出报告 + 制作报告 + 取消制作 + 保存报告 + 隐藏过滤条件 + 显示过滤条件 pdf @@ -104,7 +110,7 @@ export default { xmBranchMenuDayAccumulate:()=>import('./branch/menuDayAccumulate.vue'), }, - props:['xmTestCasedb','xmTestPlan','xmProduct','xmProject','xmIteration','showToolBar','category','showParams','isRptCfg','isRptShow'], + props:['xmTestCasedb','xmTestPlan','xmProduct','xmProject','xmIteration','showToolBar','category','showParams'], computed: { ...mapGetters(['userInfo']), compIds(){ @@ -176,6 +182,8 @@ export default { data() { return { + isRptCfg:false, + isRptShow:false, xmRptConfig:null, compCfgList:[], maxTableHeight:300, @@ -196,6 +204,32 @@ export default { } }, + undoRptCfg(){ + this.xmRptConfig=null; + this.isRptCfg=false; + }, + undoRptShow(){ + this.isRptShow=false; + this.xmRptConfig=null; + }, + toRptCfg(){ + this.isRptCfg=true; + this.$message.success("切换到报告制作模式成功。请选择报表加入报告中。") + }, + finishRptCfg(){ + + this.submitXmPrtConfig((res)=>{ + var tips = res.data.tips; + if(tips.isOk){ + this.isRptCfg=false + this.xmRptConfig=null; + this.$message.success("报告保存成功。将退出报告制作模式") + }else{ + + this.$message.error(tips.msg) + } + }); + }, getXmRptConfig(){ if(!this.toLoadXmRptConfigCpd){ return; @@ -270,7 +304,7 @@ export default { xmRptConfig.cfg=JSON.stringify(compCfgList) addXmRptConfig(xmRptConfig).then(res=>{ this.xmRptConfig=xmRptConfig; - callback() + callback(res) }) }else{ var xmRptConfig={...this.xmRptConfig,cfg:[]} @@ -291,7 +325,7 @@ export default { xmRptConfig.cfg=JSON.stringify(compCfgList) editXmRptConfig(xmRptConfig).then(res=>{ this.xmRptConfig=xmRptConfig; - callback() + callback(res) }) } }, @@ -302,11 +336,7 @@ export default { } }, sizeAutoChange(k){ - if(this.$refs[k.id] && this.$refs[k.id][0].$refs && this.$refs[k.id][0].$refs[k.id]){ - this.$refs[k.id][0].$refs[k.id].sizeAutoChange(); - }else{ - this.$refs[k.id][0].sizeAutoChange(); - } + }, exportToPdf(){ @@ -315,11 +345,7 @@ export default { this.$PDFSave(this.$refs.rptBox, this.rptConfigParamsCpd.name+"-报告"); }) - }, - cancelExport(){ - this.exportToolBarVisible=false - this.paramsVisible=this.showParams - } + }, }, diff --git a/src/views/xm/rpt/index.vue b/src/views/xm/rpt/index.vue index 7e8057c2..6c87710a 100644 --- a/src/views/xm/rpt/index.vue +++ b/src/views/xm/rpt/index.vue @@ -1,8 +1,5 @@