report-ui/dist/static/js/chunk-f515.ff8e4ed8.js

1 line
13 KiB
JavaScript
Raw Normal View History

2023-04-14 15:55:36 +08:00
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-f515"],{"/rDb":function(e,t,r){},"0t1K":function(e,t,r){"use strict";r.r(t);var a=r("14Xm"),o=r.n(a),n=r("D3Ub"),i=r.n(n),s=r("W6l8"),l=r("sm2R"),c={components:{Dictionary:r("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 i()(o.a.mark(function t(){var r,a,n;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.shareLinkFlag1=!0,t.next=3,Object(l.a)("SHARE_VAILD");case 3:if(r=t.sent,a=r.code,n=r.data,"200"==a){t.next=8;break}return t.abrupt("return");case 8:e.shareValidTypeOptions=n,e.dialogForm.shareValidType=e.shareValidTypeOptions[0].id,e.dialogForm.sharePasswordFlag=!1,e.dialogForm.sharePassword="";case 12:case"end":return t.stop()}},t,e)}))()},createShare:function(){var e=this;return i()(o.a.mark(function t(){var r,a,n;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.dialogForm.reportType=e.reportType,e.dialogForm.reportCode=e.reportCode,e.dialogForm.shareUrl=window.location.href,t.next=5,Object(s.a)(e.dialogForm);case 5:if(r=t.sent,a=r.code,n=r.data,"200"==a){t.next=10;break}return t.abrupt("return");case 10:e.shareLinkFlag1=!1,e.$message({message:"创建链接成功!",type:"success"}),e.reportShareUrl=n.shareUrl,e.dialogForm.sharePassword=n.sharePassword;case 14:case"end":return t.stop()}},t,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,t){var r=document.createElement("input");r.setAttribute("value",e),document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r)},saveReportShare:function(){var e=this;return i()(o.a.mark(function t(){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:({}),e.closeDialog();case 2:case"end":return t.stop()}},t,e)}))()},closeDialog:function(){this.$emit("handleClose")}}},u=r("KHd+"),d=Object(u.a)(c,function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("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(t){e.visib=t}}},[e.shareLinkFlag1?r("div",[r("el-form",{ref:"userForm",attrs:{model:e.dialogForm,rules:e.rules,size:"small","label-width":"100px"}},[r("el-form-item",{attrs:{label:"有效期",prop:"shareValidType"}},[r("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:e.selectChange},model:{value:e.dialogForm.shareValidType,callback:function(t){e.$set(e.dialogForm,"shareValidType","string"==typeof t?t.trim():t)},expression:"dialogForm.shareValidType"}},e._l(e.shareValidTypeOptions,function(e){return r("el-option",{key:e.id,attrs:{label:e.text,value:e.id}})}),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"分享码",prop:"sharePasswordFlag"}},[r("el-switch",{model:{value:e.dialogForm.sharePasswordFlag,callback:function(t){e.$set(e.dialogForm,"sharePasswordFlag",t)},expression:"dialogForm.sharePasswordFlag"}})],1)],1),e._v(" "),r("el-button",{staticStyle:{"margin-left":"45px"},attrs:{type:"primary",plain:""},on:{click:e.createShare}},[e._v("<EFBFBD><EFBFBD>