(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0d7f8e"],{"78a8":function(e,t,r){"use strict";r.r(t);var n=(r("b0c0"),r("d3b7"),r("ac1f"),r("5319"),r("96cf"),r("1da1")),a=r("2b0e"),c=r("f1b3"),s=r("2ec1"),i=r("4af1"),o=a.a.extend({name:"Createteam",components:{"main-page":function(){return r.e("chunk-6119f298").then(r.bind(null,"4c9e"))},"input-cell":function(){return Promise.all([r.e("chunk-14b38b7c"),r.e("chunk-2d0d5ff1")]).then(r.bind(null,"82bc"))},"c-button":function(){return r.e("chunk-2d0df078").then(r.bind(null,"87be"))},"group-cell":function(){return r.e("chunk-40efd966").then(r.bind(null,"b799"))},"c-cell":function(){return r.e("chunk-fc1d43b8").then(r.bind(null,"4420"))},"app-icon":function(){return Promise.all([r.e("chunk-0a381f90"),r.e("chunk-7c0e491e")]).then(r.bind(null,"73f7"))}},props:{isValid:{type:Boolean,default:!0}},data:function(){return{leaderName:"",name:"",IMServer:"",nodeServer:"",oaServer:"",showServerList:!1,entId:""}},computed:{getClass:function(){return this.showServerList?"w-1.5 h-2 transform -rotate-90":"w-1.5 h-2 transform rotate-90"}},created:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Object(c.h)()){t.next=9;break}return t.next=4,Object(s.a)(i.c.GET_OA_SERVER);case 4:r=t.sent,e.oaServer=r.data,t.next=10;break;case 9:e.oaServer=Object(c.b)();case 10:t.next=13;break;case 12:e.oaServer="http://172.16.101.107:20000";case 13:e.$service.common.getServer().then((function(t){var r=t.data;0===r.code?(e.IMServer=r.data.IMServer,e.nodeServer=r.data.nodeServer):e.$toast(r.msg)}));case 14:case"end":return t.stop()}}),t)})))()},methods:{handleClickLeft:function(){Object(c.a)()},showServer:function(){this.showServerList=!this.showServerList},toConfirm:function(){var e=this;if(""!==this.name&&""!==this.leaderName){var t={name:this.name,leaderName:this.leaderName,imServer:this.IMServer,nodeServer:this.nodeServer,oaServer:this.oaServer};this.$service.enterprise.create(t).then(function(){var t=Object(n.a)(regeneratorRuntime.mark((function t(r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=r.data).code!==e.$global.success){t.next=13;break}if(e.$toast("创建成功"),e.name="",e.leaderName="",Object(c.h)()){t.next=8;break}return Object(s.a)(i.c.RELOAD),t.abrupt("return");case 8:return t.next=10,Object(c.j)({goHome:!1});case 10:e.$router.replace({path:"/team/team-qrcode",query:{entId:n.data.id}}),t.next=14;break;case 13:e.$toast(n.msg);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){}))}else this.$toast("请检查输入内容")}}}),l=r("2877"),u=Object(l.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("main-page",{attrs:{"left-arrow":""},on:{"click-left":e.handleClickLeft}},[r("div",{staticClass:"mx-4 pt-14 pb-2"},[r("div",{staticClass:"text-sm text-color-primary bg-color-primary-light px-4 py-3 rounded"},[e._v("\n      创建团队需选择或添加一台服务器为默认服务器，用于保存企业模块信息，聊天服务器和区块链节点自动配置。\n    ")]),r("div",{staticClass:"mt-4"},[r("input-cell",{attrs:{required:"",limit:20,label:"企业/组织/团队名称",placeholder:"请输入团队名称","error-msg":"团队名称不能为空"},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}}),r("input-cell",{staticClass:"mt-4",attrs:{required:"",limit:20,label:"负责人真实姓名",placeholder:"请输入真实姓名","error-msg":"姓名不能为空"},model:{value:e.leaderName,callback:function(t){e.leaderName=t},expression:"leaderName"}}),r("group-cell",{staticClass:"mt-4",attrs:{title:"选择服务器"}},[r("c-cell",{attrs:{dot:""}},[r("div",{attrs:{slot:"content"},slot:"content"},[r("div",{},[e._v("企业服务器")]),r("div",{staticClass:"text-text-secondary"},[e._v(e._s(e.oaServer))])])]),e.showServerList?r("div",[r("c-cell",{attrs:{dot:""}},[r("div",{attrs:{slot:"content"},slot:"content"},[r("div",{},[e._v("聊天服务器")]),r("div",{staticClass:"text-text-secondary"},[e._v(e._s(e.IMServer))])])]),r("c-cell",{attrs:{dot:""}},[r("div",{attrs:{slot:"content"},slot:"content"},[r("div",{},[e._v("区块链节点")]),r("div",{staticClass:"text-text-secondary"},[e._v(e._s(e.nodeServer))])])])],1):e._e(),r("div",{staticClass:"bg-white flex items-center justify-center py-3",on:{click:e.showServer}},[r("app-icon",{attrs:{"icon-name":"right-arrow","class-name":e.getClass}})],1)],1)],1),r("div",{staticClass:"mt-6"},[r("div",{staticClass:"text-center mb-3 text-text-secondary text-sm"},[e._v("确定创建团队将创建您的团队账号并绑定您的个人账号")]),r("c-button",{on:{click:e.toConfirm}},[e._v("确定")])],1)])])}),[],!1,null,null,null);t.default=u.exports}}]);
//# sourceMappingURL=chunk-2d0d7f8e.db780ee3.js.map