rev:lucene
This commit is contained in:
@@ -1,122 +1,8 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<!-- <el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的设备号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/> -->
|
||||
<!-- <el-select
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的设备号"
|
||||
class="filter-item"
|
||||
style="width: 190px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option v-for="item in device_codes" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select> -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item :label="$t('monitor.lucence.device_code')">
|
||||
<el-select
|
||||
ref="test"
|
||||
v-model="query.device_code"
|
||||
filterable
|
||||
clearable
|
||||
reserve-keyword
|
||||
:placeholder="$t('monitor.lucence.device_code')"
|
||||
style="width: 200px;"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deviceList"
|
||||
:key="item.device_code"
|
||||
:label="item.device_code"
|
||||
:value="item.device_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.method')">
|
||||
<el-input
|
||||
v-model="query.method"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.method_name')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.status_code')">
|
||||
<el-input
|
||||
v-model="query.status_code"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.search_status_code')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.requestparam')">
|
||||
<el-input
|
||||
v-model="query.requestparam"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.search_request_param')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.responseparam')">
|
||||
<el-input
|
||||
v-model="query.responseparam"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.search_response_param')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.content')">
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.search_content')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.logTime')">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="datetimerange"
|
||||
:picker-options="pickerOptions"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
:range-separator="$t('monitor.lucence.until')"
|
||||
:start-placeholder="$t('monitor.lucence.start_time')"
|
||||
:end-placeholder="$t('monitor.lucence.end_time')"
|
||||
align="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<!--
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
-->
|
||||
</div>
|
||||
<!-- <crudOperation />-->
|
||||
<Search />
|
||||
<crudOperation />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
@@ -128,16 +14,17 @@
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
<!-- <el-table-column v-if="false" prop="id" label="id"/>-->
|
||||
<el-table-column prop="operate" :min-width="flexWidth('operate',crud.data,$t('monitor.lucence.operate'))" :label="$t('monitor.lucence.operate')" />
|
||||
<el-table-column prop="device_code" :label="$t('monitor.lucence.device_code')" :min-width="flexWidth('device_code',crud.data,$t('monitor.lucence.device_code'))" show-overflow-tooltip />
|
||||
<el-table-column prop="task_code" :label="$t('monitor.lucence.task_code')" :min-width="flexWidth('task_code',crud.data,$t('monitor.lucence.task_code'))" />
|
||||
<el-table-column prop="instruct_code" :label="$t('monitor.lucence.instruct_code')" :min-width="flexWidth('instruct_code',crud.data,$t('monitor.lucence.instruct_code'))" />
|
||||
<el-table-column prop="method" :label="$t('monitor.lucence.method')" :min-width="flexWidth('method',crud.data,$t('monitor.lucence.method'))" />
|
||||
<el-table-column prop="status_code" :label="$t('monitor.lucence.status_code')" :min-width="flexWidth('status_code',crud.data,$t('monitor.lucence.status_code'))" />
|
||||
<el-table-column prop="requestparam" :label="$t('monitor.lucence.requestparam')" :min-width="flexWidth('requestparam',crud.data,$t('monitor.lucence.requestparam'))" />
|
||||
<el-table-column prop="responseparam" :label="$t('monitor.lucence.responseparam')" :min-width="flexWidth('responseparam',crud.data,$t('monitor.lucence.responseparam'))" />
|
||||
<el-table-column prop="logTime" :label="$t('monitor.lucence.logTime')" :min-width="flexWidth('logTime',crud.data,$t('monitor.lucence.logTime'))" />
|
||||
<el-table-column prop="content" :min-width="flexWidth('content',crud.data,$t('monitor.lucence.content'))" :label="$t('monitor.lucence.content')" />
|
||||
<el-table-column prop="operate" width="50" label="操作" />
|
||||
<el-table-column prop="device_code" label="设备号" min-width="130" show-overflow-tooltip />
|
||||
<!-- <el-table-column prop="trace_id" label="链路追踪" /> -->
|
||||
<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="请求参数" />
|
||||
<el-table-column prop="responseparam" label="返回参数" />
|
||||
<el-table-column prop="logTime" width="170" label="记录时间" />
|
||||
<el-table-column prop="content" width="500" label="内容详情" />
|
||||
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -146,15 +33,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Search from './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'
|
||||
import deviceCrud from '@/api/acs/device/device'
|
||||
|
||||
export default {
|
||||
name: 'LuceneLog',
|
||||
components: { pagination, crudOperation },
|
||||
components: { Search, pagination, crudOperation },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds: function() {
|
||||
return CRUD({
|
||||
@@ -189,9 +76,6 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
deviceCrud.selectDeviceList().then(data => {
|
||||
this.deviceList = data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
@@ -199,9 +83,9 @@ export default {
|
||||
return true
|
||||
},
|
||||
confirmDelAll() {
|
||||
this.$confirm(this.$t('monitor.table.clear_log'), this.$t('monitor.table.prompt'), {
|
||||
confirmButtonText: this.$t('monitor.table.confirm'),
|
||||
cancelButtonText: this.$t('monitor.table.cancel'),
|
||||
this.$confirm(`确认清空所有操作日志吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.crud.delAllLoading = true
|
||||
|
||||
@@ -1,130 +1,74 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<!-- <el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的设备号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/> -->
|
||||
<!-- <el-select
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的设备号"
|
||||
class="filter-item"
|
||||
style="width: 190px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option v-for="item in device_codes" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select> -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item :label="$t('monitor.lucence.device_code')">
|
||||
<el-select
|
||||
ref="test"
|
||||
v-model="query.device_code"
|
||||
filterable
|
||||
clearable
|
||||
reserve-keyword
|
||||
:placeholder="$t('monitor.lucence.device_code')"
|
||||
style="width: 200px;"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deviceList"
|
||||
:key="item.device_code"
|
||||
:label="item.device_code"
|
||||
:value="item.device_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.method')">
|
||||
<el-input
|
||||
v-model="query.method"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.method_name')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.status_code')">
|
||||
<el-input
|
||||
v-model="query.status_code"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.search_status_code')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.requestparam')">
|
||||
<el-input
|
||||
v-model="query.requestparam"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.search_request_param')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.responseparam')">
|
||||
<el-input
|
||||
v-model="query.responseparam"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.search_response_param')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.content')">
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
size="small"
|
||||
:placeholder="$t('monitor.lucence.search_content')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('monitor.lucence.logTime')">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="datetimerange"
|
||||
:picker-options="pickerOptions"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
:range-separator="$t('monitor.lucence.until')"
|
||||
:start-placeholder="$t('monitor.lucence.start_time')"
|
||||
:end-placeholder="$t('monitor.lucence.end_time')"
|
||||
align="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<!--
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的设备号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.method"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的方法名"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.status_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的状态码"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.requestparam"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的请求参数"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.responseparam"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的返回参数"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入你要搜索的内容详情"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<!--
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
-->
|
||||
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="datetimerange"
|
||||
:picker-options="pickerOptions"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
align="right"
|
||||
/>
|
||||
<rrOperation />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { header } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import deviceCrud from '@/api/acs/device/device'
|
||||
|
||||
export default {
|
||||
components: { rrOperation },
|
||||
@@ -134,7 +78,7 @@ export default {
|
||||
return {
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: this.$t('monitor.lucence.the_past_week'),
|
||||
text: '最近一周',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
@@ -142,7 +86,7 @@ export default {
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: this.$t('monitor.lucence.the_past_month'),
|
||||
text: '最近一个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
@@ -150,7 +94,7 @@ export default {
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: this.$t('monitor.lucence.the_past_three_months'),
|
||||
text: '最近三个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
@@ -160,15 +104,10 @@ export default {
|
||||
}]
|
||||
},
|
||||
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
|
||||
value2: '',
|
||||
deviceList: [],
|
||||
device_code: ''
|
||||
value2: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
deviceCrud.selectDeviceList().then(data => {
|
||||
this.deviceList = data
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
v-model="query.createTime"
|
||||
type="datetimerange"
|
||||
:picker-options="pickerOptions"
|
||||
:range-separator="$t('monitor.lucence.until')"
|
||||
:start-placeholder="$t('monitor.lucence.start_time')"
|
||||
:end-placeholder="$t('monitor.lucence.end_time')"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
align="right"
|
||||
/>
|
||||
<rrOperation />
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
return {
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: this.$t('monitor.lucence.the_past_week'),
|
||||
text: '最近一周',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: this.$t('monitor.lucence.the_past_month'),
|
||||
text: '最近一个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: this.$t('monitor.lucence.the_past_three_months'),
|
||||
text: '最近三个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
|
||||
Reference in New Issue
Block a user