6c637641
wxy
no message
|
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
|
export default {
name: "UserList",
mixins: [JeecgListMixin],
components: {
JThirdAppButton,
SysUserAgentModal,
UserModal,
PasswordModal,
JInput,
UserRecycleBinModal,
JSuperQuery
},
data() {
return {
description: '这是用户管理页面',
queryParam: {},
recycleBinVisible: false,
columns: [
/*{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},*/
{
title: '用户账号',
align: "center",
dataIndex: 'username',
width: 120,
sorter: true
},
{
title: '用户姓名',
align: "center",
width: 100,
dataIndex: 'realname',
},
{
title: '头像',
align: "center",
width: 120,
dataIndex: 'avatar',
scopedSlots: {customRender: "avatarslot"}
},
{
title: '性别',
align: "center",
width: 80,
dataIndex: 'sex_dictText',
sorter: true
},
{
title: '生日',
align: "center",
width: 100,
dataIndex: 'birthday'
},
{
title: '手机号码',
align: "center",
width: 100,
dataIndex: 'phone'
},
{
title: '部门',
align: "center",
width: 180,
dataIndex: 'orgCodeTxt'
},
{
title: '负责部门',
align: "center",
width: 180,
dataIndex: 'departIds_dictText'
},
{
title: '状态',
align: "center",
width: 80,
dataIndex: 'status_dictText'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: "center",
width: 170
}
],
superQueryFieldList: [
{ type: 'input', value: 'username', text: '用户账号', },
{ type: 'input', value: 'realname', text: '用户姓名', },
{ type: 'select', value: 'sex', text: '性别', dictCode: 'sex' },
],
url: {
syncUser: "/act/process/extActProcess/doSyncUser",
list: "/sys/user/list",
delete: "/sys/user/delete",
deleteBatch: "/sys/user/deleteBatch",
exportXlsUrl: "/sys/user/exportXls",
importExcelUrl: "sys/user/importExcel",
},
}
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
methods: {
|
6c637641
wxy
no message
|
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
|
getAvatarView: function (avatar) {
return getFileAccessHttpUrl(avatar)
},
batchFrozen: function (status) {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
return false;
} else {
let ids = "";
let that = this;
let isAdmin = false;
that.selectionRows.forEach(function (row) {
if (row.username == 'admin') {
isAdmin = true;
}
});
if (isAdmin) {
that.$message.warning('管理员账号不允许此操作,请重新选择!');
return;
}
that.selectedRowKeys.forEach(function (val) {
ids += val + ",";
});
that.$confirm({
title: "确认操作",
content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
onOk: function () {
frozenBatch({ids: ids, status: status}).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
that.onClearSelected();
} else {
that.$message.warning(res.message);
}
});
}
});
}
},
handleMenuClick(e) {
if (e.key == 1) {
this.batchDel();
} else if (e.key == 2) {
this.batchFrozen(2);
} else if (e.key == 3) {
this.batchFrozen(1);
}
},
handleFrozen: function (id, status, username) {
let that = this;
//TODO 后台校验管理员角色
if ('admin' == username) {
that.$message.warning('管理员账号不允许此操作!');
return;
}
frozenBatch({ids: id, status: status}).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
} else {
that.$message.warning(res.message);
}
});
},
handleChangePassword(username) {
this.$refs.passwordmodal.show(username);
},
handleAgentSettings(username){
this.$refs.sysUserAgentModal.agentSettings(username);
this.$refs.sysUserAgentModal.title = "用户代理人设置";
},
passwordModalOk() {
//TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
},
onSyncFinally({isToLocal}) {
// 同步到本地时刷新下数据
if (isToLocal) {
this.loadData()
}
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>
|