text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b8164b38"],{"454f":function(e,t,i){i("46a7");var n=i("584a").Object;e.exports=function(e,t,i){return n.defineProperty(e,t,i)}},"456d":function(e,t,i){var n=i("4bf8"),l=i("0d58");i("5eda")("keys",(function(){return function(e){return l(n(e))}}))},"46a7":function(e,t,i){var n=i("63b6");n(n.S+n.F*!i("8e60"),"Object",{defineProperty:i("d9f6").f})},"49a0":function(e,t,i){"use strict";var n=i("588e"),l=i.n(n);l.a},"588e":function(e,t,i){},"5eda":function(e,t,i){var n=i("5ca1"),l=i("8378"),a=i("79e5");e.exports=function(e,t){var i=(l.Object||{})[e]||Object[e],o={};o[e]=t(i),n(n.S+n.F*a((function(){i(1)})),"Object",o)}},"66b4":function(e,t,i){var n={"./SysBasic.vue":"8d67","./SysUpload.vue":"a733"};function l(e){var t=a(e);return i(t)}function a(e){if(!i.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}l.keys=function(){return Object.keys(n)},l.resolve=a,e.exports=l,l.id="66b4"},"85f2":function(e,t,i){e.exports=i("454f")},"8d67":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",[i("div",{staticStyle:{display:"flex","min-width":"530px"}},[i("el-input",{staticStyle:{width:"380px","margin-right":"10px"},attrs:{placeholder:"请输入文件标题进行搜索，可以直接回车搜索...","prefix-icon":"el-icon-search",clearable:"",disabled:e.showAdvanceSearchView},on:{clear:e.initDocuments},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.initDocuments(t)}},model:{value:e.searchValue.title,callback:function(t){e.$set(e.searchValue,"title",t)},expression:"searchValue.title"}}),i("el-button",{attrs:{icon:"el-icon-search",type:"primary",disabled:e.showAdvanceSearchView},on:{click:e.initDocuments}},[e._v("\n                搜索\n            ")])],1)]),i("div",{staticStyle:{"margin-top":"10px","min-width":"600px"}},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.documents,model:e.power,stripe:"",border:"","element-loading-text":"正在加载...","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)"}},[i("el-table-column",{attrs:{type:"selection",width:"50"}}),i("el-table-column",{attrs:{prop:"id",align:"left",label:"id",width:"50"}}),i("el-table-column",{attrs:{prop:"title",align:"left",label:"文件标题",width:"120"}}),i("el-table-column",{attrs:{prop:"remark",label:"文件描述",align:"left",width:"150"}}),i("el-table-column",{attrs:{prop:"fileName",label:"文件名称",align:"left",width:"200"}}),i("el-table-column",{attrs:{prop:"fileType",label:"文件类型",width:"100",align:"left"}}),i("el-table-column",{attrs:{prop:"fileSize",label:"文件大小(字节)",width:"100",align:"left"}}),i("el-table-column",{attrs:{prop:"createDate",label:"创建时间",width:"100",align:"left"}}),i("el-table-column",{attrs:{prop:"user.loginname",label:"上传用户",width:"100",align:"left"}}),i("el-table-column",{attrs:{align:"left",width:"150",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{staticStyle:{padding:"3px"},attrs:{disabled:!e.power,type:"primary",size:"mini"},on:{click:function(i){return e.showEditDocuView(t.row)}}},[e._v("编辑")]),i("el-button",{staticStyle:{padding:"3px"},attrs:{disabled:!e.power,size:"mini",type:"danger"},on:{click:function(i){return e.deleteEmp(t.row)}}},[e._v("删除")]),i("el-button",{staticStyle:{padding:"3px"},attrs:{size:"mini"},on:{click:function(i){return e.downloadDocument(t.row)}}},[e._v("下载")])]}}])})],1),i("div",{staticStyle:{display:"flex","justify-content":"flex-end","min-width":"600px"}},[i("el-pagination",{attrs:{background:"","page-sizes":[5,10,15,20],"page-size":5,layout:"sizes, prev, pager, next, jumper, ->, total, slot",total:e.total},on:{"current-change":e.currentChange,"size-change":e.sizeChange}})],1)],1),i("el-dialog",{attrs:{title:e.title,visible:e.dialogVisible,width:"360px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("div",[i("el-form",{ref:"editDocument",attrs:{model:e.editDocument,rules:e.rules}},[i("el-row",{staticStyle:{"text-align":"center"}},[i("el-col",[i("el-form-item",{attrs:{label:"文件标题:",prop:"title"}},[i("el-input",{staticStyle:{width:"250px"},attrs:{size:"small ",maxlength:"20","prefix-icon":"el-icon-edit",placeholder:"请输入标题"},model:{value:e.editDocument.title,callback:function(t){e.$set(e.editDocument,"title",t)},expression:"editDocument.title"}})],1)],1)],1),i("el-row",[i("el-col",[i("el-form-item",{attrs:{label:"文件描述:",prop:"remark"}},[i("el-input",{staticStyle:{width:"250px"},attrs:{size:"small ",maxlength:"100","prefix-icon":"el-icon-edit",placeholder:"请输入对文件的描述"},model:{value:e.editDocument.remark,callback:function(t){e.$set(e.editDocument,"remark",t)},expression:"editDocument.remark"}})],1)],1)],1),i("el-row",[i("el-col",[i("el-form-item",{attrs:{label:"文件名称:",prop:"fileName"}},[i("el-input",{staticStyle:{width:"200px"},attrs:{size:"small ",maxlength:"32","prefix-icon":"el-icon-edit",disabled:!0},model:{value:e.editDocument.fileName,callback:function(t){e.$set(e.editDocument,"fileName",t)},expression:"editDocument.fileName"}})],1)],1)],1),i("el-row",[i("el-col",[i("el-form-item",{attrs:{label:"文件类型:",prop:"fileType"}},[i("el-input",{staticStyle:{width:"150px"},attrs:{size:"small ",maxlength:"32","prefix-icon":"el-icon-edit",disabled:!0},model:{value:e.editDocument.fileType,callback:function(t){e.$set(e.editDocument,"fileType",t)},expression:"editDocument.fileType"}})],1)],1)],1),i("el-row",[i("el-col",[i("el-form-item",{attrs:{label:"文件大小:",prop:"fileSize"}},[i("el-input",{staticStyle:{width:"150px"},attrs:{size:"small ",maxlength:"32","prefix-icon":"el-icon-edit",disabled:!0},model:{value:e.editDocument.fileSize,callback:function(t){e.$set(e.editDocument,"fileSize",t)},expression:"editDocument.fileSize"}})],1)],1)],1),i("el-row",[i("el-col",[i("el-form-item",{attrs:{label:"上传时间:",prop:"createDate"}},[i("el-input",{staticStyle:{width:"150px"},attrs:{size:"small ",maxlength:"32","prefix-icon":"el-icon-edit",disabled:!0},model:{value:e.editDocument.createDate,callback:function(t){e.$set(e.editDocument,"createDate",t)},expression:"editDocument.createDate"}})],1)],1)],1),i("el-row",[i("el-col",[i("el-form-item",{attrs:{label:"上传用户:",prop:"user.loginname"}},[i("el-input",{staticStyle:{width:"150px"},attrs:{size:"small ",maxlength:"32","prefix-icon":"el-icon-edit",disabled:!0},model:{value:e.editDocument.user.loginname,callback:function(t){e.$set(e.editDocument.user,"loginname",t)},expression:"editDocument.user.loginname"}})],1)],1)],1)],1)],1),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),i("el-button",{attrs:{type:"primary"},on:{click:e.doAddDocument}},[e._v("确 定")])],1)])],1)},l=[],a=(i("8e6e"),i("ac6a"),i("456d"),i("a481"),i("bd86"));function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(i,!0).forEach((function(t){Object(a["a"])(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(i).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var s={name:"SysBasic",data:function(){return{searchValue:{title:""},title:"",showAdvanceSearchView:!1,documents:[],loading:!1,dialogVisible:!1,total:0,page:1,keyword:"",size:5,editDocument:{id:null,title:"",remark:"",fileName:"",filePath:"",fileType:"",fileSize:"",isDelete:"",createDate:"",userId:"",user:{id:null,loginname:""}},power:1!=JSON.parse(window.sessionStorage.getItem("user")).status,rules:{title:[{message:"请输入文件标题！",trigger:"blur"}],remark:[{message:"请输入对文件的描述！",trigger:"blur"}]}}},mounted:function(){this.initDocuments()},methods:{emptyDocument:function(){this.editDocument={id:null,title:"",remark:"",fileName:"",filePath:"",fileType:"",fileSize:"",isDelete:"",createDate:"",userId:"",user:{id:null,loginname:""}}},sizeChange:function(e){this.size=e,this.initDocuments()},currentChange:function(e){this.page=e,this.initDocuments()},showEditDocuView:function(e){this.title="编辑文件信息",this.editDocument=r({},e),this.dialogVisible=!0},downloadDocument:function(e){window.location.href="/document/basic/download/?token="+window.localStorage.getItem("token")+"&fileName="+e.fileName},deleteEmp:function(e){var t=this;this.$confirm("此操作将永久删除【"+e.fileName+"】, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.deleteRequest("/document/basic/",e).then((function(e){20000402===e.status?t.$router.replace("/"):200===e.status&&t.initDocuments()}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},doAddDocument:function(){var e=this;this.editDocument.id&&this.$refs["editDocument"].validate((function(t){var i=e;t&&e.putRequest("/document/basic/",i.editDocument).then((function(t){20000402===t.status?e.$router.replace("/"):200===t.status&&(i.dialogVisible=!1,i.initDocuments())}))}))},initDocuments:function(e){var t=this;this.loading=!0;var i="/document/basic/?page="+this.page+"&size="+this.size;i+="&title="+this.searchValue.title,this.getRequest(i).then((function(e){t.loading=!1,20000402===e.status?t.$router.replace("/"):200===e.status?(t.documents=e.obj.data,t.total=e.obj.total):200!=e.status&&(t.documents=null,t.total=0)}))}}},c=s,u=(i("49a0"),i("2877")),d=Object(u["a"])(c,n,l,!1,null,null,null);t["default"]=d.exports},"8e6e":function(e,t,i){var n=i("5ca1"),l=i("990b"),a=i("6821"),o=i("11e9"),r=i("f1ae");n(n.S,"Object",{getOwnPropertyDescriptors:function(e){var t,i,n=a(e),s=o.f,c=l(n),u={},d=0;while(c.length>d)i=s(n,t=c[d++]),void 0!==i&&r(u,t,i);return u}})},"990b":function(e,t,i){var n=i("9093"),l=i("2621"),a=i("cb7c"),o=i("7726").Reflect;e.exports=o&&o.ownKeys||function(e){var t=n.f(a(e)),i=l.f;return i?t.concat(i(e)):t}},a733:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticStyle:{display:"flex","justify-content":"space-between",margin:"30px 10px"}},[i("div",{staticStyle:{border:"2px solid skyblue",padding:"20px",width:"30%","min-width":"432px"}},[i("el-form",{ref:"documentContent",attrs:{model:e.documentContent,rules:e.rules}},[i("el-form-item",{attrs:{label:"文档标题:",prop:"title"}},[i("el-input",{staticStyle:{"font-size":"20px"},attrs:{type:"text",placeholder:"请输入文档标题",maxlength:"30","show-word-limit":""},model:{value:e.documentContent.title,callback:function(t){e.$set(e.documentContent,"title",t)},expression:"documentContent.title"}})],1),i("el-form-item",{attrs:{label:"文档描述:",prop:"remark"}},[i("el-input",{staticStyle:{"font-size":"20px"},attrs:{type:"textarea",rows:8,placeholder:"请输入文档描述",maxlength:"300","show-word-limit":""},model:{value:e.documentContent.remark,callback:function(t){e.$set(e.documentContent,"remark",t)},expression:"documentContent.remark"}})],1),i("el-form-item",{attrs:{label:"文档内容:",prop:"content"}},[i("el-upload",{ref:"upload",staticClass:"upload",attrs:{drag:"",action:e.uploadFileUrl,"before-upload":e.beforeUpload,"auto-upload":!1,"on-success":e.uploadSuccess,"on-change":e.changeFile,"on-error":e.uploadError,data:e.documentData,headers:e.myHeader,limit:"1"}},[i("i",{staticClass:"el-icon-upload"}),i("div",{staticClass:"el-upload__text"},[e._v("将文件拖到此处，或"),i("em",[e._v("点击上传")])]),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("每次只能上传单个文件，且不超过10MB")])])],1)],1),i("span",{staticClass:"dialog-footer",staticStyle:{float:"right"},attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.cancel}},[e._v("取 消")]),i("el-button",{on:{click:function(t){return e.resetForm("documentContent")}}},[e._v("重置")]),i("el-button",{attrs:{type:"primary"},on:{click:e.doAddDocument}},[e._v("确 定")])],1)],1)])},l=[],a=(i("7f7f"),i("a481"),{name:"SysUpload",data:function(){return{text:"",textarea:"",documentContent:{id:null,title:"",remark:""},uploadFileUrl:"/document/basic/",isHaveFile:!1,rules:{title:[{message:"请输入文档标题！",trigger:"blur"}],remark:[{message:"请输入文档描述！",trigger:"blur"}]}}},computed:{myHeader:function(){return{token:window.localStorage.getItem("token")}},documentData:function(){return{title:this.documentContent.title,remark:this.documentContent.remark}}},methods:{resetForm:function(e){this.$refs.upload.clearFiles(),this.$refs[e].resetFields()},doAddDocument:function(){var e=this;this.$refs["documentContent"].validate((function(t){if(t){if(!e.isHaveFile)return e.$message({message:"请您选择上传的文件！",type:"warning"});e.$refs.upload.submit()}}))},cancel:function(){this.$router.replace("/home")},beforeUpload:function(e){var t="application/vnd.ms-excel"===e.type,i="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===e.type;return t|i},uploadSuccess:function(e){20000402===e.status?this.$router.replace("/"):200===e.status?(this.documentContent.id=null,this.documentContent.title="",this.documentContent.remark="",this.$message({message:"上传成功",type:"success"})):400===e.status?this.$message({message:e.msg,type:"warning"}):this.$message.error("上传失败，请重新上传"),this.$refs.upload.clearFiles(),this.isHaveFile=!1},uploadError:function(){this.$refs.upload.clearFiles(),this.$message.error("上传失败，请重新上传")},changeFile:function(e){var t=this;"ready"==e.status&&this.$prompt("请输入上传后的文件名","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:e.name}).then((function(i){var n=i.value;e.name=n,t.isHaveFile=!0})).catch((function(){t.$refs.upload.clearFiles(),t.$message({type:"info",message:"取消文件上传"})}))}}}),o=a,r=i("2877"),s=Object(r["a"])(o,n,l,!1,null,null,null);t["default"]=s.exports},bd86:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i("85f2"),l=i.n(n);function a(e,t,i){return t in e?l()(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}},f1ae:function(e,t,i){"use strict";var n=i("86cc"),l=i("4630");e.exports=function(e,t,i){t in e?n.f(e,t,l(0,i)):e[t]=i}}}]);
  //# sourceMappingURL=chunk-b8164b38.f5a58d2e.js.map