1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-e4f4"],{"/rDb":function(e,r,t){},"0MlO":function(e,r,t){"use strict";t.r(r);var a=t("14Xm"),o=t.n(a),i=t("D3Ub"),n=t.n(i),l=t("t3Un");function s(e){return Object(l.a)({url:"/report/pageList",method:"GET",params:e})}function c(e){return Object(l.a)({url:"/report",method:"post",data:e})}function u(e){return Object(l.a)({url:"/report/delete/batch",method:"post",data:e})}function d(e){return Object(l.a)({url:"/report",method:"put",data:e})}function p(e){return Object(l.a)({url:"/report/"+e.id,method:"get",params:{accessKey:e.accessKey}})}function h(e){return Object(l.a)({url:"/report/copy",method:"post",data:e})}var m=t("W6l8"),f=t("sm2R"),g={components:{Dictionary:t("CJ5O").a},props:{visib:{required:!0,type:Boolean,default:!1},reportCode:{required:!0,type:String,default:function(){return""}},reportName:{required:!0,type:String,default:function(){return""}},reportType:{required:!0,type:String,default:function(){return""}}},data:function(){return{title:"报表分享",reportShareUrl:"",shareValidTypeOptions:[],dialogForm:{shareValidType:0,reportCode:"",reportType:"",shareUrl:"",shareCode:"",sharePassword:"",sharePasswordFlag:!1},shareLinkFlag1:!0,rules:{shareValidType:[{required:!0,message:"有效期必选",trigger:"change"}]}}},watch:{visib:function(e){e&&this.getSystem()}},created:function(){},methods:{titleBuild:function(){return"【"+this.reportName+"】报表分享"},selectChange:function(e){this.dialogForm.shareValidType=e},getSystem:function(){var e=this;return n()(o.a.mark(function r(){var t,a,i;return o.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return e.shareLinkFlag1=!0,r.next=3,Object(f.a)("SHARE_VAILD");case 3:if(t=r.sent,a=t.code,i=t.data,"200"==a){r.next=8;break}return r.abrupt("return");case 8:e.shareValidTypeOptions=i,e.dialogForm.shareValidType=e.shareValidTypeOptions[0].id,e.dialogForm.sharePasswordFlag=!1,e.dialogForm.sharePassword="";case 12:case"end":return r.stop()}},r,e)}))()},createShare:function(){var e=this;return n()(o.a.mark(function r(){var t,a,i,n;return o.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return e.dialogForm.reportType=e.reportType,e.dialogForm.reportCode=e.reportCode,e.dialogForm.shareUrl=window.location.href,t="report_screen"==e.reportType?Object(m.b)(e.dialogForm):Object(m.a)(e.dialogForm),r.next=6,t;case 6:if(a=r.sent,i=a.code,n=a.data,"200"==i){r.next=11;break}return r.abrupt("return");case 11:e.shareLinkFlag1=!1,e.$message({message:"创建链接成功!",type:"success"}),e.reportShareUrl=n.shareUrl,e.dialogForm.sharePassword=n.sharePassword;case 15:case"end":return r.stop()}},r,e)}))()},copyShare:function(){var e="";e=""==this.dialogForm.sharePassword?"AJ-Report分享链接:"+this.reportShareUrl:"AJ-Report分享链接:"+this.reportShareUrl+" 分享码:"+this.dialogForm.sharePassword,this.copyToClip(e),this.$message({message:"复制链接成功!",type:"success"})},copyToClip:function(e,r){var t=document.createElement("input");t.setAttribute("value",e),document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},saveReportShare:function(){var e=this;return n()(o.a.mark(function r(){return o.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:({}),e.closeDialog();case 2:case"end":return r.stop()}},r,e)}))()},closeDialog:function(){this.$emit("handleClose")}}},b=t("KHd+"),y=Object(b.a)(g,function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-dialog",{staticClass:"tree_dialog",attrs:{title:e.titleBuild(),width:"30%","close-on-click-modal":!1,center:"",visible:e.visib,"before-close":e.closeDialog},on:{"update:visible":function(r){e.visib=r}}},[e.shareLinkFlag1?t("div",[t("el-form",{ref:"userForm",attrs:{model:e.dialogForm,rules:e.rules,size:"small","label-width":"100px"}},[t("el-form-item",{attrs:{label:"有效期",prop:"shareValidType"}},[t("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:e.selectChange},model:{value:e.dialogForm.shareValidType,callback:function(r){e.$set(e.dialogForm,"shareValidType","string"==typeof
|