chunk-ba9ad5c8.3f3b5513.js 8.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ba9ad5c8","chunk-4af01459","chunk-3e29f7a6"],{2593:function(t,e,a){},"3acb":function(t,e,a){"use strict";a("6a5f")},"424e":function(t,e,a){"use strict";a.d(e,"h",(function(){return r})),a.d(e,"e",(function(){return o})),a.d(e,"l",(function(){return i})),a.d(e,"a",(function(){return c})),a.d(e,"g",(function(){return u})),a.d(e,"c",(function(){return l})),a.d(e,"i",(function(){return s})),a.d(e,"b",(function(){return d})),a.d(e,"m",(function(){return f})),a.d(e,"f",(function(){return m})),a.d(e,"d",(function(){return p})),a.d(e,"j",(function(){return h})),a.d(e,"k",(function(){return b}));var n=a("b775");function r(t){return Object(n["a"])({url:"/document/pageDocument",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/document/export",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/document/update",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/document/create",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/document/info",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/document/delete",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/document/category/search",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/document/category/create",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/document/category/update",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/document/category/info",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/document/category/delete",method:"post",data:t})}function h(t){return Object(n["a"])({url:"/template/searchList",method:"post",data:t})}function b(t){return Object(n["a"])({url:"/document/searchlistDoc",method:"post",data:t})}},"6a5f":function(t,e,a){},a843:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-search"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.queryForm}},[a("el-form-item",{attrs:{label:"文档标题:"}},[a("el-input",{attrs:{placeholder:"请填写文档标题"},model:{value:t.queryForm.title,callback:function(e){t.$set(t.queryForm,"title",e)},expression:"queryForm.title"}})],1),a("el-form-item",{attrs:{label:"所属分类:"}},[a("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 a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),a("el-form-item",{attrs:{label:"文档状态:"}},[a("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 a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[a("svg-icon",{attrs:{"icon-class":"search"}}),t._v(" 搜索")],1)],1),t.createNewDocument?a("el-form-item",[a("el-button",{staticClass:"el-icon-circle-plus-outline",attrs:{type:"primary"},on:{click:t.addDocument}},[t._v("创建文档")])],1):t._e()],1)],1)},r=[],o=(a("7db0"),a("14d9"),a("d3b7"),a("0643"),a("fffc"),a("424e")),i={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:!0}},created:function(){this.initCategoryList(),this.checkCreatePermission()},methods:{checkCreatePermission:function(){this.$store.state.user.authList.find((function(t){return"createNewDocument"===t.code}))},initCategoryList:function(){var t=this;Object(o["i"])({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(){this.$router.push("system/document/create?type=document")}}},c=i,u=(a("f212"),a("2877")),l=Object(u["a"])(c,n,r,!1,null,null,null);e["default"]=l.exports},b792:function(t,e,a){"use strict";a.r(e);var n=a("a843");a.d(e,"dataSearch",(function(){return n["default"]}));var r=a("c6b2");a.d(e,"dataList",(function(){return r["default"]}))},c6b2:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"data-list",attrs:{"element-loading-text":"加载中..."}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.dataList,"header-row-class-name":"headerBg","empty-text":"没有文档信息"}},[a("el-table-column",{attrs:{prop:"id",label:"ID",align:"center",width:"80"}}),a("el-table-column",{attrs:{prop:"title",label:"文档名称",align:"left","min-width":"180"}}),a("el-table-column",{attrs:{prop:"user_name",label:"创建人",align:"center",width:"150"}}),a("el-table-column",{attrs:{prop:"type_name",label:"所属分类",align:"center",width:"150"}}),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间",align:"center",width:"150"}}),a("el-table-column",{attrs:{prop:"status",label:"文档状态",align:"center",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[5==e.row.status?a("div",[t._v("启用")]):t._e(),6==e.row.status?a("div",[t._v("停用")]):t._e()]}}])}),a("el-table-column",{attrs:{label:"操作",align:"center",width:t.editWidth()},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"btns"},[t.allowEdit?a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(a){return t.btnEdit(e.row.id)}}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("编辑")],1):t._e(),t.allowDelete?a("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(a){return t.btnDelete(e.row.id)}}},[a("svg-icon",{attrs:{"icon-class":"delete"}}),t._v("删除")],1):t._e()],1)]}}])})],1),a("div",{staticClass:"page-info"},[a("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)},r=[],o=(a("4de4"),a("14d9"),a("d3b7"),a("ac1f"),a("841c"),a("0643"),a("2382"),a("424e")),i={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,a={id:t};e.$confirm("您是否确认删除该记录?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(t){Object(o["c"])(a).then((function(t){e.search()}))})).catch((function(){}))},searchData:function(){var t=this;t.dialogVisible=!1,t.search()},btnEdit:function(t){this.$router.push("system/document/create?articleId="+t+"&type=document")},handleClose:function(){var t=this;t.currentData={},t.dialogVisible=!1},search:function(){var t=this;t.loading=!0,Object(o["k"])(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()}}},c=i,u=(a("3acb"),a("2877")),l=Object(u["a"])(c,n,r,!1,null,null,null);e["default"]=l.exports},f212:function(t,e,a){"use strict";a("2593")}}]);