chunk-3ad4dc2b.29bdb990.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3ad4dc2b","chunk-44d2f148","chunk-158b492d","chunk-fd1f7dea"],{"0969":function(t,e,a){"use strict";a.r(e);var n=a("80a6");a.d(e,"dataSearch",(function(){return n["default"]}));var o=a("2378");a.d(e,"dataList",(function(){return o["default"]}));var r=a("982f");a.d(e,"dataInfo",(function(){return r["default"]}))},2378: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-list"},[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:"name",label:"分类名称",align:"left",width:"180"}}),a("el-table-column",{attrs:{prop:"intro",label:"介绍",align:"left","min-width":"180"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间",align:"center",width:"180"}}),a("el-table-column",{attrs:{prop:"status",label:"分类状态",align:"center",width:"180"},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:"操作",fixed:"right",align:"center",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"btns"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(a){return t.btnEdit(e.row)}}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("编辑")],1),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)],1)]}}])})],1),a("div",{staticClass:"page-info"},[a("el-pagination",{attrs:{"page-size":t.queryForm.pageSize,total:t.recordCount,"page-count":t.pageTotal,background:"",layout:"prev, pager, next"},on:{"current-change":t.ChangePage},model:{value:t.queryForm.page,callback:function(e){t.$set(t.queryForm,"page",e)},expression:"queryForm.page"}})],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.dialogVisible,"append-to-body":"",width:"50%","custom-class":"prod-verify",title:"修改文档分类"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("dataInfo",{attrs:{id:t.currentDataId},on:{onClose:t.onClose}})],1)],1)},o=[],r=(a("ac1f"),a("841c"),a("424e")),i=a("982f"),l=a("a888"),u={components:{dataInfo:i["default"]},directives:{elDragDialog:l["a"]},props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,name:"",status:""}}}},watch:{queryForm:{handler:function(t){this.search()},deep:!0}},data:function(){return{dialogVisible:!1,currentDataId:0,recordCount:0,pageTotal:1,dataList:[],currentData:{}}},mounted:function(){this.search()},methods:{onSearchSub:function(t){var e=this;e.queryForm.page=1,e.search()},searchData:function(){var t=this;t.dialogVisible=!1,t.search()},btnDelete:function(t){var e=this,a={id:t};e.$confirm("您是否确认删除该记录?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(t){Object(r["d"])(a).then((function(t){e.search()}))})).catch((function(){}))},btnEdit:function(t){var e=this;e.currentDataId=t.id,e.dialogVisible=!0},onClose:function(){var t=this;t.currentDataId=0,t.dialogVisible=!1,t.search()},search:function(){var t=this;Object(r["i"])(t.queryForm).then((function(e){e&&(t.dataList=e.data.dataList,t.recordCount=e.data.totalRecord,t.pageTotal=e.data.pageTotal)}))},ChangePage:function(t){var e=this;e.queryForm.page=t,e.search()}}},c=u,s=(a("e6d7"),a("2877")),d=Object(s["a"])(c,n,o,!1,null,null,null);e["default"]=d.exports},"424e":function(t,e,a){"use strict";a.d(e,"h",(function(){return o})),a.d(e,"e",(function(){return r})),a.d(e,"l",(function(){return i})),a.d(e,"a",(function(){return l})),a.d(e,"g",(function(){return u})),a.d(e,"c",(function(){return c})),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 b})),a.d(e,"k",(function(){return g}));var n=a("b775");function o(t){return Object(n["a"])({url:"/document/list",method:"post",data:t})}function r(t){return Object(n["a"])({url:"/document/export",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/document/edit",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/document/add",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/document/info/".concat(t),method:"get"})}function c(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 p(t){return Object(n["a"])({url:"/document/category/delete",method:"post",data:t})}function b(t){return Object(n["a"])({url:"/template/searchList",method:"post",data:t})}function g(t){return Object(n["a"])({url:"/document/list",method:"post",data:t})}},"500d":function(t,e,a){},"55c0":function(t,e,a){},"5bc2":function(t,e,a){"use strict";a("500d")},"71b5":function(t,e,a){},"80a6":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.name,callback:function(e){t.$set(t.queryForm,"name",e)},expression:"queryForm.name"}})],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),a("el-button",{attrs:{type:"success"},on:{click:t.onCreate}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v(" 创建分类")],1)],1)],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.dialogVisible,"append-to-body":"",width:"50%","custom-class":"prod-verify",title:"创建文档分类"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("dataInfo",{on:{onClose:t.onClose}})],1)],1)},o=[],r=a("982f"),i=a("a888"),l={components:{dataInfo:r["default"]},directives:{elDragDialog:i["a"]},props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,name:"",status:""}}}},data:function(){return{statusOptions:[{value:"",label:"请选择状态"},{value:5,label:"启用"},{value:6,label:"停用"}],dialogVisible:!1}},created:function(){},methods:{onCreate:function(t){this.dialogVisible=!0},onClose:function(t){this.dialogVisible=!1,this.onSubmit()},onSubmit:function(){this.queryForm.page=1,this.$emit("bindSetQuery",this.queryForm)}}},u=l,c=(a("5bc2"),a("2877")),s=Object(c["a"])(u,n,o,!1,null,null,null);e["default"]=s.exports},"982f":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-info"},[a("el-card",[a("el-form",{attrs:{model:t.dataForm,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"分类名称:"}},[a("el-input",{model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1),a("el-form-item",{attrs:{label:"分类介绍:"}},[a("el-input",{attrs:{type:"textArea"},model:{value:t.dataForm.intro,callback:function(e){t.$set(t.dataForm,"intro",e)},expression:"dataForm.intro"}})],1),a("el-form-item",{attrs:{label:"分类状态:"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择分类状态",size:"large"},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},t._l(t.statusOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1)],1),a("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[a("el-button",{attrs:{type:"warning"},on:{click:t.btnSave}},[t._v("确认保存")])],1)],1)},o=[],r=(a("a9e3"),a("424e")),i={emits:["onClose"],props:{id:{type:Number,default:0}},watch:{id:{handler:function(t){var e=this;null==t||t<=0||e.getInfo(t)},immediate:!0,deep:!0}},data:function(){return{activeName:"base",categoryList:[],dataForm:{id:0,name:"",intro:"",status:5},statusOptions:[{value:"",label:"请选择状态"},{value:5,label:"启用"},{value:6,label:"停用"}]}},methods:{btnSave:function(t){var e=this;e.dataForm.id>0?Object(r["m"])(e.dataForm).then((function(t){200==t.status&&(e.$alert("文档分类更新成功"),e.$emit("onClose"))})):Object(r["b"])(e.dataForm).then((function(t){200==t.status&&(e.$alert("文档分类创建成功"),e.$emit("onClose"))}))},getInfo:function(t){var e=this,a={id:t};Object(r["f"])(a).then((function(t){t&&200==t.status&&(e.dataForm=t.data)}))}}},l=i,u=(a("f1c4"),a("2877")),c=Object(u["a"])(l,n,o,!1,null,null,null);e["default"]=c.exports},a888:function(t,e,a){"use strict";a("99af"),a("caad"),a("ac1f"),a("2532"),a("5319");var n={bind:function(t,e,a){var n=t.querySelector(".el-dialog__header"),o=t.querySelector(".el-dialog");n.style.cssText+=";cursor:move;",o.style.cssText+=";top:0px;";var r=function(){return window.document.currentStyle?function(t,e){return t.currentStyle[e]}:function(t,e){return getComputedStyle(t,!1)[e]}}();n.onmousedown=function(t){var e=t.clientX-n.offsetLeft,i=t.clientY-n.offsetTop,l=o.offsetWidth,u=o.offsetHeight,c=document.body.clientWidth,s=document.body.clientHeight,d=o.offsetLeft,f=c-o.offsetLeft-l,m=o.offsetTop,p=s-o.offsetTop-u,b=r(o,"left"),g=r(o,"top");b.includes("%")?(b=+document.body.clientWidth*(+b.replace(/\%/g,"")/100),g=+document.body.clientHeight*(+g.replace(/\%/g,"")/100)):(b=+b.replace(/\px/g,""),g=+g.replace(/\px/g,"")),document.onmousemove=function(t){var n=t.clientX-e,r=t.clientY-i;-n>d?n=-d:n>f&&(n=f),-r>m?r=-m:r>p&&(r=p),o.style.cssText+=";left:".concat(n+b,"px;top:").concat(r+g,"px;"),a.child.$emit("dragDialog")},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null}}}},o=function(t){t.directive("el-drag-dialog",n)};window.Vue&&(window["el-drag-dialog"]=n,Vue.use(o)),n.install=o;e["a"]=n},e6d7:function(t,e,a){"use strict";a("71b5")},f1c4:function(t,e,a){"use strict";a("55c0")}}]);