Commit b13d1199 authored by 赵啸非's avatar 赵啸非

日志展示修改

parent 0de09262
<template>
<div class="page">
<LayoutTable :data="tableData" notAdd notDel :config="tableConfig">
</LayoutTable>
<div class="page">
<LayoutTable :data="tableData" notAdd notDel :config="tableConfig">
</LayoutTable>
<dialog-show ref="dialogform" @ok="getData" />
</div>
<dialog-show ref="dialogform" @ok="getData" />
</div>
</template>
<script>
/** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow";
import table from "@/assets/mixins/table";
export default {
name: "DeviceLog",
components: {dialogShow },
mixins: [table],
created() {
},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.dialogform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.dialogform.edit(row);
},
/** 重写查看方法 */
// toView(row) {
// this.$refs.dialogform.view(row);
// },
},
data() {
return {
config: {
search: [
{
name: 'deviceNum',
type: 'text',
label: '设备编号',
/** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow";
import table from "@/assets/mixins/table";
export default {
name: "DeviceLog",
components: { dialogShow },
mixins: [table],
created() {},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.dialogform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.dialogform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.dialogform.view(row);
},
},
data() {
return {
config: {
search: [
{
name: "deviceCode",
type: "text",
label: "设备编号",
fuzzy:true
},
{
name: "logType",
type: "select",
label: "日志类型",
},
],
columns: [
{ label: "traceID", prop: "traceID" },
],
columns: [
{label: "traceID", prop: "traceID"},
{label: "设备编号", prop: "deviceCode"},
{ label: "设备编号", prop: "deviceCode" },
{label: "设备名称", prop: "deviceName"},
{ label: "设备名称", prop: "deviceName" },
{label: "业务标识", prop: "messageHead"},
{ label: "业务标识", prop: "messageHead" },
{label: "日志类型", prop: "logType",formatter: this.formatter},
{ label: "日志类型", prop: "logType", formatter: this.formatter },
{label: "内容", prop: "content"},
{label: "创建时间", prop: "createTime",formatter: this.formatterDate},
{
label: "操作",
width: 240,
formatter: row => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
]
}
};
}
{ label: "内容", prop: "content" },
{
label: "创建时间",
prop: "createTime",
formatter: this.formatterDate,
},
{
label: "操作",
width: 240,
formatter: (row) => {
return (
<table-buttons
noAdd
noEdit
noDel
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
);
},
},
],
},
};
},
};
</script>
\ No newline at end of file
......@@ -6,6 +6,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.LogTypeEnum;
import com.mortals.xhx.module.device.model.DeviceLogEntity;
import com.mortals.xhx.module.device.service.DeviceLogService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -26,8 +27,6 @@ import java.util.Map;
@RequestMapping("device/log")
public class DeviceLogController extends BaseCRUDJsonBodyMappingController<DeviceLogService, DeviceLogEntity, Long> {
@Autowired
private ParamService paramService;
public DeviceLogController() {
super.setModuleDesc("设备日志");
......@@ -35,7 +34,7 @@ public class DeviceLogController extends BaseCRUDJsonBodyMappingController<Devic
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "logType", paramService.getParamBySecondOrganize("DeviceLog", "logType"));
this.addDict(model, "logType", LogTypeEnum.getEnumMap());
super.init(model, context);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment