|
@@ -8,29 +8,30 @@
|
|
|
<a-button v-has="'add:summary'" @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
</div>
|
|
|
<div class="item-search">
|
|
|
- <a-input placeholder="请输入联锁名称" v-model="queryParam.interlockname" allow-clear @change="searchQuery">
|
|
|
+ <a-input placeholder="联锁名称" v-model="queryParam.interlockname" allow-clear @change="searchQuery">
|
|
|
<a-icon slot="prefix" type="search" />
|
|
|
</a-input>
|
|
|
</div>
|
|
|
<div class="item-search">
|
|
|
- <a-input placeholder="请输入联锁条件" v-model="queryParam.interlockConditionTag" allow-clear @change="searchQuery">
|
|
|
+ <a-input placeholder="联锁条件" v-model="queryParam.interlockConditionTag" allow-clear @change="searchQuery">
|
|
|
<a-icon slot="prefix" type="search" />
|
|
|
</a-input>
|
|
|
</div>
|
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
|
- <a-select placeholder="请选择仪表状态" v-model="queryParam.instrumentStatus" allowClear :options="healthLevelOption" style="width: 100%;"></a-select>
|
|
|
+ <a-select placeholder="仪表状态" v-model="queryParam.instrumentStatus" allowClear :options="instrumentOptions" @change="searchQuery"></a-select>
|
|
|
</div>
|
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
|
- <a-select placeholder="请选择控制系统状态" v-model="queryParam.controlSystemStatus" allowClear :options="healthLevelOption" style="width: 100%;"></a-select>
|
|
|
+ <a-select placeholder="控制系统状态" v-model="queryParam.controlSystemStatus" allowClear :options="controlSystemOptions" @change="searchQuery"></a-select>
|
|
|
</div>
|
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
|
- <a-select placeholder="请选择旁路状态" v-model="queryParam.bypass" allowClear :options="healthLevelOption" style="width: 100%;"></a-select>
|
|
|
+ <a-select placeholder="旁路状态" v-model="queryParam.bypass" allowClear :options="bypassOptions" @change="searchQuery"></a-select>
|
|
|
</div>
|
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
|
- <j-dict-select-tag v-model="queryParam.interlockStatus" placeholder="请选择联锁状态" dictCode="interlock_status" style="width: 100%;"/>
|
|
|
+ <!-- <j-dict-select-tag v-model="queryParam.interlockStatus" placeholder="联锁状态" dictCode="interlock_status" @change="searchQuery"/> -->
|
|
|
+ <a-select placeholder="联锁状态" v-model="queryParam.interlockStatus" allowClear :options="interlockOptions" @change="searchQuery" @blur="searchQuery"></a-select>
|
|
|
</div>
|
|
|
<div v-if="selectData.interlockType === '1'" class="item-search">
|
|
|
- <a-select placeholder="请选择回路健康级别" v-model="queryParam.loopHealthLevel" allowClear :options="healthLevelOption" style="width: 100%;"></a-select>
|
|
|
+ <a-select placeholder="回路健康级别" v-model="queryParam.loopHealthLevel" allowClear :options="healthLevelOption" @change="searchQuery"></a-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <a-row :gutter="24">
|
|
@@ -356,8 +357,12 @@
|
|
|
],
|
|
|
dictOptions:{},
|
|
|
superFieldList:[],
|
|
|
- mouseSummaryid: '',
|
|
|
-
|
|
|
+ // mouseSummaryid: '', // 用于合并单元格悬浮样式设置
|
|
|
+ // 当前系统默认值
|
|
|
+ instrumentOptions: [], // 仪表状态
|
|
|
+ controlSystemOptions: [], // 控制系统状态
|
|
|
+ bypassOptions: [], // 旁路状态
|
|
|
+ interlockOptions: [], // 联锁状态
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -365,6 +370,7 @@
|
|
|
this.loadData();
|
|
|
this.initDictConfig();
|
|
|
this.getSuperFieldList();
|
|
|
+ this.getSystemDefaulOptions()
|
|
|
},
|
|
|
computed: {
|
|
|
importExcelUrl: function(){
|
|
@@ -373,29 +379,29 @@
|
|
|
},
|
|
|
methods: {
|
|
|
// 合并后悬浮行背景色一起显示--后来取消此需求
|
|
|
- customRow(record, index) {
|
|
|
- return {
|
|
|
- style: {
|
|
|
- //样式
|
|
|
- 'background-color': record.summaryid === this.mouseSummaryid ? '#e6faff' : ''
|
|
|
- },
|
|
|
- on: {
|
|
|
- // 鼠标移入
|
|
|
- mouseenter: event => {
|
|
|
- // 维护一个变量记录当前行id 因为我是根据id来进行行合并的
|
|
|
- this.mouseSummaryid = record.summaryid
|
|
|
- },
|
|
|
- //移除 清除id 还原样式
|
|
|
- mouseleave: (event) => {
|
|
|
- this.mouseSummaryid = ''
|
|
|
- },
|
|
|
- // 点击合并行颜色未一起改变-待优化
|
|
|
- click: (event) => {
|
|
|
- this.mouseSummaryid = record.summaryid
|
|
|
- },
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ // customRow(record, index) {
|
|
|
+ // return {
|
|
|
+ // style: {
|
|
|
+ // //样式
|
|
|
+ // 'background-color': record.summaryid === this.mouseSummaryid ? '#e6faff' : ''
|
|
|
+ // },
|
|
|
+ // on: {
|
|
|
+ // // 鼠标移入
|
|
|
+ // mouseenter: event => {
|
|
|
+ // // 维护一个变量记录当前行id 因为我是根据id来进行行合并的
|
|
|
+ // this.mouseSummaryid = record.summaryid
|
|
|
+ // },
|
|
|
+ // //移除 清除id 还原样式
|
|
|
+ // mouseleave: (event) => {
|
|
|
+ // this.mouseSummaryid = ''
|
|
|
+ // },
|
|
|
+ // // 点击合并行颜色未一起改变-待优化
|
|
|
+ // click: (event) => {
|
|
|
+ // this.mouseSummaryid = record.summaryid
|
|
|
+ // },
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
// 单元格点击事件
|
|
|
customCellDetail(record, index, columnValue, columnTitle){
|
|
|
return {
|
|
@@ -419,6 +425,75 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ changeSystemDefaulOptions(){
|
|
|
+
|
|
|
+ },
|
|
|
+ // 获得当前系统设置的默认参数
|
|
|
+ getSystemDefaulOptions(){
|
|
|
+ getAction('/base/interlockBase/queryById', {id: this.selectData.id}).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ var result = res.result
|
|
|
+
|
|
|
+ // let numbers = [];
|
|
|
+ // let words = [];
|
|
|
+ // 使用正则表达式分割字符串
|
|
|
+ // let parts = result.instrumentStatusNormal_dictText.split(/(\d+)/)
|
|
|
+ // console.log(parts)
|
|
|
+ // 循环处理分割结果
|
|
|
+ // parts.forEach(part => {
|
|
|
+ // if (part.match(/\d+/)) { // 匹配数字
|
|
|
+ // numbers.push(Number(part));
|
|
|
+ // } else if (part) { // 匹配非数字符号
|
|
|
+ // words.push(part);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+
|
|
|
+ if(result.bypassYes === '0'){
|
|
|
+ this.bypassOptions = [
|
|
|
+ { value: '0', title: result.bypassYesName },
|
|
|
+ { value: '1', title: result.bypassNoName },
|
|
|
+ ]
|
|
|
+ } else {
|
|
|
+ this.bypassOptions = [
|
|
|
+ { value: '0', title: result.bypassNoName },
|
|
|
+ { value: '1', title: result.bypassYesName },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ if(result.controlSystemStatusNormal === '0'){
|
|
|
+ this.controlSystemOptions = [
|
|
|
+ { value: '0', title: result.controlSystemStatusNormalName },
|
|
|
+ { value: '1', title: result.controlSystemStatusAbnormalName },
|
|
|
+ ]
|
|
|
+ } else {
|
|
|
+ this.controlSystemOptions = [
|
|
|
+ { value: '0', title: result.controlSystemStatusAbnormalName },
|
|
|
+ { value: '1', title: result.controlSystemStatusNormalName },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ if(result.instrumentStatusNormal === '0'){
|
|
|
+ this.instrumentOptions = [
|
|
|
+ { value: '0', title: result.instrumentStatusNormalName },
|
|
|
+ { value: '1', title: result.instrumentStatusAbnormalName },
|
|
|
+ ]
|
|
|
+ } else {
|
|
|
+ this.instrumentOptions = [
|
|
|
+ { value: '0', title: result.instrumentStatusAbnormalName },
|
|
|
+ { value: '1', title: result.instrumentStatusNormalName },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ if(result.interlockStatusTy === '0'){
|
|
|
+ this.interlockOptions = [
|
|
|
+ { value: '0', title: result.interlockStatusTyName },
|
|
|
+ { value: '1', title: result.interlockStatusWtyName },
|
|
|
+ ]
|
|
|
+ } else {
|
|
|
+ this.interlockOptions = [
|
|
|
+ { value: '0', title: result.interlockStatusWtyName },
|
|
|
+ { value: '1', title: result.interlockStatusTyName },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
loadData(arg) {
|
|
|
let that = this
|
|
|
if(!this.url.list){
|
|
@@ -433,6 +508,7 @@
|
|
|
this.loading = true;
|
|
|
// 左右两边重置分别控制各自的,所以转换数据换到这里
|
|
|
if (this.selectData.interlockType == 1) {
|
|
|
+ this.getSystemDefaulOptions()
|
|
|
params.interlockApparatusId = ''
|
|
|
params.interlockSystemId = this.selectData.id
|
|
|
} else {
|
|
@@ -443,8 +519,6 @@
|
|
|
if (res.success) {
|
|
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
this.dataSource = res.result.records||res.result;
|
|
|
-
|
|
|
-
|
|
|
if(res.result.total)
|
|
|
{
|
|
|
// 合并单元格
|