chunk-53655b96.dc709f35.js 5.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-53655b96"],{"8d28":function(t,e,n){"use strict";n("e5b8")},d823:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return"xls"!==t.type?n("div",{staticClass:"project-search"},[0!==t.dataList.length?n("div",{staticStyle:{width:"50%",height:"calc(100vh - 30px)",overflow:"auto",position:"relative"}},[t._l(t.dataList,(function(e){return n("div",{key:e.id,staticClass:"listClass"},[n("img",{staticStyle:{width:"150px",height:"150px",padding:"10px 10px 10px 0"},attrs:{src:e.url,alt:""}}),n("div",{domProps:{innerHTML:t._s(e.content)}})])})),n("div",{staticClass:"pagination"},[n("el-pagination",{attrs:{"current-page":t.queryForm.page,"page-size":t.queryForm.page_size,total:t.total,layout:"prev, pager, next"},on:{"current-change":t.handleCurrentChange}})],1)],2):n("div",{staticStyle:{width:"50%","font-size":"25px",margin:"300px auto",color:"#909399","text-align":"center"}},[t._v(" 暂无解析数据 ")]),n("div",{staticStyle:{width:"50%"}},[n("file-preview",{attrs:{"file-url":t.documentUrl,"file-type":t.type}})],1)]):n("div",[t.excelDataList.length>0?n("div",{staticClass:"excel-table"},t._l(t.excelDataList,(function(e,r){return n("div",{key:r},[n("table",[n("thead",[n("tr",t._l(e.data[0],(function(e,r){return n("th",{key:r},[t._v(" "+t._s(e)+" ")])})),0)]),n("tbody",t._l(e.data.slice(1),(function(e,r){return n("tr",{key:r},t._l(e,(function(e,r){return n("td",{key:r},[t._v(" "+t._s(e)+" ")])})),0)})),0)])])})),0):n("div",{staticClass:"no-data"},[t._v("暂无数据")])])},a=[],i=n("5530"),u=(n("4de4"),n("caad"),n("d81d"),n("fb6a"),n("d3b7"),n("ac1f"),n("2532"),n("466d"),n("841c"),n("2ca0"),n("498a"),n("2f62")),o=n("db6a"),c=(n("f7e6"),n("3be9")),d={components:{FilePreview:c["default"]},computed:Object(i["a"])(Object(i["a"])({},Object(u["b"])(["roleInfo","authList"])),{},{paginatedDataList:function(){var t=(this.queryForm.page-1)*this.queryForm.page_size,e=t+this.queryForm.page_size;return this.dataList.slice(t,e)}}),data:function(){return{queryForm:{page:1,page_size:10,document_id:""},dataList:[],conten:"",documentUrl:"",type:"",excelDataList:[],isFileViewable:!1,supportedFileTypes:["pdf","doc","docx","xls","xlsx","ppt","pptx","txt","jpg","jpeg","png","gif"],total:0}},mounted:function(){this.queryForm.document_id=this.$route.query.id,this.type=this.$route.query.type,this.checkFileType(),this.search()},methods:{handleCurrentChange:function(t){this.queryForm.page=t,this.search()},checkAuth:function(t){return this.roleInfo.is_admin,!0},checkFileType:function(){this.isFileViewable=this.supportedFileTypes.includes(this.type)},search:function(){var t=this;Object(o["o"])(this.queryForm).then((function(e){t.dataList=e.data.tasks,t.total=e.data.pagination.total_count,t.isFileViewable?t.documentUrl=e.data.documentUrl:console.log("文件类型不支持预览")})).catch((function(t){console.error("获取数据时出错:",t)}))},parseExcelData:function(t){return t.filter((function(t){return t.content})).map((function(t,e){var n=t.content;if("string"!==typeof n)return null;var r=n.match(/^#.*?\n/);r&&(n=n.slice(r[0].length));var a=n.split("\n").map((function(t){return t.trim()})).filter((function(t){return""!==t})).filter((function(t){return!t.match(/^\|[-:]+\|[-:]+\|$/)})).map((function(t){return t.split("|").map((function(t){return t.trim()})).filter((function(t){return""!==t}))}));return a.length>0&&a[0].some((function(t){return t.startsWith("Unnamed:")}))&&a.shift(),{title:t.title||"Sheet ".concat(e+1),data:a}})).filter((function(t){return null!==t&&t.data.length>0}))}}},s=d,l=(n("8d28"),n("2877")),p=Object(l["a"])(s,r,a,!1,null,"26a33ed4",null);e["default"]=p.exports},db6a:function(t,e,n){"use strict";n.d(e,"l",(function(){return a})),n.d(e,"d",(function(){return i})),n.d(e,"r",(function(){return u})),n.d(e,"e",(function(){return o})),n.d(e,"h",(function(){return c})),n.d(e,"f",(function(){return d})),n.d(e,"m",(function(){return s})),n.d(e,"n",(function(){return l})),n.d(e,"a",(function(){return p})),n.d(e,"o",(function(){return f})),n.d(e,"b",(function(){return h})),n.d(e,"j",(function(){return m})),n.d(e,"i",(function(){return b})),n.d(e,"q",(function(){return y})),n.d(e,"k",(function(){return g})),n.d(e,"s",(function(){return k})),n.d(e,"g",(function(){return v})),n.d(e,"c",(function(){return j})),n.d(e,"p",(function(){return x}));var r=n("b775");function a(t){return Object(r["a"])({url:"/kbm/selectBucketInfo",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/minio/createBucket",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/kbm/updateKbm",method:"post",data:t})}function o(t){return Object(r["a"])({url:"/kbm/deleteBucket",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/kbm/getFileInfo",method:"post",data:t})}function d(t){return Object(r["a"])({url:"/kbm/deleteDocument",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/kbm/getUrl",method:"post",data:t})}function l(t){return Object(r["a"])({url:"/kbm/updateName",method:"post",data:t})}function p(t){return Object(r["a"])({url:"/kbm/analysis",method:"post",data:t})}function f(t){return Object(r["a"])({url:"/kbm/searchTaskInfo",method:"post",data:t})}function h(t){return Object(r["a"])({url:"/kbm/batchAnalysis",method:"post",data:t})}function m(t){return Object(r["a"])({url:"/kbm/getSuffixName",method:"post",data:t})}function b(t){return Object(r["a"])({url:"/kbm/getRunStatus",method:"post",data:t})}function y(t){return Object(r["a"])({url:"/docType/selectTypeList",method:"post",data:t})}function g(t){return Object(r["a"])({url:"/docType/insertType",method:"post",data:t})}function k(t){return Object(r["a"])({url:"/docType/updateType",method:"post",data:t})}function v(t){return Object(r["a"])({url:"/docType/delete",method:"post",data:t})}function j(t){return Object(r["a"])({url:"/kbm/batchMove",method:"post",data:t})}function x(t){return Object(r["a"])({url:"/docType/selectType0",method:"post",data:t})}},e5b8:function(t,e,n){}}]);