فهرست منبع

密码修改功能

huangguoce 1 ماه پیش
والد
کامیت
73b80b2734

+ 328 - 0
src/views/human/enrollment/registration/EditPassword.vue

@@ -0,0 +1,328 @@
+<template>
+	<v-dialog :title="title" v-model="visible">
+		<el-form :model="inputForm" ref="inputForm" @keyup.enter="doSubmit()" label-width="120px" v-loading="loading"
+			:class="method === 'view' ? 'readonly' : ''" :disabled="method === 'view'" @submit.prevent>
+			<el-divider content-position="left"><el-icon>
+					<lock />
+				</el-icon> 用户数据</el-divider>
+			<el-row :gutter="15">
+				<el-col :span="12" v-if="$TOOL.data.get('IS_PRIMARY_TENANT')">
+					<el-form-item label="所属租户" prop="tenantDTO.id" :rules="[
+						{
+							required: true,
+							message: '租户不能为空',
+							trigger: 'blur',
+						},
+					]">
+						<el-select disabled v-model="inputForm.tenantDTO.id" @change="handleChangeTenant"
+							style="width: 100%" placeholder="请选择">
+							<el-option v-for="item in $TOOL.data.get('TENANT_LIST')" :key="item.id" :label="item.name"
+								:value="item.id">
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="账号" prop="loginName" :rules="[
+						{
+							required: true,
+							message: '登录名不能为空',
+							trigger: 'blur',
+						},
+					]">
+						<el-input disabled v-model="inputForm.loginName" maxlength="50" placeholder=""></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="密码:" prop="newPassword" :rules="[
+						{
+							required: true,
+							message: '密码不能为空',
+							trigger: 'blur',
+						},
+					]
+						">
+						<el-input v-model="inputForm.newPassword" maxlength="50" placeholder="若不修改,请留空"
+							show-password></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="确认密码" prop="confirmNewPassword" :rules="[
+						{
+							validator: validatePass2,
+							trigger: 'blur',
+						},
+					]
+						">
+						<el-input v-model="inputForm.confirmNewPassword" maxlength="50" placeholder=""
+							show-password></el-input>
+					</el-form-item>
+				</el-col>
+
+			</el-row>
+
+		</el-form>
+
+		<!-- <template #footer>
+      <span class="dialog-footer">
+        <el-button  @click="visible = false" icon="circle-close">关闭</el-button>
+        <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="circle-check" v-noMoreClick>确定</el-button>
+      </span>
+     </template> -->
+		<template #footer>
+			<span class="dialog-footer">
+				<el-button @click="visible = false" icon="circle-close">关闭</el-button>
+				<el-button type="primary" v-show="method != 'view'" @click="doSubmit()"
+					icon="circle-check">确定</el-button>
+			</span>
+		</template>
+	</v-dialog>
+</template>
+
+<script>
+import SelectTree from '@/components/treeSelect/treeSelect.vue'
+import userService from "@/api/sys/userService";
+import postService from "@/api/sys/postService";
+import roleService from "@/api/sys/roleService";
+import officeService from "@/api/sys/officeService";
+import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+
+export default {
+	data() {
+		return {
+			visible: false,
+			loading: false,
+			title: "",
+			method: "",
+			roleList: [],
+			postList: [],
+			companyTreeData: [],
+			officeTreeData: [],
+			inputForm: {
+				id: "",
+				tenantDTO: {
+					// 租户信息
+					id: null,
+					name: null,
+				},
+				companyDTO: {
+					// 归属公司
+					id: "",
+					name: "",
+				},
+				officeDTO: {
+					id: "",
+					name: "",
+				},
+				roleIdList: [],
+				postIdList: [],
+				loginName: "", // 登录名
+				no: "", // 工号
+				name: "", // 姓名
+				email: "", // 邮箱
+				phone: "", // 电话
+				mobile: "", // 手机
+				loginFlag: "1", // 是否允许登陆
+				otherServiceFlag: '0', // 是否获取其他服务待办
+				photo: "", // 头像
+				qrCode: "", // 二维码
+				oldLoginName: "", // 原登录名
+				newPassword: "", // 新密码
+				confirmNewPassword: "",
+				sign: "", // 签名
+				remarks: "", // 备注
+			},
+		};
+	},
+	components: {
+		SelectTree
+	},
+	methods: {
+		init(method, id, tenantId) {
+			this.method = method;
+			if (method === "add") {
+				this.title = `新建用户`;
+			} else if (method === "edit") {
+				this.title = "修改用户";
+			} else if (method === "view") {
+				this.title = "查看用户";
+			}
+			this.visible = true;
+			this.$nextTick(() => {
+				if (this.$refs.inputForm !== undefined) {
+					this.$refs.inputForm.resetFields();
+				}
+				this.inputForm.oldLoinName = "";
+				this.inputForm.id = id;
+				this.inputForm.tenantDTO.id = tenantId;
+				if (method === "edit" || method === "view") {
+					// 修改或者查看
+					let p = userService.queryById(this.inputForm.id);
+					this.initTenant(p).then((data) => {
+						this.inputForm = this.recover(this.inputForm, data);
+						this.inputForm.oldLoginName = this.inputForm.loginName;
+					});
+				} else {
+					this.initTenant();
+				}
+			});
+		},
+		initTenant(callback) {
+			return new Promise((resolve) => {
+				if (
+					!this.$TOOL.data.get("IS_PRIMARY_TENANT") ||
+					this.inputForm.tenantDTO.id ||
+					this.inputForm.id
+				) {
+					Promise.all([
+						roleService.list({
+							current: 1,
+							size: -1,
+							tenantId: this.inputForm.tenantDTO.id,
+						}),
+						postService.list({
+							current: 1,
+							size: -1,
+							tenantId: this.inputForm.tenantDTO.id,
+						}),
+						officeService.treeData({
+							type: 1,
+							tenantId: this.inputForm.tenantDTO.id,
+						}),
+						officeService.treeData({
+							type: 2,
+							tenantId: this.inputForm.tenantDTO.id,
+							parentId: this.inputForm.companyDTO.id,
+						}),
+					]).then((result) => {
+						this.roleList = result[0].records;
+						this.postList = result[1].records;
+						this.companyTreeData = result[2];
+						this.officeTreeData = result[3];
+						if (callback && typeof callback.then == "function") {
+							callback.then((data) => {
+								resolve(data);
+							});
+						}
+					});
+				} else {
+					this.officeTreeData = [];
+					this.companyTreeData = [];
+					this.roleList = [];
+					this.postList = [];
+				}
+
+				this.inputForm.companyDTO.id = "";
+				this.inputForm.companyDTO.name = "";
+				this.inputForm.officeDTO.id = "";
+				this.inputForm.officeDTO.name = "";
+				this.inputForm.postIdList = [];
+				this.inputForm.roleIdList = [];
+			});
+		},
+		handleChangeCompany(companyId) {
+			officeService
+				.treeData({
+					type: 2,
+					tenantId: this.inputForm.tenantDTO.id,
+					parentId: companyId,
+				})
+				.then((data) => {
+					this.officeTreeData = data;
+					this.inputForm.officeDTO.id = "";
+					this.inputForm.officeDTO.name = "";
+				});
+		},
+		handleChangeTenant(tenantId) {
+			if (
+				!this.$TOOL.data.get("IS_PRIMARY_TENANT") ||
+				this.inputForm.tenantDTO.id
+			) {
+				Promise.all([
+					roleService.list({
+						current: 1,
+						size: -1,
+						tenantId: tenantId,
+					}),
+					postService.list({
+						current: 1,
+						size: -1,
+						tenantId: tenantId,
+					}),
+					officeService.treeData({ type: 1, tenantId: tenantId }),
+				]).then((result) => {
+					this.roleList = result[0].records;
+					this.postList = result[1].records;
+					this.companyTreeData = result[2];
+				});
+			} else {
+				this.companyTreeData = [];
+				this.roleList = [];
+				this.postList = [];
+			}
+
+			this.inputForm.companyDTO.id = "";
+			this.inputForm.companyDTO.name = "";
+			this.inputForm.officeDTO.id = "";
+			this.inputForm.officeDTO.name = "";
+			this.inputForm.postIdList = [];
+			this.inputForm.roleIdList = [];
+			this.officeTreeData = [];
+		},
+		// 表单提交
+		doSubmit() {
+			this.$refs["inputForm"].validate((valid) => {
+				if (valid) {
+					this.loading = true;
+					userService
+						.save(this.inputForm)
+						.then((data) => {
+							console.log(data)
+							this.loading = false;
+							this.visible = false;
+							this.$message.success("修改成功");
+							this.$emit("refreshDataList");
+							let param = {
+								name: this.inputForm.name,
+								mobilePhone: this.inputForm.mobile,
+								department: this.inputForm.officeDTO.id,
+								userId: data.userId,
+							}
+							enrollmentRegistrationService.saveInfo(param)
+
+							//会计公司和评估公司的人可以将信息添加到入职登记中
+							// officeService.queryById(this.inputForm.companyDTO.id).then((byId) => {
+							// 	if (byId.code === 'xgkjssws' || byId.code === 'xgzcpg'){
+							// 	}
+							// })
+
+						})
+						.catch(() => {
+							this.loading = false;
+						});
+				}
+			});
+		},
+		validatePass2(rule, value, callback) {
+			if (!value) {
+				callback(new Error("密码不能为空"));
+			}
+			if (value !== this.inputForm.newPassword) {
+				callback(new Error("两次输入密码不一致!"));
+			} else {
+				callback();
+			}
+		},
+	},
+};
+</script>
+<style scoped>
+.avatar {
+	height: 100px;
+}
+
+.el-divider__text {
+	font-weight: bold;
+	font-size: 16px;
+}
+</style>

+ 19 - 8
src/views/human/enrollment/registration/EnrollmentRegistrationList.vue

@@ -159,14 +159,16 @@
 
 								<vxe-column title="操作" width="200px" fixed="right" align="center">
 									<template #default="scope">
-										<div v-if="hasPermission('enrollmentRegistration:edit')">
-											<el-button v-if="
-												scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary"
-												@click="edit(scope.row.id)">修改</el-button>
-											<el-button v-if="
-												scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary"
-												@click="del(scope.row.id)">删除</el-button>
-										</div>
+										<el-button v-if="(hasPermission('enrollmentRegistration:editPw')) &&
+											(scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3')" text type="primary" @click="
+												editPw(scope.row)">修改密码</el-button>
+										<el-button v-if="(hasPermission('enrollmentRegistration:edit')) && (scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3')
+										" text type="primary" @click="edit(scope.row.id)">修改</el-button>
+
+										<el-button
+											v-if="
+												(hasPermission('enrollmentRegistration:edit')) && (scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3')"
+											text type="primary" @click="del(scope.row.id)">删除</el-button>
 									</template>
 								</vxe-column>
 							</vxe-table>
@@ -186,6 +188,9 @@
 
 	<EnrollmentRegistrationEditForm ref="enrollmentRegistrationEditForm" @refreshDataList="refreshList">
 	</EnrollmentRegistrationEditForm>
+
+	<!-- 修改密码 -->
+	<EditPassword ref="userPwForm" @refreshDataList="refreshList"></EditPassword>
 	<!--  </div>-->
 </template>
 
@@ -200,6 +205,7 @@ import userService from '@/api/sys/UserService'
 import taskService from '@/api/flowable/TaskService'
 import pick from "lodash.pick";
 import officeService from "@/api/sys/officeService";
+import EditPassword from "./EditPassword.vue"
 export default {
 	data() {
 		return {
@@ -238,6 +244,7 @@ export default {
 		EnrollmentRegistrationEditForm,
 		Splitpanes,
 		Pane,
+		EditPassword
 	},
 	watch: {
 		filterText(val) {
@@ -267,6 +274,10 @@ export default {
 		this.refreshList()
 	},
 	methods: {
+		// 修改密码
+		editPw(row) {
+			this.$refs.userPwForm.init("edit", row.userId, row.tenantId);
+		},
 		filterNode(value, data) {
 			if (!value) return true;
 			return data.name.indexOf(value) !== -1;

+ 24 - 2
src/views/sys/user/UserList.vue

@@ -190,7 +190,7 @@
 										<el-tag v-else-if="row.loginFlag === '0'" type="danger">禁用</el-tag>
 									</template>
 								</vxe-column>
-								<vxe-column title="操作" width="350px" fixed="right" align="center">
+								<vxe-column title="操作" width="400px" fixed="right" align="center">
 									<template #default="{ row }">
 										<el-button v-if="
 											hasPermission('sys:user:view')
@@ -202,6 +202,11 @@
 										" type="primary" text icon="edit-filled" @click="
 											edit(row.id, row.tenantDTO?.id)
 											">修改</el-button>
+										<el-button v-if="
+											hasPermission('sys:user:editPw')
+										" type="primary" text icon="edit-filled" @click="
+											editPw(row.id, row.tenantDTO?.id)
+											">修改密码</el-button>
 										<el-button v-if="hasPermission('sys:user:del')" type="danger" text
 											icon="del-filled" @click="del(row.id)">删除</el-button>
 										<el-button text type="primary" @click="removeRedis(row.id)">清除登录缓存</el-button>
@@ -231,12 +236,14 @@
 		</pane>
 	</splitpanes>
 	<user-form ref="userForm" @refreshDataList="refreshList"></user-form>
+	<UserPwForm ref="userPwForm" @refreshDataList="refreshList"></UserPwForm>
 </template>
 
 <script>
 import { Splitpanes, Pane } from "splitpanes";
 import "splitpanes/dist/splitpanes.css";
 import UserForm from "./UserForm";
+import UserPwForm from "./UserPwForm";
 import { mapState } from "vuex";
 import userService from "@/api/sys/userService";
 import officeService from "@/api/sys/officeService";
@@ -268,7 +275,7 @@ export default {
 			loading: false,
 		};
 	},
-	components: { Splitpanes, Pane, UserForm },
+	components: { Splitpanes, Pane, UserForm, UserPwForm },
 	mounted() {
 		this.$nextTick(() => {
 			// 将表格和工具栏进行关联
@@ -359,6 +366,21 @@ export default {
 				})[0];
 			this.$refs.userForm.init("edit", id, tenantId);
 		},
+		// 修改
+		editPw(id, tenantId) {
+			id =
+				id ||
+				this.$refs.userTable.getCheckboxRecords().map((item) => {
+					return item.id;
+				})[0];
+			tenantId =
+				tenantId ||
+				this.$refs.userTable.getCheckboxRecords().map((item) => {
+					return item.tenantDTO?.id;
+				})[0];
+			this.$refs.userPwForm.init("edit", id, tenantId);
+		},
+
 		// 查看
 		view(id, tenantId) {
 			this.$refs.userForm.init("view", id, tenantId);

+ 330 - 0
src/views/sys/user/UserPwForm.vue

@@ -0,0 +1,330 @@
+<template>
+	<v-dialog :title="title" v-model="visible">
+		<el-form :model="inputForm" ref="inputForm" @keyup.enter="doSubmit()" label-width="120px" v-loading="loading"
+			:class="method === 'view' ? 'readonly' : ''" :disabled="method === 'view'" @submit.prevent>
+			<el-divider content-position="left"><el-icon>
+					<lock />
+				</el-icon> 用户数据</el-divider>
+			<el-row :gutter="15">
+				<el-col :span="12" v-if="$TOOL.data.get('IS_PRIMARY_TENANT')">
+					<el-form-item label="所属租户" prop="tenantDTO.id" :rules="[
+						{
+							required: true,
+							message: '租户不能为空',
+							trigger: 'blur',
+						},
+					]">
+						<el-select disabled v-model="inputForm.tenantDTO.id" @change="handleChangeTenant"
+							style="width: 100%" placeholder="请选择">
+							<el-option v-for="item in $TOOL.data.get('TENANT_LIST')" :key="item.id" :label="item.name"
+								:value="item.id">
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="账号" prop="loginName" :rules="[
+						{
+							required: true,
+							message: '登录名不能为空',
+							trigger: 'blur',
+						},
+					]">
+						<el-input disabled v-model="inputForm.loginName" maxlength="50" placeholder=""></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="密码:" prop="newPassword" :rules="[
+						{
+							required: true,
+							message: '密码不能为空',
+							trigger: 'blur',
+						},
+					]
+						">
+						<el-input v-model="inputForm.newPassword" maxlength="50" placeholder="若不修改,请留空"
+							show-password></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="确认密码" prop="confirmNewPassword" :rules="[
+						{
+							required: true,
+							message: '确认密码不能为空',
+							trigger: 'blur',
+						},
+						{
+							validator: validatePass2,
+							trigger: 'blur',
+						},
+					]
+						">
+						<el-input v-model="inputForm.confirmNewPassword" maxlength="50" placeholder=""
+							show-password></el-input>
+					</el-form-item>
+				</el-col>
+
+			</el-row>
+
+		</el-form>
+
+		<!-- <template #footer>
+      <span class="dialog-footer">
+        <el-button  @click="visible = false" icon="circle-close">关闭</el-button>
+        <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="circle-check" v-noMoreClick>确定</el-button>
+      </span>
+     </template> -->
+		<template #footer>
+			<span class="dialog-footer">
+				<el-button @click="visible = false" icon="circle-close">关闭</el-button>
+				<el-button type="primary" v-show="method != 'view'" @click="doSubmit()"
+					icon="circle-check">确定</el-button>
+			</span>
+		</template>
+	</v-dialog>
+</template>
+
+<script>
+import SelectTree from '@/components/treeSelect/treeSelect.vue'
+import userService from "@/api/sys/userService";
+import postService from "@/api/sys/postService";
+import roleService from "@/api/sys/roleService";
+import officeService from "@/api/sys/officeService";
+import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+
+export default {
+	data() {
+		return {
+			visible: false,
+			loading: false,
+			title: "",
+			method: "",
+			roleList: [],
+			postList: [],
+			companyTreeData: [],
+			officeTreeData: [],
+			inputForm: {
+				id: "",
+				tenantDTO: {
+					// 租户信息
+					id: null,
+					name: null,
+				},
+				companyDTO: {
+					// 归属公司
+					id: "",
+					name: "",
+				},
+				officeDTO: {
+					id: "",
+					name: "",
+				},
+				roleIdList: [],
+				postIdList: [],
+				loginName: "", // 登录名
+				no: "", // 工号
+				name: "", // 姓名
+				email: "", // 邮箱
+				phone: "", // 电话
+				mobile: "", // 手机
+				loginFlag: "1", // 是否允许登陆
+				otherServiceFlag: '0', // 是否获取其他服务待办
+				photo: "", // 头像
+				qrCode: "", // 二维码
+				oldLoginName: "", // 原登录名
+				newPassword: "", // 新密码
+				confirmNewPassword: "",
+				sign: "", // 签名
+				remarks: "", // 备注
+			},
+		};
+	},
+	components: {
+		SelectTree
+	},
+	methods: {
+		init(method, id, tenantId) {
+			this.method = method;
+			if (method === "add") {
+				this.title = `新建用户`;
+			} else if (method === "edit") {
+				this.title = "修改用户";
+			} else if (method === "view") {
+				this.title = "查看用户";
+			}
+			this.visible = true;
+			this.$nextTick(() => {
+				if (this.$refs.inputForm !== undefined) {
+					this.$refs.inputForm.resetFields();
+				}
+				this.inputForm.oldLoinName = "";
+				this.inputForm.id = id;
+				this.inputForm.tenantDTO.id = tenantId;
+				if (method === "edit" || method === "view") {
+					// 修改或者查看
+					let p = userService.queryById(this.inputForm.id);
+					this.initTenant(p).then((data) => {
+						this.inputForm = this.recover(this.inputForm, data);
+						this.inputForm.oldLoginName = this.inputForm.loginName;
+					});
+				} else {
+					this.initTenant();
+				}
+			});
+		},
+		initTenant(callback) {
+			return new Promise((resolve) => {
+				if (
+					!this.$TOOL.data.get("IS_PRIMARY_TENANT") ||
+					this.inputForm.tenantDTO.id ||
+					this.inputForm.id
+				) {
+					Promise.all([
+						roleService.list({
+							current: 1,
+							size: -1,
+							tenantId: this.inputForm.tenantDTO.id,
+						}),
+						postService.list({
+							current: 1,
+							size: -1,
+							tenantId: this.inputForm.tenantDTO.id,
+						}),
+						officeService.treeData({
+							type: 1,
+							tenantId: this.inputForm.tenantDTO.id,
+						}),
+						officeService.treeData({
+							type: 2,
+							tenantId: this.inputForm.tenantDTO.id,
+							parentId: this.inputForm.companyDTO.id,
+						}),
+					]).then((result) => {
+						this.roleList = result[0].records;
+						this.postList = result[1].records;
+						this.companyTreeData = result[2];
+						this.officeTreeData = result[3];
+						if (callback && typeof callback.then == "function") {
+							callback.then((data) => {
+								resolve(data);
+							});
+						}
+					});
+				} else {
+					this.officeTreeData = [];
+					this.companyTreeData = [];
+					this.roleList = [];
+					this.postList = [];
+				}
+
+				this.inputForm.companyDTO.id = "";
+				this.inputForm.companyDTO.name = "";
+				this.inputForm.officeDTO.id = "";
+				this.inputForm.officeDTO.name = "";
+				this.inputForm.postIdList = [];
+				this.inputForm.roleIdList = [];
+			});
+		},
+		handleChangeCompany(companyId) {
+			officeService
+				.treeData({
+					type: 2,
+					tenantId: this.inputForm.tenantDTO.id,
+					parentId: companyId,
+				})
+				.then((data) => {
+					this.officeTreeData = data;
+					this.inputForm.officeDTO.id = "";
+					this.inputForm.officeDTO.name = "";
+				});
+		},
+		handleChangeTenant(tenantId) {
+			if (
+				!this.$TOOL.data.get("IS_PRIMARY_TENANT") ||
+				this.inputForm.tenantDTO.id
+			) {
+				Promise.all([
+					roleService.list({
+						current: 1,
+						size: -1,
+						tenantId: tenantId,
+					}),
+					postService.list({
+						current: 1,
+						size: -1,
+						tenantId: tenantId,
+					}),
+					officeService.treeData({ type: 1, tenantId: tenantId }),
+				]).then((result) => {
+					this.roleList = result[0].records;
+					this.postList = result[1].records;
+					this.companyTreeData = result[2];
+				});
+			} else {
+				this.companyTreeData = [];
+				this.roleList = [];
+				this.postList = [];
+			}
+
+			this.inputForm.companyDTO.id = "";
+			this.inputForm.companyDTO.name = "";
+			this.inputForm.officeDTO.id = "";
+			this.inputForm.officeDTO.name = "";
+			this.inputForm.postIdList = [];
+			this.inputForm.roleIdList = [];
+			this.officeTreeData = [];
+		},
+		// 表单提交
+		doSubmit() {
+			this.$refs["inputForm"].validate((valid) => {
+				if (valid) {
+					this.loading = true;
+					userService
+						.save(this.inputForm)
+						.then((data) => {
+							console.log(data)
+							this.loading = false;
+							this.visible = false;
+							this.$message.success("修改成功");
+							this.$emit("refreshDataList");
+							let param = {
+								name: this.inputForm.name,
+								mobilePhone: this.inputForm.mobile,
+								department: this.inputForm.officeDTO.id,
+								userId: data.userId,
+							}
+							enrollmentRegistrationService.saveInfo(param)
+
+							//会计公司和评估公司的人可以将信息添加到入职登记中
+							// officeService.queryById(this.inputForm.companyDTO.id).then((byId) => {
+							// 	if (byId.code === 'xgkjssws' || byId.code === 'xgzcpg'){
+							// 	}
+							// })
+
+						})
+						.catch(() => {
+							this.loading = false;
+						});
+				}
+			});
+		},
+		validatePass2(rule, value, callback) {
+			if (value !== this.inputForm.newPassword) {
+				callback(new Error("两次输入密码不一致!"));
+			} else {
+				callback();
+			}
+		},
+	},
+};
+</script>
+<style scoped>
+.avatar {
+	height: 100px;
+}
+
+.el-divider__text {
+	font-weight: bold;
+	font-size: 16px;
+}
+</style>