chunk-4ac7f82e.249ab73a.js 9.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4ac7f82e"],{2210:function(t,e,n){},"424e":function(t,e,n){"use strict";n.d(e,"k",(function(){return r})),n.d(e,"m",(function(){return o})),n.d(e,"e",(function(){return c})),n.d(e,"r",(function(){return u})),n.d(e,"a",(function(){return i})),n.d(e,"i",(function(){return l})),n.d(e,"c",(function(){return s})),n.d(e,"n",(function(){return d})),n.d(e,"b",(function(){return m})),n.d(e,"s",(function(){return f})),n.d(e,"h",(function(){return p})),n.d(e,"d",(function(){return h})),n.d(e,"o",(function(){return b})),n.d(e,"p",(function(){return g})),n.d(e,"g",(function(){return y})),n.d(e,"j",(function(){return v})),n.d(e,"q",(function(){return w})),n.d(e,"l",(function(){return _})),n.d(e,"f",(function(){return j}));var a=n("b775");function r(t){return Object(a["a"])({url:"/document/pageDocument",method:"post",data:t})}function o(t){return Object(a["a"])({url:"/document/search",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/document/export",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/document/update",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/document/create",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/document/info",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/document/delete",method:"post",data:t})}function d(t){return Object(a["a"])({url:"/document/category/search",method:"post",data:t})}function m(t){return Object(a["a"])({url:"/document/category/create",method:"post",data:t})}function f(t){return Object(a["a"])({url:"/document/category/update",method:"post",data:t})}function p(t){return Object(a["a"])({url:"/document/category/info",method:"post",data:t})}function h(t){return Object(a["a"])({url:"/document/category/delete",method:"post",data:t})}function b(t){return Object(a["a"])({url:"/template/searchList",method:"post",data:t})}function g(t){return Object(a["a"])({url:"/document/searchlistDoc",method:"post",data:t})}function y(t){return Object(a["a"])({url:"document/exportToPDF",method:"post",data:t})}function v(t){return Object(a["a"])({url:"/document/htmlWordNew",method:"post",data:t})}function w(t){return Object(a["a"])({url:"/document/searchlistDocTemplate",method:"post",data:t})}function _(t){return Object(a["a"])({url:"/document/content/query",method:"get",params:t})}function j(t){return Object(a["a"])({url:"/document/content/export_qa_to_excel/",method:"post",data:t,headers:{"Content-Type":"application/json"}})}},"66d8":function(t,e,n){"use strict";n("bb02")},"6bd3":function(t,e,n){"use strict";n("6f60")},"6f60":function(t,e,n){},7504:function(t,e,n){"use strict";n("2210")},"7d918":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:"project-search"},[n("dataSearch",{on:{bindSetQuery:t.setQuery}}),n("dataList",{attrs:{queryForm:t.queryForm,allowEdit:t.checkAuth("/document/update"),allowDelete:t.checkAuth("/document/delete")}})],1)},r=[],o=n("5530"),c=n("2f62"),u=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"data-search"},[n("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.queryForm}},[n("el-form-item",{attrs:{label:"文档标题:"}},[n("el-input",{attrs:{placeholder:"请填写文档标题"},model:{value:t.queryForm.title,callback:function(e){t.$set(t.queryForm,"title",e)},expression:"queryForm.title"}})],1),n("el-form-item",{attrs:{label:"所属分类:"}},[n("el-select",{staticClass:"m-2",attrs:{clearable:"",placeholder:"请选择分类",size:"large"},model:{value:t.queryForm.category_id,callback:function(e){t.$set(t.queryForm,"category_id",e)},expression:"queryForm.category_id"}},t._l(t.categoryList,(function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),n("el-form-item",{attrs:{label:"文档状态:"}},[n("el-select",{staticClass:"m-2",attrs:{placeholder:"请选择文档状态",size:"large"},model:{value:t.queryForm.status,callback:function(e){t.$set(t.queryForm,"status",e)},expression:"queryForm.status"}},t._l(t.statusOptions,(function(t){return n("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[n("svg-icon",{attrs:{"icon-class":"search"}}),t._v(" 搜索")],1)],1),t.createNewDocument?n("el-form-item",[n("el-button",{staticClass:"el-icon-circle-plus-outline",attrs:{type:"primary"},on:{click:t.addDocument}},[t._v("创建文档")])],1):t._e()],1)],1)},i=[],l=(n("7db0"),n("d3b7"),n("424e")),s={props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,title:"",category_id:"",status:""}}}},data:function(){return{statusOptions:[{value:"",label:"请选择状态"},{value:5,label:"启用"},{value:6,label:"停用"}],dialogVisible:!1,categoryList:[],createNewDocument:!1}},created:function(){this.initCategoryList(),this.checkCreatePermission()},methods:{checkCreatePermission:function(){var t=this.$store.state.user.authList.find((function(t){return"createNewDocument"===t.code}));this.createNewDocument=!!t},initCategoryList:function(){var t=this;Object(l["n"])({page:1,pageSize:999,status:5}).then((function(e){200==e.status&&(t.categoryList=e.data.dataList)}))},onCreate:function(t){this.dialogVisible=!0},onSubmit:function(){this.$emit("bindSetQuery",this.$props.queryForm)},addDocument:function(){var t=document.createElement("a");t.href="#/document/create?type=document",t.target="_blank",t.click()}}},d=s,m=(n("7504"),n("2877")),f=Object(m["a"])(d,u,i,!1,null,null,null),p=f.exports,h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"data-list",attrs:{"element-loading-text":"加载中..."}},[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.dataList,"header-row-class-name":"headerBg","empty-text":"没有文档信息"}},[n("el-table-column",{attrs:{prop:"id",label:"ID",align:"center",width:"80"}}),n("el-table-column",{attrs:{prop:"title",label:"文档名称",align:"left","min-width":"180"}}),n("el-table-column",{attrs:{prop:"user_name",label:"创建人",align:"center",width:"150"}}),n("el-table-column",{attrs:{prop:"type_name",label:"所属分类",align:"center",width:"150"}}),n("el-table-column",{attrs:{prop:"create_time",label:"创建时间",align:"center",width:"150"}}),n("el-table-column",{attrs:{prop:"status",label:"文档状态",align:"center",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[5==e.row.status?n("div",[t._v("启用")]):t._e(),6==e.row.status?n("div",[t._v("停用")]):t._e()]}}])}),n("el-table-column",{attrs:{label:"操作",align:"center",width:t.editWidth()},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"btns"},[t.allowEdit?n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(n){return t.btnEdit(e.row.id)}}},[n("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("编辑")],1):t._e(),t.allowDelete?n("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(n){return t.btnDelete(e.row.id)}}},[n("svg-icon",{attrs:{"icon-class":"delete"}}),t._v("删除")],1):t._e()],1)]}}])})],1),n("div",{staticClass:"page-info"},[n("el-pagination",{attrs:{currentPage:t.queryForm.page,"page-size":t.queryForm.pageSize,total:t.recordCount,"page-count":t.pageTotal,background:"",layout:"prev, pager, next"},on:{"current-change":t.ChangePage}})],1)],1)},b=[],g=(n("4de4"),n("ac1f"),n("841c"),{props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,title:"",category_id:"",status:""}}},allowEdit:{type:Boolean,default:!1},allowDelete:{type:Boolean,default:!1}},watch:{queryForm:{handler:function(t){this.search()},deep:!0}},data:function(){return{loading:!1,dialogVisible:!1,currentDataId:0,recordCount:0,pageTotal:1,dataList:[],currentData:{}}},mounted:function(){this.search()},methods:{editWidth:function(){return this.allowDelete&&this.allowEdit?200:this.allowDelete||this.allowEdit?120:100},onFocusVal:function(t){var e=this;e.currentDataId=t.target.dataset.id},onChangeVal:function(t){var e=this;e.currentDataId},btnDelete:function(t){var e=this,n={id:t};e.$confirm("您是否确认删除该记录?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(t){Object(l["c"])(n).then((function(t){e.search()}))})).catch((function(){}))},searchData:function(){var t=this;t.dialogVisible=!1,t.search()},btnEdit:function(t){var e=document.createElement("a");e.href="#/document/create?articleId="+t+"&type=document",e.target="_blank",e.click()},handleClose:function(){var t=this;t.currentData={},t.dialogVisible=!1},search:function(){var t=this;t.loading=!0,Object(l["p"])(t.queryForm).then((function(e){e?(t.dataList=e.data.dataList.filter((function(t){return 0==t.is_template})),t.recordCount=e.data.totalRecord,t.pageTotal=e.data.pageTotal,t.loading=!1):t.loading=!1})).catch((function(){t.loading=!1}))},ChangePage:function(t){var e=this;e.queryForm.page=t,e.search()}}}),y=g,v=(n("6bd3"),Object(m["a"])(y,h,b,!1,null,null,null)),w=v.exports,_={components:{dataSearch:p,dataList:w},computed:Object(o["a"])({},Object(c["b"])(["roleInfo","authList"])),data:function(){return{queryForm:{page:1,pageSize:10,title:"",category_id:"",status:""}}},methods:{checkAuth:function(t){return this.roleInfo.is_admin,!0},setQuery:function(t){this.queryForm=t}}},j=_,O=(n("66d8"),Object(m["a"])(j,a,r,!1,null,null,null));e["default"]=O.exports},bb02:function(t,e,n){}}]);