|
@@ -8,12 +8,12 @@
|
|
|
<a-form-item label="联锁总表id">
|
|
|
<a-input placeholder="请输入联锁总表id" v-model="queryParam.summaryid"></a-input>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col> -->
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
<a-form-item label="联锁名称">
|
|
|
<a-input placeholder="请输入联锁名称" v-model="queryParam.interlockname"></a-input>
|
|
|
</a-form-item>
|
|
|
- </a-col> -->
|
|
|
+ </a-col>
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
<a-form-item label="联锁条件">
|
|
|
<a-input placeholder="请输入联锁条件值" v-model="queryParam.interlockCondition"></a-input>
|
|
@@ -132,6 +132,7 @@
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import InterlockDetailModal from './modules/InterlockDetailModal'
|
|
|
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
|
|
+ import { httpAction, getAction } from '@/api/manage'
|
|
|
|
|
|
export default {
|
|
|
name: 'InterlockDetailList',
|
|
@@ -162,7 +163,10 @@
|
|
|
{
|
|
|
title:'联锁名称',
|
|
|
align:"center",
|
|
|
- dataIndex: 'interlockname'
|
|
|
+ dataIndex: 'interlockname',
|
|
|
+ customRender:function (t,r,index) {
|
|
|
+ return {children: t,attrs: {rowSpan:r.rowSpan}};
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
// title:'联锁条件值',
|
|
@@ -183,7 +187,10 @@
|
|
|
{
|
|
|
title:'逻辑关系',
|
|
|
align:"center",
|
|
|
- dataIndex: 'ljgx'
|
|
|
+ dataIndex: 'ljgx',
|
|
|
+ customRender:function (t,r,index) {
|
|
|
+ return {children: t,attrs: {rowSpan:r.rowSpan2}};
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title:'联锁设定值',
|
|
@@ -198,12 +205,15 @@
|
|
|
{
|
|
|
title:'是否旁路',
|
|
|
align:"center",
|
|
|
- dataIndex: 'ifBypass'
|
|
|
+ dataIndex: 'ifBypass_dictText'
|
|
|
},
|
|
|
{
|
|
|
title:'联锁输出值',
|
|
|
align:"center",
|
|
|
- dataIndex: 'interlockOutValue'
|
|
|
+ dataIndex: 'interlockOutValue',
|
|
|
+ customRender:function (t,r,index) {
|
|
|
+ return {children: t,attrs: {rowSpan:r.rowSpan3}};
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title:'输入卡件状态',
|
|
@@ -242,7 +252,8 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getSuperFieldList();
|
|
|
+ this.queryParam.interlockname = this.$route.query.interlockname
|
|
|
+ this.getSuperFieldList();
|
|
|
},
|
|
|
computed: {
|
|
|
importExcelUrl: function(){
|
|
@@ -250,6 +261,130 @@
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ loadData(arg) {
|
|
|
+ let that = this
|
|
|
+ if(!this.url.list){
|
|
|
+ this.$message.error("请设置url.list属性!")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //加载数据 若传入参数1则加载第一页的内容
|
|
|
+ if (arg === 1) {
|
|
|
+ this.ipagination.current = 1;
|
|
|
+ }
|
|
|
+ // if (this.$route.query.interlockname) {
|
|
|
+ // this.queryParam.interlockname = this.$route.query.interlockname
|
|
|
+ // }
|
|
|
+ var params = this.getQueryParams();//查询条件
|
|
|
+ this.loading = true;
|
|
|
+ getAction(this.url.list, params).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
+ this.dataSource = res.result.records||res.result;
|
|
|
+ if(res.result.total)
|
|
|
+ {
|
|
|
+ // 合并单元格
|
|
|
+ //判断跨行
|
|
|
+ let rowSpan = 0
|
|
|
+ let rowSpan2 = 0
|
|
|
+ let rowSpan3 = 0
|
|
|
+ let interlockname = ''
|
|
|
+ let interlocknamePD = ''
|
|
|
+ let ljgx = ''
|
|
|
+ let interlockOutValue = ''
|
|
|
+ for (let i = that.dataSource.length-1; i >= 0; i--) {
|
|
|
+ // 联锁名称合并
|
|
|
+ if (interlockname == '') {
|
|
|
+ that.dataSource[i].rowSpan = 0
|
|
|
+ interlockname = that.dataSource[i].interlockname
|
|
|
+ rowSpan++
|
|
|
+ } else {
|
|
|
+ if(interlockname == that.dataSource[i].interlockname){
|
|
|
+ that.dataSource[i].rowSpan = 0
|
|
|
+ rowSpan++
|
|
|
+ }else{
|
|
|
+ that.dataSource[i+1].rowSpan = rowSpan
|
|
|
+ that.dataSource[i].rowSpan = 0
|
|
|
+ rowSpan = 1
|
|
|
+ interlockname = that.dataSource[i].interlockname
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 联锁状态合并
|
|
|
+ if (ljgx == '') {
|
|
|
+ that.dataSource[i].rowSpan2 = 0
|
|
|
+ ljgx = that.dataSource[i].ljgx
|
|
|
+ interlocknamePD = that.dataSource[i].interlockname
|
|
|
+ rowSpan2++
|
|
|
+ } else {
|
|
|
+ if(ljgx == that.dataSource[i].ljgx){
|
|
|
+ // that.dataSource[i].rowSpan2 = 0
|
|
|
+ // rowSpan2++
|
|
|
+ if (interlocknamePD == that.dataSource[i].interlockname) {
|
|
|
+ that.dataSource[i].rowSpan2 = 0
|
|
|
+ rowSpan2++
|
|
|
+ } else {
|
|
|
+ that.dataSource[i+1].rowSpan2 = rowSpan2
|
|
|
+ that.dataSource[i].rowSpan2 = 0
|
|
|
+ rowSpan2 = 1
|
|
|
+ ljgx = that.dataSource[i].ljgx
|
|
|
+ interlocknamePD = that.dataSource[i].interlockname
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ that.dataSource[i+1].rowSpan2 = rowSpan2
|
|
|
+ that.dataSource[i].rowSpan2 = 0
|
|
|
+ rowSpan2 = 1
|
|
|
+ ljgx = that.dataSource[i].ljgx
|
|
|
+ interlocknamePD = that.dataSource[i].interlockname
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ // 回路健康级别合并
|
|
|
+ if (interlockOutValue === '') {
|
|
|
+ // console.log('第一层')
|
|
|
+ that.dataSource[i].rowSpan3 = 0
|
|
|
+ interlockOutValue = that.dataSource[i].interlockOutValue
|
|
|
+ interlocknamePD = that.dataSource[i].interlockname
|
|
|
+ rowSpan3++
|
|
|
+ } else {
|
|
|
+ if(interlockOutValue == that.dataSource[i].interlockOutValue){
|
|
|
+ // console.log(99,i,interlocknamePD,that.dataSource[i+1].interlockname)
|
|
|
+ if (interlocknamePD == that.dataSource[i+1].interlockname) {
|
|
|
+ // console.log(11111)
|
|
|
+ that.dataSource[i].rowSpan3 = 0
|
|
|
+ rowSpan3++
|
|
|
+ } else {
|
|
|
+ // console.log(22222)
|
|
|
+ that.dataSource[i+1].rowSpan3 = rowSpan3
|
|
|
+ that.dataSource[i].rowSpan3 = 0
|
|
|
+ rowSpan3 = 1
|
|
|
+ interlockOutValue = that.dataSource[i].interlockOutValue
|
|
|
+ interlocknamePD = that.dataSource[i].interlockname
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ // console.log('第二层else')
|
|
|
+ that.dataSource[i+1].rowSpan3 = rowSpan3
|
|
|
+ that.dataSource[i].rowSpan3 = 0
|
|
|
+ rowSpan3 = 1
|
|
|
+ interlockOutValue = that.dataSource[i].interlockOutValue
|
|
|
+ interlocknamePD = that.dataSource[i].interlockname
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ that.dataSource[0].rowSpan = rowSpan
|
|
|
+ that.dataSource[0].rowSpan2 = rowSpan2
|
|
|
+ that.dataSource[0].rowSpan3 = rowSpan3
|
|
|
+ this.ipagination.total = res.result.total;
|
|
|
+ }else{
|
|
|
+ this.ipagination.total = 0;
|
|
|
+ }
|
|
|
+ //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
|
+ }else{
|
|
|
+ this.$message.warning(res.message)
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
initDictConfig(){
|
|
|
},
|
|
|
getSuperFieldList(){
|