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.
 
 
 
 
 
 
shipin/public/admin/system_static/js/chunk-7da6797e.5991c5c2.js

1 lines
5.0 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7da6797e"],{"68b9":function(e,t,a){},"8d4f":function(e,t,a){"use strict";a("68b9")},a53e:function(e,t,a){"use strict";a.r(t),a("d3b7"),a("25f0");var n=a("c7eb"),r=a("1da1"),i=(a("159b"),a("a9e3"),a("b0c0"),a("30ba")),s=(i=a.n(i),a("90e7")),o=a("6b6c");a("2934"),i={name:"setting_setSystem",components:{formCreate:i.a.$form()},data:function(){return{rules:[],option:{form:{labelWidth:"120px"},submitBtn:{col:{span:3,push:3}},global:{upload:{props:{onSuccess:function(e,t){200===e.status?t.url=e.data.src:this.$message.error(e.msg)}}},frame:{props:{closeBtn:!1,okBtn:!1}}}},spinShow:!1,FromData:null,currentTab:"",headerList:[],headerChildrenList:[],childrenId:"",title:""}},created:function(){this.getAllData()},watch:{$route:function(e,t){this.headerChildrenList=[],this.getAllData()},childrenId:function(){this.getFrom()}},methods:{childrenList:function(e){var t=this;t.headerList.forEach((function(a){a.value.toString()===t.currentTab&&(void 0===a.children?(t.childrenId=a.id,t.headerChildrenList=[]):(t.headerChildrenList=a.children,t.childrenId=a.children.length?a.children[e||0].id.toString():""))}))},getHeader:function(e){var t=this;return this.spinShow=!0,new Promise((function(a,i){var o=t.$route.params.tab_id;o={type:t.$route.params.type||0,pid:o||0};Object(s.v)(o).then(function(){var i=Object(r.a)(Object(n.a)().mark((function r(i){var s;return Object(n.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:s=i.data.config_tab,t.headerList=s,t.currentTab=s[e||0].value.toString(),t.childrenList(e?1:0),a(t.currentTab),t.spinShow=!1;case 6:case"end":return n.stop()}}),r)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){t.spinShow=!1,t.$message.error(e)}))}))},getFrom:function(){var e=this;return this.spinShow=!0,new Promise((function(t,a){var i="",o=(i="3"===e.$route.params.type?e.$route.params.tab_id:e.childrenId||e.currentTab,i={tab_id:Number(i)},"setting_logistics"===e.$route.name?"freight/config/edit_basics":"setting_distributionSet"===e.$route.name?"agent/config/edit_basics":"setting_message"===e.$route.name?"serve/sms_config/edit_basics":"setting_setSystem"===e.$route.name?"setting/config/edit_basics":"marketing/integral_config/edit_basics");Object(s.k)(i,o).then(function(){var t=Object(r.a)(Object(n.a)().mark((function t(a){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e.spinShow=!1)===a.data.status)return t.abrupt("return",e.$authLapse(a.data));t.next=3;break;case 3:e.FromData=a.data,e.addColon(a.data.rules),e.rules=a.data.rules,e.title=a.data.title;case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.spinShow=!1,e.$message.error(t.msg)}))}))},addColon:function(e){for(var t=0;t<e.length;t++){var a=e[t];if(a.title+=":",a.control)for(var n=0;n<a.control.length;n++){var r=a.control[n];r.rule.length&&this.addColon(r.rule)}}},getAllData:function(){var e=this;return Object(r.a)(Object(n.a)().mark((function t(){return Object(n.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("download"===e.$route.query.from)return t.next=3,e.getHeader(2);t.next=5;break;case 3:t.next=13;break;case 5:if("3"!==e.$route.params.type)return e.childrenId="",t.next=9,e.getHeader();t.next=11;break;case 9:t.next=13;break;case 11:e.headerList=[],e.getFrom();case 13:case"end":return t.stop()}}),t)})))()},changeTab:function(){this.childrenList()},onSubmit:function(e){var t=this;Object(o.a)({url:this.FromData.action,method:this.FromData.method,data:e}).then((function(a){t.$message.success(a.msg),e.site_name&&(localStorage.setItem("ADMIN_TITLE",e.site_name),t.$store.commit("setAdminTitle",e.site_name),window.document.title="".concat(e.site_name," - 系统设置"))})).catch((function(e){t.$message.error(e.msg)}))}}},a("8d4f"),a=a("2877"),a=Object(a.a)(i,(function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.spinShow,expression:"spinShow"}]},[e.headerList.length?e._e():t("div",{staticClass:"i-layout-page-header header-title"},[t("span",{staticClass:"ivu-page-header-title"},[e._v(e._s(e.$route.meta.title))])]),t("div",{staticClass:"article-manager"},[t("el-card",{staticClass:"ivu-mt fromBox",attrs:{bordered:!1,shadow:"never","body-style":{padding:"0 20px 20px"}}},[e.headerList.length?t("el-tabs",{on:{"tab-click":e.changeTab},model:{value:e.currentTab,callback:function(t){e.currentTab=t},expression:"currentTab"}},e._l(e.headerList,(function(e,a){return t("el-tab-pane",{key:a,attrs:{icon:e.icon,label:e.label,name:e.value.toString()}})})),1):e._e(),e.headerChildrenList.length?t("el-tabs",{model:{value:e.childrenId,callback:function(t){e.childrenId=t},expression:"childrenId"}},e._l(e.headerChildrenList,(function(e,a){return t("el-tab-pane",{key:a,attrs:{label:e.label,name:e.id.toString()}})})),1):e._e(),e.rules.length?t("form-create",{staticStyle:{"padding-top":"20px"},attrs:{option:e.option,rule:e.rules},on:{submit:e.onSubmit}}):e._e()],1)],1)])}),[],!1,null,"55db87b0",null);t.default=a.exports}}]);