1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-234dc130"],{1065:function(t,e,n){},"424e":function(t,e,n){"use strict";n.d(e,"h",(function(){return o})),n.d(e,"e",(function(){return r})),n.d(e,"l",(function(){return c})),n.d(e,"a",(function(){return u})),n.d(e,"g",(function(){return i})),n.d(e,"c",(function(){return d})),n.d(e,"i",(function(){return l})),n.d(e,"b",(function(){return s})),n.d(e,"m",(function(){return f})),n.d(e,"f",(function(){return m})),n.d(e,"d",(function(){return p})),n.d(e,"j",(function(){return h})),n.d(e,"k",(function(){return g}));var a=n("b775");function o(t){return Object(a["a"])({url:"/document/list",method:"post",data:t})}function r(t){return Object(a["a"])({url:"/document/export",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/document/edit",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/document/add",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/document/info/".concat(t),method:"get"})}function d(t){return Object(a["a"])({url:"/document/dele/".concat(t),method:"get"})}function l(t){return Object(a["a"])({url:"/document/category/search",method:"post",data:t})}function s(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 m(t){return Object(a["a"])({url:"/document/category/info",method:"post",data:t})}function p(t){return Object(a["a"])({url:"/document/category/delete",method:"post",data:t})}function h(t){return Object(a["a"])({url:"/template/searchList",method:"post",data:t})}function g(t){return Object(a["a"])({url:"/document/list",method:"post",data:t})}},"8be6a":function(t,e,n){"use strict";n("1065")},c6b2: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",{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:"dcm_id",label:"ID",align:"center",width:"80"}}),n("el-table-column",{attrs:{prop:"dcm_title",label:"文档标题",align:"left"}}),n("el-table-column",{attrs:{prop:"dcm_type",label:"文档模板类别",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.dcm_type?n("div",[t._v("官方模板")]):t._e(),2==e.row.dcm_type?n("div",[t._v("私有模板")]):t._e(),3==e.row.dcm_type?n("div",[t._v("共享模板")]):t._e()]}}])}),n("el-table-column",{attrs:{prop:"status",label:"文档状态",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[4==e.row.dcm_status?n("div",[t._v("已删除")]):t._e(),5==e.row.dcm_status?n("div",[t._v("启用")]):t._e(),6==e.row.dcm_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.dcm_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.dcm_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)},o=[],r=(n("14d9"),n("ac1f"),n("841c"),n("424e")),c={props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,dcm_title:"",dcm_type:"",isContentShow:!1}}},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;e.$confirm("您是否确认删除该记录?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(n){Object(r["c"])(t).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(r["k"])(t.queryForm).then((function(e){e?(t.dataList=e.data.dataList,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()}}},u=c,i=(n("8be6a"),n("2877")),d=Object(i["a"])(u,a,o,!1,null,null,null);e["default"]=d.exports}}]);
|