chunk-a2a6097c.eb71cbf5.js 5.7 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a2a6097c"],{"4ec9":function(t,e,i){"use strict";var a=i("da92");i.n(a).a},8031:function(t,e,i){"use strict";i.r(e);var a=i("a34a"),n=i.n(a),r=i("2f62"),o=i("b7be"),s=i("d708");function l(t,e,i,a,n,r,o){try{var s=t[r](o),l=s.value}catch(t){return void i(t)}s.done?e(l):Promise.resolve(l).then(a,n)}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var d={name:"config",data:function(){return{roterPre:s.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},formValidate:{status:"",page:1,limit:20},total:0,tabList:[],columns1:[{title:"ID",key:"id",width:80},{title:"活动名称",key:"title",minWidth:170},{title:"开始时间",key:"start_time",minWidth:150},{title:"结束时间",key:"end_time",minWidth:150},{title:"幻灯片",slot:"pic",minWidth:150},{title:"描述",key:"describe",minWidth:240},{title:"是否可用",slot:"status",minWidth:100},{title:"操作",slot:"action",minWidth:110,fixed:"right"}],loading:!1}},computed:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(i,!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(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"}}),mounted:function(){this.getList()},methods:{groupAdd:function(){var t=this;this.$modalForm(Object(o.yb)(0)).then((function(){return t.getList()}))},edit:function(t){var e=this;this.$modalForm(Object(o.yb)(t.id)).then((function(){return e.getList()}))},getList:function(){var t=this;this.loading=!0,Object(o.zb)(this.formValidate).then((function(e){var i=e.data;t.tabList=i.list,t.total=i.count,t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},userSearchs:function(){this.formValidate.page=1,this.getList()},onchangeIsShow:function(t){var e=this;Object(o.wb)(t).then(function(){var t,i=(t=n.a.mark((function t(i){return n.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(i.msg),e.getList();case 2:case"end":return t.stop()}}),t)})),function(){var e=this,i=arguments;return new Promise((function(a,n){var r=t.apply(e,i);function o(t){l(r,a,n,o,s,"next",t)}function s(t){l(r,a,n,o,s,"throw",t)}o(void 0)}))});return function(t){return i.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},del:function(t,e,i){var a=this,n={title:e,num:i,url:"/marketing/seckill/time/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){a.$Message.success(t.msg),a.tabList.splice(i,1),a.tabList.length||(a.formValidate.page=1==a.formValidate.page?1:a.formValidate.page-1),a.getList()})).catch((function(t){a.$Message.error(t.msg)}))}}},f=(i("4ec9"),i("2877")),m=Object(f.a)(d,(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:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[i("FormItem",{attrs:{label:"是否显示:"}},[i("Select",{staticClass:"input-add mb20",attrs:{placeholder:"请选择",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[i("Option",{attrs:{value:"1"}},[t._v("显示")]),i("Option",{attrs:{value:"0"}},[t._v("不显示")])],1)],1)],1)],1)]),i("Card",{attrs:{bordered:!1,"dis-hover":""}},[i("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[i("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:function(e){return t.groupAdd("添加数据")}}},[t._v("添加数据")])],1),i("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:t.columns1,data:t.tabList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"pic",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.pic,expression:"row.pic"}]})])])]}},{key:"status",fn:function(e){var a=e.row;return e.index,[i("i-switch",{attrs:{value:a.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(a)}},model:{value:a.status,callback:function(e){t.$set(a,"status",e)},expression:"row.status"}},[i("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),i("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(e){var a=e.row,n=e.index;return[i("a",{on:{click:function(e){return t.edit(a)}}},[t._v("编辑")]),i("Divider",{attrs:{type:"vertical"}}),i("a",{on:{click:function(e){return t.del(a,"删除这条信息",n)}}},[t._v("删除")])]}}])}),i("div",{staticClass:"acea-row row-right page"},[i("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"15ffe44b",null);e.default=m.exports},da92:function(t,e,i){}}]);