34 changed files with 606 additions and 162 deletions
@ -0,0 +1,23 @@ |
|||
package org.nl.config.lucene; |
|||
|
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
public class LuceneProperties { |
|||
|
|||
private List<Property> properties; |
|||
|
|||
public LuceneProperties() { |
|||
this.properties = new ArrayList<Property>(); |
|||
} |
|||
|
|||
public List<Property> getProperties() { |
|||
return properties; |
|||
} |
|||
|
|||
public void addProperty(Property property) { |
|||
properties.add(property); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package org.nl.config.lucene; |
|||
|
|||
/* |
|||
* @author ZZQ |
|||
* @Date 2023/12/26 15:30 |
|||
*/ |
|||
public class Property { |
|||
private String name; |
|||
private String value; |
|||
private boolean allowEmpty; |
|||
|
|||
public Property() { |
|||
} |
|||
|
|||
public Property(String name, String value, boolean allowEmpty) { |
|||
this.name = name; |
|||
this.value = value; |
|||
this.allowEmpty = allowEmpty; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public void setValue(String value) { |
|||
this.value = value; |
|||
} |
|||
|
|||
public boolean isAllowEmpty() { |
|||
return allowEmpty; |
|||
} |
|||
|
|||
public void setAllowEmpty(boolean allowEmpty) { |
|||
this.allowEmpty = allowEmpty; |
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export function add(data) { |
|||
return request({ |
|||
url: 'api/Address', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export function queryAddressCodeList() { |
|||
return request({ |
|||
url: 'api/Address/queryAddressCodeList', |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
export function del(ids) { |
|||
return request({ |
|||
url: 'api/Address/', |
|||
method: 'delete', |
|||
data: ids |
|||
}) |
|||
} |
|||
|
|||
export function edit(data) { |
|||
return request({ |
|||
url: 'api/Address', |
|||
method: 'put', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export default { add, edit, del, queryAddressCodeList } |
@ -0,0 +1,129 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="head-container"> |
|||
<Search /> |
|||
<crudOperation /> |
|||
</div> |
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading" |
|||
:data="crud.data" |
|||
style="width: 100%;" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
> |
|||
<!-- <el-table-column type="selection" width="55"/>--> |
|||
<!-- <el-table-column v-if="false" prop="id" label="id"/>--> |
|||
<el-table-column prop="operate" width="50" label="操作" /> |
|||
<!-- <el-table-column prop="device_code" label="设备号" width="100" /> --> |
|||
<el-table-column prop="task_code" label="任务编号" /> |
|||
<!-- <el-table-column prop="instruct_code" label="指令编号" /> --> |
|||
<el-table-column prop="method" label="方法" /> |
|||
<el-table-column prop="status_code" label="状态码" /> |
|||
<!-- <el-table-column prop="requestparam" label="请求参数" :show-overflow-tooltip="true" /> --> |
|||
<el-table-column prop="requestparam" label="请求参数" :min-width="150"> |
|||
<template slot-scope="scope"> |
|||
<div class="truncate" :title="scope.row.requestparam" placement="top"> |
|||
{{ scope.row.requestparam }} |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="responseparam" label="返回参数" :min-width="150"> |
|||
<template slot-scope="scope"> |
|||
<div class="truncate" :title="scope.row.responseparam" placement="top"> |
|||
{{ scope.row.responseparam }} |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<!-- <el-table-column prop="responseparam" label="返回参数" :show-overflow-tooltip="true" /> --> |
|||
<el-table-column prop="logTime" width="170" label="记录时间" :min-width="flexWidth('logTime',crud.data,'记录时间')" /> |
|||
<!-- <el-table-column prop="content" width="500" label="内容详情" :min-width="flexWidth('content',crud.data,'内容详情')" /> --> |
|||
|
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Search from '../lucene/search' |
|||
import CRUD, { crud, header, presenter } from '@crud/crud' |
|||
import crudOperation from '@crud/CRUD.operation' |
|||
import pagination from '@crud/Pagination' |
|||
import { delAll } from '@/api/acs/lucene/log' |
|||
|
|||
export default { |
|||
name: 'LogQuery', |
|||
components: { Search, pagination, crudOperation }, |
|||
mixins: [presenter(), header(), crud()], |
|||
cruds: function() { |
|||
return CRUD({ |
|||
title: '系统参数', url: 'api/lucene/getApiAll', idField: 'id', sort: 'id,desc', |
|||
queryOnPresenterCreated: true, |
|||
optShow: { |
|||
add: false, |
|||
edit: false, |
|||
del: false, |
|||
download: false |
|||
}, |
|||
page: { |
|||
size: 40, |
|||
total: 0, |
|||
page: 0 |
|||
}, |
|||
query: { |
|||
createTime: [new Date(new Date().setTime(new Date().getTime() - 3600 * 1000)), new Date(new Date().setTime(new Date().getTime() + 3600 * 1000))] |
|||
} |
|||
}) |
|||
}, |
|||
data() { |
|||
return { |
|||
query: { blurry: '123' }, |
|||
permission: { |
|||
add: ['admin', 'param:add'], |
|||
edit: ['admin', 'param:edit'], |
|||
del: ['admin', 'param:del'] |
|||
}, |
|||
|
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
methods: { |
|||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
|||
[CRUD.HOOK.beforeRefresh]() { |
|||
return true |
|||
}, |
|||
confirmDelAll() { |
|||
this.$confirm(`确认清空所有操作日志吗?`, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.crud.delAllLoading = true |
|||
delAll('device_execute').then(res => { |
|||
this.crud.delAllLoading = false |
|||
this.crud.dleChangePage(1) |
|||
this.crud.delSuccessNotify() |
|||
this.crud.toQuery() |
|||
}).catch(err => { |
|||
this.crud.delAllLoading = false |
|||
console.log(err.response.data.message) |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.truncate { |
|||
white-space: nowrap; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
max-width: 100%; /* 或者设置为具体的宽度 */ |
|||
cursor: pointer; /* 可选:鼠标悬停时变为手形 */ |
|||
} |
|||
</style> |
@ -0,0 +1,34 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<included> |
|||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/> |
|||
<property name="LOG_HOME" value="${logPath}"/> |
|||
<!--<define name="DEVICECODE" class="org.nl.common.logging.DeviceCodeDir"/>--> |
|||
<!-- 按照每天生成日志文件 --> |
|||
<appender name="FILE_13" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
|||
<!--日志文件输出的文件名--> |
|||
<FileNamePattern>${LOG_HOME}/SortingToWms/%d{yyyy-MM-dd}.%i.log</FileNamePattern> |
|||
<!--日志文件保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
<!--单个日志最大容量 至少10MB才能看得出来--> |
|||
<maxFileSize>200MB</maxFileSize> |
|||
<!--所有日志最多占多大容量--> |
|||
<totalSizeCap>2GB</totalSizeCap> |
|||
</rollingPolicy> |
|||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
|||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>${log.charset}</charset> |
|||
</encoder> |
|||
|
|||
</appender> |
|||
|
|||
<!-- <logger name="org.nl.start.Init" level="info" additivity="false"> |
|||
<appender-ref ref="FILE3"/> |
|||
</logger>--> |
|||
|
|||
<!-- 打印sql --> |
|||
<logger name="org.nl.wms.ext.sorting.service.impl.SortingServiceImpl" level="info" additivity="false"> |
|||
<appender-ref ref="FILE_13"/> |
|||
</logger> |
|||
</included> |
Loading…
Reference in new issue