✨ feat: 历史数据-厂界在线 功能1;修改设备选择组件功能
This commit is contained in:
parent
4c1b0a6d29
commit
3fc5bcdefd
|
@ -8,13 +8,20 @@
|
||||||
:filterable="filterable"
|
:filterable="filterable"
|
||||||
:multiple="multiple"
|
:multiple="multiple"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
|
:filter-method="dataFilter"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in deviceList"
|
v-for="item in deviceList"
|
||||||
:key="item.sn"
|
:key="item.sn"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.sn"
|
:value="item.sn"
|
||||||
></el-option>
|
>
|
||||||
|
<span>
|
||||||
|
{{ item.name }}
|
||||||
|
(<span style="color: #8492a6; font-size: 13px">{{ item.sn }}</span>)
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -69,6 +76,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
dataFilter(query) {
|
||||||
|
if (!query) return this.deviceList = this.deviceListCopy;
|
||||||
|
this.deviceList = this.deviceListCopy.filter(item => item.name.includes(query) || item.sn.includes(query));
|
||||||
|
},
|
||||||
handleChange(val) {
|
handleChange(val) {
|
||||||
this.$emit("input", val);
|
this.$emit("input", val);
|
||||||
this.$emit("change", val);
|
this.$emit("change", val);
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="queryParams" ref="form">
|
<el-form :inline="true" :model="queryParams" ref="form">
|
||||||
<el-form-item label="选择部门" prop="factoryId">
|
<el-form-item label="选择部门1" prop="factoryId">
|
||||||
<dept-tree @deptChange="handleDeptChange" style="width: 150px;" />
|
<dept-tree @deptChange="handleDeptChange" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="设备编号">
|
<el-form-item label="选择设备">
|
||||||
<el-input v-model="queryParams.sn"></el-input>
|
<device-select v-model="queryParams.sn" :deptId="queryParams.deptId || ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="日期" prop="equipmentName">
|
<el-form-item label="日期" prop="equipmentName">
|
||||||
<el-date-picker v-model="dateList" type="daterange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker v-model="dateList" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<el-table-column prop="sn" label="设备编号" header-align="center" align="center" />
|
<el-table-column prop="sn" label="设备编号" header-align="center" align="center" />
|
||||||
<el-table-column prop="reportTime" label="上报时间" header-align="center" align="center" />
|
<el-table-column prop="reportTime" label="上报时间" header-align="center" align="center" />
|
||||||
<!-- <el-table-column prop="wd" label="设备温度" header-align="center" align="center"/>-->
|
<!-- <el-table-column prop="wd" label="设备温度" header-align="center" align="center"/>-->
|
||||||
|
|
||||||
<!-- <el-table-column prop="zl" label="传感器类型" header-align="center" align="center" /> -->
|
<!-- <el-table-column prop="zl" label="传感器类型" header-align="center" align="center" /> -->
|
||||||
<el-table-column prop="lc" label="量程" header-align="center" align="center" />
|
<el-table-column prop="lc" label="量程" header-align="center" align="center" />
|
||||||
<el-table-column prop="ds" label="传感器读数" header-align="center" align="center">
|
<el-table-column prop="ds" label="传感器读数" header-align="center" align="center">
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="zt" label="报警状态" header-align="center" align="center">
|
<el-table-column prop="zt" label="报警状态" header-align="center" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;">
|
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;">
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
@ -66,9 +66,10 @@
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import DeptTree from "@/components/DeptTree/index.vue";
|
import DeptTree from "@/components/DeptTree/index.vue";
|
||||||
import { listAlarmHistory } from "@/api/demostrate/monitor";
|
import { listAlarmHistory } from "@/api/demostrate/monitor";
|
||||||
|
import DeviceSelect from '@/components/DeviceSelect/index.vue';
|
||||||
export default {
|
export default {
|
||||||
name: "alarm",
|
name: "alarm",
|
||||||
components: { DeptTree },
|
components: { DeptTree, DeviceSelect },
|
||||||
dicts: [],
|
dicts: [],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -153,9 +154,6 @@ export default {
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
|
@ -165,4 +163,4 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue