webpackJsonp([10],{nxo0:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("Xxa5"),r=a.n(s),n=a("exGp"),i=a.n(n),c={name:"websiteSetting",data:function(){return{webName:"",webKey:"",webDescription:"",dataId:0}},computed:{},methods:{doSave:function(){var e=this;return i()(r.a.mark(function t(){var a,s;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a={webName:"请输入网站名称",webKey:"请输入关键词",webDescription:"请输入描述"},t.t0=r.a.keys(a);case 2:if((t.t1=t.t0()).done){t.next=9;break}if(s=t.t1.value,e[s]){t.next=7;break}return e.$common.createMessage({Vue:e,title:a[s],type:"warning"}),t.abrupt("return");case 7:t.next=2;break;case 9:return t.next=12,e.$common.Ajax(e,{url:e.dataId?"api/Websit/ModifyWebsit":"api/Websit/AddWebsit",params:{id:e.dataId,webName:e.webName,webKey:e.webKey,webDescription:e.webDescription}});case 12:t.sent.Success&&(e.$common.createMessage({Vue:e,title:"操作成功！"}),e.getData());case 14:case"end":return t.stop()}},t,e)}))()},getData:function(){var e=this;return i()(r.a.mark(function t(){var a,s,n;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$common.Ajax(e,{url:"api/Websit/GetWebsit",methods:"get"});case 2:if(!(a=t.sent).Success){t.next=9;break}if(a.ResData){t.next=6;break}return t.abrupt("return");case 6:for(n in s={webName:"WebName",webKey:"WebKey",webDescription:"WebDescription"},e.dataId=a.ResData.Id,s)e[n]=a.ResData[s[n]];case 9:case"end":return t.stop()}},t,e)}))()}},mounted:function(){},created:function(){this.getData()}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{},[a("div",{staticClass:"content-header"},[a("el-breadcrumb",{attrs:{separator:"/"}},[a("el-breadcrumb-item",[e._v("一级菜单")]),e._v(" "),a("el-breadcrumb-item",[e._v("二级菜单")])],1),e._v(" "),a("div",{staticClass:"header-title"},[e._v("网站设置")])],1),e._v(" "),a("div",{staticClass:"body-wrapper"},[a("div",{staticClass:"inputItem"},[a("span",{staticClass:"label label-required"},[e._v("网站名称：")]),e._v(" "),a("el-input",{attrs:{size:"small"},model:{value:e.webName,callback:function(t){e.webName=t},expression:"webName"}})],1),e._v(" "),a("div",{staticClass:"inputItem"},[a("span",{staticClass:"label label-required"},[e._v("关键词：")]),e._v(" "),a("el-input",{attrs:{size:"small"},model:{value:e.webKey,callback:function(t){e.webKey=t},expression:"webKey"}})],1),e._v(" "),a("div",{staticClass:"inputItem"},[a("span",{staticClass:"label label-required"},[e._v("描述：")]),e._v(" "),a("el-input",{attrs:{size:"small",type:"textarea",rows:4},model:{value:e.webDescription,callback:function(t){e.webDescription=t},expression:"webDescription"}})],1),e._v(" "),a("div",{staticClass:"footer"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.doSave}},[e._v("保存")])],1)])])},staticRenderFns:[]};var o=a("VU/8")(c,l,!1,function(e){a("rCz0")},null,null);t.default=o.exports},rCz0:function(e,t){}});
//# sourceMappingURL=10.7cf7f4abac5b45772594.js.map