diff --git a/dvadmin-ui/src/api/vadmin/monitor/logininfor.js b/dvadmin-ui/src/api/vadmin/monitor/logininfor.js
index 383d61f..1dc21d4 100755
--- a/dvadmin-ui/src/api/vadmin/monitor/logininfor.js
+++ b/dvadmin-ui/src/api/vadmin/monitor/logininfor.js
@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询登录日志列表
export function list(query) {
return request({
- url: '/monitor/logininfor/list',
+ url: '/admin/system/logininfor/',
method: 'get',
params: query
})
@@ -12,7 +12,7 @@ export function list(query) {
// 删除登录日志
export function delLogininfor(infoId) {
return request({
- url: '/monitor/logininfor/' + infoId,
+ url: `/admin/system/logininfor/${infoId}/`,
method: 'delete'
})
}
@@ -20,7 +20,7 @@ export function delLogininfor(infoId) {
// 清空登录日志
export function cleanLogininfor() {
return request({
- url: '/monitor/logininfor/clean',
+ url: '/admin/system/logininfor/clean',
method: 'delete'
})
}
@@ -28,8 +28,8 @@ export function cleanLogininfor() {
// 导出登录日志
export function exportLogininfor(query) {
return request({
- url: '/monitor/logininfor/export',
+ url: '/admin/system/logininfor/export',
method: 'get',
params: query
})
-}
\ No newline at end of file
+}
diff --git a/dvadmin-ui/src/utils/ruoyi.js b/dvadmin-ui/src/utils/ruoyi.js
index 6d61cba..58d8bb8 100755
--- a/dvadmin-ui/src/utils/ruoyi.js
+++ b/dvadmin-ui/src/utils/ruoyi.js
@@ -55,14 +55,10 @@ export function resetForm(refName) {
// 添加日期范围
export function addDateRange(params, dateRange, propName) {
- var search = params;
- if (null != dateRange && '' != dateRange) {
- // create_datetime__range = this.dateRange
- var dateTime=new Date();
-
+ let search = JSON.parse(JSON.stringify(params));
+ if (dateRange.length !== 0) {
search.as = JSON.stringify({create_datetime__range : dateRange});
}
- console.log(11,search)
return search;
}
@@ -70,7 +66,8 @@ export function addDateRange(params, dateRange, propName) {
export function selectDictLabel(datas, value) {
var actions = [];
Object.keys(datas).some((key) => {
- if (String(datas[key].dictValue) === ('' + value)) {
+ if (String(datas[key].dictValue) === ('' + String(value))) {
+ actions.push(datas[key].dictLabel);
actions.push(datas[key].dictLabel);
return true;
}
diff --git a/dvadmin-ui/src/views/login.vue b/dvadmin-ui/src/views/login.vue
index 6993e40..22b2714 100755
--- a/dvadmin-ui/src/views/login.vue
+++ b/dvadmin-ui/src/views/login.vue
@@ -2,7 +2,7 @@
{{ title }}
-
+
@@ -69,7 +69,7 @@
username: "admin",
password: "123456",
rememberMe: false,
- code: "",
+ code: "1",
uuid: ""
},
loginRules: {
diff --git a/dvadmin-ui/src/views/vadmin/monitor/logininfor/index.vue b/dvadmin-ui/src/views/vadmin/monitor/logininfor/index.vue
index 28258b7..37ca477 100755
--- a/dvadmin-ui/src/views/vadmin/monitor/logininfor/index.vue
+++ b/dvadmin-ui/src/views/vadmin/monitor/logininfor/index.vue
@@ -42,11 +42,12 @@
v-model="dateRange"
size="small"
style="width: 240px"
- value-format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
+ :default-time="['00:00:00', '23:59:59']"
>
@@ -64,7 +65,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
- v-hasPermi="['monitor:logininfor:remove']"
+ v-hasPermi="['admin:system:logininfor:{id}:delete']"
>删除
@@ -74,7 +75,7 @@
icon="el-icon-delete"
size="mini"
@click="handleClean"
- v-hasPermi="['monitor:logininfor:remove']"
+ v-hasPermi="['admin:system:logininfor:clean:delete']"
>清空
@@ -84,7 +85,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
- v-hasPermi="['system:logininfor:export']"
+ v-hasPermi="['admin:system:logininfor:export:get']"
>导出
@@ -92,17 +93,17 @@
-
-
+
+
-
+
-
+
- {{ parseTime(scope.row.loginTime) }}
+ {{ parseTime(scope.row.create_datetime) }}
@@ -137,9 +138,11 @@ export default {
// 表格数据
list: [],
// 状态数据字典
- statusOptions: [],
+ statusOptions:[{dictLabel: '成功', dictValue: true}, {dictLabel: '失败', dictValue: false}],
// 日期范围
dateRange: [],
+ form: {},
+
// 查询参数
queryParams: {
pageNum: 1,
@@ -152,17 +155,18 @@ export default {
},
created() {
this.getList();
- this.getDicts("sys_common_status").then(response => {
- this.statusOptions = response.data;
- });
+ // this.getDicts("sys_common_status").then(response => {
+ // this.statusOptions = response.data;
+ // });
},
methods: {
+
/** 查询登录日志列表 */
getList() {
this.loading = true;
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.list = response.rows;
- this.total = response.total;
+ this.list = response.data.results;
+ this.total = response.data.count;
this.loading = false;
}
);
@@ -174,6 +178,7 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
+ console.log(this.queryParams)
this.getList();
},
/** 重置按钮操作 */
@@ -184,12 +189,12 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
- this.ids = selection.map(item => item.infoId)
+ this.ids = selection.map(item => item.id)
this.multiple = !selection.length
},
/** 删除按钮操作 */
handleDelete(row) {
- const infoIds = row.infoId || this.ids;
+ const infoIds = row.id || this.ids;
this.$confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",