report-ui/dist/static/js/chunk-e4f4.660a72a3.js
2023-04-14 15:55:36 +08:00

1 line
17 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(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 r?r.trim():r)},expression:"dialogForm.shareValidType"}},e._l(e.shareValidTypeOptions,function(e){return t("el-option",{key:e.id,attrs:{label:e.text,value:e.id}})}),1)],1),e._v(" "),t("el-form-item",{attrs:{label:"分享码",prop:"sharePasswordFlag"}},[t("el-switch",{model:{value:e.dialogForm.sharePasswordFlag,callback:function(r){e.$set(e.dialogForm,"sharePasswordFlag",r)},expression:"dialogForm.sharePasswordFlag"}})],1)],1),e._v(" "),t("el-button",{staticStyle:{"margin-left":"45px"},attrs:{type:"primary",plain:""},on:{click:e.createShare}},[e._v("创建链接")])],1):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:"reportShareUrl"}},[t("el-input",{attrs:{disabled:!0},model:{value:e.reportShareUrl,callback:function(r){e.reportShareUrl=r},expression:"reportShareUrl"}})],1),e._v(" "),e.dialogForm.sharePasswordFlag?t("el-form-item",{attrs:{label:"分享码",prop:"sharePassword"}},[t("el-input",{attrs:{disabled:!0},model:{value:e.dialogForm.sharePassword,callback:function(r){e.$set(e.dialogForm,"sharePassword",r)},expression:"dialogForm.sharePassword"}})],1):e._e(),e._v(" "),t("el-row",{attrs:{gutter:10}},[""==e.dialogForm.sharePassword?t("el-button",{staticStyle:{"margin-left":"45px"},attrs:{type:"primary",plain:""},on:{click:e.copyShare}},[e._v("复制链接")]):e._e(),e._v(" "),""!=e.dialogForm.sharePassword?t("el-button",{staticStyle:{"margin-left":"45px"},attrs:{type:"primary",plain:""},on:{click:e.copyShare}},[e._v("复制链接和分享码")]):e._e()],1)],1)],1),e._v(" "),t("div",{staticStyle:{"text-align":"center"},attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"danger",plain:""},on:{click:e.closeDialog}},[e._v("取消")])],1)])},[],!1,null,null,null);y.options.__file="share.vue";var v=y.exports,F={props:{visib:Boolean,rowData:Object},data:function(){return{form:{},rules:{reportName:[{required:!0,message:"请输入报表名称",trigger:"blur"}],reportCode:[{required:!0,message:"请输入报表编码",trigger:"blur"}]}}},watch:{visib:function(e){this.form=this.deepClone(this.rowData),this.form.reportCode=this.form.reportCode+"_"+Date.now()}},methods:{save:function(){var e=this;this.$refs.ruleForm.validate(function(){var r=n()(o.a.mark(function r(t){var a;return o.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!t){r.next=10;break}return console.log(e.form),r.next=4,h(e.form);case 4:if(a=r.sent,"200"==a.code){r.next=8;break}return r.abrupt("return");case 8:e.$message.success("复制成功"),e.close();case 10:case"end":return r.stop()}},r,e)}));return function(e){return r.apply(this,arguments)}}())},close:function(){this.$emit("close")}}},w=Object(b.a)(F,function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-dialog",{staticClass:"tree_dialog",attrs:{title:"报表管理--复制",width:"30%","close-on-click-modal":!1,center:"",visible:e.visib,"before-close":e.close},on:{"update:visible":function(r){e.visib=r}}},[t("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[t("el-form-item",{attrs:{label:"报表名称",prop:"reportName"}},[t("el-input",{model:{value:e.form.reportName,callback:function(r){e.$set(e.form,"reportName",r)},expression:"form.reportName"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"报表编码",prop:"reportCode"}},[t("el-input",{model:{value:e.form.reportCode,callback:function(r){e.$set(e.form,"reportCode",r)},expression:"form.reportCode"}})],1)],1),e._v(" "),t("div",{staticStyle:{"text-align":"center"},attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"danger",plain:""},on:{click:e.close}},[e._v("取消")]),e._v(" "),t("el-button",{attrs:{type:"primary",plain:""},on:{click:e.save}},[e._v("保存")])],1)],1)},[],!1,null,null,null);w.options.__file="copyDialog.vue";var S=w.exports,x=t("Yfch"),T=(t("HDHf"),{name:"Report",components:{anjiCrud:t("sYqA").default,Share:v,copyDialog:S},data:function(){var e=this;return{visibleForShareDialog:!1,reportCodeForShareDialog:"",reportNameForShareDialog:"",reportTypeForShareDialog:"",crudOption:{title:"报表管理",labelWidth:"120px",queryFormFields:[{inputType:"anji-select",anjiSelectOption:{dictCode:"REPORT_TYPE"},label:"报表类型",field:"reportType"},{inputType:"input",label:"报表名称",field:"reportName"},{inputType:"input",label:"报表编码",field:"reportCode"},{inputType:"input",label:"制作人",field:"reportAuthor"}],tableButtons:[{label:"新增",type:"",permission:"reportManage:insert",icon:"el-icon-plus",plain:!0,click:function(){return e.$refs.listPage.handleOpenEditView("add")}},{label:"删除",type:"danger",permission:"reportManage:delete",icon:"el-icon-delete",plain:!1,click:function(){return e.$refs.listPage.handleDeleteBatch()}}],rowButtons:[{label:"编辑",permission:"reportManage:update",click:function(r){return e.$refs.listPage.handleOpenEditView("edit",r)}},{label:"预览",permission:"bigScreenManage:view",click:this.preview},{label:"设计",permission:"bigScreenManage:design",click:this.design},{label:"分享",permission:"bigScreenManage:share",isHide:function(e){return"report_screen"==e.reportType},click:this.shareReport},{label:"分享",permission:"excelManage:share",isHide:function(e){return"report_excel"==e.reportType},click:this.shareReport},{label:"复制",permission:"bigScreenManage:copy",click:this.copyReport},{label:"删除",permission:"reportManage:delete",click:function(r){return e.$refs.listPage.handleDeleteBatch(r)}}],buttons:{query:{api:s,permission:"reportManage:query",sort:"update_time",order:"DESC"},queryByPrimarykey:{api:p,permission:"reportManage:detail"},add:{api:c,permission:"reportManage:insert"},delete:{api:u,permission:"reportManage:delete"},edit:{api:d,permission:"reportManage:update"},rowButtonsWidth:150},columns:[{label:"",field:"id",primaryKey:!0,tableHide:!0,editHide:!0},{label:"报表名称",placeholder:"",field:"reportName",editField:"reportName",inputType:"input",rules:[{required:!0,message:"请输入报表名称",trigger:"blur"},{min:1,max:100,message:"不超过100个字符",trigger:"blur"}],disabled:!1},{label:"报表编码",placeholder:"唯一标识",field:"reportCode",editField:"reportCode",inputType:"input",rules:[{required:!0,message:"请输入报表编码",trigger:"blur"},{min:1,max:100,message:"不超过100个字符",trigger:"blur"},{validator:x.a,trigger:"blur"}],disabled:"disableOnEdit"},{label:"分组",placeholder:"",field:"reportGroup",tableHide:!0,editHide:!0,editField:"reportGroup",inputType:"input",rules:[{min:1,max:100,message:"不超过100个字符",trigger:"blur"}],disabled:!1,defaultValue:"default"},{label:"报表类型",placeholder:"",field:"reportType",editField:"reportType",inputType:"anji-select",fieldTableRowRenderer:function(r){return e.getDictLabelByCode("REPORT_TYPE",r.reportType)},anjiSelectOption:{dictCode:"REPORT_TYPE"},rules:[{required:!0,message:"请输入报表类型",trigger:"blur"},{min:1,max:20,message:"不超过20个字符",trigger:"blur"}],disabled:"disableOnEdit"},{label:"制作人",placeholder:"",field:"reportAuthor",editField:"reportAuthor",inputType:"input",rules:[{min:1,max:100,message:"不超过100个字符",trigger:"blur"}],disabled:!1},{label:"描述",placeholder:"",field:"reportDesc",editField:"reportDesc",inputType:"input",rules:[{min:1,max:255,message:"不超过255个字符",trigger:"blur"}],disabled:!1},{label:"状态",placeholder:"",field:"enableFlag",fieldTableRowRenderer:function(r){return e.getDictLabelByCode("ENABLE_FLAG",r.enableFlag)},colorStyle:{0:"table-danger",1:"table-success"},editField:"enableFlag",inputType:"anji-select",anjiSelectOption:{dictCode:"ENABLE_FLAG"},rules:[],disabled:!1,defaultValue:1},{label:"删除标记",placeholder:"",field:"deleteFlag",editHide:!0,editField:"deleteFlag",tableHide:!0,inputType:"input",rules:[],disabled:!1},{label:"报表缩略图",placeholder:"",field:"reportImage",editField:"reportImage",inputType:"anji-upload",tableHide:!0,anjiUpload:{limit:1}}],formChange:function(e,r,t,a){console.log(e),"reportImage"==r&&(t.length>0?e.reportImage=t&&t[0].url:e.reportImage="")}},copyVisible:!1,rowData:{}}},created:function(){},methods:{handleOpenDialog1:function(){alert("自定义按钮1点击事件")},preview:function(e){var r="";r="report_excel"===e.reportType?"/excelreport/viewer":"/bigscreen/viewer";var t=this.$router.resolve({path:r,query:{reportCode:e.reportCode}});window.open(t.href,"_blank")},design:function(e){var r="";r="report_excel"===e.reportType?"/excelreport/designer":"/bigscreen/designer";var t=this.$router.resolve({path:r,query:{reportCode:e.reportCode}});window.open(t.href,"_blank")},shareReport:function(e){this.reportCodeForShareDialog=e.reportCode,this.reportNameForShareDialog=e.reportName,this.reportTypeForShareDialog=e.reportType,this.visibleForShareDialog=!0},checkReport:function(e){return"report_screen"==e.reportType},checkExcel:function(e){return"report_excel"==e.reportType},copyReport:function(e){var r=this;return n()(o.a.mark(function t(){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.copyVisible=!0,r.rowData=e;case 2:case"end":return t.stop()}},t,r)}))()},close:function(){this.copyVisible=!1,this.$refs.listPage.handleQueryForm("query")}}}),_=Object(b.a)(T,function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("anji-crud",{ref:"listPage",attrs:{option:e.crudOption},scopedSlots:e._u([{key:"pageSection",fn:function(){return[t("Share",{attrs:{visib:e.visibleForShareDialog,reportCode:e.reportCodeForShareDialog,reportName:e.reportNameForShareDialog,reportType:e.reportTypeForShareDialog},on:{handleClose:function(r){e.visibleForShareDialog=!1}}}),e._v(" "),t("copyDialog",{attrs:{visib:e.copyVisible,rowData:e.rowData},on:{"update:visib":function(r){e.copyVisible=r},close:e.close}})]},proxy:!0}])})},[],!1,null,null,null);_.options.__file="index.vue";r.default=_.exports},"1C1b":function(e,r,t){"use strict";var a=t("/rDb");t.n(a).a},CJ5O:function(e,r,t){"use strict";var a=t("14Xm"),o=t.n(a),i=t("D3Ub"),n=t.n(i),l=t("sm2R"),s={name:"GetDictionary",props:{dictKey:String,updataDict:String,value:String},data:function(){return{dictionary:"",dictionaryOptions:[]}},watch:{dictKey:{immediate:!0,handler:function(){this.getSystem()}},value:{handler:function(e){this.dictionary=e},deep:!0}},created:function(){this.getSystem()},mounted:function(){this.dictionary=this.value},methods:{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 r.next=2,Object(l.a)(e.dictKey);case 2:if(t=r.sent,a=t.code,i=t.data,"200"==a){r.next=7;break}return r.abrupt("return");case 7:e.dictionaryOptions=i;case 8:case"end":return r.stop()}},r,e)}))()},selectChange:function(e){this.$emit("input",e),this.$emit("change",e)}}},c=(t("1C1b"),t("KHd+")),u=Object(c.a)(s,function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-select",{attrs:{placeholder:"请选择",clearable:"",size:"mini"},on:{change:e.selectChange},model:{value:e.dictionary,callback:function(r){e.dictionary=r},expression:"dictionary"}},e._l(e.dictionaryOptions,function(e){return t("el-option",{key:e.id,attrs:{label:e.text,value:e.id}})}),1)},[],!1,null,"9e2cd716",null);u.options.__file="index.vue";r.a=u.exports},HDHf:function(e,r,t){"use strict";t.d(r,"c",function(){return o}),t.d(r,"a",function(){return i}),t.d(r,"d",function(){return n}),t.d(r,"f",function(){return l}),t.d(r,"i",function(){return s}),t.d(r,"h",function(){return c}),t.d(r,"g",function(){return u}),t.d(r,"b",function(){return d}),t.d(r,"e",function(){return p});var a=t("t3Un");function o(e){return Object(a.a)({url:"/dataSet/detailBysetId/"+e.id,method:"get"})}function i(e){return Object(a.a)({url:"/dataSet",method:"post",data:e})}function n(e){return Object(a.a)({url:"/dataSet",method:"put",data:e})}function l(e){return Object(a.a)({url:"/dataSource/queryAllDataSource",method:"get",data:e})}function s(e){return Object(a.a)({url:"/dataSetParam/verification",method:"post",data:e})}function c(e){return Object(a.a)({url:"/dataSet/testTransform",method:"post",data:e})}function u(e){return Object(a.a)({url:"/report/pageList",method:"get",params:e})}function d(e){return Object(a.a)({url:"/reportExcel",method:"post",data:e})}function p(e){return Object(a.a)({url:"/reportExcel",method:"put",data:e})}},W6l8:function(e,r,t){"use strict";t.d(r,"g",function(){return o}),t.d(r,"b",function(){return i}),t.d(r,"a",function(){return n}),t.d(r,"c",function(){return l}),t.d(r,"d",function(){return s}),t.d(r,"e",function(){return c}),t.d(r,"f",function(){return u});var a=t("t3Un");function o(e){return Object(a.a)({url:"reportShare/pageList",method:"GET",params:e})}function i(e){return Object(a.a)({url:"reportDashboard/share",method:"post",data:e})}function n(e){return Object(a.a)({url:"reportExcel/share",method:"post",data:e})}function l(e){return Object(a.a)({url:"reportShare/shareDelay",method:"post",data:e})}function s(e){return Object(a.a)({url:"reportShare/delete/batch",method:"post",data:e})}function c(e){return Object(a.a)({url:"reportShare/"+e.id,method:"get",params:{accessKey:e.accessKey}})}function u(e){return Object(a.a)({url:"reportShare/detailByCode",method:"get",params:{shareCode:e}})}},Yfch:function(e,r,t){"use strict";function a(e,r,t){""==r||void 0==r||null==r?t():/^[_a-zA-Z0-9]+$/.test(r)?t():t(new Error("英文字母、数字或下划线"))}t.d(r,"a",function(){return a})}}]);