You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
6.2 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-11b22b18"],{"3d02":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-container"},[e("div",{staticClass:"main-content"},[e("el-card",{staticClass:"operate-container",attrs:{shadow:"never"}},[e("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-top":"5px"}}),e("span",{staticStyle:{"margin-top":"5px"}},[t._v("数据列表")])]),e("div",{staticClass:"table-container"},[e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"productAttrCateTable",staticStyle:{width:"100%"},attrs:{data:t.list,border:""}},[e("el-table-column",{attrs:{label:"编号",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.id))]}}])}),e("el-table-column",{attrs:{label:"类型名称",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.name))]}}])})],1)],1),e("div",{staticClass:"pagination-container"},[e("el-pagination",{attrs:{background:"",layout:"total, sizes,prev, pager, next,jumper","page-size":t.listQuery.pageSize,"page-sizes":[5,10,15],"current-page":t.listQuery.pageNum,total:t.total},on:{"update:currentPage":function(e){return t.$set(t.listQuery,"pageNum",e)},"update:current-page":function(e){return t.$set(t.listQuery,"pageNum",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),e("el-dialog",{attrs:{title:t.dialogTitle,visible:t.dialogVisible,width:"30%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("el-form",{ref:"productAttrCatForm",attrs:{model:t.productAttrCate,rules:t.rules,"label-width":"120px"}},[e("el-form-item",{attrs:{label:"类型名称",prop:"name"}},[e("el-input",{attrs:{"auto-complete":"off"},model:{value:t.productAttrCate.name,callback:function(e){t.$set(t.productAttrCate,"name",e)},expression:"productAttrCate.name"}})],1),e("el-form-item",{attrs:{label:"分类图标:"}},[e("single-upload",{model:{value:t.productAttrCate.pic,callback:function(e){t.$set(t.productAttrCate,"pic",e)},expression:"productAttrCate.pic"}})],1),e("el-form-item",{attrs:{label:"列表样式:"}},[e("el-radio-group",{model:{value:t.productAttrCate.style,callback:function(e){t.$set(t.productAttrCate,"style",e)},expression:"productAttrCate.style"}},[e("el-radio",{attrs:{label:1}},[t._v("一列一个")]),e("el-radio",{attrs:{label:2}},[t._v("一列两个")]),e("el-radio",{attrs:{label:3}},[t._v("一列3个")])],1)],1),e("el-form-item",{attrs:{label:"是否展示首页:"}},[e("el-radio-group",{model:{value:t.productAttrCate.showIndex,callback:function(e){t.$set(t.productAttrCate,"showIndex",e)},expression:"productAttrCate.showIndex"}},[e("el-radio",{attrs:{label:1}},[t._v("展示")]),e("el-radio",{attrs:{label:2}},[t._v("不展示")])],1)],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleConfirm("productAttrCatForm")}}},[t._v("确 定")])],1)],1)],1)])},i=[],n=a("5e35"),o=a("0f39"),s={name:"ProductAttrCateList",components:{SingleUpload:o["a"]},data:function(){return{list:null,total:null,listLoading:!0,listQuery:{pageNum:1,pageSize:5},dialogVisible:!1,dialogTitle:"",productAttrCate:{name:"",id:null},rules:{name:[{required:!0,message:"请输入类型名称",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(n["c"])(this.listQuery).then((function(e){t.listLoading=!1,t.list=e.data.records,t.total=e.data.total}))},addProductAttrCate:function(){this.dialogVisible=!0,this.dialogTitle="添加类型"},handleSizeChange:function(t){this.listQuery.pageNum=1,this.listQuery.pageSize=t,this.getList()},handleCurrentChange:function(t){this.listQuery.pageNum=t,this.getList()},handleDelete:function(t,e){var a=this;this.$confirm("是否要删除该品牌","提示",{confirmButtonText:"确定",cancelButtonText:"取消