(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e9ae0808"],{"548a":function(e,t,a){},"8bd7":function(e,t,a){"use strict";a("548a")},cf1f:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"category-container"},[a("div",{staticClass:"operation-area"},[a("el-button",{attrs:{type:"primary"},on:{click:e.handleAdd}},[e._v("新建产品类别")]),a("el-input",{staticStyle:{width:"200px","margin-left":"16px"},attrs:{placeholder:"请输入搜索内容"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch(t)}},model:{value:e.searchQuery,callback:function(t){e.searchQuery=t},expression:"searchQuery"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.handleSearch},slot:"append"})],1)],1),a("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"categoryId",label:"产品类别编号",width:"180"}}),a("el-table-column",{attrs:{prop:"categoryName",label:"产品类别",width:"180"}}),a("el-table-column",{attrs:{prop:"remark",label:"备注"}}),a("el-table-column",{attrs:{prop:"skuCount",label:"关联sku数"}}),a("el-table-column",{attrs:{label:"操作",width:"250"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini"},on:{click:function(a){return e.handleView(t.row)}}},[e._v("查看")]),a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(a){return e.handleEdit(t.row)}}},[e._v("编辑")]),a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),a("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"right"},attrs:{"current-page":e.pagination.currentPage,"page-sizes":[10,20,50,100],"page-size":e.pagination.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.pagination.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}),a("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialogVisible,width:"500px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"类别编号",prop:"categoryId"}},[a("el-input",{model:{value:e.form.categoryId,callback:function(t){e.$set(e.form,"categoryId",t)},expression:"form.categoryId"}})],1),a("el-form-item",{attrs:{label:"类别名称",prop:"categoryName"}},[a("el-input",{model:{value:e.form.categoryName,callback:function(t){e.$set(e.form,"categoryName",t)},expression:"form.categoryName"}})],1),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")])],1)],1)],1)},n=[],o=a("5530");a("b775"),a("c38a");var i={name:"CategoryManagement",data:function(){return{searchQuery:"",tableData:[{categoryId:"ysp",categoryName:"音视频",remark:"",skuCount:5}],pagination:{currentPage:1,pageSize:10,total:0},dialogVisible:!1,dialogTitle:"",form:{categoryId:"",categoryName:"",remark:""},rules:{categoryId:[{required:!0,message:"请输入类别编号",trigger:"blur"}],categoryName:[{required:!0,message:"请输入类别名称",trigger:"blur"}]}}},methods:{handleSearch:function(){console.log("搜索关键词:",this.searchQuery),this.loadData()},handleAdd:function(){this.dialogTitle="新增产品类别",this.form={categoryId:"",categoryName:"",remark:""},this.dialogVisible=!0},handleEdit:function(e){this.dialogTitle="编辑产品类别",this.form=Object(o["a"])({},e)},handleDelete:function(e){var t=this;this.$confirm("确认删除该产品类别?","提示",{type:"warning"}).then((function(){console.log("删除:",e),t.$message.success("删除成功"),t.loadData()})).catch((function(){}))},handleView:function(e){console.log("查看:",e)},handleSizeChange:function(e){this.pagination.pageSize=e,this.loadData()},handleCurrentChange:function(e){this.pagination.currentPage=e,this.loadData()},submitForm:function(){var e=this;this.$refs.form.validate((function(t){t&&(console.log("表单数据:",e.form),e.dialogVisible=!1,e.$message.success("保存成功"),e.loadData())}))},loadData:function(){console.log("加载数据，当前页:",this.pagination.currentPage,"每页数量:",this.pagination.pageSize)}},created:function(){this.loadData()}},l=i,s=(a("8bd7"),a("2877")),c=Object(s["a"])(l,r,n,!1,null,"7f81d7f0",null);t["default"]=c.exports}}]);