CRMEB/src/crmeb/public/admin/js/chunk-43efd84d.72a84a1a.js
2021-01-20 14:46:13 +08:00

1 line
15 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-43efd84d"],{"31b4":function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.FromData?r("div",[r("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:t.FromData.title,"z-index":1,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?r("div",{staticClass:"radio acea-row row-middle"},[r("div",{staticClass:"name ivu-form-item-content"},[t._v("优惠券类型")]),r("Radio-group",{on:{"on-change":t.couponsType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[r("Radio",{attrs:{label:0}},[t._v("通用券")]),r("Radio",{attrs:{label:1}},[t._v("品类券")]),r("Radio",{attrs:{label:2}},[t._v("商品券")])],1)],1):t._e()],r("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()},a=[],i=(r("8e6e"),r("ac6a"),r("456d"),r("ade3")),o=r("9860"),s=r.n(o),u=r("6b6c"),c=r("2f62");function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){Object(i["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f={name:"edit",components:{formCreate:s.a.$form()},computed:d({},Object(c["e"])("userLevel",["taskId","levelId"])),props:{FromData:{type:Object,default:null}},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)}}}}}}},methods:{couponsType:function(){this.$parent.addType(this.type)},onSubmit:function(t){var e=this,r={};r=t,Object(u["a"])({url:this.FromData.action,method:this.FromData.method,data:r}).then((function(t){e.$parent.getList(),e.$Message.success(t.msg),e.modals=!1,setTimeout((function(){e.$emit("submitFail")}),1e3)})).catch((function(t){e.$Message.error(t.msg)}))},cancel:function(){this.type=0}}},m=f,g=(r("a116"),r("2877")),p=Object(g["a"])(m,n,a,!1,null,"6b606342",null);e["a"]=p.exports},"34e3":function(t,e,r){},"3af0":function(t,e,r){"use strict";r("f47f")},8593:function(t,e,r){"use strict";r.d(e,"h",(function(){return a})),r.d(e,"f",(function(){return i})),r.d(e,"g",(function(){return o})),r.d(e,"E",(function(){return s})),r.d(e,"l",(function(){return u})),r.d(e,"j",(function(){return c})),r.d(e,"k",(function(){return l})),r.d(e,"i",(function(){return d})),r.d(e,"y",(function(){return f})),r.d(e,"q",(function(){return m})),r.d(e,"x",(function(){return g})),r.d(e,"v",(function(){return p})),r.d(e,"s",(function(){return h})),r.d(e,"t",(function(){return b})),r.d(e,"u",(function(){return v})),r.d(e,"w",(function(){return O})),r.d(e,"D",(function(){return y})),r.d(e,"F",(function(){return j})),r.d(e,"m",(function(){return w})),r.d(e,"b",(function(){return _})),r.d(e,"d",(function(){return k})),r.d(e,"a",(function(){return $})),r.d(e,"c",(function(){return x})),r.d(e,"e",(function(){return C})),r.d(e,"p",(function(){return D})),r.d(e,"n",(function(){return P})),r.d(e,"o",(function(){return L})),r.d(e,"z",(function(){return E})),r.d(e,"A",(function(){return T})),r.d(e,"C",(function(){return M})),r.d(e,"B",(function(){return V})),r.d(e,"r",(function(){return S}));var n=r("6b6c");function a(t){return Object(n["a"])({url:"setting/config_class",method:"get",params:t})}function i(t){return Object(n["a"])({url:"setting/config_class/create",method:"get"})}function o(t){return Object(n["a"])({url:"setting/config_class/".concat(t,"/edit"),method:"get"})}function s(t){return Object(n["a"])({url:"setting/config_class/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function u(t){return Object(n["a"])({url:"setting/config",method:"get",params:t})}function c(t){return Object(n["a"])({url:"setting/config/create",method:"get",params:t})}function l(t){return Object(n["a"])({url:"/setting/config/".concat(t,"/edit"),method:"get"})}function d(t,e){return Object(n["a"])({url:"setting/config/set_status/".concat(t,"/").concat(e),method:"PUT"})}function f(t){return Object(n["a"])({url:"setting/group",method:"get",params:t})}function m(t){return Object(n["a"])({url:t.url,method:t.method,data:t.datas})}function g(t){return Object(n["a"])({url:"setting/group/".concat(t),method:"get"})}function p(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function h(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function b(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function v(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function O(t){return Object(n["a"])({url:t,method:"PUT"})}function y(t){return Object(n["a"])({url:"system/log/search_admin",method:"GET"})}function j(t){return Object(n["a"])({url:"system/log",method:"GET",params:t})}function w(){return Object(n["a"])({url:"system/file",method:"GET"})}function _(){return Object(n["a"])({url:"system/backup",method:"GET"})}function k(t){return Object(n["a"])({url:"system/backup/read",method:"GET",params:t})}function $(t){return Object(n["a"])({url:"system/backup/backup",method:"put",data:t})}function x(t){return Object(n["a"])({url:"system/backup/optimize",method:"put",data:t})}function C(t){return Object(n["a"])({url:"system/backup/repair",method:"put",data:t})}function D(t){return Object(n["a"])({url:"system/backup/file_list",method:"GET"})}function P(t){return Object(n["a"])({url:"backup/download",method:"get",responseType:"blob",xsrfHeaderName:"Authori-zation",params:t})}function L(t){return Object(n["a"])({url:"system/backup/import",method:"POST",data:t})}function E(t){return Object(n["a"])({url:"system/file/opendir",method:"GET",params:t})}function T(t){return Object(n["a"])({url:"system/file/openfile?filepath=".concat(t),method:"GET"})}function M(t){return Object(n["a"])({url:"system/file/savefile",method:"post",data:t})}function V(t){return Object(n["a"])({url:"system/replace_site_url",method:"post",data:t})}function S(){return Object(n["a"])({url:"setting/group_all",method:"get"})}},a116:function(t,e,r){"use strict";r("34e3")},cffd:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"i-layout-page-header"},[r("div",{staticClass:"i-layout-page-header"},["system-config-system_config-list"===t.$route.meta.auth[0]?r("Button",{staticClass:"mr20",attrs:{icon:"ios-arrow-back",size:"small"},on:{click:t.back}},[t._v("返回")]):t._e(),r("span",{staticClass:"ivu-page-header-title mr20",domProps:{textContent:t._s(t.$route.meta.title)}})],1)]),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("Row",{staticClass:"ivu-mt box-wrapper"},[!t.$route.params.id&&t.groupAll.length?r("Col",{staticClass:"left-wrapper",attrs:{xs:24,sm:24,md:6,lg:4}},[r("Menu",{attrs:{theme:t.theme3,"active-name":t.sortName,width:"auto"}},[r("MenuGroup",t._l(t.groupAll,(function(e,n){return r("MenuItem",{key:n,staticClass:"menu-item",attrs:{name:e.id},nativeOn:{click:function(r){return t.bindMenuItem(e,n)}}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1):t._e(),r("Col",{ref:"rightBox",attrs:{xs:24,sm:24,md:t.$route.params.id?24:17,lg:t.$route.params.id?24:20}},[r("Card",{attrs:{bordered:!1,"dis-hover":""}},[r("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[r("Row",{attrs:{type:"flex",gutter:24}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"是否显示:"}},[r("Select",{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"}},[r("Option",{attrs:{value:"1"}},[t._v("显示")]),r("Option",{attrs:{value:"0"}},[t._v("不显示")])],1)],1)],1)],1),r("Row",{attrs:{type:"flex"}},[r("Col",t._b({},"Col",t.grid,!1),[r("Button",{staticClass:"mr20",attrs:{type:"primary",icon:"md-add"},on:{click:function(e){return t.groupAdd("添加数据")}}},[t._v("添加数据")])],1)],1)],1),r("Table",{ref:"table",staticClass:"mt25",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 n=e.row;e.index;return[r("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[r("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),r("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(e){var n=e.row,a=e.index;return[r("a",{on:{click:function(e){return t.edit(n,"编辑")}}},[t._v("编辑")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.del(n,"删除这条信息",a)}}},[t._v("删除")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("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)],1)},a=[],i=(r("8e6e"),r("456d"),r("ac6a"),r("7f7f"),r("96cf"),r("1da1")),o=r("ade3"),s=r("2f62"),u=r("31b4"),c=r("8593");function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){Object(o["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f={name:"list",components:{editFrom:u["a"]},data:function(){return{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:d(d({},Object(s["e"])("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},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(c["r"])().then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.groupAll=r.data,t.sortName=r.data[0].id,t.formValidate.gid=r.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:"/admin/system/config/system_group/index"})},getUrl:function(t){var e="setting/group_data"+t;if(this.$route.params.id){var r={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===r[this.$route.name]?e:r[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(c["v"])(this.formValidate,this.getUrl("")).then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=r.data,t.tabList=n.list,t.total=n.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(c["u"])(e,this.getUrl("/header")).then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var n,a,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=r.data,a=n.header,i=[],a.forEach((function(t,e){"img"===t.type&&i.push(e)})),i.forEach((function(t){a[t].render=function(e,r){var n=r.row[a[t].key],i=[];return void 0!==n&&n.length&&n.forEach((function(n,o){i.push(e("div",{style:{width:"36px",height:"36px","border-radius":"4px",cursor:"pointer",display:"inline-block"}},[e("img",{attrs:{src:r.row[a[t].key][o]},style:{width:"100%",height:"100%"}})]))})),e("viewer",i)}})),t.columns1=a,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(c["s"])({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(c["w"])(this.getUrl("/set_status/".concat(t.id,"/").concat(t.status))).then(function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$Message.success(r.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,r={gid:t.gid};this.$modalForm(Object(c["t"])(r,this.getUrl("/".concat(t.id,"/edit")))).then((function(){return e.getList()}))},del:function(t,e,r){var n=this,a={title:e,num:r,url:this.getUrl("/".concat(t.id)),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){n.$Message.success(t.msg),n.tabList.splice(r,1)})).catch((function(t){n.$Message.error(t.msg)}))}}},m=f,g=(r("3af0"),r("2877")),p=Object(g["a"])(m,n,a,!1,null,"3faf2a7c",null);e["default"]=p.exports},f47f:function(t,e,r){}}]);