直播数据中心

42.11d3e94ad9ebf245b5ac.js 2.3KB

1
  1. webpackJsonp([42],{"N6v+":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l={data:function(){return{fileType:"",csvTh:[],csvData:[],file_url:""}},mounted:function(){this.fileUrl=this.$route.query.url,this.fileUrl&&this.init()},methods:{init:function(){var t=this.fileUrl;t=t.replace("http://",window.location.protocol+"//");var e=this;this.fileType="",this.csvTh=[],this.csvData=[];var i=t;this.file_url=t,(-1!=i.indexOf(".txt")||-1!=i.indexOf(".pdf")||-1!=i.indexOf(".PDF")||-1!=i.indexOf(".html"))&&(this.fileType=1),(-1!=i.indexOf(".doc")||-1!=i.indexOf(".xls"))&&(this.fileType=2),-1!=i.indexOf(".csv")&&(this.fileType=3),(-1!=i.indexOf(".png")||-1!=i.indexOf(".jpg")||-1!=i.indexOf(".jpeg"))&&(this.fileType=4),-1!=i.indexOf(".mp4")&&(this.fileType=5),3==this.fileType&&Papa.parse(i,{download:!0,complete:function(t){var i=t.data;e.csvTh=i[0],e.csvData=i.slice(1)}})},closeEvent:function(){this.$router.go(-1)}}},s={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"lookFileToast",attrs:{width:"100%",top:"10vh"}},[i("div",{staticClass:"content"},[5==t.fileType?i("video",{staticStyle:{margin:"auto",display:"block","max-width":"90%"},attrs:{src:t.file_url,preload:"meta",autoplay:"",controls:"controls"}},[t._v("您的浏览器不支持 video 标签。")]):4==t.fileType?i("img",{staticStyle:{width:"100%",margin:"auto"},attrs:{src:t.file_url}}):1==t.fileType?i("iframe",{staticStyle:{height:"800px"},attrs:{src:t.file_url,width:"100%",height:"100%"}}):2==t.fileType?i("iframe",{staticStyle:{height:"800px"},attrs:{src:"https://view.officeapps.live.com/op/view.aspx?src="+t.file_url,width:"100%",height:"100%",frameborder:"1"}}):3==t.fileType?i("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{height:"90vh",data:t.csvData,border:""}},t._l(t.csvTh,function(e,l){return i("el-table-column",{key:l,attrs:{align:"center",label:e,width:"180px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row[l])+"\n ")]}}],null,!0)})}),1):i("iframe",{staticStyle:{height:"800px"},attrs:{src:"https://view.officeapps.live.com/op/view.aspx?src="+t.file_url,width:"100%",height:"100%",frameborder:"1"}})],1)])},staticRenderFns:[]};var a=i("VU/8")(l,s,!1,function(t){i("Q6xK")},"data-v-74536b5a",null);e.default=a.exports},Q6xK:function(t,e){}});