rev:增加报警信息
This commit is contained in:
@@ -6,7 +6,7 @@ export default {
|
||||
'alarm_message': '报警信息',
|
||||
'start_time': '开始日期',
|
||||
'end_time': '结束日期',
|
||||
'error_time': '错误时间'
|
||||
'error_time': '报警时间'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export const constantRouterMap = [
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: (resolve) => require(['@/views/track/showTrack'], resolve),
|
||||
component: (resolve) => require(['@/views/monitor/server/index'], resolve),
|
||||
// component: (resolve) => require(['@/views/monitor/server/index'], resolve),
|
||||
name: 'Dashboard',
|
||||
meta: { title: i18n.t('auto.common.home'), icon: 'index', affix: true, noCache: true }
|
||||
|
||||
@@ -4,42 +4,35 @@
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">{{ $t('errorLog.table.device_code') }}</label>
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
:placeholder="$t('errorLog.table.device_code')"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.error_code"
|
||||
clearable
|
||||
:placeholder="$t('errorLog.table.alarm_code')"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.error_info"
|
||||
clearable
|
||||
:placeholder="$t('errorLog.table.alarm_message')"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="value"
|
||||
type="datetimerange"
|
||||
style="height: 30.5px; display: inline-block; vertical-align: middle; margin: 0 3px 10px 0; line-height: 30.5px;"
|
||||
:end-placeholder="$t('errorLog.table.end_time')"
|
||||
:start-placeholder="$t('errorLog.table.start_time')"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:picker-options="pickerOptions"
|
||||
@change="pickerChange"
|
||||
/>
|
||||
<rrOperation :crud="crud" />
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="设备编码">
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="车号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
@@ -137,6 +130,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
downLoadDeviceErrorLogging: false,
|
||||
permission: {
|
||||
add: ['admin', 'deviceErrorLog:add'],
|
||||
edit: ['admin', 'deviceErrorLog:edit'],
|
||||
@@ -195,20 +189,18 @@ export default {
|
||||
}
|
||||
},
|
||||
doExportDeviceErrorLogging() {
|
||||
this.downLoadTaskLogging = true
|
||||
const params = {
|
||||
device_code: this.query.device_code,
|
||||
error_code: this.query.error_code,
|
||||
error_info: this.query.error_info,
|
||||
start_time: this.query.start_time,
|
||||
end_time: this.query.end_time
|
||||
this.downLoadDeviceErrorLogging = true
|
||||
const params = this.crud.query
|
||||
if (this.crud.query.createTime !== undefined) {
|
||||
params.begin_time = this.crud.query.createTime[0]
|
||||
params.end_time = this.crud.query.createTime[1]
|
||||
}
|
||||
const url = '/api/deviceErrorLog/download'
|
||||
download(url, params).then(result => {
|
||||
downloadFile(result, this.crud.title + '数据', 'csv')
|
||||
this.downLoadTaskTreeLogging = false
|
||||
downloadFile(result, '设备报警记录', 'pdf')
|
||||
this.downLoadDeviceErrorLogging = false
|
||||
}).catch(() => {
|
||||
this.downLoadTaskTreeLogging = false
|
||||
this.downLoadDeviceErrorLogging = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,20 +32,6 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('task.txt_box.Material_type')">
|
||||
<el-select
|
||||
v-model="query.material_type"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
:placeholder="$t('task.txt_box.Material_type')"
|
||||
class="filter-item"
|
||||
style="width: 190px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('task.txt_box.Task_status')">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
@@ -60,20 +46,6 @@
|
||||
<el-option v-for="item in dict.task_status" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('task.txt_box.Task_type')">
|
||||
<el-select
|
||||
v-model="query.task_type"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
:placeholder="$t('task.txt_box.Task_type')"
|
||||
class="filter-item"
|
||||
style="width: 190px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option v-for="item in dict.task_type" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('task.txt_box.Origin_or_destination')">
|
||||
<el-input
|
||||
v-model="query.point_code"
|
||||
@@ -85,21 +57,29 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('task.txt_box.time')">
|
||||
<Search />
|
||||
<el-form-item label="车号">
|
||||
<el-input
|
||||
v-model="query.car_no"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="车号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
<!-- <el-input-->
|
||||
<!-- v-if="false"-->
|
||||
<!-- v-model="query.is_over"-->
|
||||
<!-- value="1"-->
|
||||
<!-- size="small"-->
|
||||
<!-- clearable-->
|
||||
<!-- :placeholder="$t('TaskRecord.table.Task_code')"-->
|
||||
<!-- style="width: 200px;"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- @keyup.enter.native="crud.toQuery"-->
|
||||
<!-- />-->
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
@@ -293,11 +273,10 @@
|
||||
<el-table-column prop="priority" :label="$t('TaskRecord.table.Priority')" :min-width="flexWidth('priority',crud.data,$t('TaskRecord.table.Priority'))" />
|
||||
<el-table-column prop="start_point_code" :label="$t('task.select.Start_point')" :min-width="flexWidth('start_point_code',crud.data,$t('task.select.Start_point'))" />
|
||||
<el-table-column prop="next_point_code" :label="$t('task.select.Destination')" :min-width="flexWidth('next_point_code',crud.data,$t('task.select.Destination'))" />
|
||||
<el-table-column prop="start_point_code2" :label="$t('TaskRecord.table.Starting_point_two')" :min-width="flexWidth('start_point_code2',crud.data,$t('TaskRecord.table.Starting_point_two'))" />
|
||||
<el-table-column prop="next_point_code2" :label="$t('TaskRecord.table.Endpoint_two')" :min-width="flexWidth('next_point_code2',crud.data,$t('TaskRecord.table.Endpoint_two'))" />
|
||||
<el-table-column prop="interaction_json" :label="$t('task.select.Interaction_json')" :show-overflow-tooltip="true" width="150px" />
|
||||
<el-table-column prop="matarial" :label="$t('TaskRecord.table.Material')" />
|
||||
<el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" />
|
||||
<!-- <el-table-column prop="interaction_json" :label="$t('task.select.Interaction_json')" :show-overflow-tooltip="true" width="150px" />-->
|
||||
<!-- <el-table-column prop="matarial" :label="$t('TaskRecord.table.Material')" />-->
|
||||
<!-- <el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" />-->
|
||||
<el-table-column prop="car_no" label="车号" />
|
||||
<el-table-column prop="remark" :label="$t('task.select.Remark')" />
|
||||
<el-table-column prop="create_by" :label="$t('task.select.Creator')" />
|
||||
<el-table-column prop="create_time" :label="$t('task.select.Create_time')" width="135" />
|
||||
@@ -315,6 +294,7 @@ import Search from '@/views/lucene/time'
|
||||
import crudTask from '@/api/acs/task/task'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import deviceCrud from '@/api/acs/device/device'
|
||||
import routeCurd from '@/api/acs/route/routePlan'
|
||||
@@ -344,7 +324,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Task',
|
||||
components: { pagination, crudOperation, Search },
|
||||
components: { pagination, crudOperation, Search, rrOperation },
|
||||
dicts: ['task_status', 'task_type'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -413,6 +393,7 @@ export default {
|
||||
toYList: [],
|
||||
toZList: [],
|
||||
start_flag: false,
|
||||
downLoadTaskLogging: false,
|
||||
end_flag: false,
|
||||
permission: {
|
||||
add: ['admin', 'task:add'],
|
||||
@@ -486,22 +467,18 @@ export default {
|
||||
})
|
||||
},
|
||||
doExportTaskLogging() {
|
||||
this.downLoadTaskLogging = true
|
||||
const params = {
|
||||
task_code: this.query.task_code,
|
||||
vehicle_code: this.query.vehicle_code,
|
||||
material_type: this.query.material_type,
|
||||
status: this.query.status,
|
||||
point_code: this.crud.pointCode,
|
||||
createTime: this.crud.createTime,
|
||||
end_time: this.crud.endTime // 假设 this.crud.endTime 是你的结束时间
|
||||
const params = this.crud.query
|
||||
if (this.crud.query.createTime !== undefined) {
|
||||
params.begin_time = this.crud.query.createTime[0]
|
||||
params.end_time = this.crud.query.createTime[1]
|
||||
}
|
||||
const url = 'api/task/downloadTaskLogging'
|
||||
this.downLoadTaskLogging = true
|
||||
download(url, params).then(result => {
|
||||
downloadFile(result, this.crud.title + '数据', 'csv')
|
||||
this.downLoadTaskTreeLogging = false
|
||||
downloadFile(result, '任务历史数据', 'pdf')
|
||||
this.downLoadTaskLogging = false
|
||||
}).catch(() => {
|
||||
this.downLoadTaskTreeLogging = false
|
||||
this.downLoadTaskLogging = false
|
||||
})
|
||||
},
|
||||
beforeHandleCommand(index, row, command) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div style="color: #666;font-size: 13px;">
|
||||
<svg-icon icon-class="system" style="margin-right: 5px" />
|
||||
<span>
|
||||
{{ $t('auto.monitor.sys') }}:{{ data.sys.os }}
|
||||
{{ $t('auto.monitor.sys') }}:{{ "Windows Server 2022 Standard" }}
|
||||
</span>
|
||||
<span>
|
||||
IP:{{ data.sys.ip }}
|
||||
@@ -13,6 +13,9 @@
|
||||
<span>
|
||||
{{ $t('auto.monitor.day') }}:{{ data.sys.day }}
|
||||
</span>
|
||||
<span>
|
||||
系统版本:{{ "V1.0"}}
|
||||
</span>
|
||||
<i class="el-icon-refresh" style="margin-left: 40px" @click="init" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
Reference in New Issue
Block a user