1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7e69fe40"],{"58c2":function(t,e,r){"use strict";var n=r("f078"),a=r.n(n);a.a},"6ee8":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",{staticClass:"divBox"},[r("el-card",{staticClass:"box-card FromData"},[t.FromData?r("form-create",{attrs:{option:t.option,rule:t.FromData.rule},on:{"on-submit":t.onSubmit}}):t._e()],1)],1)},a=[],o=(r("8e6e"),r("456d"),r("ac6a"),r("96cf"),r("3b8d")),s=r("bd86"),i=r("2f62"),c=r("30ba"),u=r.n(c),f=r("0c6d");function p(t){return f["a"].get("config/".concat(t))}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 m(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(s["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 h={name:"Basics",components:{formCreate:u.a.$form()},data:function(){return{option:{form:{labelWidth:"150px"},global:{upload:{props:{onSuccess:function(t,e){200===t.status&&(e.url=t.data.src)}}}}},FromData:null,titles:""}},mounted:function(){this.setTagsViewTitle(),this.getFrom()},created:function(){this.tempRoute=Object.assign({},this.$route)},computed:m({},Object(i["b"])(["menuList"])),methods:{getFrom:function(){var t=this;console.log(this.$route.params.key),p(this.$route.params.key).then(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.FromData=r.data;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))},onSubmit:function(t){var e=this;f["a"][this.FromData.method.toLowerCase()](this.FromData.action.slice(5),t).then((function(t){e.$message.success(t.message||"提交成功")})).catch((function(t){e.$message.error(t.message||"提交失败")}))},setTagsViewTitle:function(){this.deepTraversal(this.menuList,"children");var t=Object.assign({},this.tempRoute,{title:this.titles});this.$store.dispatch("tagsView/updateVisitedView",t)},deepTraversal:function(t,e){var r=this;function n(t){t.forEach((function(t){-1===t.route.indexOf("Basics")||t.route!==r.$route.path?t[e]&&t[e].length&&n(t[e]):r.titles=t.menu_name}))}n(t)}}},b=h,d=(r("58c2"),r("2877")),g=Object(d["a"])(b,n,a,!1,null,"0ad2a253",null);e["default"]=g.exports},f078:function(t,e,r){}}]);
|