You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.6 KiB
1 line
5.6 KiB
11 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user"],{6907:function(e,r,t){"use strict";t("f1ae")},"9dce":function(e,r,t){"use strict";t.r(r);var a=function(){var e=this,r=e._self._c;return r("a-card",{attrs:{bordered:!1}},[r("content-header",{attrs:{title:"管理员设置"}}),r("a-form",{attrs:{form:e.form}},[r("a-form-item",{attrs:{label:"管理员用户名",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"后台登录用户名"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["user_name",{rules:[{required:!0,min:4,message:"请输入至少4个字符"}]}],expression:"['user_name', {rules: [{required: true, min: 4, message: '请输入至少4个字符'}]}]"}]})],1),r("a-form-item",{attrs:{label:"用户密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"后台登录密码"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,min:6,message:"请输入至少6个字符"}]}],expression:"['password', {rules: [\n {required: true, min: 6, message: '请输入至少6个字符'}\n ]}]"}],attrs:{type:"password"}})],1),r("a-form-item",{attrs:{label:"确认密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password_confirm",{rules:[{required:!0,message:"请输入确认密码"},{validator:e.compareToFirstPassword}]}],expression:"['password_confirm', {rules: [\n {required: true, message: '请输入确认密码'},\n {validator: compareToFirstPassword}\n ]}]"}],attrs:{type:"password"}})],1),r("a-form-item",{attrs:{wrapperCol:{span:13,offset:6}}},[r("a-button",{attrs:{type:"primary",loading:e.isLoading,disabled:e.isLoading},on:{click:e.handleSubmit}},[e._v("提交")])],1)],1)],1)},s=[],o=(t("d3b7"),t("e17e")),i=t("2af9"),n={name:"TableList",components:{ContentHeader:i["a"],STable:i["d"]},data:function(){return{labelCol:{span:6},wrapperCol:{span:13},isLoading:!1,form:this.$form.createForm(this)}},created:function(){var e=this;this.$nextTick((function(){e.getInfo()}))},methods:{getInfo:function(){var e=this;this.isLoading=!0,Object(o["a"])().then((function(r){var t=r.data.userInfo;e.form.setFieldsValue({user_name:t["user_name"]})})).finally((function(){return e.isLoading=!1}))},compareToFirstPassword:function(e,r,t){var a=this.form;return!r||r===a.getFieldValue("password")||new Error("您输入的确认密码不一致")},handleSubmit:function(){var e=this,r=this.form.validateFields;r((function(r,t){r||(e.isLoading=!0,e.onFormSubmit(t).finally((function(){return e.isLoading=!1})))}))},onFormSubmit:function(e){var r=this;return Object(o["b"])({form:e}).then((function(e){r.$message.success(e.message),setTimeout((function(){window.location.reload()}),1200)}))}}},l=n,u=t("2877"),c=Object(u["a"])(l,a,s,!1,null,null,null);r["default"]=c.exports},ac2a:function(e,r,t){"use strict";t.r(r);var a=function(){var e=this,r=e._self._c;return r("div",{staticClass:"main"},[e._m(0),r("a-form",{ref:"formLogin",staticClass:"user-layout-login",attrs:{id:"formLogin",form:e.form},on:{submit:e.handleSubmit}},[e.isLoginError?r("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{type:"error",showIcon:"",message:e.loginErrorMsg}}):e._e(),r("a-form-item",[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!0,message:"您还没有输入用户名"}],validateTrigger:"change"}],expression:"[\n 'username',\n {rules: [{ required: true, message: '您还没有输入用户名' }], validateTrigger: 'change'}\n ]"}],attrs:{size:"large",type:"text",placeholder:"请输入用户名"}},[r("a-icon",{style:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),r("a-form-item",[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"您还没有输入用户密码"}],validateTrigger:"blur"}],expression:"[\n 'password',\n {rules: [{ required: true, message: '您还没有输入用户密码' }], v
|