Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
fd08a9632e
341
god-ui/src/views/dimension/alarmSetting/index.vue
Normal file
341
god-ui/src/views/dimension/alarmSetting/index.vue
Normal file
@ -0,0 +1,341 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="报警编码" prop="machineCode">
|
||||
<el-input
|
||||
v-model="queryParams.machineCode"
|
||||
placeholder="请输入报警编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警装置" prop="machineName">
|
||||
<el-input
|
||||
v-model="queryParams.machineName"
|
||||
placeholder="请输入报警装置"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警类型" prop="taskNumber">
|
||||
<el-input
|
||||
v-model="queryParams.taskNumber"
|
||||
placeholder="请输入报警类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="适用机械" prop="farmland">
|
||||
<el-input
|
||||
v-model="queryParams.farmland"
|
||||
placeholder="请输入适用机械"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="添加时间" prop="startTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.startTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="timeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="报警编码" align="center" prop="machineCode" />
|
||||
<el-table-column label="报警装置" align="center" prop="machineName" />
|
||||
<el-table-column label="报警类型" align="center" prop="taskNumber" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.taskNumber === '温度报警'">温度报警</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.taskNumber === '翻滚报警'">翻滚报警</el-tag>
|
||||
<el-tag type="info" v-else-if="scope.row.taskNumber === '漏气报警'">漏气报警</el-tag>
|
||||
<el-tag type="warning" v-else-if="scope.row.taskNumber === '油位变化报警'">油位变化报警</el-tag>
|
||||
<div v-else>{{scope.row.taskNumber}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="适用机械" align="center" prop="farmland" />
|
||||
<el-table-column label="添加时间" align="center" prop="startTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="作业类型" align="center" prop="jobType">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.cqyg_machine_job_type" :value="scope.row.jobType"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="描述" align="center" prop="chargePerson" />
|
||||
<el-table-column label="添加人" align="center" prop="addPerson" />
|
||||
<!-- <el-table-column label="数据类型" align="center" prop="dataType" />-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改农机运行时间对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="报警编码" prop="machineCode">
|
||||
<el-input v-model="form.machineCode" placeholder="请输入报警编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警装置" prop="machineName">
|
||||
<el-input v-model="form.machineName" placeholder="请输入报警装置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警类型" prop="taskNumber">
|
||||
<el-input v-model="form.taskNumber" placeholder="请输入报警类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="适用机械" prop="farmland">
|
||||
<el-input v-model="form.farmland" placeholder="请输入适用机械" />
|
||||
</el-form-item>
|
||||
<el-form-item label="添加时间" prop="startTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.startTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="作业类型" prop="jobType">-->
|
||||
<!-- <el-select v-model="form.jobType" placeholder="请选择作业类型">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.cqyg_machine_job_type"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="描述" prop="chargePerson">
|
||||
<el-input v-model="form.chargePerson" placeholder="请输入描述" type="textarea"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="添加人" prop="addPerson">
|
||||
<el-input v-model="form.addPerson" placeholder="请输入添加人" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listTime, getTime, delTime, addTime, updateTime } from "@/api/machinery/time";
|
||||
|
||||
export default {
|
||||
//预警中心,报警设置
|
||||
name: "AlarmSetting",
|
||||
dicts: ['cqyg_machine_job_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 农机运行时间表格数据
|
||||
timeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
machineCode: null,
|
||||
machineName: null,
|
||||
taskNumber: null,
|
||||
farmland: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
jobType: null,
|
||||
chargePerson: null,
|
||||
addPerson: null,
|
||||
dataType: "报警设置"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询农机运行时间列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listTime(this.queryParams).then(response => {
|
||||
this.timeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
machineCode: null,
|
||||
machineName: null,
|
||||
taskNumber: null,
|
||||
farmland: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
jobType: null,
|
||||
chargePerson: null,
|
||||
addPerson: null,
|
||||
dataType: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加报警设置参数";
|
||||
this.form.dataType = "报警设置";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getTime(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改报警设置参数";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateTime(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addTime(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除报警设置参数编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delTime(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('machinery/time/export', {
|
||||
...this.queryParams
|
||||
}, `time_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -231,7 +231,6 @@ export default {
|
||||
name: '挖掘机',
|
||||
data: [23.3, 22.7, 23.6, 24.1, 22.8, 23.0, 22.4],
|
||||
type: 'bar',
|
||||
barWidth: 30,
|
||||
yAxisIndex: 0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
@ -249,7 +248,6 @@ export default {
|
||||
name: '铲土机械',
|
||||
data: [55.6, 56.8, 60.0, 61.2, 57.0, 58.4, 59.0],
|
||||
type: 'bar',
|
||||
barWidth: 30,
|
||||
yAxisIndex: 0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
@ -267,7 +265,6 @@ export default {
|
||||
name: '起重机械',
|
||||
data: [63.0, 60.5, 55.0, 57.0, 58.5, 61.3, 62.0],
|
||||
type: 'bar',
|
||||
barWidth: 30,
|
||||
yAxisIndex: 0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
@ -285,7 +282,6 @@ export default {
|
||||
name: '压实机械',
|
||||
data: [44.0, 38.0, 41.0, 36.0, 32.0, 37.0, 42.0],
|
||||
type: 'bar',
|
||||
barWidth: 30,
|
||||
yAxisIndex: 0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
@ -303,7 +299,6 @@ export default {
|
||||
name: '桩工机械',
|
||||
data: [90.0, 88.0, 92.0, 95.0, 89.0, 84.0, 87.0],
|
||||
type: 'bar',
|
||||
barWidth: 30,
|
||||
yAxisIndex: 0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
<div class="card-item-content">
|
||||
<div class="card-item-title">各区域特种作业完成情况</div>
|
||||
<div class="card-item-title">设备平均使用效率(工作时长/计划时长)</div>
|
||||
<div class="card-item-main" id="chart1"></div>
|
||||
</div>
|
||||
|
||||
@ -92,31 +92,31 @@ export default {
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '推土机901',
|
||||
name: '挖掘机',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: [75, 81, 92, 73, 82, 79, 90]
|
||||
},
|
||||
{
|
||||
name: '推土机902',
|
||||
name: '铲土机械',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: [81, 83, 92, 85, 82, 102, 80]
|
||||
},
|
||||
{
|
||||
name: '塔式起重机910',
|
||||
name: '起重机械',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: [62, 61, 67, 69, 72, 70, 75]
|
||||
},
|
||||
{
|
||||
name: '塔式起重机911',
|
||||
name: '压实机械',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: [79, 76, 65, 75, 76, 78, 79.2]
|
||||
},
|
||||
{
|
||||
name: '夯实机301',
|
||||
name: '桩工机械',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: [64, 62, 58, 54, 58, 60, 63]
|
||||
@ -286,7 +286,7 @@ export default {
|
||||
}
|
||||
|
||||
.card-item-main {
|
||||
min-height: 285px;
|
||||
min-height: 430px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user