家政小程序
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.

5.e63164749c9cd89ad2fd.chunk.js 5.4KB

1
  1. webpackJsonp([5],{245:function(t,o,e){e(321);var a=e(1)(e(322),e(331),null,null);t.exports=a.exports},321:function(t,o){},322:function(t,o,e){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(o,"__esModule",{value:!0});var s=e(323),i=a(s),n=e(327),r=a(n);o.default={name:"classify",components:{add:i.default,edit:r.default},computed:{prosHandle:function(){return this.products}},data:function(){var t=this;return{row:{},total:0,pageSize:20,proShow:!0,addShow:!1,editShow:!1,formContent:{},columns:[{title:"id",key:"id"},{title:"产品分类",key:"classify",align:"center"},{title:"操作",key:"action",align:"center",render:function(o,e){return o("div",[o("Button",{props:{type:"primary",size:"default"},style:{marginRight:"5px"},on:{click:function(){t.row=e.row,t.editShow=!0}}},"修改"),o("Button",{props:{type:"error",size:"default"},style:{marginRight:"5px"},on:{click:function(){var o=e.row.id;t.$Modal.confirm({title:"注意",content:"确定要删除?",onOk:function(){t.axios.delete("product_classify/"+o,{}).then(function(o){t.$message.success("删除成功"),t.products=t.products.filter(function(t){return t.classify!=e.row.classify}),t.$Modal.remove()})},onCancel:function(){t.$Modal.remove()}})}}},"删除")])}}],products:[]}},methods:{add:function(){this.addShow=!0},pubSuccess:function(){this.proShow=!0,this.getData()},getData:function(t){var o=this;this.axios.get("product_classify",{params:{page:t||1}}).then(function(t){o.products=t.data.data,o.pageSize=t.data.per_page,o.total=t.data.total})},closeModal:function(t){this.editShow=!1,this.getData()},closeAddModal:function(t){this.addShow=!1,this.getData()}},created:function(){this.getData()}}},323:function(t,o,e){e(324);var a=e(1)(e(325),e(326),null,null);t.exports=a.exports},324:function(t,o){},325:function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default={name:"add",data:function(){return{classify:"",loading:!0,addModal:!1}},watch:{addShow:function(){this.addModal=this.addShow},addModal:function(){this.addModal||this.$emit("close")}},props:{products:Array,addShow:Boolean},methods:{submit:function(){var t=this;this.classify||(this.$emit("close",{classify:o}),this.loading=!1);var o=this.classify;this.axios.post("/product_classify/store",{classify:o}).then(function(e){t.$emit("close",{classify:o}),t.loading=!1})}}}},326:function(t,o){t.exports={render:function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("Modal",{attrs:{loading:t.loading},model:{value:t.addModal,callback:function(o){t.addModal=o},expression:"addModal"}},[e("p",{attrs:{slot:"header"},slot:"header"},[e("Icon",{attrs:{type:"information-circled"}}),t._v(" "),e("span",[t._v("新增")])],1),t._v(" "),e("div",[e("Form",{ref:"form",attrs:{"label-width":80}},[e("FormItem",{attrs:{label:"分类"}},[e("Input",{model:{value:t.classify,callback:function(o){t.classify=o},expression:"classify"}})],1)],1)],1),t._v(" "),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确定")])],1)])},staticRenderFns:[]}},327:function(t,o,e){e(328);var a=e(1)(e(329),e(330),null,null);t.exports=a.exports},328:function(t,o){},329:function(t,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default={name:"edit",data:function(){return{loading:!0,id:this.row.id,classify:this.row.classify,editModal:!1}},watch:{row:function(){this.classify=this.row.classify,this.id=this.row.id},editShow:function(){this.editModal=this.editShow},editModal:function(){this.editModal||this.$emit("close")}},props:{editClassify:Array,editShow:Boolean,row:Object},methods:{submit:function(){var t=this;this.axios.post("/product_classify/store",{id:this.id,classify:this.classify}).then(function(o){t.$emit("close",{classify:t.classify}),t.loading=!1})}}}},330:function(t,o){t.exports={render:function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("Modal",{attrs:{loading:t.loading},model:{value:t.editModal,callback:function(o){t.editModal=o},expression:"editModal"}},[e("p",{attrs:{slot:"header"},slot:"header"},[e("Icon",{attrs:{type:"information-circled"}}),t._v(" "),e("span",[t._v("修改")])],1),t._v(" "),e("div",[e("Form",{ref:"form",attrs:{"label-width":80}},[e("FormItem",{attrs:{label:"分类"}},[e("Input",{model:{value:t.classify,callback:function(o){t.classify=o},expression:"classify"}})],1)],1)],1),t._v(" "),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确定")])],1)])},staticRenderFns:[]}},331:function(t,o){t.exports={render:function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",[e("Row",{directives:[{name:"show",rawName:"v-show",value:t.proShow,expression:"proShow"}],staticClass:"margin-top-10"},[e("Col",[e("Card",[e("p",{attrs:{slot:"title"},slot:"title"},[e("Icon",{attrs:{type:"android-remove"}}),t._v("\n 产品分类\n "),e("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("新增")])],1),t._v(" "),e("div",{staticClass:"edittable-table-height-con"},[e("Table",{attrs:{columns:t.columns,data:t.prosHandle}}),t._v(" "),e("Page",{attrs:{total:t.total,"page-size":t.pageSize},on:{"on-change":t.getData}})],1)])],1)],1),t._v(" "),e("add",{attrs:{addShow:t.addShow,products:t.products},on:{close:t.closeAddModal}}),t._v(" "),e("edit",{attrs:{editShow:t.editShow,editClassify:t.prosHandle,row:t.row},on:{close:t.closeModal}})],1)},staticRenderFns:[]}}});