chunk-3a60f730.ebe6d69b.js 11 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3a60f730"],{"31b4":function(t,e,a){"use strict";var r=a("9860"),i=a.n(r),n=a("b6bd"),s=a("2f62");function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function c(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var u={name:"edit",components:{formCreate:i.a.$form()},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?o(a,!0).forEach((function(e){c(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):o(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(s.e)("admin/userLevel",["taskId","levelId"])),props:{FromData:{type:Object,default:null},userEdit:{type:Number,default:0}},data:function(){return{modals:!1,type:0,config:{global:{upload:{props:{onSuccess:function(t,e){200===t.status?e.url=t.data.src:this.Message.error(t.msg)}}}}},isDisable:!1}},methods:{couponsType:function(){this.$parent.addType(this.type)},onSubmit:function(t){var e,a=this;(setTimeout((function(){a.isDisable=!1}),1e3),this.isDisable)||(this.isDisable=!0,e=t,Object(n.a)({url:this.FromData.action,method:this.FromData.method,data:e}).then((function(t){a.$parent.getList(),a.$Message.success(t.msg),a.modals=!1,setTimeout((function(){a.$emit("submitFail")}),1e3)})).catch((function(t){a.$Message.error(t.msg)})))},cancel:function(){this.type=0}}},l=(a("bddf"),a("2877")),d=Object(l.a)(u,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.FromData?a("div",[a("Modal",{class:t.userEdit?"userEdit":"",attrs:{scrollable:"","footer-hide":"",closable:"",title:t.FromData.title,width:"700"},on:{"on-cancel":t.cancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[["/marketing/coupon/save.html"===t.FromData.action?a("div",{staticClass:"radio acea-row row-middle"},[a("div",{staticClass:"name ivu-form-item-content"},[t._v("优惠券类型")]),a("Radio-group",{on:{"on-change":t.couponsType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[a("Radio",{attrs:{label:0}},[t._v("通用券")]),a("Radio",{attrs:{label:1}},[t._v("品类券")]),a("Radio",{attrs:{label:2}},[t._v("商品券")])],1)],1):t._e()],a("form-create",{ref:"fc",staticClass:"formBox",attrs:{option:t.config,rule:Array.from(t.FromData.rules),handleIcon:"false"},on:{"on-submit":t.onSubmit}})],2)],1):t._e()}),[],!1,null,"2850396f",null);e.a=d.exports},"34bf":function(t,e,a){},"3cb6":function(t,e,a){},bddf:function(t,e,a){"use strict";var r=a("3cb6");a.n(r).a},cffd:function(t,e,a){"use strict";a.r(e);var r=a("a34a"),i=a.n(r),n=a("2f62"),s=a("31b4"),o=a("8593"),c=a("d708");function u(t,e,a,r,i,n,s){try{var o=t[n](s),c=o.value}catch(t){return void a(t)}o.done?e(c):Promise.resolve(c).then(r,i)}function l(t){return function(){var e=this,a=arguments;return new Promise((function(r,i){var n=t.apply(e,a);function s(t){u(n,r,i,s,o,"next",t)}function o(t){u(n,r,i,s,o,"throw",t)}s(void 0)}))}}function d(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function f(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var m={name:"list",components:{editFrom:s.a},data:function(){return{roterPre:c.a.roterPre,grid:{xl:7,lg:7,md:12,sm:24,xs:24},formValidate:{status:"",page:1,limit:20,gid:0},total:0,tabList:[],columns1:[],FromData:null,loading:!1,titleType:"group",groupAll:[],theme3:"light",labelSort:[],sortName:null,current:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?d(a,!0).forEach((function(e){f(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):d(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(n.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),watch:{$route:function(t,e){this.$route.params.id?(this.getList(),this.getListHeader()):this.getGroupAll()}},mounted:function(){this.$route.params.id?(this.getList(),this.getListHeader()):this.getGroupAll()},methods:{bindMenuItem:function(t,e){this.current=e,this.formValidate.gid=t.id,this.getListHeader(),this.getList()},getGroupAll:function(){var t=this;Object(o.z)().then(function(){var e=l(i.a.mark((function e(a){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.groupAll=a.data,t.sortName=a.data[0].id,t.formValidate.gid=a.data[0].id,t.getListHeader(),t.getList();case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},back:function(){this.$router.push({path:this.roterPre+"/system/config/system_group/index"})},getUrl:function(t){var e="setting/group_data"+t;if(this.$route.params.id){var a={setting_groupDataSign:"setting/sign_data"+t,setting_groupDataOrder:"setting/order_data"+t,setting_groupDataUser:"setting/usermenu_data"+t,setting_groupDataPoster:"setting/poster_data"+t,marketing_storeSeckillData:"setting/seckill_data"+t};return void 0===a[this.$route.name]?e:a[this.$route.name]}return e},getList:function(){var t=this;this.loading=!0,this.formValidate.gid=this.$route.params.id?this.$route.params.id:this.formValidate.gid,this.formValidate.status=this.formValidate.status||"",Object(o.D)(this.formValidate,this.getUrl("")).then(function(){var e=l(i.a.mark((function e(a){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=a.data,t.tabList=r.list,t.total=r.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},getListHeader:function(){var t=this;this.loading=!0;var e={gid:this.$route.params.id?this.$route.params.id:this.formValidate.gid};Object(o.C)(e,this.getUrl("/header")).then(function(){var e=l(i.a.mark((function e(a){var r,n,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=a.data,n=r.header,s=[],n.forEach((function(t,e){"img"===t.type&&s.push(e)})),s.forEach((function(t){n[t].render=function(e,a){var r=a.row[n[t].key],i=[];return void 0!==r&&r.length&&r.forEach((function(r,s){i.push(e("div",{style:{width:"36px",height:"36px","border-radius":"4px",cursor:"pointer",display:"inline-block"}},[e("img",{attrs:{src:a.row[n[t].key][s]},style:{width:"100%",height:"100%"}})]))})),e("viewer",i)}})),t.columns1=n,t.loading=!1;case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).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()},groupAdd:function(){var t=this;this.$modalForm(Object(o.A)({gid:this.$route.params.id?this.$route.params.id:this.formValidate.gid},this.getUrl("/create"))).then((function(){return t.getList()}))},onchangeIsShow:function(t){var e=this;Object(o.E)(this.getUrl("/set_status/".concat(t.id,"/").concat(t.status))).then(function(){var t=l(i.a.mark((function t(a){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(a.msg),e.getList();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},edit:function(t){var e=this,a={gid:t.gid};this.$modalForm(Object(o.B)(a,this.getUrl("/".concat(t.id,"/edit")))).then((function(){return e.getList()}))},del:function(t,e,a){var r=this,i={title:e,num:a,url:this.getUrl("/".concat(t.id)),method:"DELETE",ids:""};this.$modalSure(i).then((function(t){r.$Message.success(t.msg),r.tabList.splice(a,1)})).catch((function(t){r.$Message.error(t.msg)}))}}},p=(a("e2114"),a("2877")),h=Object(p.a)(m,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"i-layout-page-header"},[a("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[a("div",{staticClass:"acea-row row-middle",attrs:{slot:"title"},slot:"title"},[a("router-link",{attrs:{to:{path:t.roterPre+"/system/config/system_group/index"}}},[a("div",{staticClass:"font-sm after-line"},[a("span",{staticClass:"iconfont iconfanhui"}),a("span",{staticClass:"pl10"},[t._v("返回")])])]),a("span",{staticClass:"mr20 ml16"},[t._v("数据列表")])],1)])],1),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[a("div",{staticClass:"new_card_pd"},[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{label:"是否显示:"}},[a("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"}},[a("Option",{attrs:{value:"1"}},[t._v("显示")]),a("Option",{attrs:{value:"0"}},[t._v("不显示")])],1)],1)],1)],1)]),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Menu",{attrs:{theme:t.theme3,"active-name":t.sortName,width:"auto"}},[a("MenuGroup",t._l(t.groupAll,(function(e,r){return a("MenuItem",{key:r,staticClass:"menu-item",attrs:{name:e.id},nativeOn:{click:function(a){return t.bindMenuItem(e,r)}}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1),a("Card",{attrs:{bordered:!1,"dis-hover":"",padding:0}},[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:function(e){return t.groupAdd("添加数据")}}},[t._v("添加数据")])],1),a("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:"status",fn:function(e){var r=e.row;return e.index,[a("i-switch",{attrs:{value:r.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(r)}},model:{value:r.status,callback:function(e){t.$set(r,"status",e)},expression:"row.status"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(e){var r=e.row,i=e.index;return[a("a",{on:{click:function(e){return t.edit(r,"编辑")}}},[t._v("编辑")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(r,"删除这条信息",i)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("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)}),[],!1,null,"707d263b",null);e.default=h.exports},e2114:function(t,e,a){"use strict";var r=a("34bf");a.n(r).a}}]);