1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3f0e5f68"],{"6ee8":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card FromData"},[t.FromData?a("form-create",{attrs:{option:t.option,rule:t.FromData.rule},on:{"on-submit":t.onSubmit}}):t._e()],1)],1)},r=[],s=(a("ac6a"),a("96cf"),a("3b8d")),o=a("db72"),i=a("2f62"),c=a("30ba"),u=a.n(c),m=a("0c6d");function f(t){return m["a"].get("config/".concat(t))}function h(){return m["a"].get("upload/config")}var l=a("83d6"),p={name:"Basics",components:{formCreate:u.a.$form()},data:function(){return{roterPre:l["roterPre"],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()},computed:Object(o["a"])({},Object(i["b"])(["menuList"])),created:function(){this.tempRoute=Object.assign({},this.$route)},methods:{getFrom:function(){var t=this;"upload"===this.$route.params.key?h().then(function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.FromData=a.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)})):f(this.$route.params.key).then(function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.FromData=a.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;m["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 a=this;function n(t){t.forEach((function(t){-1===t.route.indexOf("Basics")||t.route!==a.$route.path?t[e]&&t[e].length&&n(t[e]):a.titles=t.menu_name}))}n(t)}}},d=p,g=(a("874b"),a("2877")),b=Object(g["a"])(d,n,r,!1,null,"4df3eab2",null);e["default"]=b.exports},"874b":function(t,e,a){"use strict";var n=a("a960"),r=a.n(n);r.a},a960:function(t,e,a){}}]);
|