1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-674896b0","chunk-6157eab0","chunk-669e4f68","chunk-f287a97a"],{1592: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"}}),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间",align:"center"}}),a("el-table-column",{attrs:{prop:"status",label:"模板状态",align:"center"},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("14d9"),a("ac1f"),a("841c"),a("424e")),u={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("/document/system/document/create?articleId="+t)},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,t.recordCount=e.data.totalRecord,t.pageTotal=e.data.pageTotal,t.loading=!1)})).catch((function(){t.loading=!1}))},ChangePage:function(t){var e=this;e.queryForm.page=t,e.search()}}},c=u,i=(a("e315"),a("2877")),l=Object(i["a"])(c,n,r,!1,null,null,null);e["default"]=l.exports},"424e":function(t,e,a){"use strict";a.d(e,"i",(function(){return r})),a.d(e,"e",(function(){return o})),a.d(e,"m",(function(){return u})),a.d(e,"a",(function(){return c})),a.d(e,"g",(function(){return i})),a.d(e,"c",(function(){return l})),a.d(e,"j",(function(){return s})),a.d(e,"b",(function(){return d})),a.d(e,"n",(function(){return f})),a.d(e,"f",(function(){return m})),a.d(e,"d",(function(){return h})),a.d(e,"k",(function(){return p})),a.d(e,"l",(function(){return b})),a.d(e,"h",(function(){return g}));var n=a("b775");function r(t){return Object(n["a"])({url:"/document/list",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/document/export",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/document/edit",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/document/add",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/document/info/".concat(t),method:"get"})}function l(t){return Object(n["a"])({url:"/document/dele/".concat(t),method:"get"})}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 h(t){return Object(n["a"])({url:"/document/category/delete/".concat(t),method:"get"})}function p(t){return Object(n["a"])({url:"/template/searchList",method:"post",data:t})}function b(t){return Object(n["a"])({url:"/document/list",method:"post",data:t})}function g(t){return Object(n["a"])({url:"/product/getInfoDCPPNO/".concat(t),method:"get"})}},4760: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:"project-search"},[a("dataSearch",{on:{bindSetQuery:t.setQuery}}),a("dataList",{attrs:{queryForm:t.queryForm,allowEdit:t.checkAuth("/document/update"),allowDelete:t.checkAuth("/document/delete")}})],1)},r=[],o=a("5530"),u=a("2f62"),c=a("7369"),i={components:{dataSearch:c["dataSearch"],dataList:c["dataList"]},computed:Object(o["a"])({},Object(u["b"])(["roleInfo","authList"])),data:function(){return{queryForm:{page:1,pageSize:10,title:"",category_id:"",status:""}}},methods:{checkAuth:function(t){return!0},setQuery:function(t){this.queryForm=t}}},l=i,s=(a("9823"),a("2877")),d=Object(s["a"])(l,n,r,!1,null,null,null);e["default"]=d.exports},7369:function(t,e,a){"use strict";a.r(e);var n=a("bfd6");a.d(e,"dataSearch",(function(){return n["default"]}));var r=a("1592");a.d(e,"dataList",(function(){return r["default"]}))},9823:function(t,e,a){"use strict";a("d845")},bfd6: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),a("el-form-item",[a("el-button",{staticClass:"el-icon-circle-plus-outline",attrs:{type:"primary"},on:{click:t.addDocument}},[t._v(" 创建模版")])],1)],1)],1)},r=[],o=(a("14d9"),a("424e")),u={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:[]}},created:function(){this.initCategoryList()},methods:{initCategoryList:function(){var t=this;Object(o["j"])({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("/document/system/document/create")}}},c=u,i=(a("ded3"),a("2877")),l=Object(i["a"])(c,n,r,!1,null,null,null);e["default"]=l.exports},d7be:function(t,e,a){},d845:function(t,e,a){},ded3:function(t,e,a){"use strict";a("e8cf")},e315:function(t,e,a){"use strict";a("d7be")},e8cf:function(t,e,a){}}]);
|