|
|
@@ -3,510 +3,391 @@
|
|
3
|
3
|
<div class="filter-container">
|
|
4
|
4
|
<el-row :gutter="20">
|
|
5
|
5
|
<el-col :span="6">
|
|
6
|
|
- <el-alert
|
|
7
|
|
- :closable="false"
|
|
8
|
|
- title="科室列表"
|
|
9
|
|
- type="success"
|
|
10
|
|
- style="margin-bottom: 5px"
|
|
11
|
|
- />
|
|
12
|
|
- <el-input
|
|
13
|
|
- placeholder="请输入科室名称"
|
|
14
|
|
- size="medium"
|
|
15
|
|
- clearable
|
|
16
|
|
- v-model="filterText"
|
|
17
|
|
- >
|
|
|
6
|
+ <el-alert :closable="false" title="科室列表" type="success" style="margin-bottom: 5px" />
|
|
|
7
|
+ <el-input placeholder="请输入科室名称" size="medium" clearable v-model="filterText">
|
|
18
|
8
|
</el-input>
|
|
19
|
9
|
<div style="height: 700px; overflow-y: auto">
|
|
20
|
|
- <el-tree
|
|
21
|
|
- ref="treeRef"
|
|
22
|
|
- :props="defaultProps"
|
|
23
|
|
- :data="treelists"
|
|
24
|
|
- :highlight-current="true"
|
|
25
|
|
- :default-expand-all="false"
|
|
26
|
|
- node-key="id"
|
|
27
|
|
- :filter-node-method="filterNode"
|
|
28
|
|
- @node-click="handleNodeClick"
|
|
29
|
|
- />
|
|
|
10
|
+ <el-tree ref="treeRef" :props="defaultProps" :data="treelists" :highlight-current="true"
|
|
|
11
|
+ :default-expand-all="false" node-key="id" :filter-node-method="filterNode"
|
|
|
12
|
+ @node-click="handleNodeClick" />
|
|
30
|
13
|
</div>
|
|
31
|
14
|
</el-col>
|
|
32
|
15
|
<el-col :span="18">
|
|
33
|
|
- <el-alert
|
|
34
|
|
- :closable="false"
|
|
35
|
|
- title="用户列表"
|
|
36
|
|
- type="success"
|
|
37
|
|
- style="margin-bottom: 5px"
|
|
38
|
|
- />
|
|
39
|
|
- <el-alert
|
|
40
|
|
- :closable="false"
|
|
41
|
|
- title="上传文件需要严格按照下载的EXCEL模板进行填写!"
|
|
42
|
|
- type="warning"
|
|
43
|
|
- style="margin-bottom: 7px"
|
|
44
|
|
- />
|
|
45
|
|
- <el-input
|
|
46
|
|
- v-model="keyword"
|
|
47
|
|
- placeholder="请输入工号,姓名,电话"
|
|
48
|
|
- class="filter-item"
|
|
49
|
|
- size="medium"
|
|
50
|
|
- clearable
|
|
51
|
|
- style="width: 260px"
|
|
52
|
|
- />
|
|
53
|
|
- <el-button
|
|
54
|
|
- type="primary"
|
|
55
|
|
- class="filter-item"
|
|
56
|
|
- icon="el-icon-search"
|
|
57
|
|
- @click="btn_search"
|
|
58
|
|
- >搜索</el-button
|
|
59
|
|
- >
|
|
60
|
|
- <el-button
|
|
61
|
|
- v-permission="'add_userManage'"
|
|
62
|
|
- type="primary"
|
|
63
|
|
- class="filter-item"
|
|
64
|
|
- icon="el-icon-plus"
|
|
65
|
|
- @click="btn_add"
|
|
66
|
|
- >添加</el-button
|
|
67
|
|
- >
|
|
68
|
|
- <el-button type="primary" class="filter-item" @click="btn_onimport"
|
|
69
|
|
- >批量导入</el-button
|
|
70
|
|
- >
|
|
71
|
|
- <el-button type="primary" class="filter-item" @click="btn_export"
|
|
72
|
|
- >批量导出</el-button
|
|
73
|
|
- >
|
|
74
|
|
- <a
|
|
75
|
|
- href="/static/xls/userImport.xls"
|
|
76
|
|
- download="用户模板.xls"
|
|
77
|
|
- title="点击下载模板"
|
|
78
|
|
- style="line-height: 32px; color: #409eff; font-size: 14px"
|
|
79
|
|
- >点击下载用户模板</a
|
|
80
|
|
- >
|
|
81
|
|
- <el-table
|
|
82
|
|
- v-loading="loading"
|
|
83
|
|
- :data="dataLists"
|
|
84
|
|
- border
|
|
85
|
|
- stripe
|
|
86
|
|
- @selection-change="changeSelects"
|
|
87
|
|
- >
|
|
88
|
|
- <el-table-column
|
|
89
|
|
- prop="F_UserCode"
|
|
90
|
|
- label="工号"
|
|
91
|
|
- align="center"
|
|
92
|
|
- min-width=""
|
|
93
|
|
- />
|
|
94
|
|
- <el-table-column
|
|
95
|
|
- prop="F_UserName"
|
|
96
|
|
- label="姓名"
|
|
97
|
|
- align="center"
|
|
98
|
|
- min-width=""
|
|
99
|
|
- />
|
|
100
|
|
- <el-table-column
|
|
101
|
|
- prop="F_DeptName"
|
|
102
|
|
- label="科室"
|
|
103
|
|
- align="center"
|
|
104
|
|
- min-width=""
|
|
105
|
|
- />
|
|
106
|
|
- <el-table-column
|
|
107
|
|
- prop="F_RoleName"
|
|
108
|
|
- label="角色"
|
|
109
|
|
- align="center"
|
|
110
|
|
- min-width=""
|
|
111
|
|
- />
|
|
112
|
|
- <el-table-column
|
|
113
|
|
- prop="F_Title"
|
|
114
|
|
- label="职称"
|
|
115
|
|
- align="center"
|
|
116
|
|
- min-width=""
|
|
117
|
|
- />
|
|
118
|
|
- <el-table-column
|
|
119
|
|
- prop="F_Job"
|
|
120
|
|
- label="职务"
|
|
121
|
|
- align="center"
|
|
122
|
|
- min-width=""
|
|
123
|
|
- />
|
|
124
|
|
- <el-table-column
|
|
125
|
|
- prop="F_Telephone"
|
|
126
|
|
- label="电话"
|
|
127
|
|
- align="center"
|
|
128
|
|
- min-width=""
|
|
129
|
|
- />
|
|
|
16
|
+ <el-alert :closable="false" title="用户列表" type="success" style="margin-bottom: 5px" />
|
|
|
17
|
+ <el-alert :closable="false" title="上传文件需要严格按照下载的EXCEL模板进行填写!" type="warning" style="margin-bottom: 7px" />
|
|
|
18
|
+ <el-input v-model="keyword" placeholder="请输入工号,姓名,电话" class="filter-item" size="medium" clearable
|
|
|
19
|
+ style="width: 260px" />
|
|
|
20
|
+ <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
|
|
|
21
|
+ <el-button v-permission="'add_userManage'" type="primary" class="filter-item" icon="el-icon-plus"
|
|
|
22
|
+ @click="btn_add">添加</el-button>
|
|
|
23
|
+ <el-button type="primary" class="filter-item" @click="btn_onimport">批量导入</el-button>
|
|
|
24
|
+ <el-button type="primary" class="filter-item" @click="btn_export">批量导出</el-button>
|
|
|
25
|
+ <a href="/static/xls/userImport.xls" download="用户模板.xls" title="点击下载模板"
|
|
|
26
|
+ style="line-height: 32px; color: #409eff; font-size: 14px">点击下载用户模板</a>
|
|
|
27
|
+ <el-table v-loading="loading" :data="dataLists" border stripe @selection-change="changeSelects">
|
|
|
28
|
+ <el-table-column prop="F_UserCode" label="工号" align="center" min-width="" />
|
|
|
29
|
+ <el-table-column prop="F_UserName" label="姓名" align="center" min-width="" />
|
|
|
30
|
+ <el-table-column prop="F_DeptName" label="科室" align="center" min-width="" />
|
|
|
31
|
+ <el-table-column prop="F_RoleName" label="角色" align="center" min-width="" />
|
|
|
32
|
+ <el-table-column prop="F_Title" label="职称" align="center" min-width="" />
|
|
|
33
|
+ <el-table-column prop="F_Job" label="职务" align="center" min-width="" />
|
|
|
34
|
+ <el-table-column prop="F_Telephone" label="电话" align="center" min-width="">
|
|
|
35
|
+ <template slot-scope="scope">
|
|
|
36
|
+ <span>{{ scope.row.F_Telephone }}</span>
|
|
|
37
|
+ <i class="el-icon-view" @click="clickEye(scope.row,scope.row.F_UserId)"></i>
|
|
|
38
|
+ </template>
|
|
|
39
|
+ </el-table-column>
|
|
130
|
40
|
<el-table-column label="用户账号状态" align="center" min-width="">
|
|
131
|
41
|
<template slot-scope="scope">
|
|
132
|
|
- <span v-if="scope.row.F_EnableFlag == 0" style="color: #f56c6c"
|
|
133
|
|
- >禁用</span
|
|
134
|
|
- >
|
|
135
|
|
- <span v-if="scope.row.F_EnableFlag == 1" style="color: #67c23a"
|
|
136
|
|
- >启用</span
|
|
137
|
|
- >
|
|
138
|
|
- <span v-if="scope.row.F_EnableFlag == 2" style="color: #f56c6c"
|
|
139
|
|
- >锁定</span
|
|
140
|
|
- >
|
|
|
42
|
+ <span v-if="scope.row.F_EnableFlag == 0" style="color: #f56c6c">禁用</span>
|
|
|
43
|
+ <span v-if="scope.row.F_EnableFlag == 1" style="color: #67c23a">启用</span>
|
|
|
44
|
+ <span v-if="scope.row.F_EnableFlag == 2" style="color: #f56c6c">锁定</span>
|
|
141
|
45
|
</template>
|
|
142
|
46
|
</el-table-column>
|
|
143
|
|
- <el-table-column
|
|
144
|
|
- label="操作"
|
|
145
|
|
- width="200"
|
|
146
|
|
- align="center"
|
|
147
|
|
- class-name="oparate_btn"
|
|
148
|
|
- fixed="right"
|
|
149
|
|
- >
|
|
|
47
|
+ <el-table-column label="操作" width="200" align="center" class-name="oparate_btn" fixed="right">
|
|
150
|
48
|
<template slot-scope="scope">
|
|
151
|
|
- <el-button
|
|
152
|
|
- v-if="scope.row.F_EnableFlag == 1"
|
|
153
|
|
- type="danger"
|
|
154
|
|
- plain
|
|
155
|
|
- @click="onOff(scope.row.F_UserId)"
|
|
156
|
|
- >禁用
|
|
|
49
|
+ <el-button v-if="scope.row.F_EnableFlag == 1" type="danger" plain @click="onOff(scope.row.F_UserId)">禁用
|
|
157
|
50
|
</el-button>
|
|
158
|
|
- <el-button
|
|
159
|
|
- v-if="
|
|
|
51
|
+ <el-button v-if="
|
|
160
|
52
|
scope.row.F_EnableFlag == 0 || scope.row.F_EnableFlag == 2
|
|
161
|
|
- "
|
|
162
|
|
- type="success"
|
|
163
|
|
- plain
|
|
164
|
|
- @click="onOpen(scope.row.F_UserId)"
|
|
165
|
|
- >启用
|
|
|
53
|
+ " type="success" plain @click="onOpen(scope.row.F_UserId)">启用
|
|
166
|
54
|
</el-button>
|
|
167
|
|
- <el-button
|
|
168
|
|
- v-permission="'edit_userManage'"
|
|
169
|
|
- size="mini"
|
|
170
|
|
- plain
|
|
171
|
|
- type="primary"
|
|
172
|
|
- @click="
|
|
|
55
|
+ <el-button v-permission="'edit_userManage'" size="mini" plain type="primary" @click="
|
|
173
|
56
|
btn_edit(
|
|
174
|
57
|
scope.row.F_UserId.toString(),
|
|
175
|
58
|
scope.row.F_UserCode.toString()
|
|
176
|
59
|
)
|
|
177
|
|
- "
|
|
178
|
|
- >编辑</el-button
|
|
179
|
|
- >
|
|
|
60
|
+ ">编辑</el-button>
|
|
180
|
61
|
</template>
|
|
181
|
62
|
</el-table-column>
|
|
182
|
63
|
</el-table>
|
|
183
|
|
- <pagination
|
|
184
|
|
- v-show="pageParams.total > 0"
|
|
185
|
|
- :total="pageParams.total"
|
|
186
|
|
- :pageindex.sync="pageParams.pageindex"
|
|
187
|
|
- :pagesize.sync="pageParams.pagesize"
|
|
188
|
|
- class="pagination"
|
|
189
|
|
- @pagination="getList"
|
|
190
|
|
- />
|
|
|
64
|
+ <pagination v-show="pageParams.total > 0" :total="pageParams.total" :pageindex.sync="pageParams.pageindex"
|
|
|
65
|
+ :pagesize.sync="pageParams.pagesize" class="pagination" @pagination="getList" />
|
|
191
|
66
|
</el-col>
|
|
192
|
67
|
</el-row>
|
|
193
|
68
|
</div>
|
|
194
|
69
|
<el-dialog :visible.sync="dialogTableVisible" title="导入用户">
|
|
195
|
|
- <el-upload
|
|
196
|
|
- :headers="headers"
|
|
197
|
|
- :data="importData"
|
|
198
|
|
- accept=".xls"
|
|
199
|
|
- :on-remove="handle_remove"
|
|
200
|
|
- :on-success="handle_success"
|
|
201
|
|
- :limit="1"
|
|
202
|
|
- :action="importUrl"
|
|
203
|
|
- style="margin-bottom: 30px"
|
|
204
|
|
- >
|
|
205
|
|
- <el-button slot="trigger" size="small" type="primary"
|
|
206
|
|
- >上传文件</el-button
|
|
207
|
|
- >
|
|
|
70
|
+ <el-upload :headers="headers" :data="importData" accept=".xls" :on-remove="handle_remove"
|
|
|
71
|
+ :on-success="handle_success" :limit="1" :action="importUrl" style="margin-bottom: 30px">
|
|
|
72
|
+ <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
|
|
208
|
73
|
</el-upload>
|
|
209
|
74
|
</el-dialog>
|
|
210
|
75
|
</div>
|
|
211
|
76
|
</template>
|
|
212
|
77
|
|
|
213
|
78
|
<script>
|
|
214
|
|
-import {
|
|
215
|
|
- getUserAccountLists,
|
|
216
|
|
- deleteUserAccount,
|
|
217
|
|
- getDelUsers,
|
|
218
|
|
- getUserInput,
|
|
219
|
|
- getUserExport,
|
|
220
|
|
-} from "@/api/systemSetup/roleSetting/userManage";
|
|
221
|
|
-import { getDeptTree } from "@/api/systemSetup/roleSetting/userManage";
|
|
222
|
|
-import { pickerOptions, buildTree, filterTreeDatas } from "@/utils";
|
|
223
|
|
-import { exportExcel } from "@/utils";
|
|
224
|
|
-import addOrEdit from "./addOrEdit";
|
|
225
|
|
-// import modifyPass from './modifyPass.vue'
|
|
226
|
|
-import Pagination from "@/components/context/Pagination"; // 对el-pagination 二次封装
|
|
|
79
|
+ import {
|
|
|
80
|
+ getUserAccountLists,
|
|
|
81
|
+ deleteUserAccount,
|
|
|
82
|
+ getDelUsers,
|
|
|
83
|
+ getUserInput,
|
|
|
84
|
+ getUserExport,
|
|
|
85
|
+ GetCompletePhone
|
|
|
86
|
+ } from "@/api/systemSetup/roleSetting/userManage";
|
|
|
87
|
+ import {
|
|
|
88
|
+ getDeptTree
|
|
|
89
|
+ } from "@/api/systemSetup/roleSetting/userManage";
|
|
|
90
|
+ import {
|
|
|
91
|
+ pickerOptions,
|
|
|
92
|
+ buildTree,
|
|
|
93
|
+ filterTreeDatas
|
|
|
94
|
+ } from "@/utils";
|
|
|
95
|
+ import {
|
|
|
96
|
+ exportExcel
|
|
|
97
|
+ } from "@/utils";
|
|
|
98
|
+ import addOrEdit from "./addOrEdit";
|
|
|
99
|
+ // import modifyPass from './modifyPass.vue'
|
|
|
100
|
+ import Pagination from "@/components/context/Pagination"; // 对el-pagination 二次封装
|
|
227
|
101
|
|
|
228
|
|
-export default {
|
|
229
|
|
- name: "UserManage",
|
|
230
|
|
- components: {
|
|
231
|
|
- Pagination,
|
|
232
|
|
- },
|
|
233
|
|
- data() {
|
|
234
|
|
- return {
|
|
235
|
|
- filterText: "",
|
|
236
|
|
- loading: false,
|
|
237
|
|
- dialogTableVisible: false,
|
|
238
|
|
- roleId: "",
|
|
239
|
|
- keyword: "",
|
|
240
|
|
- deptid: "",
|
|
241
|
|
- treelists: [], // 菜单树数据
|
|
242
|
|
- parentid: "-1",
|
|
243
|
|
- pageParams: {
|
|
244
|
|
- pageindex: 1, // 当前第几页
|
|
245
|
|
- pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
|
|
246
|
|
- total: 0, // 总共多少数据
|
|
247
|
|
- },
|
|
248
|
|
- defaultProps: {
|
|
249
|
|
- children: "children",
|
|
250
|
|
- label: "text",
|
|
251
|
|
- value: "id",
|
|
252
|
|
- },
|
|
253
|
|
- importData: {
|
|
254
|
|
- deptid: "",
|
|
255
|
|
- },
|
|
256
|
|
- // repairImageid: '',
|
|
257
|
|
- headers: {
|
|
258
|
|
- Authorization: "Bearer " + localStorage.getItem("Admin-Token"),
|
|
259
|
|
- },
|
|
260
|
|
- importUrl:
|
|
261
|
|
- this.$store.getters.serverConfig.BASE_API +
|
|
262
|
|
- "UserAccount/UserInput?token=" +
|
|
263
|
|
- localStorage.getItem("Admin-Token"),
|
|
264
|
|
- multipleSelection: [], // 选中的数据
|
|
265
|
|
- dataLists: [], // 列表数据
|
|
266
|
|
- hosid: "",
|
|
267
|
|
- // 自定义菜单下拉数据的key值
|
|
268
|
|
- props: {
|
|
269
|
|
- value: "id",
|
|
270
|
|
- label: "text",
|
|
271
|
|
- },
|
|
272
|
|
- };
|
|
273
|
|
- },
|
|
274
|
|
- created() {
|
|
275
|
|
- this.getList();
|
|
276
|
|
- this.getTreeList();
|
|
277
|
|
- document.onkeyup = (e) => {
|
|
278
|
|
- if (e.keyCode === 13) {
|
|
279
|
|
- this.getList();
|
|
280
|
|
- }
|
|
281
|
|
- };
|
|
282
|
|
- },
|
|
283
|
|
- watch: {
|
|
284
|
|
- filterText(val) {
|
|
285
|
|
- this.$refs.treeRef.filter(val);
|
|
286
|
|
- },
|
|
287
|
|
- },
|
|
288
|
|
- methods: {
|
|
289
|
|
- filterNode(value, data) {
|
|
290
|
|
- if (!value) return true;
|
|
291
|
|
- return data.text.indexOf(value) !== -1;
|
|
|
102
|
+ export default {
|
|
|
103
|
+ name: "UserManage",
|
|
|
104
|
+ components: {
|
|
|
105
|
+ Pagination,
|
|
292
|
106
|
},
|
|
293
|
|
- getList() {
|
|
294
|
|
- // this.loading = true
|
|
295
|
|
- return new Promise((resolve) => {
|
|
296
|
|
- const params = {
|
|
297
|
|
- page: this.pageParams.pageindex, // 第几页
|
|
298
|
|
- pagesize: this.pageParams.pagesize, // 每页几条信息
|
|
299
|
|
- key: this.keyword, // 否 string 模糊查询
|
|
300
|
|
- deptid: this.deptid,
|
|
301
|
|
- woid: this.hosid,
|
|
302
|
|
- };
|
|
303
|
|
- getUserAccountLists(params).then((response) => {
|
|
304
|
|
- // this.loading = false
|
|
305
|
|
- this.pageParams.total = response.total;
|
|
306
|
|
- this.dataLists = response.rows;
|
|
307
|
|
- });
|
|
308
|
|
- resolve();
|
|
309
|
|
- });
|
|
310
|
|
- },
|
|
311
|
|
- btn_onimport() {
|
|
312
|
|
- if (this.deptid == "") {
|
|
313
|
|
- this.$message.warning("请选择部门");
|
|
314
|
|
- return;
|
|
315
|
|
- }
|
|
316
|
|
- this.dialogTableVisible = true;
|
|
317
|
|
- },
|
|
318
|
|
- // 复选框状态改变
|
|
319
|
|
- changeSelects(val) {
|
|
320
|
|
- this.multipleSelection = val;
|
|
|
107
|
+ data() {
|
|
|
108
|
+ return {
|
|
|
109
|
+ filterText: "",
|
|
|
110
|
+ loading: false,
|
|
|
111
|
+ dialogTableVisible: false,
|
|
|
112
|
+ roleId: "",
|
|
|
113
|
+ keyword: "",
|
|
|
114
|
+ deptid: "",
|
|
|
115
|
+ treelists: [], // 菜单树数据
|
|
|
116
|
+ parentid: "-1",
|
|
|
117
|
+ pageParams: {
|
|
|
118
|
+ pageindex: 1, // 当前第几页
|
|
|
119
|
+ pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
|
|
|
120
|
+ total: 0, // 总共多少数据
|
|
|
121
|
+ },
|
|
|
122
|
+ defaultProps: {
|
|
|
123
|
+ children: "children",
|
|
|
124
|
+ label: "text",
|
|
|
125
|
+ value: "id",
|
|
|
126
|
+ },
|
|
|
127
|
+ importData: {
|
|
|
128
|
+ deptid: "",
|
|
|
129
|
+ },
|
|
|
130
|
+ // repairImageid: '',
|
|
|
131
|
+ headers: {
|
|
|
132
|
+ Authorization: "Bearer " + localStorage.getItem("Admin-Token"),
|
|
|
133
|
+ },
|
|
|
134
|
+ importUrl: this.$store.getters.serverConfig.BASE_API +
|
|
|
135
|
+ "UserAccount/UserInput?token=" +
|
|
|
136
|
+ localStorage.getItem("Admin-Token"),
|
|
|
137
|
+ multipleSelection: [], // 选中的数据
|
|
|
138
|
+ dataLists: [], // 列表数据
|
|
|
139
|
+ hosid: "",
|
|
|
140
|
+ // 自定义菜单下拉数据的key值
|
|
|
141
|
+ props: {
|
|
|
142
|
+ value: "id",
|
|
|
143
|
+ label: "text",
|
|
|
144
|
+ },
|
|
|
145
|
+ };
|
|
321
|
146
|
},
|
|
322
|
|
- btn_search() {
|
|
323
|
|
- this.pageParams.pageindex = 1;
|
|
|
147
|
+ created() {
|
|
324
|
148
|
this.getList();
|
|
|
149
|
+ this.getTreeList();
|
|
|
150
|
+ document.onkeyup = (e) => {
|
|
|
151
|
+ if (e.keyCode === 13) {
|
|
|
152
|
+ this.getList();
|
|
|
153
|
+ }
|
|
|
154
|
+ };
|
|
325
|
155
|
},
|
|
326
|
|
- btn_add() {
|
|
327
|
|
- this.$layer.iframe({
|
|
328
|
|
- content: {
|
|
329
|
|
- content: addOrEdit, // 传递的组件对象
|
|
330
|
|
- parent: this, // 当前的vue对象
|
|
331
|
|
- data: {
|
|
332
|
|
- addDeptid: this.deptid.toString(),
|
|
333
|
|
- }, // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
|
|
334
|
|
- },
|
|
335
|
|
- area: ["50%", "85%"],
|
|
336
|
|
- title: "添加用户信息",
|
|
337
|
|
- });
|
|
338
|
|
- },
|
|
339
|
|
- btn_edit(editId, usercode) {
|
|
340
|
|
- this.$layer.iframe({
|
|
341
|
|
- content: {
|
|
342
|
|
- content: addOrEdit, // 传递的组件对象
|
|
343
|
|
- parent: this, // 当前的vue对象
|
|
344
|
|
- data: {
|
|
345
|
|
- rowid: editId,
|
|
346
|
|
- usercodeList: usercode,
|
|
347
|
|
- }, // props
|
|
348
|
|
- },
|
|
349
|
|
- area: ["50%", "80%"],
|
|
350
|
|
- title: "编辑用户信息",
|
|
351
|
|
- });
|
|
|
156
|
+ watch: {
|
|
|
157
|
+ filterText(val) {
|
|
|
158
|
+ this.$refs.treeRef.filter(val);
|
|
|
159
|
+ },
|
|
352
|
160
|
},
|
|
353
|
|
- // btn_modifyPass(editId) {
|
|
354
|
|
- // this.$layer.iframe({
|
|
355
|
|
- // content: {
|
|
356
|
|
- // content: modifyPass, // 传递的组件对象
|
|
357
|
|
- // parent: this, // 当前的vue对象
|
|
358
|
|
- // data: {
|
|
359
|
|
- // rowid: editId
|
|
360
|
|
- // } // props
|
|
361
|
|
- // },
|
|
362
|
|
- // area: ['40%', '360px'],
|
|
363
|
|
- // title: '修改密码'
|
|
364
|
|
- // })
|
|
365
|
|
- // },
|
|
366
|
|
- btn_delete(id) {
|
|
367
|
|
- this.$confirm("您确定要将此用户信息删除吗?", "提示", {
|
|
368
|
|
- confirmButtonText: "确定",
|
|
369
|
|
- cancelButtonText: "取消",
|
|
370
|
|
- type: "warning",
|
|
371
|
|
- })
|
|
372
|
|
- .then(() => {
|
|
373
|
|
- const params = {
|
|
374
|
|
- ids: id,
|
|
375
|
|
- state: 1, // 0启用1删除2禁用
|
|
376
|
|
- };
|
|
377
|
|
- deleteUserAccount(params).then((response) => {
|
|
378
|
|
- if (response.state.toLowerCase() === "success") {
|
|
379
|
|
- this.getList();
|
|
380
|
|
- this.$message.success("删除成功!");
|
|
381
|
|
- }
|
|
382
|
|
- });
|
|
|
161
|
+ methods: {
|
|
|
162
|
+ clickEye(row,id){
|
|
|
163
|
+ const params = {
|
|
|
164
|
+ userid: id
|
|
|
165
|
+ }
|
|
|
166
|
+ GetCompletePhone(params).then(res=>{
|
|
|
167
|
+ row.F_Telephone = res
|
|
383
|
168
|
})
|
|
384
|
|
- .catch(() => {
|
|
385
|
|
- this.$message.info("已取消删除");
|
|
386
|
|
- });
|
|
387
|
|
- },
|
|
388
|
|
- onOpen(id) {
|
|
389
|
|
- this.$confirm("您确定要将此用户启用吗?", "提示", {
|
|
390
|
|
- confirmButtonText: "确定",
|
|
391
|
|
- cancelButtonText: "取消",
|
|
392
|
|
- type: "warning",
|
|
393
|
|
- })
|
|
394
|
|
- .then(() => {
|
|
|
169
|
+ },
|
|
|
170
|
+ filterNode(value, data) {
|
|
|
171
|
+ if (!value) return true;
|
|
|
172
|
+ return data.text.indexOf(value) !== -1;
|
|
|
173
|
+ },
|
|
|
174
|
+ getList() {
|
|
|
175
|
+ // this.loading = true
|
|
|
176
|
+ return new Promise((resolve) => {
|
|
395
|
177
|
const params = {
|
|
396
|
|
- ids: id,
|
|
397
|
|
- state: 1,
|
|
|
178
|
+ page: this.pageParams.pageindex, // 第几页
|
|
|
179
|
+ pagesize: this.pageParams.pagesize, // 每页几条信息
|
|
|
180
|
+ key: this.keyword, // 否 string 模糊查询
|
|
|
181
|
+ deptid: this.deptid,
|
|
|
182
|
+ woid: this.hosid,
|
|
398
|
183
|
};
|
|
399
|
|
- getDelUsers(params).then((response) => {
|
|
400
|
|
- if (response.state.toLowerCase() === "success") {
|
|
401
|
|
- this.getList();
|
|
402
|
|
- this.$message.success("启用成功!");
|
|
403
|
|
- }
|
|
|
184
|
+ getUserAccountLists(params).then((response) => {
|
|
|
185
|
+ // this.loading = false
|
|
|
186
|
+ this.pageParams.total = response.total;
|
|
|
187
|
+ this.dataLists = response.rows;
|
|
404
|
188
|
});
|
|
405
|
|
- })
|
|
406
|
|
- .catch(() => {
|
|
407
|
|
- this.$message("已取消");
|
|
|
189
|
+ resolve();
|
|
408
|
190
|
});
|
|
409
|
|
- },
|
|
410
|
|
- onOff(id) {
|
|
411
|
|
- this.$confirm("您确定要将此用户禁用吗?", "提示", {
|
|
412
|
|
- confirmButtonText: "确定",
|
|
413
|
|
- cancelButtonText: "取消",
|
|
414
|
|
- type: "warning",
|
|
415
|
|
- })
|
|
416
|
|
- .then(() => {
|
|
417
|
|
- const params = {
|
|
418
|
|
- ids: id,
|
|
419
|
|
- state: 0,
|
|
420
|
|
- };
|
|
421
|
|
- getDelUsers(params).then((response) => {
|
|
|
191
|
+ },
|
|
|
192
|
+ btn_onimport() {
|
|
|
193
|
+ if (this.deptid == "") {
|
|
|
194
|
+ this.$message.warning("请选择部门");
|
|
|
195
|
+ return;
|
|
|
196
|
+ }
|
|
|
197
|
+ this.dialogTableVisible = true;
|
|
|
198
|
+ },
|
|
|
199
|
+ // 复选框状态改变
|
|
|
200
|
+ changeSelects(val) {
|
|
|
201
|
+ this.multipleSelection = val;
|
|
|
202
|
+ },
|
|
|
203
|
+ btn_search() {
|
|
|
204
|
+ this.pageParams.pageindex = 1;
|
|
|
205
|
+ this.getList();
|
|
|
206
|
+ },
|
|
|
207
|
+ btn_add() {
|
|
|
208
|
+ this.$layer.iframe({
|
|
|
209
|
+ content: {
|
|
|
210
|
+ content: addOrEdit, // 传递的组件对象
|
|
|
211
|
+ parent: this, // 当前的vue对象
|
|
|
212
|
+ data: {
|
|
|
213
|
+ addDeptid: this.deptid.toString(),
|
|
|
214
|
+ }, // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
|
|
|
215
|
+ },
|
|
|
216
|
+ area: ["50%", "85%"],
|
|
|
217
|
+ title: "添加用户信息",
|
|
|
218
|
+ });
|
|
|
219
|
+ },
|
|
|
220
|
+ btn_edit(editId, usercode) {
|
|
|
221
|
+ this.$layer.iframe({
|
|
|
222
|
+ content: {
|
|
|
223
|
+ content: addOrEdit, // 传递的组件对象
|
|
|
224
|
+ parent: this, // 当前的vue对象
|
|
|
225
|
+ data: {
|
|
|
226
|
+ rowid: editId,
|
|
|
227
|
+ usercodeList: usercode,
|
|
|
228
|
+ }, // props
|
|
|
229
|
+ },
|
|
|
230
|
+ area: ["50%", "80%"],
|
|
|
231
|
+ title: "编辑用户信息",
|
|
|
232
|
+ });
|
|
|
233
|
+ },
|
|
|
234
|
+ // btn_modifyPass(editId) {
|
|
|
235
|
+ // this.$layer.iframe({
|
|
|
236
|
+ // content: {
|
|
|
237
|
+ // content: modifyPass, // 传递的组件对象
|
|
|
238
|
+ // parent: this, // 当前的vue对象
|
|
|
239
|
+ // data: {
|
|
|
240
|
+ // rowid: editId
|
|
|
241
|
+ // } // props
|
|
|
242
|
+ // },
|
|
|
243
|
+ // area: ['40%', '360px'],
|
|
|
244
|
+ // title: '修改密码'
|
|
|
245
|
+ // })
|
|
|
246
|
+ // },
|
|
|
247
|
+ btn_delete(id) {
|
|
|
248
|
+ this.$confirm("您确定要将此用户信息删除吗?", "提示", {
|
|
|
249
|
+ confirmButtonText: "确定",
|
|
|
250
|
+ cancelButtonText: "取消",
|
|
|
251
|
+ type: "warning",
|
|
|
252
|
+ })
|
|
|
253
|
+ .then(() => {
|
|
|
254
|
+ const params = {
|
|
|
255
|
+ ids: id,
|
|
|
256
|
+ state: 1, // 0启用1删除2禁用
|
|
|
257
|
+ };
|
|
|
258
|
+ deleteUserAccount(params).then((response) => {
|
|
|
259
|
+ if (response.state.toLowerCase() === "success") {
|
|
|
260
|
+ this.getList();
|
|
|
261
|
+ this.$message.success("删除成功!");
|
|
|
262
|
+ }
|
|
|
263
|
+ });
|
|
|
264
|
+ })
|
|
|
265
|
+ .catch(() => {
|
|
|
266
|
+ this.$message.info("已取消删除");
|
|
|
267
|
+ });
|
|
|
268
|
+ },
|
|
|
269
|
+ onOpen(id) {
|
|
|
270
|
+ this.$confirm("您确定要将此用户启用吗?", "提示", {
|
|
|
271
|
+ confirmButtonText: "确定",
|
|
|
272
|
+ cancelButtonText: "取消",
|
|
|
273
|
+ type: "warning",
|
|
|
274
|
+ })
|
|
|
275
|
+ .then(() => {
|
|
|
276
|
+ const params = {
|
|
|
277
|
+ ids: id,
|
|
|
278
|
+ state: 1,
|
|
|
279
|
+ };
|
|
|
280
|
+ getDelUsers(params).then((response) => {
|
|
|
281
|
+ if (response.state.toLowerCase() === "success") {
|
|
|
282
|
+ this.getList();
|
|
|
283
|
+ this.$message.success("启用成功!");
|
|
|
284
|
+ }
|
|
|
285
|
+ });
|
|
|
286
|
+ })
|
|
|
287
|
+ .catch(() => {
|
|
|
288
|
+ this.$message("已取消");
|
|
|
289
|
+ });
|
|
|
290
|
+ },
|
|
|
291
|
+ onOff(id) {
|
|
|
292
|
+ this.$confirm("您确定要将此用户禁用吗?", "提示", {
|
|
|
293
|
+ confirmButtonText: "确定",
|
|
|
294
|
+ cancelButtonText: "取消",
|
|
|
295
|
+ type: "warning",
|
|
|
296
|
+ })
|
|
|
297
|
+ .then(() => {
|
|
|
298
|
+ const params = {
|
|
|
299
|
+ ids: id,
|
|
|
300
|
+ state: 0,
|
|
|
301
|
+ };
|
|
|
302
|
+ getDelUsers(params).then((response) => {
|
|
|
303
|
+ if (response.state.toLowerCase() === "success") {
|
|
|
304
|
+ this.getList();
|
|
|
305
|
+ this.$message.success("禁用成功!");
|
|
|
306
|
+ }
|
|
|
307
|
+ });
|
|
|
308
|
+ })
|
|
|
309
|
+ .catch(() => {
|
|
|
310
|
+ this.$message("已取消");
|
|
|
311
|
+ });
|
|
|
312
|
+ },
|
|
|
313
|
+ // 树
|
|
|
314
|
+ getTreeList() {
|
|
|
315
|
+ return new Promise((resolve) => {
|
|
|
316
|
+ getDeptTree(this.parentid).then((response) => {
|
|
422
|
317
|
if (response.state.toLowerCase() === "success") {
|
|
423
|
|
- this.getList();
|
|
424
|
|
- this.$message.success("禁用成功!");
|
|
|
318
|
+ this.treelists = response.data;
|
|
425
|
319
|
}
|
|
426
|
320
|
});
|
|
427
|
|
- })
|
|
428
|
|
- .catch(() => {
|
|
429
|
|
- this.$message("已取消");
|
|
430
|
|
- });
|
|
431
|
|
- },
|
|
432
|
|
- // 树
|
|
433
|
|
- getTreeList() {
|
|
434
|
|
- return new Promise((resolve) => {
|
|
435
|
|
- getDeptTree(this.parentid).then((response) => {
|
|
436
|
|
- if (response.state.toLowerCase() === "success") {
|
|
437
|
|
- this.treelists = response.data;
|
|
438
|
|
- }
|
|
|
321
|
+ resolve();
|
|
439
|
322
|
});
|
|
440
|
|
- resolve();
|
|
441
|
|
- });
|
|
442
|
|
- },
|
|
443
|
|
- handleNodeClick(data) {
|
|
444
|
|
- this.deptid = "";
|
|
445
|
|
- this.hosid = "";
|
|
446
|
|
- if (data.parentid != "-1") {
|
|
447
|
|
- this.deptid = data.id;
|
|
448
|
|
- this.importData.deptid = data.id;
|
|
449
|
|
- this.hosid = "";
|
|
450
|
|
- this.getList();
|
|
451
|
|
- }
|
|
452
|
|
- if (data.parentid == "-1") {
|
|
453
|
|
- this.hosid = data.id;
|
|
|
323
|
+ },
|
|
|
324
|
+ handleNodeClick(data) {
|
|
454
|
325
|
this.deptid = "";
|
|
455
|
|
- this.getList();
|
|
456
|
|
- }
|
|
457
|
|
- },
|
|
458
|
|
- handle_success(res) {
|
|
459
|
|
- if (res.state == "success") {
|
|
460
|
|
- this.dialogTableVisible = false;
|
|
461
|
|
- this.getList();
|
|
462
|
|
- this.$message.success("导入成功");
|
|
463
|
|
- }
|
|
464
|
|
- },
|
|
465
|
|
- handle_remove() {},
|
|
466
|
|
- btn_export() {
|
|
467
|
|
- const exportparams = {
|
|
468
|
|
- page: this.pageParams.pageindex, // 第几页
|
|
469
|
|
- pagesize: this.pageParams.pagesize, // 每页几条信息
|
|
470
|
|
- key: this.keyword, // 否 string 模糊查询
|
|
471
|
|
- deptid: this.deptid,
|
|
472
|
|
- isexport: 1,
|
|
473
|
|
- };
|
|
474
|
|
- exportExcel(exportparams, getUserExport);
|
|
|
326
|
+ this.hosid = "";
|
|
|
327
|
+ if (data.parentid != "-1") {
|
|
|
328
|
+ this.deptid = data.id;
|
|
|
329
|
+ this.importData.deptid = data.id;
|
|
|
330
|
+ this.hosid = "";
|
|
|
331
|
+ this.getList();
|
|
|
332
|
+ }
|
|
|
333
|
+ if (data.parentid == "-1") {
|
|
|
334
|
+ this.hosid = data.id;
|
|
|
335
|
+ this.deptid = "";
|
|
|
336
|
+ this.getList();
|
|
|
337
|
+ }
|
|
|
338
|
+ },
|
|
|
339
|
+ handle_success(res) {
|
|
|
340
|
+ if (res.state == "success") {
|
|
|
341
|
+ this.dialogTableVisible = false;
|
|
|
342
|
+ this.getList();
|
|
|
343
|
+ this.$message.success("导入成功");
|
|
|
344
|
+ }
|
|
|
345
|
+ },
|
|
|
346
|
+ handle_remove() {},
|
|
|
347
|
+ btn_export() {
|
|
|
348
|
+ const exportparams = {
|
|
|
349
|
+ page: this.pageParams.pageindex, // 第几页
|
|
|
350
|
+ pagesize: this.pageParams.pagesize, // 每页几条信息
|
|
|
351
|
+ key: this.keyword, // 否 string 模糊查询
|
|
|
352
|
+ deptid: this.deptid,
|
|
|
353
|
+ isexport: 1,
|
|
|
354
|
+ };
|
|
|
355
|
+ exportExcel(exportparams, getUserExport);
|
|
|
356
|
+ },
|
|
475
|
357
|
},
|
|
476
|
|
- },
|
|
477
|
|
-};
|
|
|
358
|
+ };
|
|
478
|
359
|
</script>
|
|
479
|
360
|
|
|
480
|
361
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
481
|
|
-.usermanage .filter-item.el-input {
|
|
482
|
|
- width: 240px;
|
|
483
|
|
-}
|
|
484
|
|
-
|
|
485
|
|
-.usermanage {
|
|
486
|
|
- padding: 10px 10px 20px 10px;
|
|
487
|
|
-}
|
|
488
|
|
-
|
|
489
|
|
-.usermanage .user_img {
|
|
490
|
|
- width: 56px;
|
|
491
|
|
- height: 56px;
|
|
492
|
|
- border-radius: 50%;
|
|
493
|
|
-}
|
|
494
|
|
-
|
|
495
|
|
-.filter-container {
|
|
496
|
|
- .el-select {
|
|
497
|
|
- margin-right: 10px;
|
|
|
362
|
+ .usermanage .filter-item.el-input {
|
|
|
363
|
+ width: 240px;
|
|
498
|
364
|
}
|
|
499
|
365
|
|
|
500
|
|
- .el-date-editor {
|
|
501
|
|
- margin-right: 10px;
|
|
|
366
|
+ .usermanage {
|
|
|
367
|
+ padding: 10px 10px 20px 10px;
|
|
502
|
368
|
}
|
|
503
|
369
|
|
|
504
|
|
- .el-cascader {
|
|
505
|
|
- margin-right: 10px;
|
|
|
370
|
+ .usermanage .user_img {
|
|
|
371
|
+ width: 56px;
|
|
|
372
|
+ height: 56px;
|
|
|
373
|
+ border-radius: 50%;
|
|
506
|
374
|
}
|
|
507
|
375
|
|
|
508
|
|
- .filter-item {
|
|
509
|
|
- vertical-align: top;
|
|
|
376
|
+ .filter-container {
|
|
|
377
|
+ .el-select {
|
|
|
378
|
+ margin-right: 10px;
|
|
|
379
|
+ }
|
|
|
380
|
+
|
|
|
381
|
+ .el-date-editor {
|
|
|
382
|
+ margin-right: 10px;
|
|
|
383
|
+ }
|
|
|
384
|
+
|
|
|
385
|
+ .el-cascader {
|
|
|
386
|
+ margin-right: 10px;
|
|
|
387
|
+ }
|
|
|
388
|
+
|
|
|
389
|
+ .filter-item {
|
|
|
390
|
+ vertical-align: top;
|
|
|
391
|
+ }
|
|
510
|
392
|
}
|
|
511
|
|
-}
|
|
512
|
393
|
</style>
|