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 lines
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:"取消",type:"warning"}).then((function(){Object(n["b"])(e.id).then((function(t){a.$message({message:"删除成功",type:"success",duration:1e3}),a.getList()}))}))},handleUpdate:function(t,e){this.dialogVisible=!0,this.dialogTitle="编辑类型",this.productAttrCate.name=e.name,this.productAttrCate.id=e.id},getAttrList:function(t,e){this.$router.push({path:"/pms/productAttrList",query:{cid:e.id,cname:e.name,type:0}})},getParamList:function(t,e){this.$router.push({path:"/pms/productAttrList",query:{cid:e.id,cname:e.name,type:1}})},handleConfirm:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return console.log("error submit!!"),!1;var a=new URLSearchParams;a.append("name",e.productAttrCate.name),a.append("style",e.productAttrCate.style),a.append("showIndex",e.productAttrCate.showIndex),a.append("pic",e.productAttrCate.pic),"添加类型"===e.dialogTitle?Object(n["a"])(a).then((function(t){e.$message({message:"添加成功",type:"success",duration:1e3}),e.dialogVisible=!1,e.getList()})):Object(n["e"])(e.productAttrCate.id,a).then((function(t){e.$message({message:"修改成功",type:"success",duration:1e3}),e.dialogVisible=!1,e.getList()}))}))}}},l=s,u=a("2877"),c=Object(u["a"])(l,r,i,!1,null,"7653ab3a",null);e["default"]=c.exports},"5e35":function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return o})),a.d(e,"e",(function(){return s})),a.d(e,"d",(function(){return l}));var r=a("b775");function i(t){return Object(r["a"])({url:"/mall/pms/PmsProductAttributeCategory/list",method:"get",params:t})}function n(t){return Object(r["a"])({url:"/mall/pms/PmsProductAttributeCategory/create",method:"post",data:t})}function o(t){return Object(r["a"])({url:"/mall/pms/PmsProductAttributeCategory/delete/"+t,method:"get"})}function s(t,e){return Object(r["a"])({url:"/mall/pms/PmsProductAttributeCategory/update/"+t,method:"post",data:e})}function l(){return Object(r["a"])({url:"/mall/pms/PmsProductAttributeCategory/list/withAttr",method:"get"})}},"6e0d":function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var r=a("b775");function i(){return Object(r["a"])({url:"/aliyun/oss/policy",method:"get"})}}}]);