work/static/dist/js/chunk-97de7ce6.f303fba8.js
2020-03-23 16:57:32 +08:00

1 line
6.5 KiB
PHP

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-97de7ce6","chunk-65efb36c"],{"27f0":function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e.$createElement,r=e._self._c||a;return r("div",{staticClass:"userLayout"},[r("div",{staticClass:"container"},[r("div",{staticClass:"top"},[r("div",{staticClass:"header"},[r("a-badge",[r("a",{attrs:{href:"/"}},[r("img",{staticClass:"logo",attrs:{src:t("bae8"),alt:"logo"}}),r("span",{staticClass:"title"},[e._v("Pear Project")])])])],1),r("div",{staticClass:"desc"},[e._v(e._s(e.desc))])]),r("router-view"),e._t("default"),e._m(0)],2)])},s=[function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"footer"},[t("div",{staticClass:"copyright"},[e._v("\n Copyright © 2019 Pear Project\n ")])])}],i={name:"UserLayout",props:{desc:{type:[String],default:function(){return"欢迎使用Pear Project项目管理系统"}}}},l=i,n=(t("f421"),t("4e82")),o=Object(n["a"])(l,r,s,!1,null,null,null);a["default"]=o.exports},e77d:function(e,a,t){},f421:function(e,a,t){"use strict";var r=t("e77d"),s=t.n(r);s.a},fef1:function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"install",staticStyle:{height:"100%"}},[t("user-layout",{attrs:{desc:"正在安装Pear Project项目管理系统"}},[t("div",{staticClass:"main"},[t("a-form",{staticClass:"user-layout-login",attrs:{layout:"horizontal",form:e.form},on:{submit:function(a){return a.preventDefault(),e.handleSubmit(a)}}},[t("a-form-item",{attrs:{labelCol:{span:6},wrapperCol:{span:18},label:"数据库地址"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mysqlHost",{rules:[{required:!0,message:"请输入MySQL 数据库地址"}],validateTrigger:"change",initialValue:"127.0.0.1"}],expression:"[\n 'mysqlHost',\n {rules: [{ required: true, message: '请输入MySQL 数据库地址' }], validateTrigger: 'change',initialValue: '127.0.0.1'}\n ]"}],attrs:{size:"large",type:"text",placeholder:"MySQL 数据库地址"}})],1),t("a-form-item",{attrs:{labelCol:{span:6},wrapperCol:{span:18},label:"数据库名"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mysqlDatabase",{rules:[{required:!0,message:"请输入MySQL 数据库名"}],validateTrigger:"change",initialValue:"pearproject"}],expression:"[\n 'mysqlDatabase',\n {rules: [{ required: true, message: '请输入MySQL 数据库名' }], validateTrigger: 'change',initialValue: 'pearproject'}\n ]"}],attrs:{size:"large",type:"text",placeholder:"MySQL 数据库名"}})],1),t("a-form-item",{attrs:{labelCol:{span:6},wrapperCol:{span:18},label:"用户名"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mysqlUsername",{rules:[{required:!0,message:"请输入MySQL 用户名"}],validateTrigger:"change",initialValue:"root"}],expression:"[\n 'mysqlUsername',\n {rules: [{ required: true, message: '请输入MySQL 用户名' }], validateTrigger: 'change',initialValue: 'root'}\n ]"}],attrs:{size:"large",type:"text",placeholder:"MySQL 用户名"}})],1),t("a-form-item",{attrs:{labelCol:{span:6},wrapperCol:{span:18},label:"密码"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mysqlPassword"],expression:"[\n 'mysqlPassword',\n ]"}],attrs:{size:"large",type:"password",placeholder:"MySQL 密码"}})],1),t("a-form-item",{attrs:{labelCol:{span:6},wrapperCol:{span:18},label:"数据表前缀"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mysqlPrefix",{rules:[{required:!0,message:"请输入MySQL 数据表前缀"}],validateTrigger:"change",initialValue:"pear_"}],expression:"[\n 'mysqlPrefix',\n {rules: [{ required: true, message: '请输入MySQL 数据表前缀' }], validateTrigger: 'change',initialValue: 'pear_'}\n ]"}],attrs:{size:"large",type:"text",placeholder:"MySQL 数据表前缀"}})],1),t("a-form-item",{attrs:{labelCol:{span:6},wrapperCol:{span:18},label:"端口号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mysqlHostport",{rules:[{required:!0,message:"请输入MySQL 端口号"}],validateTrigger:"change",initialValue:"3306"}],expression:"[\n 'mysqlHostport',\n {rules: [{ required: true, message: '请输入MySQL 端口号' }], validateTrigger: 'change',initialValue: '3306'}\n ]"}],attrs:{size:"large",type:"text",placeholder:"MySQL 端口号"}})],1),t("a-form-item",{attrs:{label:"清除数据",labelCol:{span:6},wrapperCol:{span:18}}},[t("a-checkbox",{directives:[{name:"decorator",rawName:"v-decorator",value:["initData",{initialValue:!1}],expression:"[\n 'initData',\n {initialValue: false}\n ]"}]},[e._v("\n 勾选后将清除预置数据\n ")])],1),t("a-form-item",{staticStyle:{"margin-top":"24px"},attrs:{labelCol:{span:6},wrapperCol:{span:18,offset:6}}},[t("a-button",{staticClass:"middle-btn",attrs:{size:"large",type:"primary",htmlType:"submit",loading:e.loading,disabled:e.loading,block:""}},[e.loading?t("span",[e._v("正在安装,请稍后...")]):t("span",[e._v("立即安装")])])],1)],1)],1)])],1)},s=[],i=t("82f8"),l=t("2f14"),n=t("27f0"),o={components:{UserLayout:n["default"]},data:function(){return{loading:!1,form:this.$form.createForm(this),installInfo:{mysqlHost:"",mysqlDatabase:"",mysqlUsername:"",mysqlPassword:"",mysqlPrefix:"",mysqlHostport:"",initData:!1}}},created:function(){this.checkInstall()},mounted:function(){var e=this;setTimeout((function(){e.form=e.$form.createForm(e)}),500)},methods:{handleSubmit:function(){var e=this;this.form.validateFields((function(a,t){a||(e.installInfo=t,e.install())}))},install:function(){var e=this;this.loading=!0,this.installInfo.initData=this.installInfo.initData?1:0,Object(i["c"])(this.installInfo).then((function(a){if(e.loading=!1,!Object(l["a"])(a))return!1;e.$router.push({name:"login"})})).catch((function(){e.loading=!1}))},checkInstall:function(){var e=this;Object(i["a"])().then((function(a){Object(l["a"])(a)&&e.$router.push({name:"login"})}))}}},c=o,u=t("4e82"),d=Object(u["a"])(c,r,s,!1,null,null,null);a["default"]=d.exports}}]);