From d9411a6692197efabcf132d61c051e51cb85e219 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 11 三月 2026 13:33:36 +0800
Subject: [PATCH] #
---
src/main/webapp/views/user/user.html | 783 +++++++++++++++++++------------------------------------
1 files changed, 271 insertions(+), 512 deletions(-)
diff --git a/src/main/webapp/views/user/user.html b/src/main/webapp/views/user/user.html
index 6a8cabe..39d872b 100644
--- a/src/main/webapp/views/user/user.html
+++ b/src/main/webapp/views/user/user.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
- <meta charset="utf-8">
- <title>User 绠$悊</title>
+ <meta charset="UTF-8">
+ <title>绯荤粺鐢ㄦ埛</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@@ -10,9 +10,10 @@
<link rel="stylesheet" href="../../static/css/cool.css">
<style>
:root {
- --card-bg: rgba(255, 255, 255, 0.94);
- --card-border: rgba(216, 226, 238, 0.95);
+ --card-bg: rgba(255, 255, 255, 0.96);
+ --card-border: rgba(217, 227, 238, 0.96);
--text-main: #243447;
+ --text-sub: #6d7f90;
}
[v-cloak] {
@@ -26,156 +27,103 @@
color: var(--text-main);
font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
background:
- radial-gradient(1000px 420px at 0% -10%, rgba(44, 107, 193, 0.12), transparent 56%),
- radial-gradient(900px 400px at 100% 0%, rgba(28, 150, 126, 0.10), transparent 58%),
- linear-gradient(180deg, #f2f6fb 0%, #f8fafc 100%);
+ radial-gradient(920px 360px at 0% 0%, rgba(48, 112, 196, 0.10), transparent 58%),
+ radial-gradient(760px 280px at 100% 10%, rgba(25, 160, 138, 0.08), transparent 60%),
+ linear-gradient(180deg, #f3f7fb 0%, #f8fafc 100%);
}
.page-shell {
- max-width: 1700px;
- margin: 0 auto;
padding: 14px;
box-sizing: border-box;
}
.card-shell {
- position: relative;
- border-radius: 24px;
+ max-width: 1600px;
+ margin: 0 auto;
+ border-radius: 22px;
border: 1px solid var(--card-border);
background:
- radial-gradient(760px 220px at -8% 0%, rgba(43, 117, 196, 0.05), transparent 55%),
- radial-gradient(680px 200px at 108% 10%, rgba(24, 150, 129, 0.05), transparent 58%),
+ radial-gradient(780px 220px at -8% 0%, rgba(45, 118, 196, 0.05), transparent 58%),
+ radial-gradient(640px 180px at 106% 16%, rgba(24, 150, 129, 0.05), transparent 56%),
var(--card-bg);
box-shadow: 0 16px 32px rgba(44, 67, 96, 0.08);
overflow: hidden;
}
- .card-body {
- position: relative;
- z-index: 1;
+ .card-head {
+ padding: 16px 18px 14px;
+ border-bottom: 1px solid rgba(223, 231, 240, 0.92);
}
- .list-toolbar {
- padding: 12px 16px 10px;
- border-bottom: 1px solid rgba(222, 230, 239, 0.92);
- }
-
- .toolbar-main {
+ .head-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
- gap: 8px;
+ gap: 16px;
+ flex-wrap: wrap;
+ margin-bottom: 12px;
+ }
+
+ .head-title {
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ }
+
+ .head-title h1 {
+ margin: 0;
+ font-size: 20px;
+ line-height: 1.2;
+ }
+
+ .head-title p {
+ margin: 0;
+ font-size: 13px;
+ line-height: 1.6;
+ color: var(--text-sub);
+ }
+
+ .head-actions {
+ display: flex;
+ gap: 10px;
flex-wrap: wrap;
}
- .toolbar-left {
- flex: 1 1 960px;
+ .head-actions .el-button {
+ min-width: 96px;
+ }
+
+ .search-form {
display: flex;
align-items: center;
- gap: 8px;
+ gap: 8px 12px;
flex-wrap: wrap;
}
- .toolbar-search {
- flex: 1 1 auto;
- display: flex;
- align-items: center;
- gap: 8px;
- flex-wrap: wrap;
+ .search-form .el-form-item {
+ margin-bottom: 0;
}
- .toolbar-search-item {
- flex: 0 0 152px;
- min-width: 152px;
+ .search-form .el-form-item__label {
+ font-weight: 600;
+ color: #55697d;
}
- .toolbar-search-item.keyword {
- flex: 0 0 220px;
- min-width: 220px;
- }
-
- .toolbar-query-actions,
- .toolbar-ops {
- display: flex;
- gap: 8px;
- flex-wrap: wrap;
- }
-
- .toolbar-ops {
- justify-content: flex-end;
- }
-
- .list-toolbar .el-input__inner,
- .list-toolbar .el-range-editor.el-input__inner,
- .advanced-panel .el-input__inner,
- .advanced-panel .el-range-editor.el-input__inner {
- height: 32px;
- line-height: 32px;
- }
-
- .list-toolbar .el-range-editor.el-input__inner,
- .advanced-panel .el-range-editor.el-input__inner {
- align-items: center;
- }
-
- .list-toolbar .el-input__icon,
- .advanced-panel .el-input__icon {
- line-height: 32px;
- }
-
- .list-toolbar .el-range-editor .el-range__icon,
- .list-toolbar .el-range-editor .el-range-separator,
- .list-toolbar .el-range-editor .el-range__close-icon,
- .advanced-panel .el-range-editor .el-range__icon,
- .advanced-panel .el-range-editor .el-range-separator,
- .advanced-panel .el-range-editor .el-range__close-icon {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- height: 100%;
- line-height: 1;
- }
-
- .list-toolbar .el-button,
- .advanced-panel .el-button {
- padding: 8px 12px;
- border-radius: 8px;
- }
-
- .advanced-panel {
- padding: 10px 16px 12px;
- border-bottom: 1px solid rgba(222, 230, 239, 0.92);
- background: rgba(248, 251, 254, 0.78);
- }
-
- .advanced-grid {
- display: grid;
- grid-template-columns: repeat(6, minmax(0, 1fr));
- gap: 8px;
- }
-
- .advanced-item {
- min-width: 0;
- }
-
- .advanced-item.span-2 {
- grid-column: span 2;
+ .search-form .el-input__inner,
+ .search-form .el-button {
+ height: 34px;
+ line-height: 34px;
}
.table-wrap {
- padding: 10px 16px;
+ padding: 12px 18px 16px;
}
.table-shell {
- border-radius: 20px;
+ border-radius: 18px;
overflow: hidden;
border: 1px solid rgba(217, 227, 238, 0.98);
background: rgba(255, 255, 255, 0.95);
- }
-
- .table-shell .el-table {
- border-radius: 20px;
- overflow: hidden;
}
.table-shell .el-table th {
@@ -184,56 +132,29 @@
font-weight: 700;
}
- .payload-cell {
- display: inline-block;
- max-width: 280px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ .table-shell .el-table td,
+ .table-shell .el-table th {
+ padding: 10px 0;
}
- .mono {
- font-family: Menlo, Monaco, Consolas, "Liberation Mono", monospace;
+ .status-switch {
+ display: inline-flex;
+ align-items: center;
}
.pager-bar {
- padding: 0 16px 16px;
+ padding: 16px 0 0;
display: flex;
- align-items: center;
justify-content: flex-end;
}
- .column-popover {
- max-width: 320px;
- }
-
- .column-popover-head {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 12px;
- margin-bottom: 10px;
- font-size: 13px;
- font-weight: 700;
- color: var(--text-main);
- }
-
- .column-list {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 8px 10px;
- max-height: 280px;
- overflow: auto;
- padding-right: 4px;
- }
-
.dialog-panel .el-dialog {
- border-radius: 24px;
+ border-radius: 22px;
overflow: hidden;
}
.dialog-panel .el-dialog__header {
- padding: 22px 24px 12px;
+ padding: 20px 22px 12px;
background: linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
border-bottom: 1px solid rgba(224, 232, 241, 0.92);
}
@@ -244,7 +165,33 @@
}
.dialog-panel .el-dialog__body {
- padding: 18px 24px 8px;
+ padding: 20px 22px 8px;
+ }
+
+ .dialog-form .el-form-item {
+ margin-bottom: 16px;
+ }
+
+ .dialog-form .el-form-item__label {
+ font-weight: 600;
+ color: #5b6f83;
+ }
+
+ .dialog-form .el-input__inner,
+ .dialog-form .el-select .el-input__inner {
+ height: 36px;
+ line-height: 36px;
+ }
+
+ .dialog-tip {
+ margin: 4px 0 2px;
+ padding: 10px 12px;
+ border-radius: 12px;
+ font-size: 12px;
+ line-height: 1.6;
+ color: #748497;
+ background: rgba(248, 251, 255, 0.92);
+ border: 1px solid rgba(226, 233, 242, 0.96);
}
.dialog-footer {
@@ -253,418 +200,230 @@
gap: 10px;
}
- @media (max-width: 1520px) {
- .advanced-grid {
- grid-template-columns: repeat(5, minmax(0, 1fr));
- }
+ .reset-user {
+ margin-bottom: 16px;
+ padding: 12px 14px;
+ border-radius: 12px;
+ background: rgba(248, 251, 255, 0.92);
+ border: 1px solid rgba(226, 233, 242, 0.96);
+ color: var(--text-sub);
+ font-size: 13px;
}
- @media (max-width: 1280px) {
- .advanced-grid {
- grid-template-columns: repeat(4, minmax(0, 1fr));
- }
+ .table-action-danger {
+ color: #f56c6c;
}
- @media (max-width: 960px) {
- .toolbar-left {
- flex-basis: 100%;
- }
-
- .advanced-grid {
- grid-template-columns: repeat(3, minmax(0, 1fr));
- }
-
- .advanced-item.span-2 {
- grid-column: span 2;
- }
- }
-
- @media (max-width: 720px) {
+ @media (max-width: 768px) {
.page-shell {
- padding: 12px;
+ padding: 10px;
}
- .toolbar-search-item,
- .toolbar-search-item.keyword {
- min-width: 100%;
- flex-basis: 100%;
+ .card-head,
+ .table-wrap {
+ padding-left: 12px;
+ padding-right: 12px;
}
- .toolbar-query-actions,
- .toolbar-ops {
- width: 100%;
- }
-
- .advanced-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
-
- .advanced-item.span-2 {
- grid-column: span 2;
- }
- }
-
- @media (max-width: 560px) {
- .advanced-grid {
- grid-template-columns: 1fr;
- }
-
- .advanced-item.span-2 {
- grid-column: auto;
- }
-
- .list-toolbar,
- .advanced-panel,
- .table-wrap,
- .pager-bar {
- padding-left: 14px;
- padding-right: 14px;
- }
-
- .column-list {
- grid-template-columns: 1fr;
+ .dialog-panel .el-dialog {
+ width: calc(100% - 24px) !important;
}
}
</style>
</head>
<body>
-<div id="app" class="page-shell" v-cloak>
- <section class="card-shell list-card">
- <div class="card-body">
- <div class="list-toolbar">
- <div class="toolbar-main">
- <div class="toolbar-left">
- <div class="toolbar-search">
- <div class="toolbar-search-item keyword">
- <el-input
- v-model.trim="searchForm.condition"
- size="small"
- clearable
- placeholder="璇疯緭鍏�"
- @keyup.enter.native="handleSearch">
- </el-input>
- </div>
- <div
- v-for="field in quickSearchableFields"
- :key="'quick-' + field.field"
- class="toolbar-search-item">
- <el-select
- v-if="field.kind === 'enum'"
- v-model="searchForm[field.field]"
- size="small"
- clearable
- :placeholder="field.label"
- style="width: 100%;">
- <el-option
- v-for="option in field.enumOptions"
- :key="'quick-' + field.field + '-' + option.rawValue"
- :label="option.label"
- :value="normalizeOptionValue(field, option.rawValue)">
- </el-option>
- </el-select>
- <el-autocomplete
- v-else-if="field.kind === 'foreign'"
- v-model="searchDisplay[field.field]"
- size="small"
- :fetch-suggestions="getSuggestionFetcher(field)"
- :placeholder="field.label"
- style="width: 100%;"
- @select="handleSearchForeignSelect(field, $event)"
- @input="handleSearchForeignInput(field)">
- <template slot-scope="{ item }">
- <div class="mono">{{ item.value }}</div>
- <div style="font-size:12px;color:#8a98ac;">ID: {{ item.id }}</div>
- </template>
- </el-autocomplete>
- <el-select
- v-else-if="field.kind === 'checkbox'"
- v-model="searchForm[field.field]"
- size="small"
- clearable
- :placeholder="field.label"
- style="width: 100%;">
- <el-option label="鏄�" :value="normalizeOptionValue(field, field.checkboxActiveRaw)"></el-option>
- <el-option label="鍚�" :value="normalizeOptionValue(field, field.checkboxInactiveRaw)"></el-option>
- </el-select>
- <el-input
- v-else
- v-model.trim="searchForm[field.field]"
- size="small"
- clearable
- :placeholder="field.label"
- @keyup.enter.native="handleSearch">
- </el-input>
- </div>
- </div>
- <div class="toolbar-query-actions">
- <el-button size="small" type="primary" icon="el-icon-search" @click="handleSearch">鎼滅储</el-button>
- <el-button size="small" icon="el-icon-refresh-left" @click="handleReset">閲嶇疆</el-button>
- <el-button
- v-if="hasAdvancedFilters"
- size="small"
- plain
- :icon="advancedFiltersVisible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
- @click="toggleAdvancedFilters">
- {{ advancedFiltersVisible ? '鏀惰捣' : '绛涢��' }}
- </el-button>
- </div>
- </div>
- <div class="toolbar-ops">
- <el-button size="small" type="primary" plain icon="el-icon-plus" @click="openCreateDialog">鏂板</el-button>
- <el-button size="small" type="danger" plain icon="el-icon-delete" :disabled="selection.length === 0" @click="removeSelection">鍒犻櫎</el-button>
- <el-popover
- placement="bottom"
- width="320"
- trigger="click"
- popper-class="column-popover">
- <div class="column-popover-head">
- <span>鍒楄缃�</span>
- <div>
- <el-button type="text" @click="selectAllColumns">鍏ㄩ��</el-button>
- <el-button type="text" @click="resetColumns">閲嶇疆</el-button>
- </div>
- </div>
- <div class="column-list">
- <el-checkbox
- v-for="field in allColumns"
- :key="'column-' + field.field"
- :value="isColumnVisible(field.field)"
- @change="toggleColumn(field.field, $event)">
- {{ field.label }}
- </el-checkbox>
- </div>
- <el-button slot="reference" size="small" plain icon="el-icon-setting">鍒楄缃�</el-button>
- </el-popover>
- <el-button size="small" plain icon="el-icon-download" :loading="exporting" @click="exportRows">瀵煎嚭</el-button>
- </div>
+<div id="app" v-cloak class="page-shell">
+ <div class="card-shell">
+ <div class="card-head">
+ <div class="head-top">
+ <div class="head-title">
+ <h1>绯荤粺鐢ㄦ埛</h1>
+ <p>淇敼鐣岄潰涓嶅啀鏄剧ず瀵嗙爜锛屽瘑鐮佽皟鏁寸粺涓�閫氳繃鈥滈噸缃瘑鐮佲�濆畬鎴愶紱瑙掕壊銆佺姸鎬佺瓑瀛楁鎭㈠涓洪�夋嫨鎺т欢銆�</p>
+ </div>
+ <div class="head-actions">
+ <el-button type="primary" icon="el-icon-plus" @click="openCreateDialog">鏂板鐢ㄦ埛</el-button>
+ <el-button type="danger" icon="el-icon-delete" :disabled="selection.length === 0" @click="removeSelection">鍒犻櫎鎵�閫�</el-button>
</div>
</div>
+ <el-form :inline="true" :model="searchForm" class="search-form" @submit.native.prevent>
+ <el-form-item label="鐧诲綍璐︽埛">
+ <el-input v-model.trim="searchForm.username" clearable placeholder="璇疯緭鍏ョ櫥褰曡处鎴�" @keyup.enter.native="handleSearch"></el-input>
+ </el-form-item>
+ <el-form-item label="璐﹀彿">
+ <el-input v-model.trim="searchForm.mobile" clearable placeholder="璇疯緭鍏ヨ处鍙�" @keyup.enter.native="handleSearch"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" @click="handleSearch">鏌ヨ</el-button>
+ <el-button icon="el-icon-refresh-left" @click="handleResetSearch">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
- <el-collapse-transition>
- <div v-show="advancedFiltersVisible && hasAdvancedFilters" class="advanced-panel">
- <div class="advanced-grid">
- <div
- v-for="field in advancedSearchableFields"
- :key="'advanced-' + field.field"
- :class="['advanced-item', field.kind === 'date' ? 'span-2' : '']">
- <el-date-picker
- v-if="field.kind === 'date'"
- v-model="searchForm[field.field]"
- size="small"
- type="datetimerange"
- unlink-panels
- range-separator="鑷�"
- :start-placeholder="field.label + '寮�濮�'"
- :end-placeholder="field.label + '缁撴潫'"
- value-format="yyyy-MM-dd HH:mm:ss"
- style="width: 100%;">
- </el-date-picker>
- <el-select
- v-else-if="field.kind === 'enum'"
- v-model="searchForm[field.field]"
- size="small"
- clearable
- :placeholder="field.label"
- style="width: 100%;">
- <el-option
- v-for="option in field.enumOptions"
- :key="'advanced-' + field.field + '-' + option.rawValue"
- :label="option.label"
- :value="normalizeOptionValue(field, option.rawValue)">
- </el-option>
- </el-select>
- <el-autocomplete
- v-else-if="field.kind === 'foreign'"
- v-model="searchDisplay[field.field]"
- size="small"
- :fetch-suggestions="getSuggestionFetcher(field)"
- :placeholder="field.label"
- style="width: 100%;"
- @select="handleSearchForeignSelect(field, $event)"
- @input="handleSearchForeignInput(field)">
- <template slot-scope="{ item }">
- <div class="mono">{{ item.value }}</div>
- <div style="font-size:12px;color:#8a98ac;">ID: {{ item.id }}</div>
- </template>
- </el-autocomplete>
- <el-select
- v-else-if="field.kind === 'checkbox'"
- v-model="searchForm[field.field]"
- size="small"
- clearable
- :placeholder="field.label"
- style="width: 100%;">
- <el-option label="鏄�" :value="normalizeOptionValue(field, field.checkboxActiveRaw)"></el-option>
- <el-option label="鍚�" :value="normalizeOptionValue(field, field.checkboxInactiveRaw)"></el-option>
- </el-select>
- <el-input
- v-else
- v-model.trim="searchForm[field.field]"
- size="small"
- clearable
- :placeholder="field.label"
- @keyup.enter.native="handleSearch">
- </el-input>
- </div>
- </div>
- </div>
- </el-collapse-transition>
-
- <div class="table-wrap">
- <div class="table-shell">
- <el-table
- ref="dataTable"
- :key="'table-' + visibleColumnKeys.join('|')"
- v-loading="loading"
- :data="tableData"
- border
- stripe
- :height="tableHeight"
- @selection-change="handleSelectionChange"
- @sort-change="handleSortChange">
- <el-table-column type="selection" width="52" align="center"></el-table-column>
- <el-table-column
- v-for="field in visibleColumns"
- :key="field.field"
- :prop="field.field"
- :label="field.label"
- :width="field.primaryKey ? 90 : null"
- :min-width="field.primaryKey ? null : field.minWidth"
- :sortable="isSortableField(field) ? 'custom' : false"
- :show-overflow-tooltip="field.kind !== 'image'"
- align="center">
- <template slot-scope="scope">
- <el-image
- v-if="field.kind === 'image' && getTableValue(scope.row, field)"
- :src="getTableValue(scope.row, field)"
- fit="cover"
- style="width: 48px; height: 48px; border-radius: 10px;">
- </el-image>
- <el-tag v-else-if="field.kind === 'enum'" size="mini" type="success">
- {{ valueOrDash(getTableValue(scope.row, field)) }}
- </el-tag>
- <el-tag v-else-if="field.kind === 'checkbox'" size="mini" :type="isCheckboxChecked(scope.row, field) ? 'success' : 'info'">
- {{ isCheckboxChecked(scope.row, field) ? '鏄�' : '鍚�' }}
- </el-tag>
- <span v-else-if="field.textarea" class="payload-cell mono" :title="stringValue(getTableValue(scope.row, field))">
- {{ valueOrDash(getTableValue(scope.row, field)) }}
- </span>
- <span v-else>{{ valueOrDash(getTableValue(scope.row, field)) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" width="160" fixed="right" align="center">
- <template slot-scope="scope">
- <el-button type="text" @click="openEditDialog(scope.row)">淇敼</el-button>
- <el-button type="text" style="color:#f56c6c;" @click="removeRows([scope.row[primaryKeyField]])">鍒犻櫎</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
+ <div class="table-wrap">
+ <div class="table-shell" v-loading="loading">
+ <el-table
+ :data="tableData"
+ border
+ stripe
+ height="calc(100vh - 245px)"
+ @selection-change="handleSelectionChange">
+ <el-table-column type="selection" width="48" align="center"></el-table-column>
+ <el-table-column prop="username" label="鐧诲綍璐︽埛" min-width="150" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="mobile" label="璐﹀彿" min-width="150" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="roleName" label="瑙掕壊" min-width="150" show-overflow-tooltip></el-table-column>
+ <el-table-column label="MFA鎺堟潈" width="110" align="center">
+ <template slot-scope="scope">
+ <el-tag size="mini" :type="Number(scope.row.mfaAllow) === 1 ? 'success' : 'info'">
+ {{ Number(scope.row.mfaAllow) === 1 ? '宸叉巿鏉�' : '鏈巿鏉�' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="MFA鐘舵��" width="110" align="center">
+ <template slot-scope="scope">
+ <el-tag size="mini" :type="Number(scope.row.mfaEnabled) === 1 ? 'success' : 'warning'">
+ {{ Number(scope.row.mfaEnabled) === 1 ? '宸插惎鐢�' : '鏈惎鐢�' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐘舵��" width="130" align="center">
+ <template slot-scope="scope">
+ <div class="status-switch">
+ <el-switch
+ v-model="scope.row.status"
+ :active-value="1"
+ :inactive-value="0"
+ active-text="姝e父"
+ inactive-text="绂佺敤"
+ @change="toggleStatus(scope.row)">
+ </el-switch>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="220" fixed="right" align="center">
+ <template slot-scope="scope">
+ <el-button type="text" @click="openEditDialog(scope.row)">缂栬緫</el-button>
+ <el-button type="text" @click="openResetPasswordDialog(scope.row)">閲嶇疆瀵嗙爜</el-button>
+ <el-button type="text" class="table-action-danger" @click="removeRows([scope.row.id])">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
</div>
<div class="pager-bar">
<el-pagination
- small
background
layout="total, sizes, prev, pager, next, jumper"
:current-page="page.curr"
:page-size="page.limit"
:page-sizes="[15, 30, 50, 100, 200, 500]"
:total="page.total"
- @current-change="handleCurrentChange"
- @size-change="handleSizeChange">
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange">
</el-pagination>
</div>
</div>
- </section>
+ </div>
<el-dialog
class="dialog-panel"
- :title="dialog.mode === 'create' ? '鏂板 User' : '淇敼 User'"
+ :title="dialog.mode === 'create' ? '鏂板鐢ㄦ埛' : '淇敼鐢ㄦ埛'"
:visible.sync="dialog.visible"
- width="760px"
- :close-on-click-modal="false">
+ width="620px"
+ :close-on-click-modal="false"
+ append-to-body>
<el-form
ref="dialogForm"
:model="dialogForm"
:rules="dialogRules"
- label-width="110px"
- size="small">
- <el-row :gutter="16">
- <el-col
- v-for="field in editableFields"
- :key="'dialog-' + field.field"
- :span="field.textarea || field.kind === 'image' ? 24 : 12">
- <el-form-item :label="field.label" :prop="field.field">
- <el-date-picker
- v-if="field.kind === 'date'"
- v-model="dialogForm[field.field]"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- :placeholder="'璇烽�夋嫨' + field.label"
- style="width: 100%;">
- </el-date-picker>
- <el-select
- v-else-if="field.kind === 'enum'"
- v-model="dialogForm[field.field]"
- clearable
- :placeholder="'璇烽�夋嫨' + field.label"
- style="width: 100%;">
+ label-width="88px"
+ class="dialog-form"
+ @submit.native.prevent>
+ <el-row :gutter="18">
+ <el-col :xs="24" :sm="12">
+ <el-form-item label="鐧诲綍璐︽埛" prop="username">
+ <el-input v-model.trim="dialogForm.username" maxlength="32" placeholder="璇疯緭鍏ョ櫥褰曡处鎴�"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :xs="24" :sm="12">
+ <el-form-item label="璐﹀彿" prop="mobile">
+ <el-input v-model.trim="dialogForm.mobile" maxlength="32" placeholder="璇疯緭鍏ヨ处鍙�"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :xs="24" :sm="12">
+ <el-form-item label="瑙掕壊" prop="roleId">
+ <el-select v-model="dialogForm.roleId" placeholder="璇烽�夋嫨瑙掕壊" style="width: 100%;">
<el-option
- v-for="option in field.enumOptions"
- :key="'dialog-' + field.field + '-' + option.rawValue"
- :label="option.label"
- :value="normalizeOptionValue(field, option.rawValue)">
+ v-for="role in roles"
+ :key="role.id"
+ :label="role.name"
+ :value="Number(role.id)">
</el-option>
</el-select>
- <el-autocomplete
- v-else-if="field.kind === 'foreign'"
- v-model="dialogDisplay[field.field]"
- :fetch-suggestions="getSuggestionFetcher(field)"
- :placeholder="'璇疯緭鍏�' + field.label"
- style="width: 100%;"
- @select="handleForeignSelect(field, $event)"
- @input="handleForeignInput(field)">
- <template slot-scope="{ item }">
- <div class="mono">{{ item.value }}</div>
- <div style="font-size:12px;color:#8a98ac;">ID: {{ item.id }}</div>
- </template>
- </el-autocomplete>
- <el-switch
- v-else-if="field.kind === 'checkbox'"
- v-model="dialogForm[field.field]"
- :active-value="normalizeOptionValue(field, field.checkboxActiveRaw)"
- :inactive-value="normalizeOptionValue(field, field.checkboxInactiveRaw)"
- active-color="#13ce66"
- inactive-color="#c0c4cc">
- </el-switch>
- <el-input
- v-else-if="field.textarea"
- v-model.trim="dialogForm[field.field]"
- type="textarea"
- :rows="3"
- :placeholder="'璇疯緭鍏�' + field.label">
- </el-input>
- <el-input
- v-else
- v-model.trim="dialogForm[field.field]"
- :placeholder="'璇疯緭鍏�' + field.label">
- </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :xs="24" :sm="12">
+ <el-form-item label="鐘舵��">
+ <el-select v-model="dialogForm.status" placeholder="璇烽�夋嫨鐘舵��" style="width: 100%;">
+ <el-option label="姝e父" :value="1"></el-option>
+ <el-option label="绂佺敤" :value="0"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :xs="24" :sm="12">
+ <el-form-item label="MFA鎺堟潈">
+ <el-select v-model="dialogForm.mfaAllow" placeholder="璇烽�夋嫨" style="width: 100%;">
+ <el-option label="涓嶅厑璁�" :value="0"></el-option>
+ <el-option label="鍏佽" :value="1"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col v-if="dialog.mode === 'create'" :xs="24" :sm="12">
+ <el-form-item label="鍒濆瀵嗙爜" prop="password">
+ <el-input v-model.trim="dialogForm.password" show-password maxlength="32" placeholder="璇疯緭鍏ュ垵濮嬪瘑鐮�"></el-input>
</el-form-item>
</el-col>
</el-row>
+ <div v-if="dialog.mode === 'edit'" class="dialog-tip">
+ 淇敼鐣岄潰涓嶆樉绀哄瘑鐮併�傚闇�璋冩暣瀵嗙爜锛岃鍏抽棴褰撳墠绐楀彛鍚庝娇鐢ㄥ垪琛ㄩ噷鐨勨�滈噸缃瘑鐮佲�濄��
+ </div>
</el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialog.visible = false">鍙栨秷</el-button>
- <el-button type="primary" :loading="dialog.submitting" @click="submitDialog">淇濆瓨</el-button>
- </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeDialog">鍙栨秷</el-button>
+ <el-button type="primary" :loading="dialogSubmitting" @click="submitDialog">淇濆瓨</el-button>
+ </span>
+ </el-dialog>
+
+ <el-dialog
+ class="dialog-panel"
+ title="閲嶇疆瀵嗙爜"
+ :visible.sync="resetDialog.visible"
+ width="420px"
+ :close-on-click-modal="false"
+ append-to-body>
+ <div class="reset-user">褰撳墠鐢ㄦ埛锛歿{ resetDialog.username || '--' }}</div>
+ <el-form
+ ref="resetForm"
+ :model="resetDialog"
+ :rules="resetRules"
+ label-width="72px"
+ class="dialog-form"
+ @submit.native.prevent>
+ <el-form-item label="鏂板瘑鐮�" prop="password">
+ <el-input v-model.trim="resetDialog.password" show-password maxlength="32" placeholder="璇疯緭鍏ユ柊瀵嗙爜"></el-input>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeResetDialog">鍙栨秷</el-button>
+ <el-button type="primary" :loading="resetSubmitting" @click="submitResetPassword">纭畾</el-button>
+ </span>
</el-dialog>
</div>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
-<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/vue/js/vue.min.js"></script>
<script type="text/javascript" src="../../static/vue/element/element.js"></script>
-<script type="text/javascript" src="../../static/js/user/user.js?v=20260311_mfa" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/common.js?v=20260309_i18n_fix1" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/tools/md5.js"></script>
+<script type="text/javascript" src="../../static/js/user/user.js?v=20260311_user_restore1" charset="utf-8"></script>
</body>
</html>
--
Gitblit v1.9.1