chunk-4e2d8176.cdad9400.js 4.3 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4e2d8176"],{"92dd":function(t,e,i){"use strict";i.r(e);var r=i("2f62"),s=i("c4c8"),n=i("d708");function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function a(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var c={name:"specs",data:function(){return{roterPre:n.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"参数模板名称",key:"name",minWidth:100},{title:"排序",key:"sort",width:100},{title:"创建时间",key:"add_time",minWidth:100},{title:"操作",slot:"action",fixed:"right",minWidth:120}],specsFrom:{page:1,limit:15,name:""},list:[],total:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(i,!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):o(i).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},Object(r.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{specsSearchs:function(){this.specsFrom.page=1,this.list=[],this.getList()},add:function(){this.$router.push({path:this.roterPre+"/product/ensure/create/0"})},getList:function(){var t=this;this.loading=!0,Object(s.bb)(this.specsFrom).then((function(e){var i=e.data;t.list=i.list,t.total=i.count,t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.specsFrom.page=t,this.getList()},edit:function(t){this.$router.push({path:this.roterPre+"/product/ensure/create/"+t})},del:function(t,e,i){var r=this,s={title:e,num:i,url:"product/specs/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(s).then((function(t){r.$Message.success(t.msg),r.list.splice(i,1),r.list.length||(r.specsFrom.page=1==r.specsFrom.page?1:r.specsFrom.page-1),r.getList()})).catch((function(t){r.$Message.error(t.msg)}))}}},l=(i("f6e2"),i("2877")),u=Object(l.a)(c,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[i("div",{staticClass:"new_card_pd"},[i("Form",{ref:"specsFrom",attrs:{inline:"",model:t.specsFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[i("Row",{attrs:{gutter:24,type:"flex",justify:"end"}},[i("Col",{attrs:{span:"24"}},[i("FormItem",{attrs:{label:"搜索:"}},[i("Input",{staticClass:"input-add",attrs:{placeholder:"请输入参数模板名称"},model:{value:t.specsFrom.name,callback:function(e){t.$set(t.specsFrom,"name",e)},expression:"specsFrom.name"}}),i("Button",{attrs:{type:"primary"},on:{click:t.specsSearchs}},[t._v("查询")])],1)],1)],1)],1)],1)]),i("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[i("Row",{attrs:{type:"flex"}},[i("Col",t._b({},"Col",t.grid,!1),[i("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加参数模板")])],1)],1),i("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.list,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"icons",fn:function(t){var e=t.row;return t.index,[i("viewer",[i("div",{staticClass:"tabBox_img"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.icon,expression:"row.icon"}]})])])]}},{key:"action",fn:function(e){var r=e.row,s=e.index;return[i("a",{on:{click:function(e){return t.edit(r.id)}}},[t._v("编辑")]),i("Divider",{attrs:{type:"vertical"}}),i("a",{on:{click:function(e){return t.del(r,"删除商品参数",s)}}},[t._v("删除")])]}}])}),i("div",{staticClass:"acea-row row-right page"},[i("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.specsFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"e2d168aa",null);e.default=u.exports},aa4f:function(t,e,i){},f6e2:function(t,e,i){"use strict";var r=i("aa4f");i.n(r).a}}]);