From 4beefb3dc1614d468ffa6377e0dd140d8a3c00c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sun, 5 Feb 2023 03:16:34 +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 | 41 +++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/src/views/xm/rpt/CompsCard.vue b/src/views/xm/rpt/CompsCard.vue index d33f3bfe..dacfb31e 100644 --- a/src/views/xm/rpt/CompsCard.vue +++ b/src/views/xm/rpt/CompsCard.vue @@ -14,10 +14,10 @@ 退出报告 制作报告 取消制作 - 保存报告 + 保存报告 隐藏过滤条件 显示过滤条件 - + pdf @@ -36,6 +36,18 @@ + + + + + + + + + @@ -204,7 +216,7 @@ export default { return { isRptCfg:false, isRptShow:false, - xmRptConfig:null, + xmRptConfig:{}, xmRptData:{id:'',rptName:'',bizId:'',bizType:'',bizDate:''}, xmRptDataInit:{id:'',rptName:'',bizId:'',bizType:'',bizDate:''}, compCfgList:[], @@ -214,6 +226,7 @@ export default { paramsVisible:true, rptDataListVisible:false, createRptDataVisible:false, + createRptConfigVisible:false, } }, @@ -237,6 +250,13 @@ export default { this.xmRptData.rptName=this.xmRptConfig.name this.createRptDataVisible=true + }, + toSaveRptCfg(){ + this.createRptConfigVisible=true + if(!this.xmRptConfig.name){ + this.xmRptConfig.name=this.rptConfigParamsCpd.name+"-报告" + } + }, toQueryRptData(){ this.rptDataListVisible=true; @@ -274,12 +294,12 @@ export default { }) }, undoRptCfg(){ - this.xmRptConfig=null; + this.xmRptConfig={}; this.isRptCfg=false; }, undoRptShow(){ this.isRptShow=false; - this.xmRptConfig=null; + this.xmRptConfig={}; this.xmRptData={...this.xmRptDataInit}; }, toRptCfg(){ @@ -292,7 +312,8 @@ export default { var tips = res.data.tips; if(tips.isOk){ this.isRptCfg=false - this.xmRptConfig=null; + this.xmRptConfig={}; + this.createRptConfigVisible=false; this.$message.success("报告保存成功。将退出报告制作模式") }else{ @@ -361,8 +382,12 @@ export default { } }, submitXmPrtConfig(callback){ - if(this.xmRptConfig==null){ - var xmRptConfig={...this.rptConfigParamsCpd,cfg:[]} + if(!this.xmRptConfig||!this.xmRptConfig.name){ + this.$message.error("请输入报告名称") + return + } + if(!this.xmRptConfig.id){ + var xmRptConfig={...this.rptConfigParamsCpd,name:this.xmRptConfig.name,cfg:[]} this.compCfgList.forEach(k=>{ if(this.$refs[k.id] && this.$refs[k.id][0].$refs && this.$refs[k.id][0].$refs[k.id]){ var com=this.$refs[k.id][0].$refs[k.id]