chunk-2043d8d9.19e22885.js 6.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2043d8d9"],{"1f42":function(t,e,n){},"5da8":function(t,e,n){"use strict";n("1f42")},a3c0:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"ledge_box"},[n("div",{staticClass:"data-search"},[n("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.queryForm}},[n("el-form-item",[n("el-button",{attrs:{type:"success"},on:{click:t.onCreate}},[n("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("创建知识库")],1)],1)],1)],1),n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"data-list",attrs:{"element-loading-text":"加载中..."}},[n("el-row",t._l(t.buckList,(function(e,a){return n("el-col",{key:a,staticClass:"card-col",attrs:{span:4,offset:a>0&&a%5!==0?1:0}},[n("el-card",{attrs:{"body-style":{padding:"0px"},shadow:"never"}},[n("div",{staticClass:"card_box"},[n("div",{staticClass:"box_content",on:{click:function(n){return t.getInfo(e)}}},[n("div",{staticClass:"header"},[n("div",{staticClass:"header_left"},[n("svg-icon",{staticStyle:{width:"34px",height:"34px"},attrs:{"icon-class":"header"}})],1),n("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[n("el-button",{attrs:{type:"danger",icon:"el-icon-delete"},on:{click:function(n){return t.delect(e)}}},[t._v("删除")]),n("div",{staticClass:"header_right",attrs:{slot:"reference"},slot:"reference"},[n("svg-icon",{staticStyle:{width:"24px",height:"30px"},attrs:{"icon-class":"sand"}})],1)],1)],1),n("div",{staticClass:"content"},[t._v(" "+t._s(e.name)+" ")]),n("div",{staticClass:"footer"},[n("div",{staticClass:"file"},[n("svg-icon",{staticStyle:{width:"18px",height:"18px",filter:"grayscale(100%)"},attrs:{"icon-class":"word"}}),t._v(" "+t._s(e.doc_num)+" ")],1),n("div",{staticClass:"date"},[n("svg-icon",{staticStyle:{width:"18px",height:"18px",filter:"grayscale(100%)"},attrs:{"icon-class":"date"}}),t._v(" "+t._s(e.create_time)+" ")],1)])])])])],1)})),1)],1),n("el-dialog",{attrs:{title:"创建知识库",visible:t.dialogVisible,width:"30%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("el-form",{ref:"creatRef",attrs:{model:t.creatForm,rules:t.creatRules}},[n("el-form-item",{attrs:{label:"知识库名称:",prop:"bucket_name"}},[n("el-input",{attrs:{placeholder:"请输入内容"},model:{value:t.creatForm.bucket_name,callback:function(e){t.$set(t.creatForm,"bucket_name",e)},expression:"creatForm.bucket_name"}})],1)],1),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:t.handleClose}},[t._v("取 消")]),n("el-button",{attrs:{type:"primary"},on:{click:t.submitBuck}},[t._v("确 定")])],1)],1)],1)},o=[],i=n("5530"),r=(n("d81d"),n("d3b7"),n("ac1f"),n("00b4"),n("db6a")),c=n("2f62"),s={name:"Dashboard",data:function(){return{loading:!0,queryForm:{},buckList:[],visible:!1,dialogVisible:!1,creatForm:{bucket_name:""},creatRules:{bucket_name:[{required:!0,message:"请输入知识库名称",trigger:"blur"}]}}},computed:Object(i["a"])({},Object(c["b"])(["roles"])),created:function(){},mounted:function(){this.onSubmit()},methods:{onCreate:function(t){this.creatForm={bucket_name:"",user_id:this.$store.state.user.id},this.dialogVisible=!0},onClose:function(t){this.dialogVisible=!1,this.onSubmit()},onSubmit:function(){var t=this;this.loading=!0,Object(r["l"])({user_id:this.$store.state.user.id}).then((function(e){200===e.status&&(e.data.map((function(t){t.visible=!1})),t.buckList=e.data)})).finally((function(){t.loading=!1}))},delect:function(t){var e=this;this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["e"])({bucket_id:t.id}).then((function(t){e.$message({type:"success",message:"删除成功!"}),e.onSubmit()}))})).catch((function(){e.$message({type:"info",message:"已取消删除"})}))},handleClose:function(t){this.creatForm={},t()},submitBuck:function(){var t=this;this.$refs.creatRef.validate((function(e){e?Object(r["d"])(t.creatForm).then((function(e){200===e.status&&(t.dialogVisible=!1,t.onSubmit(),t.creatForm={})})):t.$message.error("请填写知识库名称")}))},getInfo:function(t){console.log(t.id),this.$router.push({path:"/knowledge/category/knowledgeSet",query:{id:t.id}})}}},u=s,d=(n("5da8"),n("2877")),l=Object(d["a"])(u,a,o,!1,null,"26c5e21c",null);e["default"]=l.exports},db6a:function(t,e,n){"use strict";n.d(e,"l",(function(){return o})),n.d(e,"d",(function(){return i})),n.d(e,"e",(function(){return r})),n.d(e,"h",(function(){return c})),n.d(e,"f",(function(){return s})),n.d(e,"m",(function(){return u})),n.d(e,"n",(function(){return d})),n.d(e,"a",(function(){return l})),n.d(e,"o",(function(){return f})),n.d(e,"b",(function(){return m})),n.d(e,"j",(function(){return b})),n.d(e,"i",(function(){return h})),n.d(e,"q",(function(){return p})),n.d(e,"k",(function(){return g})),n.d(e,"r",(function(){return v})),n.d(e,"g",(function(){return k})),n.d(e,"c",(function(){return y})),n.d(e,"p",(function(){return _}));var a=n("b775");function o(t){return Object(a["a"])({url:"/kbm/selectBucketInfo",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/minio/createBucket",method:"post",data:t})}function r(t){return Object(a["a"])({url:"/kbm/deleteBucket",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/kbm/getFileInfo",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/kbm/deleteDocument",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/kbm/getUrl",method:"post",data:t})}function d(t){return Object(a["a"])({url:"/kbm/updateName",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/kbm/analysis",method:"post",data:t})}function f(t){return Object(a["a"])({url:"/kbm/searchTaskInfo",method:"post",data:t})}function m(t){return Object(a["a"])({url:"/kbm/batchAnalysis",method:"post",data:t})}function b(t){return Object(a["a"])({url:"/kbm/getSuffixName",method:"post",data:t})}function h(t){return Object(a["a"])({url:"/kbm/getRunStatus",method:"post",data:t})}function p(t){return Object(a["a"])({url:"/docType/selectTypeList",method:"post",data:t})}function g(t){return Object(a["a"])({url:"/docType/insertType",method:"post",data:t})}function v(t){return Object(a["a"])({url:"/docType/updateType",method:"post",data:t})}function k(t){return Object(a["a"])({url:"/docType/delete",method:"post",data:t})}function y(t){return Object(a["a"])({url:"/kbm/batchMove",method:"post",data:t})}function _(t){return Object(a["a"])({url:"/docType/selectType0",method:"post",data:t})}}}]);