(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2fa73464"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",function(){return o}),Math.easeInOutQuad=function(t,e,n,a){return t/=a/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function i(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(t,e,n){var o=r(),u=t-o,s=20,c=0;e="undefined"===typeof e?500:e;var l=function t(){c+=s;var r=Math.easeInOutQuad(c,o,u,e);i(r),c\n "),n("el-table-column",{attrs:{width:"120px",align:"center",prop:"id",label:"分类编号"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"text",label:"分类名称"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"helpCenterCatalog/modify",expression:"'helpCenterCatalog/modify'"}],attrs:{type:"text"},on:{click:function(n){return t.openTypes("add",e.row)}}},[t._v("添加")]),t._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"helpCenterCatalog/modify",expression:"'helpCenterCatalog/modify'"}],attrs:{type:"text"},on:{click:function(n){return t.openTypes("update",e.row)}}},[t._v("修改")]),t._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"helpCenterCatalog/delete",expression:"'helpCenterCatalog/delete'"}],attrs:{type:"text"},on:{click:function(n){return t.onTypeDelOpeation(e.row)}}},[t._v("删除")])]}}])})],1)],1)]),t._v(" "),n("el-dialog",{attrs:{title:t.formTitle[t.formActionTitle],visible:t.typeStatus,width:"500px"},on:{"update:visible":function(e){t.typeStatus=e},close:function(e){return t.onFormClose("ruleForm")}}},[n("el-form",{ref:"ruleForm",attrs:{model:t.form,rules:t.rules}},[n("el-form-item",{attrs:{label:"分类名称",prop:"text","label-width":t.formLabelWidth}},[n("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.text,callback:function(e){t.$set(t.form,"text","string"===typeof e?e.trim():e)},expression:"form.text"}})],1)],1),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.typeStatus=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onTypeSubmit("ruleForm")}}},[t._v("确 定")])],1)],1)],1)},i=[],r=n("333d"),o=n("3607"),u={components:{pagination:r["a"]},name:"helpCategory",data:function(){return{tableList:[],subjectList:[],formActionTitle:"create",formTitle:{create:"添加帮助中心分类",add:"添加帮助中心分类",update:"修改帮助中心分类"},typeStatus:!1,formLabelWidth:"120px",form:{text:null,parentId:0},rules:{text:[{required:!0,message:"请输入类型名称",trigger:"blur"}]},pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},activated:function(){this.getList()},mounted:function(){this.getList()},methods:{onTypeDelOpeation:function(t){var e=this;this.$confirm("您是否删除该分类?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o["e"])({id:t.id}).then(function(t){e.messageTips("删除",t)})}).catch(function(){})},onTypeSubmit:function(t){var e=this;this.$refs[t].validate(function(t){if(!t)return!1;"create"==e.formActionTitle||"add"==e.formActionTitle?(e.form.id&&delete e.form.id,Object(o["g"])(e.form).then(function(t){e.messageTips("添加",t)})):"update"==e.formActionTitle&&Object(o["g"])(e.form).then(function(t){e.messageTips("修改",t)})})},messageTips:function(t,e){200==e.code?(this.$message.success(t+"成功"),this.typeStatus=!1,this.getList()):this.$message.error(e.msg)},getList:function(){var t=this;Object(o["f"])({parentId:0}).then(function(e){var n=e.data;200==e.code&&(t.tableList=t.setTableData(n))})},setTableData:function(t){var e=this,n=[];return n=t.map(function(t){var n={};return n={id:t.id,text:t.text},t.children&&t.children.length>0&&(n.children=e.setTableData(t.children)),n}),n},openTypes:function(t,e){this.typeStatus=!0,this.formActionTitle=t,"create"==t?this.form.parentId=0:"update"==t?this.form={id:e.id,text:e.text,parentId:0}:"add"==t&&(this.form.parentId=e.id)},onCancel:function(){this.$router.push({path:"/insideSetting/helpContent"})},onFormClose:function(t){this.form={name:null,subjectIds:[]},this.$refs[t].resetFields()}}},s=u,c=(n("9fdf"),n("2877")),l=Object(c["a"])(s,a,i,!1,null,"099374dc",null);e["default"]=l.exports},c0b9:function(t,e,n){"use strict";var a=n("fa3b"),i=n.n(a);i.a},fa3b:function(t,e,n){}}]);