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
4.8 KiB
1 lines
4.8 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7a4ed0d0"],{"508e":function(t,e,r){"use strict";r("b50e")},"92dd":function(t,e,r){"use strict";r.r(e);var i=r("2f62"),o=r("c4c8"),n=r("d708");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){l(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u={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:c(c({},Object(i.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(o.ib)(this.specsFrom).then((function(e){var r=e.data;t.list=r.list,t.total=r.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,r){var i=this,o={title:e,num:r,url:"product/specs/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(o).then((function(t){i.$Message.success(t.msg),i.list.splice(r,1),i.list.length||(i.specsFrom.page=1==i.specsFrom.page?1:i.specsFrom.page-1),i.getList()})).catch((function(t){i.$Message.error(t.msg)}))}}},d=(r("508e"),r("2877")),p=Object(d.a)(u,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"specsFrom",attrs:{inline:"",model:t.specsFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{attrs:{gutter:24,type:"flex",justify:"end"}},[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"搜索:"}},[e("Input",{staticClass:"input-add",attrs:{placeholder:"请输入参数模板名称"},model:{value:t.specsFrom.name,callback:function(e){t.$set(t.specsFrom,"name",e)},expression:"specsFrom.name"}}),e("Button",{attrs:{type:"primary"},on:{click:t.specsSearchs}},[t._v("查询")])],1)],1)],1)],1)],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Row",{attrs:{type:"flex"}},[e("Col",t._b({},"Col",t.grid,!1),[e("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加参数模板")])],1)],1),e("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 r=t.row;return t.index,[e("viewer",[e("div",{staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.icon,expression:"row.icon"}]})])])]}},{key:"action",fn:function(r){var i=r.row,o=r.index;return[e("a",{on:{click:function(e){return t.edit(i.id)}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.del(i,"删除商品参数",o)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("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=p.exports},b50e:function(t,e,r){}}]); |