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 = "实例/任务")
|
@Excel(name = "实例/任务")
|
||||||
private String task;
|
private String task;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名称
|
||||||
|
*/
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格id
|
* 规格id
|
||||||
*/
|
*/
|
||||||
@Excel(name = "规格id")
|
@Excel(name = "规格id")
|
||||||
private Integer typeId;
|
private Integer typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格名称
|
||||||
|
*/
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级规格名称
|
||||||
|
*/
|
||||||
|
private String typeParentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数量
|
* 数量
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ public class BmNumLogsController extends BaseController {
|
||||||
private BmNumLogsService bmNumLogsService;
|
private BmNumLogsService bmNumLogsService;
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list() {
|
public TableDataInfo list(BmNumLogs record) {
|
||||||
startPage();
|
startPage();
|
||||||
List<BmNumLogs> list = bmNumLogsService.selectAll();
|
List<BmNumLogs> list = bmNumLogsService.selectAll(record);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ public interface BmNumLogsMapper {
|
||||||
|
|
||||||
BmNumLogs selectByPrimaryKey(Integer id);
|
BmNumLogs selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
List<BmNumLogs> selectAll();
|
List<BmNumLogs> selectAll(BmNumLogs record);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(BmNumLogs record);
|
int updateByPrimaryKeySelective(BmNumLogs record);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ public class BmNumLogsService{
|
||||||
return bmNumLogsMapper.insert(record);
|
return bmNumLogsMapper.insert(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BmNumLogs> selectAll() {
|
public List<BmNumLogs> selectAll(BmNumLogs record) {
|
||||||
return bmNumLogsMapper.selectAll();
|
return bmNumLogsMapper.selectAll(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int insertSelective(BmNumLogs record) {
|
public int insertSelective(BmNumLogs record) {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,10 @@
|
||||||
<result column="model_title" jdbcType="VARCHAR" property="modelTitle" />
|
<result column="model_title" jdbcType="VARCHAR" property="modelTitle" />
|
||||||
<result column="method" jdbcType="VARCHAR" property="method" />
|
<result column="method" jdbcType="VARCHAR" property="method" />
|
||||||
<result column="task" jdbcType="VARCHAR" property="task" />
|
<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_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="num" jdbcType="VARCHAR" property="num" />
|
||||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||||
<result column="json_result" jdbcType="VARCHAR" property="jsonResult" />
|
<result column="json_result" jdbcType="VARCHAR" property="jsonResult" />
|
||||||
|
|
@ -25,18 +28,32 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
<!--@mbg.generated-->
|
select
|
||||||
select
|
bnl.id, bnl.model_title, bnl.`method`, bnl.task, bnl.type_id, bnl.num, bnl.`description`, bnl.json_result, bnl.`time`, bnl.creator,
|
||||||
<include refid="Base_Column_List" />
|
bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
|
||||||
from bm_num_logs
|
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}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectAll" resultMap="BaseResultMap">
|
<select id="selectAll" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
bnl.id, bnl.model_title, bnl.`method`, bnl.task, bnl.type_id, bnl.num, bnl.`description`, bnl.json_result, bnl.`time`, bnl.creator,
|
||||||
from bm_num_logs
|
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>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,14 @@ import request from '@/utils/request'
|
||||||
|
|
||||||
/* 日志列表 */
|
/* 日志列表 */
|
||||||
export const getLogsListApi = (data) => {
|
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) => {
|
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>
|
<template>
|
||||||
<!-- 库存日志 -->
|
<!-- 库存日志 -->
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
|
||||||
:model="queryParams"
|
<el-form-item label="模块名称" prop="modelTitle">
|
||||||
ref="queryForm"
|
<el-input v-model="queryParams.typeName" placeholder="请输入模块名称" clearable style="width: 200px" @keyup.enter.native="handleQuery" />
|
||||||
size="small"
|
</el-form-item>
|
||||||
:inline="true"
|
<el-form-item label="规格名称" prop="typeName">
|
||||||
>
|
<el-input v-model="queryParams.modelTitle" placeholder="请输入规格名称" clearable style="width: 200px" @keyup.enter.native="handleQuery" />
|
||||||
<!-- <el-form-item label="模块名称" prop="userName">
|
</el-form-item>
|
||||||
<el-input
|
<el-form-item>
|
||||||
placeholder="请输入模块名称"
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
clearable
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
style="width: 200px"
|
</el-form-item>
|
||||||
@keyup.enter.native="handleQuery"
|
</el-form>
|
||||||
/>
|
</el-row>
|
||||||
</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>
|
|
||||||
|
|
||||||
<el-table :data="tableList" border>
|
<el-table :data="tableList" border>
|
||||||
<el-table-column
|
<el-table-column align="center" label="序号" type="index" width="60" />
|
||||||
align="center"
|
<el-table-column align="center" prop="modelTitle" label="模块名称" show-overflow-tooltip />
|
||||||
label="序号"
|
<el-table-column show-overflow-tooltip align="center" prop="method" label="请求方式" />
|
||||||
type="index"
|
<el-table-column show-overflow-tooltip align="center" prop="requestMethod" label="请求地址" />
|
||||||
width="60"
|
<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
|
<el-table-column show-overflow-tooltip align="center" prop="typeName" label="机具规格" />
|
||||||
align="center"
|
<el-table-column show-overflow-tooltip align="center" prop="description" label="描述" />
|
||||||
prop="modelTitle"
|
<el-table-column show-overflow-tooltip align="center" prop="time" label="日期" />
|
||||||
label="模块名称"
|
<el-table-column align="center" label="状态">
|
||||||
/>
|
<template slot-scope="{ row }">
|
||||||
<el-table-column align="center" prop="method" label="请求方式" />
|
<el-tag size="mini" type="success" v-if="row.status == 0">正常</el-tag>
|
||||||
<el-table-column align="center" prop="task" label="实例" />
|
<el-tag size="mini" type="warning" v-else>异常</el-tag>
|
||||||
<el-table-column align="center" prop="id" label="机具名称" />
|
</template>
|
||||||
<el-table-column align="center" prop="typeId" label="机具规格" />
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="description" label="描述" />
|
<el-table-column align="center" prop="creator" label="创建人" />
|
||||||
<el-table-column align="center" prop="time" label="日期" />
|
<el-table-column align="center" prop="remark" label="备注" />
|
||||||
<el-table-column align="center" label="状态">
|
<el-table-column align="center" label="操作">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-tag size="mini" type="success" v-if="row.status == 0"
|
<el-button size="mini" type="text" @click="previewLogsDetails(row)">详情</el-button>
|
||||||
>正常</el-tag
|
</template>
|
||||||
>
|
</el-table-column>
|
||||||
<el-tag size="mini" type="warning" v-else>异常</el-tag>
|
</el-table>
|
||||||
</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>
|
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 详情弹框 -->
|
<!-- 详情弹框 -->
|
||||||
<el-dialog
|
<el-dialog title="日志详情" :visible.sync="logsDetailsDialogVisible" width="60%">
|
||||||
title="日志详情"
|
<el-descriptions
|
||||||
:visible.sync="logsDetailsDialogVisible"
|
class="margin-top"
|
||||||
width="60%"
|
:column="3"
|
||||||
>
|
size="medium"
|
||||||
<el-descriptions
|
border
|
||||||
class="margin-top"
|
:labelStyle="commonStyle"
|
||||||
:column="3"
|
:contentStyle="commonStyle"
|
||||||
size="medium"
|
>
|
||||||
border
|
<el-descriptions-item v-for="(item, v) in detailsLabelList" :key="v">
|
||||||
:labelStyle="commonStyle"
|
<template slot="label">{{ item.label }}</template>
|
||||||
:contentStyle="commonStyle"
|
{{ logsDetailsInfo[item.content] || '' }}
|
||||||
>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item
|
</el-descriptions>
|
||||||
v-for="(item, v) in detailsLabelList"
|
</el-dialog>
|
||||||
:key="v"
|
</div>
|
||||||
>
|
|
||||||
<template slot="label"> {{ item.label }} </template>
|
|
||||||
{{ logsDetailsInfoDemo[item.content] || '' }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getLogsListApi, getLogsDetailsApi } from '@/api/inventoryLogs'
|
import { getLogsListApi, getLogsDetailsApi } from '@/api/inventoryLogs'
|
||||||
export default {
|
export default {
|
||||||
name: 'myInventoryLogs',
|
name: 'myInventoryLogs',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 5,
|
pageNum: 1,
|
||||||
pageSize: 1,
|
pageSize: 10,
|
||||||
},
|
modelTitle:'', // 规格名称
|
||||||
tableList: [{ id: 1 }, { id: 2 }],
|
typeName:'' // 模块名称
|
||||||
total: 5,
|
},
|
||||||
logsDetailsInfo: null /* 日志详情 */,
|
tableList: [],
|
||||||
logsDetailsDialogVisible: false,
|
total: 5,
|
||||||
commonStyle: {
|
logsDetailsInfo: null /* 日志详情 */,
|
||||||
'text-align': 'center',
|
logsDetailsDialogVisible: false,
|
||||||
},
|
commonStyle: {
|
||||||
/* 日志详情label以及内容 */
|
'text-align': 'center',
|
||||||
detailsLabelList: [
|
},
|
||||||
{ label: '占位', content: 'vdDemo' },
|
/* 日志详情label以及内容 */
|
||||||
{ label: '占位', content: 'vdDemo' },
|
detailsLabelList: [
|
||||||
{ label: '占位', content: 'vdDemo' },
|
{ label: '创建人', content: 'creator' },
|
||||||
{ label: '占位', content: 'vdDemo' },
|
{ label: '请求方式', content: 'method' },
|
||||||
{ label: '占位', content: 'vdDemo' },
|
{ label: '模块名称', content: 'modelTitle' },
|
||||||
{ label: '占位', content: 'vdDemo' },
|
{ label: '请求方式', content: 'requestMethod' },
|
||||||
{ label: '占位', content: 'vdDemo' },
|
{ label: '机具规格', content: 'typeId' },
|
||||||
{ label: '占位', content: 'vdDemo' },
|
{ label: '机具名称', content: 'id' },
|
||||||
{ label: '占位', content: 'vdDemo' },
|
{ label: '日期', content: 'time' },
|
||||||
{ label: '占位', content: 'vdDemo' },
|
{ label: '实例', content: 'task' },
|
||||||
{ label: '占位', content: 'vdDemo' },
|
],
|
||||||
{ label: '占位', content: 'vdDemo' },
|
logsDetailsInfo: {},
|
||||||
{ 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()
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-table :empty::before {
|
.el-table :empty::before {
|
||||||
content: '-';
|
content: '-';
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
.margin-top {
|
.margin-top {
|
||||||
margin-top: -15px;
|
margin-top: -15px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue