1 line
7.6 KiB
JavaScript
1 line
7.6 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0c3cd06a"],{"21fb":function(t,e,n){},4353:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("a-button-group",[n("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"top"}},[n("template",{slot:"title"},[n("span",[t._v("报表")])]),t._v(" "),n("a-button",{staticClass:"actions_xwl_btn",attrs:{type:"link",icon:"bar-chart"},on:{click:t.lookReportList}})],2)],1),t._v(" "),n("a-drawer",{attrs:{width:"30%",title:"已存报表",placement:"right",visible:t.drawerShow,"after-visible-change":t.afterVisibleChange},on:{close:t.onClose}},[n("div",{staticStyle:{display:"flex",width:"100%",padding:"5px",height:"100%","flex-direction":"column","justify-content":"flex-start","align-items":"flex-start"}},[n("el-select",{staticStyle:{margin:"0px auto",width:"90%"},attrs:{placeholder:"全部报表"},on:{change:t.getReportTableList},model:{value:t.rtType,callback:function(e){t.rtType=e},expression:"rtType"}},t._l(t.tableTypeMap,(function(t,e,i){return n("el-option",{key:i,attrs:{label:t,value:Number(e)}})})),1),t._v(" "),n("el-input",{staticStyle:{margin:"0px auto","margin-top":"20px",width:"90%"},attrs:{placeholder:"请输入报表名称","prefix-icon":"el-icon-search"},on:{input:t.fliter},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}}),t._v(" "),n("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.handleInfiniteOnLoad,expression:"handleInfiniteOnLoad"}],staticClass:"infinite-container",staticStyle:{margin:"0px auto","margin-top":"20px",width:"90%"},attrs:{"infinite-scroll-disabled":t.busy,"infinite-scroll-distance":1e3}},[n("a-list",{attrs:{"data-source":t.data,size:"small",bordered:!0,split:!0},scopedSlots:t._u([{key:"renderItem",fn:function(e,i){return n("a-list-item",{},[n("a-tooltip",{staticStyle:{cursor:"pointer"},attrs:{placement:"left"},on:{click:function(n){return t.toTheReportTable(e.rt_type,e.id)}}},[n("template",{slot:"title"},[n("span",[t._v(t._s(e.remark))])]),t._v(" "),n("a-list-item-meta",{attrs:{description:t.tableTypeMap[e.rt_type]}},[n("a",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(e.name))])])],2),t._v(" "),n("div",[n("el-button",{attrs:{type:"warning",icon:"el-icon-delete",circle:""},on:{click:function(n){return t.deleteByID(e.id,e.name)}}})],1)],1)}}])},[t._v(" "),t.loading&&!t.busy?n("div",{staticClass:"loading-container"},[n("a-spin")],1):t._e()])],1)],1)])],1)},r=[],a=n("c80c"),o=(n("96cf"),n("3b8d")),s=(n("c5f6"),n("487a")),l=n.n(s),c=n("815e"),u=n("cc06"),d={directives:{infiniteScroll:l.a},props:{rtType:{type:Number,default:0}},data:function(){return{input:"",tableData:[],rtType:this.rt_type,drawerShow:!1,data:[],loading:!1,busy:!1,tableTypeMap:{0:"全部报表",1:"事件分析",2:"留存分析",3:"漏斗分析",4:"智能路径分析",5:"用户属性分析"},routerMap:{1:"/behavior-analysis/event/",2:"/behavior-analysis/retention/",3:"/behavior-analysis/funnel/",4:"/behavior-analysis/funnel/",5:"/user-analysis/attr/"}}},beforeMount:function(){this.getReportTableList()},methods:{toTheReportTable:function(t,e){this.$router.push({path:this.routerMap[t]+e})},deleteByID:function(t,e){var n=this;this.$confirm("确定删除名字为 【"+e+"】 的报表吗?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(Object(a["a"])().mark((function e(){var i;return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(c["e"])({appid:n.$store.state.baseData.EsConnectID,id:t});case 2:if(i=e.sent,0==i.code){e.next=8;break}return n.$message({offset:60,type:"error",message:i.msg}),e.abrupt("return");case 8:n.$message({offset:60,type:"success",message:i.msg}),n.getReportTableList();case 10:case"end":return e.stop()}}),e)})))).catch((function(t){console.error(t)}))},fliter:function(){this.data=Object(u["a"])(this.tableData,this.input)},afterVisibleChange:function(t){},onClose:function(){this.drawerShow=!1},lookReportList:function(){this.getReportTableList(),this.drawerShow=!0},getReportTableList:function(){var t=Object(o["a"])(Object(a["a"])().mark((function t(){var e;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(c["m"])({appid:this.$store.state.baseData.EsConnectID,rt_type:this.rtType});case 2:if(e=t.sent,0==e.code){t.next=6;break}return this.$message({offset:60,type:"error",message:e.msg}),t.abrupt("return");case 6:null==e.data&&(e.data=[]),this.tableData=e.data,this.fliter();case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),handleInfiniteOnLoad:function(){}}},f=d,p=(n("9333"),n("2877")),h=Object(p["a"])(f,i,r,!1,null,null,null);e["default"]=h.exports},"487a":function(t,e,n){(function(e,n){t.exports=n()})(0,(function(){"use strict";var t="@@InfiniteScroll",e=function(t,e){var n,i,r,a,o,s=function(){t.apply(a,o),i=n};return function(){if(a=this,o=arguments,n=Date.now(),r&&(clearTimeout(r),r=null),i){var t=e-(n-i);t<0?s():r=setTimeout((function(){s()}),t)}else s()}},n=function(t){return t===window?Math.max(window.pageYOffset||0,document.documentElement.scrollTop):t.scrollTop},i=document.defaultView.getComputedStyle,r=function(t){var e=t;while(e&&"HTML"!==e.tagName&&"BODY"!==e.tagName&&1===e.nodeType){var n=i(e).overflowY;if("scroll"===n||"auto"===n)return e;e=e.parentNode}return window},a=function(t){return t===window?document.documentElement.clientHeight:t.clientHeight},o=function(t){return t===window?n(window):t.getBoundingClientRect().top+n(window)},s=function(t){var e=t.parentNode;while(e){if("HTML"===e.tagName)return!0;if(11===e.nodeType)return!1;e=e.parentNode}return!1},l=function(){if(!this.binded){this.binded=!0;var t=this,n=t.el,i=n.getAttribute("infinite-scroll-throttle-delay"),a=200;i&&(a=Number(t.vm[i]||i),(isNaN(a)||a<0)&&(a=200)),t.throttleDelay=a,t.scrollEventTarget=r(n),t.scrollListener=e(c.bind(t),t.throttleDelay),t.scrollEventTarget.addEventListener("scroll",t.scrollListener),this.vm.$on("hook:beforeDestroy",(function(){t.scrollEventTarget.removeEventListener("scroll",t.scrollListener)}));var o=n.getAttribute("infinite-scroll-disabled"),s=!1;o&&(this.vm.$watch(o,(function(e){t.disabled=e,!e&&t.immediateCheck&&c.call(t)})),s=Boolean(t.vm[o])),t.disabled=s;var l=n.getAttribute("infinite-scroll-distance"),u=0;l&&(u=Number(t.vm[l]||l),isNaN(u)&&(u=0)),t.distance=u;var d=n.getAttribute("infinite-scroll-immediate-check"),f=!0;d&&(f=Boolean(t.vm[d])),t.immediateCheck=f,f&&c.call(t);var p=n.getAttribute("infinite-scroll-listen-for-event");p&&t.vm.$on(p,(function(){c.call(t)}))}},c=function(t){var e=this.scrollEventTarget,i=this.el,r=this.distance;if(!0===t||!this.disabled){var s=n(e),l=s+a(e),c=!1;if(e===i)c=e.scrollHeight-l<=r;else{var u=o(i)-o(e)+i.offsetHeight+s;c=l+r>=u}c&&this.expression&&this.expression()}},u={bind:function(e,n,i){e[t]={el:e,vm:i.context,expression:n.value};var r=arguments;e[t].vm.$on("hook:mounted",(function(){e[t].vm.$nextTick((function(){s(e)&&l.call(e[t],r),e[t].bindTryCount=0;var n=function n(){e[t].bindTryCount>10||(e[t].bindTryCount++,s(e)?l.call(e[t],r):setTimeout(n,50))};n()}))}))},unbind:function(e){e&&e[t]&&e[t].scrollEventTarget&&e[t].scrollEventTarget.removeEventListener("scroll",e[t].scrollListener)}},d=function(t){t.directive("InfiniteScroll",u)};return window.Vue&&(window.infiniteScroll=u,Vue.use(d)),u.install=d,u}))},9333:function(t,e,n){"use strict";n("21fb")},cc06:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));n("4917"),n("ac6a"),n("456d");function i(t,e){var n,i=e.toLowerCase(),r=t;return n=i?r.filter((function(t){return Object.keys(t).some((function(e){return String(t[e]).toLowerCase().match(i)}))})):r,n}}}]); |