Merge branch 'dev' of http://192.168.0.56:3000/bonus/devicesmgt into dev
This commit is contained in:
commit
e3820da708
|
|
@ -44,12 +44,27 @@ public class BmNumLogs extends BaseEntity {
|
|||
@Excel(name = "实例/任务")
|
||||
private String task;
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 规格id
|
||||
*/
|
||||
@Excel(name = "规格id")
|
||||
private Integer typeId;
|
||||
|
||||
/**
|
||||
* 规格名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 父级规格名称
|
||||
*/
|
||||
private String typeParentName;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ public class BmNumLogsController extends BaseController {
|
|||
private BmNumLogsService bmNumLogsService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list() {
|
||||
public TableDataInfo list(BmNumLogs record) {
|
||||
startPage();
|
||||
List<BmNumLogs> list = bmNumLogsService.selectAll();
|
||||
List<BmNumLogs> list = bmNumLogsService.selectAll(record);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public interface BmNumLogsMapper {
|
|||
|
||||
BmNumLogs selectByPrimaryKey(Integer id);
|
||||
|
||||
List<BmNumLogs> selectAll();
|
||||
List<BmNumLogs> selectAll(BmNumLogs record);
|
||||
|
||||
int updateByPrimaryKeySelective(BmNumLogs record);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ public class BmNumLogsService{
|
|||
return bmNumLogsMapper.insert(record);
|
||||
}
|
||||
|
||||
public List<BmNumLogs> selectAll() {
|
||||
return bmNumLogsMapper.selectAll();
|
||||
public List<BmNumLogs> selectAll(BmNumLogs record) {
|
||||
return bmNumLogsMapper.selectAll(record);
|
||||
}
|
||||
|
||||
public int insertSelective(BmNumLogs record) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@
|
|||
<result column="model_title" jdbcType="VARCHAR" property="modelTitle" />
|
||||
<result column="method" jdbcType="VARCHAR" property="method" />
|
||||
<result column="task" jdbcType="VARCHAR" property="task" />
|
||||
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
|
||||
<result column="type_id" jdbcType="INTEGER" property="typeId" />
|
||||
<result column="type_name" jdbcType="VARCHAR" property="typeName" />
|
||||
<result column="type_parent_name" jdbcType="VARCHAR" property="typeParentName" />
|
||||
<result column="num" jdbcType="VARCHAR" property="num" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="json_result" jdbcType="VARCHAR" property="jsonResult" />
|
||||
|
|
@ -25,18 +28,32 @@
|
|||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bm_num_logs
|
||||
select
|
||||
bnl.id, bnl.model_title, bnl.`method`, bnl.task, bnl.type_id, bnl.num, bnl.`description`, bnl.json_result, bnl.`time`, bnl.creator,
|
||||
bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
|
||||
from bm_num_logs bnl
|
||||
left join ma_type mt on bnl.type_id = mt.type_id
|
||||
inner join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
left join tm_task tt on bnl.task = tt.task_id
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectAll" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bm_num_logs
|
||||
bnl.id, bnl.model_title, bnl.`method`, bnl.task, bnl.type_id, bnl.num, bnl.`description`, bnl.json_result, bnl.`time`, bnl.creator,
|
||||
bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
|
||||
from bm_num_logs bnl
|
||||
left join ma_type mt on bnl.type_id = mt.type_id
|
||||
inner join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
left join tm_task tt on bnl.task = tt.task_id
|
||||
<where>
|
||||
<if test="modelTitle != null and modelTitle != ''">
|
||||
and bnl.model_title like concat('%', #{modelTitle}, '%')
|
||||
</if>
|
||||
<if test="typeName != null and typeName != ''">
|
||||
and mt1.type_name like concat('%', #{typeName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
|
|
|
|||
|
|
@ -3,10 +3,14 @@ import request from '@/utils/request'
|
|||
|
||||
/* 日志列表 */
|
||||
export const getLogsListApi = (data) => {
|
||||
return request.get('/bm_num_logs/list', data)
|
||||
return request.get('/system/bm_num_logs/list', data)
|
||||
}
|
||||
|
||||
/* 日志详情 */
|
||||
export const getLogsDetailsApi = (id) => {
|
||||
return request.get(`/bm_num_logs/selectByPrimaryKey/${id}`)
|
||||
return request.get(`/system/bm_num_logs/selectByPrimaryKey`, {
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -1,218 +1,144 @@
|
|||
<template>
|
||||
<!-- 库存日志 -->
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
>
|
||||
<!-- <el-form-item label="模块名称" prop="userName">
|
||||
<el-input
|
||||
placeholder="请输入模块名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="请求方式" prop="phonenumber">
|
||||
<el-input
|
||||
placeholder="请输入请求方式"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="status">
|
||||
<el-select
|
||||
placeholder="创建人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 200px"
|
||||
>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="请求时间">
|
||||
<el-date-picker
|
||||
style="width: 200px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</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>
|
||||
<!-- 库存日志 -->
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
|
||||
<el-form-item label="模块名称" prop="modelTitle">
|
||||
<el-input v-model="queryParams.typeName" placeholder="请输入模块名称" clearable style="width: 200px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格名称" prop="typeName">
|
||||
<el-input v-model="queryParams.modelTitle" placeholder="请输入规格名称" clearable style="width: 200px" @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>
|
||||
|
||||
<el-table :data="tableList" border>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="modelTitle"
|
||||
label="模块名称"
|
||||
/>
|
||||
<el-table-column align="center" prop="method" label="请求方式" />
|
||||
<el-table-column align="center" prop="task" label="实例" />
|
||||
<el-table-column align="center" prop="id" label="机具名称" />
|
||||
<el-table-column align="center" prop="typeId" label="机具规格" />
|
||||
<el-table-column align="center" prop="description" label="描述" />
|
||||
<el-table-column align="center" prop="time" label="日期" />
|
||||
<el-table-column align="center" label="状态">
|
||||
<template slot-scope="{ row }">
|
||||
<el-tag size="mini" type="success" v-if="row.status == 0"
|
||||
>正常</el-tag
|
||||
>
|
||||
<el-tag size="mini" type="warning" v-else>异常</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="creator" label="创建人" />
|
||||
<el-table-column align="center" prop="remark" label="备注" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="previewLogsDetails(row.id)"
|
||||
>详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="tableList" border>
|
||||
<el-table-column align="center" label="序号" type="index" width="60" />
|
||||
<el-table-column align="center" prop="modelTitle" label="模块名称" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="method" label="请求方式" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="requestMethod" label="请求地址" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="task" label="实例" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="typeParentName" label="机具名称" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="typeName" label="机具规格" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="description" label="描述" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="time" label="日期" />
|
||||
<el-table-column align="center" label="状态">
|
||||
<template slot-scope="{ row }">
|
||||
<el-tag size="mini" type="success" v-if="row.status == 0">正常</el-tag>
|
||||
<el-tag size="mini" type="warning" v-else>异常</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="creator" label="创建人" />
|
||||
<el-table-column align="center" prop="remark" label="备注" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button size="mini" type="text" @click="previewLogsDetails(row)">详情</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"
|
||||
/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 详情弹框 -->
|
||||
<el-dialog
|
||||
title="日志详情"
|
||||
:visible.sync="logsDetailsDialogVisible"
|
||||
width="60%"
|
||||
>
|
||||
<el-descriptions
|
||||
class="margin-top"
|
||||
:column="3"
|
||||
size="medium"
|
||||
border
|
||||
:labelStyle="commonStyle"
|
||||
:contentStyle="commonStyle"
|
||||
>
|
||||
<el-descriptions-item
|
||||
v-for="(item, v) in detailsLabelList"
|
||||
:key="v"
|
||||
>
|
||||
<template slot="label"> {{ item.label }} </template>
|
||||
{{ logsDetailsInfoDemo[item.content] || '' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<!-- 详情弹框 -->
|
||||
<el-dialog title="日志详情" :visible.sync="logsDetailsDialogVisible" width="60%">
|
||||
<el-descriptions
|
||||
class="margin-top"
|
||||
:column="3"
|
||||
size="medium"
|
||||
border
|
||||
:labelStyle="commonStyle"
|
||||
:contentStyle="commonStyle"
|
||||
>
|
||||
<el-descriptions-item v-for="(item, v) in detailsLabelList" :key="v">
|
||||
<template slot="label">{{ item.label }}</template>
|
||||
{{ logsDetailsInfo[item.content] || '' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLogsListApi, getLogsDetailsApi } from '@/api/inventoryLogs'
|
||||
export default {
|
||||
name: 'myInventoryLogs',
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
pageNum: 5,
|
||||
pageSize: 1,
|
||||
},
|
||||
tableList: [{ id: 1 }, { id: 2 }],
|
||||
total: 5,
|
||||
logsDetailsInfo: null /* 日志详情 */,
|
||||
logsDetailsDialogVisible: false,
|
||||
commonStyle: {
|
||||
'text-align': 'center',
|
||||
},
|
||||
/* 日志详情label以及内容 */
|
||||
detailsLabelList: [
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
],
|
||||
logsDetailsInfoDemo: {
|
||||
vdDemo: '123',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 查询列表 */
|
||||
async getList() {
|
||||
const { data: res } = await getLogsListApi()
|
||||
this.tableList = res.rows
|
||||
this.total = res.total
|
||||
console.log(res, '=======日志列表')
|
||||
},
|
||||
/* 搜索按钮 */
|
||||
handleQuery() {
|
||||
this.getList()
|
||||
},
|
||||
/* 重置按钮 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.getList()
|
||||
},
|
||||
/* 查看详情 */
|
||||
async previewLogsDetails(id) {
|
||||
// const { data: res } = await getLogsDetailsApi(id)
|
||||
// console.log(res, '=======日志详情')
|
||||
|
||||
this.logsDetailsDialogVisible = true
|
||||
// this.logsDetailsInfo = res
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
import { getLogsListApi, getLogsDetailsApi } from '@/api/inventoryLogs'
|
||||
export default {
|
||||
name: 'myInventoryLogs',
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
modelTitle:'', // 规格名称
|
||||
typeName:'' // 模块名称
|
||||
},
|
||||
tableList: [],
|
||||
total: 5,
|
||||
logsDetailsInfo: null /* 日志详情 */,
|
||||
logsDetailsDialogVisible: false,
|
||||
commonStyle: {
|
||||
'text-align': 'center',
|
||||
},
|
||||
/* 日志详情label以及内容 */
|
||||
detailsLabelList: [
|
||||
{ label: '创建人', content: 'creator' },
|
||||
{ label: '请求方式', content: 'method' },
|
||||
{ label: '模块名称', content: 'modelTitle' },
|
||||
{ label: '请求方式', content: 'requestMethod' },
|
||||
{ label: '机具规格', content: 'typeId' },
|
||||
{ label: '机具名称', content: 'id' },
|
||||
{ label: '日期', content: 'time' },
|
||||
{ label: '实例', content: 'task' },
|
||||
],
|
||||
logsDetailsInfo: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 查询列表 */
|
||||
async getList() {
|
||||
const res = await getLogsListApi()
|
||||
this.tableList = res.rows
|
||||
this.total = res.total
|
||||
},
|
||||
/* 搜索按钮 */
|
||||
handleQuery() {
|
||||
this.getList()
|
||||
},
|
||||
/* 重置按钮 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.pageNum = 1
|
||||
this.queryParams.pageSize = 10
|
||||
this.getList()
|
||||
},
|
||||
/* 查看详情 */
|
||||
async previewLogsDetails(row) {
|
||||
console.log(row, '列表id')
|
||||
const res = await getLogsDetailsApi(row.id)
|
||||
this.logsDetailsInfo = res
|
||||
this.logsDetailsDialogVisible = true
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-table :empty::before {
|
||||
content: '-';
|
||||
color: gray;
|
||||
}
|
||||
.margin-top {
|
||||
margin-top: -15px;
|
||||
}
|
||||
.el-table :empty::before {
|
||||
content: '-';
|
||||
color: gray;
|
||||
}
|
||||
.margin-top {
|
||||
margin-top: -15px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue