|
|
@@ -4,75 +4,35 @@
|
|
4
|
4
|
<!--部门数据-->
|
|
5
|
5
|
<el-col :span="4" :xs="24">
|
|
6
|
6
|
<div class="head-container">
|
|
7
|
|
- <el-input
|
|
8
|
|
- v-model="deptName"
|
|
9
|
|
- placeholder="请输入部门名称"
|
|
10
|
|
- clearable
|
|
11
|
|
- size="small"
|
|
12
|
|
- prefix-icon="el-icon-search"
|
|
13
|
|
- style="margin-bottom: 20px"
|
|
14
|
|
- />
|
|
|
7
|
+ <el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search"
|
|
|
8
|
+ style="margin-bottom: 20px" />
|
|
15
|
9
|
</div>
|
|
16
|
10
|
<div class="head-container">
|
|
17
|
|
- <el-tree
|
|
18
|
|
- :data="deptOptions"
|
|
19
|
|
- :props="defaultProps"
|
|
20
|
|
- :expand-on-click-node="false"
|
|
21
|
|
- :filter-node-method="filterNode"
|
|
22
|
|
- ref="tree"
|
|
23
|
|
- node-key="id"
|
|
24
|
|
- default-expand-all
|
|
25
|
|
- highlight-current
|
|
26
|
|
- @node-click="handleNodeClick"
|
|
27
|
|
- />
|
|
|
11
|
+ <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
|
|
|
12
|
+ :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
|
|
|
13
|
+ @node-click="handleNodeClick" />
|
|
28
|
14
|
</div>
|
|
29
|
15
|
</el-col>
|
|
30
|
16
|
<!--用户数据-->
|
|
31
|
17
|
<el-col :span="20" :xs="24">
|
|
32
|
18
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
33
|
19
|
<el-form-item label="用户名称" prop="userName">
|
|
34
|
|
- <el-input
|
|
35
|
|
- v-model="queryParams.userName"
|
|
36
|
|
- placeholder="请输入用户名称"
|
|
37
|
|
- clearable
|
|
38
|
|
- style="width: 240px"
|
|
39
|
|
- @keyup.enter.native="handleQuery"
|
|
40
|
|
- />
|
|
|
20
|
+ <el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable style="width: 240px"
|
|
|
21
|
+ @keyup.enter.native="handleQuery" />
|
|
41
|
22
|
</el-form-item>
|
|
42
|
23
|
<el-form-item label="手机号码" prop="phonenumber">
|
|
43
|
|
- <el-input
|
|
44
|
|
- v-model="queryParams.phonenumber"
|
|
45
|
|
- placeholder="请输入手机号码"
|
|
46
|
|
- clearable
|
|
47
|
|
- style="width: 240px"
|
|
48
|
|
- @keyup.enter.native="handleQuery"
|
|
49
|
|
- />
|
|
|
24
|
+ <el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable style="width: 240px"
|
|
|
25
|
+ @keyup.enter.native="handleQuery" />
|
|
50
|
26
|
</el-form-item>
|
|
51
|
27
|
<el-form-item label="状态" prop="status">
|
|
52
|
|
- <el-select
|
|
53
|
|
- v-model="queryParams.status"
|
|
54
|
|
- placeholder="用户状态"
|
|
55
|
|
- clearable
|
|
56
|
|
- style="width: 240px"
|
|
57
|
|
- >
|
|
58
|
|
- <el-option
|
|
59
|
|
- v-for="dict in dict.type.sys_normal_disable"
|
|
60
|
|
- :key="dict.value"
|
|
61
|
|
- :label="dict.label"
|
|
62
|
|
- :value="dict.value"
|
|
63
|
|
- />
|
|
|
28
|
+ <el-select v-model="queryParams.status" placeholder="用户状态" clearable style="width: 240px">
|
|
|
29
|
+ <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
|
|
|
30
|
+ :value="dict.value" />
|
|
64
|
31
|
</el-select>
|
|
65
|
32
|
</el-form-item>
|
|
66
|
33
|
<el-form-item label="创建时间">
|
|
67
|
|
- <el-date-picker
|
|
68
|
|
- v-model="dateRange"
|
|
69
|
|
- style="width: 240px"
|
|
70
|
|
- value-format="yyyy-MM-dd"
|
|
71
|
|
- type="daterange"
|
|
72
|
|
- range-separator="-"
|
|
73
|
|
- start-placeholder="开始日期"
|
|
74
|
|
- end-placeholder="结束日期"
|
|
75
|
|
- ></el-date-picker>
|
|
|
34
|
+ <el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
|
|
|
35
|
+ range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
76
|
36
|
</el-form-item>
|
|
77
|
37
|
<el-form-item>
|
|
78
|
38
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
@@ -82,56 +42,24 @@
|
|
82
|
42
|
|
|
83
|
43
|
<el-row :gutter="10" class="mb8">
|
|
84
|
44
|
<el-col :span="1.5">
|
|
85
|
|
- <el-button
|
|
86
|
|
- type="primary"
|
|
87
|
|
- plain
|
|
88
|
|
- icon="el-icon-plus"
|
|
89
|
|
- size="mini"
|
|
90
|
|
- @click="handleAdd"
|
|
91
|
|
- v-hasPermi="['system:user:add']"
|
|
92
|
|
- >新增</el-button>
|
|
|
45
|
+ <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
|
46
|
+ v-hasPermi="['system:user:add']">新增</el-button>
|
|
93
|
47
|
</el-col>
|
|
94
|
48
|
<el-col :span="1.5">
|
|
95
|
|
- <el-button
|
|
96
|
|
- type="success"
|
|
97
|
|
- plain
|
|
98
|
|
- icon="el-icon-edit"
|
|
99
|
|
- size="mini"
|
|
100
|
|
- :disabled="single"
|
|
101
|
|
- @click="handleUpdate"
|
|
102
|
|
- v-hasPermi="['system:user:edit']"
|
|
103
|
|
- >修改</el-button>
|
|
|
49
|
+ <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
|
|
50
|
+ v-hasPermi="['system:user:edit']">修改</el-button>
|
|
104
|
51
|
</el-col>
|
|
105
|
52
|
<el-col :span="1.5">
|
|
106
|
|
- <el-button
|
|
107
|
|
- type="danger"
|
|
108
|
|
- plain
|
|
109
|
|
- icon="el-icon-delete"
|
|
110
|
|
- size="mini"
|
|
111
|
|
- :disabled="multiple"
|
|
112
|
|
- @click="handleDelete"
|
|
113
|
|
- v-hasPermi="['system:user:remove']"
|
|
114
|
|
- >删除</el-button>
|
|
|
53
|
+ <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
|
|
54
|
+ v-hasPermi="['system:user:remove']">删除</el-button>
|
|
115
|
55
|
</el-col>
|
|
116
|
56
|
<el-col :span="1.5">
|
|
117
|
|
- <el-button
|
|
118
|
|
- type="info"
|
|
119
|
|
- plain
|
|
120
|
|
- icon="el-icon-upload2"
|
|
121
|
|
- size="mini"
|
|
122
|
|
- @click="handleImport"
|
|
123
|
|
- v-hasPermi="['system:user:import']"
|
|
124
|
|
- >导入</el-button>
|
|
|
57
|
+ <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport"
|
|
|
58
|
+ v-hasPermi="['system:user:import']">导入</el-button>
|
|
125
|
59
|
</el-col>
|
|
126
|
60
|
<el-col :span="1.5">
|
|
127
|
|
- <el-button
|
|
128
|
|
- type="warning"
|
|
129
|
|
- plain
|
|
130
|
|
- icon="el-icon-download"
|
|
131
|
|
- size="mini"
|
|
132
|
|
- @click="handleExport"
|
|
133
|
|
- v-hasPermi="['system:user:export']"
|
|
134
|
|
- >导出</el-button>
|
|
|
61
|
+ <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
|
|
62
|
+ v-hasPermi="['system:user:export']">导出</el-button>
|
|
135
|
63
|
</el-col>
|
|
136
|
64
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
137
|
65
|
</el-row>
|
|
|
@@ -139,18 +67,18 @@
|
|
139
|
67
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
|
140
|
68
|
<el-table-column type="selection" width="50" align="center" />
|
|
141
|
69
|
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
|
|
142
|
|
- <el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
|
143
|
|
- <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
|
144
|
|
- <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
|
145
|
|
- <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
|
|
|
70
|
+ <el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible"
|
|
|
71
|
+ :show-overflow-tooltip="true" />
|
|
|
72
|
+ <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible"
|
|
|
73
|
+ :show-overflow-tooltip="true" />
|
|
|
74
|
+ <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible"
|
|
|
75
|
+ :show-overflow-tooltip="true" />
|
|
|
76
|
+ <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible"
|
|
|
77
|
+ width="120" />
|
|
146
|
78
|
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
|
147
|
79
|
<template slot-scope="scope">
|
|
148
|
|
- <el-switch
|
|
149
|
|
- v-model="scope.row.status"
|
|
150
|
|
- active-value="0"
|
|
151
|
|
- inactive-value="1"
|
|
152
|
|
- @change="handleStatusChange(scope.row)"
|
|
153
|
|
- ></el-switch>
|
|
|
80
|
+ <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
|
|
|
81
|
+ @change="handleStatusChange(scope.row)"></el-switch>
|
|
154
|
82
|
</template>
|
|
155
|
83
|
</el-table-column>
|
|
156
|
84
|
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
|
|
@@ -158,28 +86,14 @@
|
|
158
|
86
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
159
|
87
|
</template>
|
|
160
|
88
|
</el-table-column>
|
|
161
|
|
- <el-table-column
|
|
162
|
|
- label="操作"
|
|
163
|
|
- align="center"
|
|
164
|
|
- width="160"
|
|
165
|
|
- class-name="small-padding fixed-width"
|
|
166
|
|
- >
|
|
|
89
|
+ <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
|
167
|
90
|
<template slot-scope="scope" v-if="scope.row.userId !== 1">
|
|
168
|
|
- <el-button
|
|
169
|
|
- size="mini"
|
|
170
|
|
- type="text"
|
|
171
|
|
- icon="el-icon-edit"
|
|
172
|
|
- @click="handleUpdate(scope.row)"
|
|
173
|
|
- v-hasPermi="['system:user:edit']"
|
|
174
|
|
- >修改</el-button>
|
|
175
|
|
- <el-button
|
|
176
|
|
- size="mini"
|
|
177
|
|
- type="text"
|
|
178
|
|
- icon="el-icon-delete"
|
|
179
|
|
- @click="handleDelete(scope.row)"
|
|
180
|
|
- v-hasPermi="['system:user:remove']"
|
|
181
|
|
- >删除</el-button>
|
|
182
|
|
- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
|
|
|
91
|
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
|
|
92
|
+ v-hasPermi="['system:user:edit']">修改</el-button>
|
|
|
93
|
+ <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
|
94
|
+ v-hasPermi="['system:user:remove']">删除</el-button>
|
|
|
95
|
+ <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"
|
|
|
96
|
+ v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
|
|
183
|
97
|
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
|
184
|
98
|
<el-dropdown-menu slot="dropdown">
|
|
185
|
99
|
<el-dropdown-item command="handleResetPwd" icon="el-icon-key"
|
|
|
@@ -192,13 +106,8 @@
|
|
192
|
106
|
</el-table-column>
|
|
193
|
107
|
</el-table>
|
|
194
|
108
|
|
|
195
|
|
- <pagination
|
|
196
|
|
- v-show="total>0"
|
|
197
|
|
- :total="total"
|
|
198
|
|
- :page.sync="queryParams.pageNum"
|
|
199
|
|
- :limit.sync="queryParams.pageSize"
|
|
200
|
|
- @pagination="getList"
|
|
201
|
|
- />
|
|
|
109
|
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
110
|
+ @pagination="getList" />
|
|
202
|
111
|
</el-col>
|
|
203
|
112
|
</el-row>
|
|
204
|
113
|
|
|
|
@@ -237,7 +146,7 @@
|
|
237
|
146
|
</el-col>
|
|
238
|
147
|
<el-col :span="12">
|
|
239
|
148
|
<el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
|
|
240
|
|
- <el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password/>
|
|
|
149
|
+ <el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password />
|
|
241
|
150
|
</el-form-item>
|
|
242
|
151
|
</el-col>
|
|
243
|
152
|
</el-row>
|
|
|
@@ -245,23 +154,16 @@
|
|
245
|
154
|
<el-col :span="12">
|
|
246
|
155
|
<el-form-item label="用户性别">
|
|
247
|
156
|
<el-select v-model="form.sex" placeholder="请选择性别">
|
|
248
|
|
- <el-option
|
|
249
|
|
- v-for="dict in dict.type.sys_user_sex"
|
|
250
|
|
- :key="dict.value"
|
|
251
|
|
- :label="dict.label"
|
|
252
|
|
- :value="dict.value"
|
|
253
|
|
- ></el-option>
|
|
|
157
|
+ <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
|
|
|
158
|
+ :value="dict.value"></el-option>
|
|
254
|
159
|
</el-select>
|
|
255
|
160
|
</el-form-item>
|
|
256
|
161
|
</el-col>
|
|
257
|
162
|
<el-col :span="12">
|
|
258
|
163
|
<el-form-item label="状态">
|
|
259
|
164
|
<el-radio-group v-model="form.status">
|
|
260
|
|
- <el-radio
|
|
261
|
|
- v-for="dict in dict.type.sys_normal_disable"
|
|
262
|
|
- :key="dict.value"
|
|
263
|
|
- :label="dict.value"
|
|
264
|
|
- >{{dict.label}}</el-radio>
|
|
|
165
|
+ <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
|
|
|
166
|
+ }}</el-radio>
|
|
265
|
167
|
</el-radio-group>
|
|
266
|
168
|
</el-form-item>
|
|
267
|
169
|
</el-col>
|
|
|
@@ -270,30 +172,27 @@
|
|
270
|
172
|
<el-col :span="12">
|
|
271
|
173
|
<el-form-item label="岗位">
|
|
272
|
174
|
<el-select v-model="form.postIds" multiple placeholder="请选择岗位">
|
|
273
|
|
- <el-option
|
|
274
|
|
- v-for="item in postOptions"
|
|
275
|
|
- :key="item.postId"
|
|
276
|
|
- :label="item.postName"
|
|
277
|
|
- :value="item.postId"
|
|
278
|
|
- :disabled="item.status == 1"
|
|
279
|
|
- ></el-option>
|
|
|
175
|
+ <el-option v-for="item in postOptions" :key="item.postId" :label="item.postName" :value="item.postId"
|
|
|
176
|
+ :disabled="item.status == 1"></el-option>
|
|
280
|
177
|
</el-select>
|
|
281
|
178
|
</el-form-item>
|
|
282
|
179
|
</el-col>
|
|
283
|
180
|
<el-col :span="12">
|
|
284
|
181
|
<el-form-item label="角色">
|
|
285
|
182
|
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
|
|
286
|
|
- <el-option
|
|
287
|
|
- v-for="item in roleOptions"
|
|
288
|
|
- :key="item.roleId"
|
|
289
|
|
- :label="item.roleName"
|
|
290
|
|
- :value="item.roleId"
|
|
291
|
|
- :disabled="item.status == 1"
|
|
292
|
|
- ></el-option>
|
|
|
183
|
+ <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId"
|
|
|
184
|
+ :disabled="item.status == 1"></el-option>
|
|
293
|
185
|
</el-select>
|
|
294
|
186
|
</el-form-item>
|
|
295
|
187
|
</el-col>
|
|
296
|
188
|
</el-row>
|
|
|
189
|
+ <el-row>
|
|
|
190
|
+ <el-col :span="24">
|
|
|
191
|
+ <el-form-item label="身份证号码" prop="idCard">
|
|
|
192
|
+ <el-input v-model="form.idCard" placeholder="请输入身份证号码"/>
|
|
|
193
|
+ </el-form-item>
|
|
|
194
|
+ </el-col>
|
|
|
195
|
+ </el-row>
|
|
297
|
196
|
<el-row>
|
|
298
|
197
|
<el-col :span="24">
|
|
299
|
198
|
<el-form-item label="备注">
|
|
|
@@ -310,18 +209,9 @@
|
|
310
|
209
|
|
|
311
|
210
|
<!-- 用户导入对话框 -->
|
|
312
|
211
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
313
|
|
- <el-upload
|
|
314
|
|
- ref="upload"
|
|
315
|
|
- :limit="1"
|
|
316
|
|
- accept=".xlsx, .xls"
|
|
317
|
|
- :headers="upload.headers"
|
|
318
|
|
- :action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
319
|
|
- :disabled="upload.isUploading"
|
|
320
|
|
- :on-progress="handleFileUploadProgress"
|
|
321
|
|
- :on-success="handleFileSuccess"
|
|
322
|
|
- :auto-upload="false"
|
|
323
|
|
- drag
|
|
324
|
|
- >
|
|
|
212
|
+ <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
|
|
213
|
+ :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
|
|
|
214
|
+ :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
|
325
|
215
|
<i class="el-icon-upload"></i>
|
|
326
|
216
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
327
|
217
|
<div class="el-upload__tip text-center" slot="tip">
|
|
|
@@ -329,7 +219,8 @@
|
|
329
|
219
|
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
|
|
330
|
220
|
</div>
|
|
331
|
221
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
332
|
|
- <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
|
|
222
|
+ <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
|
|
223
|
+ @click="importTemplate">下载模板</el-link>
|
|
333
|
224
|
</div>
|
|
334
|
225
|
</el-upload>
|
|
335
|
226
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -436,6 +327,11 @@ export default {
|
|
436
|
327
|
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
|
|
437
|
328
|
],
|
|
438
|
329
|
email: [
|
|
|
330
|
+ {
|
|
|
331
|
+ required: true,
|
|
|
332
|
+ message: '邮箱不能为空',
|
|
|
333
|
+ trigger: 'blur',
|
|
|
334
|
+ },
|
|
439
|
335
|
{
|
|
440
|
336
|
type: "email",
|
|
441
|
337
|
message: "请输入正确的邮箱地址",
|
|
|
@@ -444,10 +340,28 @@ export default {
|
|
444
|
340
|
],
|
|
445
|
341
|
phonenumber: [
|
|
446
|
342
|
{
|
|
447
|
|
- pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
|
448
|
|
- message: "请输入正确的手机号码",
|
|
449
|
|
- trigger: "blur"
|
|
450
|
|
- }
|
|
|
343
|
+ required: true,
|
|
|
344
|
+ message: '联系电话不能为空',
|
|
|
345
|
+ trigger: 'blur',
|
|
|
346
|
+ },
|
|
|
347
|
+ {
|
|
|
348
|
+ pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
|
|
|
349
|
+ message: '请输入正确的手机号码',
|
|
|
350
|
+ trigger: 'blur',
|
|
|
351
|
+ },
|
|
|
352
|
+ ],
|
|
|
353
|
+ idCard: [
|
|
|
354
|
+ {
|
|
|
355
|
+ required: true,
|
|
|
356
|
+ message: '身份证号不能为空',
|
|
|
357
|
+ trigger: 'blur',
|
|
|
358
|
+ },
|
|
|
359
|
+ {
|
|
|
360
|
+ pattern:
|
|
|
361
|
+ /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
|
|
362
|
+ message: '请输入正确的身份证号码',
|
|
|
363
|
+ trigger: 'blur',
|
|
|
364
|
+ },
|
|
451
|
365
|
]
|
|
452
|
366
|
}
|
|
453
|
367
|
};
|
|
|
@@ -470,10 +384,10 @@ export default {
|
|
470
|
384
|
getList() {
|
|
471
|
385
|
this.loading = true;
|
|
472
|
386
|
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
473
|
|
- this.userList = response.rows;
|
|
474
|
|
- this.total = response.total;
|
|
475
|
|
- this.loading = false;
|
|
476
|
|
- }
|
|
|
387
|
+ this.userList = response.rows;
|
|
|
388
|
+ this.total = response.total;
|
|
|
389
|
+ this.loading = false;
|
|
|
390
|
+ }
|
|
477
|
391
|
);
|
|
478
|
392
|
},
|
|
479
|
393
|
/** 查询部门下拉树结构 */
|
|
|
@@ -495,11 +409,11 @@ export default {
|
|
495
|
409
|
// 用户状态修改
|
|
496
|
410
|
handleStatusChange(row) {
|
|
497
|
411
|
let text = row.status === "0" ? "启用" : "停用";
|
|
498
|
|
- this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
|
|
|
412
|
+ this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function () {
|
|
499
|
413
|
return changeUserStatus(row.userId, row.status);
|
|
500
|
414
|
}).then(() => {
|
|
501
|
415
|
this.$modal.msgSuccess(text + "成功");
|
|
502
|
|
- }).catch(function() {
|
|
|
416
|
+ }).catch(function () {
|
|
503
|
417
|
row.status = row.status === "0" ? "1" : "0";
|
|
504
|
418
|
});
|
|
505
|
419
|
},
|
|
|
@@ -566,7 +480,7 @@ export default {
|
|
566
|
480
|
this.roleOptions = response.roles;
|
|
567
|
481
|
this.open = true;
|
|
568
|
482
|
this.title = "添加用户";
|
|
569
|
|
- this.form.password = this.initPassword;
|
|
|
483
|
+ // this.form.password = this.initPassword;
|
|
570
|
484
|
});
|
|
571
|
485
|
},
|
|
572
|
486
|
/** 修改按钮操作 */
|
|
|
@@ -593,18 +507,18 @@ export default {
|
|
593
|
507
|
inputPattern: /^.{5,20}$/,
|
|
594
|
508
|
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
|
|
595
|
509
|
}).then(({ value }) => {
|
|
596
|
|
- resetUserPwd(row.userId, value).then(response => {
|
|
597
|
|
- this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
|
598
|
|
- });
|
|
599
|
|
- }).catch(() => {});
|
|
|
510
|
+ resetUserPwd(row.userId, value).then(response => {
|
|
|
511
|
+ this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
|
|
512
|
+ });
|
|
|
513
|
+ }).catch(() => { });
|
|
600
|
514
|
},
|
|
601
|
515
|
/** 分配角色操作 */
|
|
602
|
|
- handleAuthRole: function(row) {
|
|
|
516
|
+ handleAuthRole: function (row) {
|
|
603
|
517
|
const userId = row.userId;
|
|
604
|
518
|
this.$router.push("/system/user-auth/role/" + userId);
|
|
605
|
519
|
},
|
|
606
|
520
|
/** 提交按钮 */
|
|
607
|
|
- submitForm: function() {
|
|
|
521
|
+ submitForm: function () {
|
|
608
|
522
|
this.$refs["form"].validate(valid => {
|
|
609
|
523
|
if (valid) {
|
|
610
|
524
|
if (this.form.userId != undefined) {
|
|
|
@@ -626,12 +540,12 @@ export default {
|
|
626
|
540
|
/** 删除按钮操作 */
|
|
627
|
541
|
handleDelete(row) {
|
|
628
|
542
|
const userIds = row.userId || this.ids;
|
|
629
|
|
- this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
|
|
|
543
|
+ this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function () {
|
|
630
|
544
|
return delUser(userIds);
|
|
631
|
545
|
}).then(() => {
|
|
632
|
546
|
this.getList();
|
|
633
|
547
|
this.$modal.msgSuccess("删除成功");
|
|
634
|
|
- }).catch(() => {});
|
|
|
548
|
+ }).catch(() => { });
|
|
635
|
549
|
},
|
|
636
|
550
|
/** 导出按钮操作 */
|
|
637
|
551
|
handleExport() {
|