|
@@ -2,33 +2,35 @@
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
<el-form-item label="装置" prop="plantId">
|
|
|
- <el-select v-model="queryParams.plantId" @change="handleQuery" placeholder="请选择装置" clearable size="small">
|
|
|
- <el-option
|
|
|
- v-for="plant in plantOperation"
|
|
|
- :key="plant.id"
|
|
|
- :label="plant.plantName"
|
|
|
- :value="plant.id"
|
|
|
- />
|
|
|
+ <el-select v-model="queryParams.plantId" @change="handleQuery,getAllRegion(queryParams.plantId)"
|
|
|
+ placeholder="请选择装置" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="plant in plantOperation"
|
|
|
+ :key="plant.id"
|
|
|
+ :label="plant.plantName"
|
|
|
+ :value="plant.id"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="区域" prop="regionId">
|
|
|
- <el-select v-model="queryParams.regionId" @change="handleQuery" placeholder="请选择区域" clearable size="small">
|
|
|
- <!-- <el-option
|
|
|
- v-for="dict in classesOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />-->
|
|
|
+ <el-select v-model="queryParams.regionId" @change="handleQuery,getAllDeviceByRegionId(queryParams.regionId)"
|
|
|
+ placeholder="请选择区域" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in regionOperation"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.regionName"
|
|
|
+ :value="dict.id"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="设备" prop="devId">
|
|
|
<el-select v-model="queryParams.devId" @change="handleQuery" placeholder="请选择设备" clearable size="small">
|
|
|
- <!-- <el-option
|
|
|
- v-for="dict in classesOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />-->
|
|
|
+ <el-option
|
|
|
+ v-for="dict in deviceOperation"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.describe"
|
|
|
+ :value="dict.id"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="群组编码" prop="groupCode">
|
|
@@ -50,45 +52,45 @@
|
|
|
<el-form-item label="泄漏程度" prop="leakageDegree">
|
|
|
<el-select v-model="queryParams.leakageDegree" @change="handleQuery" placeholder="请选择泄漏程度" clearable
|
|
|
size="small">
|
|
|
- <!-- <el-option
|
|
|
- v-for="dict in classesOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />-->
|
|
|
+ <el-option
|
|
|
+ v-for="dict in leakageDegreeOperation"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="是/否不可达点" prop="unarrive">
|
|
|
<el-select v-model="queryParams.unarrive" @change="handleQuery" placeholder="请选择是/否" clearable
|
|
|
size="small">
|
|
|
- <el-option
|
|
|
- v-for="dict in yesOrNoOperation"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />
|
|
|
+ <el-option
|
|
|
+ v-for="dict in yesOrNoOperation"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="密封点类型" prop="pointType">
|
|
|
<el-select v-model="queryParams.pointType" @change="handleQuery" placeholder="请选择密封点类型" clearable
|
|
|
size="small">
|
|
|
- <!-- <el-option
|
|
|
- v-for="dict in classesOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />-->
|
|
|
+ <el-option
|
|
|
+ v-for="dict in pointOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="审核状态" prop="approveStatus">
|
|
|
<el-select v-model="queryParams.approveStatus" @change="handleQuery" placeholder="请选择审核状态" clearable
|
|
|
size="small">
|
|
|
- <el-option
|
|
|
- v-for="dict in approveStatusOperation"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />
|
|
|
+ <el-option
|
|
|
+ v-for="dict in approveStatusOperation"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
@@ -167,20 +169,21 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="pointList" :cell-style="tableCellStyle" @selection-change="handleSelectionChange" :height="clientHeight" border>
|
|
|
+ <el-table v-loading="loading" :data="pointList" :cell-style="tableCellStyle"
|
|
|
+ @selection-change="handleSelectionChange" :height="clientHeight" border>
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column label="检测净值(ppm)" align="center" prop="ppm" width="110" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="泄漏程度" align="center" prop="leakageDegree" :formatter="leakageFormat"/>
|
|
|
- <el-table-column label="装置名称" align="center" prop="plantName":show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="装置名称" align="center" prop="plantName" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="装置编码" align="center" prop="plantCode"/>
|
|
|
<el-table-column label="装置类别" align="center" prop="plantType" :formatter="plantTypeFormat"/>
|
|
|
<el-table-column label="区域名称" align="center" prop="regionName"/>
|
|
|
<el-table-column label="区域编码" align="center" prop="regionCode"/>
|
|
|
- <el-table-column label="设备/管线名称" align="center" prop="devName" width="110"/>
|
|
|
- <el-table-column label="设备/管线编码" align="center" prop="devCode" width="110"/>
|
|
|
+ <el-table-column label="设备/管线名称" align="center" prop="devName" width="150" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="设备/管线编码" align="center" prop="devCode" width="150" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="介质" align="center" prop="medium"/>
|
|
|
- <el-table-column label="介质状态" align="center" prop="mediumType"/>
|
|
|
- <el-table-column label="密封点类型" align="center" prop="pointType" width="100"/>
|
|
|
+ <el-table-column label="介质状态" align="center" prop="mediumType" :formatter="mediumTypeFormat"/>
|
|
|
+ <el-table-column label="密封点类型" align="center" prop="pointType" width="100" :formatter="pointFormat"/>
|
|
|
<el-table-column label="平台(层)" align="center" prop="layer"/>
|
|
|
<el-table-column label="群组位置" align="center" prop="groupPosition"/>
|
|
|
<el-table-column label="密封点位置" align="center" prop="pointPosition" width="110"/>
|
|
@@ -203,7 +206,8 @@
|
|
|
<el-table-column label="TOC质量分数" align="center" prop="tocMark" width="110"/>
|
|
|
<el-table-column label="甲烷质量分数" align="center" prop="methaneMark" width="110"/>
|
|
|
<el-table-column label="VOCs质量分数" align="center" prop="vocsMark" width="110"/>
|
|
|
- <el-table-column label="审核状态" align="center" fixed="left" prop="approveStatus" :formatter="approveStatusFormat"/>
|
|
|
+ <el-table-column label="审核状态" align="center" fixed="left" prop="approveStatus"
|
|
|
+ :formatter="approveStatusFormat"/>
|
|
|
<el-table-column label="最后维护人" align="center" prop="updater" width="110"/>
|
|
|
<el-table-column label="最后维护时间" align="center" prop="updatedate" width="180">
|
|
|
<template slot-scope="scope">
|
|
@@ -242,30 +246,32 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改密封点对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :before-close="cleanRegion">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="装置" prop="plantId">
|
|
|
- <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 100%">
|
|
|
- <el-option
|
|
|
- v-for="dict in plantOperation"
|
|
|
- :key="dict.id"
|
|
|
- :label="dict.plantName"
|
|
|
- :value="dict.id"
|
|
|
- />
|
|
|
+ <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 100%"
|
|
|
+ @change="getAllRegion(form.plantId)">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in plantOperation"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.plantName"
|
|
|
+ :value="dict.id"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="区域" prop="regionId">
|
|
|
- <el-select v-model="form.regionId" placeholder="请选择区域" clearable size="small" style="width: 100%">
|
|
|
- <!-- <el-option
|
|
|
- v-for="dict in classesOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />-->
|
|
|
+ <el-select v-model="form.regionId" placeholder="请选择区域" clearable size="small" style="width: 100%"
|
|
|
+ @change="getAllDeviceByRegionId(form.regionId)">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in regionOperation"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.regionName"
|
|
|
+ :value="dict.id"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -274,12 +280,12 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="设备" prop="devId">
|
|
|
<el-select v-model="form.devId" placeholder="请选择设备" clearable size="small" style="width: 100%">
|
|
|
- <!-- <el-option
|
|
|
- v-for="dict in classesOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />-->
|
|
|
+ <el-option
|
|
|
+ v-for="dict in deviceOperation"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.describe"
|
|
|
+ :value="dict.id"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -292,13 +298,14 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="密封点类型" prop="pointType">
|
|
|
- <el-select v-model="form.pointType" placeholder="请选择密封点类型" clearable size="small" style="width: 100%">
|
|
|
- <!-- <el-option
|
|
|
- v-for="dict in classesOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />-->
|
|
|
+ <el-select v-model="form.pointType" placeholder="请选择密封点类型" clearable size="small"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in pointOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -311,13 +318,14 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="介质状态" prop="mediumType">
|
|
|
- <el-select v-model="form.mediumType" placeholder="请选择介质状态" clearable size="small" style="width: 100%">
|
|
|
- <!-- <el-option
|
|
|
- v-for="dict in classesOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />-->
|
|
|
+ <el-select v-model="form.mediumType" placeholder="请选择介质状态" clearable size="small"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in mediumTypeOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -462,12 +470,16 @@
|
|
|
<script>
|
|
|
import {listPoint, getPoint, delPoint, addPoint, updatePoint} from "@/api/base/point";
|
|
|
import {getAllPlantName} from "@/api/base/plant";
|
|
|
+import {getAllRegion} from "@/api/base/region";
|
|
|
+import {getAllDeviceByRegionId} from "@/api/base/device";
|
|
|
|
|
|
export default {
|
|
|
name: "Point",
|
|
|
data() {
|
|
|
return {
|
|
|
plantOperation: [],
|
|
|
+ regionOperation: [],
|
|
|
+ deviceOperation: [],
|
|
|
plantTypeOptions: [],
|
|
|
leakageDegreeOperation: [],
|
|
|
// 遮罩层
|
|
@@ -482,6 +494,8 @@ export default {
|
|
|
// 显示搜索条件
|
|
|
showSearch: false,
|
|
|
yesOrNoOperation: [],
|
|
|
+ pointOptions: [],
|
|
|
+ mediumTypeOptions: [],
|
|
|
approveStatusOperation: [],
|
|
|
// 总条数
|
|
|
total: 0,
|
|
@@ -539,6 +553,12 @@ export default {
|
|
|
plantId: [
|
|
|
{required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "blur"}
|
|
|
],
|
|
|
+ regionId: [
|
|
|
+ {required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "blur"}
|
|
|
+ ],
|
|
|
+ devId: [
|
|
|
+ {required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "blur"}
|
|
|
+ ],
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -559,18 +579,50 @@ export default {
|
|
|
this.getDicts("leakage_degree").then(response => {
|
|
|
this.leakageDegreeOperation = response.data;
|
|
|
});
|
|
|
+ this.getDicts("point_type").then(response => {
|
|
|
+ this.pointOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("medium_type").then(response => {
|
|
|
+ this.mediumTypeOptions = response.data;
|
|
|
+ });
|
|
|
this.getList();
|
|
|
getAllPlantName().then(response => {
|
|
|
this.plantOperation = response.data;
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ getAllRegion(val) {
|
|
|
+ this.form.regionId = '';
|
|
|
+ this.queryParams.regionId = '';
|
|
|
+ this.form.devId = '';
|
|
|
+ this.queryParams.devId = '';
|
|
|
+ if (val != null && val != '') {
|
|
|
+ getAllRegion(val).then(response => {
|
|
|
+ this.regionOperation = response.data;
|
|
|
+ }
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ this.regionOperation = [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getAllDeviceByRegionId(val) {
|
|
|
+ this.form.devId = '';
|
|
|
+ this.queryParams.devId = '';
|
|
|
+ if (val != null && val != '') {
|
|
|
+ getAllDeviceByRegionId(val).then(response => {
|
|
|
+ this.deviceOperation = response.data;
|
|
|
+ }
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ this.deviceOperation = [];
|
|
|
+ }
|
|
|
+ },
|
|
|
tableCellStyle({row, column, rowIndex, columnIndex}) {
|
|
|
if (columnIndex === 1 && row.approveStatus == 2) {
|
|
|
return "color:#00ff00;";
|
|
|
}
|
|
|
- if (columnIndex === 1&& row.approveStatus == 1) {
|
|
|
- return "color:#FFDF00;";
|
|
|
+ if (columnIndex === 1 && row.approveStatus == 1) {
|
|
|
+ return "color:#0000FF;";
|
|
|
}
|
|
|
if (columnIndex === 1 && row.approveStatus == 0) {
|
|
|
return "color:#ff0000;";
|
|
@@ -586,7 +638,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
leakageFormat(row, column) {
|
|
|
- return row.leakageDegree?"●":null;
|
|
|
+ return row.leakageDegree ? "●" : null;
|
|
|
+ },
|
|
|
+ pointFormat(row, column) {
|
|
|
+ return this.selectDictLabel(this.pointOptions, row.pointType);
|
|
|
+ },
|
|
|
+ mediumTypeFormat(row, column) {
|
|
|
+ return this.selectDictLabel(this.mediumTypeOptions, row.mediumType);
|
|
|
},
|
|
|
unarriveFormat(row, column) {
|
|
|
return this.selectDictLabel(this.yesOrNoOperation, row.unarrive);
|
|
@@ -614,6 +672,10 @@ export default {
|
|
|
this.open = false;
|
|
|
this.reset();
|
|
|
},
|
|
|
+ cleanRegion(done) {
|
|
|
+ this.reset();
|
|
|
+ done(true);
|
|
|
+ },
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
@@ -657,6 +719,8 @@ export default {
|
|
|
updatedate: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
+ this.regionOperation = [];
|
|
|
+ this.deviceOperation = [];
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
@@ -667,6 +731,8 @@ export default {
|
|
|
resetQuery() {
|
|
|
this.resetForm("queryForm");
|
|
|
this.handleQuery();
|
|
|
+ this.regionOperation = [];
|
|
|
+ this.deviceOperation = [];
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
@@ -686,6 +752,14 @@ export default {
|
|
|
const id = row.id || this.ids
|
|
|
getPoint(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
+ getAllRegion(this.form.plantId).then(response => {
|
|
|
+ this.regionOperation = response.data;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ getAllDeviceByRegionId(this.form.regionId).then(response => {
|
|
|
+ this.deviceOperation = response.data;
|
|
|
+ }
|
|
|
+ )
|
|
|
this.open = true;
|
|
|
this.title = "修改密封点";
|
|
|
});
|
|
@@ -729,7 +803,8 @@ export default {
|
|
|
},
|
|
|
handleToApprove() {
|
|
|
alert("功能开发中......")
|
|
|
- },handleApprove() {
|
|
|
+ },
|
|
|
+ handleApprove() {
|
|
|
alert("功能开发中......")
|
|
|
}
|
|
|
}
|