|
|
|
@ -28,7 +28,7 @@
|
|
|
|
|
<el-input v-model="vm.deptName" clearable size="small" placeholder="请输入部门名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="终端类型" prop="terminalType">
|
|
|
|
|
<el-input-dict v-model="vm.terminalType" clearable size="small" placeholder="请输入终端类型" dict-name="TERMINAL_TYPE" ></el-input-dict>
|
|
|
|
|
<el-input-dict v-model="vm.terminalType" clearable size="small" placeholder="请输入终端类型" dict-name="TERMINAL_TYPE"></el-input-dict>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="onSearch">搜索</el-button>
|
|
|
|
@ -93,7 +93,8 @@
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="userId"
|
|
|
|
|
label="用户主键">
|
|
|
|
|
label="用户主键"
|
|
|
|
|
width="140">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
@ -103,22 +104,14 @@
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="loginTime"
|
|
|
|
|
label="登录时间">
|
|
|
|
|
label="登录时间"
|
|
|
|
|
width="140">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="validTime"
|
|
|
|
|
label="有效时间">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="deptId"
|
|
|
|
|
label="部门主键">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="deptCode"
|
|
|
|
|
label="部门代码">
|
|
|
|
|
label="有效时间"
|
|
|
|
|
width="140">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
@ -133,11 +126,13 @@
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="terminalIp"
|
|
|
|
|
label="终端地址">
|
|
|
|
|
label="终端地址"
|
|
|
|
|
width="140">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
align="center"
|
|
|
|
|
prop="terminalInfo"
|
|
|
|
|
width="200"
|
|
|
|
|
label="终端信息">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
@ -152,9 +147,9 @@
|
|
|
|
|
width="120"
|
|
|
|
|
label="操作">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-dropdown size="mini" split-button type="primary" @click="onCommand(['edit',scope.row])"
|
|
|
|
|
<el-dropdown size="mini" split-button type="primary" @click="onCommand(['logout',scope.row])"
|
|
|
|
|
@command="onCommand">
|
|
|
|
|
<i class="el-icon-edit"></i>编辑
|
|
|
|
|
<i class="el-icon-edit"></i>注销
|
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
|
<el-dropdown-item :command="['delete',scope.row]" icon="el-icon-delete">删除
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
@ -168,7 +163,8 @@
|
|
|
|
|
background
|
|
|
|
|
v-if="vm.totalCount > vm.pageSize"
|
|
|
|
|
style="margin-top: 10px"
|
|
|
|
|
@current-change="onPage"
|
|
|
|
|
@current-change="onPageChange"
|
|
|
|
|
@size-change="onPageSizeChange"
|
|
|
|
|
:current-page="vm.pageNumber"
|
|
|
|
|
:page-size="vm.pageSize"
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
@ -198,8 +194,8 @@
|
|
|
|
|
pageNumber: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
totalCount: 0,
|
|
|
|
|
sortKey:'CREATE_TIME',
|
|
|
|
|
sortType:'DESC'
|
|
|
|
|
sortKey: 'CREATE_TIME',
|
|
|
|
|
sortType: 'DESC'
|
|
|
|
|
},
|
|
|
|
|
form: {//待提交表单
|
|
|
|
|
title: "",
|
|
|
|
@ -235,16 +231,14 @@
|
|
|
|
|
valid: [
|
|
|
|
|
{required: true, message: '是否有效不能为空', trigger: 'blur'},
|
|
|
|
|
],
|
|
|
|
|
deptId: [
|
|
|
|
|
],
|
|
|
|
|
deptId: [],
|
|
|
|
|
deptCode: [
|
|
|
|
|
{min: 1, max: 50, message: '部门代码长度在 1 到 50 个字符', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
deptName: [
|
|
|
|
|
{min: 1, max: 100, message: '部门名称长度在 1 到 100 个字符', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
|
terminalType: [
|
|
|
|
|
],
|
|
|
|
|
terminalType: [],
|
|
|
|
|
terminalIp: [
|
|
|
|
|
{min: 1, max: 50, message: '终端地址长度在 1 到 50 个字符', trigger: 'blur'}
|
|
|
|
|
],
|
|
|
|
@ -258,26 +252,34 @@
|
|
|
|
|
const cmd = arg[0];
|
|
|
|
|
const item = arg[1];
|
|
|
|
|
switch (cmd) {
|
|
|
|
|
case "edit":
|
|
|
|
|
this.form.title = "通行证编辑";
|
|
|
|
|
this.form.dialog = true;
|
|
|
|
|
this.form.id = item.id;
|
|
|
|
|
this.form.userId = item.userId;
|
|
|
|
|
this.form.userName = item.userName;
|
|
|
|
|
this.form.loginTime = item.loginTime;
|
|
|
|
|
this.form.validTime = item.validTime;
|
|
|
|
|
this.form.valid = item.valid;
|
|
|
|
|
this.form.deptId = item.deptId;
|
|
|
|
|
this.form.deptCode = item.deptCode;
|
|
|
|
|
this.form.deptName = item.deptName;
|
|
|
|
|
this.form.terminalType = item.terminalType;
|
|
|
|
|
this.form.terminalIp = item.terminalIp;
|
|
|
|
|
this.form.terminalInfo = item.terminalInfo;
|
|
|
|
|
this.form.rowVersion = item.rowVersion;
|
|
|
|
|
break;
|
|
|
|
|
case "delete":
|
|
|
|
|
this.onDelete(item);
|
|
|
|
|
break;
|
|
|
|
|
case "logout":
|
|
|
|
|
this.$confirm('将注销该用户的登录信息, 是否继续?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
this.$ajax.post({
|
|
|
|
|
module: "system",
|
|
|
|
|
target: "tokens",
|
|
|
|
|
method: "logout",
|
|
|
|
|
data: {
|
|
|
|
|
token: item.token
|
|
|
|
|
}
|
|
|
|
|
}).then(function (response) {
|
|
|
|
|
if (response.errors.length > 0) {
|
|
|
|
|
this.e(response.errors[0].message);
|
|
|
|
|
} else {
|
|
|
|
|
this.s("注销成功");
|
|
|
|
|
this.onFind();
|
|
|
|
|
}
|
|
|
|
|
}.bind(this));
|
|
|
|
|
}.bind(this)).catch(function (action) {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
this.w("未找到对应的命令");
|
|
|
|
|
break;
|
|
|
|
|