add lucene \ udw
This commit is contained in:
27
acs/nladmin-ui/src/api/acs/history/acsDeviceErrorLog.js
Normal file
27
acs/nladmin-ui/src/api/acs/history/acsDeviceErrorLog.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/deviceErrorLog',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/deviceErrorLog/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/deviceErrorLog',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
28
acs/nladmin-ui/src/api/acs/history/udwData.js
Normal file
28
acs/nladmin-ui/src/api/acs/history/udwData.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/task',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/task/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/task',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { edit, del }
|
||||
|
||||
145
acs/nladmin-ui/src/views/acs/history/deviceErrorInfo/index.vue
Normal file
145
acs/nladmin-ui/src/views/acs/history/deviceErrorInfo/index.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">设备编码</label>
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
placeholder="设备编码"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.error_code"
|
||||
clearable
|
||||
placeholder="报警编码"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.error_info"
|
||||
clearable
|
||||
placeholder="报警信息"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<date-range-picker
|
||||
v-model="query.error_time"
|
||||
start-placeholder="error_timeStart"
|
||||
end-placeholder="error_timeStart"
|
||||
class="date-item"
|
||||
/>
|
||||
<rrOperation :crud="crud" />
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="small"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="device_code" label="设备编码" />
|
||||
<el-table-column prop="error_code" label="报警编码" />
|
||||
<el-table-column prop="error_info" label="报警信息" />
|
||||
<el-table-column prop="error_time" label="报警时间" />
|
||||
<el-table-column
|
||||
v-permission="['admin','acsDeviceErrorLog:edit','acsDeviceErrorLog:del']"
|
||||
label="操作"
|
||||
width="150px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudAcsDeviceErrorLog from '@/api/acs/history/acsDeviceErrorLog'
|
||||
|
||||
const defaultForm = { error_log_uuid: null, device_code: null, error_code: null, error_info: null, error_time: null }
|
||||
export default {
|
||||
name: 'DeviceErrorLog',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '设备报警记录',
|
||||
url: 'api/deviceErrorLog',
|
||||
idField: 'error_log_uuid',
|
||||
sort: 'error_log_uuid,desc',
|
||||
crudMethod: { ...crudAcsDeviceErrorLog },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
add: ['admin', 'deviceErrorLog:add'],
|
||||
edit: ['admin', 'deviceErrorLog:edit'],
|
||||
del: ['admin', 'adeviceErrorLog:del']
|
||||
},
|
||||
rules: {},
|
||||
queryTypeOptions: [
|
||||
{ key: 'device_code', display_name: '设备编码' },
|
||||
{ key: 'error_code', display_name: '报警编码' },
|
||||
{ key: 'error_info', display_name: '报警信息' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
181
acs/nladmin-ui/src/views/acs/history/udwData/index.vue
Normal file
181
acs/nladmin-ui/src/views/acs/history/udwData/index.vue
Normal file
@@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-select
|
||||
v-model="form.unified_key"
|
||||
placeholder="unified_key"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
clearable
|
||||
filterable
|
||||
size="small">
|
||||
<el-option v-for="(item,index) in unified_key" :key="index" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="query.code"
|
||||
size="small"
|
||||
clearable
|
||||
placeholder="编号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||
<el-form-item label="unified_key">
|
||||
<el-input v-model="form.unified_key" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="编号">
|
||||
<el-input v-model="form.key" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="值">
|
||||
<el-input v-model="form.value" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="small"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="unified_key" label="unified_key" />
|
||||
<el-table-column prop="key" label="编号" />
|
||||
<el-table-column prop="value" label="值" />
|
||||
<el-table-column
|
||||
v-permission="['admin','instruction:edit','instruction:del']"
|
||||
fixed="left"
|
||||
label="操作"
|
||||
width="150px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button slot="right" size="mini" style="margin-left: -1px;margin-right: 2px" type="text" @click="dialogFormVisible = true">
|
||||
查询历史
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<!--弹窗设置设备与图标绑定与角度-->
|
||||
<el-dialog title="历史" :visible.sync="dialogFormVisible" width="35%">
|
||||
<el-form :model="form" size="small">
|
||||
<el-form-item label="unified_key" prop="unified_key" label-width="100px">
|
||||
<el-input v-model="form.unified_key" :disabled="true" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="code" prop="key" label-width="100px">
|
||||
<el-input v-model="form.key" :disabled="true" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudUdwData from '@/api/acs/history/udwData'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import { getDicts } from '@/api/system/dict'
|
||||
|
||||
const defaultForm = {
|
||||
unified_key: '',
|
||||
key: null,
|
||||
value: null,
|
||||
last_modify_date: null
|
||||
}
|
||||
export default {
|
||||
dicts: [],
|
||||
name: 'UdwData',
|
||||
components: { pagination, crudOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '数据源',
|
||||
url: 'api/udw/',
|
||||
idField: 'key',
|
||||
sort: 'key',
|
||||
query: {},
|
||||
crudMethod: { ...crudUdwData },
|
||||
optShow: {
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unified_key: [
|
||||
{
|
||||
value: '1',
|
||||
label: 'opc_value'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: 'cached'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: 'socket'
|
||||
}
|
||||
],
|
||||
permission: {
|
||||
},
|
||||
dialogFormVisible: false,
|
||||
rules: {
|
||||
},
|
||||
form: {
|
||||
unified_key: 'opc_value',
|
||||
key: null,
|
||||
value: null,
|
||||
last_modify_date: null
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
getDicts().then(data => {
|
||||
this.dicts = data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
18
acs/nladmin-ui/src/views/monitor/lucene/api/lucene.js
Normal file
18
acs/nladmin-ui/src/views/monitor/lucene/api/lucene.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getLogData(param) {
|
||||
return request({
|
||||
url: 'api/lucene/getAll',
|
||||
method: 'get',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function labelsValues() {
|
||||
return request({
|
||||
url: 'api/loki/labels/values',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export default { getLogData, labelsValues }
|
||||
@@ -1,20 +1,8 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<Search/>
|
||||
<crudOperation>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:loading="crud.delAllLoading"
|
||||
@click="confirmDelAll()"
|
||||
>
|
||||
清空
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<Search />
|
||||
<crudOperation />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
@@ -24,15 +12,22 @@
|
||||
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="resource_name" label="资源号"/>
|
||||
<el-table-column prop="create_datetime" label="创建时间"/>
|
||||
<el-table-column prop="content" label="内容详情"/>
|
||||
<!-- <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="设备号" min-width="130" show-overflow-tooltip/>
|
||||
<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>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
<pagination />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -43,14 +38,13 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import { delAll } from '@/api/acs/lucene/log'
|
||||
|
||||
const start = new Date()
|
||||
export default {
|
||||
name: 'LuceneLog',
|
||||
components: { Search, pagination, crudOperation },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
cruds: function() {
|
||||
return CRUD({
|
||||
title: '系统参数', url: 'api/lucene', idField: 'id', sort: 'id,desc',
|
||||
title: '系统参数', url: 'api/lucene/getAll', idField: 'id', sort: 'id,desc',
|
||||
queryOnPresenterCreated: true,
|
||||
optShow: {
|
||||
add: false,
|
||||
@@ -64,7 +58,7 @@ export default {
|
||||
page: 0
|
||||
},
|
||||
query: {
|
||||
createTime: [start.setTime(start.getTime() - 3600 * 1000 * 0.5), new Date()]
|
||||
createTime: [new Date(new Date().setTime(new Date().getTime() - 3600 * 1000)), new Date(new Date().setTime(new Date().getTime() + 3600 * 1000))]
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,10 +1,50 @@
|
||||
<template>
|
||||
<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="请输入你要搜索的内容"
|
||||
placeholder="请输入你要搜索的内容详情"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
@@ -16,12 +56,13 @@
|
||||
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/>
|
||||
<rrOperation />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user