16 changed files with 892 additions and 1746 deletions
@ -1,53 +0,0 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询企业api配置表列表
|
|||
export function listBusinessApiConfig(query) { |
|||
return request({ |
|||
url: '/business/businessApiConfig/list', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
|||
|
|||
// 查询企业api配置表详细
|
|||
export function getBusinessApiConfig(id) { |
|||
return request({ |
|||
url: '/business/businessApiConfig/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增企业api配置表
|
|||
export function addBusinessApiConfig(data) { |
|||
return request({ |
|||
url: '/business/businessApiConfig', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改企业api配置表
|
|||
export function updateBusinessApiConfig(data) { |
|||
return request({ |
|||
url: '/business/businessApiConfig', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除企业api配置表
|
|||
export function delBusinessApiConfig(id) { |
|||
return request({ |
|||
url: '/business/businessApiConfig/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出企业api配置表
|
|||
export function exportBusinessApiConfig(query) { |
|||
return request({ |
|||
url: '/business/businessApiConfig/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
|||
@ -1,53 +0,0 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询企业登录日志列表
|
|||
export function listBusinessLogininfor(query) { |
|||
return request({ |
|||
url: '/business/businessLogininfor/list', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
|||
|
|||
// 查询企业登录日志详细
|
|||
export function getBusinessLogininfor(id) { |
|||
return request({ |
|||
url: '/business/businessLogininfor/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增企业登录日志
|
|||
export function addBusinessLogininfor(data) { |
|||
return request({ |
|||
url: '/business/businessLogininfor', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改企业登录日志
|
|||
export function updateBusinessLogininfor(data) { |
|||
return request({ |
|||
url: '/business/businessLogininfor', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除企业登录日志
|
|||
export function delBusinessLogininfor(id) { |
|||
return request({ |
|||
url: '/business/businessLogininfor/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出企业登录日志
|
|||
export function exportBusinessLogininfor(query) { |
|||
return request({ |
|||
url: '/business/businessLogininfor/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
|||
@ -1,431 +0,0 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
label-width="68px" |
|||
> |
|||
<el-form-item label="企业ID" prop="merchantId" v-show="false"> |
|||
<el-input |
|||
v-model="queryParams.merchantId" |
|||
placeholder="请输入企业ID" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="所属企业" prop="merchantName"> |
|||
<el-input |
|||
v-model="queryParams.merchantName" |
|||
placeholder="请选择企业" |
|||
clearable |
|||
readonly |
|||
@click="searchBusinessSelectVisible = true" |
|||
/> |
|||
<el-button |
|||
icon="el-icon-search" |
|||
size="mini" |
|||
type="primary" |
|||
@click="searchBusinessSelectVisible = true" |
|||
>选择</el-button |
|||
> |
|||
</el-form-item> |
|||
<el-form-item label="状态" prop="status"> |
|||
<el-select |
|||
v-model="queryParams.status" |
|||
placeholder="请选择状态" |
|||
clearable |
|||
size="small" |
|||
> |
|||
<el-option label="启用" :value="1" /> |
|||
<el-option label="禁用" :value="0" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="IP白名单" prop="ipWhitelist"> |
|||
<el-input |
|||
v-model="queryParams.ipWhitelist" |
|||
placeholder="请输入IP白名单" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" |
|||
>搜索</el-button |
|||
> |
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<el-row :gutter="10" class="mb8"> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="primary" |
|||
plain |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="handleAdd" |
|||
v-hasPermi="['business:businessApiConfig:add']" |
|||
>新增</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="success" |
|||
plain |
|||
icon="el-icon-edit" |
|||
size="mini" |
|||
:disabled="single" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['business:businessApiConfig:edit']" |
|||
>修改</el-button |
|||
> |
|||
</el-col> |
|||
<!-- <el-col :span="1.5"> |
|||
<el-button |
|||
type="danger" |
|||
plain |
|||
icon="el-icon-delete" |
|||
size="mini" |
|||
:disabled="multiple" |
|||
@click="handleDelete" |
|||
v-hasPermi="['business:businessApiConfig:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> --> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="warning" |
|||
plain |
|||
icon="el-icon-download" |
|||
size="mini" |
|||
@click="handleExport" |
|||
v-hasPermi="['business:businessApiConfig:export']" |
|||
>导出</el-button |
|||
> |
|||
</el-col> |
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table |
|||
v-loading="loading" |
|||
:data="businessApiConfigList" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column type="selection" width="55" align="center" /> |
|||
<el-table-column label="主键" align="center" prop="id" /> |
|||
<el-table-column label="企业编号" align="center" prop="merchantNo" /> |
|||
<el-table-column label="企业公钥" align="center" prop="merchantPubligKey" /> |
|||
<el-table-column label="系统公钥" align="center" prop="systemPubligKey" /> |
|||
<el-table-column label="系统私钥" align="center" prop="systemPrivateKey" /> |
|||
<el-table-column label="状态" align="center" prop="status" /> |
|||
<el-table-column label="IP白名单" align="center" prop="ipWhitelist" /> |
|||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
v-hasPermi="['business:businessApiConfig:edit']" |
|||
>修改</el-button |
|||
> |
|||
<!-- <el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['business:businessApiConfig:remove']" |
|||
>删除</el-button |
|||
> --> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total > 0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
|
|||
<!-- 添加或修改企业api配置表对话框 --> |
|||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|||
<el-form-item label="企业ID" prop="merchantId" v-show="false"> |
|||
<el-input v-model="form.merchantId" placeholder="请输入企业ID" /> |
|||
</el-form-item> |
|||
<el-form-item label="企业编号" prop="merchantNo"> |
|||
<el-input |
|||
v-model="form.merchantNo" |
|||
placeholder="请输入企业编号" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="企业名称" prop="merchantName"> |
|||
<el-input |
|||
v-model="form.merchantName" |
|||
placeholder="请选择企业" |
|||
clearable |
|||
readonly |
|||
@click="businessSelectVisible = true" |
|||
/> |
|||
<el-button |
|||
icon="el-icon-search" |
|||
size="mini" |
|||
type="primary" |
|||
@click="businessSelectVisible = true" |
|||
>选择</el-button |
|||
> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="企业公钥" prop="merchantPubligKey"> |
|||
<el-input |
|||
v-model="form.merchantPubligKey" |
|||
type="textarea" |
|||
placeholder="请输入内容" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="系统公钥" prop="systemPubligKey"> |
|||
<el-input |
|||
v-model="form.systemPubligKey" |
|||
type="textarea" |
|||
placeholder="请输入内容" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="系统私钥" prop="systemPrivateKey"> |
|||
<el-input |
|||
v-model="form.systemPrivateKey" |
|||
type="textarea" |
|||
placeholder="请输入内容" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="状态"> |
|||
<el-radio-group v-model="form.status"> |
|||
<el-radio :label="1">启用</el-radio> |
|||
<el-radio :label="0">禁用</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
<el-form-item label="IP白名单" prop="ipWhitelist"> |
|||
<el-input v-model="form.ipWhitelist" placeholder="请输入IP白名单" /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
<!-- 1. 新增搜索专用 --> |
|||
<BusinessSelect |
|||
:visible.sync="searchBusinessSelectVisible" |
|||
@select="handleSearchBusinessSelect" |
|||
/> |
|||
<BusinessSelect |
|||
:visible.sync="businessSelectVisible" |
|||
@select="handleAddBusinessSelect" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listBusinessApiConfig, |
|||
getBusinessApiConfig, |
|||
delBusinessApiConfig, |
|||
addBusinessApiConfig, |
|||
updateBusinessApiConfig, |
|||
exportBusinessApiConfig, |
|||
} from "@/api/business/businessApiConfig"; |
|||
import BusinessSelect from "@/components/business/BusinessSelect"; |
|||
|
|||
export default { |
|||
name: "BusinessApiConfig", |
|||
components: { BusinessSelect }, |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 企业api配置表表格数据 |
|||
businessApiConfigList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
merchantId: null, |
|||
merchantNo: null, |
|||
merchantPubligKey: null, |
|||
systemPubligKey: null, |
|||
systemPrivateKey: null, |
|||
status: null, |
|||
ipWhitelist: null, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
systemPubligKey: [ |
|||
{ required: true, message: "系统公钥不能为空", trigger: "blur" }, |
|||
], |
|||
systemPrivateKey: [ |
|||
{ required: true, message: "系统私钥不能为空", trigger: "blur" }, |
|||
], |
|||
status: [{ required: true, message: "状态不能为空", trigger: "blur" }], |
|||
updateTime: [{ required: true, message: "更新时间不能为空", trigger: "blur" }], |
|||
}, |
|||
searchBusinessSelectVisible: false, |
|||
businessSelectVisible: false, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询企业api配置表列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listBusinessApiConfig(this.queryParams).then((response) => { |
|||
this.businessApiConfigList = response.data.list; |
|||
this.total = response.data.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
merchantId: null, |
|||
merchantNo: null, |
|||
merchantPubligKey: null, |
|||
systemPubligKey: null, |
|||
systemPrivateKey: null, |
|||
status: 1, |
|||
ipWhitelist: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
merchantName: "", |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetForm("queryForm"); |
|||
this.handleQuery(); |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map((item) => item.id); |
|||
this.single = selection.length !== 1; |
|||
this.multiple = !selection.length; |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.open = true; |
|||
this.title = "添加企业api配置表"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const id = row.id || this.ids; |
|||
getBusinessApiConfig(id).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改企业api配置表"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updateBusinessApiConfig(this.form).then((response) => { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
}); |
|||
} else { |
|||
addBusinessApiConfig(this.form).then((response) => { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
this.$confirm('是否确认删除企业api配置表编号为"' + ids + '"的数据项?', "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delBusinessApiConfig(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}); |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
this.$confirm("是否确认导出所有企业api配置表数据项?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportBusinessApiConfig(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.download(response.msg); |
|||
}); |
|||
}, |
|||
handleSearchBusinessSelect(row) { |
|||
this.queryParams.merchantId = row.id; // 赋值企业ID(用于精准查询) |
|||
this.queryParams.merchantName = row.name; // 赋值企业名称(用于展示) |
|||
this.queryParams.merchantNo = row.merchantNo; |
|||
this.searchBusinessSelectVisible = false; // 关闭弹窗 |
|||
}, |
|||
handleAddBusinessSelect(row) { |
|||
this.form.merchantId = row.id; // 赋值企业ID(用于精准查询) |
|||
this.form.merchantName = row.name; // 赋值企业名称(用于展示) |
|||
this.form.merchantNo = row.merchantNo; |
|||
this.businessSelectVisible = false; // 关闭弹窗 |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
@ -1,369 +0,0 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
label-width="68px" |
|||
> |
|||
<el-form-item label="企业名称" prop="merchantName"> |
|||
<el-input |
|||
v-model="queryParams.merchantName" |
|||
placeholder="请输入企业名称" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="登录IP地址" prop="ipaddr"> |
|||
<el-input |
|||
v-model="queryParams.ipaddr" |
|||
placeholder="请输入登录IP地址" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
/> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="登录状态" prop="status"> |
|||
<el-select |
|||
v-model="queryParams.status" |
|||
placeholder="请选择登录状态" |
|||
clearable |
|||
size="small" |
|||
> |
|||
<el-option label="成功" :value="0" /> |
|||
<el-option label="失败" :value="1" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" |
|||
>搜索</el-button |
|||
> |
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<el-row :gutter="10" class="mb8"> |
|||
<!-- <el-col :span="1.5"> |
|||
<el-button |
|||
type="primary" |
|||
plain |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="handleAdd" |
|||
v-hasPermi="['business:businessLogininfor:add']" |
|||
>新增</el-button |
|||
> |
|||
</el-col> --> |
|||
<!-- <el-col :span="1.5"> |
|||
<el-button |
|||
type="success" |
|||
plain |
|||
icon="el-icon-edit" |
|||
size="mini" |
|||
:disabled="single" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['business:businessLogininfor:edit']" |
|||
>修改</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="danger" |
|||
plain |
|||
icon="el-icon-delete" |
|||
size="mini" |
|||
:disabled="multiple" |
|||
@click="handleDelete" |
|||
v-hasPermi="['business:businessLogininfor:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> --> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="warning" |
|||
plain |
|||
icon="el-icon-download" |
|||
size="mini" |
|||
@click="handleExport" |
|||
v-hasPermi="['business:businessLogininfor:export']" |
|||
>导出</el-button |
|||
> |
|||
</el-col> |
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table |
|||
v-loading="loading" |
|||
:data="businessLogininforList" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column type="selection" width="55" align="center" /> |
|||
<el-table-column label="" align="center" prop="id" /> |
|||
<el-table-column label="企业Id" align="center" prop="merchantId" /> |
|||
<el-table-column label="企业名称" align="center" prop="merchantName" /> |
|||
<el-table-column label="登录IP地址" align="center" prop="ipaddr" /> |
|||
<el-table-column label="登录地点" align="center" prop="loginLocation" /> |
|||
<el-table-column label="浏览器类型" align="center" prop="browser" /> |
|||
<el-table-column label="操作系统" align="center" prop="os" /> |
|||
<el-table-column label="登录状态" align="center" prop="status" /> |
|||
<el-table-column label="提示信息" align="center" prop="msg" /> |
|||
<el-table-column label="访问时间" align="center" prop="loginTime" width="180"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.loginTime, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
v-hasPermi="['business:businessLogininfor:edit']" |
|||
>修改</el-button |
|||
> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['business:businessLogininfor:remove']" |
|||
>删除</el-button |
|||
> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total > 0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
|
|||
<!-- 添加或修改企业登录日志对话框 --> |
|||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|||
<el-form-item label="企业Id" prop="merchantId"> |
|||
<el-input v-model="form.merchantId" placeholder="请输入企业Id" /> |
|||
</el-form-item> |
|||
<el-form-item label="企业名称" prop="merchantName"> |
|||
<el-input v-model="form.merchantName" placeholder="请输入企业名称" /> |
|||
</el-form-item> |
|||
<el-form-item label="登录IP地址" prop="ipaddr"> |
|||
<el-input v-model="form.ipaddr" placeholder="请输入登录IP地址" /> |
|||
</el-form-item> |
|||
<el-form-item label="登录地点" prop="loginLocation"> |
|||
<el-input v-model="form.loginLocation" placeholder="请输入登录地点" /> |
|||
</el-form-item> |
|||
<el-form-item label="浏览器类型" prop="browser"> |
|||
<el-input v-model="form.browser" placeholder="请输入浏览器类型" /> |
|||
</el-form-item> |
|||
<el-form-item label="操作系统" prop="os"> |
|||
<el-input v-model="form.os" placeholder="请输入操作系统" /> |
|||
</el-form-item> |
|||
<el-form-item label="登录状态"> |
|||
<el-radio-group v-model="form.status"> |
|||
<el-radio label="1">请选择字典生成</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
<el-form-item label="提示信息" prop="msg"> |
|||
<el-input v-model="form.msg" placeholder="请输入提示信息" /> |
|||
</el-form-item> |
|||
<el-form-item label="访问时间" prop="loginTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
v-model="form.loginTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择访问时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listBusinessLogininfor, |
|||
getBusinessLogininfor, |
|||
delBusinessLogininfor, |
|||
addBusinessLogininfor, |
|||
updateBusinessLogininfor, |
|||
exportBusinessLogininfor, |
|||
} from "@/api/business/businessLogininfor"; |
|||
|
|||
export default { |
|||
name: "BusinessLogininfor", |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 企业登录日志表格数据 |
|||
businessLogininforList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
merchantId: null, |
|||
merchantName: null, |
|||
ipaddr: null, |
|||
loginLocation: null, |
|||
browser: null, |
|||
os: null, |
|||
status: null, |
|||
msg: null, |
|||
loginTime: null, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询企业登录日志列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listBusinessLogininfor(this.queryParams).then((response) => { |
|||
this.businessLogininforList = response.data.list; |
|||
this.total = response.data.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
merchantId: null, |
|||
merchantName: null, |
|||
ipaddr: null, |
|||
loginLocation: null, |
|||
browser: null, |
|||
os: null, |
|||
status: "0", |
|||
msg: null, |
|||
loginTime: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetForm("queryForm"); |
|||
this.handleQuery(); |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map((item) => item.id); |
|||
this.single = selection.length !== 1; |
|||
this.multiple = !selection.length; |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.open = true; |
|||
this.title = "添加企业登录日志"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const id = row.id || this.ids; |
|||
getBusinessLogininfor(id).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改企业登录日志"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updateBusinessLogininfor(this.form).then((response) => { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
}); |
|||
} else { |
|||
addBusinessLogininfor(this.form).then((response) => { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
this.$confirm('是否确认删除企业登录日志编号为"' + ids + '"的数据项?', "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delBusinessLogininfor(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}); |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
this.$confirm("是否确认导出所有企业登录日志数据项?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportBusinessLogininfor(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.download(response.msg); |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
File diff suppressed because it is too large
Loading…
Reference in new issue