(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-18598852"],{"26b4":function(e,t,l){"use strict";l("be73")},"36e9":function(e,t,l){"use strict";l.d(t,"b",(function(){return o})),l.d(t,"a",(function(){return a}));var s=l("b775");function o(e){return Object(s["a"])({url:"/init/initdb",method:"post",data:e})}function a(){return Object(s["a"])({url:"/init/checkdb",method:"get"})}},a65d:function(e,t,l){"use strict";l.r(t);var s=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"init_page"},[l("div",{staticClass:"init_page_panle"},[e.hello<2?l("div",{staticClass:"hello  ",class:[e.hello<1?"slide-in-fwd-top":"slide-out-right"],attrs:{id:"hello"}},[l("div",[l("div",{staticClass:"hello_title"},[e._v("IRISADMIN")]),l("p",{staticClass:"in-two a-fadeinT"},[e._v("初始化须知")]),l("p",{staticClass:"init_p"},[e._v("1.您需有用一定的VUE和golang基础")]),l("p",{staticClass:"init_p"},[e._v("2.请您确认是否已经阅读过官方文档")]),l("p",{staticClass:"init_p"},[e._v("3.请您确认是否了解后续的配置流程")]),l("p",{staticClass:"init_p"},[e._v("注：开发组不为文档中书写过的内容提供无偿服务")]),l("p",{staticClass:"init_btn"},[l("el-button",{attrs:{type:"primary"},on:{click:e.showNext}},[e._v(" 我已确认 ")])],1)])]):e._e(),e.hello>0?l("div",{staticClass:" form",class:[e.hello>0&&!e.out?"slide-in-left":"",e.out?"slide-out-right":""]},[l("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px"}},[l("el-form-item",{attrs:{label:"数据库类型"}},[l("el-select",{attrs:{disabled:"",placeholder:"请选择"},model:{value:e.form.sqlType,callback:function(t){e.$set(e.form,"sqlType",t)},expression:"form.sqlType"}},[l("el-option",{key:"mysql",attrs:{label:"mysql(目前只支持mysql)",value:"mysql"}})],1)],1),l("el-form-item",{attrs:{label:"host"}},[l("el-input",{attrs:{placeholder:"请输入数据库链接"},model:{value:e.form.sql.host,callback:function(t){e.$set(e.form.sql,"host",t)},expression:"form.sql.host"}})],1),l("el-form-item",{attrs:{label:"port"}},[l("el-input",{attrs:{placeholder:"请输入数据库端口"},model:{value:e.form.sql.port,callback:function(t){e.$set(e.form.sql,"port",t)},expression:"form.sql.port"}})],1),l("el-form-item",{attrs:{label:"userName"}},[l("el-input",{attrs:{placeholder:"请输入数据库用户名"},model:{value:e.form.sql.userName,callback:function(t){e.$set(e.form.sql,"userName",t)},expression:"form.sql.userName"}})],1),l("el-form-item",{attrs:{label:"password"}},[l("el-input",{attrs:{placeholder:"请输入数据库密码（没有则为空）"},model:{value:e.form.sql.password,callback:function(t){e.$set(e.form.sql,"password",t)},expression:"form.sql.password"}})],1),l("el-form-item",{attrs:{label:"dbName"}},[l("el-input",{attrs:{placeholder:"请输入数据库名称"},model:{value:e.form.sql.dbName,callback:function(t){e.$set(e.form.sql,"dbName",t)},expression:"form.sql.dbName"}})],1),l("el-divider"),l("el-form-item",{attrs:{label:"缓存类型"}},[l("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.cacheType,callback:function(t){e.$set(e.form,"cacheType",t)},expression:"form.cacheType"}},[l("el-option",{key:"local",attrs:{label:"本地缓存",value:"local"}}),l("el-option",{key:"redis",attrs:{label:"Redis",value:"redis"}})],1)],1),"redis"==e.form.cacheType?l("div",[l("el-form-item",{attrs:{label:"host"}},[l("el-input",{attrs:{placeholder:"请输入Redis链接"},model:{value:e.form.cache.host,callback:function(t){e.$set(e.form.cache,"host",t)},expression:"form.cache.host"}})],1),l("el-form-item",{attrs:{label:"port"}},[l("el-input",{attrs:{placeholder:"请输入Redis端口"},model:{value:e.form.cache.port,callback:function(t){e.$set(e.form.cache,"port",t)},expression:"form.cache.port"}})],1),l("el-form-item",{attrs:{label:"password"}},[l("el-input",{attrs:{placeholder:"请输入Redis密码（没有则为空）"},model:{value:e.form.cache.password,callback:function(t){e.$set(e.form.cache,"password",t)},expression:"form.cache.password"}})],1)],1):e._e(),l("el-form-item",[l("div",{staticStyle:{"text-align":"center"}},[l("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("立即初始化")])],1)])],1)],1):e._e()])])},o=[],a=l("36e9"),r={name:"Init",data:function(){return{hello:0,out:!1,form:{sqlType:"mysql",sql:{host:"127.0.0.1",port:"3306",userName:"root",password:"",dbName:"irisadmin"},cacheType:"local",cache:{host:"127.0.0.1",port:"6379",password:""}}}},created:function(){},methods:{showNext:function(){this.hello=this.hello+1,console.log(this.hello)},goDoc:function(){window.open("")},onSubmit:function(){var e=this,t=this.$loading({lock:!0,text:"正在初始化数据库，请稍候",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(a["b"])(this.form).then((function(l){var s=l.code,o=l.message;2e3===s?e.$router.push({name:"Login"}):e.$message.error(o),t.close()})).catch((function(l){var s=l.message;e.$message.error(s),t.close()}))}}},i=r,c=(l("26b4"),l("2877")),n=Object(c["a"])(i,s,o,!1,null,"338b8a54",null);t["default"]=n.exports},be73:function(e,t,l){}}]);