diff --git a/src/components/index.vue b/src/components/index.vue index 3873be8..c1eb29b 100644 --- a/src/components/index.vue +++ b/src/components/index.vue @@ -244,7 +244,7 @@ import * as locasto from "./../util/item"; export default { name: "IndexTop", - data: function () { + data: function() { return { MenuWidth: 200, LoginName: "系统管理员", //登录用户名称 @@ -254,7 +254,7 @@ //弹窗相关 dialogInfo: { title: { - updatePw: "修改密码", + updatePw: "修改密码" }, visible: false, btLoading: false, @@ -268,9 +268,9 @@ icon: "", event: "save", show: true, - loading: true, - }, - ], + loading: true + } + ] }, //表单相关 formInfo: { @@ -278,7 +278,7 @@ data: { userNo: "", //账户 password: "", //原始密码 - newpassword: "", //新密码 + newpassword: "" //新密码 }, fieldList: [ { @@ -287,26 +287,26 @@ disabled: true, type: "input", required: true, - className: "el-form-block", + className: "el-form-block" }, { label: "原密码", value: "password", type: "password", required: true, - className: "el-form-block", + className: "el-form-block" }, { label: "新密码", value: "newpassword", type: "password", required: true, - className: "el-form-block", - }, + className: "el-form-block" + } ], rules: {}, - labelWidth: "100px", - }, + labelWidth: "100px" + } }; }, watch: { @@ -319,10 +319,10 @@ this.resetForm(); this.dialogInfo.btLoading = false; } - }, + } }, methods: { - MenuSHOW: function () { + MenuSHOW: function() { if (this.MenuWidth == 200) { this.MenuWidth = 0; } else { @@ -459,14 +459,14 @@ switch (event) { //保存 case "save": - formInfo.ref.validate((valid) => { + formInfo.ref.validate(valid => { if (valid) { let api; let params = formInfo.data; dialogInfo.btLoading = true; this.$http .post(this.nozzle.updateUserPwd, { data: params }) - .then((res) => { + .then(res => { dialogInfo.btLoading = false; if (res.data.code === 1) { dialogInfo.visible = false; @@ -474,10 +474,10 @@ this.$message({ message: res.data.msg, type: res.data.code === 1 ? "success" : "error", - showClose: true, + showClose: true }); }) - .catch((e) => { + .catch(e => { dialogInfo.btLoading = false; console.log(e); }); @@ -495,17 +495,17 @@ this.formInfo.data = { userNo: "", //账户 password: "", //原始密码 - newpassword: "", //新密码 + newpassword: "" //新密码 }; - }, + } }, - mounted: function () { + mounted: function() { //添加菜单 // this.LoadMenu(); // this.loadLoginName(); this.initRules(); this.LoginName = locasto.getItem("USERName"); - }, + } };