<template>
	<div class="app-container">
		<el-row>
			<el-col :span="24">
				<div class="cell">
					<div class="cell-title">
						<div class="title-left">
							<div class="title">账号管理</div>
						</div>
					</div>
					<div class="cell-body">
						<div class="controls">
							<el-form :inline="true" :model="formInline" class="demo-form-inline">
								<el-form-item label="">
									<el-input v-model="formInline.user" prefix-icon="el-icon-search" clearable placeholder="请输入关键字"></el-input>
								</el-form-item>
								<el-form-item>
									<el-button type="primary" class="btn-search" @click="btn_search">查询</el-button>
								</el-form-item>
							</el-form>
							<el-button type="primary" class="export" @click="add_account">添加账号</el-button>
						</div>
						<el-table :data="tableData" height="510" style="width: 100%" :cell-style="cell_style" v-loading="loading"
							:header-cell-style="header_cell_style">
							<el-table-column label="序号" align="center" width="100">
								<template slot-scope="scope">
									<span>{{ (pagination.currentPage - 1) * pagination.pageSize + scope.$index + 1 }}</span>
								</template>
							</el-table-column>
							<el-table-column label="手机" align="center">
								<template slot-scope="scope">
									<span>{{ scope.row.phone }}</span>
								</template>
							</el-table-column>
							<el-table-column label="用户名" align="center">
								<template slot-scope="scope">
									<span>{{ scope.row.admin_name }}</span>
								</template>
							</el-table-column>
							<el-table-column label="姓名" align="center">
								<template slot-scope="scope">
									<span>{{ scope.row.user_name }}</span>
								</template>
							</el-table-column>
							<!-- <el-table-column label="学工号" align="center">
                <template slot-scope="scope">
                  <span>{{ scope.row.card_number }}</span>
                </template>
              </el-table-column> -->
							<el-table-column label="角色" align="center">
								<template slot-scope="scope">
									<span v-if="scope.row.level == 1">管理员</span>
									<span v-else>超级管理员</span>
								</template>
							</el-table-column>
							<el-table-column label="备注" align="center" width="200">
								<template slot-scope="scope">
									<span>{{ scope.row.remark }}</span>
								</template>
							</el-table-column>
							<el-table-column label="操作" align="center">
								<template slot-scope="scope">
									<div v-if="currentUserLevel == 1 && scope.row.admin_name == currentUserName">
										<el-button size="mini" round plain type="primary" @click="edit_amount(scope.$index, scope.row)">修改</el-button>
									</div>
									<div v-else-if="currentUserLevel == 2">
										<el-button size="mini" round plain type="primary" @click="edit_amount(scope.$index, scope.row)">修改</el-button>
										<el-button v-if="scope.row.admin_name !== currentUserName" size="mini" round plain type="danger"
											@click="delete_amount(scope.$index, scope.row)">删除</el-button>
									</div>
								</template>
							</el-table-column>
						</el-table>
						<div class="pagination-table">
							<el-pagination @current-change="currentPageChange" :current-page.sync="pagination.currentPage" :page-size="pagination.pageSize"
								layout="prev, pager, next, jumper" :total="pagination.total">
							</el-pagination>
						</div>
					</div>
				</div>
			</el-col>
		</el-row>
		<!-- 添加账号对话框 -->
		<el-dialog title="添加账号" custom-class="add-account-class" :visible.sync="dialogAddAcountFormVisible" :close-on-click-modal="false"
			:close-on-press-escape="false" @close="add_account_dialog_close">
			<el-form :model="formAddAcount" ref="addAccountForm" :rules="addAccountFormRules">
				<el-form-item label="用户名：" :label-width="formLabelWidth" :required="true" prop="username">
					<el-input v-model="formAddAcount.username" autocomplete="off" placeholder="请输入用户名" maxlength="16">
					</el-input>
				</el-form-item>
				<el-form-item label="姓名：" :label-width="formLabelWidth" :required="true" prop="fullname">
					<el-input v-model="formAddAcount.fullname" autocomplete="off" placeholder="请输入姓名" maxlength="6">
					</el-input>
				</el-form-item>
				<!-- <el-form-item label="卡号：" :label-width="formLabelWidth" :required="true" prop="cardNumber">
          <el-input v-model="formAddAcount.cardNumber" autocomplete="off" placeholder="请输入卡号" maxlength="16">
          </el-input>
        </el-form-item> -->
				<el-form-item label="手机号：" :label-width="formLabelWidth" :required="true" prop="phone">
					<el-input v-model="formAddAcount.phone" autocomplete="off" placeholder="请输入手机号" maxlength="11">
					</el-input>
				</el-form-item>
				<el-form-item label="密　码：" :label-width="formLabelWidth" :required="true" prop="password">
					<el-input v-model="formAddAcount.password" type="password" autocomplete="off" placeholder="请输入密码" maxlength="16">
					</el-input>
				</el-form-item>
				<el-form-item label="确认密码：" :label-width="formLabelWidth" :required="true" prop="confirmPassword">
					<el-input v-model="formAddAcount.confirmPassword" type="password" autocomplete="off" placeholder="请输入确认密码" maxlength="16">
					</el-input>
				</el-form-item>
				<el-form-item label="角　色：" :label-width="formLabelWidth" :required="true" prop="checkedRole">
					<el-checkbox-group v-model="formAddAcount.checkedRole" :min="0" :max="1">
						<el-checkbox v-for="(role, index) in formAddAcount.roles" :label="role" :key="role">{{role}}
						</el-checkbox>
					</el-checkbox-group>
				</el-form-item>
				<el-form-item label="备　注：" :label-width="formLabelWidth">
					<el-input type="textarea" v-model="formAddAcount.comment" placeholder="请输入备注信息" resize="none" maxlength="100" show-word-limit></el-input>
				</el-form-item>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogAddAcountFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="add_account_dialog">确 认</el-button>
			</div>
		</el-dialog>
		<!-- 修改账号对话框 -->
		<el-dialog title="修改账号" custom-class="modify-account-class" :visible.sync="dialogModifyAcountFormVisible" :close-on-click-modal="false"
			:close-on-press-escape="false" @close="modify_account_dialog_close">
			<el-form :model="formModifyAcount" ref="modifyAccountForm" :rules="modifyAccountFormRules">
				<el-form-item label="用户名：" :label-width="formLabelWidth" :required="true" prop="username">
					<el-input v-model="formModifyAcount.username" autocomplete="off" placeholder="请输入用户名" readonly maxlength="16"></el-input>
				</el-form-item>
				<el-form-item label="姓名：" :label-width="formLabelWidth" :required="true" prop="fullname">
					<el-input v-model="formModifyAcount.fullname" autocomplete="off" placeholder="请输入姓名" maxlength="6">
					</el-input>
				</el-form-item>
				<el-form-item label="手机号：" :label-width="formLabelWidth" :required="true" prop="phone">
					<el-input v-model="formModifyAcount.phone" autocomplete="off" placeholder="请输入手机号" maxlength="11">
					</el-input>
				</el-form-item>
				<el-form-item label="密　码：" :label-width="formLabelWidth" prop="password">
					<el-input v-model="formModifyAcount.password" type="password" autocomplete="off" placeholder="请输入密码" maxlength="16">
					</el-input>
				</el-form-item>
				<el-form-item label="确认密码：" :label-width="formLabelWidth" prop="confirmPassword">
					<el-input v-model="formModifyAcount.confirmPassword" type="password" autocomplete="off" placeholder="请输入确认密码" maxlength="16">
					</el-input>
				</el-form-item>
				<el-form-item label="角　色：" :label-width="formLabelWidth" :required="true" prop="checkedRole">
					<el-checkbox-group v-model="formModifyAcount.checkedRole" :min="0" :max="1">
						<el-checkbox v-for="(role, index) in formModifyAcount.roles" :label="role" :key="role">{{role}}
						</el-checkbox>
					</el-checkbox-group>
				</el-form-item>
				<el-form-item label="备　注：" :label-width="formLabelWidth">
					<el-input type="textarea" v-model="formModifyAcount.comment" placeholder="请输入备注信息" resize="none" maxlength="100" show-word-limit></el-input>
				</el-form-item>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogModifyAcountFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="modify_account_dialog">确 认</el-button>
			</div>
		</el-dialog>
		<!-- 删除确认对话框 -->
		<el-dialog custom-class="el-dialog-delete-account" :visible.sync="dialog_delete_account" :close-on-click-modal="false" :close-on-press-escape="false"
			:show-close="false">
			<div slot="" class="del-account-body">
				<img src="../../icons/serveAC/del_warning.png" alt="">
				<div class="del-account-body-txt">是否确定将该【{{deleteAccountData.delete_account}}】从列表中移除？</div>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialog_delete_account = false"> 否 </el-button>
				<el-button type="primary" @click="delete_account_dialog"> 是 </el-button>
			</div>
		</el-dialog>
	</div>
</template>

<script>
	import {
		mapGetters
	} from 'vuex';
	import {
		getTableData,
		addAccount,
		modifyAccount,
		deleteAccount
	} from '@/api/accountMgr';
	// const roleOptions = ['管理员', '超级管理员']
	const roleOptions = ['超级管理员', '管理员']
	export default {
		data() {
			var checkUserName = (rule, value, callback) => {
				if (!value) {
					return callback(new Error('请输入用户名）'));
				}
				setTimeout(() => {
					var reg = /^[a-zA-Z0-9]{5,16}$/
					if (!reg.test(value)) {
						callback(new Error('必须为5-16个数字或字母！'));
					} else {
						callback();
					}
				}, 100);
			};
			var checkFullName = (rule, value, callback) => {
				if (!value) {
					return callback(new Error('请输入姓名'));
				}
				setTimeout(() => {
					var reg = /^[\u4e00-\u9fa5]{2,6}$/
					if (!reg.test(value)) {
						callback(new Error('必须为2-6个汉字！'));
					} else {
						callback();
					}
				}, 100);
			};
			// var checkCardNumber = (rule, value, callback) => {
			//   if (!value) {
			//     return callback(new Error('请输入学工号'));
			//   }
			//   setTimeout(() => {
			//     var reg = /^[a-zA-Z0-9]{5,16}$/
			//     if (!reg.test(value)) {
			//       callback(new Error('必须为5-16个字字符的学工号！'));
			//     } else {
			//       callback();
			//     }
			//   }, 100);
			// };
			var checkPhone = (rule, value, callback) => {
				if (!value) {
					return callback(new Error('请输入手机号'));
				}
				setTimeout(() => {
					var reg = /^1[3456789]\d{9}$/
					if (!reg.test(value)) {
						callback(new Error('手机号格式不对'));
					} else {
						callback();
					}
				}, 100);
			};
			var checkPwd = (rule, value, callback) => {
				if (!value) {
					return callback(new Error('请输入密码'));
				}
				setTimeout(() => {
					var reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,20}$/
					if (!reg.test(value)) {
						callback(new Error('包含大小写字母、数字、特殊符号，长度大于8-20位'));
					} else {
						callback();
					}
				}, 100);
			};
			var checkConfirmPwd = (rule, value, callback) => {
				if (!value) {
					return callback(new Error('请输入确认密码'));
				}
				setTimeout(() => {
					var reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,20}$/
					if (!reg.test(value)) {
						callback(new Error('确认密码包含大小写字母、数字、特殊符号，长度大于8-20位'));
					} else if (this.formAddAcount.password !== this.formAddAcount.confirmPassword) {
						callback(new Error('确认密码与密码不一致！'));
					} else {
						callback();
					}
				}, 100);
			};
			var checkPwd_modify = (rule, value, callback) => {
				if (value) {
					setTimeout(() => {
						var reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,20}$/
						if (!reg.test(value)) {
							callback(new Error('密码包含大小写字母、数字、特殊符号，长度大于8-20位'));
						} else {
							callback();
						}
					}, 100);
				} else {
					callback();
				}
			};
			var checkConfirmPwd_modify = (rule, value, callback) => {
				if (value) {
					setTimeout(() => {
						var reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,20}$/
						if (!reg.test(value)) {
							callback(new Error('确认密码包含大小写字母、数字、特殊符号，长度大于8-20位'));
						} else if (this.formAddAcount.password !== this.formAddAcount.confirmPassword) {
							callback(new Error('确认密码与密码不一致！'));
						} else {
							callback();
						}
					}, 100);
				} else {
					callback();
				}
			};
			var checkRole = (rule, value, callback) => {
				if (!(value.length > 0)) {
					callback(new Error('请选择角色'));
				} else {
					callback()
				}
			};
			return {
				// 当前用户名
				currentUserName: this.$store.state.user.name,
				// 当前用户的权限
				currentUserLevel: this.$store.state.user.level,
				dialogAddAcountFormVisible: false, // 添加账号对话框显示与隐藏
				// 表单数据
				formInline: {
					user: ''
				},
				formAddAcount: { // 添加账号对话框 数据
					phone: '',
					username: '',
					fullname: '',
					password: '',
					confirmPassword: '',
					// cardNumber: '',
					comment: '',
					checkedRole: ['管理员'],
					roles: roleOptions
				},
				addAccountFormRules: {
					username: [{
						validator: checkUserName
					}],
					fullname: [{
						validator: checkFullName
					}],
					// cardNumber: [{
					//   validator: checkCardNumber
					// }],
					phone: [{
						validator: checkPhone
					}],
					password: [{
						validator: checkPwd
					}],
					confirmPassword: [{
						validator: checkConfirmPwd
					}],
					checkedRole: [{
						validator: checkRole
					}]
				},
				dialogModifyAcountFormVisible: false, // 修改账号对话框显示与隐藏
				formModifyAcount: { // 修改账号对话框 数据
					id: '',
					phone: '',
					username: '',
					fullname: '',
					password: '',
					// cardNumber: '',
					confirmPassword: '',
					comment: '',
					checkedRole: [],
					roles: roleOptions
				},
				modifyAccountFormRules: {
					username: [{
						validator: checkUserName
					}],
					fullname: [{
						validator: checkFullName
					}],
					phone: [{
						validator: checkPhone
					}],
					password: [{
						validator: checkPwd_modify
					}],
					confirmPassword: [{
						validator: checkConfirmPwd_modify
					}],
					checkedRole: [{
						validator: checkRole
					}]
				},
				dialog_delete_account: false,
				deleteAccountData: {
					id: '',
					delete_account: ''
				},
				formLabelWidth: '120px',
				// 表格单元格样式
				cell_style: {
					color: '#1A202B',
					'font-size': '14px',
					'font-family': 'Microsoft YaHei-3970(82674968)'
				},
				// 表格头部样式
				header_cell_style: {
					background: '#E6ECFE',
					color: '#1A202B',
					'font-size': '16px',
					'font-family': 'Microsoft YaHei-3970(82674968)'
				},
				tableData: [],
				cond_data: {},
				// 分页参数
				pagination: {
					pageSize: 9,
					currentPage: 1,
					total: 0
				},
				loading: true
			}
		},
		created() {
			// 获取消费记录,表格数据
			this.get_table_data('list');
		},
		mounted() {
			document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
		},
		methods: {
			/**
			 * 搜索
			 */
			btn_search() {
				this.get_table_data('search')
			},
			/**
			 * 条件
			 */
			get_condtion() {
				let data = {
					page: this.pagination.currentPage,
					rows: this.pagination.pageSize
				}
				if (this.formInline.user !== '') {
					data.name_card = this.formInline.user
				}

				this.cond_data = data;
			},
			/**
			 * 获取账号列表数据
			 */
			get_table_data(param) {
				this.loading = true;
				this.get_condtion();

				let data = this.cond_data;
				if (param == 'search') {
					data.page = 1
					this.pagination.currentPage = 1
				}
				// console.log(data);
				getTableData(data).then((res) => {
					// console.log(res);
					if (typeof res.code == 'undefined' || res.code == '') {
						this.$message.error('返回数据格式问题，code未获取到！');
						return;
					}
					if (typeof res.rows !== 'undefined' && res.rows !== '') {
						this.pagination.total = res.total;
						this.tableData = [];
						for (var i = 0; i < res.rows.length; i++) {
							this.tableData.push(res.rows[i]);
						}
					} else {
						this.tableData = [];
						this.$message.warning('没有符合条件的数据！');
					}
				}).catch((err) => {
					// console.log(err);
					this.$message.error(err.message);
				});
				this.loading = false;
			},
			/**
			 * 删除账号
			 * @param {Object} index
			 * @param {Object} row
			 */
			delete_amount(index, row) {
				// console.log(index, row);
				this.deleteAccountData.id = row.id;
				this.deleteAccountData.delete_account = row.admin_name;
				this.dialog_delete_account = true;
			},
			/**
			 * 修改账号
			 * @param {Object} index
			 * @param {Object} row
			 */
			edit_amount(index, row) {
				// console.log(index, row);
				this.dialogModifyAcountFormVisible = true;
				this.formModifyAcount.id = row.id;
				this.formModifyAcount.username = row.admin_name;
				this.formModifyAcount.fullname = row.user_name;
				this.formModifyAcount.phone = row.phone;
				// this.formModifyAcount.cardNumber = row.card_number;
				if (row.level == 1) {
					this.formModifyAcount.checkedRole.push('管理员');
				} else {
					this.formModifyAcount.checkedRole.push('超级管理员');
				}
				this.formModifyAcount.comment = row.remark;
			},
			/**
			 * 添加账号对话框弹出
			 */
			add_account() {
				this.dialogAddAcountFormVisible = true;
			},
			/**
			 * 添加账号对话框确定按钮事件
			 */
			add_account_dialog() {
				this.$refs["addAccountForm"].validate(validate => {
					if (validate) {
						console.log(this.formAddAcount);
						addAccount(this.formAddAcount).then((res) => {
							// console.log(res);
							if (typeof res.code == 'undefined' || res.code == '') {
								this.$message.error('返回数据格式问题，code未获取到！');
								return;
							}

							if (res.code == 200) {
								this.get_table_data();
								this.dialogAddAcountFormVisible = false;
								this.$message.success('添加成功！');
							} else {
								this.$message.error(res.message);
							}
						}).catch((err) => {
							// console.log(err);
							this.$message.error(err.message);
						})
					} else {
						this.$message.error('验证不通过');
						return false;
					}
				})
			},
			/**
			 * 修改账号对话框确定按钮事件
			 */
			modify_account_dialog() {
				this.$refs["modifyAccountForm"].validate(validate => {
					if (validate) {
						// console.log(this.formModifyAcount);
						modifyAccount(this.formModifyAcount).then((res) => {
							// console.log(res);
							if (typeof res.code == 'undefined' || res.code == '') {
								this.$message.error('返回数据格式问题，code未获取到！');
								return;
							}

							if (res.code == 200) {
								this.get_table_data();
								this.dialogModifyAcountFormVisible = false;
								this.$message.success('修改成功！');
							} else {
								this.$message.error(res.message);
							}
						}).catch((err) => {
							// console.log(err);
							this.$message.error(err.message);
						})
					} else {
						this.$message.error('验证不通过');
						return false;
					}
				})
			},
			/**
			 * 删除账号对话框确定按钮事件
			 */
			delete_account_dialog() {
				if (this.deleteAccountData.delete_account === this.currentUserName) {
					this.$message.error('当前用户不能删除！');
					return;
				}

				deleteAccount(this.deleteAccountData.id).then((res) => {
					// console.log(res);
					if (typeof res.code == 'undefined' || res.code == '') {
						this.$message.error('返回数据格式问题，code未获取到！');
						return;
					}

					if (res.code == 200) {
						this.get_table_data();
						this.dialog_delete_account = false;
						this.$message.success('删除成功！');
					} else {
						this.$message.error(res.message);
					}
				}).catch((err) => {
					// console.log(err);
					this.$message.error(err.message);
				})
			},
			/**
			 * 添加账号对话框关闭时清理数据
			 */
			add_account_dialog_close() {
				this.formAddAcount = {
					phone: '',
					username: '',
					fullname: '',
					password: '',
					confirmPassword: '',
					// card_number: '',
					comment: '',
					checkedRole: ['管理员'],
					roles: roleOptions
				};
			},
			/**
			 * 修改账号对话框关闭时清理数据
			 */
			modify_account_dialog_close() {
				this.formModifyAcount = {
					phone: '',
					username: '',
					fullname: '',
					password: '',
					// cardNumber: '',
					confirmPassword: '',
					comment: '',
					checkedRole: [],
					roles: roleOptions
				};
			},
			/**
			 * currentPage 改变时会触发
			 * @param {Object} val
			 */
			currentPageChange(val) {
				this.pagination.currentPage = val;
				this.get_table_data('pages');
			}
		}
	}
</script>

<style lang="scss" scoped>
	.app-container {
		background-color: #EFF2F7;
		padding: 10px;

		.el-row {

			.el-col {
				padding: 10px;

				.cell {
					padding: 30px;
					border-radius: 10px;
					background-color: #FFFFFF;
					// box-shadow: 5px 5px 15px #979797;
					box-shadow: 0px 3px 21px 0px rgba(60, 108, 254, 0.16);

					.cell-title {
						display: flex;
						justify-content: space-between;
						align-items: center;
						margin-bottom: 30px;
						padding-bottom: 30px;
						border-bottom: 1px solid #CCCCCC;

						.title-left {
							display: flex;
							align-items: center;

							.title {
								font-size: 22px;
								font-family: Microsoft YaHei-3970(82674968);
								font-weight: bold;
								color: #1A202B;
							}

							.title-detail {
								margin-left: 50px;
								font-size: 18px;
								font-family: Microsoft YaHei-3970(82674968);
								color: #1A202B;
							}
						}

						.title-right {
							display: flex;
							justify-content: space-between;
							align-items: center;

							.el-button {
								width: 110px;
								height: 46px;
								background: #2B4CFE;
								font-size: 18px;
								color: #FFFFFF;
								font-family: Microsoft YaHei-3970(82674968);
								border-radius: 5px;
							}

							.el-button--warning {
								background: #F88A64;
							}
						}
					}

					.cell-body {

						.controls {
							display: flex;
							justify-content: space-between;
							align-items: center;

							.demo-form-inline {
								display: inline-flex;
								flex-wrap: wrap;
								align-items: center;
								justify-content: flex-start;
								opacity: 0;

								.btn-search {
									background: #3762FE;
									font-size: 14px;
									color: #FFFFFF;
									font-family: Microsoft YaHei-3970(82674968);
									border-radius: 5px;
								}
							}

							.export {
								background: #3762FE;
								font-size: 14px;
								color: #FFFFFF;
								font-family: Microsoft YaHei-3970(82674968);
								border-radius: 5px;
								margin-bottom: 22px;
							}
						}

						.pagination-table {
							display: flex;
							justify-content: flex-end;
							align-items: center;
							height: 30px;
							margin-top: 20px;
							padding-right: 100px;

							::v-deep .el-pagination {
								display: flex;
								justify-content: flex-end;
								align-items: center;
							}

							::v-deep .el-pagination ul {
								display: flex;

							}

							::v-deep .el-pagination button,
							::v-deep .el-pagination li {
								display: flex;
								justify-content: center;
								align-items: center;
								width: 50px;
								height: 36px;
								border: 1px solid #626262;
								border-radius: 3px;
								font-size: 14px;
								margin: 0 5px;
							}

							::v-deep .el-pagination span {
								margin-left: 10px;
							}

							::v-deep .el-pagination .el-pagination__jump {
								font-size: 16px;
							}

							::v-deep .el-pagination .el-pagination__editor {
								width: 50px;
								height: 36px;
								margin: 0 5px;
							}

							::v-deep .el-pagination .el-input__inner {
								width: 50px;
								height: 36px;
								border: 1px solid #626262;
								margin: -4px 0 0 0;
							}
						}
					}
				}
			}
		}

		::v-deep .el-dialog {
			margin: 0 !important;
			width: 600px;
			height: 460px;
			background: #FFFFFF;
			box-shadow: 0px 0px 13px 0px rgba(0, 0, 0, 0.29);
			border-radius: 10px;
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);

			.el-dialog__header {
				display: flex;
				align-items: center;
				width: 100%;
				height: 58px;
				padding: 30px;
				background: #E6EBFE;
				border-radius: 10px 10px 0px 0px;
				font-weight: bold;
			}

			.el-dialog__body {
				padding-bottom: 0;

				.el-form-item__label,
				.el-form-item__content {
					font-size: 16px;
					font-family: Microsoft YaHei-3970(82674968);
					color: #53575A;
				}

				.el-input__inner {
					width: 180px;
				}
			}

			// 删除对话框的样式
			.del-account-body {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				height: 180px;

				img {
					width: 72px;
				}

				.del-account-body-txt {
					height: 58px;
					line-height: 58px;
					font-size: 18px;
					font-family: Microsoft YaHei-3970(82674968);
					color: #333333;
				}
			}

			.el-dialog__footer {
				padding-bottom: 0 !important;
				text-align: center;

				.el-button.el-button--default {
					width: 75px;
					height: 40px;
					border: 1px solid #2B4CFE;
					border-radius: 6px;
					font-size: 16px;
					font-family: Microsoft YaHei-3970(82674968);
					color: #2B4CFE;
				}

				.el-button.el-button--primary {
					width: 75px;
					height: 40px;
					background: #2B4CFE;
					border-radius: 6px;
					font-size: 16px;
					font-family: Microsoft YaHei-3970(82674968);
					color: #FFFFFF;
					margin-left: 60px;
				}
			}
		}
	}
</style>

<style>
	.add-account-class,
	.modify-account-class {
		height: 630px !important;
	}

	.el-dialog-delete-account {
		height: 300px !important;
		width: 500px !important;
	}

	.el-dialog-delete-account .el-dialog__header {
		display: none !important;
	}
</style>